Re: [java-gnome-hackers] GtkWindow XID
Brought to you by:
afcowie
From: Emmanuel R. <emm...@gm...> - 2009-10-25 14:12:36
|
On Sun, Oct 25, 2009 at 3:59 PM, Goundy <go...@gm...> wrote: > Goundy wrote: > > and I have the following code in GdkDrawable.defs: > > > > (define-method get_xid > > (of-object "GdkDrawable") > > (c-name "gdk_x11_drawable_get_xid") > > (caller-owns-return #t) > > (return-type "long") > > ) > > > > Am I missing something here ? > > Thanks > > > Oh I get the correct one :P > (define-method get_xid > (of-object "GdkDrawable") > (c-name "gdk_x11_drawable_get_xid") > (caller-owns-return #t) > (return-type "gulong") > ) > That fix the first problem: the function is now generated. > Is fine, it gives: > > static final long getXid(Drawable self) { > long result; > > if (self == null) { > throw new IllegalArgumentException("self can't be null"); > } > > synchronized (lock) { > result = gdk_x11_drawable_get_xid(pointerOf(self)); > > return result; > } > } > > private static native final long gdk_x11_drawable_get_xid(long self); > > But when I build java-gnome I get: > generated/bindings/org/gnome/gdk/GdkDrawable.c: In function > 'Java_org_gnome_gdk_GdkDrawable_gdk_1x11_1drawable_1get_1xid': > generated/bindings/org/gnome/gdk/GdkDrawable.c:1044: error: implicit > declaration of function 'gdk_x11_drawable_get_xid' > compilation terminated due to -Wfatal-errors. > make: *** [build-java] Error 1 > > Which is really weird... > Ideas are welcome :) > > Edit the file jni/bindings_java.h and add the following include after the other ones already there: #include <gdk/gdkx.h> -- Emmanuel Rodriguez |