Skip to content

Commit 51f7439

Browse files
committed
Add SystemParametersInfoForDpi Win32 API
This commit adds Win32 API of SystemParametersInfoForDpi.
1 parent 6b5b54a commit 51f7439

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
* https://www.eclipse.org/legal/epl-2.0/
88
*
99
* SPDX-License-Identifier: EPL-2.0
10-
*
11-
* Contributors:
12-
* IBM Corporation - initial API and implementation
1310
*******************************************************************************/
1411

1512
/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
@@ -9253,18 +9250,34 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(SystemParametersInfo__II_3II)
92539250
}
92549251
#endif
92559252

9256-
#ifndef NO_SystemParametersInfoForDpi
9257-
JNIEXPORT jboolean JNICALL OS_NATIVE(SystemParametersInfoForDpi)
9253+
#ifndef NO_SystemParametersInfoForDpi__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICS_2II
9254+
JNIEXPORT jboolean JNICALL OS_NATIVE(SystemParametersInfoForDpi__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICS_2II)
92589255
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2, jint arg3, jint arg4)
92599256
{
92609257
NONCLIENTMETRICS _arg2, *lparg2=NULL;
92619258
jboolean rc = 0;
9262-
OS_NATIVE_ENTER(env, that, SystemParametersInfoForDpi_FUNC);
9259+
OS_NATIVE_ENTER(env, that, SystemParametersInfoForDpi__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICS_2II_FUNC);
92639260
if (arg2) if ((lparg2 = getNONCLIENTMETRICSFields(env, arg2, &_arg2)) == NULL) goto fail;
92649261
rc = (jboolean)SystemParametersInfoForDpi(arg0, arg1, lparg2, arg3, arg4);
92659262
fail:
92669263
if (arg2 && lparg2) setNONCLIENTMETRICSFields(env, arg2, lparg2);
9267-
OS_NATIVE_EXIT(env, that, SystemParametersInfoForDpi_FUNC);
9264+
OS_NATIVE_EXIT(env, that, SystemParametersInfoForDpi__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICS_2II_FUNC);
9265+
return rc;
9266+
}
9267+
#endif
9268+
9269+
#ifndef NO_SystemParametersInfoForDpi__II_3III
9270+
JNIEXPORT jboolean JNICALL OS_NATIVE(SystemParametersInfoForDpi__II_3III)
9271+
(JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2, jint arg3, jint arg4)
9272+
{
9273+
jint *lparg2=NULL;
9274+
jboolean rc = 0;
9275+
OS_NATIVE_ENTER(env, that, SystemParametersInfoForDpi__II_3III_FUNC);
9276+
if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
9277+
rc = (jboolean)SystemParametersInfoForDpi(arg0, arg1, lparg2, arg3, arg4);
9278+
fail:
9279+
if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
9280+
OS_NATIVE_EXIT(env, that, SystemParametersInfoForDpi__II_3III_FUNC);
92689281
return rc;
92699282
}
92709283
#endif

bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
* https://www.eclipse.org/legal/epl-2.0/
88
*
99
* SPDX-License-Identifier: EPL-2.0
10-
*
11-
* Contributors:
12-
* IBM Corporation - initial API and implementation
1310
*******************************************************************************/
1411

1512
/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
@@ -687,7 +684,8 @@ typedef enum {
687684
SystemParametersInfo__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICS_2I_FUNC,
688685
SystemParametersInfo__IILorg_eclipse_swt_internal_win32_RECT_2I_FUNC,
689686
SystemParametersInfo__II_3II_FUNC,
690-
SystemParametersInfoForDpi_FUNC,
687+
SystemParametersInfoForDpi__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICS_2II_FUNC,
688+
SystemParametersInfoForDpi__II_3III_FUNC,
691689
TBBUTTONINFO_1sizeof_FUNC,
692690
TBBUTTON_1sizeof_FUNC,
693691
TCHITTESTINFO_1sizeof_FUNC,

bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4465,6 +4465,7 @@ public static int HRESULT_FROM_WIN32(int x) {
44654465
public static final native boolean SystemParametersInfo (int uiAction, int uiParam, NONCLIENTMETRICS pvParam, int fWinIni);
44664466
public static final native boolean SystemParametersInfo (int uiAction, int uiParam, int [] pvParam, int fWinIni);
44674467
public static final native boolean SystemParametersInfoForDpi (int uiAction, int uiParam, NONCLIENTMETRICS pvParam, int fWinIni, int dpi);
4468+
public static final native boolean SystemParametersInfoForDpi (int uiAction, int uiParam, int [] pvParam, int fWinIni, int dpi);
44684469
/**
44694470
* @param lpKeyState cast=(PBYTE)
44704471
* @param pwszBuff cast=(LPWSTR)

0 commit comments

Comments
 (0)