Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2011-11-24 15:14:30 +0000
committerGrant Gayed2011-11-24 15:16:10 +0000
commit108b9dd38cc7c1124205fb1899f8aad5ad317989 (patch)
treec4cf81d4e56880768b2cd220304bddc2a1d65347
parentacd21e0605604e65519caa05a651b424c54e8bba (diff)
downloadeclipse.platform.swt-108b9dd38cc7c1124205fb1899f8aad5ad317989.tar.gz
eclipse.platform.swt-108b9dd38cc7c1124205fb1899f8aad5ad317989.tar.xz
eclipse.platform.swt-108b9dd38cc7c1124205fb1899f8aad5ad317989.zip
Bug 340729 - [Accessibility] Focus indicator is missing for SWT Mozilla
browser on windows platform
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp119
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java51
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java45
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMDocument.java111
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMElement.java107
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMNode.java167
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIFocusManager.java139
9 files changed, 776 insertions, 7 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 484f719ea0..22e2ae0a02 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
@@ -662,6 +662,35 @@ fail:
}
#endif
+#if (!defined(NO__1VtblCall__IIIIII_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJIIII_3I) && defined(JNI64))
+#ifndef JNI64
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIIIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jintArray arg6);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIIIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jintArray arg6)
+#else
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJIIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jintArray arg6);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJIIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jintArray arg6)
+#endif
+{
+ jint *lparg6=NULL;
+ jint rc = 0;
+#ifndef JNI64
+ XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIIIII_3I_FUNC);
+#else
+ XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJIIII_3I_FUNC);
+#endif
+ if (arg6) if ((lparg6 = env->GetIntArrayElements(arg6, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, lparg6);
+fail:
+ if (arg6 && lparg6) env->ReleaseIntArrayElements(arg6, lparg6, 0);
+#ifndef JNI64
+ XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIIIII_3I_FUNC);
+#else
+ XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJIIII_3I_FUNC);
+#endif
+ return rc;
+}
+#endif
+
#if (!defined(NO__1VtblCall__IIIIII_3I_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJIIII_3I_3I) && defined(JNI64))
#ifndef JNI64
extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIIIII_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jintArray arg6, jintArray arg7);
@@ -2216,6 +2245,35 @@ fail:
}
#endif
+#if (!defined(NO__1VtblCall__III_3J) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJI_3J) && defined(JNI64))
+#ifndef JNI64
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__III_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__III_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3)
+#else
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3)
+#endif
+{
+ jlong *lparg3=NULL;
+ jint rc = 0;
+#ifndef JNI64
+ XPCOM_NATIVE_ENTER(env, that, _1VtblCall__III_3J_FUNC);
+#else
+ XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJI_3J_FUNC);
+#endif
+ if (arg3) if ((lparg3 = env->GetLongArrayElements(arg3, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3);
+fail:
+ if (arg3 && lparg3) env->ReleaseLongArrayElements(arg3, lparg3, 0);
+#ifndef JNI64
+ XPCOM_NATIVE_EXIT(env, that, _1VtblCall__III_3J_FUNC);
+#else
+ XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJI_3J_FUNC);
+#endif
+ return rc;
+}
+#endif
+
#if (!defined(NO__1VtblCall__IIJ) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJ) && defined(JNI64))
#ifndef JNI64
extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2);
@@ -2501,6 +2559,38 @@ fail:
}
#endif
+#if (!defined(NO__1VtblCall__IIJI_3J_3J) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJI_3J_3J) && defined(JNI64))
+#ifndef JNI64
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJI_3J_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlongArray arg4, jlongArray arg5);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJI_3J_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlongArray arg4, jlongArray arg5)
+#else
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJI_3J_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlongArray arg4, jlongArray arg5);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJI_3J_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jlongArray arg4, jlongArray arg5)
+#endif
+{
+ jlong *lparg4=NULL;
+ jlong *lparg5=NULL;
+ jint rc = 0;
+#ifndef JNI64
+ XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIJI_3J_3J_FUNC);
+#else
+ XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJJI_3J_3J_FUNC);
+#endif
+ if (arg4) if ((lparg4 = env->GetLongArrayElements(arg4, NULL)) == NULL) goto fail;
+ if (arg5) if ((lparg5 = env->GetLongArrayElements(arg5, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint, jlong *, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, lparg5);
+fail:
+ if (arg5 && lparg5) env->ReleaseLongArrayElements(arg5, lparg5, 0);
+ if (arg4 && lparg4) env->ReleaseLongArrayElements(arg4, lparg4, 0);
+#ifndef JNI64
+ XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIJI_3J_3J_FUNC);
+#else
+ XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJJI_3J_3J_FUNC);
+#endif
+ return rc;
+}
+#endif
+
#if (!defined(NO__1VtblCall__IIJJ) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJJ) && defined(JNI64))
#ifndef JNI64
extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3);
@@ -2601,6 +2691,35 @@ JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJJIIII)(JNIEnv *env, jclass th
}
#endif
+#if (!defined(NO__1VtblCall__IIJJII_3J) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJJII_3J) && defined(JNI64))
+#ifndef JNI64
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJJII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jint arg4, jint arg5, jlongArray arg6);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJJII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jint arg4, jint arg5, jlongArray arg6)
+#else
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJJII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jint arg4, jint arg5, jlongArray arg6);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJJJII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jint arg4, jint arg5, jlongArray arg6)
+#endif
+{
+ jlong *lparg6=NULL;
+ jint rc = 0;
+#ifndef JNI64
+ XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIJJII_3J_FUNC);
+#else
+ XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJJJII_3J_FUNC);
+#endif
+ if (arg6) if ((lparg6 = env->GetLongArrayElements(arg6, NULL)) == NULL) goto fail;
+ rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong, jint, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4, arg5, lparg6);
+fail:
+ if (arg6 && lparg6) env->ReleaseLongArrayElements(arg6, lparg6, 0);
+#ifndef JNI64
+ XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIJJII_3J_FUNC);
+#else
+ XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJJJII_3J_FUNC);
+#endif
+ return rc;
+}
+#endif
+
#if (!defined(NO__1VtblCall__IIJJIJ_3C_3I_3I) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJJJIJ_3C_3I_3I) && defined(JNI64))
#ifndef JNI64
extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIJJIJ_3C_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jint arg4, jlong arg5, jcharArray arg6, jintArray arg7, jintArray arg8);
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 82abbf78b7..f8427214ea 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 = 227;
-int XPCOM_nativeFunctionCallCount[227];
+int XPCOM_nativeFunctionCount = 231;
+int XPCOM_nativeFunctionCallCount[231];
char * XPCOM_nativeFunctionNames[] = {
#ifndef JNI64
"_1Call__I",
@@ -129,6 +129,11 @@ char * XPCOM_nativeFunctionNames[] = {
"_1VtblCall__IJIIII_3C_3I_3I",
#endif
#ifndef JNI64
+ "_1VtblCall__IIIIII_3I",
+#else
+ "_1VtblCall__IJIIII_3I",
+#endif
+#ifndef JNI64
"_1VtblCall__IIIIII_3I_3I",
#else
"_1VtblCall__IJIIII_3I_3I",
@@ -369,6 +374,11 @@ char * XPCOM_nativeFunctionNames[] = {
"_1VtblCall__IJI_3I_3I_3J",
#endif
#ifndef JNI64
+ "_1VtblCall__III_3J",
+#else
+ "_1VtblCall__IJI_3J",
+#endif
+#ifndef JNI64
"_1VtblCall__IIJ",
#else
"_1VtblCall__IJJ",
@@ -419,6 +429,11 @@ char * XPCOM_nativeFunctionNames[] = {
"_1VtblCall__IJJI_3J",
#endif
#ifndef JNI64
+ "_1VtblCall__IIJI_3J_3J",
+#else
+ "_1VtblCall__IJJI_3J_3J",
+#endif
+#ifndef JNI64
"_1VtblCall__IIJJ",
#else
"_1VtblCall__IJJJ",
@@ -439,6 +454,11 @@ char * XPCOM_nativeFunctionNames[] = {
"_1VtblCall__IJJJIIII",
#endif
#ifndef JNI64
+ "_1VtblCall__IIJJII_3J",
+#else
+ "_1VtblCall__IJJJII_3J",
+#endif
+#ifndef JNI64
"_1VtblCall__IIJJIJ_3C_3I_3I",
#else
"_1VtblCall__IJJJIJ_3C_3I_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 f51bdc96ca..87e516ef5e 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
@@ -137,6 +137,11 @@ typedef enum {
_1VtblCall__IJIIII_3C_3I_3I_FUNC,
#endif
#ifndef JNI64
+ _1VtblCall__IIIIII_3I_FUNC,
+#else
+ _1VtblCall__IJIIII_3I_FUNC,
+#endif
+#ifndef JNI64
_1VtblCall__IIIIII_3I_3I_FUNC,
#else
_1VtblCall__IJIIII_3I_3I_FUNC,
@@ -377,6 +382,11 @@ typedef enum {
_1VtblCall__IJI_3I_3I_3J_FUNC,
#endif
#ifndef JNI64
+ _1VtblCall__III_3J_FUNC,
+#else
+ _1VtblCall__IJI_3J_FUNC,
+#endif
+#ifndef JNI64
_1VtblCall__IIJ_FUNC,
#else
_1VtblCall__IJJ_FUNC,
@@ -427,6 +437,11 @@ typedef enum {
_1VtblCall__IJJI_3J_FUNC,
#endif
#ifndef JNI64
+ _1VtblCall__IIJI_3J_3J_FUNC,
+#else
+ _1VtblCall__IJJI_3J_3J_FUNC,
+#endif
+#ifndef JNI64
_1VtblCall__IIJJ_FUNC,
#else
_1VtblCall__IJJJ_FUNC,
@@ -447,6 +462,11 @@ typedef enum {
_1VtblCall__IJJJIIII_FUNC,
#endif
#ifndef JNI64
+ _1VtblCall__IIJJII_3J_FUNC,
+#else
+ _1VtblCall__IJJJII_3J_FUNC,
+#endif
+#ifndef JNI64
_1VtblCall__IIJJIJ_3C_3I_3I_FUNC,
#else
_1VtblCall__IJJJIJ_3C_3I_3I_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
index 12721e336a..69e41c1c42 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
@@ -954,7 +954,56 @@ public void create (Composite parent, int style) {
break;
}
case SWT.Resize: onResize (); break;
- case SWT.FocusIn: Activate (); break;
+ case SWT.FocusIn: {
+ Activate ();
+
+ /* if tabbing onto a page for the first time then full-Browser focus ring should be shown */
+
+ int /*long*/[] result = new int /*long*/[1];
+ int rc = XPCOM.NS_GetServiceManager (result);
+ if (rc != XPCOM.NS_OK) error (rc);
+ if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+ nsIServiceManager serviceManager = new nsIServiceManager (result[0]);
+ result[0] = 0;
+ byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_FOCUSMANAGER_CONTRACTID, true);
+ rc = serviceManager.GetServiceByContractID (aContractID, nsIFocusManager.NS_IFOCUSMANAGER_IID, result);
+ serviceManager.Release ();
+
+ if (rc == XPCOM.NS_OK && result[0] != 0) {
+ nsIFocusManager focusManager = new nsIFocusManager (result[0]);
+ result[0] = 0;
+ rc = focusManager.GetFocusedElement (result);
+ if (rc == XPCOM.NS_OK) {
+ if (result[0] != 0) {
+ new nsISupports (result[0]).Release ();
+ result[0] = 0;
+ } else {
+ /* show full browser focus ring */
+ rc = webBrowser.GetContentDOMWindow (result);
+ if (rc == XPCOM.NS_OK && result[0] != 0) {
+ nsIDOMWindow domWindow = new nsIDOMWindow (result[0]);
+ result[0] = 0;
+ rc = domWindow.GetDocument (result);
+ domWindow.Release ();
+ if (rc == XPCOM.NS_OK && result[0] != 0) {
+ nsIDOMDocument domDocument = new nsIDOMDocument (result[0]);
+ result[0] = 0;
+ rc = domDocument.GetDocumentElement (result);
+ domDocument.Release ();
+ if (rc == XPCOM.NS_OK && result[0] != 0) {
+ nsIDOMElement domElement = new nsIDOMElement (result[0]);
+ result[0] = 0;
+ rc = focusManager.SetFocus (domElement.getAddress (), nsIFocusManager.FLAG_BYKEY);
+ domElement.Release ();
+ }
+ }
+ }
+ }
+ }
+ focusManager.Release ();
+ }
+ break;
+ }
case SWT.Activate: Activate (); break;
case SWT.Deactivate: {
Display display = event.display;
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 203fc0ce16..a59b118957 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
@@ -70,6 +70,7 @@ public class XPCOM extends C {
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_FOCUSMANAGER_CONTRACTID = "@mozilla.org/focus-manager;1"; //$NON-NLS-1$
public static final String NS_HELPERAPPLAUNCHERDIALOG_CONTRACTID = "@mozilla.org/helperapplauncherdialog;1"; //$NON-NLS-1$
public static final String NS_MEMORY_CONTRACTID = "@mozilla.org/xpcom/memory-service;1"; //$NON-NLS-1$
public static final String NS_MIMEINPUTSTREAM_CONTRACTID = "@mozilla.org/network/mime-input-stream;1"; //$NON-NLS-1$
@@ -707,8 +708,17 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg
lock.unlock();
}
}
-static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long [] arg1);
-static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long [] arg1) {
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, long[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, long[] arg1) {
+ lock.lock();
+ try {
+ return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+ } finally {
+ lock.unlock();
+ }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long[] arg1) {
lock.lock();
try {
return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
@@ -1133,8 +1143,8 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg
lock.unlock();
}
}
-static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long [] arg2);
-static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long [] arg2) {
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long[] arg2) {
lock.lock();
try {
return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
@@ -1656,6 +1666,15 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1,
lock.unlock();
}
}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long[] arg2, long[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long[] arg2, long[] arg3) {
+ lock.lock();
+ try {
+ return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+ } finally {
+ lock.unlock();
+ }
+}
static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int[] arg2, int[] arg3);
static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int[] arg2, int[] arg3) {
lock.lock();
@@ -1702,6 +1721,15 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1,
lock.unlock();
}
}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int[] arg4);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int[] arg4) {
+ lock.lock();
+ try {
+ return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4);
+ } finally {
+ lock.unlock();
+ }
+}
static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1, int[] arg2, int[] arg3, int[] arg4);
static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1, int[] arg2, int[] arg3, int[] arg4) {
lock.lock();
@@ -1793,6 +1821,15 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1
lock.unlock();
}
}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, int arg3, long[] arg4);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, int arg3, long[] arg4) {
+ lock.lock();
+ try {
+ return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4);
+ } finally {
+ lock.unlock();
+ }
+}
static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, byte[] arg2, byte[] arg3, int arg4, int[] arg5);
static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, byte[] arg2, byte[] arg3, int arg4, int[] arg5) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMDocument.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMDocument.java
new file mode 100644
index 0000000000..662613c0b7
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMDocument.java
@@ -0,0 +1,111 @@
+/* ***** 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) 2011 IBM Corp. All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+package org.eclipse.swt.internal.mozilla;
+
+public class nsIDOMDocument extends nsIDOMNode {
+
+ static final int LAST_METHOD_ID = nsIDOMNode.LAST_METHOD_ID + 17;
+
+ public static final String NS_IDOMDOCUMENT_IID_STR =
+ "a6cf9075-15b3-11d2-932e-00805f8add32";
+
+ public static final nsID NS_IDOMDOCUMENT_IID =
+ new nsID(NS_IDOMDOCUMENT_IID_STR);
+
+ public nsIDOMDocument(int /*long*/ address) {
+ super(address);
+ }
+
+ public int GetDoctype(int /*long*/[] aDoctype) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 1, getAddress(), aDoctype);
+ }
+
+ public int GetImplementation(int /*long*/[] aImplementation) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 2, getAddress(), aImplementation);
+ }
+
+ public int GetDocumentElement(int /*long*/[] aDocumentElement) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 3, getAddress(), aDocumentElement);
+ }
+
+ public int CreateElement(int /*long*/ tagName, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 4, getAddress(), tagName, _retval);
+ }
+
+ public int CreateDocumentFragment(int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 5, getAddress(), _retval);
+ }
+
+ public int CreateTextNode(int /*long*/ data, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 6, getAddress(), data, _retval);
+ }
+
+ public int CreateComment(int /*long*/ data, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 7, getAddress(), data, _retval);
+ }
+
+ public int CreateCDATASection(int /*long*/ data, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 8, getAddress(), data, _retval);
+ }
+
+ public int CreateProcessingInstruction(int /*long*/ target, int /*long*/ data, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 9, getAddress(), target, data, _retval);
+ }
+
+ public int CreateAttribute(int /*long*/ name, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 10, getAddress(), name, _retval);
+ }
+
+ public int CreateEntityReference(int /*long*/ name, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 11, getAddress(), name, _retval);
+ }
+
+ public int GetElementsByTagName(int /*long*/ tagname, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 12, getAddress(), tagname, _retval);
+ }
+
+ public int ImportNode(int /*long*/ importedNode, int deep, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 13, getAddress(), importedNode, deep, _retval);
+ }
+
+ public int CreateElementNS(int /*long*/ namespaceURI, int /*long*/ qualifiedName, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 14, getAddress(), namespaceURI, qualifiedName, _retval);
+ }
+
+ public int CreateAttributeNS(int /*long*/ namespaceURI, int /*long*/ qualifiedName, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 15, getAddress(), namespaceURI, qualifiedName, _retval);
+ }
+
+ public int GetElementsByTagNameNS(int /*long*/ namespaceURI, int /*long*/ localName, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 16, getAddress(), namespaceURI, localName, _retval);
+ }
+
+ public int GetElementById(int /*long*/ elementId, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 17, getAddress(), elementId, _retval);
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMElement.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMElement.java
new file mode 100644
index 0000000000..2116d320d4
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMElement.java
@@ -0,0 +1,107 @@
+/* ***** 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) 2011 IBM Corp. All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+package org.eclipse.swt.internal.mozilla;
+
+public class nsIDOMElement extends nsIDOMNode {
+
+ static final int LAST_METHOD_ID = nsIDOMNode.LAST_METHOD_ID + 16;
+
+ public static final String NS_IDOMELEMENT_IID_STR =
+ "a6cf9078-15b3-11d2-932e-00805f8add32";
+
+ public static final nsID NS_IDOMELEMENT_IID =
+ new nsID(NS_IDOMELEMENT_IID_STR);
+
+ public nsIDOMElement(int /*long*/ address) {
+ super(address);
+ }
+
+ public int GetTagName(int /*long*/ aTagName) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 1, getAddress(), aTagName);
+ }
+
+ public int GetAttribute(int /*long*/ name, int /*long*/ _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 2, getAddress(), name, _retval);
+ }
+
+ public int SetAttribute(int /*long*/ name, int /*long*/ value) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 3, getAddress(), name, value);
+ }
+
+ public int RemoveAttribute(int /*long*/ name) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 4, getAddress(), name);
+ }
+
+ public int GetAttributeNode(int /*long*/ name, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 5, getAddress(), name, _retval);
+ }
+
+ public int SetAttributeNode(int /*long*/ newAttr, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 6, getAddress(), newAttr, _retval);
+ }
+
+ public int RemoveAttributeNode(int /*long*/ oldAttr, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 7, getAddress(), oldAttr, _retval);
+ }
+
+ public int GetElementsByTagName(int /*long*/ name, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 8, getAddress(), name, _retval);
+ }
+
+ public int GetAttributeNS(int /*long*/ namespaceURI, int /*long*/ localName, int /*long*/ _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 9, getAddress(), namespaceURI, localName, _retval);
+ }
+
+ public int SetAttributeNS(int /*long*/ namespaceURI, int /*long*/ qualifiedName, int /*long*/ value) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 10, getAddress(), namespaceURI, qualifiedName, value);
+ }
+
+ public int RemoveAttributeNS(int /*long*/ namespaceURI, int /*long*/ localName) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 11, getAddress(), namespaceURI, localName);
+ }
+
+ public int GetAttributeNodeNS(int /*long*/ namespaceURI, int /*long*/ localName, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 12, getAddress(), namespaceURI, localName, _retval);
+ }
+
+ public int SetAttributeNodeNS(int /*long*/ newAttr, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 13, getAddress(), newAttr, _retval);
+ }
+
+ public int GetElementsByTagNameNS(int /*long*/ namespaceURI, int /*long*/ localName, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 14, getAddress(), namespaceURI, localName, _retval);
+ }
+
+ public int HasAttribute(int /*long*/ name, int[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 15, getAddress(), name, _retval);
+ }
+
+ public int HasAttributeNS(int /*long*/ namespaceURI, int /*long*/ localName, int[] _retval) {
+ return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 16, getAddress(), namespaceURI, localName, _retval);
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMNode.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMNode.java
new file mode 100644
index 0000000000..9ec806a3ad
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMNode.java
@@ -0,0 +1,167 @@
+/* ***** 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) 2011 IBM Corp. All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+package org.eclipse.swt.internal.mozilla;
+
+public class nsIDOMNode extends nsISupports {
+
+ static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 25;
+
+ public static final String NS_IDOMNODE_IID_STR =
+ "a6cf907c-15b3-11d2-932e-00805f8add32";
+
+ public static final nsID NS_IDOMNODE_IID =
+ new nsID(NS_IDOMNODE_IID_STR);
+
+ public nsIDOMNode(int /*long*/ address) {
+ super(address);
+ }
+
+ public static final int ELEMENT_NODE = 1;
+
+ public static final int ATTRIBUTE_NODE = 2;
+
+ public static final int TEXT_NODE = 3;
+
+ public static final int CDATA_SECTION_NODE = 4;
+
+ public static final int ENTITY_REFERENCE_NODE = 5;
+
+ public static final int ENTITY_NODE = 6;
+
+ public static final int PROCESSING_INSTRUCTION_NODE = 7;
+
+ public static final int COMMENT_NODE = 8;
+
+ public static final int DOCUMENT_NODE = 9;
+
+ public static final int DOCUMENT_TYPE_NODE = 10;
+
+ public static final int DOCUMENT_FRAGMENT_NODE = 11;
+
+ public static final int NOTATION_NODE = 12;
+
+ public int GetNodeName(int /*long*/ aNodeName) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aNodeName);
+ }
+
+ public int GetNodeValue(int /*long*/ aNodeValue) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aNodeValue);
+ }
+
+ public int SetNodeValue(int /*long*/ aNodeValue) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aNodeValue);
+ }
+
+ public int GetNodeType(short[] aNodeType) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aNodeType);
+ }
+
+ public int GetParentNode(int /*long*/[] aParentNode) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aParentNode);
+ }
+
+ public int GetChildNodes(int /*long*/[] aChildNodes) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aChildNodes);
+ }
+
+ public int GetFirstChild(int /*long*/[] aFirstChild) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aFirstChild);
+ }
+
+ public int GetLastChild(int /*long*/[] aLastChild) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aLastChild);
+ }
+
+ public int GetPreviousSibling(int /*long*/[] aPreviousSibling) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aPreviousSibling);
+ }
+
+ public int GetNextSibling(int /*long*/[] aNextSibling) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aNextSibling);
+ }
+
+ public int GetAttributes(int /*long*/[] aAttributes) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aAttributes);
+ }
+
+ public int GetOwnerDocument(int /*long*/[] aOwnerDocument) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aOwnerDocument);
+ }
+
+ public int InsertBefore(int /*long*/ newChild, int /*long*/ refChild, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), newChild, refChild, _retval);
+ }
+
+ public int ReplaceChild(int /*long*/ newChild, int /*long*/ oldChild, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), newChild, oldChild, _retval);
+ }
+
+ public int RemoveChild(int /*long*/ oldChild, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), oldChild, _retval);
+ }
+
+ public int AppendChild(int /*long*/ newChild, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), newChild, _retval);
+ }
+
+ public int HasChildNodes(int[] _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), _retval);
+ }
+
+ public int CloneNode(int deep, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), deep, _retval);
+ }
+
+ public int Normalize() {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress());
+ }
+
+ public int IsSupported(int /*long*/ feature, int /*long*/ version, int[] _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), feature, version, _retval);
+ }
+
+ public int GetNamespaceURI(int /*long*/ aNamespaceURI) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 21, getAddress(), aNamespaceURI);
+ }
+
+ public int GetPrefix(int /*long*/ aPrefix) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress(), aPrefix);
+ }
+
+ public int SetPrefix(int /*long*/ aPrefix) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), aPrefix);
+ }
+
+ public int GetLocalName(int /*long*/ aLocalName) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 24, getAddress(), aLocalName);
+ }
+
+ public int HasAttributes(int[] _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 25, getAddress(), _retval);
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIFocusManager.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIFocusManager.java
new file mode 100644
index 0000000000..cf15868a10
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIFocusManager.java
@@ -0,0 +1,139 @@
+/* ***** 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) 2011 IBM Corp. All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+package org.eclipse.swt.internal.mozilla;
+
+public class nsIFocusManager extends nsISupports {
+
+ static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 17;
+
+ public static final String NS_IFOCUSMANAGER_IID_STR =
+ "cd6040a8-243f-412a-8a16-0bf2aa1083b9";
+
+ public static final nsID NS_IFOCUSMANAGER_IID =
+ new nsID(NS_IFOCUSMANAGER_IID_STR);
+
+ public nsIFocusManager(int /*long*/ address) {
+ super(address);
+ }
+
+ public int GetActiveWindow(int /*long*/[] aActiveWindow) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aActiveWindow);
+ }
+
+ public int SetActiveWindow(int /*long*/ aActiveWindow) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aActiveWindow);
+ }
+
+ public int GetFocusedWindow(int /*long*/[] aFocusedWindow) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aFocusedWindow);
+ }
+
+ public int SetFocusedWindow(int /*long*/ aFocusedWindow) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aFocusedWindow);
+ }
+
+ public int GetFocusedElement(int /*long*/[] aFocusedElement) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aFocusedElement);
+ }
+
+ public int GetLastFocusMethod(int /*long*/ window, int[] _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), window, _retval);
+ }
+
+ public int SetFocus(int /*long*/ aElement, int aFlags) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aElement, aFlags);
+ }
+
+ public int MoveFocus(int /*long*/ aWindow, int /*long*/ aStartElement, int aType, int aFlags, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aWindow, aStartElement, aType, aFlags, _retval);
+ }
+
+ public int ClearFocus(int /*long*/ aWindow) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aWindow);
+ }
+
+ public int GetFocusedElementForWindow(int /*long*/ aWindow, int aDeep, int /*long*/[] aFocusedWindow, int /*long*/[] _retval) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aWindow, aDeep, aFocusedWindow, _retval);
+ }
+
+ public int MoveCaretToFocus(int /*long*/ aWindow) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aWindow);
+ }
+
+ public static final int FLAG_RAISE = 1;
+
+ public static final int FLAG_NOSCROLL = 2;
+
+ public static final int FLAG_NOSWITCHFRAME = 4;
+
+ public static final int FLAG_BYMOUSE = 4096;
+
+ public static final int FLAG_BYKEY = 8192;
+
+ public static final int FLAG_BYMOVEFOCUS = 16384;
+
+ public static final int MOVEFOCUS_FORWARD = 1;
+
+ public static final int MOVEFOCUS_BACKWARD = 2;
+
+ public static final int MOVEFOCUS_FORWARDDOC = 3;
+
+ public static final int MOVEFOCUS_BACKWARDDOC = 4;
+
+ public static final int MOVEFOCUS_FIRST = 5;
+
+ public static final int MOVEFOCUS_LAST = 6;
+
+ public static final int MOVEFOCUS_ROOT = 7;
+
+ public static final int MOVEFOCUS_CARET = 8;
+
+ public int WindowRaised(int /*long*/ aWindow) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aWindow);
+ }
+
+ public int WindowLowered(int /*long*/ aWindow) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aWindow);
+ }
+
+ public int ContentRemoved(int /*long*/ aDocument, int /*long*/ aElement) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aDocument, aElement);
+ }
+
+ public int WindowShown(int /*long*/ aWindow) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aWindow);
+ }
+
+ public int WindowHidden(int /*long*/ aWindow) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aWindow);
+ }
+
+ public int FireDelayedEvents(int /*long*/ aDocument) {
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aDocument);
+ }
+}

Back to the top