diff --git a/mozilla/java/webclient/src_moz/BookmarksImpl.cpp b/mozilla/java/webclient/src_moz/BookmarksImpl.cpp index 3d4dfbd32c9..f51d1dc5a5b 100644 --- a/mozilla/java/webclient/src_moz/BookmarksImpl.cpp +++ b/mozilla/java/webclient/src_moz/BookmarksImpl.cpp @@ -54,40 +54,22 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_BookmarksImpl_ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_BookmarksImpl_nativeNewRDFNode -(JNIEnv *env, jobject obj, jstring urlString, jboolean isFolder) +(JNIEnv *env, jobject obj, jstring urlString) { nsCOMPtr newNode; nsresult rv; jint result = -1; - nsAutoString uri("NC:BookmarksRoot"); const char *url = env->GetStringUTFChars(urlString, NULL); - uri.Append("#$"); - uri.Append(url); printf("debug: edburns: nativeNewRDFNode: url: %s\n", url); - rv = gRDF->GetUnicodeResource(uri.GetUnicode(), getter_AddRefs(newNode)); + rv = gRDF->GetResource(url, getter_AddRefs(newNode)); env->ReleaseStringUTFChars(urlString, url); if (NS_FAILED(rv)) { ::util_ThrowExceptionToJava(env, "Exception: nativeNewRDFNode: can't create new nsIRDFResource."); return result; } - if (isFolder) { - rv = gRDFCU->MakeSeq(gBookmarksDataSource, newNode, nsnull); - if (NS_FAILED(rv)) { - ::util_ThrowExceptionToJava(env, "Exception: unable to make new folder as a sequence."); - return result; - } - rv = gBookmarksDataSource->Assert(newNode, kRDF_type, - kNC_Folder, PR_TRUE); - if (rv != NS_OK) { - ::util_ThrowExceptionToJava(env, "Exception: unable to mark new folder as folder."); - - return result; - } - } - /* * Do the AddRef here. diff --git a/mozilla/java/webclient/src_moz/BookmarksImpl.h b/mozilla/java/webclient/src_moz/BookmarksImpl.h new file mode 100755 index 00000000000..231e91f231f --- /dev/null +++ b/mozilla/java/webclient/src_moz/BookmarksImpl.h @@ -0,0 +1,29 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_mozilla_webclient_wrapper_0005fnative_BookmarksImpl */ + +#ifndef _Included_org_mozilla_webclient_wrapper_0005fnative_BookmarksImpl +#define _Included_org_mozilla_webclient_wrapper_0005fnative_BookmarksImpl +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_BookmarksImpl + * Method: nativeGetBookmarks + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_BookmarksImpl_nativeGetBookmarks + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_BookmarksImpl + * Method: nativeNewRDFNode + * Signature: (Ljava/lang/String;Z)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_BookmarksImpl_nativeNewRDFNode + (JNIEnv *, jobject, jstring, jboolean); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/mozilla/java/webclient/src_moz/CurrentPageImpl.h b/mozilla/java/webclient/src_moz/CurrentPageImpl.h new file mode 100755 index 00000000000..0a964a80340 --- /dev/null +++ b/mozilla/java/webclient/src_moz/CurrentPageImpl.h @@ -0,0 +1,77 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl */ + +#ifndef _Included_org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl +#define _Included_org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeCopyCurrentSelectionToSystemClipboard + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeCopyCurrentSelectionToSystemClipboard + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeFindInPage + * Signature: (Ljava/lang/String;ZZ)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeFindInPage + (JNIEnv *, jobject, jstring, jboolean, jboolean); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeFindNextInPage + * Signature: (Z)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeFindNextInPage + (JNIEnv *, jobject, jboolean); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeGetCurrentURL + * Signature: (I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetCurrentURL + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeGetSource + * Signature: ()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetSource + (JNIEnv *, jobject); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeGetSourceBytes + * Signature: ()[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetSourceBytes + (JNIEnv *, jobject); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeResetFind + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeResetFind + (JNIEnv *, jobject); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeSelectAll + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeSelectAll + (JNIEnv *, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/mozilla/java/webclient/src_moz/DocumentLoaderObserverImpl.h b/mozilla/java/webclient/src_moz/DocumentLoaderObserverImpl.h index 17da0325971..b3bcf189bc5 100644 --- a/mozilla/java/webclient/src_moz/DocumentLoaderObserverImpl.h +++ b/mozilla/java/webclient/src_moz/DocumentLoaderObserverImpl.h @@ -62,7 +62,13 @@ typedef enum { NUMBER_OF_MASK_NAMES } EVENT_MASK_NAMES; + +#ifdef XP_UNIX +static jlong maskValues [NUMBER_OF_MASK_NAMES]; +#else static jlong maskValues [DocumentLoaderObserverImpl::EVENT_MASK_NAMES::NUMBER_OF_MASK_NAMES]; +#endif + static char *maskNames []; DocumentLoaderObserverImpl(JNIEnv *yourJNIEnv, diff --git a/mozilla/java/webclient/src_moz/HistoryImpl.h b/mozilla/java/webclient/src_moz/HistoryImpl.h new file mode 100755 index 00000000000..75afb2ae419 --- /dev/null +++ b/mozilla/java/webclient/src_moz/HistoryImpl.h @@ -0,0 +1,117 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_mozilla_webclient_wrapper_0005fnative_HistoryImpl */ + +#ifndef _Included_org_mozilla_webclient_wrapper_0005fnative_HistoryImpl +#define _Included_org_mozilla_webclient_wrapper_0005fnative_HistoryImpl +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeBack + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeBack + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeCanBack + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeCanBack + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeCanForward + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeCanForward + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeClearHistory + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeClearHistory + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeForward + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeForward + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetBackList + * Signature: (I)[Lorg/mozilla/webclient/HistoryEntry; + */ +JNIEXPORT jobjectArray JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetBackList + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetCurrentHistoryIndex + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetCurrentHistoryIndex + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetForwardList + * Signature: (I)[Lorg/mozilla/webclient/HistoryEntry; + */ +JNIEXPORT jobjectArray JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetForwardList + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetHistory + * Signature: (I)[Lorg/mozilla/webclient/HistoryEntry; + */ +JNIEXPORT jobjectArray JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistory + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetHistoryEntry + * Signature: (II)Lorg/mozilla/webclient/HistoryEntry; + */ +JNIEXPORT jobject JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistoryEntry + (JNIEnv *, jobject, jint, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetHistoryLength + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistoryLength + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetURLForIndex + * Signature: (II)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetURLForIndex + (JNIEnv *, jobject, jint, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeSetCurrentHistoryIndex + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeSetCurrentHistoryIndex + (JNIEnv *, jobject, jint, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/mozilla/java/webclient/src_moz/ISupportsPeer.h b/mozilla/java/webclient/src_moz/ISupportsPeer.h new file mode 100755 index 00000000000..f2f631e526b --- /dev/null +++ b/mozilla/java/webclient/src_moz/ISupportsPeer.h @@ -0,0 +1,29 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_mozilla_webclient_wrapper_0005fnative_ISupportsPeer */ + +#ifndef _Included_org_mozilla_webclient_wrapper_0005fnative_ISupportsPeer +#define _Included_org_mozilla_webclient_wrapper_0005fnative_ISupportsPeer +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_ISupportsPeer + * Method: nativeAddRef + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_ISupportsPeer_nativeAddRef + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_ISupportsPeer + * Method: nativeRelease + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_ISupportsPeer_nativeRelease + (JNIEnv *, jobject, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/mozilla/java/webclient/src_moz/NativeEventThread.cpp b/mozilla/java/webclient/src_moz/NativeEventThread.cpp index d3b07223011..4dd35fbadac 100644 --- a/mozilla/java/webclient/src_moz/NativeEventThread.cpp +++ b/mozilla/java/webclient/src_moz/NativeEventThread.cpp @@ -30,6 +30,8 @@ #include "jni_util.h" #include "EventRegistration.h" // event callbacks + + #ifdef XP_PC #include #endif @@ -46,6 +48,13 @@ #include "nsIThread.h" // for PRThread //nsIWebShell is included in jni_util.h +#ifdef XP_UNIX +#include +#include "gdksuperwin.h" +#include "gtkmozarea.h" +#endif + + static NS_DEFINE_IID(kIEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID); static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); @@ -292,6 +301,23 @@ int processEventLoop(WebShellInitContext * initContext) return 1; } +// Ashu +#ifdef XP_UNIX +static void event_processor_callback(gpointer data, + gint source, + GdkInputCondition condition) { +#if DEBUG_RAPTOR_CANVAS + printf("EventHandler: event_processor_callback()\n"); +#endif + nsIEventQueue *eventQueue = (nsIEventQueue*)data; + eventQueue->ProcessPendingEvents(); +#if DEBUG_RAPTOR_CANVAS + printf("EventHandler: Done processing pending events\n"); +#endif +} +#endif +// + nsresult InitMozillaStuff (WebShellInitContext * initContext) { nsIEventQueueService * aEventQService = nsnull; @@ -370,9 +396,18 @@ nsresult InitMozillaStuff (WebShellInitContext * initContext) #if DEBUG_RAPTOR_CANVAS printf("InitMozillaStuff(%lx): Init the WebShell...\n", initContext); #endif - + +#ifdef XP_UNIX + GdkSuperWin * superwin; + GtkMozArea * mozarea; + mozarea = (GtkMozArea *) initContext->gtkWinPtr; + superwin = mozarea->superwin; + rv = initContext->webShell->Init((nsNativeWidget *)superwin, initContext->x, initContext->y, initContext->w, initContext->h); +#else rv = initContext->webShell->Init((nsNativeWidget *)initContext->parentHWnd, initContext->x, initContext->y, initContext->w, initContext->h); +#endif + if (NS_FAILED(rv)) { initContext->initFailCode = kInitWebShellError; return rv; diff --git a/mozilla/java/webclient/src_moz/NativeEventThread.h b/mozilla/java/webclient/src_moz/NativeEventThread.h new file mode 100755 index 00000000000..bb3bdf9fda4 --- /dev/null +++ b/mozilla/java/webclient/src_moz/NativeEventThread.h @@ -0,0 +1,45 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_mozilla_webclient_wrapper_0005fnative_NativeEventThread */ + +#ifndef _Included_org_mozilla_webclient_wrapper_0005fnative_NativeEventThread +#define _Included_org_mozilla_webclient_wrapper_0005fnative_NativeEventThread +#ifdef __cplusplus +extern "C" { +#endif +/* Inaccessible static: threadInitNumber */ +/* Inaccessible static: stopThreadPermission */ +#undef org_mozilla_webclient_wrapper_0005fnative_NativeEventThread_MIN_PRIORITY +#define org_mozilla_webclient_wrapper_0005fnative_NativeEventThread_MIN_PRIORITY 1L +#undef org_mozilla_webclient_wrapper_0005fnative_NativeEventThread_NORM_PRIORITY +#define org_mozilla_webclient_wrapper_0005fnative_NativeEventThread_NORM_PRIORITY 5L +#undef org_mozilla_webclient_wrapper_0005fnative_NativeEventThread_MAX_PRIORITY +#define org_mozilla_webclient_wrapper_0005fnative_NativeEventThread_MAX_PRIORITY 10L +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_NativeEventThread + * Method: nativeAddListener + * Signature: (ILorg/mozilla/webclient/WebclientEventListener;)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeAddListener + (JNIEnv *, jobject, jint, jobject); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_NativeEventThread + * Method: nativeInitialize + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeInitialize + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_NativeEventThread + * Method: nativeProcessEvents + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeProcessEvents + (JNIEnv *, jobject, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/mozilla/java/webclient/src_moz/NavigationImpl.h b/mozilla/java/webclient/src_moz/NavigationImpl.h new file mode 100755 index 00000000000..4c117c80f18 --- /dev/null +++ b/mozilla/java/webclient/src_moz/NavigationImpl.h @@ -0,0 +1,37 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_mozilla_webclient_wrapper_0005fnative_NavigationImpl */ + +#ifndef _Included_org_mozilla_webclient_wrapper_0005fnative_NavigationImpl +#define _Included_org_mozilla_webclient_wrapper_0005fnative_NavigationImpl +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_NavigationImpl + * Method: nativeLoadURL + * Signature: (ILjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeLoadURL + (JNIEnv *, jobject, jint, jstring); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_NavigationImpl + * Method: nativeRefresh + * Signature: (IJ)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeRefresh + (JNIEnv *, jobject, jint, jlong); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_NavigationImpl + * Method: nativeStop + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeStop + (JNIEnv *, jobject, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/mozilla/java/webclient/src_moz/RDFEnumeration.h b/mozilla/java/webclient/src_moz/RDFEnumeration.h new file mode 100755 index 00000000000..79870c5481e --- /dev/null +++ b/mozilla/java/webclient/src_moz/RDFEnumeration.h @@ -0,0 +1,37 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_mozilla_webclient_wrapper_0005fnative_RDFEnumeration */ + +#ifndef _Included_org_mozilla_webclient_wrapper_0005fnative_RDFEnumeration +#define _Included_org_mozilla_webclient_wrapper_0005fnative_RDFEnumeration +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFEnumeration + * Method: nativeFinalize + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeFinalize + (JNIEnv *, jobject); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFEnumeration + * Method: nativeHasMoreElements + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeHasMoreElements + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFEnumeration + * Method: nativeNextElement + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeNextElement + (JNIEnv *, jobject, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/mozilla/java/webclient/src_moz/RDFTreeNode.h b/mozilla/java/webclient/src_moz/RDFTreeNode.h new file mode 100755 index 00000000000..eca8a397ba8 --- /dev/null +++ b/mozilla/java/webclient/src_moz/RDFTreeNode.h @@ -0,0 +1,69 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode */ + +#ifndef _Included_org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode +#define _Included_org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeGetChildAt + * Signature: (II)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeGetChildAt + (JNIEnv *, jobject, jint, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeGetChildCount + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeGetChildCount + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeGetIndex + * Signature: (II)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeGetIndex + (JNIEnv *, jobject, jint, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeInsertElementAt + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeInsertElementAt + (JNIEnv *, jobject, jint, jint, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeIsContainer + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeIsContainer + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeIsLeaf + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeIsLeaf + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeToString + * Signature: (I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeToString + (JNIEnv *, jobject, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/mozilla/java/webclient/src_moz/WindowControlImpl.cpp b/mozilla/java/webclient/src_moz/WindowControlImpl.cpp index 565c35bdabd..74dde8b3d6d 100644 --- a/mozilla/java/webclient/src_moz/WindowControlImpl.cpp +++ b/mozilla/java/webclient/src_moz/WindowControlImpl.cpp @@ -26,7 +26,7 @@ */ #include "WindowControlImpl.h" - +#include #include "jni_util.h" #include "nsActions.h" @@ -36,6 +36,8 @@ #include "nsIBaseWindow.h" // to get methods like SetVisibility + + JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetBounds (JNIEnv *env, jobject obj, jint webShellPtr, jint x, jint y, jint w, jint h) @@ -58,7 +60,7 @@ Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetBounds JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeCreateInitContext (JNIEnv *env, jobject obj, jint windowPtr, jint x, jint y, - jint width, jint height) + jint width, jint height, jobject aBrowserControlImpl) { jobject jobj = obj; #ifdef XP_MAC @@ -92,6 +94,41 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlI initContext->y = y; initContext->w = width; initContext->h = height; + +#ifdef XP_UNIX + jclass cls = env->GetObjectClass(aBrowserControlImpl); // Get Class for BrowserControlImpl object + jclass clz = env->FindClass("org/mozilla/webclient/BrowserControlImpl"); + if (NULL == clz) { + ::util_ThrowExceptionToJava(env, "Exception: Could not find class for BrowserControlImpl"); + return (jint) 0; + } + jboolean ans = env->IsInstanceOf(aBrowserControlImpl, clz); + if (JNI_FALSE == ans) { + ::util_ThrowExceptionToJava(env, "Exception: We have a problem"); + return (jint) 0; + } + // Get myCanvas IVar + jfieldID fid = env->GetFieldID(cls, "myCanvas", "Lorg/mozilla/webclient/BrowserControlCanvas;"); + if (NULL == fid) { + ::util_ThrowExceptionToJava(env, "Exception: field myCanvas not found in the jobject for BrowserControlImpl"); + return (jint) 0; + } + jobject canvasObj = env->GetObjectField(aBrowserControlImpl, fid); + jclass canvasCls = env->GetObjectClass(canvasObj); + if (NULL == canvasCls) { + ::util_ThrowExceptionToJava(env, "Exception: Could Not find Class for CanvasObj"); + return (jint) 0; + } + jfieldID gtkfid = env->GetFieldID(canvasCls, "gtkWinPtr", "I"); + if (NULL == gtkfid) { + ::util_ThrowExceptionToJava(env, "Exception: field gtkWinPtr not found in the jobject for BrowserControlCanvas"); + return (jint) 0; + } + jint mozPtr = env->GetIntField(canvasObj, gtkfid); + initContext->gtkWinPtr = (int) mozPtr; +#else + initContext->gtkWinPtr = NULL; +#endif return (jint) initContext; } diff --git a/mozilla/java/webclient/src_moz/WindowControlImpl.h b/mozilla/java/webclient/src_moz/WindowControlImpl.h new file mode 100755 index 00000000000..8515abc5fd8 --- /dev/null +++ b/mozilla/java/webclient/src_moz/WindowControlImpl.h @@ -0,0 +1,69 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl */ + +#ifndef _Included_org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl +#define _Included_org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeCreateInitContext + * Signature: (IIIIILorg/mozilla/webclient/BrowserControl;)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeCreateInitContext + (JNIEnv *, jobject, jint, jint, jint, jint, jint, jobject); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeMoveWindowTo + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeMoveWindowTo + (JNIEnv *, jobject, jint, jint, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeRemoveFocus + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeRemoveFocus + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeRepaint + * Signature: (IZ)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeRepaint + (JNIEnv *, jobject, jint, jboolean); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeSetBounds + * Signature: (IIIII)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetBounds + (JNIEnv *, jobject, jint, jint, jint, jint, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeSetFocus + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetFocus + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeSetVisible + * Signature: (IZ)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetVisible + (JNIEnv *, jobject, jint, jboolean); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/mozilla/java/webclient/src_moz/WrapperFactoryImpl.cpp b/mozilla/java/webclient/src_moz/WrapperFactoryImpl.cpp index 2ea4ea98cc2..e0f732e8f10 100644 --- a/mozilla/java/webclient/src_moz/WrapperFactoryImpl.cpp +++ b/mozilla/java/webclient/src_moz/WrapperFactoryImpl.cpp @@ -76,7 +76,7 @@ extern "C" void NS_SetupRegistry(); extern nsresult NS_AutoregisterComponents(); JNIEXPORT void JNICALL -Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeInitialize( +Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeAppInitialize( JNIEnv *env, jobject obj, jstring verifiedBinDirAbsolutePath) { JNIEnv * pEnv = env; diff --git a/mozilla/java/webclient/src_moz/WrapperFactoryImpl.h b/mozilla/java/webclient/src_moz/WrapperFactoryImpl.h new file mode 100755 index 00000000000..c8450f60b48 --- /dev/null +++ b/mozilla/java/webclient/src_moz/WrapperFactoryImpl.h @@ -0,0 +1,38 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_mozilla_webclient_wrapper_0005fnative_WrapperFactoryImpl */ + +#ifndef _Included_org_mozilla_webclient_wrapper_0005fnative_WrapperFactoryImpl +#define _Included_org_mozilla_webclient_wrapper_0005fnative_WrapperFactoryImpl +#ifdef __cplusplus +extern "C" { +#endif +/* Inaccessible static: IMPL_NAME */ +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WrapperFactoryImpl + * Method: nativeAppInitialize + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeAppInitialize + (JNIEnv *, jobject, jstring); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WrapperFactoryImpl + * Method: nativeDoesImplement + * Signature: (Ljava/lang/String;)Z + */ +JNIEXPORT jboolean JNICALL Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeDoesImplement + (JNIEnv *, jobject, jstring); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WrapperFactoryImpl + * Method: nativeTerminate + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeTerminate + (JNIEnv *, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/mozilla/java/webclient/src_moz/jni_util.h b/mozilla/java/webclient/src_moz/jni_util.h index 42e9472976c..91213a648da 100644 --- a/mozilla/java/webclient/src_moz/jni_util.h +++ b/mozilla/java/webclient/src_moz/jni_util.h @@ -44,6 +44,13 @@ #include "nsIWebShell.h" // for nsIWebShell #include "nsIEventQueueService.h" // for PLEventQueue +// Ashu +#ifdef XP_UNIX +#include "nsIWidget.h" // for GTKWidget +#include +#endif +// + // // local classes // @@ -72,6 +79,7 @@ struct WebShellInitContext { int y; int w; int h; + int gtkWinPtr; }; enum { diff --git a/mozilla/java/webclient/src_moz/motif/BrowserControlNativeShimStub.cpp b/mozilla/java/webclient/src_moz/motif/BrowserControlNativeShimStub.cpp index 273bdbfca69..986e7a642f9 100644 --- a/mozilla/java/webclient/src_moz/motif/BrowserControlNativeShimStub.cpp +++ b/mozilla/java/webclient/src_moz/motif/BrowserControlNativeShimStub.cpp @@ -32,9 +32,9 @@ // JNI...yada, yada, yada #include // JNI Header -#include "../BrowserControlNativeShim.h" +#include "../.h" // JNI Header -#include "NativeEventThread.h" +#include "../NativeEventThread.h" // allow code in webclientstub.so to load us #include "BrowserControlNativeShimStub.h" diff --git a/mozilla/java/webclient/src_moz/motif/MotifBrowserControlCanvas.cpp b/mozilla/java/webclient/src_moz/motif/MotifBrowserControlCanvas.cpp index 0bf303e8d9c..f2100c88e2a 100644 --- a/mozilla/java/webclient/src_moz/motif/MotifBrowserControlCanvas.cpp +++ b/mozilla/java/webclient/src_moz/motif/MotifBrowserControlCanvas.cpp @@ -49,7 +49,7 @@ extern "C" { * Method: createTopLevelWindow * Signature: ()I */ -JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_createTopLevelWindow +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_createTopLevelWindow (JNIEnv * env, jobject obj) { static GtkWidget *mShell = NULL; @@ -74,7 +74,7 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva * Method: createContainerWindow * Signature: (III)I */ -JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_createContainerWindow +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_createContainerWindow (JNIEnv * env, jobject obj, jint parent, jint screenWidth, jint screenHeight) { GtkWidget * window = (GtkWidget *) parent; GtkWidget *mMozArea = NULL; @@ -90,7 +90,7 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva gtk_widget_show(window); //gtk_main(); - + printf ("In MotifBrowserControlCanvas.cpp -- mozArea stored\n\n"); return (jint) mMozArea; } @@ -107,7 +107,7 @@ int getWinID(GtkWidget * gtkWidgetPtr) { * Method: getGTKWinID * Signature: (I)I */ -JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_getGTKWinID +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_getGTKWinID (JNIEnv * env, jobject obj, jint gtkWinPtr) { GtkWidget * gtkWidgetPtr = (GtkWidget *) gtkWinPtr; @@ -120,7 +120,7 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva * Method: reparentWindow * Signature: (II)V */ -JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_reparentWindow (JNIEnv * env, jobject obj, jint childID, jint parentID) { +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_reparentWindow (JNIEnv * env, jobject obj, jint childID, jint parentID) { XReparentWindow(GDK_DISPLAY(), childID, parentID, 0, 0); } @@ -129,7 +129,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva * Method: processEvents * Signature: ()V */ -JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_processEvents +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_processEvents (JNIEnv * env, jobject obj) { //printf("process events....\n"); //processEventLoopIntelligently(); @@ -140,7 +140,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva * Method: setGTKWindowSize * Signature: (III)V */ -JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_setGTKWindowSize +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_setGTKWindowSize (JNIEnv * env, jobject obj, jint gtkWinPtr, jint width, jint height) { if (gtkWinPtr != 0) { GtkWidget * gtkWidgetPtr = (GtkWidget *) gtkWinPtr; @@ -156,7 +156,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva * Method: loadMainDll * Signature: ()V */ -JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_loadMainDll +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_loadMainDll (JNIEnv *, jclass) { printf("incorrect loadMainDll called\n\n"); diff --git a/mozilla/java/webclient/src_moz/motif/MotifBrowserControlCanvas.h b/mozilla/java/webclient/src_moz/motif/MotifBrowserControlCanvas.h new file mode 100644 index 00000000000..dfe97c2d9fe --- /dev/null +++ b/mozilla/java/webclient/src_moz/motif/MotifBrowserControlCanvas.h @@ -0,0 +1,91 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas */ + +#ifndef _Included_org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas +#define _Included_org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas +#ifdef __cplusplus +extern "C" { +#endif +/* Inaccessible static: LOCK */ +#undef org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_assert +#define org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_assert 0L +/* Inaccessible static: isInc */ +/* Inaccessible static: incRate */ +#undef org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_TOP_ALIGNMENT +#define org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_TOP_ALIGNMENT 0.0f +#undef org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_CENTER_ALIGNMENT +#define org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_CENTER_ALIGNMENT 0.5f +#undef org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_BOTTOM_ALIGNMENT +#define org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_BOTTOM_ALIGNMENT 1.0f +#undef org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_LEFT_ALIGNMENT +#define org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_LEFT_ALIGNMENT 0.0f +#undef org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_RIGHT_ALIGNMENT +#define org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_RIGHT_ALIGNMENT 1.0f +#undef org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_serialVersionUID +#define org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_serialVersionUID -7644114512714619750LL +/* Inaccessible static: nameCounter */ +#undef org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_serialVersionUID +#define org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas_serialVersionUID -2284879212465893870LL +/* Inaccessible static: webShellCount */ +/* Inaccessible static: firstTime */ +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas + * Method: createContainerWindow + * Signature: (III)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_createContainerWindow + (JNIEnv *, jobject, jint, jint, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas + * Method: createTopLevelWindow + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_createTopLevelWindow + (JNIEnv *, jobject); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas + * Method: getGTKWinID + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_getGTKWinID + (JNIEnv *, jobject, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas + * Method: loadMainDll + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_loadMainDll + (JNIEnv *, jclass); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas + * Method: processEvents + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_processEvents + (JNIEnv *, jobject); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas + * Method: reparentWindow + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_reparentWindow + (JNIEnv *, jobject, jint, jint); + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_motif_MotifBrowserControlCanvas + * Method: setGTKWindowSize + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_setGTKWindowSize + (JNIEnv *, jobject, jint, jint, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/mozilla/java/webclient/src_moz/motif/MotifBrowserControlCanvasStub.cpp b/mozilla/java/webclient/src_moz/motif/MotifBrowserControlCanvasStub.cpp index f28841e0a6f..f784f001e18 100644 --- a/mozilla/java/webclient/src_moz/motif/MotifBrowserControlCanvasStub.cpp +++ b/mozilla/java/webclient/src_moz/motif/MotifBrowserControlCanvasStub.cpp @@ -31,7 +31,7 @@ #include #include "MotifBrowserControlCanvas.h" -#include "BrowserControlMozillaShimStub.h" +#include "NativeLoaderStub.h" #include @@ -45,32 +45,32 @@ void (* processEvents) (JNIEnv *, jobject); void (* setGTKWindowSize) (JNIEnv *, jobject, jint, jint, jint); void locateMotifBrowserControlStubFunctions(void * dll) { - createTopLevelWindow = (jint (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_createTopLevelWindow"); + createTopLevelWindow = (jint (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_createTopLevelWindow"); if (!createTopLevelWindow) { printf("got dlsym error %s\n", dlerror()); } - createContainerWindow = (jint (*) (JNIEnv *, jobject, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_createContainerWindow"); + createContainerWindow = (jint (*) (JNIEnv *, jobject, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_createContainerWindow"); if (!createContainerWindow) { printf("got dlsym error %s\n", dlerror()); } - reparentWindow = (void (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_reparentWindow"); + reparentWindow = (void (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_reparentWindow"); if (!reparentWindow) { printf("got dlsym error %s\n", dlerror()); } - processEvents = (void (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_processEvents"); + processEvents = (void (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_processEvents"); if (!processEvents) { printf("got dlsym error %s\n", dlerror()); } - setGTKWindowSize = (void (*) (JNIEnv *, jobject, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_setGTKWindowSize"); + setGTKWindowSize = (void (*) (JNIEnv *, jobject, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_setGTKWindowSize"); if (!setGTKWindowSize) { printf("got dlsym error %s\n", dlerror()); } - getGTKWinID = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_getGTKWinID"); + getGTKWinID = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_getGTKWinID"); if (!getGTKWinID) { printf("got dlsym error %s\n", dlerror()); } @@ -81,7 +81,7 @@ void locateMotifBrowserControlStubFunctions(void * dll) { * Method: createTopLevelWindow * Signature: ()I */ -JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_createTopLevelWindow (JNIEnv * env, jobject obj) { +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_createTopLevelWindow (JNIEnv * env, jobject obj) { return (* createTopLevelWindow) (env, obj); } @@ -90,7 +90,7 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva * Method: createContainerWindow * Signature: ()I */ -JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_createContainerWindow (JNIEnv * env, jobject obj, jint parent, jint width, jint height) { +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_createContainerWindow (JNIEnv * env, jobject obj, jint parent, jint width, jint height) { return (* createContainerWindow) (env, obj, parent, width, height); } @@ -99,7 +99,7 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva * Method: getGTKWinID * Signature: (I)I */ -JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_getGTKWinID +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_getGTKWinID (JNIEnv * env, jobject obj, jint gtkWinPtr) { return (* getGTKWinID) (env, obj, gtkWinPtr); } @@ -109,7 +109,7 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva * Method: reparentWindow * Signature: (II)V */ -JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_reparentWindow +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_reparentWindow (JNIEnv * env, jobject obj, jint childID, jint parentID) { (* reparentWindow) (env, obj, childID, parentID); } @@ -119,7 +119,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva * Method: processEvents * Signature: ()V */ -JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_processEvents +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_processEvents (JNIEnv * env, jobject obj) { (* processEvents) (env, obj); } @@ -130,17 +130,19 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanva * Method: setGTKWindowSize * Signature: (III)V */ -JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_setGTKWindowSize +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_setGTKWindowSize (JNIEnv * env, jobject obj, jint xwinID, jint width, jint height) { (* setGTKWindowSize) (env, obj, xwinID, width, height); } + + /* * Class: org_mozilla_webclient_motif_MotifBrowserControlCanvas * Method: loadMainDll * Signature: ()V */ -JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MotifBrowserControlCanvas_loadMainDll +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_motif_MotifBrowserControlCanvas_loadMainDll (JNIEnv *, jclass) { loadMainDll(); diff --git a/mozilla/java/webclient/src_moz/motif/NativeLoaderStub.cpp b/mozilla/java/webclient/src_moz/motif/NativeLoaderStub.cpp new file mode 100644 index 00000000000..57239276b81 --- /dev/null +++ b/mozilla/java/webclient/src_moz/motif/NativeLoaderStub.cpp @@ -0,0 +1,966 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + +/* + * BrowserControlNativeShimStub.cpp + */ + +// PENDING(mark): I suppose this is where I need to go into my explaination of why +// this file is needed... + +// Ashu +#ifdef XP_UNIX +#include // for exit(0) +#endif +// + +// For loading DLL +#include +// JNI...yada, yada, yada +#include +// JNI Headers +#include "../BookmarksImpl.h" +#include "../CurrentPageImpl.h" +#include "../HistoryImpl.h" +#include "../ISupportsPeer.h" +#include "../NavigationImpl.h" +#include "../RDFEnumeration.h" +#include "../RDFTreeNode.h" +#include "../WindowControlImpl.h" +#include "../WrapperFactoryImpl.h" +#include "../NativeEventThread.h" + +// allow code in webclientstub.so to load us +#include "NativeLoaderStub.h" +//#include "MotifBrowserControlCanvas.h" + +// Global reference to webclient dll +void * webClientDll; + +//Ashu +extern void locateMotifBrowserControlStubFunctions(void *); +// + + + +//modified by Ashu Kulkarni 2/29/2000 +/* +void (* nativeInitialize) (JNIEnv *, jobject, jstring); +void (* nativeTerminate) (JNIEnv *, jobject); +void (* nativeSendKeyDownEvent) (JNIEnv *, jobject, jint, jchar, jint, jint, jint); +void (* nativeSendKeyUpEvent) (JNIEnv *, jobject, jint, jchar, jint, jint, jint); +void (* nativeSendMouseEvent) (JNIEnv *, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint); +void (* nativeIdleEvent) (JNIEnv *, jobject, jint, jint); +void (* nativeUpdateEvent) (JNIEnv *, jobject, jint, jint); +jint (* nativeWidgetCreate) (JNIEnv *, jobject, jint, jint, jint, jint, jint); +void (* nativeWidgetDelete) (JNIEnv *, jobject, jint); +void (* nativeWidgetResize) (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean); +void (* nativeWidgetEnable) (JNIEnv *, jobject, jint, jboolean); +void (* nativeWidgetShow) (JNIEnv *, jobject, jint, jboolean); +void (* nativeWidgetInvalidate) (JNIEnv *, jobject, jint, jboolean); +void (* nativeWidgetUpdate) (JNIEnv *, jobject, jint); +void (* nativeProcessEvents) (JNIEnv *, jobject, jint); +jint (* nativeWebShellCreate) (JNIEnv *, jobject, jint, jint, jint, jint, jint); +void (* nativeWebShellDelete) (JNIEnv *, jobject, jint); +void (* nativeWebShellLoadURL) (JNIEnv *, jobject, jint, jstring); +void (* nativeWebShellStop) (JNIEnv *, jobject, jint); +void (* nativeWebShellShow) (JNIEnv *, jobject, jint); +void (* nativeWebShellHide) (JNIEnv *, jobject, jint); +void (* nativeWebShellSetBounds) (JNIEnv *, jobject, jint, jint, jint, jint, jint); +void (* nativeWebShellMoveTo) (JNIEnv *, jobject, jint, jint, jint); +void (* nativeWebShellSetFocus) (JNIEnv *, jobject, jint); +void (* nativeWebShellRemoveFocus) (JNIEnv *, jobject, jint); +void (* nativeWebShellRepaint) (JNIEnv *, jobject, jint, jboolean); +jboolean (* nativeWebShellCanBack) (JNIEnv *, jobject, jint); +jboolean (* nativeWebShellCanForward) (JNIEnv *, jobject, jint); +jboolean (* nativeWebShellBack) (JNIEnv *, jobject, jint); +jboolean (* nativeWebShellForward) (JNIEnv *, jobject, jint); +jboolean (* nativeWebShellGoTo) (JNIEnv *, jobject, jint, jint); +jint (* nativeWebShellGetHistoryLength) (JNIEnv *, jobject, jint); +jint (* nativeWebShellGetHistoryIndex) (JNIEnv *, jobject, jint); +jstring (* nativeWebShellGetURL) (JNIEnv *, jobject, jint, jint); +// added by Mark Goddard OTMP 9/2/1999 +jboolean (* nativeWebShellRefresh)(JNIEnv *, jobject, jint); +jboolean (* nativeWebShellAddDocListener) (JNIEnv *, jobject, jint, jobject); +*/ +// from NativeEventThread.h +void (* nativeAddListener) (JNIEnv *, jobject, jint, jobject); +void (* nativeInitialize) (JNIEnv *, jobject, jint); +void (* nativeProcessEvents) (JNIEnv *, jobject, jint); +// from BookmarksImpl.h +jint (* nativeGetBookmarks) (JNIEnv *, jobject, jint); +jint (* nativeNewRDFNode) (JNIEnv *, jobject, jstring); +// from CurrentPageImpl.h +void (* nativeCopyCurrentSelectionToSystemClipboard) (JNIEnv *, jobject, jint); +void (* nativeFindInPage) (JNIEnv *, jobject, jstring, jboolean, jboolean); +void (* nativeFindNextInPage) (JNIEnv *, jobject, jboolean); +jstring (* nativeGetCurrentURL) (JNIEnv *, jobject, jint); +jstring (* nativeGetSource) (JNIEnv *, jobject); +jbyteArray (* nativeGetSourceBytes) (JNIEnv *, jobject); +void (* nativeResetFind) (JNIEnv *, jobject); +void (* nativeSelectAll) (JNIEnv *, jobject); +// from HistoryImpl.h +void (* nativeBack) (JNIEnv *, jobject, jint); +jboolean (* nativeCanBack) (JNIEnv *, jobject, jint); +jboolean (* nativeCanForward) (JNIEnv *, jobject, jint); +void (* nativeClearHistory) (JNIEnv *, jobject, jint); +void (* nativeForward) (JNIEnv *, jobject, jint); +jobjectArray (* nativeGetBackList) (JNIEnv *, jobject, jint); +jint (* nativeGetCurrentHistoryIndex) (JNIEnv *, jobject, jint); +jobjectArray (* nativeGetForwardList) (JNIEnv *, jobject, jint); +jobjectArray (* nativeGetHistory) (JNIEnv *, jobject, jint); +jobject (* nativeGetHistoryEntry) (JNIEnv *, jobject, jint, jint); +jint (* nativeGetHistoryLength) (JNIEnv *, jobject, jint); +jstring (* nativeGetURLForIndex) (JNIEnv *, jobject, jint, jint); +void (* nativeSetCurrentHistoryIndex) (JNIEnv *, jobject, jint, jint); +// from ISupportsPeer.h +void (* nativeAddRef) (JNIEnv *, jobject, jint); +void (* nativeRelease) (JNIEnv *, jobject, jint); +// from NavigationImpl.h +void (* nativeLoadURL) (JNIEnv *, jobject, jint, jstring); +void (* nativeRefresh) (JNIEnv *, jobject, jint, jlong); +void (* nativeStop) (JNIEnv *, jobject, jint); +// from RDFEnumeration.h +void (* nativeFinalize) (JNIEnv *, jobject); +jboolean (* nativeHasMoreElements) (JNIEnv *, jobject, jint); +jint (* nativeNextElement) (JNIEnv *, jobject, jint); +// from RDFTreeNode.h +jint (* nativeGetChildAt) (JNIEnv *, jobject, jint, jint); +jint (* nativeGetChildCount) (JNIEnv *, jobject, jint); +jint (* nativeGetIndex) (JNIEnv *, jobject, jint, jint); +void (* nativeInsertElementAt) (JNIEnv *, jobject, jint, jint, jint); +jboolean (* nativeIsContainer) (JNIEnv *, jobject, jint); +jboolean (* nativeIsLeaf) (JNIEnv *, jobject, jint); +jstring (* nativeToString) (JNIEnv *, jobject, jint); +// from WindowControlImpl.h +jint (* nativeCreateInitContext) (JNIEnv *, jobject, jint, jint, jint, jint, jint, jobject); +void (* nativeMoveWindowTo) (JNIEnv *, jobject, jint, jint, jint); +void (* nativeRemoveFocus) (JNIEnv *, jobject, jint); +void (* nativeRepaint) (JNIEnv *, jobject, jint, jboolean); +void (* nativeSetBounds) (JNIEnv *, jobject, jint, jint, jint, jint, jint); +void (* nativeSetFocus) (JNIEnv *, jobject, jint); +void (* nativeSetVisible) (JNIEnv *, jobject, jint, jboolean); +//from WrapperFactoryImpl.h +jboolean (* nativeDoesImplement) (JNIEnv *, jobject, jstring); +void (* nativeAppInitialize) (JNIEnv *, jobject, jstring); +void (* nativeTerminate) (JNIEnv *, jobject); + + +void locateBrowserControlStubFunctions(void * dll) { + nativeDoesImplement = (jboolean (*) (JNIEnv *, jobject, jstring)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeDoesImplement"); + if (!nativeDoesImplement) { + printf("got dlsym error %s\n", dlerror()); + } + nativeAppInitialize = (void (*) (JNIEnv *, jobject, jstring)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeAppInitialize"); + if (!nativeAppInitialize) { + printf("got dlsym error %s\n", dlerror()); + } + nativeTerminate = (void (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeTerminate"); + if (!nativeTerminate) { + printf("got dlsym error %s\n", dlerror()); + } + + nativeCreateInitContext = (jint (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeCreateInitContext"); + if (!nativeCreateInitContext) { + printf("got dlsym error %s\n", dlerror()); + } + nativeMoveWindowTo = (void (*) (JNIEnv *, jobject, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeMoveWindowTo"); + if (!nativeMoveWindowTo) { + printf("got dlsym error %s\n", dlerror()); + } + nativeRemoveFocus = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeRemoveFocus"); + if (!nativeRemoveFocus) { + printf("got dlsym error %s\n", dlerror()); + } + nativeRepaint = (void (*) (JNIEnv *, jobject, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeRepaint"); + if (!nativeRepaint) { + printf("got dlsym error %s\n", dlerror()); + } + nativeSetBounds = (void (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetBounds"); + if (!nativeSetBounds) { + printf("got dlsym error %s\n", dlerror()); + } + nativeSetFocus = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetFocus"); + if (!nativeSetFocus) { + printf("got dlsym error %s\n", dlerror()); + } + nativeSetVisible = (void (*) (JNIEnv *, jobject, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetVisible"); + if (!nativeSetVisible) { + printf("got dlsym error %s\n", dlerror()); + } + + nativeGetChildAt = (jint (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeGetChildAt"); + if (!nativeGetChildAt) { + printf("got dlsym error %s\n", dlerror()); + } + nativeGetChildCount = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeGetChildCount"); + if (!nativeGetChildCount) { + printf("got dlsym error %s\n", dlerror()); + } + nativeGetIndex = (jint (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeGetIndex"); + if (!nativeGetIndex) { + printf("got dlsym error %s\n", dlerror()); + } + nativeInsertElementAt = (void (*) (JNIEnv *, jobject, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeInsertElementAt"); + if (!nativeInsertElementAt) { + printf("got dlsym error %s\n", dlerror()); + } + nativeIsContainer = (jboolean (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeIsContainer"); + if (!nativeIsContainer) { + printf("got dlsym error %s\n", dlerror()); + } + nativeIsLeaf = (jboolean (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeIsLeaf"); + if (!nativeIsLeaf) { + printf("got dlsym error %s\n", dlerror()); + } + nativeToString = (jstring (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeToString"); + if (!nativeToString) { + printf("got dlsym error %s\n", dlerror()); + } + + nativeFinalize = (void (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeFinalize"); + if (!nativeFinalize) { + printf("got dlsym error %s\n", dlerror()); + } + nativeHasMoreElements = (jboolean (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeHasMoreElements"); + if (!nativeHasMoreElements) { + printf("got dlsym error %s\n", dlerror()); + } + nativeNextElement = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeNextElement"); + if (!nativeNextElement) { + printf("got dlsym error %s\n", dlerror()); + } + + nativeLoadURL = (void (*) (JNIEnv *, jobject, jint, jstring)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeLoadURL"); + if (!nativeLoadURL) { + printf("got dlsym error %s\n", dlerror()); + } + nativeRefresh = (void (*) (JNIEnv *, jobject, jint, jlong)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeRefresh"); + if (!nativeRefresh) { + printf("got dlsym error %s\n", dlerror()); + } + nativeStop = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeStop"); + if (!nativeStop) { + printf("got dlsym error %s\n", dlerror()); + } + + nativeAddRef = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_ISupportsPeer_nativeAddRef"); + if (!nativeAddRef) { + printf("got dlsym error %s\n", dlerror()); + } + nativeRelease = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_ISupportsPeer_nativeRelease"); + if (!nativeRelease) { + printf("got dlsym error %s\n", dlerror()); + } + + nativeBack = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeBack"); + if (!nativeBack) { + printf("got dlsym error %s\n", dlerror()); + } + nativeCanBack = (jboolean (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeCanBack"); + if (!nativeCanBack) { + printf("got dlsym error %s\n", dlerror()); + } + nativeCanForward = (jboolean (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeCanForward"); + if (!nativeCanForward) { + printf("got dlsym error %s\n", dlerror()); + } + nativeClearHistory = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeClearHistory"); + if (!nativeClearHistory) { + printf("got dlsym error %s\n", dlerror()); + } + nativeForward = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeForward"); + if (!nativeForward) { + printf("got dlsym error %s\n", dlerror()); + } + nativeGetBackList = (jobjectArray (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetBackList"); + if (!nativeGetBackList) { + printf("got dlsym error %s\n", dlerror()); + } + nativeGetCurrentHistoryIndex = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetCurrentHistoryIndex"); + if (!nativeGetCurrentHistoryIndex) { + printf("got dlsym error %s\n", dlerror()); + } + nativeGetForwardList = (jobjectArray (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetForwardList"); + if (!nativeGetForwardList) { + printf("got dlsym error %s\n", dlerror()); + } + nativeGetHistory = (jobjectArray (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistory"); + if (!nativeGetHistory) { + printf("got dlsym error %s\n", dlerror()); + } + nativeGetHistoryEntry = (jobject (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistoryEntry"); + if (!nativeGetHistoryEntry) { + printf("got dlsym error %s\n", dlerror()); + } + nativeGetHistoryLength = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistoryLength"); + if (!nativeGetHistoryLength) { + printf("got dlsym error %s\n", dlerror()); + } + nativeGetURLForIndex = (jstring (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetURLForIndex"); + if (!nativeGetURLForIndex) { + printf("got dlsym error %s\n", dlerror()); + } + nativeSetCurrentHistoryIndex = (void (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeSetCurrentHistoryIndex"); + if (!nativeSetCurrentHistoryIndex) { + printf("got dlsym error %s\n", dlerror()); + } + + nativeCopyCurrentSelectionToSystemClipboard = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeCopyCurrentSelectionToSystemClipboard"); + if (!nativeCopyCurrentSelectionToSystemClipboard) { + printf("got dlsym error %s\n", dlerror()); + } + nativeFindInPage = (void (*) (JNIEnv *, jobject, jstring, jboolean, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeFindInPage"); + if (!nativeFindInPage) { + printf("got dlsym error %s\n", dlerror()); + } + nativeFindNextInPage = (void (*) (JNIEnv *, jobject, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeFindNextInPage"); + if (!nativeFindNextInPage) { + printf("got dlsym error %s\n", dlerror()); + } + nativeGetCurrentURL = (jstring (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetCurrentURL"); + if (!nativeGetCurrentURL) { + printf("got dlsym error %s\n", dlerror()); + } + nativeGetSource = (jstring (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetSource"); + if (!nativeGetSource) { + printf("got dlsym error %s\n", dlerror()); + } + nativeGetSourceBytes = (jbyteArray (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetSourceBytes"); + if (!nativeGetSourceBytes) { + printf("got dlsym error %s\n", dlerror()); + } + nativeResetFind = (void (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeResetFind"); + if (!nativeResetFind) { + printf("got dlsym error %s\n", dlerror()); + } + nativeSelectAll = (void (*) (JNIEnv *, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeSelectAll"); + if (!nativeSelectAll) { + printf("got dlsym error %s\n", dlerror()); + } + + nativeGetBookmarks = (jint (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_BookmarksImpl_nativeGetBookmarks"); + if (!nativeGetBookmarks) { + printf("got dlsym error %s\n", dlerror()); + } + nativeNewRDFNode = (jint (*) (JNIEnv *, jobject, jstring)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_BookmarksImpl_nativeNewRDFNode"); + if (!nativeNewRDFNode) { + printf("got dlsym error %s\n", dlerror()); + } + + nativeAddListener = (void (*) (JNIEnv *, jobject, jint, jobject)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeAddListener"); + if (!nativeAddListener) { + printf("got dlsym error %s\n", dlerror()); + } + nativeInitialize = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeInitialize"); + if (!nativeInitialize) { + printf("got dlsym error %s\n", dlerror()); + } + nativeProcessEvents = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeProcessEvents"); + if (!nativeProcessEvents) { + printf("got dlsym error %s\n", dlerror()); + } +} + + +// NativeEventThread +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_NativeEventThread + * Method: nativeInitialize + * Signature: (I)V + */ + +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeInitialize +(JNIEnv *env, jobject obj, jint webShellPtr) { + (* nativeInitialize) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_NativeEventThread + * Method: nativeAddListener + * Signature: (ILorg/mozilla/webclient/WebclientEventListener;)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeAddListener +(JNIEnv *env, jobject obj, jint webShellPtr, jobject typedListener) { + (* nativeAddListener) (env, obj, webShellPtr, typedListener); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_NativeEventThread + * Method: nativeProcessEvents + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NativeEventThread_nativeProcessEvents +(JNIEnv *env, jobject obj, jint webShellPtr) { + (* nativeProcessEvents) (env, obj, webShellPtr); +} + + + +void loadMainDll(void) +{ + webClientDll = dlopen("libwebclient.so", RTLD_LAZY | RTLD_GLOBAL); + if (webClientDll) { + locateBrowserControlStubFunctions(webClientDll); + locateMotifBrowserControlStubFunctions(webClientDll); + } else { + printf("Got Error: %s\n", dlerror()); + } +} + + +// BookMarksImpl +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_BookmarksImpl + * Method: nativeGetBookmarks + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_BookmarksImpl_nativeGetBookmarks +(JNIEnv * env, jobject obj, jint nativeWebshell) { + return (* nativeGetBookmarks) (env, obj, nativeWebshell); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_BookmarksImpl + * Method: nativeNewRDFNode + * Signature: (Ljava/lang/String;)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_BookmarksImpl_nativeNewRDFNode +(JNIEnv * env, jobject obj, jstring url) { + return (* nativeNewRDFNode) (env, obj, url); +} + + +// CurrentPageImpl +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeCopyCurrentSelectionToSystemClipboard + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeCopyCurrentSelectionToSystemClipboard +(JNIEnv * env, jobject obj, jint webShellPtr) { + (* nativeCopyCurrentSelectionToSystemClipboard) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeFindInPage + * Signature: (Ljava/lang/String;ZZ)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeFindInPage +(JNIEnv * env, jobject obj, jstring mystring, jboolean myboolean, jboolean myboolean1) { + (* nativeFindInPage) (env, obj, mystring, myboolean, myboolean1); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeFindNextInPage + * Signature: (Z)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeFindNextInPage +(JNIEnv * env, jobject obj, jboolean myboolean) { + (* nativeFindNextInPage) (env, obj, myboolean); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeGetCurrentURL + * Signature: ()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetCurrentURL +(JNIEnv *env, jobject obj, jint webShellPtr) { + return (* nativeGetCurrentURL) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeGetSource + * Signature: ()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetSource +(JNIEnv * env, jobject obj) { + return (* nativeGetSource) (env, obj); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeGetSourceBytes + * Signature: ()[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetSourceBytes +(JNIEnv * env, jobject obj) { + return (* nativeGetSourceBytes) (env, obj); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeResetFind + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeResetFind +(JNIEnv * env, jobject obj) { + (* nativeResetFind) (env, obj); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_CurrentPageImpl + * Method: nativeSelectAll + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeSelectAll +(JNIEnv * env, jobject obj) { + (* nativeSelectAll) (env, obj); +} + + + +// HistoryImpl +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeBack + * Signature: (I)V + */ +JNIEXPORT void JNICALL +Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeBack +(JNIEnv *env, jobject obj, jint webShellPtr) { + (* nativeBack) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeCanBack + * Signature: (I)Z + */ +JNIEXPORT jboolean +JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeCanBack +(JNIEnv *env, jobject obj, jint webShellPtr) { + return (* nativeCanBack) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeCanForward + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeCanForward +(JNIEnv *env, jobject obj, jint webShellPtr) { + return (* nativeCanForward) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeClearHistory + * Signature: (I)V + */ +JNIEXPORT void JNICALL +Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeClearHistory +(JNIEnv *env, jobject obj, jint webShellPtr) { + (* nativeClearHistory) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeForward + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeForward +(JNIEnv *env, jobject obj, jint webShellPtr) { + (* nativeForward) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetBackList + * Signature: (I)[Lorg/mozilla/webclient/HistoryEntry; + */ +JNIEXPORT jobjectArray JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetBackList +(JNIEnv *env, jobject obj, jint webShellPtr) { + return (* nativeGetBackList) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetCurrentHistoryIndex + * Signature: (I)I + */ +JNIEXPORT jint JNICALL +Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetCurrentHistoryIndex +(JNIEnv *env, jobject obj, jint webShellPtr) { + return (* nativeGetCurrentHistoryIndex) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetForwardList + * Signature: (I)[Lorg/mozilla/webclient/HistoryEntry; + */ +JNIEXPORT jobjectArray JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetForwardList +(JNIEnv *env, jobject obj, jint webShellPtr) { + return (* nativeGetForwardList) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetHistory + * Signature: (I)[Lorg/mozilla/webclient/HistoryEntry; + */ +JNIEXPORT jobjectArray JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistory +(JNIEnv *env, jobject obj, jint webShellPtr) { + return (* nativeGetHistory) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetHistoryEntry + * Signature: (II)Lorg/mozilla/webclient/HistoryEntry; + */ +JNIEXPORT jobject JNICALL +Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistoryEntry +(JNIEnv *env, jobject obj, jint webShellPtr, jint historyIndex) { + return (* nativeGetHistoryEntry) (env, obj, webShellPtr, historyIndex); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetHistoryLength + * Signature: (I)I + */ +JNIEXPORT jint JNICALL +Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistoryLength +(JNIEnv *env, jobject obj, jint webShellPtr) { + return (* nativeGetHistoryLength) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeGetURLForIndex + * Signature: (II)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetURLForIndex +(JNIEnv *env, jobject obj, jint webShellPtr, jint historyIndex) { + return (* nativeGetURLForIndex) (env, obj, webShellPtr, historyIndex); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_HistoryImpl + * Method: nativeSetCurrentHistoryIndex + * Signature: (II)V + */ +JNIEXPORT void JNICALL +Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeSetCurrentHistoryIndex +(JNIEnv *env, jobject obj, jint webShellPtr, jint historyIndex) { + (* nativeSetCurrentHistoryIndex) (env, obj, webShellPtr, historyIndex); +} + + + +// ISupportsPeer +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_ISupportsPeer + * Method: nativeAddRef + * Signature: (I)V + */ +JNIEXPORT void JNICALL +Java_org_mozilla_webclient_wrapper_1native_ISupportsPeer_nativeAddRef +(JNIEnv *env, jobject obj, jint nativeISupportsImpl) { + (* nativeAddRef) (env, obj, nativeISupportsImpl); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_ISupportsPeer + * Method: nativeRelease + * Signature: (I)V + */ +JNIEXPORT void JNICALL +Java_org_mozilla_webclient_wrapper_1native_ISupportsPeer_nativeRelease +(JNIEnv *env, jobject obj, jint nativeISupportsImpl) { + (* nativeRelease) (env, obj, nativeISupportsImpl); +} + + + +// NavigationImpl +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_NavigationImpl + * Method: nativeLoadURL + * Signature: (ILjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeLoadURL +(JNIEnv *env, jobject obj, jint webShellPtr, jstring urlString) { + (* nativeLoadURL) (env, obj, webShellPtr, urlString); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_NavigationImpl + * Method: nativeRefresh + * Signature: (IJ)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeRefresh +(JNIEnv *env, jobject obj, jint webShellPtr, jlong loadFlags) { + (* nativeRefresh) (env, obj, webShellPtr, loadFlags); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_NavigationImpl + * Method: nativeStop + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NavigationImpl_nativeStop +(JNIEnv *env, jobject obj, jint webShellPtr) { + (* nativeStop) (env, obj, webShellPtr); +} + + + +// RDFEnumeration +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFEnumeration + * Method: nativeFinalize + * Signature: ()V + */ +JNIEXPORT void JNICALL +Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeFinalize +(JNIEnv *env, jobject obj) { + (* nativeFinalize) (env, obj); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFEnumeration + * Method: nativeHasMoreElements + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL +Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeHasMoreElements +(JNIEnv *env, jobject obj, jint nativeRDFNode) { + return (* nativeHasMoreElements) (env, obj, nativeRDFNode); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFEnumeration + * Method: nativeNextElement + * Signature: (I)I + */ +JNIEXPORT jint JNICALL +Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeNextElement +(JNIEnv *env, jobject obj, jint nativeRDFNode) { + return (* nativeNextElement) (env, obj, nativeRDFNode); +} + + + +// RDFTreeNode +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeGetChildAt + * Signature: (II)I + */ +JNIEXPORT jint JNICALL +Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeGetChildAt +(JNIEnv *env, jobject obj, jint nativeRDFNode, jint childIndex) { + return (* nativeGetChildAt) (env, obj, nativeRDFNode, childIndex); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeGetChildCount + * Signature: (I)I + */ +JNIEXPORT jint JNICALL +Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeGetChildCount +(JNIEnv *env, jobject obj, jint nativeRDFNode) { + return (* nativeGetChildCount) (env, obj, nativeRDFNode); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeGetIndex + * Signature: (II)I + */ +JNIEXPORT jint JNICALL +Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeGetIndex +(JNIEnv *env, jobject obj, jint nativeRDFNode, jint childRDFNode) { + return (* nativeGetIndex) (env, obj, nativeRDFNode, childRDFNode); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeInsertElementAt + * Signature: (III)V + */ +JNIEXPORT void JNICALL +Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeInsertElementAt +(JNIEnv *env, jobject obj, jint parentRDFNode, jint childRDFNode, jint childIndex) { + (* nativeInsertElementAt) (env, obj, parentRDFNode, childRDFNode, childIndex); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeIsContainer + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeIsContainer +(JNIEnv *env, jobject obj, jint nativeRDFNode) { + return (* nativeIsContainer) (env, obj, nativeRDFNode); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeIsLeaf + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeIsLeaf +(JNIEnv *env, jobject obj, jint nativeRDFNode) { + return (* nativeIsLeaf) (env, obj, nativeRDFNode); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_RDFTreeNode + * Method: nativeToString + * Signature: (I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL +Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeToString +(JNIEnv *env, jobject obj, jint nativeRDFNode) { + return (* nativeToString) (env, obj, nativeRDFNode); +} + + + + + +// WindowControlImpl +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeCreateInitContext + * Signature: (IIIII)I + */ +JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeCreateInitContext +(JNIEnv *env, jobject obj, jint windowPtr, jint x, jint y, jint width, jint height, jobject aBrowserControlImpl) { + return (* nativeCreateInitContext) (env, obj, windowPtr, x, y, width, height, aBrowserControlImpl); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeMoveWindowTo + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeMoveWindowTo +(JNIEnv *env, jobject obj, jint webShellPtr, jint x, jint y) { + (* nativeMoveWindowTo) (env, obj, webShellPtr, x, y); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeRemoveFocus + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeRemoveFocus +(JNIEnv *env, jobject obj, jint webShellPtr) { + (* nativeRemoveFocus) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeRepaint + * Signature: (IZ)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeRepaint +(JNIEnv *env, jobject obj, jint webShellPtr, jboolean forceRepaint) { + (* nativeRepaint) (env, obj, webShellPtr, forceRepaint); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeSetBounds + * Signature: (IIIII)V + */ +JNIEXPORT void JNICALL +Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetBounds +(JNIEnv *env, jobject obj, jint webShellPtr, jint x, jint y, jint w, jint h) { + (* nativeSetBounds) (env, obj, webShellPtr, x, y, w, h); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeSetFocus + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetFocus +(JNIEnv *env, jobject obj, jint webShellPtr) { + (* nativeSetFocus) (env, obj, webShellPtr); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WindowControlImpl + * Method: nativeSetVisible + * Signature: (IZ)V + */ +JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlImpl_nativeSetVisible +(JNIEnv *env, jobject obj, jint webShellPtr, jboolean newState) { + (* nativeSetVisible) (env, obj, webShellPtr, newState); +} + + + + + +// WrapperFactoryImpl +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WrapperFactoryImpl + * Method: nativeDoesImplement + * Signature: (Ljava/lang/String;)Z + */ +JNIEXPORT jboolean JNICALL +Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeDoesImplement +(JNIEnv *env, jobject obj, jstring interfaceName) { + return (* nativeDoesImplement) (env, obj, interfaceName); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WrapperFactoryImpl + * Method: nativeInitialize + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL +Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeAppInitialize +(JNIEnv *env, jobject obj, jstring verifiedBinDirAbsolutePath) { + (* nativeAppInitialize) (env, obj, verifiedBinDirAbsolutePath); +} + +/* + * Class: org_mozilla_webclient_wrapper_0005fnative_WrapperFactoryImpl + * Method: nativeTerminate + * Signature: ()V + */ +JNIEXPORT void JNICALL +Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeTerminate +(JNIEnv * env, jobject obj) { + (* nativeTerminate) (env, obj); +} + + + +/// Copied from MotifBrowserControlCanvasStub.cpp + + + +// EOF diff --git a/mozilla/java/webclient/src_moz/motif/NativeLoaderStub.h b/mozilla/java/webclient/src_moz/motif/NativeLoaderStub.h new file mode 100644 index 00000000000..b01cb5d6089 --- /dev/null +++ b/mozilla/java/webclient/src_moz/motif/NativeLoaderStub.h @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + +/* + * BrowserControlNativeShimStub.h + */ + +/* + + * This file exports a function that allows the code in + * MotifBrowserControlCanvasStub to load the real webclient dll. + + */ + +/** + + * Called by loadMainDll() in MotifBrowserControlCanvasStub.cpp + + * simply loads the webclient dll and copies all the right function + * pointers. + + */ + +void loadMainDll(void); diff --git a/mozilla/java/webclient/src_moz/motif/gtkmozilla.h b/mozilla/java/webclient/src_moz/motif/gtkmozilla.h index c9d1688008e..9f4df35314b 100644 --- a/mozilla/java/webclient/src_moz/motif/gtkmozilla.h +++ b/mozilla/java/webclient/src_moz/motif/gtkmozilla.h @@ -1,64 +1,64 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is Alexander - * Larsson. Portions created by Alexander Larsson are - * Copyright (C) 1999 Alexander Larsson. All - * Rights Reserved. - * - * Contributor(s): - */ - -/* - * gtkmozilla.h - */ - -#ifndef GTKMOZILLA_H -#define GTKMOZILLA_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include - -#define GTK_TYPE_MOZILLA (gtk_mozilla_get_type ()) -#define GTK_MOZILLA(obj) GTK_CHECK_CAST ((obj), GTK_TYPE_MOZILLA, GtkMozilla) -#define GTK_MOZILLA_CLASS(klass) GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_MOZILLA, GtkMozillaClass) -#define GTK_IS_MOZILLA(obj) GTK_CHECK_TYPE ((obj), GTK_TYPE_MOZILLA) -#define GTK_IS_MOZILLA_CLASS(klass) GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MOZILLA) - - -typedef struct _GtkMozilla GtkMozilla; -typedef struct _GtkMozillaClass GtkMozillaClass; - -struct _GtkMozilla -{ - GtkLayout layout; -}; - -struct _GtkMozillaClass -{ - GtkLayoutClass parent_class; -}; - -extern GtkType gtk_mozilla_get_type(void); -extern GtkWidget* gtk_mozilla_new(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* GTKMOZILLA_H */ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Alexander + * Larsson. Portions created by Alexander Larsson are + * Copyright (C) 1999 Alexander Larsson. All + * Rights Reserved. + * + * Contributor(s): + */ + +/* + * gtkmozilla.h + */ + +#ifndef GTKMOZILLA_H +#define GTKMOZILLA_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include + +#define GTK_TYPE_MOZILLA (gtk_mozilla_get_type ()) +#define GTK_MOZILLA(obj) GTK_CHECK_CAST ((obj), GTK_TYPE_MOZILLA, GtkMozilla) +#define GTK_MOZILLA_CLASS(klass) GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_MOZILLA, GtkMozillaClass) +#define GTK_IS_MOZILLA(obj) GTK_CHECK_TYPE ((obj), GTK_TYPE_MOZILLA) +#define GTK_IS_MOZILLA_CLASS(klass) GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MOZILLA) + + +typedef struct _GtkMozilla GtkMozilla; +typedef struct _GtkMozillaClass GtkMozillaClass; + +struct _GtkMozilla +{ + GtkLayout layout; +}; + +struct _GtkMozillaClass +{ + GtkLayoutClass parent_class; +}; + +extern GtkType gtk_mozilla_get_type(void); +extern GtkWidget* gtk_mozilla_new(void); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + +#endif /* GTKMOZILLA_H */ diff --git a/mozilla/java/webclient/src_moz/nsActions.h b/mozilla/java/webclient/src_moz/nsActions.h index 5529e188fc4..a03db296bc4 100644 --- a/mozilla/java/webclient/src_moz/nsActions.h +++ b/mozilla/java/webclient/src_moz/nsActions.h @@ -1,323 +1,323 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is RaptorCanvas. - * - * The Initial Developer of the Original Code is Kirk Baker and - * Ian Wilkinson. Portions created by Kirk Baker and Ian Wilkinson are - * Copyright (C) 1999 Kirk Baker and Ian Wilkinson. All - * Rights Reserved. - * - * Contributor(s): Kirk Baker - * Ian Wilkinson - * Mark Lin - * Mark Goddard - * Ed Burns - */ - -/* - * nsActions.h - */ - -#ifndef nsActions_h___ -#define nsActions_h___ - -#ifndef XP_UNIX -#include -#endif -#include "nsIDocShell.h" -#include "nsIDocumentLoaderObserver.h" -#include "nsIWebShell.h" -#include "nsISessionHistory.h" -#include "nsString.h" -#include "plevent.h" - -#include "DocumentLoaderObserverImpl.h" - -/** - - * Concrete subclasses of nsActionEvent are used to safely convey an - * action from Java to mozilla. - - * This class is kind of like a subclass of the C based PLEvent struct, - * defined in - * . - - * Lifecycle - - * nsActionEvent subclass instances are usually created in a JNI method - * implementation, such as - * Java_org_mozilla*NavigationImpl_nativeLoadURL(). In nativeLoadURL(), - * we create an instance of wsLoadURLEvent, which is a subclass of - * nsActionEvent, passing in the nsIWebShell instance, and the url - * string. The arguments to the nsActionEvent constructor vary from one - * subclass to the next, but they all have the property that they - * provide information used in the subclass's handleEvent() - * method. - - * The nsActionEvent subclass is then cast to a PLEvent struct, and - * passed into either util_PostEvent() or util_PostSynchronous event, - * declared in jni_util.h. See the comments for those functions for - * information on how they deal with the nsActionEvent, cast as a - * PLEvent. - - * During event processing in util_Post*Event, the subclass's - * handleEvent() method is called. This is where the appropriate action - * for that subclass takes place. For example for wsLoadURLEvent, - * handleEvent calls nsIWebShell::LoadURL(). - - * The life of an nsActionEvent subclass ends shortly after the - * handleEvent() method is called. This happens when mozilla calls - * nsActionEvent::destroyEvent(), which simply deletes the instance. - - */ - -class nsActionEvent { -public: - nsActionEvent (); - virtual ~nsActionEvent () {}; - virtual void * handleEvent (void) = 0; //{ return NULL;}; - void destroyEvent (void) { delete this; }; - operator PLEvent* () { return &mEvent; }; - -protected: - PLEvent mEvent; -}; - -class wsHistoryActionEvent : public nsActionEvent { -public: - wsHistoryActionEvent(nsISessionHistory *yourHistory); - virtual ~wsHistoryActionEvent() {}; - -protected: - nsISessionHistory *mHistory; -}; - -class wsResizeEvent : public nsActionEvent { -public: - wsResizeEvent (nsIWebShell* webShell, PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h); - void * handleEvent (void); - -protected: - nsIWebShell * mWebShell; - PRInt32 mLeft; - PRInt32 mBottom; - PRInt32 mWidth; - PRInt32 mHeight; -}; - - -class wsLoadURLEvent : public nsActionEvent { -public: - wsLoadURLEvent (nsIWebShell* webShell, PRUnichar * urlString); - ~wsLoadURLEvent (); - void * handleEvent (void); - -protected: - nsIWebShell * mWebShell; - nsString * mURL; -}; - - -class wsStopEvent : public nsActionEvent { -public: - wsStopEvent (nsIWebShell* webShell); - void * handleEvent (void); - -protected: - nsIWebShell * mWebShell; -}; - - - -class wsShowEvent : public nsActionEvent { -public: - wsShowEvent (nsIWebShell* webShell); - void * handleEvent (void); - -protected: - nsIWebShell * mWebShell; -}; - - - -class wsHideEvent : public nsActionEvent { -public: - wsHideEvent (nsIWebShell* webShell); - void * handleEvent (void); - -protected: - nsIWebShell * mWebShell; -}; - - - -class wsMoveToEvent : public nsActionEvent { -public: - wsMoveToEvent (nsIWebShell* webShell, PRInt32 x, PRInt32 y); - void * handleEvent (void); - -protected: - nsIWebShell * mWebShell; - PRInt32 mX; - PRInt32 mY; -}; - - - -class wsSetFocusEvent : public nsActionEvent { -public: - wsSetFocusEvent(nsIWebShell* webShell); - void * handleEvent (void); - -protected: - nsIWebShell * mWebShell; -}; - - - -class wsRemoveFocusEvent : public nsActionEvent { -public: - wsRemoveFocusEvent(nsIWebShell* webShell); - void * handleEvent (void); - -protected: - nsIWebShell * mWebShell; -}; - - - -class wsRepaintEvent : public nsActionEvent { -public: - wsRepaintEvent (nsIWebShell* webShell, PRBool forceRepaint); - void * handleEvent (void); - -protected: - nsIWebShell * mWebShell; - PRBool mForceRepaint; -}; - - - -class wsCanBackEvent : public wsHistoryActionEvent { -public: - wsCanBackEvent (nsISessionHistory* yourSessionHistory); - void * handleEvent (void); -}; - - - -class wsCanForwardEvent : public wsHistoryActionEvent { -public: - wsCanForwardEvent(nsISessionHistory* yourSessionHistory); - void * handleEvent (void); -}; - - -class wsBackEvent : public wsHistoryActionEvent { -public: - wsBackEvent (nsISessionHistory* yourSessionHistory, - nsIWebShell *yourWebShell); - void * handleEvent (void); - -protected: - nsIWebShell *mWebShell; -}; - - -class wsForwardEvent : public wsHistoryActionEvent { -public: - wsForwardEvent (nsISessionHistory* yourSessionHistory, - nsIWebShell *yourWebShell); - void * handleEvent (void); - -protected: - nsIWebShell *mWebShell; -}; - - -class wsGoToEvent : public wsHistoryActionEvent { -public: - wsGoToEvent (nsISessionHistory *yourSessionHistory, - nsIWebShell* webShell, - PRInt32 historyIndex); - void * handleEvent (void); - -protected: - nsIWebShell * mWebShell; - PRInt32 mHistoryIndex; -}; - - - -class wsGetHistoryLengthEvent : public wsHistoryActionEvent { -public: - wsGetHistoryLengthEvent(nsISessionHistory* yourSessionHistory); - void * handleEvent (void); -}; - - - -class wsGetHistoryIndexEvent : public wsHistoryActionEvent { -public: - wsGetHistoryIndexEvent (nsISessionHistory *yourSessionHistory); - void * handleEvent (void); -}; - - - -class wsGetURLEvent : public wsHistoryActionEvent { -public: - wsGetURLEvent (nsISessionHistory* yourSessionHistory); - void * handleEvent (void); -}; - -class wsGetURLForIndexEvent : public wsHistoryActionEvent { -public: - wsGetURLForIndexEvent(nsISessionHistory *yourSessionHistory, - PRInt32 historyIndex); - void * handleEvent (void); - -protected: - PRInt32 mHistoryIndex; -}; - - - -// added by Mark Goddard OTMP 9/2/1999 -class wsRefreshEvent : public nsActionEvent { -public: - wsRefreshEvent (nsIWebShell* webShell, - long yourLoadFlags); - void * handleEvent (void); - -protected: - nsIWebShell * mWebShell; - nsLoadFlags loadFlags; -}; - -class wsAddDocLoaderObserverEvent : public nsActionEvent { -public: - wsAddDocLoaderObserverEvent(nsIDocShell *yourDocShell, - nsIDocumentLoaderObserver *yourObserver); - - void * handleEvent (void); - -protected: - nsIDocShell *mDocShell; - nsIDocumentLoaderObserver *mDocObserver; -}; - -#endif /* nsActions_h___ */ - - -// EOF +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is RaptorCanvas. + * + * The Initial Developer of the Original Code is Kirk Baker and + * Ian Wilkinson. Portions created by Kirk Baker and Ian Wilkinson are + * Copyright (C) 1999 Kirk Baker and Ian Wilkinson. All + * Rights Reserved. + * + * Contributor(s): Kirk Baker + * Ian Wilkinson + * Mark Lin + * Mark Goddard + * Ed Burns + */ + +/* + * nsActions.h + */ + +#ifndef nsActions_h___ +#define nsActions_h___ + +#ifndef XP_UNIX +#include +#endif +#include "nsIDocShell.h" +#include "nsIDocumentLoaderObserver.h" +#include "nsIWebShell.h" +#include "nsISessionHistory.h" +#include "nsString.h" +#include "plevent.h" + +#include "DocumentLoaderObserverImpl.h" + +/** + + * Concrete subclasses of nsActionEvent are used to safely convey an + * action from Java to mozilla. + + * This class is kind of like a subclass of the C based PLEvent struct, + * defined in + * . + + * Lifecycle + + * nsActionEvent subclass instances are usually created in a JNI method + * implementation, such as + * Java_org_mozilla*NavigationImpl_nativeLoadURL(). In nativeLoadURL(), + * we create an instance of wsLoadURLEvent, which is a subclass of + * nsActionEvent, passing in the nsIWebShell instance, and the url + * string. The arguments to the nsActionEvent constructor vary from one + * subclass to the next, but they all have the property that they + * provide information used in the subclass's handleEvent() + * method. + + * The nsActionEvent subclass is then cast to a PLEvent struct, and + * passed into either util_PostEvent() or util_PostSynchronous event, + * declared in jni_util.h. See the comments for those functions for + * information on how they deal with the nsActionEvent, cast as a + * PLEvent. + + * During event processing in util_Post*Event, the subclass's + * handleEvent() method is called. This is where the appropriate action + * for that subclass takes place. For example for wsLoadURLEvent, + * handleEvent calls nsIWebShell::LoadURL(). + + * The life of an nsActionEvent subclass ends shortly after the + * handleEvent() method is called. This happens when mozilla calls + * nsActionEvent::destroyEvent(), which simply deletes the instance. + + */ + +class nsActionEvent { +public: + nsActionEvent (); + virtual ~nsActionEvent () {}; + virtual void * handleEvent (void) = 0; //{ return NULL;}; + void destroyEvent (void) { delete this; }; + operator PLEvent* () { return &mEvent; }; + +protected: + PLEvent mEvent; +}; + +class wsHistoryActionEvent : public nsActionEvent { +public: + wsHistoryActionEvent(nsISessionHistory *yourHistory); + virtual ~wsHistoryActionEvent() {}; + +protected: + nsISessionHistory *mHistory; +}; + +class wsResizeEvent : public nsActionEvent { +public: + wsResizeEvent (nsIWebShell* webShell, PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h); + void * handleEvent (void); + +protected: + nsIWebShell * mWebShell; + PRInt32 mLeft; + PRInt32 mBottom; + PRInt32 mWidth; + PRInt32 mHeight; +}; + + +class wsLoadURLEvent : public nsActionEvent { +public: + wsLoadURLEvent (nsIWebShell* webShell, PRUnichar * urlString); + ~wsLoadURLEvent (); + void * handleEvent (void); + +protected: + nsIWebShell * mWebShell; + nsString * mURL; +}; + + +class wsStopEvent : public nsActionEvent { +public: + wsStopEvent (nsIWebShell* webShell); + void * handleEvent (void); + +protected: + nsIWebShell * mWebShell; +}; + + + +class wsShowEvent : public nsActionEvent { +public: + wsShowEvent (nsIWebShell* webShell); + void * handleEvent (void); + +protected: + nsIWebShell * mWebShell; +}; + + + +class wsHideEvent : public nsActionEvent { +public: + wsHideEvent (nsIWebShell* webShell); + void * handleEvent (void); + +protected: + nsIWebShell * mWebShell; +}; + + + +class wsMoveToEvent : public nsActionEvent { +public: + wsMoveToEvent (nsIWebShell* webShell, PRInt32 x, PRInt32 y); + void * handleEvent (void); + +protected: + nsIWebShell * mWebShell; + PRInt32 mX; + PRInt32 mY; +}; + + + +class wsSetFocusEvent : public nsActionEvent { +public: + wsSetFocusEvent(nsIWebShell* webShell); + void * handleEvent (void); + +protected: + nsIWebShell * mWebShell; +}; + + + +class wsRemoveFocusEvent : public nsActionEvent { +public: + wsRemoveFocusEvent(nsIWebShell* webShell); + void * handleEvent (void); + +protected: + nsIWebShell * mWebShell; +}; + + + +class wsRepaintEvent : public nsActionEvent { +public: + wsRepaintEvent (nsIWebShell* webShell, PRBool forceRepaint); + void * handleEvent (void); + +protected: + nsIWebShell * mWebShell; + PRBool mForceRepaint; +}; + + + +class wsCanBackEvent : public wsHistoryActionEvent { +public: + wsCanBackEvent (nsISessionHistory* yourSessionHistory); + void * handleEvent (void); +}; + + + +class wsCanForwardEvent : public wsHistoryActionEvent { +public: + wsCanForwardEvent(nsISessionHistory* yourSessionHistory); + void * handleEvent (void); +}; + + +class wsBackEvent : public wsHistoryActionEvent { +public: + wsBackEvent (nsISessionHistory* yourSessionHistory, + nsIWebShell *yourWebShell); + void * handleEvent (void); + +protected: + nsIWebShell *mWebShell; +}; + + +class wsForwardEvent : public wsHistoryActionEvent { +public: + wsForwardEvent (nsISessionHistory* yourSessionHistory, + nsIWebShell *yourWebShell); + void * handleEvent (void); + +protected: + nsIWebShell *mWebShell; +}; + + +class wsGoToEvent : public wsHistoryActionEvent { +public: + wsGoToEvent (nsISessionHistory *yourSessionHistory, + nsIWebShell* webShell, + PRInt32 historyIndex); + void * handleEvent (void); + +protected: + nsIWebShell * mWebShell; + PRInt32 mHistoryIndex; +}; + + + +class wsGetHistoryLengthEvent : public wsHistoryActionEvent { +public: + wsGetHistoryLengthEvent(nsISessionHistory* yourSessionHistory); + void * handleEvent (void); +}; + + + +class wsGetHistoryIndexEvent : public wsHistoryActionEvent { +public: + wsGetHistoryIndexEvent (nsISessionHistory *yourSessionHistory); + void * handleEvent (void); +}; + + + +class wsGetURLEvent : public wsHistoryActionEvent { +public: + wsGetURLEvent (nsISessionHistory* yourSessionHistory); + void * handleEvent (void); +}; + +class wsGetURLForIndexEvent : public wsHistoryActionEvent { +public: + wsGetURLForIndexEvent(nsISessionHistory *yourSessionHistory, + PRInt32 historyIndex); + void * handleEvent (void); + +protected: + PRInt32 mHistoryIndex; +}; + + + +// added by Mark Goddard OTMP 9/2/1999 +class wsRefreshEvent : public nsActionEvent { +public: + wsRefreshEvent (nsIWebShell* webShell, + long yourLoadFlags); + void * handleEvent (void); + +protected: + nsIWebShell * mWebShell; + nsLoadFlags loadFlags; +}; + +class wsAddDocLoaderObserverEvent : public nsActionEvent { +public: + wsAddDocLoaderObserverEvent(nsIDocShell *yourDocShell, + nsIDocumentLoaderObserver *yourObserver); + + void * handleEvent (void); + +protected: + nsIDocShell *mDocShell; + nsIDocumentLoaderObserver *mDocObserver; +}; + +#endif /* nsActions_h___ */ + + +// EOF diff --git a/mozilla/java/webclient/src_moz/rdf_util.cpp b/mozilla/java/webclient/src_moz/rdf_util.cpp index f1090b0af08..a97389d70b9 100644 --- a/mozilla/java/webclient/src_moz/rdf_util.cpp +++ b/mozilla/java/webclient/src_moz/rdf_util.cpp @@ -37,6 +37,7 @@ nsCOMPtr kNC_URL = NULL; nsCOMPtr kNC_Folder = NULL; nsCOMPtr kRDF_type = NULL; + nsresult rdf_InitRDFUtils() { nsresult rv = NS_ERROR_FAILURE; @@ -111,22 +112,21 @@ nsresult rdf_InitRDFUtils() return rv; } } - if (NULL == kNC_Folder) { - rv = gRDF->GetResource("http://home.netscape.com/NC-rdf#Folder", - getter_AddRefs(kNC_Folder)); - if (NS_FAILED(rv)) { - return rv; - } + rv = gRDF->GetResource("http://home.netscape.com/NC-rdf#Folder", + getter_AddRefs(kNC_Folder)); + if (NS_FAILED(rv)) { + return rv; + } } - + if (NULL == kRDF_type) { - rv = gRDF->GetResource("http://home.netscape.com/NC-rdf#type", - getter_AddRefs(kRDF_type)); - if (NS_FAILED(rv)) { - return rv; - } - } + rv = gRDF->GetResource("http://home.netscape.com/NC-rdf#type", + getter_AddRefs(kRDF_type)); + if (NS_FAILED(rv)) { + return rv; + } + } rdf_inited = PR_TRUE; return rv; @@ -156,8 +156,10 @@ void rdf_recursiveResourceTraversal(nsCOMPtr currentResource) rdf_printArcLabels(currentResource); // see if it has a name target + // Ashu + // used 1 instead of true rv = gBookmarksDataSource->GetTarget(currentResource, - kNC_Name, true, + kNC_Name, PR_TRUE, getter_AddRefs(node)); if (NS_SUCCEEDED(rv)) { @@ -237,8 +239,10 @@ void rdf_recursiveResourceTraversal(nsCOMPtr currentResource) rdf_printArcLabels(currentResource); // see if it has a URL target + // Ashu + // used 1 instead of true rv = gBookmarksDataSource->GetTarget(currentResource, - kNC_URL, true, + kNC_URL, PR_TRUE, getter_AddRefs(node)); if (NS_FAILED(rv)) { printf("recursiveResourceTraversal: can't get url from currentResource\n"); diff --git a/mozilla/java/webclient/src_moz/rdf_util.h b/mozilla/java/webclient/src_moz/rdf_util.h index f4dbff772db..67c2e64184a 100644 --- a/mozilla/java/webclient/src_moz/rdf_util.h +++ b/mozilla/java/webclient/src_moz/rdf_util.h @@ -41,6 +41,7 @@ static const char *NS_ICONTAINERUTILS_PROGID = "component://netscape/rdf/contain static const char *NS_IBOOKMARKSSERVICE_PROGID = "component://netscape/browser/bookmarks-service"; static const char *NS_IRDFCONTAINER_PROGID = "component://netscape/rdf/container"; static const char *BOOKMARKS_URI = "NC:BookmarksRoot"; + extern nsCOMPtr gRDFCU; extern nsCOMPtr gRDF; extern nsCOMPtr gBookmarks;