--- a/WinWorkstation.st Sat Dec 10 13:27:08 2011 +0100
+++ b/WinWorkstation.st Thu Dec 22 19:58:03 2011 +0100
@@ -5142,6 +5142,30 @@
return 1;
}
+struct EnumDisplayMonitorsProcData {
+ OBJ hArray;
+ int index;
+};
+
+static int CALLBACK
+EnumDisplayMonitorsProc( hMonitor, hdcMonitor, lprcMonitor, lpData )
+ HMONITOR hMonitor;
+ HDC hdcMonitor;
+ LPRECT lprcMonitor;
+ struct EnumDisplayMonitorsProcData *lpData;
+{
+ OBJ mHandle;
+
+ __PROTECT__(lpData->hArray);
+ mHandle = __MKEXTERNALADDRESS(hMonitor);
+ __UNPROTECT__(lpData->hArray);
+
+ __ArrayInstPtr(lpData->hArray)->a_element[lpData->index] = mHandle;
+ __STORE(lpData->hArray, mHandle);
+ lpData->index++;
+ return (1);
+}
+
%}
! !
@@ -6980,6 +7004,9 @@
info.cbSize = sizeof(MONITORINFOEX);
#if 0
+ /* the following is only needed when we want
+ * to support very old NT/W95/W98 systems; we don't !
+ */
static BOOL (__stdcall *P_GetMonitorInfo)(HMONITOR , MONITORINFOEX *);
if (P_GetMonitorInfo == 0) {
@@ -14992,6 +15019,9 @@
p.x = __intVal(pX);
p.y = __intVal(pY);
#if 0
+ /* the following is only needed when we want
+ * to support very old NT/W95/W98 systems; we don't !
+ */
static HMONITOR (__stdcall *P_MonitorFromPoint)(POINT, int);
if (P_MonitorFromPoint == 0) {
@@ -15030,6 +15060,9 @@
HWND hWnd = _HWNDVal(aWindowId);
HMONITOR hMonitor;
#if 0
+ /* the following is only needed when we want
+ * to support very old NT/W95/W98 systems; we don't !
+ */
static HMONITOR (__stdcall *P_MonitorFromWindow)(HWND, int);
if (P_MonitorFromWindow == 0) {
@@ -15057,6 +15090,22 @@
"
!
+monitorHandles
+ "retrieve a list of monitor handles"
+
+ |handleArray|
+
+ handleArray := Array new:(self numberOfMonitors).
+%{
+ struct EnumDisplayMonitorsProcData data;
+
+ data.hArray = handleArray;
+ data.index = 0;
+ EnumDisplayMonitors(NULL, NULL, EnumDisplayMonitorsProc, (long)(&data));
+%}.
+ ^ handleArray
+!
+
setInputFocusTo:aWindowId
self setInputFocusTo:aWindowId revertTo:nil
!
@@ -18989,11 +19038,11 @@
!WinWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.453 2011-03-03 21:35:05 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.454 2011-12-22 18:58:03 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.453 2011-03-03 21:35:05 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.454 2011-12-22 18:58:03 cg Exp $'
! !
WinWorkstation initialize!