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
@@ -16,8 +16,7 @@
16
16
  #define RECT2RVAL(r) (BOXED2RVAL(r, GDK_TYPE_RECTANGLE))
17
17
 
18
18
  static VALUE
19
- cellrenderer_get_size(self, widget, cell_area)
20
- VALUE self, widget, cell_area;
19
+ cellrenderer_get_size(VALUE self, VALUE widget, VALUE cell_area)
21
20
  {
22
21
  GdkRectangle ret;
23
22
 
@@ -28,9 +27,7 @@ cellrenderer_get_size(self, widget, cell_area)
28
27
  }
29
28
 
30
29
  static VALUE
31
- cellrenderer_render(self, window, widget, background_area, cell_area,
32
- expose_area, flags)
33
- VALUE self, window, widget, background_area, cell_area, expose_area, flags;
30
+ cellrenderer_render(VALUE self, VALUE window, VALUE widget, VALUE background_area, VALUE cell_area, VALUE expose_area, VALUE flags)
34
31
  {
35
32
  gtk_cell_renderer_render(_SELF(self), GDK_WINDOW(RVAL2GOBJ(window)),
36
33
  GTK_WIDGET(RVAL2GOBJ(widget)),
@@ -42,9 +39,7 @@ cellrenderer_render(self, window, widget, background_area, cell_area,
42
39
  }
43
40
 
44
41
  static VALUE
45
- cellrenderer_activate(self, event, widget, path, background_area,
46
- cell_area, flags)
47
- VALUE self, event, widget, path, background_area, cell_area, flags;
42
+ cellrenderer_activate(VALUE self, VALUE event, VALUE widget, VALUE path, VALUE background_area, VALUE cell_area, VALUE flags)
48
43
  {
49
44
  gboolean ret =
50
45
  gtk_cell_renderer_activate(_SELF(self), (GdkEvent*)RVAL2GEV(event),
@@ -56,9 +51,7 @@ cellrenderer_activate(self, event, widget, path, background_area,
56
51
  }
57
52
 
58
53
  static VALUE
59
- cellrenderer_start_editing(self, event, widget, path, background_area,
60
- cell_area, flags)
61
- VALUE self, event, widget, path, background_area, cell_area, flags;
54
+ cellrenderer_start_editing(VALUE self, VALUE event, VALUE widget, VALUE path, VALUE background_area, VALUE cell_area, VALUE flags)
62
55
  {
63
56
  GtkCellEditable* edit =
64
57
  gtk_cell_renderer_start_editing(_SELF(self), (GdkEvent*)RVAL2GEV(event),
@@ -72,8 +65,7 @@ cellrenderer_start_editing(self, event, widget, path, background_area,
72
65
  #if GTK_CHECK_VERSION(2,4,0)
73
66
  #ifndef GTK_DISABLE_DEPRECATED
74
67
  static VALUE
75
- cellrenderer_editing_canceled(self)
76
- VALUE self;
68
+ cellrenderer_editing_canceled(VALUE self)
77
69
  {
78
70
  gtk_cell_renderer_editing_canceled(_SELF(self));
79
71
  return self;
@@ -83,8 +75,7 @@ cellrenderer_editing_canceled(self)
83
75
 
84
76
  #if GTK_CHECK_VERSION(2,6,0)
85
77
  static VALUE
86
- cellrenderer_stop_editing(self, canceled)
87
- VALUE self, canceled;
78
+ cellrenderer_stop_editing(VALUE self, VALUE canceled)
88
79
  {
89
80
  gtk_cell_renderer_stop_editing(_SELF(self), RVAL2CBOOL(canceled));
90
81
  return self;
@@ -92,8 +83,7 @@ cellrenderer_stop_editing(self, canceled)
92
83
  #endif
93
84
 
94
85
  static VALUE
95
- cellrenderer_get_fixed_size(self)
96
- VALUE self;
86
+ cellrenderer_get_fixed_size(VALUE self)
97
87
  {
98
88
  int width, height;
99
89
  gtk_cell_renderer_get_fixed_size(_SELF(self), &width, &height);
@@ -101,8 +91,7 @@ cellrenderer_get_fixed_size(self)
101
91
  }
102
92
 
103
93
  static VALUE
104
- cellrenderer_set_fixed_size(self, width, height)
105
- VALUE self, width, height;
94
+ cellrenderer_set_fixed_size(VALUE self, VALUE width, VALUE height)
106
95
  {
107
96
  gtk_cell_renderer_set_fixed_size(_SELF(self), NUM2INT(width),
108
97
  NUM2INT(height));
@@ -16,8 +16,7 @@
16
16
  #define _SELF(s) (GTK_CELL_RENDERER_ACCEL(RVAL2GOBJ(s)))
17
17
 
18
18
  static VALUE
19
- craccel_initialize(self)
20
- VALUE self;
19
+ craccel_initialize(VALUE self)
21
20
  {
22
21
  RBGTK_INITIALIZE(self, gtk_cell_renderer_accel_new());
23
22
  return Qnil;
@@ -14,8 +14,7 @@
14
14
  #if GTK_CHECK_VERSION(2,6,0)
15
15
 
16
16
  static VALUE
17
- crcombo_initialize(self)
18
- VALUE self;
17
+ crcombo_initialize(VALUE self)
19
18
  {
20
19
  RBGTK_INITIALIZE(self, gtk_cell_renderer_combo_new());
21
20
  return Qnil;
@@ -15,8 +15,7 @@
15
15
  #define _SELF(s) (GTK_CELL_RENDERER_PIXBUF(RVAL2GOBJ(s)))
16
16
 
17
17
  static VALUE
18
- crpixbuf_initialize(self)
19
- VALUE self;
18
+ crpixbuf_initialize(VALUE self)
20
19
  {
21
20
  RBGTK_INITIALIZE(self, gtk_cell_renderer_pixbuf_new());
22
21
  return Qnil;
@@ -14,8 +14,7 @@
14
14
  #if GTK_CHECK_VERSION(2,6,0)
15
15
 
16
16
  static VALUE
17
- crprogress_initialize(self)
18
- VALUE self;
17
+ crprogress_initialize(VALUE self)
19
18
  {
20
19
  RBGTK_INITIALIZE(self, gtk_cell_renderer_progress_new());
21
20
  return Qnil;
@@ -16,8 +16,7 @@
16
16
  #define _SELF(s) (GTK_CELL_RENDERER_SPIN(RVAL2GOBJ(s)))
17
17
 
18
18
  static VALUE
19
- crspin_initialize(self)
20
- VALUE self;
19
+ crspin_initialize(VALUE self)
21
20
  {
22
21
  RBGTK_INITIALIZE(self, gtk_cell_renderer_spin_new());
23
22
  return Qnil;
@@ -0,0 +1,35 @@
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
+ /************************************************
3
+
4
+ rbgtkcellrendererspinner.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_CELL_RENDERER_SPINNER(RVAL2GOBJ(s)))
17
+
18
+ static VALUE
19
+ crspinner_initialize(VALUE self)
20
+ {
21
+ RBGTK_INITIALIZE(self, gtk_cell_renderer_spinner_new());
22
+ return Qnil;
23
+ }
24
+
25
+ #endif
26
+
27
+ void
28
+ Init_gtk_cellrendererspinner()
29
+ {
30
+ #if GTK_CHECK_VERSION(2,20,0)
31
+ VALUE renderer = G_DEF_CLASS(GTK_TYPE_CELL_RENDERER_SPINNER, "CellRendererSpinner", mGtk);
32
+ rb_define_method(renderer, "initialize", crspinner_initialize, 0);
33
+ #endif
34
+ }
35
+
@@ -15,16 +15,14 @@
15
15
  #define _SELF(s) (GTK_CELL_RENDERER_TEXT(RVAL2GOBJ(s)))
16
16
 
17
17
  static VALUE
18
- crtext_initialize(self)
19
- VALUE self;
18
+ crtext_initialize(VALUE self)
20
19
  {
21
20
  RBGTK_INITIALIZE(self, gtk_cell_renderer_text_new());
22
21
  return Qnil;
23
22
  }
24
23
 
25
24
  static VALUE
26
- crtext_set_fixed_height_from_font(self, number_of_rows)
27
- VALUE self, number_of_rows;
25
+ crtext_set_fixed_height_from_font(VALUE self, VALUE number_of_rows)
28
26
  {
29
27
  gtk_cell_renderer_text_set_fixed_height_from_font(_SELF(self), NUM2INT(number_of_rows));
30
28
  return self;
@@ -14,8 +14,7 @@
14
14
  #define _SELF(s) (GTK_CELL_RENDERER_TOGGLE(RVAL2GOBJ(s)))
15
15
 
16
16
  static VALUE
17
- crtoggle_initialize(self)
18
- VALUE self;
17
+ crtoggle_initialize(VALUE self)
19
18
  {
20
19
  RBGTK_INITIALIZE(self, gtk_cell_renderer_toggle_new());
21
20
  return Qnil;
@@ -19,10 +19,7 @@ static ID id_model;
19
19
  static ID id_text;
20
20
 
21
21
  static VALUE
22
- cview_initialize(argc, argv, self)
23
- int argc;
24
- VALUE *argv;
25
- VALUE self;
22
+ cview_initialize(int argc, VALUE *argv, VALUE self)
26
23
  {
27
24
  VALUE text;
28
25
  VALUE with_markup = Qnil;
@@ -55,8 +52,7 @@ cview_initialize(argc, argv, self)
55
52
  }
56
53
 
57
54
  static VALUE
58
- cview_set_model(self, model)
59
- VALUE self, model;
55
+ cview_set_model(VALUE self, VALUE model)
60
56
  {
61
57
  G_CHILD_SET(self, id_model, model);
62
58
  gtk_cell_view_set_model(_SELF(self),
@@ -65,8 +61,7 @@ cview_set_model(self, model)
65
61
  }
66
62
 
67
63
  static VALUE
68
- cview_set_displayed_row(self, path)
69
- VALUE self, path;
64
+ cview_set_displayed_row(VALUE self, VALUE path)
70
65
  {
71
66
  gtk_cell_view_set_displayed_row(_SELF(self),
72
67
  NIL_P(path) ? (GtkTreePath*)NULL :
@@ -75,15 +70,13 @@ cview_set_displayed_row(self, path)
75
70
  }
76
71
 
77
72
  static VALUE
78
- cview_get_displayed_row(self)
79
- VALUE self;
73
+ cview_get_displayed_row(VALUE self)
80
74
  {
81
75
  return GTKTREEPATH2RVAL(gtk_cell_view_get_displayed_row(_SELF(self)));
82
76
  }
83
77
 
84
78
  static VALUE
85
- cview_get_size_of_row(self, path)
86
- VALUE self, path;
79
+ cview_get_size_of_row(VALUE self, VALUE path)
87
80
  {
88
81
  GtkRequisition req;
89
82
  gboolean ret = gtk_cell_view_get_size_of_row(_SELF(self),
@@ -102,8 +95,7 @@ void gtk_cell_view_set_background_color
102
95
  */
103
96
 
104
97
  static VALUE
105
- cview_get_cell_renderers(self)
106
- VALUE self;
98
+ cview_get_cell_renderers(VALUE self)
107
99
  {
108
100
  return GLIST2ARYF(gtk_cell_view_get_cell_renderers(_SELF(self)));
109
101
  }
@@ -15,10 +15,7 @@
15
15
  #include "global.h"
16
16
 
17
17
  static VALUE
18
- cbtn_initialize(argc, argv, self)
19
- int argc;
20
- VALUE *argv;
21
- VALUE self;
18
+ cbtn_initialize(int argc, VALUE *argv, VALUE self)
22
19
  {
23
20
  VALUE label, use_underline;
24
21
  GtkWidget *widget;
@@ -15,10 +15,7 @@
15
15
  #include "global.h"
16
16
 
17
17
  static VALUE
18
- cmitem_initialize(argc, argv, self)
19
- int argc;
20
- VALUE *argv;
21
- VALUE self;
18
+ cmitem_initialize(int argc, VALUE *argv, VALUE self)
22
19
  {
23
20
  VALUE label, use_underline;
24
21
  GtkWidget *widget = NULL;
@@ -39,8 +36,7 @@ cmitem_initialize(argc, argv, self)
39
36
  }
40
37
 
41
38
  static VALUE
42
- cmitem_toggled(self)
43
- VALUE self;
39
+ cmitem_toggled(VALUE self)
44
40
  {
45
41
  gtk_check_menu_item_toggled(GTK_CHECK_MENU_ITEM(RVAL2GOBJ(self)));
46
42
  return self;
@@ -33,25 +33,20 @@ rbgtk_clipboard_get_type()
33
33
  }
34
34
 
35
35
  GtkClipboard*
36
- rbgtk_get_clipboard(obj)
37
- VALUE obj;
36
+ rbgtk_get_clipboard(VALUE obj)
38
37
  {
39
38
  return GTK_CLIPBOARD(RVAL2GOBJ(obj));
40
39
  }
41
40
 
42
41
  VALUE
43
- rbgtk_make_clipboard(gobj)
44
- GtkClipboard* gobj;
42
+ rbgtk_make_clipboard(GtkClipboard *gobj)
45
43
  {
46
44
  return GOBJ2RVAL(gobj);
47
45
  }
48
46
  #endif
49
47
 
50
48
  static VALUE
51
- clipboard_get(argc, argv, self)
52
- int argc;
53
- VALUE* argv;
54
- VALUE self;
49
+ clipboard_get(int argc, VALUE *argv, VALUE self)
55
50
  {
56
51
  GtkClipboard *clipboard;
57
52
 
@@ -73,8 +68,7 @@ clipboard_get(argc, argv, self)
73
68
  }
74
69
 
75
70
  static VALUE
76
- clipboard_get_display(self)
77
- VALUE self;
71
+ clipboard_get_display(VALUE self)
78
72
  {
79
73
  #if GTK_CHECK_VERSION(2,2,0)
80
74
  return GOBJ2RVAL(gtk_clipboard_get_display(_SELF(self)));
@@ -84,18 +78,14 @@ clipboard_get_display(self)
84
78
  }
85
79
 
86
80
  static void
87
- clipboard_get_func(clipboard, selection_data, info, func)
88
- GtkClipboard *clipboard;
89
- GtkSelectionData* selection_data;
90
- gpointer func;
81
+ clipboard_get_func(GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, gpointer func)
91
82
  {
92
83
  rb_funcall((VALUE)func, id_call, 2, CLIPBOARD2RVAL(clipboard),
93
84
  BOXED2RVAL(selection_data, GTK_TYPE_SELECTION_DATA));
94
85
  }
95
86
 
96
87
  static VALUE
97
- clipboard_set(self, targets)
98
- VALUE self, targets;
88
+ clipboard_set(VALUE self, VALUE targets)
99
89
  {
100
90
  const GtkTargetEntry* gtargets = (const GtkTargetEntry*)rbgtk_get_target_entry(targets);
101
91
  VALUE func = rb_block_proc();
@@ -117,8 +107,7 @@ gboolean gtk_clipboard_set_with_owner (GtkClipboard *clipboard,
117
107
  GObject *owner);
118
108
 
119
109
  static VALUE
120
- clipboard_get_owner(self)
121
- VALUE self;
110
+ clipboard_get_owner(VALUE self)
122
111
  {
123
112
  GObject *gobj;
124
113
  gobj = gtk_clipboard_get_owner(_SELF(self));
@@ -127,16 +116,14 @@ clipboard_get_owner(self)
127
116
  */
128
117
 
129
118
  static VALUE
130
- clipboard_clear(self)
131
- VALUE self;
119
+ clipboard_clear(VALUE self)
132
120
  {
133
121
  gtk_clipboard_clear(_SELF(self));
134
122
  return self;
135
123
  }
136
124
 
137
125
  static VALUE
138
- clipboard_set_text(self, text)
139
- VALUE self, text;
126
+ clipboard_set_text(VALUE self, VALUE text)
140
127
  {
141
128
  StringValue(text);
142
129
  gtk_clipboard_set_text(_SELF(self), RVAL2CSTR(text), RSTRING_LEN(text));
@@ -145,8 +132,7 @@ clipboard_set_text(self, text)
145
132
 
146
133
  #if GTK_CHECK_VERSION(2,6,0)
147
134
  static VALUE
148
- clipboard_set_image(self, pixbuf)
149
- VALUE self, pixbuf;
135
+ clipboard_set_image(VALUE self, VALUE pixbuf)
150
136
  {
151
137
  gtk_clipboard_set_image(_SELF(self), GDK_PIXBUF(RVAL2GOBJ(pixbuf)));
152
138
  return self;
@@ -154,18 +140,14 @@ clipboard_set_image(self, pixbuf)
154
140
  #endif
155
141
 
156
142
  static void
157
- clipboard_received_func(clipboard, selection_data, func)
158
- GtkClipboard *clipboard;
159
- GtkSelectionData* selection_data;
160
- gpointer func;
143
+ clipboard_received_func(GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer func)
161
144
  {
162
145
  rb_funcall((VALUE)func, id_call, 2, CLIPBOARD2RVAL(clipboard),
163
146
  BOXED2RVAL(selection_data, GTK_TYPE_SELECTION_DATA));
164
147
  }
165
148
 
166
149
  static VALUE
167
- clipboard_request_contents(self, target)
168
- VALUE self, target;
150
+ clipboard_request_contents(VALUE self, VALUE target)
169
151
  {
170
152
  VALUE func = rb_block_proc();
171
153
  G_RELATIVE(self, func);
@@ -188,8 +170,7 @@ clipboard_text_received_func(GtkClipboard *clipboard, const gchar *text,
188
170
  }
189
171
 
190
172
  static VALUE
191
- clipboard_request_text(self)
192
- VALUE self;
173
+ clipboard_request_text(VALUE self)
193
174
  {
194
175
  VALUE func = rb_block_proc();
195
176
  G_RELATIVE(self, func);
@@ -201,18 +182,14 @@ clipboard_request_text(self)
201
182
 
202
183
  #if GTK_CHECK_VERSION(2,6,0)
203
184
  static void
204
- clipboard_image_received_func(clipboard, pixbuf, func)
205
- GtkClipboard* clipboard;
206
- GdkPixbuf* pixbuf;
207
- gpointer func;
185
+ clipboard_image_received_func(GtkClipboard *clipboard, GdkPixbuf *pixbuf, gpointer func)
208
186
  {
209
187
  rb_funcall((VALUE)func, id_call, 2, CLIPBOARD2RVAL(clipboard),
210
188
  GOBJ2RVAL(pixbuf));
211
189
  }
212
190
 
213
191
  static VALUE
214
- clipboard_request_image(self)
215
- VALUE self;
192
+ clipboard_request_image(VALUE self)
216
193
  {
217
194
  VALUE func = rb_block_proc();
218
195
  G_RELATIVE(self, func);
@@ -225,11 +202,7 @@ clipboard_request_image(self)
225
202
 
226
203
  #if GTK_CHECK_VERSION(2,4,0)
227
204
  static void
228
- clipboard_target_received_func(clipboard, atoms, n_atoms, func)
229
- GtkClipboard* clipboard;
230
- GdkAtom* atoms;
231
- gint n_atoms;
232
- gpointer func;
205
+ clipboard_target_received_func(GtkClipboard *clipboard, GdkAtom *atoms, gint n_atoms, gpointer func)
233
206
  {
234
207
  gint i;
235
208
  VALUE ary = rb_ary_new();
@@ -241,8 +214,7 @@ clipboard_target_received_func(clipboard, atoms, n_atoms, func)
241
214
  }
242
215
 
243
216
  static VALUE
244
- clipboard_request_targets(self)
245
- VALUE self;
217
+ clipboard_request_targets(VALUE self)
246
218
  {
247
219
  VALUE func = rb_block_proc();
248
220
  G_RELATIVE(self, func);
@@ -256,20 +228,14 @@ clipboard_request_targets(self)
256
228
 
257
229
  #if GTK_CHECK_VERSION(2,10,0)
258
230
  static void
259
- clipboard_rich_text_received_func(clipboard, format, text, length, func)
260
- GtkClipboard* clipboard;
261
- GdkAtom format;
262
- const guint8 *text;
263
- gsize length;
264
- gpointer func;
231
+ clipboard_rich_text_received_func(GtkClipboard *clipboard, GdkAtom format, const guint8 *text, gsize length, gpointer func)
265
232
  {
266
233
  rb_funcall((VALUE)func, id_call, 3, CLIPBOARD2RVAL(clipboard),
267
234
  BOXED2RVAL(format, GDK_TYPE_ATOM), rb_str_new((char*)text, length));
268
235
  }
269
236
 
270
237
  static VALUE
271
- clipboard_request_rich_text(self, buffer)
272
- VALUE self, buffer;
238
+ clipboard_request_rich_text(VALUE self, VALUE buffer)
273
239
  {
274
240
  VALUE func = rb_block_proc();
275
241
  G_RELATIVE(self, func);
@@ -282,8 +248,7 @@ clipboard_request_rich_text(self, buffer)
282
248
  #endif
283
249
 
284
250
  static VALUE
285
- clipboard_wait_for_contents(self, target)
286
- VALUE self, target;
251
+ clipboard_wait_for_contents(VALUE self, VALUE target)
287
252
  {
288
253
  return BOXED2RVAL(gtk_clipboard_wait_for_contents(
289
254
  _SELF(self),
@@ -292,8 +257,7 @@ clipboard_wait_for_contents(self, target)
292
257
  }
293
258
 
294
259
  static VALUE
295
- clipboard_wait_for_text(self)
296
- VALUE self;
260
+ clipboard_wait_for_text(VALUE self)
297
261
  {
298
262
  gchar *str;
299
263
  str = gtk_clipboard_wait_for_text(_SELF(self));
@@ -302,8 +266,7 @@ clipboard_wait_for_text(self)
302
266
 
303
267
  #if GTK_CHECK_VERSION(2,6,0)
304
268
  static VALUE
305
- clipboard_wait_for_image(self)
306
- VALUE self;
269
+ clipboard_wait_for_image(VALUE self)
307
270
  {
308
271
  GdkPixbuf* pixbuf = gtk_clipboard_wait_for_image(_SELF(self));
309
272
  return GOBJ2RVAL(pixbuf);
@@ -312,8 +275,7 @@ clipboard_wait_for_image(self)
312
275
 
313
276
  #if GTK_CHECK_VERSION(2,10,0)
314
277
  static VALUE
315
- clipboard_wait_for_rich_text(self, buffer)
316
- VALUE self, buffer;
278
+ clipboard_wait_for_rich_text(VALUE self, VALUE buffer)
317
279
  {
318
280
  GdkAtom format;
319
281
  gsize length;
@@ -332,16 +294,14 @@ clipboard_wait_for_rich_text(self, buffer)
332
294
  #endif
333
295
 
334
296
  static VALUE
335
- clipboard_wait_is_text_available(self)
336
- VALUE self;
297
+ clipboard_wait_is_text_available(VALUE self)
337
298
  {
338
299
  return CBOOL2RVAL(gtk_clipboard_wait_is_text_available(_SELF(self)));
339
300
  }
340
301
 
341
302
  #if GTK_CHECK_VERSION(2,6,0)
342
303
  static VALUE
343
- clipboard_wait_is_image_available(self)
344
- VALUE self;
304
+ clipboard_wait_is_image_available(VALUE self)
345
305
  {
346
306
  return CBOOL2RVAL(gtk_clipboard_wait_is_image_available(_SELF(self)));
347
307
  }
@@ -349,8 +309,7 @@ clipboard_wait_is_image_available(self)
349
309
 
350
310
  #if GTK_CHECK_VERSION(2,10,0)
351
311
  static VALUE
352
- clipboard_wait_is_rich_text_available(self, buffer)
353
- VALUE self, buffer;
312
+ clipboard_wait_is_rich_text_available(VALUE self, VALUE buffer)
354
313
  {
355
314
  return CBOOL2RVAL(gtk_clipboard_wait_is_rich_text_available(_SELF(self), GTK_TEXT_BUFFER(RVAL2GOBJ(buffer))));
356
315
  }
@@ -358,8 +317,7 @@ clipboard_wait_is_rich_text_available(self, buffer)
358
317
 
359
318
  #if GTK_CHECK_VERSION(2,4,0)
360
319
  static VALUE
361
- clipboard_wait_for_targets(self)
362
- VALUE self;
320
+ clipboard_wait_for_targets(VALUE self)
363
321
  {
364
322
  gint i;
365
323
  VALUE ary = Qnil;
@@ -387,15 +345,13 @@ clipboard_wait_for_targets(self)
387
345
 
388
346
  #if GTK_CHECK_VERSION(2,6,0)
389
347
  static VALUE
390
- clipboard_wait_is_target_available(self, target)
391
- VALUE self, target;
348
+ clipboard_wait_is_target_available(VALUE self, VALUE target)
392
349
  {
393
350
  return CBOOL2RVAL(gtk_clipboard_wait_is_target_available(_SELF(self), RVAL2ATOM(target)));
394
351
  }
395
352
 
396
353
  static VALUE
397
- clipboard_set_can_store(self, targets)
398
- VALUE self, targets;
354
+ clipboard_set_can_store(VALUE self, VALUE targets)
399
355
  {
400
356
  gint n_targets = 0;
401
357
  GtkTargetEntry* entries = (GtkTargetEntry*)NULL;
@@ -409,8 +365,7 @@ clipboard_set_can_store(self, targets)
409
365
  }
410
366
 
411
367
  static VALUE
412
- clipboard_store(self)
413
- VALUE self;
368
+ clipboard_store(VALUE self)
414
369
  {
415
370
  gtk_clipboard_store(_SELF(self));
416
371
  return self;