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
@@ -15,8 +15,7 @@
15
15
  #include "global.h"
16
16
 
17
17
  static VALUE
18
- bbox_set_child_secondary(self, child, is_secondary)
19
- VALUE self, child, is_secondary;
18
+ bbox_set_child_secondary(VALUE self, VALUE child, VALUE is_secondary)
20
19
  {
21
20
  gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(RVAL2GOBJ(self)),
22
21
  GTK_WIDGET(RVAL2GOBJ(child)),
@@ -25,8 +24,7 @@ bbox_set_child_secondary(self, child, is_secondary)
25
24
  }
26
25
  #if GTK_CHECK_VERSION(2,4,0)
27
26
  static VALUE
28
- bbox_get_child_secondary(self, child)
29
- VALUE self, child;
27
+ bbox_get_child_secondary(VALUE self, VALUE child)
30
28
  {
31
29
  return CBOOL2RVAL(gtk_button_box_get_child_secondary(GTK_BUTTON_BOX(RVAL2GOBJ(self)),
32
30
  GTK_WIDGET(RVAL2GOBJ(child))));
@@ -15,8 +15,7 @@
15
15
  #include "global.h"
16
16
 
17
17
  static VALUE
18
- bin_child(self)
19
- VALUE self;
18
+ bin_child(VALUE self)
20
19
  {
21
20
  GtkWidget *child = gtk_bin_get_child(RVAL2GOBJ(self));
22
21
  return child ? GOBJ2RVAL(child) : Qnil;
@@ -51,24 +51,21 @@ gtk_bindingset_get_type(void)
51
51
  #define _SELF(s) (GtkBindingSet*)(RVAL2BOXED(s, GTK_TYPE_BINDING_SET))
52
52
 
53
53
  static VALUE
54
- binding_initialize(self, set_name)
55
- VALUE self, set_name;
54
+ binding_initialize(VALUE self, VALUE set_name)
56
55
  {
57
56
  G_INITIALIZE(self, gtk_binding_set_new(RVAL2CSTR(set_name)));
58
57
  return Qnil;
59
58
  }
60
59
 
61
60
  static VALUE
62
- binding_s_find(self, set_name)
63
- VALUE self, set_name;
61
+ binding_s_find(VALUE self, VALUE set_name)
64
62
  {
65
63
  return BOXED2RVAL(gtk_binding_set_find(RVAL2CSTR(set_name)),
66
64
  GTK_TYPE_BINDING_SET);
67
65
  }
68
66
 
69
67
  static VALUE
70
- binding_activate(self, keyval, modifiers, object)
71
- VALUE self, keyval, modifiers, object;
68
+ binding_activate(VALUE self, VALUE keyval, VALUE modifiers, VALUE object)
72
69
  {
73
70
  return CBOOL2RVAL(gtk_binding_set_activate(_SELF(self), NUM2UINT(keyval),
74
71
  RVAL2MOD(modifiers),
@@ -76,8 +73,7 @@ binding_activate(self, keyval, modifiers, object)
76
73
  }
77
74
 
78
75
  static VALUE
79
- binding_entry_clear(self, keyval, modifiers)
80
- VALUE self, keyval, modifiers;
76
+ binding_entry_clear(VALUE self, VALUE keyval, VALUE modifiers)
81
77
  {
82
78
  gtk_binding_entry_clear(_SELF(self), NUM2UINT(keyval),
83
79
  RVAL2MOD(modifiers));
@@ -85,10 +81,7 @@ binding_entry_clear(self, keyval, modifiers)
85
81
  }
86
82
 
87
83
  static VALUE
88
- binding_entry_add_signal(argc, argv, self)
89
- int argc;
90
- VALUE* argv;
91
- VALUE self;
84
+ binding_entry_add_signal(int argc, VALUE *argv, VALUE self)
92
85
  {
93
86
  VALUE keyval, modifiers, signame, rest;
94
87
  long i;
@@ -143,8 +136,7 @@ binding_entry_add_signal(argc, argv, self)
143
136
  }
144
137
 
145
138
  static VALUE
146
- binding_add_path(self, path_type, path_pattern, priority)
147
- VALUE self, path_type, path_pattern, priority;
139
+ binding_add_path(VALUE self, VALUE path_type, VALUE path_pattern, VALUE priority)
148
140
  {
149
141
  gtk_binding_set_add_path(_SELF(self), RVAL2GENUM(path_type, GTK_TYPE_PATH_TYPE),
150
142
  RVAL2CSTR(path_pattern),
@@ -153,8 +145,7 @@ binding_add_path(self, path_type, path_pattern, priority)
153
145
  }
154
146
 
155
147
  static VALUE
156
- binding_entry_remove(self, keyval, modifiers)
157
- VALUE self, keyval, modifiers;
148
+ binding_entry_remove(VALUE self, VALUE keyval, VALUE modifiers)
158
149
  {
159
150
  gtk_binding_entry_remove(_SELF(self), NUM2UINT(keyval), RVAL2MOD(modifiers));
160
151
  return self;
@@ -162,8 +153,7 @@ binding_entry_remove(self, keyval, modifiers)
162
153
 
163
154
  #if GTK_CHECK_VERSION(2,12,0)
164
155
  static VALUE
165
- binding_entry_skip(self, keyval, modifiers)
166
- VALUE self, keyval, modifiers;
156
+ binding_entry_skip(VALUE self, VALUE keyval, VALUE modifiers)
167
157
  {
168
158
  gtk_binding_entry_skip(_SELF(self), NUM2UINT(keyval), RVAL2MOD(modifiers));
169
159
  return self;
@@ -18,14 +18,12 @@
18
18
 
19
19
  #define ATTR_INT(name)\
20
20
  static VALUE \
21
- border_int_ ## name (self)\
22
- VALUE self;\
21
+ border_int_ ## name (VALUE self)\
23
22
  {\
24
23
  return INT2NUM(_SELF(self)->name);\
25
24
  }\
26
25
  static VALUE \
27
- border_int_set_ ## name (self, val)\
28
- VALUE self, val;\
26
+ border_int_set_ ## name (VALUE self, VALUE val)\
29
27
  {\
30
28
  _SELF(self)->name = NUM2INT(val); \
31
29
  return self;\
@@ -41,8 +39,7 @@ ATTR_INT(bottom);
41
39
  rb_define_method(gt, G_STRINGIFY(set_ ## name), border_ ## type ## _set_## name, 1);
42
40
 
43
41
  static VALUE
44
- border_initialize(self, left, right, top, bottom)
45
- VALUE self, left, right, top, bottom;
42
+ border_initialize(VALUE self, VALUE left, VALUE right, VALUE top, VALUE bottom)
46
43
  {
47
44
  GtkBorder border;
48
45
  border.left = NUM2INT(left);
@@ -55,8 +52,7 @@ border_initialize(self, left, right, top, bottom)
55
52
  }
56
53
 
57
54
  static VALUE
58
- border_to_a(self)
59
- VALUE self;
55
+ border_to_a(VALUE self)
60
56
  {
61
57
  GtkBorder* border = _SELF(self);
62
58
  return rb_ary_new3(4, INT2NUM(border->left), INT2NUM(border->right),
@@ -18,11 +18,7 @@
18
18
  #define RVAL2WIDGET(w) (GTK_WIDGET(RVAL2GOBJ(w)))
19
19
 
20
20
  static void
21
- box_pack_start_or_end(argc, argv, self, start)
22
- int argc;
23
- VALUE *argv;
24
- VALUE self;
25
- int start;
21
+ box_pack_start_or_end(int argc, VALUE *argv, VALUE self, int start)
26
22
  {
27
23
  VALUE arg0, arg1, arg2, arg3;
28
24
  gint expand, fill, padding;
@@ -50,44 +46,35 @@ box_pack_start_or_end(argc, argv, self, start)
50
46
  }
51
47
 
52
48
  static VALUE
53
- box_pack_start(argc, argv, self)
54
- int argc;
55
- VALUE *argv;
56
- VALUE self;
49
+ box_pack_start(int argc, VALUE *argv, VALUE self)
57
50
  {
58
51
  box_pack_start_or_end(argc, argv, self, 1);
59
52
  return self;
60
53
  }
61
54
 
62
55
  static VALUE
63
- box_pack_end(argc, argv, self)
64
- int argc;
65
- VALUE *argv;
66
- VALUE self;
56
+ box_pack_end(int argc, VALUE *argv, VALUE self)
67
57
  {
68
58
  box_pack_start_or_end(argc, argv, self, 0);
69
59
  return self;
70
60
  }
71
61
 
72
62
  static VALUE
73
- box_pack_start_defaults(self, widget)
74
- VALUE self, widget;
63
+ box_pack_start_defaults(VALUE self, VALUE widget)
75
64
  {
76
65
  gtk_box_pack_start_defaults(_SELF(self), RVAL2WIDGET(widget));
77
66
  return self;
78
67
  }
79
68
 
80
69
  static VALUE
81
- box_pack_end_defaults(self, widget)
82
- VALUE self, widget;
70
+ box_pack_end_defaults(VALUE self, VALUE widget)
83
71
  {
84
72
  gtk_box_pack_end_defaults(_SELF(self), RVAL2WIDGET(widget));
85
73
  return self;
86
74
  }
87
75
 
88
76
  static VALUE
89
- box_reorder_child(self, child, pos)
90
- VALUE self, child, pos;
77
+ box_reorder_child(VALUE self, VALUE child, VALUE pos)
91
78
  {
92
79
  gtk_box_reorder_child(_SELF(self),
93
80
  RVAL2WIDGET(child), NUM2INT(pos));
@@ -95,8 +82,7 @@ box_reorder_child(self, child, pos)
95
82
  }
96
83
 
97
84
  static VALUE
98
- box_query_child_packing(self, child)
99
- VALUE self, child;
85
+ box_query_child_packing(VALUE self, VALUE child)
100
86
  {
101
87
  gboolean expand, fill;
102
88
  guint padding;
@@ -117,8 +103,7 @@ box_query_child_packing(self, child)
117
103
  }
118
104
 
119
105
  static VALUE
120
- box_set_child_packing(self, child, expand, fill, padding, pack_type)
121
- VALUE self, child, expand, fill, padding, pack_type;
106
+ box_set_child_packing(VALUE self, VALUE child, VALUE expand, VALUE fill, VALUE padding, VALUE pack_type)
122
107
  {
123
108
  gtk_box_set_child_packing(_SELF(self),
124
109
  RVAL2WIDGET(child),
@@ -17,10 +17,7 @@
17
17
  #define _SELF(self) (GTK_BUTTON(RVAL2GOBJ(self)))
18
18
 
19
19
  static VALUE
20
- button_initialize(argc, argv, self)
21
- int argc;
22
- VALUE *argv;
23
- VALUE self;
20
+ button_initialize(int argc, VALUE *argv, VALUE self)
24
21
  {
25
22
  VALUE label, use_underline;
26
23
  GtkWidget *widget = NULL;
@@ -47,40 +44,35 @@ button_initialize(argc, argv, self)
47
44
  }
48
45
 
49
46
  static VALUE
50
- button_pressed(self)
51
- VALUE self;
47
+ button_pressed(VALUE self)
52
48
  {
53
49
  gtk_button_pressed(GTK_BUTTON(RVAL2GOBJ(self)));
54
50
  return self;
55
51
  }
56
52
 
57
53
  static VALUE
58
- button_released(self)
59
- VALUE self;
54
+ button_released(VALUE self)
60
55
  {
61
56
  gtk_button_released(_SELF(self));
62
57
  return self;
63
58
  }
64
59
 
65
60
  static VALUE
66
- button_clicked(self)
67
- VALUE self;
61
+ button_clicked(VALUE self)
68
62
  {
69
63
  gtk_button_clicked(_SELF(self));
70
64
  return self;
71
65
  }
72
66
 
73
67
  static VALUE
74
- button_enter(self)
75
- VALUE self;
68
+ button_enter(VALUE self)
76
69
  {
77
70
  gtk_button_enter(_SELF(self));
78
71
  return self;
79
72
  }
80
73
 
81
74
  static VALUE
82
- button_leave(self)
83
- VALUE self;
75
+ button_leave(VALUE self)
84
76
  {
85
77
  gtk_button_leave(_SELF(self));
86
78
  return self;
@@ -88,16 +80,14 @@ button_leave(self)
88
80
 
89
81
  #if GTK_CHECK_VERSION(2,4,0)
90
82
  static VALUE
91
- button_set_alignment(self, xalign, yalign)
92
- VALUE self, xalign, yalign;
83
+ button_set_alignment(VALUE self, VALUE xalign, VALUE yalign)
93
84
  {
94
85
  gtk_button_set_alignment(_SELF(self), NUM2DBL(xalign), NUM2DBL(yalign));
95
86
  return self;
96
87
  }
97
88
 
98
89
  static VALUE
99
- button_get_alignment(self)
100
- VALUE self;
90
+ button_get_alignment(VALUE self)
101
91
  {
102
92
  gfloat xalign, yalign;
103
93
  gtk_button_get_alignment(_SELF(self), &xalign, &yalign);
@@ -17,16 +17,14 @@
17
17
  #define _SELF(self) (GTK_CALENDAR(RVAL2GOBJ(self)))
18
18
 
19
19
  static VALUE
20
- cal_init(self)
21
- VALUE self;
20
+ cal_init(VALUE self)
22
21
  {
23
22
  RBGTK_INITIALIZE(self, gtk_calendar_new());
24
23
  return Qnil;
25
24
  }
26
25
 
27
26
  static VALUE
28
- cal_select_month(self, month, year)
29
- VALUE self, month, year;
27
+ cal_select_month(VALUE self, VALUE month, VALUE year)
30
28
  {
31
29
  gint ret = gtk_calendar_select_month(_SELF(self),
32
30
  NUM2INT(month)-1,
@@ -35,40 +33,35 @@ cal_select_month(self, month, year)
35
33
  }
36
34
 
37
35
  static VALUE
38
- cal_select_day(self, day)
39
- VALUE self, day;
36
+ cal_select_day(VALUE self, VALUE day)
40
37
  {
41
38
  gtk_calendar_select_day(_SELF(self), NUM2INT(day));
42
39
  return self;
43
40
  }
44
41
 
45
42
  static VALUE
46
- cal_mark_day(self, day)
47
- VALUE self, day;
43
+ cal_mark_day(VALUE self, VALUE day)
48
44
  {
49
45
  gtk_calendar_mark_day(_SELF(self), NUM2INT(day));
50
46
  return self;
51
47
  }
52
48
 
53
49
  static VALUE
54
- cal_unmark_day(self, day)
55
- VALUE self, day;
50
+ cal_unmark_day(VALUE self, VALUE day)
56
51
  {
57
52
  gtk_calendar_unmark_day(_SELF(self), NUM2INT(day));
58
53
  return self;
59
54
  }
60
55
 
61
56
  static VALUE
62
- cal_clear_marks(self)
63
- VALUE self;
57
+ cal_clear_marks(VALUE self)
64
58
  {
65
59
  gtk_calendar_clear_marks(_SELF(self));
66
60
  return self;
67
61
  }
68
62
 
69
63
  static VALUE
70
- cal_get_date(self)
71
- VALUE self;
64
+ cal_get_date(VALUE self)
72
65
  {
73
66
  VALUE ret;
74
67
  guint year, month, day;
@@ -82,26 +75,21 @@ cal_get_date(self)
82
75
  }
83
76
 
84
77
  static VALUE
85
- cal_freeze(self)
86
- VALUE self;
78
+ cal_freeze(VALUE self)
87
79
  {
88
80
  gtk_calendar_freeze(_SELF(self));
89
81
  return self;
90
82
  }
91
83
 
92
84
  static VALUE
93
- cal_thaw(self)
94
- VALUE self;
85
+ cal_thaw(VALUE self)
95
86
  {
96
87
  gtk_calendar_thaw(_SELF(self));
97
88
  return self;
98
89
  }
99
90
 
100
91
  static VALUE
101
- cal_get_display_options(argc, argv, self)
102
- int argc;
103
- VALUE *argv;
104
- VALUE self;
92
+ cal_get_display_options(int argc, VALUE *argv, VALUE self)
105
93
  {
106
94
  VALUE flags;
107
95
  rb_scan_args(argc, argv, "01", &flags);
@@ -124,8 +112,7 @@ cal_get_display_options(argc, argv, self)
124
112
 
125
113
  #if GTK_CHECK_VERSION(2,4,0)
126
114
  static VALUE
127
- cal_set_display_options(self, flags)
128
- VALUE self, flags;
115
+ cal_set_display_options(VALUE self, VALUE flags)
129
116
  {
130
117
  gtk_calendar_set_display_options(_SELF(self),
131
118
  RVAL2GFLAGS(flags,
@@ -14,8 +14,7 @@
14
14
  #define _SELF(s) (GTK_CELL_EDITABLE(RVAL2GOBJ(s)))
15
15
 
16
16
  static VALUE
17
- celledit_start_editing(self, event)
18
- VALUE self, event;
17
+ celledit_start_editing(VALUE self, VALUE event)
19
18
  {
20
19
  gtk_cell_editable_start_editing(_SELF(self),
21
20
  NIL_P(event) ? NULL : RVAL2GEV(event));
@@ -23,16 +22,14 @@ celledit_start_editing(self, event)
23
22
  }
24
23
 
25
24
  static VALUE
26
- celledit_editing_done(self)
27
- VALUE self;
25
+ celledit_editing_done(VALUE self)
28
26
  {
29
27
  gtk_cell_editable_editing_done(_SELF(self));
30
28
  return self;
31
29
  }
32
30
 
33
31
  static VALUE
34
- celledit_remove_widget(self)
35
- VALUE self;
32
+ celledit_remove_widget(VALUE self)
36
33
  {
37
34
  gtk_cell_editable_remove_widget(_SELF(self));
38
35
  return self;
@@ -17,8 +17,7 @@
17
17
  #define RVAL2RENDERER(s) (GTK_CELL_RENDERER(RVAL2GOBJ(s)))
18
18
 
19
19
  static VALUE
20
- layout_pack_start(self, cell, expand)
21
- VALUE self, cell, expand;
20
+ layout_pack_start(VALUE self, VALUE cell, VALUE expand)
22
21
  {
23
22
  gtk_cell_layout_pack_start(_SELF(self), RVAL2RENDERER(cell),
24
23
  RVAL2CBOOL(expand));
@@ -26,8 +25,7 @@ layout_pack_start(self, cell, expand)
26
25
  }
27
26
 
28
27
  static VALUE
29
- layout_pack_end(self, cell, expand)
30
- VALUE self, cell, expand;
28
+ layout_pack_end(VALUE self, VALUE cell, VALUE expand)
31
29
  {
32
30
  gtk_cell_layout_pack_end(_SELF(self), RVAL2RENDERER(cell),
33
31
  RVAL2CBOOL(expand));
@@ -35,8 +33,7 @@ layout_pack_end(self, cell, expand)
35
33
  }
36
34
 
37
35
  static VALUE
38
- layout_reorder(self, cell, position)
39
- VALUE self, cell, position;
36
+ layout_reorder(VALUE self, VALUE cell, VALUE position)
40
37
  {
41
38
  gtk_cell_layout_reorder(_SELF(self), RVAL2RENDERER(cell),
42
39
  NUM2INT(position));
@@ -44,16 +41,14 @@ layout_reorder(self, cell, position)
44
41
  }
45
42
 
46
43
  static VALUE
47
- layout_clear(self)
48
- VALUE self;
44
+ layout_clear(VALUE self)
49
45
  {
50
46
  gtk_cell_layout_clear(_SELF(self));
51
47
  return self;
52
48
  }
53
49
 
54
50
  static VALUE
55
- layout_add_attribute(self, cell, attribute, column)
56
- VALUE self, cell, attribute, column;
51
+ layout_add_attribute(VALUE self, VALUE cell, VALUE attribute, VALUE column)
57
52
  {
58
53
  const gchar *name;
59
54
 
@@ -69,12 +64,7 @@ layout_add_attribute(self, cell, attribute, column)
69
64
  }
70
65
 
71
66
  static void
72
- layout_data_func(layout, cell, tree_model, iter, func)
73
- GtkCellLayout *layout;
74
- GtkCellRenderer *cell;
75
- GtkTreeModel *tree_model;
76
- GtkTreeIter *iter;
77
- gpointer func;
67
+ layout_data_func(GtkCellLayout *layout, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer func)
78
68
  {
79
69
  iter->user_data3 = tree_model;
80
70
  rb_funcall((VALUE)func, id_call, 4, GOBJ2RVAL(layout), GOBJ2RVAL(cell),
@@ -82,8 +72,7 @@ layout_data_func(layout, cell, tree_model, iter, func)
82
72
  }
83
73
 
84
74
  static VALUE
85
- layout_set_cell_data_func(self, cell)
86
- VALUE self, cell;
75
+ layout_set_cell_data_func(VALUE self, VALUE cell)
87
76
  {
88
77
  if (rb_block_given_p()) {
89
78
  VALUE func = rb_block_proc();
@@ -99,16 +88,14 @@ layout_set_cell_data_func(self, cell)
99
88
  }
100
89
 
101
90
  static VALUE
102
- layout_clear_attributes(self, cell)
103
- VALUE self, cell;
91
+ layout_clear_attributes(VALUE self, VALUE cell)
104
92
  {
105
93
  gtk_cell_layout_clear_attributes(_SELF(self), RVAL2RENDERER(cell));
106
94
  return self;
107
95
  }
108
96
 
109
97
  static VALUE
110
- layout_set_attributes(self, cell, attrs)
111
- VALUE self, cell, attrs;
98
+ layout_set_attributes(VALUE self, VALUE cell, VALUE attrs)
112
99
  {
113
100
  gint i;
114
101
  VALUE ary;