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
@@ -18,38 +18,33 @@
18
18
  #define ICON_INFO2RVAL(info) (BOXED2RVAL(info, GTK_TYPE_ICON_INFO))
19
19
 
20
20
  static VALUE
21
- it_initialize(self)
22
- VALUE self;
21
+ it_initialize(VALUE self)
23
22
  {
24
23
  G_INITIALIZE(self, gtk_icon_theme_new());
25
24
  return Qnil;
26
25
  }
27
26
 
28
27
  static VALUE
29
- it_get_default(self)
30
- VALUE self;
28
+ it_get_default(VALUE self)
31
29
  {
32
30
  return GOBJ2RVAL(gtk_icon_theme_get_default());
33
31
  }
34
32
 
35
33
  static VALUE
36
- it_get_for_screen(self, screen)
37
- VALUE self, screen;
34
+ it_get_for_screen(VALUE self, VALUE screen)
38
35
  {
39
36
  return GOBJ2RVAL(gtk_icon_theme_get_for_screen(GDK_SCREEN(RVAL2GOBJ(screen))));
40
37
  }
41
38
 
42
39
  static VALUE
43
- it_set_screen(self, screen)
44
- VALUE self, screen;
40
+ it_set_screen(VALUE self, VALUE screen)
45
41
  {
46
42
  gtk_icon_theme_set_screen(_SELF(self), GDK_SCREEN(RVAL2GOBJ(screen)));
47
43
  return self;
48
44
  }
49
45
 
50
46
  static VALUE
51
- it_set_search_path(self, paths)
52
- VALUE self, paths;
47
+ it_set_search_path(VALUE self, VALUE paths)
53
48
  {
54
49
  gchar** gpaths;
55
50
  gint size, i;
@@ -68,8 +63,7 @@ it_set_search_path(self, paths)
68
63
  }
69
64
 
70
65
  static VALUE
71
- it_get_search_path(self)
72
- VALUE self;
66
+ it_get_search_path(VALUE self)
73
67
  {
74
68
  gchar** path;
75
69
  gint size, i;
@@ -86,24 +80,21 @@ it_get_search_path(self)
86
80
  }
87
81
 
88
82
  static VALUE
89
- it_append_search_path(self, path)
90
- VALUE self, path;
83
+ it_append_search_path(VALUE self, VALUE path)
91
84
  {
92
85
  gtk_icon_theme_append_search_path(_SELF(self), RVAL2CSTR(path));
93
86
  return self;
94
87
  }
95
88
 
96
89
  static VALUE
97
- it_prepend_search_path(self, path)
98
- VALUE self, path;
90
+ it_prepend_search_path(VALUE self, VALUE path)
99
91
  {
100
92
  gtk_icon_theme_prepend_search_path(_SELF(self), RVAL2CSTR(path));
101
93
  return self;
102
94
  }
103
95
 
104
96
  static VALUE
105
- it_set_custom_theme(self, theme_name)
106
- VALUE self, theme_name;
97
+ it_set_custom_theme(VALUE self, VALUE theme_name)
107
98
  {
108
99
  gtk_icon_theme_set_custom_theme(_SELF(self),
109
100
  NIL_P(theme_name) ? NULL : RVAL2CSTR(theme_name));
@@ -111,16 +102,14 @@ it_set_custom_theme(self, theme_name)
111
102
  }
112
103
 
113
104
  static VALUE
114
- it_has_icon(self, icon_name)
115
- VALUE self, icon_name;
105
+ it_has_icon(VALUE self, VALUE icon_name)
116
106
  {
117
107
  return CBOOL2RVAL(gtk_icon_theme_has_icon(_SELF(self),
118
108
  RVAL2CSTR(icon_name)));
119
109
  }
120
110
 
121
111
  static VALUE
122
- it_lookup_icon(self, icon_name, size, flags)
123
- VALUE self, icon_name, size, flags;
112
+ it_lookup_icon(VALUE self, VALUE icon_name, VALUE size, VALUE flags)
124
113
  {
125
114
  GtkIconInfo* info;
126
115
 
@@ -132,8 +121,7 @@ it_lookup_icon(self, icon_name, size, flags)
132
121
  }
133
122
 
134
123
  static VALUE
135
- it_load_icon(self, icon_name, size, flags)
136
- VALUE self, icon_name, size, flags;
124
+ it_load_icon(VALUE self, VALUE icon_name, VALUE size, VALUE flags)
137
125
  {
138
126
  GError *error = NULL;
139
127
  GdkPixbuf *pixbuf;
@@ -163,8 +151,7 @@ it_list_icons(int argc, VALUE *argv, VALUE self)
163
151
 
164
152
  #if GTK_CHECK_VERSION(2,6,0)
165
153
  static VALUE
166
- it_get_icon_sizes(self, icon_name)
167
- VALUE self, icon_name;
154
+ it_get_icon_sizes(VALUE self, VALUE icon_name)
168
155
  {
169
156
  VALUE ary = rb_ary_new();
170
157
 
@@ -180,22 +167,19 @@ it_get_icon_sizes(self, icon_name)
180
167
  #endif
181
168
 
182
169
  static VALUE
183
- it_get_example_icon_name(self)
184
- VALUE self;
170
+ it_get_example_icon_name(VALUE self)
185
171
  {
186
172
  return CSTR2RVAL_FREE(gtk_icon_theme_get_example_icon_name(_SELF(self)));
187
173
  }
188
174
 
189
175
  static VALUE
190
- it_rescan_if_needed(self)
191
- VALUE self;
176
+ it_rescan_if_needed(VALUE self)
192
177
  {
193
178
  return CBOOL2RVAL(gtk_icon_theme_rescan_if_needed(_SELF(self)));
194
179
  }
195
180
 
196
181
  static VALUE
197
- it_s_add_builtin_icon(self, icon_name, size, pixbuf)
198
- VALUE self, icon_name, size, pixbuf;
182
+ it_s_add_builtin_icon(VALUE self, VALUE icon_name, VALUE size, VALUE pixbuf)
199
183
  {
200
184
  gtk_icon_theme_add_builtin_icon(RVAL2CSTR(icon_name), NUM2INT(size),
201
185
  GDK_PIXBUF(RVAL2GOBJ(pixbuf)));
@@ -19,10 +19,7 @@ static ID id_model;
19
19
  static ID id_select_path;
20
20
 
21
21
  static VALUE
22
- iview_initialize(argc, argv, self)
23
- int argc;
24
- VALUE *argv;
25
- VALUE self;
22
+ iview_initialize(int argc, VALUE *argv, VALUE self)
26
23
  {
27
24
  VALUE model;
28
25
  rb_scan_args(argc, argv, "01", &model);
@@ -58,17 +55,13 @@ iview_get_path_at_pos(VALUE self, VALUE x, VALUE y)
58
55
  }
59
56
 
60
57
  static void
61
- iview_foreach_func(iview, path, func)
62
- GtkIconView* iview;
63
- GtkTreePath* path;
64
- gpointer* func;
58
+ iview_foreach_func(GtkIconView *iview, GtkTreePath *path, gpointer *func)
65
59
  {
66
60
  rb_funcall((VALUE)func, id_call, 2, GOBJ2RVAL(iview), GTKTREEPATH2RVAL(path));
67
61
  }
68
62
 
69
63
  static VALUE
70
- iview_selected_foreach(self)
71
- VALUE self;
64
+ iview_selected_foreach(VALUE self)
72
65
  {
73
66
  VALUE func = rb_block_proc();
74
67
  G_RELATIVE(self, func);
@@ -114,8 +107,7 @@ gboolean gtk_icon_view_get_reorderable (GtkIconView *icon_view);
114
107
  */
115
108
 
116
109
  static VALUE
117
- iview_select_path(self, path)
118
- VALUE self, path;
110
+ iview_select_path(VALUE self, VALUE path)
119
111
  {
120
112
  G_CHILD_SET(self, id_select_path, path);
121
113
  gtk_icon_view_select_path(_SELF(self), RVAL2GTKTREEPATH(path));
@@ -123,8 +115,7 @@ iview_select_path(self, path)
123
115
  }
124
116
 
125
117
  static VALUE
126
- iview_unselect_path(self, path)
127
- VALUE self, path;
118
+ iview_unselect_path(VALUE self, VALUE path)
128
119
  {
129
120
  G_CHILD_UNSET(self, id_select_path);
130
121
  gtk_icon_view_unselect_path(_SELF(self), RVAL2GTKTREEPATH(path));
@@ -132,15 +123,13 @@ iview_unselect_path(self, path)
132
123
  }
133
124
 
134
125
  static VALUE
135
- iview_path_is_selected(self, path)
136
- VALUE self, path;
126
+ iview_path_is_selected(VALUE self, VALUE path)
137
127
  {
138
128
  return CBOOL2RVAL(gtk_icon_view_path_is_selected(_SELF(self), RVAL2GTKTREEPATH(path)));
139
129
  }
140
130
 
141
131
  static VALUE
142
- iview_get_selected_items(self)
143
- VALUE self;
132
+ iview_get_selected_items(VALUE self)
144
133
  {
145
134
  GList* list = gtk_icon_view_get_selected_items(_SELF(self));
146
135
  VALUE ret = GLIST2ARY2(list, GTK_TYPE_TREE_PATH);
@@ -150,24 +139,21 @@ iview_get_selected_items(self)
150
139
  }
151
140
 
152
141
  static VALUE
153
- iview_select_all(self)
154
- VALUE self;
142
+ iview_select_all(VALUE self)
155
143
  {
156
144
  gtk_icon_view_select_all(_SELF(self));
157
145
  return self;
158
146
  }
159
147
 
160
148
  static VALUE
161
- iview_unselect_all(self)
162
- VALUE self;
149
+ iview_unselect_all(VALUE self)
163
150
  {
164
151
  gtk_icon_view_unselect_all(_SELF(self));
165
152
  return self;
166
153
  }
167
154
 
168
155
  static VALUE
169
- iview_item_activated(self, path)
170
- VALUE self, path;
156
+ iview_item_activated(VALUE self, VALUE path)
171
157
  {
172
158
  gtk_icon_view_item_activated(_SELF(self), RVAL2GTKTREEPATH(path));
173
159
  return self;
@@ -176,15 +162,13 @@ iview_item_activated(self, path)
176
162
 
177
163
  #if GTK_CHECK_VERSION(2,8,0)
178
164
  static VALUE
179
- iview_create_drag_icon(self, path)
180
- VALUE self, path;
165
+ iview_create_drag_icon(VALUE self, VALUE path)
181
166
  {
182
167
  return GOBJ2RVAL(gtk_icon_view_create_drag_icon(_SELF(self), RVAL2GTKTREEPATH(path)));
183
168
  }
184
169
 
185
170
  static VALUE
186
- iview_enable_model_drag_dest(self, targets, actions)
187
- VALUE self, targets, actions;
171
+ iview_enable_model_drag_dest(VALUE self, VALUE targets, VALUE actions)
188
172
  {
189
173
  gtk_icon_view_enable_model_drag_dest(_SELF(self),
190
174
  rbgtk_get_target_entry(targets),
@@ -194,8 +178,7 @@ iview_enable_model_drag_dest(self, targets, actions)
194
178
  }
195
179
 
196
180
  static VALUE
197
- iview_enable_model_drag_source(self, flags, targets, actions)
198
- VALUE self, flags, targets, actions;
181
+ iview_enable_model_drag_source(VALUE self, VALUE flags, VALUE targets, VALUE actions)
199
182
  {
200
183
  gtk_icon_view_enable_model_drag_source(_SELF(self),
201
184
  RVAL2GFLAGS(flags, GDK_TYPE_MODIFIER_TYPE),
@@ -206,8 +189,7 @@ iview_enable_model_drag_source(self, flags, targets, actions)
206
189
  }
207
190
 
208
191
  static VALUE
209
- iview_cursor(self)
210
- VALUE self;
192
+ iview_cursor(VALUE self)
211
193
  {
212
194
  GtkTreePath* path;
213
195
  GtkCellRenderer* cell;
@@ -216,8 +198,7 @@ iview_cursor(self)
216
198
  }
217
199
 
218
200
  static VALUE
219
- iview_get_dest_item_at_pos(self, drag_x, drag_y)
220
- VALUE self, drag_x, drag_y;
201
+ iview_get_dest_item_at_pos(VALUE self, VALUE drag_x, VALUE drag_y)
221
202
  {
222
203
  GtkTreePath* path;
223
204
  GtkIconViewDropPosition pos;
@@ -227,8 +208,7 @@ iview_get_dest_item_at_pos(self, drag_x, drag_y)
227
208
  }
228
209
 
229
210
  static VALUE
230
- iview_drag_dest_item(self)
231
- VALUE self;
211
+ iview_drag_dest_item(VALUE self)
232
212
  {
233
213
  GtkTreePath* path;
234
214
  GtkIconViewDropPosition pos;
@@ -238,8 +218,7 @@ iview_drag_dest_item(self)
238
218
  }
239
219
 
240
220
  static VALUE
241
- iview_get_item_at_pos(self, x, y)
242
- VALUE self, x, y;
221
+ iview_get_item_at_pos(VALUE self, VALUE x, VALUE y)
243
222
  {
244
223
  GtkTreePath* path;
245
224
  GtkCellRenderer* cell;
@@ -248,8 +227,7 @@ iview_get_item_at_pos(self, x, y)
248
227
  }
249
228
 
250
229
  static VALUE
251
- iview_visible_range(self)
252
- VALUE self;
230
+ iview_visible_range(VALUE self)
253
231
  {
254
232
  GtkTreePath* start_path;
255
233
  GtkTreePath* end_path;
@@ -261,8 +239,7 @@ iview_visible_range(self)
261
239
  }
262
240
 
263
241
  static VALUE
264
- iview_scroll_to_path(self, path, use_align, row_align, col_align)
265
- VALUE self, path, use_align, row_align, col_align;
242
+ iview_scroll_to_path(VALUE self, VALUE path, VALUE use_align, VALUE row_align, VALUE col_align)
266
243
  {
267
244
  gtk_icon_view_scroll_to_path(_SELF(self),
268
245
  RVAL2GTKTREEPATH(path),
@@ -273,8 +250,7 @@ iview_scroll_to_path(self, path, use_align, row_align, col_align)
273
250
  }
274
251
 
275
252
  static VALUE
276
- iview_set_cursor(self, path, cell, start_editing)
277
- VALUE self, path, cell, start_editing;
253
+ iview_set_cursor(VALUE self, VALUE path, VALUE cell, VALUE start_editing)
278
254
  {
279
255
  gtk_icon_view_set_cursor(_SELF(self), RVAL2GTKTREEPATH(path),
280
256
  NIL_P(cell) ? NULL : RVAL2GOBJ(cell), RVAL2CBOOL(start_editing));
@@ -282,8 +258,7 @@ iview_set_cursor(self, path, cell, start_editing)
282
258
  }
283
259
 
284
260
  static VALUE
285
- iview_set_drag_dest_item(self, path, pos)
286
- VALUE self, path, pos;
261
+ iview_set_drag_dest_item(VALUE self, VALUE path, VALUE pos)
287
262
  {
288
263
  gtk_icon_view_set_drag_dest_item(_SELF(self),
289
264
  NIL_P(path) ? NULL : RVAL2GTKTREEPATH(path),
@@ -292,16 +267,14 @@ iview_set_drag_dest_item(self, path, pos)
292
267
  }
293
268
 
294
269
  static VALUE
295
- iview_unset_model_drag_dest(self)
296
- VALUE self;
270
+ iview_unset_model_drag_dest(VALUE self)
297
271
  {
298
272
  gtk_icon_view_unset_model_drag_dest(_SELF(self));
299
273
  return self;
300
274
  }
301
275
 
302
276
  static VALUE
303
- iview_unset_model_drag_source(self)
304
- VALUE self;
277
+ iview_unset_model_drag_source(VALUE self)
305
278
  {
306
279
  gtk_icon_view_unset_model_drag_source(_SELF(self));
307
280
  return self;
@@ -24,10 +24,7 @@ GtkImageType gtk_image_get_storage_type (GtkImage *image);
24
24
  */
25
25
 
26
26
  static VALUE
27
- image_initialize(argc, argv, self)
28
- int argc;
29
- VALUE *argv;
30
- VALUE self;
27
+ image_initialize(int argc, VALUE *argv, VALUE self)
31
28
  {
32
29
  VALUE arg1, arg2;
33
30
  GType gtype;
@@ -68,10 +65,7 @@ image_initialize(argc, argv, self)
68
65
  }
69
66
 
70
67
  static VALUE
71
- image_set(argc, argv, self)
72
- int argc;
73
- VALUE *argv;
74
- VALUE self;
68
+ image_set(int argc, VALUE *argv, VALUE self)
75
69
  {
76
70
  VALUE arg1, arg2;
77
71
  GType gtype;
@@ -125,8 +119,7 @@ gint gtk_image_get_pixel_size (GtkImage *image);
125
119
 
126
120
  #if GTK_CHECK_VERSION(2,8,0)
127
121
  static VALUE
128
- image_clear(self)
129
- VALUE self;
122
+ image_clear(VALUE self)
130
123
  {
131
124
  gtk_image_clear(_SELF(self));
132
125
  return self;
@@ -12,10 +12,7 @@
12
12
  #include "global.h"
13
13
 
14
14
  static VALUE
15
- imitem_initialize(argc, argv, self)
16
- int argc;
17
- VALUE *argv;
18
- VALUE self;
15
+ imitem_initialize(int argc, VALUE *argv, VALUE self)
19
16
  {
20
17
  VALUE label, use_underline_or_accel_group;
21
18
  GtkWidget *widget = NULL;
@@ -13,16 +13,14 @@
13
13
  #define _SELF(self) (GTK_IM_CONTEXT(RVAL2GOBJ(self)))
14
14
 
15
15
  static VALUE
16
- imcontext_set_client_window(self, gdkwindow)
17
- VALUE self, gdkwindow;
16
+ imcontext_set_client_window(VALUE self, VALUE gdkwindow)
18
17
  {
19
18
  gtk_im_context_set_client_window(_SELF(self), GDK_WINDOW(RVAL2GOBJ(gdkwindow)));
20
19
  return self;
21
20
  }
22
21
 
23
22
  static VALUE
24
- imcontext_get_preedit_string(self)
25
- VALUE self;
23
+ imcontext_get_preedit_string(VALUE self)
26
24
  {
27
25
  gchar* str;
28
26
  PangoAttrList* attrs;
@@ -34,39 +32,34 @@ imcontext_get_preedit_string(self)
34
32
  }
35
33
 
36
34
  static VALUE
37
- imcontext_filter_keypress(self, event)
38
- VALUE self, event;
35
+ imcontext_filter_keypress(VALUE self, VALUE event)
39
36
  {
40
37
  return CBOOL2RVAL(gtk_im_context_filter_keypress(_SELF(self), (GdkEventKey*)RVAL2GEV(event)));
41
38
  }
42
39
 
43
40
  static VALUE
44
- imcontext_focus_in(self)
45
- VALUE self;
41
+ imcontext_focus_in(VALUE self)
46
42
  {
47
43
  gtk_im_context_focus_in(_SELF(self));
48
44
  return self;
49
45
  }
50
46
 
51
47
  static VALUE
52
- imcontext_focus_out(self)
53
- VALUE self;
48
+ imcontext_focus_out(VALUE self)
54
49
  {
55
50
  gtk_im_context_focus_out(_SELF(self));
56
51
  return self;
57
52
  }
58
53
 
59
54
  static VALUE
60
- imcontext_reset(self)
61
- VALUE self;
55
+ imcontext_reset(VALUE self)
62
56
  {
63
57
  gtk_im_context_reset(_SELF(self));
64
58
  return self;
65
59
  }
66
60
 
67
61
  static VALUE
68
- imcontext_set_cursor_location(self, area)
69
- VALUE self, area;
62
+ imcontext_set_cursor_location(VALUE self, VALUE area)
70
63
  {
71
64
  gtk_im_context_set_cursor_location(
72
65
  _SELF(self),
@@ -75,16 +68,14 @@ imcontext_set_cursor_location(self, area)
75
68
  }
76
69
 
77
70
  static VALUE
78
- imcontext_set_use_preedit(self, use_preedit)
79
- VALUE self, use_preedit;
71
+ imcontext_set_use_preedit(VALUE self, VALUE use_preedit)
80
72
  {
81
73
  gtk_im_context_set_use_preedit(_SELF(self), RVAL2CBOOL(use_preedit));
82
74
  return self;
83
75
  }
84
76
 
85
77
  static VALUE
86
- imcontext_set_surrounding(self, text, cursor_index)
87
- VALUE self, text, cursor_index;
78
+ imcontext_set_surrounding(VALUE self, VALUE text, VALUE cursor_index)
88
79
  {
89
80
  StringValue(text);
90
81
  gtk_im_context_set_surrounding(_SELF(self),
@@ -94,8 +85,7 @@ imcontext_set_surrounding(self, text, cursor_index)
94
85
  }
95
86
 
96
87
  static VALUE
97
- imcontext_get_surrounding(self)
98
- VALUE self;
88
+ imcontext_get_surrounding(VALUE self)
99
89
  {
100
90
  gchar* text;
101
91
  gint cursor_index;
@@ -105,8 +95,7 @@ imcontext_get_surrounding(self)
105
95
  }
106
96
 
107
97
  static VALUE
108
- imcontext_delete_surrounding(self, offset, n_chars)
109
- VALUE self;
98
+ imcontext_delete_surrounding(VALUE self, VALUE offset, VALUE n_chars)
110
99
  {
111
100
  return CBOOL2RVAL(gtk_im_context_delete_surrounding(_SELF(self), NUM2INT(offset),
112
101
  NUM2INT(n_chars)));