Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
Showing with 20 additions and 0 deletions.
  1. +13 −0 gtk2/ext/gtk2/rbgdkwindow.c
  2. +7 −0 gtk2/ext/gtk2/rbgtkwidget.c
View
13 gtk2/ext/gtk2/rbgdkwindow.c
@@ -597,6 +597,16 @@ rg_set_back_pixmap(VALUE self, VALUE pixmap, VALUE parent_relative)
return self;
}
+#if GTK_CHECK_VERSION(2,10,0)
+static VALUE
+rg_set_cursor(VALUE self, VALUE cursor)
+{
+ gdk_window_set_cursor(_SELF(self),
+ (GdkCursor*)(NIL_P(cursor) ? NULL : RVAL2BOXED(cursor, GDK_TYPE_CURSOR)));
+ return self;
+}
+#endif
+
static VALUE
rg_user_data(VALUE self)
{
@@ -1049,6 +1059,9 @@ Init_gtk_gdk_window(VALUE mGdk)
RG_DEF_METHOD(set_title, 1);
RG_DEF_METHOD(set_background, 1);
RG_DEF_METHOD(set_back_pixmap, 2);
+#if GTK_CHECK_VERSION(2,10,0)
+ RG_DEF_METHOD(set_cursor, 1);
+#endif
RG_DEF_METHOD(user_data, 0);
RG_DEF_METHOD(geometry, 0);
RG_DEF_METHOD(set_geometry_hints, 2);
View
7 gtk2/ext/gtk2/rbgtkwidget.c
@@ -963,6 +963,12 @@ rg_composited_p(VALUE self)
{
return CBOOL2RVAL(gtk_widget_is_composited(_SELF(self)));
}
+
+static VALUE
+rg_window(VALUE self)
+{
+ return GOBJ2RVAL(_SELF(self)->window);
+}
#endif
static VALUE
@@ -1184,6 +1190,7 @@ Init_gtk_widget(VALUE mGtk)
#if GTK_CHECK_VERSION(2,10,0)
RG_DEF_METHOD(action, 0);
RG_DEF_METHOD_P(composited, 0);
+ RG_DEF_METHOD(window, 0);
#endif
RG_DEF_METHOD(set_window, 1);
RG_DEF_METHOD(allocation, 0);
Please sign in to comment.
Something went wrong with that request. Please try again.