More simple name change changes.

git-svn-id: svn://10.0.0.236/trunk@57051 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2000-01-07 00:44:24 +00:00
parent e0896028aa
commit 14721ab401
3 changed files with 15 additions and 309 deletions

View File

@@ -393,7 +393,7 @@ EmbeddedEventHandler (void * arg) {
#endif
// Don't loop here. The looping will be handled by a Java Thread
// (see org.mozilla.webclient.motif.MozillaEventThread).
// (see org.mozilla.webclient.motif.NativeEventThread).
#ifndef XP_UNIX
do {
if (!processEventLoop(initContext)) {
@@ -428,7 +428,7 @@ InitEmbeddedEventHandler (WebShellInitContext* initContext)
printf("InitEmbeddedEventHandler(%lx): Creating embedded thread...\n", initContext);
#endif
// Don't create a NSPR Thread on Unix, because we will use a Java Thread instead.
// (see org.mozilla.webclient.motif.MozillaEventThread).
// (see org.mozilla.webclient.motif.NativeEventThread).
#ifndef XP_UNIX
initContext->embeddedThread = ::PR_CreateThread(PR_SYSTEM_THREAD,
EmbeddedEventHandler,
@@ -773,38 +773,38 @@ Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWebShellCreate (
// This probably needs some explaining...
// On Unix, instead of using a NSPR thread to manage our Mozilla event loop, we
// use a Java Thread (for reasons I won't go into now, see
// org.mozilla.webclient.motif.MozillaEventThread for more details). This java thread will
// org.mozilla.webclient.motif.NativeEventThread for more details). This java thread will
// process any pending native events in
// org.mozilla.webclient.motif.MozillaEventThread.processNativeEventQueue()
// org.mozilla.webclient.motif.NativeEventThread.processNativeEventQueue()
// (see below). However, when processNativeEventQueue() gets called, it needs access to it's associated
// WebShellInitContext structure in order to process any GTK / Mozilla related events. So what we
// do is we keep a static Hashtable inside the class MozillaEventThread to store mappings of
// do is we keep a static Hashtable inside the class NativeEventThread to store mappings of
// gtkWindowID's to WebShellInitContext's (since there is one WebShellInitContext to one GTK Window).
// This is what this part of the code does:
//
// 1) It first accesses the class org.mozilla.webclient.motif.MozillaEventThread
// 1) It first accesses the class org.mozilla.webclient.motif.NativeEventThread
// 2) It then accesses a static method in this class called "storeContext()" which takes as
// arguments, a GTK window pointer and a WebShellInitContext pointer
// 3) Then it invokes the method
// 4) Inside MozillaEventThread.run(), you can see the code which fetches the appropriate
// 4) Inside NativeEventThread.run(), you can see the code which fetches the appropriate
// WebShellInitContext and then calls processNativeEventQueue() with it below.
// PENDING(mark): Should we cache this? Probably....
jclass mozillaEventThreadClass = env->FindClass("org/mozilla/webclient/motif/MozillaEventThread");
jclass mozillaEventThreadClass = env->FindClass("org/mozilla/webclient/motif/NativeEventThread");
if (mozillaEventThreadClass == NULL) {
printf("Error: Cannot find class org.mozilla.webclient.motif.MozillaEventThread!\n");
printf("Error: Cannot find class org.mozilla.webclient.motif.NativeEventThread!\n");
ThrowExceptionToJava(env, "Error: Cannot find class org.mozilla.webclient.motif.MozillaEventThread!");
ThrowExceptionToJava(env, "Error: Cannot find class org.mozilla.webclient.motif.NativeEventThread!");
return 0;
}
jmethodID storeMethodID = env->GetStaticMethodID(mozillaEventThreadClass, "storeContext", "(II)V");
if (storeMethodID == NULL) {
printf("Error: Cannot get static method storeContext(int, int) from MozillaEventThread!\n");
printf("Error: Cannot get static method storeContext(int, int) from NativeEventThread!\n");
ThrowExceptionToJava(env, "Error: Cannot get static method storeContext(int, int) from MozillaEventThread!");
ThrowExceptionToJava(env, "Error: Cannot get static method storeContext(int, int) from NativeEventThread!");
return 0;
}
@@ -1534,7 +1534,7 @@ JNIEXPORT jboolean JNICALL
* Method: processNativeEventQueue
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_MozillaEventThread_processNativeEventQueue
JNIEXPORT void JNICALL Java_org_mozilla_webclient_motif_NativeEventThread_processNativeEventQueue
(JNIEnv * env, jobject obj, jint webShellInitContextPtr) {
// Given a WebShellInitContext pointer, process any pending Mozilla / GTK events
WebShellInitContext * initContext = (WebShellInitContext *) webShellInitContextPtr;

View File

@@ -8,7 +8,7 @@ DLLNAMESTUB = libwebclientstub.so
MOZILLA_TOP = ../../..
DIST = ${MOZILLA_TOP}/dist
LIBDIR = ${DIST}/lib
CC = CC -g
CC = gcc -g
MKSHLIB = cc -G
# WARNING: YOU NEED TO RUN 'gtk-config --cflags' and stick it in here
GTKINCLUDES = -I/usr/openwin/include -I/opt/local/lib/glib/include -I/opt/local/include
@@ -19,7 +19,7 @@ JAVAINCLUDE = -I${JAVADIR}/include -I${JAVADIR}/include/solaris
# For Solaris
JAVALIBS = -L${JAVADIR}/jre/lib/sparc -ljava
INCLUDE = ${JAVAINCLUDE} -I${DIST}/include -I${MOZILLA_TOP}/widget/src/gtk ${GTKINCLUDES} ${GTKMOZILLAINCLUDE}
DEFINES = -D_REENTRANT -DNECKO -DXP_UNIX -DDEBUG_RAPTOR_CANVAS -DMOZ_DLL_SUFFIX=\".so\"
DEFINES = -D_REENTRANT -DNECKO -DXP_UNIX -DNS_DEBUG -DDEBUG_RAPTOR_CANVAS -DMOZ_DLL_SUFFIX=\".so\"
STUBDEFINES = -D_REENTRANT
STUBINCLUDE = ${JAVAINCLUDE}
STUBLIBS = ${JAVALIBS} /usr/lib/libC.so.5

View File

@@ -46,19 +46,6 @@ extern void locateMotifBrowserControlStubFunctions(void *);
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);
@@ -93,58 +80,6 @@ void locateBrowserControlStubFunctions(void * dll) {
if (!nativeTerminate) {
printf("got dlsym error %s\n", dlerror());
}
nativeSendKeyDownEvent = (void (*) (JNIEnv *, jobject, jint, jchar, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeSendKeyDownEvent");
if (!nativeSendKeyDownEvent) {
printf("got dlsym error %s\n", dlerror());
}
nativeSendKeyUpEvent = (void (*) (JNIEnv *, jobject, jint, jchar, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeSendKeyUpEvent");
if (!nativeSendKeyUpEvent) {
printf("got dlsym error %s\n", dlerror());
}
nativeSendMouseEvent = (void (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint, jint, jint, jint,jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeSendMouseEvent");
if (!nativeSendMouseEvent) {
printf("got dlsym error %s\n", dlerror());
}
nativeIdleEvent = (void (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeIdleEvent");
if (!nativeIdleEvent) {
printf("got dlsym error %s\n", dlerror());
}
nativeUpdateEvent = (void (*) (JNIEnv *, jobject, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeUpdateEvent");
if (!nativeUpdateEvent) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetCreate = (jint (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetCreate");
if (!nativeWidgetCreate) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetDelete = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetDelete");
if (!nativeWidgetDelete) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetResize = (void (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetResize");
if (!nativeWidgetResize) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetEnable = (void (*) (JNIEnv *, jobject, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetEnable");
if (!nativeWidgetEnable) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetShow = (void (*) (JNIEnv *, jobject, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetShow");
if (!nativeWidgetShow) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetInvalidate = (void (*) (JNIEnv *, jobject, jint, jboolean)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetInvalidate");
if (!nativeWidgetInvalidate) {
printf("got dlsym error %s\n", dlerror());
}
nativeWidgetUpdate = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetUpdate");
if (!nativeWidgetUpdate) {
printf("got dlsym error %s\n", dlerror());
}
nativeProcessEvents = (void (*) (JNIEnv *, jobject, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeProcessEvents");
if (!nativeProcessEvents) {
printf("got dlsym error %s\n", dlerror());
}
nativeWebShellCreate = (jint (*) (JNIEnv *, jobject, jint, jint, jint, jint, jint)) dlsym(dll, "Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWebShellCreate");
if (!nativeWebShellCreate) {
printf("got dlsym error %s\n", dlerror());
@@ -292,235 +227,6 @@ Java_org_mozilla_webclient_BrowserControlNativeShim_nativeTerminate (
(* nativeTerminate) (env, obj);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeTerminate()
/*
* Class: MozWebShellNativeShim
* Method: raptorSendKeyDownEvent
* Signature: (ICIII)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeSendKeyDownEvent (
JNIEnv * env,
jobject obj,
jint widgetPtr,
jchar keyChar,
jint keyCode,
jint modifiers,
jint eventTime)
{
(* nativeSendKeyDownEvent) (env, obj, widgetPtr, keyChar, keyCode, modifiers, eventTime);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeSendKeyDownEvent()
/*
* Class: MozWebShellNativeShim
* Method: raptorSendKeyUpEvent
* Signature: (ICIII)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeSendKeyUpEvent (
JNIEnv * env,
jobject obj,
jint widgetPtr,
jchar keyChar,
jint keyCode,
jint modifiers,
jint eventTime)
{
(* nativeSendKeyUpEvent) (env, obj, widgetPtr, keyChar, keyCode, modifiers, eventTime);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeSendKeyUpEvent()
/*
* Class: MozWebShellNativeShim
* Method: raptorSendMouseEvent
* Signature: (IIIIIIIIIII)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeSendMouseEvent (
JNIEnv * env,
jobject obj,
jint windowPtr,
jint widgetPtr,
jint widgetX,
jint widgetY,
jint windowX,
jint windowY,
jint mouseMessage,
jint numClicks,
jint modifiers,
jint eventTime)
{
(* nativeSendMouseEvent) (env, obj, windowPtr, widgetPtr, widgetX, widgetY, windowX, windowY, mouseMessage, numClicks, modifiers, eventTime);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeSendMouseEvent()
/*
* Class: MozWebShellNativeShim
* Method: raptorIdleEvent
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeIdleEvent (
JNIEnv * env,
jobject obj,
jint windowPtr,
jint eventTime)
{
(* nativeIdleEvent) (env, obj, windowPtr, eventTime);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeIdleEvent()
/*
* Class: MozWebShellNativeShim
* Method: raptorUpdateEvent
* Signature: (II)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeUpdateEvent (
JNIEnv * env,
jobject obj,
jint windowPtr,
jint eventTime)
{
(* nativeUpdateEvent) (env, obj, windowPtr, eventTime);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeUpdateEvent()
/*
* Class: MozWebShellNativeShim
* Method: raptorWidgetCreate
* Signature: (I)I
*/
JNIEXPORT jint JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetCreate (
JNIEnv * env,
jobject obj,
jint windowPtr,
jint x,
jint y,
jint width,
jint height)
{
return (* nativeWidgetCreate) (env, obj, windowPtr, x, y, width, height);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetCreate()
/*
* Class: MozWebShellNativeShim
* Method: raptorWidgetDelete
* Signature: (I)I
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetDelete (
JNIEnv * env,
jobject obj,
jint widgetPtr)
{
(* nativeWidgetDelete) (env, obj, widgetPtr);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetDelete()
/*
* Class: MozWebShellNativeShim
* Method: raptorWidgetResize
* Signature: (IIIZ)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetResize (
JNIEnv * env,
jobject obj,
jint widgetPtr,
jint x,
jint y,
jint width,
jint height,
jboolean repaint)
{
(* nativeWidgetResize) (env, obj, widgetPtr, x, y, width, height, repaint);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetResize()
/*
* Class: MozWebShellNativeShim
* Method: raptorWidgetEnable
* Signature: (IZ)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetEnable (
JNIEnv * env,
jobject obj,
jint widgetPtr,
jboolean enable)
{
(* nativeWidgetEnable) (env, obj, widgetPtr, enable);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetEnable()
/*
* Class: MozWebShellNativeShim
* Method: raptorWidgetShow
* Signature: (IZ)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetShow (
JNIEnv * env,
jobject obj,
jint widgetPtr,
jboolean show)
{
(* nativeWidgetShow) (env, obj, widgetPtr, show);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetShow()
/*
* Class: MozWebShellNativeShim
* Method: raptorWidgetInvalidate
* Signature: (IZ)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetInvalidate (
JNIEnv * env,
jobject obj,
jint widgetPtr,
jboolean isSynchronous)
{
(* nativeWidgetInvalidate) (env, obj, widgetPtr, isSynchronous);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetInvalidate()
/*
* Class: MozWebShellNativeShim
* Method: raptorWidgetUpdate
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetUpdate (
JNIEnv * env,
jobject obj,
jint widgetPtr)
{
(* nativeWidgetUpdate) (env, obj, widgetPtr);
} // Java_org_mozilla_webclient_BrowserControlNativeShim_nativeWidgetUpdate()
JNIEXPORT void JNICALL
Java_org_mozilla_webclient_BrowserControlNativeShim_nativeProcessEvents (
JNIEnv* env,
jobject obj,
jint theWebShell)
{
(* nativeProcessEvents) (env, obj, theWebShell);
}
/*
* Class: MozWebShellNativeShim
* Method: raptorWebShellCreate