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
@@ -14,24 +14,21 @@
14
14
  #define _SELF(self) (GTK_SIZE_GROUP(RVAL2GOBJ(self)))
15
15
 
16
16
  static VALUE
17
- sizegrp_initialize(self, mode)
18
- VALUE self, mode;
17
+ sizegrp_initialize(VALUE self, VALUE mode)
19
18
  {
20
19
  G_INITIALIZE(self, gtk_size_group_new(RVAL2GENUM(mode, GTK_TYPE_SIZE_GROUP_MODE)));
21
20
  return Qnil;
22
21
  }
23
22
 
24
23
  static VALUE
25
- sizegrp_add_widget(self, widget)
26
- VALUE self, widget;
24
+ sizegrp_add_widget(VALUE self, VALUE widget)
27
25
  {
28
26
  gtk_size_group_add_widget(_SELF(self), GTK_WIDGET(RVAL2GOBJ(widget)));
29
27
  return self;
30
28
  }
31
29
 
32
30
  static VALUE
33
- sizegrp_remove_widget(self, widget)
34
- VALUE self, widget;
31
+ sizegrp_remove_widget(VALUE self, VALUE widget)
35
32
  {
36
33
  gtk_size_group_remove_widget(_SELF(self), GTK_WIDGET(RVAL2GOBJ(widget)));
37
34
  return self;
@@ -47,8 +44,7 @@ gboolean gtk_size_group_get_ignore_hidden
47
44
 
48
45
  #if GTK_CHECK_VERSION(2,10,0)
49
46
  static VALUE
50
- sizegrp_get_widgets(self)
51
- VALUE self;
47
+ sizegrp_get_widgets(VALUE self)
52
48
  {
53
49
  return GSLIST2ARY(gtk_size_group_get_widgets(_SELF(self)));
54
50
  }
@@ -16,16 +16,14 @@
16
16
  #define _SELF(self) GTK_SOCKET(RVAL2GOBJ(self))
17
17
 
18
18
  static VALUE
19
- socket_initialize(self)
20
- VALUE self;
19
+ socket_initialize(VALUE self)
21
20
  {
22
21
  RBGTK_INITIALIZE(self, gtk_socket_new());
23
22
  return Qnil;
24
23
  }
25
24
 
26
25
  static VALUE
27
- socket_add_id(self, wid)
28
- VALUE self, wid;
26
+ socket_add_id(VALUE self, VALUE wid)
29
27
  {
30
28
  gtk_socket_add_id(_SELF(self),
31
29
  #ifdef GDK_NATIVE_WINDOW_POINTER
@@ -38,15 +36,13 @@ socket_add_id(self, wid)
38
36
  }
39
37
 
40
38
  static VALUE
41
- socket_plug_window(self)
42
- VALUE self;
39
+ socket_plug_window(VALUE self)
43
40
  {
44
41
  return GOBJ2RVAL(_SELF(self)->plug_window);
45
42
  }
46
43
 
47
44
  static VALUE
48
- socket_get_socket_id(self)
49
- VALUE self;
45
+ socket_get_socket_id(VALUE self)
50
46
  {
51
47
  GdkNativeWindow id = gtk_socket_get_id(_SELF(self));
52
48
  #ifdef GDK_NATIVE_WINDOW_POINTER
@@ -17,10 +17,7 @@
17
17
  #define _SELF(self) (GTK_SPIN_BUTTON(RVAL2GOBJ(self)))
18
18
 
19
19
  static VALUE
20
- sbtn_initialize(argc, argv, self)
21
- int argc;
22
- VALUE *argv;
23
- VALUE self;
20
+ sbtn_initialize(int argc, VALUE *argv, VALUE self)
24
21
  {
25
22
  VALUE arg1, arg2, arg3;
26
23
  GtkAdjustment *adj = NULL;
@@ -44,8 +41,7 @@ sbtn_initialize(argc, argv, self)
44
41
  }
45
42
 
46
43
  static VALUE
47
- sbtn_configure(self, adj, climb_rate, digits)
48
- VALUE self, adj, climb_rate, digits;
44
+ sbtn_configure(VALUE self, VALUE adj, VALUE climb_rate, VALUE digits)
49
45
  {
50
46
  gtk_spin_button_configure(_SELF(self), GTK_ADJUSTMENT(RVAL2GOBJ(adj)),
51
47
  NUM2DBL(climb_rate), NUM2UINT(digits));
@@ -53,16 +49,14 @@ sbtn_configure(self, adj, climb_rate, digits)
53
49
  }
54
50
 
55
51
  static VALUE
56
- sbtn_set_increments(self, step, page)
57
- VALUE self, step, page;
52
+ sbtn_set_increments(VALUE self, VALUE step, VALUE page)
58
53
  {
59
54
  gtk_spin_button_set_increments(_SELF(self), NUM2DBL(step), NUM2DBL(page));
60
55
  return self;
61
56
  }
62
57
 
63
58
  static VALUE
64
- sbtn_set_range(self, min, max)
65
- VALUE self, min, max;
59
+ sbtn_set_range(VALUE self, VALUE min, VALUE max)
66
60
  {
67
61
  gtk_spin_button_set_range(_SELF(self), NUM2DBL(min), NUM2DBL(max));
68
62
  return self;
@@ -70,15 +64,13 @@ sbtn_set_range(self, min, max)
70
64
 
71
65
 
72
66
  static VALUE
73
- sbtn_get_value_as_int(self)
74
- VALUE self;
67
+ sbtn_get_value_as_int(VALUE self)
75
68
  {
76
69
  return INT2NUM(gtk_spin_button_get_value_as_int(_SELF(self)));
77
70
  }
78
71
 
79
72
  static VALUE
80
- sbtn_spin(self, direction, increment)
81
- VALUE self, direction, increment;
73
+ sbtn_spin(VALUE self, VALUE direction, VALUE increment)
82
74
  {
83
75
  gtk_spin_button_spin(_SELF(self), RVAL2GENUM(direction, GTK_TYPE_SPIN_TYPE),
84
76
  NUM2DBL(increment));
@@ -86,16 +78,14 @@ sbtn_spin(self, direction, increment)
86
78
  }
87
79
 
88
80
  static VALUE
89
- sbtn_update(self)
90
- VALUE self;
81
+ sbtn_update(VALUE self)
91
82
  {
92
83
  gtk_spin_button_update(_SELF(self));
93
84
  return self;
94
85
  }
95
86
 
96
87
  static VALUE
97
- sbtn_get_increments(self)
98
- VALUE self;
88
+ sbtn_get_increments(VALUE self)
99
89
  {
100
90
  gdouble step, page;
101
91
  gtk_spin_button_get_increments(_SELF(self), &step, &page);
@@ -104,8 +94,7 @@ sbtn_get_increments(self)
104
94
  }
105
95
 
106
96
  static VALUE
107
- sbtn_get_range(self)
108
- VALUE self;
97
+ sbtn_get_range(VALUE self)
109
98
  {
110
99
  gdouble min, max;
111
100
  gtk_spin_button_get_range(_SELF(self), &min, &max);
@@ -0,0 +1,51 @@
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
+ /************************************************
3
+
4
+ rbgtkspinner.c -
5
+
6
+ $Author: masaakiaoyagi $
7
+ $Date: 2011-02-19 09:24:49 +0900 (土, 19 2月 2011) $
8
+
9
+ Copyright (C) 2011 Ruby-GNOME2 Project Team
10
+ ************************************************/
11
+
12
+ #include "global.h"
13
+
14
+ #if GTK_CHECK_VERSION(2,20,0)
15
+
16
+ #define _SELF(s) (GTK_SPINNER(RVAL2GOBJ(s)))
17
+
18
+ static VALUE
19
+ spinner_initialize(VALUE self)
20
+ {
21
+ RBGTK_INITIALIZE(self, gtk_spinner_new());
22
+ return Qnil;
23
+ }
24
+
25
+ static VALUE
26
+ spinner_start(VALUE self)
27
+ {
28
+ gtk_spinner_start(_SELF(self));
29
+ return self;
30
+ }
31
+
32
+ static VALUE
33
+ spinner_stop(VALUE self)
34
+ {
35
+ gtk_spinner_stop(_SELF(self));
36
+ return self;
37
+ }
38
+
39
+ #endif
40
+
41
+ void
42
+ Init_gtk_spinner()
43
+ {
44
+ #if GTK_CHECK_VERSION(2,20,0)
45
+ VALUE gSpinner = G_DEF_CLASS(GTK_TYPE_SPINNER, "Spinner", mGtk);
46
+
47
+ rb_define_method(gSpinner, "initialize", spinner_initialize, 0);
48
+ rb_define_method(gSpinner, "start", spinner_start, 0);
49
+ rb_define_method(gSpinner, "stop", spinner_stop, 0);
50
+ #endif
51
+ }
@@ -17,16 +17,14 @@
17
17
  #define _SELF(self) (GTK_STATUSBAR(RVAL2GOBJ(self)))
18
18
 
19
19
  static VALUE
20
- statusbar_initialize(self)
21
- VALUE self;
20
+ statusbar_initialize(VALUE self)
22
21
  {
23
22
  RBGTK_INITIALIZE(self, gtk_statusbar_new());
24
23
  return Qnil;
25
24
  }
26
25
 
27
26
  static VALUE
28
- statusbar_get_context_id(self, text)
29
- VALUE self, text;
27
+ statusbar_get_context_id(VALUE self, VALUE text)
30
28
  {
31
29
 
32
30
  return INT2FIX(gtk_statusbar_get_context_id(_SELF(self),
@@ -34,16 +32,14 @@ statusbar_get_context_id(self, text)
34
32
  }
35
33
 
36
34
  static VALUE
37
- statusbar_push(self, id, text)
38
- VALUE self, id, text;
35
+ statusbar_push(VALUE self, VALUE id, VALUE text)
39
36
  {
40
37
  return INT2FIX(gtk_statusbar_push(_SELF(self),
41
38
  NUM2INT(id), RVAL2CSTR(text)));
42
39
  }
43
40
 
44
41
  static VALUE
45
- statusbar_pop(self, id)
46
- VALUE self, id;
42
+ statusbar_pop(VALUE self, VALUE id)
47
43
  {
48
44
  gtk_statusbar_pop(_SELF(self), NUM2INT(id));
49
45
  return self;
@@ -51,24 +47,21 @@ statusbar_pop(self, id)
51
47
  }
52
48
 
53
49
  static VALUE
54
- statusbar_remove(self, cid, mid)
55
- VALUE self, cid, mid;
50
+ statusbar_remove(VALUE self, VALUE cid, VALUE mid)
56
51
  {
57
52
  gtk_statusbar_remove(_SELF(self), NUM2INT(cid), NUM2INT(mid));
58
53
  return self;
59
54
  }
60
55
 
61
56
  static VALUE
62
- statusbar_set_has_resize_grip(self, setting)
63
- VALUE self, setting;
57
+ statusbar_set_has_resize_grip(VALUE self, VALUE setting)
64
58
  {
65
59
  gtk_statusbar_set_has_resize_grip(_SELF(self), RVAL2CBOOL(setting));
66
60
  return self;
67
61
  }
68
62
 
69
63
  static VALUE
70
- statusbar_get_has_resize_grip(self)
71
- VALUE self;
64
+ statusbar_get_has_resize_grip(VALUE self)
72
65
  {
73
66
  return CBOOL2RVAL(gtk_statusbar_get_has_resize_grip(_SELF(self)));
74
67
  }
@@ -16,8 +16,7 @@
16
16
  #define _SELF(w) (GTK_STATUS_ICON(RVAL2GOBJ(w)))
17
17
 
18
18
  static VALUE
19
- si_initialize(self)
20
- VALUE self;
19
+ si_initialize(VALUE self)
21
20
  {
22
21
  G_INITIALIZE(self, gtk_status_icon_new());
23
22
  return Qnil;
@@ -58,23 +57,20 @@ gboolean gtk_status_icon_get_blinking (GtkStatusIcon *status_icon);
58
57
  */
59
58
 
60
59
  static VALUE
61
- si_set_tooltip(self, tooltip_text)
62
- VALUE self, tooltip_text;
60
+ si_set_tooltip(VALUE self, VALUE tooltip_text)
63
61
  {
64
62
  gtk_status_icon_set_tooltip(_SELF(self), RVAL2CSTR(tooltip_text));
65
63
  return self;
66
64
  }
67
65
 
68
66
  static VALUE
69
- si_is_embedded(self)
70
- VALUE self;
67
+ si_is_embedded(VALUE self)
71
68
  {
72
69
  return CBOOL2RVAL(gtk_status_icon_is_embedded(_SELF(self)));
73
70
  }
74
71
 
75
72
  static VALUE
76
- si_position_menu(self, menu)
77
- VALUE self, menu;
73
+ si_position_menu(VALUE self, VALUE menu)
78
74
  {
79
75
  gint x, y;
80
76
  gboolean push_in;
@@ -85,8 +81,7 @@ si_position_menu(self, menu)
85
81
  }
86
82
 
87
83
  static VALUE
88
- si_get_geometry(self)
89
- VALUE self;
84
+ si_get_geometry(VALUE self)
90
85
  {
91
86
  GdkScreen* screen;
92
87
  GdkRectangle area;
@@ -22,9 +22,7 @@
22
22
  #define CSTR2SYM(str) ID2SYM(rb_intern(str))
23
23
 
24
24
  static VALUE
25
- stock_m_add(argc, argv, klass)
26
- int argc;
27
- VALUE *argv, klass;
25
+ stock_m_add(int argc, VALUE *argv, VALUE klass)
28
26
  {
29
27
  VALUE stock_id, label, modifier, keyval, translation_domain;
30
28
  GtkStockItem item;
@@ -41,8 +39,7 @@ stock_m_add(argc, argv, klass)
41
39
  }
42
40
 
43
41
  static VALUE
44
- stock_m_lookup(klass, stock_id)
45
- VALUE klass, stock_id;
42
+ stock_m_lookup(VALUE klass, VALUE stock_id)
46
43
  {
47
44
  GtkStockItem item;
48
45
 
@@ -59,8 +56,7 @@ stock_m_lookup(klass, stock_id)
59
56
  }
60
57
 
61
58
  static VALUE
62
- stock_m_list_ids(klass)
63
- VALUE klass;
59
+ stock_m_list_ids(VALUE klass)
64
60
  {
65
61
  GSList *ids = gtk_stock_list_ids();
66
62
  GSList *l;
@@ -75,18 +71,14 @@ stock_m_list_ids(klass)
75
71
 
76
72
  #if GTK_CHECK_VERSION(2,8,0)
77
73
  static gchar*
78
- translate_func(path, func)
79
- const gchar* path;
80
- gpointer func;
74
+ translate_func(const gchar *path, gpointer func)
81
75
  {
82
76
  VALUE ret = rb_funcall((VALUE)func, id_call, 1, CSTR2RVAL(path));
83
77
  return RVAL2CSTR(ret);
84
78
  }
85
79
 
86
80
  static VALUE
87
- stock_m_set_translate_func(klass, domain)
88
- VALUE klass;
89
- VALUE domain;
81
+ stock_m_set_translate_func(VALUE klass, VALUE domain)
90
82
  {
91
83
  VALUE func = rb_block_proc();
92
84
  G_RELATIVE(klass, func);
@@ -24,46 +24,40 @@
24
24
  #define RVAL2ORI(s) (RVAL2GENUM(s, GTK_TYPE_ORIENTATION))
25
25
 
26
26
  static VALUE
27
- style_initialize(self)
28
- VALUE self;
27
+ style_initialize(VALUE self)
29
28
  {
30
29
  G_INITIALIZE(self, gtk_style_new());
31
30
  return Qnil;
32
31
  }
33
32
 
34
33
  static VALUE
35
- style_attached(self)
36
- VALUE self;
34
+ style_attached(VALUE self)
37
35
  {
38
36
  return CBOOL2RVAL(GTK_STYLE_ATTACHED(_SELF(self)));
39
37
  }
40
38
 
41
39
  static VALUE
42
- style_copy(self)
43
- VALUE self;
40
+ style_copy(VALUE self)
44
41
  {
45
42
  return GOBJ2RVAL(gtk_style_copy(_SELF(self)));
46
43
  }
47
44
 
48
45
  static VALUE
49
- style_attach(self, win)
50
- VALUE self, win;
46
+ style_attach(VALUE self, VALUE win)
51
47
  {
52
48
  return GOBJ2RVAL(gtk_style_attach(_SELF(self),
53
49
  GDK_WINDOW(RVAL2GOBJ(win))));
54
50
  }
55
51
 
56
52
  static VALUE
57
- style_detach(self)
58
- VALUE self;
53
+ style_detach(VALUE self)
59
54
  {
60
55
  gtk_style_detach(_SELF(self));
61
56
  return self;
62
57
  }
63
58
 
64
59
  static VALUE
65
- style_set_background(self, win, state_type)
66
- VALUE self, win, state_type;
60
+ style_set_background(VALUE self, VALUE win, VALUE state_type)
67
61
  {
68
62
  gtk_style_set_background(_SELF(self), GDK_WINDOW(RVAL2GOBJ(win)),
69
63
  RVAL2STATE(state_type));
@@ -71,9 +65,7 @@ style_set_background(self, win, state_type)
71
65
  }
72
66
 
73
67
  static VALUE
74
- style_apply_default_background(self, gdkwindow, set_bg, state_type, area,
75
- x, y, width, height)
76
- VALUE self, gdkwindow, set_bg, state_type, area, x, y, width, height;
68
+ style_apply_default_background(VALUE self, VALUE gdkwindow, VALUE set_bg, VALUE state_type, VALUE area, VALUE x, VALUE y, VALUE width, VALUE height)
77
69
  {
78
70
  gtk_style_apply_default_background(_SELF(self),
79
71
  GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
@@ -86,8 +78,7 @@ style_apply_default_background(self, gdkwindow, set_bg, state_type, area,
86
78
 
87
79
  #if GTK_CHECK_VERSION(2,10,0)
88
80
  static VALUE
89
- style_lookup_color(self, color_name)
90
- VALUE self, color_name;
81
+ style_lookup_color(VALUE self, VALUE color_name)
91
82
  {
92
83
  GdkColor color;
93
84
  if (gtk_style_lookup_color(_SELF(self), RVAL2CSTR(color_name), &color)){
@@ -99,8 +90,7 @@ style_lookup_color(self, color_name)
99
90
  #endif
100
91
 
101
92
  static VALUE
102
- style_lookup_icon_set(self, stock_id)
103
- VALUE self, stock_id;
93
+ style_lookup_icon_set(VALUE self, VALUE stock_id)
104
94
  {
105
95
  const gchar *id;
106
96
  GtkIconSet *ret;
@@ -115,8 +105,7 @@ style_lookup_icon_set(self, stock_id)
115
105
  }
116
106
 
117
107
  static VALUE
118
- style_render_icon(self, source, direction, state, size, widget, detail)
119
- VALUE self, source, direction, state, size, widget, detail;
108
+ style_render_icon(VALUE self, VALUE source, VALUE direction, VALUE state, VALUE size, VALUE widget, VALUE detail)
120
109
  {
121
110
  return GOBJ2RVAL(gtk_style_render_icon(_SELF(self), RVAL2ICONSOURCE(source),
122
111
  RVAL2GENUM(direction, GTK_TYPE_TEXT_DIRECTION),
@@ -127,10 +116,7 @@ style_render_icon(self, source, direction, state, size, widget, detail)
127
116
  }
128
117
 
129
118
  static VALUE
130
- style_paint_arrow(self, gdkwindow, state_type, shadow_type, area, widget, detail,
131
- arrow_type, fill, x, y, width, height)
132
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
133
- arrow_type, fill, x, y, width, height;
119
+ style_paint_arrow(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE arrow_type, VALUE fill, VALUE x, VALUE y, VALUE width, VALUE height)
134
120
  {
135
121
  gtk_paint_arrow(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
136
122
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -141,10 +127,7 @@ style_paint_arrow(self, gdkwindow, state_type, shadow_type, area, widget, detail
141
127
  }
142
128
 
143
129
  static VALUE
144
- style_paint_box(self, gdkwindow, state_type, shadow_type, area, widget, detail,
145
- x, y, width, height)
146
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
147
- x, y, width, height;
130
+ style_paint_box(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height)
148
131
  {
149
132
  gtk_paint_box(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
150
133
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -154,10 +137,7 @@ style_paint_box(self, gdkwindow, state_type, shadow_type, area, widget, detail,
154
137
  }
155
138
 
156
139
  static VALUE
157
- style_paint_box_gap(self, gdkwindow, state_type, shadow_type, area, widget, detail,
158
- x, y, width, height, gap_side, gap_x, gap_width)
159
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
160
- x, y, width, height, gap_side, gap_x, gap_width;
140
+ style_paint_box_gap(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height, VALUE gap_side, VALUE gap_x, VALUE gap_width)
161
141
  {
162
142
  gtk_paint_box_gap(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
163
143
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -168,10 +148,7 @@ style_paint_box_gap(self, gdkwindow, state_type, shadow_type, area, widget, deta
168
148
  }
169
149
 
170
150
  static VALUE
171
- style_paint_check(self, gdkwindow, state_type, shadow_type, area, widget, detail,
172
- x, y, width, height)
173
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
174
- x, y, width, height;
151
+ style_paint_check(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height)
175
152
  {
176
153
  gtk_paint_check(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
177
154
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -181,10 +158,7 @@ style_paint_check(self, gdkwindow, state_type, shadow_type, area, widget, detail
181
158
  }
182
159
 
183
160
  static VALUE
184
- style_paint_diamond(self, gdkwindow, state_type, shadow_type, area, widget, detail,
185
- x, y, width, height)
186
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
187
- x, y, width, height;
161
+ style_paint_diamond(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height)
188
162
  {
189
163
  gtk_paint_diamond(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
190
164
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -194,10 +168,7 @@ style_paint_diamond(self, gdkwindow, state_type, shadow_type, area, widget, deta
194
168
  }
195
169
 
196
170
  static VALUE
197
- style_paint_extension(self, gdkwindow, state_type, shadow_type, area, widget, detail,
198
- x, y, width, height, gap_side)
199
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
200
- x, y, width, height, gap_side;
171
+ style_paint_extension(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height, VALUE gap_side)
201
172
  {
202
173
  gtk_paint_extension(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
203
174
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -208,10 +179,7 @@ style_paint_extension(self, gdkwindow, state_type, shadow_type, area, widget, de
208
179
  }
209
180
 
210
181
  static VALUE
211
- style_paint_flat_box(self, gdkwindow, state_type, shadow_type, area, widget, detail,
212
- x, y, width, height)
213
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
214
- x, y, width, height;
182
+ style_paint_flat_box(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height)
215
183
  {
216
184
  gtk_paint_flat_box(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
217
185
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -221,10 +189,7 @@ style_paint_flat_box(self, gdkwindow, state_type, shadow_type, area, widget, det
221
189
  }
222
190
 
223
191
  static VALUE
224
- style_paint_focus(self, gdkwindow, state_type, area, widget, detail,
225
- x, y, width, height)
226
- VALUE self, gdkwindow, state_type, area, widget, detail,
227
- x, y, width, height;
192
+ style_paint_focus(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height)
228
193
  {
229
194
  gtk_paint_focus(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
230
195
  RVAL2STATE(state_type), RVAL2REC(area),
@@ -234,10 +199,7 @@ style_paint_focus(self, gdkwindow, state_type, area, widget, detail,
234
199
  }
235
200
 
236
201
  static VALUE
237
- style_paint_handle(self, gdkwindow, state_type, shadow_type, area, widget, detail,
238
- x, y, width, height, orientation)
239
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
240
- x, y, width, height, orientation;
202
+ style_paint_handle(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height, VALUE orientation)
241
203
  {
242
204
  gtk_paint_handle(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
243
205
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -248,8 +210,7 @@ style_paint_handle(self, gdkwindow, state_type, shadow_type, area, widget, detai
248
210
  }
249
211
 
250
212
  static VALUE
251
- style_paint_hline(self, gdkwindow, state_type, area, widget, detail, x1, x2, y)
252
- VALUE self, gdkwindow, state_type, area, widget, detail, x1, x2, y;
213
+ style_paint_hline(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE area, VALUE widget, VALUE detail, VALUE x1, VALUE x2, VALUE y)
253
214
  {
254
215
  gtk_paint_hline(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
255
216
  RVAL2STATE(state_type), RVAL2REC(area),
@@ -259,10 +220,7 @@ style_paint_hline(self, gdkwindow, state_type, area, widget, detail, x1, x2, y)
259
220
  }
260
221
 
261
222
  static VALUE
262
- style_paint_option(self, gdkwindow, state_type, shadow_type, area, widget, detail,
263
- x, y, width, height)
264
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
265
- x, y, width, height;
223
+ style_paint_option(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height)
266
224
  {
267
225
  gtk_paint_option(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
268
226
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -273,10 +231,7 @@ style_paint_option(self, gdkwindow, state_type, shadow_type, area, widget, detai
273
231
  }
274
232
 
275
233
  static VALUE
276
- style_paint_polygon(self, gdkwindow, state_type, shadow_type, area, widget, detail,
277
- points, fill)
278
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
279
- points, fill;
234
+ style_paint_polygon(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE points, VALUE fill)
280
235
  {
281
236
  int i;
282
237
  GdkPoint* gpoints = g_new (GdkPoint, RARRAY_LEN(points));
@@ -294,10 +249,7 @@ style_paint_polygon(self, gdkwindow, state_type, shadow_type, area, widget, deta
294
249
  }
295
250
 
296
251
  static VALUE
297
- style_paint_shadow(self, gdkwindow, state_type, shadow_type, area, widget, detail,
298
- x, y, width, height)
299
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
300
- x, y, width, height;
252
+ style_paint_shadow(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height)
301
253
  {
302
254
  gtk_paint_shadow(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
303
255
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -308,10 +260,7 @@ style_paint_shadow(self, gdkwindow, state_type, shadow_type, area, widget, detai
308
260
  }
309
261
 
310
262
  static VALUE
311
- style_paint_shadow_gap(self, gdkwindow, state_type, shadow_type, area, widget, detail,
312
- x, y, width, height, gap_side, gap_x, gap_width)
313
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
314
- x, y, width, height, gap_side, gap_x, gap_width;
263
+ style_paint_shadow_gap(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height, VALUE gap_side, VALUE gap_x, VALUE gap_width)
315
264
  {
316
265
  gtk_paint_shadow_gap(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
317
266
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -323,10 +272,7 @@ style_paint_shadow_gap(self, gdkwindow, state_type, shadow_type, area, widget, d
323
272
  }
324
273
 
325
274
  static VALUE
326
- style_paint_slider(self, gdkwindow, state_type, shadow_type, area, widget, detail,
327
- x, y, width, height, orientation)
328
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
329
- x, y, width, height, orientation;
275
+ style_paint_slider(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height, VALUE orientation)
330
276
  {
331
277
  gtk_paint_slider(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
332
278
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -338,10 +284,7 @@ style_paint_slider(self, gdkwindow, state_type, shadow_type, area, widget, detai
338
284
  }
339
285
 
340
286
  static VALUE
341
- style_paint_tab(self, gdkwindow, state_type, shadow_type, area, widget, detail,
342
- x, y, width, height)
343
- VALUE self, gdkwindow, state_type, shadow_type, area, widget, detail,
344
- x, y, width, height;
287
+ style_paint_tab(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE shadow_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE width, VALUE height)
345
288
  {
346
289
  gtk_paint_tab(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
347
290
  RVAL2STATE(state_type), RVAL2SHADOW(shadow_type), RVAL2REC(area),
@@ -352,8 +295,7 @@ style_paint_tab(self, gdkwindow, state_type, shadow_type, area, widget, detail,
352
295
  }
353
296
 
354
297
  static VALUE
355
- style_paint_vline(self, gdkwindow, state_type, area, widget, detail, y1, y2, x)
356
- VALUE self, gdkwindow, state_type, area, widget, detail, y1, y2, x;
298
+ style_paint_vline(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE area, VALUE widget, VALUE detail, VALUE y1, VALUE y2, VALUE x)
357
299
  {
358
300
  gtk_paint_vline(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
359
301
  RVAL2STATE(state_type), RVAL2REC(area),
@@ -364,10 +306,7 @@ style_paint_vline(self, gdkwindow, state_type, area, widget, detail, y1, y2, x)
364
306
  }
365
307
 
366
308
  static VALUE
367
- style_paint_expander(self, gdkwindow, state_type, area, widget, detail,
368
- x, y, expander_style)
369
- VALUE self, gdkwindow, state_type, area, widget, detail,
370
- x, y, expander_style;
309
+ style_paint_expander(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE expander_style)
371
310
  {
372
311
  gtk_paint_expander(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
373
312
  RVAL2STATE(state_type), RVAL2REC(area),
@@ -378,10 +317,7 @@ style_paint_expander(self, gdkwindow, state_type, area, widget, detail,
378
317
  }
379
318
 
380
319
  static VALUE
381
- style_paint_layout(self, gdkwindow, state_type, use_text, area,
382
- widget, detail, x, y, layout)
383
- VALUE self, gdkwindow, state_type, use_text, area, widget, detail,
384
- x, y, layout;
320
+ style_paint_layout(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE use_text, VALUE area, VALUE widget, VALUE detail, VALUE x, VALUE y, VALUE layout)
385
321
  {
386
322
  gtk_paint_layout(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
387
323
  RVAL2STATE(state_type), RVAL2CBOOL(use_text), RVAL2REC(area),
@@ -392,10 +328,7 @@ style_paint_layout(self, gdkwindow, state_type, use_text, area,
392
328
  }
393
329
 
394
330
  static VALUE
395
- style_paint_resize_grip(self, gdkwindow, state_type, area, widget, detail,
396
- edge, x, y, width, height)
397
- VALUE self, gdkwindow, state_type, area, widget, detail, edge, x, y,
398
- width, height;
331
+ style_paint_resize_grip(VALUE self, VALUE gdkwindow, VALUE state_type, VALUE area, VALUE widget, VALUE detail, VALUE edge, VALUE x, VALUE y, VALUE width, VALUE height)
399
332
  {
400
333
  gtk_paint_resize_grip(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)),
401
334
  RVAL2STATE(state_type), RVAL2REC(area),
@@ -408,8 +341,7 @@ style_paint_resize_grip(self, gdkwindow, state_type, area, widget, detail,
408
341
  }
409
342
  #if GTK_CHECK_VERSION(2,4,0)
410
343
  static VALUE
411
- style_s_draw_insertion_cursor(self, widget, drawable, area, location, is_primary, direction, draw_arrow)
412
- VALUE self, widget, drawable, area, location, is_primary, direction, draw_arrow;
344
+ style_s_draw_insertion_cursor(VALUE self, VALUE widget, VALUE drawable, VALUE area, VALUE location, VALUE is_primary, VALUE direction, VALUE draw_arrow)
413
345
  {
414
346
  gtk_draw_insertion_cursor(GTK_WIDGET(RVAL2GOBJ(widget)),
415
347
  GDK_WINDOW(RVAL2GOBJ(drawable)),
@@ -423,8 +355,7 @@ style_s_draw_insertion_cursor(self, widget, drawable, area, location, is_primary
423
355
 
424
356
  #define DEFINE_STYLE_COLOR(type) \
425
357
  static VALUE \
426
- style_set_ ## type(self, idx, r, g, b) \
427
- VALUE self, idx, r, g, b; \
358
+ style_set_ ## type(VALUE self, VALUE idx, VALUE r, VALUE g, VALUE b) \
428
359
  { \
429
360
  GdkColor *color; \
430
361
  int i = NUM2INT(idx); \
@@ -437,8 +368,7 @@ style_set_ ## type(self, idx, r, g, b) \
437
368
  return self; \
438
369
  } \
439
370
  static VALUE \
440
- style_ ## type(self, idx) \
441
- VALUE self, idx; \
371
+ style_ ## type(VALUE self, VALUE idx) \
442
372
  { \
443
373
  int i = NUM2INT(idx); \
444
374
  \
@@ -456,15 +386,13 @@ DEFINE_STYLE_COLOR(base);
456
386
  DEFINE_STYLE_COLOR(text_aa);
457
387
 
458
388
  static VALUE
459
- style_black(self)
460
- VALUE self;
389
+ style_black(VALUE self)
461
390
  {
462
391
  return BOXED2RVAL(&_SELF(self)->black, GDK_TYPE_COLOR);
463
392
  }
464
393
 
465
394
  static VALUE
466
- style_set_black(self, r, g, b)
467
- VALUE self, r, g, b;
395
+ style_set_black(VALUE self, VALUE r, VALUE g, VALUE b)
468
396
  {
469
397
  GdkColor* color = &(_SELF(self)->black);
470
398
  color->red = NUM2INT(r);
@@ -475,15 +403,13 @@ style_set_black(self, r, g, b)
475
403
  }
476
404
 
477
405
  static VALUE
478
- style_white(self)
479
- VALUE self;
406
+ style_white(VALUE self)
480
407
  {
481
408
  return BOXED2RVAL(&_SELF(self)->white, GDK_TYPE_COLOR);
482
409
  }
483
410
 
484
411
  static VALUE
485
- style_set_white(self, r, g, b)
486
- VALUE self, r, g, b;
412
+ style_set_white(VALUE self, VALUE r, VALUE g, VALUE b)
487
413
  {
488
414
  GdkColor* color = &(_SELF(self)->white);
489
415
  color->red = NUM2INT(r);
@@ -493,16 +419,14 @@ style_set_white(self, r, g, b)
493
419
  }
494
420
 
495
421
  static VALUE
496
- style_font_desc(self)
497
- VALUE self;
422
+ style_font_desc(VALUE self)
498
423
  {
499
424
  PangoFontDescription* desc = _SELF(self)->font_desc;
500
425
  return BOXED2RVAL(desc, PANGO_TYPE_FONT_DESCRIPTION);
501
426
  }
502
427
 
503
428
  static VALUE
504
- style_set_font_desc(self, font_desc)
505
- VALUE self, font_desc;
429
+ style_set_font_desc(VALUE self, VALUE font_desc)
506
430
  {
507
431
  GtkStyle *style = _SELF(self);
508
432
  if (style->font_desc)
@@ -512,30 +436,26 @@ style_set_font_desc(self, font_desc)
512
436
  }
513
437
 
514
438
  static VALUE
515
- style_xthickness(self)
516
- VALUE self;
439
+ style_xthickness(VALUE self)
517
440
  {
518
441
  return INT2NUM(_SELF(self)->xthickness);
519
442
  }
520
443
 
521
444
  static VALUE
522
- style_set_xthickness(self, xthickness)
523
- VALUE self, xthickness;
445
+ style_set_xthickness(VALUE self, VALUE xthickness)
524
446
  {
525
447
  _SELF(self)->xthickness = NUM2INT(xthickness);
526
448
  return self;
527
449
  }
528
450
 
529
451
  static VALUE
530
- style_ythickness(self)
531
- VALUE self;
452
+ style_ythickness(VALUE self)
532
453
  {
533
454
  return INT2NUM(_SELF(self)->ythickness);
534
455
  }
535
456
 
536
457
  static VALUE
537
- style_set_ythickness(self, ythickness)
538
- VALUE self, ythickness;
458
+ style_set_ythickness(VALUE self, VALUE ythickness)
539
459
  {
540
460
  _SELF(self)->ythickness = NUM2INT(ythickness);
541
461
  return self;
@@ -543,8 +463,7 @@ style_set_ythickness(self, ythickness)
543
463
 
544
464
  #define DEFINE_STYLE_GC(type) \
545
465
  static VALUE \
546
- style_set_ ## type(self, idx, gc) \
547
- VALUE self, idx, gc; \
466
+ style_set_ ## type(VALUE self, VALUE idx, VALUE gc) \
548
467
  { \
549
468
  int i = NUM2INT(idx); \
550
469
  \
@@ -553,8 +472,7 @@ style_set_ ## type(self, idx, gc) \
553
472
  return self;\
554
473
  } \
555
474
  static VALUE \
556
- style_ ## type(self, idx) \
557
- VALUE self, idx; \
475
+ style_ ## type(VALUE self, VALUE idx) \
558
476
  { \
559
477
  int i = NUM2INT(idx); \
560
478
  \
@@ -572,38 +490,33 @@ DEFINE_STYLE_GC(base_gc);
572
490
  DEFINE_STYLE_GC(text_aa_gc);
573
491
 
574
492
  static VALUE
575
- style_black_gc(self)
576
- VALUE self;
493
+ style_black_gc(VALUE self)
577
494
  {
578
495
  return GOBJ2RVAL(_SELF(self)->black_gc);
579
496
  }
580
497
 
581
498
  static VALUE
582
- style_set_black_gc(self, gc)
583
- VALUE self, gc;
499
+ style_set_black_gc(VALUE self, VALUE gc)
584
500
  {
585
501
  _SELF(self)->black_gc = GDK_GC(RVAL2GOBJ(gc));
586
502
  return self;
587
503
  }
588
504
 
589
505
  static VALUE
590
- style_white_gc(self)
591
- VALUE self;
506
+ style_white_gc(VALUE self)
592
507
  {
593
508
  return GOBJ2RVAL(_SELF(self)->white_gc);
594
509
  }
595
510
 
596
511
  static VALUE
597
- style_set_white_gc(self, gc)
598
- VALUE self, gc;
512
+ style_set_white_gc(VALUE self, VALUE gc)
599
513
  {
600
514
  _SELF(self)->white_gc = GDK_GC(RVAL2GOBJ(gc));
601
515
  return self;
602
516
  }
603
517
 
604
518
  static VALUE
605
- style_bg_pixmap(self, idx)
606
- VALUE self, idx;
519
+ style_bg_pixmap(VALUE self, VALUE idx)
607
520
  {
608
521
  int i = NUM2INT(idx);
609
522
 
@@ -613,8 +526,7 @@ style_bg_pixmap(self, idx)
613
526
  }
614
527
 
615
528
  static VALUE
616
- style_set_bg_pixmap(self, idx, bg_pixmap)
617
- VALUE self, idx, bg_pixmap;
529
+ style_set_bg_pixmap(VALUE self, VALUE idx, VALUE bg_pixmap)
618
530
  {
619
531
  int i = NUM2INT(idx);
620
532
  GdkPixmap* pixmap = RVAL2GOBJ(bg_pixmap);