gtk2 0.90.7 → 0.90.8
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +62 -0
- data/ext/gtk2/extconf.rb +2 -2
- data/ext/gtk2/rbgdk.c +30 -61
- data/ext/gtk2/rbgdkatom.c +6 -14
- data/ext/gtk2/rbgdkcairo.c +4 -8
- data/ext/gtk2/rbgdkcolor.c +11 -27
- data/ext/gtk2/rbgdkcolormap.c +8 -16
- data/ext/gtk2/rbgdkcursor.c +5 -12
- data/ext/gtk2/rbgdkdevice.c +16 -32
- data/ext/gtk2/rbgdkdisplay.c +49 -100
- data/ext/gtk2/rbgdkdisplaymanager.c +3 -6
- data/ext/gtk2/rbgdkdragcontext.c +21 -48
- data/ext/gtk2/rbgdkdraw.c +27 -60
- data/ext/gtk2/rbgdkevent.c +51 -113
- data/ext/gtk2/rbgdkgc.c +35 -70
- data/ext/gtk2/rbgdkgeometry.c +24 -50
- data/ext/gtk2/rbgdkimage.c +14 -28
- data/ext/gtk2/rbgdkinput.c +3 -8
- data/ext/gtk2/rbgdkkeymap.c +7 -14
- data/ext/gtk2/rbgdkkeyval.c +9 -18
- data/ext/gtk2/rbgdkpango.c +8 -18
- data/ext/gtk2/rbgdkpangorenderer.c +7 -18
- data/ext/gtk2/rbgdkpixbuf.c +5 -20
- data/ext/gtk2/rbgdkpixmap.c +9 -24
- data/ext/gtk2/rbgdkproperty.c +8 -28
- data/ext/gtk2/rbgdkrectangle.c +12 -24
- data/ext/gtk2/rbgdkregion.c +15 -33
- data/ext/gtk2/rbgdkrgb.c +11 -26
- data/ext/gtk2/rbgdkscreen.c +37 -78
- data/ext/gtk2/rbgdkselection.c +5 -16
- data/ext/gtk2/rbgdkthreads.c +4 -8
- data/ext/gtk2/rbgdktimecoord.c +5 -10
- data/ext/gtk2/rbgdkvisual.c +25 -50
- data/ext/gtk2/rbgdkwindow.c +102 -211
- data/ext/gtk2/rbgdkwindowattr.c +16 -32
- data/ext/gtk2/rbgdkx11.c +5 -12
- data/ext/gtk2/rbgtk.c +9 -10
- data/ext/gtk2/rbgtkaboutdialog.c +5 -12
- data/ext/gtk2/rbgtkaccelerator.c +6 -12
- data/ext/gtk2/rbgtkaccelgroup.c +14 -32
- data/ext/gtk2/rbgtkaccelgroupentry.c +4 -8
- data/ext/gtk2/rbgtkaccelkey.c +7 -14
- data/ext/gtk2/rbgtkaccellabel.c +3 -6
- data/ext/gtk2/rbgtkaccelmap.c +12 -28
- data/ext/gtk2/rbgtkaccessible.c +1 -2
- data/ext/gtk2/rbgtkaction.c +20 -42
- data/ext/gtk2/rbgtkactiongroup.c +15 -39
- data/ext/gtk2/rbgtkadjustment.c +14 -28
- data/ext/gtk2/rbgtkalignment.c +4 -8
- data/ext/gtk2/rbgtkallocation.c +13 -26
- data/ext/gtk2/rbgtkarrow.c +2 -4
- data/ext/gtk2/rbgtkaspectframe.c +2 -4
- data/ext/gtk2/rbgtkassistant.c +23 -47
- data/ext/gtk2/rbgtkbbox.c +2 -4
- data/ext/gtk2/rbgtkbin.c +1 -2
- data/ext/gtk2/rbgtkbindingset.c +8 -18
- data/ext/gtk2/rbgtkborder.c +4 -8
- data/ext/gtk2/rbgtkbox.c +8 -23
- data/ext/gtk2/rbgtkbutton.c +8 -18
- data/ext/gtk2/rbgtkcalendar.c +11 -24
- data/ext/gtk2/rbgtkcelleditable.c +3 -6
- data/ext/gtk2/rbgtkcelllayout.c +9 -22
- data/ext/gtk2/rbgtkcellrenderer.c +8 -19
- data/ext/gtk2/rbgtkcellrendereraccel.c +1 -2
- data/ext/gtk2/rbgtkcellrenderercombo.c +1 -2
- data/ext/gtk2/rbgtkcellrendererpixbuf.c +1 -2
- data/ext/gtk2/rbgtkcellrendererprogress.c +1 -2
- data/ext/gtk2/rbgtkcellrendererspin.c +1 -2
- data/ext/gtk2/rbgtkcellrendererspinner.c +35 -0
- data/ext/gtk2/rbgtkcellrenderertext.c +2 -4
- data/ext/gtk2/rbgtkcellrenderertoggle.c +1 -2
- data/ext/gtk2/rbgtkcellview.c +6 -14
- data/ext/gtk2/rbgtkcheckbutton.c +1 -4
- data/ext/gtk2/rbgtkcheckmenuitem.c +2 -6
- data/ext/gtk2/rbgtkclipboard.c +30 -75
- data/ext/gtk2/rbgtkcolorbutton.c +1 -4
- data/ext/gtk2/rbgtkcolorsel.c +10 -24
- data/ext/gtk2/rbgtkcolorselectiondialog.c +5 -12
- data/ext/gtk2/rbgtkcombo.c +7 -16
- data/ext/gtk2/rbgtkcombobox.c +14 -32
- data/ext/gtk2/rbgtkcomboboxentry.c +1 -4
- data/ext/gtk2/rbgtkcontainer.c +27 -70
- data/ext/gtk2/rbgtkcurve.c +6 -12
- data/ext/gtk2/rbgtkdialog.c +14 -32
- data/ext/gtk2/rbgtkdrag.c +31 -68
- data/ext/gtk2/rbgtkdrawingarea.c +1 -2
- data/ext/gtk2/rbgtkeditable.c +13 -26
- data/ext/gtk2/rbgtkentry.c +7 -14
- data/ext/gtk2/rbgtkentrycompletion.c +10 -23
- data/ext/gtk2/rbgtkeventbox.c +1 -2
- data/ext/gtk2/rbgtkexpander.c +1 -4
- data/ext/gtk2/rbgtkfilechooser.c +30 -60
- data/ext/gtk2/rbgtkfilechooserbutton.c +1 -4
- data/ext/gtk2/rbgtkfilechooserdialog.c +1 -4
- data/ext/gtk2/rbgtkfilechooserwidget.c +1 -4
- data/ext/gtk2/rbgtkfilefilter.c +10 -21
- data/ext/gtk2/rbgtkfilesel.c +14 -30
- data/ext/gtk2/rbgtkfixed.c +5 -10
- data/ext/gtk2/rbgtkfontbutton.c +1 -4
- data/ext/gtk2/rbgtkfontselection.c +1 -2
- data/ext/gtk2/rbgtkfontselectiondialog.c +9 -20
- data/ext/gtk2/rbgtkframe.c +3 -8
- data/ext/gtk2/rbgtkgamma.c +3 -6
- data/ext/gtk2/rbgtkhandlebox.c +2 -4
- data/ext/gtk2/rbgtkhbbox.c +1 -2
- data/ext/gtk2/rbgtkhbox.c +1 -4
- data/ext/gtk2/rbgtkhpaned.c +1 -2
- data/ext/gtk2/rbgtkhruler.c +1 -2
- data/ext/gtk2/rbgtkhscale.c +1 -4
- data/ext/gtk2/rbgtkhscrollbar.c +1 -4
- data/ext/gtk2/rbgtkhseparator.c +1 -2
- data/ext/gtk2/rbgtkiconfactory.c +6 -12
- data/ext/gtk2/rbgtkiconinfo.c +8 -16
- data/ext/gtk2/rbgtkiconset.c +4 -12
- data/ext/gtk2/rbgtkiconsize.c +6 -12
- data/ext/gtk2/rbgtkiconsource.c +17 -34
- data/ext/gtk2/rbgtkicontheme.c +16 -32
- data/ext/gtk2/rbgtkiconview.c +23 -50
- data/ext/gtk2/rbgtkimage.c +3 -10
- data/ext/gtk2/rbgtkimagemenuitem.c +1 -4
- data/ext/gtk2/rbgtkimcontext.c +11 -22
- data/ext/gtk2/rbgtkimcontextsimple.c +2 -4
- data/ext/gtk2/rbgtkimmulticontext.c +2 -4
- data/ext/gtk2/rbgtkinputdialog.c +1 -2
- data/ext/gtk2/rbgtkinvisible.c +3 -8
- data/ext/gtk2/rbgtkitem.c +3 -6
- data/ext/gtk2/rbgtkitemfactory.c +13 -34
- data/ext/gtk2/rbgtklabel.c +10 -26
- data/ext/gtk2/rbgtklayout.c +6 -14
- data/ext/gtk2/rbgtklinkbutton.c +3 -10
- data/ext/gtk2/rbgtkliststore.c +15 -36
- data/ext/gtk2/rbgtkmain.c +32 -68
- data/ext/gtk2/rbgtkmenu.c +21 -46
- data/ext/gtk2/rbgtkmenubar.c +1 -2
- data/ext/gtk2/rbgtkmenuitem.c +12 -26
- data/ext/gtk2/rbgtkmenushell.c +9 -18
- data/ext/gtk2/rbgtkmenutoolbutton.c +2 -8
- data/ext/gtk2/rbgtkmessagedialog.c +4 -10
- data/ext/gtk2/rbgtkmisc.c +4 -8
- data/ext/gtk2/rbgtknotebook.c +53 -79
- data/ext/gtk2/rbgtkobject.c +7 -14
- data/ext/gtk2/rbgtkoptionmenu.c +4 -8
- data/ext/gtk2/rbgtkpaned.c +10 -20
- data/ext/gtk2/rbgtkplug.c +3 -8
- data/ext/gtk2/rbgtkprintsettings.c +1 -4
- data/ext/gtk2/rbgtkprogressbar.c +2 -4
- data/ext/gtk2/rbgtkradioaction.c +4 -8
- data/ext/gtk2/rbgtkradiobutton.c +3 -8
- data/ext/gtk2/rbgtkradiomenuitem.c +4 -10
- data/ext/gtk2/rbgtkradiotoolbutton.c +3 -8
- data/ext/gtk2/rbgtkrange.c +4 -8
- data/ext/gtk2/rbgtkrc.c +16 -34
- data/ext/gtk2/rbgtkrcstyle.c +13 -26
- data/ext/gtk2/rbgtkrecentaction.c +1 -4
- data/ext/gtk2/rbgtkrecentchooser.c +18 -38
- data/ext/gtk2/rbgtkrecentchooserdialog.c +1 -4
- data/ext/gtk2/rbgtkrecentchoosermenu.c +1 -4
- data/ext/gtk2/rbgtkrecentchooserwidget.c +1 -4
- data/ext/gtk2/rbgtkrecentdata.c +7 -14
- data/ext/gtk2/rbgtkrecentfilter.c +14 -29
- data/ext/gtk2/rbgtkrecentfilterinfo.c +11 -22
- data/ext/gtk2/rbgtkrecentinfo.c +21 -42
- data/ext/gtk2/rbgtkrecentmanager.c +11 -24
- data/ext/gtk2/rbgtkruler.c +6 -12
- data/ext/gtk2/rbgtkscale.c +2 -4
- data/ext/gtk2/rbgtkscalebutton.c +6 -14
- data/ext/gtk2/rbgtkscrolledwindow.c +9 -20
- data/ext/gtk2/rbgtkselection.c +10 -22
- data/ext/gtk2/rbgtkselectiondata.c +19 -41
- data/ext/gtk2/rbgtkseparatormenuitem.c +1 -2
- data/ext/gtk2/rbgtkseparatortoolitem.c +1 -2
- data/ext/gtk2/rbgtksettings.c +10 -22
- data/ext/gtk2/rbgtksizegroup.c +4 -8
- data/ext/gtk2/rbgtksocket.c +4 -8
- data/ext/gtk2/rbgtkspinbutton.c +9 -20
- data/ext/gtk2/rbgtkspinner.c +51 -0
- data/ext/gtk2/rbgtkstatusbar.c +7 -14
- data/ext/gtk2/rbgtkstatusicon.c +5 -10
- data/ext/gtk2/rbgtkstock.c +5 -13
- data/ext/gtk2/rbgtkstyle.c +51 -139
- data/ext/gtk2/rbgtktable.c +14 -33
- data/ext/gtk2/rbgtktargetlist.c +9 -18
- data/ext/gtk2/rbgtktearoffmenuitem.c +1 -2
- data/ext/gtk2/rbgtktextappearance.c +11 -22
- data/ext/gtk2/rbgtktextattributes.c +16 -32
- data/ext/gtk2/rbgtktextbuffer.c +69 -162
- data/ext/gtk2/rbgtktextchild.c +3 -8
- data/ext/gtk2/rbgtktextiter.c +34 -81
- data/ext/gtk2/rbgtktextmark.c +7 -14
- data/ext/gtk2/rbgtktexttag.c +4 -10
- data/ext/gtk2/rbgtktexttagtable.c +7 -15
- data/ext/gtk2/rbgtktextview.c +30 -62
- data/ext/gtk2/rbgtktoggleaction.c +4 -8
- data/ext/gtk2/rbgtktogglebutton.c +4 -10
- data/ext/gtk2/rbgtktoggletoolbutton.c +3 -8
- data/ext/gtk2/rbgtktoolbar.c +20 -46
- data/ext/gtk2/rbgtktoolbutton.c +1 -4
- data/ext/gtk2/rbgtktoolitem.c +16 -34
- data/ext/gtk2/rbgtktooltip.c +5 -10
- data/ext/gtk2/rbgtktooltips.c +7 -14
- data/ext/gtk2/rbgtktreeiter.c +14 -29
- data/ext/gtk2/rbgtktreemodel.c +16 -37
- data/ext/gtk2/rbgtktreemodelfilter.c +13 -36
- data/ext/gtk2/rbgtktreemodelsort.c +8 -16
- data/ext/gtk2/rbgtktreepath.c +13 -28
- data/ext/gtk2/rbgtktreerowreference.c +9 -20
- data/ext/gtk2/rbgtktreeselection.c +20 -47
- data/ext/gtk2/rbgtktreesortable.c +7 -18
- data/ext/gtk2/rbgtktreestore.c +17 -40
- data/ext/gtk2/rbgtktreeview.c +58 -138
- data/ext/gtk2/rbgtktreeviewcolumn.c +20 -46
- data/ext/gtk2/rbgtkuimanager.c +12 -26
- data/ext/gtk2/rbgtkvbbox.c +1 -2
- data/ext/gtk2/rbgtkvbox.c +1 -4
- data/ext/gtk2/rbgtkviewport.c +1 -2
- data/ext/gtk2/rbgtkvolumebutton.c +1 -2
- data/ext/gtk2/rbgtkvpaned.c +1 -2
- data/ext/gtk2/rbgtkvruler.c +1 -2
- data/ext/gtk2/rbgtkvscale.c +1 -4
- data/ext/gtk2/rbgtkvscrollbar.c +1 -4
- data/ext/gtk2/rbgtkvseparator.c +1 -2
- data/ext/gtk2/rbgtkwidget.c +126 -264
- data/ext/gtk2/rbgtkwindow.c +69 -142
- data/ext/gtk2/rbgtkwindowgroup.c +3 -6
- data/lib/gtk2/base.rb +1 -2
- data/sample/gtk-demo/main.rb +2 -0
- data/sample/gtk-demo/textview.rb +1 -0
- metadata +15 -17
- data/ext/gtk2/Makefile +0 -169
- data/ext/gtk2/rbgdkkeysyms.h +0 -2174
- data/ext/gtk2/rbgtkinits.c +0 -473
- data/ext/gtk2/ruby-gtk2.pc +0 -3
@@ -42,8 +42,7 @@ struct _GtkAccelGroupEntry
|
|
42
42
|
};
|
43
43
|
*/
|
44
44
|
static VALUE
|
45
|
-
agentry_initialize(self)
|
46
|
-
VALUE self;
|
45
|
+
agentry_initialize(VALUE self)
|
47
46
|
{
|
48
47
|
GtkAccelGroupEntry key;
|
49
48
|
G_INITIALIZE(self, &key);
|
@@ -51,22 +50,19 @@ agentry_initialize(self)
|
|
51
50
|
}
|
52
51
|
|
53
52
|
static VALUE
|
54
|
-
agentry_get_accel_key(self)
|
55
|
-
VALUE self;
|
53
|
+
agentry_get_accel_key(VALUE self)
|
56
54
|
{
|
57
55
|
return BOXED2RVAL(&_SELF(self)->key, GTK_TYPE_ACCEL_KEY);
|
58
56
|
}
|
59
57
|
|
60
58
|
static VALUE
|
61
|
-
agentry_get_closure(self)
|
62
|
-
VALUE self;
|
59
|
+
agentry_get_closure(VALUE self)
|
63
60
|
{
|
64
61
|
return BOXED2RVAL(_SELF(self)->closure, G_TYPE_CLOSURE);
|
65
62
|
}
|
66
63
|
|
67
64
|
static VALUE
|
68
|
-
agentry_get_accel_path(self)
|
69
|
-
VALUE self;
|
65
|
+
agentry_get_accel_path(VALUE self)
|
70
66
|
{
|
71
67
|
const gchar *quark_str = g_quark_to_string(_SELF(self)->accel_path_quark);
|
72
68
|
return quark_str ? CSTR2RVAL(quark_str) : Qnil;
|
data/ext/gtk2/rbgtkaccelkey.c
CHANGED
@@ -44,8 +44,7 @@ struct _GtkAccelKey
|
|
44
44
|
*/
|
45
45
|
|
46
46
|
static VALUE
|
47
|
-
accel_key_initialize(self)
|
48
|
-
VALUE self;
|
47
|
+
accel_key_initialize(VALUE self)
|
49
48
|
{
|
50
49
|
GtkAccelKey key;
|
51
50
|
G_INITIALIZE(self, &key);
|
@@ -53,45 +52,39 @@ accel_key_initialize(self)
|
|
53
52
|
}
|
54
53
|
|
55
54
|
static VALUE
|
56
|
-
accel_key_get_key(self)
|
57
|
-
VALUE self;
|
55
|
+
accel_key_get_key(VALUE self)
|
58
56
|
{
|
59
57
|
return UINT2NUM(_SELF(self)->accel_key);
|
60
58
|
}
|
61
59
|
|
62
60
|
static VALUE
|
63
|
-
accel_key_get_mods(self)
|
64
|
-
VALUE self;
|
61
|
+
accel_key_get_mods(VALUE self)
|
65
62
|
{
|
66
63
|
return GFLAGS2RVAL(_SELF(self)->accel_mods, GDK_TYPE_MODIFIER_TYPE);
|
67
64
|
}
|
68
65
|
|
69
66
|
static VALUE
|
70
|
-
accel_key_get_flags(self)
|
71
|
-
VALUE self;
|
67
|
+
accel_key_get_flags(VALUE self)
|
72
68
|
{
|
73
69
|
return INT2FIX(_SELF(self)->accel_flags);
|
74
70
|
}
|
75
71
|
|
76
72
|
static VALUE
|
77
|
-
accel_key_set_key(self, key)
|
78
|
-
VALUE self, key;
|
73
|
+
accel_key_set_key(VALUE self, VALUE key)
|
79
74
|
{
|
80
75
|
_SELF(self)->accel_key = NUM2UINT(key);
|
81
76
|
return self;
|
82
77
|
}
|
83
78
|
|
84
79
|
static VALUE
|
85
|
-
accel_key_set_mods(self, mods)
|
86
|
-
VALUE self, mods;
|
80
|
+
accel_key_set_mods(VALUE self, VALUE mods)
|
87
81
|
{
|
88
82
|
_SELF(self)->accel_mods = RVAL2GFLAGS(mods, GDK_TYPE_MODIFIER_TYPE);
|
89
83
|
return self;
|
90
84
|
}
|
91
85
|
|
92
86
|
static VALUE
|
93
|
-
accel_key_set_flags(self, flags)
|
94
|
-
VALUE self, flags;
|
87
|
+
accel_key_set_flags(VALUE self, VALUE flags)
|
95
88
|
{
|
96
89
|
_SELF(self)->accel_flags = FIX2INT(flags);
|
97
90
|
return self;
|
data/ext/gtk2/rbgtkaccellabel.c
CHANGED
@@ -13,23 +13,20 @@
|
|
13
13
|
#include "global.h"
|
14
14
|
|
15
15
|
static VALUE
|
16
|
-
alabel_initialize(self, string)
|
17
|
-
VALUE self, string;
|
16
|
+
alabel_initialize(VALUE self, VALUE string)
|
18
17
|
{
|
19
18
|
RBGTK_INITIALIZE(self, gtk_accel_label_new(RVAL2CSTR(string)));
|
20
19
|
return Qnil;
|
21
20
|
}
|
22
21
|
|
23
22
|
static VALUE
|
24
|
-
alabel_get_accel_width(self)
|
25
|
-
VALUE self;
|
23
|
+
alabel_get_accel_width(VALUE self)
|
26
24
|
{
|
27
25
|
return INT2NUM(gtk_accel_label_get_accel_width(GTK_ACCEL_LABEL(RVAL2GOBJ(self))));
|
28
26
|
}
|
29
27
|
|
30
28
|
static VALUE
|
31
|
-
alabel_refetch(self)
|
32
|
-
VALUE self;
|
29
|
+
alabel_refetch(VALUE self)
|
33
30
|
{
|
34
31
|
gtk_accel_label_refetch(GTK_ACCEL_LABEL(RVAL2GOBJ(self)));
|
35
32
|
return Qfalse; // always returns false
|
data/ext/gtk2/rbgtkaccelmap.c
CHANGED
@@ -13,16 +13,14 @@
|
|
13
13
|
#define RVAL2MOD(mods) (NIL_P(mods) ? 0 : RVAL2GFLAGS(mods, GDK_TYPE_MODIFIER_TYPE))
|
14
14
|
|
15
15
|
static VALUE
|
16
|
-
accel_map_add_entry(self, path, key, mods)
|
17
|
-
VALUE self, path, key, mods;
|
16
|
+
accel_map_add_entry(VALUE self, VALUE path, VALUE key, VALUE mods)
|
18
17
|
{
|
19
18
|
gtk_accel_map_add_entry(RVAL2CSTR(path), NUM2UINT(key), RVAL2MOD(mods));
|
20
19
|
return self;
|
21
20
|
}
|
22
21
|
|
23
22
|
static VALUE
|
24
|
-
accel_map_lookup_entry(self, path)
|
25
|
-
VALUE self, path;
|
23
|
+
accel_map_lookup_entry(VALUE self, VALUE path)
|
26
24
|
{
|
27
25
|
GtkAccelKey key;
|
28
26
|
if(gtk_accel_map_lookup_entry(RVAL2CSTR(path), &key))
|
@@ -32,44 +30,35 @@ accel_map_lookup_entry(self, path)
|
|
32
30
|
}
|
33
31
|
|
34
32
|
static VALUE
|
35
|
-
accel_map_change_entry(self, path, key, mods, replace)
|
36
|
-
VALUE self, path, key, mods, replace;
|
33
|
+
accel_map_change_entry(VALUE self, VALUE path, VALUE key, VALUE mods, VALUE replace)
|
37
34
|
{
|
38
35
|
return CBOOL2RVAL(gtk_accel_map_change_entry(RVAL2CSTR(path), NUM2UINT(key),
|
39
36
|
RVAL2MOD(mods), RVAL2CBOOL(replace)));
|
40
37
|
}
|
41
38
|
|
42
39
|
static VALUE
|
43
|
-
accel_map_load(self, filename)
|
44
|
-
VALUE self, filename;
|
40
|
+
accel_map_load(VALUE self, VALUE filename)
|
45
41
|
{
|
46
42
|
gtk_accel_map_load(RVAL2CSTR(filename));
|
47
43
|
return self;
|
48
44
|
}
|
49
45
|
|
50
46
|
static VALUE
|
51
|
-
accel_map_save(self, filename)
|
52
|
-
VALUE self, filename;
|
47
|
+
accel_map_save(VALUE self, VALUE filename)
|
53
48
|
{
|
54
49
|
gtk_accel_map_save(RVAL2CSTR(filename));
|
55
50
|
return self;
|
56
51
|
}
|
57
52
|
|
58
53
|
static VALUE
|
59
|
-
accel_map_add_filter(self, pattern)
|
60
|
-
VALUE self, pattern;
|
54
|
+
accel_map_add_filter(VALUE self, VALUE pattern)
|
61
55
|
{
|
62
56
|
gtk_accel_map_add_filter(RVAL2CSTR(pattern));
|
63
57
|
return self;
|
64
58
|
}
|
65
59
|
|
66
60
|
static void
|
67
|
-
accel_map_foreach_func(func, path, key, mods, changed)
|
68
|
-
gpointer func;
|
69
|
-
const gchar *path;
|
70
|
-
guint key;
|
71
|
-
GdkModifierType mods;
|
72
|
-
gboolean changed;
|
61
|
+
accel_map_foreach_func(gpointer func, const gchar *path, guint key, GdkModifierType mods, gboolean changed)
|
73
62
|
{
|
74
63
|
rb_funcall((VALUE)func, id_call, 4,
|
75
64
|
CSTR2RVAL(path), UINT2NUM(key), GFLAGS2RVAL(mods, GDK_TYPE_MODIFIER_TYPE),
|
@@ -77,8 +66,7 @@ accel_map_foreach_func(func, path, key, mods, changed)
|
|
77
66
|
}
|
78
67
|
|
79
68
|
static VALUE
|
80
|
-
accel_map_foreach(self)
|
81
|
-
VALUE self;
|
69
|
+
accel_map_foreach(VALUE self)
|
82
70
|
{
|
83
71
|
volatile VALUE func = rb_block_proc();
|
84
72
|
gtk_accel_map_foreach((gpointer)func,
|
@@ -87,8 +75,7 @@ accel_map_foreach(self)
|
|
87
75
|
}
|
88
76
|
|
89
77
|
static VALUE
|
90
|
-
accel_map_foreach_unfilterd(self)
|
91
|
-
VALUE self;
|
78
|
+
accel_map_foreach_unfilterd(VALUE self)
|
92
79
|
{
|
93
80
|
volatile VALUE func = rb_block_proc();
|
94
81
|
gtk_accel_map_foreach_unfiltered((gpointer)func,
|
@@ -107,23 +94,20 @@ void gtk_accel_map_save_fd (gint fd);
|
|
107
94
|
|
108
95
|
#if GTK_CHECK_VERSION(2,4,0)
|
109
96
|
static VALUE
|
110
|
-
accel_map_get(self)
|
111
|
-
VALUE self;
|
97
|
+
accel_map_get(VALUE self)
|
112
98
|
{
|
113
99
|
return GOBJ2RVAL(gtk_accel_map_get());
|
114
100
|
}
|
115
101
|
|
116
102
|
static VALUE
|
117
|
-
accel_map_lock_path(self, accel_path)
|
118
|
-
VALUE self, accel_path;
|
103
|
+
accel_map_lock_path(VALUE self, VALUE accel_path)
|
119
104
|
{
|
120
105
|
gtk_accel_map_lock_path(RVAL2CSTR(accel_path));
|
121
106
|
return self;
|
122
107
|
}
|
123
108
|
|
124
109
|
static VALUE
|
125
|
-
accel_map_unlock_path(self, accel_path)
|
126
|
-
VALUE self, accel_path;
|
110
|
+
accel_map_unlock_path(VALUE self, VALUE accel_path)
|
127
111
|
{
|
128
112
|
gtk_accel_map_unlock_path(RVAL2CSTR(accel_path));
|
129
113
|
return self;
|
data/ext/gtk2/rbgtkaccessible.c
CHANGED
data/ext/gtk2/rbgtkaction.c
CHANGED
@@ -17,10 +17,7 @@
|
|
17
17
|
#define RVAL2WIDGET(w) (GTK_WIDGET(RVAL2GOBJ(w)))
|
18
18
|
|
19
19
|
static VALUE
|
20
|
-
action_initialize(argc, argv, self)
|
21
|
-
int argc;
|
22
|
-
VALUE *argv;
|
23
|
-
VALUE self;
|
20
|
+
action_initialize(int argc, VALUE *argv, VALUE self)
|
24
21
|
{
|
25
22
|
VALUE name, label, tooltip, stock_id;
|
26
23
|
const gchar *stock = NULL;
|
@@ -40,15 +37,13 @@ action_initialize(argc, argv, self)
|
|
40
37
|
}
|
41
38
|
|
42
39
|
static VALUE
|
43
|
-
action_is_sensitive(self)
|
44
|
-
VALUE self;
|
40
|
+
action_is_sensitive(VALUE self)
|
45
41
|
{
|
46
42
|
return CBOOL2RVAL(gtk_action_is_sensitive(_SELF(self)));
|
47
43
|
}
|
48
44
|
|
49
45
|
static VALUE
|
50
|
-
action_is_visible(self)
|
51
|
-
VALUE self;
|
46
|
+
action_is_visible(VALUE self)
|
52
47
|
{
|
53
48
|
return CBOOL2RVAL(gtk_action_is_visible(_SELF(self)));
|
54
49
|
}
|
@@ -60,24 +55,21 @@ gboolean gtk_action_get_visible (GtkAction *action);
|
|
60
55
|
*/
|
61
56
|
|
62
57
|
static VALUE
|
63
|
-
action_activate(self)
|
64
|
-
VALUE self;
|
58
|
+
action_activate(VALUE self)
|
65
59
|
{
|
66
60
|
gtk_action_activate(_SELF(self));
|
67
61
|
return self;
|
68
62
|
}
|
69
63
|
|
70
64
|
static VALUE
|
71
|
-
action_create_icon(self, icon_size)
|
72
|
-
VALUE self, icon_size;
|
65
|
+
action_create_icon(VALUE self, VALUE icon_size)
|
73
66
|
{
|
74
67
|
return GOBJ2RVAL(gtk_action_create_icon(_SELF(self),
|
75
68
|
RVAL2GENUM(icon_size, GTK_TYPE_ICON_SIZE)));
|
76
69
|
}
|
77
70
|
|
78
71
|
static VALUE
|
79
|
-
action_create_menu_item(self)
|
80
|
-
VALUE self;
|
72
|
+
action_create_menu_item(VALUE self)
|
81
73
|
{
|
82
74
|
return GOBJ2RVAL(gtk_action_create_menu_item(_SELF(self)));
|
83
75
|
}
|
@@ -91,78 +83,68 @@ action_create_menu(VALUE self)
|
|
91
83
|
#endif
|
92
84
|
|
93
85
|
static VALUE
|
94
|
-
action_create_tool_item(self)
|
95
|
-
VALUE self;
|
86
|
+
action_create_tool_item(VALUE self)
|
96
87
|
{
|
97
88
|
return GOBJ2RVAL(gtk_action_create_tool_item(_SELF(self)));
|
98
89
|
}
|
99
90
|
|
100
91
|
static VALUE
|
101
|
-
action_connect_proxy(self, proxy)
|
102
|
-
VALUE self, proxy;
|
92
|
+
action_connect_proxy(VALUE self, VALUE proxy)
|
103
93
|
{
|
104
94
|
gtk_action_connect_proxy(_SELF(self), RVAL2WIDGET(proxy));
|
105
95
|
return self;
|
106
96
|
}
|
107
97
|
|
108
98
|
static VALUE
|
109
|
-
action_disconnect_proxy(self, proxy)
|
110
|
-
VALUE self, proxy;
|
99
|
+
action_disconnect_proxy(VALUE self, VALUE proxy)
|
111
100
|
{
|
112
101
|
gtk_action_disconnect_proxy(_SELF(self), RVAL2WIDGET(proxy));
|
113
102
|
return self;
|
114
103
|
}
|
115
104
|
|
116
105
|
static VALUE
|
117
|
-
action_get_proxies(self)
|
118
|
-
VALUE self;
|
106
|
+
action_get_proxies(VALUE self)
|
119
107
|
{
|
120
108
|
/* Owned by GTK+ */
|
121
109
|
return GSLIST2ARY(gtk_action_get_proxies(_SELF(self)));
|
122
110
|
}
|
123
111
|
|
124
112
|
static VALUE
|
125
|
-
action_connect_accelerator(self)
|
126
|
-
VALUE self;
|
113
|
+
action_connect_accelerator(VALUE self)
|
127
114
|
{
|
128
115
|
gtk_action_connect_accelerator(_SELF(self));
|
129
116
|
return self;
|
130
117
|
}
|
131
118
|
|
132
119
|
static VALUE
|
133
|
-
action_disconnect_accelerator(self)
|
134
|
-
VALUE self;
|
120
|
+
action_disconnect_accelerator(VALUE self)
|
135
121
|
{
|
136
122
|
gtk_action_disconnect_accelerator(_SELF(self));
|
137
123
|
return self;
|
138
124
|
}
|
139
125
|
|
140
126
|
static VALUE
|
141
|
-
action_block_activate_from(self, proxy)
|
142
|
-
VALUE self, proxy;
|
127
|
+
action_block_activate_from(VALUE self, VALUE proxy)
|
143
128
|
{
|
144
129
|
gtk_action_block_activate_from(_SELF(self), RVAL2WIDGET(proxy));
|
145
130
|
return self;
|
146
131
|
}
|
147
132
|
|
148
133
|
static VALUE
|
149
|
-
action_unblock_activate_from(self, proxy)
|
150
|
-
VALUE self, proxy;
|
134
|
+
action_unblock_activate_from(VALUE self, VALUE proxy)
|
151
135
|
{
|
152
136
|
gtk_action_unblock_activate_from(_SELF(self), RVAL2WIDGET(proxy));
|
153
137
|
return self;
|
154
138
|
}
|
155
139
|
|
156
140
|
static VALUE
|
157
|
-
action_set_accel_path(self, accel_path)
|
158
|
-
VALUE self, accel_path;
|
141
|
+
action_set_accel_path(VALUE self, VALUE accel_path)
|
159
142
|
{
|
160
143
|
gtk_action_set_accel_path(_SELF(self), RVAL2CSTR(accel_path));
|
161
144
|
return self;
|
162
145
|
}
|
163
146
|
static VALUE
|
164
|
-
action_set_accel_group(self, accel_group)
|
165
|
-
VALUE self, accel_group;
|
147
|
+
action_set_accel_group(VALUE self, VALUE accel_group)
|
166
148
|
{
|
167
149
|
gtk_action_set_accel_group(_SELF(self), RVAL2GOBJ(accel_group));
|
168
150
|
return self;
|
@@ -174,8 +156,7 @@ action_set_accel_group(self, accel_group)
|
|
174
156
|
Use GLib::Object#set_property("sensitive", val) instead.
|
175
157
|
*/
|
176
158
|
static VALUE
|
177
|
-
action_set_sensitive(self, sensitive)
|
178
|
-
VALUE self, sensitive;
|
159
|
+
action_set_sensitive(VALUE self, VALUE sensitive)
|
179
160
|
{
|
180
161
|
gtk_action_set_sensitive(_SELF(self), RVAL2CBOOL(sensitive));
|
181
162
|
return self;
|
@@ -186,16 +167,14 @@ action_set_sensitive(self, sensitive)
|
|
186
167
|
Use GLib::Object#set_property("visible", val) instead.
|
187
168
|
*/
|
188
169
|
static VALUE
|
189
|
-
action_set_visible(self, visible)
|
190
|
-
VALUE self, visible;
|
170
|
+
action_set_visible(VALUE self, VALUE visible)
|
191
171
|
{
|
192
172
|
gtk_action_set_visible(_SELF(self), RVAL2CBOOL(visible));
|
193
173
|
return self;
|
194
174
|
}
|
195
175
|
|
196
176
|
static VALUE
|
197
|
-
action_get_accel_path(self)
|
198
|
-
VALUE self;
|
177
|
+
action_get_accel_path(VALUE self)
|
199
178
|
{
|
200
179
|
return CSTR2RVAL(gtk_action_get_accel_path(_SELF(self)));
|
201
180
|
}
|
@@ -203,8 +182,7 @@ action_get_accel_path(self)
|
|
203
182
|
|
204
183
|
#if GTK_CHECK_VERSION(2,8,0)
|
205
184
|
static VALUE
|
206
|
-
action_get_accel_closure(self)
|
207
|
-
VALUE self;
|
185
|
+
action_get_accel_closure(VALUE self)
|
208
186
|
{
|
209
187
|
return BOXED2RVAL(gtk_action_get_accel_closure(_SELF(self)), G_TYPE_CLOSURE);
|
210
188
|
}
|
data/ext/gtk2/rbgtkactiongroup.c
CHANGED
@@ -20,8 +20,7 @@ static ID id_toggle_action_procs;
|
|
20
20
|
#define RVAL2WIDGET(w) (GTK_WIDGET(RVAL2GOBJ(w)))
|
21
21
|
|
22
22
|
static VALUE
|
23
|
-
actiongroup_initialize(self, name)
|
24
|
-
VALUE self, name;
|
23
|
+
actiongroup_initialize(VALUE self, VALUE name)
|
25
24
|
{
|
26
25
|
G_INITIALIZE(self, gtk_action_group_new(RVAL2CSTR(name)));
|
27
26
|
return Qnil;
|
@@ -38,24 +37,19 @@ void gtk_action_group_set_visible (GtkActionGroup *action_group,
|
|
38
37
|
*/
|
39
38
|
|
40
39
|
static VALUE
|
41
|
-
actiongroup_get_action(self, action_name)
|
42
|
-
VALUE self, action_name;
|
40
|
+
actiongroup_get_action(VALUE self, VALUE action_name)
|
43
41
|
{
|
44
42
|
return GOBJ2RVAL(gtk_action_group_get_action(_SELF(self), RVAL2CSTR(action_name)));
|
45
43
|
}
|
46
44
|
|
47
45
|
static VALUE
|
48
|
-
actiongroup_list_actions(self)
|
49
|
-
VALUE self;
|
46
|
+
actiongroup_list_actions(VALUE self)
|
50
47
|
{
|
51
48
|
return GLIST2ARYF(gtk_action_group_list_actions(_SELF(self)));
|
52
49
|
}
|
53
50
|
|
54
51
|
static VALUE
|
55
|
-
actiongroup_add_action(argc, argv, self)
|
56
|
-
int argc;
|
57
|
-
VALUE* argv;
|
58
|
-
VALUE self;
|
52
|
+
actiongroup_add_action(int argc, VALUE *argv, VALUE self)
|
59
53
|
{
|
60
54
|
VALUE action, accelerator;
|
61
55
|
|
@@ -70,8 +64,7 @@ actiongroup_add_action(argc, argv, self)
|
|
70
64
|
}
|
71
65
|
|
72
66
|
static VALUE
|
73
|
-
actiongroup_remove_action(self, action)
|
74
|
-
VALUE self, action;
|
67
|
+
actiongroup_remove_action(VALUE self, VALUE action)
|
75
68
|
{
|
76
69
|
gtk_action_group_remove_action(_SELF(self), GTK_ACTION(RVAL2GOBJ(action)));
|
77
70
|
G_CHILD_REMOVE(self, action);
|
@@ -79,9 +72,7 @@ actiongroup_remove_action(self, action)
|
|
79
72
|
}
|
80
73
|
|
81
74
|
static void
|
82
|
-
activate_action(action, self)
|
83
|
-
GtkAction* action;
|
84
|
-
VALUE self;
|
75
|
+
activate_action(GtkAction *action, VALUE self)
|
85
76
|
{
|
86
77
|
VALUE action_procs = rb_ivar_get(self, id_action_procs);
|
87
78
|
VALUE proc = rb_hash_aref(action_procs, CSTR2RVAL(gtk_action_get_name(action)));
|
@@ -90,8 +81,7 @@ activate_action(action, self)
|
|
90
81
|
}
|
91
82
|
|
92
83
|
static VALUE
|
93
|
-
actiongroup_add_actions(self, entries)
|
94
|
-
VALUE self, entries;
|
84
|
+
actiongroup_add_actions(VALUE self, VALUE entries)
|
95
85
|
{
|
96
86
|
int i;
|
97
87
|
VALUE action_procs;
|
@@ -148,9 +138,7 @@ actiongroup_add_actions(self, entries)
|
|
148
138
|
}
|
149
139
|
|
150
140
|
static void
|
151
|
-
activate_toggle_action(action, self)
|
152
|
-
GtkAction* action;
|
153
|
-
VALUE self;
|
141
|
+
activate_toggle_action(GtkAction *action, VALUE self)
|
154
142
|
{
|
155
143
|
VALUE action_procs = rb_ivar_get(self, id_toggle_action_procs);
|
156
144
|
VALUE proc = rb_hash_aref(action_procs, CSTR2RVAL(gtk_action_get_name(action)));
|
@@ -159,8 +147,7 @@ activate_toggle_action(action, self)
|
|
159
147
|
}
|
160
148
|
|
161
149
|
static VALUE
|
162
|
-
actiongroup_add_toggle_actions(self, entries)
|
163
|
-
VALUE self, entries;
|
150
|
+
actiongroup_add_toggle_actions(VALUE self, VALUE entries)
|
164
151
|
{
|
165
152
|
int i;
|
166
153
|
VALUE toggle_action_procs;
|
@@ -219,20 +206,14 @@ actiongroup_add_toggle_actions(self, entries)
|
|
219
206
|
}
|
220
207
|
|
221
208
|
static void
|
222
|
-
activate_radio_action(action, current, func)
|
223
|
-
GtkAction* action;
|
224
|
-
GtkRadioAction* current;
|
225
|
-
VALUE func;
|
209
|
+
activate_radio_action(GtkAction *action, GtkRadioAction *current, VALUE func)
|
226
210
|
{
|
227
211
|
if (! NIL_P(func))
|
228
212
|
rb_funcall(func, id_call, 2, GOBJ2RVAL(action), GOBJ2RVAL(current));
|
229
213
|
}
|
230
214
|
|
231
215
|
static VALUE
|
232
|
-
actiongroup_add_radio_actions(argc, argv, self)
|
233
|
-
int argc;
|
234
|
-
VALUE* argv;
|
235
|
-
VALUE self;
|
216
|
+
actiongroup_add_radio_actions(int argc, VALUE *argv, VALUE self)
|
236
217
|
{
|
237
218
|
VALUE entries, value, proc;
|
238
219
|
int i;
|
@@ -293,17 +274,14 @@ actiongroup_add_radio_actions(argc, argv, self)
|
|
293
274
|
}
|
294
275
|
|
295
276
|
static gchar*
|
296
|
-
translate_func(path, func)
|
297
|
-
const gchar* path;
|
298
|
-
gpointer func;
|
277
|
+
translate_func(const gchar *path, gpointer func)
|
299
278
|
{
|
300
279
|
VALUE ret = rb_funcall((VALUE)func, id_call, 1, CSTR2RVAL(path));
|
301
280
|
return RVAL2CSTR(ret);
|
302
281
|
}
|
303
282
|
|
304
283
|
static VALUE
|
305
|
-
actiongroup_set_translate_func(self)
|
306
|
-
VALUE self;
|
284
|
+
actiongroup_set_translate_func(VALUE self)
|
307
285
|
{
|
308
286
|
VALUE func = rb_block_proc();
|
309
287
|
G_RELATIVE(self, func);
|
@@ -314,8 +292,7 @@ actiongroup_set_translate_func(self)
|
|
314
292
|
}
|
315
293
|
|
316
294
|
static VALUE
|
317
|
-
actiongroup_set_translation_domain(self, domain)
|
318
|
-
VALUE self, domain;
|
295
|
+
actiongroup_set_translation_domain(VALUE self, VALUE domain)
|
319
296
|
{
|
320
297
|
gtk_action_group_set_translation_domain(_SELF(self),
|
321
298
|
NIL_P(domain) ? (const gchar*)NULL : RVAL2CSTR(domain));
|
@@ -324,8 +301,7 @@ actiongroup_set_translation_domain(self, domain)
|
|
324
301
|
|
325
302
|
#if GTK_CHECK_VERSION(2,6,0)
|
326
303
|
static VALUE
|
327
|
-
actiongroup_translate_string(self, str)
|
328
|
-
VALUE self, str;
|
304
|
+
actiongroup_translate_string(VALUE self, VALUE str)
|
329
305
|
{
|
330
306
|
return CSTR2RVAL(gtk_action_group_translate_string(_SELF(self), RVAL2CSTR(str)));
|
331
307
|
}
|