gtk3 2.1.0-x86-mingw32 → 2.2.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/gtk3/extconf.rb +1 -1
- data/ext/gtk3/rbgtk-about-dialog.c +0 -6
- data/ext/gtk3/rbgtk-accessible.c +0 -16
- data/ext/gtk3/rbgtk-entry.c +4 -18
- data/ext/gtk3/rbgtk-header-bar.c +58 -0
- data/ext/gtk3/rbgtk-icon-view.c +30 -5
- data/ext/gtk3/rbgtk-level-bar.c +88 -0
- data/ext/gtk3/rbgtk-link-button.c +0 -6
- data/ext/gtk3/rbgtk-menu-button.c +41 -0
- data/ext/gtk3/rbgtk-revealer.c +42 -0
- data/ext/gtk3/rbgtk-search-bar.c +59 -0
- data/ext/gtk3/rbgtk-search-entry.c +42 -0
- data/ext/gtk3/rbgtk-stack.c +106 -0
- data/ext/gtk3/rbgtk-tree-selection.c +7 -22
- data/ext/gtk3/rbgtk.c +24 -3
- data/ext/gtk3/rbgtk3conversions.h +25 -2
- data/ext/gtk3/rbgtk3private.h +23 -3
- data/lib/1.9/gtk3.so +0 -0
- data/lib/2.0/gtk3.so +0 -0
- data/lib/2.1/gtk3.so +0 -0
- data/sample/gtk-demo/appwindow.rb +95 -95
- data/sample/gtk-demo/cairo-operator.rb +8 -8
- data/sample/gtk-demo/drawingarea.rb +74 -99
- data/sample/gtk-demo/pixbufs.rb +48 -57
- data/sample/misc/alpha-demo.rb +1 -1
- data/sample/misc/assistant.rb +45 -51
- data/sample/misc/cairo-pong.rb +26 -24
- data/sample/misc/composited-windows.rb +2 -2
- data/sample/misc/dnd.rb +23 -23
- data/sample/misc/drag-move.rb +19 -11
- data/sample/misc/drawing.rb +1 -1
- data/sample/misc/mouse-gesture.rb +3 -3
- data/sample/misc/pangorenderer.rb +1 -1
- data/sample/misc/properties.rb +1 -0
- data/sample/misc/to_drawable.rb +1 -1
- data/sample/misc/tooltips.rb +1 -1
- data/test/test_gtk_accessible.rb +31 -0
- data/test/test_gtk_entry.rb +36 -0
- data/test/test_gtk_header_bar.rb +66 -0
- data/test/test_gtk_icon_view.rb +41 -0
- data/test/test_gtk_level_bar.rb +82 -0
- data/test/test_gtk_list_store.rb +2 -1
- data/test/test_gtk_menu_button.rb +49 -0
- data/test/test_gtk_revealer.rb +57 -0
- data/test/test_gtk_search_bar.rb +55 -0
- data/test/test_gtk_search_entry.rb +34 -0
- data/test/test_gtk_stack.rb +115 -0
- data/test/test_gtk_tree_selection.rb +31 -0
- metadata +31 -14
@@ -0,0 +1,42 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2014 Ruby-GNOME2 Project Team
|
4
|
+
*
|
5
|
+
* This library is free software; you can redistribute it and/or
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
7
|
+
* License as published by the Free Software Foundation; either
|
8
|
+
* version 2.1 of the License, or (at your option) any later version.
|
9
|
+
*
|
10
|
+
* This library is distributed in the hope that it will be useful,
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
* Lesser General Public License for more details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
16
|
+
* License along with this library; if not, write to the Free Software
|
17
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
18
|
+
* MA 02110-1301 USA
|
19
|
+
*/
|
20
|
+
|
21
|
+
#include "rbgtk3private.h"
|
22
|
+
|
23
|
+
#if GTK_CHECK_VERSION(3, 6, 0)
|
24
|
+
|
25
|
+
#define RG_TARGET_NAMESPACE cSearchEntry
|
26
|
+
|
27
|
+
static VALUE
|
28
|
+
rg_initialize(VALUE self)
|
29
|
+
{
|
30
|
+
RBGTK_INITIALIZE(self, gtk_search_entry_new());
|
31
|
+
return Qnil;
|
32
|
+
}
|
33
|
+
|
34
|
+
void
|
35
|
+
Init_gtk_search_entry(VALUE mGtk)
|
36
|
+
{
|
37
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_SEARCH_ENTRY, "SearchEntry", mGtk);
|
38
|
+
|
39
|
+
RG_DEF_METHOD(initialize, 0);
|
40
|
+
}
|
41
|
+
|
42
|
+
#endif
|
@@ -0,0 +1,106 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2014 Ruby-GNOME2 Project Team
|
4
|
+
*
|
5
|
+
* This library is free software; you can redistribute it and/or
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
7
|
+
* License as published by the Free Software Foundation; either
|
8
|
+
* version 2.1 of the License, or (at your option) any later version.
|
9
|
+
*
|
10
|
+
* This library is distributed in the hope that it will be useful,
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
* Lesser General Public License for more details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
16
|
+
* License along with this library; if not, write to the Free Software
|
17
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
18
|
+
* MA 02110-1301 USA
|
19
|
+
*/
|
20
|
+
|
21
|
+
#include "rbgtk3private.h"
|
22
|
+
|
23
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
24
|
+
|
25
|
+
#define RG_TARGET_NAMESPACE cStack
|
26
|
+
#define _SELF(self) (RVAL2GTKSTACK(self))
|
27
|
+
|
28
|
+
static VALUE
|
29
|
+
rg_initialize(VALUE self)
|
30
|
+
{
|
31
|
+
RBGTK_INITIALIZE(self, gtk_stack_new());
|
32
|
+
return Qnil;
|
33
|
+
}
|
34
|
+
|
35
|
+
static VALUE
|
36
|
+
rg_add(int argc, VALUE *argv, VALUE self)
|
37
|
+
{
|
38
|
+
VALUE rb_widget, rb_name, rb_title;
|
39
|
+
GtkWidget *child_widget;
|
40
|
+
const gchar *name = NULL, *title = NULL;
|
41
|
+
|
42
|
+
rb_scan_args(argc, argv, "12", &rb_widget, &rb_name, &rb_title);
|
43
|
+
|
44
|
+
child_widget = RVAL2GTKWIDGET(rb_widget);
|
45
|
+
|
46
|
+
if (!NIL_P(rb_name))
|
47
|
+
name = RVAL2CSTR(rb_name);
|
48
|
+
if (!NIL_P(rb_title))
|
49
|
+
title = RVAL2CSTR(rb_title);
|
50
|
+
|
51
|
+
if (argc == 1) {
|
52
|
+
return rb_call_super(argc, argv);
|
53
|
+
} else if (argc == 2) {
|
54
|
+
gtk_stack_add_named(_SELF(self), child_widget,
|
55
|
+
name);
|
56
|
+
} else if (argc == 3) {
|
57
|
+
gtk_stack_add_titled(_SELF(self), child_widget,
|
58
|
+
name, title);
|
59
|
+
}
|
60
|
+
|
61
|
+
return self;
|
62
|
+
}
|
63
|
+
|
64
|
+
static VALUE
|
65
|
+
rg_set_visible_child(int argc, VALUE *argv, VALUE self)
|
66
|
+
{
|
67
|
+
VALUE rb_widget_or_name, rb_transition_type;
|
68
|
+
GtkStackTransitionType transition_type;
|
69
|
+
GtkWidget *widget = NULL;
|
70
|
+
const gchar *name = NULL;
|
71
|
+
|
72
|
+
rb_scan_args(argc, argv, "11", &rb_widget_or_name, &rb_transition_type);
|
73
|
+
|
74
|
+
if (RVAL2CBOOL(rb_obj_is_kind_of(rb_widget_or_name, rb_cString))) {
|
75
|
+
name = RVAL2CSTR(rb_widget_or_name);
|
76
|
+
} else {
|
77
|
+
widget = RVAL2GOBJ(rb_widget_or_name);
|
78
|
+
}
|
79
|
+
|
80
|
+
if (widget) {
|
81
|
+
gtk_stack_set_visible_child(_SELF(self), widget);
|
82
|
+
} else {
|
83
|
+
if (!NIL_P(rb_transition_type))
|
84
|
+
transition_type = RVAL2GTKSTACKTRANSITIONTYPE(rb_transition_type);
|
85
|
+
|
86
|
+
if (!NIL_P(rb_transition_type)) {
|
87
|
+
gtk_stack_set_visible_child_full(_SELF(self), name, transition_type);
|
88
|
+
} else {
|
89
|
+
gtk_stack_set_visible_child_name(_SELF(self), name);
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
return self;
|
94
|
+
}
|
95
|
+
|
96
|
+
void
|
97
|
+
Init_gtk_stack(VALUE mGtk)
|
98
|
+
{
|
99
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_STACK, "Stack", mGtk);
|
100
|
+
|
101
|
+
G_DEF_CLASS(GTK_TYPE_STACK_TRANSITION_TYPE, "TransitionType", RG_TARGET_NAMESPACE);
|
102
|
+
RG_DEF_METHOD(initialize, 0);
|
103
|
+
RG_DEF_METHOD(add, -1);
|
104
|
+
RG_REPLACE_SET_PROPERTY(visible_child, -1);
|
105
|
+
}
|
106
|
+
#endif
|
@@ -24,23 +24,10 @@
|
|
24
24
|
#define RG_TARGET_NAMESPACE cTreeSelection
|
25
25
|
#define _SELF(s) (RVAL2GTKTREESELECTION(s))
|
26
26
|
|
27
|
-
static VALUE
|
28
|
-
rg_set_mode(VALUE self, VALUE type)
|
29
|
-
{
|
30
|
-
gtk_tree_selection_set_mode(_SELF(self), RVAL2GTKSELECTIONMODE(type));
|
31
|
-
return self;
|
32
|
-
}
|
33
|
-
|
34
|
-
static VALUE
|
35
|
-
rg_mode(VALUE self)
|
36
|
-
{
|
37
|
-
return GTKSELECTIONMODE2RVAL(gtk_tree_selection_get_mode(_SELF(self)));
|
38
|
-
}
|
39
|
-
|
40
27
|
static gboolean
|
41
28
|
selection_func(GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *path, gboolean path_currently_selected, gpointer func)
|
42
29
|
{
|
43
|
-
return RVAL2CBOOL(rb_funcall((VALUE)func, id_call, 4,
|
30
|
+
return RVAL2CBOOL(rb_funcall((VALUE)func, id_call, 4,
|
44
31
|
GOBJ2RVAL(selection),
|
45
32
|
GOBJ2RVAL(model),
|
46
33
|
GTKTREEPATH2RVAL(path),
|
@@ -78,7 +65,7 @@ static void
|
|
78
65
|
foreach_func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
|
79
66
|
{
|
80
67
|
iter->user_data3 = model;
|
81
|
-
rb_funcall((VALUE)data, id_call, 3, GOBJ2RVAL(model),
|
68
|
+
rb_funcall((VALUE)data, id_call, 3, GOBJ2RVAL(model),
|
82
69
|
GTKTREEPATH2RVAL(path), GTKTREEITER2RVAL(iter));
|
83
70
|
}
|
84
71
|
|
@@ -86,8 +73,8 @@ static VALUE
|
|
86
73
|
rg_selected_each(VALUE self)
|
87
74
|
{
|
88
75
|
volatile VALUE func = rb_block_proc();
|
89
|
-
gtk_tree_selection_selected_foreach(_SELF(self),
|
90
|
-
(GtkTreeSelectionForeachFunc)foreach_func,
|
76
|
+
gtk_tree_selection_selected_foreach(_SELF(self),
|
77
|
+
(GtkTreeSelectionForeachFunc)foreach_func,
|
91
78
|
(gpointer)func);
|
92
79
|
return self;
|
93
80
|
}
|
@@ -149,7 +136,7 @@ rg_unselect_all(VALUE self)
|
|
149
136
|
static VALUE
|
150
137
|
rg_select_range(VALUE self, VALUE start_path, VALUE end_path)
|
151
138
|
{
|
152
|
-
gtk_tree_selection_select_range(_SELF(self), RVAL2GTKTREEPATH(start_path),
|
139
|
+
gtk_tree_selection_select_range(_SELF(self), RVAL2GTKTREEPATH(start_path),
|
153
140
|
RVAL2GTKTREEPATH(end_path));
|
154
141
|
return self;
|
155
142
|
}
|
@@ -174,7 +161,7 @@ rg_count_selected_rows(VALUE self)
|
|
174
161
|
static VALUE
|
175
162
|
rg_unselect_range(VALUE self, VALUE start_path, VALUE end_path)
|
176
163
|
{
|
177
|
-
gtk_tree_selection_unselect_range(_SELF(self), RVAL2GTKTREEPATH(start_path),
|
164
|
+
gtk_tree_selection_unselect_range(_SELF(self), RVAL2GTKTREEPATH(start_path),
|
178
165
|
RVAL2GTKTREEPATH(end_path));
|
179
166
|
return self;
|
180
167
|
}
|
@@ -182,10 +169,8 @@ rg_unselect_range(VALUE self, VALUE start_path, VALUE end_path)
|
|
182
169
|
void
|
183
170
|
Init_gtk_treeselection(VALUE mGtk)
|
184
171
|
{
|
185
|
-
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_TREE_SELECTION, "TreeSelection", mGtk);
|
172
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_TREE_SELECTION, "TreeSelection", mGtk);
|
186
173
|
|
187
|
-
RG_DEF_METHOD(set_mode, 1);
|
188
|
-
RG_DEF_METHOD(mode, 0);
|
189
174
|
RG_DEF_METHOD(set_select_function, 0);
|
190
175
|
RG_DEF_METHOD(tree_view, 0);
|
191
176
|
RG_DEF_METHOD(selected, 0);
|
data/ext/gtk3/rbgtk.c
CHANGED
@@ -246,8 +246,8 @@ rg_s_grab_remove(G_GNUC_UNUSED VALUE self, VALUE widget)
|
|
246
246
|
static gint
|
247
247
|
gtk_m_key_snoop_func(GtkWidget *grab_widget, GdkEventKey *event, gpointer func)
|
248
248
|
{
|
249
|
-
VALUE ret = rb_funcall((VALUE)func, id_call, 2,
|
250
|
-
GOBJ2RVAL(grab_widget),
|
249
|
+
VALUE ret = rb_funcall((VALUE)func, id_call, 2,
|
250
|
+
GOBJ2RVAL(grab_widget),
|
251
251
|
GEV2RVAL((GdkEvent*)event));
|
252
252
|
return RVAL2CBOOL(ret);
|
253
253
|
}
|
@@ -257,7 +257,7 @@ rg_s_key_snooper_install(VALUE self)
|
|
257
257
|
{
|
258
258
|
VALUE func = rb_block_proc();
|
259
259
|
VALUE id = INT2FIX(gtk_key_snooper_install(
|
260
|
-
(GtkKeySnoopFunc)gtk_m_key_snoop_func,
|
260
|
+
(GtkKeySnoopFunc)gtk_m_key_snoop_func,
|
261
261
|
(gpointer)func));
|
262
262
|
G_RELATIVE2(self, func, id__snooper_callbacks__, id);
|
263
263
|
return id;
|
@@ -475,6 +475,9 @@ Init_gtk(void)
|
|
475
475
|
Init_gtk_frame(RG_TARGET_NAMESPACE);
|
476
476
|
Init_gtk_grid(RG_TARGET_NAMESPACE);
|
477
477
|
Init_gtk_handle_box(RG_TARGET_NAMESPACE);
|
478
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
479
|
+
Init_gtk_header_bar(RG_TARGET_NAMESPACE);
|
480
|
+
#endif
|
478
481
|
Init_gtk_hsv(RG_TARGET_NAMESPACE);
|
479
482
|
Init_gtk_icon_factory(RG_TARGET_NAMESPACE);
|
480
483
|
Init_gtk_icon_info(RG_TARGET_NAMESPACE);
|
@@ -492,11 +495,17 @@ Init_gtk(void)
|
|
492
495
|
Init_gtk_invisible(RG_TARGET_NAMESPACE);
|
493
496
|
Init_gtk_label(RG_TARGET_NAMESPACE);
|
494
497
|
Init_gtk_layout(RG_TARGET_NAMESPACE);
|
498
|
+
#if GTK_CHECK_VERSION(3, 6, 0)
|
499
|
+
Init_gtk_level_bar(RG_TARGET_NAMESPACE);
|
500
|
+
#endif
|
495
501
|
Init_gtk_link_button(RG_TARGET_NAMESPACE);
|
496
502
|
Init_gtk_list_store(RG_TARGET_NAMESPACE);
|
497
503
|
Init_gtk_lockbutton(RG_TARGET_NAMESPACE);
|
498
504
|
Init_gtk_menu(RG_TARGET_NAMESPACE);
|
499
505
|
Init_gtk_menu_bar(RG_TARGET_NAMESPACE);
|
506
|
+
#if GTK_CHECK_VERSION(3, 6, 0)
|
507
|
+
Init_gtk_menu_button(RG_TARGET_NAMESPACE);
|
508
|
+
#endif
|
500
509
|
Init_gtk_menu_item(RG_TARGET_NAMESPACE);
|
501
510
|
Init_gtk_menu_shell(RG_TARGET_NAMESPACE);
|
502
511
|
Init_gtk_menutoolbutton(RG_TARGET_NAMESPACE);
|
@@ -534,11 +543,20 @@ Init_gtk(void)
|
|
534
543
|
Init_gtk_recent_filter_info(RG_TARGET_NAMESPACE);
|
535
544
|
Init_gtk_recent_info(RG_TARGET_NAMESPACE);
|
536
545
|
Init_gtk_recent_manager(RG_TARGET_NAMESPACE);
|
546
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
547
|
+
Init_gtk_revealer(RG_TARGET_NAMESPACE);
|
548
|
+
#endif
|
537
549
|
Init_gtk_scale(RG_TARGET_NAMESPACE);
|
538
550
|
Init_gtk_scalebutton(RG_TARGET_NAMESPACE);
|
539
551
|
Init_gtk_scrollable(RG_TARGET_NAMESPACE);
|
540
552
|
Init_gtk_scrollbar(RG_TARGET_NAMESPACE);
|
541
553
|
Init_gtk_scrolled_window(RG_TARGET_NAMESPACE);
|
554
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
555
|
+
Init_gtk_search_bar(RG_TARGET_NAMESPACE);
|
556
|
+
#endif
|
557
|
+
#if GTK_CHECK_VERSION(3, 6, 0)
|
558
|
+
Init_gtk_search_entry(RG_TARGET_NAMESPACE);
|
559
|
+
#endif
|
542
560
|
Init_gtk_selection(RG_TARGET_NAMESPACE);
|
543
561
|
Init_gtk_selectiondata(RG_TARGET_NAMESPACE);
|
544
562
|
Init_gtk_separator(RG_TARGET_NAMESPACE);
|
@@ -549,6 +567,9 @@ Init_gtk(void)
|
|
549
567
|
Init_gtk_socket(RG_TARGET_NAMESPACE);
|
550
568
|
Init_gtk_spin_button(RG_TARGET_NAMESPACE);
|
551
569
|
Init_gtk_spinner(RG_TARGET_NAMESPACE);
|
570
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
571
|
+
Init_gtk_stack(RG_TARGET_NAMESPACE);
|
572
|
+
#endif
|
552
573
|
Init_gtk_statusbar(RG_TARGET_NAMESPACE);
|
553
574
|
Init_gtk_status_icon(RG_TARGET_NAMESPACE);
|
554
575
|
Init_gtk_stock(RG_TARGET_NAMESPACE);
|
@@ -1,7 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C)
|
4
|
-
* Copyright (C) 2008 Ruby-GNOME2 Project Team
|
3
|
+
* Copyright (C) 2008-2014 Ruby-GNOME2 Project Team
|
5
4
|
*
|
6
5
|
* This library is free software; you can redistribute it and/or
|
7
6
|
* modify it under the terms of the GNU Lesser General Public
|
@@ -79,6 +78,9 @@
|
|
79
78
|
#define RVAL2GTKFONTCHOOSERWIDGET(o) (GTK_FONT_CHOOSER_WIDGET(RVAL2GOBJ(o)))
|
80
79
|
#define RVAL2GTKFRAME(o) (GTK_FRAME(RVAL2GOBJ(o)))
|
81
80
|
#define RVAL2GTKGRID(o) (GTK_GRID(RVAL2GOBJ(o)))
|
81
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
82
|
+
# define RVAL2GTKHEADERBAR(o) (GTK_HEADER_BAR(RVAL2GOBJ(o)))
|
83
|
+
#endif
|
82
84
|
#define RVAL2GTKHSV(o) (GTK_HSV(RVAL2GOBJ(o)))
|
83
85
|
#define RVAL2GTKICONFACTORY(o) (GTK_ICON_FACTORY(RVAL2GOBJ(o)))
|
84
86
|
#define RVAL2GTKICONTHEME(o) (GTK_ICON_THEME(RVAL2GOBJ(o)))
|
@@ -91,6 +93,9 @@
|
|
91
93
|
#define RVAL2GTKINVISIBLE(o) (GTK_INVISIBLE(RVAL2GOBJ(o)))
|
92
94
|
#define RVAL2GTKLABEL(o) (GTK_LABEL(RVAL2GOBJ(o)))
|
93
95
|
#define RVAL2GTKLAYOUT(o) (GTK_LAYOUT(RVAL2GOBJ(o)))
|
96
|
+
#if GTK_CHECK_VERSION(3, 6, 0)
|
97
|
+
# define RVAL2GTKLEVELBAR(o) (GTK_LEVEL_BAR(RVAL2GOBJ(o)))
|
98
|
+
#endif
|
94
99
|
#define RVAL2GTKLINKBUTTON(o) (GTK_LINK_BUTTON(RVAL2GOBJ(o)))
|
95
100
|
#define RVAL2GTKLISTSTORE(o) (GTK_LIST_STORE(RVAL2GOBJ(o)))
|
96
101
|
#define RVAL2GTKMENU(o) (GTK_MENU(RVAL2GOBJ(o)))
|
@@ -131,12 +136,18 @@
|
|
131
136
|
#define RVAL2GTKSCROLLABLE(o) (GTK_SCROLLABLE(RVAL2GOBJ(o)))
|
132
137
|
#define RVAL2GTKSCROLLBAR(o) (GTK_SCROLLBAR(RVAL2GOBJ(o)))
|
133
138
|
#define RVAL2GTKSCROLLEDWINDOW(o) (GTK_SCROLLED_WINDOW(RVAL2GOBJ(o)))
|
139
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
140
|
+
# define RVAL2GTKSEARCHBAR(o) (GTK_SEARCH_BAR(RVAL2GOBJ(o)))
|
141
|
+
#endif
|
134
142
|
#define RVAL2GTKSEPARATOR(o) (GTK_SEPARATOR(RVAL2GOBJ(o)))
|
135
143
|
#define RVAL2GTKSETTINGS(o) (GTK_SETTINGS(RVAL2GOBJ(o)))
|
136
144
|
#define RVAL2GTKSIZEGROUP(o) (GTK_SIZE_GROUP(RVAL2GOBJ(o)))
|
137
145
|
#define RVAL2GTKSOCKET(o) (GTK_SOCKET(RVAL2GOBJ(o)))
|
138
146
|
#define RVAL2GTKSPINBUTTON(o) (GTK_SPIN_BUTTON(RVAL2GOBJ(o)))
|
139
147
|
#define RVAL2GTKSPINNER(o) (GTK_SPINNER(RVAL2GOBJ(o)))
|
148
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
149
|
+
# define RVAL2GTKSTACK(o) (GTK_STACK(RVAL2GOBJ(o)))
|
150
|
+
#endif
|
140
151
|
#define RVAL2GTKSTATUSBAR(o) (GTK_STATUSBAR(RVAL2GOBJ(o)))
|
141
152
|
#define RVAL2GTKSTATUSICON(o) (GTK_STATUS_ICON(RVAL2GOBJ(o)))
|
142
153
|
#define RVAL2GTKSTYLECONTEXT(o) (GTK_STYLE_CONTEXT(RVAL2GOBJ(o)))
|
@@ -297,6 +308,10 @@
|
|
297
308
|
#define GTKSORTTYPE2RVAL(o) (GENUM2RVAL(o, GTK_TYPE_SORT_TYPE))
|
298
309
|
#define RVAL2GTKSPINTYPE(o) (RVAL2GENUM(o, GTK_TYPE_SPIN_TYPE))
|
299
310
|
#define GTKSPINTYPE2RVAL(o) (GENUM2RVAL(o, GTK_TYPE_SPIN_TYPE))
|
311
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
312
|
+
# define RVAL2GTKSTACKTRANSITIONTYPE(o) (RVAL2GENUM(o, GTK_TYPE_STACK_TRANSITION_TYPE))
|
313
|
+
# define GTKSTACKTRANSITIONTYPE2RVAL(o) (GENUM2RVAL(o, GTK_TYPE_STACK_TRANSITION_TYPE))
|
314
|
+
#endif
|
300
315
|
#define RVAL2GTKSTATETYPE(o) (RVAL2GENUM(o, GTK_TYPE_STATE_TYPE))
|
301
316
|
#define GTKSTATETYPE2RVAL(o) (GENUM2RVAL(o, GTK_TYPE_STATE_TYPE))
|
302
317
|
#define RVAL2GTKTEXTDIRECTION(o) (RVAL2GENUM(o, GTK_TYPE_TEXT_DIRECTION))
|
@@ -351,4 +366,12 @@
|
|
351
366
|
#define RVAL2GTKUIMANAGERITEMTYPE(o) (RVAL2GFLAGS(o, GTK_TYPE_UI_MANAGER_ITEM_TYPE))
|
352
367
|
#define GTKUIMANAGERITEMTYPE2RVAL(o) (GFLAGS2RVAL(o, GTK_TYPE_UI_MANAGER_ITEM_TYPE))
|
353
368
|
|
369
|
+
/* For GIO. They are temporary. They will be needless after Ruby/GDK3
|
370
|
+
* is based on Ruby/GObjectIntrospection.
|
371
|
+
*/
|
372
|
+
#define RVAL2GFILE(o) (G_FILE(RVAL2GOBJ(o)))
|
373
|
+
#define RVAL2GICON(o) (G_ICON(RVAL2GOBJ(o)))
|
374
|
+
#define RVAL2GPERMISSION(o) (G_PERMISSION(RVAL2GOBJ(o)))
|
375
|
+
#define RVAL2GAPPLICATIONFLAGS(o) (RVAL2GFLAGS(o, G_TYPE_APPLICATION_FLAGS))
|
376
|
+
|
354
377
|
#endif /* __RBGTK3CONVERSIONS_H__ */
|
data/ext/gtk3/rbgtk3private.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011
|
3
|
+
* Copyright (C) 2011-2014 Ruby-GNOME2 Project Team
|
4
4
|
* Copyright (C) 2002,2003 Ruby-GNOME2 Project Team
|
5
5
|
* Copyright (C) 1998-2000 Yukihiro Matsumoto,
|
6
6
|
* Daisuke Kanda,
|
@@ -33,7 +33,6 @@
|
|
33
33
|
|
34
34
|
#include <rb_cairo.h>
|
35
35
|
#include <cairo-gobject.h>
|
36
|
-
#include <rbgio2.h>
|
37
36
|
#include <rbpango.h>
|
38
37
|
#include <rbgdk-pixbuf.h>
|
39
38
|
#include <rbgdk3.h>
|
@@ -59,7 +58,7 @@ G_GNUC_INTERNAL void rbgtk_register_treeiter_set_value_func(GType, rbgtkiter_set
|
|
59
58
|
|
60
59
|
G_GNUC_INTERNAL void rbgtk_atom2selectiondata(VALUE type, VALUE size, VALUE src, GdkAtom* gtype,
|
61
60
|
void** data, gint* format, gint* length);
|
62
|
-
G_GNUC_INTERNAL void rbgtk_atom2selectiondata_free(GdkAtom gtype, void* data);
|
61
|
+
G_GNUC_INTERNAL void rbgtk_atom2selectiondata_free(GdkAtom gtype, void* data);
|
63
62
|
|
64
63
|
#define RVAL2GTKTARGETENTRIES(value, n) rbgtk_rval2gtktargetentries(value, n)
|
65
64
|
G_GNUC_INTERNAL GtkTargetEntry *rbgtk_rval2gtktargetentries(VALUE value, long *n);
|
@@ -149,6 +148,9 @@ G_GNUC_INTERNAL void Init_gtk_fontchooserwidget(VALUE mGtk);
|
|
149
148
|
G_GNUC_INTERNAL void Init_gtk_frame(VALUE mGtk);
|
150
149
|
G_GNUC_INTERNAL void Init_gtk_grid(VALUE mGtk);
|
151
150
|
G_GNUC_INTERNAL void Init_gtk_handle_box(VALUE mGtk);
|
151
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
152
|
+
G_GNUC_INTERNAL void Init_gtk_header_bar(VALUE mGtk);
|
153
|
+
#endif
|
152
154
|
G_GNUC_INTERNAL void Init_gtk_hsv(VALUE mGtk);
|
153
155
|
G_GNUC_INTERNAL void Init_gtk_icon_factory(VALUE mGtk);
|
154
156
|
G_GNUC_INTERNAL void Init_gtk_icon_info(VALUE mGtk);
|
@@ -166,11 +168,17 @@ G_GNUC_INTERNAL void Init_gtk_infobar(VALUE mGtk);
|
|
166
168
|
G_GNUC_INTERNAL void Init_gtk_invisible(VALUE mGtk);
|
167
169
|
G_GNUC_INTERNAL void Init_gtk_label(VALUE mGtk);
|
168
170
|
G_GNUC_INTERNAL void Init_gtk_layout(VALUE mGtk);
|
171
|
+
#if GTK_CHECK_VERSION(3, 6, 0)
|
172
|
+
G_GNUC_INTERNAL void Init_gtk_level_bar(VALUE mGtk);
|
173
|
+
#endif
|
169
174
|
G_GNUC_INTERNAL void Init_gtk_link_button(VALUE mGtk);
|
170
175
|
G_GNUC_INTERNAL void Init_gtk_list_store(VALUE mGtk);
|
171
176
|
G_GNUC_INTERNAL void Init_gtk_lockbutton(VALUE mGtk);
|
172
177
|
G_GNUC_INTERNAL void Init_gtk_menu(VALUE mGtk);
|
173
178
|
G_GNUC_INTERNAL void Init_gtk_menu_bar(VALUE mGtk);
|
179
|
+
#if GTK_CHECK_VERSION(3, 6, 0)
|
180
|
+
G_GNUC_INTERNAL void Init_gtk_menu_button(VALUE mGtk);
|
181
|
+
#endif
|
174
182
|
G_GNUC_INTERNAL void Init_gtk_menu_item(VALUE mGtk);
|
175
183
|
G_GNUC_INTERNAL void Init_gtk_menu_shell(VALUE mGtk);
|
176
184
|
G_GNUC_INTERNAL void Init_gtk_menutoolbutton(VALUE mGtk);
|
@@ -208,11 +216,20 @@ G_GNUC_INTERNAL void Init_gtk_recent_filter(VALUE mGtk);
|
|
208
216
|
G_GNUC_INTERNAL void Init_gtk_recent_filter_info(VALUE mGtk);
|
209
217
|
G_GNUC_INTERNAL void Init_gtk_recent_info(VALUE mGtk);
|
210
218
|
G_GNUC_INTERNAL void Init_gtk_recent_manager(VALUE mGtk);
|
219
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
220
|
+
G_GNUC_INTERNAL void Init_gtk_revealer(VALUE mGtk);
|
221
|
+
#endif
|
211
222
|
G_GNUC_INTERNAL void Init_gtk_scale(VALUE mGtk);
|
212
223
|
G_GNUC_INTERNAL void Init_gtk_scalebutton(VALUE mGtk);
|
213
224
|
G_GNUC_INTERNAL void Init_gtk_scrollable(VALUE mGtk);
|
214
225
|
G_GNUC_INTERNAL void Init_gtk_scrollbar(VALUE mGtk);
|
215
226
|
G_GNUC_INTERNAL void Init_gtk_scrolled_window(VALUE mGtk);
|
227
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
228
|
+
G_GNUC_INTERNAL void Init_gtk_search_bar(VALUE mGtk);
|
229
|
+
#endif
|
230
|
+
#if GTK_CHECK_VERSION(3, 6, 0)
|
231
|
+
G_GNUC_INTERNAL void Init_gtk_search_entry(VALUE mGtk);
|
232
|
+
#endif
|
216
233
|
G_GNUC_INTERNAL void Init_gtk_selection(VALUE mGtk);
|
217
234
|
G_GNUC_INTERNAL void Init_gtk_selectiondata(VALUE mGtk);
|
218
235
|
G_GNUC_INTERNAL void Init_gtk_separator(VALUE mGtk);
|
@@ -223,6 +240,9 @@ G_GNUC_INTERNAL void Init_gtk_size_group(VALUE mGtk);
|
|
223
240
|
G_GNUC_INTERNAL void Init_gtk_socket(VALUE mGtk);
|
224
241
|
G_GNUC_INTERNAL void Init_gtk_spin_button(VALUE mGtk);
|
225
242
|
G_GNUC_INTERNAL void Init_gtk_spinner(VALUE mGtk);
|
243
|
+
#if GTK_CHECK_VERSION(3, 10, 0)
|
244
|
+
G_GNUC_INTERNAL void Init_gtk_stack(VALUE mGtk);
|
245
|
+
#endif
|
226
246
|
G_GNUC_INTERNAL void Init_gtk_statusbar(VALUE mGtk);
|
227
247
|
G_GNUC_INTERNAL void Init_gtk_status_icon(VALUE mGtk);
|
228
248
|
G_GNUC_INTERNAL void Init_gtk_stock(VALUE mGtk);
|