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
@@ -51,14 +51,12 @@ attr_initialize(VALUE self, VALUE width, VALUE height, VALUE wclass,
51
51
 
52
52
  #define ATTR_STR(name)\
53
53
  static VALUE \
54
- attr_get_ ## name (self)\
55
- VALUE self;\
54
+ attr_get_ ## name (VALUE self)\
56
55
  {\
57
56
  return CSTR2RVAL(_SELF(self)->name);\
58
57
  }\
59
58
  static VALUE \
60
- attr_set_ ## name (self, val)\
61
- VALUE self, val;\
59
+ attr_set_ ## name (VALUE self, VALUE val)\
62
60
  {\
63
61
  _SELF(self)->name = RVAL2CSTR(val);\
64
62
  return self;\
@@ -66,14 +64,12 @@ attr_set_ ## name (self, val)\
66
64
 
67
65
  #define ATTR_INT(name)\
68
66
  static VALUE \
69
- attr_get_ ## name (self)\
70
- VALUE self;\
67
+ attr_get_ ## name (VALUE self)\
71
68
  {\
72
69
  return INT2NUM(_SELF(self)->name);\
73
70
  }\
74
71
  static VALUE \
75
- attr_set_ ## name (self, val)\
76
- VALUE self, val;\
72
+ attr_set_ ## name (VALUE self, VALUE val)\
77
73
  {\
78
74
  _SELF(self)->name = NUM2INT(val);\
79
75
  return self;\
@@ -87,70 +83,60 @@ ATTR_INT(width);
87
83
  ATTR_INT(height);
88
84
 
89
85
  static VALUE
90
- attr_get_wclass(self)
91
- VALUE self;
86
+ attr_get_wclass(VALUE self)
92
87
  {
93
88
  return GENUM2RVAL(_SELF(self)->wclass, GDK_TYPE_WINDOW_CLASS);
94
89
  }
95
90
  static VALUE
96
- attr_set_wclass(self, val)
97
- VALUE self, val;
91
+ attr_set_wclass(VALUE self, VALUE val)
98
92
  {
99
93
  _SELF(self)->wclass = RVAL2GENUM(val, GDK_TYPE_WINDOW_CLASS);
100
94
  return self;
101
95
  }
102
96
 
103
97
  static VALUE
104
- attr_get_visual(self)
105
- VALUE self;
98
+ attr_get_visual(VALUE self)
106
99
  {
107
100
  return GOBJ2RVAL(_SELF(self)->visual);
108
101
  }
109
102
  static VALUE
110
- attr_set_visual(self, val)
111
- VALUE self, val;
103
+ attr_set_visual(VALUE self, VALUE val)
112
104
  {
113
105
  _SELF(self)->visual = GDK_VISUAL(RVAL2GOBJ(val));
114
106
  return self;
115
107
  }
116
108
 
117
109
  static VALUE
118
- attr_get_colormap(self)
119
- VALUE self;
110
+ attr_get_colormap(VALUE self)
120
111
  {
121
112
  return GOBJ2RVAL(_SELF(self)->colormap);
122
113
  }
123
114
  static VALUE
124
- attr_set_colormap(self, val)
125
- VALUE self, val;
115
+ attr_set_colormap(VALUE self, VALUE val)
126
116
  {
127
117
  _SELF(self)->colormap = GDK_COLORMAP(RVAL2GOBJ(val));
128
118
  return self;
129
119
  }
130
120
 
131
121
  static VALUE
132
- attr_get_window_type(self)
133
- VALUE self;
122
+ attr_get_window_type(VALUE self)
134
123
  {
135
124
  return GENUM2RVAL(_SELF(self)->window_type, GDK_TYPE_WINDOW_TYPE);
136
125
  }
137
126
  static VALUE
138
- attr_set_window_type(self, val)
139
- VALUE self, val;
127
+ attr_set_window_type(VALUE self, VALUE val)
140
128
  {
141
129
  _SELF(self)->window_type = RVAL2GENUM(val, GDK_TYPE_WINDOW_TYPE);
142
130
  return self;
143
131
  }
144
132
 
145
133
  static VALUE
146
- attr_get_cursor(self)
147
- VALUE self;
134
+ attr_get_cursor(VALUE self)
148
135
  {
149
136
  return BOXED2RVAL(_SELF(self)->cursor, GDK_TYPE_CURSOR);
150
137
  }
151
138
  static VALUE
152
- attr_set_cursor(self, val)
153
- VALUE self, val;
139
+ attr_set_cursor(VALUE self, VALUE val)
154
140
  {
155
141
  _SELF(self)->cursor = (GdkCursor*)(RVAL2BOXED(val, GDK_TYPE_CURSOR));
156
142
  return self;
@@ -160,14 +146,12 @@ ATTR_STR(wmclass_name);
160
146
  ATTR_STR(wmclass_class);
161
147
 
162
148
  static VALUE
163
- attr_get_override_redirect(self)
164
- VALUE self;
149
+ attr_get_override_redirect(VALUE self)
165
150
  {
166
151
  return CBOOL2RVAL(_SELF(self)->override_redirect);
167
152
  }
168
153
  static VALUE
169
- attr_set_override_redirect(self, val)
170
- VALUE self, val;
154
+ attr_set_override_redirect(VALUE self, VALUE val)
171
155
  {
172
156
  _SELF(self)->override_redirect = RVAL2CBOOL(val);
173
157
  return self;
@@ -77,10 +77,7 @@ GdkWindow* gdk_window_foreign_new_for_display
77
77
  */
78
78
 
79
79
  static VALUE
80
- rbx11_xid_table_lookup(argc, argv, self)
81
- int argc;
82
- VALUE *argv;
83
- VALUE self;
80
+ rbx11_xid_table_lookup(int argc, VALUE *argv, VALUE self)
84
81
  {
85
82
  VALUE arg[2];
86
83
  GdkPixmap* win = NULL;
@@ -130,8 +127,7 @@ guint32 gdk_x11_get_server_time (GdkWindow *window);
130
127
  */
131
128
 
132
129
  static VALUE
133
- rbx11_net_wm_supports(self, property)
134
- VALUE self, property;
130
+ rbx11_net_wm_supports(VALUE self, VALUE property)
135
131
  {
136
132
  return CBOOL2RVAL(gdk_net_wm_supports(RVAL2ATOM(property)));
137
133
  }
@@ -182,8 +178,7 @@ Window gdk_x11_get_default_root_xwindow
182
178
  */
183
179
 
184
180
  static VALUE
185
- rbx11_get_default_screen(self)
186
- VALUE self;
181
+ rbx11_get_default_screen(VALUE self)
187
182
  {
188
183
  return INT2NUM(gdk_x11_get_default_screen());
189
184
  }
@@ -192,8 +187,7 @@ Display* gdk_x11_get_default_xdisplay (void);
192
187
  */
193
188
 
194
189
  static VALUE
195
- rbx11_grab_server(self)
196
- VALUE self;
190
+ rbx11_grab_server(VALUE self)
197
191
  {
198
192
  gdk_x11_grab_server();
199
193
  return Qnil;
@@ -211,8 +205,7 @@ Screen* gdk_x11_screen_get_xscreen (GdkScreen *screen);
211
205
  */
212
206
 
213
207
  static VALUE
214
- rbx11_ungrab_server(self)
215
- VALUE self;
208
+ rbx11_ungrab_server(VALUE self)
216
209
  {
217
210
  gdk_x11_ungrab_server();
218
211
  return Qnil;
@@ -26,15 +26,17 @@ static ID id__windows__;
26
26
  static void
27
27
  remove_from_windows(GtkWidget *window, VALUE obj)
28
28
  {
29
- VALUE klass;
29
+ VALUE klass, windows;
30
+
30
31
  klass = rb_obj_class(obj);
31
- rb_hash_delete(rb_ivar_get(klass, id__windows__), obj);
32
+ windows = rb_ivar_get(klass, id__windows__);
33
+ if (!NIL_P(windows)) {
34
+ rb_hash_delete(windows, obj);
35
+ }
32
36
  }
33
37
 
34
38
  void
35
- rbgtk_initialize_gtkobject(obj, gtkobj)
36
- VALUE obj;
37
- GtkObject *gtkobj;
39
+ rbgtk_initialize_gtkobject(VALUE obj, GtkObject *gtkobj)
38
40
  {
39
41
  gtkobj = g_object_ref(gtkobj);
40
42
  gtk_object_sink(gtkobj);
@@ -54,9 +56,7 @@ rbgtk_initialize_gtkobject(obj, gtkobj)
54
56
  }
55
57
 
56
58
  void
57
- exec_callback(widget, proc)
58
- GtkWidget *widget;
59
- gpointer proc;
59
+ exec_callback(GtkWidget *widget, gpointer proc)
60
60
  {
61
61
  rb_funcall((VALUE)proc, id_call, 1, GOBJ2RVAL(widget));
62
62
  }
@@ -70,8 +70,7 @@ exec_callback(widget, proc)
70
70
  #define USE_POLL_FUNC
71
71
 
72
72
  static VALUE
73
- gtk_m_events_pending(self)
74
- VALUE self;
73
+ gtk_m_events_pending(VALUE self)
75
74
  {
76
75
  return CBOOL2RVAL(gtk_events_pending());
77
76
  }
@@ -16,8 +16,7 @@
16
16
  #define _SELF(self) (GTK_ABOUT_DIALOG(RVAL2GOBJ(self)))
17
17
 
18
18
  static VALUE
19
- aboutdialog_initialize(self)
20
- VALUE self;
19
+ aboutdialog_initialize(VALUE self)
21
20
  {
22
21
  RBGTK_INITIALIZE(self, gtk_about_dialog_new());
23
22
  return Qnil;
@@ -81,17 +80,13 @@ void gtk_about_dialog_set_wrap_license
81
80
  */
82
81
 
83
82
  static void
84
- activate_link_func(about, link, func)
85
- GtkAboutDialog* about;
86
- const gchar* link;
87
- gpointer func;
83
+ activate_link_func(GtkAboutDialog *about, const gchar *link, gpointer func)
88
84
  {
89
85
  rb_funcall((VALUE)func, id_call, 2, GOBJ2RVAL(about), CSTR2RVAL(link));
90
86
  }
91
87
 
92
88
  static VALUE
93
- aboutdialog_s_set_email_hook(self)
94
- VALUE self;
89
+ aboutdialog_s_set_email_hook(VALUE self)
95
90
  {
96
91
  VALUE func = rb_block_proc();
97
92
  G_RELATIVE(self, func);
@@ -100,8 +95,7 @@ aboutdialog_s_set_email_hook(self)
100
95
  }
101
96
 
102
97
  static VALUE
103
- aboutdialog_s_set_url_hook(self)
104
- VALUE self;
98
+ aboutdialog_s_set_url_hook(VALUE self)
105
99
  {
106
100
  VALUE func = rb_block_proc();
107
101
  G_RELATIVE(self, func);
@@ -118,8 +112,7 @@ typedef struct {
118
112
  #define ABOUT_PROP_NUM (15)
119
113
 
120
114
  static VALUE
121
- aboutdialog_s_show_about_dialog(self, parent, props)
122
- VALUE self, parent, props;
115
+ aboutdialog_s_show_about_dialog(VALUE self, VALUE parent, VALUE props)
123
116
  {
124
117
  int i;
125
118
  VALUE ary;
@@ -13,15 +13,13 @@
13
13
  #define RVAL2MOD(mods) RVAL2GFLAGS(mods, GDK_TYPE_MODIFIER_TYPE)
14
14
 
15
15
  static VALUE
16
- accel_valid(self, keyval, modifiers)
17
- VALUE self, keyval, modifiers;
16
+ accel_valid(VALUE self, VALUE keyval, VALUE modifiers)
18
17
  {
19
18
  return CBOOL2RVAL(gtk_accelerator_valid(NUM2UINT(keyval), RVAL2MOD(modifiers)));
20
19
  }
21
20
 
22
21
  static VALUE
23
- accel_parse(self, accelerator)
24
- VALUE self, accelerator;
22
+ accel_parse(VALUE self, VALUE accelerator)
25
23
  {
26
24
  guint key;
27
25
  GdkModifierType mods;
@@ -30,32 +28,28 @@ accel_parse(self, accelerator)
30
28
  }
31
29
 
32
30
  static VALUE
33
- accel_name(self, key, mods)
34
- VALUE self, key, mods;
31
+ accel_name(VALUE self, VALUE key, VALUE mods)
35
32
  {
36
33
  return CSTR2RVAL(gtk_accelerator_name(NUM2UINT(key), RVAL2MOD(mods)));
37
34
  }
38
35
 
39
36
  #if GTK_CHECK_VERSION(2,6,0)
40
37
  static VALUE
41
- accel_get_label(self, key, mods)
42
- VALUE self, key, mods;
38
+ accel_get_label(VALUE self, VALUE key, VALUE mods)
43
39
  {
44
40
  return CSTR2RVAL(gtk_accelerator_get_label(NUM2UINT(key), RVAL2MOD(mods)));
45
41
  }
46
42
  #endif
47
43
 
48
44
  static VALUE
49
- accel_set_default_mod_mask(self, default_mod_mask)
50
- VALUE self, default_mod_mask;
45
+ accel_set_default_mod_mask(VALUE self, VALUE default_mod_mask)
51
46
  {
52
47
  gtk_accelerator_set_default_mod_mask(RVAL2MOD(default_mod_mask));
53
48
  return self;
54
49
  }
55
50
 
56
51
  static VALUE
57
- accel_get_default_mod_mask(self)
58
- VALUE self;
52
+ accel_get_default_mod_mask(VALUE self)
59
53
  {
60
54
  return GFLAGS2RVAL(gtk_accelerator_get_default_mod_mask(), GDK_TYPE_MODIFIER_TYPE);
61
55
  }
@@ -18,18 +18,14 @@
18
18
  #define RVAL2MOD(mods) (NIL_P(mods) ? 0 : RVAL2GFLAGS(mods, GDK_TYPE_MODIFIER_TYPE))
19
19
 
20
20
  static VALUE
21
- gaccelgrp_initialize(self)
22
- VALUE self;
21
+ gaccelgrp_initialize(VALUE self)
23
22
  {
24
23
  G_INITIALIZE(self, gtk_accel_group_new());
25
24
  return Qnil;
26
25
  }
27
26
 
28
27
  static VALUE
29
- gaccelgrp_connect(argc, argv, self)
30
- int argc;
31
- VALUE *argv;
32
- VALUE self;
28
+ gaccelgrp_connect(int argc, VALUE *argv, VALUE self)
33
29
  {
34
30
  VALUE key, mods, flags, path, closure;
35
31
  GClosure *rclosure;
@@ -60,16 +56,14 @@ gaccelgrp_connect(argc, argv, self)
60
56
  }
61
57
 
62
58
  static VALUE
63
- gaccelgrp_disconnect_key(self, key, mods)
64
- VALUE self, key, mods;
59
+ gaccelgrp_disconnect_key(VALUE self, VALUE key, VALUE mods)
65
60
  {
66
61
  return CBOOL2RVAL(gtk_accel_group_disconnect_key(_SELF(self), NUM2UINT(key),
67
62
  RVAL2MOD(mods)));
68
63
  }
69
64
 
70
65
  static VALUE
71
- gaccelgrp_query(self, key, mods)
72
- VALUE self, key, mods;
66
+ gaccelgrp_query(VALUE self, VALUE key, VALUE mods)
73
67
  {
74
68
  GtkAccelGroupEntry *entries;
75
69
  guint n_entries;
@@ -90,16 +84,14 @@ gaccelgrp_query(self, key, mods)
90
84
  }
91
85
 
92
86
  static VALUE
93
- gaccelgrp_disconnect(self, closure)
94
- VALUE self, closure;
87
+ gaccelgrp_disconnect(VALUE self, VALUE closure)
95
88
  {
96
89
  return CBOOL2RVAL(gtk_accel_group_disconnect(_SELF(self),
97
90
  (GClosure*)RVAL2BOXED(closure, G_TYPE_CLOSURE)));
98
91
  }
99
92
 
100
93
  static VALUE
101
- gaccelgrp_s_from_accel_closure(self, closure)
102
- VALUE self, closure;
94
+ gaccelgrp_s_from_accel_closure(VALUE self, VALUE closure)
103
95
  {
104
96
  return GOBJ2RVAL(gtk_accel_group_from_accel_closure(
105
97
  (GClosure*)RVAL2BOXED(closure, G_TYPE_CLOSURE)));
@@ -107,10 +99,7 @@ gaccelgrp_s_from_accel_closure(self, closure)
107
99
 
108
100
  #if GTK_CHECK_VERSION(2,2,0)
109
101
  static gboolean
110
- gaccelgrp_find_func(key, closure, func)
111
- GtkAccelKey *key;
112
- GClosure *closure;
113
- gpointer func;
102
+ gaccelgrp_find_func(GtkAccelKey *key, GClosure *closure, gpointer func)
114
103
  {
115
104
  return RVAL2CBOOL(rb_funcall((VALUE)func, id_call, 2,
116
105
  BOXED2RVAL(key, GTK_TYPE_ACCEL_KEY),
@@ -118,8 +107,7 @@ gaccelgrp_find_func(key, closure, func)
118
107
  }
119
108
 
120
109
  static VALUE
121
- gaccelgrp_find(self)
122
- VALUE self;
110
+ gaccelgrp_find(VALUE self)
123
111
  {
124
112
  GtkAccelKey *result;
125
113
  volatile VALUE func = rb_block_proc();
@@ -133,8 +121,7 @@ gaccelgrp_find(self)
133
121
 
134
122
  #if GTK_CHECK_VERSION(2,4,0)
135
123
  static VALUE
136
- gaccelgrp_activate(self, accel_quark, acceleratable, accel_key, accel_mods)
137
- VALUE self, accel_quark, acceleratable, accel_key, accel_mods;
124
+ gaccelgrp_activate(VALUE self, VALUE accel_quark, VALUE acceleratable, VALUE accel_key, VALUE accel_mods)
138
125
  {
139
126
  GQuark quark = 0;
140
127
  if (TYPE(accel_quark) == T_STRING){
@@ -148,16 +135,14 @@ gaccelgrp_activate(self, accel_quark, acceleratable, accel_key, accel_mods)
148
135
  #endif
149
136
 
150
137
  static VALUE
151
- _gaccelgrp_lock_ensure(self)
152
- VALUE self;
138
+ _gaccelgrp_lock_ensure(VALUE self)
153
139
  {
154
140
  gtk_accel_group_unlock(_SELF(self));
155
141
  return Qnil;
156
142
  }
157
143
 
158
144
  static VALUE
159
- gaccelgrp_lock(self)
160
- VALUE self;
145
+ gaccelgrp_lock(VALUE self)
161
146
  {
162
147
  gtk_accel_group_lock(_SELF(self));
163
148
  if (rb_block_given_p()){
@@ -167,8 +152,7 @@ gaccelgrp_lock(self)
167
152
  }
168
153
 
169
154
  static VALUE
170
- gaccelgrp_unlock(self)
171
- VALUE self;
155
+ gaccelgrp_unlock(VALUE self)
172
156
  {
173
157
  gtk_accel_group_unlock(_SELF(self));
174
158
  return self;
@@ -176,8 +160,7 @@ gaccelgrp_unlock(self)
176
160
 
177
161
 
178
162
  static VALUE
179
- gaccelgrp_s_activate(self, obj, key, modtype)
180
- VALUE self, obj, key, modtype;
163
+ gaccelgrp_s_activate(VALUE self, VALUE obj, VALUE key, VALUE modtype)
181
164
  {
182
165
  return CBOOL2RVAL(gtk_accel_groups_activate(G_OBJECT(RVAL2GOBJ(obj)),
183
166
  NUM2UINT(key),
@@ -185,8 +168,7 @@ gaccelgrp_s_activate(self, obj, key, modtype)
185
168
  }
186
169
 
187
170
  static VALUE
188
- gaccelgrp_s_from_object(self, object)
189
- VALUE self, object;
171
+ gaccelgrp_s_from_object(VALUE self, VALUE object)
190
172
  {
191
173
  /* Owned by GTK+ */
192
174
  return GSLIST2ARY(gtk_accel_groups_from_object(RVAL2GOBJ(object)));