Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added back in the window() to rbgdkwindow.c for GTK 2.10.0

Added back in the set_cursor() method to rbgdkwindow.c for GTK 2.10.0
  • Loading branch information...
commit 1b05bd625d98ff5ca047e785750987b7463d988f 1 parent f0477e7
matobinder authored June 19, 2012
13  gtk2/ext/gtk2/rbgdkwindow.c
@@ -597,6 +597,16 @@ rg_set_back_pixmap(VALUE self, VALUE pixmap, VALUE parent_relative)
597 597
     return self;
598 598
 }
599 599
 
  600
+#if GTK_CHECK_VERSION(2,10,0)
  601
+static VALUE
  602
+rg_set_cursor(VALUE self, VALUE cursor)
  603
+{
  604
+    gdk_window_set_cursor(_SELF(self),
  605
+                          (GdkCursor*)(NIL_P(cursor) ? NULL : RVAL2BOXED(cursor, GDK_TYPE_CURSOR)));
  606
+    return self;
  607
+}
  608
+#endif
  609
+
600 610
 static VALUE
601 611
 rg_user_data(VALUE self)
602 612
 {
@@ -1049,6 +1059,9 @@ Init_gtk_gdk_window(VALUE mGdk)
1049 1059
     RG_DEF_METHOD(set_title, 1);
1050 1060
     RG_DEF_METHOD(set_background, 1);
1051 1061
     RG_DEF_METHOD(set_back_pixmap, 2);
  1062
+#if GTK_CHECK_VERSION(2,10,0)
  1063
+    RG_DEF_METHOD(set_cursor, 1);
  1064
+#endif
1052 1065
     RG_DEF_METHOD(user_data, 0);
1053 1066
     RG_DEF_METHOD(geometry, 0);
1054 1067
     RG_DEF_METHOD(set_geometry_hints, 2);
7  gtk2/ext/gtk2/rbgtkwidget.c
@@ -963,6 +963,12 @@ rg_composited_p(VALUE self)
963 963
 {
964 964
     return CBOOL2RVAL(gtk_widget_is_composited(_SELF(self)));
965 965
 }
  966
+
  967
+static VALUE
  968
+rg_window(VALUE self)
  969
+{
  970
+    return GOBJ2RVAL(_SELF(self)->window);
  971
+}
966 972
 #endif
967 973
 
968 974
 static VALUE
@@ -1184,6 +1190,7 @@ Init_gtk_widget(VALUE mGtk)
1184 1190
 #if GTK_CHECK_VERSION(2,10,0)
1185 1191
     RG_DEF_METHOD(action, 0);
1186 1192
     RG_DEF_METHOD_P(composited, 0);
  1193
+    RG_DEF_METHOD(window, 0);
1187 1194
 #endif
1188 1195
     RG_DEF_METHOD(set_window, 1);
1189 1196
     RG_DEF_METHOD(allocation, 0);

0 notes on commit 1b05bd6

Please sign in to comment.
Something went wrong with that request. Please try again.