equal
deleted
inserted
replaced
5138 } |
5138 } |
5139 list = *refToList; |
5139 list = *refToList; |
5140 __SSEND1(list, @symbol(add:), 0, infoArray); |
5140 __SSEND1(list, @symbol(add:), 0, infoArray); |
5141 } |
5141 } |
5142 return 1; |
5142 return 1; |
|
5143 } |
|
5144 |
|
5145 struct EnumDisplayMonitorsProcData { |
|
5146 OBJ hArray; |
|
5147 int index; |
|
5148 }; |
|
5149 |
|
5150 static int CALLBACK |
|
5151 EnumDisplayMonitorsProc( hMonitor, hdcMonitor, lprcMonitor, lpData ) |
|
5152 HMONITOR hMonitor; |
|
5153 HDC hdcMonitor; |
|
5154 LPRECT lprcMonitor; |
|
5155 struct EnumDisplayMonitorsProcData *lpData; |
|
5156 { |
|
5157 OBJ mHandle; |
|
5158 |
|
5159 __PROTECT__(lpData->hArray); |
|
5160 mHandle = __MKEXTERNALADDRESS(hMonitor); |
|
5161 __UNPROTECT__(lpData->hArray); |
|
5162 |
|
5163 __ArrayInstPtr(lpData->hArray)->a_element[lpData->index] = mHandle; |
|
5164 __STORE(lpData->hArray, mHandle); |
|
5165 lpData->index++; |
|
5166 return (1); |
5143 } |
5167 } |
5144 |
5168 |
5145 %} |
5169 %} |
5146 ! ! |
5170 ! ! |
5147 |
5171 |
6978 HMONITOR hMonitor = _HWNDVal(aMonitorId); |
7002 HMONITOR hMonitor = _HWNDVal(aMonitorId); |
6979 MONITORINFOEX info; |
7003 MONITORINFOEX info; |
6980 |
7004 |
6981 info.cbSize = sizeof(MONITORINFOEX); |
7005 info.cbSize = sizeof(MONITORINFOEX); |
6982 #if 0 |
7006 #if 0 |
|
7007 /* the following is only needed when we want |
|
7008 * to support very old NT/W95/W98 systems; we don't ! |
|
7009 */ |
6983 static BOOL (__stdcall *P_GetMonitorInfo)(HMONITOR , MONITORINFOEX *); |
7010 static BOOL (__stdcall *P_GetMonitorInfo)(HMONITOR , MONITORINFOEX *); |
6984 |
7011 |
6985 if (P_GetMonitorInfo == 0) { |
7012 if (P_GetMonitorInfo == 0) { |
6986 HINSTANCE hUser = LoadLibrary("user32.dll"); |
7013 HINSTANCE hUser = LoadLibrary("user32.dll"); |
6987 // console_printf("hUser: %x\n", hUser); |
7014 // console_printf("hUser: %x\n", hUser); |
14990 POINT p; |
15017 POINT p; |
14991 HMONITOR hMonitor; |
15018 HMONITOR hMonitor; |
14992 p.x = __intVal(pX); |
15019 p.x = __intVal(pX); |
14993 p.y = __intVal(pY); |
15020 p.y = __intVal(pY); |
14994 #if 0 |
15021 #if 0 |
|
15022 /* the following is only needed when we want |
|
15023 * to support very old NT/W95/W98 systems; we don't ! |
|
15024 */ |
14995 static HMONITOR (__stdcall *P_MonitorFromPoint)(POINT, int); |
15025 static HMONITOR (__stdcall *P_MonitorFromPoint)(POINT, int); |
14996 |
15026 |
14997 if (P_MonitorFromPoint == 0) { |
15027 if (P_MonitorFromPoint == 0) { |
14998 HINSTANCE hUser = LoadLibrary("user32.dll"); |
15028 HINSTANCE hUser = LoadLibrary("user32.dll"); |
14999 // console_printf("hUser: %x\n", hUser); |
15029 // console_printf("hUser: %x\n", hUser); |
15028 %{ |
15058 %{ |
15029 if (__isExternalAddress(aWindowId)) { |
15059 if (__isExternalAddress(aWindowId)) { |
15030 HWND hWnd = _HWNDVal(aWindowId); |
15060 HWND hWnd = _HWNDVal(aWindowId); |
15031 HMONITOR hMonitor; |
15061 HMONITOR hMonitor; |
15032 #if 0 |
15062 #if 0 |
|
15063 /* the following is only needed when we want |
|
15064 * to support very old NT/W95/W98 systems; we don't ! |
|
15065 */ |
15033 static HMONITOR (__stdcall *P_MonitorFromWindow)(HWND, int); |
15066 static HMONITOR (__stdcall *P_MonitorFromWindow)(HWND, int); |
15034 |
15067 |
15035 if (P_MonitorFromWindow == 0) { |
15068 if (P_MonitorFromWindow == 0) { |
15036 HINSTANCE hUser = LoadLibrary("user32.dll"); |
15069 HINSTANCE hUser = LoadLibrary("user32.dll"); |
15037 // console_printf("hUser: %x\n", hUser); |
15070 // console_printf("hUser: %x\n", hUser); |
15053 %} |
15086 %} |
15054 " |
15087 " |
15055 Screen current monitorHandleForView:(Transcript topView id) |
15088 Screen current monitorHandleForView:(Transcript topView id) |
15056 Screen current monitorHandleForPoint:(0@0) |
15089 Screen current monitorHandleForPoint:(0@0) |
15057 " |
15090 " |
|
15091 ! |
|
15092 |
|
15093 monitorHandles |
|
15094 "retrieve a list of monitor handles" |
|
15095 |
|
15096 |handleArray| |
|
15097 |
|
15098 handleArray := Array new:(self numberOfMonitors). |
|
15099 %{ |
|
15100 struct EnumDisplayMonitorsProcData data; |
|
15101 |
|
15102 data.hArray = handleArray; |
|
15103 data.index = 0; |
|
15104 EnumDisplayMonitors(NULL, NULL, EnumDisplayMonitorsProc, (long)(&data)); |
|
15105 %}. |
|
15106 ^ handleArray |
15058 ! |
15107 ! |
15059 |
15108 |
15060 setInputFocusTo:aWindowId |
15109 setInputFocusTo:aWindowId |
15061 self setInputFocusTo:aWindowId revertTo:nil |
15110 self setInputFocusTo:aWindowId revertTo:nil |
15062 ! |
15111 ! |
18987 ! ! |
19036 ! ! |
18988 |
19037 |
18989 !WinWorkstation class methodsFor:'documentation'! |
19038 !WinWorkstation class methodsFor:'documentation'! |
18990 |
19039 |
18991 version |
19040 version |
18992 ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.453 2011-03-03 21:35:05 cg Exp $' |
19041 ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.454 2011-12-22 18:58:03 cg Exp $' |
18993 ! |
19042 ! |
18994 |
19043 |
18995 version_CVS |
19044 version_CVS |
18996 ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.453 2011-03-03 21:35:05 cg Exp $' |
19045 ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.454 2011-12-22 18:58:03 cg Exp $' |
18997 ! ! |
19046 ! ! |
18998 |
19047 |
18999 WinWorkstation initialize! |
19048 WinWorkstation initialize! |