summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2007-05-14 19:55:09 +0000
committerGrant Gayed <ggayed>2007-05-14 19:55:09 +0000
commit976df8e2641a9161815a2fd50d8ff407385fa908 (patch)
treed1a1a9b3516116e0a05fc716e9e6c01d8e24e16c
parent04268c35e0e407f0368a6d8854929d93953e231c (diff)
downloadeclipse.platform.swt-976df8e2641a9161815a2fd50d8ff407385fa908.tar.gz
eclipse.platform.swt-976df8e2641a9161815a2fd50d8ff407385fa908.tar.xz
eclipse.platform.swt-976df8e2641a9161815a2fd50d8ff407385fa908.zip
66101
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java3
8 files changed, 52 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties
index 7ff08a2d4e..80e24a1728 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties
@@ -924,6 +924,11 @@ OS_CoCreateInstance_2=
OS_CoCreateInstance_3=cast=REFIID
OS_CoCreateInstance_4=cast=LPVOID *
+OS_CoInternetSetFeatureEnabled=flags=dynamic
+OS_CoInternetSetFeatureEnabled_0=
+OS_CoInternetSetFeatureEnabled_1=
+OS_CoInternetSetFeatureEnabled_2=cast=(BOOL)
+
OS_CombineRgn=
OS_CombineRgn_0=cast=(HRGN)
OS_CombineRgn_1=cast=(HRGN)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
index 08efdf71f8..c37d26b350 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
@@ -29,10 +29,11 @@ class IE extends WebBrowser {
Point size;
boolean addressBar = true, menuBar = true, statusBar = true, toolBar = true;
int info;
-
int globalDispatch;
String html;
+ static boolean Initialized;
+
static final int BeforeNavigate2 = 0xfa;
static final int CommandStateChange = 0x69;
static final int DocumentComplete = 0x103;
@@ -244,7 +245,7 @@ public void create(Composite parent, int style) {
* Note. Internet Explorer appears to treat the data loaded with
* nsIPersistStreamInit.Load as if it were encoded using the default
* local charset. There does not seem to be an API to set the
- * desired charset explicitely in this case. The fix is to
+ * desired charset explicitly in this case. The fix is to
* prepend the UTF-8 Byte Order Mark signature to the data.
*/
byte[] UTF8BOM = {(byte)0xEF, (byte)0xBB, (byte)0xBF};
@@ -580,6 +581,13 @@ public void create(Composite parent, int style) {
int[] rgdispid = auto.getIDsOfNames(new String[] {"RegisterAsDropTarget"}); //$NON-NLS-1$
if (rgdispid != null) auto.setProperty(rgdispid[0], variant);
variant.dispose();
+
+ if (!Initialized) {
+ if (!OS.IsWinCE) {
+ OS.CoInternetSetFeatureEnabled(OS.FEATURE_DISABLE_NAVIGATION_SOUNDS, OS.SET_FEATURE_ON_PROCESS, true);
+ }
+ Initialized = true;
+ }
}
public boolean back() {
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 683c0a425f..f11d25e155 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
@@ -929,6 +929,34 @@ fail:
}
#endif
+#ifndef NO_CoInternetSetFeatureEnabled
+JNIEXPORT jint JNICALL OS_NATIVE(CoInternetSetFeatureEnabled)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jboolean arg2)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, CoInternetSetFeatureEnabled_FUNC);
+/*
+ rc = (jint)CoInternetSetFeatureEnabled(arg0, arg1, (BOOL)arg2);
+*/
+ {
+ static int initialized = 0;
+ static HMODULE hm = NULL;
+ static FARPROC fp = NULL;
+ rc = 0;
+ if (!initialized) {
+ if (!hm) hm = LoadLibrary(CoInternetSetFeatureEnabled_LIB);
+ if (hm) fp = GetProcAddress(hm, "CoInternetSetFeatureEnabled");
+ initialized = 1;
+ }
+ if (fp) {
+ rc = (jint)fp(arg0, arg1, (BOOL)arg2);
+ }
+ }
+ OS_NATIVE_EXIT(env, that, CoInternetSetFeatureEnabled_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_CombineRgn
JNIEXPORT jint JNICALL OS_NATIVE(CombineRgn)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h
index e57fa8bc4b..8aba53d5f3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h
@@ -155,6 +155,7 @@
#define NO_ChooseFontW
#define NO_CloseThemeData
#define NO_CoCreateInstance
+#define NO_CoInternetSetFeatureEnabled
#define NO_CopyImage
#define NO_CreateAcceleratorTableA
#define NO_CreateActCtxA
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h
index 885d0ad0fe..cb3584e383 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h
@@ -22,6 +22,7 @@
#define BufferedPaintSetAlpha_LIB "uxtheme.dll"
#define BeginBufferedPaint_LIB "uxtheme.dll"
#define CloseThemeData_LIB "uxtheme.dll"
+#define CoInternetSetFeatureEnabled_LIB "urlmon.dll"
#define CreateActCtxW_LIB "kernel32.dll"
#define CreateActCtxA_LIB "kernel32.dll"
#define DrawThemeBackground_LIB "uxtheme.dll"
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 cc6006f25f..b069b668a1 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 = 871;
-int OS_nativeFunctionCallCount[871];
+int OS_nativeFunctionCount = 872;
+int OS_nativeFunctionCallCount[872];
char * OS_nativeFunctionNames[] = {
"ACCEL_1sizeof",
"ACTCTX_1sizeof",
@@ -69,6 +69,7 @@ char * OS_nativeFunctionNames[] = {
"CloseHandle",
"CloseThemeData",
"CoCreateInstance",
+ "CoInternetSetFeatureEnabled",
"CombineRgn",
"CommDlgExtendedError",
"CommandBar_1AddAdornments",
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 c03d5b9bed..6b68ad2192 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
@@ -77,6 +77,7 @@ typedef enum {
CloseHandle_FUNC,
CloseThemeData_FUNC,
CoCreateInstance_FUNC,
+ CoInternetSetFeatureEnabled_FUNC,
CombineRgn_FUNC,
CommDlgExtendedError_FUNC,
CommandBar_1AddAdornments_FUNC,
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 23549eccde..4b9c63a691 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
@@ -629,6 +629,7 @@ public class OS extends C {
public static final int FALT = 0x10;
public static final int FCONTROL = 0x8;
public static final int FE_FONTSMOOTHINGCLEARTYPE = 0x0002;
+ public static final int FEATURE_DISABLE_NAVIGATION_SOUNDS = 21;
public static final int FILE_ATTRIBUTE_NORMAL = 0x00000080;
public static final int FNERR_INVALIDFILENAME = 0x3002;
public static final int FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100;
@@ -1362,6 +1363,7 @@ public class OS extends C {
public static final int SCRBS_PRESSED = 3;
public static final int SCRBS_DISABLED = 4;
public static final int SEM_FAILCRITICALERRORS = 0x1;
+ public static final int SET_FEATURE_ON_PROCESS = 0x2;
public static final int SF_RTF = 0x2;
public static final int SHCMBF_HIDDEN = 0x2;
public static final int SHCMBM_OVERRIDEKEY = 0x400 + 403;
@@ -3158,6 +3160,7 @@ public static final native boolean CloseClipboard ();
public static final native boolean CloseHandle (int /*long*/ hObject);
public static final native int CloseThemeData (int /*long*/ hTheme);
public static final native int CoCreateInstance (byte[] rclsid, int /*long*/ pUnkOuter, int dwClsContext, byte[] riid, int /*long*/[] ppv);
+public static final native int CoInternetSetFeatureEnabled (int FeatureEntry, int dwFlags, boolean fEnable);
public static final native int CombineRgn (int /*long*/ hrgnDest, int /*long*/ hrgnSrc1, int /*long*/ hrgnSrc2, int fnCombineMode);
public static final native boolean CommandBar_AddAdornments (int /*long*/ hwndCB, int dwFlags, int dwReserved);
public static final native int /*long*/ CommandBar_Create (int /*long*/ hInst, int /*long*/ hwndParent, int idCmdBar);