gtk3 2.2.5-x86-mingw32 → 3.0.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (582) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -0
  3. data/ext/gtk3/depend +0 -5
  4. data/ext/gtk3/extconf.rb +43 -53
  5. data/ext/gtk3/rb-gtk3-container.c +159 -0
  6. data/ext/gtk3/{rbgtk3util.h → rb-gtk3-private.h} +9 -9
  7. data/ext/gtk3/rb-gtk3-widget.c +71 -0
  8. data/ext/gtk3/rb-gtk3.c +407 -0
  9. data/ext/gtk3/{rbgtk-orientable.c → rb-gtk3.h} +10 -7
  10. data/extconf.rb +25 -9
  11. data/lib/2.0/gtk3.so +0 -0
  12. data/lib/2.1/gtk3.so +0 -0
  13. data/lib/2.2/gtk3.so +0 -0
  14. data/lib/gtk3.rb +70 -9
  15. data/lib/gtk3/about-dialog.rb +34 -0
  16. data/lib/gtk3/action-group.rb +131 -0
  17. data/lib/gtk3/action.rb +27 -0
  18. data/lib/gtk3/binding-set.rb +31 -0
  19. data/lib/gtk3/border.rb +28 -0
  20. data/lib/gtk3/box.rb +40 -0
  21. data/lib/gtk3/builder.rb +91 -0
  22. data/lib/gtk3/button.rb +53 -0
  23. data/lib/gtk3/calendar.rb +24 -0
  24. data/lib/gtk3/cell-layout.rb +31 -0
  25. data/{test/test_gtk_accel_group_entry.rb → lib/gtk3/clipboard.rb} +8 -7
  26. data/lib/gtk3/color-chooser-dialog.rb +27 -0
  27. data/lib/gtk3/combo-box-text.rb +30 -0
  28. data/lib/gtk3/combo-box.rb +55 -0
  29. data/lib/gtk3/container.rb +51 -0
  30. data/lib/gtk3/css-provider.rb +38 -0
  31. data/lib/gtk3/deprecated.rb +193 -99
  32. data/lib/gtk3/dialog.rb +65 -0
  33. data/lib/gtk3/file-chooser-dialog.rb +36 -0
  34. data/lib/gtk3/font-chooser-dialog.rb +27 -0
  35. data/lib/gtk3/gdk-drag-context.rb +29 -0
  36. data/lib/gtk3/gesture-multi-press.rb +31 -0
  37. data/lib/gtk3/icon-theme.rb +28 -0
  38. data/lib/gtk3/icon-view.rb +45 -0
  39. data/lib/gtk3/image.rb +113 -0
  40. data/lib/gtk3/label.rb +54 -0
  41. data/{test/test_gtk_tree_selection.rb → lib/gtk3/level-bar.rb} +13 -12
  42. data/lib/gtk3/list-store.rb +81 -0
  43. data/lib/gtk3/loader.rb +403 -0
  44. data/lib/gtk3/menu-item.rb +33 -0
  45. data/lib/gtk3/message-dialog.rb +49 -0
  46. data/lib/gtk3/paned.rb +37 -0
  47. data/lib/gtk3/radio-action.rb +28 -0
  48. data/lib/gtk3/radio-button.rb +49 -0
  49. data/lib/gtk3/recent-chooser-dialog.rb +38 -0
  50. data/lib/gtk3/scale-button.rb +35 -0
  51. data/{test/test_gtk_allocation.rb → lib/gtk3/scrolled-window.rb} +7 -7
  52. data/lib/gtk3/search-bar.rb +27 -0
  53. data/lib/gtk3/selection-data.rb +42 -0
  54. data/lib/gtk3/spin-button.rb +34 -0
  55. data/lib/gtk3/stack.rb +54 -0
  56. data/lib/gtk3/stock.rb +70 -0
  57. data/lib/gtk3/style-context.rb +26 -0
  58. data/lib/gtk3/style-properties.rb +29 -0
  59. data/lib/gtk3/target-entry.rb +27 -0
  60. data/lib/gtk3/target-list.rb +31 -0
  61. data/lib/gtk3/text-buffer.rb +165 -0
  62. data/lib/gtk3/text-iter.rb +39 -0
  63. data/lib/gtk3/text-tag-table.rb +31 -0
  64. data/lib/gtk3/toggle-action.rb +27 -0
  65. data/lib/gtk3/toggle-button.rb +35 -0
  66. data/lib/gtk3/tool-button.rb +36 -0
  67. data/lib/gtk3/tree-iter.rb +52 -0
  68. data/lib/gtk3/tree-model-filter.rb +45 -0
  69. data/lib/gtk3/tree-model.rb +51 -0
  70. data/lib/gtk3/tree-path.rb +29 -0
  71. data/lib/gtk3/tree-selection.rb +30 -0
  72. data/lib/gtk3/tree-store.rb +59 -0
  73. data/lib/gtk3/tree-view-column.rb +35 -0
  74. data/lib/gtk3/tree-view.rb +41 -0
  75. data/lib/gtk3/ui-manager.rb +35 -0
  76. data/lib/gtk3/version.rb +28 -0
  77. data/lib/gtk3/widget.rb +127 -0
  78. data/lib/gtk3/window.rb +29 -0
  79. data/sample/gtk-demo/TODO +69 -0
  80. data/sample/gtk-demo/application.ui +107 -0
  81. data/sample/gtk-demo/builder.rb +2 -2
  82. data/sample/gtk-demo/{button_box.rb → button-box.rb} +16 -17
  83. data/sample/gtk-demo/common.rb +1 -1
  84. data/sample/gtk-demo/css_accordion.rb +5 -5
  85. data/sample/gtk-demo/css_basics.css +22 -0
  86. data/sample/gtk-demo/css_basics.rb +103 -0
  87. data/sample/gtk-demo/dialog.rb +3 -3
  88. data/sample/gtk-demo/entry_completion.rb +1 -1
  89. data/sample/gtk-demo/hypertext.rb +1 -1
  90. data/sample/gtk-demo/main.rb +65 -91
  91. data/sample/gtk-demo/menus.rb +4 -4
  92. data/sample/gtk-demo/menus.ui +107 -0
  93. data/sample/gtk-demo/sizegroup.rb +1 -1
  94. data/sample/misc/aboutdialog.rb +10 -18
  95. data/sample/misc/aboutdialog2.rb +4 -16
  96. data/sample/misc/alpha-demo.rb +17 -16
  97. data/sample/misc/application.rb +31 -0
  98. data/sample/misc/assistant.rb +3 -5
  99. data/sample/misc/bindings.rb +64 -50
  100. data/sample/misc/builder-from-resource.rb +53 -0
  101. data/sample/misc/builder.rb +29 -0
  102. data/sample/misc/builder.ui +46 -0
  103. data/sample/misc/button.rb +18 -19
  104. data/sample/misc/button2.rb +5 -5
  105. data/sample/misc/buttonbox.rb +2 -4
  106. data/sample/misc/cairo-cursor.rb +37 -0
  107. data/sample/misc/cairo-pong.rb +17 -17
  108. data/sample/misc/calendar.rb +18 -18
  109. data/sample/misc/checkbutton.rb +3 -4
  110. data/sample/misc/colorselection.rb +10 -9
  111. data/sample/misc/{combo_check.rb → combo-check.rb} +1 -3
  112. data/sample/misc/combobox-from-cellrender.rb +48 -0
  113. data/sample/misc/combobox.rb +10 -10
  114. data/sample/misc/cursor.rb +5 -5
  115. data/sample/misc/dialog.rb +3 -4
  116. data/sample/misc/dialog2.rb +5 -6
  117. data/sample/misc/dnd.rb +27 -23
  118. data/sample/misc/dndtreeview.rb +16 -18
  119. data/sample/misc/drag-move.rb +3 -6
  120. data/sample/misc/drawing.rb +74 -86
  121. data/sample/misc/entry.rb +2 -4
  122. data/sample/misc/entrycompletion.rb +5 -5
  123. data/sample/misc/eventbox.rb +58 -0
  124. data/sample/misc/expander.rb +6 -5
  125. data/sample/misc/filechooser.rb +5 -7
  126. data/sample/misc/flowbox.rb +86 -0
  127. data/sample/misc/frame.rb +10 -12
  128. data/sample/misc/gdkscreen.rb +3 -3
  129. data/sample/misc/gtkglarea1.rb +114 -0
  130. data/sample/misc/gtkglarea2.rb +194 -0
  131. data/sample/misc/helloworld.rb +2 -5
  132. data/sample/misc/iconview.rb +9 -9
  133. data/sample/misc/image.rb +7 -6
  134. data/sample/misc/keyboard-grab.rb +34 -0
  135. data/sample/misc/label.rb +10 -11
  136. data/sample/misc/linkbutton.rb +3 -10
  137. data/sample/misc/list-store-usage.rb +96 -0
  138. data/sample/misc/listview.rb +9 -11
  139. data/sample/misc/menu.rb +45 -25
  140. data/sample/misc/{misc_button.rb → misc-button.rb} +15 -14
  141. data/sample/misc/mouse-gesture.rb +35 -42
  142. data/sample/misc/pango-layout.rb +100 -0
  143. data/sample/misc/pointer-grab.rb +36 -0
  144. data/sample/misc/print.rb +202 -201
  145. data/sample/misc/properties.rb +16 -14
  146. data/sample/misc/radiobutton.rb +18 -20
  147. data/sample/misc/recentchooserdialog.rb +8 -10
  148. data/sample/misc/rgtk+cairo.rb +26 -27
  149. data/sample/misc/scalebutton.rb +19 -7
  150. data/sample/misc/simple_window.gresource.xml +6 -0
  151. data/sample/misc/simple_window.ui +16 -0
  152. data/sample/misc/statusicon.rb +11 -14
  153. data/sample/misc/stock.rb +14 -11
  154. data/sample/misc/style-property.rb +76 -0
  155. data/sample/misc/t-gtkplug.rb +11 -14
  156. data/sample/misc/t-gtksocket.rb +19 -18
  157. data/sample/misc/template-from-resource.rb +59 -0
  158. data/sample/misc/template.gresource.xml +6 -0
  159. data/sample/misc/template.ui +16 -0
  160. data/sample/misc/textbuffer-serialize.rb +133 -0
  161. data/sample/misc/threads.rb +54 -13
  162. data/sample/misc/to-drawable.rb +34 -0
  163. data/sample/misc/togglebutton.rb +6 -8
  164. data/sample/misc/toolbar.rb +39 -30
  165. data/sample/misc/tooltips.rb +95 -104
  166. data/sample/misc/{tree_combo.rb → tree-combo.rb} +21 -27
  167. data/sample/misc/{tree_progress.rb → tree-progress.rb} +12 -17
  168. data/sample/misc/treemodelfilter.rb +13 -10
  169. data/sample/misc/treeview.rb +18 -20
  170. data/sample/misc/window.rb +2 -4
  171. data/sample/misc/xbm-cursor.rb +86 -0
  172. data/sample/tutorial/README.md +338 -0
  173. data/sample/tutorial/builder.ui +66 -0
  174. data/sample/tutorial/example-0.rb +32 -0
  175. data/sample/tutorial/example-1.rb +47 -0
  176. data/sample/tutorial/example-2.rb +68 -0
  177. data/sample/tutorial/example-4.rb +41 -0
  178. data/sample/tutorial/exampleapp.desktop +6 -0
  179. data/sample/tutorial/exampleapp.png +0 -0
  180. data/sample/tutorial/exampleapp1/exampleapp.rb +57 -0
  181. data/sample/tutorial/exampleapp2/exampleapp.gresource.xml +6 -0
  182. data/sample/tutorial/exampleapp2/exampleapp.rb +87 -0
  183. data/sample/tutorial/exampleapp2/window.ui +32 -0
  184. data/sample/tutorial/exampleapp3/exampleapp.gresource.xml +6 -0
  185. data/sample/tutorial/exampleapp3/exampleapp.rb +106 -0
  186. data/sample/tutorial/exampleapp3/window.ui +32 -0
  187. data/sample/tutorial/exampleapp4/app-menu.ui +18 -0
  188. data/sample/tutorial/exampleapp4/exampleapp.gresource.xml +7 -0
  189. data/sample/tutorial/exampleapp4/exampleapp.rb +124 -0
  190. data/sample/tutorial/exampleapp4/window.ui +32 -0
  191. data/sample/tutorial/exampleapp5/app-menu.ui +18 -0
  192. data/sample/tutorial/exampleapp5/exampleapp.gresource.xml +7 -0
  193. data/sample/tutorial/exampleapp5/exampleapp.rb +135 -0
  194. data/sample/tutorial/exampleapp5/org.gtk.exampleapp.gschema.xml +20 -0
  195. data/sample/tutorial/exampleapp5/window.ui +32 -0
  196. data/sample/tutorial/exampleapp6/app-menu.ui +18 -0
  197. data/sample/tutorial/exampleapp6/exampleapp.gresource.xml +8 -0
  198. data/sample/tutorial/exampleapp6/exampleapp.rb +168 -0
  199. data/sample/tutorial/exampleapp6/org.gtk.exampleapp.gschema.xml +20 -0
  200. data/sample/tutorial/exampleapp6/prefs.ui +70 -0
  201. data/sample/tutorial/exampleapp6/window.ui +32 -0
  202. data/sample/tutorial/exampleapp7/app-menu.ui +18 -0
  203. data/sample/tutorial/exampleapp7/exampleapp.gresource.xml +8 -0
  204. data/sample/tutorial/exampleapp7/exampleapp.rb +200 -0
  205. data/sample/tutorial/exampleapp7/org.gtk.exampleapp.gschema.xml +20 -0
  206. data/sample/tutorial/exampleapp7/prefs.ui +70 -0
  207. data/sample/tutorial/exampleapp7/window.ui +63 -0
  208. data/sample/tutorial/exampleapp8/app-menu.ui +18 -0
  209. data/sample/tutorial/exampleapp8/exampleapp.gresource.xml +9 -0
  210. data/sample/tutorial/exampleapp8/exampleapp.rb +247 -0
  211. data/sample/tutorial/exampleapp8/gears-menu.ui +12 -0
  212. data/sample/tutorial/exampleapp8/org.gtk.exampleapp.gschema.xml +25 -0
  213. data/sample/tutorial/exampleapp8/prefs.ui +70 -0
  214. data/sample/tutorial/exampleapp8/window.ui +100 -0
  215. data/test/fixture/Rakefile +32 -0
  216. data/test/fixture/gnome-logo-icon.png +0 -0
  217. data/test/fixture/image.gresource +0 -0
  218. data/test/fixture/image.gresource.xml +6 -0
  219. data/test/fixture/simple_window.gresource.xml +6 -0
  220. data/test/fixture/simple_window.ui +16 -0
  221. data/test/gtk-test-utils.rb +46 -4
  222. data/test/run-test.rb +9 -1
  223. data/test/{test_gc.rb → test-gc.rb} +0 -0
  224. data/test/{test_gtk_css_provider.rb → test-gdk-display.rb} +6 -8
  225. data/test/test-gdk-event.rb +24 -0
  226. data/test/test-gdk-screen.rb +42 -0
  227. data/test/{test_gtk_about_dialog.rb → test-gtk-about-dialog.rb} +0 -0
  228. data/test/test-gtk-accel-group.rb +23 -0
  229. data/test/{test_gtk_accel_key.rb → test-gtk-accel-key.rb} +0 -0
  230. data/test/{test_gtk_accessible.rb → test-gtk-accessible.rb} +0 -0
  231. data/test/{test_gtk_action_group.rb → test-gtk-action-bar.rb} +20 -23
  232. data/test/test-gtk-action-group.rb +48 -0
  233. data/test/test-gtk-action.rb +41 -0
  234. data/test/test-gtk-assistant.rb +44 -0
  235. data/test/{test_gtk_border.rb → test-gtk-border.rb} +0 -0
  236. data/test/test-gtk-box.rb +28 -0
  237. data/test/{test_gtk_buildable.rb → test-gtk-buildable.rb} +6 -6
  238. data/test/{test_gtk_builder.rb → test-gtk-builder.rb} +45 -11
  239. data/test/test-gtk-button.rb +54 -0
  240. data/test/test-gtk-cell-layout.rb +35 -0
  241. data/test/test-gtk-color-chooser-dialog.rb +41 -0
  242. data/test/test-gtk-combo-box-text.rb +34 -0
  243. data/test/test-gtk-combo-box.rb +97 -0
  244. data/test/test-gtk-container.rb +171 -0
  245. data/test/test-gtk-css-provider.rb +101 -0
  246. data/test/test-gtk-dialog.rb +74 -0
  247. data/test/{test_gtk_entry.rb → test-gtk-entry.rb} +0 -0
  248. data/test/test-gtk-event-controller.rb +35 -0
  249. data/test/test-gtk-file-chooser-dialog.rb +52 -0
  250. data/test/test-gtk-flow-box.rb +64 -0
  251. data/test/test-gtk-font-chooser-dialog.rb +41 -0
  252. data/test/test-gtk-gesture-multi-press.rb +31 -0
  253. data/test/test-gtk-gesture-pan.rb +32 -0
  254. data/test/test-gtk-gesture-single.rb +40 -0
  255. data/test/test-gtk-gesture.rb +29 -0
  256. data/test/{test_gtk_header_bar.rb → test-gtk-header-bar.rb} +15 -1
  257. data/test/{test_gtk_icon_theme.rb → test-gtk-icon-theme.rb} +0 -0
  258. data/test/{test_gtk_icon_view.rb → test-gtk-icon-view.rb} +24 -3
  259. data/test/test-gtk-image.rb +52 -0
  260. data/test/test-gtk-label.rb +39 -0
  261. data/test/{test_gtk_level_bar.rb → test-gtk-level-bar.rb} +12 -0
  262. data/test/test-gtk-list-store.rb +204 -0
  263. data/test/{test_gtk_menu_button.rb → test-gtk-menu-button.rb} +0 -0
  264. data/test/{test_gtk_menu_item.rb → test-gtk-menu-item.rb} +0 -0
  265. data/test/test-gtk-message-dialog.rb +62 -0
  266. data/test/test-gtk-paned.rb +109 -0
  267. data/test/test-gtk-places-sidebar.rb +68 -0
  268. data/test/test-gtk-radio-action.rb +45 -0
  269. data/test/test-gtk-radio-button.rb +82 -0
  270. data/test/test-gtk-recent-chooser-dialog.rb +53 -0
  271. data/test/{test_gtk_recent_data.rb → test-gtk-recent-data.rb} +0 -0
  272. data/test/{test_gtk_recent_filter_info.rb → test-gtk-recent-filter-info.rb} +1 -1
  273. data/test/test-gtk-recent-info.rb +37 -0
  274. data/test/{test_gtk_revealer.rb → test-gtk-revealer.rb} +0 -0
  275. data/test/test-gtk-scale-button.rb +56 -0
  276. data/test/{test_gtk_search_bar.rb → test-gtk-search-bar.rb} +1 -1
  277. data/test/{test_gtk_search_entry.rb → test-gtk-search-entry.rb} +0 -0
  278. data/test/test-gtk-spin-button.rb +45 -0
  279. data/test/{test_gtk_stack_switcher.rb → test-gtk-stack-switcher.rb} +0 -0
  280. data/test/{test_gtk_stack.rb → test-gtk-stack.rb} +8 -1
  281. data/test/test-gtk-stock.rb +26 -0
  282. data/test/{test_gtk_style_context.rb → test-gtk-style-context.rb} +0 -0
  283. data/test/{test_gtk_style_properties.rb → test-gtk-style-properties.rb} +0 -0
  284. data/test/test-gtk-style-provider.rb +25 -0
  285. data/test/test-gtk-switch.rb +34 -0
  286. data/test/test-gtk-target-entry.rb +37 -0
  287. data/test/test-gtk-text-buffer.rb +151 -0
  288. data/test/{test_gtk_container.rb → test-gtk-text-tag-table.rb} +13 -11
  289. data/test/test-gtk-toggle-action.rb +41 -0
  290. data/test/test-gtk-toggle-button.rb +39 -0
  291. data/test/test-gtk-tool-button.rb +53 -0
  292. data/test/test-gtk-tree-iter.rb +53 -0
  293. data/test/test-gtk-tree-model-filter.rb +55 -0
  294. data/test/test-gtk-tree-path.rb +42 -0
  295. data/test/test-gtk-tree-selection.rb +61 -0
  296. data/test/test-gtk-tree-view-column.rb +71 -0
  297. data/test/test-gtk-tree-view.rb +105 -0
  298. data/test/test-gtk-version.rb +47 -0
  299. data/test/test-gtk-widget.rb +148 -0
  300. data/test/{test_gtk.rb → test-gtk.rb} +0 -0
  301. metadata +256 -332
  302. data/ext/gtk3/conversions.c +0 -34
  303. data/ext/gtk3/gtk3.def +0 -10
  304. data/ext/gtk3/init.c +0 -34
  305. data/ext/gtk3/rbgtk-about-dialog.c +0 -113
  306. data/ext/gtk3/rbgtk-accel-group-entry.c +0 -94
  307. data/ext/gtk3/rbgtk-accel-group.c +0 -199
  308. data/ext/gtk3/rbgtk-accel-key.c +0 -120
  309. data/ext/gtk3/rbgtk-accel-label.c +0 -55
  310. data/ext/gtk3/rbgtk-accel-map.c +0 -135
  311. data/ext/gtk3/rbgtk-accelerator.c +0 -78
  312. data/ext/gtk3/rbgtk-accessible.c +0 -40
  313. data/ext/gtk3/rbgtk-action-bar.c +0 -73
  314. data/ext/gtk3/rbgtk-action-group.c +0 -467
  315. data/ext/gtk3/rbgtk-action.c +0 -205
  316. data/ext/gtk3/rbgtk-activatable.c +0 -30
  317. data/ext/gtk3/rbgtk-adjustment.c +0 -98
  318. data/ext/gtk3/rbgtk-alignment.c +0 -75
  319. data/ext/gtk3/rbgtk-allocation.c +0 -166
  320. data/ext/gtk3/rbgtk-app-chooser-button.c +0 -70
  321. data/ext/gtk3/rbgtk-app-chooser-dialog.c +0 -68
  322. data/ext/gtk3/rbgtk-app-chooser-widget.c +0 -40
  323. data/ext/gtk3/rbgtk-app-chooser.c +0 -47
  324. data/ext/gtk3/rbgtk-application.c +0 -69
  325. data/ext/gtk3/rbgtk-arrow.c +0 -56
  326. data/ext/gtk3/rbgtk-aspect-frame.c +0 -56
  327. data/ext/gtk3/rbgtk-assistant.c +0 -218
  328. data/ext/gtk3/rbgtk-bin.c +0 -42
  329. data/ext/gtk3/rbgtk-binding-set.c +0 -154
  330. data/ext/gtk3/rbgtk-border.c +0 -119
  331. data/ext/gtk3/rbgtk-box.c +0 -146
  332. data/ext/gtk3/rbgtk-buildable.c +0 -96
  333. data/ext/gtk3/rbgtk-builder.c +0 -166
  334. data/ext/gtk3/rbgtk-button-box.c +0 -87
  335. data/ext/gtk3/rbgtk-button.c +0 -93
  336. data/ext/gtk3/rbgtk-calendar.c +0 -118
  337. data/ext/gtk3/rbgtk-cell-editable.c +0 -57
  338. data/ext/gtk3/rbgtk-cell-layout.c +0 -144
  339. data/ext/gtk3/rbgtk-cell-renderer-accel.c +0 -41
  340. data/ext/gtk3/rbgtk-cell-renderer-combo.c +0 -38
  341. data/ext/gtk3/rbgtk-cell-renderer-pixbuf.c +0 -41
  342. data/ext/gtk3/rbgtk-cell-renderer-progress.c +0 -38
  343. data/ext/gtk3/rbgtk-cell-renderer-spin.c +0 -39
  344. data/ext/gtk3/rbgtk-cell-renderer-spinner.c +0 -38
  345. data/ext/gtk3/rbgtk-cell-renderer-text.c +0 -48
  346. data/ext/gtk3/rbgtk-cell-renderer-toggle.c +0 -39
  347. data/ext/gtk3/rbgtk-cell-renderer.c +0 -119
  348. data/ext/gtk3/rbgtk-cell-view.c +0 -95
  349. data/ext/gtk3/rbgtk-check-button.c +0 -64
  350. data/ext/gtk3/rbgtk-check-menu-item.c +0 -64
  351. data/ext/gtk3/rbgtk-clip-board.c +0 -389
  352. data/ext/gtk3/rbgtk-color-button.c +0 -55
  353. data/ext/gtk3/rbgtk-color-selection-dialog.c +0 -56
  354. data/ext/gtk3/rbgtk-color-selection.c +0 -219
  355. data/ext/gtk3/rbgtk-combo-box-text.c +0 -138
  356. data/ext/gtk3/rbgtk-combo-box.c +0 -147
  357. data/ext/gtk3/rbgtk-const.c +0 -79
  358. data/ext/gtk3/rbgtk-container.c +0 -788
  359. data/ext/gtk3/rbgtk-css-provider.c +0 -110
  360. data/ext/gtk3/rbgtk-dialog.c +0 -206
  361. data/ext/gtk3/rbgtk-drag-gdk-drag-context.c +0 -108
  362. data/ext/gtk3/rbgtk-drag.c +0 -93
  363. data/ext/gtk3/rbgtk-drawing-area.c +0 -42
  364. data/ext/gtk3/rbgtk-editable.c +0 -149
  365. data/ext/gtk3/rbgtk-entry-buffer.c +0 -87
  366. data/ext/gtk3/rbgtk-entry-completion.c +0 -122
  367. data/ext/gtk3/rbgtk-entry.c +0 -184
  368. data/ext/gtk3/rbgtk-event-box.c +0 -42
  369. data/ext/gtk3/rbgtk-expander.c +0 -49
  370. data/ext/gtk3/rbgtk-file-chooser-button.c +0 -50
  371. data/ext/gtk3/rbgtk-file-chooser-dialog.c +0 -62
  372. data/ext/gtk3/rbgtk-file-chooser-widget.c +0 -40
  373. data/ext/gtk3/rbgtk-file-chooser.c +0 -381
  374. data/ext/gtk3/rbgtk-file-filter.c +0 -128
  375. data/ext/gtk3/rbgtk-file-system-error.c +0 -48
  376. data/ext/gtk3/rbgtk-fixed.c +0 -61
  377. data/ext/gtk3/rbgtk-font-button.c +0 -49
  378. data/ext/gtk3/rbgtk-font-chooser-dialog.c +0 -56
  379. data/ext/gtk3/rbgtk-font-chooser-widget.c +0 -45
  380. data/ext/gtk3/rbgtk-font-chooser.c +0 -78
  381. data/ext/gtk3/rbgtk-frame.c +0 -69
  382. data/ext/gtk3/rbgtk-gdk-event.c +0 -38
  383. data/ext/gtk3/rbgtk-grid.c +0 -105
  384. data/ext/gtk3/rbgtk-handle-box.c +0 -45
  385. data/ext/gtk3/rbgtk-header-bar.c +0 -58
  386. data/ext/gtk3/rbgtk-hsv.c +0 -102
  387. data/ext/gtk3/rbgtk-icon-factory.c +0 -85
  388. data/ext/gtk3/rbgtk-icon-info.c +0 -115
  389. data/ext/gtk3/rbgtk-icon-set.c +0 -84
  390. data/ext/gtk3/rbgtk-icon-size.c +0 -91
  391. data/ext/gtk3/rbgtk-icon-source.c +0 -184
  392. data/ext/gtk3/rbgtk-icon-theme.c +0 -268
  393. data/ext/gtk3/rbgtk-icon-view.c +0 -295
  394. data/ext/gtk3/rbgtk-im-multicontext.c +0 -48
  395. data/ext/gtk3/rbgtk-image-menu-item.c +0 -67
  396. data/ext/gtk3/rbgtk-image.c +0 -162
  397. data/ext/gtk3/rbgtk-imcon-text-simple.c +0 -69
  398. data/ext/gtk3/rbgtk-imcon-text.c +0 -133
  399. data/ext/gtk3/rbgtk-infobar.c +0 -121
  400. data/ext/gtk3/rbgtk-invisible.c +0 -49
  401. data/ext/gtk3/rbgtk-label.c +0 -139
  402. data/ext/gtk3/rbgtk-layout.c +0 -93
  403. data/ext/gtk3/rbgtk-level-bar.c +0 -88
  404. data/ext/gtk3/rbgtk-link-button.c +0 -49
  405. data/ext/gtk3/rbgtk-list-store.c +0 -399
  406. data/ext/gtk3/rbgtk-lock-button.c +0 -50
  407. data/ext/gtk3/rbgtk-menu-button.c +0 -41
  408. data/ext/gtk3/rbgtk-menu-item.c +0 -95
  409. data/ext/gtk3/rbgtk-menu-shell.c +0 -106
  410. data/ext/gtk3/rbgtk-menu-tool-button.c +0 -81
  411. data/ext/gtk3/rbgtk-menu.c +0 -168
  412. data/ext/gtk3/rbgtk-menubar.c +0 -43
  413. data/ext/gtk3/rbgtk-message-dialog.c +0 -74
  414. data/ext/gtk3/rbgtk-misc.c +0 -70
  415. data/ext/gtk3/rbgtk-notebook.c +0 -383
  416. data/ext/gtk3/rbgtk-numerable-icon.c +0 -50
  417. data/ext/gtk3/rbgtk-overlay.c +0 -53
  418. data/ext/gtk3/rbgtk-page-setup-unix-dialog.c +0 -94
  419. data/ext/gtk3/rbgtk-page-setup.c +0 -195
  420. data/ext/gtk3/rbgtk-paned.c +0 -114
  421. data/ext/gtk3/rbgtk-paper-size.c +0 -179
  422. data/ext/gtk3/rbgtk-plug.c +0 -85
  423. data/ext/gtk3/rbgtk-print-context.c +0 -125
  424. data/ext/gtk3/rbgtk-print-job.c +0 -148
  425. data/ext/gtk3/rbgtk-print-operation-preview.c +0 -59
  426. data/ext/gtk3/rbgtk-print-operation.c +0 -149
  427. data/ext/gtk3/rbgtk-print-settings.c +0 -807
  428. data/ext/gtk3/rbgtk-print-unix-dialog.c +0 -90
  429. data/ext/gtk3/rbgtk-printer.c +0 -155
  430. data/ext/gtk3/rbgtk-progress-bar.c +0 -72
  431. data/ext/gtk3/rbgtk-radio-action.c +0 -122
  432. data/ext/gtk3/rbgtk-radio-button.c +0 -89
  433. data/ext/gtk3/rbgtk-radio-menu-item.c +0 -147
  434. data/ext/gtk3/rbgtk-radio-tool-button.c +0 -131
  435. data/ext/gtk3/rbgtk-range.c +0 -68
  436. data/ext/gtk3/rbgtk-recent-action.c +0 -64
  437. data/ext/gtk3/rbgtk-recent-chooser-dialog.c +0 -66
  438. data/ext/gtk3/rbgtk-recent-chooser-menu.c +0 -50
  439. data/ext/gtk3/rbgtk-recent-chooser-widget.c +0 -48
  440. data/ext/gtk3/rbgtk-recent-chooser.c +0 -198
  441. data/ext/gtk3/rbgtk-recent-data.c +0 -188
  442. data/ext/gtk3/rbgtk-recent-filter-info.c +0 -201
  443. data/ext/gtk3/rbgtk-recent-filter.c +0 -169
  444. data/ext/gtk3/rbgtk-recent-info.c +0 -213
  445. data/ext/gtk3/rbgtk-recent-manager.c +0 -134
  446. data/ext/gtk3/rbgtk-revealer.c +0 -42
  447. data/ext/gtk3/rbgtk-scale-button.c +0 -84
  448. data/ext/gtk3/rbgtk-scale.c +0 -97
  449. data/ext/gtk3/rbgtk-scrollable.c +0 -31
  450. data/ext/gtk3/rbgtk-scrollbar.c +0 -52
  451. data/ext/gtk3/rbgtk-scrolled-window.c +0 -122
  452. data/ext/gtk3/rbgtk-search-bar.c +0 -59
  453. data/ext/gtk3/rbgtk-search-entry.c +0 -42
  454. data/ext/gtk3/rbgtk-selection-data.c +0 -281
  455. data/ext/gtk3/rbgtk-selection.c +0 -168
  456. data/ext/gtk3/rbgtk-separator-menu-item.c +0 -39
  457. data/ext/gtk3/rbgtk-separator-tool-item.c +0 -38
  458. data/ext/gtk3/rbgtk-separator.c +0 -44
  459. data/ext/gtk3/rbgtk-settings.c +0 -229
  460. data/ext/gtk3/rbgtk-size-group.c +0 -66
  461. data/ext/gtk3/rbgtk-socket.c +0 -82
  462. data/ext/gtk3/rbgtk-spin-button.c +0 -132
  463. data/ext/gtk3/rbgtk-spinner.c +0 -55
  464. data/ext/gtk3/rbgtk-stack-switcher.c +0 -41
  465. data/ext/gtk3/rbgtk-stack.c +0 -106
  466. data/ext/gtk3/rbgtk-status-bar.c +0 -77
  467. data/ext/gtk3/rbgtk-status-icon.c +0 -122
  468. data/ext/gtk3/rbgtk-stock.c +0 -213
  469. data/ext/gtk3/rbgtk-style-context-gdk-screen.c +0 -61
  470. data/ext/gtk3/rbgtk-style-context.c +0 -411
  471. data/ext/gtk3/rbgtk-style-properties.c +0 -118
  472. data/ext/gtk3/rbgtk-style-provider.c +0 -67
  473. data/ext/gtk3/rbgtk-switch.c +0 -40
  474. data/ext/gtk3/rbgtk-table.c +0 -190
  475. data/ext/gtk3/rbgtk-target-list.c +0 -125
  476. data/ext/gtk3/rbgtk-tearoff-menu-item.c +0 -41
  477. data/ext/gtk3/rbgtk-text-appearance.c +0 -236
  478. data/ext/gtk3/rbgtk-text-attributes.c +0 -326
  479. data/ext/gtk3/rbgtk-text-buffer.c +0 -899
  480. data/ext/gtk3/rbgtk-text-child-anchor.c +0 -56
  481. data/ext/gtk3/rbgtk-text-iter.c +0 -732
  482. data/ext/gtk3/rbgtk-text-mark.c +0 -71
  483. data/ext/gtk3/rbgtk-text-tag-table.c +0 -96
  484. data/ext/gtk3/rbgtk-text-tag.c +0 -68
  485. data/ext/gtk3/rbgtk-text-view.c +0 -336
  486. data/ext/gtk3/rbgtk-theming-engine.c +0 -257
  487. data/ext/gtk3/rbgtk-toggle-action.c +0 -61
  488. data/ext/gtk3/rbgtk-toggle-button.c +0 -87
  489. data/ext/gtk3/rbgtk-toggle-tool-button.c +0 -61
  490. data/ext/gtk3/rbgtk-tool-button.c +0 -66
  491. data/ext/gtk3/rbgtk-tool-item.c +0 -200
  492. data/ext/gtk3/rbgtk-tool-itemgroup.c +0 -70
  493. data/ext/gtk3/rbgtk-tool-shell.c +0 -96
  494. data/ext/gtk3/rbgtk-toolbar.c +0 -118
  495. data/ext/gtk3/rbgtk-tooltip-gdk-display.c +0 -39
  496. data/ext/gtk3/rbgtk-tooltip.c +0 -100
  497. data/ext/gtk3/rbgtk-tree-dragdest.c +0 -28
  498. data/ext/gtk3/rbgtk-tree-dragsource.c +0 -28
  499. data/ext/gtk3/rbgtk-tree-iter.c +0 -258
  500. data/ext/gtk3/rbgtk-tree-model.c +0 -246
  501. data/ext/gtk3/rbgtk-tree-modelfilter.c +0 -197
  502. data/ext/gtk3/rbgtk-tree-modelsort.c +0 -111
  503. data/ext/gtk3/rbgtk-tree-path.c +0 -191
  504. data/ext/gtk3/rbgtk-tree-rowreference.c +0 -140
  505. data/ext/gtk3/rbgtk-tree-selection.c +0 -190
  506. data/ext/gtk3/rbgtk-tree-sortable.c +0 -122
  507. data/ext/gtk3/rbgtk-tree-store.c +0 -330
  508. data/ext/gtk3/rbgtk-tree-view-column.c +0 -256
  509. data/ext/gtk3/rbgtk-tree-view.c +0 -716
  510. data/ext/gtk3/rbgtk-ui-manager.c +0 -189
  511. data/ext/gtk3/rbgtk-viewport.c +0 -44
  512. data/ext/gtk3/rbgtk-volume-button.c +0 -41
  513. data/ext/gtk3/rbgtk-widget-path.c +0 -229
  514. data/ext/gtk3/rbgtk-widget.c +0 -1554
  515. data/ext/gtk3/rbgtk-window-group.c +0 -80
  516. data/ext/gtk3/rbgtk-window.c +0 -565
  517. data/ext/gtk3/rbgtk.c +0 -783
  518. data/ext/gtk3/rbgtk3.h +0 -90
  519. data/ext/gtk3/rbgtk3conversions.h +0 -439
  520. data/ext/gtk3/rbgtk3private.h +0 -300
  521. data/ext/gtk3/rbgtk3util.c +0 -67
  522. data/lib/gtk3/base.rb +0 -67
  523. data/sample/gtk-demo/appwindow.rb +0 -233
  524. data/sample/misc/composited-windows.rb +0 -113
  525. data/sample/misc/itemfactory.rb +0 -73
  526. data/sample/misc/itemfactory2.rb +0 -74
  527. data/sample/misc/keyboard_grab.rb +0 -29
  528. data/sample/misc/pangorenderer.rb +0 -66
  529. data/sample/misc/pointer_grab.rb +0 -34
  530. data/sample/misc/settings.rb +0 -41
  531. data/sample/misc/style_property.rb +0 -67
  532. data/sample/misc/style_property.rc +0 -19
  533. data/sample/misc/textbuffer_serialize.rb +0 -130
  534. data/sample/misc/to_drawable.rb +0 -42
  535. data/sample/misc/uimanager.rb +0 -148
  536. data/sample/misc/uimanager2.rb +0 -91
  537. data/sample/misc/uimanager2.xml +0 -36
  538. data/sample/misc/xbm_cursor.rb +0 -43
  539. data/sample/testgtk/3DRings.xpm +0 -116
  540. data/sample/testgtk/FilesQueue.xpm +0 -98
  541. data/sample/testgtk/Modeller.xpm +0 -117
  542. data/sample/testgtk/README +0 -14
  543. data/sample/testgtk/button.rb +0 -124
  544. data/sample/testgtk/buttonbox.rb +0 -100
  545. data/sample/testgtk/check-n.xpm +0 -21
  546. data/sample/testgtk/check-y.xpm +0 -21
  547. data/sample/testgtk/checkbutton.rb +0 -67
  548. data/sample/testgtk/circles.xbm +0 -46
  549. data/sample/testgtk/colorselect.rb +0 -33
  550. data/sample/testgtk/dialog.rb +0 -48
  551. data/sample/testgtk/entry.rb +0 -73
  552. data/sample/testgtk/filesel.rb +0 -65
  553. data/sample/testgtk/fontselection.rb +0 -56
  554. data/sample/testgtk/labels.rb +0 -74
  555. data/sample/testgtk/layout.rb +0 -108
  556. data/sample/testgtk/marble.xpm +0 -408
  557. data/sample/testgtk/menu.rb +0 -79
  558. data/sample/testgtk/notebook.rb +0 -280
  559. data/sample/testgtk/pixmap.rb +0 -58
  560. data/sample/testgtk/progressbar.rb +0 -173
  561. data/sample/testgtk/radiobutton.rb +0 -61
  562. data/sample/testgtk/range.rb +0 -65
  563. data/sample/testgtk/reparent.rb +0 -91
  564. data/sample/testgtk/sample.rb +0 -80
  565. data/sample/testgtk/savedposition.rb +0 -87
  566. data/sample/testgtk/scrolledwindow.rb +0 -67
  567. data/sample/testgtk/shapedwindow.rb +0 -99
  568. data/sample/testgtk/spinbutton.rb +0 -181
  569. data/sample/testgtk/statusbar.rb +0 -89
  570. data/sample/testgtk/test.xpm +0 -92
  571. data/sample/testgtk/testgtk.rb +0 -176
  572. data/sample/testgtk/testgtkrc +0 -146
  573. data/sample/testgtk/testgtkrc2 +0 -21
  574. data/sample/testgtk/togglebutton.rb +0 -53
  575. data/sample/testgtk/toolbar.rb +0 -82
  576. data/sample/testgtk/tooltips.rb +0 -41
  577. data/sample/testgtk/wmhints.rb +0 -40
  578. data/test/test_gtk_image.rb +0 -8
  579. data/test/test_gtk_list_store.rb +0 -105
  580. data/test/test_gtk_tree_path.rb +0 -20
  581. data/test/test_gtk_unix_print.rb +0 -14
  582. data/test/test_gtk_widget.rb +0 -24
@@ -1,1554 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
- * Copyright (C) 2002-2006 Ruby-GNOME2 Project Team
5
- * Copyright (C) 1998-2000 Yukihiro Matsumoto,
6
- * Daisuke Kanda,
7
- * Hiroshi Igarashi
8
- *
9
- * This library is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU Lesser General Public
11
- * License as published by the Free Software Foundation; either
12
- * version 2.1 of the License, or (at your option) any later version.
13
- *
14
- * This library is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
- * Lesser General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU Lesser General Public
20
- * License along with this library; if not, write to the Free Software
21
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22
- * MA 02110-1301 USA
23
- */
24
-
25
- #include "rbgtk3private.h"
26
-
27
- #define RG_TARGET_NAMESPACE cWidget
28
- #define _SELF(self) (RVAL2GTKWIDGET(self))
29
-
30
- static VALUE style_prop_func_table;
31
-
32
- static VALUE
33
- rg_unparent(VALUE self)
34
- {
35
- gtk_widget_unparent(_SELF(self));
36
- return self;
37
- }
38
-
39
- static VALUE
40
- rg_show(VALUE self)
41
- {
42
- gtk_widget_show(_SELF(self));
43
- return self;
44
- }
45
-
46
- static VALUE
47
- rg_show_now(VALUE self)
48
- {
49
- gtk_widget_show_now(_SELF(self));
50
- return self;
51
- }
52
-
53
- static VALUE
54
- rg_hide(VALUE self)
55
- {
56
- gtk_widget_hide(_SELF(self));
57
- return self;
58
- }
59
-
60
- static VALUE
61
- rg_show_all(VALUE self)
62
- {
63
- gtk_widget_show_all(_SELF(self));
64
- return self;
65
- }
66
-
67
- static VALUE
68
- rg_map(VALUE self)
69
- {
70
- gtk_widget_map(_SELF(self));
71
- return self;
72
- }
73
-
74
- static VALUE
75
- rg_unmap(VALUE self)
76
- {
77
- gtk_widget_unmap(_SELF(self));
78
- return self;
79
- }
80
-
81
- static VALUE
82
- rg_realize(VALUE self)
83
- {
84
- gtk_widget_realize(_SELF(self));
85
- return self;
86
- }
87
-
88
- static VALUE
89
- rg_unrealize(VALUE self)
90
- {
91
- gtk_widget_unrealize(_SELF(self));
92
- return self;
93
- }
94
-
95
- static VALUE
96
- rg_queue_draw(VALUE self)
97
- {
98
- gtk_widget_queue_draw(_SELF(self));
99
- return self;
100
- }
101
-
102
- static VALUE
103
- rg_queue_resize(VALUE self)
104
- {
105
- gtk_widget_queue_resize(_SELF(self));
106
- return self;
107
- }
108
-
109
- static VALUE
110
- rg_queue_resize_no_redraw(VALUE self)
111
- {
112
- gtk_widget_queue_resize_no_redraw(_SELF(self));
113
- return self;
114
- }
115
-
116
- static VALUE
117
- rg_size_allocate(VALUE self, VALUE alloc)
118
- {
119
- gtk_widget_size_allocate(_SELF(self), RVAL2GTKALLOCATION(alloc));
120
- return self;
121
- }
122
-
123
- static VALUE
124
- rg_add_accelerator(VALUE self, VALUE sig, VALUE accel, VALUE key, VALUE mod, VALUE flag)
125
- {
126
- gtk_widget_add_accelerator(_SELF(self),
127
- RVAL2CSTR(sig),
128
- RVAL2GTKACCELGROUP(accel),
129
- NUM2INT(key),
130
- RVAL2GDKMODIFIERTYPE(mod),
131
- RVAL2GTKACCELFLAGS(flag));
132
- return self;
133
- }
134
-
135
- static VALUE
136
- rg_remove_accelerator(VALUE self, VALUE accel, VALUE key, VALUE mod)
137
- {
138
- return CBOOL2RVAL(gtk_widget_remove_accelerator(_SELF(self),
139
- RVAL2GTKACCELGROUP(accel),
140
- NUM2INT(key),
141
- RVAL2GDKMODIFIERTYPE(mod)));
142
- }
143
-
144
- static VALUE
145
- rg_set_accel_path(VALUE self, VALUE accel_path, VALUE accel_group)
146
- {
147
- gtk_widget_set_accel_path(_SELF(self), RVAL2CSTR(accel_path),
148
- RVAL2GTKACCELGROUP(accel_group));
149
- return self;
150
- }
151
-
152
- static VALUE
153
- rg_accel_closures(VALUE self)
154
- {
155
- return BOXEDGLIST2RVAL_FREE(gtk_widget_list_accel_closures(_SELF(self)),
156
- G_TYPE_CLOSURE,
157
- g_list_free, NULL);
158
- }
159
-
160
- static VALUE
161
- rg_can_activate_accel_p(VALUE self, VALUE signal_id)
162
- {
163
- return CBOOL2RVAL(gtk_widget_can_activate_accel(_SELF(self), NUM2UINT(signal_id)));
164
- }
165
-
166
- static VALUE
167
- rg_event(VALUE self, VALUE event)
168
- {
169
- return CBOOL2RVAL(gtk_widget_event(_SELF(self), RVAL2GEV(event)));
170
- }
171
-
172
- static VALUE
173
- rg_activate(VALUE self)
174
- {
175
- return CBOOL2RVAL(gtk_widget_activate(_SELF(self)));
176
- }
177
-
178
- static VALUE
179
- rg_reparent(VALUE self, VALUE parent)
180
- {
181
- gtk_widget_reparent(_SELF(self), _SELF(parent));
182
- return self;
183
- }
184
-
185
- static VALUE
186
- rg_intersect(VALUE self, VALUE area)
187
- {
188
- GdkRectangle intersection;
189
- gboolean ret = gtk_widget_intersect(_SELF(self),
190
- RVAL2GDKRECTANGLE(area),
191
- &intersection);
192
- return ret ? GDKRECTANGLE2RVAL(&intersection) : Qnil;
193
- }
194
-
195
- static VALUE
196
- rg_grab_default(VALUE self)
197
- {
198
- gtk_widget_grab_default(_SELF(self));
199
- return self;
200
- }
201
-
202
- static VALUE
203
- rg_set_parent_window(VALUE self, VALUE parent_window)
204
- {
205
- gtk_widget_set_parent_window(_SELF(self),
206
- RVAL2GDKWINDOW(parent_window));
207
- return self;
208
- }
209
-
210
- static VALUE
211
- rg_parent_window(VALUE self)
212
- {
213
- return GOBJ2RVAL(gtk_widget_get_parent_window(_SELF(self)));
214
- }
215
-
216
- static VALUE
217
- rg_add_events(VALUE self, VALUE events)
218
- {
219
- gtk_widget_add_events(_SELF(self), NUM2INT(events));
220
- return self;
221
- }
222
-
223
- static VALUE
224
- rg_toplevel(VALUE self)
225
- {
226
- return GOBJ2RVAL(gtk_widget_get_toplevel(_SELF(self)));
227
- }
228
-
229
- static VALUE
230
- rg_get_ancestor(VALUE self, VALUE klass)
231
- {
232
- return GOBJ2RVAL(gtk_widget_get_ancestor(_SELF(self), CLASS2GTYPE(klass)));
233
- }
234
-
235
- static VALUE
236
- rg_visual(VALUE self)
237
- {
238
- return GOBJ2RVAL(gtk_widget_get_visual(_SELF(self)));
239
- }
240
-
241
- static VALUE
242
- rg_ancestor_p(VALUE self, VALUE ancestor)
243
- {
244
- return CBOOL2RVAL(gtk_widget_is_ancestor(_SELF(self), _SELF(ancestor)));
245
- }
246
-
247
- static VALUE
248
- rg_translate_coordinates(VALUE self, VALUE dest_widget, VALUE src_x, VALUE src_y)
249
- {
250
- gint dest_x, dest_y;
251
- gboolean ret;
252
- VALUE result = Qnil;
253
- ret = gtk_widget_translate_coordinates(_SELF(self), _SELF(dest_widget),
254
- NUM2INT(src_x), NUM2INT(src_y),
255
- &dest_x, &dest_y);
256
- if (ret)
257
- result = rb_ary_new3(2, INT2FIX(dest_x), INT2FIX(dest_y));
258
-
259
- return result;
260
- }
261
-
262
- static VALUE
263
- rg_hide_on_delete(VALUE self)
264
- {
265
- return CBOOL2RVAL(gtk_widget_hide_on_delete(_SELF(self)));
266
- }
267
-
268
- static VALUE
269
- rg_set_direction(VALUE self, VALUE dir)
270
- {
271
- gtk_widget_set_direction(_SELF(self), RVAL2GTKTEXTDIRECTION(dir));
272
- return self;
273
- }
274
-
275
- static VALUE
276
- rg_direction(VALUE self)
277
- {
278
- return GTKTEXTDIRECTION2RVAL(gtk_widget_get_direction(_SELF(self)));
279
- }
280
-
281
- static VALUE
282
- rg_s_set_default_direction(VALUE self, VALUE dir)
283
- {
284
- gtk_widget_set_default_direction(RVAL2GTKTEXTDIRECTION(dir));
285
- return self;
286
- }
287
-
288
- static VALUE
289
- rg_s_default_direction(G_GNUC_UNUSED VALUE self)
290
- {
291
- return GTKTEXTDIRECTION2RVAL(gtk_widget_get_default_direction());
292
- }
293
-
294
- static VALUE
295
- rg_composite_name(VALUE self)
296
- {
297
- return CSTR2RVAL(gtk_widget_get_composite_name(_SELF(self)));
298
- }
299
-
300
- static VALUE
301
- rg_create_pango_context(VALUE self)
302
- {
303
- return GOBJ2RVALU(gtk_widget_create_pango_context(_SELF(self)));
304
- }
305
-
306
- static VALUE
307
- rg_pango_context(VALUE self)
308
- {
309
- return GOBJ2RVAL(gtk_widget_get_pango_context(_SELF(self)));
310
- }
311
-
312
- static VALUE
313
- rg_create_pango_layout(int argc, VALUE *argv, VALUE self)
314
- {
315
- VALUE text;
316
- rb_scan_args(argc, argv, "01", &text);
317
- return GOBJ2RVALU(gtk_widget_create_pango_layout(_SELF(self), RVAL2CSTR_ACCEPT_NIL(text)));
318
- }
319
-
320
- static VALUE
321
- rg_s_pop_composite_child(VALUE self)
322
- {
323
- gtk_widget_pop_composite_child();
324
- return self;
325
- }
326
-
327
- static VALUE
328
- rg_s_push_composite_child(VALUE self)
329
- {
330
- gtk_widget_push_composite_child();
331
- return self;
332
- }
333
-
334
- static VALUE
335
- rg_queue_draw_area(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
336
- {
337
- gtk_widget_queue_draw_area(_SELF(self), NUM2INT(x), NUM2INT(y),
338
- NUM2INT(width), NUM2INT(height));
339
- return self;
340
- }
341
-
342
- static VALUE
343
- rg_set_redraw_on_allocate(VALUE self, VALUE redraw_on_allocate)
344
- {
345
- gtk_widget_set_redraw_on_allocate(_SELF(self), RVAL2CBOOL(redraw_on_allocate));
346
- return self;
347
- }
348
-
349
- static VALUE
350
- rg_set_composite_name(VALUE self, VALUE name)
351
- {
352
- gtk_widget_set_composite_name(_SELF(self), RVAL2CSTR(name));
353
- return self;
354
- }
355
-
356
- static VALUE
357
- rg_mnemonic_activate(VALUE self, VALUE group_cycling)
358
- {
359
- return CBOOL2RVAL(gtk_widget_mnemonic_activate(_SELF(self), RVAL2CBOOL(group_cycling)));
360
- }
361
-
362
- /*
363
- * Gtk::Widget.install_style_property(...) do |spec, str|
364
- * #parse str
365
- * new_val = .... # parse value from string.
366
- * new_val # return new_val or nil if you can't convert the value.
367
- * end
368
- */
369
- static gboolean
370
- rc_property_parser(const GParamSpec *pspec, const GString *rc_string, GValue *property_value)
371
- {
372
- VALUE spec = GOBJ2RVAL((gpointer)pspec);
373
- VALUE func = rb_hash_aref(style_prop_func_table, spec);
374
- VALUE ret = rb_funcall(func, id_call, 2, spec, CSTR2RVAL(rc_string->str));
375
- if (NIL_P(ret)) {
376
- return FALSE;
377
- } else if (RVAL2CBOOL(ret)){
378
- rbgobj_rvalue_to_gvalue(ret, property_value);
379
- return TRUE;
380
- } else {
381
- rb_raise(rb_eArgError, "Gtk::Widget#install_style_property() block should return new value or nil");
382
- }
383
- }
384
-
385
- static VALUE
386
- rg_s_install_style_property(VALUE self, VALUE spec)
387
- {
388
- const RGObjClassInfo* cinfo = rbgobj_lookup_class(self);
389
- GtkWidgetClass* gclass;
390
- GParamSpec* pspec = RVAL2GPARAMSPEC(spec);
391
-
392
- if (cinfo->klass != self)
393
- rb_raise(rb_eTypeError, "%s isn't registered class",
394
- rb_class2name(self));
395
-
396
- gclass = (GtkWidgetClass *)g_type_class_ref(cinfo->gtype);
397
- if (rb_block_given_p()){
398
- VALUE func = rb_block_proc();
399
- rb_hash_aset(style_prop_func_table, spec, func);
400
- gtk_widget_class_install_style_property_parser(gclass, pspec,
401
- (GtkRcPropertyParser)rc_property_parser);
402
- } else {
403
- gtk_widget_class_install_style_property(gclass, pspec);
404
- }
405
- return self;
406
- }
407
-
408
- static VALUE
409
- rg_s_style_property(VALUE self, VALUE property_name)
410
- {
411
- GtkWidgetClass* oclass;
412
- const char* name;
413
- GParamSpec* prop;
414
- VALUE result;
415
-
416
- if (SYMBOL_P(property_name)) {
417
- name = rb_id2name(SYM2ID(property_name));
418
- } else {
419
- name = RVAL2CSTR(property_name);
420
- }
421
-
422
- oclass = (GtkWidgetClass*)g_type_class_ref(CLASS2GTYPE(self));
423
-
424
- prop = gtk_widget_class_find_style_property(oclass, name);
425
- if (!prop){
426
- g_type_class_unref(oclass);
427
- rb_raise(rb_eval_string("GLib::NoPropertyError"), "no such property: %s", name);
428
- }
429
-
430
- result = GOBJ2RVAL(prop);
431
- g_type_class_unref(oclass);
432
- return result;
433
- }
434
-
435
- static VALUE
436
- rg_s_style_properties(int argc, VALUE *argv, VALUE self)
437
- {
438
- GtkWidgetClass* oclass = g_type_class_ref(CLASS2GTYPE(self));
439
- guint n_properties;
440
- GParamSpec** props;
441
- VALUE inherited_too;
442
- VALUE ary;
443
- guint i;
444
-
445
- if (rb_scan_args(argc, argv, "01", &inherited_too) == 0)
446
- inherited_too = Qtrue;
447
-
448
- props = gtk_widget_class_list_style_properties(oclass, &n_properties);
449
-
450
- ary = rb_ary_new();
451
- for (i = 0; i < n_properties; i++){
452
- if (RVAL2CBOOL(inherited_too)
453
- || GTYPE2CLASS(props[i]->owner_type) == self)
454
- rb_ary_push(ary, CSTR2RVAL(props[i]->name));
455
- }
456
-
457
- g_free(props);
458
- g_type_class_unref(oclass);
459
- return ary;
460
- }
461
-
462
- static VALUE
463
- rg_region_intersect(VALUE self, VALUE region)
464
- {
465
- return CRREGION2RVAL(gtk_widget_region_intersect(_SELF(self),
466
- RVAL2CRREGION(region)));
467
- }
468
-
469
- static VALUE
470
- rg_send_expose(VALUE self, VALUE event)
471
- {
472
- return INT2NUM(gtk_widget_send_expose(_SELF(self), RVAL2GEV(event)));
473
- }
474
-
475
- static VALUE
476
- rg_style_get_property(VALUE self, VALUE prop_name)
477
- {
478
- GParamSpec* pspec = NULL;
479
- const char* name;
480
-
481
- if (SYMBOL_P(prop_name)) {
482
- name = rb_id2name(SYM2ID(prop_name));
483
- } else {
484
- name = RVAL2CSTR(prop_name);
485
- }
486
- pspec = gtk_widget_class_find_style_property((GtkWidgetClass*)g_type_class_ref(RVAL2GTYPE(self)), name);
487
- if (!pspec)
488
- rb_raise(rb_eval_string("GLib::NoPropertyError"), "No such property: %s", name);
489
- else {
490
- // FIXME: use rb_ensure to call g_value_unset()
491
- GValue gval = G_VALUE_INIT;
492
- VALUE ret;
493
- g_value_init(&gval, G_PARAM_SPEC_VALUE_TYPE(pspec));
494
- gtk_widget_style_get_property(RVAL2GTKWIDGET(self), name, &gval);
495
- ret = GVAL2RVAL(&gval);
496
- g_value_unset(&gval);
497
- return ret;
498
- }
499
- }
500
-
501
- static VALUE
502
- rg_accessible(VALUE self)
503
- {
504
- return GOBJ2RVAL(gtk_widget_get_accessible(_SELF(self)));
505
- }
506
-
507
- static VALUE
508
- rg_child_focus(VALUE self, VALUE direction)
509
- {
510
- return CBOOL2RVAL(gtk_widget_child_focus(_SELF(self), RVAL2GTKDIRECTIONTYPE(direction)));
511
- }
512
-
513
- static VALUE
514
- rg_error_bell(VALUE self)
515
- {
516
- gtk_widget_error_bell(_SELF(self));
517
- return self;
518
- }
519
-
520
- static VALUE
521
- rg_keynav_failed(VALUE self, VALUE direction)
522
- {
523
- return CBOOL2RVAL(gtk_widget_keynav_failed(_SELF(self), RVAL2GTKDIRECTIONTYPE(direction)));
524
- }
525
-
526
- static VALUE
527
- rg_child_notify(VALUE self, VALUE child_property)
528
- {
529
- gtk_widget_child_notify(_SELF(self), RVAL2CSTR(child_property));
530
- return self;
531
- }
532
-
533
- static VALUE
534
- rg_freeze_child_notify(VALUE self)
535
- {
536
- gtk_widget_freeze_child_notify(_SELF(self));
537
- return self;
538
- }
539
-
540
- static VALUE
541
- rg_child_visible_p(VALUE self)
542
- {
543
- return CBOOL2RVAL(gtk_widget_get_child_visible(_SELF(self)));
544
- }
545
-
546
- static VALUE
547
- rg_settings(VALUE self)
548
- {
549
- return GOBJ2RVAL(gtk_widget_get_settings(_SELF(self)));
550
- }
551
-
552
- static VALUE
553
- rg_get_clipboard(VALUE self, VALUE selection)
554
- {
555
- return GOBJ2RVAL(gtk_widget_get_clipboard(_SELF(self), RVAL2ATOM(selection)));
556
- }
557
-
558
- static VALUE
559
- rg_display(VALUE self)
560
- {
561
- return GOBJ2RVAL(gtk_widget_get_display(_SELF(self)));
562
- }
563
-
564
- static VALUE
565
- rg_root_window(VALUE self)
566
- {
567
- return GOBJ2RVAL(gtk_widget_get_root_window(_SELF(self)));
568
- }
569
-
570
- static VALUE
571
- rg_screen(VALUE self)
572
- {
573
- return GOBJ2RVAL(gtk_widget_get_screen(_SELF(self)));
574
- }
575
-
576
- static VALUE
577
- rg_has_screen_p(VALUE self)
578
- {
579
- return CBOOL2RVAL(gtk_widget_has_screen(_SELF(self)));
580
- }
581
-
582
- static VALUE
583
- rg_get_size_request(VALUE self)
584
- {
585
- gint width, height;
586
- gtk_widget_get_size_request(_SELF(self), &width, &height);
587
- return rb_ary_new3(2, INT2NUM(width), INT2NUM(height));
588
- }
589
-
590
- static VALUE
591
- rg_set_child_visible(VALUE self, VALUE is_visible)
592
- {
593
- gtk_widget_set_child_visible(_SELF(self), RVAL2CBOOL(is_visible));
594
- return self;
595
- }
596
-
597
- static VALUE
598
- rg_set_size_request(VALUE self, VALUE width, VALUE height)
599
- {
600
- gtk_widget_set_size_request(_SELF(self), NUM2INT(width), NUM2INT(height));
601
- return self;
602
- }
603
-
604
- static VALUE
605
- rg_thaw_child_notify(VALUE self)
606
- {
607
- gtk_widget_thaw_child_notify(_SELF(self));
608
- return self;
609
- }
610
-
611
- static VALUE
612
- rg_mnemonic_labels(VALUE self)
613
- {
614
- return GOBJGLIST2RVAL_FREE(gtk_widget_list_mnemonic_labels(_SELF(self)),
615
- g_list_free, NULL);
616
- }
617
-
618
- static VALUE
619
- rg_add_mnemonic_label(VALUE self, VALUE label)
620
- {
621
- gtk_widget_add_mnemonic_label(_SELF(self), RVAL2GTKWIDGET(label));
622
- return self;
623
- }
624
-
625
- static VALUE
626
- rg_remove_mnemonic_label(VALUE self, VALUE label)
627
- {
628
- gtk_widget_remove_mnemonic_label(_SELF(self), RVAL2GTKWIDGET(label));
629
- return self;
630
- }
631
-
632
- static VALUE
633
- rg_set_tooltip_window(VALUE self, VALUE custom_window)
634
- {
635
- gtk_widget_set_tooltip_window(_SELF(self), RVAL2GTKWINDOW(custom_window));
636
- return self;
637
- }
638
-
639
- static VALUE
640
- rg_tooltip_window(VALUE self)
641
- {
642
- return GOBJ2RVAL(gtk_widget_get_tooltip_window(_SELF(self)));
643
- }
644
-
645
- static VALUE
646
- rg_trigger_tooltip_query(VALUE self)
647
- {
648
- gtk_widget_trigger_tooltip_query(_SELF(self));
649
- return self;
650
- }
651
-
652
- static VALUE
653
- rg_composited_p(VALUE self)
654
- {
655
- return CBOOL2RVAL(gtk_widget_is_composited(_SELF(self)));
656
- }
657
-
658
- static VALUE
659
- rg_set_window(VALUE self, VALUE window)
660
- {
661
- gtk_widget_set_window(_SELF(self), RVAL2GDKWINDOW(window));
662
- return self;
663
- }
664
-
665
- static VALUE
666
- rg_toplevel_p(VALUE self)
667
- {
668
- return CBOOL2RVAL(gtk_widget_is_toplevel(_SELF(self)));
669
- }
670
-
671
- static VALUE
672
- rg_realized_p(VALUE self)
673
- {
674
- return CBOOL2RVAL(gtk_widget_get_realized(_SELF(self)));
675
- }
676
-
677
- static VALUE
678
- rg_mapped_p(VALUE self)
679
- {
680
- return CBOOL2RVAL(gtk_widget_get_mapped(_SELF(self)));
681
- }
682
-
683
- static VALUE
684
- rg_drawable_p(VALUE self)
685
- {
686
- return CBOOL2RVAL(gtk_widget_is_drawable(_SELF(self)));
687
- }
688
-
689
- static VALUE
690
- rg_sensitive_with_parent_p(VALUE self)
691
- {
692
- return CBOOL2RVAL(gtk_widget_get_sensitive(_SELF(self)));
693
- }
694
-
695
- static VALUE
696
- rg_has_grab_p(VALUE self)
697
- {
698
- return CBOOL2RVAL(gtk_widget_has_grab(_SELF(self)));
699
- }
700
-
701
- static VALUE
702
- rg_allocation(VALUE self)
703
- {
704
- GtkAllocation alloc;
705
- gtk_widget_get_allocation(_SELF(self), &alloc);
706
- return GTKALLOCATION2RVAL(&alloc);
707
- }
708
-
709
- static VALUE
710
- rg_set_allocation(VALUE self, VALUE alloc)
711
- {
712
- gtk_widget_set_allocation(_SELF(self), RVAL2GTKALLOCATION(alloc));
713
- return self;
714
- }
715
-
716
- static VALUE
717
- rg_destroy(VALUE self)
718
- {
719
- gtk_widget_destroy(_SELF(self));
720
- return Qnil;
721
- }
722
-
723
- static VALUE
724
- rg_bindings_activate(VALUE self, VALUE keyval, VALUE modifiers)
725
- {
726
- return CBOOL2RVAL(gtk_bindings_activate(RVAL2GOBJ(self),
727
- NUM2UINT(keyval),
728
- NUM2UINT(modifiers)));
729
- }
730
-
731
- static VALUE
732
- rg_has_window_p(VALUE self)
733
- {
734
- return CBOOL2RVAL(gtk_widget_get_has_window(_SELF(self)));
735
- }
736
-
737
- static VALUE
738
- rg_set_has_window(VALUE self, VALUE has_window)
739
- {
740
- gtk_widget_set_has_window(_SELF(self), RVAL2CBOOL(has_window));
741
- return self;
742
- }
743
-
744
- static VALUE
745
- rg_s_binding_set(VALUE self)
746
- {
747
- GType gtype;
748
- gpointer gclass;
749
- GtkBindingSet* binding_set;
750
-
751
- Check_Type(self, T_CLASS);
752
-
753
- gtype = CLASS2GTYPE(self);
754
-
755
- if (!G_TYPE_IS_CLASSED(gtype)) {
756
- rb_raise(rb_eTypeError, "%s is not a classed GType",
757
- rb_class2name(self));
758
- }
759
- gclass = g_type_class_ref(gtype);
760
- if (!gclass) {
761
- rb_raise(rb_eRuntimeError, "couldn't get class reference");
762
- }
763
- if (!G_IS_OBJECT_CLASS(gclass)) {
764
- g_type_class_unref(gclass);
765
- rb_raise(rb_eTypeError, "%s is not a GObject class",
766
- rb_class2name(self));
767
- }
768
-
769
- binding_set = gtk_binding_set_by_class(gclass);
770
- if (!binding_set) {
771
- g_type_class_unref(gclass);
772
- rb_raise(rb_eRuntimeError, "couldn't get BindingSet from %s",
773
- rb_class2name(self));
774
- }
775
- g_type_class_unref(gclass);
776
-
777
- return GTKBINDINGSET2RVAL(binding_set);
778
- }
779
-
780
- static VALUE
781
- rg_path(VALUE self)
782
- {
783
- return GTKWIDGETPATH2RVAL(gtk_widget_get_path(_SELF(self)));
784
- }
785
-
786
- static VALUE
787
- widget_signal_size_request(G_GNUC_UNUSED guint num, const GValue *values)
788
- {
789
- GtkRequisition* req = (GtkRequisition*)g_value_get_boxed(&values[1]);
790
- return rb_ary_new3(2, GVAL2RVAL(&values[0]),
791
- rb_ary_new3(2, INT2NUM(req->width), INT2NUM(req->height)));
792
- }
793
- static VALUE
794
- widget_signal_size_allocate(G_GNUC_UNUSED guint num, const GValue *values)
795
- {
796
- GtkAllocation* alloc = (GtkAllocation*)g_value_get_boxed(&values[1]);
797
- return rb_ary_new3(2, GVAL2RVAL(&values[0]), GTKALLOCATION2RVAL(alloc));
798
- }
799
-
800
- static VALUE
801
- rg_add_device_events(VALUE self, VALUE device, VALUE events)
802
- {
803
- gtk_widget_add_device_events(_SELF(self),
804
- RVAL2GDKDEVICE(device),
805
- RVAL2GDKEVENTMASK(events));
806
-
807
- return self;
808
- }
809
-
810
- static VALUE
811
- rg_compute_expand(VALUE self, VALUE orientation)
812
- {
813
- gboolean result;
814
-
815
- result = gtk_widget_compute_expand(_SELF(self),
816
- RVAL2GTKORIENTATION(orientation));
817
-
818
- return CBOOL2RVAL(result);
819
- }
820
-
821
- static VALUE
822
- rg_device_is_shadowed_p(VALUE self, VALUE device)
823
- {
824
- return CBOOL2RVAL(gtk_widget_device_is_shadowed(_SELF(self),
825
- RVAL2GDKDEVICE(device)));
826
- }
827
-
828
- static VALUE
829
- rg_draw(VALUE self, VALUE cr)
830
- {
831
- gtk_widget_draw(_SELF(self), RVAL2CRCONTEXT(cr));
832
-
833
- return self;
834
- }
835
-
836
- static VALUE
837
- rg_allocated_height(VALUE self)
838
- {
839
- return INT2NUM(gtk_widget_get_allocated_height(_SELF(self)));
840
- }
841
-
842
- static VALUE
843
- rg_allocated_width(VALUE self)
844
- {
845
- return INT2NUM(gtk_widget_get_allocated_width(_SELF(self)));
846
- }
847
-
848
- /* TODO: device_enabled_p? */
849
- static VALUE
850
- rg_get_device_enabled_p(VALUE self, VALUE device)
851
- {
852
- return CBOOL2RVAL(gtk_widget_get_device_enabled(_SELF(self),
853
- RVAL2GDKDEVICE(device)));
854
- }
855
-
856
- static VALUE
857
- rg_get_device_events(VALUE self, VALUE device)
858
- {
859
- GdkEventMask mask;
860
-
861
- mask = gtk_widget_get_device_events(_SELF(self), RVAL2GDKDEVICE(device));
862
-
863
- return GDKEVENTMASK2RVAL(mask);
864
- }
865
-
866
- static VALUE
867
- rg_preferred_height(VALUE self)
868
- {
869
- gint minimum_height, natural_height;
870
-
871
- gtk_widget_get_preferred_height(_SELF(self), &minimum_height, &natural_height);
872
-
873
- return rb_ary_new3(2, INT2NUM(minimum_height), INT2NUM(natural_height));
874
- }
875
-
876
- static VALUE
877
- rg_get_preferred_height_for_width(VALUE self, VALUE width)
878
- {
879
- gint minimum_height, natural_height;
880
-
881
- gtk_widget_get_preferred_height_for_width(_SELF(self), NUM2INT(width),
882
- &minimum_height, &natural_height);
883
-
884
- return rb_ary_new3(2, INT2NUM(minimum_height), INT2NUM(natural_height));
885
- }
886
-
887
- static VALUE
888
- rg_preferred_size(VALUE self)
889
- {
890
- GtkRequisition minimum_size, natural_size;
891
-
892
- gtk_widget_get_preferred_size(_SELF(self), &minimum_size, &natural_size);
893
-
894
- return rb_ary_new3(2,
895
- rb_ary_new3(2, minimum_size.width, minimum_size.height),
896
- rb_ary_new3(2, natural_size.width, natural_size.height));
897
- }
898
-
899
- static VALUE
900
- rg_preferred_width(VALUE self)
901
- {
902
- gint minimum_width, natural_width;
903
-
904
- gtk_widget_get_preferred_width(_SELF(self), &minimum_width, &natural_width);
905
-
906
- return rb_ary_new3(2, INT2NUM(minimum_width), INT2NUM(natural_width));
907
- }
908
-
909
- static VALUE
910
- rg_get_preferred_width_for_height(VALUE self, VALUE height)
911
- {
912
- gint minimum_width, natural_width;
913
-
914
- gtk_widget_get_preferred_width_for_height(_SELF(self), NUM2INT(height),
915
- &minimum_width, &natural_width);
916
-
917
- return rb_ary_new3(2, INT2NUM(minimum_width), INT2NUM(natural_width));
918
- }
919
-
920
- static VALUE
921
- rg_request_mode(VALUE self)
922
- {
923
- return GTKSIZEREQUESTMODE2RVAL(gtk_widget_get_request_mode(_SELF(self)));
924
- }
925
-
926
- static VALUE
927
- rg_state_flags(VALUE self)
928
- {
929
- return GTKSTATEFLAGS2RVAL(gtk_widget_get_state_flags(_SELF(self)));
930
- }
931
-
932
- static VALUE
933
- rg_style_context(VALUE self)
934
- {
935
- return GOBJ2RVAL(gtk_widget_get_style_context(_SELF(self)));
936
- }
937
-
938
- static VALUE
939
- rg_support_multidevice_p(VALUE self)
940
- {
941
- return CBOOL2RVAL(gtk_widget_get_support_multidevice(_SELF(self)));
942
- }
943
-
944
- #if GTK_CHECK_VERSION(3, 2, 0)
945
- static VALUE
946
- rg_has_visible_focus_p(VALUE self)
947
- {
948
- return CBOOL2RVAL(gtk_widget_has_visible_focus(_SELF(self)));
949
- }
950
- #endif
951
-
952
- static VALUE
953
- rg_in_destruction_p(VALUE self)
954
- {
955
- return CBOOL2RVAL(gtk_widget_in_destruction(_SELF(self)));
956
- }
957
-
958
- static VALUE
959
- rg_input_shape_combine_region(VALUE self, VALUE region)
960
- {
961
- gtk_widget_input_shape_combine_region(_SELF(self),
962
- NIL_P(region) ? NULL : RVAL2CRREGION(region));
963
-
964
- return self;
965
- }
966
-
967
- static VALUE
968
- rg_override_background_color(VALUE self, VALUE state, VALUE color)
969
- {
970
- gtk_widget_override_background_color(_SELF(self),
971
- RVAL2GTKSTATEFLAGS(state),
972
- NIL_P(color) ? NULL : RVAL2GDKRGBA(color));
973
-
974
- return self;
975
- }
976
-
977
- static VALUE
978
- rg_override_color(VALUE self, VALUE state, VALUE color)
979
- {
980
- gtk_widget_override_color(_SELF(self),
981
- RVAL2GTKSTATEFLAGS(state),
982
- NIL_P(color) ? NULL : RVAL2GDKRGBA(color));
983
-
984
- return self;
985
- }
986
-
987
- static VALUE
988
- rg_override_cursor(VALUE self, VALUE cursor, VALUE secondary_cursor)
989
- {
990
- gtk_widget_override_cursor(_SELF(self),
991
- NIL_P(cursor) ? NULL : RVAL2GDKRGBA(cursor),
992
- NIL_P(secondary_cursor) ? NULL : RVAL2GDKRGBA(secondary_cursor));
993
-
994
- return self;
995
- }
996
-
997
- static VALUE
998
- rg_override_font(VALUE self, VALUE font_desc)
999
- {
1000
- gtk_widget_override_font(_SELF(self),
1001
- NIL_P(font_desc) ? NULL : RVAL2PANGOFONTDESCRIPTION(font_desc));
1002
-
1003
- return self;
1004
- }
1005
-
1006
- static VALUE
1007
- rg_override_symbolic_color(VALUE self, VALUE name, VALUE color)
1008
- {
1009
- gtk_widget_override_symbolic_color(_SELF(self),
1010
- RVAL2CSTR(name),
1011
- NIL_P(color) ? NULL : RVAL2GDKRGBA(color));
1012
-
1013
- return self;
1014
- }
1015
-
1016
- static VALUE
1017
- rg_queue_compute_expand(VALUE self)
1018
- {
1019
- gtk_widget_queue_compute_expand(_SELF(self));
1020
-
1021
- return self;
1022
- }
1023
-
1024
- static VALUE
1025
- rg_queue_draw_region(VALUE self, VALUE region)
1026
- {
1027
- gtk_widget_queue_draw_region(_SELF(self), RVAL2CRREGION(region));
1028
-
1029
- return self;
1030
- }
1031
-
1032
- static VALUE
1033
- rg_render_icon_pixbuf(VALUE self, VALUE stock_id, VALUE size)
1034
- {
1035
- VALUE buffer;
1036
- GdkPixbuf *pixbuf;
1037
-
1038
- pixbuf = gtk_widget_render_icon_pixbuf(_SELF(self),
1039
- RVAL2GLIBID(stock_id, buffer),
1040
- RVAL2GTKICONSIZE(size));
1041
-
1042
- return GOBJ2RVAL_UNREF(pixbuf);
1043
- }
1044
-
1045
- static VALUE
1046
- rg_reset_style(VALUE self)
1047
- {
1048
- gtk_widget_reset_style(_SELF(self));
1049
-
1050
- return self;
1051
- }
1052
-
1053
- static VALUE
1054
- rg_send_focus_change(VALUE self, VALUE event)
1055
- {
1056
- gboolean result;
1057
-
1058
- result = gtk_widget_send_focus_change(_SELF(self), RVAL2GDKEVENT(event));
1059
-
1060
- return CBOOL2RVAL(result);
1061
- }
1062
-
1063
- static VALUE
1064
- rg_set_device_enabled(VALUE self, VALUE device, VALUE enabled)
1065
- {
1066
- gtk_widget_set_device_enabled(_SELF(self),
1067
- RVAL2GDKDEVICE(device),
1068
- RVAL2CBOOL(enabled));
1069
-
1070
- return self;
1071
- }
1072
-
1073
- static VALUE
1074
- rg_set_device_events(VALUE self, VALUE device, VALUE events)
1075
- {
1076
- gtk_widget_set_device_events(_SELF(self),
1077
- RVAL2GDKDEVICE(device),
1078
- RVAL2GDKEVENTMASK(events));
1079
-
1080
- return self;
1081
- }
1082
-
1083
- static VALUE
1084
- rg_set_mapped(VALUE self, VALUE mapped)
1085
- {
1086
- gtk_widget_set_mapped(_SELF(self), RVAL2CBOOL(mapped));
1087
-
1088
- return self;
1089
- }
1090
-
1091
- static VALUE
1092
- rg_set_realized(VALUE self, VALUE realized)
1093
- {
1094
- gtk_widget_set_realized(_SELF(self), RVAL2CBOOL(realized));
1095
-
1096
- return self;
1097
- }
1098
-
1099
- static VALUE
1100
- rg_set_state_flags(VALUE self, VALUE flags, VALUE clear)
1101
- {
1102
- gtk_widget_set_state_flags(_SELF(self),
1103
- RVAL2GTKSTATEFLAGS(flags),
1104
- RVAL2CBOOL(clear));
1105
-
1106
- return self;
1107
- }
1108
-
1109
- static VALUE
1110
- rg_set_support_multidevice(VALUE self, VALUE support_multidevice)
1111
- {
1112
- gtk_widget_set_support_multidevice(_SELF(self), RVAL2CBOOL(support_multidevice));
1113
-
1114
- return self;
1115
- }
1116
-
1117
- static VALUE
1118
- rg_set_visual(VALUE self, VALUE visual)
1119
- {
1120
- gtk_widget_set_visual(_SELF(self), RVAL2GDKVISUAL(visual));
1121
-
1122
- return self;
1123
- }
1124
-
1125
- static VALUE
1126
- rg_shape_combine_region(VALUE self, VALUE region)
1127
- {
1128
- gtk_widget_shape_combine_region(_SELF(self),
1129
- NIL_P(region) ? NULL : RVAL2CRREGION(region));
1130
-
1131
- return self;
1132
- }
1133
-
1134
- static VALUE
1135
- rg_unset_state_flags(VALUE self, VALUE flags)
1136
- {
1137
- gtk_widget_unset_state_flags(_SELF(self),
1138
- RVAL2GTKSTATEFLAGS(flags));
1139
-
1140
- return self;
1141
- }
1142
-
1143
- static VALUE
1144
- rg_drag_dest_set(VALUE self, VALUE flags, VALUE targets, VALUE actions)
1145
- {
1146
- GtkDestDefaults flg = RVAL2GTKDESTDEFAULTS(flags);
1147
- GdkDragAction acts = RVAL2GDKDRAGACTION(actions);
1148
- long n;
1149
- GtkTargetEntry *entries = RVAL2GTKTARGETENTRIES_ACCEPT_NIL(targets, &n);
1150
-
1151
- gtk_drag_dest_set(_SELF(self), flg, entries, n, acts);
1152
-
1153
- g_free(entries);
1154
-
1155
- return self;
1156
- }
1157
-
1158
- static VALUE
1159
- rg_drag_dest_set_proxy(VALUE self, VALUE proxy_window, VALUE protocol, VALUE use_coordinates)
1160
- {
1161
- gtk_drag_dest_set_proxy(_SELF(self),
1162
- RVAL2GDKWINDOW(proxy_window),
1163
- RVAL2GDKDRAGPROTOCOL(protocol),
1164
- RVAL2CBOOL(use_coordinates));
1165
- return self;
1166
- }
1167
-
1168
- static VALUE
1169
- rg_drag_dest_unset(VALUE self)
1170
- {
1171
- gtk_drag_dest_unset(_SELF(self));
1172
- return self;
1173
- }
1174
-
1175
- static VALUE
1176
- rg_drag_dest_find_target(int argc, VALUE *argv, VALUE self)
1177
- {
1178
- VALUE context, target_list;
1179
- GdkAtom ret;
1180
- rb_scan_args(argc, argv, "11", &context, &target_list);
1181
-
1182
- ret = gtk_drag_dest_find_target(_SELF(self),
1183
- RVAL2GDKDRAGCONTEXT(context),
1184
- NIL_P(target_list) ? NULL : RVAL2GTKTARGETLIST(target_list));
1185
-
1186
- return GDKATOM2RVAL(ret);
1187
- }
1188
-
1189
- static VALUE
1190
- rg_drag_dest_get_target_list(VALUE self)
1191
- {
1192
- GtkTargetList* list = gtk_drag_dest_get_target_list(_SELF(self));
1193
- return GTKTARGETLIST2RVAL(list);
1194
- }
1195
-
1196
- static VALUE
1197
- rg_drag_dest_set_target_list(VALUE self, VALUE target_list)
1198
- {
1199
- gtk_drag_dest_set_target_list(_SELF(self),
1200
- NIL_P(target_list) ? NULL : RVAL2GTKTARGETLIST(target_list));
1201
-
1202
- return self;
1203
- }
1204
-
1205
- static VALUE
1206
- rg_drag_dest_add_text_targets(VALUE self)
1207
- {
1208
- gtk_drag_dest_add_text_targets(_SELF(self));
1209
- return self;
1210
- }
1211
-
1212
- static VALUE
1213
- rg_drag_dest_add_image_targets(VALUE self)
1214
- {
1215
- gtk_drag_dest_add_image_targets(_SELF(self));
1216
- return self;
1217
- }
1218
-
1219
- static VALUE
1220
- rg_drag_dest_add_uri_targets(VALUE self)
1221
- {
1222
- gtk_drag_dest_add_uri_targets(_SELF(self));
1223
- return self;
1224
- }
1225
-
1226
- static VALUE
1227
- rg_drag_dest_set_track_motion(VALUE self, VALUE track_motion)
1228
- {
1229
- gtk_drag_dest_set_track_motion(_SELF(self), RVAL2CBOOL(track_motion));
1230
- return self;
1231
- }
1232
-
1233
- static VALUE
1234
- rg_drag_dest_get_track_motion(VALUE self)
1235
- {
1236
- return CBOOL2RVAL(gtk_drag_dest_get_track_motion(_SELF(self)));
1237
- }
1238
-
1239
- static VALUE
1240
- rg_drag_get_data(VALUE self, VALUE context, VALUE target, VALUE time)
1241
- {
1242
- gtk_drag_get_data(_SELF(self),
1243
- RVAL2GDKDRAGCONTEXT(context),
1244
- RVAL2ATOM(target),
1245
- NUM2UINT(time));
1246
- return self;
1247
- }
1248
-
1249
- static VALUE
1250
- rg_drag_highlight(VALUE self)
1251
- {
1252
- gtk_drag_highlight(_SELF(self));
1253
- return self;
1254
- }
1255
-
1256
- static VALUE
1257
- rg_drag_unhighlight(VALUE self)
1258
- {
1259
- gtk_drag_unhighlight(_SELF(self));
1260
- return self;
1261
- }
1262
-
1263
- static VALUE
1264
- rg_drag_begin(VALUE self, VALUE target_list, VALUE actions, VALUE button, VALUE event)
1265
- {
1266
- return GOBJ2RVAL(gtk_drag_begin(_SELF(self),
1267
- RVAL2GTKTARGETLIST(target_list),
1268
- RVAL2GDKDRAGACTION(actions),
1269
- NUM2INT(button),
1270
- RVAL2GEV(event)));
1271
- }
1272
-
1273
- static VALUE
1274
- rg_drag_threshold_p(VALUE self, VALUE start_x, VALUE start_y, VALUE current_x, VALUE current_y)
1275
- {
1276
- return CBOOL2RVAL(gtk_drag_check_threshold(_SELF(self),
1277
- NUM2INT(start_x), NUM2INT(start_y),
1278
- NUM2INT(current_x), NUM2INT(current_y)));
1279
- }
1280
-
1281
- static VALUE
1282
- rg_drag_source_set(VALUE self, VALUE start_button_mask, VALUE targets, VALUE actions)
1283
- {
1284
- GdkModifierType mask = RVAL2GDKMODIFIERTYPE(start_button_mask);
1285
- GdkDragAction acts = RVAL2GDKDRAGACTION(actions);
1286
- long n;
1287
- GtkTargetEntry *entries = RVAL2GTKTARGETENTRIES(targets, &n);
1288
-
1289
- gtk_drag_source_set(_SELF(self), mask, entries, n, acts);
1290
-
1291
- g_free(entries);
1292
-
1293
- return self;
1294
- }
1295
-
1296
- static VALUE
1297
- rg_drag_source_set_icon(VALUE self, VALUE icon)
1298
- {
1299
- if (TYPE(icon) == T_HASH) {
1300
- VALUE stock_id, icon_name, gicon, pixbuf, buffer;
1301
- rbg_scan_options(icon,
1302
- "stock_id", &stock_id,
1303
- "icon_name", &icon_name,
1304
- "gicon", &gicon,
1305
- "pixbuf", &pixbuf,
1306
- NULL);
1307
-
1308
- if (!NIL_P(stock_id))
1309
- gtk_drag_source_set_icon_stock(_SELF(self), RVAL2GLIBID(stock_id, buffer));
1310
- else if (!NIL_P(icon_name))
1311
- gtk_drag_source_set_icon_name(_SELF(self), RVAL2CSTR(icon_name));
1312
- #if GTK_CHECK_VERSION(3, 2, 0)
1313
- else if (!NIL_P(gicon))
1314
- gtk_drag_source_set_icon_gicon(_SELF(self), RVAL2GICON(gicon));
1315
- #endif
1316
- else if (!NIL_P(pixbuf))
1317
- gtk_drag_source_set_icon_pixbuf(_SELF(self), RVAL2GDKPIXBUF(pixbuf));
1318
- else
1319
- rb_raise(rb_eArgError, "Invalid arguments.");
1320
- } else {
1321
- GType gtype = RVAL2GTYPE(icon);
1322
-
1323
- if (gtype == GDK_TYPE_PIXBUF)
1324
- gtk_drag_source_set_icon_pixbuf(_SELF(self), RVAL2GDKPIXBUF(icon));
1325
- #if GTK_CHECK_VERSION(3, 2, 0)
1326
- else if (g_type_is_a(gtype, G_TYPE_ICON))
1327
- gtk_drag_source_set_icon_gicon(_SELF(self), RVAL2GICON(icon));
1328
- #endif
1329
- else
1330
- rb_raise(rb_eArgError, "Invalid arguments.");
1331
- }
1332
-
1333
- return self;
1334
- }
1335
-
1336
- static VALUE
1337
- rg_drag_source_unset(VALUE self)
1338
- {
1339
- gtk_drag_source_unset(_SELF(self));
1340
- return self;
1341
- }
1342
-
1343
- static VALUE
1344
- rg_drag_source_set_target_list(VALUE self, VALUE target_list)
1345
- {
1346
- gtk_drag_source_set_target_list(_SELF(self),
1347
- NIL_P(target_list) ? NULL : RVAL2GTKTARGETLIST(target_list));
1348
- return self;
1349
- }
1350
-
1351
- static VALUE
1352
- rg_drag_source_get_target_list(VALUE self)
1353
- {
1354
- return GTKTARGETLIST2RVAL(gtk_drag_source_get_target_list(_SELF(self)));
1355
- }
1356
-
1357
- static VALUE
1358
- rg_drag_source_add_text_targets(VALUE self)
1359
- {
1360
- gtk_drag_source_add_text_targets(_SELF(self));
1361
- return self;
1362
- }
1363
- static VALUE
1364
- rg_drag_source_add_image_targets(VALUE self)
1365
- {
1366
- gtk_drag_source_add_image_targets(_SELF(self));
1367
- return self;
1368
- }
1369
- static VALUE
1370
- rg_drag_source_add_uri_targets(VALUE self)
1371
- {
1372
- gtk_drag_source_add_uri_targets(_SELF(self));
1373
- return self;
1374
- }
1375
-
1376
- void
1377
- Init_gtk_widget(VALUE mGtk)
1378
- {
1379
- VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_WIDGET, "Widget", mGtk);
1380
-
1381
- rb_global_variable(&style_prop_func_table);
1382
- style_prop_func_table = rb_hash_new();
1383
-
1384
- RG_DEF_METHOD(unparent, 0);
1385
- RG_DEF_METHOD(show, 0);
1386
- RG_DEF_METHOD(show_now, 0);
1387
- RG_DEF_METHOD(hide, 0);
1388
- RG_DEF_METHOD(show_all, 0);
1389
- RG_DEF_METHOD(map, 0);
1390
- RG_DEF_METHOD(unmap, 0);
1391
- RG_DEF_METHOD(realize, 0);
1392
- RG_DEF_METHOD(unrealize, 0);
1393
- RG_DEF_METHOD(queue_draw, 0);
1394
- RG_DEF_METHOD(queue_resize, 0);
1395
- RG_DEF_METHOD(queue_resize_no_redraw, 0);
1396
- RG_DEF_METHOD(size_allocate, 1);
1397
- RG_DEF_METHOD(add_accelerator, 5);
1398
- RG_DEF_METHOD(remove_accelerator, 3);
1399
- RG_DEF_METHOD(set_accel_path, 2);
1400
- RG_DEF_METHOD(accel_closures, 0);
1401
- RG_DEF_METHOD_P(can_activate_accel, 1);
1402
- RG_DEF_METHOD(event, 1);
1403
- RG_DEF_METHOD(activate, 0);
1404
- RG_DEF_METHOD(reparent, 1);
1405
- RG_DEF_SMETHOD(install_style_property, 1);
1406
- RG_DEF_SMETHOD(style_property, 1);
1407
- RG_DEF_SMETHOD(style_properties, -1);
1408
- RG_DEF_METHOD(intersect, 1);
1409
- RG_DEF_METHOD(grab_default, 0);
1410
- RG_DEF_METHOD(set_parent_window, 1);
1411
- RG_DEF_METHOD(parent_window, 0);
1412
- RG_DEF_METHOD(add_events, 1);
1413
- RG_DEF_METHOD(toplevel, 0);
1414
- RG_DEF_METHOD(get_ancestor, 1);
1415
- RG_DEF_METHOD(visual, 0);
1416
- RG_DEF_METHOD_P(ancestor, 1);
1417
- RG_DEF_METHOD(translate_coordinates, 3);
1418
- RG_DEF_METHOD(hide_on_delete, 0);
1419
- RG_DEF_METHOD(set_direction, 1);
1420
- RG_DEF_METHOD(direction, 0);
1421
- RG_DEF_METHOD(composite_name, 0);
1422
- RG_DEF_METHOD(create_pango_context, 0);
1423
- RG_DEF_METHOD(pango_context, 0);
1424
- RG_DEF_METHOD(create_pango_layout, -1);
1425
- RG_DEF_METHOD(queue_draw_area, 4);
1426
- RG_DEF_METHOD(set_redraw_on_allocate, 1);
1427
- RG_DEF_METHOD(set_composite_name, 1);
1428
- RG_DEF_METHOD(mnemonic_activate, 1);
1429
- RG_DEF_METHOD(region_intersect, 1);
1430
- RG_DEF_METHOD(send_expose, 1);
1431
- RG_DEF_METHOD(style_get_property, 1);
1432
- RG_DEF_METHOD(accessible, 0);
1433
- RG_DEF_METHOD(child_focus, 1);
1434
- RG_DEF_METHOD(error_bell, 0);
1435
- RG_DEF_METHOD(keynav_failed, 0);
1436
- RG_DEF_METHOD(child_notify, 1);
1437
- RG_DEF_METHOD(freeze_child_notify, 0);
1438
- RG_DEF_METHOD_P(child_visible, 0);
1439
- RG_DEF_METHOD(settings, 0);
1440
- RG_DEF_METHOD(get_clipboard, 1);
1441
- RG_DEF_METHOD(display, 0);
1442
- RG_DEF_METHOD(root_window, 0);
1443
- RG_DEF_METHOD(screen, 0);
1444
- RG_DEF_METHOD_P(has_screen, 0);
1445
- RG_DEF_METHOD(set_child_visible, 1);
1446
- RG_DEF_METHOD(get_size_request, 0);
1447
- RG_DEF_METHOD(set_size_request, 2);
1448
- RG_DEF_METHOD(thaw_child_notify, 0);
1449
- RG_DEF_METHOD(mnemonic_labels, 0);
1450
- RG_DEF_METHOD(add_mnemonic_label, 1);
1451
- RG_DEF_METHOD(remove_mnemonic_label, 1);
1452
- RG_DEF_METHOD(set_tooltip_window, 1);
1453
- RG_DEF_METHOD(tooltip_window, 0);
1454
- RG_DEF_METHOD(trigger_tooltip_query, 0);
1455
- RG_DEF_METHOD_P(composited, 0);
1456
- RG_DEF_METHOD(set_window, 1);
1457
- RG_DEF_METHOD(allocation, 0);
1458
- RG_DEF_METHOD(set_allocation, 1);
1459
- RG_DEF_METHOD(destroy, 0);
1460
- RG_DEF_METHOD(bindings_activate, 2);
1461
-
1462
- RG_DEF_METHOD_P(toplevel, 0);
1463
- RG_DEF_METHOD_P(realized, 0);
1464
- RG_DEF_METHOD_P(mapped, 0);
1465
- RG_DEF_METHOD_P(drawable, 0);
1466
- RG_DEF_METHOD_P(sensitive_with_parent, 0);
1467
- RG_DEF_METHOD_P(has_grab, 0);
1468
-
1469
- RG_DEF_SMETHOD(set_default_direction, 1);
1470
- RG_DEF_SMETHOD(default_direction, 0);
1471
- RG_DEF_SMETHOD(pop_composite_child, 0);
1472
- RG_DEF_SMETHOD(push_composite_child, 0);
1473
- RG_DEF_SMETHOD(binding_set, 0);
1474
- RG_DEF_METHOD_P(has_window, 0);
1475
- RG_DEF_METHOD(set_has_window, 1);
1476
-
1477
- RG_DEF_METHOD(path, 0);
1478
-
1479
- RG_DEF_METHOD(add_device_events, 2);
1480
- RG_DEF_METHOD(compute_expand, 1);
1481
- RG_DEF_METHOD_P(device_is_shadowed, 1);
1482
- RG_DEF_METHOD(draw, 1);
1483
- RG_DEF_METHOD(allocated_height, 0);
1484
- RG_DEF_METHOD(allocated_width, 0);
1485
- RG_DEF_METHOD_P(get_device_enabled, 1);
1486
- RG_DEF_METHOD(get_device_events, 1);
1487
- RG_DEF_METHOD(preferred_height, 0);
1488
- RG_DEF_METHOD(get_preferred_height_for_width, 1);
1489
- RG_DEF_METHOD(preferred_size, 0);
1490
- RG_DEF_METHOD(preferred_width, 0);
1491
- RG_DEF_METHOD(get_preferred_width_for_height, 1);
1492
- RG_DEF_METHOD(request_mode, 0);
1493
- RG_DEF_METHOD(state_flags, 0);
1494
- RG_DEF_METHOD(style_context, 0);
1495
- RG_DEF_METHOD_P(support_multidevice, 0);
1496
- #if GTK_CHECK_VERSION(3, 2, 0)
1497
- RG_DEF_METHOD_P(has_visible_focus, 0);
1498
- #endif
1499
- RG_DEF_METHOD_P(in_destruction, 0);
1500
- RG_DEF_METHOD(input_shape_combine_region, 1);
1501
- RG_DEF_METHOD(override_background_color, 2);
1502
- RG_DEF_METHOD(override_color, 2);
1503
- RG_DEF_METHOD(override_cursor, 2);
1504
- RG_DEF_METHOD(override_font, 1);
1505
- RG_DEF_METHOD(override_symbolic_color, -1);
1506
- RG_DEF_METHOD(queue_compute_expand, 0);
1507
- RG_DEF_METHOD(queue_draw_region, 1);
1508
- RG_DEF_METHOD(render_icon_pixbuf, 2);
1509
- RG_DEF_METHOD(reset_style, 0);
1510
- RG_DEF_METHOD(send_focus_change, 1);
1511
- RG_DEF_METHOD(set_device_enabled, 2);
1512
- RG_DEF_METHOD(set_device_events, 2);
1513
- RG_DEF_METHOD(set_mapped, 1);
1514
- RG_DEF_METHOD(set_realized, 1);
1515
- RG_DEF_METHOD(set_state_flags, 2);
1516
- RG_DEF_METHOD(set_support_multidevice, 1);
1517
- RG_DEF_METHOD(set_visual, 1);
1518
- RG_DEF_METHOD(shape_combine_region, 1);
1519
- RG_DEF_METHOD(unset_state_flags, 1);
1520
-
1521
- RG_DEF_METHOD(drag_dest_set, 3);
1522
- RG_DEF_METHOD(drag_dest_set_proxy, 3);
1523
- RG_DEF_METHOD(drag_dest_unset, 0);
1524
- RG_DEF_METHOD(drag_dest_find_target, -1);
1525
- RG_DEF_METHOD(drag_dest_get_target_list, 0);
1526
- RG_DEF_METHOD(drag_dest_set_target_list, 1);
1527
- RG_DEF_METHOD(drag_dest_add_text_targets, 0);
1528
- RG_DEF_METHOD(drag_dest_add_image_targets, 0);
1529
- RG_DEF_METHOD(drag_dest_add_uri_targets, 0);
1530
- RG_DEF_METHOD(drag_dest_set_track_motion, 1);
1531
- RG_DEF_METHOD(drag_dest_get_track_motion, 0);
1532
- RG_DEF_METHOD(drag_get_data, 3);
1533
- RG_DEF_METHOD(drag_highlight, 0);
1534
- RG_DEF_METHOD(drag_unhighlight, 0);
1535
- RG_DEF_METHOD(drag_begin, 4);
1536
- RG_DEF_METHOD_P(drag_threshold, 4);
1537
- RG_DEF_METHOD(drag_source_set, 3);
1538
- RG_DEF_METHOD(drag_source_set_icon, 1);
1539
- RG_DEF_METHOD(drag_source_unset, 0);
1540
- RG_DEF_METHOD(drag_source_set_target_list, 1);
1541
- RG_DEF_METHOD(drag_source_get_target_list, 0);
1542
- RG_DEF_METHOD(drag_source_add_text_targets, 0);
1543
- RG_DEF_METHOD(drag_source_add_image_targets, 0);
1544
- RG_DEF_METHOD(drag_source_add_uri_targets, 0);
1545
-
1546
- G_DEF_CLASS(GTK_TYPE_WIDGET_HELP_TYPE, "HelpType", RG_TARGET_NAMESPACE);
1547
-
1548
- G_DEF_CLASS(GTK_TYPE_TEXT_DIRECTION, "TextDirection", RG_TARGET_NAMESPACE);
1549
- G_DEF_CLASS(GTK_TYPE_ALIGN, "Align", RG_TARGET_NAMESPACE);
1550
-
1551
- G_DEF_SIGNAL_FUNC(RG_TARGET_NAMESPACE, "size-request", (GValToRValSignalFunc)widget_signal_size_request);
1552
- G_DEF_SIGNAL_FUNC(RG_TARGET_NAMESPACE, "size-allocate", (GValToRValSignalFunc)widget_signal_size_allocate);
1553
-
1554
- }