diff options
author | Sven Gothel <[email protected]> | 2023-01-29 19:56:45 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-01-29 19:56:45 +0100 |
commit | e96aeb6e9acd2b1435f5fad244a1488e74a3a6d6 (patch) | |
tree | 68a4466d97b006e63f12040ff2db0a24d263344c /src/nativewindow | |
parent | 516d3d57eb54f6fe95d842d29a2929e024ee8f34 (diff) |
GDIUtil: Add GetMonitor*() variants incl. PixelScale; NEWT MonitorDevice: Add 64-bit nativeHandle (Windows HMONITOR), add PixelScale for Windows
Diffstat (limited to 'src/nativewindow')
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java b/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java index c0f277f09..9201c9881 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java @@ -28,6 +28,7 @@ package jogamp.nativewindow.windows; import com.jogamp.nativewindow.util.Point; +import com.jogamp.nativewindow.util.Rectangle; import com.jogamp.nativewindow.NativeWindowException; import com.jogamp.nativewindow.NativeWindowFactory; @@ -233,6 +234,27 @@ public class GDIUtil implements ToolkitProperties { return IsChild0(win); } + public static long GetMonitorFromWindow(final long windowHandle) { + return GDI.GetMonitorFromWindow(windowHandle); + } + public static long GetMonitorFromPoint(final int x, final int y) { + return GDI.GetMonitorFromPoint(x, y); + } + public static long GetMonitorFromRect(final int x_left, final int y_top, final int width, final int height) { + return GDI.GetMonitorFromRect(x_left, y_top, x_left + width - 1 /* right */, y_top + height - 1 /* bottom */); + } + public static long GetMonitorFromRect(final Rectangle rect) { + return GetMonitorFromRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight()); + } + + public static boolean GetMonitorPixelScale(final long hmon, final float[] pixel_scale_xy) { + return GDI.ShcGetMonitorPixelScale1(hmon, pixel_scale_xy, 0); + } + /** + public static boolean GetMonitorPixelScale(final int x, final int y, final float[] pixel_scale_xy) { + return GDI.ShcGetMonitorPixelScale2(x, y, pixel_scale_xy, 0); + } */ + public static void SetProcessThreadsAffinityMask(final long affinityMask, final boolean verbose) { SetProcessThreadsAffinityMask0(affinityMask, verbose); } |