gtk2 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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +4 -2
  3. data/ext/gtk2/rbgdkevent.c +6 -3
  4. data/ext/gtk2/rbgdkwindow.c +17 -13
  5. data/ext/gtk2/rbgtkinfobar.c +4 -24
  6. data/ext/gtk2/rbgtkwidget.c +16 -12
  7. data/lib/1.9/gtk2.so +0 -0
  8. data/lib/2.0/gtk2.so +0 -0
  9. data/lib/2.1/gtk2.so +0 -0
  10. data/test/test_gdk_event.rb +17 -5
  11. data/test/test_gdk_window.rb +8 -0
  12. data/test/test_gtk_infobar.rb +29 -0
  13. data/vendor/local/bin/gtk-demo.exe +0 -0
  14. data/vendor/local/bin/gtk-query-immodules-2.0.exe +0 -0
  15. data/vendor/local/bin/gtk-update-icon-cache.exe +0 -0
  16. data/vendor/local/bin/libgailutil-18.dll +0 -0
  17. data/vendor/local/bin/libgdk-win32-2.0-0.dll +0 -0
  18. data/vendor/local/bin/libgtk-win32-2.0-0.dll +0 -0
  19. data/vendor/local/lib/gtk-2.0/2.10.0/engines/libpixmap.dll +0 -0
  20. data/vendor/local/lib/gtk-2.0/2.10.0/engines/libpixmap.dll.a +0 -0
  21. data/vendor/local/lib/gtk-2.0/2.10.0/engines/libpixmap.la +1 -1
  22. data/vendor/local/lib/gtk-2.0/2.10.0/engines/libwimp.dll +0 -0
  23. data/vendor/local/lib/gtk-2.0/2.10.0/engines/libwimp.dll.a +0 -0
  24. data/vendor/local/lib/gtk-2.0/2.10.0/immodules.cache +0 -33
  25. data/vendor/local/lib/gtk-2.0/modules/libgail.dll +0 -0
  26. data/vendor/local/lib/gtk-2.0/modules/libgail.dll.a +0 -0
  27. data/vendor/local/lib/libgailutil.dll.a +0 -0
  28. data/vendor/local/lib/libgdk-win32-2.0.dll.a +0 -0
  29. data/vendor/local/lib/libgtk-win32-2.0.dll.a +0 -0
  30. data/vendor/local/lib/libgtk-win32-2.0.la +1 -1
  31. metadata +9 -41
  32. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-am-et.dll +0 -0
  33. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-am-et.dll.a +0 -0
  34. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-am-et.la +0 -41
  35. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-cedilla.dll +0 -0
  36. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-cedilla.dll.a +0 -0
  37. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-cedilla.la +0 -41
  38. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-cyrillic-translit.dll +0 -0
  39. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-cyrillic-translit.dll.a +0 -0
  40. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-cyrillic-translit.la +0 -41
  41. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-ime.dll +0 -0
  42. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-ime.dll.a +0 -0
  43. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-ime.la +0 -41
  44. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-inuktitut.dll +0 -0
  45. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-inuktitut.dll.a +0 -0
  46. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-inuktitut.la +0 -41
  47. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-ipa.dll +0 -0
  48. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-ipa.dll.a +0 -0
  49. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-ipa.la +0 -41
  50. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-multipress.dll +0 -0
  51. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-multipress.dll.a +0 -0
  52. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-multipress.la +0 -41
  53. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-thai.dll +0 -0
  54. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-thai.dll.a +0 -0
  55. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-thai.la +0 -41
  56. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-ti-er.dll +0 -0
  57. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-ti-er.dll.a +0 -0
  58. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-ti-er.la +0 -41
  59. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-ti-et.dll +0 -0
  60. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-ti-et.dll.a +0 -0
  61. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-ti-et.la +0 -41
  62. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-viqr.dll +0 -0
  63. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-viqr.dll.a +0 -0
  64. data/vendor/local/lib/gtk-2.0/2.10.0/immodules/im-viqr.la +0 -41
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 046c20e49e378c536c090fbeb872341dfd4845fb
4
- data.tar.gz: 5b323c2b46ce01d2d13b02d4db45973d334eafda
3
+ metadata.gz: 11595da5d4cefdbbd58316d031fc32a6ed2697e3
4
+ data.tar.gz: c04d5b14944847207b2d7903b398dcd72b26ef9b
5
5
  SHA512:
6
- metadata.gz: c412c8ad13f85deb981d42e5bd8ef124dbe4e7e8416b92cc505e95113ad832c113bf47f420b9109996ee4f5f7ac647181cf02f4e2383ac9c84f930b2e11aa7e2
7
- data.tar.gz: 86926f0bc103b880732bae5bf0c47da3339be2519d736c32737da71bdccbb3dc8d3825c0b637fc82ed3170882a56de2a13a7f4eabac7d5e00dc496bd5a04069a
6
+ metadata.gz: 10a88c4d6071ba28685072571e51c6b65746342fb59b0e53a6e8ecbdb7ace089a82fb41e18378043c27e8bdf21860536b208681d11d1ce1c9fe30c9995daa959
7
+ data.tar.gz: 100ef516997e61e9c24f4fe99c4f8468aafd57b524a78fcff0b7fae46208a1bac36e7bef5c1f6e254ebd4dcdc8fde8651fcee764f614f8446e1cd1a53b5973bd
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
  },
@@ -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 */
@@ -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);
@@ -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
-
@@ -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/lib/1.9/gtk2.so CHANGED
Binary file
data/lib/2.0/gtk2.so CHANGED
Binary file
data/lib/2.1/gtk2.so CHANGED
Binary file
@@ -1,11 +1,23 @@
1
1
  class TestGdkEvent < Test::Unit::TestCase
2
2
  include GtkTestUtils
3
3
 
4
- def test_motion_request
5
- only_gtk_version(2, 12, 0)
6
- motion = Gdk::EventMotion.new
7
- assert_nothing_raised do
8
- motion.request
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
@@ -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
Binary file
Binary file