gtk2 0.90.7 → 0.90.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) 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/gtk2/base.rb +1 -2
  226. data/sample/gtk-demo/main.rb +2 -0
  227. data/sample/gtk-demo/textview.rb +1 -0
  228. metadata +15 -17
  229. data/ext/gtk2/Makefile +0 -169
  230. data/ext/gtk2/rbgdkkeysyms.h +0 -2174
  231. data/ext/gtk2/rbgtkinits.c +0 -473
  232. data/ext/gtk2/ruby-gtk2.pc +0 -3
@@ -17,10 +17,7 @@
17
17
  #define _SELF(s) (GTK_WINDOW(RVAL2GOBJ(s)))
18
18
 
19
19
  static VALUE
20
- gwin_initialize(argc, argv, self)
21
- int argc;
22
- VALUE *argv;
23
- VALUE self;
20
+ gwin_initialize(int argc, VALUE *argv, VALUE self)
24
21
  {
25
22
  VALUE arg;
26
23
  GtkWindowType tp = GTK_WINDOW_TOPLEVEL;
@@ -45,8 +42,7 @@ gwin_initialize(argc, argv, self)
45
42
  }
46
43
 
47
44
  static VALUE
48
- gwin_set_wmclass(self, wmclass_name, wmclass_class)
49
- VALUE self, wmclass_name, wmclass_class;
45
+ gwin_set_wmclass(VALUE self, VALUE wmclass_name, VALUE wmclass_class)
50
46
  {
51
47
  gtk_window_set_wmclass(_SELF(self),
52
48
  NIL_P(wmclass_name)?NULL:RVAL2CSTR(wmclass_name),
@@ -55,8 +51,7 @@ gwin_set_wmclass(self, wmclass_name, wmclass_class)
55
51
  }
56
52
 
57
53
  static VALUE
58
- gwin_add_accel_group(self, accel)
59
- VALUE self, accel;
54
+ gwin_add_accel_group(VALUE self, VALUE accel)
60
55
  {
61
56
  gtk_window_add_accel_group(_SELF(self),
62
57
  GTK_ACCEL_GROUP(RVAL2GOBJ(accel)));
@@ -64,8 +59,7 @@ gwin_add_accel_group(self, accel)
64
59
  }
65
60
 
66
61
  static VALUE
67
- gwin_remove_accel_group(self, accel)
68
- VALUE self, accel;
62
+ gwin_remove_accel_group(VALUE self, VALUE accel)
69
63
  {
70
64
  gtk_window_remove_accel_group(_SELF(self),
71
65
  GTK_ACCEL_GROUP(RVAL2GOBJ(accel)));
@@ -73,22 +67,19 @@ gwin_remove_accel_group(self, accel)
73
67
  }
74
68
 
75
69
  static VALUE
76
- gwin_activate_focus(self)
77
- VALUE self;
70
+ gwin_activate_focus(VALUE self)
78
71
  {
79
72
  return CBOOL2RVAL(gtk_window_activate_focus(_SELF(self)));
80
73
  }
81
74
 
82
75
  static VALUE
83
- gwin_activate_default(self)
84
- VALUE self;
76
+ gwin_activate_default(VALUE self)
85
77
  {
86
78
  return CBOOL2RVAL(gtk_window_activate_default(_SELF(self)));
87
79
  }
88
80
 
89
81
  static VALUE
90
- gwin_active_focus(self)
91
- VALUE self;
82
+ gwin_active_focus(VALUE self)
92
83
  {
93
84
  rb_warning("Gtk::Window#active_focus is deprecated. Use Gtk::Window#activate_focus");
94
85
  gtk_window_activate_focus(_SELF(self));
@@ -96,8 +87,7 @@ gwin_active_focus(self)
96
87
  }
97
88
 
98
89
  static VALUE
99
- gwin_active_default(self)
100
- VALUE self;
90
+ gwin_active_default(VALUE self)
101
91
  {
102
92
  rb_warning("Gtk::Window#active_default is deprecated. Use Gtk::Window#activate_default");
103
93
  gtk_window_activate_default(_SELF(self));
@@ -105,8 +95,7 @@ gwin_active_default(self)
105
95
  }
106
96
 
107
97
  static VALUE
108
- gwin_set_default_size(self, w, h)
109
- VALUE self, w, h;
98
+ gwin_set_default_size(VALUE self, VALUE w, VALUE h)
110
99
  {
111
100
  gtk_window_set_default_size(_SELF(self),
112
101
  NUM2INT(w), NUM2INT(h));
@@ -114,8 +103,7 @@ gwin_set_default_size(self, w, h)
114
103
  }
115
104
 
116
105
  static VALUE
117
- gwin_set_geometry_hints(self, geometry_widget, geometry, geom_mask)
118
- VALUE self, geometry_widget, geometry, geom_mask;
106
+ gwin_set_geometry_hints(VALUE self, VALUE geometry_widget, VALUE geometry, VALUE geom_mask)
119
107
  {
120
108
  gtk_window_set_geometry_hints(_SELF(self),
121
109
  GTK_WIDGET(RVAL2GOBJ(geometry_widget)),
@@ -125,31 +113,27 @@ gwin_set_geometry_hints(self, geometry_widget, geometry, geom_mask)
125
113
  }
126
114
 
127
115
  static VALUE
128
- gwin_set_gravity(self, gravity)
129
- VALUE self, gravity;
116
+ gwin_set_gravity(VALUE self, VALUE gravity)
130
117
  {
131
118
  gtk_window_set_gravity(_SELF(self), RVAL2GENUM(gravity, GDK_TYPE_GRAVITY));
132
119
  return self;
133
120
  }
134
121
 
135
122
  static VALUE
136
- gwin_get_gravity(self)
137
- VALUE self;
123
+ gwin_get_gravity(VALUE self)
138
124
  {
139
125
  return GENUM2RVAL(gtk_window_get_gravity(_SELF(self)), GDK_TYPE_GRAVITY);
140
126
  }
141
127
 
142
128
  static VALUE
143
- gwin_set_transient_for(self, parent)
144
- VALUE self, parent;
129
+ gwin_set_transient_for(VALUE self, VALUE parent)
145
130
  {
146
131
  gtk_window_set_transient_for(_SELF(self), _SELF(parent));
147
132
  return self;
148
133
  }
149
134
 
150
135
  static VALUE
151
- gwin_set_destroy_with_parent(self, setting)
152
- VALUE self, setting;
136
+ gwin_set_destroy_with_parent(VALUE self, VALUE setting)
153
137
  {
154
138
  gtk_window_set_destroy_with_parent(_SELF(self), RVAL2CBOOL(setting));
155
139
  return self;
@@ -164,8 +148,7 @@ gboolean gtk_window_has_toplevel_focus (GtkWindow *window);
164
148
  */
165
149
 
166
150
  static VALUE
167
- gwin_s_list_toplevels(self)
168
- VALUE self;
151
+ gwin_s_list_toplevels(VALUE self)
169
152
  {
170
153
  GList* list = gtk_window_list_toplevels();
171
154
  VALUE ret = GLIST2ARY(list);
@@ -175,24 +158,21 @@ gwin_s_list_toplevels(self)
175
158
  }
176
159
 
177
160
  static VALUE
178
- gwin_add_mnemonic(self, keyval, target)
179
- VALUE self, keyval, target;
161
+ gwin_add_mnemonic(VALUE self, VALUE keyval, VALUE target)
180
162
  {
181
163
  gtk_window_add_mnemonic(_SELF(self), NUM2INT(keyval), GTK_WIDGET(RVAL2GOBJ(target)));
182
164
  return self;
183
165
  }
184
166
 
185
167
  static VALUE
186
- gwin_remove_mnemonic(self, keyval, target)
187
- VALUE self, keyval, target;
168
+ gwin_remove_mnemonic(VALUE self, VALUE keyval, VALUE target)
188
169
  {
189
170
  gtk_window_remove_mnemonic(_SELF(self), NUM2INT(keyval), GTK_WIDGET(RVAL2GOBJ(target)));
190
171
  return self;
191
172
  }
192
173
 
193
174
  static VALUE
194
- gwin_mnemonic_activate(self, keyval, modifier)
195
- VALUE self, keyval, modifier;
175
+ gwin_mnemonic_activate(VALUE self, VALUE keyval, VALUE modifier)
196
176
  {
197
177
  return CBOOL2RVAL(gtk_window_mnemonic_activate(_SELF(self),
198
178
  NUM2INT(keyval),
@@ -200,15 +180,13 @@ gwin_mnemonic_activate(self, keyval, modifier)
200
180
  }
201
181
 
202
182
  static VALUE
203
- gwin_get_focus(self)
204
- VALUE self;
183
+ gwin_get_focus(VALUE self)
205
184
  {
206
185
  return GOBJ2RVAL(gtk_window_get_focus(_SELF(self)));
207
186
  }
208
187
 
209
188
  static VALUE
210
- gwin_set_focus(self, win)
211
- VALUE self, win;
189
+ gwin_set_focus(VALUE self, VALUE win)
212
190
  {
213
191
  gtk_window_set_focus(_SELF(self),
214
192
  NIL_P(win) ? NULL : GTK_WIDGET(RVAL2GOBJ(win)));
@@ -216,8 +194,7 @@ gwin_set_focus(self, win)
216
194
  }
217
195
 
218
196
  static VALUE
219
- gwin_set_default(self, win)
220
- VALUE self, win;
197
+ gwin_set_default(VALUE self, VALUE win)
221
198
  {
222
199
  gtk_window_set_default(_SELF(self),
223
200
  NIL_P(win) ? NULL : GTK_WIDGET(RVAL2GOBJ(win)));
@@ -226,10 +203,7 @@ gwin_set_default(self, win)
226
203
 
227
204
  #if GTK_CHECK_VERSION(2,8,0)
228
205
  static VALUE
229
- gwin_present(argc, argv, self)
230
- int argc;
231
- VALUE *argv;
232
- VALUE self;
206
+ gwin_present(int argc, VALUE *argv, VALUE self)
233
207
  {
234
208
  VALUE timestamp;
235
209
  if (rb_scan_args(argc, argv, "01", &timestamp) == 1) {
@@ -241,8 +215,7 @@ gwin_present(argc, argv, self)
241
215
  }
242
216
  #else
243
217
  static VALUE
244
- gwin_present(self)
245
- VALUE self;
218
+ gwin_present(VALUE self)
246
219
  {
247
220
  gtk_window_present(_SELF(self));
248
221
  return self;
@@ -250,48 +223,42 @@ gwin_present(self)
250
223
  #endif
251
224
 
252
225
  static VALUE
253
- gwin_iconify(self)
254
- VALUE self;
226
+ gwin_iconify(VALUE self)
255
227
  {
256
228
  gtk_window_iconify(_SELF(self));
257
229
  return self;
258
230
  }
259
231
 
260
232
  static VALUE
261
- gwin_deiconify(self)
262
- VALUE self;
233
+ gwin_deiconify(VALUE self)
263
234
  {
264
235
  gtk_window_deiconify(_SELF(self));
265
236
  return self;
266
237
  }
267
238
 
268
239
  static VALUE
269
- gwin_stick(self)
270
- VALUE self;
240
+ gwin_stick(VALUE self)
271
241
  {
272
242
  gtk_window_stick(_SELF(self));
273
243
  return self;
274
244
  }
275
245
 
276
246
  static VALUE
277
- gwin_unstick(self)
278
- VALUE self;
247
+ gwin_unstick(VALUE self)
279
248
  {
280
249
  gtk_window_unstick(_SELF(self));
281
250
  return self;
282
251
  }
283
252
 
284
253
  static VALUE
285
- gwin_maximize(self)
286
- VALUE self;
254
+ gwin_maximize(VALUE self)
287
255
  {
288
256
  gtk_window_maximize(_SELF(self));
289
257
  return self;
290
258
  }
291
259
 
292
260
  static VALUE
293
- gwin_unmaximize(self)
294
- VALUE self;
261
+ gwin_unmaximize(VALUE self)
295
262
  {
296
263
  gtk_window_unmaximize(_SELF(self));
297
264
  return self;
@@ -299,15 +266,13 @@ gwin_unmaximize(self)
299
266
 
300
267
  #if GTK_CHECK_VERSION(2,2,0)
301
268
  static VALUE
302
- gwin_fullscreen(self)
303
- VALUE self;
269
+ gwin_fullscreen(VALUE self)
304
270
  {
305
271
  gtk_window_fullscreen(_SELF(self));
306
272
  return self;
307
273
  }
308
274
  static VALUE
309
- gwin_unfullscreen(self)
310
- VALUE self;
275
+ gwin_unfullscreen(VALUE self)
311
276
  {
312
277
  gtk_window_unfullscreen(_SELF(self));
313
278
  return self;
@@ -315,15 +280,13 @@ gwin_unfullscreen(self)
315
280
  #endif
316
281
  #if GTK_CHECK_VERSION(2,4,0)
317
282
  static VALUE
318
- gwin_set_keep_above(self, setting)
319
- VALUE self, setting;
283
+ gwin_set_keep_above(VALUE self, VALUE setting)
320
284
  {
321
285
  gtk_window_set_keep_above(_SELF(self), RVAL2CBOOL(setting));
322
286
  return self;
323
287
  }
324
288
  static VALUE
325
- gwin_set_keep_below(self, setting)
326
- VALUE self, setting;
289
+ gwin_set_keep_below(VALUE self, VALUE setting)
327
290
  {
328
291
  gtk_window_set_keep_below(_SELF(self), RVAL2CBOOL(setting));
329
292
  return self;
@@ -331,8 +294,7 @@ gwin_set_keep_below(self, setting)
331
294
  #endif
332
295
 
333
296
  static VALUE
334
- gwin_begin_resize_drag(self, edge, button, root_x, root_y, timestamp)
335
- VALUE self, edge, button, root_x, root_y, timestamp;
297
+ gwin_begin_resize_drag(VALUE self, VALUE edge, VALUE button, VALUE root_x, VALUE root_y, VALUE timestamp)
336
298
  {
337
299
  gtk_window_begin_resize_drag(_SELF(self), RVAL2GENUM(edge, GDK_TYPE_WINDOW_EDGE),
338
300
  NUM2INT(button), NUM2INT(root_x),
@@ -341,8 +303,7 @@ gwin_begin_resize_drag(self, edge, button, root_x, root_y, timestamp)
341
303
  }
342
304
 
343
305
  static VALUE
344
- gwin_begin_move_drag(self, button, root_x, root_y, timestamp)
345
- VALUE self, button, root_x, root_y, timestamp;
306
+ gwin_begin_move_drag(VALUE self, VALUE button, VALUE root_x, VALUE root_y, VALUE timestamp)
346
307
  {
347
308
  gtk_window_begin_move_drag(_SELF(self),
348
309
  NUM2INT(button), NUM2INT(root_x),
@@ -351,16 +312,14 @@ gwin_begin_move_drag(self, button, root_x, root_y, timestamp)
351
312
  }
352
313
 
353
314
  static VALUE
354
- gwin_set_decorated(self, setting)
355
- VALUE self, setting;
315
+ gwin_set_decorated(VALUE self, VALUE setting)
356
316
  {
357
317
  gtk_window_set_decorated(_SELF(self), RVAL2CBOOL(setting));
358
318
  return self;
359
319
  }
360
320
 
361
321
  static VALUE
362
- gwin_set_frame_dimensions(self, left, top, right, bottom)
363
- VALUE self, left, top, right, bottom;
322
+ gwin_set_frame_dimensions(VALUE self, VALUE left, VALUE top, VALUE right, VALUE bottom)
364
323
  {
365
324
  gtk_window_set_frame_dimensions(_SELF(self), NUM2INT(left),
366
325
  NUM2INT(top), NUM2INT(right),
@@ -369,16 +328,14 @@ gwin_set_frame_dimensions(self, left, top, right, bottom)
369
328
  }
370
329
 
371
330
  static VALUE
372
- gwin_set_has_frame(self, setting)
373
- VALUE self, setting;
331
+ gwin_set_has_frame(VALUE self, VALUE setting)
374
332
  {
375
333
  gtk_window_set_has_frame(_SELF(self), RVAL2CBOOL(setting));
376
334
  return self;
377
335
  }
378
336
 
379
337
  static VALUE
380
- gwin_set_mnemonic_modifier(self, modifier)
381
- VALUE self, modifier;
338
+ gwin_set_mnemonic_modifier(VALUE self, VALUE modifier)
382
339
  {
383
340
  gtk_window_set_mnemonic_modifier(_SELF(self),
384
341
  RVAL2GFLAGS(modifier, GDK_TYPE_MODIFIER_TYPE));
@@ -386,16 +343,14 @@ gwin_set_mnemonic_modifier(self, modifier)
386
343
  }
387
344
 
388
345
  static VALUE
389
- gwin_set_role(self, role)
390
- VALUE self, role;
346
+ gwin_set_role(VALUE self, VALUE role)
391
347
  {
392
348
  gtk_window_set_role(_SELF(self), RVAL2CSTR(role));
393
349
  return self;
394
350
  }
395
351
 
396
352
  static VALUE
397
- gwin_set_type_hint(self, hint)
398
- VALUE self, hint;
353
+ gwin_set_type_hint(VALUE self, VALUE hint)
399
354
  {
400
355
  gtk_window_set_type_hint(_SELF(self), RVAL2GENUM(hint, GDK_TYPE_WINDOW_TYPE_HINT));
401
356
  return self;
@@ -428,22 +383,19 @@ void gtk_window_set_deletable (GtkWindow *window,
428
383
 
429
384
 
430
385
  static VALUE
431
- gwin_get_decorated(self)
432
- VALUE self;
386
+ gwin_get_decorated(VALUE self)
433
387
  {
434
388
  return CBOOL2RVAL(gtk_window_get_decorated(_SELF(self)));
435
389
  }
436
390
 
437
391
  static VALUE
438
- gwin_s_get_default_icon_list(self)
439
- VALUE self;
392
+ gwin_s_get_default_icon_list(VALUE self)
440
393
  {
441
394
  return GLIST2ARYF(gtk_window_get_default_icon_list());
442
395
  }
443
396
 
444
397
  static VALUE
445
- gwin_get_default_size(self)
446
- VALUE self;
398
+ gwin_get_default_size(VALUE self)
447
399
  {
448
400
  int width, height;
449
401
  gtk_window_get_default_size(_SELF(self), &width, &height);
@@ -451,15 +403,13 @@ gwin_get_default_size(self)
451
403
  }
452
404
 
453
405
  static VALUE
454
- gwin_get_destroy_with_parent(self)
455
- VALUE self;
406
+ gwin_get_destroy_with_parent(VALUE self)
456
407
  {
457
408
  return gtk_window_get_destroy_with_parent(_SELF(self)) ? Qtrue : Qfalse;
458
409
  }
459
410
 
460
411
  static VALUE
461
- gwin_get_frame_dimensions(self)
462
- VALUE self;
412
+ gwin_get_frame_dimensions(VALUE self)
463
413
  {
464
414
  int left, top, right, bottom;
465
415
  gtk_window_get_frame_dimensions(_SELF(self), &left, &top, &right, &bottom);
@@ -471,29 +421,25 @@ gwin_get_frame_dimensions(self)
471
421
  }
472
422
 
473
423
  static VALUE
474
- gwin_get_has_frame(self)
475
- VALUE self;
424
+ gwin_get_has_frame(VALUE self)
476
425
  {
477
426
  return CBOOL2RVAL(gtk_window_get_has_frame(_SELF(self)));
478
427
  }
479
428
 
480
429
  static VALUE
481
- gwin_get_icon_list(self)
482
- VALUE self;
430
+ gwin_get_icon_list(VALUE self)
483
431
  {
484
432
  return GLIST2ARYF(gtk_window_get_icon_list(_SELF(self)));
485
433
  }
486
434
 
487
435
  static VALUE
488
- gwin_get_mnemonic_modifier(self)
489
- VALUE self;
436
+ gwin_get_mnemonic_modifier(VALUE self)
490
437
  {
491
438
  return GFLAGS2RVAL(gtk_window_get_mnemonic_modifier(_SELF(self)), GDK_TYPE_MODIFIER_TYPE);
492
439
  }
493
440
 
494
441
  static VALUE
495
- gwin_get_position(self)
496
- VALUE self;
442
+ gwin_get_position(VALUE self)
497
443
  {
498
444
  int root_x, root_y;
499
445
  gtk_window_get_position(_SELF(self), &root_x, &root_y);
@@ -501,16 +447,14 @@ gwin_get_position(self)
501
447
  }
502
448
 
503
449
  static VALUE
504
- gwin_get_role(self)
505
- VALUE self;
450
+ gwin_get_role(VALUE self)
506
451
  {
507
452
  const gchar* role = gtk_window_get_role(_SELF(self));
508
453
  return role ? CSTR2RVAL(role) : Qnil;
509
454
  }
510
455
 
511
456
  static VALUE
512
- gwin_get_size(self)
513
- VALUE self;
457
+ gwin_get_size(VALUE self)
514
458
  {
515
459
  int width, height;
516
460
  gtk_window_get_size(_SELF(self), &width, &height);
@@ -518,63 +462,55 @@ gwin_get_size(self)
518
462
  }
519
463
 
520
464
  static VALUE
521
- gwin_get_transient_for(self)
522
- VALUE self;
465
+ gwin_get_transient_for(VALUE self)
523
466
  {
524
467
  GtkWindow* window = gtk_window_get_transient_for(_SELF(self));
525
468
  return window ? GOBJ2RVAL(window) : Qnil;
526
469
  }
527
470
 
528
471
  static VALUE
529
- gwin_get_type_hint(self)
530
- VALUE self;
472
+ gwin_get_type_hint(VALUE self)
531
473
  {
532
474
  return GENUM2RVAL(gtk_window_get_type_hint(_SELF(self)), GDK_TYPE_WINDOW_TYPE_HINT);
533
475
  }
534
476
 
535
477
  #if GTK_CHECK_VERSION(2,10,0)
536
478
  static VALUE
537
- gwin_get_group(self)
538
- VALUE self;
479
+ gwin_get_group(VALUE self)
539
480
  {
540
481
  return GOBJ2RVAL(gtk_window_get_group(_SELF(self)));
541
482
  }
542
483
  #endif
543
484
 
544
485
  static VALUE
545
- gwin_move(self, x, y)
546
- VALUE self, x, y;
486
+ gwin_move(VALUE self, VALUE x, VALUE y)
547
487
  {
548
488
  gtk_window_move(_SELF(self), NUM2INT(x), NUM2INT(y));
549
489
  return self;
550
490
  }
551
491
 
552
492
  static VALUE
553
- gwin_parse_geometry(self, geometry)
554
- VALUE self, geometry;
493
+ gwin_parse_geometry(VALUE self, VALUE geometry)
555
494
  {
556
495
  return CBOOL2RVAL(gtk_window_parse_geometry(_SELF(self), RVAL2CSTR(geometry)));
557
496
  }
558
497
 
559
498
  static VALUE
560
- gwin_reshow_with_initial_size(self)
561
- VALUE self;
499
+ gwin_reshow_with_initial_size(VALUE self)
562
500
  {
563
501
  gtk_window_reshow_with_initial_size(_SELF(self));
564
502
  return self;
565
503
  }
566
504
 
567
505
  static VALUE
568
- gwin_resize(self, width, height)
569
- VALUE self, width, height;
506
+ gwin_resize(VALUE self, VALUE width, VALUE height)
570
507
  {
571
508
  gtk_window_resize(_SELF(self), NUM2INT(width), NUM2INT(height));
572
509
  return self;
573
510
  }
574
511
 
575
512
  static VALUE
576
- gwin_s_set_default_icon_list(self, list)
577
- VALUE self, list;
513
+ gwin_s_set_default_icon_list(VALUE self, VALUE list)
578
514
  {
579
515
  int i;
580
516
  GList *glist = NULL;
@@ -589,8 +525,7 @@ gwin_s_set_default_icon_list(self, list)
589
525
 
590
526
  #if GTK_CHECK_VERSION(2,2,0)
591
527
  static VALUE
592
- gwin_s_set_default_icon(self, icon_or_filename)
593
- VALUE self, icon_or_filename;
528
+ gwin_s_set_default_icon(VALUE self, VALUE icon_or_filename)
594
529
  {
595
530
  if (TYPE(icon_or_filename) == T_STRING){
596
531
  GError* err;
@@ -611,8 +546,7 @@ gwin_s_set_default_icon(self, icon_or_filename)
611
546
 
612
547
  #if GTK_CHECK_VERSION(2,6,0)
613
548
  static VALUE
614
- gwin_s_set_default_icon_name(self, name)
615
- VALUE self, name;
549
+ gwin_s_set_default_icon_name(VALUE self, VALUE name)
616
550
  {
617
551
  gtk_window_set_default_icon_name(RVAL2CSTR(name));
618
552
  return self;
@@ -620,8 +554,7 @@ gwin_s_set_default_icon_name(self, name)
620
554
  #endif
621
555
 
622
556
  static VALUE
623
- gwin_set_icon(self, icon_or_filename)
624
- VALUE self, icon_or_filename;
557
+ gwin_set_icon(VALUE self, VALUE icon_or_filename)
625
558
  {
626
559
  if (TYPE(icon_or_filename) == T_STRING){
627
560
  #if GTK_CHECK_VERSION(2,2,0)
@@ -641,8 +574,7 @@ gwin_set_icon(self, icon_or_filename)
641
574
  }
642
575
 
643
576
  static VALUE
644
- gwin_set_icon_list(self, list)
645
- VALUE self, list;
577
+ gwin_set_icon_list(VALUE self, VALUE list)
646
578
  {
647
579
  int i;
648
580
  GList *glist = NULL;
@@ -656,8 +588,7 @@ gwin_set_icon_list(self, list)
656
588
  }
657
589
  #if GTK_CHECK_VERSION(2,2,0)
658
590
  static VALUE
659
- gwin_s_set_auto_startup_notification(self, setting)
660
- VALUE self, setting;
591
+ gwin_s_set_auto_startup_notification(VALUE self, VALUE setting)
661
592
  {
662
593
  gtk_window_set_auto_startup_notification(RVAL2CBOOL(setting));
663
594
  return self;
@@ -666,32 +597,28 @@ gwin_s_set_auto_startup_notification(self, setting)
666
597
 
667
598
  /* They are not public methods.
668
599
  static VALUE
669
- gwin_decorated_window_init(self)
670
- VALUE self;
600
+ gwin_decorated_window_init(VALUE self)
671
601
  {
672
602
  gtk_decorated_window_init(_SELF(self));
673
603
  return self;
674
604
  }
675
605
 
676
606
  static VALUE
677
- gwin_decorated_window_calculate_frame_size(self)
678
- VALUE self;
607
+ gwin_decorated_window_calculate_frame_size(VALUE self)
679
608
  {
680
609
  gtk_decorated_window_calculate_frame_size(_SELF(self));
681
610
  return self;
682
611
  }
683
612
 
684
613
  static VALUE
685
- gwin_decorated_window_set_title(self, title)
686
- VALUE self, title;
614
+ gwin_decorated_window_set_title(VALUE self, VALUE title)
687
615
  {
688
616
  gtk_decorated_window_set_title(_SELF(self), RVAL2CSTR(title));
689
617
  return self;
690
618
  }
691
619
 
692
620
  static VALUE
693
- gwin_decorated_window_move_resize_window(self)
694
- VALUE self;
621
+ gwin_decorated_window_move_resize_window(VALUE self)
695
622
  {
696
623
  int x, y, width, height;
697
624
  gtk_decorated_window_move_resize_window(_SELF(self), &x, &y, &width, &height);