After messing around a bit I realized it was actually giving me back the
hwnd, just in decimal form. A simple sprintf("%x", $hwnd) was able to
return to me the actual hex handle :)
T.J.
T.J. Ferraro wrote:
> Trying to get the hwnd of a Gtk2::Gdk::Drawable on win32. After
> pouring through source I noticed nothing was being exported for this
> in gtk2-perl. I'm not really an XS expert (yet...) so I threw together
> a quick hack to try to get this working for me.
>
> I modified GdkDrawable.xs by adding...
>
> #include <gdk/gdkwin32.h>
> And the following:
>
> ## HGDIOBJ gdk_win32_drawable_get_handle (GdkDrawable *drawable)
> gpointer
> gdk_win32_drawable_get_handle (drawable)
> GdkDrawable *drawable
>
>
> I call it as:
>
> my $hwnd = Gtk2::Gdk::Drawable::gdk_win32_drawable_get_handle($drawable);
>
> Works (a little ugly), but as you can imagine, it's not handing me
> back an hwnd, but rather numbers like: 1310846, 1245310, 983164.
> Are these actual gpointers or am I getting garbage? Any way to
> dereference if it is actually returning a gpointer?
>
> Thanks.
> T.J.
>
>
_______________________________________________
gtk-perl-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-perl-list