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
@@ -1,22 +1,33 @@
|
|
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) 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
|
+
*/
|
11
21
|
|
12
22
|
#include "global.h"
|
13
|
-
|
23
|
+
|
14
24
|
#if GTK_CHECK_VERSION(2,6,0)
|
15
25
|
|
26
|
+
#define RG_TARGET_NAMESPACE cMenuToolButton
|
16
27
|
#define _SELF(self) (GTK_MENU_TOOL_BUTTON(RVAL2GOBJ(self)))
|
17
28
|
|
18
29
|
static VALUE
|
19
|
-
|
30
|
+
rg_initialize(int argc, VALUE *argv, VALUE self)
|
20
31
|
{
|
21
32
|
GtkToolItem* item;
|
22
33
|
|
@@ -44,7 +55,7 @@ menutoolbutton_initialize(int argc, VALUE *argv, VALUE self)
|
|
44
55
|
}
|
45
56
|
|
46
57
|
static VALUE
|
47
|
-
|
58
|
+
rg_set_arrow_tooltip(int argc, VALUE *argv, VALUE self)
|
48
59
|
{
|
49
60
|
VALUE tooltips, tip_text, tip_private;
|
50
61
|
|
@@ -57,12 +68,12 @@ menutoolbutton_set_arrow_tooltip(int argc, VALUE *argv, VALUE self)
|
|
57
68
|
#endif
|
58
69
|
|
59
70
|
void
|
60
|
-
Init_gtk_menutoolbutton()
|
71
|
+
Init_gtk_menutoolbutton(VALUE mGtk)
|
61
72
|
{
|
62
73
|
#if GTK_CHECK_VERSION(2,6,0)
|
63
|
-
VALUE
|
74
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_MENU_TOOL_BUTTON, "MenuToolButton", mGtk);
|
64
75
|
|
65
|
-
|
66
|
-
|
76
|
+
RG_DEF_METHOD(initialize, -1);
|
77
|
+
RG_DEF_METHOD(set_arrow_tooltip, -1);
|
67
78
|
#endif
|
68
79
|
}
|
@@ -1,20 +1,31 @@
|
|
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-2006 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
|
+
*/
|
11
21
|
|
12
22
|
#include "global.h"
|
13
23
|
|
24
|
+
#define RG_TARGET_NAMESPACE cMessageDialog
|
14
25
|
#define _SELF(s) (GTK_MESSAGE_DIALOG(RVAL2GOBJ(s)))
|
15
26
|
|
16
27
|
static VALUE
|
17
|
-
|
28
|
+
rg_initialize(int argc, VALUE *argv, VALUE self)
|
18
29
|
{
|
19
30
|
VALUE parent, flags, type, buttons, message;
|
20
31
|
GtkWidget* w;
|
@@ -43,18 +54,13 @@ GtkWidget* gtk_message_dialog_new_with_markup
|
|
43
54
|
*/
|
44
55
|
#if GTK_CHECK_VERSION(2,4,0)
|
45
56
|
static VALUE
|
46
|
-
|
57
|
+
rg_set_markup(VALUE self, VALUE str)
|
47
58
|
{
|
48
59
|
gtk_message_dialog_set_markup(_SELF(self), RVAL2CSTR(str));
|
49
60
|
return self;
|
50
61
|
}
|
51
62
|
#endif
|
52
63
|
|
53
|
-
/* Defined as properties.
|
54
|
-
void gtk_message_dialog_set_image (GtkMessageDialog *dialog,
|
55
|
-
GtkWidget *image);
|
56
|
-
*/
|
57
|
-
|
58
64
|
/* Not needed in Ruby
|
59
65
|
void gtk_message_dialog_format_secondary_text
|
60
66
|
(GtkMessageDialog *message_dialog,
|
@@ -67,21 +73,21 @@ void gtk_message_dialog_format_secondary_markup
|
|
67
73
|
*/
|
68
74
|
|
69
75
|
void
|
70
|
-
Init_gtk_message_dialog()
|
76
|
+
Init_gtk_message_dialog(VALUE mGtk)
|
71
77
|
{
|
72
|
-
VALUE
|
78
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_MESSAGE_DIALOG, "MessageDialog", mGtk);
|
73
79
|
|
74
|
-
|
80
|
+
RG_DEF_METHOD(initialize, -1);
|
75
81
|
#if GTK_CHECK_VERSION(2,4,0)
|
76
|
-
|
77
|
-
G_DEF_SETTER(
|
82
|
+
RG_DEF_METHOD(set_markup, 1);
|
83
|
+
G_DEF_SETTER(RG_TARGET_NAMESPACE, "markup");
|
78
84
|
#endif
|
79
85
|
|
80
86
|
/* GtkMessageType */
|
81
|
-
G_DEF_CLASS(GTK_TYPE_MESSAGE_TYPE, "Type",
|
82
|
-
G_DEF_CONSTANTS(
|
87
|
+
G_DEF_CLASS(GTK_TYPE_MESSAGE_TYPE, "Type", RG_TARGET_NAMESPACE);
|
88
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_MESSAGE_TYPE, "GTK_MESSAGE_");
|
83
89
|
|
84
90
|
/* GtkButtonsType */
|
85
|
-
G_DEF_CLASS(GTK_TYPE_BUTTONS_TYPE, "ButtonsType",
|
86
|
-
G_DEF_CONSTANTS(
|
91
|
+
G_DEF_CLASS(GTK_TYPE_BUTTONS_TYPE, "ButtonsType", RG_TARGET_NAMESPACE);
|
92
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_BUTTONS_TYPE, "GTK_");
|
87
93
|
}
|
data/ext/gtk2/rbgtkmisc.c
CHANGED
@@ -1,37 +1,48 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2002,2003 Ruby-GNOME2 Project Team
|
5
|
+
* Copyright (C) 1998-2000 Yukihiro Matsumoto,
|
6
|
+
* Daisuke Kanda,
|
7
|
+
* Hiroshi Igarashi
|
8
|
+
*
|
9
|
+
* This library is free software; you can redistribute it and/or
|
10
|
+
* modify it under the terms of the GNU Lesser General Public
|
11
|
+
* License as published by the Free Software Foundation; either
|
12
|
+
* version 2.1 of the License, or (at your option) any later version.
|
13
|
+
*
|
14
|
+
* This library is distributed in the hope that it will be useful,
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
17
|
+
* Lesser General Public License for more details.
|
18
|
+
*
|
19
|
+
* You should have received a copy of the GNU Lesser General Public
|
20
|
+
* License along with this library; if not, write to the Free Software
|
21
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
22
|
+
* MA 02110-1301 USA
|
23
|
+
*/
|
14
24
|
|
15
25
|
#include "global.h"
|
16
26
|
|
27
|
+
#define RG_TARGET_NAMESPACE cMisc
|
17
28
|
#define _SELF(s) (GTK_MISC(RVAL2GOBJ(s)))
|
18
29
|
|
19
30
|
static VALUE
|
20
|
-
|
31
|
+
rg_set_alignment(VALUE self, VALUE xalign, VALUE yalign)
|
21
32
|
{
|
22
33
|
gtk_misc_set_alignment(_SELF(self), NUM2DBL(xalign), NUM2DBL(yalign));
|
23
34
|
return self;
|
24
35
|
}
|
25
36
|
|
26
37
|
static VALUE
|
27
|
-
|
38
|
+
rg_set_padding(VALUE self, VALUE xpad, VALUE ypad)
|
28
39
|
{
|
29
40
|
gtk_misc_set_padding(_SELF(self), NUM2DBL(xpad), NUM2DBL(ypad));
|
30
41
|
return self;
|
31
42
|
}
|
32
43
|
|
33
44
|
static VALUE
|
34
|
-
|
45
|
+
rg_alignment(VALUE self)
|
35
46
|
{
|
36
47
|
gfloat xalign, yalign;
|
37
48
|
gtk_misc_get_alignment(_SELF(self), &xalign, &yalign);
|
@@ -40,7 +51,7 @@ misc_get_align(VALUE self)
|
|
40
51
|
}
|
41
52
|
|
42
53
|
static VALUE
|
43
|
-
|
54
|
+
rg_padding(VALUE self)
|
44
55
|
{
|
45
56
|
gint xpad, ypad;
|
46
57
|
gtk_misc_get_padding(_SELF(self), &xpad, &ypad);
|
@@ -48,12 +59,12 @@ misc_get_padding(VALUE self)
|
|
48
59
|
return rb_ary_new3(2, INT2NUM(xpad), INT2NUM(ypad));
|
49
60
|
}
|
50
61
|
void
|
51
|
-
Init_gtk_misc()
|
62
|
+
Init_gtk_misc(VALUE mGtk)
|
52
63
|
{
|
53
|
-
VALUE
|
64
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_MISC, "Misc", mGtk);
|
54
65
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
66
|
+
RG_DEF_METHOD(set_alignment, 2);
|
67
|
+
RG_DEF_METHOD(set_padding, 2);
|
68
|
+
RG_DEF_METHOD(alignment, 0);
|
69
|
+
RG_DEF_METHOD(padding, 0);
|
59
70
|
}
|
data/ext/gtk2/rbgtknotebook.c
CHANGED
@@ -1,32 +1,43 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2002,2003 Ruby-GNOME2 Project Team
|
5
|
+
* Copyright (C) 1998-2000 Yukihiro Matsumoto,
|
6
|
+
* Daisuke Kanda,
|
7
|
+
* Hiroshi Igarashi
|
8
|
+
*
|
9
|
+
* This library is free software; you can redistribute it and/or
|
10
|
+
* modify it under the terms of the GNU Lesser General Public
|
11
|
+
* License as published by the Free Software Foundation; either
|
12
|
+
* version 2.1 of the License, or (at your option) any later version.
|
13
|
+
*
|
14
|
+
* This library is distributed in the hope that it will be useful,
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
17
|
+
* Lesser General Public License for more details.
|
18
|
+
*
|
19
|
+
* You should have received a copy of the GNU Lesser General Public
|
20
|
+
* License along with this library; if not, write to the Free Software
|
21
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
22
|
+
* MA 02110-1301 USA
|
23
|
+
*/
|
14
24
|
|
15
25
|
#include "global.h"
|
16
26
|
|
27
|
+
#define RG_TARGET_NAMESPACE cNotebook
|
17
28
|
#define _SELF(self) GTK_NOTEBOOK(RVAL2GOBJ(self))
|
18
29
|
#define RVAL2WIDGET(w) GTK_WIDGET(RVAL2GOBJ(w))
|
19
30
|
#define GTK_TYPE_NOTEBOOK_PAGE (gtk_notebookpage_get_type())
|
20
31
|
|
21
32
|
static VALUE
|
22
|
-
|
33
|
+
rg_initialize(VALUE self)
|
23
34
|
{
|
24
35
|
RBGTK_INITIALIZE(self, gtk_notebook_new());
|
25
36
|
return Qnil;
|
26
37
|
}
|
27
38
|
|
28
39
|
static VALUE
|
29
|
-
|
40
|
+
rg_append_page(int argc, VALUE *argv, VALUE self)
|
30
41
|
{
|
31
42
|
VALUE child, label;
|
32
43
|
|
@@ -40,10 +51,10 @@ note_append_page(int argc, VALUE *argv, VALUE self)
|
|
40
51
|
}
|
41
52
|
|
42
53
|
static VALUE
|
43
|
-
|
54
|
+
rg_append_page_menu(int argc, VALUE *argv, VALUE self)
|
44
55
|
{
|
45
56
|
VALUE child, tab_label, menu_label;
|
46
|
-
|
57
|
+
|
47
58
|
rb_scan_args(argc, argv, "12", &child, &tab_label, &menu_label);
|
48
59
|
gtk_notebook_append_page_menu(_SELF(self),
|
49
60
|
RVAL2WIDGET(child),
|
@@ -54,7 +65,7 @@ note_append_page_menu(int argc, VALUE *argv, VALUE self)
|
|
54
65
|
}
|
55
66
|
|
56
67
|
static VALUE
|
57
|
-
|
68
|
+
rg_prepend_page(int argc, VALUE *argv, VALUE self)
|
58
69
|
{
|
59
70
|
VALUE child, label;
|
60
71
|
|
@@ -66,7 +77,7 @@ note_prepend_page(int argc, VALUE *argv, VALUE self)
|
|
66
77
|
}
|
67
78
|
|
68
79
|
static VALUE
|
69
|
-
|
80
|
+
rg_prepend_page_menu(int argc, VALUE *argv, VALUE self)
|
70
81
|
{
|
71
82
|
VALUE child, tab_label, menu_label;
|
72
83
|
|
@@ -80,7 +91,7 @@ note_prepend_page_menu(int argc, VALUE *argv, VALUE self)
|
|
80
91
|
}
|
81
92
|
|
82
93
|
static VALUE
|
83
|
-
|
94
|
+
rg_insert_page(int argc, VALUE *argv, VALUE self)
|
84
95
|
{
|
85
96
|
VALUE pos, child, label;
|
86
97
|
|
@@ -93,7 +104,7 @@ note_insert_page(int argc, VALUE *argv, VALUE self)
|
|
93
104
|
}
|
94
105
|
|
95
106
|
static VALUE
|
96
|
-
|
107
|
+
rg_insert_page_menu(int argc, VALUE *argv, VALUE self)
|
97
108
|
{
|
98
109
|
VALUE pos, child, tab_label, menu_label;
|
99
110
|
|
@@ -107,35 +118,35 @@ note_insert_page_menu(int argc, VALUE *argv, VALUE self)
|
|
107
118
|
}
|
108
119
|
|
109
120
|
static VALUE
|
110
|
-
|
121
|
+
rg_remove_page(VALUE self, VALUE pos)
|
111
122
|
{
|
112
123
|
gtk_notebook_remove_page(_SELF(self), NUM2INT(pos));
|
113
124
|
return self;
|
114
125
|
}
|
115
126
|
|
116
127
|
static VALUE
|
117
|
-
|
128
|
+
rg_page_num(VALUE self, VALUE child)
|
118
129
|
{
|
119
130
|
return INT2FIX(gtk_notebook_page_num(_SELF(self),
|
120
131
|
RVAL2WIDGET(child)));
|
121
132
|
}
|
122
133
|
|
123
134
|
static VALUE
|
124
|
-
|
135
|
+
rg_next_page(VALUE self)
|
125
136
|
{
|
126
137
|
gtk_notebook_next_page(_SELF(self));
|
127
138
|
return self;
|
128
139
|
}
|
129
140
|
|
130
141
|
static VALUE
|
131
|
-
|
142
|
+
rg_prev_page(VALUE self)
|
132
143
|
{
|
133
144
|
gtk_notebook_prev_page(_SELF(self));
|
134
145
|
return self;
|
135
146
|
}
|
136
147
|
|
137
148
|
static VALUE
|
138
|
-
|
149
|
+
rg_reorder_child(VALUE self, VALUE child, VALUE pos)
|
139
150
|
{
|
140
151
|
gtk_notebook_reorder_child(_SELF(self), RVAL2WIDGET(child),
|
141
152
|
NUM2INT(pos));
|
@@ -143,14 +154,14 @@ note_reorder_child(VALUE self, VALUE child, VALUE pos)
|
|
143
154
|
}
|
144
155
|
|
145
156
|
static VALUE
|
146
|
-
|
157
|
+
rg_get_menu_label(VALUE self, VALUE child)
|
147
158
|
{
|
148
159
|
return GOBJ2RVAL(gtk_notebook_get_menu_label(_SELF(self),
|
149
160
|
RVAL2WIDGET(child)));
|
150
161
|
}
|
151
162
|
|
152
163
|
static VALUE
|
153
|
-
|
164
|
+
rg_get_nth_page(VALUE self, VALUE page_num)
|
154
165
|
{
|
155
166
|
GtkWidget *page = gtk_notebook_get_nth_page(_SELF(self),
|
156
167
|
NUM2INT(page_num));
|
@@ -159,21 +170,21 @@ note_get_nth_page(VALUE self, VALUE page_num)
|
|
159
170
|
|
160
171
|
#if GTK_CHECK_VERSION(2,2,0)
|
161
172
|
static VALUE
|
162
|
-
|
173
|
+
rg_n_pages(VALUE self)
|
163
174
|
{
|
164
175
|
return INT2NUM(gtk_notebook_get_n_pages(_SELF(self)));
|
165
176
|
}
|
166
177
|
#endif
|
167
178
|
|
168
179
|
static VALUE
|
169
|
-
|
180
|
+
rg_get_tab_label(VALUE self, VALUE child)
|
170
181
|
{
|
171
182
|
return GOBJ2RVAL(gtk_notebook_get_tab_label(_SELF(self),
|
172
183
|
RVAL2WIDGET(child)));
|
173
184
|
}
|
174
185
|
|
175
186
|
static VALUE
|
176
|
-
|
187
|
+
rg_query_tab_label_packing(VALUE self, VALUE child)
|
177
188
|
{
|
178
189
|
gboolean expand, fill;
|
179
190
|
GtkPackType pack_type;
|
@@ -190,7 +201,7 @@ note_query_tab_label_packing(VALUE self, VALUE child)
|
|
190
201
|
}
|
191
202
|
|
192
203
|
static VALUE
|
193
|
-
|
204
|
+
rg_set_menu_label(VALUE self, VALUE child, VALUE label)
|
194
205
|
{
|
195
206
|
gtk_notebook_set_menu_label(_SELF(self),
|
196
207
|
RVAL2WIDGET(child),
|
@@ -199,7 +210,7 @@ note_set_menu_label(VALUE self, VALUE child, VALUE label)
|
|
199
210
|
}
|
200
211
|
|
201
212
|
static VALUE
|
202
|
-
|
213
|
+
rg_set_menu_label_text(VALUE self, VALUE child, VALUE text)
|
203
214
|
{
|
204
215
|
gtk_notebook_set_menu_label_text(_SELF(self),
|
205
216
|
RVAL2WIDGET(child),
|
@@ -208,7 +219,7 @@ note_set_menu_label_text(VALUE self, VALUE child, VALUE text)
|
|
208
219
|
}
|
209
220
|
|
210
221
|
static VALUE
|
211
|
-
|
222
|
+
rg_set_tab_label(VALUE self, VALUE child, VALUE label)
|
212
223
|
{
|
213
224
|
gtk_notebook_set_tab_label(_SELF(self),
|
214
225
|
RVAL2WIDGET(child),
|
@@ -217,7 +228,7 @@ note_set_tab_label(VALUE self, VALUE child, VALUE label)
|
|
217
228
|
}
|
218
229
|
|
219
230
|
static VALUE
|
220
|
-
|
231
|
+
rg_set_tab_label_packing(VALUE self, VALUE child, VALUE expand, VALUE fill, VALUE pack_type)
|
221
232
|
{
|
222
233
|
gtk_notebook_set_tab_label_packing(_SELF(self),
|
223
234
|
RVAL2WIDGET(child),
|
@@ -227,7 +238,7 @@ note_set_tab_label_packing(VALUE self, VALUE child, VALUE expand, VALUE fill, VA
|
|
227
238
|
}
|
228
239
|
|
229
240
|
static VALUE
|
230
|
-
|
241
|
+
rg_set_tab_label_text(VALUE self, VALUE child, VALUE text)
|
231
242
|
{
|
232
243
|
gtk_notebook_set_tab_label_text(_SELF(self),
|
233
244
|
RVAL2WIDGET(child),
|
@@ -236,14 +247,14 @@ note_set_tab_label_text(VALUE self, VALUE child, VALUE text)
|
|
236
247
|
}
|
237
248
|
|
238
249
|
static VALUE
|
239
|
-
|
250
|
+
rg_get_menu_label_text(VALUE self, VALUE child)
|
240
251
|
{
|
241
252
|
return CSTR2RVAL(gtk_notebook_get_menu_label_text(_SELF(self),
|
242
253
|
RVAL2WIDGET(child)));
|
243
254
|
}
|
244
255
|
|
245
256
|
static VALUE
|
246
|
-
|
257
|
+
rg_get_tab_label_text(VALUE self, VALUE child)
|
247
258
|
{
|
248
259
|
return CSTR2RVAL(gtk_notebook_get_tab_label_text(_SELF(self),
|
249
260
|
RVAL2WIDGET(child)));
|
@@ -251,13 +262,13 @@ note_get_tab_label_text(VALUE self, VALUE child)
|
|
251
262
|
|
252
263
|
#if GTK_CHECK_VERSION(2,10,0)
|
253
264
|
static VALUE
|
254
|
-
|
265
|
+
rg_get_tab_reorderable(VALUE self, VALUE child)
|
255
266
|
{
|
256
267
|
return CBOOL2RVAL(gtk_notebook_get_tab_reorderable(_SELF(self),
|
257
268
|
GTK_WIDGET(RVAL2GOBJ(child))));
|
258
269
|
}
|
259
270
|
static VALUE
|
260
|
-
|
271
|
+
rg_set_tab_reorderable(VALUE self, VALUE child, VALUE reorderable)
|
261
272
|
{
|
262
273
|
gtk_notebook_set_tab_reorderable(_SELF(self), GTK_WIDGET(RVAL2GOBJ(child)),
|
263
274
|
RVAL2CBOOL(reorderable));
|
@@ -265,13 +276,13 @@ note_set_tab_reorderable(VALUE self, VALUE child, VALUE reorderable)
|
|
265
276
|
}
|
266
277
|
|
267
278
|
static VALUE
|
268
|
-
|
279
|
+
rg_get_tab_detachable(VALUE self, VALUE child)
|
269
280
|
{
|
270
281
|
return CBOOL2RVAL(gtk_notebook_get_tab_detachable(_SELF(self),
|
271
282
|
GTK_WIDGET(RVAL2GOBJ(child))));
|
272
283
|
}
|
273
284
|
static VALUE
|
274
|
-
|
285
|
+
rg_set_tab_detachable(VALUE self, VALUE child, VALUE detachable)
|
275
286
|
{
|
276
287
|
gtk_notebook_set_tab_detachable(_SELF(self), GTK_WIDGET(RVAL2GOBJ(child)),
|
277
288
|
RVAL2CBOOL(detachable));
|
@@ -288,7 +299,7 @@ creation_func(GtkNotebook *source, GtkWidget *page, gint x, gint y, gpointer fun
|
|
288
299
|
}
|
289
300
|
|
290
301
|
static VALUE
|
291
|
-
|
302
|
+
rg_s_set_window_creation_hook(VALUE self)
|
292
303
|
{
|
293
304
|
VALUE func = rb_block_proc();
|
294
305
|
G_RELATIVE(self, func);
|
@@ -300,7 +311,7 @@ note_set_window_creation_hook(VALUE self)
|
|
300
311
|
|
301
312
|
#if GTK_CHECK_VERSION(2,20,0)
|
302
313
|
static VALUE
|
303
|
-
|
314
|
+
rg_set_action_widget(VALUE self, VALUE widget, VALUE pack_type)
|
304
315
|
{
|
305
316
|
gtk_notebook_set_action_widget(_SELF(self),
|
306
317
|
RVAL2WIDGET(widget),
|
@@ -309,7 +320,7 @@ note_set_action_widget(VALUE self, VALUE widget, VALUE pack_type)
|
|
309
320
|
}
|
310
321
|
|
311
322
|
static VALUE
|
312
|
-
|
323
|
+
rg_get_action_widget(VALUE self, VALUE pack_type)
|
313
324
|
{
|
314
325
|
return GOBJ2RVAL(gtk_notebook_get_action_widget(_SELF(self),
|
315
326
|
RVAL2GENUM(pack_type, GTK_TYPE_PACK_TYPE)));
|
@@ -322,20 +333,20 @@ note_get_action_widget(VALUE self, VALUE pack_type)
|
|
322
333
|
*/
|
323
334
|
typedef struct {
|
324
335
|
VALUE parent;
|
325
|
-
GtkNotebookPage*
|
336
|
+
GtkNotebookPage *page;
|
326
337
|
} GtkNotebookPageData;
|
327
338
|
|
328
|
-
GtkNotebookPageData*
|
329
|
-
notebookpage_copy
|
339
|
+
static GtkNotebookPageData *
|
340
|
+
notebookpage_copy(const GtkNotebookPage *page)
|
330
341
|
{
|
331
|
-
GtkNotebookPageData*
|
342
|
+
GtkNotebookPageData *data;
|
332
343
|
g_return_val_if_fail (page != NULL, NULL);
|
333
344
|
data = g_new(GtkNotebookPageData, 1);
|
334
|
-
data->page = (GtkNotebookPage*)page;
|
345
|
+
data->page = (GtkNotebookPage *)page;
|
335
346
|
return data;
|
336
347
|
}
|
337
348
|
|
338
|
-
GType
|
349
|
+
static GType
|
339
350
|
gtk_notebookpage_get_type(void)
|
340
351
|
{
|
341
352
|
static GType our_type = 0;
|
@@ -347,7 +358,7 @@ gtk_notebookpage_get_type(void)
|
|
347
358
|
}
|
348
359
|
|
349
360
|
static VALUE
|
350
|
-
signal_g2r_func(guint num, const GValue *values)
|
361
|
+
signal_g2r_func(G_GNUC_UNUSED guint num, const GValue *values)
|
351
362
|
{
|
352
363
|
GtkNotebookPageData npp;
|
353
364
|
npp.parent = GVAL2RVAL(&values[0]);
|
@@ -356,102 +367,55 @@ signal_g2r_func(guint num, const GValue *values)
|
|
356
367
|
GVAL2RVAL(&values[2]));
|
357
368
|
}
|
358
369
|
|
359
|
-
/* Defined as the "page" property.
|
360
|
-
*/
|
361
|
-
|
362
|
-
/* Defined as properties
|
363
|
-
// "enable-popup" property
|
364
|
-
void gtk_notebook_popup_enable (GtkNotebook *notebook);
|
365
|
-
void gtk_notebook_popup_disable (GtkNotebook *notebook);
|
366
|
-
|
367
|
-
void gtk_notebook_set_group_id (GtkNotebook *notebook,
|
368
|
-
gint group_id);
|
369
|
-
gint gtk_notebook_get_group_id (GtkNotebook *notebook);
|
370
|
-
|
371
|
-
// "homogeneous" property
|
372
|
-
void gtk_notebook_set_homogeneous_tabs
|
373
|
-
(GtkNotebook *notebook,
|
374
|
-
gboolean homogeneous);
|
375
|
-
// "page" property.
|
376
|
-
#define gtk_notebook_current_page
|
377
|
-
#define gtk_notebook_set_page
|
378
|
-
gint gtk_notebook_get_current_page (GtkNotebook *notebook);
|
379
|
-
void gtk_notebook_set_current_page (GtkNotebook *notebook,
|
380
|
-
gint page_num);
|
381
|
-
|
382
|
-
gboolean gtk_notebook_get_scrollable (GtkNotebook *notebook);
|
383
|
-
void gtk_notebook_set_scrollable (GtkNotebook *notebook,
|
384
|
-
gboolean scrollable);
|
385
|
-
|
386
|
-
void gtk_notebook_set_show_border (GtkNotebook *notebook,
|
387
|
-
gboolean show_border);
|
388
|
-
gboolean gtk_notebook_get_show_border (GtkNotebook *notebook);
|
389
|
-
|
390
|
-
gboolean gtk_notebook_get_show_tabs (GtkNotebook *notebook);
|
391
|
-
void gtk_notebook_set_show_tabs (GtkNotebook *notebook,
|
392
|
-
gboolean show_tabs);
|
393
|
-
|
394
|
-
GtkPositionType gtk_notebook_get_tab_pos (GtkNotebook *notebook);
|
395
|
-
void gtk_notebook_set_tab_pos (GtkNotebook *notebook,
|
396
|
-
GtkPositionType pos);
|
397
|
-
|
398
|
-
void gtk_notebook_set_tab_hborder (GtkNotebook *notebook,
|
399
|
-
guint tab_hborder);
|
400
|
-
void gtk_notebook_set_tab_border (GtkNotebook *notebook,
|
401
|
-
guint border_width);
|
402
|
-
void gtk_notebook_set_tab_vborder (GtkNotebook *notebook,
|
403
|
-
guint tab_vborder);
|
404
|
-
*/
|
405
|
-
|
406
370
|
/*****************************************/
|
407
371
|
|
408
372
|
void
|
409
|
-
Init_gtk_notebook()
|
373
|
+
Init_gtk_notebook(VALUE mGtk)
|
410
374
|
{
|
411
|
-
VALUE
|
375
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_NOTEBOOK, "Notebook", mGtk);
|
412
376
|
G_DEF_CLASS(GTK_TYPE_NOTEBOOK_PAGE, "NotebookPage", mGtk);
|
413
377
|
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
378
|
+
RG_DEF_METHOD(initialize, 0);
|
379
|
+
RG_DEF_METHOD(append_page, -1);
|
380
|
+
RG_DEF_METHOD(append_page_menu, -1);
|
381
|
+
RG_DEF_METHOD(prepend_page, -1);
|
382
|
+
RG_DEF_METHOD(prepend_page_menu, -1);
|
383
|
+
RG_DEF_METHOD(insert_page, -1);
|
384
|
+
RG_DEF_METHOD(insert_page_menu, -1);
|
385
|
+
RG_DEF_METHOD(remove_page, 1);
|
386
|
+
RG_DEF_METHOD(page_num, 1);
|
387
|
+
RG_DEF_METHOD(next_page, 0);
|
388
|
+
RG_DEF_METHOD(prev_page, 0);
|
389
|
+
RG_DEF_METHOD(reorder_child, 2);
|
390
|
+
RG_DEF_METHOD(get_menu_label, 1);
|
391
|
+
RG_DEF_METHOD(get_nth_page, 1);
|
428
392
|
#if GTK_CHECK_VERSION(2,2,0)
|
429
|
-
|
393
|
+
RG_DEF_METHOD(n_pages, 0);
|
430
394
|
#endif
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
395
|
+
RG_DEF_METHOD(get_tab_label, 1);
|
396
|
+
RG_DEF_METHOD(query_tab_label_packing, 1);
|
397
|
+
RG_DEF_METHOD(set_menu_label, 2);
|
398
|
+
RG_DEF_METHOD(set_menu_label_text, 2);
|
399
|
+
RG_DEF_METHOD(set_tab_label, 2);
|
400
|
+
RG_DEF_METHOD(set_tab_label_packing, 4);
|
401
|
+
RG_DEF_METHOD(set_tab_label_text, 2);
|
402
|
+
RG_DEF_METHOD(get_menu_label_text, 1);
|
403
|
+
RG_DEF_METHOD(get_tab_label_text, 1);
|
440
404
|
|
441
405
|
#if GTK_CHECK_VERSION(2,10,0)
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
406
|
+
RG_DEF_METHOD(get_tab_reorderable, 1);
|
407
|
+
RG_DEF_METHOD(set_tab_reorderable, 2);
|
408
|
+
RG_DEF_METHOD(get_tab_detachable, 1);
|
409
|
+
RG_DEF_METHOD(set_tab_detachable, 2);
|
410
|
+
RG_DEF_SMETHOD(set_window_creation_hook, 0);
|
447
411
|
#endif
|
448
412
|
#if GTK_CHECK_VERSION(2,20,0)
|
449
|
-
|
450
|
-
|
413
|
+
RG_DEF_METHOD(set_action_widget, 2);
|
414
|
+
RG_DEF_METHOD(get_action_widget, 1);
|
451
415
|
#endif
|
452
416
|
/* GtkNotebookTab */
|
453
|
-
rb_define_const(
|
454
|
-
rb_define_const(
|
417
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TAB_FIRST", GTK_NOTEBOOK_TAB_FIRST);
|
418
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TAB_LAST", GTK_NOTEBOOK_TAB_LAST);
|
455
419
|
|
456
|
-
G_DEF_SIGNAL_FUNC(
|
420
|
+
G_DEF_SIGNAL_FUNC(RG_TARGET_NAMESPACE, "switch_page", (GValToRValSignalFunc)signal_g2r_func);
|
457
421
|
}
|