gtk2 0.90.7-x86-mingw32 → 0.90.8-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. data/ChangeLog +62 -0
  2. data/ext/gtk2/extconf.rb +2 -2
  3. data/ext/gtk2/rbgdk.c +30 -61
  4. data/ext/gtk2/rbgdkatom.c +6 -14
  5. data/ext/gtk2/rbgdkcairo.c +4 -8
  6. data/ext/gtk2/rbgdkcolor.c +11 -27
  7. data/ext/gtk2/rbgdkcolormap.c +8 -16
  8. data/ext/gtk2/rbgdkcursor.c +5 -12
  9. data/ext/gtk2/rbgdkdevice.c +16 -32
  10. data/ext/gtk2/rbgdkdisplay.c +49 -100
  11. data/ext/gtk2/rbgdkdisplaymanager.c +3 -6
  12. data/ext/gtk2/rbgdkdragcontext.c +21 -48
  13. data/ext/gtk2/rbgdkdraw.c +27 -60
  14. data/ext/gtk2/rbgdkevent.c +51 -113
  15. data/ext/gtk2/rbgdkgc.c +35 -70
  16. data/ext/gtk2/rbgdkgeometry.c +24 -50
  17. data/ext/gtk2/rbgdkimage.c +14 -28
  18. data/ext/gtk2/rbgdkinput.c +3 -8
  19. data/ext/gtk2/rbgdkkeymap.c +7 -14
  20. data/ext/gtk2/rbgdkkeyval.c +9 -18
  21. data/ext/gtk2/rbgdkpango.c +8 -18
  22. data/ext/gtk2/rbgdkpangorenderer.c +7 -18
  23. data/ext/gtk2/rbgdkpixbuf.c +5 -20
  24. data/ext/gtk2/rbgdkpixmap.c +9 -24
  25. data/ext/gtk2/rbgdkproperty.c +8 -28
  26. data/ext/gtk2/rbgdkrectangle.c +12 -24
  27. data/ext/gtk2/rbgdkregion.c +15 -33
  28. data/ext/gtk2/rbgdkrgb.c +11 -26
  29. data/ext/gtk2/rbgdkscreen.c +37 -78
  30. data/ext/gtk2/rbgdkselection.c +5 -16
  31. data/ext/gtk2/rbgdkthreads.c +4 -8
  32. data/ext/gtk2/rbgdktimecoord.c +5 -10
  33. data/ext/gtk2/rbgdkvisual.c +25 -50
  34. data/ext/gtk2/rbgdkwindow.c +102 -211
  35. data/ext/gtk2/rbgdkwindowattr.c +16 -32
  36. data/ext/gtk2/rbgdkx11.c +5 -12
  37. data/ext/gtk2/rbgtk.c +9 -10
  38. data/ext/gtk2/rbgtkaboutdialog.c +5 -12
  39. data/ext/gtk2/rbgtkaccelerator.c +6 -12
  40. data/ext/gtk2/rbgtkaccelgroup.c +14 -32
  41. data/ext/gtk2/rbgtkaccelgroupentry.c +4 -8
  42. data/ext/gtk2/rbgtkaccelkey.c +7 -14
  43. data/ext/gtk2/rbgtkaccellabel.c +3 -6
  44. data/ext/gtk2/rbgtkaccelmap.c +12 -28
  45. data/ext/gtk2/rbgtkaccessible.c +1 -2
  46. data/ext/gtk2/rbgtkaction.c +20 -42
  47. data/ext/gtk2/rbgtkactiongroup.c +15 -39
  48. data/ext/gtk2/rbgtkadjustment.c +14 -28
  49. data/ext/gtk2/rbgtkalignment.c +4 -8
  50. data/ext/gtk2/rbgtkallocation.c +13 -26
  51. data/ext/gtk2/rbgtkarrow.c +2 -4
  52. data/ext/gtk2/rbgtkaspectframe.c +2 -4
  53. data/ext/gtk2/rbgtkassistant.c +23 -47
  54. data/ext/gtk2/rbgtkbbox.c +2 -4
  55. data/ext/gtk2/rbgtkbin.c +1 -2
  56. data/ext/gtk2/rbgtkbindingset.c +8 -18
  57. data/ext/gtk2/rbgtkborder.c +4 -8
  58. data/ext/gtk2/rbgtkbox.c +8 -23
  59. data/ext/gtk2/rbgtkbutton.c +8 -18
  60. data/ext/gtk2/rbgtkcalendar.c +11 -24
  61. data/ext/gtk2/rbgtkcelleditable.c +3 -6
  62. data/ext/gtk2/rbgtkcelllayout.c +9 -22
  63. data/ext/gtk2/rbgtkcellrenderer.c +8 -19
  64. data/ext/gtk2/rbgtkcellrendereraccel.c +1 -2
  65. data/ext/gtk2/rbgtkcellrenderercombo.c +1 -2
  66. data/ext/gtk2/rbgtkcellrendererpixbuf.c +1 -2
  67. data/ext/gtk2/rbgtkcellrendererprogress.c +1 -2
  68. data/ext/gtk2/rbgtkcellrendererspin.c +1 -2
  69. data/ext/gtk2/rbgtkcellrendererspinner.c +35 -0
  70. data/ext/gtk2/rbgtkcellrenderertext.c +2 -4
  71. data/ext/gtk2/rbgtkcellrenderertoggle.c +1 -2
  72. data/ext/gtk2/rbgtkcellview.c +6 -14
  73. data/ext/gtk2/rbgtkcheckbutton.c +1 -4
  74. data/ext/gtk2/rbgtkcheckmenuitem.c +2 -6
  75. data/ext/gtk2/rbgtkclipboard.c +30 -75
  76. data/ext/gtk2/rbgtkcolorbutton.c +1 -4
  77. data/ext/gtk2/rbgtkcolorsel.c +10 -24
  78. data/ext/gtk2/rbgtkcolorselectiondialog.c +5 -12
  79. data/ext/gtk2/rbgtkcombo.c +7 -16
  80. data/ext/gtk2/rbgtkcombobox.c +14 -32
  81. data/ext/gtk2/rbgtkcomboboxentry.c +1 -4
  82. data/ext/gtk2/rbgtkcontainer.c +27 -70
  83. data/ext/gtk2/rbgtkcurve.c +6 -12
  84. data/ext/gtk2/rbgtkdialog.c +14 -32
  85. data/ext/gtk2/rbgtkdrag.c +31 -68
  86. data/ext/gtk2/rbgtkdrawingarea.c +1 -2
  87. data/ext/gtk2/rbgtkeditable.c +13 -26
  88. data/ext/gtk2/rbgtkentry.c +7 -14
  89. data/ext/gtk2/rbgtkentrycompletion.c +10 -23
  90. data/ext/gtk2/rbgtkeventbox.c +1 -2
  91. data/ext/gtk2/rbgtkexpander.c +1 -4
  92. data/ext/gtk2/rbgtkfilechooser.c +30 -60
  93. data/ext/gtk2/rbgtkfilechooserbutton.c +1 -4
  94. data/ext/gtk2/rbgtkfilechooserdialog.c +1 -4
  95. data/ext/gtk2/rbgtkfilechooserwidget.c +1 -4
  96. data/ext/gtk2/rbgtkfilefilter.c +10 -21
  97. data/ext/gtk2/rbgtkfilesel.c +14 -30
  98. data/ext/gtk2/rbgtkfixed.c +5 -10
  99. data/ext/gtk2/rbgtkfontbutton.c +1 -4
  100. data/ext/gtk2/rbgtkfontselection.c +1 -2
  101. data/ext/gtk2/rbgtkfontselectiondialog.c +9 -20
  102. data/ext/gtk2/rbgtkframe.c +3 -8
  103. data/ext/gtk2/rbgtkgamma.c +3 -6
  104. data/ext/gtk2/rbgtkhandlebox.c +2 -4
  105. data/ext/gtk2/rbgtkhbbox.c +1 -2
  106. data/ext/gtk2/rbgtkhbox.c +1 -4
  107. data/ext/gtk2/rbgtkhpaned.c +1 -2
  108. data/ext/gtk2/rbgtkhruler.c +1 -2
  109. data/ext/gtk2/rbgtkhscale.c +1 -4
  110. data/ext/gtk2/rbgtkhscrollbar.c +1 -4
  111. data/ext/gtk2/rbgtkhseparator.c +1 -2
  112. data/ext/gtk2/rbgtkiconfactory.c +6 -12
  113. data/ext/gtk2/rbgtkiconinfo.c +8 -16
  114. data/ext/gtk2/rbgtkiconset.c +4 -12
  115. data/ext/gtk2/rbgtkiconsize.c +6 -12
  116. data/ext/gtk2/rbgtkiconsource.c +17 -34
  117. data/ext/gtk2/rbgtkicontheme.c +16 -32
  118. data/ext/gtk2/rbgtkiconview.c +23 -50
  119. data/ext/gtk2/rbgtkimage.c +3 -10
  120. data/ext/gtk2/rbgtkimagemenuitem.c +1 -4
  121. data/ext/gtk2/rbgtkimcontext.c +11 -22
  122. data/ext/gtk2/rbgtkimcontextsimple.c +2 -4
  123. data/ext/gtk2/rbgtkimmulticontext.c +2 -4
  124. data/ext/gtk2/rbgtkinputdialog.c +1 -2
  125. data/ext/gtk2/rbgtkinvisible.c +3 -8
  126. data/ext/gtk2/rbgtkitem.c +3 -6
  127. data/ext/gtk2/rbgtkitemfactory.c +13 -34
  128. data/ext/gtk2/rbgtklabel.c +10 -26
  129. data/ext/gtk2/rbgtklayout.c +6 -14
  130. data/ext/gtk2/rbgtklinkbutton.c +3 -10
  131. data/ext/gtk2/rbgtkliststore.c +15 -36
  132. data/ext/gtk2/rbgtkmain.c +32 -68
  133. data/ext/gtk2/rbgtkmenu.c +21 -46
  134. data/ext/gtk2/rbgtkmenubar.c +1 -2
  135. data/ext/gtk2/rbgtkmenuitem.c +12 -26
  136. data/ext/gtk2/rbgtkmenushell.c +9 -18
  137. data/ext/gtk2/rbgtkmenutoolbutton.c +2 -8
  138. data/ext/gtk2/rbgtkmessagedialog.c +4 -10
  139. data/ext/gtk2/rbgtkmisc.c +4 -8
  140. data/ext/gtk2/rbgtknotebook.c +53 -79
  141. data/ext/gtk2/rbgtkobject.c +7 -14
  142. data/ext/gtk2/rbgtkoptionmenu.c +4 -8
  143. data/ext/gtk2/rbgtkpaned.c +10 -20
  144. data/ext/gtk2/rbgtkplug.c +3 -8
  145. data/ext/gtk2/rbgtkprintsettings.c +1 -4
  146. data/ext/gtk2/rbgtkprogressbar.c +2 -4
  147. data/ext/gtk2/rbgtkradioaction.c +4 -8
  148. data/ext/gtk2/rbgtkradiobutton.c +3 -8
  149. data/ext/gtk2/rbgtkradiomenuitem.c +4 -10
  150. data/ext/gtk2/rbgtkradiotoolbutton.c +3 -8
  151. data/ext/gtk2/rbgtkrange.c +4 -8
  152. data/ext/gtk2/rbgtkrc.c +16 -34
  153. data/ext/gtk2/rbgtkrcstyle.c +13 -26
  154. data/ext/gtk2/rbgtkrecentaction.c +1 -4
  155. data/ext/gtk2/rbgtkrecentchooser.c +18 -38
  156. data/ext/gtk2/rbgtkrecentchooserdialog.c +1 -4
  157. data/ext/gtk2/rbgtkrecentchoosermenu.c +1 -4
  158. data/ext/gtk2/rbgtkrecentchooserwidget.c +1 -4
  159. data/ext/gtk2/rbgtkrecentdata.c +7 -14
  160. data/ext/gtk2/rbgtkrecentfilter.c +14 -29
  161. data/ext/gtk2/rbgtkrecentfilterinfo.c +11 -22
  162. data/ext/gtk2/rbgtkrecentinfo.c +21 -42
  163. data/ext/gtk2/rbgtkrecentmanager.c +11 -24
  164. data/ext/gtk2/rbgtkruler.c +6 -12
  165. data/ext/gtk2/rbgtkscale.c +2 -4
  166. data/ext/gtk2/rbgtkscalebutton.c +6 -14
  167. data/ext/gtk2/rbgtkscrolledwindow.c +9 -20
  168. data/ext/gtk2/rbgtkselection.c +10 -22
  169. data/ext/gtk2/rbgtkselectiondata.c +19 -41
  170. data/ext/gtk2/rbgtkseparatormenuitem.c +1 -2
  171. data/ext/gtk2/rbgtkseparatortoolitem.c +1 -2
  172. data/ext/gtk2/rbgtksettings.c +10 -22
  173. data/ext/gtk2/rbgtksizegroup.c +4 -8
  174. data/ext/gtk2/rbgtksocket.c +4 -8
  175. data/ext/gtk2/rbgtkspinbutton.c +9 -20
  176. data/ext/gtk2/rbgtkspinner.c +51 -0
  177. data/ext/gtk2/rbgtkstatusbar.c +7 -14
  178. data/ext/gtk2/rbgtkstatusicon.c +5 -10
  179. data/ext/gtk2/rbgtkstock.c +5 -13
  180. data/ext/gtk2/rbgtkstyle.c +51 -139
  181. data/ext/gtk2/rbgtktable.c +14 -33
  182. data/ext/gtk2/rbgtktargetlist.c +9 -18
  183. data/ext/gtk2/rbgtktearoffmenuitem.c +1 -2
  184. data/ext/gtk2/rbgtktextappearance.c +11 -22
  185. data/ext/gtk2/rbgtktextattributes.c +16 -32
  186. data/ext/gtk2/rbgtktextbuffer.c +69 -162
  187. data/ext/gtk2/rbgtktextchild.c +3 -8
  188. data/ext/gtk2/rbgtktextiter.c +34 -81
  189. data/ext/gtk2/rbgtktextmark.c +7 -14
  190. data/ext/gtk2/rbgtktexttag.c +4 -10
  191. data/ext/gtk2/rbgtktexttagtable.c +7 -15
  192. data/ext/gtk2/rbgtktextview.c +30 -62
  193. data/ext/gtk2/rbgtktoggleaction.c +4 -8
  194. data/ext/gtk2/rbgtktogglebutton.c +4 -10
  195. data/ext/gtk2/rbgtktoggletoolbutton.c +3 -8
  196. data/ext/gtk2/rbgtktoolbar.c +20 -46
  197. data/ext/gtk2/rbgtktoolbutton.c +1 -4
  198. data/ext/gtk2/rbgtktoolitem.c +16 -34
  199. data/ext/gtk2/rbgtktooltip.c +5 -10
  200. data/ext/gtk2/rbgtktooltips.c +7 -14
  201. data/ext/gtk2/rbgtktreeiter.c +14 -29
  202. data/ext/gtk2/rbgtktreemodel.c +16 -37
  203. data/ext/gtk2/rbgtktreemodelfilter.c +13 -36
  204. data/ext/gtk2/rbgtktreemodelsort.c +8 -16
  205. data/ext/gtk2/rbgtktreepath.c +13 -28
  206. data/ext/gtk2/rbgtktreerowreference.c +9 -20
  207. data/ext/gtk2/rbgtktreeselection.c +20 -47
  208. data/ext/gtk2/rbgtktreesortable.c +7 -18
  209. data/ext/gtk2/rbgtktreestore.c +17 -40
  210. data/ext/gtk2/rbgtktreeview.c +58 -138
  211. data/ext/gtk2/rbgtktreeviewcolumn.c +20 -46
  212. data/ext/gtk2/rbgtkuimanager.c +12 -26
  213. data/ext/gtk2/rbgtkvbbox.c +1 -2
  214. data/ext/gtk2/rbgtkvbox.c +1 -4
  215. data/ext/gtk2/rbgtkviewport.c +1 -2
  216. data/ext/gtk2/rbgtkvolumebutton.c +1 -2
  217. data/ext/gtk2/rbgtkvpaned.c +1 -2
  218. data/ext/gtk2/rbgtkvruler.c +1 -2
  219. data/ext/gtk2/rbgtkvscale.c +1 -4
  220. data/ext/gtk2/rbgtkvscrollbar.c +1 -4
  221. data/ext/gtk2/rbgtkvseparator.c +1 -2
  222. data/ext/gtk2/rbgtkwidget.c +126 -264
  223. data/ext/gtk2/rbgtkwindow.c +69 -142
  224. data/ext/gtk2/rbgtkwindowgroup.c +3 -6
  225. data/lib/1.8/gtk2.so +0 -0
  226. data/lib/1.9/gtk2.so +0 -0
  227. data/lib/gtk2/base.rb +1 -2
  228. data/sample/gtk-demo/main.rb +2 -0
  229. data/sample/gtk-demo/textview.rb +1 -0
  230. metadata +15 -13
@@ -15,8 +15,7 @@
15
15
  #include "global.h"
16
16
 
17
17
  static VALUE
18
- mbar_initialize(self)
19
- VALUE self;
18
+ mbar_initialize(VALUE self)
20
19
  {
21
20
  RBGTK_INITIALIZE(self, gtk_menu_bar_new());
22
21
  return Qnil;
@@ -17,10 +17,7 @@
17
17
  #define _SELF(s) (GTK_MENU_ITEM(RVAL2GOBJ(s)))
18
18
 
19
19
  static VALUE
20
- mitem_initialize(argc, argv, self)
21
- int argc;
22
- VALUE *argv;
23
- VALUE self;
20
+ mitem_initialize(int argc, VALUE *argv, VALUE self)
24
21
  {
25
22
  const gchar *label = NULL;
26
23
  VALUE rb_label, use_underline;
@@ -45,16 +42,14 @@ mitem_initialize(argc, argv, self)
45
42
  }
46
43
 
47
44
  static VALUE
48
- mitem_set_right_justified(self, right_justified)
49
- VALUE self, right_justified;
45
+ mitem_set_right_justified(VALUE self, VALUE right_justified)
50
46
  {
51
47
  gtk_menu_item_set_right_justified(_SELF(self), RVAL2CBOOL(right_justified));
52
48
  return self;
53
49
  }
54
50
 
55
51
  static VALUE
56
- mitem_set_submenu(self, child)
57
- VALUE self, child;
52
+ mitem_set_submenu(VALUE self, VALUE child)
58
53
  {
59
54
  GtkMenuItem *item;
60
55
  GtkWidget *submenu;
@@ -70,16 +65,14 @@ mitem_set_submenu(self, child)
70
65
  }
71
66
 
72
67
  static VALUE
73
- mitem_set_accel_path(self, accel_path)
74
- VALUE self, accel_path;
68
+ mitem_set_accel_path(VALUE self, VALUE accel_path)
75
69
  {
76
70
  gtk_menu_item_set_accel_path(_SELF(self), RVAL2CSTR(accel_path));
77
71
  return self;
78
72
  }
79
73
 
80
74
  static VALUE
81
- mitem_remove_submenu(self)
82
- VALUE self;
75
+ mitem_remove_submenu(VALUE self)
83
76
  {
84
77
  GtkMenuItem *item;
85
78
  GtkWidget *submenu;
@@ -94,32 +87,28 @@ mitem_remove_submenu(self)
94
87
  }
95
88
 
96
89
  static VALUE
97
- mitem_select(self)
98
- VALUE self;
90
+ mitem_select(VALUE self)
99
91
  {
100
92
  gtk_menu_item_select(_SELF(self));
101
93
  return self;
102
94
  }
103
95
 
104
96
  static VALUE
105
- mitem_deselect(self)
106
- VALUE self;
97
+ mitem_deselect(VALUE self)
107
98
  {
108
99
  gtk_menu_item_deselect(_SELF(self));
109
100
  return self;
110
101
  }
111
102
 
112
103
  static VALUE
113
- mitem_activate(self)
114
- VALUE self;
104
+ mitem_activate(VALUE self)
115
105
  {
116
106
  gtk_menu_item_activate(_SELF(self));
117
107
  return self;
118
108
  }
119
109
 
120
110
  static VALUE
121
- mitem_toggle_size_request(self)
122
- VALUE self;
111
+ mitem_toggle_size_request(VALUE self)
123
112
  {
124
113
  gint requisition;
125
114
  gtk_menu_item_toggle_size_request(_SELF(self), &requisition);
@@ -127,23 +116,20 @@ mitem_toggle_size_request(self)
127
116
  }
128
117
 
129
118
  static VALUE
130
- mitem_toggle_size_allocate(self, allocation)
131
- VALUE self, allocation;
119
+ mitem_toggle_size_allocate(VALUE self, VALUE allocation)
132
120
  {
133
121
  gtk_menu_item_toggle_size_allocate(_SELF(self), NUM2INT(allocation));
134
122
  return self;
135
123
  }
136
124
 
137
125
  static VALUE
138
- mitem_get_right_justified(self)
139
- VALUE self;
126
+ mitem_get_right_justified(VALUE self)
140
127
  {
141
128
  return CBOOL2RVAL(gtk_menu_item_get_right_justified(_SELF(self)));
142
129
  }
143
130
 
144
131
  static VALUE
145
- mitem_get_submenu(self)
146
- VALUE self;
132
+ mitem_get_submenu(VALUE self)
147
133
  {
148
134
  GtkWidget* submenu = gtk_menu_item_get_submenu(_SELF(self));
149
135
  return submenu ? GOBJ2RVAL(submenu) : Qnil;
@@ -18,8 +18,7 @@
18
18
  #define RVAL2WIDGET(w) (GTK_WIDGET(RVAL2GOBJ(w)))
19
19
 
20
20
  static VALUE
21
- mshell_append(self, child)
22
- VALUE self, child;
21
+ mshell_append(VALUE self, VALUE child)
23
22
  {
24
23
  gtk_menu_shell_append(_SELF(self),RVAL2WIDGET(child));
25
24
  G_CHILD_ADD(self, child);
@@ -27,8 +26,7 @@ mshell_append(self, child)
27
26
  }
28
27
 
29
28
  static VALUE
30
- mshell_prepend(self, child)
31
- VALUE self, child;
29
+ mshell_prepend(VALUE self, VALUE child)
32
30
  {
33
31
  gtk_menu_shell_prepend(_SELF(self), RVAL2WIDGET(child));
34
32
  G_CHILD_ADD(self, child);
@@ -36,8 +34,7 @@ mshell_prepend(self, child)
36
34
  }
37
35
 
38
36
  static VALUE
39
- mshell_insert(self, child, pos)
40
- VALUE self, child, pos;
37
+ mshell_insert(VALUE self, VALUE child, VALUE pos)
41
38
  {
42
39
  gtk_menu_shell_insert(_SELF(self), RVAL2WIDGET(child),
43
40
  NUM2INT(pos));
@@ -46,16 +43,14 @@ mshell_insert(self, child, pos)
46
43
  }
47
44
 
48
45
  static VALUE
49
- mshell_deactivate(self)
50
- VALUE self;
46
+ mshell_deactivate(VALUE self)
51
47
  {
52
48
  gtk_menu_shell_deactivate(_SELF(self));
53
49
  return self;
54
50
  }
55
51
 
56
52
  static VALUE
57
- mshell_select_item(self, menu_item)
58
- VALUE self, menu_item;
53
+ mshell_select_item(VALUE self, VALUE menu_item)
59
54
  {
60
55
  gtk_menu_shell_select_item(_SELF(self), RVAL2WIDGET(menu_item));
61
56
  return self;
@@ -63,8 +58,7 @@ mshell_select_item(self, menu_item)
63
58
 
64
59
  #if GTK_CHECK_VERSION(2,2,0)
65
60
  static VALUE
66
- mshell_select_first(self, search_sensitive)
67
- VALUE self, search_sensitive;
61
+ mshell_select_first(VALUE self, VALUE search_sensitive)
68
62
  {
69
63
  gtk_menu_shell_select_first(_SELF(self), RVAL2CBOOL(search_sensitive));
70
64
  return self;
@@ -72,16 +66,14 @@ mshell_select_first(self, search_sensitive)
72
66
  #endif
73
67
 
74
68
  static VALUE
75
- mshell_deselect(self)
76
- VALUE self;
69
+ mshell_deselect(VALUE self)
77
70
  {
78
71
  gtk_menu_shell_deselect(_SELF(self));
79
72
  return self;
80
73
  }
81
74
 
82
75
  static VALUE
83
- mshell_activate_item(self, menu_item, force_deactivate)
84
- VALUE self, menu_item, force_deactivate;
76
+ mshell_activate_item(VALUE self, VALUE menu_item, VALUE force_deactivate)
85
77
  {
86
78
  gtk_menu_shell_activate_item(_SELF(self), RVAL2WIDGET(menu_item),
87
79
  RVAL2CBOOL(force_deactivate));
@@ -90,8 +82,7 @@ mshell_activate_item(self, menu_item, force_deactivate)
90
82
 
91
83
  #if GTK_CHECK_VERSION(2,4,0)
92
84
  static VALUE
93
- mshell_cancel(self)
94
- VALUE self;
85
+ mshell_cancel(VALUE self)
95
86
  {
96
87
  gtk_menu_shell_cancel(_SELF(self));
97
88
  return self;
@@ -16,10 +16,7 @@
16
16
  #define _SELF(self) (GTK_MENU_TOOL_BUTTON(RVAL2GOBJ(self)))
17
17
 
18
18
  static VALUE
19
- menutoolbutton_initialize(argc, argv, self)
20
- int argc;
21
- VALUE *argv;
22
- VALUE self;
19
+ menutoolbutton_initialize(int argc, VALUE *argv, VALUE self)
23
20
  {
24
21
  GtkToolItem* item;
25
22
 
@@ -47,10 +44,7 @@ menutoolbutton_initialize(argc, argv, self)
47
44
  }
48
45
 
49
46
  static VALUE
50
- menutoolbutton_set_arrow_tooltip(argc, argv, self)
51
- int argc;
52
- VALUE *argv;
53
- VALUE self;
47
+ menutoolbutton_set_arrow_tooltip(int argc, VALUE *argv, VALUE self)
54
48
  {
55
49
  VALUE tooltips, tip_text, tip_private;
56
50
 
@@ -14,10 +14,7 @@
14
14
  #define _SELF(s) (GTK_MESSAGE_DIALOG(RVAL2GOBJ(s)))
15
15
 
16
16
  static VALUE
17
- mdiag_initialize(argc, argv, self)
18
- int argc;
19
- VALUE *argv;
20
- VALUE self;
17
+ mdiag_initialize(int argc, VALUE *argv, VALUE self)
21
18
  {
22
19
  VALUE parent, flags, type, buttons, message;
23
20
  GtkWidget* w;
@@ -46,8 +43,7 @@ GtkWidget* gtk_message_dialog_new_with_markup
46
43
  */
47
44
  #if GTK_CHECK_VERSION(2,4,0)
48
45
  static VALUE
49
- mdiag_set_markup(self, str)
50
- VALUE self, str;
46
+ mdiag_set_markup(VALUE self, VALUE str)
51
47
  {
52
48
  gtk_message_dialog_set_markup(_SELF(self), RVAL2CSTR(str));
53
49
  return self;
@@ -61,16 +57,14 @@ void gtk_message_dialog_set_image (GtkMessageDialog *dialog,
61
57
 
62
58
  #if GTK_CHECK_VERSION(2,6,0)
63
59
  static VALUE
64
- mdiag_format_secondary_text(self, text)
65
- VALUE self, text;
60
+ mdiag_format_secondary_text(VALUE self, VALUE text)
66
61
  {
67
62
  gtk_message_dialog_format_secondary_text(_SELF(self), RVAL2CSTR(text), NULL);
68
63
  return self;
69
64
  }
70
65
 
71
66
  static VALUE
72
- mdiag_format_secondary_markup(self, markup)
73
- VALUE self, markup;
67
+ mdiag_format_secondary_markup(VALUE self, VALUE markup)
74
68
  {
75
69
  gtk_message_dialog_format_secondary_markup(_SELF(self), RVAL2CSTR(markup), NULL);
76
70
  return self;
@@ -17,24 +17,21 @@
17
17
  #define _SELF(s) (GTK_MISC(RVAL2GOBJ(s)))
18
18
 
19
19
  static VALUE
20
- misc_set_align(self, xalign, yalign)
21
- VALUE self, xalign, yalign;
20
+ misc_set_align(VALUE self, VALUE xalign, VALUE yalign)
22
21
  {
23
22
  gtk_misc_set_alignment(_SELF(self), NUM2DBL(xalign), NUM2DBL(yalign));
24
23
  return self;
25
24
  }
26
25
 
27
26
  static VALUE
28
- misc_set_padding(self, xpad, ypad)
29
- VALUE self, xpad, ypad;
27
+ misc_set_padding(VALUE self, VALUE xpad, VALUE ypad)
30
28
  {
31
29
  gtk_misc_set_padding(_SELF(self), NUM2DBL(xpad), NUM2DBL(ypad));
32
30
  return self;
33
31
  }
34
32
 
35
33
  static VALUE
36
- misc_get_align(self)
37
- VALUE self;
34
+ misc_get_align(VALUE self)
38
35
  {
39
36
  gfloat xalign, yalign;
40
37
  gtk_misc_get_alignment(_SELF(self), &xalign, &yalign);
@@ -43,8 +40,7 @@ misc_get_align(self)
43
40
  }
44
41
 
45
42
  static VALUE
46
- misc_get_padding(self)
47
- VALUE self;
43
+ misc_get_padding(VALUE self)
48
44
  {
49
45
  gint xpad, ypad;
50
46
  gtk_misc_get_padding(_SELF(self), &xpad, &ypad);
@@ -19,18 +19,14 @@
19
19
  #define GTK_TYPE_NOTEBOOK_PAGE (gtk_notebookpage_get_type())
20
20
 
21
21
  static VALUE
22
- note_initialize(self)
23
- VALUE self;
22
+ note_initialize(VALUE self)
24
23
  {
25
24
  RBGTK_INITIALIZE(self, gtk_notebook_new());
26
25
  return Qnil;
27
26
  }
28
27
 
29
28
  static VALUE
30
- note_append_page(argc, argv, self)
31
- int argc;
32
- VALUE *argv;
33
- VALUE self;
29
+ note_append_page(int argc, VALUE *argv, VALUE self)
34
30
  {
35
31
  VALUE child, label;
36
32
 
@@ -44,10 +40,7 @@ note_append_page(argc, argv, self)
44
40
  }
45
41
 
46
42
  static VALUE
47
- note_append_page_menu(argc, argv, self)
48
- int argc;
49
- VALUE *argv;
50
- VALUE self;
43
+ note_append_page_menu(int argc, VALUE *argv, VALUE self)
51
44
  {
52
45
  VALUE child, tab_label, menu_label;
53
46
 
@@ -61,10 +54,7 @@ note_append_page_menu(argc, argv, self)
61
54
  }
62
55
 
63
56
  static VALUE
64
- note_prepend_page(argc, argv, self)
65
- int argc;
66
- VALUE *argv;
67
- VALUE self;
57
+ note_prepend_page(int argc, VALUE *argv, VALUE self)
68
58
  {
69
59
  VALUE child, label;
70
60
 
@@ -76,10 +66,7 @@ note_prepend_page(argc, argv, self)
76
66
  }
77
67
 
78
68
  static VALUE
79
- note_prepend_page_menu(argc, argv, self)
80
- int argc;
81
- VALUE *argv;
82
- VALUE self;
69
+ note_prepend_page_menu(int argc, VALUE *argv, VALUE self)
83
70
  {
84
71
  VALUE child, tab_label, menu_label;
85
72
 
@@ -93,10 +80,7 @@ note_prepend_page_menu(argc, argv, self)
93
80
  }
94
81
 
95
82
  static VALUE
96
- note_insert_page(argc, argv, self)
97
- int argc;
98
- VALUE *argv;
99
- VALUE self;
83
+ note_insert_page(int argc, VALUE *argv, VALUE self)
100
84
  {
101
85
  VALUE pos, child, label;
102
86
 
@@ -109,10 +93,7 @@ note_insert_page(argc, argv, self)
109
93
  }
110
94
 
111
95
  static VALUE
112
- note_insert_page_menu(argc, argv, self)
113
- int argc;
114
- VALUE *argv;
115
- VALUE self;
96
+ note_insert_page_menu(int argc, VALUE *argv, VALUE self)
116
97
  {
117
98
  VALUE pos, child, tab_label, menu_label;
118
99
 
@@ -126,40 +107,35 @@ note_insert_page_menu(argc, argv, self)
126
107
  }
127
108
 
128
109
  static VALUE
129
- note_remove_page(self, pos)
130
- VALUE self, pos;
110
+ note_remove_page(VALUE self, VALUE pos)
131
111
  {
132
112
  gtk_notebook_remove_page(_SELF(self), NUM2INT(pos));
133
113
  return self;
134
114
  }
135
115
 
136
116
  static VALUE
137
- note_page_num(self, child)
138
- VALUE self, child;
117
+ note_page_num(VALUE self, VALUE child)
139
118
  {
140
119
  return INT2FIX(gtk_notebook_page_num(_SELF(self),
141
120
  RVAL2WIDGET(child)));
142
121
  }
143
122
 
144
123
  static VALUE
145
- note_next_page(self)
146
- VALUE self;
124
+ note_next_page(VALUE self)
147
125
  {
148
126
  gtk_notebook_next_page(_SELF(self));
149
127
  return self;
150
128
  }
151
129
 
152
130
  static VALUE
153
- note_prev_page(self)
154
- VALUE self;
131
+ note_prev_page(VALUE self)
155
132
  {
156
133
  gtk_notebook_prev_page(_SELF(self));
157
134
  return self;
158
135
  }
159
136
 
160
137
  static VALUE
161
- note_reorder_child(self, child, pos)
162
- VALUE self, child, pos;
138
+ note_reorder_child(VALUE self, VALUE child, VALUE pos)
163
139
  {
164
140
  gtk_notebook_reorder_child(_SELF(self), RVAL2WIDGET(child),
165
141
  NUM2INT(pos));
@@ -167,16 +143,14 @@ note_reorder_child(self, child, pos)
167
143
  }
168
144
 
169
145
  static VALUE
170
- note_get_menu_label(self, child)
171
- VALUE self, child;
146
+ note_get_menu_label(VALUE self, VALUE child)
172
147
  {
173
148
  return GOBJ2RVAL(gtk_notebook_get_menu_label(_SELF(self),
174
149
  RVAL2WIDGET(child)));
175
150
  }
176
151
 
177
152
  static VALUE
178
- note_get_nth_page(self, page_num)
179
- VALUE self, page_num;
153
+ note_get_nth_page(VALUE self, VALUE page_num)
180
154
  {
181
155
  GtkWidget *page = gtk_notebook_get_nth_page(_SELF(self),
182
156
  NUM2INT(page_num));
@@ -185,24 +159,21 @@ note_get_nth_page(self, page_num)
185
159
 
186
160
  #if GTK_CHECK_VERSION(2,2,0)
187
161
  static VALUE
188
- note_get_n_pages(self)
189
- VALUE self;
162
+ note_get_n_pages(VALUE self)
190
163
  {
191
164
  return INT2NUM(gtk_notebook_get_n_pages(_SELF(self)));
192
165
  }
193
166
  #endif
194
167
 
195
168
  static VALUE
196
- note_get_tab_label(self, child)
197
- VALUE self, child;
169
+ note_get_tab_label(VALUE self, VALUE child)
198
170
  {
199
171
  return GOBJ2RVAL(gtk_notebook_get_tab_label(_SELF(self),
200
172
  RVAL2WIDGET(child)));
201
173
  }
202
174
 
203
175
  static VALUE
204
- note_query_tab_label_packing(self, child)
205
- VALUE self, child;
176
+ note_query_tab_label_packing(VALUE self, VALUE child)
206
177
  {
207
178
  gboolean expand, fill;
208
179
  GtkPackType pack_type;
@@ -219,8 +190,7 @@ note_query_tab_label_packing(self, child)
219
190
  }
220
191
 
221
192
  static VALUE
222
- note_set_menu_label(self, child, label)
223
- VALUE self, child, label;
193
+ note_set_menu_label(VALUE self, VALUE child, VALUE label)
224
194
  {
225
195
  gtk_notebook_set_menu_label(_SELF(self),
226
196
  RVAL2WIDGET(child),
@@ -229,8 +199,7 @@ note_set_menu_label(self, child, label)
229
199
  }
230
200
 
231
201
  static VALUE
232
- note_set_menu_label_text(self, child, text)
233
- VALUE self, child, text;
202
+ note_set_menu_label_text(VALUE self, VALUE child, VALUE text)
234
203
  {
235
204
  gtk_notebook_set_menu_label_text(_SELF(self),
236
205
  RVAL2WIDGET(child),
@@ -239,8 +208,7 @@ note_set_menu_label_text(self, child, text)
239
208
  }
240
209
 
241
210
  static VALUE
242
- note_set_tab_label(self, child, label)
243
- VALUE self, child, label;
211
+ note_set_tab_label(VALUE self, VALUE child, VALUE label)
244
212
  {
245
213
  gtk_notebook_set_tab_label(_SELF(self),
246
214
  RVAL2WIDGET(child),
@@ -249,8 +217,7 @@ note_set_tab_label(self, child, label)
249
217
  }
250
218
 
251
219
  static VALUE
252
- note_set_tab_label_packing(self, child, expand, fill, pack_type)
253
- VALUE self, child, expand, fill, pack_type;
220
+ note_set_tab_label_packing(VALUE self, VALUE child, VALUE expand, VALUE fill, VALUE pack_type)
254
221
  {
255
222
  gtk_notebook_set_tab_label_packing(_SELF(self),
256
223
  RVAL2WIDGET(child),
@@ -260,8 +227,7 @@ note_set_tab_label_packing(self, child, expand, fill, pack_type)
260
227
  }
261
228
 
262
229
  static VALUE
263
- note_set_tab_label_text(self, child, text)
264
- VALUE self, child, text;
230
+ note_set_tab_label_text(VALUE self, VALUE child, VALUE text)
265
231
  {
266
232
  gtk_notebook_set_tab_label_text(_SELF(self),
267
233
  RVAL2WIDGET(child),
@@ -270,16 +236,14 @@ note_set_tab_label_text(self, child, text)
270
236
  }
271
237
 
272
238
  static VALUE
273
- note_get_menu_label_text(self, child)
274
- VALUE self, child;
239
+ note_get_menu_label_text(VALUE self, VALUE child)
275
240
  {
276
241
  return CSTR2RVAL(gtk_notebook_get_menu_label_text(_SELF(self),
277
242
  RVAL2WIDGET(child)));
278
243
  }
279
244
 
280
245
  static VALUE
281
- note_get_tab_label_text(self, child)
282
- VALUE self, child;
246
+ note_get_tab_label_text(VALUE self, VALUE child)
283
247
  {
284
248
  return CSTR2RVAL(gtk_notebook_get_tab_label_text(_SELF(self),
285
249
  RVAL2WIDGET(child)));
@@ -287,15 +251,13 @@ note_get_tab_label_text(self, child)
287
251
 
288
252
  #if GTK_CHECK_VERSION(2,10,0)
289
253
  static VALUE
290
- note_get_tab_reorderable(self, child)
291
- VALUE self, child;
254
+ note_get_tab_reorderable(VALUE self, VALUE child)
292
255
  {
293
256
  return CBOOL2RVAL(gtk_notebook_get_tab_reorderable(_SELF(self),
294
257
  GTK_WIDGET(RVAL2GOBJ(child))));
295
258
  }
296
259
  static VALUE
297
- note_set_tab_reorderable(self, child, reorderable)
298
- VALUE self, child, reorderable;
260
+ note_set_tab_reorderable(VALUE self, VALUE child, VALUE reorderable)
299
261
  {
300
262
  gtk_notebook_set_tab_reorderable(_SELF(self), GTK_WIDGET(RVAL2GOBJ(child)),
301
263
  RVAL2CBOOL(reorderable));
@@ -303,15 +265,13 @@ note_set_tab_reorderable(self, child, reorderable)
303
265
  }
304
266
 
305
267
  static VALUE
306
- note_get_tab_detachable(self, child)
307
- VALUE self, child;
268
+ note_get_tab_detachable(VALUE self, VALUE child)
308
269
  {
309
270
  return CBOOL2RVAL(gtk_notebook_get_tab_detachable(_SELF(self),
310
271
  GTK_WIDGET(RVAL2GOBJ(child))));
311
272
  }
312
273
  static VALUE
313
- note_set_tab_detachable(self, child, detachable)
314
- VALUE self, child, detachable;
274
+ note_set_tab_detachable(VALUE self, VALUE child, VALUE detachable)
315
275
  {
316
276
  gtk_notebook_set_tab_detachable(_SELF(self), GTK_WIDGET(RVAL2GOBJ(child)),
317
277
  RVAL2CBOOL(detachable));
@@ -319,12 +279,7 @@ note_set_tab_detachable(self, child, detachable)
319
279
  }
320
280
 
321
281
  static GtkNotebook*
322
- creation_func(source, page, x, y, func)
323
- GtkNotebook *source;
324
- GtkWidget *page;
325
- gint x;
326
- gint y;
327
- gpointer func;
282
+ creation_func(GtkNotebook *source, GtkWidget *page, gint x, gint y, gpointer func)
328
283
  {
329
284
  VALUE ret;
330
285
  ret = rb_funcall((VALUE)func, id_call, 4, GOBJ2RVAL(source), GOBJ2RVAL(page),
@@ -333,8 +288,7 @@ creation_func(source, page, x, y, func)
333
288
  }
334
289
 
335
290
  static VALUE
336
- note_set_window_creation_hook(self)
337
- VALUE self;
291
+ note_set_window_creation_hook(VALUE self)
338
292
  {
339
293
  VALUE func = rb_block_proc();
340
294
  G_RELATIVE(self, func);
@@ -344,6 +298,24 @@ note_set_window_creation_hook(self)
344
298
  }
345
299
  #endif
346
300
 
301
+ #if GTK_CHECK_VERSION(2,20,0)
302
+ static VALUE
303
+ note_set_action_widget(VALUE self, VALUE widget, VALUE pack_type)
304
+ {
305
+ gtk_notebook_set_action_widget(_SELF(self),
306
+ RVAL2WIDGET(widget),
307
+ RVAL2GENUM(pack_type, GTK_TYPE_PACK_TYPE));
308
+ return self;
309
+ }
310
+
311
+ static VALUE
312
+ note_get_action_widget(VALUE self, VALUE pack_type)
313
+ {
314
+ return GOBJ2RVAL(gtk_notebook_get_action_widget(_SELF(self),
315
+ RVAL2GENUM(pack_type, GTK_TYPE_PACK_TYPE)));
316
+ }
317
+ #endif
318
+
347
319
  /***********************************************/
348
320
  /*
349
321
  * Gtk::NotebookPage
@@ -375,9 +347,7 @@ gtk_notebookpage_get_type(void)
375
347
  }
376
348
 
377
349
  static VALUE
378
- signal_g2r_func(num, values)
379
- guint num;
380
- const GValue* values;
350
+ signal_g2r_func(guint num, const GValue *values)
381
351
  {
382
352
  GtkNotebookPageData npp;
383
353
  npp.parent = GVAL2RVAL(&values[0]);
@@ -474,6 +444,10 @@ Init_gtk_notebook()
474
444
  rb_define_method(gNotebook, "get_tab_detachable", note_get_tab_detachable, 1);
475
445
  rb_define_method(gNotebook, "set_tab_detachable", note_set_tab_detachable, 2);
476
446
  rb_define_singleton_method(gNotebook, "set_window_creation_hook", note_set_window_creation_hook, 0);
447
+ #endif
448
+ #if GTK_CHECK_VERSION(2,20,0)
449
+ rb_define_method(gNotebook, "set_action_widget", note_set_action_widget, 2);
450
+ rb_define_method(gNotebook, "get_action_widget", note_get_action_widget, 1);
477
451
  #endif
478
452
  /* GtkNotebookTab */
479
453
  rb_define_const(gNotebook, "TAB_FIRST", GTK_NOTEBOOK_TAB_FIRST);