summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2007-08-23 19:58:57 +0000
committerGrant Gayed <ggayed>2007-08-23 19:58:57 +0000
commit3feb25c9be6892625725914de5f111a8c4757fd5 (patch)
tree8d2e61f646a4e24eb1c5750b732a17bb77bb3af7
parentff38b31cb585dc0d892f54156e6e482739ff4a42 (diff)
downloadeclipse.platform.swt-3feb25c9be6892625725914de5f111a8c4757fd5.tar.gz
eclipse.platform.swt-3feb25c9be6892625725914de5f111a8c4757fd5.tar.xz
eclipse.platform.swt-3feb25c9be6892625725914de5f111a8c4757fd5.zip
107142
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMSerializer.java (renamed from bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java)30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMSerializer_1_7.java51
6 files changed, 103 insertions, 19 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp
index 17b82838a3..aea9c8376f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp
@@ -138,6 +138,19 @@ JNIEXPORT jint JNICALL XPCOM_NATIVE(VtblCall__III)
}
#endif
+#ifndef NO_VtblCall__IIII
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(VtblCall__IIII)(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(VtblCall__IIII)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
+{
+ jint rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, VtblCall__IIII_FUNC);
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jint, jint, jint))(*(jint **)arg1)[arg0])(arg1, arg2, arg3);
+ XPCOM_NATIVE_EXIT(env, that, VtblCall__IIII_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_VtblCall__IIIII
extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(VtblCall__IIIII)(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4);
JNIEXPORT jint JNICALL XPCOM_NATIVE(VtblCall__IIIII)
@@ -371,6 +384,23 @@ JNIEXPORT jint JNICALL XPCOM_NATIVE(VtblCall__IIIIZ)
}
#endif
+#ifndef NO_VtblCall__IIII_3B
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(VtblCall__IIII_3B)(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jbyteArray arg4);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(VtblCall__IIII_3B)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jbyteArray arg4)
+{
+ jbyte *lparg4=NULL;
+ jint rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, VtblCall__IIII_3B_FUNC);
+ if (arg4) if ((lparg4 = env->GetByteArrayElements(arg4, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jint, jint, jint, jbyte *))(*(jint **)arg1)[arg0])(arg1, arg2, arg3, lparg4);
+fail:
+ if (arg4 && lparg4) env->ReleaseByteArrayElements(arg4, lparg4, 0);
+ XPCOM_NATIVE_EXIT(env, that, VtblCall__IIII_3B_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_VtblCall__IIII_3C
extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(VtblCall__IIII_3C)(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jcharArray arg4);
JNIEXPORT jint JNICALL XPCOM_NATIVE(VtblCall__IIII_3C)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp
index f546ad1b7d..056abf7364 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp
@@ -14,8 +14,8 @@
#ifdef NATIVE_STATS
-int XPCOM_nativeFunctionCount = 127;
-int XPCOM_nativeFunctionCallCount[127];
+int XPCOM_nativeFunctionCount = 129;
+int XPCOM_nativeFunctionCallCount[129];
char * XPCOM_nativeFunctionNames[] = {
"Call",
"NS_1GetComponentManager",
@@ -25,6 +25,7 @@ char * XPCOM_nativeFunctionNames[] = {
"VtblCall__II",
"VtblCall__IIF",
"VtblCall__III",
+ "VtblCall__IIII",
"VtblCall__IIIII",
"VtblCall__IIIIII",
"VtblCall__IIIIIII",
@@ -40,6 +41,7 @@ char * XPCOM_nativeFunctionNames[] = {
"VtblCall__IIIIJJJJ",
"VtblCall__IIIIJZ",
"VtblCall__IIIIZ",
+ "VtblCall__IIII_3B",
"VtblCall__IIII_3C",
"VtblCall__IIII_3CIJI",
"VtblCall__IIII_3I",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h
index 247bd3d1d4..6f40347fc4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h
@@ -33,6 +33,7 @@ typedef enum {
VtblCall__II_FUNC,
VtblCall__IIF_FUNC,
VtblCall__III_FUNC,
+ VtblCall__IIII_FUNC,
VtblCall__IIIII_FUNC,
VtblCall__IIIIII_FUNC,
VtblCall__IIIIIII_FUNC,
@@ -48,6 +49,7 @@ typedef enum {
VtblCall__IIIIJJJJ_FUNC,
VtblCall__IIIIJZ_FUNC,
VtblCall__IIIIZ_FUNC,
+ VtblCall__IIII_3B_FUNC,
VtblCall__IIII_3C_FUNC,
VtblCall__IIII_3CIJI_FUNC,
VtblCall__IIII_3I_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java
index 011bf2470e..43bdaf5a95 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java
@@ -56,6 +56,7 @@ public class XPCOM extends C {
public static final String NS_CONTEXTSTACK_CONTRACTID = "@mozilla.org/js/xpc/ContextStack;1"; //$NON-NLS-1$
public static final String NS_COOKIEMANAGER_CONTRACTID = "@mozilla.org/cookiemanager;1"; //$NON-NLS-1$
public static final String NS_DIRECTORYSERVICE_CONTRACTID = "@mozilla.org/file/directory_service;1"; //$NON-NLS-1$
+ public static final String NS_DOMSERIALIZER_CONTRACTID = "@mozilla.org/xmlextras/xmlserializer;1"; //$NON-NLS-1$
public static final String NS_DOWNLOAD_CONTRACTID = "@mozilla.org/download;1"; //$NON-NLS-1$
public static final String NS_FILEPICKER_CONTRACTID = "@mozilla.org/filepicker;1"; //$NON-NLS-1$
public static final String NS_HELPERAPPLAUNCHERDIALOG_CONTRACTID = "@mozilla.org/helperapplauncherdialog;1"; //$NON-NLS-1$
@@ -247,4 +248,6 @@ static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int /*long*/
static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, boolean[] arg1, int /*long*/[] arg2);
static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int /*long*/ arg0, int arg1, int arg2, int /*long*/ arg3, boolean[] arg4, int /*long*/[] arg5);
static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int arg3, char[] arg4, byte[] arg5, int /*long*/ arg6, int /*long*/ arg7, int arg8, int /*long*/ arg9, boolean arg10, int /*long*/[] arg11, int /*long*/[] arg12);
+static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int /*long*/ arg0, int /*long*/ arg1);
+static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int /*long*/ arg0, int /*long*/ arg1, byte[] arg2);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMSerializer.java
index e1acfbe07d..a44ec1ff2b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMSerializer.java
@@ -22,34 +22,30 @@
*
* IBM
* - Binding to permit interfacing between Mozilla and SWT
- * - Copyright (C) 2005 IBM Corp. All Rights Reserved.
+ * - Copyright (C) 2003 IBM Corp. All Rights Reserved.
*
* ***** END LICENSE BLOCK ***** */
package org.eclipse.swt.internal.mozilla;
-public class nsIWebBrowserStream extends nsISupports {
+public class nsIDOMSerializer extends nsISupports {
- static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 3;
+ static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
- public static final String NS_IWEBBROWSERSTREAM_IID_STR =
- "86d02f0e-219b-4cfc-9c88-bd98d2cce0b8";
+ public static final String NS_IDOMSERIALIZER_IID_STR =
+ "a6cf9123-15b3-11d2-932e-00805f8add32";
- public static final nsID NS_IWEBBROWSERSTREAM_IID =
- new nsID(NS_IWEBBROWSERSTREAM_IID_STR);
+ public static final nsID NS_IDOMSERIALIZER_IID =
+ new nsID(NS_IDOMSERIALIZER_IID_STR);
- public nsIWebBrowserStream(int /*long*/ address) {
+ public nsIDOMSerializer(int /*long*/ address) {
super(address);
}
- public int OpenStream(int /*long*/ aBaseURI, int /*long*/ aContentType) {
- return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aBaseURI, aContentType);
+ public int SerializeToString(int /*long*/ root, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), root, _retval);
}
- public int AppendToStream(int /*long*/ aData, int aLen) {
- return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aData, aLen);
+ public int SerializeToStream(int /*long*/ root, int /*long*/ stream, byte[] charset) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), root, stream, charset);
}
-
- public int CloseStream() {
- return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
- }
-} \ No newline at end of file
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMSerializer_1_7.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMSerializer_1_7.java
new file mode 100644
index 0000000000..3a8ec8bb6c
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMSerializer_1_7.java
@@ -0,0 +1,51 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * 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 Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * - Binding to permit interfacing between Mozilla and SWT
+ * - Copyright (C) 2003 IBM Corp. All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+package org.eclipse.swt.internal.mozilla;
+
+public class nsIDOMSerializer_1_7 extends nsISupports {
+
+ static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
+
+ public static final String NS_IDOMSERIALIZER_IID_STR =
+ "9fd4ba15-e67c-4c98-b52c-7715f62c9196";
+
+ public static final nsID NS_IDOMSERIALIZER_IID =
+ new nsID(NS_IDOMSERIALIZER_IID_STR);
+
+ public nsIDOMSerializer_1_7(int /*long*/ address) {
+ super(address);
+ }
+
+ public int SerializeToString(int /*long*/ root, int /*long*/ _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), root, _retval);
+ }
+
+ public int SerializeToStream(int /*long*/ root, int /*long*/ stream, int /*long*/ charset) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), root, stream, charset);
+ }
+}