Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2009-10-02 20:58:07 +0000
committerGrant Gayed2009-10-02 20:58:07 +0000
commit056762a1d7c74e75bfac132d1e756819b6f3b39e (patch)
treee645e7459407ba289c710b04410e048d0425c17a /bundles/org.eclipse.swt/Eclipse SWT PI/win32
parent2c8a13d0df1694740c0af6220e23682b3ddd10de (diff)
downloadeclipse.platform.swt-056762a1d7c74e75bfac132d1e756819b6f3b39e.tar.gz
eclipse.platform.swt-056762a1d7c74e75bfac132d1e756819b6f3b39e.tar.xz
eclipse.platform.swt-056762a1d7c74e75bfac132d1e756819b6f3b39e.zip
60387 and 283223: Browser.setUrl() with header values and post args
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/win32')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c86
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAY.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAYBOUND.java17
8 files changed, 224 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
index 9a6972e9da..94b60f2934 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
@@ -8881,6 +8881,30 @@ fail:
}
#endif
+#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+#endif
+{
+ SAFEARRAY _arg1, *lparg1=NULL;
+#ifndef JNI64
+ OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC);
+#else
+ OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC);
+#endif
+ if (arg1) if ((lparg1 = getSAFEARRAYFields(env, arg1, &_arg1)) == NULL) goto fail;
+ MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
+fail:
+#ifndef JNI64
+ OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC);
+#else
+ OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC);
+#endif
+}
+#endif
+
#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I) && defined(JNI64))
#ifndef JNI64
JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
@@ -12442,6 +12466,30 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(RoundRect)
}
#endif
+#ifndef NO_SAFEARRAYBOUND_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(SAFEARRAYBOUND_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, SAFEARRAYBOUND_1sizeof_FUNC);
+ rc = (jint)SAFEARRAYBOUND_sizeof();
+ OS_NATIVE_EXIT(env, that, SAFEARRAYBOUND_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_SAFEARRAY_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(SAFEARRAY_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, SAFEARRAY_1sizeof_FUNC);
+ rc = (jint)SAFEARRAY_sizeof();
+ OS_NATIVE_EXIT(env, that, SAFEARRAY_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_SCRIPT_1ANALYSIS_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(SCRIPT_1ANALYSIS_1sizeof)
(JNIEnv *env, jclass that)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c
index 8c1c3b6295..cb0f7dc931 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c
@@ -14,8 +14,8 @@
#ifdef NATIVE_STATS
-int OS_nativeFunctionCount = 974;
-int OS_nativeFunctionCallCount[974];
+int OS_nativeFunctionCount = 977;
+int OS_nativeFunctionCallCount[977];
char * OS_nativeFunctionNames[] = {
"ACCEL_1sizeof",
"ACTCTX_1sizeof",
@@ -758,6 +758,11 @@ char * OS_nativeFunctionNames[] = {
"MoveMemory__JLorg_eclipse_swt_internal_win32_RECT_2I",
#endif
#ifndef JNI64
+ "MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I",
+#else
+ "MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I",
+#endif
+#ifndef JNI64
"MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I",
#else
"MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I",
@@ -1219,6 +1224,8 @@ char * OS_nativeFunctionNames[] = {
"ReplyMessage",
"RestoreDC",
"RoundRect",
+ "SAFEARRAYBOUND_1sizeof",
+ "SAFEARRAY_1sizeof",
"SCRIPT_1ANALYSIS_1sizeof",
"SCRIPT_1CONTROL_1sizeof",
"SCRIPT_1DIGITSUBSTITUTE_1sizeof",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h
index 2a6ffcba3d..dfe9ed907d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h
@@ -766,6 +766,11 @@ typedef enum {
MoveMemory__JLorg_eclipse_swt_internal_win32_RECT_2I_FUNC,
#endif
#ifndef JNI64
+ MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC,
+#else
+ MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC,
+#endif
+#ifndef JNI64
MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC,
#else
MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC,
@@ -1227,6 +1232,8 @@ typedef enum {
ReplyMessage_FUNC,
RestoreDC_FUNC,
RoundRect_FUNC,
+ SAFEARRAYBOUND_1sizeof_FUNC,
+ SAFEARRAY_1sizeof_FUNC,
SCRIPT_1ANALYSIS_1sizeof_FUNC,
SCRIPT_1CONTROL_1sizeof_FUNC,
SCRIPT_1DIGITSUBSTITUTE_1sizeof_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c
index 426ada6623..eb4851fb66 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c
@@ -6409,6 +6409,92 @@ void setRECTFields(JNIEnv *env, jobject lpObject, RECT *lpStruct)
}
#endif
+#ifndef NO_SAFEARRAY
+typedef struct SAFEARRAY_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID cDims, fFeatures, cbElements, cLocks, pvData, rgsabound;
+} SAFEARRAY_FID_CACHE;
+
+SAFEARRAY_FID_CACHE SAFEARRAYFc;
+
+void cacheSAFEARRAYFields(JNIEnv *env, jobject lpObject)
+{
+ if (SAFEARRAYFc.cached) return;
+ SAFEARRAYFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ SAFEARRAYFc.cDims = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "cDims", "S");
+ SAFEARRAYFc.fFeatures = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "fFeatures", "S");
+ SAFEARRAYFc.cbElements = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "cbElements", "I");
+ SAFEARRAYFc.cLocks = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "cLocks", "I");
+ SAFEARRAYFc.pvData = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "pvData", I_J);
+ SAFEARRAYFc.rgsabound = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "rgsabound", "Lorg/eclipse/swt/internal/win32/SAFEARRAYBOUND;");
+ SAFEARRAYFc.cached = 1;
+}
+
+SAFEARRAY *getSAFEARRAYFields(JNIEnv *env, jobject lpObject, SAFEARRAY *lpStruct)
+{
+ if (!SAFEARRAYFc.cached) cacheSAFEARRAYFields(env, lpObject);
+ lpStruct->cDims = (*env)->GetShortField(env, lpObject, SAFEARRAYFc.cDims);
+ lpStruct->fFeatures = (*env)->GetShortField(env, lpObject, SAFEARRAYFc.fFeatures);
+ lpStruct->cbElements = (*env)->GetIntField(env, lpObject, SAFEARRAYFc.cbElements);
+ lpStruct->cLocks = (*env)->GetIntField(env, lpObject, SAFEARRAYFc.cLocks);
+ lpStruct->pvData = (PVOID)(*env)->GetIntLongField(env, lpObject, SAFEARRAYFc.pvData);
+ {
+ jobject lpObject1 = (*env)->GetObjectField(env, lpObject, SAFEARRAYFc.rgsabound);
+ if (lpObject1 != NULL) getSAFEARRAYBOUNDFields(env, lpObject1, &lpStruct->rgsabound[0]);
+ }
+ return lpStruct;
+}
+
+void setSAFEARRAYFields(JNIEnv *env, jobject lpObject, SAFEARRAY *lpStruct)
+{
+ if (!SAFEARRAYFc.cached) cacheSAFEARRAYFields(env, lpObject);
+ (*env)->SetShortField(env, lpObject, SAFEARRAYFc.cDims, (jshort)lpStruct->cDims);
+ (*env)->SetShortField(env, lpObject, SAFEARRAYFc.fFeatures, (jshort)lpStruct->fFeatures);
+ (*env)->SetIntField(env, lpObject, SAFEARRAYFc.cbElements, (jint)lpStruct->cbElements);
+ (*env)->SetIntField(env, lpObject, SAFEARRAYFc.cLocks, (jint)lpStruct->cLocks);
+ (*env)->SetIntLongField(env, lpObject, SAFEARRAYFc.pvData, (jintLong)lpStruct->pvData);
+ {
+ jobject lpObject1 = (*env)->GetObjectField(env, lpObject, SAFEARRAYFc.rgsabound);
+ if (lpObject1 != NULL) setSAFEARRAYBOUNDFields(env, lpObject1, &lpStruct->rgsabound[0]);
+ }
+}
+#endif
+
+#ifndef NO_SAFEARRAYBOUND
+typedef struct SAFEARRAYBOUND_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID cElements, lLbound;
+} SAFEARRAYBOUND_FID_CACHE;
+
+SAFEARRAYBOUND_FID_CACHE SAFEARRAYBOUNDFc;
+
+void cacheSAFEARRAYBOUNDFields(JNIEnv *env, jobject lpObject)
+{
+ if (SAFEARRAYBOUNDFc.cached) return;
+ SAFEARRAYBOUNDFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ SAFEARRAYBOUNDFc.cElements = (*env)->GetFieldID(env, SAFEARRAYBOUNDFc.clazz, "cElements", "I");
+ SAFEARRAYBOUNDFc.lLbound = (*env)->GetFieldID(env, SAFEARRAYBOUNDFc.clazz, "lLbound", "I");
+ SAFEARRAYBOUNDFc.cached = 1;
+}
+
+SAFEARRAYBOUND *getSAFEARRAYBOUNDFields(JNIEnv *env, jobject lpObject, SAFEARRAYBOUND *lpStruct)
+{
+ if (!SAFEARRAYBOUNDFc.cached) cacheSAFEARRAYBOUNDFields(env, lpObject);
+ lpStruct->cElements = (*env)->GetIntField(env, lpObject, SAFEARRAYBOUNDFc.cElements);
+ lpStruct->lLbound = (*env)->GetIntField(env, lpObject, SAFEARRAYBOUNDFc.lLbound);
+ return lpStruct;
+}
+
+void setSAFEARRAYBOUNDFields(JNIEnv *env, jobject lpObject, SAFEARRAYBOUND *lpStruct)
+{
+ if (!SAFEARRAYBOUNDFc.cached) cacheSAFEARRAYBOUNDFields(env, lpObject);
+ (*env)->SetIntField(env, lpObject, SAFEARRAYBOUNDFc.cElements, (jint)lpStruct->cElements);
+ (*env)->SetIntField(env, lpObject, SAFEARRAYBOUNDFc.lLbound, (jint)lpStruct->lLbound);
+}
+#endif
+
#ifndef NO_SCRIPT_ANALYSIS
typedef struct SCRIPT_ANALYSIS_FID_CACHE {
int cached;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h
index ad112156b7..8099eda64c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h
@@ -1307,6 +1307,30 @@ void setRECTFields(JNIEnv *env, jobject lpObject, RECT *lpStruct);
#define RECT_sizeof() 0
#endif
+#ifndef NO_SAFEARRAY
+void cacheSAFEARRAYFields(JNIEnv *env, jobject lpObject);
+SAFEARRAY *getSAFEARRAYFields(JNIEnv *env, jobject lpObject, SAFEARRAY *lpStruct);
+void setSAFEARRAYFields(JNIEnv *env, jobject lpObject, SAFEARRAY *lpStruct);
+#define SAFEARRAY_sizeof() sizeof(SAFEARRAY)
+#else
+#define cacheSAFEARRAYFields(a,b)
+#define getSAFEARRAYFields(a,b,c) NULL
+#define setSAFEARRAYFields(a,b,c)
+#define SAFEARRAY_sizeof() 0
+#endif
+
+#ifndef NO_SAFEARRAYBOUND
+void cacheSAFEARRAYBOUNDFields(JNIEnv *env, jobject lpObject);
+SAFEARRAYBOUND *getSAFEARRAYBOUNDFields(JNIEnv *env, jobject lpObject, SAFEARRAYBOUND *lpStruct);
+void setSAFEARRAYBOUNDFields(JNIEnv *env, jobject lpObject, SAFEARRAYBOUND *lpStruct);
+#define SAFEARRAYBOUND_sizeof() sizeof(SAFEARRAYBOUND)
+#else
+#define cacheSAFEARRAYBOUNDFields(a,b)
+#define getSAFEARRAYBOUNDFields(a,b,c) NULL
+#define setSAFEARRAYBOUNDFields(a,b,c)
+#define SAFEARRAYBOUND_sizeof() 0
+#endif
+
#ifndef NO_SCRIPT_ANALYSIS
void cacheSCRIPT_ANALYSISFields(JNIEnv *env, jobject lpObject);
SCRIPT_ANALYSIS *getSCRIPT_ANALYSISFields(JNIEnv *env, jobject lpObject, SCRIPT_ANALYSIS *lpStruct);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
index a8b11dc61d..e628ee5311 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
@@ -663,6 +663,8 @@ public class OS extends C {
public static final int EVENT_OBJECT_SELECTIONWITHIN = 0x8009;
// public static final int EVENT_OBJECT_STATECHANGE = 0x800A;
public static final int EVENT_OBJECT_VALUECHANGE = 0x800E;
+ public static final short FADF_FIXEDSIZE = 0x10;
+ public static final short FADF_HAVEVARTYPE = 0x80;
public static final int FALT = 0x10;
public static final int FCONTROL = 0x8;
public static final int FE_FONTSMOOTHINGCLEARTYPE = 0x0002;
@@ -2262,6 +2264,8 @@ public static final native int PRINTDLG_sizeof ();
public static final native int PROCESS_INFORMATION_sizeof ();
public static final native int REBARBANDINFO_sizeof ();
public static final native int RECT_sizeof ();
+public static final native int SAFEARRAY_sizeof ();
+public static final native int SAFEARRAYBOUND_sizeof ();
public static final native int SCRIPT_ANALYSIS_sizeof ();
public static final native int SCRIPT_CONTROL_sizeof ();
public static final native int SCRIPT_DIGITSUBSTITUTE_sizeof ();
@@ -5051,6 +5055,11 @@ public static final native void MoveMemory (int /*long*/ Destination, RECT Sourc
* @param Destination cast=(PVOID)
* @param Source cast=(CONST VOID *),flags=no_out
*/
+public static final native void MoveMemory (int /*long*/ Destination, SAFEARRAY Source, int Length);
+/**
+ * @param Destination cast=(PVOID)
+ * @param Source cast=(CONST VOID *),flags=no_out
+ */
public static final native void MoveMemory (int /*long*/ Destination, TRIVERTEX Source, int Length);
/**
* @param Destination cast=(PVOID)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAY.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAY.java
new file mode 100644
index 0000000000..020c1a6dd2
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAY.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+public class SAFEARRAY {
+ public short cDims;
+ public short fFeatures;
+ public int cbElements;
+ public int cLocks;
+ /** @field cast=(PVOID) */
+ public int /*long*/ pvData;
+ /** @field accessor=rgsabound[0] */
+ public SAFEARRAYBOUND rgsabound;
+
+ public static final int sizeof = OS.SAFEARRAY_sizeof ();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAYBOUND.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAYBOUND.java
new file mode 100644
index 0000000000..5c236bc2e5
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAYBOUND.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+public class SAFEARRAYBOUND {
+ public int cElements;
+ public int lLbound;
+ public static final int sizeof = OS.SAFEARRAYBOUND_sizeof ();
+}

Back to the top