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,10 +14,7 @@
14
14
  #if GTK_CHECK_VERSION(2,4,0)
15
15
  #define _SELF(self) (GTK_TOOL_BUTTON(RVAL2GOBJ(self)))
16
16
  static VALUE
17
- toolbutton_initialize(argc, argv, self)
18
- int argc;
19
- VALUE *argv;
20
- VALUE self;
17
+ toolbutton_initialize(int argc, VALUE *argv, VALUE self)
21
18
  {
22
19
  VALUE obj, label;
23
20
  GtkToolItem* item;
@@ -14,46 +14,38 @@
14
14
  #if GTK_CHECK_VERSION(2,4,0)
15
15
  #define _SELF(self) (GTK_TOOL_ITEM(RVAL2GOBJ(self)))
16
16
  static VALUE
17
- toolitem_initialize(self)
18
- VALUE self;
17
+ toolitem_initialize(VALUE self)
19
18
  {
20
19
  RBGTK_INITIALIZE(self, gtk_tool_item_new());
21
20
  return Qnil;
22
21
  }
23
22
 
24
23
  static VALUE
25
- toolitem_set_homogeneous(self, homogeneous)
26
- VALUE self, homogeneous;
24
+ toolitem_set_homogeneous(VALUE self, VALUE homogeneous)
27
25
  {
28
26
  gtk_tool_item_set_homogeneous(_SELF(self), RVAL2CBOOL(homogeneous));
29
27
  return self;
30
28
  }
31
29
  static VALUE
32
- toolitem_get_homogeneous(self)
33
- VALUE self;
30
+ toolitem_get_homogeneous(VALUE self)
34
31
  {
35
32
  return CBOOL2RVAL(gtk_tool_item_get_homogeneous(_SELF(self)));
36
33
  }
37
34
 
38
35
  static VALUE
39
- toolitem_set_expand(self, expand)
40
- VALUE self, expand;
36
+ toolitem_set_expand(VALUE self, VALUE expand)
41
37
  {
42
38
  gtk_tool_item_set_expand(_SELF(self), RVAL2CBOOL(expand));
43
39
  return self;
44
40
  }
45
41
  static VALUE
46
- toolitem_get_expand(self)
47
- VALUE self;
42
+ toolitem_get_expand(VALUE self)
48
43
  {
49
44
  return CBOOL2RVAL(gtk_tool_item_get_expand(_SELF(self)));
50
45
  }
51
46
 
52
47
  static VALUE
53
- toolitem_set_tooltip(argc, argv, self)
54
- int argc;
55
- VALUE *argv;
56
- VALUE self;
48
+ toolitem_set_tooltip(int argc, VALUE *argv, VALUE self)
57
49
  {
58
50
  VALUE tooltip, tip_text, tip_private;
59
51
 
@@ -66,64 +58,55 @@ toolitem_set_tooltip(argc, argv, self)
66
58
  }
67
59
 
68
60
  static VALUE
69
- toolitem_set_use_drag_window(self, use_drag_window)
70
- VALUE self, use_drag_window;
61
+ toolitem_set_use_drag_window(VALUE self, VALUE use_drag_window)
71
62
  {
72
63
  gtk_tool_item_set_use_drag_window(_SELF(self), RVAL2CBOOL(use_drag_window));
73
64
  return self;
74
65
  }
75
66
  static VALUE
76
- toolitem_get_use_drag_window(self)
77
- VALUE self;
67
+ toolitem_get_use_drag_window(VALUE self)
78
68
  {
79
69
  return CBOOL2RVAL(gtk_tool_item_get_use_drag_window(_SELF(self)));
80
70
  }
81
71
 
82
72
  static VALUE
83
- toolitem_get_icon_size(self)
84
- VALUE self;
73
+ toolitem_get_icon_size(VALUE self)
85
74
  {
86
75
  return GENUM2RVAL(gtk_tool_item_get_icon_size(_SELF(self)), GTK_TYPE_ICON_SIZE);
87
76
  }
88
77
 
89
78
  static VALUE
90
- toolitem_get_orientation(self)
91
- VALUE self;
79
+ toolitem_get_orientation(VALUE self)
92
80
  {
93
81
  return GENUM2RVAL(gtk_tool_item_get_orientation(_SELF(self)), GTK_TYPE_ORIENTATION);
94
82
  }
95
83
 
96
84
  static VALUE
97
- toolitem_get_toolbar_style(self)
98
- VALUE self;
85
+ toolitem_get_toolbar_style(VALUE self)
99
86
  {
100
87
  return GENUM2RVAL(gtk_tool_item_get_toolbar_style(_SELF(self)), GTK_TYPE_TOOLBAR_STYLE);
101
88
  }
102
89
 
103
90
  static VALUE
104
- toolitem_get_relief_style(self)
105
- VALUE self;
91
+ toolitem_get_relief_style(VALUE self)
106
92
  {
107
93
  return GENUM2RVAL(gtk_tool_item_get_relief_style(_SELF(self)), GTK_TYPE_RELIEF_STYLE);
108
94
  }
109
95
 
110
96
  static VALUE
111
- toolitem_retrieve_proxy_menu_item(self)
112
- VALUE self;
97
+ toolitem_retrieve_proxy_menu_item(VALUE self)
113
98
  {
114
99
  return GOBJ2RVAL(gtk_tool_item_retrieve_proxy_menu_item(_SELF(self)));
115
100
  }
116
101
 
117
102
  static VALUE
118
- toolitem_get_proxy_menu_item(self, menu_item_id)
119
- VALUE self, menu_item_id;
103
+ toolitem_get_proxy_menu_item(VALUE self, VALUE menu_item_id)
120
104
  {
121
105
  return GOBJ2RVAL(gtk_tool_item_get_proxy_menu_item(_SELF(self), RVAL2CSTR(menu_item_id)));
122
106
  }
123
107
 
124
108
  static VALUE
125
- toolitem_set_proxy_menu_item(self, menu_item_id, menu_item)
126
- VALUE self, menu_item_id, menu_item;
109
+ toolitem_set_proxy_menu_item(VALUE self, VALUE menu_item_id, VALUE menu_item)
127
110
  {
128
111
  gtk_tool_item_set_proxy_menu_item(_SELF(self), RVAL2CSTR(menu_item_id),
129
112
  GTK_WIDGET(RVAL2GOBJ(menu_item)));
@@ -147,8 +130,7 @@ gboolean gtk_tool_item_get_is_important (GtkToolItem *tool_item);
147
130
  */
148
131
  #if GTK_CHECK_VERSION(2,6,0)
149
132
  static VALUE
150
- toolitem_rebuild_menu(self)
151
- VALUE self;
133
+ toolitem_rebuild_menu(VALUE self)
152
134
  {
153
135
  gtk_tool_item_rebuild_menu(_SELF(self));
154
136
  return self;
@@ -20,40 +20,35 @@
20
20
  #define _SELF(self) (RVAL2GOBJ(self))
21
21
 
22
22
  static VALUE
23
- tooltip_set_markup(self, markup)
24
- VALUE self, markup;
23
+ tooltip_set_markup(VALUE self, VALUE markup)
25
24
  {
26
25
  gtk_tooltip_set_markup(_SELF(self), RVAL2CSTR(markup));
27
26
  return self;
28
27
  }
29
28
 
30
29
  static VALUE
31
- tooltip_set_text(self, text)
32
- VALUE self, text;
30
+ tooltip_set_text(VALUE self, VALUE text)
33
31
  {
34
32
  gtk_tooltip_set_text(_SELF(self), RVAL2CSTR(text));
35
33
  return self;
36
34
  }
37
35
 
38
36
  static VALUE
39
- tooltip_set_icon(self, icon)
40
- VALUE self, icon;
37
+ tooltip_set_icon(VALUE self, VALUE icon)
41
38
  {
42
39
  gtk_tooltip_set_icon(_SELF(self), GDK_PIXBUF(RVAL2GOBJ(icon)));
43
40
  return self;
44
41
  }
45
42
 
46
43
  static VALUE
47
- tooltip_set_icon_from_stock(self, stock_id, size)
48
- VALUE self, stock_id, size;
44
+ tooltip_set_icon_from_stock(VALUE self, VALUE stock_id, VALUE size)
49
45
  {
50
46
  gtk_tooltip_set_icon_from_stock(_SELF(self), rb_id2name(SYM2ID(stock_id)), RVAL2GENUM(size, GTK_TYPE_ICON_SIZE));
51
47
  return self;
52
48
  }
53
49
 
54
50
  static VALUE
55
- tooltip_set_custom(self, custom_widget)
56
- VALUE self, custom_widget;
51
+ tooltip_set_custom(VALUE self, VALUE custom_widget)
57
52
  {
58
53
  gtk_tooltip_set_custom(_SELF(self), GTK_WIDGET(RVAL2GOBJ(custom_widget)));
59
54
  return self;
@@ -20,32 +20,28 @@
20
20
  #define _SELF(self) (GTK_TOOLTIPS(RVAL2GOBJ(self)))
21
21
 
22
22
  static VALUE
23
- ttips_initialize(self)
24
- VALUE self;
23
+ ttips_initialize(VALUE self)
25
24
  {
26
25
  RBGTK_INITIALIZE(self, gtk_tooltips_new());
27
26
  return Qnil;
28
27
  }
29
28
 
30
29
  static VALUE
31
- ttips_enable(self)
32
- VALUE self;
30
+ ttips_enable(VALUE self)
33
31
  {
34
32
  gtk_tooltips_enable(_SELF(self));
35
33
  return self;
36
34
  }
37
35
 
38
36
  static VALUE
39
- ttips_disable(self)
40
- VALUE self;
37
+ ttips_disable(VALUE self)
41
38
  {
42
39
  gtk_tooltips_disable(_SELF(self));
43
40
  return self;
44
41
  }
45
42
 
46
43
  static VALUE
47
- ttips_set_tip(self, win, text, priv)
48
- VALUE self, win, text, priv;
44
+ ttips_set_tip(VALUE self, VALUE win, VALUE text, VALUE priv)
49
45
  {
50
46
  gtk_tooltips_set_tip(_SELF(self),
51
47
  GTK_WIDGET(RVAL2GOBJ(win)),
@@ -56,8 +52,7 @@ ttips_set_tip(self, win, text, priv)
56
52
  }
57
53
 
58
54
  static VALUE
59
- ttips_s_data_get(self, widget)
60
- VALUE self, widget;
55
+ ttips_s_data_get(VALUE self, VALUE widget)
61
56
  {
62
57
  GtkTooltipsData* data = gtk_tooltips_data_get(GTK_WIDGET(RVAL2GOBJ(widget)));
63
58
 
@@ -66,8 +61,7 @@ ttips_s_data_get(self, widget)
66
61
  }
67
62
 
68
63
  static VALUE
69
- ttips_force_window(self)
70
- VALUE self;
64
+ ttips_force_window(VALUE self)
71
65
  {
72
66
  gtk_tooltips_force_window(_SELF(self));
73
67
  return self;
@@ -75,8 +69,7 @@ ttips_force_window(self)
75
69
 
76
70
  #if GTK_CHECK_VERSION(2,4,0)
77
71
  static VALUE
78
- ttips_s_get_info_from_tip_window(self, window)
79
- VALUE self, window;
72
+ ttips_s_get_info_from_tip_window(VALUE self, VALUE window)
80
73
  {
81
74
  GtkTooltips* tooltips;
82
75
  GtkWidget* current_widget;
@@ -15,17 +15,14 @@
15
15
  #define _SELF(i) ((GtkTreeIter*)RVAL2BOXED(i, GTK_TYPE_TREE_ITER))
16
16
 
17
17
  void
18
- rbgtk_register_treeiter_set_value_func(gtype, func)
19
- GType gtype;
20
- rbgtkiter_set_value_func func;
18
+ rbgtk_register_treeiter_set_value_func(GType gtype, rbgtkiter_set_value_func func)
21
19
  {
22
20
  rb_hash_aset(treeiter_set_value_table, INT2NUM(gtype),
23
21
  Data_Wrap_Struct(rb_cData, NULL, NULL, func));
24
22
  }
25
23
 
26
24
  static VALUE
27
- treeiter_first(self)
28
- VALUE self;
25
+ treeiter_first(VALUE self)
29
26
  {
30
27
  GtkTreeIter* iter = _SELF(self);
31
28
  GtkTreeModel* model = (GtkTreeModel*)iter->user_data3;
@@ -35,8 +32,7 @@ treeiter_first(self)
35
32
  }
36
33
 
37
34
  static VALUE
38
- treeiter_next(self)
39
- VALUE self;
35
+ treeiter_next(VALUE self)
40
36
  {
41
37
  GtkTreeIter* iter = _SELF(self);
42
38
  GtkTreeModel* model = (GtkTreeModel*)iter->user_data3;
@@ -50,8 +46,7 @@ treeiter_next(self)
50
46
  }
51
47
 
52
48
  static VALUE
53
- treeiter_get_value(self, column)
54
- VALUE self, column;
49
+ treeiter_get_value(VALUE self, VALUE column)
55
50
  {
56
51
  GValue value = {0, };
57
52
  GtkTreeIter* iter = _SELF(self);
@@ -67,8 +62,7 @@ treeiter_get_value(self, column)
67
62
  }
68
63
 
69
64
  static VALUE
70
- treeiter_children(self)
71
- VALUE self;
65
+ treeiter_children(VALUE self)
72
66
  {
73
67
  GtkTreeIter child;
74
68
  GtkTreeIter* iter = _SELF(self);
@@ -79,8 +73,7 @@ treeiter_children(self)
79
73
  }
80
74
 
81
75
  static VALUE
82
- treeiter_get_path(self)
83
- VALUE self;
76
+ treeiter_get_path(VALUE self)
84
77
  {
85
78
  VALUE retval = Qnil;
86
79
  GtkTreeIter* iter = _SELF(self);
@@ -92,8 +85,7 @@ treeiter_get_path(self)
92
85
  }
93
86
 
94
87
  static VALUE
95
- treeiter_has_child(self)
96
- VALUE self;
88
+ treeiter_has_child(VALUE self)
97
89
  {
98
90
  GtkTreeIter* iter = _SELF(self);
99
91
  GtkTreeModel* model = (GtkTreeModel*)iter->user_data3;
@@ -101,8 +93,7 @@ treeiter_has_child(self)
101
93
  }
102
94
 
103
95
  static VALUE
104
- treeiter_n_children(self)
105
- VALUE self;
96
+ treeiter_n_children(VALUE self)
106
97
  {
107
98
  GtkTreeIter* iter = _SELF(self);
108
99
  GtkTreeModel* model = (GtkTreeModel*)iter->user_data3;
@@ -110,8 +101,7 @@ treeiter_n_children(self)
110
101
  }
111
102
 
112
103
  static VALUE
113
- treeiter_nth_child(self, n)
114
- VALUE self, n;
104
+ treeiter_nth_child(VALUE self, VALUE n)
115
105
  {
116
106
  GtkTreeIter child;
117
107
  GtkTreeIter* iter = _SELF(self);
@@ -122,8 +112,7 @@ treeiter_nth_child(self, n)
122
112
  }
123
113
 
124
114
  static VALUE
125
- treeiter_parent(self)
126
- VALUE self;
115
+ treeiter_parent(VALUE self)
127
116
  {
128
117
  GtkTreeIter parent;
129
118
  GtkTreeIter* iter = _SELF(self);
@@ -134,8 +123,7 @@ treeiter_parent(self)
134
123
  }
135
124
 
136
125
  static VALUE
137
- treeiter_set_value(self, column, value)
138
- VALUE self, column, value;
126
+ treeiter_set_value(VALUE self, VALUE column, VALUE value)
139
127
  {
140
128
  GtkTreeIter* iter = _SELF(self);
141
129
  GtkTreeModel* model = (GtkTreeModel*)iter->user_data3;
@@ -159,16 +147,14 @@ treeiter_set_value(self, column, value)
159
147
  }
160
148
 
161
149
  static VALUE
162
- treeiter_set_value_eql(self, column, value)
163
- VALUE self, column, value;
150
+ treeiter_set_value_eql(VALUE self, VALUE column, VALUE value)
164
151
  {
165
152
  treeiter_set_value(self, column, value);
166
153
  return value;
167
154
  }
168
155
 
169
156
  static VALUE
170
- treeiter_eql(self, other)
171
- VALUE self, other;
157
+ treeiter_eql(VALUE self, VALUE other)
172
158
  {
173
159
  gint i, num1, num2;
174
160
  GtkTreeIter* iter1 = _SELF(self);
@@ -221,8 +207,7 @@ treeiter_eql(self, other)
221
207
 
222
208
  #if GTK_CHECK_VERSION(2,2,0)
223
209
  static VALUE
224
- treeiter_to_string(self)
225
- VALUE self;
210
+ treeiter_to_string(VALUE self)
226
211
  {
227
212
  GtkTreeIter* iter = _SELF(self);
228
213
  GtkTreeModel* model = (GtkTreeModel*)iter->user_data3;
@@ -14,30 +14,26 @@
14
14
  #define _SELF(s) (GTK_TREE_MODEL(RVAL2GOBJ(s)))
15
15
 
16
16
  static VALUE
17
- treemodel_get_flags(self)
18
- VALUE self;
17
+ treemodel_get_flags(VALUE self)
19
18
  {
20
19
  return GFLAGS2RVAL(gtk_tree_model_get_flags(_SELF(self)), GTK_TYPE_TREE_MODEL_FLAGS);
21
20
  }
22
21
 
23
22
  static VALUE
24
- treemodel_get_n_columns(self)
25
- VALUE self;
23
+ treemodel_get_n_columns(VALUE self)
26
24
  {
27
25
  return INT2NUM(gtk_tree_model_get_n_columns(_SELF(self)));
28
26
  }
29
27
 
30
28
  static VALUE
31
- treemodel_get_column_type(self, index)
32
- VALUE self;
29
+ treemodel_get_column_type(VALUE self, VALUE index)
33
30
  {
34
31
  return GTYPE2CLASS(gtk_tree_model_get_column_type(_SELF(self),
35
32
  NUM2INT(index)));
36
33
  }
37
34
 
38
35
  static VALUE
39
- treemodel_get_iter_first(self)
40
- VALUE self;
36
+ treemodel_get_iter_first(VALUE self)
41
37
  {
42
38
  VALUE val = Qnil;
43
39
  GtkTreeIter iter;
@@ -54,8 +50,7 @@ treemodel_get_iter_first(self)
54
50
  }
55
51
 
56
52
  static VALUE
57
- treemodel_get_iter(self, path)
58
- VALUE self, path;
53
+ treemodel_get_iter(VALUE self, VALUE path)
59
54
  {
60
55
  VALUE val = Qnil;
61
56
  GtkTreeIter iter;
@@ -80,8 +75,7 @@ treemodel_get_iter(self, path)
80
75
  }
81
76
 
82
77
  static VALUE
83
- treemodel_get_value(self, iter, column)
84
- VALUE self, iter, column;
78
+ treemodel_get_value(VALUE self, VALUE iter, VALUE column)
85
79
  {
86
80
  GValue value = {0, };
87
81
  VALUE ret = Qnil;
@@ -107,11 +101,7 @@ void gtk_tree_model_get_valist (GtkTreeModel *tree_model,
107
101
  */
108
102
 
109
103
  static gboolean
110
- treemodel_foreach_func(model, path, iter, func)
111
- GtkTreeModel* model;
112
- GtkTreePath* path;
113
- GtkTreeIter* iter;
114
- gpointer func;
104
+ treemodel_foreach_func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer func)
115
105
  {
116
106
  iter->user_data3 = model;
117
107
  rb_yield(rb_ary_new3(3, GOBJ2RVAL(model), GTKTREEPATH2RVAL(path), GTKTREEITER2RVAL(iter)));
@@ -119,8 +109,7 @@ treemodel_foreach_func(model, path, iter, func)
119
109
  }
120
110
 
121
111
  static VALUE
122
- treemodel_foreach(self)
123
- VALUE self;
112
+ treemodel_foreach(VALUE self)
124
113
  {
125
114
  gtk_tree_model_foreach(_SELF(self),
126
115
  (GtkTreeModelForeachFunc)treemodel_foreach_func,
@@ -129,40 +118,35 @@ treemodel_foreach(self)
129
118
  }
130
119
 
131
120
  static VALUE
132
- treemodel_row_changed(self, path, iter)
133
- VALUE self, path, iter;
121
+ treemodel_row_changed(VALUE self, VALUE path, VALUE iter)
134
122
  {
135
123
  gtk_tree_model_row_changed(_SELF(self), RVAL2GTKTREEPATH(path), RVAL2GTKTREEITER(iter));
136
124
  return self;
137
125
  }
138
126
 
139
127
  static VALUE
140
- treemodel_row_inserted(self, path, iter)
141
- VALUE self, path, iter;
128
+ treemodel_row_inserted(VALUE self, VALUE path, VALUE iter)
142
129
  {
143
130
  gtk_tree_model_row_inserted(_SELF(self), RVAL2GTKTREEPATH(path), RVAL2GTKTREEITER(iter));
144
131
  return self;
145
132
  }
146
133
 
147
134
  static VALUE
148
- treemodel_row_has_child_toggled(self, path, iter)
149
- VALUE self, path, iter;
135
+ treemodel_row_has_child_toggled(VALUE self, VALUE path, VALUE iter)
150
136
  {
151
137
  gtk_tree_model_row_has_child_toggled(_SELF(self), RVAL2GTKTREEPATH(path), RVAL2GTKTREEITER(iter));
152
138
  return self;
153
139
  }
154
140
 
155
141
  static VALUE
156
- treemodel_row_deleted(self, path)
157
- VALUE self, path;
142
+ treemodel_row_deleted(VALUE self, VALUE path)
158
143
  {
159
144
  gtk_tree_model_row_deleted(_SELF(self), RVAL2GTKTREEPATH(path));
160
145
  return self;
161
146
  }
162
147
 
163
148
  static VALUE
164
- treemodel_rows_reordered(self, path, iter, new_orders)
165
- VALUE self, path, iter, new_orders;
149
+ treemodel_rows_reordered(VALUE self, VALUE path, VALUE iter, VALUE new_orders)
166
150
  {
167
151
  gint i, len;
168
152
  gint* orders;
@@ -181,16 +165,13 @@ treemodel_rows_reordered(self, path, iter, new_orders)
181
165
  }
182
166
 
183
167
  static VALUE
184
- treemodel_iter_is_valid(self, iter)
185
- VALUE self, iter;
168
+ treemodel_iter_is_valid(VALUE self, VALUE iter)
186
169
  {
187
170
  return Qtrue;
188
171
  }
189
172
 
190
173
  static VALUE
191
- signal_func(num, values)
192
- guint num;
193
- const GValue* values;
174
+ signal_func(guint num, const GValue *values)
194
175
  {
195
176
  GtkTreeModel* model = g_value_get_object(&values[0]);
196
177
  GtkTreePath* path = g_value_get_boxed(&values[1]);
@@ -201,9 +182,7 @@ signal_func(num, values)
201
182
  }
202
183
 
203
184
  static VALUE
204
- signal_rows_reordered_func(num, values)
205
- guint num;
206
- const GValue* values;
185
+ signal_rows_reordered_func(guint num, const GValue *values)
207
186
  {
208
187
  GtkTreeModel* model = g_value_get_object(&values[0]);
209
188
  GtkTreePath* path = g_value_get_boxed(&values[1]);