Skip to content

Commit

Permalink
Multi zoom level support of GC for win32
Browse files Browse the repository at this point in the history
This commit contributes to multi zoom level support of GC which can be extended by other resources and widgets.

Contributes to
#62 and #131
  • Loading branch information
amartya4256 committed May 27, 2024
1 parent 315783a commit a4a2c67
Show file tree
Hide file tree
Showing 19 changed files with 293 additions and 121 deletions.
14 changes: 13 additions & 1 deletion bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2023 IBM Corporation and others.
* Copyright (c) 2000, 2024 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -2022,6 +2022,18 @@ JNIEXPORT jlong JNICALL OS_NATIVE(GetActiveWindow)
}
#endif

#ifndef NO_GetAncestor
JNIEXPORT jlong JNICALL OS_NATIVE(GetAncestor)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
{
jlong rc = 0;
OS_NATIVE_ENTER(env, that, GetAncestor_FUNC);
rc = (jlong)GetAncestor((HWND)arg0, arg1);
OS_NATIVE_EXIT(env, that, GetAncestor_FUNC);
return rc;
}
#endif

#ifndef NO_GetBkColor
JNIEXPORT jint JNICALL OS_NATIVE(GetBkColor)
(JNIEnv *env, jclass that, jlong arg0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2023 IBM Corporation and others.
* Copyright (c) 2000, 2024 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -170,6 +170,7 @@ typedef enum {
GdiSetBatchLimit_FUNC,
GetACP_FUNC,
GetActiveWindow_FUNC,
GetAncestor_FUNC,
GetBkColor_FUNC,
GetCapture_FUNC,
GetCaretPos_FUNC,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ public class OS extends C {
public static final int FR_PRIVATE = 0x10;
public static final int FSHIFT = 0x4;
public static final int FVIRTKEY = 0x1;
public static final int GA_ROOT = 0x2;
public static final int GCP_REORDER = 0x0002;
public static final int GCP_GLYPHSHAPE = 0x0010;
public static final int GCP_CLASSIN = 0x00080000;
Expand Down Expand Up @@ -2709,6 +2710,8 @@ public static int HRESULT_FROM_WIN32(int x) {
public static final native int GdiSetBatchLimit (int dwLimit);
public static final native int GetACP ();
public static final native long GetActiveWindow ();
/** @param hWnd cast=(HWND) */
public static final native long GetAncestor (long hWnd, int gaFlags);
/** @param hDC cast=(HDC) */
public static final native int GetBkColor (long hDC);
public static final native long GetCapture ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,10 @@ public static boolean isAutoScaleOnRuntimeActive() {
return autoScaleOnRuntime;
}

static boolean setAutoScaleOnRuntimeActive(boolean value) {
return autoScaleOnRuntime = value;
}

/**
* AutoScale ImageDataProvider.
*/
Expand Down
Loading

0 comments on commit a4a2c67

Please sign in to comment.