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,31 +14,27 @@
14
14
  #define _SELF(rc) (GTK_RC_STYLE(RVAL2GOBJ(rc)))
15
15
 
16
16
  static VALUE
17
- rcstyle_initialize(self)
18
- VALUE self;
17
+ rcstyle_initialize(VALUE self)
19
18
  {
20
19
  G_INITIALIZE(self, gtk_rc_style_new());
21
20
  return Qnil;
22
21
  }
23
22
 
24
23
  static VALUE
25
- rcstyle_name(self)
26
- VALUE self;
24
+ rcstyle_name(VALUE self)
27
25
  {
28
26
  return CSTR2RVAL(_SELF(self)->name);
29
27
  }
30
28
 
31
29
  static VALUE
32
- rcstyle_set_name(self, name)
33
- VALUE self, name;
30
+ rcstyle_set_name(VALUE self, VALUE name)
34
31
  {
35
32
  _SELF(self)->name = RVAL2CSTR(name);
36
33
  return self;
37
34
  }
38
35
 
39
36
  static VALUE
40
- rcstyle_bg_pixmap_name(self, idx)
41
- VALUE self, idx;
37
+ rcstyle_bg_pixmap_name(VALUE self, VALUE idx)
42
38
  {
43
39
  int i = NUM2INT(idx);
44
40
 
@@ -48,8 +44,7 @@ rcstyle_bg_pixmap_name(self, idx)
48
44
  }
49
45
 
50
46
  static VALUE
51
- rcstyle_set_bg_pixmap_name(self, idx, bg_pixmap_name)
52
- VALUE self, idx, bg_pixmap_name;
47
+ rcstyle_set_bg_pixmap_name(VALUE self, VALUE idx, VALUE bg_pixmap_name)
53
48
  {
54
49
  int i = NUM2INT(idx);
55
50
 
@@ -60,16 +55,14 @@ rcstyle_set_bg_pixmap_name(self, idx, bg_pixmap_name)
60
55
  }
61
56
 
62
57
  static VALUE
63
- rcstyle_font_desc(self)
64
- VALUE self;
58
+ rcstyle_font_desc(VALUE self)
65
59
  {
66
60
  PangoFontDescription* desc = _SELF(self)->font_desc;
67
61
  return BOXED2RVAL(desc, PANGO_TYPE_FONT_DESCRIPTION);
68
62
  }
69
63
 
70
64
  static VALUE
71
- rcstyle_set_font_desc(self, font_desc)
72
- VALUE self, font_desc;
65
+ rcstyle_set_font_desc(VALUE self, VALUE font_desc)
73
66
  {
74
67
  _SELF(self)->font_desc = (PangoFontDescription*)RVAL2BOXED(font_desc, PANGO_TYPE_FONT_DESCRIPTION);
75
68
  return self;
@@ -96,8 +89,7 @@ rcstyle_set_color_flags(VALUE self, VALUE rb_state_type, VALUE flags)
96
89
 
97
90
  #define DEFINE_STYLE_COLOR(type) \
98
91
  static VALUE \
99
- rcstyle_set_ ## type(self, idx, r, g, b) \
100
- VALUE self, idx, r, g, b; \
92
+ rcstyle_set_ ## type(VALUE self, VALUE idx, VALUE r, VALUE g, VALUE b) \
101
93
  { \
102
94
  GdkColor *color; \
103
95
  int i = NUM2INT(idx); \
@@ -110,8 +102,7 @@ rcstyle_set_ ## type(self, idx, r, g, b) \
110
102
  return self;\
111
103
  } \
112
104
  static VALUE \
113
- rcstyle_ ## type(self, idx) \
114
- VALUE self, idx; \
105
+ rcstyle_ ## type(VALUE self, VALUE idx) \
115
106
  { \
116
107
  int i = NUM2INT(idx); \
117
108
  \
@@ -125,30 +116,26 @@ DEFINE_STYLE_COLOR(text);
125
116
  DEFINE_STYLE_COLOR(base);
126
117
 
127
118
  static VALUE
128
- rcstyle_xthickness(self)
129
- VALUE self;
119
+ rcstyle_xthickness(VALUE self)
130
120
  {
131
121
  return INT2NUM(_SELF(self)->xthickness);
132
122
  }
133
123
 
134
124
  static VALUE
135
- rcstyle_set_xthickness(self, xthickness)
136
- VALUE self, xthickness;
125
+ rcstyle_set_xthickness(VALUE self, VALUE xthickness)
137
126
  {
138
127
  _SELF(self)->xthickness = NUM2INT(xthickness);
139
128
  return self;
140
129
  }
141
130
 
142
131
  static VALUE
143
- rcstyle_ythickness(self)
144
- VALUE self;
132
+ rcstyle_ythickness(VALUE self)
145
133
  {
146
134
  return INT2NUM(_SELF(self)->ythickness);
147
135
  }
148
136
 
149
137
  static VALUE
150
- rcstyle_set_ythickness(self, ythickness)
151
- VALUE self, ythickness;
138
+ rcstyle_set_ythickness(VALUE self, VALUE ythickness)
152
139
  {
153
140
  _SELF(self)->ythickness = NUM2INT(ythickness);
154
141
  return self;
@@ -17,10 +17,7 @@
17
17
  #if GTK_CHECK_VERSION(2,12,0)
18
18
 
19
19
  static VALUE
20
- recentaction_initialize(argc, argv, self)
21
- int argc;
22
- VALUE* argv;
23
- VALUE self;
20
+ recentaction_initialize(int argc, VALUE *argv, VALUE self)
24
21
  {
25
22
  VALUE name, label, tooltip, stock_id, manager;
26
23
  rb_scan_args(argc, argv, "23", &name, &label, &tooltip, &stock_id, &manager);
@@ -61,16 +61,14 @@ GtkRecentFilter* gtk_recent_chooser_get_filter
61
61
 
62
62
  */
63
63
  static VALUE
64
- rc_set_show_numbers(self, val)
65
- VALUE self, val;
64
+ rc_set_show_numbers(VALUE self, VALUE val)
66
65
  {
67
66
  gtk_recent_chooser_set_show_numbers(_SELF(self), RVAL2CBOOL(val));
68
67
  return self;
69
68
  }
70
69
 
71
70
  static VALUE
72
- rc_get_show_numbers(self)
73
- VALUE self;
71
+ rc_get_show_numbers(VALUE self)
74
72
  {
75
73
  return CBOOL2RVAL(gtk_recent_chooser_get_show_numbers(_SELF(self)));
76
74
  }
@@ -82,25 +80,20 @@ struct callback_arg
82
80
  };
83
81
 
84
82
  static VALUE
85
- invoke_callback(data)
86
- VALUE data;
83
+ invoke_callback(VALUE data)
87
84
  {
88
85
  struct callback_arg *arg = (struct callback_arg *)data;
89
86
  return rb_funcall(arg->callback, id_call, 1, arg->a, arg->b);
90
87
  }
91
88
 
92
89
  static void
93
- remove_callback_reference(callback)
94
- gpointer callback;
90
+ remove_callback_reference(gpointer callback)
95
91
  {
96
92
  G_CHILD_REMOVE(mGtk, (VALUE)callback);
97
93
  }
98
94
 
99
95
  static gint
100
- sort_func(a, b, func)
101
- GtkRecentInfo* a;
102
- GtkRecentInfo* b;
103
- gpointer func;
96
+ sort_func(GtkRecentInfo *a, GtkRecentInfo *b, gpointer func)
104
97
  {
105
98
  struct callback_arg arg;
106
99
 
@@ -111,8 +104,7 @@ sort_func(a, b, func)
111
104
  }
112
105
 
113
106
  static VALUE
114
- rc_set_sort_func(self)
115
- VALUE self;
107
+ rc_set_sort_func(VALUE self)
116
108
  {
117
109
  VALUE func = rb_block_proc();
118
110
  G_CHILD_ADD(mGtk, func);
@@ -122,8 +114,7 @@ rc_set_sort_func(self)
122
114
  }
123
115
 
124
116
  static VALUE
125
- rc_set_current_uri(self, uri)
126
- VALUE self, uri;
117
+ rc_set_current_uri(VALUE self, VALUE uri)
127
118
  {
128
119
  GError *error = NULL;
129
120
  gboolean ret = gtk_recent_chooser_set_current_uri(_SELF(self),
@@ -134,23 +125,20 @@ rc_set_current_uri(self, uri)
134
125
  }
135
126
 
136
127
  static VALUE
137
- rc_get_current_uri(self)
138
- VALUE self;
128
+ rc_get_current_uri(VALUE self)
139
129
  {
140
130
  return CSTR2RVAL(gtk_recent_chooser_get_current_uri(_SELF(self)));
141
131
  }
142
132
 
143
133
  static VALUE
144
- rc_get_current_item(self)
145
- VALUE self;
134
+ rc_get_current_item(VALUE self)
146
135
  {
147
136
  return BOXED2RVAL(gtk_recent_chooser_get_current_item(_SELF(self)),
148
137
  GTK_TYPE_RECENT_INFO);
149
138
  }
150
139
 
151
140
  static VALUE
152
- rc_select_uri(self, uri)
153
- VALUE self, uri;
141
+ rc_select_uri(VALUE self, VALUE uri)
154
142
  {
155
143
  GError *error = NULL;
156
144
  gboolean ret = gtk_recent_chooser_select_uri(_SELF(self),
@@ -161,32 +149,28 @@ rc_select_uri(self, uri)
161
149
  }
162
150
 
163
151
  static VALUE
164
- rc_unselect_uri(self, uri)
165
- VALUE self, uri;
152
+ rc_unselect_uri(VALUE self, VALUE uri)
166
153
  {
167
154
  gtk_recent_chooser_unselect_uri(_SELF(self), RVAL2CSTR(uri));
168
155
  return self;
169
156
  }
170
157
 
171
158
  static VALUE
172
- rc_select_all(self)
173
- VALUE self;
159
+ rc_select_all(VALUE self)
174
160
  {
175
161
  gtk_recent_chooser_select_all(_SELF(self));
176
162
  return self;
177
163
  }
178
164
 
179
165
  static VALUE
180
- rc_unselect_all(self)
181
- VALUE self;
166
+ rc_unselect_all(VALUE self)
182
167
  {
183
168
  gtk_recent_chooser_unselect_all(_SELF(self));
184
169
  return self;
185
170
  }
186
171
 
187
172
  static VALUE
188
- rc_get_items(self)
189
- VALUE self;
173
+ rc_get_items(VALUE self)
190
174
  {
191
175
  GList* list = gtk_recent_chooser_get_items(_SELF(self));
192
176
  VALUE ary = rb_ary_new();
@@ -200,8 +184,7 @@ rc_get_items(self)
200
184
  }
201
185
 
202
186
  static VALUE
203
- rc_get_uris(self)
204
- VALUE self;
187
+ rc_get_uris(VALUE self)
205
188
  {
206
189
  int i;
207
190
  gsize size;
@@ -215,8 +198,7 @@ rc_get_uris(self)
215
198
  }
216
199
 
217
200
  static VALUE
218
- rc_add_filter(self, filter)
219
- VALUE self, filter;
201
+ rc_add_filter(VALUE self, VALUE filter)
220
202
  {
221
203
  gtk_recent_chooser_add_filter(_SELF(self),
222
204
  GTK_RECENT_FILTER(RVAL2GOBJ(filter)));
@@ -224,8 +206,7 @@ rc_add_filter(self, filter)
224
206
  }
225
207
 
226
208
  static VALUE
227
- rc_remove_filter(self, filter)
228
- VALUE self, filter;
209
+ rc_remove_filter(VALUE self, VALUE filter)
229
210
  {
230
211
  gtk_recent_chooser_remove_filter(_SELF(self),
231
212
  GTK_RECENT_FILTER(RVAL2GOBJ(filter)));
@@ -233,8 +214,7 @@ rc_remove_filter(self, filter)
233
214
  }
234
215
 
235
216
  static VALUE
236
- rc_list_filters(self)
237
- VALUE self;
217
+ rc_list_filters(VALUE self)
238
218
  {
239
219
  return GSLIST2ARYF(gtk_recent_chooser_list_filters(_SELF(self)));
240
220
  }
@@ -16,10 +16,7 @@
16
16
  #define _SELF(self) (GTK_RECENT_CHOOSER_DIALOG(RVAL2GOBJ(self)))
17
17
 
18
18
  static VALUE
19
- rcd_initialize(argc, argv, self)
20
- int argc;
21
- VALUE *argv;
22
- VALUE self;
19
+ rcd_initialize(int argc, VALUE *argv, VALUE self)
23
20
  {
24
21
  VALUE title, parent, button_ary;
25
22
  GtkWidget* dialog;
@@ -16,10 +16,7 @@
16
16
  #define _SELF(self) (GTK_RECENT_CHOOSER_MENU(RVAL2GOBJ(self)))
17
17
 
18
18
  static VALUE
19
- rcm_initialize(argc, argv, self)
20
- int argc;
21
- VALUE *argv;
22
- VALUE self;
19
+ rcm_initialize(int argc, VALUE *argv, VALUE self)
23
20
  {
24
21
  VALUE manager;
25
22
  GtkWidget* menu;
@@ -16,10 +16,7 @@
16
16
  #define _SELF(self) (GTK_RECENT_CHOOSER_WIDGET(RVAL2GOBJ(self)))
17
17
 
18
18
  static VALUE
19
- rcw_initialize(argc, argv, self)
20
- int argc;
21
- VALUE *argv;
22
- VALUE self;
19
+ rcw_initialize(int argc, VALUE *argv, VALUE self)
23
20
  {
24
21
  VALUE manager;
25
22
  GtkWidget* widget;
@@ -48,8 +48,7 @@ gtk_recent_data_get_type(void)
48
48
  #define _SELF(w) ((GtkRecentData*)RVAL2BOXED(w, GTK_TYPE_RECENT_DATA))
49
49
 
50
50
  static VALUE
51
- rd_initialize(self)
52
- VALUE self;
51
+ rd_initialize(VALUE self)
53
52
  {
54
53
  GtkRecentData data;
55
54
  G_INITIALIZE(self, &data);
@@ -58,14 +57,12 @@ rd_initialize(self)
58
57
 
59
58
  #define RD_STR(name)\
60
59
  static VALUE \
61
- rd_get_ ## name (self)\
62
- VALUE self;\
60
+ rd_get_ ## name (VALUE self)\
63
61
  {\
64
62
  return CSTR2RVAL(_SELF(self)->name);\
65
63
  }\
66
64
  static VALUE \
67
- rd_set_ ## name (self, val)\
68
- VALUE self, val;\
65
+ rd_set_ ## name (VALUE self, VALUE val)\
69
66
  {\
70
67
  _SELF(self)->name = RVAL2CSTR(val);\
71
68
  return self;\
@@ -78,8 +75,7 @@ RD_STR(app_name);
78
75
  RD_STR(app_exec);
79
76
 
80
77
  static VALUE
81
- rd_get_groups(self)
82
- VALUE self;
78
+ rd_get_groups(VALUE self)
83
79
  {
84
80
  gchar** grps = _SELF(self)->groups;
85
81
  VALUE ary = rb_ary_new();
@@ -93,8 +89,7 @@ rd_get_groups(self)
93
89
  }
94
90
 
95
91
  static VALUE
96
- rd_set_groups(self, groups)
97
- VALUE self, groups;
92
+ rd_set_groups(VALUE self, VALUE groups)
98
93
  {
99
94
  gint i;
100
95
  gint len = RARRAY_LEN(groups);
@@ -109,15 +104,13 @@ rd_set_groups(self, groups)
109
104
  }
110
105
 
111
106
  static VALUE
112
- rd_get_is_private(self)
113
- VALUE self;
107
+ rd_get_is_private(VALUE self)
114
108
  {
115
109
  return CBOOL2RVAL(_SELF(self)->is_private);
116
110
  }
117
111
 
118
112
  static VALUE
119
- rd_set_is_private(self, is_private)
120
- VALUE self, is_private;
113
+ rd_set_is_private(VALUE self, VALUE is_private)
121
114
  {
122
115
  _SELF(self)->is_private = RVAL2CBOOL(is_private);
123
116
  return self;
@@ -16,71 +16,62 @@
16
16
  #define _SELF(self) (GTK_RECENT_FILTER(RVAL2GOBJ(self)))
17
17
 
18
18
  static VALUE
19
- rf_initialize(self)
20
- VALUE self;
19
+ rf_initialize(VALUE self)
21
20
  {
22
21
  RBGTK_INITIALIZE(self, gtk_recent_filter_new());
23
22
  return Qnil;
24
23
  }
25
24
 
26
25
  static VALUE
27
- rf_get_name(self)
28
- VALUE self;
26
+ rf_get_name(VALUE self)
29
27
  {
30
28
  return CSTR2RVAL(gtk_recent_filter_get_name(_SELF(self)));
31
29
  }
32
30
 
33
31
  static VALUE
34
- rf_set_name(self, name)
35
- VALUE self, name;
32
+ rf_set_name(VALUE self, VALUE name)
36
33
  {
37
34
  gtk_recent_filter_set_name(_SELF(self), RVAL2CSTR(name));
38
35
  return self;
39
36
  }
40
37
 
41
38
  static VALUE
42
- rf_add_mime_type(self, mime_type)
43
- VALUE self, mime_type;
39
+ rf_add_mime_type(VALUE self, VALUE mime_type)
44
40
  {
45
41
  gtk_recent_filter_add_mime_type(_SELF(self), RVAL2CSTR(mime_type));
46
42
  return self;
47
43
  }
48
44
 
49
45
  static VALUE
50
- rf_add_pattern(self, pattern)
51
- VALUE self, pattern;
46
+ rf_add_pattern(VALUE self, VALUE pattern)
52
47
  {
53
48
  gtk_recent_filter_add_pattern(_SELF(self), RVAL2CSTR(pattern));
54
49
  return self;
55
50
  }
56
51
 
57
52
  static VALUE
58
- rf_add_pixbuf_formats(self)
59
- VALUE self;
53
+ rf_add_pixbuf_formats(VALUE self)
60
54
  {
61
55
  gtk_recent_filter_add_pixbuf_formats(_SELF(self));
62
56
  return self;
63
57
  }
64
58
 
65
59
  static VALUE
66
- rf_add_application(self, application)
67
- VALUE self, application;
60
+ rf_add_application(VALUE self, VALUE application)
68
61
  {
69
62
  gtk_recent_filter_add_application(_SELF(self), RVAL2CSTR(application));
70
63
  return self;
71
64
  }
72
65
 
73
66
  static VALUE
74
- rf_add_group(self, group)
75
- VALUE self, group;
67
+ rf_add_group(VALUE self, VALUE group)
76
68
  {
77
69
  gtk_recent_filter_add_group(_SELF(self), RVAL2CSTR(group));
78
70
  return self;
79
71
  }
80
72
 
81
73
  static VALUE
82
- rf_add_age(self, days)
83
- VALUE self, days;
74
+ rf_add_age(VALUE self, VALUE days)
84
75
  {
85
76
  gtk_recent_filter_add_age(_SELF(self), NUM2INT(days));
86
77
  return self;
@@ -101,9 +92,7 @@ invoke_callback(VALUE arg_)
101
92
  }
102
93
 
103
94
  static gboolean
104
- filter_func(info, func)
105
- const GtkRecentFilterInfo* info;
106
- gpointer func;
95
+ filter_func(const GtkRecentFilterInfo *info, gpointer func)
107
96
  {
108
97
  struct callback_arg arg;
109
98
 
@@ -115,15 +104,13 @@ filter_func(info, func)
115
104
  }
116
105
 
117
106
  static void
118
- remove_callback_reference(data)
119
- gpointer data;
107
+ remove_callback_reference(gpointer data)
120
108
  {
121
109
  G_CHILD_REMOVE(mGtk, (VALUE)data);
122
110
  }
123
111
 
124
112
  static VALUE
125
- rf_add_custom(self, needed)
126
- VALUE self, needed;
113
+ rf_add_custom(VALUE self, VALUE needed)
127
114
  {
128
115
  VALUE func = rb_block_proc();
129
116
  G_CHILD_ADD(mGtk, func);
@@ -137,16 +124,14 @@ rf_add_custom(self, needed)
137
124
  }
138
125
 
139
126
  static VALUE
140
- rf_get_needed(self)
141
- VALUE self;
127
+ rf_get_needed(VALUE self)
142
128
  {
143
129
  return GFLAGS2RVAL(gtk_recent_filter_get_needed(_SELF(self)), GTK_TYPE_RECENT_FILTER_FLAGS);
144
130
  }
145
131
 
146
132
 
147
133
  static VALUE
148
- rf_filter_filter(self, filter_info)
149
- VALUE self, filter_info;
134
+ rf_filter_filter(VALUE self, VALUE filter_info)
150
135
  {
151
136
  return CBOOL2RVAL(gtk_recent_filter_filter(_SELF(self),
152
137
  (GtkRecentFilterInfo*)RVAL2BOXED(filter_info, GTK_TYPE_RECENT_FILTER_INFO)));