diff --git a/mozilla/java/webclient/src_moz/BookmarksImpl.cpp b/mozilla/java/webclient/src_moz/BookmarksImpl.cpp index 3d4dfbd32c9..110889149d8 100644 --- a/mozilla/java/webclient/src_moz/BookmarksImpl.cpp +++ b/mozilla/java/webclient/src_moz/BookmarksImpl.cpp @@ -61,7 +61,7 @@ Java_org_mozilla_webclient_wrapper_1native_BookmarksImpl_nativeNewRDFNode jint result = -1; nsAutoString uri("NC:BookmarksRoot"); - const char *url = env->GetStringUTFChars(urlString, NULL); + const char *url = env->GetStringUTFChars(urlString, nsnull); uri.Append("#$"); uri.Append(url); printf("debug: edburns: nativeNewRDFNode: url: %s\n", url); diff --git a/mozilla/java/webclient/src_moz/CurrentPageImpl.cpp b/mozilla/java/webclient/src_moz/CurrentPageImpl.cpp index 5eba498af0c..2fdfdec030a 100644 --- a/mozilla/java/webclient/src_moz/CurrentPageImpl.cpp +++ b/mozilla/java/webclient/src_moz/CurrentPageImpl.cpp @@ -154,7 +154,7 @@ JNIEXPORT jstring JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPage JNIEXPORT jstring JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetSource (JNIEnv *, jobject) { - jstring result = NULL; + jstring result = nsnull; return result; } @@ -167,7 +167,7 @@ JNIEXPORT jstring JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPage JNIEXPORT jbyteArray JNICALL Java_org_mozilla_webclient_wrapper_1native_CurrentPageImpl_nativeGetSourceBytes (JNIEnv *, jobject) { - jbyteArray result = NULL; + jbyteArray result = nsnull; return result; } diff --git a/mozilla/java/webclient/src_moz/DocumentLoaderObserverImpl.cpp b/mozilla/java/webclient/src_moz/DocumentLoaderObserverImpl.cpp index 3218b6533eb..bf4ffc1f3b1 100644 --- a/mozilla/java/webclient/src_moz/DocumentLoaderObserverImpl.cpp +++ b/mozilla/java/webclient/src_moz/DocumentLoaderObserverImpl.cpp @@ -53,7 +53,7 @@ char *DocumentLoaderObserverImpl::maskNames[] = { "STATUS_URL_LOAD_EVENT_MASK", "UNKNOWN_CONTENT_EVENT_MASK", "FETCH_INTERRUPT_EVENT_MASK", - NULL + nsnull }; @@ -77,7 +77,7 @@ DocumentLoaderObserverImpl::DocumentLoaderObserverImpl(JNIEnv *env, jobject yourTarget) : mJNIEnv(env), mInitContext(yourInitContext), mTarget(yourTarget) { - if (NULL == gVm) { // declared in jni_util.h + if (nsnull == gVm) { // declared in jni_util.h env->GetJavaVM(&gVm); // save this vm reference away for the callback! } @@ -88,9 +88,9 @@ DocumentLoaderObserverImpl::DocumentLoaderObserverImpl(JNIEnv *env, nativeThreadID); #endif - char *currentThreadName = NULL; + char *currentThreadName = nsnull; - if (NULL != (currentThreadName = util_GetCurrentThreadName(env))) { + if (nsnull != (currentThreadName = util_GetCurrentThreadName(env))) { printf("debug: edburns: DocumentLoaderObserverImpl ctor threadName: %s\n", currentThreadName); delete currentThreadName; @@ -105,30 +105,30 @@ DocumentLoaderObserverImpl::DocumentLoaderObserverImpl(JNIEnv *env, void DocumentLoaderObserverImpl::InitializeMaskValues() { // if we don't have a VM, do nothing - if (NULL == gVm) { + if (nsnull == gVm) { return; } JNIEnv *env = (JNIEnv *) JNU_GetEnv(gVm, JNI_VERSION_1_2); - if (NULL == env) { + if (nsnull == env) { return; } jclass documentLoadEventClass = env->FindClass("org/mozilla/webclient/DocumentLoadEvent"); - if (NULL == documentLoadEventClass) { + if (nsnull == documentLoadEventClass) { return; } int i = 0; jfieldID fieldID; - while (NULL != maskNames[i]) { + while (nsnull != maskNames[i]) { fieldID = env->GetStaticFieldID(documentLoadEventClass, maskNames[i], "J"); - if (NULL == fieldID) { + if (nsnull == fieldID) { return; } @@ -139,10 +139,10 @@ void DocumentLoaderObserverImpl::InitializeMaskValues() NS_IMETHODIMP DocumentLoaderObserverImpl::QueryInterface(REFNSIID aIID, void** aInstance) { - if (NULL == aInstance) + if (nsnull == aInstance) return NS_ERROR_NULL_POINTER; - *aInstance = NULL; + *aInstance = nsnull; if (aIID.Equals(kIDocumentLoaderObserverIID)) { diff --git a/mozilla/java/webclient/src_moz/EventRegistration.cpp b/mozilla/java/webclient/src_moz/EventRegistration.cpp index b5150ff6e64..b206110300a 100644 --- a/mozilla/java/webclient/src_moz/EventRegistration.cpp +++ b/mozilla/java/webclient/src_moz/EventRegistration.cpp @@ -39,7 +39,7 @@ void addDocumentLoadListener(JNIEnv *env, WebShellInitContext *initContext, } if (initContext->initComplete) { - // Assert (NULL != initContext->nativeEventThread) + // Assert (nsnull != initContext->nativeEventThread) // create the c++ "peer" for the DocumentLoadListener, which is an // nsIDocumentLoaderObserver. diff --git a/mozilla/java/webclient/src_moz/HistoryImpl.cpp b/mozilla/java/webclient/src_moz/HistoryImpl.cpp index f4b9da84105..da314aaac3f 100644 --- a/mozilla/java/webclient/src_moz/HistoryImpl.cpp +++ b/mozilla/java/webclient/src_moz/HistoryImpl.cpp @@ -57,9 +57,9 @@ Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeBack nativeThreadID); #endif - char *currentThreadName = NULL; + char *currentThreadName = nsnull; - if (NULL != (currentThreadName = util_GetCurrentThreadName(env))) { + if (nsnull != (currentThreadName = util_GetCurrentThreadName(env))) { printf("debug: edburns: HistoryImpl_nativeBack() java threadName: %s\n", currentThreadName); delete currentThreadName; @@ -105,7 +105,7 @@ JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeCanBack JNIEXPORT jobjectArray JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetBackList (JNIEnv *env, jobject obj, jint webShellPtr) { - jobjectArray result = NULL; + jobjectArray result = nsnull; return result; } @@ -173,7 +173,7 @@ JNIEXPORT jboolean JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImp JNIEXPORT jobjectArray JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetForwardList (JNIEnv *env, jobject obj, jint webShellPtr) { - jobjectArray result = NULL; + jobjectArray result = nsnull; return result; } @@ -181,7 +181,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_mozilla_webclient_wrapper_1native_Histor JNIEXPORT jobjectArray JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistory (JNIEnv *env, jobject obj, jint webShellPtr) { - jobjectArray result = NULL; + jobjectArray result = nsnull; return result; } @@ -190,7 +190,7 @@ JNIEXPORT jobject JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetHistoryEntry (JNIEnv *env, jobject obj, jint webShellPtr, jint historyIndex) { - jobject result = NULL; + jobject result = nsnull; return result; } @@ -307,7 +307,7 @@ JNIEXPORT jstring JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl urlString = env->NewStringUTF((const char *) charResult); } else { - ::util_ThrowExceptionToJava(env, "raptorWebShellGetURL Exception: GetURL() returned NULL"); + ::util_ThrowExceptionToJava(env, "raptorWebShellGetURL Exception: GetURL() returned nsnull"); return nsnull; } diff --git a/mozilla/java/webclient/src_moz/NativeEventThread.cpp b/mozilla/java/webclient/src_moz/NativeEventThread.cpp index 4dd35fbadac..f7bb285e3c6 100644 --- a/mozilla/java/webclient/src_moz/NativeEventThread.cpp +++ b/mozilla/java/webclient/src_moz/NativeEventThread.cpp @@ -92,7 +92,7 @@ nsresult InitMozillaStuff (WebShellInitContext * arg); // Local data // -static nsISessionHistory *gHistory = NULL; +static nsISessionHistory *gHistory = nsnull; char * errorMessages[] = { "No Error", @@ -112,7 +112,7 @@ char * errorMessages[] = { const char *gSupportedListenerInterfaces[] = { "org/mozilla/webclient/DocumentLoadListener", - NULL + nsnull }; // these index into the gSupportedListenerInterfaces array, this should @@ -134,12 +134,12 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NativeEventThr nsresult rv = NS_ERROR_FAILURE; WebShellInitContext * initContext = (WebShellInitContext *) webShellPtr; - if (NULL == initContext) { + if (nsnull == initContext) { ::util_ThrowExceptionToJava(env, "NULL webShellPtr passed to nativeInitialize."); return; } - if (NULL == gVm) { // declared in jni_util.h + if (nsnull == gVm) { // declared in jni_util.h env->GetJavaVM(&gVm); // save this vm reference } @@ -166,7 +166,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NativeEventThr { WebShellInitContext * initContext = (WebShellInitContext *) webShellPtr; - if (NULL == initContext) { + if (nsnull == initContext) { ::util_ThrowExceptionToJava(env, "NULL webShellPtr passed to nativeProcessEvents."); return; @@ -200,22 +200,22 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NativeEventThr { WebShellInitContext *initContext = (WebShellInitContext *)webShellPtr; - if (initContext == NULL) { + if (initContext == nsnull) { ::util_ThrowExceptionToJava(env, "Exception: null initContext passed tonativeAddListener"); return; } - if (NULL == initContext->nativeEventThread) { + if (nsnull == initContext->nativeEventThread) { // store the java EventRegistrationImpl class in the initContext initContext->nativeEventThread = obj; // VERY IMPORTANT!! // This enables the listener to call back into java } - jclass clazz = NULL; + jclass clazz = nsnull; int listenerType = 0; - while (NULL != gSupportedListenerInterfaces[listenerType]) { - if (NULL == + while (nsnull != gSupportedListenerInterfaces[listenerType]) { + if (nsnull == (clazz = env->FindClass(gSupportedListenerInterfaces[listenerType]))) { return; @@ -232,10 +232,10 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NativeEventThr return; } - jobject globalRef = NULL; + jobject globalRef = nsnull; // PENDING(edburns): make sure do DeleteGlobalRef on the removeListener - if (NULL == (globalRef = env->NewGlobalRef(typedListener))) { + if (nsnull == (globalRef = env->NewGlobalRef(typedListener))) { ::util_ThrowExceptionToJava(env, "Exception: NativeEventThread.nativeAddListener(): can't create NewGlobalRef\n\tfor argument"); return; } @@ -268,8 +268,8 @@ int processEventLoop(WebShellInitContext * initContext) // PENDING(mark): Does this work on the Mac? MSG msg; - if (::PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) { - if (::GetMessage(&msg, NULL, 0, 0)) { + if (::PeekMessage(&msg, nsnull, 0, 0, PM_NOREMOVE)) { + if (::GetMessage(&msg, nsnull, 0, 0)) { ::TranslateMessage(&msg); ::DispatchMessage(&msg); } @@ -285,7 +285,7 @@ int processEventLoop(WebShellInitContext * initContext) PLEvent * event = ::PL_GetEvent(initContext->actionQueue); - if (event != NULL) { + if (event != nsnull) { ::PL_HandleEvent(event); } } @@ -349,9 +349,9 @@ nsresult InitMozillaStuff (WebShellInitContext * initContext) if (initContext->embeddedThread) { #if DEBUG_RAPTOR_CANVAS - printf("InitMozillaStuff(%lx): embeddedThread != NULL\n", initContext); + printf("InitMozillaStuff(%lx): embeddedThread != nsnull\n", initContext); #endif - if (initContext->actionQueue == NULL) { + if (initContext->actionQueue == nsnull) { #if DEBUG_RAPTOR_CANVAS printf("InitMozillaStuff(%lx): Create the action queue\n", initContext); #endif @@ -428,7 +428,7 @@ nsresult InitMozillaStuff (WebShellInitContext * initContext) nsServiceManager::ReleaseService(kPrefCID, prefs); } - if (NULL == gHistory) { + if (nsnull == gHistory) { rv = nsComponentManager::CreateInstance(kSessionHistoryCID, nsnull, kISessionHistoryIID, (void**)&gHistory); if (NS_FAILED(rv)) { diff --git a/mozilla/java/webclient/src_moz/NavigationImpl.cpp b/mozilla/java/webclient/src_moz/NavigationImpl.cpp index b7f741b79b1..31631a15556 100644 --- a/mozilla/java/webclient/src_moz/NavigationImpl.cpp +++ b/mozilla/java/webclient/src_moz/NavigationImpl.cpp @@ -44,7 +44,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NavigationImpl if (env->ExceptionOccurred()) { ::util_ThrowExceptionToJava(env, "raptorWebShellLoadURL Exception: unable to extract Java string"); - if (urlStringChars != NULL) + if (urlStringChars != nsnull) env->ReleaseStringChars(urlString, urlStringChars); return; } @@ -53,7 +53,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_wrapper_1native_NavigationImpl if (initContext == nsnull) { ::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to raptorWebShellLoadURL"); - if (urlStringChars != NULL) + if (urlStringChars != nsnull) env->ReleaseStringChars(urlString, urlStringChars); return; } diff --git a/mozilla/java/webclient/src_moz/RDFEnumeration.cpp b/mozilla/java/webclient/src_moz/RDFEnumeration.cpp index 9599f54304a..976d3d89dcf 100644 --- a/mozilla/java/webclient/src_moz/RDFEnumeration.cpp +++ b/mozilla/java/webclient/src_moz/RDFEnumeration.cpp @@ -127,14 +127,14 @@ Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeFinalize jint nativeEnum, nativeContainer; objClass = env->GetObjectClass(obj); - if (NULL == objClass) { + if (nsnull == objClass) { printf("nativeFinalize: Can't get object class for RDFEnumeration.\n"); return; } // release the nsISimpleEnumerator nativeEnumFieldID = env->GetFieldID(objClass, "nativeEnum", "I"); - if (NULL == nativeEnumFieldID) { + if (nsnull == nativeEnumFieldID) { printf("nativeFinalize: Can't get fieldID for nativeEnum.\n"); return; } @@ -146,7 +146,7 @@ Java_org_mozilla_webclient_wrapper_1native_RDFEnumeration_nativeFinalize // release the nsIRDFContainer nativeContainerFieldID = env->GetFieldID(objClass, "nativeContainer", "I"); - if (NULL == nativeContainerFieldID) { + if (nsnull == nativeContainerFieldID) { printf("nativeFinalize: Can't get fieldID for nativeContainer.\n"); return; } @@ -174,13 +174,13 @@ jint getNativeEnumFromJava(JNIEnv *env, jobject obj, jint nativeRDFNode) jfieldID nativeContainerFieldID; objClass = env->GetObjectClass(obj); - if (NULL == objClass) { + if (nsnull == objClass) { printf("getNativeEnumFromJava: Can't get object class for RDFEnumeration.\n"); return -1; } nativeEnumFieldID = env->GetFieldID(objClass, "nativeEnum", "I"); - if (NULL == nativeEnumFieldID) { + if (nsnull == nativeEnumFieldID) { printf("getNativeEnumFromJava: Can't get fieldID for nativeEnum.\n"); return -1; } @@ -238,7 +238,7 @@ jint getNativeEnumFromJava(JNIEnv *env, jobject obj, jint nativeRDFNode) // validity of the nsISimpleEnumerator that came from the container. // Just to be safe, I'm doing so. nativeContainerFieldID = env->GetFieldID(objClass, "nativeContainer", "I"); - if (NULL == nativeContainerFieldID) { + if (nsnull == nativeContainerFieldID) { printf("getNativeEnumFromJava: Can't get fieldID for nativeContainer.\n"); return -1; } diff --git a/mozilla/java/webclient/src_moz/RDFTreeNode.cpp b/mozilla/java/webclient/src_moz/RDFTreeNode.cpp index 022788c3799..2e273e69623 100644 --- a/mozilla/java/webclient/src_moz/RDFTreeNode.cpp +++ b/mozilla/java/webclient/src_moz/RDFTreeNode.cpp @@ -148,10 +148,10 @@ Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeToString (nsIRDFResource *) nativeRDFNode; nsCOMPtr node; nsCOMPtr literal; - jstring result = NULL; + jstring result = nsnull; PRBool isContainer = PR_FALSE; nsresult rv; - const PRUnichar *textForNode = NULL; + const PRUnichar *textForNode = nsnull; rv = gRDFCU->IsContainer(gBookmarksDataSource, currentResource, &isContainer); @@ -211,10 +211,10 @@ Java_org_mozilla_webclient_wrapper_1native_RDFTreeNode_nativeToString } } - if (NULL != textForNode) { + if (nsnull != textForNode) { nsString * string = new nsString(textForNode); int length = 0; - if (NULL != string) { + if (nsnull != string) { length = string->Length(); } diff --git a/mozilla/java/webclient/src_moz/WindowControlImpl.cpp b/mozilla/java/webclient/src_moz/WindowControlImpl.cpp index 74dde8b3d6d..9accc41cb7f 100644 --- a/mozilla/java/webclient/src_moz/WindowControlImpl.cpp +++ b/mozilla/java/webclient/src_moz/WindowControlImpl.cpp @@ -83,11 +83,11 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlI initContext->initComplete = FALSE; initContext->initFailCode = 0; initContext->parentHWnd = parentHWnd; - initContext->webShell = NULL; - initContext->embeddedThread = NULL; - initContext->sessionHistory = NULL; - initContext->actionQueue = NULL; - initContext->nativeEventThread = NULL; + initContext->webShell = nsnull; + initContext->embeddedThread = nsnull; + initContext->sessionHistory = nsnull; + initContext->actionQueue = nsnull; + initContext->nativeEventThread = nsnull; initContext->env = env; initContext->stopThread = FALSE; initContext->x = x; @@ -98,7 +98,7 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlI #ifdef XP_UNIX jclass cls = env->GetObjectClass(aBrowserControlImpl); // Get Class for BrowserControlImpl object jclass clz = env->FindClass("org/mozilla/webclient/BrowserControlImpl"); - if (NULL == clz) { + if (nsnull == clz) { ::util_ThrowExceptionToJava(env, "Exception: Could not find class for BrowserControlImpl"); return (jint) 0; } @@ -109,25 +109,25 @@ JNIEXPORT jint JNICALL Java_org_mozilla_webclient_wrapper_1native_WindowControlI } // Get myCanvas IVar jfieldID fid = env->GetFieldID(cls, "myCanvas", "Lorg/mozilla/webclient/BrowserControlCanvas;"); - if (NULL == fid) { + if (nsnull == 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) { + if (nsnull == canvasCls) { ::util_ThrowExceptionToJava(env, "Exception: Could Not find Class for CanvasObj"); return (jint) 0; } jfieldID gtkfid = env->GetFieldID(canvasCls, "gtkWinPtr", "I"); - if (NULL == gtkfid) { + if (nsnull == 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; + initContext->gtkWinPtr = nsnull; #endif return (jint) initContext; diff --git a/mozilla/java/webclient/src_moz/WrapperFactoryImpl.cpp b/mozilla/java/webclient/src_moz/WrapperFactoryImpl.cpp index e0f732e8f10..24bc046ed97 100644 --- a/mozilla/java/webclient/src_moz/WrapperFactoryImpl.cpp +++ b/mozilla/java/webclient/src_moz/WrapperFactoryImpl.cpp @@ -69,7 +69,7 @@ const char *gImplementedInterfaces[] = { "webclient.History", "webclient.EventRegistration", "webclient.Bookmarks", - NULL + nsnull }; extern "C" void NS_SetupRegistry(); @@ -86,10 +86,10 @@ Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeAppInitializ const char *nativePath = (const char *) env->GetStringUTFChars(verifiedBinDirAbsolutePath, 0); gBinDir = nativePath; - NS_InitXPCOM(NULL, &gBinDir); + NS_InitXPCOM(nsnull, &gBinDir); NS_SetupRegistry(); - nsComponentManager::RegisterComponentLib(kSessionHistoryCID, NULL, - NULL, APPSHELL_DLL, + nsComponentManager::RegisterComponentLib(kSessionHistoryCID, nsnull, + nsnull, APPSHELL_DLL, PR_FALSE, PR_FALSE); NS_AutoregisterComponents(); gFirstTime = PR_FALSE; @@ -115,11 +115,11 @@ Java_org_mozilla_webclient_wrapper_1native_WrapperFactoryImpl_nativeDoesImplemen int i = 0; - if (NULL == iName) { + if (nsnull == iName) { return result; } - while (NULL != gImplementedInterfaces[i]) { + while (nsnull != gImplementedInterfaces[i]) { if (0 == nsCRT::strcmp(gImplementedInterfaces[i++], iName)) { result = JNI_TRUE; break; diff --git a/mozilla/java/webclient/src_moz/jni_util.cpp b/mozilla/java/webclient/src_moz/jni_util.cpp index 178cf666464..abf409c5094 100644 --- a/mozilla/java/webclient/src_moz/jni_util.cpp +++ b/mozilla/java/webclient/src_moz/jni_util.cpp @@ -27,7 +27,7 @@ #include "jni_util.h" -JavaVM *gVm = NULL; +JavaVM *gVm = nsnull; void util_ThrowExceptionToJava (JNIEnv * env, const char * message) { @@ -45,11 +45,11 @@ void util_ThrowExceptionToJava (JNIEnv * env, const char * message) // Throw the exception with the error code and description jmethodID jID = env->GetMethodID(excCls, "", "(Ljava/lang/String;)V"); // void Exception(String) - if (jID != NULL) { + if (jID != nsnull) { jstring exceptionString = env->NewStringUTF(message); jthrowable newException = (jthrowable) env->NewObject(excCls, jID, exceptionString); - if (newException != NULL) { + if (newException != nsnull) { env->Throw(newException); } else { @@ -90,26 +90,26 @@ void util_SendEventToJava(JNIEnv *yourEnv, jobject nativeEventThread, jobject webclientEventListener, jlong eventType) { - if (NULL == gVm) { + if (nsnull == gVm) { return; } JNIEnv *env = (JNIEnv *) JNU_GetEnv(gVm, JNI_VERSION_1_2); - if (NULL == env) { + if (nsnull == env) { return; } jthrowable exception; - if (NULL != (exception = env->ExceptionOccurred())) { + if (nsnull != (exception = env->ExceptionOccurred())) { env->ExceptionDescribe(); } jclass clazz = env->GetObjectClass(nativeEventThread); jmethodID mid = env->GetMethodID(clazz, "nativeEventOccurred", "(Lorg/mozilla/webclient/WebclientEventListener;J)V"); - if ( mid != NULL) { + if ( mid != nsnull) { env->CallVoidMethod(nativeEventThread, mid, webclientEventListener, eventType); } else { @@ -128,22 +128,22 @@ char *util_GetCurrentThreadName(JNIEnv *env) jclass threadClass = env->FindClass("java/lang/Thread"); jobject currentThread; jstring name; - char *result = NULL; + char *result = nsnull; const char *cstr; jboolean isCopy; - if (NULL != threadClass) { + if (nsnull != threadClass) { jmethodID currentThreadID = env->GetStaticMethodID(threadClass,"currentThread", "()Ljava/lang/Thread;"); currentThread = env->CallStaticObjectMethod(threadClass, currentThreadID); - if (NULL != currentThread) { + if (nsnull != currentThread) { jmethodID getNameID = env->GetMethodID(threadClass, "getName", "()Ljava/lang/String;"); name = (jstring) env->CallObjectMethod(currentThread, getNameID, - NULL); + nsnull); result = strdup(cstr = env->GetStringUTFChars(name, &isCopy)); if (JNI_TRUE == isCopy) { env->ReleaseStringUTFChars(name, cstr); @@ -157,7 +157,7 @@ char *util_GetCurrentThreadName(JNIEnv *env) void util_DumpJavaStack(JNIEnv *env) { jclass threadClass = env->FindClass("java/lang/Thread"); - if (NULL != threadClass) { + if (nsnull != threadClass) { jmethodID dumpStackID = env->GetStaticMethodID(threadClass, "dumpStack", "()V"); @@ -264,7 +264,7 @@ JNU_GetEnv(JavaVM *vm, jint version) // void *result; //vm->GetEnv(&result, version); - JNIEnv *result = NULL; + JNIEnv *result = nsnull; vm->AttachCurrentThread((void **)&result, (void *) version); return result; diff --git a/mozilla/java/webclient/src_moz/nsActions.cpp b/mozilla/java/webclient/src_moz/nsActions.cpp index 3162141f336..563b6f464aa 100644 --- a/mozilla/java/webclient/src_moz/nsActions.cpp +++ b/mozilla/java/webclient/src_moz/nsActions.cpp @@ -55,7 +55,7 @@ destroyEvent (PLEvent * event) { nsActionEvent * actionEvent = (nsActionEvent*) event->owner; - if (actionEvent != NULL) { + if (actionEvent != nsnull) { actionEvent->destroyEvent(); } } // destroyEvent() @@ -106,7 +106,7 @@ wsResizeEvent::handleEvent () getter_AddRefs(baseWindow)); if (NS_FAILED(rv)) { - return NULL; + return nsnull; } rv = baseWindow->SetPositionAndSize(mLeft, mBottom, mWidth, mHeight, PR_TRUE); @@ -115,7 +115,7 @@ wsResizeEvent::handleEvent () return (void *) rv; } - return NULL; + return nsnull; } // handleEvent() @@ -145,7 +145,7 @@ wsLoadURLEvent::handleEvent () printf("result = %lx\n", rv); } - return NULL; + return nsnull; } // handleEvent() @@ -179,7 +179,7 @@ wsStopEvent::handleEvent () printf("result = %lx\n", rv); } - return NULL; + return nsnull; } // handleEvent() @@ -209,13 +209,13 @@ wsShowEvent::handleEvent () getter_AddRefs(baseWindow)); if (NS_FAILED(rv)) { - return NULL; + return nsnull; } baseWindow->SetVisibility(PR_TRUE); printf("result = %lx\n", rv); } - return NULL; + return nsnull; } // handleEvent() @@ -245,13 +245,13 @@ wsHideEvent::handleEvent () getter_AddRefs(baseWindow)); if (NS_FAILED(rv)) { - return NULL; + return nsnull; } baseWindow->SetVisibility(PR_FALSE); printf("result = %lx\n", rv); } - return NULL; + return nsnull; } // handleEvent() @@ -283,13 +283,13 @@ wsMoveToEvent::handleEvent () getter_AddRefs(baseWindow)); if (NS_FAILED(rv)) { - return NULL; + return nsnull; } rv = baseWindow->SetPosition(mX, mY); printf("result = %lx\n", rv); } - return NULL; + return nsnull; } // handleEvent() @@ -318,13 +318,13 @@ wsSetFocusEvent::handleEvent () getter_AddRefs(baseWindow)); if (NS_FAILED(rv)) { - return NULL; + return nsnull; } rv = baseWindow->SetFocus(); printf("result = %lx\n", rv); } - return NULL; + return nsnull; } // handleEvent() @@ -351,7 +351,7 @@ wsRemoveFocusEvent::handleEvent () printf("result = %lx\n", rv); } - return NULL; + return nsnull; } // handleEvent() @@ -382,13 +382,13 @@ wsRepaintEvent::handleEvent () getter_AddRefs(baseWindow)); if (NS_FAILED(rv)) { - return NULL; + return nsnull; } rv = baseWindow->Repaint(mForceRepaint); printf("result = %lx\n", rv); } - return NULL; + return nsnull; } // handleEvent() @@ -406,7 +406,7 @@ wsCanBackEvent::wsCanBackEvent(nsISessionHistory* yourSessionHistory) : void * wsCanBackEvent::handleEvent () { - void *result = NULL; + void *result = nsnull; if (mHistory) { nsresult rv; PRBool canGoBack; @@ -443,7 +443,7 @@ wsCanForwardEvent::wsCanForwardEvent(nsISessionHistory* yourSessionHistory) : void * wsCanForwardEvent::handleEvent () { - void *result = NULL; + void *result = nsnull; if (mHistory) { nsresult rv; PRBool canGoForward; @@ -483,7 +483,7 @@ wsBackEvent::wsBackEvent(nsISessionHistory* yourSessionHistory, void * wsBackEvent::handleEvent () { - void *result = NULL; + void *result = nsnull; if (mHistory && mWebShell) { printf("handleEvent(Back())\n"); @@ -513,7 +513,7 @@ wsForwardEvent::wsForwardEvent(nsISessionHistory *yourSessionHistory, void * wsForwardEvent::handleEvent () { - void *result = NULL; + void *result = nsnull; if (mHistory && mWebShell) { printf("handleEvent(Forward())\n"); @@ -544,7 +544,7 @@ wsGoToEvent::wsGoToEvent(nsISessionHistory *yourSessionHistory, void * wsGoToEvent::handleEvent () { - void *result = NULL; + void *result = nsnull; if (mHistory && mWebShell) { printf("handleEvent(GoTo(%ld))\n", mHistoryIndex); @@ -573,7 +573,7 @@ wsGetHistoryLengthEvent::wsGetHistoryLengthEvent(nsISessionHistory* yourSessionH void * wsGetHistoryLengthEvent::handleEvent () { - void *result = NULL; + void *result = nsnull; if (mHistory) { printf("handleEvent(wsGetHistoryLengthEvent())\n"); @@ -604,7 +604,7 @@ wsGetHistoryIndexEvent::wsGetHistoryIndexEvent(nsISessionHistory *yourSessionHis void * wsGetHistoryIndexEvent::handleEvent () { - void *result = NULL; + void *result = nsnull; if (mHistory) { printf("handleEvent(wsGetHistoryIndexEvent())\n"); @@ -635,12 +635,12 @@ wsGetURLEvent::wsGetURLEvent(nsISessionHistory* yourSessionHistory) : void * wsGetURLEvent::handleEvent () { - void *result = NULL; + void *result = nsnull; if (mHistory) { PRInt32 currentIndex; - char *currentURL = NULL; + char *currentURL = nsnull; nsresult rv; rv = mHistory->GetCurrentIndex(¤tIndex); @@ -680,10 +680,10 @@ wsGetURLForIndexEvent::wsGetURLForIndexEvent(nsISessionHistory *yourSessionHisto void * wsGetURLForIndexEvent::handleEvent () { - void *result = NULL; + void *result = nsnull; if (mHistory) { nsresult rv; - char *indexURL = NULL; + char *indexURL = nsnull; printf("handleEvent(GetURLForIndex(%ld))\n", mHistoryIndex); @@ -730,7 +730,7 @@ wsRefreshEvent::handleEvent () return (void *) rv; } - return NULL; + return nsnull; } // handleEvent() wsAddDocLoaderObserverEvent::wsAddDocLoaderObserverEvent(nsIDocShell* yourDocShell, @@ -743,7 +743,7 @@ wsAddDocLoaderObserverEvent::wsAddDocLoaderObserverEvent(nsIDocShell* yourDocShe void * wsAddDocLoaderObserverEvent::handleEvent () { - void *result = NULL; + void *result = nsnull; if (mDocShell && mDocObserver) { printf("handleEvent(AddDocLoaderObserver())\n"); diff --git a/mozilla/java/webclient/src_moz/nsActions.h b/mozilla/java/webclient/src_moz/nsActions.h index a03db296bc4..9c1e7b1956f 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 nsnull;}; + 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 ed6b80e1e5b..cfd28ad9181 100644 --- a/mozilla/java/webclient/src_moz/rdf_util.cpp +++ b/mozilla/java/webclient/src_moz/rdf_util.cpp @@ -26,16 +26,16 @@ static PRBool rdf_inited = PR_FALSE; -nsCOMPtr gRDFCU = NULL; -nsCOMPtr gRDF = NULL; -nsCOMPtr gBookmarks = NULL; -nsCOMPtr gBookmarksDataSource = NULL; +nsCOMPtr gRDFCU = nsnull; +nsCOMPtr gRDF = nsnull; +nsCOMPtr gBookmarks = nsnull; +nsCOMPtr gBookmarksDataSource = nsnull; -nsCOMPtr kNC_BookmarksRoot = NULL; -nsCOMPtr kNC_Name = NULL; -nsCOMPtr kNC_URL = NULL; -nsCOMPtr kNC_Folder = NULL; -nsCOMPtr kRDF_type = NULL; +nsCOMPtr kNC_BookmarksRoot = nsnull; +nsCOMPtr kNC_Name = nsnull; +nsCOMPtr kNC_URL = nsnull; +nsCOMPtr kNC_Folder = nsnull; +nsCOMPtr kRDF_type = nsnull; nsresult rdf_InitRDFUtils()