diff options
author | Christophe Cornu | 2003-03-31 16:30:54 +0000 |
---|---|---|
committer | Christophe Cornu | 2003-03-31 16:30:54 +0000 |
commit | dec5995c0e5ba2131ac510f0630d8fd0f3b862f8 (patch) | |
tree | 9c200aedc877e69107ed8f1e0c42ae63208b0c66 /bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32 | |
parent | 2e4c5ce27d7d125fa0c5bb334533d2d486ea9ee9 (diff) | |
download | eclipse.platform.swt-dec5995c0e5ba2131ac510f0630d8fd0f3b862f8.tar.gz eclipse.platform.swt-dec5995c0e5ba2131ac510f0630d8fd0f3b862f8.tar.xz eclipse.platform.swt-dec5995c0e5ba2131ac510f0630d8fd0f3b862f8.zip |
PR19824
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MONITORINFO.java | 27 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java | 9 |
2 files changed, 36 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MONITORINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MONITORINFO.java new file mode 100644 index 0000000000..9d3b308d0a --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MONITORINFO.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2000, 2003 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.swt.internal.win32; + +public class MONITORINFO { + public int cbSize; + //public RECT rcMonitor; + public int rcMonitor_left; + public int rcMonitor_top; + public int rcMonitor_right; + public int rcMonitor_bottom; + //public RECT rcWork; + public int rcWork_left; + public int rcWork_top; + public int rcWork_right; + public int rcWork_bottom; + public int dwFlags; + public static final int sizeof = 40; +} 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 150032ca0d..d54f448d62 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 @@ -635,6 +635,7 @@ public class OS { public static final int MM_TEXT = 0x1; public static final int MNC_CLOSE = 0x1; public static final int MNS_CHECKORBMP = 0x4000000; + public static final int MONITORINFOF_PRIMARY = 0x1; public static final int MWMO_INPUTAVAILABLE = 0x4; public static final int NM_CLICK = 0xfffffffe; public static final int NM_CUSTOMDRAW = OS.NM_FIRST - 12; @@ -1460,6 +1461,11 @@ public static final int GetModuleHandle (TCHAR lpModuleName) { return GetModuleHandleA (lpModuleName1); } +public static final boolean GetMonitorInfo (int hmonitor, MONITORINFO lpmi) { + if (IsUnicode) return GetMonitorInfoW (hmonitor, lpmi); + return GetMonitorInfoA (hmonitor, lpmi); +} + public static final int GetObject (int hgdiobj, int cbBuffer, BITMAP lpvObject) { if (IsUnicode) return GetObjectW (hgdiobj, cbBuffer, lpvObject); return GetObjectA (hgdiobj, cbBuffer, lpvObject); @@ -2025,6 +2031,7 @@ public static final native boolean EndDeferWindowPos (int hWinPosInfo); public static final native int EndDoc (int hdc); public static final native int EndPage (int hdc); public static final native int EndPaint (int hWnd, PAINTSTRUCT lpPaint); +public static final native boolean EnumDisplayMonitors (int hdc, RECT lprcClip, int lpfnEnum, int dwData); public static final native int EnumFontFamiliesW (int hdc, char [] lpszFamily, int lpEnumFontFamProc, int lParam); public static final native int EnumFontFamiliesA (int hdc, byte [] lpszFamily, int lpEnumFontFamProc, int lParam); public static final native boolean EqualRect (RECT lprc1, RECT lprc2); @@ -2100,6 +2107,8 @@ public static final native int GetTextCharset(int hdc); public static final native int GetTickCount (); public static final native int GetModuleHandleW (char [] lpModuleName); public static final native int GetModuleHandleA (byte [] lpModuleName); +public static final native boolean GetMonitorInfoW (int hmonitor, MONITORINFO lpmi); +public static final native boolean GetMonitorInfoA (int hmonitor, MONITORINFO lpmi); public static final native int GetNearestPaletteIndex(int hPal, int crColor); public static final native int GetObjectA (int hgdiobj, int cbBuffer, BITMAP lpvObject); public static final native int GetObjectW (int hgdiobj, int cbBuffer, BITMAP lpvObject); |