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

@@ -85,7 +85,7 @@ static NS_DEFINE_CID(kCmdLineServiceCID, NS_COMMANDLINE_SERVICE_CID);
static const char *NS_DOCSHELL_PROGID = "component://netscape/docshell/html";
//static const char *NS_WEBBROWSER_PROGID = "component://netscape/embedding/browser/nsWebBrowser";
extern const char * gBinDir;
extern const char * gBinDir; // defined in WrapperFactoryImpl.cpp
#ifdef XP_PC
@@ -160,27 +160,6 @@ char * errorMessages[] = {
"Unable to show the WebShell."
};
/**
* a null terminated array of listener interfaces we support.
*/
const char *gSupportedListenerInterfaces[] = {
"org.mozilla.webclient.DocumentLoadListener",
"java.awt.event.MouseListener",
nsnull
};
// these index into the gSupportedListenerInterfaces array
typedef enum {
DOCUMENT_LOAD_LISTENER = 0,
MOUSE_LISTENER,
LISTENER_NOT_FOUND
} LISTENER_CLASSES;
//
// JNI methods
//