gtk2 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +66 -1
- data/ext/gtk2/extconf.rb +0 -96
- data/ext/gtk2/global.h +274 -13
- data/ext/gtk2/gtk2.def +5 -3
- data/ext/gtk2/init.c +263 -19
- data/ext/gtk2/rbgdk.c +245 -89
- data/ext/gtk2/rbgdk.h +32 -6
- data/ext/gtk2/rbgdkatom.c +38 -28
- data/ext/gtk2/rbgdkcairo.c +32 -42
- data/ext/gtk2/rbgdkcolor.c +52 -42
- data/ext/gtk2/rbgdkcolormap.c +42 -37
- data/ext/gtk2/rbgdkconst.c +23 -13
- data/ext/gtk2/rbgdkconversions.h +19 -6
- data/ext/gtk2/rbgdkcursor.c +37 -25
- data/ext/gtk2/rbgdkdevice.c +77 -67
- data/ext/gtk2/rbgdkdisplay.c +158 -150
- data/ext/gtk2/rbgdkdisplaymanager.c +27 -15
- data/ext/gtk2/rbgdkdragcontext.c +121 -70
- data/ext/gtk2/rbgdkdraw.c +252 -160
- data/ext/gtk2/rbgdkevent.c +30 -20
- data/ext/gtk2/rbgdkgc.c +123 -116
- data/ext/gtk2/rbgdkgeometry.c +77 -68
- data/ext/gtk2/rbgdkimage.c +58 -47
- data/ext/gtk2/rbgdkinput.c +33 -26
- data/ext/gtk2/rbgdkkeymap.c +38 -27
- data/ext/gtk2/rbgdkkeyval.c +44 -32
- data/ext/gtk2/rbgdkpango.c +66 -39
- data/ext/gtk2/rbgdkpangorenderer.c +63 -35
- data/ext/gtk2/rbgdkpixbuf.c +36 -25
- data/ext/gtk2/rbgdkpixmap.c +65 -49
- data/ext/gtk2/rbgdkproperty.c +66 -60
- data/ext/gtk2/rbgdkrectangle.c +54 -46
- data/ext/gtk2/rbgdkregion.c +144 -79
- data/ext/gtk2/rbgdkrgb.c +74 -58
- data/ext/gtk2/rbgdkscreen.c +103 -97
- data/ext/gtk2/rbgdkselection.c +49 -39
- data/ext/gtk2/rbgdkthreads.c +32 -19
- data/ext/gtk2/rbgdktimecoord.c +60 -38
- data/ext/gtk2/rbgdkvisual.c +79 -71
- data/ext/gtk2/rbgdkwindow.c +284 -305
- data/ext/gtk2/rbgdkwindowattr.c +69 -58
- data/ext/gtk2/rbgdkx11.c +41 -28
- data/ext/gtk2/rbgtk.c +498 -19
- data/ext/gtk2/rbgtk.h +35 -20
- data/ext/gtk2/rbgtkaboutdialog.c +33 -80
- data/ext/gtk2/rbgtkaccelerator.c +36 -23
- data/ext/gtk2/rbgtkaccelgroup.c +50 -40
- data/ext/gtk2/rbgtkaccelgroupentry.c +32 -20
- data/ext/gtk2/rbgtkaccelkey.c +40 -28
- data/ext/gtk2/rbgtkaccellabel.c +30 -18
- data/ext/gtk2/rbgtkaccelmap.c +55 -42
- data/ext/gtk2/rbgtkaccessible.c +25 -14
- data/ext/gtk2/rbgtkaction.c +68 -68
- data/ext/gtk2/rbgtkactiongroup.c +317 -195
- data/ext/gtk2/rbgtkadjustment.c +33 -46
- data/ext/gtk2/rbgtkalignment.c +36 -24
- data/ext/gtk2/rbgtkallocation.c +53 -42
- data/ext/gtk2/rbgtkarrow.c +34 -22
- data/ext/gtk2/rbgtkaspectframe.c +32 -20
- data/ext/gtk2/rbgtkassistant.c +81 -61
- data/ext/gtk2/rbgtkbbox.c +32 -20
- data/ext/gtk2/rbgtkbin.c +28 -16
- data/ext/gtk2/rbgtkbindingset.c +42 -35
- data/ext/gtk2/rbgtkborder.c +34 -23
- data/ext/gtk2/rbgtkbox.c +40 -29
- data/ext/gtk2/rbgtkbuildable.c +57 -45
- data/ext/gtk2/rbgtkbuilder.c +53 -38
- data/ext/gtk2/rbgtkbutton.c +41 -55
- data/ext/gtk2/rbgtkcalendar.c +51 -40
- data/ext/gtk2/rbgtkcelleditable.c +28 -17
- data/ext/gtk2/rbgtkcelllayout.c +41 -30
- data/ext/gtk2/rbgtkcellrenderer.c +43 -32
- data/ext/gtk2/rbgtkcellrendereraccel.c +26 -18
- data/ext/gtk2/rbgtkcellrenderercombo.c +25 -17
- data/ext/gtk2/rbgtkcellrendererpixbuf.c +24 -17
- data/ext/gtk2/rbgtkcellrendererprogress.c +25 -17
- data/ext/gtk2/rbgtkcellrendererspin.c +24 -16
- data/ext/gtk2/rbgtkcellrendererspinner.c +23 -11
- data/ext/gtk2/rbgtkcellrenderertext.c +28 -21
- data/ext/gtk2/rbgtkcellrenderertoggle.c +24 -16
- data/ext/gtk2/rbgtkcellview.c +34 -33
- data/ext/gtk2/rbgtkcheckbutton.c +28 -16
- data/ext/gtk2/rbgtkcheckmenuitem.c +31 -19
- data/ext/gtk2/rbgtkclipboard.c +123 -77
- data/ext/gtk2/rbgtkcolorbutton.c +26 -31
- data/ext/gtk2/rbgtkcolorsel.c +109 -55
- data/ext/gtk2/rbgtkcolorselectiondialog.c +28 -19
- data/ext/gtk2/rbgtkcombo.c +43 -32
- data/ext/gtk2/rbgtkcombobox.c +44 -83
- data/ext/gtk2/rbgtkcomboboxentry.c +26 -21
- data/ext/gtk2/rbgtkconst.c +23 -13
- data/ext/gtk2/rbgtkcontainer.c +153 -100
- data/ext/gtk2/rbgtkconversions.h +19 -6
- data/ext/gtk2/rbgtkcurve.c +46 -36
- data/ext/gtk2/rbgtkdialog.c +104 -70
- data/ext/gtk2/rbgtkdrag.c +173 -121
- data/ext/gtk2/rbgtkdrawingarea.c +28 -16
- data/ext/gtk2/rbgtkeditable.c +63 -51
- data/ext/gtk2/rbgtkentry.c +48 -85
- data/ext/gtk2/rbgtkentrycompletion.c +42 -55
- data/ext/gtk2/rbgtkeventbox.c +28 -16
- data/ext/gtk2/rbgtkexpander.c +26 -35
- data/ext/gtk2/rbgtkfilechooser.c +87 -143
- data/ext/gtk2/rbgtkfilechooserbutton.c +26 -32
- data/ext/gtk2/rbgtkfilechooserdialog.c +25 -15
- data/ext/gtk2/rbgtkfilechooserwidget.c +26 -15
- data/ext/gtk2/rbgtkfilefilter.c +45 -35
- data/ext/gtk2/rbgtkfilesel.c +54 -43
- data/ext/gtk2/rbgtkfilesystemerror.c +51 -0
- data/ext/gtk2/rbgtkfixed.c +36 -25
- data/ext/gtk2/rbgtkfontbutton.c +26 -37
- data/ext/gtk2/rbgtkfontselection.c +27 -15
- data/ext/gtk2/rbgtkfontselectiondialog.c +43 -32
- data/ext/gtk2/rbgtkframe.c +39 -28
- data/ext/gtk2/rbgtkgamma.c +32 -20
- data/ext/gtk2/rbgtkhandlebox.c +31 -19
- data/ext/gtk2/rbgtkhbbox.c +28 -16
- data/ext/gtk2/rbgtkhbox.c +29 -17
- data/ext/gtk2/rbgtkhpaned.c +28 -16
- data/ext/gtk2/rbgtkhruler.c +28 -16
- data/ext/gtk2/rbgtkhscale.c +28 -16
- data/ext/gtk2/rbgtkhscrollbar.c +28 -16
- data/ext/gtk2/rbgtkhseparator.c +28 -16
- data/ext/gtk2/rbgtkiconfactory.c +35 -23
- data/ext/gtk2/rbgtkiconinfo.c +42 -30
- data/ext/gtk2/rbgtkiconset.c +31 -19
- data/ext/gtk2/rbgtkiconsize.c +38 -25
- data/ext/gtk2/rbgtkiconsource.c +62 -50
- data/ext/gtk2/rbgtkicontheme.c +95 -95
- data/ext/gtk2/rbgtkiconview.c +87 -121
- data/ext/gtk2/rbgtkimage.c +31 -40
- data/ext/gtk2/rbgtkimagemenuitem.c +26 -14
- data/ext/gtk2/rbgtkimcontext.c +46 -34
- data/ext/gtk2/rbgtkimcontextsimple.c +47 -24
- data/ext/gtk2/rbgtkimmulticontext.c +26 -14
- data/ext/gtk2/rbgtkinputdialog.c +28 -16
- data/ext/gtk2/rbgtkinvisible.c +24 -18
- data/ext/gtk2/rbgtkitem.c +32 -20
- data/ext/gtk2/rbgtkitemfactory.c +65 -57
- data/ext/gtk2/rbgtklabel.c +46 -57
- data/ext/gtk2/rbgtklayout.c +40 -29
- data/ext/gtk2/rbgtklinkbutton.c +26 -15
- data/ext/gtk2/rbgtkliststore.c +145 -102
- data/ext/gtk2/rbgtkmacros.h +19 -6
- data/ext/gtk2/rbgtkmenu.c +47 -59
- data/ext/gtk2/rbgtkmenubar.c +30 -30
- data/ext/gtk2/rbgtkmenuitem.c +34 -41
- data/ext/gtk2/rbgtkmenushell.c +43 -42
- data/ext/gtk2/rbgtkmenutoolbutton.c +27 -16
- data/ext/gtk2/rbgtkmessagedialog.c +31 -25
- data/ext/gtk2/rbgtkmisc.c +33 -22
- data/ext/gtk2/rbgtknotebook.c +98 -134
- data/ext/gtk2/rbgtkobject.c +46 -81
- data/ext/gtk2/rbgtkoptionmenu.c +35 -23
- data/ext/gtk2/rbgtkpagesetup.c +64 -54
- data/ext/gtk2/rbgtkpagesetupunixdialog.c +34 -27
- data/ext/gtk2/rbgtkpaned.c +46 -36
- data/ext/gtk2/rbgtkpapersize.c +60 -54
- data/ext/gtk2/rbgtkplug.c +32 -20
- data/ext/gtk2/rbgtkprintcontext.c +43 -35
- data/ext/gtk2/rbgtkprinter.c +36 -37
- data/ext/gtk2/rbgtkprintjob.c +36 -37
- data/ext/gtk2/rbgtkprintoperation.c +44 -33
- data/ext/gtk2/rbgtkprintoperationpreview.c +30 -18
- data/ext/gtk2/rbgtkprintsettings.c +248 -192
- data/ext/gtk2/rbgtkprintunixdialog.c +33 -45
- data/ext/gtk2/rbgtkprogress.c +23 -13
- data/ext/gtk2/rbgtkprogressbar.c +47 -46
- data/ext/gtk2/rbgtkradioaction.c +84 -39
- data/ext/gtk2/rbgtkradiobutton.c +33 -21
- data/ext/gtk2/rbgtkradiomenuitem.c +86 -45
- data/ext/gtk2/rbgtkradiotoolbutton.c +99 -53
- data/ext/gtk2/rbgtkrange.c +36 -56
- data/ext/gtk2/rbgtkrc.c +61 -49
- data/ext/gtk2/rbgtkrcstyle.c +59 -48
- data/ext/gtk2/rbgtkrecentaction.c +28 -16
- data/ext/gtk2/rbgtkrecentchooser.c +58 -92
- data/ext/gtk2/rbgtkrecentchooserdialog.c +29 -18
- data/ext/gtk2/rbgtkrecentchoosermenu.c +25 -21
- data/ext/gtk2/rbgtkrecentchooserwidget.c +24 -13
- data/ext/gtk2/rbgtkrecentdata.c +47 -36
- data/ext/gtk2/rbgtkrecentfilter.c +55 -46
- data/ext/gtk2/rbgtkrecentfilterinfo.c +51 -40
- data/ext/gtk2/rbgtkrecentinfo.c +66 -56
- data/ext/gtk2/rbgtkrecentmanager.c +47 -43
- data/ext/gtk2/rbgtkruler.c +35 -30
- data/ext/gtk2/rbgtkscale.c +29 -18
- data/ext/gtk2/rbgtkscalebutton.c +27 -27
- data/ext/gtk2/rbgtkscrollbar.c +23 -13
- data/ext/gtk2/rbgtkscrolledwindow.c +44 -60
- data/ext/gtk2/rbgtkselection.c +87 -67
- data/ext/gtk2/rbgtkselectiondata.c +74 -65
- data/ext/gtk2/rbgtkseparator.c +23 -13
- data/ext/gtk2/rbgtkseparatormenuitem.c +25 -13
- data/ext/gtk2/rbgtkseparatortoolitem.c +26 -21
- data/ext/gtk2/rbgtksettings.c +123 -103
- data/ext/gtk2/rbgtksizegroup.c +33 -30
- data/ext/gtk2/rbgtksocket.c +32 -20
- data/ext/gtk2/rbgtkspinbutton.c +48 -38
- data/ext/gtk2/rbgtkspinner.c +27 -14
- data/ext/gtk2/rbgtkstatusbar.c +36 -31
- data/ext/gtk2/rbgtkstatusicon.c +31 -44
- data/ext/gtk2/rbgtkstock.c +137 -125
- data/ext/gtk2/rbgtkstyle.c +177 -161
- data/ext/gtk2/rbgtktable.c +58 -47
- data/ext/gtk2/rbgtktargetlist.c +56 -36
- data/ext/gtk2/rbgtktearoffmenuitem.c +28 -16
- data/ext/gtk2/rbgtktextappearance.c +44 -34
- data/ext/gtk2/rbgtktextattributes.c +54 -42
- data/ext/gtk2/rbgtktextbuffer.c +188 -191
- data/ext/gtk2/rbgtktextchild.c +29 -18
- data/ext/gtk2/rbgtktextiter.c +153 -145
- data/ext/gtk2/rbgtktextmark.c +33 -30
- data/ext/gtk2/rbgtktexttag.c +34 -22
- data/ext/gtk2/rbgtktexttagtable.c +36 -25
- data/ext/gtk2/rbgtktextview.c +85 -73
- data/ext/gtk2/rbgtktoggleaction.c +27 -22
- data/ext/gtk2/rbgtktogglebutton.c +37 -26
- data/ext/gtk2/rbgtktoggletoolbutton.c +26 -20
- data/ext/gtk2/rbgtktoolbar.c +66 -69
- data/ext/gtk2/rbgtktoolbutton.c +27 -40
- data/ext/gtk2/rbgtktoolitem.c +60 -62
- data/ext/gtk2/rbgtktooltip.c +36 -25
- data/ext/gtk2/rbgtktooltips.c +42 -34
- data/ext/gtk2/rbgtktreedragdest.c +20 -11
- data/ext/gtk2/rbgtktreedragsource.c +20 -11
- data/ext/gtk2/rbgtktreeiter.c +58 -47
- data/ext/gtk2/rbgtktreemodel.c +83 -65
- data/ext/gtk2/rbgtktreemodelfilter.c +47 -35
- data/ext/gtk2/rbgtktreemodelsort.c +38 -27
- data/ext/gtk2/rbgtktreepath.c +55 -44
- data/ext/gtk2/rbgtktreerowreference.c +60 -42
- data/ext/gtk2/rbgtktreeselection.c +61 -52
- data/ext/gtk2/rbgtktreesortable.c +52 -42
- data/ext/gtk2/rbgtktreestore.c +88 -67
- data/ext/gtk2/rbgtktreeview.c +157 -185
- data/ext/gtk2/rbgtktreeviewcolumn.c +57 -62
- data/ext/gtk2/rbgtkuimanager.c +61 -61
- data/ext/gtk2/rbgtkvbbox.c +28 -16
- data/ext/gtk2/rbgtkvbox.c +29 -17
- data/ext/gtk2/rbgtkviewport.c +28 -16
- data/ext/gtk2/rbgtkvolumebutton.c +28 -16
- data/ext/gtk2/rbgtkvpaned.c +28 -16
- data/ext/gtk2/rbgtkvruler.c +28 -16
- data/ext/gtk2/rbgtkvscale.c +28 -16
- data/ext/gtk2/rbgtkvscrollbar.c +28 -16
- data/ext/gtk2/rbgtkvseparator.c +28 -16
- data/ext/gtk2/rbgtkwidget.c +284 -296
- data/ext/gtk2/rbgtkwindow.c +156 -214
- data/ext/gtk2/rbgtkwindowgroup.c +35 -24
- data/sample/testgtk/labels.rb +1 -0
- data/sample/testgtk/testgtk.rb +2 -0
- metadata +16 -17
- data/ChangeLog +0 -6902
- data/ext/gtk2/rbgtkmain.c +0 -493
data/ext/gtk2/rbgtktextmark.c
CHANGED
@@ -1,21 +1,32 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2002,2003 Masahiro Sakai
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
11
21
|
|
12
22
|
#include "global.h"
|
13
23
|
|
24
|
+
#define RG_TARGET_NAMESPACE cTextMark
|
14
25
|
#define _SELF(s) (GTK_TEXT_MARK(RVAL2GOBJ(s)))
|
15
26
|
|
16
27
|
#if GTK_CHECK_VERSION(2,12,0)
|
17
28
|
static VALUE
|
18
|
-
|
29
|
+
rg_initialize(VALUE self, VALUE name, VALUE left_gravity)
|
19
30
|
{
|
20
31
|
if (NIL_P(name))
|
21
32
|
G_INITIALIZE(self, gtk_text_mark_new(NULL, RVAL2CBOOL(left_gravity)));
|
@@ -26,48 +37,40 @@ initialize(VALUE self, VALUE name, VALUE left_gravity)
|
|
26
37
|
#endif
|
27
38
|
|
28
39
|
static VALUE
|
29
|
-
|
40
|
+
rg_set_visible(VALUE self, VALUE setting)
|
30
41
|
{
|
31
42
|
gtk_text_mark_set_visible(_SELF(self), RVAL2CBOOL(setting));
|
32
43
|
return setting;
|
33
44
|
}
|
34
45
|
|
35
46
|
static VALUE
|
36
|
-
|
47
|
+
rg_visible_p(VALUE self)
|
37
48
|
{
|
38
49
|
return CBOOL2RVAL(gtk_text_mark_get_visible(_SELF(self)));
|
39
50
|
}
|
40
51
|
|
41
|
-
/* Defined as Properties:
|
42
|
-
const gchar * gtk_text_mark_get_name (GtkTextMark *mark);
|
43
|
-
*/
|
44
|
-
|
45
52
|
static VALUE
|
46
|
-
|
53
|
+
rg_deleted_p(VALUE self)
|
47
54
|
{
|
48
55
|
return CBOOL2RVAL(gtk_text_mark_get_deleted(_SELF(self)));
|
49
56
|
}
|
50
57
|
|
51
58
|
static VALUE
|
52
|
-
|
59
|
+
rg_buffer(VALUE self)
|
53
60
|
{
|
54
61
|
return GOBJ2RVAL(gtk_text_mark_get_buffer(_SELF(self)));
|
55
62
|
}
|
56
63
|
|
57
|
-
/* Defined as Properties:
|
58
|
-
gboolean gtk_text_mark_get_left_gravity (GtkTextMark *mark);
|
59
|
-
*/
|
60
|
-
|
61
64
|
void
|
62
|
-
Init_gtk_textmark()
|
65
|
+
Init_gtk_textmark(VALUE mGtk)
|
63
66
|
{
|
64
|
-
VALUE
|
67
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_TEXT_MARK, "TextMark", mGtk);
|
65
68
|
#if GTK_CHECK_VERSION(2,12,0)
|
66
|
-
|
69
|
+
RG_DEF_METHOD(initialize, 2);
|
67
70
|
#endif
|
68
|
-
|
69
|
-
G_DEF_SETTER(
|
70
|
-
|
71
|
-
|
72
|
-
|
71
|
+
RG_DEF_METHOD(set_visible, 1);
|
72
|
+
G_DEF_SETTER(RG_TARGET_NAMESPACE, "visible");
|
73
|
+
RG_DEF_METHOD_P(visible, 0);
|
74
|
+
RG_DEF_METHOD_P(deleted, 0);
|
75
|
+
RG_DEF_METHOD(buffer, 0);
|
73
76
|
}
|
data/ext/gtk2/rbgtktexttag.c
CHANGED
@@ -1,18 +1,30 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2002,2003 Masahiro Sakai
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
11
21
|
|
12
22
|
#include "global.h"
|
13
23
|
|
24
|
+
#define RG_TARGET_NAMESPACE cTextTag
|
25
|
+
|
14
26
|
static VALUE
|
15
|
-
|
27
|
+
rg_initialize(int argc, VALUE *argv, VALUE self)
|
16
28
|
{
|
17
29
|
VALUE name;
|
18
30
|
rb_scan_args(argc, argv, "01", &name);
|
@@ -21,20 +33,20 @@ initialize(int argc, VALUE *argv, VALUE self)
|
|
21
33
|
}
|
22
34
|
|
23
35
|
static VALUE
|
24
|
-
|
36
|
+
rg_priority(VALUE self)
|
25
37
|
{
|
26
38
|
return INT2NUM(gtk_text_tag_get_priority(GTK_TEXT_TAG(RVAL2GOBJ(self))));
|
27
39
|
}
|
28
40
|
|
29
41
|
static VALUE
|
30
|
-
|
42
|
+
rg_set_priority(VALUE self, VALUE priority)
|
31
43
|
{
|
32
44
|
gtk_text_tag_set_priority(GTK_TEXT_TAG(RVAL2GOBJ(self)), NUM2INT(priority));
|
33
45
|
return priority;
|
34
46
|
}
|
35
47
|
|
36
48
|
static VALUE
|
37
|
-
|
49
|
+
rg_event(VALUE self, VALUE event_object, VALUE event, VALUE iter)
|
38
50
|
{
|
39
51
|
gboolean ret = gtk_text_tag_event(GTK_TEXT_TAG(RVAL2GOBJ(self)),
|
40
52
|
RVAL2GOBJ(event_object),
|
@@ -44,16 +56,16 @@ event(VALUE self, VALUE event_object, VALUE event, VALUE iter)
|
|
44
56
|
}
|
45
57
|
|
46
58
|
void
|
47
|
-
Init_gtk_texttag()
|
59
|
+
Init_gtk_texttag(VALUE mGtk)
|
48
60
|
{
|
49
|
-
VALUE
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
G_DEF_SETTER(
|
54
|
-
|
61
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_TEXT_TAG, "TextTag", mGtk);
|
62
|
+
RG_DEF_METHOD(initialize, -1);
|
63
|
+
RG_DEF_METHOD(priority, 0);
|
64
|
+
RG_DEF_METHOD(set_priority, 1);
|
65
|
+
G_DEF_SETTER(RG_TARGET_NAMESPACE, "priority");
|
66
|
+
RG_DEF_METHOD(event, 3);
|
55
67
|
|
56
68
|
/* GtkWrapMode */
|
57
|
-
G_DEF_CLASS(GTK_TYPE_WRAP_MODE, "WrapMode",
|
58
|
-
G_DEF_CONSTANTS(
|
69
|
+
G_DEF_CLASS(GTK_TYPE_WRAP_MODE, "WrapMode", RG_TARGET_NAMESPACE);
|
70
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_WRAP_MODE, "GTK_");
|
59
71
|
}
|
@@ -1,27 +1,39 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2002,2003 OGASAWARA, Takeshi
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
3
21
|
|
4
|
-
rbgtktexttagtable.c -
|
5
|
-
|
6
|
-
$Author: ggc $
|
7
|
-
$Date: 2007/07/13 16:07:32 $
|
8
|
-
|
9
|
-
Copyright (C) 2002,2003 OGASAWARA, Takeshi
|
10
|
-
************************************************/
|
11
22
|
#include "global.h"
|
12
23
|
|
24
|
+
#define RG_TARGET_NAMESPACE cTextTagTable
|
13
25
|
#define _SELF(self) (GTK_TEXT_TAG_TABLE(RVAL2GOBJ(self)))
|
14
26
|
#define RVAL2TAG(t) (GTK_TEXT_TAG(RVAL2GOBJ(t)))
|
15
27
|
|
16
28
|
static VALUE
|
17
|
-
|
29
|
+
rg_initialize(VALUE self)
|
18
30
|
{
|
19
31
|
G_INITIALIZE(self, gtk_text_tag_table_new());
|
20
32
|
return Qnil;
|
21
33
|
}
|
22
34
|
|
23
35
|
static VALUE
|
24
|
-
|
36
|
+
rg_add(VALUE self, VALUE tag)
|
25
37
|
{
|
26
38
|
G_CHILD_ADD(self, tag);
|
27
39
|
gtk_text_tag_table_add(_SELF(self), RVAL2TAG(tag));
|
@@ -29,7 +41,7 @@ txt_tt_add(VALUE self, VALUE tag)
|
|
29
41
|
}
|
30
42
|
|
31
43
|
static VALUE
|
32
|
-
|
44
|
+
rg_remove(VALUE self, VALUE tag)
|
33
45
|
{
|
34
46
|
G_CHILD_REMOVE(self, tag);
|
35
47
|
gtk_text_tag_table_remove(_SELF(self), RVAL2TAG(tag));
|
@@ -37,7 +49,7 @@ txt_tt_remove(VALUE self, VALUE tag)
|
|
37
49
|
}
|
38
50
|
|
39
51
|
static VALUE
|
40
|
-
|
52
|
+
rg_lookup(VALUE self, VALUE name)
|
41
53
|
{
|
42
54
|
VALUE ret = Qnil;
|
43
55
|
GtkTextTag* tag = gtk_text_tag_table_lookup(_SELF(self), RVAL2CSTR(name));
|
@@ -55,7 +67,7 @@ txt_tt_foreach_func(GtkTextTag *tag, gpointer func)
|
|
55
67
|
}
|
56
68
|
|
57
69
|
static VALUE
|
58
|
-
|
70
|
+
rg_each(VALUE self)
|
59
71
|
{
|
60
72
|
volatile VALUE func = rb_block_proc();
|
61
73
|
gtk_text_tag_table_foreach(_SELF(self),
|
@@ -65,22 +77,21 @@ txt_tt_foreach(VALUE self)
|
|
65
77
|
}
|
66
78
|
|
67
79
|
static VALUE
|
68
|
-
|
80
|
+
rg_size(VALUE self)
|
69
81
|
{
|
70
82
|
return INT2NUM(gtk_text_tag_table_get_size(_SELF(self)));
|
71
83
|
}
|
72
84
|
|
73
|
-
void
|
74
|
-
|
85
|
+
void
|
86
|
+
Init_gtk_text_tag_table(VALUE mGtk)
|
75
87
|
{
|
76
|
-
VALUE
|
88
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_TEXT_TAG_TABLE, "TextTagTable", mGtk);
|
77
89
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
90
|
+
RG_DEF_METHOD(initialize, 0);
|
91
|
+
RG_DEF_METHOD(add, 1);
|
92
|
+
RG_DEF_METHOD(remove, 1);
|
93
|
+
RG_DEF_METHOD(lookup, 1);
|
94
|
+
RG_DEF_ALIAS("[]", "lookup");
|
95
|
+
RG_DEF_METHOD(each, 0);
|
96
|
+
RG_DEF_METHOD(size, 0);
|
85
97
|
}
|
86
|
-
|
data/ext/gtk2/rbgtktextview.c
CHANGED
@@ -1,15 +1,27 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2002-2005 Masao Mutoh
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
3
21
|
|
4
|
-
rbgtktextview.c -
|
5
|
-
|
6
|
-
$Author $
|
7
|
-
$Date: 2007/07/13 16:07:32 $
|
8
|
-
|
9
|
-
Copyright (C) 2002-2005 Masao Mutoh
|
10
|
-
************************************************/
|
11
22
|
#include "global.h"
|
12
23
|
|
24
|
+
#define RG_TARGET_NAMESPACE cTextView
|
13
25
|
#define _SELF(self) (GTK_TEXT_VIEW(RVAL2GOBJ(self)))
|
14
26
|
#define RVAL2BUFFER(b) (GTK_TEXT_BUFFER(RVAL2GOBJ(b)))
|
15
27
|
#define RVAL2MARK(m) (GTK_TEXT_MARK(RVAL2GOBJ(m)))
|
@@ -19,7 +31,7 @@
|
|
19
31
|
static ID id_buffer;
|
20
32
|
|
21
33
|
static VALUE
|
22
|
-
|
34
|
+
rg_initialize(int argc, VALUE *argv, VALUE self)
|
23
35
|
{
|
24
36
|
VALUE buffer;
|
25
37
|
GtkWidget* widget;
|
@@ -55,7 +67,7 @@ textview_get_buffer(VALUE self)
|
|
55
67
|
}
|
56
68
|
|
57
69
|
static VALUE
|
58
|
-
|
70
|
+
rg_scroll_to_mark(VALUE self, VALUE mark, VALUE within_margin, VALUE use_align, VALUE xalign, VALUE yalign)
|
59
71
|
{
|
60
72
|
gtk_text_view_scroll_to_mark(_SELF(self), RVAL2MARK(mark),
|
61
73
|
NUM2DBL(within_margin), RVAL2CBOOL(use_align),
|
@@ -64,7 +76,7 @@ textview_scroll_to_mark(VALUE self, VALUE mark, VALUE within_margin, VALUE use_a
|
|
64
76
|
}
|
65
77
|
|
66
78
|
static VALUE
|
67
|
-
|
79
|
+
rg_scroll_to_iter(VALUE self, VALUE iter, VALUE within_margin, VALUE use_align, VALUE xalign, VALUE yalign)
|
68
80
|
{
|
69
81
|
return CBOOL2RVAL(gtk_text_view_scroll_to_iter(_SELF(self), RVAL2ITR(iter),
|
70
82
|
NUM2DBL(within_margin), RVAL2CBOOL(use_align),
|
@@ -72,26 +84,26 @@ textview_scroll_to_iter(VALUE self, VALUE iter, VALUE within_margin, VALUE use_a
|
|
72
84
|
}
|
73
85
|
|
74
86
|
static VALUE
|
75
|
-
|
87
|
+
rg_scroll_mark_onscreen(VALUE self, VALUE mark)
|
76
88
|
{
|
77
89
|
gtk_text_view_scroll_mark_onscreen(_SELF(self), RVAL2MARK(mark));
|
78
90
|
return self;
|
79
91
|
}
|
80
92
|
|
81
93
|
static VALUE
|
82
|
-
|
94
|
+
rg_move_mark_onscreen(VALUE self, VALUE mark)
|
83
95
|
{
|
84
96
|
return CBOOL2RVAL(gtk_text_view_move_mark_onscreen(_SELF(self), RVAL2MARK(mark)));
|
85
97
|
}
|
86
98
|
|
87
99
|
static VALUE
|
88
|
-
|
100
|
+
rg_place_cursor_onscreen(VALUE self)
|
89
101
|
{
|
90
102
|
return CBOOL2RVAL(gtk_text_view_place_cursor_onscreen(_SELF(self)));
|
91
103
|
}
|
92
104
|
|
93
105
|
static VALUE
|
94
|
-
|
106
|
+
rg_visible_rect(VALUE self)
|
95
107
|
{
|
96
108
|
GdkRectangle rect;
|
97
109
|
gtk_text_view_get_visible_rect(_SELF(self), &rect);
|
@@ -99,7 +111,7 @@ textview_get_visible_rect(VALUE self)
|
|
99
111
|
}
|
100
112
|
|
101
113
|
static VALUE
|
102
|
-
|
114
|
+
rg_get_iter_location(VALUE self, VALUE iter)
|
103
115
|
{
|
104
116
|
GdkRectangle rect;
|
105
117
|
gtk_text_view_get_iter_location(_SELF(self), RVAL2ITR(iter), &rect);
|
@@ -107,7 +119,7 @@ textview_get_iter_location(VALUE self, VALUE iter)
|
|
107
119
|
}
|
108
120
|
|
109
121
|
static VALUE
|
110
|
-
|
122
|
+
rg_get_line_at_y(VALUE self, VALUE y)
|
111
123
|
{
|
112
124
|
GtkTextIter target_iter;
|
113
125
|
gint line_top;
|
@@ -116,7 +128,7 @@ textview_get_line_at_y(VALUE self, VALUE y)
|
|
116
128
|
}
|
117
129
|
|
118
130
|
static VALUE
|
119
|
-
|
131
|
+
rg_get_line_yrange(VALUE self, VALUE iter)
|
120
132
|
{
|
121
133
|
int y, height;
|
122
134
|
gtk_text_view_get_line_yrange(_SELF(self), RVAL2ITR(iter), &y, &height);
|
@@ -125,7 +137,7 @@ textview_get_line_yrange(VALUE self, VALUE iter)
|
|
125
137
|
}
|
126
138
|
|
127
139
|
static VALUE
|
128
|
-
|
140
|
+
rg_get_iter_at_location(VALUE self, VALUE x, VALUE y)
|
129
141
|
{
|
130
142
|
GtkTextIter iter;
|
131
143
|
gtk_text_view_get_iter_at_location(_SELF(self), &iter, NUM2INT(x), NUM2INT(y));
|
@@ -134,7 +146,7 @@ textview_get_iter_at_location(VALUE self, VALUE x, VALUE y)
|
|
134
146
|
|
135
147
|
#if GTK_CHECK_VERSION(2,6,0)
|
136
148
|
static VALUE
|
137
|
-
|
149
|
+
rg_get_iter_at_position(VALUE self, VALUE x, VALUE y)
|
138
150
|
{
|
139
151
|
GtkTextIter iter;
|
140
152
|
gint trailing;
|
@@ -144,7 +156,7 @@ textview_get_iter_at_position(VALUE self, VALUE x, VALUE y)
|
|
144
156
|
#endif
|
145
157
|
|
146
158
|
static VALUE
|
147
|
-
|
159
|
+
rg_buffer_to_window_coords(VALUE self, VALUE wintype, VALUE buffer_x, VALUE buffer_y)
|
148
160
|
{
|
149
161
|
int window_x, window_y;
|
150
162
|
gtk_text_view_buffer_to_window_coords(_SELF(self),
|
@@ -155,7 +167,7 @@ textview_buffer_to_window_coords(VALUE self, VALUE wintype, VALUE buffer_x, VALU
|
|
155
167
|
}
|
156
168
|
|
157
169
|
static VALUE
|
158
|
-
|
170
|
+
rg_window_to_buffer_coords(VALUE self, VALUE wintype, VALUE window_x, VALUE window_y)
|
159
171
|
{
|
160
172
|
int buffer_x, buffer_y;
|
161
173
|
gtk_text_view_window_to_buffer_coords(_SELF(self),
|
@@ -166,7 +178,7 @@ textview_window_to_buffer_coords(VALUE self, VALUE wintype, VALUE window_x, VALU
|
|
166
178
|
}
|
167
179
|
|
168
180
|
static VALUE
|
169
|
-
|
181
|
+
rg_get_window(VALUE self, VALUE wintype)
|
170
182
|
{
|
171
183
|
GdkWindow* win = NULL;
|
172
184
|
win = gtk_text_view_get_window(_SELF(self),
|
@@ -175,14 +187,14 @@ textview_get_window(VALUE self, VALUE wintype)
|
|
175
187
|
}
|
176
188
|
|
177
189
|
static VALUE
|
178
|
-
|
190
|
+
rg_get_window_type(VALUE self, VALUE gdkwin)
|
179
191
|
{
|
180
192
|
return GENUM2RVAL(gtk_text_view_get_window_type(_SELF(self), RVAL2GOBJ(gdkwin)),
|
181
193
|
GTK_TYPE_TEXT_WINDOW_TYPE);
|
182
194
|
}
|
183
195
|
|
184
196
|
static VALUE
|
185
|
-
|
197
|
+
rg_set_border_window_size(VALUE self, VALUE wintype, VALUE size)
|
186
198
|
{
|
187
199
|
gtk_text_view_set_border_window_size(_SELF(self),
|
188
200
|
RVAL2GENUM(wintype, GTK_TYPE_TEXT_WINDOW_TYPE),
|
@@ -191,7 +203,7 @@ textview_set_border_window_size(VALUE self, VALUE wintype, VALUE size)
|
|
191
203
|
}
|
192
204
|
|
193
205
|
static VALUE
|
194
|
-
|
206
|
+
rg_get_border_window_size(VALUE self, VALUE wintype)
|
195
207
|
{
|
196
208
|
return INT2NUM(gtk_text_view_get_border_window_size(
|
197
209
|
_SELF(self),
|
@@ -199,43 +211,43 @@ textview_get_border_window_size(VALUE self, VALUE wintype)
|
|
199
211
|
}
|
200
212
|
|
201
213
|
static VALUE
|
202
|
-
|
214
|
+
rg_forward_display_line(VALUE self, VALUE iter)
|
203
215
|
{
|
204
216
|
return CBOOL2RVAL(gtk_text_view_forward_display_line(_SELF(self), RVAL2ITR(iter)));
|
205
217
|
}
|
206
218
|
|
207
219
|
static VALUE
|
208
|
-
|
220
|
+
rg_backward_display_line(VALUE self, VALUE iter)
|
209
221
|
{
|
210
222
|
return CBOOL2RVAL(gtk_text_view_backward_display_line(_SELF(self), RVAL2ITR(iter)));
|
211
223
|
}
|
212
224
|
|
213
225
|
static VALUE
|
214
|
-
|
226
|
+
rg_forward_display_line_end(VALUE self, VALUE iter)
|
215
227
|
{
|
216
228
|
return CBOOL2RVAL(gtk_text_view_forward_display_line_end(_SELF(self), RVAL2ITR(iter)));
|
217
229
|
}
|
218
230
|
|
219
231
|
static VALUE
|
220
|
-
|
232
|
+
rg_backward_display_line_start(VALUE self, VALUE iter)
|
221
233
|
{
|
222
234
|
return CBOOL2RVAL(gtk_text_view_backward_display_line_start(_SELF(self), RVAL2ITR(iter)));
|
223
235
|
}
|
224
236
|
|
225
237
|
static VALUE
|
226
|
-
|
238
|
+
rg_starts_display_line(VALUE self, VALUE iter)
|
227
239
|
{
|
228
240
|
return CBOOL2RVAL(gtk_text_view_starts_display_line(_SELF(self), RVAL2ITR(iter)));
|
229
241
|
}
|
230
242
|
|
231
243
|
static VALUE
|
232
|
-
|
244
|
+
rg_move_visually(VALUE self, VALUE iter, VALUE count)
|
233
245
|
{
|
234
246
|
return CBOOL2RVAL(gtk_text_view_move_visually(_SELF(self), RVAL2ITR(iter), NUM2INT(count)));
|
235
247
|
}
|
236
248
|
|
237
249
|
static VALUE
|
238
|
-
|
250
|
+
rg_add_child_at_anchor(VALUE self, VALUE child, VALUE anchor)
|
239
251
|
{
|
240
252
|
G_CHILD_ADD(self, child);
|
241
253
|
gtk_text_view_add_child_at_anchor(_SELF(self), GTK_WIDGET(RVAL2GOBJ(child)),
|
@@ -244,7 +256,7 @@ textview_add_child_at_anchor(VALUE self, VALUE child, VALUE anchor)
|
|
244
256
|
}
|
245
257
|
|
246
258
|
static VALUE
|
247
|
-
|
259
|
+
rg_add_child_in_window(VALUE self, VALUE child, VALUE which_window, VALUE xpos, VALUE ypos)
|
248
260
|
{
|
249
261
|
G_CHILD_ADD(self, child);
|
250
262
|
gtk_text_view_add_child_in_window(_SELF(self), GTK_WIDGET(RVAL2GOBJ(child)),
|
@@ -254,7 +266,7 @@ textview_add_child_in_window(VALUE self, VALUE child, VALUE which_window, VALUE
|
|
254
266
|
}
|
255
267
|
|
256
268
|
static VALUE
|
257
|
-
|
269
|
+
rg_move_child(VALUE self, VALUE child, VALUE xpos, VALUE ypos)
|
258
270
|
{
|
259
271
|
G_CHILD_ADD(self, child);
|
260
272
|
gtk_text_view_move_child(_SELF(self), GTK_WIDGET(RVAL2GOBJ(child)),
|
@@ -263,56 +275,56 @@ textview_move_child(VALUE self, VALUE child, VALUE xpos, VALUE ypos)
|
|
263
275
|
}
|
264
276
|
|
265
277
|
static VALUE
|
266
|
-
|
278
|
+
rg_default_attributes(VALUE self)
|
267
279
|
{
|
268
280
|
return BOXED2RVAL(gtk_text_view_get_default_attributes(_SELF(self)),
|
269
281
|
GTK_TYPE_TEXT_ATTRIBUTES);
|
270
282
|
}
|
271
283
|
|
272
284
|
void
|
273
|
-
Init_gtk_textview()
|
285
|
+
Init_gtk_textview(VALUE mGtk)
|
274
286
|
{
|
275
|
-
VALUE
|
287
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_TEXT_VIEW, "TextView", mGtk);
|
276
288
|
|
277
289
|
id_buffer = rb_intern("buffer");
|
278
290
|
|
279
|
-
|
280
|
-
G_REPLACE_SET_PROPERTY(
|
281
|
-
G_REPLACE_GET_PROPERTY(
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
291
|
+
RG_DEF_METHOD(initialize, -1);
|
292
|
+
G_REPLACE_SET_PROPERTY(RG_TARGET_NAMESPACE, "buffer", textview_set_buffer, 1);
|
293
|
+
G_REPLACE_GET_PROPERTY(RG_TARGET_NAMESPACE, "buffer", textview_get_buffer, 0);
|
294
|
+
RG_DEF_METHOD(scroll_to_mark, 5);
|
295
|
+
RG_DEF_METHOD(scroll_to_iter, 5);
|
296
|
+
RG_DEF_METHOD(scroll_mark_onscreen, 1);
|
297
|
+
RG_DEF_METHOD(move_mark_onscreen, 1);
|
298
|
+
RG_DEF_METHOD(place_cursor_onscreen, 0);
|
299
|
+
RG_DEF_METHOD(visible_rect, 0);
|
300
|
+
RG_DEF_METHOD(get_iter_location, 1);
|
301
|
+
RG_DEF_METHOD(get_line_at_y, 1);
|
302
|
+
RG_DEF_METHOD(get_line_yrange, 1);
|
303
|
+
RG_DEF_METHOD(get_iter_at_location, 2);
|
292
304
|
#if GTK_CHECK_VERSION(2,6,0)
|
293
|
-
|
305
|
+
RG_DEF_METHOD(get_iter_at_position, 2);
|
294
306
|
#endif
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
G_DEF_SETTER(
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
307
|
+
RG_DEF_METHOD(buffer_to_window_coords, 3);
|
308
|
+
RG_DEF_METHOD(window_to_buffer_coords, 3);
|
309
|
+
RG_DEF_METHOD(get_window, 1);
|
310
|
+
RG_DEF_METHOD(get_window_type, 1);
|
311
|
+
RG_DEF_METHOD(set_border_window_size, 2);
|
312
|
+
G_DEF_SETTER(RG_TARGET_NAMESPACE, "border_window_size");
|
313
|
+
RG_DEF_METHOD(get_border_window_size, 1);
|
314
|
+
RG_DEF_METHOD(forward_display_line, 1);
|
315
|
+
RG_DEF_METHOD(backward_display_line, 1);
|
316
|
+
RG_DEF_METHOD(forward_display_line_end, 1);
|
317
|
+
RG_DEF_METHOD(backward_display_line_start, 1);
|
318
|
+
RG_DEF_METHOD(starts_display_line, 1);
|
319
|
+
RG_DEF_METHOD(move_visually, 2);
|
320
|
+
RG_DEF_METHOD(add_child_at_anchor, 2);
|
321
|
+
RG_DEF_METHOD(add_child_in_window, 4);
|
322
|
+
RG_DEF_METHOD(move_child, 3);
|
323
|
+
RG_DEF_METHOD(default_attributes, 0);
|
312
324
|
|
313
325
|
/* GtkTextWindowType */
|
314
|
-
G_DEF_CLASS(GTK_TYPE_TEXT_WINDOW_TYPE, "WindowType",
|
315
|
-
G_DEF_CONSTANTS(
|
316
|
-
|
317
|
-
rb_define_const(
|
326
|
+
G_DEF_CLASS(GTK_TYPE_TEXT_WINDOW_TYPE, "WindowType", RG_TARGET_NAMESPACE);
|
327
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_TEXT_WINDOW_TYPE, "GTK_TEXT_");
|
328
|
+
|
329
|
+
rb_define_const(RG_TARGET_NAMESPACE, "PRIORITY_VALIDATE", INT2FIX(GTK_TEXT_VIEW_PRIORITY_VALIDATE));
|
318
330
|
}
|