r=edburns

Author: Ron Capelli <capelli@acm.org>

The following files are updated to allow use of IBM Java 1.3.x
JVMs on Linux.  Instead of statically linking libjawt.lib, the
code now dynamically links libjawt.so and then libawt.so only
if needed (similar to previous change for win32).  It should
work on Solaris, but we couldn't test that here.

    mozilla/java/webclient/src_moz/Makefile.in
    mozilla/java/webclient/src_moz/gtk/GtkBrowserControlCanvas.cpp

The following files are changed to support the ant 'clean'
target for src_ie.

    mozilla/java/webclient/build.xml
    mozilla/java/webclient/src_ie/Makefile.in

The following files are changed to disable the CurrentPage(2)
interface for IE, since it will be a while before that can be
made to work.  With these changes, IE embeds smoothly with
Navigation and History interfaces working nicely to some degree.

    mozilla/java/webclient/src_ie/WrapperFactoryImpl.cpp

mozilla/java/webclient/classes_spec/org/mozilla/webclient/test/EMWindow.java

The following file is changed so that it does not depend on
Mozilla, allowing it to be shared cleanly for IE.

    mozilla/java/webclient/src_moz/win32/Win32BrowserControlCanvas.cpp

The following file is changed to correct the list of makefiles
that need to be configured for Webclient.

    mozilla/java/makefiles

Finally, please delete the following files from CVS.

    mozilla/java/webclient/src_ie/build.xml
    mozilla/java/webclient/src_ie/Makefile.win


git-svn-id: svn://10.0.0.236/trunk@142382 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2003-05-13 20:22:13 +00:00
parent cfaf744ce9
commit 3d7dee72f2
10 changed files with 75 additions and 417 deletions

View File

@@ -42,6 +42,7 @@
#include <dlfcn.h>
typedef jboolean (JNICALL *PJAWT_GETAWT)(JNIEnv*, JAWT*);
#include "../ns_util.h" //for throwing Exceptions to Java
@@ -186,19 +187,42 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowser
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowserControlCanvas_getHandleToPeer
(JNIEnv * env, jobject canvas) {
(JNIEnv *env, jobject canvas) {
JAWT awt;
JAWT_DrawingSurface* ds;
JAWT_DrawingSurfaceInfo* dsi;
JAWT_X11DrawingSurfaceInfo* dsi_x11;
Drawable handle_x11;
void *_hAWT; // JAWT module handle
jint lock;
PJAWT_GETAWT pJAWT_GetAWT; // JAWT_GetAWT function pointer
//Get the AWT
_hAWT = dlopen("libjawt.so", RTLD_NOW | RTLD_GLOBAL);
if (!_hAWT) {
printf(" +++ No libjawt.so... Trying libawt.so +++ \n");
_hAWT = dlopen("libawt.so",RTLD_NOW | RTLD_GLOBAL); // IBM Java 1.3.x packages JAWT_GetAWT in awt.dll
}
if (!_hAWT) {
printf(" +++ JAWT DLL Not Found +++ \n");
::util_ThrowExceptionToJava(env, "Exception: JAWT DLL Not Found");
return 0;
}
pJAWT_GetAWT = (PJAWT_GETAWT)dlsym(_hAWT, "JAWT_GetAWT");
if (!pJAWT_GetAWT) {
printf(" +++ JAWT_GetAWT Entry Not Found +++ \n");
::util_ThrowExceptionToJava(env, "Exception: JAWT_GetAWT Entry Not Found");
dlclose(_hAWT);
return 0;
}
awt.version = JAWT_VERSION_1_3;
if (JAWT_GetAWT(env, &awt) == JNI_FALSE) {
if (pJAWT_GetAWT(env, &awt) == JNI_FALSE) {
printf(" +++ AWT Not Found +++ \n");
::util_ThrowExceptionToJava(env, "Exception: AWT Not Found");
dlclose(_hAWT);
return 0;
}
@@ -207,6 +231,7 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowser
if (ds == NULL) {
printf(" +++ NULL Drawing Surface +++ \n");
::util_ThrowExceptionToJava(env, "Exception: Null Drawing Surface");
dlclose(_hAWT);
return 0;
}
@@ -216,6 +241,7 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowser
printf(" +++ Error Locking Surface +++ \n");
::util_ThrowExceptionToJava(env, "Exception: Error Locking Surface");
awt.FreeDrawingSurface(ds);
dlclose(_hAWT);
return 0;
}
@@ -226,6 +252,7 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowser
::util_ThrowExceptionToJava(env, "Exception: Error Getting Surface Info");
ds->Unlock(ds);
awt.FreeDrawingSurface(ds);
dlclose(_hAWT);
return 0;
}
@@ -239,6 +266,7 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_gtk_GtkBrowser
ds->FreeDrawingSurfaceInfo(dsi);
ds->Unlock(ds);
awt.FreeDrawingSurface(ds);
dlclose(_hAWT);
//return the native peer handle
return (jint) handle_x11;