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/rbgdkimage.c
CHANGED
@@ -17,8 +17,7 @@
|
|
17
17
|
#define _SELF(i) GDK_IMAGE(RVAL2GOBJ(i))
|
18
18
|
|
19
19
|
static VALUE
|
20
|
-
gdkimage_initialize(self, type, visual, w, h)
|
21
|
-
VALUE self, type, visual, w, h;
|
20
|
+
gdkimage_initialize(VALUE self, VALUE type, VALUE visual, VALUE w, VALUE h)
|
22
21
|
{
|
23
22
|
GdkImage* image = gdk_image_new((GdkImageType)RVAL2GENUM(type, GDK_TYPE_IMAGE_TYPE),
|
24
23
|
GDK_VISUAL(RVAL2GOBJ(visual)),
|
@@ -33,23 +32,20 @@ gdkimage_initialize(self, type, visual, w, h)
|
|
33
32
|
}
|
34
33
|
|
35
34
|
static VALUE
|
36
|
-
gdkimage_get_colormap(self)
|
37
|
-
VALUE self;
|
35
|
+
gdkimage_get_colormap(VALUE self)
|
38
36
|
{
|
39
37
|
return GOBJ2RVAL(gdk_image_get_colormap(_SELF(self)));
|
40
38
|
}
|
41
39
|
|
42
40
|
static VALUE
|
43
|
-
gdkimage_set_colormap(self, colormap)
|
44
|
-
VALUE self;
|
41
|
+
gdkimage_set_colormap(VALUE self, VALUE colormap)
|
45
42
|
{
|
46
43
|
gdk_image_set_colormap(_SELF(self), RVAL2GOBJ(colormap));
|
47
44
|
return self;
|
48
45
|
}
|
49
46
|
|
50
47
|
static VALUE
|
51
|
-
gdkimage_put_pixel(self, x, y, pix)
|
52
|
-
VALUE self, x, y, pix;
|
48
|
+
gdkimage_put_pixel(VALUE self, VALUE x, VALUE y, VALUE pix)
|
53
49
|
{
|
54
50
|
gdk_image_put_pixel(_SELF(self),
|
55
51
|
NUM2INT(x), NUM2INT(y), NUM2INT(pix));
|
@@ -57,72 +53,62 @@ gdkimage_put_pixel(self, x, y, pix)
|
|
57
53
|
}
|
58
54
|
|
59
55
|
static VALUE
|
60
|
-
gdkimage_get_pixel(self, x, y)
|
61
|
-
VALUE self, x, y;
|
56
|
+
gdkimage_get_pixel(VALUE self, VALUE x, VALUE y)
|
62
57
|
{
|
63
58
|
return INT2NUM(gdk_image_get_pixel(_SELF(self),
|
64
59
|
NUM2INT(x), NUM2INT(y)));
|
65
60
|
}
|
66
61
|
|
67
62
|
static VALUE
|
68
|
-
gdkimage_image_type(self)
|
69
|
-
VALUE self;
|
63
|
+
gdkimage_image_type(VALUE self)
|
70
64
|
{
|
71
65
|
return GENUM2RVAL((_SELF(self))->type, GDK_TYPE_IMAGE_TYPE);
|
72
66
|
}
|
73
67
|
|
74
68
|
static VALUE
|
75
|
-
gdkimage_visual(self)
|
76
|
-
VALUE self;
|
69
|
+
gdkimage_visual(VALUE self)
|
77
70
|
{
|
78
71
|
return GOBJ2RVAL((_SELF(self))->visual);
|
79
72
|
}
|
80
73
|
|
81
74
|
static VALUE
|
82
|
-
gdkimage_byte_order(self)
|
83
|
-
VALUE self;
|
75
|
+
gdkimage_byte_order(VALUE self)
|
84
76
|
{
|
85
77
|
return GENUM2RVAL((_SELF(self))->byte_order, GDK_TYPE_BYTE_ORDER);
|
86
78
|
}
|
87
79
|
|
88
80
|
static VALUE
|
89
|
-
gdkimage_bits_per_pixel(self)
|
90
|
-
VALUE self;
|
81
|
+
gdkimage_bits_per_pixel(VALUE self)
|
91
82
|
{
|
92
83
|
return INT2NUM((_SELF(self))->bits_per_pixel);
|
93
84
|
}
|
94
85
|
|
95
86
|
static VALUE
|
96
|
-
gdkimage_width(self)
|
97
|
-
VALUE self;
|
87
|
+
gdkimage_width(VALUE self)
|
98
88
|
{
|
99
89
|
return INT2NUM((_SELF(self))->width);
|
100
90
|
}
|
101
91
|
|
102
92
|
static VALUE
|
103
|
-
gdkimage_height(self)
|
104
|
-
VALUE self;
|
93
|
+
gdkimage_height(VALUE self)
|
105
94
|
{
|
106
95
|
return INT2NUM((_SELF(self))->height);
|
107
96
|
}
|
108
97
|
|
109
98
|
static VALUE
|
110
|
-
gdkimage_depth(self)
|
111
|
-
VALUE self;
|
99
|
+
gdkimage_depth(VALUE self)
|
112
100
|
{
|
113
101
|
return INT2NUM((_SELF(self))->depth);
|
114
102
|
}
|
115
103
|
|
116
104
|
static VALUE
|
117
|
-
gdkimage_bpp(self)
|
118
|
-
VALUE self;
|
105
|
+
gdkimage_bpp(VALUE self)
|
119
106
|
{
|
120
107
|
return INT2NUM((_SELF(self))->bpp);
|
121
108
|
}
|
122
109
|
|
123
110
|
static VALUE
|
124
|
-
gdkimage_bpl(self)
|
125
|
-
VALUE self;
|
111
|
+
gdkimage_bpl(VALUE self)
|
126
112
|
{
|
127
113
|
return INT2NUM((_SELF(self))->bpl);
|
128
114
|
}
|
data/ext/gtk2/rbgdkinput.c
CHANGED
@@ -18,18 +18,14 @@
|
|
18
18
|
#include "global.h"
|
19
19
|
|
20
20
|
static void
|
21
|
-
exec_input(data, source, condition)
|
22
|
-
gpointer data;
|
23
|
-
gint source;
|
24
|
-
GdkInputCondition condition;
|
21
|
+
exec_input(gpointer data, gint source, GdkInputCondition condition)
|
25
22
|
{
|
26
23
|
rb_funcall((VALUE)data, id_call, 1,
|
27
24
|
GFLAGS2RVAL(condition, GDK_TYPE_INPUT_CONDITION));
|
28
25
|
}
|
29
26
|
|
30
27
|
static VALUE
|
31
|
-
input_add(self, filedescriptor, gdk_input_condition)
|
32
|
-
VALUE self, filedescriptor, gdk_input_condition;
|
28
|
+
input_add(VALUE self, VALUE filedescriptor, VALUE gdk_input_condition)
|
33
29
|
{
|
34
30
|
VALUE id;
|
35
31
|
VALUE func;
|
@@ -45,8 +41,7 @@ input_add(self, filedescriptor, gdk_input_condition)
|
|
45
41
|
}
|
46
42
|
|
47
43
|
static VALUE
|
48
|
-
input_remove(self, id)
|
49
|
-
VALUE self, id;
|
44
|
+
input_remove(VALUE self, VALUE id)
|
50
45
|
{
|
51
46
|
gdk_input_remove(NUM2INT(id));
|
52
47
|
G_REMOVE_RELATIVE(self, id_relative_callbacks, id);
|
data/ext/gtk2/rbgdkkeymap.c
CHANGED
@@ -13,22 +13,19 @@
|
|
13
13
|
#define _SELF(s) GDK_KEYMAP(RVAL2GOBJ(s))
|
14
14
|
|
15
15
|
static VALUE
|
16
|
-
gdkkeymap_s_get_default(self)
|
17
|
-
VALUE self;
|
16
|
+
gdkkeymap_s_get_default(VALUE self)
|
18
17
|
{
|
19
18
|
return GOBJ2RVAL(gdk_keymap_get_default());
|
20
19
|
}
|
21
20
|
#if GTK_CHECK_VERSION(2,2,0)
|
22
21
|
static VALUE
|
23
|
-
gdkkeymap_s_get_for_display(self, display)
|
24
|
-
VALUE self, display;
|
22
|
+
gdkkeymap_s_get_for_display(VALUE self, VALUE display)
|
25
23
|
{
|
26
24
|
return GOBJ2RVAL(gdk_keymap_get_for_display(GDK_DISPLAY_OBJECT(RVAL2GOBJ(display))));
|
27
25
|
}
|
28
26
|
#endif
|
29
27
|
static VALUE
|
30
|
-
gdkkeymap_lookup_key(self, keycode, group, level)
|
31
|
-
VALUE self, keycode, group, level;
|
28
|
+
gdkkeymap_lookup_key(VALUE self, VALUE keycode, VALUE group, VALUE level)
|
32
29
|
{
|
33
30
|
GdkKeymapKey key;
|
34
31
|
|
@@ -40,8 +37,7 @@ gdkkeymap_lookup_key(self, keycode, group, level)
|
|
40
37
|
}
|
41
38
|
|
42
39
|
static VALUE
|
43
|
-
gdkkeymap_translate_keyboard_state(self, hardware_keycode, state, group)
|
44
|
-
VALUE self, hardware_keycode, state, group;
|
40
|
+
gdkkeymap_translate_keyboard_state(VALUE self, VALUE hardware_keycode, VALUE state, VALUE group)
|
45
41
|
{
|
46
42
|
guint keyval;
|
47
43
|
gint effective_group, level;
|
@@ -60,8 +56,7 @@ gdkkeymap_translate_keyboard_state(self, hardware_keycode, state, group)
|
|
60
56
|
}
|
61
57
|
|
62
58
|
static VALUE
|
63
|
-
gdkkeymap_get_entries_for_keyval(self, keyval)
|
64
|
-
VALUE self, keyval;
|
59
|
+
gdkkeymap_get_entries_for_keyval(VALUE self, VALUE keyval)
|
65
60
|
{
|
66
61
|
GdkKeymapKey* keys;
|
67
62
|
gint n_keys;
|
@@ -86,8 +81,7 @@ gdkkeymap_get_entries_for_keyval(self, keyval)
|
|
86
81
|
}
|
87
82
|
|
88
83
|
static VALUE
|
89
|
-
gdkkeymap_get_entries_for_keycode(self, hardware_keycode)
|
90
|
-
VALUE self, hardware_keycode;
|
84
|
+
gdkkeymap_get_entries_for_keycode(VALUE self, VALUE hardware_keycode)
|
91
85
|
{
|
92
86
|
GdkKeymapKey* keys;
|
93
87
|
guint* keyvals;
|
@@ -113,8 +107,7 @@ gdkkeymap_get_entries_for_keycode(self, hardware_keycode)
|
|
113
107
|
}
|
114
108
|
|
115
109
|
static VALUE
|
116
|
-
gdkkeymap_get_direction(self)
|
117
|
-
VALUE self;
|
110
|
+
gdkkeymap_get_direction(VALUE self)
|
118
111
|
{
|
119
112
|
return GENUM2RVAL(gdk_keymap_get_direction(_SELF(self)), PANGO_TYPE_DIRECTION);
|
120
113
|
}
|
data/ext/gtk2/rbgdkkeyval.c
CHANGED
@@ -16,37 +16,32 @@
|
|
16
16
|
#include <gdk/gdkkeysyms.h>
|
17
17
|
|
18
18
|
static VALUE
|
19
|
-
keyval_to_name(self, keyval)
|
20
|
-
VALUE self, keyval;
|
19
|
+
keyval_to_name(VALUE self, VALUE keyval)
|
21
20
|
{
|
22
21
|
gchar* name = gdk_keyval_name(NUM2UINT(keyval));
|
23
22
|
return name ? CSTR2RVAL(name) : Qnil;
|
24
23
|
}
|
25
24
|
|
26
25
|
static VALUE
|
27
|
-
keyval_from_name(self, keyval_name)
|
28
|
-
VALUE self, keyval_name;
|
26
|
+
keyval_from_name(VALUE self, VALUE keyval_name)
|
29
27
|
{
|
30
28
|
return UINT2NUM(gdk_keyval_from_name(RVAL2CSTR(keyval_name)));
|
31
29
|
}
|
32
30
|
|
33
31
|
static VALUE
|
34
|
-
keyval_is_upper(self, keyval)
|
35
|
-
VALUE self, keyval;
|
32
|
+
keyval_is_upper(VALUE self, VALUE keyval)
|
36
33
|
{
|
37
34
|
return CBOOL2RVAL(gdk_keyval_is_upper(NUM2UINT(keyval)));
|
38
35
|
}
|
39
36
|
|
40
37
|
static VALUE
|
41
|
-
keyval_is_lower(self, keyval)
|
42
|
-
VALUE self, keyval;
|
38
|
+
keyval_is_lower(VALUE self, VALUE keyval)
|
43
39
|
{
|
44
40
|
return CBOOL2RVAL(gdk_keyval_is_lower(NUM2UINT(keyval)));
|
45
41
|
}
|
46
42
|
|
47
43
|
static VALUE
|
48
|
-
keyval_convert_case(self, symbol)
|
49
|
-
VALUE self, symbol;
|
44
|
+
keyval_convert_case(VALUE self, VALUE symbol)
|
50
45
|
{
|
51
46
|
guint upper, lower;
|
52
47
|
gdk_keyval_convert_case(NUM2UINT(symbol), &lower, &upper);
|
@@ -54,29 +49,25 @@ keyval_convert_case(self, symbol)
|
|
54
49
|
}
|
55
50
|
|
56
51
|
static VALUE
|
57
|
-
keyval_to_upper(self, keyval)
|
58
|
-
VALUE self, keyval;
|
52
|
+
keyval_to_upper(VALUE self, VALUE keyval)
|
59
53
|
{
|
60
54
|
return INT2NUM(gdk_keyval_to_upper(NUM2UINT(keyval)));
|
61
55
|
}
|
62
56
|
|
63
57
|
static VALUE
|
64
|
-
keyval_to_lower(self, keyval)
|
65
|
-
VALUE self, keyval;
|
58
|
+
keyval_to_lower(VALUE self, VALUE keyval)
|
66
59
|
{
|
67
60
|
return INT2NUM(gdk_keyval_to_lower(NUM2UINT(keyval)));
|
68
61
|
}
|
69
62
|
|
70
63
|
static VALUE
|
71
|
-
keyval_to_unicode(self, keyval)
|
72
|
-
VALUE self, keyval;
|
64
|
+
keyval_to_unicode(VALUE self, VALUE keyval)
|
73
65
|
{
|
74
66
|
return UINT2NUM(gdk_keyval_to_unicode(NUM2UINT(keyval)));
|
75
67
|
}
|
76
68
|
|
77
69
|
static VALUE
|
78
|
-
unicode_to_keyval(self, wc)
|
79
|
-
VALUE self, wc;
|
70
|
+
unicode_to_keyval(VALUE self, VALUE wc)
|
80
71
|
{
|
81
72
|
VALUE unicode;
|
82
73
|
if (TYPE(wc) == T_STRING) {
|
data/ext/gtk2/rbgdkpango.c
CHANGED
@@ -13,10 +13,7 @@
|
|
13
13
|
#include "rbpango.h"
|
14
14
|
|
15
15
|
static VALUE
|
16
|
-
gdkpango_s_context_get(argc, argv, self)
|
17
|
-
int argc;
|
18
|
-
VALUE *argv;
|
19
|
-
VALUE self;
|
16
|
+
gdkpango_s_context_get(int argc, VALUE *argv, VALUE self)
|
20
17
|
{
|
21
18
|
VALUE screen, ret;
|
22
19
|
rb_scan_args(argc, argv, "01", &screen);
|
@@ -34,8 +31,7 @@ gdkpango_s_context_get(argc, argv, self)
|
|
34
31
|
}
|
35
32
|
|
36
33
|
static VALUE
|
37
|
-
gdkpango_context_set_colormap(self, colormap)
|
38
|
-
VALUE self, colormap;
|
34
|
+
gdkpango_context_set_colormap(VALUE self, VALUE colormap)
|
39
35
|
{
|
40
36
|
gdk_pango_context_set_colormap(PANGO_CONTEXT(RVAL2GOBJ(self)),
|
41
37
|
GDK_COLORMAP(RVAL2GOBJ(self)));
|
@@ -43,38 +39,33 @@ gdkpango_context_set_colormap(self, colormap)
|
|
43
39
|
}
|
44
40
|
|
45
41
|
static VALUE
|
46
|
-
gdkpango_attr_embossed_initialize(self, embossed)
|
47
|
-
VALUE self, embossed;
|
42
|
+
gdkpango_attr_embossed_initialize(VALUE self, VALUE embossed)
|
48
43
|
{
|
49
44
|
DATA_PTR(self) = gdk_pango_attr_embossed_new(RVAL2CBOOL(embossed));
|
50
45
|
return Qnil;
|
51
46
|
}
|
52
47
|
|
53
48
|
static VALUE
|
54
|
-
gdkpango_attr_embossed_value(self)
|
55
|
-
VALUE self;
|
49
|
+
gdkpango_attr_embossed_value(VALUE self)
|
56
50
|
{
|
57
51
|
return CBOOL2RVAL(((GdkPangoAttrEmbossed*)RVAL2ATTR(self))->embossed);
|
58
52
|
}
|
59
53
|
|
60
54
|
static VALUE
|
61
|
-
gdkpango_attr_stipple_initialize(self, stipple)
|
62
|
-
VALUE self, stipple;
|
55
|
+
gdkpango_attr_stipple_initialize(VALUE self, VALUE stipple)
|
63
56
|
{
|
64
57
|
DATA_PTR(self) = gdk_pango_attr_stipple_new(GDK_BITMAP(RVAL2GOBJ(stipple)));
|
65
58
|
return Qnil;
|
66
59
|
}
|
67
60
|
|
68
61
|
static VALUE
|
69
|
-
gdkpango_attr_stipple_value(self)
|
70
|
-
VALUE self;
|
62
|
+
gdkpango_attr_stipple_value(VALUE self)
|
71
63
|
{
|
72
64
|
return GOBJ2RVAL(((GdkPangoAttrStipple*)RVAL2ATTR(self))->stipple);
|
73
65
|
}
|
74
66
|
|
75
67
|
static VALUE
|
76
|
-
gdkpango_layout_get_clip_region(self, x_origin, y_origin, index_ranges)
|
77
|
-
VALUE self, x_origin, y_origin, index_ranges;
|
68
|
+
gdkpango_layout_get_clip_region(VALUE self, VALUE x_origin, VALUE y_origin, VALUE index_ranges)
|
78
69
|
{
|
79
70
|
int i;
|
80
71
|
gint len = RARRAY_LEN(index_ranges);
|
@@ -90,8 +81,7 @@ gdkpango_layout_get_clip_region(self, x_origin, y_origin, index_ranges)
|
|
90
81
|
}
|
91
82
|
|
92
83
|
static VALUE
|
93
|
-
gdkpango_layout_line_get_clip_region(self, x_origin, y_origin, index_ranges)
|
94
|
-
VALUE self, x_origin, y_origin, index_ranges;
|
84
|
+
gdkpango_layout_line_get_clip_region(VALUE self, VALUE x_origin, VALUE y_origin, VALUE index_ranges)
|
95
85
|
{
|
96
86
|
int i;
|
97
87
|
gint len = RARRAY_LEN(index_ranges);
|
@@ -16,10 +16,7 @@
|
|
16
16
|
#define _SELF(s) (GDK_PANGO_RENDERER(RVAL2GOBJ(s)))
|
17
17
|
|
18
18
|
static VALUE
|
19
|
-
prenderer_initialize(argc, argv, self)
|
20
|
-
int argc;
|
21
|
-
VALUE *argv;
|
22
|
-
VALUE self;
|
19
|
+
prenderer_initialize(int argc, VALUE *argv, VALUE self)
|
23
20
|
{
|
24
21
|
VALUE screen;
|
25
22
|
GdkScreen* gscreen;
|
@@ -38,10 +35,7 @@ prenderer_initialize(argc, argv, self)
|
|
38
35
|
}
|
39
36
|
|
40
37
|
static VALUE
|
41
|
-
prenderer_s_get_default(argc, argv, self)
|
42
|
-
int argc;
|
43
|
-
VALUE *argv;
|
44
|
-
VALUE self;
|
38
|
+
prenderer_s_get_default(int argc, VALUE *argv, VALUE self)
|
45
39
|
{
|
46
40
|
VALUE screen;
|
47
41
|
GdkScreen* gscreen;
|
@@ -57,16 +51,14 @@ prenderer_s_get_default(argc, argv, self)
|
|
57
51
|
}
|
58
52
|
|
59
53
|
static VALUE
|
60
|
-
prenderer_s_default(self)
|
61
|
-
VALUE self;
|
54
|
+
prenderer_s_default(VALUE self)
|
62
55
|
{
|
63
56
|
GdkScreen* gscreen = gdk_screen_get_default();
|
64
57
|
return GOBJ2RVAL(gdk_pango_renderer_get_default(gscreen));
|
65
58
|
}
|
66
59
|
|
67
60
|
static VALUE
|
68
|
-
prenderer_set_drawable(self, drawable)
|
69
|
-
VALUE self, drawable;
|
61
|
+
prenderer_set_drawable(VALUE self, VALUE drawable)
|
70
62
|
{
|
71
63
|
gdk_pango_renderer_set_drawable(_SELF(self),
|
72
64
|
GDK_DRAWABLE(RVAL2GOBJ(drawable)));
|
@@ -74,8 +66,7 @@ prenderer_set_drawable(self, drawable)
|
|
74
66
|
}
|
75
67
|
|
76
68
|
static VALUE
|
77
|
-
prenderer_set_gc(self, gc)
|
78
|
-
VALUE self, gc;
|
69
|
+
prenderer_set_gc(VALUE self, VALUE gc)
|
79
70
|
{
|
80
71
|
gdk_pango_renderer_set_gc(_SELF(self),
|
81
72
|
NIL_P(gc) ? NULL : GDK_GC(RVAL2GOBJ(gc)));
|
@@ -83,8 +74,7 @@ prenderer_set_gc(self, gc)
|
|
83
74
|
}
|
84
75
|
|
85
76
|
static VALUE
|
86
|
-
prenderer_set_stipple(self, part, stipple)
|
87
|
-
VALUE self, part, stipple;
|
77
|
+
prenderer_set_stipple(VALUE self, VALUE part, VALUE stipple)
|
88
78
|
{
|
89
79
|
#if HAVE_PANGO_RENDER_PART_GET_TYPE
|
90
80
|
gdk_pango_renderer_set_stipple(_SELF(self), RVAL2GENUM(part, PANGO_TYPE_RENDER_PART),
|
@@ -96,8 +86,7 @@ prenderer_set_stipple(self, part, stipple)
|
|
96
86
|
}
|
97
87
|
|
98
88
|
static VALUE
|
99
|
-
prenderer_set_override_color(self, part, color)
|
100
|
-
VALUE self, part, color;
|
89
|
+
prenderer_set_override_color(VALUE self, VALUE part, VALUE color)
|
101
90
|
{
|
102
91
|
#if HAVE_PANGO_RENDER_PART_GET_TYPE
|
103
92
|
gdk_pango_renderer_set_override_color(_SELF(self),
|
data/ext/gtk2/rbgdkpixbuf.c
CHANGED
@@ -14,10 +14,7 @@
|
|
14
14
|
#define _SELF(s) GDK_PIXBUF(RVAL2GOBJ(s))
|
15
15
|
|
16
16
|
static VALUE
|
17
|
-
pixbuf_render_threshold_alpha(self, bitmap, src_x, src_y, dest_x, dest_y,
|
18
|
-
width, height, alpha_threshold)
|
19
|
-
VALUE self, bitmap, src_x, src_y, dest_x, dest_y,
|
20
|
-
width, height, alpha_threshold;
|
17
|
+
pixbuf_render_threshold_alpha(VALUE self, VALUE bitmap, VALUE src_x, VALUE src_y, VALUE dest_x, VALUE dest_y, VALUE width, VALUE height, VALUE alpha_threshold)
|
21
18
|
{
|
22
19
|
gdk_pixbuf_render_threshold_alpha(_SELF(self), GDK_BITMAP(RVAL2GOBJ(bitmap)),
|
23
20
|
NUM2INT(src_x), NUM2INT(src_y),
|
@@ -28,10 +25,7 @@ pixbuf_render_threshold_alpha(self, bitmap, src_x, src_y, dest_x, dest_y,
|
|
28
25
|
}
|
29
26
|
|
30
27
|
static VALUE
|
31
|
-
pixbuf_render_to_drawable(argc, argv, self)
|
32
|
-
int argc;
|
33
|
-
VALUE *argv;
|
34
|
-
VALUE self;
|
28
|
+
pixbuf_render_to_drawable(int argc, VALUE *argv, VALUE self)
|
35
29
|
{
|
36
30
|
VALUE gc, src_x, src_y, dest_x, dest_y, width, height,
|
37
31
|
dither, x_dither, y_dither;
|
@@ -71,10 +65,7 @@ pixbuf_render_to_drawable(argc, argv, self)
|
|
71
65
|
}
|
72
66
|
|
73
67
|
static VALUE
|
74
|
-
pixbuf_render_pixmap_and_mask(argc, argv, self)
|
75
|
-
int argc;
|
76
|
-
VALUE *argv;
|
77
|
-
VALUE self;
|
68
|
+
pixbuf_render_pixmap_and_mask(int argc, VALUE *argv, VALUE self)
|
78
69
|
{
|
79
70
|
VALUE colormap_or_alpha, alpha;
|
80
71
|
GdkPixmap *pixmap;
|
@@ -102,10 +93,7 @@ pixbuf_render_pixmap_and_mask(argc, argv, self)
|
|
102
93
|
}
|
103
94
|
|
104
95
|
static VALUE
|
105
|
-
pixbuf_s_from_drawable(argc, argv, self)
|
106
|
-
int argc;
|
107
|
-
VALUE *argv;
|
108
|
-
VALUE self;
|
96
|
+
pixbuf_s_from_drawable(int argc, VALUE *argv, VALUE self)
|
109
97
|
{
|
110
98
|
VALUE cmap, src, src_x, src_y, width, height, dest, dest_x, dest_y;
|
111
99
|
GdkPixbuf* buf;
|
@@ -132,10 +120,7 @@ pixbuf_s_from_drawable(argc, argv, self)
|
|
132
120
|
}
|
133
121
|
|
134
122
|
static VALUE
|
135
|
-
pixbuf_s_from_image(argc, argv, self)
|
136
|
-
int argc;
|
137
|
-
VALUE *argv;
|
138
|
-
VALUE self;
|
123
|
+
pixbuf_s_from_image(int argc, VALUE *argv, VALUE self)
|
139
124
|
{
|
140
125
|
VALUE cmap, src, src_x, src_y, width, height, dest, dest_x, dest_y;
|
141
126
|
GdkPixbuf* buf;
|