gtk2 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -2
- data/ext/gtk2/rbgdkevent.c +6 -3
- data/ext/gtk2/rbgdkwindow.c +17 -13
- data/ext/gtk2/rbgtkinfobar.c +4 -24
- data/ext/gtk2/rbgtkwidget.c +16 -12
- data/test/test_gdk_event.rb +17 -5
- data/test/test_gdk_window.rb +8 -0
- data/test/test_gtk_infobar.rb +29 -0
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8766d633f9cf8ae10270d80c39614435d47731e8
|
4
|
+
data.tar.gz: 85951de288b05a4fddaea6bad2b7661d3e576a2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a27385913d6caff16a69ad965126fcdff8e327ab3543a104abea1451653986cf1a1c0856b2b5fe42d65c39c184e82ad630426847464d6c0a425cea87eb9a5923
|
7
|
+
data.tar.gz: 57e13eedfa987015b4a18ee9db104e585da58b7b4aea1e1976044e75450c02591eaa5daa6cc54ca309f85d059cd6101d50882acb934a31e764707d4d6a678e61
|
data/Rakefile
CHANGED
@@ -20,10 +20,12 @@ package = GNOME2Package.new do |_package|
|
|
20
20
|
:version => "2.24.22",
|
21
21
|
:compression_method => "xz",
|
22
22
|
:windows => {
|
23
|
-
:configure_args => [
|
23
|
+
:configure_args => [
|
24
|
+
"--with-included-immodules",
|
25
|
+
],
|
24
26
|
:need_autoreconf => true,
|
25
27
|
:patches => [
|
26
|
-
"gtk+-2.24.22-add-missing-exeext.diff",
|
28
|
+
"gtk+-2.24.22-add-missing-exeext-and-fix-directory.diff",
|
27
29
|
],
|
28
30
|
:built_file => "bin/libgtk-win32-2.0-0.dll",
|
29
31
|
},
|
data/ext/gtk2/rbgdkevent.c
CHANGED
@@ -987,6 +987,12 @@ Init_gtk_gdk_event(VALUE mGdk)
|
|
987
987
|
rb_define_singleton_method(rb_cGdkEvent, "add_client_message_filter", gdkevent_s_add_client_message_filter, 1);
|
988
988
|
rb_define_method(rb_cGdkEvent, "screen", gdkevent_screen, 0);
|
989
989
|
rb_define_method(rb_cGdkEvent, "set_screen", gdkevent_set_screen, 1);
|
990
|
+
|
991
|
+
/* GdkEventAny fields */
|
992
|
+
DEFINE_ACCESSOR(rb_cGdkEvent, any, window);
|
993
|
+
rb_define_method(rb_cGdkEvent, "send_event?", gdkeventany_send_event, 0);
|
994
|
+
rb_define_method(rb_cGdkEvent, "set_send_event", gdkeventany_set_send_event, 1);
|
995
|
+
|
990
996
|
G_DEF_SETTERS(rb_cGdkEvent);
|
991
997
|
|
992
998
|
/*
|
@@ -1013,9 +1019,6 @@ Init_gtk_gdk_event(VALUE mGdk)
|
|
1013
1019
|
rb_cGdkEventAny =
|
1014
1020
|
G_DEF_CLASS_WITH_PARENT(GDK_TYPE_EVENT_ANY, "EventAny",
|
1015
1021
|
mGdk, rb_cGdkEvent);
|
1016
|
-
DEFINE_ACCESSOR(rb_cGdkEventAny, any, window);
|
1017
|
-
rb_define_method(rb_cGdkEventAny, "send_event?", gdkeventany_send_event, 0);
|
1018
|
-
rb_define_method(rb_cGdkEventAny, "set_send_event", gdkeventany_set_send_event, 1);
|
1019
1022
|
G_DEF_SETTERS(rb_cGdkEventAny);
|
1020
1023
|
|
1021
1024
|
/* GdkEventExpose */
|
data/ext/gtk2/rbgdkwindow.c
CHANGED
@@ -31,10 +31,10 @@ static VALUE
|
|
31
31
|
rg_initialize(VALUE self, VALUE parent, VALUE attributes, VALUE attributes_mask)
|
32
32
|
{
|
33
33
|
GdkWindow* win;
|
34
|
-
win = gdk_window_new(NIL_P(parent) ? NULL : _SELF(parent),
|
35
|
-
(GdkWindowAttr*)RVAL2BOXED(attributes,
|
36
|
-
GDK_TYPE_WINDOW_ATTR),
|
37
|
-
RVAL2GFLAGS(attributes_mask,
|
34
|
+
win = gdk_window_new(NIL_P(parent) ? NULL : _SELF(parent),
|
35
|
+
(GdkWindowAttr*)RVAL2BOXED(attributes,
|
36
|
+
GDK_TYPE_WINDOW_ATTR),
|
37
|
+
RVAL2GFLAGS(attributes_mask,
|
38
38
|
GDK_TYPE_WINDOW_ATTRIBUTES_TYPE));
|
39
39
|
G_INITIALIZE(self, win);
|
40
40
|
|
@@ -304,7 +304,7 @@ rg_s_constrain_size(G_GNUC_UNUSED VALUE self, VALUE geometry, VALUE flags, VALUE
|
|
304
304
|
|
305
305
|
#if GTK_CHECK_VERSION(2, 12, 0)
|
306
306
|
static VALUE
|
307
|
-
rg_beep(VALUE self)
|
307
|
+
rg_beep(VALUE self)
|
308
308
|
{
|
309
309
|
gdk_window_beep(_SELF(self));
|
310
310
|
return self;
|
@@ -315,7 +315,7 @@ static VALUE
|
|
315
315
|
rg_begin_paint(VALUE self, VALUE area)
|
316
316
|
{
|
317
317
|
if (rb_obj_is_kind_of(area, GTYPE2CLASS(GDK_TYPE_RECTANGLE))){
|
318
|
-
gdk_window_begin_paint_rect(_SELF(self),
|
318
|
+
gdk_window_begin_paint_rect(_SELF(self),
|
319
319
|
(GdkRectangle*)RVAL2BOXED(area, GDK_TYPE_RECTANGLE));
|
320
320
|
} else {
|
321
321
|
gdk_window_begin_paint_region(_SELF(self),
|
@@ -374,7 +374,7 @@ static VALUE
|
|
374
374
|
rg_update_area(VALUE self)
|
375
375
|
{
|
376
376
|
GdkRegion* ret = gdk_window_get_update_area(_SELF(self));
|
377
|
-
return BOXED2RVAL(ret, GDK_TYPE_REGION);
|
377
|
+
return BOXED2RVAL(ret, GDK_TYPE_REGION);
|
378
378
|
}
|
379
379
|
|
380
380
|
static VALUE
|
@@ -452,7 +452,7 @@ rg_set_user_data(VALUE self, VALUE user_data)
|
|
452
452
|
static VALUE
|
453
453
|
rg_set_override_redirect(VALUE self, VALUE override_redirect)
|
454
454
|
{
|
455
|
-
gdk_window_set_override_redirect(_SELF(self),
|
455
|
+
gdk_window_set_override_redirect(_SELF(self),
|
456
456
|
RVAL2CBOOL(override_redirect));
|
457
457
|
return self;
|
458
458
|
}
|
@@ -486,8 +486,8 @@ rg_set_focus_on_map(VALUE self, VALUE focus_on_map)
|
|
486
486
|
static VALUE
|
487
487
|
rg_shape_combine_mask(VALUE self, VALUE shape_mask, VALUE offset_x, VALUE offset_y)
|
488
488
|
{
|
489
|
-
gdk_window_shape_combine_mask(_SELF(self),
|
490
|
-
GDK_BITMAP(RVAL2GOBJ(shape_mask)),
|
489
|
+
gdk_window_shape_combine_mask(_SELF(self),
|
490
|
+
GDK_BITMAP(RVAL2GOBJ(shape_mask)),
|
491
491
|
NUM2INT(offset_x), NUM2INT(offset_y));
|
492
492
|
return self;
|
493
493
|
}
|
@@ -513,7 +513,7 @@ rg_merge_child_shapes(VALUE self)
|
|
513
513
|
{
|
514
514
|
gdk_window_merge_child_shapes(_SELF(self));
|
515
515
|
return self;
|
516
|
-
}
|
516
|
+
}
|
517
517
|
|
518
518
|
static VALUE
|
519
519
|
rg_input_shape_combine_mask(VALUE self, VALUE mask, VALUE x, VALUE y)
|
@@ -582,6 +582,7 @@ rg_set_back_pixmap(VALUE self, VALUE pixmap, VALUE parent_relative)
|
|
582
582
|
return self;
|
583
583
|
}
|
584
584
|
|
585
|
+
#if !GTK_CHECK_VERSION(2,18, 0)
|
585
586
|
static VALUE
|
586
587
|
rg_set_cursor(VALUE self, VALUE cursor)
|
587
588
|
{
|
@@ -589,6 +590,7 @@ rg_set_cursor(VALUE self, VALUE cursor)
|
|
589
590
|
RVAL2BOXED(cursor, GDK_TYPE_CURSOR));
|
590
591
|
return self;
|
591
592
|
}
|
593
|
+
#endif
|
592
594
|
|
593
595
|
static VALUE
|
594
596
|
rg_user_data(VALUE self)
|
@@ -610,7 +612,7 @@ rg_geometry(VALUE self)
|
|
610
612
|
static VALUE
|
611
613
|
rg_set_geometry_hints(VALUE self, VALUE geometry, VALUE geom_mask)
|
612
614
|
{
|
613
|
-
gdk_window_set_geometry_hints(_SELF(self),
|
615
|
+
gdk_window_set_geometry_hints(_SELF(self),
|
614
616
|
NIL_P(geometry) ? (GdkGeometry*)NULL : (GdkGeometry*)RVAL2BOXED(geometry, GDK_TYPE_GEOMETRY),
|
615
617
|
RVAL2GFLAGS(geom_mask, GDK_TYPE_WINDOW_HINTS));
|
616
618
|
return self;
|
@@ -1005,7 +1007,9 @@ Init_gtk_gdk_window(VALUE mGdk)
|
|
1005
1007
|
RG_DEF_METHOD(set_title, 1);
|
1006
1008
|
RG_DEF_METHOD(set_background, 1);
|
1007
1009
|
RG_DEF_METHOD(set_back_pixmap, 2);
|
1010
|
+
#if !GTK_CHECK_VERSION(2, 18, 0)
|
1008
1011
|
RG_DEF_METHOD(set_cursor, 1);
|
1012
|
+
#endif
|
1009
1013
|
RG_DEF_METHOD(user_data, 0);
|
1010
1014
|
RG_DEF_METHOD(geometry, 0);
|
1011
1015
|
RG_DEF_METHOD(set_geometry_hints, 2);
|
@@ -1092,7 +1096,7 @@ Init_gtk_gdk_window(VALUE mGdk)
|
|
1092
1096
|
G_DEF_CLASS(GDK_TYPE_WM_FUNCTION, "WMFunction", RG_TARGET_NAMESPACE);
|
1093
1097
|
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GDK_TYPE_WM_FUNCTION, "GDK_");
|
1094
1098
|
|
1095
|
-
rb_define_const(RG_TARGET_NAMESPACE, "PARENT_RELATIVE", INT2FIX(GDK_PARENT_RELATIVE));
|
1099
|
+
rb_define_const(RG_TARGET_NAMESPACE, "PARENT_RELATIVE", INT2FIX(GDK_PARENT_RELATIVE));
|
1096
1100
|
|
1097
1101
|
#ifdef GDK_WINDOWING_X11
|
1098
1102
|
RG_DEF_METHOD(server_time, 0);
|
data/ext/gtk2/rbgtkinfobar.c
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
* MA 02110-1301 USA
|
19
19
|
*/
|
20
20
|
|
21
|
-
#include "global.h"
|
21
|
+
#include "global.h"
|
22
22
|
|
23
23
|
#if GTK_CHECK_VERSION(2,18,0)
|
24
24
|
#define RG_TARGET_NAMESPACE cInfoBar
|
@@ -50,21 +50,6 @@ rg_get_content_area(VALUE self)
|
|
50
50
|
return GOBJ2RVAL(gtk_info_bar_get_content_area(_SELF(self)));
|
51
51
|
}
|
52
52
|
|
53
|
-
static VALUE
|
54
|
-
rg_get_message_type(VALUE self)
|
55
|
-
{
|
56
|
-
return GENUM2RVAL(gtk_info_bar_get_message_type(_SELF(self)),
|
57
|
-
GTK_TYPE_MESSAGE_TYPE);
|
58
|
-
}
|
59
|
-
|
60
|
-
static VALUE
|
61
|
-
rg_set_message_type(VALUE self, VALUE type)
|
62
|
-
{
|
63
|
-
gtk_info_bar_set_message_type(_SELF(self),
|
64
|
-
RVAL2GENUM(type, GTK_TYPE_MESSAGE_TYPE));
|
65
|
-
return self;
|
66
|
-
}
|
67
|
-
|
68
53
|
static VALUE
|
69
54
|
rg_set_default_response(VALUE self, VALUE response_id)
|
70
55
|
{
|
@@ -77,7 +62,7 @@ static VALUE
|
|
77
62
|
rg_add_action_widget(VALUE self, VALUE widget, VALUE response_id)
|
78
63
|
{
|
79
64
|
gtk_info_bar_add_action_widget(_SELF(self),
|
80
|
-
GTK_WIDGET(RVAL2GOBJ(widget)),
|
65
|
+
GTK_WIDGET(RVAL2GOBJ(widget)),
|
81
66
|
RVAL2GENUM(response_id, GTK_TYPE_RESPONSE_TYPE));
|
82
67
|
return self;
|
83
68
|
}
|
@@ -91,7 +76,7 @@ rg_add_button(VALUE self, VALUE button_text, VALUE response_id)
|
|
91
76
|
} else {
|
92
77
|
name = RVAL2CSTR(button_text);
|
93
78
|
}
|
94
|
-
return GOBJ2RVAL(gtk_info_bar_add_button(_SELF(self), name,
|
79
|
+
return GOBJ2RVAL(gtk_info_bar_add_button(_SELF(self), name,
|
95
80
|
RVAL2GENUM(response_id, GTK_TYPE_RESPONSE_TYPE)));
|
96
81
|
}
|
97
82
|
|
@@ -119,7 +104,7 @@ rg_response(VALUE self, VALUE response_id)
|
|
119
104
|
}
|
120
105
|
#endif
|
121
106
|
|
122
|
-
void
|
107
|
+
void
|
123
108
|
Init_gtk_infobar(VALUE mGtk)
|
124
109
|
{
|
125
110
|
#if GTK_CHECK_VERSION(2,18,0)
|
@@ -130,10 +115,6 @@ Init_gtk_infobar(VALUE mGtk)
|
|
130
115
|
RG_DEF_ALIAS("action_area", "get_action_area");
|
131
116
|
RG_DEF_METHOD(get_content_area, 0);
|
132
117
|
RG_DEF_ALIAS("content_area", "get_content_area");
|
133
|
-
RG_DEF_METHOD(get_message_type, 0);
|
134
|
-
RG_DEF_ALIAS("message_type", "get_message_type");
|
135
|
-
RG_DEF_METHOD(set_message_type, 1);
|
136
|
-
G_DEF_SETTER(RG_TARGET_NAMESPACE, "message_type");
|
137
118
|
RG_DEF_METHOD(set_default_response, 1);
|
138
119
|
RG_DEF_METHOD(add_action_widget, 2);
|
139
120
|
RG_DEF_METHOD(add_button, 2);
|
@@ -144,4 +125,3 @@ Init_gtk_infobar(VALUE mGtk)
|
|
144
125
|
RG_DEF_METHOD(response, 1);
|
145
126
|
#endif
|
146
127
|
}
|
147
|
-
|
data/ext/gtk2/rbgtkwidget.c
CHANGED
@@ -190,7 +190,7 @@ rg_remove_accelerator(VALUE self, VALUE accel, VALUE key, VALUE mod)
|
|
190
190
|
static VALUE
|
191
191
|
rg_set_accel_path(VALUE self, VALUE accel_path, VALUE accel_group)
|
192
192
|
{
|
193
|
-
gtk_widget_set_accel_path(_SELF(self), RVAL2CSTR(accel_path),
|
193
|
+
gtk_widget_set_accel_path(_SELF(self), RVAL2CSTR(accel_path),
|
194
194
|
GTK_ACCEL_GROUP(RVAL2GOBJ(accel_group)));
|
195
195
|
return self;
|
196
196
|
}
|
@@ -253,7 +253,7 @@ rg_set_state(VALUE self, VALUE state)
|
|
253
253
|
static VALUE
|
254
254
|
rg_set_parent_window(VALUE self, VALUE parent_window)
|
255
255
|
{
|
256
|
-
gtk_widget_set_parent_window(_SELF(self),
|
256
|
+
gtk_widget_set_parent_window(_SELF(self),
|
257
257
|
GDK_WINDOW(RVAL2GOBJ(parent_window)));
|
258
258
|
return self;
|
259
259
|
}
|
@@ -526,7 +526,7 @@ rg_modify_base(VALUE self, VALUE state, VALUE color)
|
|
526
526
|
static VALUE
|
527
527
|
rg_modify_font(VALUE self, VALUE font_desc)
|
528
528
|
{
|
529
|
-
gtk_widget_modify_font(_SELF(self),
|
529
|
+
gtk_widget_modify_font(_SELF(self),
|
530
530
|
(PangoFontDescription*)RVAL2BOXED(font_desc, PANGO_TYPE_FONT_DESCRIPTION));
|
531
531
|
return self;
|
532
532
|
}
|
@@ -535,7 +535,7 @@ rg_modify_font(VALUE self, VALUE font_desc)
|
|
535
535
|
static VALUE
|
536
536
|
rg_modify_cursor(VALUE self, VALUE primary, VALUE seconday)
|
537
537
|
{
|
538
|
-
gtk_widget_modify_cursor(_SELF(self),
|
538
|
+
gtk_widget_modify_cursor(_SELF(self),
|
539
539
|
RVAL2BOXED(primary, GDK_TYPE_COLOR),
|
540
540
|
RVAL2BOXED(seconday, GDK_TYPE_COLOR));
|
541
541
|
return self;
|
@@ -667,10 +667,10 @@ rg_s_install_style_property(VALUE self, VALUE spec)
|
|
667
667
|
if (rb_block_given_p()){
|
668
668
|
VALUE func = rb_block_proc();
|
669
669
|
rb_hash_aset(style_prop_func_table, spec, func);
|
670
|
-
gtk_widget_class_install_style_property_parser(gclass, pspec,
|
670
|
+
gtk_widget_class_install_style_property_parser(gclass, pspec,
|
671
671
|
(GtkRcPropertyParser)rc_property_parser);
|
672
672
|
} else {
|
673
|
-
gtk_widget_class_install_style_property(gclass, pspec);
|
673
|
+
gtk_widget_class_install_style_property(gclass, pspec);
|
674
674
|
}
|
675
675
|
return self;
|
676
676
|
}
|
@@ -732,8 +732,8 @@ rg_s_style_properties(int argc, VALUE *argv, VALUE self)
|
|
732
732
|
static VALUE
|
733
733
|
rg_region_intersect(VALUE self, VALUE region)
|
734
734
|
{
|
735
|
-
return BOXED2RVAL(gtk_widget_region_intersect(_SELF(self),
|
736
|
-
(GdkRegion*)RVAL2BOXED(region, GDK_TYPE_REGION)),
|
735
|
+
return BOXED2RVAL(gtk_widget_region_intersect(_SELF(self),
|
736
|
+
(GdkRegion*)RVAL2BOXED(region, GDK_TYPE_REGION)),
|
737
737
|
GDK_TYPE_REGION);
|
738
738
|
}
|
739
739
|
|
@@ -949,11 +949,13 @@ rg_composited_p(VALUE self)
|
|
949
949
|
return CBOOL2RVAL(gtk_widget_is_composited(_SELF(self)));
|
950
950
|
}
|
951
951
|
|
952
|
+
#if !GTK_CHECK_VERSION(2, 14, 0)
|
952
953
|
static VALUE
|
953
954
|
rg_window(VALUE self)
|
954
955
|
{
|
955
956
|
return GOBJ2RVAL(_SELF(self)->window);
|
956
957
|
}
|
958
|
+
#endif
|
957
959
|
|
958
960
|
static VALUE
|
959
961
|
rg_set_window(VALUE self, VALUE window)
|
@@ -1013,7 +1015,7 @@ rg_set_requisition(VALUE self, VALUE w, VALUE h)
|
|
1013
1015
|
GtkRequisition *r = &(_SELF(self)->requisition);
|
1014
1016
|
r->width = NUM2INT(w);
|
1015
1017
|
r->height = NUM2INT(h);
|
1016
|
-
return self;
|
1018
|
+
return self;
|
1017
1019
|
}
|
1018
1020
|
|
1019
1021
|
static VALUE
|
@@ -1032,7 +1034,7 @@ static VALUE
|
|
1032
1034
|
widget_signal_size_request(G_GNUC_UNUSED guint num, const GValue *values)
|
1033
1035
|
{
|
1034
1036
|
GtkRequisition* req = (GtkRequisition*)g_value_get_boxed(&values[1]);
|
1035
|
-
return rb_ary_new3(2, GVAL2RVAL(&values[0]),
|
1037
|
+
return rb_ary_new3(2, GVAL2RVAL(&values[0]),
|
1036
1038
|
rb_ary_new3(2, INT2NUM(req->width), INT2NUM(req->height)));
|
1037
1039
|
}
|
1038
1040
|
static VALUE
|
@@ -1042,7 +1044,7 @@ widget_signal_size_allocate(G_GNUC_UNUSED guint num, const GValue *values)
|
|
1042
1044
|
return rb_ary_new3(2, GVAL2RVAL(&values[0]), BOXED2RVAL(alloc, GTK_TYPE_ALLOCATION));
|
1043
1045
|
}
|
1044
1046
|
|
1045
|
-
void
|
1047
|
+
void
|
1046
1048
|
Init_gtk_widget(VALUE mGtk)
|
1047
1049
|
{
|
1048
1050
|
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_WIDGET, "Widget", mGtk);
|
@@ -1161,7 +1163,9 @@ Init_gtk_widget(VALUE mGtk)
|
|
1161
1163
|
#endif
|
1162
1164
|
RG_DEF_METHOD(action, 0);
|
1163
1165
|
RG_DEF_METHOD_P(composited, 0);
|
1166
|
+
#if !GTK_CHECK_VERSION(2, 14, 0)
|
1164
1167
|
RG_DEF_METHOD(window, 0);
|
1168
|
+
#endif
|
1165
1169
|
RG_DEF_METHOD(set_window, 1);
|
1166
1170
|
RG_DEF_METHOD(allocation, 0);
|
1167
1171
|
RG_DEF_METHOD(set_allocation, 4);
|
@@ -1173,7 +1177,7 @@ Init_gtk_widget(VALUE mGtk)
|
|
1173
1177
|
rb_define_method(RG_TARGET_NAMESPACE, "toplevel?", widget_TOPLEVEL, 0);
|
1174
1178
|
rb_define_method(RG_TARGET_NAMESPACE, "no_window?", widget_NO_WINDOW, 0);
|
1175
1179
|
rb_define_method(RG_TARGET_NAMESPACE, "realized?", widget_REALIZED, 0);
|
1176
|
-
rb_define_method(RG_TARGET_NAMESPACE, "mapped?", widget_MAPPED, 0);
|
1180
|
+
rb_define_method(RG_TARGET_NAMESPACE, "mapped?", widget_MAPPED, 0);
|
1177
1181
|
rb_define_method(RG_TARGET_NAMESPACE, "drawable?", widget_DRAWABLE, 0);
|
1178
1182
|
rb_define_method(RG_TARGET_NAMESPACE, "parent_sensitive?", widget_PARENT_SENSITIVE, 0);
|
1179
1183
|
/* This method's name avoid to sensitive? of a property variables. */
|
data/test/test_gdk_event.rb
CHANGED
@@ -1,11 +1,23 @@
|
|
1
1
|
class TestGdkEvent < Test::Unit::TestCase
|
2
2
|
include GtkTestUtils
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
class TestMotion < self
|
5
|
+
def test_request
|
6
|
+
only_gtk_version(2, 12, 0)
|
7
|
+
motion = Gdk::EventMotion.new
|
8
|
+
assert_nothing_raised do
|
9
|
+
motion.request
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class TestButton < self
|
15
|
+
def setup
|
16
|
+
@button = Gdk::EventButton.new(:button_press)
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_window
|
20
|
+
assert_nil(@button.window)
|
9
21
|
end
|
10
22
|
end
|
11
23
|
end
|
data/test/test_gdk_window.rb
CHANGED
@@ -26,4 +26,12 @@ class TestGdkWindow < Test::Unit::TestCase
|
|
26
26
|
@window.startup_id = nil
|
27
27
|
end
|
28
28
|
end
|
29
|
+
|
30
|
+
def test_cursor_accessors
|
31
|
+
only_gtk_version(2, 18, 0)
|
32
|
+
arrow_type = Gdk::Cursor::Type::ARROW
|
33
|
+
cursor = Gdk::Cursor.new(arrow_type)
|
34
|
+
@window.cursor = cursor
|
35
|
+
assert_kind_of(Gdk::Cursor, @window.cursor)
|
36
|
+
end
|
29
37
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Copyright (C) 2014 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class TestGtkInfoBar < Test::Unit::TestCase
|
18
|
+
include GtkTestUtils
|
19
|
+
|
20
|
+
def setup
|
21
|
+
@infobar = Gtk::InfoBar.new
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_message_type_accessors
|
25
|
+
type_error = Gtk::MessageType::ERROR
|
26
|
+
@infobar.message_type = type_error
|
27
|
+
assert_equal(type_error, @infobar.message_type)
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gtk2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME2 Project Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: atk
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pango
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.2.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.
|
40
|
+
version: 2.2.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: gdk_pixbuf2
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: 2.2.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
54
|
+
version: 2.2.0
|
55
55
|
description: Ruby/GTK2 is a Ruby binding of GTK+-2.x.
|
56
56
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
57
57
|
executables: []
|
@@ -523,6 +523,7 @@ files:
|
|
523
523
|
- test/test_gtk_entry.rb
|
524
524
|
- test/test_gtk_icon_theme.rb
|
525
525
|
- test/test_gtk_image.rb
|
526
|
+
- test/test_gtk_infobar.rb
|
526
527
|
- test/test_gtk_list_store.rb
|
527
528
|
- test/test_gtk_menu_item.rb
|
528
529
|
- test/test_gtk_rc_style.rb
|