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
data/ext/gtk2/rbgtkscalebutton.c
CHANGED
@@ -22,10 +22,7 @@ static VALUE
|
|
22
22
|
scalebutton_set_icons(VALUE self, VALUE icons);
|
23
23
|
|
24
24
|
static VALUE
|
25
|
-
scalebutton_initialize(argc, argv, self)
|
26
|
-
int argc;
|
27
|
-
VALUE *argv;
|
28
|
-
VALUE self;
|
25
|
+
scalebutton_initialize(int argc, VALUE *argv, VALUE self)
|
29
26
|
{
|
30
27
|
VALUE arg1, arg2, arg3, arg4, arg5;
|
31
28
|
GtkWidget *widget;
|
@@ -54,16 +51,14 @@ scalebutton_initialize(argc, argv, self)
|
|
54
51
|
}
|
55
52
|
|
56
53
|
static VALUE
|
57
|
-
scalebutton_set_adjustment(self, adjustment)
|
58
|
-
VALUE self, adjustment;
|
54
|
+
scalebutton_set_adjustment(VALUE self, VALUE adjustment)
|
59
55
|
{
|
60
56
|
gtk_scale_button_set_adjustment(_SELF(self), RVAL2GOBJ(adjustment));
|
61
57
|
return self;
|
62
58
|
}
|
63
59
|
|
64
60
|
static VALUE
|
65
|
-
scalebutton_set_icons(self, icons)
|
66
|
-
VALUE self, icons;
|
61
|
+
scalebutton_set_icons(VALUE self, VALUE icons)
|
67
62
|
{
|
68
63
|
int i;
|
69
64
|
gchar **icons_c = g_new0(gchar*, RARRAY_LEN(icons) + 1);
|
@@ -76,23 +71,20 @@ scalebutton_set_icons(self, icons)
|
|
76
71
|
}
|
77
72
|
|
78
73
|
static VALUE
|
79
|
-
scalebutton_set_value(self, value)
|
80
|
-
VALUE self, value;
|
74
|
+
scalebutton_set_value(VALUE self, VALUE value)
|
81
75
|
{
|
82
76
|
gtk_scale_button_set_value(_SELF(self), NUM2DBL(value));
|
83
77
|
return self;
|
84
78
|
}
|
85
79
|
|
86
80
|
static VALUE
|
87
|
-
scalebutton_get_adjustment(self)
|
88
|
-
VALUE self;
|
81
|
+
scalebutton_get_adjustment(VALUE self)
|
89
82
|
{
|
90
83
|
return GOBJ2RVAL(gtk_scale_button_get_adjustment(_SELF(self)));
|
91
84
|
}
|
92
85
|
|
93
86
|
static VALUE
|
94
|
-
scalebutton_get_value(self)
|
95
|
-
VALUE self;
|
87
|
+
scalebutton_get_value(VALUE self)
|
96
88
|
{
|
97
89
|
return rb_float_new(gtk_scale_button_get_value(_SELF(self)));
|
98
90
|
}
|
@@ -17,10 +17,7 @@
|
|
17
17
|
#define _SELF(self) (GTK_SCROLLED_WINDOW(RVAL2GOBJ(self)))
|
18
18
|
|
19
19
|
static VALUE
|
20
|
-
scwin_initialize(argc, argv, self)
|
21
|
-
int argc;
|
22
|
-
VALUE *argv;
|
23
|
-
VALUE self;
|
20
|
+
scwin_initialize(int argc, VALUE *argv, VALUE self)
|
24
21
|
{
|
25
22
|
VALUE arg1, arg2;
|
26
23
|
GtkAdjustment *h_adj = NULL;
|
@@ -36,8 +33,7 @@ scwin_initialize(argc, argv, self)
|
|
36
33
|
}
|
37
34
|
|
38
35
|
static VALUE
|
39
|
-
scwin_set_policy(self, hpolicy, vpolicy)
|
40
|
-
VALUE self, hpolicy, vpolicy;
|
36
|
+
scwin_set_policy(VALUE self, VALUE hpolicy, VALUE vpolicy)
|
41
37
|
{
|
42
38
|
gtk_scrolled_window_set_policy(_SELF(self),
|
43
39
|
RVAL2GENUM(hpolicy, GTK_TYPE_POLICY_TYPE),
|
@@ -46,8 +42,7 @@ scwin_set_policy(self, hpolicy, vpolicy)
|
|
46
42
|
}
|
47
43
|
|
48
44
|
static VALUE
|
49
|
-
scwin_get_policy(self)
|
50
|
-
VALUE self;
|
45
|
+
scwin_get_policy(VALUE self)
|
51
46
|
{
|
52
47
|
GtkPolicyType hpolicy, vpolicy;
|
53
48
|
|
@@ -58,8 +53,7 @@ scwin_get_policy(self)
|
|
58
53
|
}
|
59
54
|
|
60
55
|
static VALUE
|
61
|
-
scwin_add_with_viewport(self, other)
|
62
|
-
VALUE self, other;
|
56
|
+
scwin_add_with_viewport(VALUE self, VALUE other)
|
63
57
|
{
|
64
58
|
gtk_scrolled_window_add_with_viewport(_SELF(self),
|
65
59
|
GTK_WIDGET(RVAL2GOBJ(other)));
|
@@ -69,15 +63,13 @@ scwin_add_with_viewport(self, other)
|
|
69
63
|
|
70
64
|
#if GTK_CHECK_VERSION(2,8,0)
|
71
65
|
static VALUE
|
72
|
-
scwin_get_hscrollbar(self)
|
73
|
-
VALUE self;
|
66
|
+
scwin_get_hscrollbar(VALUE self)
|
74
67
|
{
|
75
68
|
return GOBJ2RVAL(gtk_scrolled_window_get_hscrollbar(_SELF(self)));
|
76
69
|
}
|
77
70
|
|
78
71
|
static VALUE
|
79
|
-
scwin_get_vscrollbar(self)
|
80
|
-
VALUE self;
|
72
|
+
scwin_get_vscrollbar(VALUE self)
|
81
73
|
{
|
82
74
|
return GOBJ2RVAL(gtk_scrolled_window_get_vscrollbar(_SELF(self)));
|
83
75
|
}
|
@@ -85,8 +77,7 @@ scwin_get_vscrollbar(self)
|
|
85
77
|
|
86
78
|
#if GTK_CHECK_VERSION(2,10,0)
|
87
79
|
static VALUE
|
88
|
-
scwin_set_placement(self, corner_type)
|
89
|
-
VALUE self, corner_type;
|
80
|
+
scwin_set_placement(VALUE self, VALUE corner_type)
|
90
81
|
{
|
91
82
|
gtk_scrolled_window_set_placement(_SELF(self),
|
92
83
|
RVAL2GENUM(corner_type, GTK_TYPE_CORNER_TYPE));
|
@@ -94,16 +85,14 @@ scwin_set_placement(self, corner_type)
|
|
94
85
|
}
|
95
86
|
|
96
87
|
static VALUE
|
97
|
-
scwin_unset_placement(self)
|
98
|
-
VALUE self;
|
88
|
+
scwin_unset_placement(VALUE self)
|
99
89
|
{
|
100
90
|
gtk_scrolled_window_unset_placement(_SELF(self));
|
101
91
|
return self;
|
102
92
|
}
|
103
93
|
|
104
94
|
static VALUE
|
105
|
-
scwin_get_placement(self)
|
106
|
-
VALUE self;
|
95
|
+
scwin_get_placement(VALUE self)
|
107
96
|
{
|
108
97
|
return GENUM2RVAL(gtk_scrolled_window_get_placement(_SELF(self)),
|
109
98
|
GTK_TYPE_CORNER_TYPE);
|
data/ext/gtk2/rbgtkselection.c
CHANGED
@@ -19,10 +19,7 @@
|
|
19
19
|
#define RVAL2WIDGET(w) (GTK_WIDGET(RVAL2GOBJ(w)))
|
20
20
|
|
21
21
|
static VALUE
|
22
|
-
gtkdrag_selection_owner_set(argc, argv, self)
|
23
|
-
int argc;
|
24
|
-
VALUE* argv;
|
25
|
-
VALUE self;
|
22
|
+
gtkdrag_selection_owner_set(int argc, VALUE *argv, VALUE self)
|
26
23
|
{
|
27
24
|
gboolean ret;
|
28
25
|
|
@@ -46,8 +43,7 @@ gtkdrag_selection_owner_set(argc, argv, self)
|
|
46
43
|
}
|
47
44
|
|
48
45
|
static VALUE
|
49
|
-
gtkdrag_selection_add_target(self, widget, selection, target, info)
|
50
|
-
VALUE self, widget, selection, target, info;
|
46
|
+
gtkdrag_selection_add_target(VALUE self, VALUE widget, VALUE selection, VALUE target, VALUE info)
|
51
47
|
{
|
52
48
|
gtk_selection_add_target(RVAL2WIDGET(widget), RVAL2ATOM(selection),
|
53
49
|
RVAL2ATOM(target), NUM2INT(info));
|
@@ -55,8 +51,7 @@ gtkdrag_selection_add_target(self, widget, selection, target, info)
|
|
55
51
|
}
|
56
52
|
|
57
53
|
static VALUE
|
58
|
-
gtkdrag_selection_add_targets(self, widget, selection, targets)
|
59
|
-
VALUE self, widget, selection, targets;
|
54
|
+
gtkdrag_selection_add_targets(VALUE self, VALUE widget, VALUE selection, VALUE targets)
|
60
55
|
{
|
61
56
|
gtk_selection_add_targets(RVAL2WIDGET(widget),
|
62
57
|
RVAL2ATOM(selection),
|
@@ -65,16 +60,14 @@ gtkdrag_selection_add_targets(self, widget, selection, targets)
|
|
65
60
|
}
|
66
61
|
|
67
62
|
static VALUE
|
68
|
-
gtkdrag_selection_clear_targets(self, widget, selection)
|
69
|
-
VALUE self, widget, selection;
|
63
|
+
gtkdrag_selection_clear_targets(VALUE self, VALUE widget, VALUE selection)
|
70
64
|
{
|
71
65
|
gtk_selection_clear_targets(RVAL2WIDGET(widget), RVAL2ATOM(selection));
|
72
66
|
return self;
|
73
67
|
}
|
74
68
|
|
75
69
|
static VALUE
|
76
|
-
gtkdrag_selection_convert(self, widget, selection, target, time)
|
77
|
-
VALUE self, widget, selection, target, time;
|
70
|
+
gtkdrag_selection_convert(VALUE self, VALUE widget, VALUE selection, VALUE target, VALUE time)
|
78
71
|
{
|
79
72
|
gboolean ret = gtk_selection_convert(RVAL2WIDGET(widget),
|
80
73
|
RVAL2ATOM(selection), RVAL2ATOM(target),
|
@@ -83,8 +76,7 @@ gtkdrag_selection_convert(self, widget, selection, target, time)
|
|
83
76
|
}
|
84
77
|
|
85
78
|
static VALUE
|
86
|
-
gtkdrag_selection_remove_all(self, widget)
|
87
|
-
VALUE self, widget;
|
79
|
+
gtkdrag_selection_remove_all(VALUE self, VALUE widget)
|
88
80
|
{
|
89
81
|
gtk_selection_remove_all(RVAL2WIDGET(widget));
|
90
82
|
return self;
|
@@ -92,8 +84,7 @@ gtkdrag_selection_remove_all(self, widget)
|
|
92
84
|
|
93
85
|
#if GTK_CHECK_VERSION(2,10,0)
|
94
86
|
static VALUE
|
95
|
-
targets_include_image(self, targets, writable)
|
96
|
-
VALUE self, targets, writable;
|
87
|
+
targets_include_image(VALUE self, VALUE targets, VALUE writable)
|
97
88
|
{
|
98
89
|
gint i;
|
99
90
|
gint len = RARRAY_LEN(targets);
|
@@ -107,8 +98,7 @@ targets_include_image(self, targets, writable)
|
|
107
98
|
}
|
108
99
|
|
109
100
|
static VALUE
|
110
|
-
targets_include_text(self, targets)
|
111
|
-
VALUE self, targets;
|
101
|
+
targets_include_text(VALUE self, VALUE targets)
|
112
102
|
{
|
113
103
|
gint i;
|
114
104
|
gint len = RARRAY_LEN(targets);
|
@@ -120,8 +110,7 @@ targets_include_text(self, targets)
|
|
120
110
|
}
|
121
111
|
|
122
112
|
static VALUE
|
123
|
-
targets_include_uri(self, targets)
|
124
|
-
VALUE self, targets;
|
113
|
+
targets_include_uri(VALUE self, VALUE targets)
|
125
114
|
{
|
126
115
|
gint i;
|
127
116
|
gint len = RARRAY_LEN(targets);
|
@@ -135,8 +124,7 @@ targets_include_uri(self, targets)
|
|
135
124
|
}
|
136
125
|
|
137
126
|
static VALUE
|
138
|
-
targets_include_rich_text(self, targets, buffer)
|
139
|
-
VALUE self, targets, buffer;
|
127
|
+
targets_include_rich_text(VALUE self, VALUE targets, VALUE buffer)
|
140
128
|
{
|
141
129
|
gint i;
|
142
130
|
gint len = RARRAY_LEN(targets);
|
@@ -59,9 +59,7 @@ rbgtk_atom2selectiondata(VALUE type, VALUE size, VALUE src, GdkAtom *gtype,
|
|
59
59
|
}
|
60
60
|
|
61
61
|
void
|
62
|
-
rbgtk_atom2selectiondata_free(type, dat)
|
63
|
-
GdkAtom type;
|
64
|
-
void* dat;
|
62
|
+
rbgtk_atom2selectiondata_free(GdkAtom type, void *dat)
|
65
63
|
{
|
66
64
|
if (type == GDK_SELECTION_TYPE_INTEGER ||
|
67
65
|
type == GDK_SELECTION_TYPE_ATOM) {
|
@@ -73,37 +71,32 @@ rbgtk_atom2selectiondata_free(type, dat)
|
|
73
71
|
/************************************************************************/
|
74
72
|
|
75
73
|
static VALUE
|
76
|
-
gtkselectiondata_selection(self)
|
77
|
-
VALUE self;
|
74
|
+
gtkselectiondata_selection(VALUE self)
|
78
75
|
{
|
79
76
|
GdkAtom selection = _SELF(self)->selection;
|
80
77
|
return BOXED2RVAL(&selection, GDK_TYPE_ATOM);
|
81
78
|
}
|
82
79
|
|
83
80
|
static VALUE
|
84
|
-
gtkselectiondata_target(self)
|
85
|
-
VALUE self;
|
81
|
+
gtkselectiondata_target(VALUE self)
|
86
82
|
{
|
87
83
|
return BOXED2RVAL(_SELF(self)->target, GDK_TYPE_ATOM);
|
88
84
|
}
|
89
85
|
|
90
86
|
static VALUE
|
91
|
-
gtkselectiondata_type(self)
|
92
|
-
VALUE self;
|
87
|
+
gtkselectiondata_type(VALUE self)
|
93
88
|
{
|
94
89
|
return BOXED2RVAL(_SELF(self)->type, GDK_TYPE_ATOM);
|
95
90
|
}
|
96
91
|
|
97
92
|
static VALUE
|
98
|
-
gtkselectiondata_format(self)
|
99
|
-
VALUE self;
|
93
|
+
gtkselectiondata_format(VALUE self)
|
100
94
|
{
|
101
95
|
return INT2NUM(_SELF(self)->format);
|
102
96
|
}
|
103
97
|
|
104
98
|
static VALUE
|
105
|
-
gtkselectiondata_data(self)
|
106
|
-
VALUE self;
|
99
|
+
gtkselectiondata_data(VALUE self)
|
107
100
|
{
|
108
101
|
return RBG_STRING_SET_UTF8_ENCODING(rb_str_new((const char*)_SELF(self)->data,
|
109
102
|
_SELF(self)->length));
|
@@ -111,8 +104,7 @@ gtkselectiondata_data(self)
|
|
111
104
|
|
112
105
|
#if GTK_CHECK_VERSION(2,2,0)
|
113
106
|
static VALUE
|
114
|
-
gtkselectiondata_display(self)
|
115
|
-
VALUE self;
|
107
|
+
gtkselectiondata_display(VALUE self)
|
116
108
|
{
|
117
109
|
return BOXED2RVAL(_SELF(self)->display, GDK_TYPE_DISPLAY);
|
118
110
|
}
|
@@ -120,10 +112,7 @@ gtkselectiondata_display(self)
|
|
120
112
|
|
121
113
|
/* Instance Methods */
|
122
114
|
static VALUE
|
123
|
-
gtkselectiondata_set(argc, argv, self)
|
124
|
-
int argc;
|
125
|
-
VALUE* argv;
|
126
|
-
VALUE self;
|
115
|
+
gtkselectiondata_set(int argc, VALUE *argv, VALUE self)
|
127
116
|
{
|
128
117
|
void* dat;
|
129
118
|
VALUE type, src;
|
@@ -146,8 +135,7 @@ gtkselectiondata_set(argc, argv, self)
|
|
146
135
|
}
|
147
136
|
|
148
137
|
static VALUE
|
149
|
-
gtkselectiondata_set_text(self, str)
|
150
|
-
VALUE self, str;
|
138
|
+
gtkselectiondata_set_text(VALUE self, VALUE str)
|
151
139
|
{
|
152
140
|
gboolean ret;
|
153
141
|
StringValue(str);
|
@@ -162,8 +150,7 @@ gtkselectiondata_set_text(self, str)
|
|
162
150
|
}
|
163
151
|
|
164
152
|
static VALUE
|
165
|
-
gtkselectiondata_get_text(self)
|
166
|
-
VALUE self;
|
153
|
+
gtkselectiondata_get_text(VALUE self)
|
167
154
|
{
|
168
155
|
VALUE ret = Qnil;
|
169
156
|
guchar* text = gtk_selection_data_get_text(_SELF(self));
|
@@ -176,8 +163,7 @@ gtkselectiondata_get_text(self)
|
|
176
163
|
|
177
164
|
#if GTK_CHECK_VERSION(2,6,0)
|
178
165
|
static VALUE
|
179
|
-
gtkselectiondata_set_pixbuf(self, pixbuf)
|
180
|
-
VALUE self, pixbuf;
|
166
|
+
gtkselectiondata_set_pixbuf(VALUE self, VALUE pixbuf)
|
181
167
|
{
|
182
168
|
gboolean ret = gtk_selection_data_set_pixbuf(_SELF(self),
|
183
169
|
GDK_PIXBUF(RVAL2GOBJ(pixbuf)));
|
@@ -188,15 +174,13 @@ gtkselectiondata_set_pixbuf(self, pixbuf)
|
|
188
174
|
}
|
189
175
|
|
190
176
|
static VALUE
|
191
|
-
gtkselectiondata_get_pixbuf(self)
|
192
|
-
VALUE self;
|
177
|
+
gtkselectiondata_get_pixbuf(VALUE self)
|
193
178
|
{
|
194
179
|
return GOBJ2RVAL(gtk_selection_data_get_pixbuf(_SELF(self)));
|
195
180
|
}
|
196
181
|
|
197
182
|
static VALUE
|
198
|
-
gtkselectiondata_set_uris(self, uris)
|
199
|
-
VALUE self, uris;
|
183
|
+
gtkselectiondata_set_uris(VALUE self, VALUE uris)
|
200
184
|
{
|
201
185
|
gboolean ret;
|
202
186
|
gchar** guris;
|
@@ -223,8 +207,7 @@ gtkselectiondata_set_uris(self, uris)
|
|
223
207
|
}
|
224
208
|
|
225
209
|
static VALUE
|
226
|
-
gtkselectiondata_get_uris(self)
|
227
|
-
VALUE self;
|
210
|
+
gtkselectiondata_get_uris(VALUE self)
|
228
211
|
{
|
229
212
|
VALUE ary = rb_ary_new();
|
230
213
|
gchar** uris = gtk_selection_data_get_uris(_SELF(self));
|
@@ -242,8 +225,7 @@ gtkselectiondata_get_uris(self)
|
|
242
225
|
#endif
|
243
226
|
|
244
227
|
static VALUE
|
245
|
-
gtkselectiondata_get_targets(self)
|
246
|
-
VALUE self;
|
228
|
+
gtkselectiondata_get_targets(VALUE self)
|
247
229
|
{
|
248
230
|
GdkAtom* targets;
|
249
231
|
gint n_atoms;
|
@@ -262,30 +244,26 @@ gtkselectiondata_get_targets(self)
|
|
262
244
|
}
|
263
245
|
#if GTK_CHECK_VERSION(2,6,0)
|
264
246
|
static VALUE
|
265
|
-
gtkselectiondata_targets_include_image(self, writable)
|
266
|
-
VALUE self, writable;
|
247
|
+
gtkselectiondata_targets_include_image(VALUE self, VALUE writable)
|
267
248
|
{
|
268
249
|
return CBOOL2RVAL(gtk_selection_data_targets_include_image(_SELF(self), RVAL2CBOOL(writable)));
|
269
250
|
}
|
270
251
|
#endif
|
271
252
|
|
272
253
|
static VALUE
|
273
|
-
gtkselectiondata_targets_include_text(self)
|
274
|
-
VALUE self;
|
254
|
+
gtkselectiondata_targets_include_text(VALUE self)
|
275
255
|
{
|
276
256
|
return CBOOL2RVAL(gtk_selection_data_targets_include_text(_SELF(self)));
|
277
257
|
}
|
278
258
|
|
279
259
|
#if GTK_CHECK_VERSION(2,10,0)
|
280
260
|
static VALUE
|
281
|
-
gtkselectiondata_targets_include_uri(self)
|
282
|
-
VALUE self;
|
261
|
+
gtkselectiondata_targets_include_uri(VALUE self)
|
283
262
|
{
|
284
263
|
return CBOOL2RVAL(gtk_selection_data_targets_include_uri(_SELF(self)));
|
285
264
|
}
|
286
265
|
static VALUE
|
287
|
-
gtkselectiondata_targets_include_rich_text(self, buffer)
|
288
|
-
VALUE self, buffer;
|
266
|
+
gtkselectiondata_targets_include_rich_text(VALUE self, VALUE buffer)
|
289
267
|
{
|
290
268
|
return CBOOL2RVAL(gtk_selection_data_targets_include_rich_text(_SELF(self),
|
291
269
|
GTK_TEXT_BUFFER(RVAL2GOBJ(buffer))));
|
data/ext/gtk2/rbgtksettings.c
CHANGED
@@ -15,16 +15,14 @@
|
|
15
15
|
static VALUE prop_func_table;
|
16
16
|
|
17
17
|
static VALUE
|
18
|
-
settings_s_get_default(self)
|
19
|
-
VALUE self;
|
18
|
+
settings_s_get_default(VALUE self)
|
20
19
|
{
|
21
20
|
return GOBJ2RVAL(gtk_settings_get_default());
|
22
21
|
}
|
23
22
|
|
24
23
|
#if GTK_CHECK_VERSION(2,2,0)
|
25
24
|
static VALUE
|
26
|
-
settings_s_get_for_screen(self, screen)
|
27
|
-
VALUE self, screen;
|
25
|
+
settings_s_get_for_screen(VALUE self, VALUE screen)
|
28
26
|
{
|
29
27
|
return GOBJ2RVAL(gtk_settings_get_for_screen(GDK_SCREEN(RVAL2GOBJ(screen))));
|
30
28
|
}
|
@@ -38,10 +36,7 @@ settings_s_get_for_screen(self, screen)
|
|
38
36
|
* end
|
39
37
|
*/
|
40
38
|
static gboolean
|
41
|
-
rc_property_parser(pspec, rc_string, property_value)
|
42
|
-
const GParamSpec *pspec;
|
43
|
-
const GString *rc_string;
|
44
|
-
GValue *property_value;
|
39
|
+
rc_property_parser(const GParamSpec *pspec, const GString *rc_string, GValue *property_value)
|
45
40
|
{
|
46
41
|
VALUE spec = GOBJ2RVAL((gpointer)pspec);
|
47
42
|
VALUE func = rb_hash_aref(prop_func_table, spec);
|
@@ -57,8 +52,7 @@ rc_property_parser(pspec, rc_string, property_value)
|
|
57
52
|
}
|
58
53
|
|
59
54
|
static VALUE
|
60
|
-
settings_s_install_property(self, spec)
|
61
|
-
VALUE self, spec;
|
55
|
+
settings_s_install_property(VALUE self, VALUE spec)
|
62
56
|
{
|
63
57
|
GParamSpec* pspec = G_PARAM_SPEC(RVAL2GOBJ(spec));
|
64
58
|
if (rb_block_given_p()){
|
@@ -72,8 +66,7 @@ settings_s_install_property(self, spec)
|
|
72
66
|
}
|
73
67
|
|
74
68
|
static VALUE
|
75
|
-
settings_rc_property_parse_color(self, spec, str)
|
76
|
-
VALUE self, spec, str;
|
69
|
+
settings_rc_property_parse_color(VALUE self, VALUE spec, VALUE str)
|
77
70
|
{
|
78
71
|
gboolean ret;
|
79
72
|
GValue prop = {0,};
|
@@ -90,8 +83,7 @@ settings_rc_property_parse_color(self, spec, str)
|
|
90
83
|
}
|
91
84
|
|
92
85
|
static VALUE
|
93
|
-
settings_rc_property_parse_enum(self, spec, str)
|
94
|
-
VALUE self, spec, str;
|
86
|
+
settings_rc_property_parse_enum(VALUE self, VALUE spec, VALUE str)
|
95
87
|
{
|
96
88
|
gboolean ret;
|
97
89
|
GValue prop = {0,};
|
@@ -109,8 +101,7 @@ settings_rc_property_parse_enum(self, spec, str)
|
|
109
101
|
}
|
110
102
|
|
111
103
|
static VALUE
|
112
|
-
settings_rc_property_parse_flags(self, spec, str)
|
113
|
-
VALUE self, spec, str;
|
104
|
+
settings_rc_property_parse_flags(VALUE self, VALUE spec, VALUE str)
|
114
105
|
{
|
115
106
|
gboolean ret;
|
116
107
|
GValue prop = {0,};
|
@@ -128,8 +119,7 @@ settings_rc_property_parse_flags(self, spec, str)
|
|
128
119
|
}
|
129
120
|
|
130
121
|
static VALUE
|
131
|
-
settings_rc_property_parse_requisition(self, spec, str)
|
132
|
-
VALUE self, spec, str;
|
122
|
+
settings_rc_property_parse_requisition(VALUE self, VALUE spec, VALUE str)
|
133
123
|
{
|
134
124
|
gboolean ret;
|
135
125
|
GValue prop = {0,};
|
@@ -148,8 +138,7 @@ settings_rc_property_parse_requisition(self, spec, str)
|
|
148
138
|
}
|
149
139
|
|
150
140
|
static VALUE
|
151
|
-
settings_rc_property_parse_border(self, spec, str)
|
152
|
-
VALUE self, spec, str;
|
141
|
+
settings_rc_property_parse_border(VALUE self, VALUE spec, VALUE str)
|
153
142
|
{
|
154
143
|
gboolean ret;
|
155
144
|
GValue prop = {0,};
|
@@ -168,8 +157,7 @@ settings_rc_property_parse_border(self, spec, str)
|
|
168
157
|
}
|
169
158
|
|
170
159
|
static VALUE
|
171
|
-
settings_set_property_value(self, name, value, origin)
|
172
|
-
VALUE self, name, value, origin;
|
160
|
+
settings_set_property_value(VALUE self, VALUE name, VALUE value, VALUE origin)
|
173
161
|
{
|
174
162
|
GtkSettingsValue svalue = { NULL, { 0, }, };
|
175
163
|
g_value_init(&svalue.value, RVAL2GTYPE(value));
|