gtk2 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README +2 -2
- data/Rakefile +5 -3
- data/ext/gtk2/extconf.rb +5 -2
- data/ext/gtk2/global.h +1 -8
- data/ext/gtk2/rbgdk.c +1 -16
- data/ext/gtk2/rbgdkcairo.c +0 -8
- data/ext/gtk2/rbgdkcolormap.c +0 -4
- data/ext/gtk2/rbgdkcursor.c +0 -18
- data/ext/gtk2/rbgdkdisplay.c +7 -45
- data/ext/gtk2/rbgdkdisplaymanager.c +0 -5
- data/ext/gtk2/rbgdkdragcontext.c +0 -13
- data/ext/gtk2/rbgdkdraw.c +2 -26
- data/ext/gtk2/rbgdkevent.c +631 -324
- data/ext/gtk2/rbgdkgc.c +0 -5
- data/ext/gtk2/rbgdkkeymap.c +2 -4
- data/ext/gtk2/rbgdkpango.c +0 -5
- data/ext/gtk2/rbgdkpangorenderer.c +0 -6
- data/ext/gtk2/rbgdkpixbuf.c +0 -3
- data/ext/gtk2/rbgdkpixmap.c +3 -18
- data/ext/gtk2/rbgdkproperty.c +0 -41
- data/ext/gtk2/rbgdkscreen.c +0 -22
- data/ext/gtk2/rbgdkselection.c +0 -13
- data/ext/gtk2/rbgdkvisual.c +0 -4
- data/ext/gtk2/rbgdkwindow.c +2 -71
- data/ext/gtk2/rbgdkx11.c +1 -6
- data/ext/gtk2/rbgtkaboutdialog.c +0 -5
- data/ext/gtk2/rbgtkaccelerator.c +0 -4
- data/ext/gtk2/rbgtkaccelgroup.c +0 -8
- data/ext/gtk2/rbgtkaccelmap.c +0 -15
- data/ext/gtk2/rbgtkaction.c +0 -14
- data/ext/gtk2/rbgtkactiongroup.c +0 -9
- data/ext/gtk2/rbgtkalignment.c +0 -4
- data/ext/gtk2/rbgtkassistant.c +0 -6
- data/ext/gtk2/rbgtkbbox.c +0 -4
- data/ext/gtk2/rbgtkbutton.c +0 -4
- data/ext/gtk2/rbgtkcalendar.c +0 -8
- data/ext/gtk2/rbgtkcelllayout.c +0 -5
- data/ext/gtk2/rbgtkcellrenderer.c +0 -8
- data/ext/gtk2/rbgtkcellrendereraccel.c +0 -6
- data/ext/gtk2/rbgtkcellrenderercombo.c +0 -6
- data/ext/gtk2/rbgtkcellrendererprogress.c +0 -6
- data/ext/gtk2/rbgtkcellrendererspin.c +0 -6
- data/ext/gtk2/rbgtkcellview.c +0 -5
- data/ext/gtk2/rbgtkclipboard.c +0 -48
- data/ext/gtk2/rbgtkcolorbutton.c +0 -6
- data/ext/gtk2/rbgtkcolorsel.c +0 -4
- data/ext/gtk2/rbgtkcombobox.c +0 -12
- data/ext/gtk2/rbgtkcomboboxentry.c +0 -6
- data/ext/gtk2/rbgtkconst.c +0 -2
- data/ext/gtk2/rbgtkdialog.c +0 -10
- data/ext/gtk2/rbgtkdrag.c +0 -24
- data/ext/gtk2/rbgtkentry.c +0 -4
- data/ext/gtk2/rbgtkentrycompletion.c +0 -10
- data/ext/gtk2/rbgtkexpander.c +0 -6
- data/ext/gtk2/rbgtkfilechooser.c +0 -10
- data/ext/gtk2/rbgtkfilechooserbutton.c +0 -6
- data/ext/gtk2/rbgtkfilechooserdialog.c +0 -8
- data/ext/gtk2/rbgtkfilechooserwidget.c +0 -6
- data/ext/gtk2/rbgtkfilefilter.c +0 -11
- data/ext/gtk2/rbgtkfilesystemerror.c +0 -2
- data/ext/gtk2/rbgtkfontbutton.c +0 -6
- data/ext/gtk2/rbgtkiconinfo.c +0 -5
- data/ext/gtk2/rbgtkiconsize.c +0 -4
- data/ext/gtk2/rbgtkicontheme.c +0 -11
- data/ext/gtk2/rbgtkiconview.c +0 -9
- data/ext/gtk2/rbgtkimage.c +0 -8
- data/ext/gtk2/rbgtkinvisible.c +0 -4
- data/ext/gtk2/rbgtklinkbutton.c +0 -5
- data/ext/gtk2/rbgtkliststore.c +0 -14
- data/ext/gtk2/rbgtkmenu.c +0 -12
- data/ext/gtk2/rbgtkmenubar.c +0 -2
- data/ext/gtk2/rbgtkmenushell.c +0 -4
- data/ext/gtk2/rbgtkmenutoolbutton.c +0 -5
- data/ext/gtk2/rbgtkmessagedialog.c +0 -4
- data/ext/gtk2/rbgtknotebook.c +0 -9
- data/ext/gtk2/rbgtkpagesetup.c +0 -5
- data/ext/gtk2/rbgtkpapersize.c +0 -6
- data/ext/gtk2/rbgtkprintcontext.c +0 -5
- data/ext/gtk2/rbgtkprintoperation.c +0 -5
- data/ext/gtk2/rbgtkprintoperationpreview.c +0 -5
- data/ext/gtk2/rbgtkprintsettings.c +0 -5
- data/ext/gtk2/rbgtkradioaction.c +0 -18
- data/ext/gtk2/rbgtkradiotoolbutton.c +0 -6
- data/ext/gtk2/rbgtkrange.c +0 -2
- data/ext/gtk2/rbgtkrc.c +0 -4
- data/ext/gtk2/rbgtkrecentchooser.c +0 -6
- data/ext/gtk2/rbgtkrecentchooserdialog.c +0 -5
- data/ext/gtk2/rbgtkrecentchoosermenu.c +0 -6
- data/ext/gtk2/rbgtkrecentchooserwidget.c +0 -5
- data/ext/gtk2/rbgtkrecentdata.c +0 -6
- data/ext/gtk2/rbgtkrecentfilter.c +0 -5
- data/ext/gtk2/rbgtkrecentfilterinfo.c +0 -6
- data/ext/gtk2/rbgtkrecentinfo.c +0 -5
- data/ext/gtk2/rbgtkrecentmanager.c +0 -5
- data/ext/gtk2/rbgtkscale.c +0 -6
- data/ext/gtk2/rbgtkscrolledwindow.c +0 -9
- data/ext/gtk2/rbgtkselection.c +0 -8
- data/ext/gtk2/rbgtkselectiondata.c +2 -14
- data/ext/gtk2/rbgtkseparatortoolitem.c +0 -6
- data/ext/gtk2/rbgtksettings.c +0 -4
- data/ext/gtk2/rbgtksizegroup.c +0 -5
- data/ext/gtk2/rbgtkstatusicon.c +0 -5
- data/ext/gtk2/rbgtkstock.c +0 -38
- data/ext/gtk2/rbgtkstyle.c +0 -8
- data/ext/gtk2/rbgtktargetlist.c +0 -34
- data/ext/gtk2/rbgtktextbuffer.c +0 -12
- data/ext/gtk2/rbgtktextiter.c +0 -8
- data/ext/gtk2/rbgtktextview.c +0 -4
- data/ext/gtk2/rbgtktoggleaction.c +0 -7
- data/ext/gtk2/rbgtktoggletoolbutton.c +0 -6
- data/ext/gtk2/rbgtktoolbar.c +0 -6
- data/ext/gtk2/rbgtktoolbutton.c +0 -6
- data/ext/gtk2/rbgtktoolitem.c +0 -9
- data/ext/gtk2/rbgtktooltips.c +0 -4
- data/ext/gtk2/rbgtktreeiter.c +0 -4
- data/ext/gtk2/rbgtktreemodelfilter.c +0 -5
- data/ext/gtk2/rbgtktreemodelsort.c +0 -4
- data/ext/gtk2/rbgtktreerowreference.c +0 -4
- data/ext/gtk2/rbgtktreeselection.c +0 -4
- data/ext/gtk2/rbgtktreestore.c +0 -19
- data/ext/gtk2/rbgtktreeview.c +0 -24
- data/ext/gtk2/rbgtktreeviewcolumn.c +0 -10
- data/ext/gtk2/rbgtkuimanager.c +0 -6
- data/ext/gtk2/rbgtkwidget.c +1 -31
- data/ext/gtk2/rbgtkwindow.c +2 -47
- data/sample/gtk-demo/common.rb +6 -1
- data/sample/gtk-demo/main.rb +89 -85
- data/test/test_gtk_icon_theme.rb +11 -6
- metadata +14 -22
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
#include "global.h"
|
|
23
23
|
|
|
24
|
-
#if GTK_CHECK_VERSION(2,10,0)
|
|
25
|
-
|
|
26
24
|
#define RG_TARGET_NAMESPACE cCellRendererAccel
|
|
27
25
|
#define _SELF(s) (GTK_CELL_RENDERER_ACCEL(RVAL2GOBJ(s)))
|
|
28
26
|
|
|
@@ -33,17 +31,13 @@ rg_initialize(VALUE self)
|
|
|
33
31
|
return Qnil;
|
|
34
32
|
}
|
|
35
33
|
|
|
36
|
-
#endif
|
|
37
|
-
|
|
38
34
|
void
|
|
39
35
|
Init_gtk_cellrendereraccel(VALUE mGtk)
|
|
40
36
|
{
|
|
41
|
-
#if GTK_CHECK_VERSION(2,10,0)
|
|
42
37
|
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_CELL_RENDERER_ACCEL, "CellRendererAccel", mGtk);
|
|
43
38
|
RG_DEF_METHOD(initialize, 0);
|
|
44
39
|
|
|
45
40
|
/* GtkCellRendererAccelMode */
|
|
46
41
|
G_DEF_CLASS(GTK_TYPE_CELL_RENDERER_ACCEL_MODE, "Mode", RG_TARGET_NAMESPACE);
|
|
47
42
|
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_CELL_RENDERER_ACCEL_MODE, "GTK_CELL_RENDERER_ACCEL_");
|
|
48
|
-
#endif
|
|
49
43
|
}
|
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
#include "global.h"
|
|
23
23
|
|
|
24
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
25
|
-
|
|
26
24
|
#define RG_TARGET_NAMESPACE cCellRendererCombo
|
|
27
25
|
|
|
28
26
|
static VALUE
|
|
@@ -32,13 +30,9 @@ rg_initialize(VALUE self)
|
|
|
32
30
|
return Qnil;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
|
-
#endif
|
|
36
|
-
|
|
37
33
|
void
|
|
38
34
|
Init_gtk_cellrenderercombo(VALUE mGtk)
|
|
39
35
|
{
|
|
40
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
41
36
|
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_CELL_RENDERER_COMBO, "CellRendererCombo", mGtk);
|
|
42
37
|
RG_DEF_METHOD(initialize, 0);
|
|
43
|
-
#endif
|
|
44
38
|
}
|
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
#include "global.h"
|
|
23
23
|
|
|
24
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
25
|
-
|
|
26
24
|
#define RG_TARGET_NAMESPACE cCellRendererProgress
|
|
27
25
|
|
|
28
26
|
static VALUE
|
|
@@ -32,13 +30,9 @@ rg_initialize(VALUE self)
|
|
|
32
30
|
return Qnil;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
|
-
#endif
|
|
36
|
-
|
|
37
33
|
void
|
|
38
34
|
Init_gtk_cellrendererprogress(VALUE mGtk)
|
|
39
35
|
{
|
|
40
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
41
36
|
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_CELL_RENDERER_PROGRESS, "CellRendererProgress", mGtk);
|
|
42
37
|
RG_DEF_METHOD(initialize, 0);
|
|
43
|
-
#endif
|
|
44
38
|
}
|
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
#include "global.h"
|
|
23
23
|
|
|
24
|
-
#if GTK_CHECK_VERSION(2,10,0)
|
|
25
|
-
|
|
26
24
|
#define RG_TARGET_NAMESPACE cCellRendererSpin
|
|
27
25
|
#define _SELF(s) (GTK_CELL_RENDERER_SPIN(RVAL2GOBJ(s)))
|
|
28
26
|
|
|
@@ -33,13 +31,9 @@ rg_initialize(VALUE self)
|
|
|
33
31
|
return Qnil;
|
|
34
32
|
}
|
|
35
33
|
|
|
36
|
-
#endif
|
|
37
|
-
|
|
38
34
|
void
|
|
39
35
|
Init_gtk_cellrendererspin(VALUE mGtk)
|
|
40
36
|
{
|
|
41
|
-
#if GTK_CHECK_VERSION(2,10,0)
|
|
42
37
|
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_CELL_RENDERER_SPIN, "CellRendererSpin", mGtk);
|
|
43
38
|
RG_DEF_METHOD(initialize, 0);
|
|
44
|
-
#endif
|
|
45
39
|
}
|
data/ext/gtk2/rbgtkcellview.c
CHANGED
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
#include "global.h"
|
|
23
23
|
|
|
24
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
25
|
-
|
|
26
24
|
#define RG_TARGET_NAMESPACE cCellView
|
|
27
25
|
#define _SELF(self) (GTK_CELL_VIEW(RVAL2GOBJ(self)))
|
|
28
26
|
|
|
@@ -101,12 +99,10 @@ rg_cell_renderers(VALUE self)
|
|
|
101
99
|
{
|
|
102
100
|
return GLIST2ARYF(gtk_cell_view_get_cell_renderers(_SELF(self)));
|
|
103
101
|
}
|
|
104
|
-
#endif
|
|
105
102
|
|
|
106
103
|
void
|
|
107
104
|
Init_gtk_cellview(VALUE mGtk)
|
|
108
105
|
{
|
|
109
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
110
106
|
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_CELL_VIEW, "CellView", mGtk);
|
|
111
107
|
|
|
112
108
|
id_model = rb_intern("model");
|
|
@@ -118,5 +114,4 @@ Init_gtk_cellview(VALUE mGtk)
|
|
|
118
114
|
RG_DEF_METHOD(displayed_row, 0);
|
|
119
115
|
RG_DEF_METHOD(get_size_of_row, 1);
|
|
120
116
|
RG_DEF_METHOD(cell_renderers, 0);
|
|
121
|
-
#endif
|
|
122
117
|
}
|
data/ext/gtk2/rbgtkclipboard.c
CHANGED
|
@@ -67,14 +67,10 @@ rg_s_get(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
|
|
67
67
|
rb_scan_args(argc, argv, "10", &selection);
|
|
68
68
|
clipboard = gtk_clipboard_get(RVAL2ATOM(selection));
|
|
69
69
|
} else {
|
|
70
|
-
#if GTK_CHECK_VERSION(2,2,0)
|
|
71
70
|
VALUE display, selection;
|
|
72
71
|
rb_scan_args(argc, argv, "20", &display, &selection);
|
|
73
72
|
clipboard = gtk_clipboard_get_for_display(GDK_DISPLAY_OBJECT(RVAL2GOBJ(display)),
|
|
74
73
|
RVAL2ATOM(selection));
|
|
75
|
-
#else
|
|
76
|
-
rb_raise(rb_eArgError, "Wrong number of arguments: %d", argc);
|
|
77
|
-
#endif
|
|
78
74
|
}
|
|
79
75
|
return CLIPBOARD2RVAL(clipboard);
|
|
80
76
|
}
|
|
@@ -82,11 +78,7 @@ rg_s_get(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
|
|
82
78
|
static VALUE
|
|
83
79
|
rg_display(VALUE self)
|
|
84
80
|
{
|
|
85
|
-
#if GTK_CHECK_VERSION(2,2,0)
|
|
86
81
|
return GOBJ2RVAL(gtk_clipboard_get_display(_SELF(self)));
|
|
87
|
-
#else
|
|
88
|
-
return Qnil;
|
|
89
|
-
#endif
|
|
90
82
|
}
|
|
91
83
|
|
|
92
84
|
static void
|
|
@@ -175,14 +167,12 @@ rg_set_text(VALUE self, VALUE text)
|
|
|
175
167
|
return self;
|
|
176
168
|
}
|
|
177
169
|
|
|
178
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
179
170
|
static VALUE
|
|
180
171
|
rg_set_image(VALUE self, VALUE pixbuf)
|
|
181
172
|
{
|
|
182
173
|
gtk_clipboard_set_image(_SELF(self), GDK_PIXBUF(RVAL2GOBJ(pixbuf)));
|
|
183
174
|
return self;
|
|
184
175
|
}
|
|
185
|
-
#endif
|
|
186
176
|
|
|
187
177
|
static void
|
|
188
178
|
clipboard_received_func(GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer func)
|
|
@@ -225,7 +215,6 @@ rg_request_text(VALUE self)
|
|
|
225
215
|
return self;
|
|
226
216
|
}
|
|
227
217
|
|
|
228
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
229
218
|
static void
|
|
230
219
|
clipboard_image_received_func(GtkClipboard *clipboard, GdkPixbuf *pixbuf, gpointer func)
|
|
231
220
|
{
|
|
@@ -243,9 +232,7 @@ rg_request_image(VALUE self)
|
|
|
243
232
|
(gpointer)func);
|
|
244
233
|
return self;
|
|
245
234
|
}
|
|
246
|
-
#endif
|
|
247
235
|
|
|
248
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
|
249
236
|
static void
|
|
250
237
|
clipboard_target_received_func(GtkClipboard *clipboard, GdkAtom *atoms, gint n_atoms, gpointer func)
|
|
251
238
|
{
|
|
@@ -269,9 +256,7 @@ rg_request_targets(VALUE self)
|
|
|
269
256
|
(gpointer)func);
|
|
270
257
|
return self;
|
|
271
258
|
}
|
|
272
|
-
#endif
|
|
273
259
|
|
|
274
|
-
#if GTK_CHECK_VERSION(2,10,0)
|
|
275
260
|
static void
|
|
276
261
|
clipboard_rich_text_received_func(GtkClipboard *clipboard, GdkAtom format, const guint8 *text, gsize length, gpointer func)
|
|
277
262
|
{
|
|
@@ -290,7 +275,6 @@ rg_request_rich_text(VALUE self, VALUE buffer)
|
|
|
290
275
|
(gpointer)func);
|
|
291
276
|
return self;
|
|
292
277
|
}
|
|
293
|
-
#endif
|
|
294
278
|
|
|
295
279
|
static VALUE
|
|
296
280
|
rg_wait_for_contents(VALUE self, VALUE target)
|
|
@@ -309,16 +293,13 @@ rg_wait_for_text(VALUE self)
|
|
|
309
293
|
return str ? CSTR2RVAL(str) : Qnil;
|
|
310
294
|
}
|
|
311
295
|
|
|
312
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
313
296
|
static VALUE
|
|
314
297
|
rg_wait_for_image(VALUE self)
|
|
315
298
|
{
|
|
316
299
|
GdkPixbuf* pixbuf = gtk_clipboard_wait_for_image(_SELF(self));
|
|
317
300
|
return GOBJ2RVAL(pixbuf);
|
|
318
301
|
}
|
|
319
|
-
#endif
|
|
320
302
|
|
|
321
|
-
#if GTK_CHECK_VERSION(2,10,0)
|
|
322
303
|
static VALUE
|
|
323
304
|
rg_wait_for_rich_text(VALUE self, VALUE buffer)
|
|
324
305
|
{
|
|
@@ -336,7 +317,6 @@ rg_wait_for_rich_text(VALUE self, VALUE buffer)
|
|
|
336
317
|
}
|
|
337
318
|
|
|
338
319
|
}
|
|
339
|
-
#endif
|
|
340
320
|
|
|
341
321
|
static VALUE
|
|
342
322
|
rg_wait_is_text_available_p(VALUE self)
|
|
@@ -344,23 +324,18 @@ rg_wait_is_text_available_p(VALUE self)
|
|
|
344
324
|
return CBOOL2RVAL(gtk_clipboard_wait_is_text_available(_SELF(self)));
|
|
345
325
|
}
|
|
346
326
|
|
|
347
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
348
327
|
static VALUE
|
|
349
328
|
rg_wait_is_image_available_p(VALUE self)
|
|
350
329
|
{
|
|
351
330
|
return CBOOL2RVAL(gtk_clipboard_wait_is_image_available(_SELF(self)));
|
|
352
331
|
}
|
|
353
|
-
#endif
|
|
354
332
|
|
|
355
|
-
#if GTK_CHECK_VERSION(2,10,0)
|
|
356
333
|
static VALUE
|
|
357
334
|
rg_wait_is_rich_text_available_p(VALUE self, VALUE buffer)
|
|
358
335
|
{
|
|
359
336
|
return CBOOL2RVAL(gtk_clipboard_wait_is_rich_text_available(_SELF(self), GTK_TEXT_BUFFER(RVAL2GOBJ(buffer))));
|
|
360
337
|
}
|
|
361
|
-
#endif
|
|
362
338
|
|
|
363
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
|
364
339
|
static VALUE
|
|
365
340
|
rg_wait_for_targets(VALUE self)
|
|
366
341
|
{
|
|
@@ -386,9 +361,7 @@ rg_wait_for_targets(VALUE self)
|
|
|
386
361
|
}
|
|
387
362
|
return ary;
|
|
388
363
|
}
|
|
389
|
-
#endif
|
|
390
364
|
|
|
391
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
392
365
|
static VALUE
|
|
393
366
|
rg_wait_is_target_available_p(VALUE self, VALUE target)
|
|
394
367
|
{
|
|
@@ -416,7 +389,6 @@ rg_store(VALUE self)
|
|
|
416
389
|
|
|
417
390
|
return self;
|
|
418
391
|
}
|
|
419
|
-
#endif
|
|
420
392
|
|
|
421
393
|
void
|
|
422
394
|
Init_gtk_clipboard(VALUE mGtk)
|
|
@@ -431,43 +403,23 @@ Init_gtk_clipboard(VALUE mGtk)
|
|
|
431
403
|
*/
|
|
432
404
|
RG_DEF_METHOD(clear, 0);
|
|
433
405
|
RG_DEF_METHOD(set_text, 1);
|
|
434
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
435
406
|
RG_DEF_METHOD(set_image, 1);
|
|
436
|
-
#endif
|
|
437
407
|
RG_DEF_METHOD(request_contents, 1);
|
|
438
408
|
RG_DEF_METHOD(request_text, 0);
|
|
439
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
440
409
|
RG_DEF_METHOD(request_image, 0);
|
|
441
|
-
#endif
|
|
442
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
|
443
410
|
RG_DEF_METHOD(request_targets, 0);
|
|
444
|
-
#endif
|
|
445
|
-
#if GTK_CHECK_VERSION(2,10,0)
|
|
446
411
|
RG_DEF_METHOD(request_rich_text, 1);
|
|
447
|
-
#endif
|
|
448
412
|
RG_DEF_METHOD(wait_for_contents, 1);
|
|
449
413
|
RG_DEF_METHOD(wait_for_text, 0);
|
|
450
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
451
414
|
RG_DEF_METHOD(wait_for_image, 0);
|
|
452
|
-
#endif
|
|
453
|
-
#if GTK_CHECK_VERSION(2,10,0)
|
|
454
415
|
RG_DEF_METHOD(wait_for_rich_text, 1);
|
|
455
|
-
#endif
|
|
456
416
|
RG_DEF_METHOD_P(wait_is_text_available, 0);
|
|
457
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
458
417
|
RG_DEF_METHOD_P(wait_is_image_available, 0);
|
|
459
|
-
#endif
|
|
460
|
-
#if GTK_CHECK_VERSION(2,10,0)
|
|
461
418
|
RG_DEF_METHOD_P(wait_is_rich_text_available, 1);
|
|
462
|
-
#endif
|
|
463
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
|
464
419
|
RG_DEF_METHOD(wait_for_targets, 0);
|
|
465
|
-
#endif
|
|
466
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
467
420
|
RG_DEF_METHOD_P(wait_is_target_available, 1);
|
|
468
421
|
RG_DEF_METHOD(set_can_store, 1);
|
|
469
422
|
RG_DEF_METHOD(store, 0);
|
|
470
|
-
#endif
|
|
471
423
|
|
|
472
424
|
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
|
473
425
|
}
|
data/ext/gtk2/rbgtkcolorbutton.c
CHANGED
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
#include "global.h"
|
|
23
23
|
|
|
24
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
|
25
|
-
|
|
26
24
|
#define RG_TARGET_NAMESPACE cColorButton
|
|
27
25
|
|
|
28
26
|
static VALUE
|
|
@@ -43,13 +41,9 @@ rg_initialize(int argc, VALUE *argv, VALUE self)
|
|
|
43
41
|
return Qnil;
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
#endif
|
|
47
|
-
|
|
48
44
|
void
|
|
49
45
|
Init_gtk_colorbutton(VALUE mGtk)
|
|
50
46
|
{
|
|
51
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
|
52
47
|
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_COLOR_BUTTON, "ColorButton", mGtk);
|
|
53
48
|
RG_DEF_METHOD(initialize, -1);
|
|
54
|
-
#endif
|
|
55
49
|
}
|
data/ext/gtk2/rbgtkcolorsel.c
CHANGED
|
@@ -157,7 +157,6 @@ rg_s_palette_to_string(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
|
|
157
157
|
return CSTR2RVAL_FREE(palette);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
#if GTK_CHECK_VERSION(2,2,0)
|
|
161
160
|
static void
|
|
162
161
|
screen_func(GdkScreen *screen, const GdkColor *colors, gint n_colors)
|
|
163
162
|
{
|
|
@@ -181,7 +180,6 @@ rg_s_set_change_palette_hook(VALUE self)
|
|
|
181
180
|
(GtkColorSelectionChangePaletteWithScreenFunc)screen_func);
|
|
182
181
|
return self;
|
|
183
182
|
}
|
|
184
|
-
#endif
|
|
185
183
|
|
|
186
184
|
/* Don't implement them.
|
|
187
185
|
GtkColorSelectionChangePaletteFunc gtk_color_selection_set_change_palette_hook
|
|
@@ -207,9 +205,7 @@ Init_gtk_color_selection(VALUE mGtk)
|
|
|
207
205
|
RG_DEF_SMETHOD(palette_to_string, -1);
|
|
208
206
|
RG_DEF_SMETHOD(palette_from_string, 1);
|
|
209
207
|
|
|
210
|
-
#if GTK_CHECK_VERSION(2,2,0)
|
|
211
208
|
RG_DEF_SMETHOD(set_change_palette_hook, 0);
|
|
212
|
-
#endif
|
|
213
209
|
|
|
214
210
|
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
|
215
211
|
}
|
data/ext/gtk2/rbgtkcombobox.c
CHANGED
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
#include "global.h"
|
|
23
23
|
|
|
24
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
|
25
|
-
|
|
26
24
|
#define RG_TARGET_NAMESPACE cComboBox
|
|
27
25
|
#define _SELF(self) (GTK_COMBO_BOX(RVAL2GOBJ(self)))
|
|
28
26
|
#define RVAL2WIDGET(w) (GTK_WIDGET(RVAL2GOBJ(w)))
|
|
@@ -98,8 +96,6 @@ rg_remove_text(VALUE self, VALUE position)
|
|
|
98
96
|
return self;
|
|
99
97
|
}
|
|
100
98
|
|
|
101
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
102
|
-
|
|
103
99
|
static VALUE
|
|
104
100
|
rg_active_text(VALUE self)
|
|
105
101
|
{
|
|
@@ -136,13 +132,9 @@ rg_set_row_separator_func(VALUE self)
|
|
|
136
132
|
return self;
|
|
137
133
|
}
|
|
138
134
|
|
|
139
|
-
#endif
|
|
140
|
-
#endif
|
|
141
|
-
|
|
142
135
|
void
|
|
143
136
|
Init_gtk_combobox(VALUE mGtk)
|
|
144
137
|
{
|
|
145
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
|
146
138
|
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_COMBO_BOX, "ComboBox", mGtk);
|
|
147
139
|
|
|
148
140
|
RG_DEF_METHOD(initialize, -1);
|
|
@@ -153,11 +145,7 @@ Init_gtk_combobox(VALUE mGtk)
|
|
|
153
145
|
RG_DEF_METHOD(insert_text, 2);
|
|
154
146
|
RG_DEF_METHOD(prepend_text, 1);
|
|
155
147
|
RG_DEF_METHOD(remove_text, 1);
|
|
156
|
-
|
|
157
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
158
148
|
RG_DEF_METHOD(active_text, 0);
|
|
159
149
|
RG_DEF_METHOD(popup_accessible, 0);
|
|
160
150
|
RG_DEF_METHOD(set_row_separator_func, 0);
|
|
161
|
-
#endif
|
|
162
|
-
#endif
|
|
163
151
|
}
|
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
#include "global.h"
|
|
23
23
|
|
|
24
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
|
25
|
-
|
|
26
24
|
#define RG_TARGET_NAMESPACE cComboBoxEntry
|
|
27
25
|
|
|
28
26
|
static VALUE
|
|
@@ -50,13 +48,9 @@ rg_initialize(int argc, VALUE *argv, VALUE self)
|
|
|
50
48
|
return Qnil;
|
|
51
49
|
}
|
|
52
50
|
|
|
53
|
-
#endif
|
|
54
|
-
|
|
55
51
|
void
|
|
56
52
|
Init_gtk_comboboxentry(VALUE mGtk)
|
|
57
53
|
{
|
|
58
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
|
59
54
|
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_COMBO_BOX_ENTRY, "ComboBoxEntry", mGtk);
|
|
60
55
|
RG_DEF_METHOD(initialize, -1);
|
|
61
|
-
#endif
|
|
62
56
|
}
|
data/ext/gtk2/rbgtkconst.c
CHANGED
|
@@ -138,10 +138,8 @@ Init_gtk_const(VALUE mGtk)
|
|
|
138
138
|
G_DEF_CONSTANTS(mGtk, GTK_TYPE_RESPONSE_TYPE, "GTK_");
|
|
139
139
|
|
|
140
140
|
/* GtkScrollStep */
|
|
141
|
-
#if GTK_CHECK_VERSION(2,4,0)
|
|
142
141
|
G_DEF_CLASS(GTK_TYPE_SCROLL_STEP, "ScrollStep", mGtk);
|
|
143
142
|
G_DEF_CONSTANTS(mGtk, GTK_TYPE_SCROLL_STEP, "GTK_");
|
|
144
|
-
#endif
|
|
145
143
|
|
|
146
144
|
/* GtkScrollType */
|
|
147
145
|
G_DEF_CLASS(GTK_TYPE_SCROLL_TYPE, "ScrollType", mGtk);
|
data/ext/gtk2/rbgtkdialog.c
CHANGED
|
@@ -167,7 +167,6 @@ rg_set_response_sensitive(VALUE self, VALUE response_id, VALUE setting)
|
|
|
167
167
|
return self;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
171
170
|
static VALUE
|
|
172
171
|
rg_s_alternative_dialog_button_order_p(G_GNUC_UNUSED VALUE self, VALUE screen)
|
|
173
172
|
{
|
|
@@ -197,8 +196,6 @@ rg_set_alternative_button_order(VALUE self, VALUE rbnew_order)
|
|
|
197
196
|
return self;
|
|
198
197
|
}
|
|
199
198
|
|
|
200
|
-
#endif
|
|
201
|
-
|
|
202
199
|
static VALUE
|
|
203
200
|
rg_vbox(VALUE self)
|
|
204
201
|
{
|
|
@@ -211,13 +208,11 @@ rg_action_area(VALUE self)
|
|
|
211
208
|
return GOBJ2RVAL(_SELF(self)->action_area);
|
|
212
209
|
}
|
|
213
210
|
|
|
214
|
-
#if GTK_CHECK_VERSION(2,8,0)
|
|
215
211
|
static VALUE
|
|
216
212
|
rg_get_response(VALUE self, VALUE widget)
|
|
217
213
|
{
|
|
218
214
|
return INT2NUM(gtk_dialog_get_response_for_widget(_SELF(self), RVAL2GOBJ(widget)));
|
|
219
215
|
}
|
|
220
|
-
#endif
|
|
221
216
|
|
|
222
217
|
void
|
|
223
218
|
Init_gtk_dialog(VALUE mGtk)
|
|
@@ -235,19 +230,14 @@ Init_gtk_dialog(VALUE mGtk)
|
|
|
235
230
|
RG_DEF_METHOD(set_default_response, 1);
|
|
236
231
|
G_DEF_SETTER(RG_TARGET_NAMESPACE, "default_response");
|
|
237
232
|
|
|
238
|
-
#if GTK_CHECK_VERSION(2,6,0)
|
|
239
233
|
RG_DEF_SMETHOD_P(alternative_dialog_button_order, 1);
|
|
240
234
|
RG_DEF_METHOD(set_alternative_button_order, 1);
|
|
241
|
-
#endif
|
|
242
|
-
|
|
243
235
|
RG_DEF_METHOD(set_response_sensitive, 2);
|
|
244
236
|
RG_DEF_METHOD(vbox, 0);
|
|
245
237
|
RG_DEF_METHOD(action_area, 0);
|
|
246
238
|
|
|
247
|
-
#if GTK_CHECK_VERSION(2,8,0)
|
|
248
239
|
RG_DEF_METHOD(get_response, 1);
|
|
249
240
|
RG_DEF_ALIAS("get_response_for_widget", "get_response");
|
|
250
|
-
#endif
|
|
251
241
|
|
|
252
242
|
/* GtkDialogFlags */
|
|
253
243
|
G_DEF_CLASS(GTK_TYPE_DIALOG_FLAGS, "Flags", RG_TARGET_NAMESPACE);
|