- Timestamp:
- May 3, 2000, 8:35:56 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibwin.cpp
r3462 r3488 1 /* $Id: oslibwin.cpp,v 1.7 4 2000-04-29 18:28:37sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.75 2000-05-03 18:35:51 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 937 937 //****************************************************************************** 938 938 //****************************************************************************** 939 HWND OSLibWinQueryCapture() 940 { 941 return WinQueryCapture(HWND_DESKTOP); 942 } 943 //****************************************************************************** 944 //****************************************************************************** 945 BOOL OSLibWinSetCapture(HWND hwnd) 946 { 947 return WinSetCapture(HWND_DESKTOP, hwnd); 948 } 949 //****************************************************************************** 950 //****************************************************************************** -
trunk/src/user32/oslibwin.h
r3364 r3488 1 /* $Id: oslibwin.h,v 1.4 1 2000-04-10 19:40:45sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.42 2000-05-03 18:35:52 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 282 282 void OSLibWinSetVisibleRegionNotify(HWND hwnd, BOOL fNotify); 283 283 284 HWND OSLibWinQueryCapture(); 285 BOOL OSLibWinSetCapture(HWND hwnd); 286 284 287 #endif //__OSLIBWIN_H__ -
trunk/src/user32/user32.cpp
r3482 r3488 1 /* $Id: user32.cpp,v 1.7 8 2000-05-02 20:50:50sandervl Exp $ */1 /* $Id: user32.cpp,v 1.79 2000-05-03 18:35:52 sandervl Exp $ */ 2 2 3 3 /* … … 547 547 //****************************************************************************** 548 548 //****************************************************************************** 549 BOOL WIN32API ReleaseCapture(void)550 {551 dprintf(("USER32: ReleaseCapture"));552 return O32_ReleaseCapture();553 }554 //******************************************************************************555 //******************************************************************************556 HWND WIN32API GetCapture(void)557 {558 HWND hwnd;559 560 hwnd = Win32Window::OS2ToWin32Handle(O32_GetCapture());561 dprintf(("USER32: GetCapture returned %x", hwnd));562 return hwnd;563 }564 //******************************************************************************565 //******************************************************************************566 HWND WIN32API SetCapture( HWND hwnd)567 {568 dprintf(("USER32: SetCapture %x", hwnd));569 hwnd = Win32Window::Win32ToOS2Handle(hwnd);570 return Win32Window::OS2ToWin32Handle(O32_SetCapture(hwnd));571 }572 //******************************************************************************573 //******************************************************************************574 549 BOOL WIN32API SetDoubleClickTime( UINT uInterval) 575 550 { … … 888 863 break; 889 864 case SPI_GETNONCLIENTMETRICS: 865 { 890 866 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA)); 891 867 cmetric->cbSize = sizeof(NONCLIENTMETRICSA); 892 868 869 #if 0 893 870 //CB: fonts not handled by Open32, set to WarpSans 894 871 lstrcpyA(cmetric->lfSmCaptionFont.lfFaceName,"WarpSans"); … … 916 893 cmetric->iMenuWidth = 32; //TODO 917 894 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU); 918 break; 895 #else 896 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfSmCaptionFont),0); 897 898 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0); 899 cmetric->lfCaptionFont.lfWeight = FW_BOLD; 900 901 LPLOGFONTA lpLogFont = &(cmetric->lfMenuFont); 902 GetProfileStringA("Desktop", "MenuFont", "MS Sans Serif", 903 lpLogFont->lfFaceName, LF_FACESIZE); 904 905 lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", 12); 906 lpLogFont->lfWidth = 0; 907 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0; 908 lpLogFont->lfWeight = FW_BOLD; 909 lpLogFont->lfItalic = FALSE; 910 lpLogFont->lfStrikeOut = FALSE; 911 lpLogFont->lfUnderline = FALSE; 912 lpLogFont->lfCharSet = ANSI_CHARSET; 913 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS; 914 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS; 915 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; 916 917 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, 918 (LPVOID)&(cmetric->lfStatusFont),0); 919 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, 920 (LPVOID)&(cmetric->lfMessageFont),0); 921 922 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER); 923 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL); 924 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL); 925 cmetric->iCaptionWidth = 32; //TODO 926 cmetric->iCaptionHeight = 32; //TODO 927 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE); 928 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE); 929 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU); 930 cmetric->iMenuWidth = cmetric->iMenuHeight; //TODO 931 #endif 932 break; 933 } 934 919 935 case SPI_GETICONTITLELOGFONT: 920 936 { … … 1569 1585 WORD WIN32API VkKeyScanA( char ch) 1570 1586 { 1571 dprintf(("USER32: VkKeyScanA\n"));1587 dprintf(("USER32: VkKeyScanA %x", ch)); 1572 1588 return O32_VkKeyScan(ch); 1573 1589 } … … 1576 1592 WORD WIN32API VkKeyScanW( WCHAR wch) 1577 1593 { 1578 dprintf(("USER32: VkKeyScanW \n"));1594 dprintf(("USER32: VkKeyScanW %x", wch)); 1579 1595 // NOTE: This will not work as is (needs UNICODE support) 1580 1596 return O32_VkKeyScan((char)wch); … … 1689 1705 int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH hbr) 1690 1706 { 1691 dprintf(("USER32: FrameRect"));1707 dprintf(("USER32: FrameRect %x (%d,%d)(%d,%d) brush %x", hDC, lprc->top, lprc->left, lprc->bottom, lprc->right, hbr)); 1692 1708 return O32_FrameRect(hDC,lprc,hbr); 1693 1709 } -
trunk/src/user32/win32dlg.cpp
r3482 r3488 1 /* $Id: win32dlg.cpp,v 1.4 8 2000-05-02 20:50:51sandervl Exp $ */1 /* $Id: win32dlg.cpp,v 1.49 2000-05-03 18:35:53 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 236 236 /* Send initialisation messages and set focus */ 237 237 hwndFocus = GetNextDlgTabItem( getWindowHandle(), 0, FALSE ); 238 dprintf(("dlg ctor: GetNextDlgTabItem returned %x, capture hwnd = %x", hwndFocus, GetCapture())); 238 239 239 240 HWND hwndPreInitFocus = GetFocus(); -
trunk/src/user32/win32wbase.cpp
r3482 r3488 1 /* $Id: win32wbase.cpp,v 1.18 2 2000-05-02 20:50:51sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.183 2000-05-03 18:35:54 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 847 847 lastHitTestVal = DispatchMessageA(msg); 848 848 849 dprintf2(("MsgHitTest (%d,%d) (%d,%d) (%d,%d) returned %x", LOWORD(msg->lParam), HIWORD(msg->lParam), rectWindow.left, rectWindow.right, rectWindow.top, rectWindow.bottom, lastHitTestVal));849 dprintf2(("MsgHitTest %x (%d,%d) (%d,%d) (%d,%d) returned %x", getWindowHandle(), LOWORD(msg->lParam), HIWORD(msg->lParam), rectWindow.left, rectWindow.right, rectWindow.top, rectWindow.bottom, lastHitTestVal)); 850 850 851 851 if (lastHitTestVal == HTTRANSPARENT) … … 2152 2152 WINDOWPOS wpos; 2153 2153 SWP swp, swpOld; 2154 #if 0 //CB: breaks trackbar tooltip: must call SetWindowPos twice to change the size2155 if(fuFlags & SWP_SHOWWINDOW) {2156 fShow = TRUE;2157 fuFlags &= ~SWP_SHOWWINDOW;2158 }2159 else2160 #endif2161 if(fuFlags & SWP_HIDEWINDOW) {2162 fHide = TRUE;2163 fuFlags &= ~SWP_HIDEWINDOW;2164 }2165 2154 wpos.flags = fuFlags; 2166 2155 wpos.cy = cy; … … 2190 2179 FrameUpdateClient(this); 2191 2180 } 2192 if(fHide) { 2193 ShowWindow(SW_HIDE); 2194 } 2195 if(fShow) { 2196 ShowWindow(SW_SHOWNA); 2181 if(fuFlags & SWP_SHOWWINDOW) { 2182 setStyle(getStyle() | WS_VISIBLE); 2183 } 2184 else 2185 if(fuFlags & SWP_HIDEWINDOW) { 2186 setStyle(getStyle() & ~WS_VISIBLE); 2197 2187 } 2198 2188 return TRUE; … … 2215 2205 dprintf (("WinSetWindowPos %x %x (%d,%d)(%d,%d) %x", swp.hwnd, swp.hwndInsertBehind, swp.x, swp.y, swp.cx, swp.cy, swp.fl)); 2216 2206 2217 //SvL: For some reason WinSetMultWindowPos doesn't work for showing windows when they are hidden.. 2218 if(fHide) { 2219 ShowWindow(SW_HIDE); 2207 if(fuFlags & SWP_SHOWWINDOW && !IsWindowVisible()) { 2208 setStyle(getStyle() | WS_VISIBLE); 2209 } 2210 else 2211 if(fuFlags & SWP_HIDEWINDOW && IsWindowVisible()) { 2212 setStyle(getStyle() & ~WS_VISIBLE); 2220 2213 } 2221 2214 rc = OSLibWinSetMultWindowPos(&swp, 1); 2222 if(fShow) {2223 ShowWindow(SW_SHOWNA);2224 }2225 2215 2226 2216 if (rc == FALSE) … … 2649 2639 } 2650 2640 OSLibWinEnableWindow(OS2HwndFrame, fEnable); 2641 if(fEnable == FALSE) { 2642 //SvL: No need to clear focus as PM already does this 2643 if(getWindowHandle() == GetCapture()) { 2644 ReleaseCapture(); /* A disabled window can't capture the mouse */ 2645 dprintf(("Released capture for window %x that is being disabled", getWindowHandle())); 2646 } 2647 } 2651 2648 return rc; 2652 2649 } -
trunk/src/user32/window.cpp
r3482 r3488 1 /* $Id: window.cpp,v 1.6 3 2000-05-02 20:50:53sandervl Exp $ */1 /* $Id: window.cpp,v 1.64 2000-05-03 18:35:55 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 604 604 605 605 hwnd = OSLibWinQueryFocus(OSLIB_HWND_DESKTOP); 606 hwnd = Win32BaseWindow::OS2ToWin32Handle(hwnd); 606 607 dprintf(("USER32: GetFocus %x\n", hwnd)); 607 hwnd = Win32BaseWindow::OS2ToWin32Handle(hwnd);608 608 return hwnd; 609 609 } … … 1412 1412 BOOL WIN32API ShowOwnedPopups( HWND hwnd, BOOL arg2) 1413 1413 { 1414 dprintf(("USER32: ShowOwnedPopups %x", hwnd));1414 dprintf(("USER32: ShowOwnedPopups (OPEN32: todo) %x", hwnd)); 1415 1415 return O32_ShowOwnedPopups(Win32BaseWindow::Win32ToOS2FrameHandle(hwnd), arg2); 1416 1416 } -
trunk/src/user32/winmouse.cpp
r3072 r3488 1 /* $Id: winmouse.cpp,v 1. 8 2000-03-09 21:50:11sandervl Exp $ */1 /* $Id: winmouse.cpp,v 1.9 2000-05-03 18:35:56 sandervl Exp $ */ 2 2 /* 3 3 * Mouse handler for DINPUT … … 12 12 #include <misc.h> 13 13 #include "win32wbase.h" 14 #include "win32wnd.h" 14 15 #include <win\mouse.h> 15 16 #include "winmouse.h" 16 17 #include "oslibmsg.h" 17 18 #include "pmwindow.h" 19 #include "oslibwin.h" 18 20 19 21 #define DBG_LOCALLOG DBG_winmouse … … 105 107 //****************************************************************************** 106 108 //****************************************************************************** 109 HWND WIN32API GetCapture(void) 110 { 111 HWND hwnd; 112 113 hwnd = Win32Window::OS2ToWin32Handle(OSLibWinQueryCapture()); 114 dprintf(("USER32: GetCapture returned %x", hwnd)); 115 return hwnd; 116 } 117 //****************************************************************************** 118 //****************************************************************************** 119 HWND WIN32API SetCapture( HWND hwnd) 120 { 121 HWND hwndPrev = GetCapture(); 122 123 if(hwnd == 0) { 124 ReleaseCapture(); 125 return hwndPrev; 126 } 127 OSLibWinSetCapture(Win32Window::Win32ToOS2Handle(hwnd)); 128 dprintf(("USER32: SetCapture %x (prev %x)", hwnd, hwndPrev)); 129 if(hwndPrev) { 130 SendMessageA(hwndPrev, WM_CAPTURECHANGED, 0L, hwnd); 131 } 132 return hwndPrev; 133 // return 0; 134 } 135 //****************************************************************************** 136 //****************************************************************************** 137 BOOL WIN32API ReleaseCapture(void) 138 { 139 HWND hwndPrev; 140 141 dprintf(("USER32: ReleaseCapture")); 142 hwndPrev = GetCapture(); 143 if(hwndPrev) { 144 SendMessageA(hwndPrev, WM_CAPTURECHANGED, 0L, 0L); 145 } 146 return OSLibWinSetCapture(0); 147 } 148 //****************************************************************************** 149 //****************************************************************************** -
trunk/src/user32/wndmsg.cpp
r2804 r3488 1 /* $Id: wndmsg.cpp,v 1.1 4 2000-02-16 14:34:40sandervl Exp $ */1 /* $Id: wndmsg.cpp,v 1.15 2000-05-03 18:35:56 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message text function for OS/2 … … 774 774 } 775 775 } 776 else { 777 if(fInternalMsg) { 778 dprintf2(("SendInternalMessage%c %s for %x %x %x", unicode, GetMsgText(Msg), hwnd, wParam, lParam)); 779 } 780 else dprintf2(("SendMessage%c %s for %x %x %x", unicode, GetMsgText(Msg), hwnd, wParam, lParam)); 781 } 776 782 } 777 783
Note:
See TracChangeset
for help on using the changeset viewer.