Ok I was able to get this to work, by modifying some of the source. Not
sure if this is the best way.
But I modified rbgtkwidget.c and rbgdkwindow.c
Modified rbgtkwidget.c like this
#if GTK_CHECK_VERSION(2,10,0)
RG_DEF_METHOD(action, 0);
RG_DEF_METHOD_P(composited, 0);
RG_DEF_METHOD(window, 0); <— added this line
#endif
…
#if GTK_CHECK_VERSION(2,10,0)
static VALUE
rg_action(VALUE self)
{
return GOBJ2RVAL(gtk_widget_get_action(_SELF(self)));
}
static VALUE
rg_composited_p(VALUE self)
{
return CBOOL2RVAL(gtk_widget_is_composited(_SELF(self)));
}
static VALUE <-- Added this function
def
rg_window(VALUE self)
{
return GOBJ2RVAL(_SELF(self)->window);
}
#endif
And did the same for set_cursor in rbgtkwindow.c. I added
#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
AND
#if GTK_CHECK_VERSION(2,10,0)
RG_DEF_METHOD(set_cursor, 1);
#endif
This seems to work fine for me on GTK 2,10,0. So I’d be happy to commit
these changes. I’ve worked on code for years, but never really worked
on a nice open source project. If I were too, whats the policy for
making changes? Note, I always will follow the coding style of the code
I am mucking with.
Thanks