I too have the same requirement. I use JavaXPCOM.
In windows i used a dummy number for window handle (first parameter)
for the call
nsBaseWindow::initWindow(long, long, long, long, long, long);
In Linux case, i wrote a JNI method that creates a (static) GdkWidget
object and passes the object pointer (as jlong) back to the java code
and used this long value in initWindow method (first parameter)
this does not work and throws a HotSpot exception:
--------------------------------------------------------
(process:6103): GLib-GObject-CRITICAL **: gtype.c:1871: initialization
assertion failed, use g_type_init() prior to this function
(process:6103): Gdk-CRITICAL **: file gdkrgb.c: line 3521
(gdk_screen_get_rgb_visual): assertion `GDK_IS_SCREEN (screen)' failed
An unexpected exception has been detected in native code outside the
VM.
Unexpected Signal : 11 occurred at PC=0xA9B2F997
Function=_ZN9nsToolkit14CreateSharedGCEv+0x23
Library=/home/test/saravanans/xulrunner/libxul.so
Current Java thread:
at
org.mozilla.xpcom.internal.XPCOMJavaProxy.callXPCOMMethod(Native
Method)
at
org.mozilla.xpcom.internal.XPCOMJavaProxy.invoke(XPCOMJavaProxy.java:
140)
at $Proxy7.create(Unknown Source)
----------------------------------------
Kindly help.
-Sarv-
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding