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/rbgtkcolorbutton.c
CHANGED
data/ext/gtk2/rbgtkcolorsel.c
CHANGED
@@ -19,39 +19,34 @@
|
|
19
19
|
static VALUE gColorSel;
|
20
20
|
|
21
21
|
static VALUE
|
22
|
-
colorsel_initialize(self)
|
23
|
-
VALUE self;
|
22
|
+
colorsel_initialize(VALUE self)
|
24
23
|
{
|
25
24
|
RBGTK_INITIALIZE(self, gtk_color_selection_new());
|
26
25
|
return Qnil;
|
27
26
|
}
|
28
27
|
|
29
28
|
static VALUE
|
30
|
-
colorsel_get_previous_alpha(self)
|
31
|
-
VALUE self;
|
29
|
+
colorsel_get_previous_alpha(VALUE self)
|
32
30
|
{
|
33
31
|
return INT2NUM(gtk_color_selection_get_previous_alpha(_SELF(self)));
|
34
32
|
}
|
35
33
|
|
36
34
|
static VALUE
|
37
|
-
colorsel_set_previous_alpha(self, alpha)
|
38
|
-
VALUE self, alpha;
|
35
|
+
colorsel_set_previous_alpha(VALUE self, VALUE alpha)
|
39
36
|
{
|
40
37
|
gtk_color_selection_set_previous_alpha(_SELF(self), NUM2INT(alpha));
|
41
38
|
return self;
|
42
39
|
}
|
43
40
|
|
44
41
|
static VALUE
|
45
|
-
colorsel_set_previous_color(self, color)
|
46
|
-
VALUE self, color;
|
42
|
+
colorsel_set_previous_color(VALUE self, VALUE color)
|
47
43
|
{
|
48
44
|
gtk_color_selection_set_previous_color(_SELF(self), RVAL2GDKCOLOR(color));
|
49
45
|
return self;
|
50
46
|
}
|
51
47
|
|
52
48
|
static VALUE
|
53
|
-
colorsel_get_previous_color(self)
|
54
|
-
VALUE self;
|
49
|
+
colorsel_get_previous_color(VALUE self)
|
55
50
|
{
|
56
51
|
GdkColor color;
|
57
52
|
gtk_color_selection_get_previous_color(_SELF(self), &color);
|
@@ -59,15 +54,13 @@ colorsel_get_previous_color(self)
|
|
59
54
|
}
|
60
55
|
|
61
56
|
static VALUE
|
62
|
-
colorsel_is_adjusting(self)
|
63
|
-
VALUE self;
|
57
|
+
colorsel_is_adjusting(VALUE self)
|
64
58
|
{
|
65
59
|
return CBOOL2RVAL(gtk_color_selection_is_adjusting(_SELF(self)));
|
66
60
|
}
|
67
61
|
|
68
62
|
static VALUE
|
69
|
-
colorsel_s_palette_from_string(self, str)
|
70
|
-
VALUE self, str;
|
63
|
+
colorsel_s_palette_from_string(VALUE self, VALUE str)
|
71
64
|
{
|
72
65
|
GdkColor* gcolors;
|
73
66
|
gint i, n_colors;
|
@@ -86,10 +79,7 @@ colorsel_s_palette_from_string(self, str)
|
|
86
79
|
}
|
87
80
|
|
88
81
|
static VALUE
|
89
|
-
colorsel_s_palette_to_string(argc, argv, self)
|
90
|
-
int argc;
|
91
|
-
VALUE* argv;
|
92
|
-
VALUE self;
|
82
|
+
colorsel_s_palette_to_string(int argc, VALUE *argv, VALUE self)
|
93
83
|
{
|
94
84
|
GdkColor* gcolors;
|
95
85
|
GdkColor* gcolor;
|
@@ -115,10 +105,7 @@ colorsel_s_palette_to_string(argc, argv, self)
|
|
115
105
|
|
116
106
|
#if GTK_CHECK_VERSION(2,2,0)
|
117
107
|
static void
|
118
|
-
screen_func(screen, colors, n_colors)
|
119
|
-
GdkScreen* screen;
|
120
|
-
const GdkColor* colors;
|
121
|
-
gint n_colors;
|
108
|
+
screen_func(GdkScreen *screen, const GdkColor *colors, gint n_colors)
|
122
109
|
{
|
123
110
|
int i;
|
124
111
|
VALUE func = rb_cvar_get(gColorSel, rb_intern("__palette_proc__"));
|
@@ -131,8 +118,7 @@ screen_func(screen, colors, n_colors)
|
|
131
118
|
}
|
132
119
|
|
133
120
|
static VALUE
|
134
|
-
colorsel_s_set_change_palette_hook(self)
|
135
|
-
VALUE self;
|
121
|
+
colorsel_s_set_change_palette_hook(VALUE self)
|
136
122
|
{
|
137
123
|
VALUE func = rb_block_proc();
|
138
124
|
|
@@ -19,10 +19,7 @@
|
|
19
19
|
#define _SELF(s) (GTK_COLOR_SELECTION_DIALOG(RVAL2GOBJ(s)))
|
20
20
|
|
21
21
|
static VALUE
|
22
|
-
cdialog_initialize(argc, argv, self)
|
23
|
-
int argc;
|
24
|
-
VALUE *argv;
|
25
|
-
VALUE self;
|
22
|
+
cdialog_initialize(int argc, VALUE *argv, VALUE self)
|
26
23
|
{
|
27
24
|
VALUE title;
|
28
25
|
rb_scan_args(argc, argv, "01", &title);
|
@@ -31,29 +28,25 @@ cdialog_initialize(argc, argv, self)
|
|
31
28
|
}
|
32
29
|
|
33
30
|
static VALUE
|
34
|
-
cdialog_get_colorsel(self)
|
35
|
-
VALUE self;
|
31
|
+
cdialog_get_colorsel(VALUE self)
|
36
32
|
{
|
37
33
|
return GOBJ2RVAL(_SELF(self)->colorsel);
|
38
34
|
}
|
39
35
|
|
40
36
|
static VALUE
|
41
|
-
cdialog_get_ok_button(self)
|
42
|
-
VALUE self;
|
37
|
+
cdialog_get_ok_button(VALUE self)
|
43
38
|
{
|
44
39
|
return GOBJ2RVAL(_SELF(self)->ok_button);
|
45
40
|
}
|
46
41
|
|
47
42
|
static VALUE
|
48
|
-
cdialog_get_cancel_button(self)
|
49
|
-
VALUE self;
|
43
|
+
cdialog_get_cancel_button(VALUE self)
|
50
44
|
{
|
51
45
|
return GOBJ2RVAL(_SELF(self)->cancel_button);
|
52
46
|
}
|
53
47
|
|
54
48
|
static VALUE
|
55
|
-
cdialog_get_help_button(self)
|
56
|
-
VALUE self;
|
49
|
+
cdialog_get_help_button(VALUE self)
|
57
50
|
{
|
58
51
|
return GOBJ2RVAL(_SELF(self)->help_button);
|
59
52
|
}
|
data/ext/gtk2/rbgtkcombo.c
CHANGED
@@ -17,8 +17,7 @@
|
|
17
17
|
#ifndef GTK_DISABLE_DEPRECATED /* Since 2.4 */
|
18
18
|
|
19
19
|
static VALUE
|
20
|
-
combo_set_popdown_strings(self, ary)
|
21
|
-
VALUE self, ary;
|
20
|
+
combo_set_popdown_strings(VALUE self, VALUE ary)
|
22
21
|
{
|
23
22
|
int i;
|
24
23
|
GList *glist = NULL;
|
@@ -33,10 +32,7 @@ combo_set_popdown_strings(self, ary)
|
|
33
32
|
}
|
34
33
|
|
35
34
|
static VALUE
|
36
|
-
combo_initialize(argc, argv, self)
|
37
|
-
int argc;
|
38
|
-
VALUE *argv;
|
39
|
-
VALUE self;
|
35
|
+
combo_initialize(int argc, VALUE *argv, VALUE self)
|
40
36
|
{
|
41
37
|
VALUE ary;
|
42
38
|
GtkWidget* widget = NULL;
|
@@ -54,8 +50,7 @@ combo_initialize(argc, argv, self)
|
|
54
50
|
}
|
55
51
|
|
56
52
|
static VALUE
|
57
|
-
combo_set_val_in_list(self, val, ok)
|
58
|
-
VALUE self, val, ok;
|
53
|
+
combo_set_val_in_list(VALUE self, VALUE val, VALUE ok)
|
59
54
|
{
|
60
55
|
gtk_combo_set_value_in_list(GTK_COMBO(RVAL2GOBJ(self)),
|
61
56
|
RVAL2CBOOL(val), RVAL2CBOOL(ok));
|
@@ -63,8 +58,7 @@ combo_set_val_in_list(self, val, ok)
|
|
63
58
|
}
|
64
59
|
|
65
60
|
static VALUE
|
66
|
-
combo_set_use_arrows(self, val)
|
67
|
-
VALUE self, val;
|
61
|
+
combo_set_use_arrows(VALUE self, VALUE val)
|
68
62
|
{
|
69
63
|
gtk_combo_set_use_arrows(GTK_COMBO(RVAL2GOBJ(self)),
|
70
64
|
RVAL2CBOOL(val));
|
@@ -72,8 +66,7 @@ combo_set_use_arrows(self, val)
|
|
72
66
|
}
|
73
67
|
|
74
68
|
static VALUE
|
75
|
-
combo_set_use_arrows_always(self, val)
|
76
|
-
VALUE self, val;
|
69
|
+
combo_set_use_arrows_always(VALUE self, VALUE val)
|
77
70
|
{
|
78
71
|
gtk_combo_set_use_arrows_always(GTK_COMBO(RVAL2GOBJ(self)),
|
79
72
|
RVAL2CBOOL(val));
|
@@ -81,16 +74,14 @@ combo_set_use_arrows_always(self, val)
|
|
81
74
|
}
|
82
75
|
|
83
76
|
static VALUE
|
84
|
-
combo_disable_activate(self)
|
85
|
-
VALUE self;
|
77
|
+
combo_disable_activate(VALUE self)
|
86
78
|
{
|
87
79
|
gtk_combo_disable_activate(GTK_COMBO(RVAL2GOBJ(self)));
|
88
80
|
return self;
|
89
81
|
}
|
90
82
|
|
91
83
|
static VALUE
|
92
|
-
combo_entry(self)
|
93
|
-
VALUE self;
|
84
|
+
combo_entry(VALUE self)
|
94
85
|
{
|
95
86
|
return GOBJ2RVAL(GTK_COMBO(RVAL2GOBJ(self))->entry);
|
96
87
|
}
|
data/ext/gtk2/rbgtkcombobox.c
CHANGED
@@ -17,10 +17,7 @@
|
|
17
17
|
#define RVAL2WIDGET(w) (GTK_WIDGET(RVAL2GOBJ(w)))
|
18
18
|
|
19
19
|
static VALUE
|
20
|
-
combobox_initialize(argc, argv, self)
|
21
|
-
int argc;
|
22
|
-
VALUE* argv;
|
23
|
-
VALUE self;
|
20
|
+
combobox_initialize(int argc, VALUE *argv, VALUE self)
|
24
21
|
{
|
25
22
|
VALUE model_or_false;
|
26
23
|
GtkWidget* widget;
|
@@ -57,8 +54,7 @@ void gtk_combo_box_set_active (GtkComboBox *combo_box,
|
|
57
54
|
*/
|
58
55
|
|
59
56
|
static VALUE
|
60
|
-
combobox_get_active_iter(self)
|
61
|
-
VALUE self;
|
57
|
+
combobox_get_active_iter(VALUE self)
|
62
58
|
{
|
63
59
|
GtkTreeIter iter;
|
64
60
|
VALUE val = Qnil;
|
@@ -71,8 +67,7 @@ combobox_get_active_iter(self)
|
|
71
67
|
}
|
72
68
|
|
73
69
|
static VALUE
|
74
|
-
combobox_set_active_iter(self, iter)
|
75
|
-
VALUE self, iter;
|
70
|
+
combobox_set_active_iter(VALUE self, VALUE iter)
|
76
71
|
{
|
77
72
|
gtk_combo_box_set_active_iter(_SELF(self), RVAL2GTKTREEITER(iter));
|
78
73
|
return self;
|
@@ -86,32 +81,28 @@ void gtk_combo_box_set_model (GtkComboBox *combo_box,
|
|
86
81
|
|
87
82
|
|
88
83
|
static VALUE
|
89
|
-
combobox_append_text(self, text)
|
90
|
-
VALUE self, text;
|
84
|
+
combobox_append_text(VALUE self, VALUE text)
|
91
85
|
{
|
92
86
|
gtk_combo_box_append_text(_SELF(self), RVAL2CSTR(text));
|
93
87
|
return self;
|
94
88
|
}
|
95
89
|
|
96
90
|
static VALUE
|
97
|
-
combobox_insert_text(self, position, text)
|
98
|
-
VALUE self, position, text;
|
91
|
+
combobox_insert_text(VALUE self, VALUE position, VALUE text)
|
99
92
|
{
|
100
93
|
gtk_combo_box_insert_text(_SELF(self), NUM2INT(position), RVAL2CSTR(text));
|
101
94
|
return self;
|
102
95
|
}
|
103
96
|
|
104
97
|
static VALUE
|
105
|
-
combobox_prepend_text(self, text)
|
106
|
-
VALUE self, text;
|
98
|
+
combobox_prepend_text(VALUE self, VALUE text)
|
107
99
|
{
|
108
100
|
gtk_combo_box_prepend_text(_SELF(self), RVAL2CSTR(text));
|
109
101
|
return self;
|
110
102
|
}
|
111
103
|
|
112
104
|
static VALUE
|
113
|
-
combobox_remove_text(self, position)
|
114
|
-
VALUE self, position;
|
105
|
+
combobox_remove_text(VALUE self, VALUE position)
|
115
106
|
{
|
116
107
|
gtk_combo_box_remove_text(_SELF(self), NUM2INT(position));
|
117
108
|
return self;
|
@@ -119,16 +110,14 @@ combobox_remove_text(self, position)
|
|
119
110
|
|
120
111
|
|
121
112
|
static VALUE
|
122
|
-
combobox_popup(self)
|
123
|
-
VALUE self;
|
113
|
+
combobox_popup(VALUE self)
|
124
114
|
{
|
125
115
|
gtk_combo_box_popup(_SELF(self));
|
126
116
|
return self;
|
127
117
|
}
|
128
118
|
|
129
119
|
static VALUE
|
130
|
-
combobox_popdown(self)
|
131
|
-
VALUE self;
|
120
|
+
combobox_popdown(VALUE self)
|
132
121
|
{
|
133
122
|
gtk_combo_box_popdown(_SELF(self));
|
134
123
|
return self;
|
@@ -150,15 +139,13 @@ gint gtk_combo_box_get_row_span_column
|
|
150
139
|
*/
|
151
140
|
|
152
141
|
static VALUE
|
153
|
-
combobox_get_active_text(self)
|
154
|
-
VALUE self;
|
142
|
+
combobox_get_active_text(VALUE self)
|
155
143
|
{
|
156
144
|
return CSTR2RVAL_FREE(gtk_combo_box_get_active_text(_SELF(self)));
|
157
145
|
}
|
158
146
|
|
159
147
|
static VALUE
|
160
|
-
combobox_get_popup_accessible(self)
|
161
|
-
VALUE self;
|
148
|
+
combobox_get_popup_accessible(VALUE self)
|
162
149
|
{
|
163
150
|
return GOBJ2RVAL(gtk_combo_box_get_popup_accessible(_SELF(self)));
|
164
151
|
}
|
@@ -169,10 +156,7 @@ GtkTreeViewRowSeparatorFunc gtk_combo_box_get_row_separator_func
|
|
169
156
|
*/
|
170
157
|
|
171
158
|
static gboolean
|
172
|
-
row_separator_func(model, iter, func)
|
173
|
-
GtkTreeModel* model;
|
174
|
-
GtkTreeIter* iter;
|
175
|
-
gpointer* func;
|
159
|
+
row_separator_func(GtkTreeModel *model, GtkTreeIter *iter, gpointer *func)
|
176
160
|
{
|
177
161
|
iter->user_data3 = model;
|
178
162
|
return RVAL2CBOOL(rb_funcall((VALUE)func, id_call, 2, GOBJ2RVAL(model),
|
@@ -180,8 +164,7 @@ row_separator_func(model, iter, func)
|
|
180
164
|
}
|
181
165
|
|
182
166
|
static VALUE
|
183
|
-
combobox_set_row_separator_func(self)
|
184
|
-
VALUE self;
|
167
|
+
combobox_set_row_separator_func(VALUE self)
|
185
168
|
{
|
186
169
|
VALUE func = rb_block_proc();
|
187
170
|
G_RELATIVE(self, func);
|
@@ -196,8 +179,7 @@ combobox_set_row_separator_func(self)
|
|
196
179
|
call GLib::Object.set_property.
|
197
180
|
*/
|
198
181
|
static VALUE
|
199
|
-
combobox_set_focus_on_click(self, val)
|
200
|
-
VALUE self, val;
|
182
|
+
combobox_set_focus_on_click(VALUE self, VALUE val)
|
201
183
|
{
|
202
184
|
gtk_combo_box_set_focus_on_click(_SELF(self), RVAL2CBOOL(val));
|
203
185
|
return self;
|
@@ -14,10 +14,7 @@
|
|
14
14
|
#if GTK_CHECK_VERSION(2,4,0)
|
15
15
|
|
16
16
|
static VALUE
|
17
|
-
comboboxentry_initialize(argc, argv, self)
|
18
|
-
int argc;
|
19
|
-
VALUE* argv;
|
20
|
-
VALUE self;
|
17
|
+
comboboxentry_initialize(int argc, VALUE *argv, VALUE self)
|
21
18
|
{
|
22
19
|
VALUE model_or_false, text_column;
|
23
20
|
GtkWidget* widget;
|
data/ext/gtk2/rbgtkcontainer.c
CHANGED
@@ -25,15 +25,13 @@ static VALUE type_to_prop_setter_table;
|
|
25
25
|
static VALUE type_to_prop_getter_table;
|
26
26
|
|
27
27
|
static VALUE
|
28
|
-
cont_is_resize_container(self)
|
29
|
-
VALUE self;
|
28
|
+
cont_is_resize_container(VALUE self)
|
30
29
|
{
|
31
30
|
return CBOOL2RVAL(GTK_IS_RESIZE_CONTAINER(_SELF(self)));
|
32
31
|
}
|
33
32
|
|
34
33
|
static VALUE
|
35
|
-
cont_remove(self, other)
|
36
|
-
VALUE self, other;
|
34
|
+
cont_remove(VALUE self, VALUE other)
|
37
35
|
{
|
38
36
|
G_CHILD_REMOVE(self, other);
|
39
37
|
gtk_container_remove(_SELF(self), GTK_WIDGET(RVAL2GOBJ(other)));
|
@@ -41,18 +39,14 @@ cont_remove(self, other)
|
|
41
39
|
}
|
42
40
|
|
43
41
|
static VALUE
|
44
|
-
cont_check_resize(self)
|
45
|
-
VALUE self;
|
42
|
+
cont_check_resize(VALUE self)
|
46
43
|
{
|
47
44
|
gtk_container_check_resize(_SELF(self));
|
48
45
|
return self;
|
49
46
|
}
|
50
47
|
|
51
48
|
static VALUE
|
52
|
-
cont_foreach(argc, argv, self)
|
53
|
-
int argc;
|
54
|
-
VALUE *argv;
|
55
|
-
VALUE self;
|
49
|
+
cont_foreach(int argc, VALUE *argv, VALUE self)
|
56
50
|
{
|
57
51
|
VALUE callback;
|
58
52
|
|
@@ -65,10 +59,7 @@ cont_foreach(argc, argv, self)
|
|
65
59
|
}
|
66
60
|
|
67
61
|
static VALUE
|
68
|
-
cont_forall(argc, argv, self)
|
69
|
-
int argc;
|
70
|
-
VALUE *argv;
|
71
|
-
VALUE self;
|
62
|
+
cont_forall(int argc, VALUE *argv, VALUE self)
|
72
63
|
{
|
73
64
|
VALUE callback;
|
74
65
|
|
@@ -81,15 +72,13 @@ cont_forall(argc, argv, self)
|
|
81
72
|
}
|
82
73
|
|
83
74
|
static VALUE
|
84
|
-
cont_get_children(self)
|
85
|
-
VALUE self;
|
75
|
+
cont_get_children(VALUE self)
|
86
76
|
{
|
87
77
|
return GLIST2ARYF(gtk_container_get_children(_SELF(self)));
|
88
78
|
}
|
89
79
|
|
90
80
|
static VALUE
|
91
|
-
cont_set_reallocate_redraws(self, needs_redraws)
|
92
|
-
VALUE self, needs_redraws;
|
81
|
+
cont_set_reallocate_redraws(VALUE self, VALUE needs_redraws)
|
93
82
|
{
|
94
83
|
gtk_container_set_reallocate_redraws(_SELF(self), RVAL2CBOOL(needs_redraws));
|
95
84
|
return self;
|
@@ -97,16 +86,14 @@ cont_set_reallocate_redraws(self, needs_redraws)
|
|
97
86
|
|
98
87
|
|
99
88
|
static VALUE
|
100
|
-
cont_set_focus_child(self, child)
|
101
|
-
VALUE self, child;
|
89
|
+
cont_set_focus_child(VALUE self, VALUE child)
|
102
90
|
{
|
103
91
|
gtk_container_set_focus_child(_SELF(self), GTK_WIDGET(RVAL2GOBJ(child)));
|
104
92
|
return self;
|
105
93
|
}
|
106
94
|
|
107
95
|
static VALUE
|
108
|
-
cont_set_focus_vadjustment(self, adjustment)
|
109
|
-
VALUE self, adjustment;
|
96
|
+
cont_set_focus_vadjustment(VALUE self, VALUE adjustment)
|
110
97
|
{
|
111
98
|
gtk_container_set_focus_vadjustment(_SELF(self),
|
112
99
|
NIL_P(adjustment) ? NULL : GTK_ADJUSTMENT(RVAL2GOBJ(adjustment)));
|
@@ -114,8 +101,7 @@ cont_set_focus_vadjustment(self, adjustment)
|
|
114
101
|
}
|
115
102
|
|
116
103
|
static VALUE
|
117
|
-
cont_set_focus_hadjustment(self, adjustment)
|
118
|
-
VALUE self, adjustment;
|
104
|
+
cont_set_focus_hadjustment(VALUE self, VALUE adjustment)
|
119
105
|
{
|
120
106
|
gtk_container_set_focus_hadjustment(_SELF(self),
|
121
107
|
NIL_P(adjustment) ? NULL : GTK_ADJUSTMENT(RVAL2GOBJ(adjustment)));
|
@@ -123,32 +109,28 @@ cont_set_focus_hadjustment(self, adjustment)
|
|
123
109
|
}
|
124
110
|
|
125
111
|
static VALUE
|
126
|
-
cont_get_focus_vadjustment(self)
|
127
|
-
VALUE self;
|
112
|
+
cont_get_focus_vadjustment(VALUE self)
|
128
113
|
{
|
129
114
|
GtkAdjustment* adj = gtk_container_get_focus_vadjustment(_SELF(self));
|
130
115
|
return adj ? GOBJ2RVAL(adj) : Qnil;
|
131
116
|
}
|
132
117
|
|
133
118
|
static VALUE
|
134
|
-
cont_get_focus_hadjustment(self)
|
135
|
-
VALUE self;
|
119
|
+
cont_get_focus_hadjustment(VALUE self)
|
136
120
|
{
|
137
121
|
GtkAdjustment* adj = gtk_container_get_focus_hadjustment(_SELF(self));
|
138
122
|
return adj ? GOBJ2RVAL(adj) : Qnil;
|
139
123
|
}
|
140
124
|
|
141
125
|
static VALUE
|
142
|
-
cont_get_resize_children(self)
|
143
|
-
VALUE self;
|
126
|
+
cont_get_resize_children(VALUE self)
|
144
127
|
{
|
145
128
|
gtk_container_resize_children(_SELF(self));
|
146
129
|
return self;
|
147
130
|
}
|
148
131
|
|
149
132
|
static VALUE
|
150
|
-
cont_get_child_type(self)
|
151
|
-
VALUE self;
|
133
|
+
cont_get_child_type(VALUE self)
|
152
134
|
{
|
153
135
|
return GTYPE2CLASS(gtk_container_child_type(_SELF(self)));
|
154
136
|
}
|
@@ -165,10 +147,7 @@ void gtk_container_child_set (GtkContainer *container,
|
|
165
147
|
*/
|
166
148
|
|
167
149
|
void
|
168
|
-
rbgtkcontainer_register_child_property_setter(gtype, name, func)
|
169
|
-
GType gtype;
|
170
|
-
const char* name;
|
171
|
-
RValueToGValueFunc func;
|
150
|
+
rbgtkcontainer_register_child_property_setter(GType gtype, const char *name, RValueToGValueFunc func)
|
172
151
|
{
|
173
152
|
GObjectClass* oclass;
|
174
153
|
GParamSpec* pspec;
|
@@ -189,10 +168,7 @@ rbgtkcontainer_register_child_property_setter(gtype, name, func)
|
|
189
168
|
}
|
190
169
|
|
191
170
|
void
|
192
|
-
rbgtkcontainer_register_child_property_getter(gtype, name, func)
|
193
|
-
GType gtype;
|
194
|
-
const char* name;
|
195
|
-
GValueToRValueFunc func;
|
171
|
+
rbgtkcontainer_register_child_property_getter(GType gtype, const char *name, GValueToRValueFunc func)
|
196
172
|
{
|
197
173
|
GObjectClass* oclass;
|
198
174
|
GParamSpec* pspec;
|
@@ -211,8 +187,7 @@ rbgtkcontainer_register_child_property_getter(gtype, name, func)
|
|
211
187
|
}
|
212
188
|
|
213
189
|
static VALUE
|
214
|
-
cont_child_get_property(self, child, prop_name)
|
215
|
-
VALUE self, child, prop_name;
|
190
|
+
cont_child_get_property(VALUE self, VALUE child, VALUE prop_name)
|
216
191
|
{
|
217
192
|
GParamSpec* pspec;
|
218
193
|
const char* name;
|
@@ -256,8 +231,7 @@ cont_child_get_property(self, child, prop_name)
|
|
256
231
|
}
|
257
232
|
|
258
233
|
static VALUE
|
259
|
-
cont_child_set_property(self, child, prop_name, val)
|
260
|
-
VALUE self, child, prop_name, val;
|
234
|
+
cont_child_set_property(VALUE self, VALUE child, VALUE prop_name, VALUE val)
|
261
235
|
{
|
262
236
|
GParamSpec* pspec;
|
263
237
|
const char* name;
|
@@ -306,10 +280,7 @@ cont_child_set_property(self, child, prop_name, val)
|
|
306
280
|
}
|
307
281
|
|
308
282
|
static VALUE
|
309
|
-
cont_add(argc, argv, self)
|
310
|
-
int argc;
|
311
|
-
VALUE *argv;
|
312
|
-
VALUE self;
|
283
|
+
cont_add(int argc, VALUE *argv, VALUE self)
|
313
284
|
{
|
314
285
|
VALUE other, properties;
|
315
286
|
GtkWidget *child;
|
@@ -353,8 +324,7 @@ void gtk_container_child_set_valist (GtkContainer *container,
|
|
353
324
|
*/
|
354
325
|
|
355
326
|
static VALUE
|
356
|
-
cont_propagate_expose(self, child, event)
|
357
|
-
VALUE self, child, event;
|
327
|
+
cont_propagate_expose(VALUE self, VALUE child, VALUE event)
|
358
328
|
{
|
359
329
|
gtk_container_propagate_expose(_SELF(self), GTK_WIDGET(RVAL2GOBJ(child)),
|
360
330
|
(GdkEventExpose *)RVAL2GEV(event));
|
@@ -362,8 +332,7 @@ cont_propagate_expose(self, child, event)
|
|
362
332
|
}
|
363
333
|
|
364
334
|
static VALUE
|
365
|
-
cont_get_focus_chain(self)
|
366
|
-
VALUE self;
|
335
|
+
cont_get_focus_chain(VALUE self)
|
367
336
|
{
|
368
337
|
gboolean ret;
|
369
338
|
GList *glist = NULL;
|
@@ -372,8 +341,7 @@ cont_get_focus_chain(self)
|
|
372
341
|
}
|
373
342
|
|
374
343
|
static VALUE
|
375
|
-
cont_set_focus_chain(self, focusable_widgets)
|
376
|
-
VALUE self, focusable_widgets;
|
344
|
+
cont_set_focus_chain(VALUE self, VALUE focusable_widgets)
|
377
345
|
{
|
378
346
|
int i;
|
379
347
|
GList *glist = NULL;
|
@@ -389,16 +357,14 @@ cont_set_focus_chain(self, focusable_widgets)
|
|
389
357
|
}
|
390
358
|
|
391
359
|
static VALUE
|
392
|
-
cont_unset_focus_chain(self)
|
393
|
-
VALUE self;
|
360
|
+
cont_unset_focus_chain(VALUE self)
|
394
361
|
{
|
395
362
|
gtk_container_unset_focus_chain(_SELF(self));
|
396
363
|
return self;
|
397
364
|
}
|
398
365
|
|
399
366
|
static VALUE
|
400
|
-
cont_s_child_property(self, property_name)
|
401
|
-
VALUE self, property_name;
|
367
|
+
cont_s_child_property(VALUE self, VALUE property_name)
|
402
368
|
{
|
403
369
|
GObjectClass* oclass;
|
404
370
|
const char* name;
|
@@ -425,10 +391,7 @@ cont_s_child_property(self, property_name)
|
|
425
391
|
}
|
426
392
|
|
427
393
|
static VALUE
|
428
|
-
cont_s_install_child_property(argc, argv, self)
|
429
|
-
int argc;
|
430
|
-
VALUE* argv;
|
431
|
-
VALUE self;
|
394
|
+
cont_s_install_child_property(int argc, VALUE *argv, VALUE self)
|
432
395
|
{
|
433
396
|
const RGObjClassInfo* cinfo = rbgobj_lookup_class(self);
|
434
397
|
GtkContainerClass* gclass;
|
@@ -452,10 +415,7 @@ cont_s_install_child_property(argc, argv, self)
|
|
452
415
|
}
|
453
416
|
|
454
417
|
static VALUE
|
455
|
-
cont_s_child_properties(argc, argv, self)
|
456
|
-
int argc;
|
457
|
-
VALUE* argv;
|
458
|
-
VALUE self;
|
418
|
+
cont_s_child_properties(int argc, VALUE *argv, VALUE self)
|
459
419
|
{
|
460
420
|
GObjectClass* oclass = g_type_class_ref(CLASS2GTYPE(self));
|
461
421
|
guint n_properties;
|
@@ -487,10 +447,7 @@ static GQuark q_ruby_setter;
|
|
487
447
|
static GQuark q_ruby_getter;
|
488
448
|
|
489
449
|
static VALUE
|
490
|
-
cont_initialize(argc, argv, self)
|
491
|
-
int argc;
|
492
|
-
VALUE *argv;
|
493
|
-
VALUE self;
|
450
|
+
cont_initialize(int argc, VALUE *argv, VALUE self)
|
494
451
|
{
|
495
452
|
VALUE params_hash;
|
496
453
|
GObject* gobj;
|