gtk2 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +52 -0
- data/ext/gtk2/extconf.rb +18 -9
- data/ext/gtk2/rbgdk.h +3 -0
- data/ext/gtk2/rbgdkdragcontext.c +4 -4
- data/ext/gtk2/rbgdkevent.c +18 -5
- data/ext/gtk2/rbgdkpixmap.c +43 -48
- data/ext/gtk2/rbgdkproperty.c +6 -5
- data/ext/gtk2/rbgdkscreen.c +18 -74
- data/ext/gtk2/rbgdkselection.c +2 -2
- data/ext/gtk2/rbgdkwindow.c +11 -18
- data/ext/gtk2/rbgdkwindowattr.c +1 -1
- data/ext/gtk2/rbgtkaccelgroup.c +1 -1
- data/ext/gtk2/rbgtkaction.c +8 -26
- data/ext/gtk2/rbgtkactiongroup.c +6 -6
- data/ext/gtk2/rbgtkadjustment.c +20 -74
- data/ext/gtk2/rbgtkbindingset.c +1 -1
- data/ext/gtk2/rbgtkbuilder.c +2 -1
- data/ext/gtk2/rbgtkbutton.c +1 -9
- data/ext/gtk2/rbgtkcalendar.c +1 -1
- data/ext/gtk2/rbgtkcellrendererspinner.c +0 -3
- data/ext/gtk2/rbgtkcellrenderertext.c +1 -2
- data/ext/gtk2/rbgtkcellview.c +6 -11
- data/ext/gtk2/rbgtkcolorselectiondialog.c +2 -28
- data/ext/gtk2/rbgtkcombo.c +2 -2
- data/ext/gtk2/rbgtkcombobox.c +9 -29
- data/ext/gtk2/rbgtkcontainer.c +1 -1
- data/ext/gtk2/rbgtkcurve.c +4 -2
- data/ext/gtk2/rbgtkdialog.c +2 -3
- data/ext/gtk2/rbgtkdrag.c +3 -3
- data/ext/gtk2/rbgtkentry.c +2 -2
- data/ext/gtk2/rbgtkentrycompletion.c +1 -4
- data/ext/gtk2/rbgtkfilechooser.c +32 -29
- data/ext/gtk2/rbgtkfilechooserdialog.c +8 -6
- data/ext/gtk2/rbgtkfilefilter.c +8 -4
- data/ext/gtk2/rbgtkframe.c +3 -4
- data/ext/gtk2/rbgtkhandlebox.c +0 -7
- data/ext/gtk2/rbgtkicontheme.c +4 -13
- data/ext/gtk2/rbgtkiconview.c +4 -15
- data/ext/gtk2/rbgtkimcontext.c +1 -1
- data/ext/gtk2/rbgtkinvisible.c +5 -21
- data/ext/gtk2/rbgtkitemfactory.c +3 -3
- data/ext/gtk2/rbgtklabel.c +0 -2
- data/ext/gtk2/rbgtklinkbutton.c +0 -2
- data/ext/gtk2/rbgtkmain.c +7 -10
- data/ext/gtk2/rbgtkmenu.c +22 -74
- data/ext/gtk2/rbgtkmenuitem.c +16 -55
- data/ext/gtk2/rbgtkmenushell.c +3 -11
- data/ext/gtk2/rbgtkmessagedialog.c +11 -20
- data/ext/gtk2/rbgtknotebook.c +0 -1
- data/ext/gtk2/rbgtkoptionmenu.c +1 -2
- data/ext/gtk2/rbgtkprintjob.c +1 -2
- data/ext/gtk2/rbgtkprintoperation.c +0 -2
- data/ext/gtk2/rbgtkradioaction.c +2 -7
- data/ext/gtk2/rbgtkradiobutton.c +1 -1
- data/ext/gtk2/rbgtkradiomenuitem.c +4 -6
- data/ext/gtk2/rbgtkradiotoolbutton.c +2 -4
- data/ext/gtk2/rbgtkrange.c +1 -2
- data/ext/gtk2/rbgtkrc.c +8 -9
- data/ext/gtk2/rbgtkrcstyle.c +2 -2
- data/ext/gtk2/rbgtkrecentaction.c +0 -1
- data/ext/gtk2/rbgtkrecentchooser.c +3 -3
- data/ext/gtk2/rbgtkrecentdata.c +2 -9
- data/ext/gtk2/rbgtkrecentfilter.c +2 -1
- data/ext/gtk2/rbgtkrecentfilterinfo.c +5 -16
- data/ext/gtk2/rbgtkrecentinfo.c +2 -2
- data/ext/gtk2/rbgtkrecentmanager.c +1 -2
- data/ext/gtk2/rbgtkruler.c +6 -16
- data/ext/gtk2/rbgtkscalebutton.c +16 -48
- data/ext/gtk2/rbgtkscrolledwindow.c +1 -1
- data/ext/gtk2/rbgtkselectiondata.c +10 -34
- data/ext/gtk2/rbgtksettings.c +1 -1
- data/ext/gtk2/rbgtkspinner.c +0 -3
- data/ext/gtk2/rbgtkstatusbar.c +5 -16
- data/ext/gtk2/rbgtkstatusicon.c +2 -9
- data/ext/gtk2/rbgtkstock.c +4 -4
- data/ext/gtk2/rbgtktable.c +8 -13
- data/ext/gtk2/rbgtktextattributes.c +0 -2
- data/ext/gtk2/rbgtktextbuffer.c +17 -16
- data/ext/gtk2/rbgtktextmark.c +7 -14
- data/ext/gtk2/rbgtktexttag.c +1 -2
- data/ext/gtk2/rbgtktextview.c +3 -4
- data/ext/gtk2/rbgtktoggleaction.c +5 -16
- data/ext/gtk2/rbgtktogglebutton.c +1 -2
- data/ext/gtk2/rbgtktoggletoolbutton.c +5 -16
- data/ext/gtk2/rbgtktoolbar.c +8 -31
- data/ext/gtk2/rbgtktoolitem.c +3 -1
- data/ext/gtk2/rbgtktreerowreference.c +4 -4
- data/ext/gtk2/rbgtktreesortable.c +0 -3
- data/ext/gtk2/rbgtktreestore.c +10 -7
- data/ext/gtk2/rbgtktreeview.c +5 -8
- data/ext/gtk2/rbgtktreeviewcolumn.c +13 -34
- data/ext/gtk2/rbgtkuimanager.c +2 -3
- data/ext/gtk2/rbgtkwidget.c +24 -44
- data/ext/gtk2/rbgtkwindow.c +32 -92
- data/lib/gtk2/base.rb +1 -1
- metadata +13 -13
@@ -71,8 +71,7 @@ Init_gtk_toggle_button()
|
|
71
71
|
|
72
72
|
rb_define_method(gTButton, "initialize", tbtn_initialize, -1);
|
73
73
|
rb_define_method(gTButton, "set_mode", tbtn_set_mode, 1);
|
74
|
+
G_DEF_SETTER(gTButton, "mode");
|
74
75
|
rb_define_method(gTButton, "mode?", tbtn_get_mode, 0);
|
75
76
|
rb_define_method(gTButton, "toggled", tbtn_toggled, 0);
|
76
|
-
|
77
|
-
G_DEF_SETTERS(gTButton);
|
78
77
|
}
|
@@ -35,18 +35,11 @@ toggletoolbutton_initialize(int argc, VALUE *argv, VALUE self)
|
|
35
35
|
return Qnil;
|
36
36
|
}
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
}
|
44
|
-
|
45
|
-
static VALUE
|
46
|
-
toggletoolbutton_get_active(VALUE self)
|
47
|
-
{
|
48
|
-
return CBOOL2RVAL(gtk_toggle_tool_button_get_active(_SELF(self)));
|
49
|
-
}
|
38
|
+
/* Defined as Properties:
|
39
|
+
void gtk_toggle_tool_button_set_active (GtkToggleToolButton *button,
|
40
|
+
gboolean is_active);
|
41
|
+
gboolean gtk_toggle_tool_button_get_active (GtkToggleToolButton *button);
|
42
|
+
*/
|
50
43
|
|
51
44
|
#endif
|
52
45
|
|
@@ -57,9 +50,5 @@ Init_gtk_toggletoolbutton()
|
|
57
50
|
VALUE gToggleToolButton = G_DEF_CLASS(GTK_TYPE_TOGGLE_TOOL_BUTTON, "ToggleToolButton", mGtk);
|
58
51
|
|
59
52
|
rb_define_method(gToggleToolButton, "initialize", toggletoolbutton_initialize, -1);
|
60
|
-
rb_define_method(gToggleToolButton, "set_active", toggletoolbutton_set_active, 1);
|
61
|
-
rb_define_method(gToggleToolButton, "active?", toggletoolbutton_get_active, 0);
|
62
|
-
|
63
|
-
G_DEF_SETTERS(gToggleToolButton);
|
64
53
|
#endif
|
65
54
|
}
|
data/ext/gtk2/rbgtktoolbar.c
CHANGED
@@ -256,31 +256,14 @@ tbar_insert_space(VALUE self, VALUE pos)
|
|
256
256
|
return self;
|
257
257
|
}
|
258
258
|
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
tbar_set_icon_size(VALUE self, VALUE size)
|
268
|
-
{
|
269
|
-
gtk_toolbar_set_icon_size(_SELF(self), RVAL2GENUM(size, GTK_TYPE_ICON_SIZE));
|
270
|
-
return self;
|
271
|
-
}
|
272
|
-
|
273
|
-
static VALUE
|
274
|
-
tbar_get_icon_size(VALUE self)
|
275
|
-
{
|
276
|
-
return GENUM2RVAL(gtk_toolbar_get_icon_size(_SELF(self)), GTK_TYPE_ICON_SIZE);
|
277
|
-
}
|
278
|
-
|
279
|
-
static VALUE
|
280
|
-
tbar_get_tooltips(VALUE self)
|
281
|
-
{
|
282
|
-
return CBOOL2RVAL(gtk_toolbar_get_tooltips(_SELF(self)));
|
283
|
-
}
|
259
|
+
/* Defined as Properties:
|
260
|
+
void gtk_toolbar_set_tooltips (GtkToolbar *toolbar,
|
261
|
+
gboolean enable);
|
262
|
+
void gtk_toolbar_set_icon_size (GtkToolbar *toolbar,
|
263
|
+
GtkIconSize icon_size);
|
264
|
+
GtkIconSize gtk_toolbar_get_icon_size (GtkToolbar *toolbar);
|
265
|
+
gboolean gtk_toolbar_get_tooltips (GtkToolbar *toolbar);
|
266
|
+
*/
|
284
267
|
|
285
268
|
static VALUE
|
286
269
|
tbar_remove_space(VALUE self, VALUE position)
|
@@ -323,16 +306,10 @@ Init_gtk_toolbar()
|
|
323
306
|
rb_define_method(gToolbar, "append_space", tbar_append_space, 0);
|
324
307
|
rb_define_method(gToolbar, "prepend_space", tbar_prepend_space, 0);
|
325
308
|
rb_define_method(gToolbar, "insert_space", tbar_insert_space, 1);
|
326
|
-
rb_define_method(gToolbar, "set_tooltips", tbar_set_tooltips, 1);
|
327
|
-
rb_define_method(gToolbar, "set_icon_size", tbar_set_icon_size, 1);
|
328
|
-
rb_define_method(gToolbar, "icon_size", tbar_get_icon_size, 0);
|
329
|
-
rb_define_method(gToolbar, "tooltips?", tbar_get_tooltips, 0);
|
330
309
|
rb_define_method(gToolbar, "remove_space", tbar_remove_space, 1);
|
331
310
|
rb_define_method(gToolbar, "unset_icon_size", tbar_unset_icon_size, 0);
|
332
311
|
rb_define_method(gToolbar, "unset_style", tbar_unset_style, 0);
|
333
312
|
|
334
|
-
G_DEF_SETTERS(gToolbar);
|
335
|
-
|
336
313
|
/* GtkToolbarChildType */
|
337
314
|
G_DEF_CLASS(GTK_TYPE_TOOLBAR_CHILD_TYPE, "ChildType", gToolbar);
|
338
315
|
G_DEF_CONSTANTS(gToolbar, GTK_TYPE_TOOLBAR_CHILD_TYPE, "GTK_TOOLBAR_");
|
data/ext/gtk2/rbgtktoolitem.c
CHANGED
@@ -145,11 +145,14 @@ Init_gtk_toolitem()
|
|
145
145
|
VALUE gToolItem = G_DEF_CLASS(GTK_TYPE_TOOL_ITEM, "ToolItem", mGtk);
|
146
146
|
rb_define_method(gToolItem, "initialize", toolitem_initialize, 0);
|
147
147
|
rb_define_method(gToolItem, "set_homogeneous", toolitem_set_homogeneous, 1);
|
148
|
+
G_DEF_SETTER(gToolItem, "homogenous");
|
148
149
|
rb_define_method(gToolItem, "homogeneous?", toolitem_get_homogeneous, 0);
|
149
150
|
rb_define_method(gToolItem, "set_expand", toolitem_set_expand, 1);
|
151
|
+
G_DEF_SETTER(gToolItem, "expand");
|
150
152
|
rb_define_method(gToolItem, "expand?", toolitem_get_expand, 0);
|
151
153
|
rb_define_method(gToolItem, "set_tooltip", toolitem_set_tooltip, -1);
|
152
154
|
rb_define_method(gToolItem, "set_use_drag_window", toolitem_set_use_drag_window, 1);
|
155
|
+
G_DEF_SETTER(gToolItem, "use_drag_window");
|
153
156
|
rb_define_method(gToolItem, "use_drag_window?", toolitem_get_use_drag_window, 0);
|
154
157
|
rb_define_method(gToolItem, "icon_size", toolitem_get_icon_size, 0);
|
155
158
|
rb_define_method(gToolItem, "orientation", toolitem_get_orientation, 0);
|
@@ -161,6 +164,5 @@ Init_gtk_toolitem()
|
|
161
164
|
#if GTK_CHECK_VERSION(2,6,0)
|
162
165
|
rb_define_method(gToolItem, "rebuild_menu", toolitem_rebuild_menu, 0);
|
163
166
|
#endif
|
164
|
-
G_DEF_SETTERS(gToolItem);
|
165
167
|
#endif
|
166
168
|
}
|
@@ -137,10 +137,6 @@ treerowref_s_reordered(VALUE self, VALUE proxy, VALUE path, VALUE iter, VALUE ne
|
|
137
137
|
void
|
138
138
|
Init_gtk_treerowreference()
|
139
139
|
{
|
140
|
-
id_proxy = rb_intern("proxy");
|
141
|
-
id_model = rb_intern("model");
|
142
|
-
id_path = rb_intern("path");
|
143
|
-
|
144
140
|
VALUE gTreeref = G_DEF_CLASS(GTK_TYPE_TREE_ROW_REFERENCE, "TreeRowReference", mGtk);
|
145
141
|
|
146
142
|
rb_define_method(gTreeref, "initialize", treerowref_initialize, -1);
|
@@ -153,5 +149,9 @@ Init_gtk_treerowreference()
|
|
153
149
|
rb_define_singleton_method(gTreeref, "inserted", treerowref_s_inserted, 2);
|
154
150
|
rb_define_singleton_method(gTreeref, "deleted", treerowref_s_deleted, 2);
|
155
151
|
rb_define_singleton_method(gTreeref, "reordered", treerowref_s_reordered, 4);
|
152
|
+
|
153
|
+
id_proxy = rb_intern("proxy");
|
154
|
+
id_model = rb_intern("model");
|
155
|
+
id_path = rb_intern("path");
|
156
156
|
}
|
157
157
|
|
@@ -107,9 +107,6 @@ Init_gtk_treesortable()
|
|
107
107
|
rb_define_method(mts, "set_default_sort_func", treesortable_set_default_sort_func, 0);
|
108
108
|
rb_define_method(mts, "has_default_sort_func?", treesortable_has_default_sort_func, 0);
|
109
109
|
|
110
|
-
G_DEF_SETTERS(mts);
|
111
|
-
|
112
|
-
rb_undef_method(mts, "sort_func=");
|
113
110
|
rb_define_const(mts, "DEFAULT_SORT_COLUMN_ID", GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID);
|
114
111
|
}
|
115
112
|
|
data/ext/gtk2/rbgtktreestore.c
CHANGED
@@ -119,11 +119,13 @@ tstore_insert(int argc, VALUE *argv, VALUE self)
|
|
119
119
|
|
120
120
|
if(TYPE(values)==T_ARRAY) {
|
121
121
|
for(i=0; i<size; i++) {
|
122
|
+
GType gtype;
|
123
|
+
GValue gval = {0,};
|
124
|
+
|
122
125
|
c_columns[i] = i;
|
123
|
-
|
124
|
-
|
126
|
+
gtype = gtk_tree_model_get_column_type(GTK_TREE_MODEL(RVAL2GOBJ(self)),
|
127
|
+
c_columns[i]);
|
125
128
|
|
126
|
-
GValue gval = {0,};
|
127
129
|
g_value_init(&gval, gtype);
|
128
130
|
rbgobj_rvalue_to_gvalue(rb_ary_shift(values), &gval);
|
129
131
|
c_values[i] = gval;
|
@@ -133,12 +135,13 @@ tstore_insert(int argc, VALUE *argv, VALUE self)
|
|
133
135
|
r_columns = rb_funcall(values, rb_intern("keys"), 0);
|
134
136
|
|
135
137
|
for(i=0; i<size; i++) {
|
138
|
+
GType gtype;
|
139
|
+
GValue gval = {0,};
|
140
|
+
|
136
141
|
c_columns[i] = NUM2INT (rb_ary_entry(r_columns, i));
|
142
|
+
gtype = gtk_tree_model_get_column_type(GTK_TREE_MODEL(RVAL2GOBJ(self)),
|
143
|
+
c_columns[i]);
|
137
144
|
|
138
|
-
GType gtype = gtk_tree_model_get_column_type(GTK_TREE_MODEL(RVAL2GOBJ(self)),
|
139
|
-
c_columns[i]);
|
140
|
-
|
141
|
-
GValue gval = {0,};
|
142
145
|
g_value_init(&gval, gtype);
|
143
146
|
rbgobj_rvalue_to_gvalue(rb_hash_aref(values, INT2NUM(c_columns[i])), &gval);
|
144
147
|
c_values[i] = gval;
|
data/ext/gtk2/rbgtktreeview.c
CHANGED
@@ -222,13 +222,11 @@ treeview_get_cursor(VALUE self)
|
|
222
222
|
GOBJ2RVAL(focus_column));
|
223
223
|
}
|
224
224
|
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
return self;
|
231
|
-
}
|
225
|
+
/* Defined as Signals
|
226
|
+
void gtk_tree_view_row_activated (GtkTreeView *tree_view,
|
227
|
+
GtkTreePath *path,
|
228
|
+
GtkTreeViewColumn *column);
|
229
|
+
*/
|
232
230
|
|
233
231
|
static VALUE
|
234
232
|
treeview_expand_all(VALUE self)
|
@@ -730,7 +728,6 @@ Init_gtk_treeview()
|
|
730
728
|
rb_define_method(gTv, "scroll_to_cell", treeview_scroll_to_cell, 5);
|
731
729
|
rb_define_method(gTv, "set_cursor", treeview_set_cursor, 3);
|
732
730
|
rb_define_method(gTv, "cursor", treeview_get_cursor, 0);
|
733
|
-
rb_define_method(gTv, "row_activated", treeview_row_activated, 2);
|
734
731
|
rb_define_method(gTv, "expand_all", treeview_expand_all, 0);
|
735
732
|
rb_define_method(gTv, "collapse_all", treeview_collapse_all, 0);
|
736
733
|
rb_define_method(gTv, "expand_row", treeview_expand_row, 2);
|
@@ -154,18 +154,11 @@ tvc_clear_attributes(VALUE self, VALUE cell)
|
|
154
154
|
return self;
|
155
155
|
}
|
156
156
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
}
|
163
|
-
|
164
|
-
static VALUE
|
165
|
-
tvc_get_spacing(VALUE self)
|
166
|
-
{
|
167
|
-
return INT2NUM(gtk_tree_view_column_get_spacing(_SELF(self)));
|
168
|
-
}
|
157
|
+
/* Defined as Properties:
|
158
|
+
void gtk_tree_view_column_set_spacing (GtkTreeViewColumn *tree_column,
|
159
|
+
gint spacing);
|
160
|
+
gint gtk_tree_view_column_get_spacing (GtkTreeViewColumn *tree_column);
|
161
|
+
*/
|
169
162
|
|
170
163
|
static VALUE
|
171
164
|
tvc_clicked(VALUE self)
|
@@ -174,19 +167,13 @@ tvc_clicked(VALUE self)
|
|
174
167
|
return self;
|
175
168
|
}
|
176
169
|
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
static VALUE
|
186
|
-
tvc_get_sort_column_id(VALUE self)
|
187
|
-
{
|
188
|
-
return INT2NUM(gtk_tree_view_column_get_sort_column_id(_SELF(self)));
|
189
|
-
}
|
170
|
+
/* Defined as Properties:
|
171
|
+
void gtk_tree_view_column_set_sort_column_id
|
172
|
+
(GtkTreeViewColumn *tree_column,
|
173
|
+
gint sort_column_id);
|
174
|
+
gint gtk_tree_view_column_get_sort_column_id
|
175
|
+
(GtkTreeViewColumn *tree_column);
|
176
|
+
*/
|
190
177
|
|
191
178
|
static VALUE
|
192
179
|
tvc_cell_set_cell_data(VALUE self, VALUE model, VALUE iter, VALUE is_expander, VALUE is_expanded)
|
@@ -229,7 +216,7 @@ tvc_cell_get_size(VALUE self)
|
|
229
216
|
}
|
230
217
|
|
231
218
|
static VALUE
|
232
|
-
tvc_cell_is_visible(self)
|
219
|
+
tvc_cell_is_visible(VALUE self)
|
233
220
|
{
|
234
221
|
return CBOOL2RVAL(gtk_tree_view_column_cell_is_visible(_SELF(self)));
|
235
222
|
}
|
@@ -278,11 +265,7 @@ Init_gtk_treeviewcolumn()
|
|
278
265
|
rb_define_method(tvc, "set_attributes", tvc_set_attributes, 2);
|
279
266
|
rb_define_method(tvc, "set_cell_data_func", tvc_set_cell_data_func, 1);
|
280
267
|
rb_define_method(tvc, "clear_attributes", tvc_clear_attributes, 1);
|
281
|
-
rb_define_method(tvc, "set_spacing", tvc_set_spacing, 1);
|
282
|
-
rb_define_method(tvc, "spacing", tvc_get_spacing, 0);
|
283
268
|
rb_define_method(tvc, "clicked", tvc_clicked, 0);
|
284
|
-
rb_define_method(tvc, "set_sort_column_id", tvc_set_sort_column_id, 1);
|
285
|
-
rb_define_method(tvc, "sort_column_id", tvc_get_sort_column_id, 0);
|
286
269
|
rb_define_method(tvc, "cell_set_cell_data", tvc_cell_set_cell_data, 4);
|
287
270
|
rb_define_method(tvc, "cell_size", tvc_cell_get_size, 0);
|
288
271
|
rb_define_method(tvc, "cell_is_visible?", tvc_cell_is_visible, 0);
|
@@ -298,8 +281,4 @@ Init_gtk_treeviewcolumn()
|
|
298
281
|
/* GtkTreeViewColumnSizing */
|
299
282
|
G_DEF_CLASS(GTK_TYPE_TREE_VIEW_COLUMN_SIZING, "Sizing", tvc);
|
300
283
|
G_DEF_CONSTANTS(tvc, GTK_TYPE_TREE_VIEW_COLUMN_SIZING, "GTK_TREE_VIEW_COLUMN_");
|
301
|
-
|
302
|
-
G_DEF_SETTERS(tvc);
|
303
|
-
|
304
|
-
rb_undef_method(tvc, "cell_data_func=");
|
305
284
|
}
|
data/ext/gtk2/rbgtkuimanager.c
CHANGED
@@ -97,7 +97,8 @@ rbuimanager_add_ui(int argc, VALUE *argv, VALUE self)
|
|
97
97
|
|
98
98
|
if (RVAL2CBOOL(buffer)){
|
99
99
|
StringValue(buffer_or_filename);
|
100
|
-
ret = gtk_ui_manager_add_ui_from_string(_SELF(self),
|
100
|
+
ret = gtk_ui_manager_add_ui_from_string(_SELF(self),
|
101
|
+
RSTRING_PTR(buffer_or_filename),
|
101
102
|
RSTRING_LEN(buffer_or_filename),
|
102
103
|
&error);
|
103
104
|
} else {
|
@@ -186,8 +187,6 @@ Init_gtk_uimanager()
|
|
186
187
|
rb_define_method(gUI, "remove_ui", rbuimanager_remove_ui, 1);
|
187
188
|
rb_define_method(gUI, "ensure_update", rbuimanager_ensure_update, 0);
|
188
189
|
|
189
|
-
G_DEF_SETTERS(gUI);
|
190
|
-
|
191
190
|
/* GtkUIManagerItemType */
|
192
191
|
G_DEF_CLASS(GTK_TYPE_UI_MANAGER_ITEM_TYPE, "ItemType", gUI);
|
193
192
|
G_DEF_CONSTANTS(gUI, GTK_TYPE_UI_MANAGER_ITEM_TYPE, "GTK_UI_MANAGER_");
|
data/ext/gtk2/rbgtkwidget.c
CHANGED
@@ -230,18 +230,13 @@ widget_intersect(VALUE self, VALUE area)
|
|
230
230
|
return ret ? BOXED2RVAL(&intersection, GDK_TYPE_RECTANGLE) : Qnil;
|
231
231
|
}
|
232
232
|
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
return CBOOL2RVAL(gtk_widget_is_focus(_SELF(self)));
|
237
|
-
}
|
233
|
+
/* Defined as Properties
|
234
|
+
gboolean gtk_widget_is_focus (GtkWidget *widget);
|
235
|
+
*/
|
238
236
|
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
gtk_widget_grab_focus(_SELF(self));
|
243
|
-
return self;
|
244
|
-
}
|
237
|
+
/* Defined as Signals
|
238
|
+
void gtk_widget_grab_focus (GtkWidget *widget);
|
239
|
+
*/
|
245
240
|
|
246
241
|
static VALUE
|
247
242
|
widget_grab_default(VALUE self)
|
@@ -610,12 +605,10 @@ widget_reset_shapes(VALUE self)
|
|
610
605
|
return self;
|
611
606
|
}
|
612
607
|
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
return self;
|
618
|
-
}
|
608
|
+
/* Defined as Properties:
|
609
|
+
void gtk_widget_set_double_buffered (GtkWidget *widget,
|
610
|
+
gboolean double_buffered);
|
611
|
+
*/
|
619
612
|
|
620
613
|
static VALUE
|
621
614
|
widget_set_redraw_on_allocate(VALUE self, VALUE redraw_on_allocate)
|
@@ -727,7 +720,7 @@ widget_s_style_properties(int argc, VALUE *argv, VALUE self)
|
|
727
720
|
GParamSpec** props;
|
728
721
|
VALUE inherited_too;
|
729
722
|
VALUE ary;
|
730
|
-
|
723
|
+
guint i;
|
731
724
|
|
732
725
|
if (rb_scan_args(argc, argv, "01", &inherited_too) == 0)
|
733
726
|
inherited_too = Qtrue;
|
@@ -801,7 +794,7 @@ widget_style_get_property(VALUE self, VALUE prop_name)
|
|
801
794
|
static VALUE
|
802
795
|
widget_get_accessible(VALUE self)
|
803
796
|
{
|
804
|
-
return GOBJ2RVAL(_SELF(self));
|
797
|
+
return GOBJ2RVAL(gtk_widget_get_accessible(_SELF(self)));
|
805
798
|
}
|
806
799
|
|
807
800
|
static VALUE
|
@@ -916,18 +909,11 @@ widget_thaw_child_notify(VALUE self)
|
|
916
909
|
}
|
917
910
|
|
918
911
|
#if GTK_CHECK_VERSION(2,4,0)
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
}
|
925
|
-
|
926
|
-
static VALUE
|
927
|
-
widget_get_no_show_all(VALUE self)
|
928
|
-
{
|
929
|
-
return CBOOL2RVAL(gtk_widget_get_no_show_all(_SELF(self)));
|
930
|
-
}
|
912
|
+
/* Defined as Properties:
|
913
|
+
void gtk_widget_set_no_show_all (GtkWidget *widget,
|
914
|
+
gboolean no_show_all);
|
915
|
+
gboolean gtk_widget_get_no_show_all (GtkWidget *widget);
|
916
|
+
*/
|
931
917
|
|
932
918
|
static VALUE
|
933
919
|
widget_list_mnemonic_labels(VALUE self)
|
@@ -987,16 +973,18 @@ widget_is_composited(VALUE self)
|
|
987
973
|
}
|
988
974
|
#endif
|
989
975
|
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
return GOBJ2RVAL(_SELF(self)->window);
|
994
|
-
}
|
976
|
+
/* Defined as Properties:
|
977
|
+
GdkWindow * gtk_widget_get_window (GtkWidget *widget);
|
978
|
+
*/
|
995
979
|
|
996
980
|
static VALUE
|
997
981
|
widget_set_window(VALUE self, VALUE window)
|
998
982
|
{
|
983
|
+
#if GTK_CHECK_VERSION(2,18,0)
|
984
|
+
gtk_widget_set_window(_SELF(self), GDK_WINDOW(RVAL2GOBJ(window)));
|
985
|
+
#else
|
999
986
|
_SELF(self)->window = RVAL2GOBJ(window);
|
987
|
+
#endif
|
1000
988
|
return self;
|
1001
989
|
}
|
1002
990
|
|
@@ -1016,7 +1004,6 @@ DEFINE_IS_WIDGET(PARENT_SENSITIVE);
|
|
1016
1004
|
DEFINE_IS_WIDGET(IS_SENSITIVE);
|
1017
1005
|
DEFINE_IS_WIDGET(HAS_GRAB);
|
1018
1006
|
DEFINE_IS_WIDGET(RC_STYLE);
|
1019
|
-
DEFINE_IS_WIDGET(DOUBLE_BUFFERED);
|
1020
1007
|
|
1021
1008
|
static VALUE
|
1022
1009
|
widget_get_allocation(VALUE self)
|
@@ -1125,8 +1112,6 @@ Init_gtk_widget()
|
|
1125
1112
|
rb_define_singleton_method(gWidget, "style_properties", widget_s_style_properties, -1);
|
1126
1113
|
#endif
|
1127
1114
|
rb_define_method(gWidget, "intersect", widget_intersect, 1);
|
1128
|
-
rb_define_method(gWidget, "focus?", widget_is_focus, 0);
|
1129
|
-
rb_define_method(gWidget, "grab_focus", widget_grab_focus, 0);
|
1130
1115
|
rb_define_method(gWidget, "grab_default", widget_grab_default, 0);
|
1131
1116
|
rb_define_method(gWidget, "set_state", widget_set_state, 1);
|
1132
1117
|
rb_define_method(gWidget, "set_parent_window", widget_set_parent_window, 1);
|
@@ -1168,7 +1153,6 @@ Init_gtk_widget()
|
|
1168
1153
|
rb_define_method(gWidget, "render_icon", widget_render_icon, -1);
|
1169
1154
|
rb_define_method(gWidget, "queue_draw_area", widget_queue_draw_area, 4);
|
1170
1155
|
rb_define_method(gWidget, "reset_shapes", widget_reset_shapes, 0);
|
1171
|
-
rb_define_method(gWidget, "set_double_buffered", widget_set_double_buffered, 1);
|
1172
1156
|
rb_define_method(gWidget, "set_redraw_on_allocate", widget_set_redraw_on_allocate, 1);
|
1173
1157
|
rb_define_method(gWidget, "set_composite_name", widget_set_composite_name, 1);
|
1174
1158
|
rb_define_method(gWidget, "set_scroll_adjustments", widget_set_scroll_adjustments, 2);
|
@@ -1200,8 +1184,6 @@ Init_gtk_widget()
|
|
1200
1184
|
rb_define_method(gWidget, "set_size_request", widget_set_size_request, 2);
|
1201
1185
|
rb_define_method(gWidget, "thaw_child_notify", widget_thaw_child_notify, 0);
|
1202
1186
|
#if GTK_CHECK_VERSION(2,4,0)
|
1203
|
-
rb_define_method(gWidget, "set_no_show_all", widget_set_no_show_all, 1);
|
1204
|
-
rb_define_method(gWidget, "no_show_all?", widget_get_no_show_all, 0);
|
1205
1187
|
rb_define_method(gWidget, "mnemonic_labels", widget_list_mnemonic_labels, 0);
|
1206
1188
|
rb_define_method(gWidget, "add_mnemonic_label", widget_add_mnemonic_label, 1);
|
1207
1189
|
rb_define_method(gWidget, "remove_mnemonic_label", widget_remove_mnemonic_label, 1);
|
@@ -1215,7 +1197,6 @@ Init_gtk_widget()
|
|
1215
1197
|
rb_define_method(gWidget, "action", widget_get_action, 0);
|
1216
1198
|
rb_define_method(gWidget, "composited?", widget_is_composited, 0);
|
1217
1199
|
#endif
|
1218
|
-
rb_define_method(gWidget, "window", widget_window, 0);
|
1219
1200
|
rb_define_method(gWidget, "set_window", widget_set_window, 1);
|
1220
1201
|
rb_define_method(gWidget, "allocation", widget_get_allocation, 0);
|
1221
1202
|
rb_define_method(gWidget, "set_allocation", widget_set_allocation, 4);
|
@@ -1234,7 +1215,6 @@ Init_gtk_widget()
|
|
1234
1215
|
rb_define_method(gWidget, "sensitive_with_parent?", widget_IS_SENSITIVE, 0);
|
1235
1216
|
rb_define_method(gWidget, "has_grab?", widget_HAS_GRAB, 0);
|
1236
1217
|
rb_define_method(gWidget, "rc_style?", widget_RC_STYLE, 0);
|
1237
|
-
rb_define_method(gWidget, "double_buffered?", widget_DOUBLE_BUFFERED, 0);
|
1238
1218
|
|
1239
1219
|
/*
|
1240
1220
|
* singleton methods
|