a=edburns

r=ashuk
bug=47357
M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
M src_moz/CBrowserContainer.cpp
M src_moz/NativeEventThread.cpp
M src_moz/ns_util.cpp
M src_moz/ns_util.h
M src_share/jni_util.cpp
M src_share/jni_util.h

tar -cvf 47357.2.tar classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java src_moz/CBrowserContainer.cpp src_moz/NativeEventThread.cpp src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

cvs diff -u classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java src_moz/CBrowserContainer.cpp src_moz/NativeEventThread.cpp src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

This change modifes what one has to do on the native side to add a
listener.

 * How to create a new listener type on the native side: <P>

 * 1. add an entry in the gSupportedListenerInterfaces array defined in
 * ns_util.cpp <P>

 * 2. add a corresponding entry in the LISTENER_CLASSES enum in
 * ns_util.h <P>

 * 3. add a jstring to the string constant list in
 * CBrowserContainer.cpp, below.

 * 4. Initialize this jstring constant in CBrowserContainer.cpp
 * initStringConstants() <P>

 * 5. add an entry to the switch statement in NativeEventThread.cpp
 * native{add,remove}Listener <P>

You have to clobber_all in webclient after this change.


git-svn-id: svn://10.0.0.236/trunk@76019 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2000-08-10 21:38:52 +00:00
parent 3064c5d83d
commit 1f01dae006
7 changed files with 100 additions and 38 deletions

View File

@@ -30,6 +30,20 @@
#include "ns_util.h"
/**
* a null terminated array of listener interfaces we support. This is
* used in NativeEventThread.cpp nativeAddListener,
* nativeRemoveListener, and in CBrowserContainer.cpp
*/
const char *gSupportedListenerInterfaces[] = {
"org.mozilla.webclient.DocumentLoadListener",
"java.awt.event.MouseListener",
nsnull
};
void util_PostEvent(WebShellInitContext * initContext, PLEvent * event)
{
PL_ENTER_EVENT_QUEUE_MONITOR(initContext->actionQueue);