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/rbgtktextchild.c
CHANGED
@@ -15,25 +15,20 @@
|
|
15
15
|
#define _SELF(self) GTK_TEXT_CHILD_ANCHOR(RVAL2GOBJ(self))
|
16
16
|
|
17
17
|
static VALUE
|
18
|
-
textchild_initialize(argc, argv, self)
|
19
|
-
int argc;
|
20
|
-
VALUE* argv;
|
21
|
-
VALUE self;
|
18
|
+
textchild_initialize(int argc, VALUE *argv, VALUE self)
|
22
19
|
{
|
23
20
|
RBGTK_INITIALIZE(self, gtk_text_child_anchor_new());
|
24
21
|
return Qnil;
|
25
22
|
}
|
26
23
|
|
27
24
|
static VALUE
|
28
|
-
textchild_get_widgets(self)
|
29
|
-
VALUE self;
|
25
|
+
textchild_get_widgets(VALUE self)
|
30
26
|
{
|
31
27
|
return GLIST2ARYF(gtk_text_child_anchor_get_widgets(_SELF(self)));
|
32
28
|
}
|
33
29
|
|
34
30
|
static VALUE
|
35
|
-
textchild_get_deleted(self)
|
36
|
-
VALUE self;
|
31
|
+
textchild_get_deleted(VALUE self)
|
37
32
|
{
|
38
33
|
return CBOOL2RVAL(gtk_text_child_anchor_get_deleted(_SELF(self)));
|
39
34
|
}
|
data/ext/gtk2/rbgtktextiter.c
CHANGED
@@ -20,16 +20,14 @@ static gboolean is_compat_240;
|
|
20
20
|
static ID id_pixbuf;
|
21
21
|
|
22
22
|
static VALUE
|
23
|
-
get_buffer(self)
|
24
|
-
VALUE self;
|
23
|
+
get_buffer(VALUE self)
|
25
24
|
{
|
26
25
|
return GOBJ2RVAL(gtk_text_iter_get_buffer(_SELF(self)));
|
27
26
|
}
|
28
27
|
|
29
28
|
#define def_gint_getter(__name__) \
|
30
29
|
static VALUE \
|
31
|
-
get_##__name__(self) \
|
32
|
-
VALUE self; \
|
30
|
+
get_##__name__(VALUE self) \
|
33
31
|
{ \
|
34
32
|
return INT2NUM(gtk_text_iter_get_##__name__(_SELF(self))); \
|
35
33
|
}
|
@@ -42,8 +40,7 @@ def_gint_getter(visible_line_offset)
|
|
42
40
|
def_gint_getter(visible_line_index)
|
43
41
|
|
44
42
|
static VALUE
|
45
|
-
get_char(self)
|
46
|
-
VALUE self;
|
43
|
+
get_char(VALUE self)
|
47
44
|
{
|
48
45
|
gchar buf[10];
|
49
46
|
gint len = g_unichar_to_utf8(gtk_text_iter_get_char(_SELF(self)), buf);
|
@@ -52,36 +49,31 @@ get_char(self)
|
|
52
49
|
}
|
53
50
|
|
54
51
|
static VALUE
|
55
|
-
get_slice(self, rhs)
|
56
|
-
VALUE self, rhs;
|
52
|
+
get_slice(VALUE self, VALUE rhs)
|
57
53
|
{
|
58
54
|
return CSTR2RVAL(gtk_text_iter_get_slice(_SELF(self), _SELF(rhs)));
|
59
55
|
}
|
60
56
|
|
61
57
|
static VALUE
|
62
|
-
get_text(self, rhs)
|
63
|
-
VALUE self, rhs;
|
58
|
+
get_text(VALUE self, VALUE rhs)
|
64
59
|
{
|
65
60
|
return CSTR2RVAL(gtk_text_iter_get_text(_SELF(self), _SELF(rhs)));
|
66
61
|
}
|
67
62
|
|
68
63
|
static VALUE
|
69
|
-
get_visible_slice(self, rhs)
|
70
|
-
VALUE self, rhs;
|
64
|
+
get_visible_slice(VALUE self, VALUE rhs)
|
71
65
|
{
|
72
66
|
return CSTR2RVAL(gtk_text_iter_get_visible_slice(_SELF(self), _SELF(rhs)));
|
73
67
|
}
|
74
68
|
|
75
69
|
static VALUE
|
76
|
-
get_visible_text(self, rhs)
|
77
|
-
VALUE self, rhs;
|
70
|
+
get_visible_text(VALUE self, VALUE rhs)
|
78
71
|
{
|
79
72
|
return CSTR2RVAL(gtk_text_iter_get_visible_text(_SELF(self), _SELF(rhs)));
|
80
73
|
}
|
81
74
|
|
82
75
|
static VALUE
|
83
|
-
get_pixbuf(self)
|
84
|
-
VALUE self;
|
76
|
+
get_pixbuf(VALUE self)
|
85
77
|
{
|
86
78
|
GdkPixbuf* pixbuf = gtk_text_iter_get_pixbuf(_SELF(self));
|
87
79
|
VALUE ret = Qnil;
|
@@ -93,72 +85,62 @@ get_pixbuf(self)
|
|
93
85
|
}
|
94
86
|
|
95
87
|
static VALUE
|
96
|
-
get_marks(self)
|
97
|
-
VALUE self;
|
88
|
+
get_marks(VALUE self)
|
98
89
|
{
|
99
90
|
return GSLIST2ARYF(gtk_text_iter_get_marks(_SELF(self)));
|
100
91
|
}
|
101
92
|
|
102
93
|
static VALUE
|
103
|
-
get_toggled_tags(self, toggled_on)
|
104
|
-
VALUE self, toggled_on;
|
94
|
+
get_toggled_tags(VALUE self, VALUE toggled_on)
|
105
95
|
{
|
106
96
|
return GSLIST2ARYF(gtk_text_iter_get_toggled_tags(_SELF(self), RVAL2CBOOL(toggled_on)));
|
107
97
|
}
|
108
98
|
|
109
99
|
static VALUE
|
110
|
-
get_child_anchor(self)
|
111
|
-
VALUE self;
|
100
|
+
get_child_anchor(VALUE self)
|
112
101
|
{
|
113
102
|
GtkTextChildAnchor* anchor = gtk_text_iter_get_child_anchor(_SELF(self));
|
114
103
|
return anchor ? GOBJ2RVAL(anchor) : Qnil;
|
115
104
|
}
|
116
105
|
|
117
106
|
static VALUE
|
118
|
-
begins_tag(self, tag)
|
119
|
-
VALUE self, tag;
|
107
|
+
begins_tag(VALUE self, VALUE tag)
|
120
108
|
{
|
121
109
|
return CBOOL2RVAL(gtk_text_iter_begins_tag(_SELF(self), RVAL2TAG(tag)));
|
122
110
|
}
|
123
111
|
|
124
112
|
static VALUE
|
125
|
-
ends_tag(self, tag)
|
126
|
-
VALUE self, tag;
|
113
|
+
ends_tag(VALUE self, VALUE tag)
|
127
114
|
{
|
128
115
|
return CBOOL2RVAL(gtk_text_iter_ends_tag(_SELF(self), RVAL2TAG(tag)));
|
129
116
|
}
|
130
117
|
|
131
118
|
static VALUE
|
132
|
-
toggles_tag(self, tag)
|
133
|
-
VALUE self, tag;
|
119
|
+
toggles_tag(VALUE self, VALUE tag)
|
134
120
|
{
|
135
121
|
return CBOOL2RVAL(gtk_text_iter_toggles_tag(_SELF(self), RVAL2TAG(tag)));
|
136
122
|
}
|
137
123
|
|
138
124
|
static VALUE
|
139
|
-
has_tag(self, tag)
|
140
|
-
VALUE self, tag;
|
125
|
+
has_tag(VALUE self, VALUE tag)
|
141
126
|
{
|
142
127
|
return CBOOL2RVAL(gtk_text_iter_has_tag(_SELF(self), RVAL2TAG(tag)));
|
143
128
|
}
|
144
129
|
|
145
130
|
static VALUE
|
146
|
-
get_tags(self)
|
147
|
-
VALUE self;
|
131
|
+
get_tags(VALUE self)
|
148
132
|
{
|
149
133
|
return GSLIST2ARYF(gtk_text_iter_get_tags(_SELF(self)));
|
150
134
|
}
|
151
135
|
|
152
136
|
static VALUE
|
153
|
-
editable(self, default_setting)
|
154
|
-
VALUE self, default_setting;
|
137
|
+
editable(VALUE self, VALUE default_setting)
|
155
138
|
{
|
156
139
|
return CBOOL2RVAL(gtk_text_iter_editable(_SELF(self), RVAL2CBOOL(default_setting)));
|
157
140
|
}
|
158
141
|
|
159
142
|
static VALUE
|
160
|
-
can_insert(self, default_setting)
|
161
|
-
VALUE self, default_setting;
|
143
|
+
can_insert(VALUE self, VALUE default_setting)
|
162
144
|
{
|
163
145
|
return CBOOL2RVAL(gtk_text_iter_can_insert(_SELF(self), RVAL2CBOOL(default_setting)));
|
164
146
|
}
|
@@ -166,8 +148,7 @@ can_insert(self, default_setting)
|
|
166
148
|
|
167
149
|
#define def_predicate(__name__) \
|
168
150
|
static VALUE \
|
169
|
-
__name__(self) \
|
170
|
-
VALUE self; \
|
151
|
+
__name__(VALUE self) \
|
171
152
|
{ \
|
172
153
|
return CBOOL2RVAL(gtk_text_iter_##__name__(_SELF(self))); \
|
173
154
|
}
|
@@ -185,8 +166,7 @@ def_gint_getter(chars_in_line)
|
|
185
166
|
def_gint_getter(bytes_in_line)
|
186
167
|
|
187
168
|
static VALUE
|
188
|
-
get_attributes(self)
|
189
|
-
VALUE self;
|
169
|
+
get_attributes(VALUE self)
|
190
170
|
{
|
191
171
|
GtkTextAttributes attr;
|
192
172
|
|
@@ -198,8 +178,7 @@ get_attributes(self)
|
|
198
178
|
}
|
199
179
|
|
200
180
|
static VALUE
|
201
|
-
get_language(self)
|
202
|
-
VALUE self;
|
181
|
+
get_language(VALUE self)
|
203
182
|
{
|
204
183
|
return CSTR2RVAL(pango_language_to_string(gtk_text_iter_get_language(_SELF(self))));
|
205
184
|
}
|
@@ -210,16 +189,14 @@ def_predicate(is_start)
|
|
210
189
|
|
211
190
|
#define def_move(__name__) \
|
212
191
|
static VALUE \
|
213
|
-
__name__(self) \
|
214
|
-
VALUE self; \
|
192
|
+
__name__(VALUE self) \
|
215
193
|
{ \
|
216
194
|
return CBOOL2RVAL(gtk_text_iter_##__name__(_SELF(self))); \
|
217
195
|
}
|
218
196
|
|
219
197
|
#define def_move_gint(__name__) \
|
220
198
|
static VALUE \
|
221
|
-
__name__(self, i) \
|
222
|
-
VALUE self, i; \
|
199
|
+
__name__(VALUE self, VALUE i) \
|
223
200
|
{ \
|
224
201
|
return CBOOL2RVAL(gtk_text_iter_##__name__(_SELF(self), NUM2INT(i))); \
|
225
202
|
}
|
@@ -264,8 +241,7 @@ def_move_gint(backward_cursor_positions)
|
|
264
241
|
def_move(forward_to_line_end)
|
265
242
|
|
266
243
|
static VALUE
|
267
|
-
forward_to_end(self)
|
268
|
-
VALUE self;
|
244
|
+
forward_to_end(VALUE self)
|
269
245
|
{
|
270
246
|
gtk_text_iter_forward_to_end(_SELF(self));
|
271
247
|
return self;
|
@@ -273,8 +249,7 @@ forward_to_end(self)
|
|
273
249
|
|
274
250
|
#define def_gint_setter(__name__) \
|
275
251
|
static VALUE \
|
276
|
-
set_##__name__(self, val) \
|
277
|
-
VALUE self, val; \
|
252
|
+
set_##__name__(VALUE self, VALUE val) \
|
278
253
|
{ \
|
279
254
|
gtk_text_iter_set_##__name__(_SELF(self), NUM2INT(val)); \
|
280
255
|
return val; \
|
@@ -289,10 +264,7 @@ def_gint_setter(visible_line_offset)
|
|
289
264
|
def_gint_setter(visible_line_index)
|
290
265
|
|
291
266
|
static VALUE
|
292
|
-
forward_to_tag_toggle(argc, argv, self)
|
293
|
-
int argc;
|
294
|
-
VALUE *argv;
|
295
|
-
VALUE self;
|
267
|
+
forward_to_tag_toggle(int argc, VALUE *argv, VALUE self)
|
296
268
|
{
|
297
269
|
VALUE tag;
|
298
270
|
|
@@ -302,10 +274,7 @@ forward_to_tag_toggle(argc, argv, self)
|
|
302
274
|
}
|
303
275
|
|
304
276
|
static VALUE
|
305
|
-
backward_to_tag_toggle(argc, argv, self)
|
306
|
-
int argc;
|
307
|
-
VALUE *argv;
|
308
|
-
VALUE self;
|
277
|
+
backward_to_tag_toggle(int argc, VALUE *argv, VALUE self)
|
309
278
|
{
|
310
279
|
VALUE tag;
|
311
280
|
|
@@ -315,18 +284,13 @@ backward_to_tag_toggle(argc, argv, self)
|
|
315
284
|
}
|
316
285
|
|
317
286
|
static gboolean
|
318
|
-
char_predicate_func(ch, func)
|
319
|
-
guint32 ch;
|
320
|
-
gpointer func;
|
287
|
+
char_predicate_func(guint32 ch, gpointer func)
|
321
288
|
{
|
322
289
|
return RVAL2CBOOL(rb_funcall((VALUE)func, id_call, 1, UINT2NUM(ch)));
|
323
290
|
}
|
324
291
|
|
325
292
|
static VALUE
|
326
|
-
forward_find_char(argc, argv, self)
|
327
|
-
int argc;
|
328
|
-
VALUE *argv;
|
329
|
-
VALUE self;
|
293
|
+
forward_find_char(int argc, VALUE *argv, VALUE self)
|
330
294
|
{
|
331
295
|
VALUE limit;
|
332
296
|
volatile VALUE func = rb_block_proc();
|
@@ -339,10 +303,7 @@ forward_find_char(argc, argv, self)
|
|
339
303
|
}
|
340
304
|
|
341
305
|
static VALUE
|
342
|
-
backward_find_char(argc, argv, self)
|
343
|
-
int argc;
|
344
|
-
VALUE *argv;
|
345
|
-
VALUE self;
|
306
|
+
backward_find_char(int argc, VALUE *argv, VALUE self)
|
346
307
|
{
|
347
308
|
VALUE limit;
|
348
309
|
volatile VALUE func = rb_block_proc();
|
@@ -355,10 +316,7 @@ backward_find_char(argc, argv, self)
|
|
355
316
|
}
|
356
317
|
|
357
318
|
static VALUE
|
358
|
-
forward_search(argc, argv, self)
|
359
|
-
int argc;
|
360
|
-
VALUE *argv;
|
361
|
-
VALUE self;
|
319
|
+
forward_search(int argc, VALUE *argv, VALUE self)
|
362
320
|
{
|
363
321
|
GtkTextIter m_start, m_end;
|
364
322
|
VALUE str, flags, limit;
|
@@ -381,10 +339,7 @@ forward_search(argc, argv, self)
|
|
381
339
|
}
|
382
340
|
|
383
341
|
static VALUE
|
384
|
-
backward_search(argc, argv, self)
|
385
|
-
int argc;
|
386
|
-
VALUE *argv;
|
387
|
-
VALUE self;
|
342
|
+
backward_search(int argc, VALUE *argv, VALUE self)
|
388
343
|
{
|
389
344
|
GtkTextIter m_start, m_end;
|
390
345
|
VALUE str, flags, limit;
|
@@ -406,15 +361,13 @@ backward_search(argc, argv, self)
|
|
406
361
|
}
|
407
362
|
|
408
363
|
static VALUE
|
409
|
-
equal(self, other)
|
410
|
-
VALUE self, other;
|
364
|
+
equal(VALUE self, VALUE other)
|
411
365
|
{
|
412
366
|
return CBOOL2RVAL(gtk_text_iter_equal(_SELF(self), _SELF(other)));
|
413
367
|
}
|
414
368
|
|
415
369
|
static VALUE
|
416
|
-
compare(self, rhs)
|
417
|
-
VALUE self, rhs;
|
370
|
+
compare(VALUE self, VALUE rhs)
|
418
371
|
{
|
419
372
|
return INT2NUM(gtk_text_iter_compare(_SELF(self), _SELF(rhs)));
|
420
373
|
}
|
data/ext/gtk2/rbgtktextmark.c
CHANGED
@@ -15,8 +15,7 @@
|
|
15
15
|
|
16
16
|
#if GTK_CHECK_VERSION(2,12,0)
|
17
17
|
static VALUE
|
18
|
-
initialize(self, name, left_gravity)
|
19
|
-
VALUE self, name, left_gravity;
|
18
|
+
initialize(VALUE self, VALUE name, VALUE left_gravity)
|
20
19
|
{
|
21
20
|
if (NIL_P(name))
|
22
21
|
G_INITIALIZE(self, gtk_text_mark_new(NULL, RVAL2CBOOL(left_gravity)));
|
@@ -27,44 +26,38 @@ initialize(self, name, left_gravity)
|
|
27
26
|
#endif
|
28
27
|
|
29
28
|
static VALUE
|
30
|
-
set_visible(self, setting)
|
31
|
-
VALUE self, setting;
|
29
|
+
set_visible(VALUE self, VALUE setting)
|
32
30
|
{
|
33
31
|
gtk_text_mark_set_visible(_SELF(self), RVAL2CBOOL(setting));
|
34
32
|
return setting;
|
35
33
|
}
|
36
34
|
|
37
35
|
static VALUE
|
38
|
-
get_visible(self)
|
39
|
-
VALUE self;
|
36
|
+
get_visible(VALUE self)
|
40
37
|
{
|
41
38
|
return CBOOL2RVAL(gtk_text_mark_get_visible(_SELF(self)));
|
42
39
|
}
|
43
40
|
|
44
41
|
static VALUE
|
45
|
-
get_name(self)
|
46
|
-
VALUE self;
|
42
|
+
get_name(VALUE self)
|
47
43
|
{
|
48
44
|
return CSTR2RVAL(gtk_text_mark_get_name(_SELF(self)));
|
49
45
|
}
|
50
46
|
|
51
47
|
static VALUE
|
52
|
-
get_deleted(self)
|
53
|
-
VALUE self;
|
48
|
+
get_deleted(VALUE self)
|
54
49
|
{
|
55
50
|
return CBOOL2RVAL(gtk_text_mark_get_deleted(_SELF(self)));
|
56
51
|
}
|
57
52
|
|
58
53
|
static VALUE
|
59
|
-
get_buffer(self)
|
60
|
-
VALUE self;
|
54
|
+
get_buffer(VALUE self)
|
61
55
|
{
|
62
56
|
return GOBJ2RVAL(gtk_text_mark_get_buffer(_SELF(self)));
|
63
57
|
}
|
64
58
|
|
65
59
|
static VALUE
|
66
|
-
get_left_gravity(self)
|
67
|
-
VALUE self;
|
60
|
+
get_left_gravity(VALUE self)
|
68
61
|
{
|
69
62
|
return CBOOL2RVAL(gtk_text_mark_get_left_gravity(_SELF(self)));
|
70
63
|
}
|
data/ext/gtk2/rbgtktexttag.c
CHANGED
@@ -12,10 +12,7 @@
|
|
12
12
|
#include "global.h"
|
13
13
|
|
14
14
|
static VALUE
|
15
|
-
initialize(argc, argv, self)
|
16
|
-
int argc;
|
17
|
-
VALUE* argv;
|
18
|
-
VALUE self;
|
15
|
+
initialize(int argc, VALUE *argv, VALUE self)
|
19
16
|
{
|
20
17
|
VALUE name;
|
21
18
|
rb_scan_args(argc, argv, "01", &name);
|
@@ -24,23 +21,20 @@ initialize(argc, argv, self)
|
|
24
21
|
}
|
25
22
|
|
26
23
|
static VALUE
|
27
|
-
get_priority(self)
|
28
|
-
VALUE self;
|
24
|
+
get_priority(VALUE self)
|
29
25
|
{
|
30
26
|
return INT2NUM(gtk_text_tag_get_priority(GTK_TEXT_TAG(RVAL2GOBJ(self))));
|
31
27
|
}
|
32
28
|
|
33
29
|
static VALUE
|
34
|
-
set_priority(self, priority)
|
35
|
-
VALUE self, priority;
|
30
|
+
set_priority(VALUE self, VALUE priority)
|
36
31
|
{
|
37
32
|
gtk_text_tag_set_priority(GTK_TEXT_TAG(RVAL2GOBJ(self)), NUM2INT(priority));
|
38
33
|
return priority;
|
39
34
|
}
|
40
35
|
|
41
36
|
static VALUE
|
42
|
-
event(self, event_object, event, iter)
|
43
|
-
VALUE self, event_object, event, iter;
|
37
|
+
event(VALUE self, VALUE event_object, VALUE event, VALUE iter)
|
44
38
|
{
|
45
39
|
gboolean ret = gtk_text_tag_event(GTK_TEXT_TAG(RVAL2GOBJ(self)),
|
46
40
|
RVAL2GOBJ(event_object),
|
@@ -14,16 +14,14 @@
|
|
14
14
|
#define RVAL2TAG(t) (GTK_TEXT_TAG(RVAL2GOBJ(t)))
|
15
15
|
|
16
16
|
static VALUE
|
17
|
-
txt_tt_initialize(self)
|
18
|
-
VALUE self;
|
17
|
+
txt_tt_initialize(VALUE self)
|
19
18
|
{
|
20
19
|
G_INITIALIZE(self, gtk_text_tag_table_new());
|
21
20
|
return Qnil;
|
22
21
|
}
|
23
22
|
|
24
23
|
static VALUE
|
25
|
-
txt_tt_add(self, tag)
|
26
|
-
VALUE self, tag;
|
24
|
+
txt_tt_add(VALUE self, VALUE tag)
|
27
25
|
{
|
28
26
|
G_CHILD_ADD(self, tag);
|
29
27
|
gtk_text_tag_table_add(_SELF(self), RVAL2TAG(tag));
|
@@ -31,8 +29,7 @@ txt_tt_add(self, tag)
|
|
31
29
|
}
|
32
30
|
|
33
31
|
static VALUE
|
34
|
-
txt_tt_remove(self, tag)
|
35
|
-
VALUE self, tag;
|
32
|
+
txt_tt_remove(VALUE self, VALUE tag)
|
36
33
|
{
|
37
34
|
G_CHILD_REMOVE(self, tag);
|
38
35
|
gtk_text_tag_table_remove(_SELF(self), RVAL2TAG(tag));
|
@@ -40,8 +37,7 @@ txt_tt_remove(self, tag)
|
|
40
37
|
}
|
41
38
|
|
42
39
|
static VALUE
|
43
|
-
txt_tt_lookup(self, name)
|
44
|
-
VALUE self, name;
|
40
|
+
txt_tt_lookup(VALUE self, VALUE name)
|
45
41
|
{
|
46
42
|
VALUE ret = Qnil;
|
47
43
|
GtkTextTag* tag = gtk_text_tag_table_lookup(_SELF(self), RVAL2CSTR(name));
|
@@ -53,16 +49,13 @@ txt_tt_lookup(self, name)
|
|
53
49
|
}
|
54
50
|
|
55
51
|
static gboolean
|
56
|
-
txt_tt_foreach_func(tag, func)
|
57
|
-
GtkTextTag *tag;
|
58
|
-
gpointer func;
|
52
|
+
txt_tt_foreach_func(GtkTextTag *tag, gpointer func)
|
59
53
|
{
|
60
54
|
return RVAL2CBOOL(rb_funcall((VALUE)func, id_call, 1, GOBJ2RVAL(tag)));
|
61
55
|
}
|
62
56
|
|
63
57
|
static VALUE
|
64
|
-
txt_tt_foreach(self)
|
65
|
-
VALUE self;
|
58
|
+
txt_tt_foreach(VALUE self)
|
66
59
|
{
|
67
60
|
volatile VALUE func = rb_block_proc();
|
68
61
|
gtk_text_tag_table_foreach(_SELF(self),
|
@@ -72,8 +65,7 @@ txt_tt_foreach(self)
|
|
72
65
|
}
|
73
66
|
|
74
67
|
static VALUE
|
75
|
-
txt_tt_get_size(self)
|
76
|
-
VALUE self;
|
68
|
+
txt_tt_get_size(VALUE self)
|
77
69
|
{
|
78
70
|
return INT2NUM(gtk_text_tag_table_get_size(_SELF(self)));
|
79
71
|
}
|