gdk3 2.0.2-x86-mingw32 → 2.0.3-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (939) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +6 -2
  3. data/ext/gdk3/extconf.rb +4 -1
  4. data/ext/gdk3/gdk3.def +2 -2
  5. data/ext/gdk3/rbgdk.c +5 -51
  6. data/ext/gdk3/rbgdk3.h +6 -4
  7. data/ext/gdk3/rbgdk3conversions.h +5 -2
  8. data/ext/gdk3/rbgdk3private.h +1 -6
  9. data/ext/gdk3/rbgdkcairo.c +0 -4
  10. data/ext/gdk3/rbgdkdevice.c +60 -4
  11. data/ext/gdk3/rbgdkdevicemanager.c +39 -0
  12. data/ext/gdk3/rbgdkdisplay.c +8 -63
  13. data/ext/gdk3/rbgdkevent.c +644 -396
  14. data/ext/gdk3/rbgdkwindow.c +29 -32
  15. data/lib/1.9/gdk3.so +0 -0
  16. data/lib/2.0/gdk3.so +0 -0
  17. data/lib/gdk3/deprecated.rb +13 -1
  18. data/test/test-gdk-event.rb +598 -0
  19. data/test/test-gdk-rgba.rb +2 -2
  20. data/vendor/local/bin/gtk-launch.exe +0 -0
  21. data/vendor/local/bin/gtk-query-immodules-3.0.exe +0 -0
  22. data/vendor/local/bin/gtk-update-icon-cache.exe +0 -0
  23. data/vendor/local/bin/gtk3-demo-application.exe +0 -0
  24. data/vendor/local/bin/gtk3-demo.exe +0 -0
  25. data/vendor/local/bin/gtk3-widget-factory.exe +0 -0
  26. data/vendor/local/bin/libgailutil-3-0.dll +0 -0
  27. data/vendor/local/bin/libgdk-3-0.dll +0 -0
  28. data/vendor/local/bin/libgtk-3-0.dll +0 -0
  29. data/vendor/local/include/gtk-3.0/gdk/gdkapplaunchcontext.h +6 -0
  30. data/vendor/local/include/gtk-3.0/gdk/gdkcairo.h +13 -0
  31. data/vendor/local/include/gtk-3.0/gdk/gdkcolor.h +8 -0
  32. data/vendor/local/include/gtk-3.0/gdk/gdkcursor.h +17 -0
  33. data/vendor/local/include/gtk-3.0/gdk/gdkdevice.h +40 -0
  34. data/vendor/local/include/gtk-3.0/gdk/gdkdevicemanager.h +4 -0
  35. data/vendor/local/include/gtk-3.0/gdk/gdkdisplay.h +35 -0
  36. data/vendor/local/include/gtk-3.0/gdk/gdkdisplaymanager.h +6 -0
  37. data/vendor/local/include/gtk-3.0/gdk/gdkdnd.h +22 -1
  38. data/vendor/local/include/gtk-3.0/gdk/gdkenumtypes.h +38 -37
  39. data/vendor/local/include/gtk-3.0/gdk/gdkevents.h +50 -9
  40. data/vendor/local/include/gtk-3.0/gdk/gdkframeclock.h +1 -0
  41. data/vendor/local/include/gtk-3.0/gdk/gdkkeys.h +22 -1
  42. data/vendor/local/include/gtk-3.0/gdk/gdkkeysyms-compat.h +1 -0
  43. data/vendor/local/include/gtk-3.0/gdk/gdkkeysyms.h +1 -0
  44. data/vendor/local/include/gtk-3.0/gdk/gdkmain.h +25 -9
  45. data/vendor/local/include/gtk-3.0/gdk/gdkpango.h +5 -0
  46. data/vendor/local/include/gtk-3.0/gdk/gdkpixbuf.h +4 -1
  47. data/vendor/local/include/gtk-3.0/gdk/gdkprivate.h +4 -0
  48. data/vendor/local/include/gtk-3.0/gdk/gdkproperty.h +9 -0
  49. data/vendor/local/include/gtk-3.0/gdk/gdkrectangle.h +4 -0
  50. data/vendor/local/include/gtk-3.0/gdk/gdkrgba.h +8 -0
  51. data/vendor/local/include/gtk-3.0/gdk/gdkscreen.h +33 -0
  52. data/vendor/local/include/gtk-3.0/gdk/gdkselection.h +9 -0
  53. data/vendor/local/include/gtk-3.0/gdk/gdktestutils.h +3 -0
  54. data/vendor/local/include/gtk-3.0/gdk/gdkthreads.h +8 -1
  55. data/vendor/local/include/gtk-3.0/gdk/gdktypes.h +2 -2
  56. data/vendor/local/include/gtk-3.0/gdk/gdkversionmacros.h +53 -23
  57. data/vendor/local/include/gtk-3.0/gdk/gdkvisual.h +21 -0
  58. data/vendor/local/include/gtk-3.0/gdk/gdkwin32.h +1 -65
  59. data/vendor/local/include/gtk-3.0/gdk/gdkwindow.h +182 -0
  60. data/vendor/local/include/gtk-3.0/gdk/win32/gdkwin32cursor.h +1 -0
  61. data/vendor/local/include/gtk-3.0/gdk/win32/gdkwin32display.h +1 -0
  62. data/vendor/local/include/gtk-3.0/gdk/win32/gdkwin32displaymanager.h +1 -0
  63. data/vendor/local/include/gtk-3.0/gdk/win32/gdkwin32dnd.h +1 -0
  64. data/vendor/local/include/gtk-3.0/gdk/win32/gdkwin32keys.h +1 -0
  65. data/vendor/local/include/gtk-3.0/gdk/win32/gdkwin32misc.h +113 -0
  66. data/vendor/local/include/gtk-3.0/gdk/win32/gdkwin32screen.h +1 -0
  67. data/vendor/local/include/gtk-3.0/gdk/win32/gdkwin32window.h +1 -0
  68. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkarrowaccessible.h +1 -0
  69. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkbooleancellaccessible.h +1 -0
  70. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkbuttonaccessible.h +1 -0
  71. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkcellaccessible.h +1 -0
  72. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkcellaccessibleparent.h +9 -0
  73. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkcheckmenuitemaccessible.h +1 -0
  74. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkcomboboxaccessible.h +1 -0
  75. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkcontaineraccessible.h +1 -0
  76. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkcontainercellaccessible.h +5 -0
  77. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkentryaccessible.h +4 -0
  78. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkexpanderaccessible.h +1 -0
  79. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkframeaccessible.h +1 -0
  80. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkiconviewaccessible.h +1 -0
  81. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkimageaccessible.h +1 -0
  82. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkimagecellaccessible.h +1 -0
  83. data/vendor/local/include/gtk-3.0/gtk/a11y/gtklabelaccessible.h +1 -0
  84. data/vendor/local/include/gtk-3.0/gtk/a11y/gtklevelbaraccessible.h +1 -0
  85. data/vendor/local/include/gtk-3.0/gtk/a11y/gtklinkbuttonaccessible.h +1 -0
  86. data/vendor/local/include/gtk-3.0/gtk/a11y/gtklistboxaccessible.h +58 -0
  87. data/vendor/local/include/gtk-3.0/gtk/a11y/gtklistboxrowaccessible.h +55 -0
  88. data/vendor/local/include/gtk-3.0/gtk/a11y/gtklockbuttonaccessible.h +1 -0
  89. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkmenuaccessible.h +1 -0
  90. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkmenuitemaccessible.h +1 -0
  91. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkmenushellaccessible.h +1 -0
  92. data/vendor/local/include/gtk-3.0/gtk/a11y/gtknotebookaccessible.h +1 -0
  93. data/vendor/local/include/gtk-3.0/gtk/a11y/gtknotebookpageaccessible.h +3 -0
  94. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkpanedaccessible.h +1 -0
  95. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkprogressbaraccessible.h +1 -0
  96. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkradiobuttonaccessible.h +1 -0
  97. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkradiomenuitemaccessible.h +1 -0
  98. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkrangeaccessible.h +1 -0
  99. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkrenderercellaccessible.h +2 -0
  100. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkscaleaccessible.h +1 -0
  101. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkscalebuttonaccessible.h +1 -0
  102. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkscrolledwindowaccessible.h +1 -0
  103. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkspinbuttonaccessible.h +1 -0
  104. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkspinneraccessible.h +1 -0
  105. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkstatusbaraccessible.h +1 -0
  106. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkswitchaccessible.h +1 -0
  107. data/vendor/local/include/gtk-3.0/gtk/a11y/gtktextcellaccessible.h +1 -0
  108. data/vendor/local/include/gtk-3.0/gtk/a11y/gtktextviewaccessible.h +1 -0
  109. data/vendor/local/include/gtk-3.0/gtk/a11y/gtktogglebuttonaccessible.h +1 -0
  110. data/vendor/local/include/gtk-3.0/gtk/a11y/gtktoplevelaccessible.h +2 -0
  111. data/vendor/local/include/gtk-3.0/gtk/a11y/gtktreeviewaccessible.h +1 -0
  112. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkwidgetaccessible.h +1 -0
  113. data/vendor/local/include/gtk-3.0/gtk/a11y/gtkwindowaccessible.h +1 -0
  114. data/vendor/local/include/gtk-3.0/gtk/{gtkaction.h → deprecated/gtkaction.h} +43 -1
  115. data/vendor/local/include/gtk-3.0/gtk/{gtkactiongroup.h → deprecated/gtkactiongroup.h} +31 -4
  116. data/vendor/local/include/gtk-3.0/gtk/{gtkactivatable.h → deprecated/gtkactivatable.h} +10 -1
  117. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkcolorsel.h +2 -0
  118. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkcolorseldialog.h +1 -0
  119. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkfontsel.h +2 -1
  120. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkgradient.h +1 -0
  121. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkhandlebox.h +1 -0
  122. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkhbbox.h +1 -0
  123. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkhbox.h +1 -0
  124. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkhpaned.h +1 -0
  125. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkhscale.h +1 -0
  126. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkhscrollbar.h +1 -0
  127. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkhseparator.h +1 -0
  128. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkhsv.h +1 -0
  129. data/vendor/local/include/gtk-3.0/gtk/{gtkiconfactory.h → deprecated/gtkiconfactory.h} +43 -0
  130. data/vendor/local/include/gtk-3.0/gtk/{gtkimagemenuitem.h → deprecated/gtkimagemenuitem.h} +12 -1
  131. data/vendor/local/include/gtk-3.0/gtk/{gtkradioaction.h → deprecated/gtkradioaction.h} +8 -1
  132. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkrc.h +1 -0
  133. data/vendor/local/include/gtk-3.0/gtk/{gtkrecentaction.h → deprecated/gtkrecentaction.h} +6 -1
  134. data/vendor/local/include/gtk-3.0/gtk/{gtkstock.h → deprecated/gtkstock.h} +333 -106
  135. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkstyle.h +20 -0
  136. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtksymboliccolor.h +1 -0
  137. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtktable.h +1 -0
  138. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtktearoffmenuitem.h +1 -0
  139. data/vendor/local/include/gtk-3.0/gtk/{gtktoggleaction.h → deprecated/gtktoggleaction.h} +8 -1
  140. data/vendor/local/include/gtk-3.0/gtk/{gtkuimanager.h → deprecated/gtkuimanager.h} +21 -2
  141. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkvbbox.h +1 -0
  142. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkvbox.h +1 -0
  143. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkvpaned.h +1 -0
  144. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkvscale.h +1 -0
  145. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkvscrollbar.h +1 -0
  146. data/vendor/local/include/gtk-3.0/gtk/deprecated/gtkvseparator.h +1 -0
  147. data/vendor/local/include/gtk-3.0/gtk/gtk-a11y.h +2 -0
  148. data/vendor/local/include/gtk-3.0/gtk/gtk.h +17 -10
  149. data/vendor/local/include/gtk-3.0/gtk/gtkaboutdialog.h +33 -0
  150. data/vendor/local/include/gtk-3.0/gtk/gtkaccelgroup.h +22 -0
  151. data/vendor/local/include/gtk-3.0/gtk/gtkaccellabel.h +7 -0
  152. data/vendor/local/include/gtk-3.0/gtk/gtkaccelmap.h +15 -0
  153. data/vendor/local/include/gtk-3.0/gtk/gtkaccessible.h +3 -0
  154. data/vendor/local/include/gtk-3.0/gtk/gtkadjustment.h +18 -0
  155. data/vendor/local/include/gtk-3.0/gtk/gtkalignment.h +5 -0
  156. data/vendor/local/include/gtk-3.0/gtk/gtkappchooser.h +5 -0
  157. data/vendor/local/include/gtk-3.0/gtk/gtkappchooserbutton.h +9 -0
  158. data/vendor/local/include/gtk-3.0/gtk/gtkappchooserdialog.h +6 -0
  159. data/vendor/local/include/gtk-3.0/gtk/gtkappchooserwidget.h +14 -0
  160. data/vendor/local/include/gtk-3.0/gtk/gtkapplication.h +5 -0
  161. data/vendor/local/include/gtk-3.0/gtk/gtkarrow.h +3 -0
  162. data/vendor/local/include/gtk-3.0/gtk/gtkaspectframe.h +3 -0
  163. data/vendor/local/include/gtk-3.0/gtk/gtkassistant.h +22 -0
  164. data/vendor/local/include/gtk-3.0/gtk/gtkbbox.h +6 -0
  165. data/vendor/local/include/gtk-3.0/gtk/gtkbin.h +2 -0
  166. data/vendor/local/include/gtk-3.0/gtk/gtkbindings.h +11 -0
  167. data/vendor/local/include/gtk-3.0/gtk/gtkborder.h +5 -0
  168. data/vendor/local/include/gtk-3.0/gtk/gtkbox.h +16 -0
  169. data/vendor/local/include/gtk-3.0/gtk/gtkbuildable.h +11 -0
  170. data/vendor/local/include/gtk-3.0/gtk/gtkbuilder.h +43 -10
  171. data/vendor/local/include/gtk-3.0/gtk/gtkbutton.h +26 -0
  172. data/vendor/local/include/gtk-3.0/gtk/gtkcalendar.h +16 -0
  173. data/vendor/local/include/gtk-3.0/gtk/gtkcellarea.h +47 -0
  174. data/vendor/local/include/gtk-3.0/gtk/gtkcellareabox.h +6 -0
  175. data/vendor/local/include/gtk-3.0/gtk/gtkcellareacontext.h +11 -0
  176. data/vendor/local/include/gtk-3.0/gtk/gtkcelleditable.h +4 -0
  177. data/vendor/local/include/gtk-3.0/gtk/gtkcelllayout.h +11 -0
  178. data/vendor/local/include/gtk-3.0/gtk/gtkcellrenderer.h +25 -0
  179. data/vendor/local/include/gtk-3.0/gtk/gtkcellrendereraccel.h +2 -0
  180. data/vendor/local/include/gtk-3.0/gtk/gtkcellrenderercombo.h +2 -0
  181. data/vendor/local/include/gtk-3.0/gtk/gtkcellrendererpixbuf.h +2 -0
  182. data/vendor/local/include/gtk-3.0/gtk/gtkcellrendererprogress.h +2 -0
  183. data/vendor/local/include/gtk-3.0/gtk/gtkcellrendererspin.h +2 -0
  184. data/vendor/local/include/gtk-3.0/gtk/gtkcellrendererspinner.h +2 -0
  185. data/vendor/local/include/gtk-3.0/gtk/gtkcellrenderertext.h +3 -0
  186. data/vendor/local/include/gtk-3.0/gtk/gtkcellrenderertoggle.h +8 -0
  187. data/vendor/local/include/gtk-3.0/gtk/gtkcellview.h +15 -0
  188. data/vendor/local/include/gtk-3.0/gtk/gtkcheckbutton.h +4 -0
  189. data/vendor/local/include/gtk-3.0/gtk/gtkcheckmenuitem.h +11 -0
  190. data/vendor/local/include/gtk-3.0/gtk/gtkclipboard.h +29 -0
  191. data/vendor/local/include/gtk-3.0/gtk/gtkcolorbutton.h +5 -0
  192. data/vendor/local/include/gtk-3.0/gtk/gtkcolorutils.h +3 -0
  193. data/vendor/local/include/gtk-3.0/gtk/gtkcombobox.h +42 -0
  194. data/vendor/local/include/gtk-3.0/gtk/gtkcomboboxtext.h +12 -0
  195. data/vendor/local/include/gtk-3.0/gtk/gtkcontainer.h +36 -0
  196. data/vendor/local/include/gtk-3.0/gtk/gtkcssprovider.h +8 -0
  197. data/vendor/local/include/gtk-3.0/gtk/gtkdebug.h +7 -1
  198. data/vendor/local/include/gtk-3.0/gtk/gtkdialog.h +17 -0
  199. data/vendor/local/include/gtk-3.0/gtk/gtkdnd.h +43 -0
  200. data/vendor/local/include/gtk-3.0/gtk/gtkdrawingarea.h +2 -0
  201. data/vendor/local/include/gtk-3.0/gtk/gtkeditable.h +14 -0
  202. data/vendor/local/include/gtk-3.0/gtk/gtkentry.h +69 -0
  203. data/vendor/local/include/gtk-3.0/gtk/gtkentrybuffer.h +13 -0
  204. data/vendor/local/include/gtk-3.0/gtk/gtkentrycompletion.h +28 -0
  205. data/vendor/local/include/gtk-3.0/gtk/gtkenums.h +29 -1
  206. data/vendor/local/include/gtk-3.0/gtk/gtkeventbox.h +6 -0
  207. data/vendor/local/include/gtk-3.0/gtk/gtkexpander.h +17 -0
  208. data/vendor/local/include/gtk-3.0/gtk/gtkfilechooser.h +64 -2
  209. data/vendor/local/include/gtk-3.0/gtk/gtkfilechooserbutton.h +9 -0
  210. data/vendor/local/include/gtk-3.0/gtk/gtkfilechooserdialog.h +2 -0
  211. data/vendor/local/include/gtk-3.0/gtk/gtkfilechooserwidget.h +2 -0
  212. data/vendor/local/include/gtk-3.0/gtk/gtkfilefilter.h +11 -0
  213. data/vendor/local/include/gtk-3.0/gtk/gtkfixed.h +4 -0
  214. data/vendor/local/include/gtk-3.0/gtk/gtkfontbutton.h +15 -0
  215. data/vendor/local/include/gtk-3.0/gtk/gtkframe.h +10 -0
  216. data/vendor/local/include/gtk-3.0/gtk/gtkgrid.h +30 -0
  217. data/vendor/local/include/gtk-3.0/gtk/gtkheaderbar.h +95 -0
  218. data/vendor/local/include/gtk-3.0/gtk/gtkicontheme.h +76 -2
  219. data/vendor/local/include/gtk-3.0/gtk/gtkiconview.h +62 -0
  220. data/vendor/local/include/gtk-3.0/gtk/gtkimage.h +37 -1
  221. data/vendor/local/include/gtk-3.0/gtk/gtkimcontext.h +12 -0
  222. data/vendor/local/include/gtk-3.0/gtk/gtkimcontextsimple.h +3 -0
  223. data/vendor/local/include/gtk-3.0/gtk/gtkimmulticontext.h +5 -0
  224. data/vendor/local/include/gtk-3.0/gtk/gtkinfobar.h +19 -0
  225. data/vendor/local/include/gtk-3.0/gtk/gtkinvisible.h +5 -0
  226. data/vendor/local/include/gtk-3.0/gtk/gtklabel.h +50 -0
  227. data/vendor/local/include/gtk-3.0/gtk/gtklayout.h +7 -0
  228. data/vendor/local/include/gtk-3.0/gtk/gtklinkbutton.h +7 -0
  229. data/vendor/local/include/gtk-3.0/gtk/gtklistbox.h +232 -0
  230. data/vendor/local/include/gtk-3.0/gtk/gtkliststore.h +23 -0
  231. data/vendor/local/include/gtk-3.0/gtk/gtkmain.h +35 -0
  232. data/vendor/local/include/gtk-3.0/gtk/gtkmenu.h +28 -1
  233. data/vendor/local/include/gtk-3.0/gtk/gtkmenubar.h +6 -0
  234. data/vendor/local/include/gtk-3.0/gtk/gtkmenuitem.h +19 -0
  235. data/vendor/local/include/gtk-3.0/gtk/gtkmenushell.h +14 -0
  236. data/vendor/local/include/gtk-3.0/gtk/gtkmenutoolbutton.h +7 -0
  237. data/vendor/local/include/gtk-3.0/gtk/gtkmessagedialog.h +9 -0
  238. data/vendor/local/include/gtk-3.0/gtk/gtkmisc.h +5 -1
  239. data/vendor/local/include/gtk-3.0/gtk/gtkmountoperation.h +7 -0
  240. data/vendor/local/include/gtk-3.0/gtk/gtknotebook.h +45 -0
  241. data/vendor/local/include/gtk-3.0/gtk/gtknumerableicon.h +13 -0
  242. data/vendor/local/include/gtk-3.0/gtk/gtkoffscreenwindow.h +4 -0
  243. data/vendor/local/include/gtk-3.0/gtk/gtkorientable.h +3 -0
  244. data/vendor/local/include/gtk-3.0/gtk/gtkpagesetup.h +26 -0
  245. data/vendor/local/include/gtk-3.0/gtk/gtkpaned.h +11 -0
  246. data/vendor/local/include/gtk-3.0/gtk/gtkpapersize.h +24 -1
  247. data/vendor/local/include/gtk-3.0/gtk/gtkplacessidebar.h +125 -0
  248. data/vendor/local/include/gtk-3.0/gtk/gtkplug.h +8 -0
  249. data/vendor/local/include/gtk-3.0/gtk/gtkprintcontext.h +12 -0
  250. data/vendor/local/include/gtk-3.0/gtk/gtkprintoperation.h +34 -0
  251. data/vendor/local/include/gtk-3.0/gtk/gtkprintoperationpreview.h +4 -0
  252. data/vendor/local/include/gtk-3.0/gtk/gtkprintsettings.h +94 -0
  253. data/vendor/local/include/gtk-3.0/gtk/gtkprogressbar.h +15 -0
  254. data/vendor/local/include/gtk-3.0/gtk/gtkradiobutton.h +10 -0
  255. data/vendor/local/include/gtk-3.0/gtk/gtkradiomenuitem.h +9 -0
  256. data/vendor/local/include/gtk-3.0/gtk/gtkradiotoolbutton.h +7 -0
  257. data/vendor/local/include/gtk-3.0/gtk/gtkrange.h +29 -0
  258. data/vendor/local/include/gtk-3.0/gtk/gtkrecentchooser.h +33 -0
  259. data/vendor/local/include/gtk-3.0/gtk/gtkrecentchooserdialog.h +3 -0
  260. data/vendor/local/include/gtk-3.0/gtk/gtkrecentchoosermenu.h +5 -0
  261. data/vendor/local/include/gtk-3.0/gtk/gtkrecentchooserwidget.h +3 -0
  262. data/vendor/local/include/gtk-3.0/gtk/gtkrecentfilter.h +14 -0
  263. data/vendor/local/include/gtk-3.0/gtk/gtkrecentmanager.h +38 -0
  264. data/vendor/local/include/gtk-3.0/gtk/gtkrevealer.h +82 -0
  265. data/vendor/local/include/gtk-3.0/gtk/gtkscale.h +13 -0
  266. data/vendor/local/include/gtk-3.0/gtk/gtkscalebutton.h +10 -0
  267. data/vendor/local/include/gtk-3.0/gtk/gtkscrollable.h +10 -0
  268. data/vendor/local/include/gtk-3.0/gtk/gtkscrollbar.h +2 -0
  269. data/vendor/local/include/gtk-3.0/gtk/gtkscrolledwindow.h +19 -0
  270. data/vendor/local/include/gtk-3.0/gtk/gtksearchbar.h +95 -0
  271. data/vendor/local/include/gtk-3.0/gtk/gtksearchentry.h +2 -1
  272. data/vendor/local/include/gtk-3.0/gtk/gtkselection.h +52 -0
  273. data/vendor/local/include/gtk-3.0/gtk/gtkseparator.h +2 -0
  274. data/vendor/local/include/gtk-3.0/gtk/gtkseparatormenuitem.h +2 -0
  275. data/vendor/local/include/gtk-3.0/gtk/gtkseparatortoolitem.h +4 -0
  276. data/vendor/local/include/gtk-3.0/gtk/gtksettings.h +14 -0
  277. data/vendor/local/include/gtk-3.0/gtk/gtkshow.h +1 -0
  278. data/vendor/local/include/gtk-3.0/gtk/gtksizegroup.h +9 -0
  279. data/vendor/local/include/gtk-3.0/gtk/gtksizerequest.h +1 -0
  280. data/vendor/local/include/gtk-3.0/gtk/gtksocket.h +5 -0
  281. data/vendor/local/include/gtk-3.0/gtk/gtkspinbutton.h +25 -0
  282. data/vendor/local/include/gtk-3.0/gtk/gtkspinner.h +4 -0
  283. data/vendor/local/include/gtk-3.0/gtk/gtkstack.h +105 -0
  284. data/vendor/local/include/gtk-3.0/gtk/gtkstackswitcher.h +65 -0
  285. data/vendor/local/include/gtk-3.0/gtk/gtkstatusbar.h +8 -0
  286. data/vendor/local/include/gtk-3.0/gtk/gtkstatusicon.h +35 -0
  287. data/vendor/local/include/gtk-3.0/gtk/gtkstylecontext.h +122 -2
  288. data/vendor/local/include/gtk-3.0/gtk/gtkstyleproperties.h +11 -0
  289. data/vendor/local/include/gtk-3.0/gtk/gtkstyleprovider.h +3 -1
  290. data/vendor/local/include/gtk-3.0/gtk/gtkswitch.h +4 -0
  291. data/vendor/local/include/gtk-3.0/gtk/gtktestutils.h +18 -0
  292. data/vendor/local/include/gtk-3.0/gtk/gtktextattributes.h +16 -8
  293. data/vendor/local/include/gtk-3.0/gtk/gtktextbuffer.h +62 -0
  294. data/vendor/local/include/gtk-3.0/gtk/gtktextbufferrichtext.h +12 -0
  295. data/vendor/local/include/gtk-3.0/gtk/gtktextchild.h +4 -0
  296. data/vendor/local/include/gtk-3.0/gtk/gtktextdisplay.h +1 -0
  297. data/vendor/local/include/gtk-3.0/gtk/gtktextiter.h +106 -0
  298. data/vendor/local/include/gtk-3.0/gtk/gtktextlayout.h +48 -4
  299. data/vendor/local/include/gtk-3.0/gtk/gtktextmark.h +8 -0
  300. data/vendor/local/include/gtk-3.0/gtk/gtktexttag.h +5 -0
  301. data/vendor/local/include/gtk-3.0/gtk/gtktexttagtable.h +7 -0
  302. data/vendor/local/include/gtk-3.0/gtk/gtktextview.h +61 -0
  303. data/vendor/local/include/gtk-3.0/gtk/gtkthemingengine.h +28 -1
  304. data/vendor/local/include/gtk-3.0/gtk/gtktogglebutton.h +11 -0
  305. data/vendor/local/include/gtk-3.0/gtk/gtktoggletoolbutton.h +5 -0
  306. data/vendor/local/include/gtk-3.0/gtk/gtktoolbar.h +17 -0
  307. data/vendor/local/include/gtk-3.0/gtk/gtktoolbutton.h +15 -0
  308. data/vendor/local/include/gtk-3.0/gtk/gtktoolitem.h +30 -0
  309. data/vendor/local/include/gtk-3.0/gtk/gtktoolitemgroup.h +18 -0
  310. data/vendor/local/include/gtk-3.0/gtk/gtktoolpalette.h +21 -0
  311. data/vendor/local/include/gtk-3.0/gtk/gtktoolshell.h +10 -0
  312. data/vendor/local/include/gtk-3.0/gtk/gtktooltip.h +10 -0
  313. data/vendor/local/include/gtk-3.0/gtk/gtktreednd.h +9 -0
  314. data/vendor/local/include/gtk-3.0/gtk/gtktreemodel.h +68 -0
  315. data/vendor/local/include/gtk-3.0/gtk/gtktreemodelfilter.h +12 -0
  316. data/vendor/local/include/gtk-3.0/gtk/gtktreemodelsort.h +10 -0
  317. data/vendor/local/include/gtk-3.0/gtk/gtktreeselection.h +21 -0
  318. data/vendor/local/include/gtk-3.0/gtk/gtktreesortable.h +7 -0
  319. data/vendor/local/include/gtk-3.0/gtk/gtktreestore.h +24 -0
  320. data/vendor/local/include/gtk-3.0/gtk/gtktreeview.h +94 -0
  321. data/vendor/local/include/gtk-3.0/gtk/gtktreeviewcolumn.h +53 -0
  322. data/vendor/local/include/gtk-3.0/gtk/gtktypebuiltins.h +123 -108
  323. data/vendor/local/include/gtk-3.0/gtk/gtktypes.h +9 -0
  324. data/vendor/local/include/gtk-3.0/gtk/gtkversion.h +4 -4
  325. data/vendor/local/include/gtk-3.0/gtk/gtkviewport.h +6 -0
  326. data/vendor/local/include/gtk-3.0/gtk/gtkvolumebutton.h +2 -0
  327. data/vendor/local/include/gtk-3.0/gtk/gtkwidget.h +365 -4
  328. data/vendor/local/include/gtk-3.0/gtk/gtkwidgetpath.h +30 -0
  329. data/vendor/local/include/gtk-3.0/gtk/gtkwindow.h +119 -0
  330. data/vendor/local/lib/girepository-1.0/Gdk-3.0.typelib +0 -0
  331. data/vendor/local/lib/girepository-1.0/Gtk-3.0.typelib +0 -0
  332. data/vendor/local/lib/gtk-3.0/3.0.0/immodules.cache +1 -1
  333. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-am-et.dll +0 -0
  334. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-am-et.dll.a +0 -0
  335. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-am-et.la +2 -2
  336. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-cedilla.dll +0 -0
  337. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-cedilla.dll.a +0 -0
  338. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-cedilla.la +2 -2
  339. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-cyrillic-translit.dll +0 -0
  340. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-cyrillic-translit.dll.a +0 -0
  341. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-cyrillic-translit.la +2 -2
  342. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-ime.dll +0 -0
  343. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-ime.dll.a +0 -0
  344. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-ime.la +2 -2
  345. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-inuktitut.dll +0 -0
  346. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-inuktitut.dll.a +0 -0
  347. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-inuktitut.la +2 -2
  348. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-ipa.dll +0 -0
  349. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-ipa.dll.a +0 -0
  350. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-ipa.la +2 -2
  351. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-multipress.dll +0 -0
  352. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-multipress.dll.a +0 -0
  353. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-multipress.la +2 -2
  354. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-thai.dll +0 -0
  355. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-thai.dll.a +0 -0
  356. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-thai.la +2 -2
  357. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-ti-er.dll +0 -0
  358. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-ti-er.dll.a +0 -0
  359. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-ti-er.la +2 -2
  360. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-ti-et.dll +0 -0
  361. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-ti-et.dll.a +0 -0
  362. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-ti-et.la +2 -2
  363. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-viqr.dll +0 -0
  364. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-viqr.dll.a +0 -0
  365. data/vendor/local/lib/gtk-3.0/3.0.0/immodules/im-viqr.la +2 -2
  366. data/vendor/local/lib/libgailutil-3.dll.a +0 -0
  367. data/vendor/local/lib/libgailutil-3.la +2 -2
  368. data/vendor/local/lib/libgdk-3.dll.a +0 -0
  369. data/vendor/local/lib/libgdk-3.la +5 -5
  370. data/vendor/local/lib/libgtk-3.dll.a +0 -0
  371. data/vendor/local/lib/libgtk-3.la +5 -5
  372. data/vendor/local/lib/pkgconfig/gail-3.0.pc +1 -1
  373. data/vendor/local/lib/pkgconfig/gdk-3.0.pc +1 -1
  374. data/vendor/local/lib/pkgconfig/gdk-win32-3.0.pc +1 -1
  375. data/vendor/local/lib/pkgconfig/gtk+-3.0.pc +1 -1
  376. data/vendor/local/lib/pkgconfig/gtk+-win32-3.0.pc +1 -1
  377. data/vendor/local/share/gir-1.0/Gdk-3.0.gir +2639 -2145
  378. data/vendor/local/share/gir-1.0/Gtk-3.0.gir +21620 -16038
  379. data/vendor/local/share/glib-2.0/schemas/gschemas.compiled +0 -0
  380. data/vendor/local/share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml +8 -0
  381. data/vendor/local/share/glib-2.0/schemas/org.gtk.exampleapp.gschema.xml +25 -0
  382. data/vendor/local/share/gtk-3.0/gtkbuilder.rng +19 -0
  383. data/vendor/local/share/gtk-doc/html/gail-libgail-util3/gail-libgail-util3-GailMisc.html +43 -46
  384. data/vendor/local/share/gtk-doc/html/gail-libgail-util3/gail-libgail-util3-GailTextUtil.html +17 -20
  385. data/vendor/local/share/gtk-doc/html/gail-libgail-util3/home.png +0 -0
  386. data/vendor/local/share/gtk-doc/html/gail-libgail-util3/index.html +4 -4
  387. data/vendor/local/share/gtk-doc/html/gail-libgail-util3/left-insensitive.png +0 -0
  388. data/vendor/local/share/gtk-doc/html/gail-libgail-util3/left.png +0 -0
  389. data/vendor/local/share/gtk-doc/html/gail-libgail-util3/libgail-util-main.html +9 -9
  390. data/vendor/local/share/gtk-doc/html/gail-libgail-util3/right-insensitive.png +0 -0
  391. data/vendor/local/share/gtk-doc/html/gail-libgail-util3/right.png +0 -0
  392. data/vendor/local/share/gtk-doc/html/gail-libgail-util3/style.css +71 -16
  393. data/vendor/local/share/gtk-doc/html/gail-libgail-util3/up-insensitive.png +0 -0
  394. data/vendor/local/share/gtk-doc/html/gail-libgail-util3/up.png +0 -0
  395. data/vendor/local/share/gtk-doc/html/gdk3/GdkDevice.html +114 -18
  396. data/vendor/local/share/gtk-doc/html/gdk3/GdkDeviceManager.html +14 -17
  397. data/vendor/local/share/gtk-doc/html/gdk3/GdkDisplay.html +26 -25
  398. data/vendor/local/share/gtk-doc/html/gdk3/GdkDisplayManager.html +14 -16
  399. data/vendor/local/share/gtk-doc/html/gdk3/GdkScreen.html +58 -22
  400. data/vendor/local/share/gtk-doc/html/gdk3/annotation-glossary.html +39 -51
  401. data/vendor/local/share/gtk-doc/html/gdk3/api-index-3-0.html +27 -26
  402. data/vendor/local/share/gtk-doc/html/gdk3/api-index-3-10.html +148 -0
  403. data/vendor/local/share/gtk-doc/html/gdk3/api-index-3-2.html +13 -16
  404. data/vendor/local/share/gtk-doc/html/gdk3/api-index-3-4.html +23 -26
  405. data/vendor/local/share/gtk-doc/html/gdk3/api-index-3-6.html +10 -13
  406. data/vendor/local/share/gtk-doc/html/gdk3/api-index-3-8.html +41 -17
  407. data/vendor/local/share/gtk-doc/html/gdk3/api-index-deprecated.html +36 -28
  408. data/vendor/local/share/gtk-doc/html/gdk3/api-index-full.html +187 -58
  409. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Application-launching.html +16 -19
  410. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Cairo-Interaction.html +159 -54
  411. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Colors.html +12 -15
  412. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Cursors.html +119 -17
  413. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Drag-and-Drop.html +13 -16
  414. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Event-Structures.html +33 -26
  415. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Events.html +70 -17
  416. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-GdkFrameClock.html +12 -15
  417. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-GdkFrameTimings.html +12 -15
  418. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-General.html +93 -30
  419. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Keyboard-Handling.html +18 -21
  420. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Pango-Interaction.html +59 -62
  421. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Pixbufs.html +15 -18
  422. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Points-Rectangles-and-Regions.html +15 -18
  423. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Properties-and-Atoms.html +13 -16
  424. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-RGBA-Colors.html +13 -16
  425. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Selections.html +13 -16
  426. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Testing.html +14 -17
  427. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Threads.html +40 -43
  428. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Visuals.html +12 -15
  429. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Wayland-Interaction.html +425 -0
  430. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-Windows.html +363 -106
  431. data/vendor/local/share/gtk-doc/html/gdk3/gdk3-X-Window-System-Interaction.html +264 -17
  432. data/vendor/local/share/gtk-doc/html/gdk3/gdk3.devhelp2 +38 -2
  433. data/vendor/local/share/gtk-doc/html/gdk3/home.png +0 -0
  434. data/vendor/local/share/gtk-doc/html/gdk3/index.html +8 -4
  435. data/vendor/local/share/gtk-doc/html/gdk3/index.sgml +44 -6
  436. data/vendor/local/share/gtk-doc/html/gdk3/left-insensitive.png +0 -0
  437. data/vendor/local/share/gtk-doc/html/gdk3/left.png +0 -0
  438. data/vendor/local/share/gtk-doc/html/gdk3/reference.html +12 -9
  439. data/vendor/local/share/gtk-doc/html/gdk3/right-insensitive.png +0 -0
  440. data/vendor/local/share/gtk-doc/html/gdk3/right.png +0 -0
  441. data/vendor/local/share/gtk-doc/html/gdk3/style.css +71 -16
  442. data/vendor/local/share/gtk-doc/html/gdk3/up-insensitive.png +0 -0
  443. data/vendor/local/share/gtk-doc/html/gdk3/up.png +0 -0
  444. data/vendor/local/share/gtk-doc/html/gtk3/AbstractObjects.html +10 -10
  445. data/vendor/local/share/gtk-doc/html/gtk3/Application.html +11 -11
  446. data/vendor/local/share/gtk-doc/html/gtk3/ApplicationChoosing.html +10 -10
  447. data/vendor/local/share/gtk-doc/html/gtk3/Builder.html +14 -14
  448. data/vendor/local/share/gtk-doc/html/gtk3/ButtonWidgets.html +16 -16
  449. data/vendor/local/share/gtk-doc/html/gtk3/DeprecatedObjects.html +38 -11
  450. data/vendor/local/share/gtk-doc/html/gtk3/DisplayWidgets.html +19 -19
  451. data/vendor/local/share/gtk-doc/html/gtk3/GtkAboutDialog.html +15 -22
  452. data/vendor/local/share/gtk-doc/html/gtk3/GtkAccelLabel.html +15 -18
  453. data/vendor/local/share/gtk-doc/html/gtk3/GtkAccessible.html +14 -17
  454. data/vendor/local/share/gtk-doc/html/gtk3/GtkAction.html +347 -29
  455. data/vendor/local/share/gtk-doc/html/gtk3/GtkActionGroup.html +158 -21
  456. data/vendor/local/share/gtk-doc/html/gtk3/GtkActionable.html +13 -16
  457. data/vendor/local/share/gtk-doc/html/gtk3/GtkActivatable.html +58 -25
  458. data/vendor/local/share/gtk-doc/html/gtk3/GtkAdjustment.html +12 -15
  459. data/vendor/local/share/gtk-doc/html/gtk3/GtkAlignment.html +15 -18
  460. data/vendor/local/share/gtk-doc/html/gtk3/GtkAppChooser.html +12 -15
  461. data/vendor/local/share/gtk-doc/html/gtk3/GtkAppChooserButton.html +12 -15
  462. data/vendor/local/share/gtk-doc/html/gtk3/GtkAppChooserDialog.html +12 -15
  463. data/vendor/local/share/gtk-doc/html/gtk3/GtkAppChooserWidget.html +13 -16
  464. data/vendor/local/share/gtk-doc/html/gtk3/GtkApplication.html +82 -23
  465. data/vendor/local/share/gtk-doc/html/gtk3/GtkApplicationWindow.html +14 -17
  466. data/vendor/local/share/gtk-doc/html/gtk3/GtkArrow.html +13 -16
  467. data/vendor/local/share/gtk-doc/html/gtk3/GtkAspectFrame.html +16 -18
  468. data/vendor/local/share/gtk-doc/html/gtk3/GtkAssistant.html +19 -22
  469. data/vendor/local/share/gtk-doc/html/gtk3/GtkBin.html +15 -15
  470. data/vendor/local/share/gtk-doc/html/gtk3/GtkBox.html +91 -19
  471. data/vendor/local/share/gtk-doc/html/gtk3/GtkBuildable.html +16 -19
  472. data/vendor/local/share/gtk-doc/html/gtk3/GtkBuilder.html +341 -39
  473. data/vendor/local/share/gtk-doc/html/gtk3/GtkButton.html +82 -27
  474. data/vendor/local/share/gtk-doc/html/gtk3/GtkButtonBox.html +14 -17
  475. data/vendor/local/share/gtk-doc/html/gtk3/GtkCalendar.html +12 -15
  476. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellArea.html +22 -24
  477. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellAreaBox.html +12 -15
  478. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellAreaContext.html +16 -19
  479. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellEditable.html +12 -15
  480. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellLayout.html +15 -18
  481. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellRenderer.html +20 -23
  482. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellRendererAccel.html +12 -15
  483. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellRendererCombo.html +13 -16
  484. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellRendererPixbuf.html +25 -17
  485. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellRendererProgress.html +13 -16
  486. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellRendererSpin.html +12 -15
  487. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellRendererSpinner.html +12 -15
  488. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellRendererText.html +36 -39
  489. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellRendererToggle.html +12 -15
  490. data/vendor/local/share/gtk-doc/html/gtk3/GtkCellView.html +15 -18
  491. data/vendor/local/share/gtk-doc/html/gtk3/GtkCheckButton.html +12 -15
  492. data/vendor/local/share/gtk-doc/html/gtk3/GtkCheckMenuItem.html +12 -15
  493. data/vendor/local/share/gtk-doc/html/gtk3/GtkColorButton.html +22 -25
  494. data/vendor/local/share/gtk-doc/html/gtk3/GtkColorChooser.html +12 -15
  495. data/vendor/local/share/gtk-doc/html/gtk3/GtkColorChooserDialog.html +12 -15
  496. data/vendor/local/share/gtk-doc/html/gtk3/GtkColorChooserWidget.html +12 -15
  497. data/vendor/local/share/gtk-doc/html/gtk3/GtkColorSelection.html +17 -20
  498. data/vendor/local/share/gtk-doc/html/gtk3/GtkColorSelectionDialog.html +13 -16
  499. data/vendor/local/share/gtk-doc/html/gtk3/GtkComboBox.html +43 -20
  500. data/vendor/local/share/gtk-doc/html/gtk3/GtkComboBoxText.html +14 -17
  501. data/vendor/local/share/gtk-doc/html/gtk3/GtkContainer.html +40 -21
  502. data/vendor/local/share/gtk-doc/html/gtk3/GtkCssProvider.html +42 -46
  503. data/vendor/local/share/gtk-doc/html/gtk3/GtkDialog.html +30 -34
  504. data/vendor/local/share/gtk-doc/html/gtk3/GtkDrawingArea.html +15 -18
  505. data/vendor/local/share/gtk-doc/html/gtk3/GtkEditable.html +14 -17
  506. data/vendor/local/share/gtk-doc/html/gtk3/GtkEntry.html +121 -41
  507. data/vendor/local/share/gtk-doc/html/gtk3/GtkEntryBuffer.html +12 -15
  508. data/vendor/local/share/gtk-doc/html/gtk3/GtkEntryCompletion.html +13 -16
  509. data/vendor/local/share/gtk-doc/html/gtk3/GtkEventBox.html +13 -16
  510. data/vendor/local/share/gtk-doc/html/gtk3/GtkExpander.html +14 -17
  511. data/vendor/local/share/gtk-doc/html/gtk3/GtkFileChooser.html +67 -34
  512. data/vendor/local/share/gtk-doc/html/gtk3/GtkFileChooserButton.html +16 -19
  513. data/vendor/local/share/gtk-doc/html/gtk3/GtkFileChooserDialog.html +21 -24
  514. data/vendor/local/share/gtk-doc/html/gtk3/GtkFileChooserWidget.html +12 -15
  515. data/vendor/local/share/gtk-doc/html/gtk3/GtkFileFilter.html +13 -16
  516. data/vendor/local/share/gtk-doc/html/gtk3/GtkFixed.html +14 -17
  517. data/vendor/local/share/gtk-doc/html/gtk3/GtkFontButton.html +14 -17
  518. data/vendor/local/share/gtk-doc/html/gtk3/GtkFontChooser.html +37 -40
  519. data/vendor/local/share/gtk-doc/html/gtk3/GtkFontChooserDialog.html +13 -16
  520. data/vendor/local/share/gtk-doc/html/gtk3/GtkFontChooserWidget.html +12 -15
  521. data/vendor/local/share/gtk-doc/html/gtk3/GtkFontSelection.html +34 -37
  522. data/vendor/local/share/gtk-doc/html/gtk3/GtkFontSelectionDialog.html +22 -25
  523. data/vendor/local/share/gtk-doc/html/gtk3/GtkFrame.html +15 -17
  524. data/vendor/local/share/gtk-doc/html/gtk3/GtkGrid.html +229 -17
  525. data/vendor/local/share/gtk-doc/html/gtk3/GtkHBox.html +17 -20
  526. data/vendor/local/share/gtk-doc/html/gtk3/GtkHButtonBox.html +13 -16
  527. data/vendor/local/share/gtk-doc/html/gtk3/GtkHPaned.html +13 -16
  528. data/vendor/local/share/gtk-doc/html/gtk3/GtkHSV.html +12 -15
  529. data/vendor/local/share/gtk-doc/html/gtk3/GtkHScale.html +14 -17
  530. data/vendor/local/share/gtk-doc/html/gtk3/GtkHScrollbar.html +13 -16
  531. data/vendor/local/share/gtk-doc/html/gtk3/GtkHSeparator.html +14 -17
  532. data/vendor/local/share/gtk-doc/html/gtk3/GtkHandleBox.html +23 -26
  533. data/vendor/local/share/gtk-doc/html/gtk3/GtkHeaderBar.html +503 -0
  534. data/vendor/local/share/gtk-doc/html/gtk3/GtkIMContext.html +15 -20
  535. data/vendor/local/share/gtk-doc/html/gtk3/GtkIMContextSimple.html +12 -15
  536. data/vendor/local/share/gtk-doc/html/gtk3/GtkIMMulticontext.html +19 -15
  537. data/vendor/local/share/gtk-doc/html/gtk3/GtkIconTheme.html +451 -20
  538. data/vendor/local/share/gtk-doc/html/gtk3/GtkIconView.html +25 -27
  539. data/vendor/local/share/gtk-doc/html/gtk3/GtkImage.html +64 -21
  540. data/vendor/local/share/gtk-doc/html/gtk3/GtkImageMenuItem.html +80 -22
  541. data/vendor/local/share/gtk-doc/html/gtk3/GtkInfoBar.html +102 -46
  542. data/vendor/local/share/gtk-doc/html/gtk3/GtkInvisible.html +14 -17
  543. data/vendor/local/share/gtk-doc/html/gtk3/GtkLabel.html +146 -72
  544. data/vendor/local/share/gtk-doc/html/gtk3/GtkLayout.html +16 -19
  545. data/vendor/local/share/gtk-doc/html/gtk3/GtkLevelBar.html +15 -18
  546. data/vendor/local/share/gtk-doc/html/gtk3/GtkLinkButton.html +13 -16
  547. data/vendor/local/share/gtk-doc/html/gtk3/GtkListBox.html +1251 -0
  548. data/vendor/local/share/gtk-doc/html/gtk3/GtkListStore.html +17 -20
  549. data/vendor/local/share/gtk-doc/html/gtk3/GtkLockButton.html +15 -18
  550. data/vendor/local/share/gtk-doc/html/gtk3/GtkMenu.html +60 -26
  551. data/vendor/local/share/gtk-doc/html/gtk3/GtkMenuBar.html +13 -16
  552. data/vendor/local/share/gtk-doc/html/gtk3/GtkMenuButton.html +14 -17
  553. data/vendor/local/share/gtk-doc/html/gtk3/GtkMenuItem.html +50 -25
  554. data/vendor/local/share/gtk-doc/html/gtk3/GtkMenuShell.html +51 -15
  555. data/vendor/local/share/gtk-doc/html/gtk3/GtkMenuToolButton.html +20 -22
  556. data/vendor/local/share/gtk-doc/html/gtk3/GtkMessageDialog.html +23 -26
  557. data/vendor/local/share/gtk-doc/html/gtk3/GtkMisc.html +13 -16
  558. data/vendor/local/share/gtk-doc/html/gtk3/GtkNotebook.html +17 -20
  559. data/vendor/local/share/gtk-doc/html/gtk3/GtkNumerableIcon.html +15 -18
  560. data/vendor/local/share/gtk-doc/html/gtk3/GtkOffscreenWindow.html +19 -22
  561. data/vendor/local/share/gtk-doc/html/gtk3/GtkOverlay.html +14 -17
  562. data/vendor/local/share/gtk-doc/html/gtk3/GtkPageSetup.html +13 -16
  563. data/vendor/local/share/gtk-doc/html/gtk3/GtkPageSetupUnixDialog.html +12 -15
  564. data/vendor/local/share/gtk-doc/html/gtk3/GtkPaned.html +14 -17
  565. data/vendor/local/share/gtk-doc/html/gtk3/GtkPaperSize.html +13 -16
  566. data/vendor/local/share/gtk-doc/html/gtk3/GtkPlacesSidebar.html +983 -0
  567. data/vendor/local/share/gtk-doc/html/gtk3/GtkPrintContext.html +50 -53
  568. data/vendor/local/share/gtk-doc/html/gtk3/GtkPrintJob.html +14 -17
  569. data/vendor/local/share/gtk-doc/html/gtk3/GtkPrintSettings.html +12 -15
  570. data/vendor/local/share/gtk-doc/html/gtk3/GtkPrintUnixDialog.html +14 -17
  571. data/vendor/local/share/gtk-doc/html/gtk3/GtkPrinter.html +12 -15
  572. data/vendor/local/share/gtk-doc/html/gtk3/GtkProgressBar.html +24 -27
  573. data/vendor/local/share/gtk-doc/html/gtk3/GtkRadioAction.html +53 -16
  574. data/vendor/local/share/gtk-doc/html/gtk3/GtkRadioButton.html +13 -16
  575. data/vendor/local/share/gtk-doc/html/gtk3/GtkRadioMenuItem.html +14 -17
  576. data/vendor/local/share/gtk-doc/html/gtk3/GtkRadioToolButton.html +22 -20
  577. data/vendor/local/share/gtk-doc/html/gtk3/GtkRange.html +13 -16
  578. data/vendor/local/share/gtk-doc/html/gtk3/GtkRecentAction.html +36 -17
  579. data/vendor/local/share/gtk-doc/html/gtk3/GtkRecentChooser.html +18 -23
  580. data/vendor/local/share/gtk-doc/html/gtk3/GtkRecentChooserDialog.html +15 -18
  581. data/vendor/local/share/gtk-doc/html/gtk3/GtkRecentChooserMenu.html +12 -15
  582. data/vendor/local/share/gtk-doc/html/gtk3/GtkRecentChooserWidget.html +12 -15
  583. data/vendor/local/share/gtk-doc/html/gtk3/GtkRecentFilter.html +13 -16
  584. data/vendor/local/share/gtk-doc/html/gtk3/GtkRecentManager.html +19 -22
  585. data/vendor/local/share/gtk-doc/html/gtk3/GtkRevealer.html +437 -0
  586. data/vendor/local/share/gtk-doc/html/gtk3/GtkScale.html +21 -24
  587. data/vendor/local/share/gtk-doc/html/gtk3/GtkScaleButton.html +13 -16
  588. data/vendor/local/share/gtk-doc/html/gtk3/GtkScrollable.html +13 -16
  589. data/vendor/local/share/gtk-doc/html/gtk3/GtkScrollbar.html +13 -16
  590. data/vendor/local/share/gtk-doc/html/gtk3/GtkScrolledWindow.html +25 -24
  591. data/vendor/local/share/gtk-doc/html/gtk3/GtkSearchBar.html +514 -0
  592. data/vendor/local/share/gtk-doc/html/gtk3/GtkSearchEntry.html +57 -16
  593. data/vendor/local/share/gtk-doc/html/gtk3/GtkSeparator.html +12 -15
  594. data/vendor/local/share/gtk-doc/html/gtk3/GtkSeparatorMenuItem.html +12 -15
  595. data/vendor/local/share/gtk-doc/html/gtk3/GtkSeparatorToolItem.html +12 -15
  596. data/vendor/local/share/gtk-doc/html/gtk3/GtkSettings.html +191 -47
  597. data/vendor/local/share/gtk-doc/html/gtk3/GtkSizeGroup.html +13 -16
  598. data/vendor/local/share/gtk-doc/html/gtk3/GtkSpinButton.html +14 -17
  599. data/vendor/local/share/gtk-doc/html/gtk3/GtkSpinner.html +14 -17
  600. data/vendor/local/share/gtk-doc/html/gtk3/GtkStack.html +708 -0
  601. data/vendor/local/share/gtk-doc/html/gtk3/GtkStackSwitcher.html +195 -0
  602. data/vendor/local/share/gtk-doc/html/gtk3/GtkStatusIcon.html +32 -19
  603. data/vendor/local/share/gtk-doc/html/gtk3/GtkStatusbar.html +14 -17
  604. data/vendor/local/share/gtk-doc/html/gtk3/GtkStyle.html +108 -111
  605. data/vendor/local/share/gtk-doc/html/gtk3/GtkStyleContext.html +230 -108
  606. data/vendor/local/share/gtk-doc/html/gtk3/GtkStyleProvider.html +15 -18
  607. data/vendor/local/share/gtk-doc/html/gtk3/GtkSwitch.html +14 -17
  608. data/vendor/local/share/gtk-doc/html/gtk3/GtkTable.html +28 -31
  609. data/vendor/local/share/gtk-doc/html/gtk3/GtkTearoffMenuItem.html +14 -17
  610. data/vendor/local/share/gtk-doc/html/gtk3/GtkTextBuffer.html +42 -34
  611. data/vendor/local/share/gtk-doc/html/gtk3/GtkTextIter.html +67 -45
  612. data/vendor/local/share/gtk-doc/html/gtk3/GtkTextMark.html +14 -17
  613. data/vendor/local/share/gtk-doc/html/gtk3/GtkTextTag.html +84 -133
  614. data/vendor/local/share/gtk-doc/html/gtk3/GtkTextTagTable.html +17 -19
  615. data/vendor/local/share/gtk-doc/html/gtk3/GtkTextView.html +76 -33
  616. data/vendor/local/share/gtk-doc/html/gtk3/GtkThemingEngine.html +32 -26
  617. data/vendor/local/share/gtk-doc/html/gtk3/GtkToggleAction.html +49 -16
  618. data/vendor/local/share/gtk-doc/html/gtk3/GtkToggleButton.html +13 -16
  619. data/vendor/local/share/gtk-doc/html/gtk3/GtkToggleToolButton.html +17 -17
  620. data/vendor/local/share/gtk-doc/html/gtk3/GtkToolButton.html +29 -18
  621. data/vendor/local/share/gtk-doc/html/gtk3/GtkToolItem.html +15 -18
  622. data/vendor/local/share/gtk-doc/html/gtk3/GtkToolItemGroup.html +20 -23
  623. data/vendor/local/share/gtk-doc/html/gtk3/GtkToolPalette.html +20 -22
  624. data/vendor/local/share/gtk-doc/html/gtk3/GtkToolShell.html +14 -17
  625. data/vendor/local/share/gtk-doc/html/gtk3/GtkToolbar.html +15 -18
  626. data/vendor/local/share/gtk-doc/html/gtk3/GtkTooltip.html +19 -18
  627. data/vendor/local/share/gtk-doc/html/gtk3/GtkTreeModel.html +17 -20
  628. data/vendor/local/share/gtk-doc/html/gtk3/GtkTreeModelFilter.html +12 -15
  629. data/vendor/local/share/gtk-doc/html/gtk3/GtkTreeModelSort.html +15 -18
  630. data/vendor/local/share/gtk-doc/html/gtk3/GtkTreeSelection.html +12 -15
  631. data/vendor/local/share/gtk-doc/html/gtk3/GtkTreeSortable.html +12 -15
  632. data/vendor/local/share/gtk-doc/html/gtk3/GtkTreeStore.html +13 -16
  633. data/vendor/local/share/gtk-doc/html/gtk3/GtkTreeView.html +23 -26
  634. data/vendor/local/share/gtk-doc/html/gtk3/GtkTreeViewColumn.html +16 -19
  635. data/vendor/local/share/gtk-doc/html/gtk3/GtkUIManager.html +114 -25
  636. data/vendor/local/share/gtk-doc/html/gtk3/GtkVBox.html +17 -20
  637. data/vendor/local/share/gtk-doc/html/gtk3/GtkVButtonBox.html +13 -16
  638. data/vendor/local/share/gtk-doc/html/gtk3/GtkVPaned.html +13 -16
  639. data/vendor/local/share/gtk-doc/html/gtk3/GtkVScale.html +14 -17
  640. data/vendor/local/share/gtk-doc/html/gtk3/GtkVScrollbar.html +14 -17
  641. data/vendor/local/share/gtk-doc/html/gtk3/GtkVSeparator.html +13 -16
  642. data/vendor/local/share/gtk-doc/html/gtk3/GtkViewport.html +16 -19
  643. data/vendor/local/share/gtk-doc/html/gtk3/GtkVolumeButton.html +13 -16
  644. data/vendor/local/share/gtk-doc/html/gtk3/GtkWidget.html +1137 -138
  645. data/vendor/local/share/gtk-doc/html/gtk3/GtkWindow.html +113 -30
  646. data/vendor/local/share/gtk-doc/html/gtk3/GtkWindowGroup.html +13 -16
  647. data/vendor/local/share/gtk-doc/html/gtk3/LayoutContainers.html +35 -20
  648. data/vendor/local/share/gtk-doc/html/gtk3/MenusAndCombos.html +10 -13
  649. data/vendor/local/share/gtk-doc/html/gtk3/MiscObjects.html +10 -10
  650. data/vendor/local/share/gtk-doc/html/gtk3/NumericEntry.html +14 -11
  651. data/vendor/local/share/gtk-doc/html/gtk3/Ornaments.html +11 -11
  652. data/vendor/local/share/gtk-doc/html/gtk3/PlugSocket.html +13 -13
  653. data/vendor/local/share/gtk-doc/html/gtk3/Printing.html +10 -10
  654. data/vendor/local/share/gtk-doc/html/gtk3/RecentDocuments.html +11 -11
  655. data/vendor/local/share/gtk-doc/html/gtk3/ScrollingWidgets.html +10 -10
  656. data/vendor/local/share/gtk-doc/html/gtk3/SelectorWidgets.html +14 -11
  657. data/vendor/local/share/gtk-doc/html/gtk3/TextWidget.html +17 -17
  658. data/vendor/local/share/gtk-doc/html/gtk3/TextWidgetObjects.html +10 -10
  659. data/vendor/local/share/gtk-doc/html/gtk3/TreeWidget.html +15 -15
  660. data/vendor/local/share/gtk-doc/html/gtk3/TreeWidgetObjects.html +10 -10
  661. data/vendor/local/share/gtk-doc/html/gtk3/WindowWidgets.html +17 -17
  662. data/vendor/local/share/gtk-doc/html/gtk3/aboutdialog.png +0 -0
  663. data/vendor/local/share/gtk-doc/html/gtk3/accel-label.png +0 -0
  664. data/vendor/local/share/gtk-doc/html/gtk3/annotation-glossary.html +41 -59
  665. data/vendor/local/share/gtk-doc/html/gtk3/api-index-3-0.html +41 -44
  666. data/vendor/local/share/gtk-doc/html/gtk3/api-index-3-10.html +666 -0
  667. data/vendor/local/share/gtk-doc/html/gtk3/api-index-3-2.html +39 -42
  668. data/vendor/local/share/gtk-doc/html/gtk3/api-index-3-4.html +31 -34
  669. data/vendor/local/share/gtk-doc/html/gtk3/api-index-3-6.html +27 -30
  670. data/vendor/local/share/gtk-doc/html/gtk3/api-index-3-8.html +24 -27
  671. data/vendor/local/share/gtk-doc/html/gtk3/api-index-deprecated.html +1825 -224
  672. data/vendor/local/share/gtk-doc/html/gtk3/api-index-full.html +917 -112
  673. data/vendor/local/share/gtk-doc/html/gtk3/appchooserbutton.png +0 -0
  674. data/vendor/local/share/gtk-doc/html/gtk3/appchooserdialog.png +0 -0
  675. data/vendor/local/share/gtk-doc/html/gtk3/assistant.png +0 -0
  676. data/vendor/local/share/gtk-doc/html/gtk3/broadwayd.html +10 -10
  677. data/vendor/local/share/gtk-doc/html/gtk3/button.png +0 -0
  678. data/vendor/local/share/gtk-doc/html/gtk3/ch01s02.html +130 -0
  679. data/vendor/local/share/gtk-doc/html/gtk3/ch01s03.html +248 -0
  680. data/vendor/local/share/gtk-doc/html/gtk3/ch01s04.html +157 -0
  681. data/vendor/local/share/gtk-doc/html/gtk3/ch01s05.html +1773 -0
  682. data/vendor/local/share/gtk-doc/html/gtk3/ch02.html +20 -14
  683. data/vendor/local/share/gtk-doc/html/gtk3/ch03.html +232 -156
  684. data/vendor/local/share/gtk-doc/html/gtk3/{ch25s02.html → ch24s02.html} +47 -47
  685. data/vendor/local/share/gtk-doc/html/gtk3/{ch27s02.html → ch26s02.html} +9 -9
  686. data/vendor/local/share/gtk-doc/html/gtk3/{ch29s02.html → ch28s02.html} +11 -11
  687. data/vendor/local/share/gtk-doc/html/gtk3/{ch29s03.html → ch28s03.html} +11 -11
  688. data/vendor/local/share/gtk-doc/html/gtk3/chap-drawing-model.html +10 -10
  689. data/vendor/local/share/gtk-doc/html/gtk3/check-button.png +0 -0
  690. data/vendor/local/share/gtk-doc/html/gtk3/checklist-gdkeventexpose-region.html +9 -9
  691. data/vendor/local/share/gtk-doc/html/gtk3/checklist-modifiers.html +9 -9
  692. data/vendor/local/share/gtk-doc/html/gtk3/checklist-named-icons.html +9 -9
  693. data/vendor/local/share/gtk-doc/html/gtk3/color-button.png +0 -0
  694. data/vendor/local/share/gtk-doc/html/gtk3/colorchooser.png +0 -0
  695. data/vendor/local/share/gtk-doc/html/gtk3/combo-box-entry.png +0 -0
  696. data/vendor/local/share/gtk-doc/html/gtk3/combo-box-text.png +0 -0
  697. data/vendor/local/share/gtk-doc/html/gtk3/combo-box.png +0 -0
  698. data/vendor/local/share/gtk-doc/html/gtk3/drawing.png +0 -0
  699. data/vendor/local/share/gtk-doc/html/gtk3/entry.png +0 -0
  700. data/vendor/local/share/gtk-doc/html/gtk3/exampleapp.png +0 -0
  701. data/vendor/local/share/gtk-doc/html/gtk3/file-button.png +0 -0
  702. data/vendor/local/share/gtk-doc/html/gtk3/filechooser.png +0 -0
  703. data/vendor/local/share/gtk-doc/html/gtk3/font-button.png +0 -0
  704. data/vendor/local/share/gtk-doc/html/gtk3/fontchooser.png +0 -0
  705. data/vendor/local/share/gtk-doc/html/gtk3/frame.png +0 -0
  706. data/vendor/local/share/gtk-doc/html/gtk3/getting-started-app1.png +0 -0
  707. data/vendor/local/share/gtk-doc/html/gtk3/getting-started-app2.png +0 -0
  708. data/vendor/local/share/gtk-doc/html/gtk3/getting-started-app3.png +0 -0
  709. data/vendor/local/share/gtk-doc/html/gtk3/getting-started-app4.png +0 -0
  710. data/vendor/local/share/gtk-doc/html/gtk3/getting-started-app6.png +0 -0
  711. data/vendor/local/share/gtk-doc/html/gtk3/getting-started-app7.png +0 -0
  712. data/vendor/local/share/gtk-doc/html/gtk3/getting-started-app8.png +0 -0
  713. data/vendor/local/share/gtk-doc/html/gtk3/getting-started-app9.png +0 -0
  714. data/vendor/local/share/gtk-doc/html/gtk3/glossary.html +10 -10
  715. data/vendor/local/share/gtk-doc/html/gtk3/grid-packing.png +0 -0
  716. data/vendor/local/share/gtk-doc/html/gtk3/gtk-broadway.html +11 -11
  717. data/vendor/local/share/gtk-doc/html/gtk3/gtk-building.html +20 -12
  718. data/vendor/local/share/gtk-doc/html/gtk3/gtk-compiling.html +15 -15
  719. data/vendor/local/share/gtk-doc/html/gtk3/gtk-getting-started.html +147 -965
  720. data/vendor/local/share/gtk-doc/html/gtk3/gtk-launch.html +9 -9
  721. data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-2-to-3.html +67 -67
  722. data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-GtkGrid.html +13 -13
  723. data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-GtkStyleContext-bonus-points.html +11 -11
  724. data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-GtkStyleContext-checklist.html +12 -12
  725. data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-GtkStyleContext-css.html +11 -11
  726. data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-GtkStyleContext-parser-extensions.html +9 -9
  727. data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-GtkStyleContext-parsing.html +10 -10
  728. data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-GtkStyleContext.html +10 -10
  729. data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-checklist.html +12 -12
  730. data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-smclient-GtkApplication.html +10 -10
  731. data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-theme-GtkStyleContext-engines.html +10 -10
  732. data/vendor/local/share/gtk-doc/html/gtk3/gtk-migrating-unique-GtkApplication.html +12 -12
  733. data/vendor/local/share/gtk-doc/html/gtk3/gtk-osx.html +11 -11
  734. data/vendor/local/share/gtk-doc/html/gtk3/gtk-query-immodules-3.0.html +9 -9
  735. data/vendor/local/share/gtk-doc/html/gtk3/gtk-question-index.html +65 -65
  736. data/vendor/local/share/gtk-doc/html/gtk3/gtk-resources.html +13 -13
  737. data/vendor/local/share/gtk-doc/html/gtk3/gtk-running.html +19 -16
  738. data/vendor/local/share/gtk-doc/html/gtk3/gtk-update-icon-cache.html +9 -9
  739. data/vendor/local/share/gtk-doc/html/gtk3/gtk-wayland.html +12 -12
  740. data/vendor/local/share/gtk-doc/html/gtk3/gtk-windows.html +11 -11
  741. data/vendor/local/share/gtk-doc/html/gtk3/gtk-x11.html +27 -12
  742. data/vendor/local/share/gtk-doc/html/gtk3/gtk.html +26 -49
  743. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Accelerator-Maps.html +14 -17
  744. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Bindings.html +20 -23
  745. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Clipboards.html +17 -18
  746. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Drag-and-Drop.html +32 -56
  747. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Feature-Test-Macros.html +17 -20
  748. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Filesystem-utilities.html +14 -17
  749. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-General.html +26 -29
  750. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-GtkGradient.html +24 -27
  751. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-GtkPlug.html +303 -0
  752. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-GtkSocket.html +273 -0
  753. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-GtkStyleProperties.html +17 -20
  754. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-GtkSymbolicColor.html +22 -25
  755. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-GtkTreeView-drag-and-drop.html +12 -15
  756. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-GtkWidgetPath.html +16 -19
  757. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-High-level-Printing-API.html +29 -32
  758. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Keyboard-Accelerators.html +18 -18
  759. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Orientable.html +15 -18
  760. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Resource-Files.html +45 -48
  761. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Selections.html +15 -18
  762. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Standard-Enumerations.html +13 -16
  763. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Stock-Items.html +568 -123
  764. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Testing.html +40 -16
  765. data/vendor/local/share/gtk-doc/html/gtk3/gtk3-Themeable-Stock-Images.html +248 -27
  766. data/vendor/local/share/gtk-doc/html/gtk3/gtk3.devhelp2 +6347 -6099
  767. data/vendor/local/share/gtk-doc/html/gtk3/gtkbase.html +11 -14
  768. data/vendor/local/share/gtk-doc/html/gtk3/gtkobjects.html +139 -118
  769. data/vendor/local/share/gtk-doc/html/gtk3/headerbar.png +0 -0
  770. data/vendor/local/share/gtk-doc/html/gtk3/hello-world.png +0 -0
  771. data/vendor/local/share/gtk-doc/html/gtk3/home.png +0 -0
  772. data/vendor/local/share/gtk-doc/html/gtk3/icon-view.png +0 -0
  773. data/vendor/local/share/gtk-doc/html/gtk3/image.png +0 -0
  774. data/vendor/local/share/gtk-doc/html/gtk3/index.html +248 -209
  775. data/vendor/local/share/gtk-doc/html/gtk3/index.sgml +5994 -5707
  776. data/vendor/local/share/gtk-doc/html/gtk3/info-bar.png +0 -0
  777. data/vendor/local/share/gtk-doc/html/gtk3/label.png +0 -0
  778. data/vendor/local/share/gtk-doc/html/gtk3/left-insensitive.png +0 -0
  779. data/vendor/local/share/gtk-doc/html/gtk3/left.png +0 -0
  780. data/vendor/local/share/gtk-doc/html/gtk3/levelbar.png +0 -0
  781. data/vendor/local/share/gtk-doc/html/gtk3/link-button.png +0 -0
  782. data/vendor/local/share/gtk-doc/html/gtk3/list-and-tree.png +0 -0
  783. data/vendor/local/share/gtk-doc/html/gtk3/list-box.png +0 -0
  784. data/vendor/local/share/gtk-doc/html/gtk3/lock-button.png +0 -0
  785. data/vendor/local/share/gtk-doc/html/gtk3/menu-button.png +0 -0
  786. data/vendor/local/share/gtk-doc/html/gtk3/menubar.png +0 -0
  787. data/vendor/local/share/gtk-doc/html/gtk3/messagedialog.png +0 -0
  788. data/vendor/local/share/gtk-doc/html/gtk3/migrating.html +31 -31
  789. data/vendor/local/share/gtk-doc/html/gtk3/multiline-text.png +0 -0
  790. data/vendor/local/share/gtk-doc/html/gtk3/notebook.png +0 -0
  791. data/vendor/local/share/gtk-doc/html/gtk3/pagesetupdialog.png +0 -0
  792. data/vendor/local/share/gtk-doc/html/gtk3/panes.png +0 -0
  793. data/vendor/local/share/gtk-doc/html/gtk3/placessidebar.png +0 -0
  794. data/vendor/local/share/gtk-doc/html/gtk3/platform-support.html +75 -0
  795. data/vendor/local/share/gtk-doc/html/gtk3/printdialog.png +0 -0
  796. data/vendor/local/share/gtk-doc/html/gtk3/progressbar.png +0 -0
  797. data/vendor/local/share/gtk-doc/html/gtk3/pt06.html +9 -9
  798. data/vendor/local/share/gtk-doc/html/gtk3/radio-group.png +0 -0
  799. data/vendor/local/share/gtk-doc/html/gtk3/recentchooserdialog.png +0 -0
  800. data/vendor/local/share/gtk-doc/html/gtk3/right-insensitive.png +0 -0
  801. data/vendor/local/share/gtk-doc/html/gtk3/right.png +0 -0
  802. data/vendor/local/share/gtk-doc/html/gtk3/scales.png +0 -0
  803. data/vendor/local/share/gtk-doc/html/gtk3/scrollbar.png +0 -0
  804. data/vendor/local/share/gtk-doc/html/gtk3/scrolledwindow.png +0 -0
  805. data/vendor/local/share/gtk-doc/html/gtk3/search-entry.png +0 -0
  806. data/vendor/local/share/gtk-doc/html/gtk3/separator.png +0 -0
  807. data/vendor/local/share/gtk-doc/html/gtk3/spinbutton.png +0 -0
  808. data/vendor/local/share/gtk-doc/html/gtk3/spinner.png +0 -0
  809. data/vendor/local/share/gtk-doc/html/gtk3/stack.png +0 -0
  810. data/vendor/local/share/gtk-doc/html/gtk3/stackswitcher.png +0 -0
  811. data/vendor/local/share/gtk-doc/html/gtk3/statusbar.png +0 -0
  812. data/vendor/local/share/gtk-doc/html/gtk3/style.css +71 -16
  813. data/vendor/local/share/gtk-doc/html/gtk3/switch.png +0 -0
  814. data/vendor/local/share/gtk-doc/html/gtk3/theming.html +10 -10
  815. data/vendor/local/share/gtk-doc/html/gtk3/toggle-button.png +0 -0
  816. data/vendor/local/share/gtk-doc/html/gtk3/toolbar.png +0 -0
  817. data/vendor/local/share/gtk-doc/html/gtk3/toolpalette.png +0 -0
  818. data/vendor/local/share/gtk-doc/html/gtk3/up-insensitive.png +0 -0
  819. data/vendor/local/share/gtk-doc/html/gtk3/up.png +0 -0
  820. data/vendor/local/share/gtk-doc/html/gtk3/volumebutton.png +0 -0
  821. data/vendor/local/share/gtk-doc/html/gtk3/window-default.png +0 -0
  822. data/vendor/local/share/gtk-doc/html/gtk3/window.png +0 -0
  823. data/vendor/local/share/locale/af/LC_MESSAGES/gtk30.mo +0 -0
  824. data/vendor/local/share/locale/an/LC_MESSAGES/gtk30.mo +0 -0
  825. data/vendor/local/share/locale/ar/LC_MESSAGES/gtk30.mo +0 -0
  826. data/vendor/local/share/locale/as/LC_MESSAGES/gtk30-properties.mo +0 -0
  827. data/vendor/local/share/locale/as/LC_MESSAGES/gtk30.mo +0 -0
  828. data/vendor/local/share/locale/be/LC_MESSAGES/gtk30.mo +0 -0
  829. data/vendor/local/share/locale/bg/LC_MESSAGES/gtk30.mo +0 -0
  830. data/vendor/local/share/locale/bn/LC_MESSAGES/gtk30.mo +0 -0
  831. data/vendor/local/share/locale/bn_IN/LC_MESSAGES/gtk30.mo +0 -0
  832. data/vendor/local/share/locale/ca/LC_MESSAGES/gtk30-properties.mo +0 -0
  833. data/vendor/local/share/locale/ca/LC_MESSAGES/gtk30.mo +0 -0
  834. data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/gtk30-properties.mo +0 -0
  835. data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/gtk30.mo +0 -0
  836. data/vendor/local/share/locale/cs/LC_MESSAGES/gtk30-properties.mo +0 -0
  837. data/vendor/local/share/locale/cs/LC_MESSAGES/gtk30.mo +0 -0
  838. data/vendor/local/share/locale/da/LC_MESSAGES/gtk30-properties.mo +0 -0
  839. data/vendor/local/share/locale/da/LC_MESSAGES/gtk30.mo +0 -0
  840. data/vendor/local/share/locale/de/LC_MESSAGES/gtk30-properties.mo +0 -0
  841. data/vendor/local/share/locale/de/LC_MESSAGES/gtk30.mo +0 -0
  842. data/vendor/local/share/locale/el/LC_MESSAGES/gtk30-properties.mo +0 -0
  843. data/vendor/local/share/locale/el/LC_MESSAGES/gtk30.mo +0 -0
  844. data/vendor/local/share/locale/en/LC_MESSAGES/gtk30.mo +0 -0
  845. data/vendor/local/share/locale/en_GB/LC_MESSAGES/gtk30.mo +0 -0
  846. data/vendor/local/share/locale/eo/LC_MESSAGES/gtk30.mo +0 -0
  847. data/vendor/local/share/locale/es/LC_MESSAGES/gtk30-properties.mo +0 -0
  848. data/vendor/local/share/locale/es/LC_MESSAGES/gtk30.mo +0 -0
  849. data/vendor/local/share/locale/et/LC_MESSAGES/gtk30.mo +0 -0
  850. data/vendor/local/share/locale/eu/LC_MESSAGES/gtk30-properties.mo +0 -0
  851. data/vendor/local/share/locale/eu/LC_MESSAGES/gtk30.mo +0 -0
  852. data/vendor/local/share/locale/fa/LC_MESSAGES/gtk30.mo +0 -0
  853. data/vendor/local/share/locale/fi/LC_MESSAGES/gtk30-properties.mo +0 -0
  854. data/vendor/local/share/locale/fi/LC_MESSAGES/gtk30.mo +0 -0
  855. data/vendor/local/share/locale/fr/LC_MESSAGES/gtk30-properties.mo +0 -0
  856. data/vendor/local/share/locale/fr/LC_MESSAGES/gtk30.mo +0 -0
  857. data/vendor/local/share/locale/ga/LC_MESSAGES/gtk30.mo +0 -0
  858. data/vendor/local/share/locale/gd/LC_MESSAGES/gtk30-properties.mo +0 -0
  859. data/vendor/local/share/locale/gd/LC_MESSAGES/gtk30.mo +0 -0
  860. data/vendor/local/share/locale/gl/LC_MESSAGES/gtk30-properties.mo +0 -0
  861. data/vendor/local/share/locale/gl/LC_MESSAGES/gtk30.mo +0 -0
  862. data/vendor/local/share/locale/gu/LC_MESSAGES/gtk30.mo +0 -0
  863. data/vendor/local/share/locale/he/LC_MESSAGES/gtk30-properties.mo +0 -0
  864. data/vendor/local/share/locale/he/LC_MESSAGES/gtk30.mo +0 -0
  865. data/vendor/local/share/locale/hi/LC_MESSAGES/gtk30.mo +0 -0
  866. data/vendor/local/share/locale/hu/LC_MESSAGES/gtk30-properties.mo +0 -0
  867. data/vendor/local/share/locale/hu/LC_MESSAGES/gtk30.mo +0 -0
  868. data/vendor/local/share/locale/ia/LC_MESSAGES/gtk30-properties.mo +0 -0
  869. data/vendor/local/share/locale/ia/LC_MESSAGES/gtk30.mo +0 -0
  870. data/vendor/local/share/locale/id/LC_MESSAGES/gtk30-properties.mo +0 -0
  871. data/vendor/local/share/locale/id/LC_MESSAGES/gtk30.mo +0 -0
  872. data/vendor/local/share/locale/it/LC_MESSAGES/gtk30-properties.mo +0 -0
  873. data/vendor/local/share/locale/it/LC_MESSAGES/gtk30.mo +0 -0
  874. data/vendor/local/share/locale/ja/LC_MESSAGES/gtk30.mo +0 -0
  875. data/vendor/local/share/locale/kk/LC_MESSAGES/gtk30.mo +0 -0
  876. data/vendor/local/share/locale/km/LC_MESSAGES/gtk30.mo +0 -0
  877. data/vendor/local/share/locale/kn/LC_MESSAGES/gtk30-properties.mo +0 -0
  878. data/vendor/local/share/locale/kn/LC_MESSAGES/gtk30.mo +0 -0
  879. data/vendor/local/share/locale/ko/LC_MESSAGES/gtk30-properties.mo +0 -0
  880. data/vendor/local/share/locale/ko/LC_MESSAGES/gtk30.mo +0 -0
  881. data/vendor/local/share/locale/lt/LC_MESSAGES/gtk30-properties.mo +0 -0
  882. data/vendor/local/share/locale/lt/LC_MESSAGES/gtk30.mo +0 -0
  883. data/vendor/local/share/locale/lv/LC_MESSAGES/gtk30-properties.mo +0 -0
  884. data/vendor/local/share/locale/lv/LC_MESSAGES/gtk30.mo +0 -0
  885. data/vendor/local/share/locale/ml/LC_MESSAGES/gtk30.mo +0 -0
  886. data/vendor/local/share/locale/mr/LC_MESSAGES/gtk30-properties.mo +0 -0
  887. data/vendor/local/share/locale/mr/LC_MESSAGES/gtk30.mo +0 -0
  888. data/vendor/local/share/locale/nb/LC_MESSAGES/gtk30.mo +0 -0
  889. data/vendor/local/share/locale/nl/LC_MESSAGES/gtk30.mo +0 -0
  890. data/vendor/local/share/locale/nn/LC_MESSAGES/gtk30.mo +0 -0
  891. data/vendor/local/share/locale/or/LC_MESSAGES/gtk30.mo +0 -0
  892. data/vendor/local/share/locale/pa/LC_MESSAGES/gtk30-properties.mo +0 -0
  893. data/vendor/local/share/locale/pa/LC_MESSAGES/gtk30.mo +0 -0
  894. data/vendor/local/share/locale/pl/LC_MESSAGES/gtk30-properties.mo +0 -0
  895. data/vendor/local/share/locale/pl/LC_MESSAGES/gtk30.mo +0 -0
  896. data/vendor/local/share/locale/pt/LC_MESSAGES/gtk30-properties.mo +0 -0
  897. data/vendor/local/share/locale/pt/LC_MESSAGES/gtk30.mo +0 -0
  898. data/vendor/local/share/locale/pt_BR/LC_MESSAGES/gtk30-properties.mo +0 -0
  899. data/vendor/local/share/locale/pt_BR/LC_MESSAGES/gtk30.mo +0 -0
  900. data/vendor/local/share/locale/ro/LC_MESSAGES/gtk30.mo +0 -0
  901. data/vendor/local/share/locale/ru/LC_MESSAGES/gtk30-properties.mo +0 -0
  902. data/vendor/local/share/locale/ru/LC_MESSAGES/gtk30.mo +0 -0
  903. data/vendor/local/share/locale/sk/LC_MESSAGES/gtk30-properties.mo +0 -0
  904. data/vendor/local/share/locale/sk/LC_MESSAGES/gtk30.mo +0 -0
  905. data/vendor/local/share/locale/sl/LC_MESSAGES/gtk30-properties.mo +0 -0
  906. data/vendor/local/share/locale/sl/LC_MESSAGES/gtk30.mo +0 -0
  907. data/vendor/local/share/locale/sr/LC_MESSAGES/gtk30-properties.mo +0 -0
  908. data/vendor/local/share/locale/sr/LC_MESSAGES/gtk30.mo +0 -0
  909. data/vendor/local/share/locale/sr@latin/LC_MESSAGES/gtk30-properties.mo +0 -0
  910. data/vendor/local/share/locale/sr@latin/LC_MESSAGES/gtk30.mo +0 -0
  911. data/vendor/local/share/locale/sv/LC_MESSAGES/gtk30.mo +0 -0
  912. data/vendor/local/share/locale/ta/LC_MESSAGES/gtk30-properties.mo +0 -0
  913. data/vendor/local/share/locale/ta/LC_MESSAGES/gtk30.mo +0 -0
  914. data/vendor/local/share/locale/te/LC_MESSAGES/gtk30.mo +0 -0
  915. data/vendor/local/share/locale/tg/LC_MESSAGES/gtk30-properties.mo +0 -0
  916. data/vendor/local/share/locale/tg/LC_MESSAGES/gtk30.mo +0 -0
  917. data/vendor/local/share/locale/th/LC_MESSAGES/gtk30.mo +0 -0
  918. data/vendor/local/share/locale/ug/LC_MESSAGES/gtk30-properties.mo +0 -0
  919. data/vendor/local/share/locale/ug/LC_MESSAGES/gtk30.mo +0 -0
  920. data/vendor/local/share/locale/uk/LC_MESSAGES/gtk30.mo +0 -0
  921. data/vendor/local/share/locale/vi/LC_MESSAGES/gtk30.mo +0 -0
  922. data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gtk30-properties.mo +0 -0
  923. data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gtk30.mo +0 -0
  924. data/vendor/local/share/locale/zh_HK/LC_MESSAGES/gtk30-properties.mo +0 -0
  925. data/vendor/local/share/locale/zh_HK/LC_MESSAGES/gtk30.mo +0 -0
  926. data/vendor/local/share/locale/zh_TW/LC_MESSAGES/gtk30-properties.mo +0 -0
  927. data/vendor/local/share/locale/zh_TW/LC_MESSAGES/gtk30.mo +0 -0
  928. data/vendor/local/share/man/man1/broadwayd.1 +1 -1
  929. data/vendor/local/share/man/man1/gtk-launch.1 +1 -1
  930. data/vendor/local/share/man/man1/gtk-query-immodules-3.0.1 +1 -1
  931. data/vendor/local/share/man/man1/gtk-update-icon-cache.1 +1 -1
  932. metadata +86 -39
  933. data/vendor/local/lib/gdk-win32-3.0.def +0 -539
  934. data/vendor/local/lib/gtk-win32-3.0.def +0 -3875
  935. data/vendor/local/share/gtk-doc/html/gtk3/Actions.html +0 -53
  936. data/vendor/local/share/gtk-doc/html/gtk3/GtkPlug.html +0 -388
  937. data/vendor/local/share/gtk-doc/html/gtk3/GtkSocket.html +0 -362
  938. data/vendor/local/share/gtk-doc/html/gtk3/colorsel.png +0 -0
  939. data/vendor/local/share/gtk-doc/html/gtk3/fontsel.png +0 -0
@@ -0,0 +1,1773 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
+ <title>GTK+ 3 Reference Manual: Building applications</title>
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
+ <link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
8
+ <link rel="up" href="gtk-getting-started.html" title="Getting Started with GTK+">
9
+ <link rel="prev" href="ch01s04.html" title="Building user interfaces">
10
+ <link rel="next" href="gtk-resources.html" title="Mailing lists and bug reports">
11
+ <meta name="generator" content="GTK-Doc V1.19.1 (XML mode)">
12
+ <link rel="stylesheet" href="style.css" type="text/css">
13
+ </head>
14
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
+ <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
16
+ <td width="100%" align="left"></td>
17
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
18
+ <td><a accesskey="u" href="gtk-getting-started.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
19
+ <td><a accesskey="p" href="ch01s04.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
20
+ <td><a accesskey="n" href="gtk-resources.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
21
+ </tr></table>
22
+ <div class="section">
23
+ <div class="titlepage"><div><div><h2 class="title" style="clear: both">
24
+ <a name="id-1.2.3.7"></a>Building applications</h2></div></div></div>
25
+ <p>An application consists of a number of files:
26
+ </p>
27
+ <div class="variablelist"><table border="0" class="variablelist">
28
+ <colgroup>
29
+ <col align="left" valign="top">
30
+ <col>
31
+ </colgroup>
32
+ <tbody>
33
+ <tr>
34
+ <td><p><span class="term">The binary</span></p></td>
35
+ <td>This gets installed in <code class="filename">/usr/bin</code>.</td>
36
+ </tr>
37
+ <tr>
38
+ <td><p><span class="term">A desktop file</span></p></td>
39
+ <td>The desktop file provides important information about the application to the desktop shell, such as its name, icon, D-Bus name, commandline to launch it, etc. It is installed in <code class="filename">/usr/share/applications</code>.</td>
40
+ </tr>
41
+ <tr>
42
+ <td><p><span class="term">An icon</span></p></td>
43
+ <td>The icon gets installed in <code class="filename">/usr/share/icons/hicolor/48x48/apps</code>, where it will be found regardless of the current theme.</td>
44
+ </tr>
45
+ <tr>
46
+ <td><p><span class="term">A settings schema</span></p></td>
47
+ <td>If the application uses GSettings, it will install its schema
48
+ in <code class="filename">/usr/share/glib-2.0/schemas</code>, so that tools
49
+ like dconf-editor can find it.</td>
50
+ </tr>
51
+ <tr>
52
+ <td><p><span class="term">Other resources</span></p></td>
53
+ <td>Other files, such as GtkBuilder ui files, are best loaded from
54
+ resources stored in the application binary itself. This eliminates the
55
+ need for most of the files that would traditionally be installed in
56
+ an application-specific location in <code class="filename">/usr/share</code>.</td>
57
+ </tr>
58
+ </tbody>
59
+ </table></div>
60
+ <p>
61
+ </p>
62
+ <p>GTK+ includes application support that is built on top of
63
+ <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gio/GApplication.html"><span class="type">GApplication</span></a>. In this tutorial we'll build a simple application by
64
+ starting from scratch, adding more and more pieces over time. Along
65
+ the way, we'll learn about <a class="link" href="GtkApplication.html" title="GtkApplication"><span class="type">GtkApplication</span></a>, templates, resources,
66
+ application menus, settings, <a class="link" href="GtkHeaderBar.html" title="GtkHeaderBar"><span class="type">GtkHeaderBar</span></a>, <a class="link" href="GtkStack.html" title="GtkStack"><span class="type">GtkStack</span></a>, <a class="link" href="GtkSearchBar.html" title="GtkSearchBar"><span class="type">GtkSearchBar</span></a>,
67
+ <a class="link" href="GtkListBox.html" title="GtkListBox"><span class="type">GtkListBox</span></a>, and more.</p>
68
+ <p>The full, buildable sources for these examples can be found
69
+ in the examples/ directory of the GTK+ source distribution, or
70
+ <a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/examples" target="_top">online</a> in the GTK+ git repository.</p>
71
+ <div class="section">
72
+ <div class="titlepage"><div><div><h3 class="title">
73
+ <a name="id-1.2.3.7.5"></a>A trivial application</h3></div></div></div>
74
+ <p>When using <a class="link" href="GtkApplication.html" title="GtkApplication"><span class="type">GtkApplication</span></a>, the <code class="function">main()</code> function can be very
75
+ simple. We just call <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gio/GApplication.html#g-application-run"><code class="function">g_application_run()</code></a> and give it an instance
76
+ of our application class.</p>
77
+ <div class="informalexample">
78
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
79
+ <tbody>
80
+ <tr>
81
+ <td class="listing_lines" align="right"><pre>1
82
+ 2
83
+ 3
84
+ 4
85
+ 5
86
+ 6
87
+ 7
88
+ 8</pre></td>
89
+ <td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;gtk/gtk.h&gt;</span>
90
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;exampleapp.h&gt;</span>
91
+
92
+ <span class="type">int</span>
93
+ <span class="function">main</span><span class="normal"> </span><span class="symbol">(</span><span class="type">int</span><span class="normal"> argc</span><span class="symbol">,</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">argv</span><span class="symbol">[])</span>
94
+ <span class="cbracket">{</span>
95
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gio/GApplication.html#g-application-run">g_application_run</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">G_APPLICATION</span><span class="normal"> </span><span class="symbol">(</span><span class="function">example_app_new</span><span class="normal"> </span><span class="symbol">()),</span><span class="normal"> argc</span><span class="symbol">,</span><span class="normal"> argv</span><span class="symbol">);</span>
96
+ <span class="cbracket">}</span></pre></td>
97
+ </tr>
98
+ </tbody>
99
+ </table>
100
+ </div>
101
+
102
+ <p>All the application logic is in the application class, which
103
+ is a subclass of <a class="link" href="GtkApplication.html" title="GtkApplication"><span class="type">GtkApplication</span></a>. Our example does not yet have any
104
+ interesting functionality. All it does is open a window when it is
105
+ activated without arguments, and open the files it is given, if it
106
+ is started with arguments.</p>
107
+ <p>To handle these two cases, we override the <code class="function">activate()</code> vfunc,
108
+ which gets called when the application is launched without commandline
109
+ arguments, and the <code class="function">open()</code> vfunc, which gets called when the application
110
+ is launched with commandline arguments.</p>
111
+ <p>To learn more about GApplication entry points, consult the
112
+ GIO <a class="ulink" href="https://developer.gnome.org/gio/2.36/GApplication.html#GApplication.description" target="_top">documentation</a>.</p>
113
+ <div class="informalexample">
114
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
115
+ <tbody>
116
+ <tr>
117
+ <td class="listing_lines" align="right"><pre>1
118
+ 2
119
+ 3
120
+ 4
121
+ 5
122
+ 6
123
+ 7
124
+ 8
125
+ 9
126
+ 10
127
+ 11
128
+ 12
129
+ 13
130
+ 14
131
+ 15
132
+ 16
133
+ 17
134
+ 18
135
+ 19
136
+ 20
137
+ 21
138
+ 22
139
+ 23
140
+ 24
141
+ 25
142
+ 26
143
+ 27
144
+ 28
145
+ 29
146
+ 30
147
+ 31
148
+ 32
149
+ 33
150
+ 34
151
+ 35
152
+ 36
153
+ 37
154
+ 38
155
+ 39
156
+ 40
157
+ 41
158
+ 42
159
+ 43
160
+ 44
161
+ 45
162
+ 46
163
+ 47
164
+ 48
165
+ 49
166
+ 50
167
+ 51
168
+ 52
169
+ 53
170
+ 54
171
+ 55
172
+ 56
173
+ 57
174
+ 58
175
+ 59
176
+ 60
177
+ 61
178
+ 62
179
+ 63
180
+ 64
181
+ 65
182
+ 66
183
+ 67
184
+ 68</pre></td>
185
+ <td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;gtk/gtk.h&gt;</span>
186
+
187
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">"exampleapp.h"</span>
188
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">"exampleappwin.h"</span>
189
+
190
+ <span class="keyword">struct</span><span class="normal"> </span><span class="classname">_ExampleApp</span>
191
+ <span class="cbracket">{</span>
192
+ <span class="normal"> </span><span class="usertype">GtkApplication</span><span class="normal"> parent</span><span class="symbol">;</span>
193
+ <span class="cbracket">}</span><span class="symbol">;</span>
194
+
195
+ <span class="keyword">struct</span><span class="normal"> </span><span class="classname">_ExampleAppClass</span>
196
+ <span class="cbracket">{</span>
197
+ <span class="normal"> </span><span class="usertype">GtkApplicationClass</span><span class="normal"> parent_class</span><span class="symbol">;</span>
198
+ <span class="cbracket">}</span><span class="symbol">;</span>
199
+
200
+ <span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-DEFINE-TYPE:CAPS">G_DEFINE_TYPE</a></span><span class="symbol">(</span><span class="normal">ExampleApp</span><span class="symbol">,</span><span class="normal"> example_app</span><span class="symbol">,</span><span class="normal"> GTK_TYPE_APPLICATION</span><span class="symbol">);</span>
201
+
202
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
203
+ <span class="function">example_app_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ExampleApp</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">app</span><span class="symbol">)</span>
204
+ <span class="cbracket">{</span>
205
+ <span class="cbracket">}</span>
206
+
207
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
208
+ <span class="function">example_app_activate</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GApplication</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">app</span><span class="symbol">)</span>
209
+ <span class="cbracket">{</span>
210
+ <span class="normal"> </span><span class="usertype">ExampleAppWindow</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">win</span><span class="symbol">;</span>
211
+
212
+ <span class="normal"> win </span><span class="symbol">=</span><span class="normal"> </span><span class="function">example_app_window_new</span><span class="normal"> </span><span class="symbol">(</span><span class="function">EXAMPLE_APP</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">app</span><span class="symbol">));</span>
213
+ <span class="normal"> </span><span class="function"><a href="GtkWindow.html#gtk-window-present">gtk_window_present</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_WINDOW</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">win</span><span class="symbol">));</span>
214
+ <span class="cbracket">}</span>
215
+
216
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
217
+ <span class="function">example_app_open</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GApplication</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">app</span><span class="symbol">,</span>
218
+ <span class="normal"> </span><span class="usertype">GFile</span><span class="normal"> </span><span class="symbol">**</span><span class="normal">files</span><span class="symbol">,</span>
219
+ <span class="normal"> </span><span class="usertype">gint</span><span class="normal"> n_files</span><span class="symbol">,</span>
220
+ <span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">hint</span><span class="symbol">)</span>
221
+ <span class="cbracket">{</span>
222
+ <span class="normal"> </span><span class="usertype">GList</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">windows</span><span class="symbol">;</span>
223
+ <span class="normal"> </span><span class="usertype">ExampleAppWindow</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">win</span><span class="symbol">;</span>
224
+ <span class="normal"> </span><span class="type">int</span><span class="normal"> i</span><span class="symbol">;</span>
225
+
226
+ <span class="normal"> windows </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkApplication.html#gtk-application-get-windows">gtk_application_get_windows</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_APPLICATION</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">app</span><span class="symbol">));</span>
227
+ <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">windows</span><span class="symbol">)</span>
228
+ <span class="normal"> win </span><span class="symbol">=</span><span class="normal"> </span><span class="function">EXAMPLE_APP_WINDOW</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">windows</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">);</span>
229
+ <span class="normal"> </span><span class="keyword">else</span>
230
+ <span class="normal"> win </span><span class="symbol">=</span><span class="normal"> </span><span class="function">example_app_window_new</span><span class="normal"> </span><span class="symbol">(</span><span class="function">EXAMPLE_APP</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">app</span><span class="symbol">));</span>
231
+
232
+ <span class="normal"> </span><span class="keyword">for</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">i </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span><span class="normal"> i </span><span class="symbol">&lt;</span><span class="normal"> n_files</span><span class="symbol">;</span><span class="normal"> i</span><span class="symbol">++)</span>
233
+ <span class="normal"> </span><span class="function">example_app_window_open</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">win</span><span class="symbol">,</span><span class="normal"> files</span><span class="symbol">[</span><span class="normal">i</span><span class="symbol">]);</span>
234
+
235
+ <span class="normal"> </span><span class="function"><a href="GtkWindow.html#gtk-window-present">gtk_window_present</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_WINDOW</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">win</span><span class="symbol">));</span>
236
+ <span class="cbracket">}</span>
237
+
238
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
239
+ <span class="function">example_app_class_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ExampleAppClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">class</span><span class="symbol">)</span>
240
+ <span class="cbracket">{</span>
241
+ <span class="normal"> </span><span class="function">G_APPLICATION_CLASS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">class</span><span class="symbol">)-&gt;</span><span class="normal">activate </span><span class="symbol">=</span><span class="normal"> example_app_activate</span><span class="symbol">;</span>
242
+ <span class="normal"> </span><span class="function">G_APPLICATION_CLASS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">class</span><span class="symbol">)-&gt;</span><span class="normal">open </span><span class="symbol">=</span><span class="normal"> example_app_open</span><span class="symbol">;</span>
243
+ <span class="cbracket">}</span>
244
+
245
+ <span class="normal">ExampleApp </span><span class="symbol">*</span>
246
+ <span class="function">example_app_new</span><span class="normal"> </span><span class="symbol">(</span><span class="type">void</span><span class="symbol">)</span>
247
+ <span class="cbracket">{</span>
248
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-new">g_object_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">EXAMPLE_APP_TYPE</span><span class="symbol">,</span>
249
+ <span class="normal"> </span><span class="string">"application-id"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"org.gtk.exampleapp"</span><span class="symbol">,</span>
250
+ <span class="normal"> </span><span class="string">"flags"</span><span class="symbol">,</span><span class="normal"> <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gio/GApplication.html#G-APPLICATION-HANDLES-OPEN:CAPS">G_APPLICATION_HANDLES_OPEN</a></span><span class="symbol">,</span>
251
+ <span class="normal"> <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
252
+ <span class="cbracket">}</span></pre></td>
253
+ </tr>
254
+ </tbody>
255
+ </table>
256
+ </div>
257
+
258
+ <p>Another important class that is part of the application support
259
+ in GTK+ is <a class="link" href="GtkApplicationWindow.html" title="GtkApplicationWindow"><span class="type">GtkApplicationWindow</span></a>. It is typically subclassed as well.
260
+ Our subclass does not do anything yet, so we will just get an empty
261
+ window.</p>
262
+ <div class="informalexample">
263
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
264
+ <tbody>
265
+ <tr>
266
+ <td class="listing_lines" align="right"><pre>1
267
+ 2
268
+ 3
269
+ 4
270
+ 5
271
+ 6
272
+ 7
273
+ 8
274
+ 9
275
+ 10
276
+ 11
277
+ 12
278
+ 13
279
+ 14
280
+ 15
281
+ 16
282
+ 17
283
+ 18
284
+ 19
285
+ 20
286
+ 21
287
+ 22
288
+ 23
289
+ 24
290
+ 25
291
+ 26
292
+ 27
293
+ 28
294
+ 29
295
+ 30
296
+ 31
297
+ 32
298
+ 33
299
+ 34
300
+ 35
301
+ 36
302
+ 37</pre></td>
303
+ <td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string">"exampleapp.h"</span>
304
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">"exampleappwin.h"</span>
305
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;gtk/gtk.h&gt;</span>
306
+
307
+ <span class="keyword">struct</span><span class="normal"> </span><span class="classname">_ExampleAppWindow</span>
308
+ <span class="cbracket">{</span>
309
+ <span class="normal"> </span><span class="usertype">GtkApplicationWindow</span><span class="normal"> parent</span><span class="symbol">;</span>
310
+ <span class="cbracket">}</span><span class="symbol">;</span>
311
+
312
+ <span class="keyword">struct</span><span class="normal"> </span><span class="classname">_ExampleAppWindowClass</span>
313
+ <span class="cbracket">{</span>
314
+ <span class="normal"> </span><span class="usertype">GtkApplicationWindowClass</span><span class="normal"> parent_class</span><span class="symbol">;</span>
315
+ <span class="cbracket">}</span><span class="symbol">;</span>
316
+
317
+ <span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-DEFINE-TYPE:CAPS">G_DEFINE_TYPE</a></span><span class="symbol">(</span><span class="normal">ExampleAppWindow</span><span class="symbol">,</span><span class="normal"> example_app_window</span><span class="symbol">,</span><span class="normal"> GTK_TYPE_APPLICATION_WINDOW</span><span class="symbol">);</span>
318
+
319
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
320
+ <span class="function">example_app_window_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ExampleAppWindow</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">app</span><span class="symbol">)</span>
321
+ <span class="cbracket">{</span>
322
+ <span class="cbracket">}</span>
323
+
324
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
325
+ <span class="function">example_app_window_class_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ExampleAppWindowClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">class</span><span class="symbol">)</span>
326
+ <span class="cbracket">{</span>
327
+ <span class="cbracket">}</span>
328
+
329
+ <span class="normal">ExampleAppWindow </span><span class="symbol">*</span>
330
+ <span class="function">example_app_window_new</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ExampleApp</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">app</span><span class="symbol">)</span>
331
+ <span class="cbracket">{</span>
332
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-new">g_object_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">EXAMPLE_APP_WINDOW_TYPE</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"application"</span><span class="symbol">,</span><span class="normal"> app</span><span class="symbol">,</span><span class="normal"> <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
333
+ <span class="cbracket">}</span>
334
+
335
+ <span class="type">void</span>
336
+ <span class="function">example_app_window_open</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ExampleAppWindow</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">win</span><span class="symbol">,</span>
337
+ <span class="normal"> </span><span class="usertype">GFile</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">file</span><span class="symbol">)</span>
338
+ <span class="cbracket">{</span>
339
+ <span class="cbracket">}</span></pre></td>
340
+ </tr>
341
+ </tbody>
342
+ </table>
343
+ </div>
344
+
345
+ <p>As part of the initial setup of our application, we also
346
+ create an icon and a desktop file.</p>
347
+ <div class="informalfigure"><div class="mediaobject"><img src="exampleapp.png"></div></div>
348
+ <div class="informalexample">
349
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
350
+ <tbody>
351
+ <tr>
352
+ <td class="listing_lines" align="right"><pre>1
353
+ 2
354
+ 3
355
+ 4
356
+ 5
357
+ 6</pre></td>
358
+ <td class="listing_code"><pre class="programlisting"><span class="symbol">[</span><span class="usertype">Desktop</span><span class="normal"> Entry</span><span class="symbol">]</span>
359
+ <span class="normal">Type</span><span class="symbol">=</span><span class="normal">Application</span>
360
+ <span class="normal">Name</span><span class="symbol">=</span><span class="normal">Example</span>
361
+ <span class="normal">Icon</span><span class="symbol">=</span><span class="normal">exampleapp</span>
362
+ <span class="normal">StartupNotify</span><span class="symbol">=</span><span class="normal">true</span>
363
+ <span class="normal">Exec</span><span class="symbol">=</span><span class="normal">@bindir@</span><span class="symbol">/</span><span class="normal">exampleapp</span></pre></td>
364
+ </tr>
365
+ </tbody>
366
+ </table>
367
+ </div>
368
+
369
+ <p>Note that <em class="replaceable"><code>@bindir@</code></em> needs to be replaced
370
+ with the actual path to the binary before this desktop file can be used.</p>
371
+ <p>Here is what we've achieved so far:</p>
372
+ <div class="informalfigure"><div class="mediaobject"><img src="getting-started-app1.png"></div></div>
373
+ <p>This does not look very impressive yet, but our application
374
+ is already presenting itself on the session bus, it has single-instance
375
+ semantics, and it accepts files as commandline arguments.</p>
376
+ </div>
377
+ <div class="section">
378
+ <div class="titlepage"><div><div><h3 class="title">
379
+ <a name="id-1.2.3.7.6"></a>Populating the window</h3></div></div></div>
380
+ <p>In this step, we use a <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> template to associate a
381
+ <a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a> ui file with our application window class.</p>
382
+ <p>Our simple ui file puts a <a class="link" href="GtkHeaderBar.html" title="GtkHeaderBar"><span class="type">GtkHeaderBar</span></a> on top of a <a class="link" href="GtkStack.html" title="GtkStack"><span class="type">GtkStack</span></a>
383
+ widget. The header bar contains a <a class="link" href="GtkStackSwitcher.html" title="GtkStackSwitcher"><span class="type">GtkStackSwitcher</span></a>, which is a
384
+ standalone widget to show a row of 'tabs' for the pages of a <a class="link" href="GtkStack.html" title="GtkStack"><span class="type">GtkStack</span></a>.
385
+ </p>
386
+ <div class="informalexample">
387
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
388
+ <tbody>
389
+ <tr>
390
+ <td class="listing_lines" align="right"><pre>1
391
+ 2
392
+ 3
393
+ 4
394
+ 5
395
+ 6
396
+ 7
397
+ 8
398
+ 9
399
+ 10
400
+ 11
401
+ 12
402
+ 13
403
+ 14
404
+ 15
405
+ 16
406
+ 17
407
+ 18
408
+ 19
409
+ 20
410
+ 21
411
+ 22
412
+ 23
413
+ 24
414
+ 25
415
+ 26
416
+ 27
417
+ 28
418
+ 29
419
+ 30
420
+ 31</pre></td>
421
+ <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;?</span><span class="usertype">xml</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="normal"> encoding</span><span class="symbol">=</span><span class="string">"UTF-8"</span><span class="symbol">?&gt;</span>
422
+ <span class="symbol">&lt;</span><span class="normal">interface</span><span class="symbol">&gt;</span>
423
+ <span class="normal"> </span><span class="symbol">&lt;!--</span><span class="normal"> interface</span><span class="symbol">-</span><span class="usertype">requires</span><span class="normal"> gtk</span><span class="symbol">+</span><span class="normal"> </span><span class="number">3.8</span><span class="normal"> </span><span class="symbol">--&gt;</span>
424
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">template</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"ExampleAppWindow"</span><span class="normal"> parent</span><span class="symbol">=</span><span class="string">"GtkApplicationWindow"</span><span class="symbol">&gt;</span>
425
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"title"</span><span class="normal"> translatable</span><span class="symbol">=</span><span class="string">"yes"</span><span class="symbol">&gt;</span><span class="usertype">Example</span><span class="normal"> Application</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
426
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"default-width"</span><span class="symbol">&gt;</span><span class="number">600</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
427
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"default-height"</span><span class="symbol">&gt;</span><span class="number">400</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
428
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
429
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkBox"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"content_box"</span><span class="symbol">&gt;</span>
430
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
431
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"orientation"</span><span class="symbol">&gt;</span><span class="normal">vertical</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
432
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
433
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkHeaderBar"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"header"</span><span class="symbol">&gt;</span>
434
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
435
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">child</span><span class="normal"> type</span><span class="symbol">=</span><span class="string">"title"</span><span class="symbol">&gt;</span>
436
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkStackSwitcher"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"tabs"</span><span class="symbol">&gt;</span>
437
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
438
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"stack"</span><span class="symbol">&gt;</span><span class="normal">stack</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
439
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
440
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
441
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
442
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
443
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
444
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkStack"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"stack"</span><span class="symbol">&gt;</span>
445
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
446
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
447
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
448
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
449
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
450
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">template</span><span class="symbol">&gt;</span>
451
+ <span class="symbol">&lt;/</span><span class="normal">interface</span><span class="symbol">&gt;</span></pre></td>
452
+ </tr>
453
+ </tbody>
454
+ </table>
455
+ </div>
456
+
457
+ <p>To make use of this file in our application, we revisit
458
+ our <a class="link" href="GtkApplicationWindow.html" title="GtkApplicationWindow"><span class="type">GtkApplicationWindow</span></a> subclass, and call
459
+ <a class="link" href="GtkWidget.html#gtk-widget-class-set-template-from-resource" title="gtk_widget_class_set_template_from_resource ()"><code class="function">gtk_widget_class_set_template_from_resource()</code></a> from the class init
460
+ function to set the ui file as template for this class. We also
461
+ add a call to <a class="link" href="GtkWidget.html#gtk-widget-init-template" title="gtk_widget_init_template ()"><code class="function">gtk_widget_init_template()</code></a> in the instance init
462
+ function to instantiate the template for each instance of our
463
+ class.</p>
464
+ <div class="informalexample">
465
+ <pre class="programlisting">
466
+ ...
467
+
468
+ static void
469
+ example_app_window_init (ExampleAppWindow *win)
470
+ {
471
+ gtk_widget_init_template (GTK_WIDGET (win));
472
+ }
473
+
474
+ static void
475
+ example_app_window_class_init (ExampleAppWindowClass *class)
476
+ {
477
+ gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class),
478
+ "/org/gtk/exampleapp/window.ui");
479
+ }
480
+
481
+ ...
482
+ </pre>
483
+ <p>(<a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/examples/application2/exampleappwin.c" target="_top">full source</a>)</p>
484
+ </div>
485
+ <p>You may have noticed that we used the <code class="function">_from_resource()</code> variant
486
+ of the function that sets a template. Now we need to use GLib's resource
487
+ functionality to include the ui file in the binary. This is commonly
488
+ done by listing all resources in a .gresource.xml file, such as this:
489
+ </p>
490
+ <div class="informalexample">
491
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
492
+ <tbody>
493
+ <tr>
494
+ <td class="listing_lines" align="right"><pre>1
495
+ 2
496
+ 3
497
+ 4
498
+ 5
499
+ 6</pre></td>
500
+ <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;?</span><span class="usertype">xml</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="normal"> encoding</span><span class="symbol">=</span><span class="string">"UTF-8"</span><span class="symbol">?&gt;</span>
501
+ <span class="symbol">&lt;</span><span class="normal">gresources</span><span class="symbol">&gt;</span>
502
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">gresource</span><span class="normal"> prefix</span><span class="symbol">=</span><span class="string">"/org/gtk/exampleapp"</span><span class="symbol">&gt;</span>
503
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">file</span><span class="normal"> preprocess</span><span class="symbol">=</span><span class="string">"xml-stripblanks"</span><span class="symbol">&gt;</span><span class="normal">window</span><span class="symbol">.</span><span class="normal">ui</span><span class="symbol">&lt;/</span><span class="normal">file</span><span class="symbol">&gt;</span>
504
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">gresource</span><span class="symbol">&gt;</span>
505
+ <span class="symbol">&lt;/</span><span class="normal">gresources</span><span class="symbol">&gt;</span></pre></td>
506
+ </tr>
507
+ </tbody>
508
+ </table>
509
+ </div>
510
+
511
+ <p>This file has to be converted into a C source file that will be
512
+ compiled and linked into the application together with the other source
513
+ files. To do so, we use the glib-compile-resources utility:</p>
514
+ <pre class="screen">
515
+ glib-compile-resources exampleapp.gresource.xml --target=resources.c --generate-source
516
+ </pre>
517
+ <p>Our application now looks like this:</p>
518
+ <div class="informalfigure"><div class="mediaobject"><img src="getting-started-app2.png"></div></div>
519
+ </div>
520
+ <div class="section">
521
+ <div class="titlepage"><div><div><h3 class="title">
522
+ <a name="id-1.2.3.7.7"></a>Opening files</h3></div></div></div>
523
+ <p>In this step, we make our application show the content of
524
+ all the files that it is given on the commandline.</p>
525
+ <p>To this end, we add a private struct to our application
526
+ window subclass and keep a reference to the <a class="link" href="GtkStack.html" title="GtkStack"><span class="type">GtkStack</span></a> there.
527
+ The <code class="function">gtk_widget_class_bind_child()</code> function arranges things so
528
+ that after instantiating the template, the <em class="parameter"><code>stack</code></em> member of
529
+ the private struct will point to the widget of the same name
530
+ from the template.</p>
531
+ <div class="informalexample">
532
+ <pre class="programlisting">
533
+ ...
534
+
535
+ struct _ExampleAppWindowPrivate
536
+ {
537
+ GtkWidget *stack;
538
+ };
539
+
540
+ G_DEFINE_TYPE_WITH_PRIVATE(ExampleAppWindow, example_app_window, GTK_TYPE_APPLICATION_WINDOW);
541
+
542
+ ...
543
+
544
+ static void
545
+ example_app_window_class_init (ExampleAppWindowClass *class)
546
+ {
547
+ gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class),
548
+ "/org/gtk/exampleapp/window.ui");
549
+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack);
550
+ }
551
+
552
+ ...
553
+ </pre>
554
+ <p>(<a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/examples/application3/exampleappwin.c" target="_top">full source</a>)</p>
555
+ </div>
556
+ <p>Now we revisit the <code class="function">example_app_window_open()</code> function that
557
+ is called for each commandline argument, and construct a GtkTextView
558
+ that we then add as a page to the stack:</p>
559
+ <div class="informalexample">
560
+ <pre class="programlisting">
561
+ ...
562
+
563
+ void
564
+ example_app_window_open (ExampleAppWindow *win,
565
+ GFile *file)
566
+ {
567
+ ExampleAppWindowPrivate *priv;
568
+ gchar *basename;
569
+ GtkWidget *scrolled, *view;
570
+ gchar *contents;
571
+ gsize length;
572
+
573
+ priv = example_app_window_get_instance_private (win);
574
+ basename = g_file_get_basename (file);
575
+
576
+ scrolled = gtk_scrolled_window_new (NULL, NULL);
577
+ gtk_widget_show (scrolled);
578
+ gtk_widget_set_hexpand (scrolled, TRUE);
579
+ gtk_widget_set_vexpand (scrolled, TRUE);
580
+ view = gtk_text_view_new ();
581
+ gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE);
582
+ gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE);
583
+ gtk_widget_show (view);
584
+ gtk_container_add (GTK_CONTAINER (scrolled), view);
585
+ gtk_stack_add_titled (GTK_STACK (priv-&gt;stack), scrolled, basename, basename);
586
+
587
+ if (g_file_load_contents (file, NULL, &amp;contents, &amp;length, NULL, NULL))
588
+ {
589
+ GtkTextBuffer *buffer;
590
+
591
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
592
+ gtk_text_buffer_set_text (buffer, contents, length);
593
+ g_free (contents);
594
+ }
595
+
596
+ g_free (basename);
597
+ }
598
+
599
+ ...
600
+ </pre>
601
+ <p>(<a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/examples/application3/exampleappwin.c" target="_top">full source</a>)</p>
602
+ </div>
603
+ <p>Note that we did not have to touch the stack switcher
604
+ at all. It gets all its information from the stack that it
605
+ belongs to. Here, we are passing the label to show for each
606
+ file as the last argument to the <a class="link" href="GtkStack.html#gtk-stack-add-titled" title="gtk_stack_add_titled ()"><code class="function">gtk_stack_add_titled()</code></a>
607
+ function.</p>
608
+ <p>Our application is beginning to take shape:</p>
609
+ <div class="informalfigure"><div class="mediaobject"><img src="getting-started-app3.png"></div></div>
610
+ </div>
611
+ <div class="section">
612
+ <div class="titlepage"><div><div><h3 class="title">
613
+ <a name="id-1.2.3.7.8"></a>An application menu</h3></div></div></div>
614
+ <p>An application menu is shown by GNOME shell at the top of the
615
+ screen. It is meant to collect infrequently used actions that affect
616
+ the whole application.</p>
617
+ <p>Just like the window template, we specify our application menu
618
+ in a ui file, and add it as a resource to our binary.</p>
619
+ <div class="informalexample">
620
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
621
+ <tbody>
622
+ <tr>
623
+ <td class="listing_lines" align="right"><pre>1
624
+ 2
625
+ 3
626
+ 4
627
+ 5
628
+ 6
629
+ 7
630
+ 8
631
+ 9
632
+ 10
633
+ 11
634
+ 12
635
+ 13
636
+ 14
637
+ 15
638
+ 16
639
+ 17
640
+ 18
641
+ 19</pre></td>
642
+ <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;?</span><span class="usertype">xml</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="symbol">?&gt;</span>
643
+ <span class="symbol">&lt;</span><span class="normal">interface</span><span class="symbol">&gt;</span>
644
+ <span class="normal"> </span><span class="symbol">&lt;!--</span><span class="normal"> interface</span><span class="symbol">-</span><span class="usertype">requires</span><span class="normal"> gtk</span><span class="symbol">+</span><span class="normal"> </span><span class="number">3.0</span><span class="normal"> </span><span class="symbol">--&gt;</span>
645
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">menu</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"appmenu"</span><span class="symbol">&gt;</span>
646
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">section</span><span class="symbol">&gt;</span>
647
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">item</span><span class="symbol">&gt;</span>
648
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">attribute</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"label"</span><span class="normal"> translatable</span><span class="symbol">=</span><span class="string">"yes"</span><span class="symbol">&gt;</span><span class="normal">_Preferences</span><span class="symbol">&lt;/</span><span class="normal">attribute</span><span class="symbol">&gt;</span>
649
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">attribute</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"action"</span><span class="symbol">&gt;</span><span class="normal">app</span><span class="symbol">.</span><span class="normal">preferences</span><span class="symbol">&lt;/</span><span class="normal">attribute</span><span class="symbol">&gt;</span>
650
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">item</span><span class="symbol">&gt;</span>
651
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">section</span><span class="symbol">&gt;</span>
652
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">section</span><span class="symbol">&gt;</span>
653
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">item</span><span class="symbol">&gt;</span>
654
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">attribute</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"label"</span><span class="normal"> translatable</span><span class="symbol">=</span><span class="string">"yes"</span><span class="symbol">&gt;</span><span class="normal">_Quit</span><span class="symbol">&lt;/</span><span class="normal">attribute</span><span class="symbol">&gt;</span>
655
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">attribute</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"action"</span><span class="symbol">&gt;</span><span class="normal">app</span><span class="symbol">.</span><span class="normal">quit</span><span class="symbol">&lt;/</span><span class="normal">attribute</span><span class="symbol">&gt;</span>
656
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">attribute</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"accel"</span><span class="symbol">&gt;&lt;![</span><span class="normal">CDATA</span><span class="symbol">[&lt;</span><span class="normal">Ctrl</span><span class="symbol">&gt;</span><span class="normal">Q</span><span class="symbol">]]&gt;&lt;/</span><span class="normal">attribute</span><span class="symbol">&gt;</span>
657
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">item</span><span class="symbol">&gt;</span>
658
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">section</span><span class="symbol">&gt;</span>
659
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">menu</span><span class="symbol">&gt;</span>
660
+ <span class="symbol">&lt;/</span><span class="normal">interface</span><span class="symbol">&gt;</span></pre></td>
661
+ </tr>
662
+ </tbody>
663
+ </table>
664
+ </div>
665
+
666
+ <p>To associate the app menu with the application, we have to call
667
+ <a class="link" href="GtkApplication.html#gtk-application-set-app-menu" title="gtk_application_set_app_menu ()"><code class="function">gtk_application_set_app_menu()</code></a>. Since app menus work by activating
668
+ <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gio/GAction.html"><span class="type">GActions</span></a>, we also have to add a suitable set of actions to our
669
+ application.</p>
670
+ <p>Both of these tasks are best done in the <code class="function">startup()</code> vfunc,
671
+ which is guaranteed to be called once for each primary application
672
+ instance:</p>
673
+ <div class="informalexample">
674
+ <pre class="programlisting">
675
+ ...
676
+
677
+ static void
678
+ preferences_activated (GSimpleAction *action,
679
+ GVariant *parameter,
680
+ gpointer app)
681
+ {
682
+ }
683
+
684
+ static void
685
+ quit_activated (GSimpleAction *action,
686
+ GVariant *parameter,
687
+ gpointer app)
688
+ {
689
+ g_application_quit (G_APPLICATION (app));
690
+ }
691
+
692
+ static GActionEntry app_entries[] =
693
+ {
694
+ { "preferences", preferences_activated, NULL, NULL, NULL },
695
+ { "quit", quit_activated, NULL, NULL, NULL }
696
+ };
697
+
698
+ static void
699
+ example_app_startup (GApplication *app)
700
+ {
701
+ GtkBuilder *builder;
702
+ GMenuModel *app_menu;
703
+
704
+ G_APPLICATION_CLASS (example_app_parent_class)-&gt;startup (app);
705
+
706
+ g_action_map_add_action_entries (G_ACTION_MAP (app),
707
+ app_entries, G_N_ELEMENTS (app_entries),
708
+ app);
709
+
710
+ builder = gtk_builder_new_from_resource ("/org/gtk/exampleapp/app-menu.ui");
711
+ app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
712
+ gtk_application_set_app_menu (GTK_APPLICATION (app), app_menu);
713
+ g_object_unref (builder);
714
+ }
715
+
716
+ static void
717
+ example_app_class_init (ExampleAppClass *class)
718
+ {
719
+ G_APPLICATION_CLASS (class)-&gt;startup = example_app_startup;
720
+ ...
721
+ }
722
+
723
+ ...
724
+ </pre>
725
+ <p>(<a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/examples/application4/exampleapp.c" target="_top">full source</a>)</p>
726
+ </div>
727
+ <p>Our preferences menu item does not do anything yet,
728
+ but the Quit menu item is fully functional. Note that it
729
+ can also be activated by the usual Ctrl-Q shortcut. The
730
+ shortcut was specified in the ui file.
731
+ </p>
732
+ <p>The application menu looks like this:</p>
733
+ <div class="informalfigure"><div class="mediaobject"><img src="getting-started-app4.png"></div></div>
734
+ </div>
735
+ <div class="section">
736
+ <div class="titlepage"><div><div><h3 class="title">
737
+ <a name="id-1.2.3.7.9"></a>A preference dialog</h3></div></div></div>
738
+ <p>A typical application will have a some preferences that
739
+ should be remembered from one run to the next. Even for our
740
+ simple example application, we may want to change the font
741
+ that is used for the content.</p>
742
+ <p>We are going to use GSettings to store our preferences.
743
+ GSettings requires a schema that describes our settings:</p>
744
+ <div class="informalexample">
745
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
746
+ <tbody>
747
+ <tr>
748
+ <td class="listing_lines" align="right"><pre>1
749
+ 2
750
+ 3
751
+ 4
752
+ 5
753
+ 6
754
+ 7
755
+ 8
756
+ 9
757
+ 10
758
+ 11
759
+ 12
760
+ 13
761
+ 14
762
+ 15
763
+ 16
764
+ 17
765
+ 18
766
+ 19
767
+ 20</pre></td>
768
+ <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;?</span><span class="usertype">xml</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="normal"> encoding</span><span class="symbol">=</span><span class="string">"UTF-8"</span><span class="symbol">?&gt;</span>
769
+ <span class="symbol">&lt;</span><span class="normal">schemalist</span><span class="symbol">&gt;</span>
770
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">schema</span><span class="normal"> path</span><span class="symbol">=</span><span class="string">"/org/gtk/exampleapp/"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"org.gtk.exampleapp"</span><span class="symbol">&gt;</span>
771
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">key</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"font"</span><span class="normal"> type</span><span class="symbol">=</span><span class="string">"s"</span><span class="symbol">&gt;</span>
772
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="keyword">default</span><span class="symbol">&gt;</span><span class="string">'Monospace 12'</span><span class="symbol">&lt;/</span><span class="keyword">default</span><span class="symbol">&gt;</span>
773
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">summary</span><span class="symbol">&gt;</span><span class="normal">Font</span><span class="symbol">&lt;/</span><span class="normal">summary</span><span class="symbol">&gt;</span>
774
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">description</span><span class="symbol">&gt;</span><span class="normal">The font to be used </span><span class="usertype">for</span><span class="normal"> content</span><span class="symbol">.&lt;/</span><span class="normal">description</span><span class="symbol">&gt;</span>
775
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">key</span><span class="symbol">&gt;</span>
776
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">key</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"transition"</span><span class="normal"> type</span><span class="symbol">=</span><span class="string">"s"</span><span class="symbol">&gt;</span>
777
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">choices</span><span class="symbol">&gt;</span>
778
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">choice</span><span class="normal"> value</span><span class="symbol">=</span><span class="string">'none'</span><span class="symbol">/&gt;</span>
779
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">choice</span><span class="normal"> value</span><span class="symbol">=</span><span class="string">'crossfade'</span><span class="symbol">/&gt;</span>
780
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">choice</span><span class="normal"> value</span><span class="symbol">=</span><span class="string">'slide-left-right'</span><span class="symbol">/&gt;</span>
781
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">choices</span><span class="symbol">&gt;</span>
782
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="keyword">default</span><span class="symbol">&gt;</span><span class="string">'none'</span><span class="symbol">&lt;/</span><span class="keyword">default</span><span class="symbol">&gt;</span>
783
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">summary</span><span class="symbol">&gt;</span><span class="normal">Transition</span><span class="symbol">&lt;/</span><span class="normal">summary</span><span class="symbol">&gt;</span>
784
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">description</span><span class="symbol">&gt;</span><span class="normal">The transition to use when </span><span class="usertype">switching</span><span class="normal"> tabs</span><span class="symbol">.&lt;/</span><span class="normal">description</span><span class="symbol">&gt;</span>
785
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">key</span><span class="symbol">&gt;</span>
786
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">schema</span><span class="symbol">&gt;</span>
787
+ <span class="symbol">&lt;/</span><span class="normal">schemalist</span><span class="symbol">&gt;</span></pre></td>
788
+ </tr>
789
+ </tbody>
790
+ </table>
791
+ </div>
792
+
793
+ <p>Before we can make use of this schema in our application,
794
+ we need to compile it into the binary form that GSettings
795
+ expects. GIO provides <a class="ulink" href="https://developer.gnome.org/gio/2.36/ch31s06.html" target="_top">macros</a>
796
+ to do this in autotools-based projects.</p>
797
+ <p>Next, we need to connect our settings to the widgets
798
+ that they are supposed to control. One convenient way to do
799
+ this is to use GSettings bind functionality to bind settings
800
+ keys to object properties, as we do here for the transition
801
+ setting.</p>
802
+ <div class="informalexample">
803
+ <pre class="programlisting">
804
+ ...
805
+
806
+ static void
807
+ example_app_window_init (ExampleAppWindow *win)
808
+ {
809
+ ExampleAppWindowPrivate *priv;
810
+
811
+ priv = example_app_window_get_instance_private (win);
812
+ gtk_widget_init_template (GTK_WIDGET (win));
813
+ priv-&gt;settings = g_settings_new ("org.gtk.exampleapp");
814
+
815
+ g_settings_bind (priv-&gt;settings, "transition",
816
+ priv-&gt;stack, "transition-type",
817
+ G_SETTINGS_BIND_DEFAULT);
818
+ }
819
+
820
+ ...
821
+ </pre>
822
+ <p>(<a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/examples/application5/exampleappwin.c" target="_top">full source</a>)</p>
823
+ </div>
824
+ <p>The code to connect the font setting is a little more involved,
825
+ since there is no simple object property that it corresponds to, so
826
+ we are not going to go into that here.</p>
827
+ <p>At this point, the application will already react if you
828
+ change one of the settings, e.g. using the gsettings commandline
829
+ tool. Of course, we expect the application to provide a preference
830
+ dialog for these. So lets do that now. Our preference dialog will
831
+ be a subclass of GtkDialog, and we'll use the same techniques that
832
+ we've already seen: templates, private structs, settings
833
+ bindings.</p>
834
+ <p>Lets start with the template.</p>
835
+ <div class="informalexample">
836
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
837
+ <tbody>
838
+ <tr>
839
+ <td class="listing_lines" align="right"><pre>1
840
+ 2
841
+ 3
842
+ 4
843
+ 5
844
+ 6
845
+ 7
846
+ 8
847
+ 9
848
+ 10
849
+ 11
850
+ 12
851
+ 13
852
+ 14
853
+ 15
854
+ 16
855
+ 17
856
+ 18
857
+ 19
858
+ 20
859
+ 21
860
+ 22
861
+ 23
862
+ 24
863
+ 25
864
+ 26
865
+ 27
866
+ 28
867
+ 29
868
+ 30
869
+ 31
870
+ 32
871
+ 33
872
+ 34
873
+ 35
874
+ 36
875
+ 37
876
+ 38
877
+ 39
878
+ 40
879
+ 41
880
+ 42
881
+ 43
882
+ 44
883
+ 45
884
+ 46
885
+ 47
886
+ 48
887
+ 49
888
+ 50
889
+ 51
890
+ 52
891
+ 53
892
+ 54
893
+ 55
894
+ 56
895
+ 57
896
+ 58
897
+ 59
898
+ 60
899
+ 61
900
+ 62
901
+ 63
902
+ 64
903
+ 65
904
+ 66
905
+ 67
906
+ 68
907
+ 69
908
+ 70
909
+ 71
910
+ 72
911
+ 73
912
+ 74
913
+ 75
914
+ 76
915
+ 77
916
+ 78
917
+ 79
918
+ 80
919
+ 81
920
+ 82
921
+ 83</pre></td>
922
+ <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;?</span><span class="usertype">xml</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="normal"> encoding</span><span class="symbol">=</span><span class="string">"UTF-8"</span><span class="symbol">?&gt;</span>
923
+ <span class="symbol">&lt;</span><span class="normal">interface</span><span class="symbol">&gt;</span>
924
+ <span class="normal"> </span><span class="symbol">&lt;!--</span><span class="normal"> interface</span><span class="symbol">-</span><span class="usertype">requires</span><span class="normal"> gtk</span><span class="symbol">+</span><span class="normal"> </span><span class="number">3.8</span><span class="normal"> </span><span class="symbol">--&gt;</span>
925
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">template</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"ExampleAppPrefs"</span><span class="normal"> parent</span><span class="symbol">=</span><span class="string">"GtkDialog"</span><span class="symbol">&gt;</span>
926
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"title"</span><span class="normal"> translatable</span><span class="symbol">=</span><span class="string">"yes"</span><span class="symbol">&gt;</span><span class="normal">Preferences</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
927
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"resizable"</span><span class="symbol">&gt;</span><span class="normal">False</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
928
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"modal"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
929
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">child</span><span class="normal"> internal</span><span class="symbol">-</span><span class="normal">child</span><span class="symbol">=</span><span class="string">"vbox"</span><span class="symbol">&gt;</span>
930
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkBox"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"vbox"</span><span class="symbol">&gt;</span>
931
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
932
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkGrid"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"grid"</span><span class="symbol">&gt;</span>
933
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
934
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"margin"</span><span class="symbol">&gt;</span><span class="number">6</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
935
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"row-spacing"</span><span class="symbol">&gt;</span><span class="number">12</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
936
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"column-spacing"</span><span class="symbol">&gt;</span><span class="number">6</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
937
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
938
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkLabel"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"fontlabel"</span><span class="symbol">&gt;</span>
939
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
940
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"label"</span><span class="symbol">&gt;</span><span class="normal">_Font</span><span class="symbol">:&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
941
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"use-underline"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
942
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"mnemonic-widget"</span><span class="symbol">&gt;</span><span class="normal">font</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
943
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"xalign"</span><span class="symbol">&gt;</span><span class="number">1</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
944
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
945
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">packing</span><span class="symbol">&gt;</span>
946
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"left-attach"</span><span class="symbol">&gt;</span><span class="number">0</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
947
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"top-attach"</span><span class="symbol">&gt;</span><span class="number">0</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
948
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">packing</span><span class="symbol">&gt;</span>
949
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
950
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
951
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkFontButton"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"font"</span><span class="symbol">&gt;</span>
952
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
953
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
954
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">packing</span><span class="symbol">&gt;</span>
955
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"left-attach"</span><span class="symbol">&gt;</span><span class="number">1</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
956
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"top-attach"</span><span class="symbol">&gt;</span><span class="number">0</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
957
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">packing</span><span class="symbol">&gt;</span>
958
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
959
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
960
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkLabel"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"transitionlabel"</span><span class="symbol">&gt;</span>
961
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
962
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"label"</span><span class="symbol">&gt;</span><span class="normal">_Transition</span><span class="symbol">:&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
963
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"use-underline"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
964
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"mnemonic-widget"</span><span class="symbol">&gt;</span><span class="normal">transition</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
965
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"xalign"</span><span class="symbol">&gt;</span><span class="number">1</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
966
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
967
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">packing</span><span class="symbol">&gt;</span>
968
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"left-attach"</span><span class="symbol">&gt;</span><span class="number">0</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
969
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"top-attach"</span><span class="symbol">&gt;</span><span class="number">1</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
970
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">packing</span><span class="symbol">&gt;</span>
971
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
972
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
973
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkComboBoxText"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"transition"</span><span class="symbol">&gt;</span>
974
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
975
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">items</span><span class="symbol">&gt;</span>
976
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">item</span><span class="normal"> translatable</span><span class="symbol">=</span><span class="string">"yes"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"none"</span><span class="symbol">&gt;</span><span class="normal">None</span><span class="symbol">&lt;/</span><span class="normal">item</span><span class="symbol">&gt;</span>
977
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">item</span><span class="normal"> translatable</span><span class="symbol">=</span><span class="string">"yes"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"crossfade"</span><span class="symbol">&gt;</span><span class="normal">Fade</span><span class="symbol">&lt;/</span><span class="normal">item</span><span class="symbol">&gt;</span>
978
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">item</span><span class="normal"> translatable</span><span class="symbol">=</span><span class="string">"yes"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"slide-left-right"</span><span class="symbol">&gt;</span><span class="normal">Slide</span><span class="symbol">&lt;/</span><span class="normal">item</span><span class="symbol">&gt;</span>
979
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">items</span><span class="symbol">&gt;</span>
980
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
981
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">packing</span><span class="symbol">&gt;</span>
982
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"left-attach"</span><span class="symbol">&gt;</span><span class="number">1</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
983
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"top-attach"</span><span class="symbol">&gt;</span><span class="number">1</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
984
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">packing</span><span class="symbol">&gt;</span>
985
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
986
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
987
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
988
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">child</span><span class="normal"> internal</span><span class="symbol">-</span><span class="normal">child</span><span class="symbol">=</span><span class="string">"action_area"</span><span class="symbol">&gt;</span>
989
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkButtonBox"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"action_area"</span><span class="symbol">&gt;</span>
990
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
991
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
992
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkButton"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"close"</span><span class="symbol">&gt;</span>
993
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">signal</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"clicked"</span><span class="normal"> handler</span><span class="symbol">=</span><span class="string">"preferences_closed"</span><span class="symbol">/&gt;</span>
994
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
995
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"label"</span><span class="symbol">&gt;</span><span class="normal">_Close</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
996
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"use-underline"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
997
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
998
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
999
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1000
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1001
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1002
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1003
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">template</span><span class="symbol">&gt;</span>
1004
+ <span class="symbol">&lt;/</span><span class="normal">interface</span><span class="symbol">&gt;</span></pre></td>
1005
+ </tr>
1006
+ </tbody>
1007
+ </table>
1008
+ </div>
1009
+
1010
+ <p>Next comes the dialog subclass.</p>
1011
+ <div class="informalexample">
1012
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1013
+ <tbody>
1014
+ <tr>
1015
+ <td class="listing_lines" align="right"><pre>1
1016
+ 2
1017
+ 3
1018
+ 4
1019
+ 5
1020
+ 6
1021
+ 7
1022
+ 8
1023
+ 9
1024
+ 10
1025
+ 11
1026
+ 12
1027
+ 13
1028
+ 14
1029
+ 15
1030
+ 16
1031
+ 17
1032
+ 18
1033
+ 19
1034
+ 20
1035
+ 21
1036
+ 22
1037
+ 23
1038
+ 24
1039
+ 25
1040
+ 26
1041
+ 27
1042
+ 28
1043
+ 29
1044
+ 30
1045
+ 31
1046
+ 32
1047
+ 33
1048
+ 34
1049
+ 35
1050
+ 36
1051
+ 37
1052
+ 38
1053
+ 39
1054
+ 40
1055
+ 41
1056
+ 42
1057
+ 43
1058
+ 44
1059
+ 45
1060
+ 46
1061
+ 47
1062
+ 48
1063
+ 49
1064
+ 50
1065
+ 51
1066
+ 52
1067
+ 53
1068
+ 54
1069
+ 55
1070
+ 56
1071
+ 57
1072
+ 58
1073
+ 59
1074
+ 60
1075
+ 61
1076
+ 62
1077
+ 63
1078
+ 64
1079
+ 65
1080
+ 66
1081
+ 67
1082
+ 68
1083
+ 69
1084
+ 70
1085
+ 71
1086
+ 72
1087
+ 73
1088
+ 74
1089
+ 75
1090
+ 76
1091
+ 77
1092
+ 78
1093
+ 79</pre></td>
1094
+ <td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;gtk/gtk.h&gt;</span>
1095
+
1096
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">"exampleapp.h"</span>
1097
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">"exampleappwin.h"</span>
1098
+ <span class="preproc">#include</span><span class="normal"> </span><span class="string">"exampleappprefs.h"</span>
1099
+
1100
+ <span class="keyword">struct</span><span class="normal"> </span><span class="classname">_ExampleAppPrefs</span>
1101
+ <span class="cbracket">{</span>
1102
+ <span class="normal"> </span><span class="usertype">GtkDialog</span><span class="normal"> parent</span><span class="symbol">;</span>
1103
+ <span class="cbracket">}</span><span class="symbol">;</span>
1104
+
1105
+ <span class="keyword">struct</span><span class="normal"> </span><span class="classname">_ExampleAppPrefsClass</span>
1106
+ <span class="cbracket">{</span>
1107
+ <span class="normal"> </span><span class="usertype">GtkDialogClass</span><span class="normal"> parent_class</span><span class="symbol">;</span>
1108
+ <span class="cbracket">}</span><span class="symbol">;</span>
1109
+
1110
+ <span class="keyword">typedef</span><span class="normal"> </span><span class="keyword">struct</span><span class="normal"> </span><span class="classname">_ExampleAppPrefsPrivate</span><span class="normal"> ExampleAppPrefsPrivate</span><span class="symbol">;</span>
1111
+
1112
+ <span class="keyword">struct</span><span class="normal"> </span><span class="classname">_ExampleAppPrefsPrivate</span>
1113
+ <span class="cbracket">{</span>
1114
+ <span class="normal"> </span><span class="usertype">GSettings</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">settings</span><span class="symbol">;</span>
1115
+ <span class="normal"> </span><span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">font</span><span class="symbol">;</span>
1116
+ <span class="normal"> </span><span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">transition</span><span class="symbol">;</span>
1117
+ <span class="cbracket">}</span><span class="symbol">;</span>
1118
+
1119
+ <span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-DEFINE-TYPE-WITH-PRIVATE:CAPS">G_DEFINE_TYPE_WITH_PRIVATE</a></span><span class="symbol">(</span><span class="normal">ExampleAppPrefs</span><span class="symbol">,</span><span class="normal"> example_app_prefs</span><span class="symbol">,</span><span class="normal"> GTK_TYPE_DIALOG</span><span class="symbol">)</span>
1120
+
1121
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1122
+ <span class="function">preferences_closed</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">button</span><span class="symbol">)</span>
1123
+ <span class="cbracket">{</span>
1124
+ <span class="normal"> </span><span class="function"><a href="GtkWidget.html#gtk-widget-destroy">gtk_widget_destroy</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="GtkWidget.html#gtk-widget-get-toplevel">gtk_widget_get_toplevel</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">button</span><span class="symbol">));</span>
1125
+ <span class="cbracket">}</span>
1126
+
1127
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1128
+ <span class="function">example_app_prefs_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ExampleAppPrefs</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">prefs</span><span class="symbol">)</span>
1129
+ <span class="cbracket">{</span>
1130
+ <span class="normal"> </span><span class="usertype">ExampleAppPrefsPrivate</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">priv</span><span class="symbol">;</span>
1131
+
1132
+ <span class="normal"> priv </span><span class="symbol">=</span><span class="normal"> </span><span class="function">example_app_prefs_get_instance_private</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">prefs</span><span class="symbol">);</span>
1133
+ <span class="normal"> </span><span class="function"><a href="GtkWidget.html#gtk-widget-init-template">gtk_widget_init_template</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_WIDGET</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">prefs</span><span class="symbol">));</span>
1134
+ <span class="normal"> priv</span><span class="symbol">-&gt;</span><span class="normal">settings </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gio/GSettings.html#g-settings-new">g_settings_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"org.gtk.exampleapp"</span><span class="symbol">);</span>
1135
+
1136
+ <span class="normal"> </span><span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gio/GSettings.html#g-settings-bind">g_settings_bind</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">settings</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"font"</span><span class="symbol">,</span>
1137
+ <span class="normal"> priv</span><span class="symbol">-&gt;</span><span class="normal">font</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"font"</span><span class="symbol">,</span>
1138
+ <span class="normal"> <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gio/GSettings.html#G-SETTINGS-BIND-DEFAULT:CAPS">G_SETTINGS_BIND_DEFAULT</a></span><span class="symbol">);</span>
1139
+ <span class="normal"> </span><span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gio/GSettings.html#g-settings-bind">g_settings_bind</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">settings</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"transition"</span><span class="symbol">,</span>
1140
+ <span class="normal"> priv</span><span class="symbol">-&gt;</span><span class="normal">transition</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"active-id"</span><span class="symbol">,</span>
1141
+ <span class="normal"> <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gio/GSettings.html#G-SETTINGS-BIND-DEFAULT:CAPS">G_SETTINGS_BIND_DEFAULT</a></span><span class="symbol">);</span>
1142
+ <span class="cbracket">}</span>
1143
+
1144
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1145
+ <span class="function">example_app_prefs_dispose</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">object</span><span class="symbol">)</span>
1146
+ <span class="cbracket">{</span>
1147
+ <span class="normal"> </span><span class="usertype">ExampleAppPrefsPrivate</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">priv</span><span class="symbol">;</span>
1148
+
1149
+ <span class="normal"> priv </span><span class="symbol">=</span><span class="normal"> </span><span class="function">example_app_prefs_get_instance_private</span><span class="normal"> </span><span class="symbol">(</span><span class="function">EXAMPLE_APP_PREFS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">object</span><span class="symbol">));</span>
1150
+ <span class="normal"> </span><span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-clear-object">g_clear_object</a></span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">priv</span><span class="symbol">-&gt;</span><span class="normal">settings</span><span class="symbol">);</span>
1151
+
1152
+ <span class="normal"> </span><span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#G-OBJECT-CLASS:CAPS">G_OBJECT_CLASS</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">example_app_prefs_parent_class</span><span class="symbol">)-&gt;</span><span class="function">dispose</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">object</span><span class="symbol">);</span>
1153
+ <span class="cbracket">}</span>
1154
+
1155
+ <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
1156
+ <span class="function">example_app_prefs_class_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ExampleAppPrefsClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">class</span><span class="symbol">)</span>
1157
+ <span class="cbracket">{</span>
1158
+ <span class="normal"> </span><span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#G-OBJECT-CLASS:CAPS">G_OBJECT_CLASS</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">class</span><span class="symbol">)-&gt;</span><span class="normal">dispose </span><span class="symbol">=</span><span class="normal"> example_app_prefs_dispose</span><span class="symbol">;</span>
1159
+
1160
+ <span class="normal"> </span><span class="function"><a href="GtkWidget.html#gtk-widget-class-set-template-from-resource">gtk_widget_class_set_template_from_resource</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_WIDGET_CLASS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">class</span><span class="symbol">),</span>
1161
+ <span class="normal"> </span><span class="string">"/org/gtk/exampleapp/prefs.ui"</span><span class="symbol">);</span>
1162
+ <span class="normal"> </span><span class="function"><a href="GtkWidget.html#gtk-widget-class-bind-template-child-private">gtk_widget_class_bind_template_child_private</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_WIDGET_CLASS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">class</span><span class="symbol">),</span><span class="normal"> ExampleAppPrefs</span><span class="symbol">,</span><span class="normal"> font</span><span class="symbol">);</span>
1163
+ <span class="normal"> </span><span class="function"><a href="GtkWidget.html#gtk-widget-class-bind-template-child-private">gtk_widget_class_bind_template_child_private</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_WIDGET_CLASS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">class</span><span class="symbol">),</span><span class="normal"> ExampleAppPrefs</span><span class="symbol">,</span><span class="normal"> transition</span><span class="symbol">);</span>
1164
+
1165
+ <span class="normal"> </span><span class="function"><a href="GtkWidget.html#gtk-widget-class-bind-template-callback">gtk_widget_class_bind_template_callback</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_WIDGET_CLASS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">class</span><span class="symbol">),</span><span class="normal"> preferences_closed</span><span class="symbol">);</span>
1166
+ <span class="cbracket">}</span>
1167
+
1168
+ <span class="normal">ExampleAppPrefs </span><span class="symbol">*</span>
1169
+ <span class="function">example_app_prefs_new</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ExampleAppWindow</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">win</span><span class="symbol">)</span>
1170
+ <span class="cbracket">{</span>
1171
+ <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="function"><a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-new">g_object_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">EXAMPLE_APP_PREFS_TYPE</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"transient-for"</span><span class="symbol">,</span><span class="normal"> win</span><span class="symbol">,</span><span class="normal"> <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
1172
+ <span class="cbracket">}</span></pre></td>
1173
+ </tr>
1174
+ </tbody>
1175
+ </table>
1176
+ </div>
1177
+
1178
+ <p>Now we revisit the <code class="function">preferences_activated()</code> function in our
1179
+ application class, and make it open a new preference dialog.</p>
1180
+ <div class="informalexample">
1181
+ <pre class="programlisting">
1182
+ ...
1183
+
1184
+ static void
1185
+ preferences_activated (GSimpleAction *action,
1186
+ GVariant *parameter,
1187
+ gpointer app)
1188
+ {
1189
+ ExampleAppPrefs *prefs;
1190
+ GtkWindow *win;
1191
+
1192
+ win = gtk_application_get_active_window (GTK_APPLICATION (app));
1193
+ prefs = example_app_prefs_new (EXAMPLE_APP_WINDOW (win));
1194
+ gtk_window_present (GTK_WINDOW (prefs));
1195
+ }
1196
+
1197
+ ...
1198
+ </pre>
1199
+ <p>(<a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/examples/application6/exampleapp.c" target="_top">full source</a>)</p>
1200
+ </div>
1201
+ <p>After all this work, our application can now show
1202
+ a preference dialog like this:</p>
1203
+ <div class="informalfigure"><div class="mediaobject"><img src="getting-started-app6.png"></div></div>
1204
+ </div>
1205
+ <div class="section">
1206
+ <div class="titlepage"><div><div><h3 class="title">
1207
+ <a name="id-1.2.3.7.10"></a>Adding a search bar</h3></div></div></div>
1208
+ <p>We continue to flesh out the functionality of our application.
1209
+ For now, we add search. GTK+ supports this with <a class="link" href="GtkSearchEntry.html" title="GtkSearchEntry"><span class="type">GtkSearchEntry</span></a> and
1210
+ <a class="link" href="GtkSearchBar.html" title="GtkSearchBar"><span class="type">GtkSearchBar</span></a>. The search bar is a widget that can slide in from the
1211
+ top to present a search entry.</p>
1212
+ <p>We add a toggle button to the header bar, which can be used
1213
+ to slide out the search bar below the header bar.</p>
1214
+ <div class="informalexample">
1215
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1216
+ <tbody>
1217
+ <tr>
1218
+ <td class="listing_lines" align="right"><pre>1
1219
+ 2
1220
+ 3
1221
+ 4
1222
+ 5
1223
+ 6
1224
+ 7
1225
+ 8
1226
+ 9
1227
+ 10
1228
+ 11
1229
+ 12
1230
+ 13
1231
+ 14
1232
+ 15
1233
+ 16
1234
+ 17
1235
+ 18
1236
+ 19
1237
+ 20
1238
+ 21
1239
+ 22
1240
+ 23
1241
+ 24
1242
+ 25
1243
+ 26
1244
+ 27
1245
+ 28
1246
+ 29
1247
+ 30
1248
+ 31
1249
+ 32
1250
+ 33
1251
+ 34
1252
+ 35
1253
+ 36
1254
+ 37
1255
+ 38
1256
+ 39
1257
+ 40
1258
+ 41
1259
+ 42
1260
+ 43
1261
+ 44
1262
+ 45
1263
+ 46
1264
+ 47
1265
+ 48
1266
+ 49
1267
+ 50
1268
+ 51
1269
+ 52
1270
+ 53
1271
+ 54
1272
+ 55
1273
+ 56
1274
+ 57
1275
+ 58
1276
+ 59</pre></td>
1277
+ <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;?</span><span class="usertype">xml</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="normal"> encoding</span><span class="symbol">=</span><span class="string">"UTF-8"</span><span class="symbol">?&gt;</span>
1278
+ <span class="symbol">&lt;</span><span class="normal">interface</span><span class="symbol">&gt;</span>
1279
+ <span class="normal"> </span><span class="symbol">&lt;!--</span><span class="normal"> interface</span><span class="symbol">-</span><span class="usertype">requires</span><span class="normal"> gtk</span><span class="symbol">+</span><span class="normal"> </span><span class="number">3.8</span><span class="normal"> </span><span class="symbol">--&gt;</span>
1280
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">template</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"ExampleAppWindow"</span><span class="normal"> parent</span><span class="symbol">=</span><span class="string">"GtkApplicationWindow"</span><span class="symbol">&gt;</span>
1281
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"title"</span><span class="normal"> translatable</span><span class="symbol">=</span><span class="string">"yes"</span><span class="symbol">&gt;</span><span class="usertype">Example</span><span class="normal"> Application</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1282
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"default-width"</span><span class="symbol">&gt;</span><span class="number">600</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1283
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"default-height"</span><span class="symbol">&gt;</span><span class="number">400</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1284
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1285
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkBox"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"content_box"</span><span class="symbol">&gt;</span>
1286
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1287
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"orientation"</span><span class="symbol">&gt;</span><span class="normal">vertical</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1288
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1289
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkHeaderBar"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"header"</span><span class="symbol">&gt;</span>
1290
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1291
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">child</span><span class="normal"> type</span><span class="symbol">=</span><span class="string">"title"</span><span class="symbol">&gt;</span>
1292
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkStackSwitcher"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"tabs"</span><span class="symbol">&gt;</span>
1293
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1294
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"stack"</span><span class="symbol">&gt;</span><span class="normal">stack</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1295
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1296
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1297
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1298
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkToggleButton"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"search"</span><span class="symbol">&gt;</span>
1299
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1300
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"sensitive"</span><span class="symbol">&gt;</span><span class="normal">False</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1301
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1302
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkImage"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"search-icon"</span><span class="symbol">&gt;</span>
1303
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1304
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"icon-name"</span><span class="symbol">&gt;</span><span class="normal">edit</span><span class="symbol">-</span><span class="normal">find</span><span class="symbol">-</span><span class="normal">symbolic</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1305
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"icon-size"</span><span class="symbol">&gt;</span><span class="number">1</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1306
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1307
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1308
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1309
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">packing</span><span class="symbol">&gt;</span>
1310
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"pack-type"</span><span class="symbol">&gt;</span><span class="normal">end</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1311
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">packing</span><span class="symbol">&gt;</span>
1312
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1313
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1314
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1315
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1316
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkSearchBar"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"searchbar"</span><span class="symbol">&gt;</span>
1317
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1318
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1319
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkSearchEntry"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"searchentry"</span><span class="symbol">&gt;</span>
1320
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">signal</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"search-changed"</span><span class="normal"> handler</span><span class="symbol">=</span><span class="string">"search_text_changed"</span><span class="symbol">/&gt;</span>
1321
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1322
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1323
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1324
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1325
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1326
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1327
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkStack"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"stack"</span><span class="symbol">&gt;</span>
1328
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">signal</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"notify::visible-child"</span><span class="normal"> handler</span><span class="symbol">=</span><span class="string">"visible_child_changed"</span><span class="symbol">/&gt;</span>
1329
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1330
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1331
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1332
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1333
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1334
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">template</span><span class="symbol">&gt;</span>
1335
+ <span class="symbol">&lt;/</span><span class="normal">interface</span><span class="symbol">&gt;</span></pre></td>
1336
+ </tr>
1337
+ </tbody>
1338
+ </table>
1339
+ </div>
1340
+
1341
+ <p>Implementing the search needs quite a few code changes that
1342
+ we are not going to completely go over here. The central piece of
1343
+ the search implementation is a signal handler that listens for
1344
+ text changes in the search entry.</p>
1345
+ <div class="informalexample">
1346
+ <pre class="programlisting">
1347
+ ...
1348
+
1349
+ static void
1350
+ search_text_changed (GtkEntry *entry,
1351
+ ExampleAppWindow *win)
1352
+ {
1353
+ ExampleAppWindowPrivate *priv;
1354
+ const gchar *text;
1355
+ GtkWidget *tab;
1356
+ GtkWidget *view;
1357
+ GtkTextBuffer *buffer;
1358
+ GtkTextIter start, match_start, match_end;
1359
+
1360
+ text = gtk_entry_get_text (entry);
1361
+
1362
+ if (text[0] == '\0')
1363
+ return;
1364
+
1365
+ priv = example_app_window_get_instance_private (win);
1366
+
1367
+ tab = gtk_stack_get_visible_child (GTK_STACK (priv-&gt;stack));
1368
+ view = gtk_bin_get_child (GTK_BIN (tab));
1369
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
1370
+
1371
+ /* Very simple-minded search implementation */
1372
+ gtk_text_buffer_get_start_iter (buffer, &amp;start);
1373
+ if (gtk_text_iter_forward_search (&amp;start, text, GTK_TEXT_SEARCH_CASE_INSENSITIVE,
1374
+ &amp;match_start, &amp;match_end, NULL))
1375
+ {
1376
+ gtk_text_buffer_select_range (buffer, &amp;match_start, &amp;match_end);
1377
+ gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW (view), &amp;match_start,
1378
+ 0.0, FALSE, 0.0, 0.0);
1379
+ }
1380
+ }
1381
+
1382
+ static void
1383
+ example_app_window_init (ExampleAppWindow *win)
1384
+ {
1385
+
1386
+ ...
1387
+
1388
+ gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), search_text_changed);
1389
+
1390
+ ...
1391
+
1392
+ }
1393
+
1394
+ ...
1395
+ </pre>
1396
+ <p>(<a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/examples/application7/exampleappwin.c" target="_top">full source</a>)</p>
1397
+ </div>
1398
+ <p>With the search bar, our application now looks like this:</p>
1399
+ <div class="informalfigure"><div class="mediaobject"><img src="getting-started-app7.png"></div></div>
1400
+ </div>
1401
+ <div class="section">
1402
+ <div class="titlepage"><div><div><h3 class="title">
1403
+ <a name="id-1.2.3.7.11"></a>Adding a side bar</h3></div></div></div>
1404
+ <p>As another piece of functionality, we are adding a sidebar,
1405
+ which demonstrates <a class="link" href="GtkMenuButton.html" title="GtkMenuButton"><span class="type">GtkMenuButton</span></a>, <a class="link" href="GtkRevealer.html" title="GtkRevealer"><span class="type">GtkRevealer</span></a> and <a class="link" href="GtkListBox.html" title="GtkListBox"><span class="type">GtkListBox</span></a>.</p>
1406
+ <div class="informalexample">
1407
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1408
+ <tbody>
1409
+ <tr>
1410
+ <td class="listing_lines" align="right"><pre>1
1411
+ 2
1412
+ 3
1413
+ 4
1414
+ 5
1415
+ 6
1416
+ 7
1417
+ 8
1418
+ 9
1419
+ 10
1420
+ 11
1421
+ 12
1422
+ 13
1423
+ 14
1424
+ 15
1425
+ 16
1426
+ 17
1427
+ 18
1428
+ 19
1429
+ 20
1430
+ 21
1431
+ 22
1432
+ 23
1433
+ 24
1434
+ 25
1435
+ 26
1436
+ 27
1437
+ 28
1438
+ 29
1439
+ 30
1440
+ 31
1441
+ 32
1442
+ 33
1443
+ 34
1444
+ 35
1445
+ 36
1446
+ 37
1447
+ 38
1448
+ 39
1449
+ 40
1450
+ 41
1451
+ 42
1452
+ 43
1453
+ 44
1454
+ 45
1455
+ 46
1456
+ 47
1457
+ 48
1458
+ 49
1459
+ 50
1460
+ 51
1461
+ 52
1462
+ 53
1463
+ 54
1464
+ 55
1465
+ 56
1466
+ 57
1467
+ 58
1468
+ 59
1469
+ 60
1470
+ 61
1471
+ 62
1472
+ 63
1473
+ 64
1474
+ 65
1475
+ 66
1476
+ 67
1477
+ 68
1478
+ 69
1479
+ 70
1480
+ 71
1481
+ 72
1482
+ 73
1483
+ 74
1484
+ 75
1485
+ 76
1486
+ 77
1487
+ 78
1488
+ 79
1489
+ 80
1490
+ 81
1491
+ 82
1492
+ 83
1493
+ 84
1494
+ 85
1495
+ 86
1496
+ 87
1497
+ 88
1498
+ 89
1499
+ 90
1500
+ 91
1501
+ 92
1502
+ 93
1503
+ 94
1504
+ 95
1505
+ 96
1506
+ 97
1507
+ 98</pre></td>
1508
+ <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;?</span><span class="usertype">xml</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="normal"> encoding</span><span class="symbol">=</span><span class="string">"UTF-8"</span><span class="symbol">?&gt;</span>
1509
+ <span class="symbol">&lt;</span><span class="normal">interface</span><span class="symbol">&gt;</span>
1510
+ <span class="normal"> </span><span class="symbol">&lt;!--</span><span class="normal"> interface</span><span class="symbol">-</span><span class="usertype">requires</span><span class="normal"> gtk</span><span class="symbol">+</span><span class="normal"> </span><span class="number">3.8</span><span class="normal"> </span><span class="symbol">--&gt;</span>
1511
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">template</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"ExampleAppWindow"</span><span class="normal"> parent</span><span class="symbol">=</span><span class="string">"GtkApplicationWindow"</span><span class="symbol">&gt;</span>
1512
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"title"</span><span class="normal"> translatable</span><span class="symbol">=</span><span class="string">"yes"</span><span class="symbol">&gt;</span><span class="usertype">Example</span><span class="normal"> Application</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1513
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"default-width"</span><span class="symbol">&gt;</span><span class="number">600</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1514
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"default-height"</span><span class="symbol">&gt;</span><span class="number">400</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1515
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1516
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkBox"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"content_box"</span><span class="symbol">&gt;</span>
1517
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1518
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"orientation"</span><span class="symbol">&gt;</span><span class="normal">vertical</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1519
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1520
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkHeaderBar"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"header"</span><span class="symbol">&gt;</span>
1521
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1522
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">child</span><span class="normal"> type</span><span class="symbol">=</span><span class="string">"title"</span><span class="symbol">&gt;</span>
1523
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkStackSwitcher"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"tabs"</span><span class="symbol">&gt;</span>
1524
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1525
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"stack"</span><span class="symbol">&gt;</span><span class="normal">stack</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1526
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1527
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1528
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1529
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkToggleButton"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"search"</span><span class="symbol">&gt;</span>
1530
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1531
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"sensitive"</span><span class="symbol">&gt;</span><span class="normal">False</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1532
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1533
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkImage"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"search-icon"</span><span class="symbol">&gt;</span>
1534
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1535
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"icon-name"</span><span class="symbol">&gt;</span><span class="normal">edit</span><span class="symbol">-</span><span class="normal">find</span><span class="symbol">-</span><span class="normal">symbolic</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1536
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"icon-size"</span><span class="symbol">&gt;</span><span class="number">1</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1537
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1538
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1539
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1540
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">packing</span><span class="symbol">&gt;</span>
1541
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"pack-type"</span><span class="symbol">&gt;</span><span class="normal">end</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1542
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">packing</span><span class="symbol">&gt;</span>
1543
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1544
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1545
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkMenuButton"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"gears"</span><span class="symbol">&gt;</span>
1546
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1547
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1548
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkImage"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"gears-icon"</span><span class="symbol">&gt;</span>
1549
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1550
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"icon-name"</span><span class="symbol">&gt;</span><span class="normal">emblem</span><span class="symbol">-</span><span class="normal">system</span><span class="symbol">-</span><span class="normal">symbolic</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1551
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"icon-size"</span><span class="symbol">&gt;</span><span class="number">1</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1552
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1553
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1554
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1555
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">packing</span><span class="symbol">&gt;</span>
1556
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"pack-type"</span><span class="symbol">&gt;</span><span class="normal">end</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1557
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">packing</span><span class="symbol">&gt;</span>
1558
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1559
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1560
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1561
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1562
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkSearchBar"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"searchbar"</span><span class="symbol">&gt;</span>
1563
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1564
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1565
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkSearchEntry"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"searchentry"</span><span class="symbol">&gt;</span>
1566
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">signal</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"search-changed"</span><span class="normal"> handler</span><span class="symbol">=</span><span class="string">"search_text_changed"</span><span class="symbol">/&gt;</span>
1567
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1568
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1569
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1570
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1571
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1572
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1573
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkBox"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"hbox"</span><span class="symbol">&gt;</span>
1574
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1575
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1576
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkRevealer"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"sidebar"</span><span class="symbol">&gt;</span>
1577
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1578
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"transition-type"</span><span class="symbol">&gt;</span><span class="normal">slide</span><span class="symbol">-</span><span class="normal">right</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1579
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1580
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkScrolledWindow"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"sidebar-sw"</span><span class="symbol">&gt;</span>
1581
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1582
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"hscrollbar-policy"</span><span class="symbol">&gt;</span><span class="normal">never</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1583
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"vscrollbar-policy"</span><span class="symbol">&gt;</span><span class="normal">automatic</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1584
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1585
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkListBox"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"words"</span><span class="symbol">&gt;</span>
1586
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1587
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"selection-mode"</span><span class="symbol">&gt;</span><span class="normal">none</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1588
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1589
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1590
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1591
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1592
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1593
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1594
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
1595
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkStack"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"stack"</span><span class="symbol">&gt;</span>
1596
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">signal</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"notify::visible-child"</span><span class="normal"> handler</span><span class="symbol">=</span><span class="string">"visible_child_changed"</span><span class="symbol">/&gt;</span>
1597
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"visible"</span><span class="symbol">&gt;</span><span class="normal">True</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
1598
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1599
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1600
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1601
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1602
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
1603
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
1604
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">template</span><span class="symbol">&gt;</span>
1605
+ <span class="symbol">&lt;/</span><span class="normal">interface</span><span class="symbol">&gt;</span></pre></td>
1606
+ </tr>
1607
+ </tbody>
1608
+ </table>
1609
+ </div>
1610
+
1611
+ <p>The code to populate the sidebar with buttons for the words
1612
+ found in each file is a little too involved to go into here. But we'll
1613
+ look at the code to add the gears menu.</p>
1614
+ <p>As expected by now, the gears menu is specified in a GtkBuilder
1615
+ ui file.</p>
1616
+ <div class="informalexample">
1617
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1618
+ <tbody>
1619
+ <tr>
1620
+ <td class="listing_lines" align="right"><pre>1
1621
+ 2
1622
+ 3
1623
+ 4
1624
+ 5
1625
+ 6
1626
+ 7
1627
+ 8
1628
+ 9
1629
+ 10
1630
+ 11
1631
+ 12</pre></td>
1632
+ <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;?</span><span class="usertype">xml</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="symbol">?&gt;</span>
1633
+ <span class="symbol">&lt;</span><span class="normal">interface</span><span class="symbol">&gt;</span>
1634
+ <span class="normal"> </span><span class="symbol">&lt;!--</span><span class="normal"> interface</span><span class="symbol">-</span><span class="usertype">requires</span><span class="normal"> gtk</span><span class="symbol">+</span><span class="normal"> </span><span class="number">3.0</span><span class="normal"> </span><span class="symbol">--&gt;</span>
1635
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">menu</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"menu"</span><span class="symbol">&gt;</span>
1636
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">section</span><span class="symbol">&gt;</span>
1637
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">item</span><span class="symbol">&gt;</span>
1638
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">attribute</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"label"</span><span class="normal"> translatable</span><span class="symbol">=</span><span class="string">"yes"</span><span class="symbol">&gt;</span><span class="normal">_Words</span><span class="symbol">&lt;/</span><span class="normal">attribute</span><span class="symbol">&gt;</span>
1639
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">attribute</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"action"</span><span class="symbol">&gt;</span><span class="normal">win</span><span class="symbol">.</span><span class="normal">show</span><span class="symbol">-</span><span class="normal">words</span><span class="symbol">&lt;/</span><span class="normal">attribute</span><span class="symbol">&gt;</span>
1640
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">item</span><span class="symbol">&gt;</span>
1641
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">section</span><span class="symbol">&gt;</span>
1642
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">menu</span><span class="symbol">&gt;</span>
1643
+ <span class="symbol">&lt;/</span><span class="normal">interface</span><span class="symbol">&gt;</span></pre></td>
1644
+ </tr>
1645
+ </tbody>
1646
+ </table>
1647
+ </div>
1648
+
1649
+ <p>To connect the menuitem to the show-words setting,
1650
+ we use a <span class="type">GSettingsAction</span>.</p>
1651
+ <div class="informalexample">
1652
+ <pre class="programlisting">
1653
+ ...
1654
+
1655
+ static void
1656
+ example_app_window_init (ExampleAppWindow *win)
1657
+ {
1658
+
1659
+ ...
1660
+
1661
+ builder = gtk_builder_new_from_resource ("/org/gtk/exampleapp/gears-menu.ui");
1662
+ menu = G_MENU_MODEL (gtk_builder_get_object (builder, "menu"));
1663
+ gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (priv-&gt;gears), menu);
1664
+ g_object_unref (builder);
1665
+
1666
+ action = g_settings_create_action (priv-&gt;settings, "show-words");
1667
+ g_action_map_add_action (G_ACTION_MAP (win), action);
1668
+ g_object_unref (action);
1669
+ }
1670
+
1671
+ ...
1672
+ </pre>
1673
+ <p>(<a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/examples/application8/exampleappwin.c" target="_top">full source</a>)</p>
1674
+ </div>
1675
+ <p>What our application looks like now:</p>
1676
+ <div class="informalfigure"><div class="mediaobject"><img src="getting-started-app8.png"></div></div>
1677
+ </div>
1678
+ <div class="section">
1679
+ <div class="titlepage"><div><div><h3 class="title">
1680
+ <a name="id-1.2.3.7.12"></a>Properties</h3></div></div></div>
1681
+ <p>Widgets and other objects have many useful properties.</p>
1682
+ <p>Here we show some ways to use them in new and flexible ways,
1683
+ by wrapping them in actions with <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gio/gio-GPropertyAction.html#GPropertyAction"><span class="type">GPropertyAction</span></a> or by binding them
1684
+ with <a href="/home/kou/work/ruby/ruby-gnome2.win32/glib2/vendor/local/share/gtk-doc/html/gobject/GBinding.html"><span class="type">GBinding</span></a>.</p>
1685
+ <p>To set this up, we add two labels to the header bar in our
1686
+ window template, named <em class="parameter"><code>lines_label</code></em> and <em class="parameter"><code>lines</code></em>, and bind them to
1687
+ struct members in the private struct, as we've seen a couple of times
1688
+ by now.</p>
1689
+ <p>We add a new "Lines" menu item to the gears menu, which
1690
+ triggers the show-lines action:</p>
1691
+ <div class="informalexample">
1692
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1693
+ <tbody>
1694
+ <tr>
1695
+ <td class="listing_lines" align="right"><pre>1
1696
+ 2
1697
+ 3
1698
+ 4
1699
+ 5
1700
+ 6
1701
+ 7
1702
+ 8
1703
+ 9
1704
+ 10
1705
+ 11
1706
+ 12
1707
+ 13
1708
+ 14
1709
+ 15
1710
+ 16</pre></td>
1711
+ <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;?</span><span class="usertype">xml</span><span class="normal"> version</span><span class="symbol">=</span><span class="string">"1.0"</span><span class="symbol">?&gt;</span>
1712
+ <span class="symbol">&lt;</span><span class="normal">interface</span><span class="symbol">&gt;</span>
1713
+ <span class="normal"> </span><span class="symbol">&lt;!--</span><span class="normal"> interface</span><span class="symbol">-</span><span class="usertype">requires</span><span class="normal"> gtk</span><span class="symbol">+</span><span class="normal"> </span><span class="number">3.0</span><span class="normal"> </span><span class="symbol">--&gt;</span>
1714
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">menu</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"menu"</span><span class="symbol">&gt;</span>
1715
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">section</span><span class="symbol">&gt;</span>
1716
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">item</span><span class="symbol">&gt;</span>
1717
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">attribute</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"label"</span><span class="normal"> translatable</span><span class="symbol">=</span><span class="string">"yes"</span><span class="symbol">&gt;</span><span class="normal">_Words</span><span class="symbol">&lt;/</span><span class="normal">attribute</span><span class="symbol">&gt;</span>
1718
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">attribute</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"action"</span><span class="symbol">&gt;</span><span class="normal">win</span><span class="symbol">.</span><span class="normal">show</span><span class="symbol">-</span><span class="normal">words</span><span class="symbol">&lt;/</span><span class="normal">attribute</span><span class="symbol">&gt;</span>
1719
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">item</span><span class="symbol">&gt;</span>
1720
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="normal">item</span><span class="symbol">&gt;</span>
1721
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">attribute</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"label"</span><span class="normal"> translatable</span><span class="symbol">=</span><span class="string">"yes"</span><span class="symbol">&gt;</span><span class="normal">_Lines</span><span class="symbol">&lt;/</span><span class="normal">attribute</span><span class="symbol">&gt;</span>
1722
+ <span class="normal"> </span><span class="symbol">&lt;</span><span class="usertype">attribute</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"action"</span><span class="symbol">&gt;</span><span class="normal">win</span><span class="symbol">.</span><span class="normal">show</span><span class="symbol">-</span><span class="normal">lines</span><span class="symbol">&lt;/</span><span class="normal">attribute</span><span class="symbol">&gt;</span>
1723
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">item</span><span class="symbol">&gt;</span>
1724
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">section</span><span class="symbol">&gt;</span>
1725
+ <span class="normal"> </span><span class="symbol">&lt;/</span><span class="normal">menu</span><span class="symbol">&gt;</span>
1726
+ <span class="symbol">&lt;/</span><span class="normal">interface</span><span class="symbol">&gt;</span></pre></td>
1727
+ </tr>
1728
+ </tbody>
1729
+ </table>
1730
+ </div>
1731
+
1732
+ <p>To make this menu item do something, we create a property
1733
+ action for the visible property of the <em class="parameter"><code>lines</code></em> label, and add it to the
1734
+ actions of the window. The effect of this is that the visibility
1735
+ of the label gets toggled every time the action is activated.</p>
1736
+ <p>Since we want both labels to appear and disappear together,
1737
+ we bind the visible property of the <em class="parameter"><code>lines_label</code></em> widget to the
1738
+ same property of the <em class="parameter"><code>lines</code></em> widget.</p>
1739
+ <div class="informalexample">
1740
+ <pre class="programlisting">
1741
+ ...
1742
+
1743
+ static void
1744
+ example_app_window_init (ExampleAppWindow *win)
1745
+ {
1746
+ ...
1747
+
1748
+ action = (GAction*) g_property_action_new ("show-lines", priv-&gt;lines, "visible");
1749
+ g_action_map_add_action (G_ACTION_MAP (win), action);
1750
+ g_object_unref (action);
1751
+
1752
+ g_object_bind_property (priv-&gt;lines, "visible",
1753
+ priv-&gt;lines_label, "visible",
1754
+ G_BINDING_DEFAULT);
1755
+ }
1756
+
1757
+ ...
1758
+ </pre>
1759
+ <p>(<a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/examples/application9/exampleappwin.c" target="_top">full source</a>)</p>
1760
+ </div>
1761
+ <p>We also need a function that counts the lines of the currently
1762
+ active tab, and updates the <em class="parameter"><code>lines</code></em> label. See the
1763
+ <a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/examples/application9/exampleappwin.c" target="_top">full source</a>
1764
+ if you are interested in the details.</p>
1765
+ <p>This brings our example application to its final appearance:</p>
1766
+ <div class="informalfigure"><div class="mediaobject"><img src="getting-started-app9.png"></div></div>
1767
+ </div>
1768
+ </div>
1769
+ <div class="footer">
1770
+ <hr>
1771
+ Generated by GTK-Doc V1.19.1</div>
1772
+ </body>
1773
+ </html>