Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2011-10-11 14:40:36 +0000
committerFelipe Heidrich2011-10-11 14:40:36 +0000
commitbfde54eafc5754c2f1cba3be1018cbd4ab30e93c (patch)
tree36df2e73b33876640b0d1cf4e14a618ff08e1c9b
parentf5f7745e824a344a608d9436ceb57d1d8adc5424 (diff)
downloadeclipse.platform.swt-bfde54eafc5754c2f1cba3be1018cbd4ab30e93c.tar.gz
eclipse.platform.swt-bfde54eafc5754c2f1cba3be1018cbd4ab30e93c.tar.xz
eclipse.platform.swt-bfde54eafc5754c2f1cba3be1018cbd4ab30e93c.zip
Adding native for aero work
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c24
-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.java4
5 files changed, 32 insertions, 3 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 c31a1c7739..bee066174f 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
@@ -2756,6 +2756,30 @@ fail:
}
#endif
+#ifndef NO_DwmIsCompositionEnabled
+JNIEXPORT jint JNICALL OS_NATIVE(DwmIsCompositionEnabled)
+ (JNIEnv *env, jclass that, jbooleanArray arg0)
+{
+ jboolean *lparg0=NULL;
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, DwmIsCompositionEnabled_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetBooleanArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
+ rc = (jint)DwmIsCompositionEnabled(lparg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, DwmIsCompositionEnabled)
+ if (fp) {
+ rc = (jint)((jint (CALLING_CONVENTION*)(jboolean *))fp)(lparg0);
+ }
+ }
+fail:
+ if (arg0 && lparg0) (*env)->ReleaseBooleanArrayElements(env, arg0, lparg0, 0);
+ OS_NATIVE_EXIT(env, that, DwmIsCompositionEnabled_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_EMREXTCREATEFONTINDIRECTW_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(EMREXTCREATEFONTINDIRECTW_1sizeof)
(JNIEnv *env, jclass that)
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 a57a384fdc..4f6df827c4 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
@@ -40,6 +40,7 @@
#define DrawThemeText_LIB "uxtheme.dll"
#define DwmEnableBlurBehindWindow_LIB "dwmapi.dll"
#define DwmExtendFrameIntoClientArea_LIB "dwmapi.dll"
+#define DwmIsCompositionEnabled_LIB "dwmapi.dll"
#define GetGestureInfo_LIB "user32.dll"
#define GetThemeInt_LIB "uxtheme.dll"
#define GetThemeMargins_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 0accdd13d2..012dbc97b2 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 = 1064;
-int OS_nativeFunctionCallCount[1064];
+int OS_nativeFunctionCount = 1065;
+int OS_nativeFunctionCallCount[1065];
char * OS_nativeFunctionNames[] = {
"ACCEL_1sizeof",
"ACTCTX_1sizeof",
@@ -210,6 +210,7 @@ char * OS_nativeFunctionNames[] = {
"DuplicateHandle",
"DwmEnableBlurBehindWindow",
"DwmExtendFrameIntoClientArea",
+ "DwmIsCompositionEnabled",
"EMREXTCREATEFONTINDIRECTW_1sizeof",
"EMR_1sizeof",
"EXTLOGFONTW_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 158eee7e48..704a728436 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
@@ -218,6 +218,7 @@ typedef enum {
DuplicateHandle_FUNC,
DwmEnableBlurBehindWindow_FUNC,
DwmExtendFrameIntoClientArea_FUNC,
+ DwmIsCompositionEnabled_FUNC,
EMREXTCREATEFONTINDIRECTW_1sizeof_FUNC,
EMR_1sizeof_FUNC,
EXTLOGFONTW_1sizeof_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 20105dc294..91eaf9df39 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
@@ -4035,7 +4035,9 @@ public static final native int DwmEnableBlurBehindWindow (int /*long*/ hWnd, DWM
* @method flags=dynamic
* @param hWnd cast=(HWND)
*/
-public static final native int DwmExtendFrameIntoClientArea (int /*long*/ hWnd, MARGINS pMarInset);
+public static final native int DwmExtendFrameIntoClientArea (int /*long*/ hWnd, MARGINS pMarInset);
+/** @method flags=dynamic */
+public static final native int DwmIsCompositionEnabled (boolean[] pfEnabled);
/** @param hdc cast=(HDC) */
public static final native boolean Ellipse (int /*long*/ hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
/** @param hMenu cast=(HMENU) */

Back to the top