- Timestamp:
- Jan 3, 2003, 5:35:58 PM (23 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 1 added
- 1 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/HOOK.CPP
r8474 r9598 1 /* $Id: HOOK.CPP,v 1.3 8 2002-05-23 07:13:00 sandervl Exp $ */1 /* $Id: HOOK.CPP,v 1.39 2003-01-03 16:35:50 sandervl Exp $ */ 2 2 3 3 /* … … 731 731 BOOL WIN32API CallMsgFilterA(LPMSG msg, INT code ) 732 732 { 733 #if 0 //CB: not a Win32 API and unimplemented734 if (GetSysModalWindow()) return FALSE; /* ??? */735 #endif736 733 if (HOOK_CallHooksA( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) 737 734 return TRUE; … … 745 742 BOOL WIN32API CallMsgFilterW(LPMSG msg, INT code ) 746 743 { 747 #if 0 //CB: not a Win32 API and unimplemented748 if (GetSysModalWindow()) return FALSE; /* ??? */749 #endif750 744 if (HOOK_CallHooksW( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) 751 745 return TRUE; … … 783 777 remove && 784 778 (msg->hwnd != GetDesktopWindow()) && 785 ! IsMenuActive())779 !MENU_IsMenuActive()) 786 780 { 787 781 HELPINFO hi; -
trunk/src/user32/controls.cpp
r9523 r9598 1 /* $Id: controls.cpp,v 1.1 1 2002-12-18 12:28:02sandervl Exp $ */1 /* $Id: controls.cpp,v 1.12 2003-01-03 16:35:51 sandervl Exp $ */ 2 2 /* File: controls.cpp -- Win32 common controls 3 3 * … … 48 48 49 49 dprintf(("Register SCROLLBAR class")); 50 controlAtoms[SCROLLBAR_CONTROL] = SCROLLBAR_Register(); 50 controlAtoms[SCROLLBAR_CONTROL] = 51 #if 0 52 InternalRegisterClass((LPSTR)SCROLL_builtin_class.name, 53 SCROLL_builtin_class.style, 54 SCROLL_builtin_class.procA, 55 SCROLL_builtin_class.procW, 56 SCROLL_builtin_class.extra, 57 SCROLL_builtin_class.cursor, 58 SCROLL_builtin_class.brush); 59 #else 60 SCROLLBAR_Register(); 61 #endif 51 62 if (!controlAtoms[SCROLLBAR_CONTROL]) dprintf(("failed!!!")); 52 63 … … 122 133 123 134 dprintf(("Register POPUPMENU class")); 124 controlAtoms[POPUPMENU_CONTROL] = POPUPMENU_Register(); 135 controlAtoms[POPUPMENU_CONTROL] = 136 InternalRegisterClass((LPSTR)MENU_builtin_class.name, 137 MENU_builtin_class.style, 138 MENU_builtin_class.procA, 139 MENU_builtin_class.procW, 140 MENU_builtin_class.extra, 141 MENU_builtin_class.cursor, 142 MENU_builtin_class.brush); 125 143 if (!controlAtoms[POPUPMENU_CONTROL]) dprintf(("failed!!!")); 144 MENU_Init(); 126 145 } 127 146 … … 135 154 136 155 dprintf(("Unregister SCROLLBAR class")); 156 #if 0 157 if (!UnregisterClassA((LPSTR)SCROLL_builtin_class.name, NULL)) dprintf(("failed!!!")); 158 #else 137 159 if (!SCROLLBAR_Unregister()) dprintf(("failed!!!")); 160 #endif 138 161 139 162 dprintf(("Unregister LISTBOX class")); … … 165 188 166 189 dprintf(("Unregister POPUPMENU class")); 167 if (!POPUPMENU_Unregister()) dprintf(("failed!!!")); 168 190 if (!UnregisterClassA((LPSTR)MENU_builtin_class.name, NULL)) dprintf(("failed!!!")); 169 191 } 170 192 -
trunk/src/user32/ctrlconf.h
r9523 r9598 1 /* $Id: ctrlconf.h,v 1. 1 2002-12-18 12:28:02sandervl Exp $ */1 /* $Id: ctrlconf.h,v 1.2 2003-01-03 16:35:51 sandervl Exp $ */ 2 2 /* 3 3 * Win32 common controls … … 9 9 10 10 #include "wndmsg.h" 11 #include "win32wmisc.h" 11 12 12 13 #define SPY_GetMsgName(msg, hwnd) GetMsgText(msg) … … 20 21 #define WIN_SuspendWndsLock() 0 21 22 #define WIN_RestoreWndsLock(ipreviousLock) 23 24 //WIN31 look only -> we don't use it 25 #define NC_DrawSysButton(hwnd, hdc, state) 26 22 27 23 28 #define LOCAL_Alloc(ds, flags, size) 0 … … 61 66 extern const struct builtin_class_descr EDIT_builtin_class; 62 67 extern const struct builtin_class_descr MDICLIENT_builtin_class; 68 extern const struct builtin_class_descr SCROLL_builtin_class; 69 extern const struct builtin_class_descr MENU_builtin_class; 63 70 64 71 #ifdef __cplusplus -
trunk/src/user32/menu.h
r6762 r9598 22 22 BOOL POPUPMENU_Register(); 23 23 BOOL POPUPMENU_Unregister(); 24 BOOL IsMenuActive(void);24 BOOL MENU_IsMenuActive(void); 25 25 26 26 #ifdef __cplusplus -
trunk/src/user32/oslibmsg.cpp
r9356 r9598 1 /* $Id: oslibmsg.cpp,v 1.6 3 2002-10-28 12:22:31sandervl Exp $ */1 /* $Id: oslibmsg.cpp,v 1.64 2003-01-03 16:35:54 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 14 14 * 15 15 * TODO: Filter translation isn't correct! (for posted messages or messages that don't have 16 * a PM version. 16 * a PM version) 17 * 18 * TODO: Flaw in our message handling; we don't handle posted/sent (by the app) 19 * system messages properly if removed from the queue with PeekMessage. 20 * e.g. 21 * PostMessage(WM_KEYDOWN) 22 * PeekMessage(any, PM_NOREMOVE) 23 * ... 24 * PeekMessage(WM_KEYDOWN, WM_KEYDOWN, PM_REMOVE) 25 * 26 * So what we really need is a complete win to os2 message translation 27 * in Post/SendMessage. Quite a lot of work though... 17 28 * 18 29 */ -
trunk/src/user32/oslibmsg.h
r9008 r9598 1 /* $Id: oslibmsg.h,v 1.1 8 2002-08-15 15:45:45sandervl Exp $ */1 /* $Id: oslibmsg.h,v 1.19 2003-01-03 16:35:54 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 12 12 #ifndef __OSLIBMSG_H__ 13 13 #define __OSLIBMSG_H__ 14 15 16 #ifdef __cplusplus 14 17 15 18 ULONG TranslateWinMsg(ULONG msg); … … 39 42 BOOL OSLibWinReplyMessage(ULONG result); 40 43 ULONG OSLibWinQueryQueueStatus(); 41 42 void SetMenuDoubleClick(BOOL fSet);43 44 44 45 BOOL OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode); … … 376 377 #define OSSC_SYSMENU 0x8007 377 378 379 #endif 380 381 #ifdef __cplusplus 382 extern "C" { 383 #endif 384 385 void OSLibSetMenuDoubleClick(BOOL fSet); 386 387 #ifdef __cplusplus 388 } 389 #endif 390 378 391 #endif //__OSLIBMSG_H__ -
trunk/src/user32/oslibmsgtranslate.cpp
r9584 r9598 1 /* $Id: oslibmsgtranslate.cpp,v 1.9 6 2003-01-02 12:35:36sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.97 2003-01-03 16:35:54 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 93 93 //****************************************************************************** 94 94 //****************************************************************************** 95 void SetMenuDoubleClick(BOOL fSet)95 void OSLibSetMenuDoubleClick(BOOL fSet) 96 96 { 97 97 fGenerateDoubleClick = fSet; … … 376 376 } 377 377 else winMsg->message += (WINWM_LBUTTONDBLCLK - WINWM_NCLBUTTONDOWN); 378 doubleClickMsg.message = 0;378 if(fMsgRemoved) doubleClickMsg.message = 0; 379 379 } 380 380 else { 381 381 dprintf(("save for double click")); 382 doubleClickMsg = *winMsg; 383 if(doubleClickMsg.message >= WINWM_NCLBUTTONDOWN && doubleClickMsg.message <= WINWM_NCMBUTTONDOWN) { 384 doubleClickMsg.message += (WINWM_LBUTTONDOWN - WINWM_NCLBUTTONDOWN); 382 if(fMsgRemoved) { 383 doubleClickMsg = *winMsg; 384 if(doubleClickMsg.message >= WINWM_NCLBUTTONDOWN && doubleClickMsg.message <= WINWM_NCMBUTTONDOWN) { 385 doubleClickMsg.message += (WINWM_LBUTTONDOWN - WINWM_NCLBUTTONDOWN); 386 } 385 387 } 386 388 } -
trunk/src/user32/oslibwin.cpp
r9590 r9598 1 /* $Id: oslibwin.cpp,v 1.13 6 2003-01-02 17:02:04sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.137 2003-01-03 16:35:55 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 1169 1169 BOOL OSLibWinRemoveFromTasklist(HANDLE hTaskList) 1170 1170 { 1171 dprintf(("OSLibWinRemoveFromTasklist %x", hTaskList)); 1171 1172 return (WinRemoveSwitchEntry(hTaskList)) ? FALSE : TRUE; 1172 1173 } … … 1194 1195 swctrl.uchVisibility = SWL_INVISIBLE; 1195 1196 } 1196 return WinAddSwitchEntry(&swctrl); 1197 HANDLE hTaskList = WinAddSwitchEntry(&swctrl); 1198 dprintf(("OSLibWinAddToTaskList %s %x", swctrl.szSwtitle, hTaskList)); 1199 return hTaskList; 1197 1200 } 1198 1201 //****************************************************************************** -
trunk/src/user32/oslibwin.h
r9575 r9598 1 /* $Id: oslibwin.h,v 1.7 0 2003-01-01 14:29:43sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.71 2003-01-03 16:35:56 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 13 13 #ifndef __OSLIBWIN_H__ 14 14 #define __OSLIBWIN_H__ 15 16 #ifdef __cplusplus 15 17 #include <oslibgdi.h> 16 18 … … 362 364 363 365 BOOL OSLibWinShowPointer(BOOL fShow); 364 HWND OSLibWinCreateInvisibleScroller(HWND parentHWND, int direction); 366 HWND OSLibWinCreateInvisibleScroller(HWND parentHWND, int direction); 367 368 ULONG OSLibWinQuerySysColor(int index); 369 370 #endif 365 371 366 372 #define PMSYSCLR_SHADOWHILITEBGND (-50L) … … 413 419 (((colorRef) & 0x000000FF)<<16) ) 414 420 415 ULONG OSLibWinQuerySysColor(int index);416 417 421 #endif //__OSLIBWIN_H__ -
trunk/src/user32/win32wbase.h
r9463 r9598 1 /* $Id: win32wbase.h,v 1.14 7 2002-12-04 15:23:41sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.148 2003-01-03 16:35:56 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 476 476 LONG HandleNCHitTest(POINT pt); 477 477 BOOL GetSysPopupPos(RECT* rect); 478 BOOL DrawSysButton(HDC hdc,RECT *rect); 478 479 private: 479 BOOL DrawSysButton(HDC hdc,RECT *rect);480 480 BOOL DrawGrayButton(HDC hdc,int x,int y); 481 481 VOID DrawCloseButton(HDC hdc,RECT *rect,BOOL down,BOOL bGrayed); -
trunk/src/user32/win32wbasenonclient.cpp
r9575 r9598 1 /* $Id: win32wbasenonclient.cpp,v 1.4 6 2003-01-01 14:29:45sandervl Exp $ */1 /* $Id: win32wbasenonclient.cpp,v 1.47 2003-01-03 16:35:57 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (non-client methods) … … 1554 1554 return DrawCaptionTemp(hwnd,hdc,rect,hFont,hIcon,(LPWSTR)str,uFlags,TRUE); 1555 1555 } 1556 #if 0 1557 //Control helpers 1558 /*********************************************************************** 1559 * NC_GetSysPopupPos 1560 */ 1561 void NC_GetSysPopupPos( HWND hwnd, RECT* rect ) 1562 { 1563 if (IsIconic(hwnd)) GetWindowRect( hwnd, rect ); 1564 else 1565 { 1566 #ifdef __WIN32OS2__ 1567 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 1568 if (!win32wnd) return; 1569 1570 win32wnd->GetSysPopupPos(rect); 1571 1572 RELEASE_WNDOBJ(win32wnd); 1573 #else 1574 WND *wndPtr = WIN_FindWndPtr( hwnd ); 1575 if (!wndPtr) return; 1576 1577 NC_GetInsideRect( hwnd, rect ); 1578 OffsetRect( rect, wndPtr->rectWindow.left, wndPtr->rectWindow.top); 1579 if (wndPtr->dwStyle & WS_CHILD) 1580 ClientToScreen( GetParent(hwnd), (POINT *)rect ); 1581 if (TWEAK_WineLook == WIN31_LOOK) { 1582 rect->right = rect->left + GetSystemMetrics(SM_CXSIZE); 1583 rect->bottom = rect->top + GetSystemMetrics(SM_CYSIZE); 1584 } 1585 else { 1586 rect->right = rect->left + GetSystemMetrics(SM_CYCAPTION) - 1; 1587 rect->bottom = rect->top + GetSystemMetrics(SM_CYCAPTION) - 1; 1588 } 1589 WIN_ReleaseWndPtr( wndPtr ); 1590 #endif 1591 } 1592 } 1593 //***************************************************************************** 1594 //***************************************************************************** 1595 BOOL NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down) 1596 { 1597 BOOL ret; 1598 1599 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 1600 if (!win32wnd) return FALSE; 1601 1602 ret = win32wnd->DrawSysButton(hwnd, hdc); 1603 1604 RELEASE_WNDOBJ(win32wnd); 1605 1606 return ret; 1607 } 1608 #endif 1556 -
trunk/src/user32/win32wmisc.cpp
r6762 r9598 1 /* $Id: win32wmisc.cpp,v 1. 1 2001-09-19 15:39:51sandervl Exp $ */1 /* $Id: win32wmisc.cpp,v 1.2 2003-01-03 16:35:57 sandervl Exp $ */ 2 2 /* 3 3 * Misc. functions for window management … … 32 32 #include "win32wndhandle.h" 33 33 #include "win32wmisc.h" 34 #include "ctrlconf.h" 34 35 35 36 //****************************************************************************** … … 141 142 void NC_GetSysPopupPos( HWND hwnd, RECT* rect ) 142 143 { 143 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 144 145 if (!win32wnd) return; 146 147 win32wnd->GetSysPopupPos(rect); 148 RELEASE_WNDOBJ(win32wnd); 149 } 150 //****************************************************************************** 151 //****************************************************************************** 144 if (IsIconic(hwnd)) GetWindowRect( hwnd, rect ); 145 else 146 { 147 #ifdef __WIN32OS2__ 148 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 149 if (!win32wnd) return; 150 151 win32wnd->GetSysPopupPos(rect); 152 153 RELEASE_WNDOBJ(win32wnd); 154 #else 155 WND *wndPtr = WIN_FindWndPtr( hwnd ); 156 if (!wndPtr) return; 157 158 NC_GetInsideRect( hwnd, rect ); 159 OffsetRect( rect, wndPtr->rectWindow.left, wndPtr->rectWindow.top); 160 if (wndPtr->dwStyle & WS_CHILD) 161 ClientToScreen( GetParent(hwnd), (POINT *)rect ); 162 if (TWEAK_WineLook == WIN31_LOOK) { 163 rect->right = rect->left + GetSystemMetrics(SM_CXSIZE); 164 rect->bottom = rect->top + GetSystemMetrics(SM_CYSIZE); 165 } 166 else { 167 rect->right = rect->left + GetSystemMetrics(SM_CYCAPTION) - 1; 168 rect->bottom = rect->top + GetSystemMetrics(SM_CYCAPTION) - 1; 169 } 170 WIN_ReleaseWndPtr( wndPtr ); 171 #endif 172 } 173 } 174 //***************************************************************************** 175 //***************************************************************************** 176 BOOL NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down) 177 { 178 BOOL ret; 179 180 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 181 if (!win32wnd) return FALSE; 182 183 ret = win32wnd->DrawSysButton(hdc, NULL); 184 185 RELEASE_WNDOBJ(win32wnd); 186 187 return ret; 188 } 189 //***************************************************************************** 190 //***************************************************************************** 191 INT NC_HandleNCHitTest( HWND hwnd, POINT pt) 192 { 193 INT ht; 194 195 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 196 if(win32wnd==NULL) { 197 //SvL: This happens in Moraff's YourJongg 2.0, return here 198 //TODO: Check if this is supposed to happen at all... 199 return HTERROR; 200 } 201 202 ht = win32wnd->HandleNCHitTest(pt); 203 RELEASE_WNDOBJ(win32wnd); 204 205 return ht; 206 } 207 //***************************************************************************** 208 //***************************************************************************** -
trunk/src/user32/win32wmisc.h
r6762 r9598 1 /* $Id: win32wmisc.h,v 1. 1 2001-09-19 15:39:51sandervl Exp $ */1 /* $Id: win32wmisc.h,v 1.2 2003-01-03 16:35:58 sandervl Exp $ */ 2 2 /* 3 3 * Misc. functions for window management … … 20 20 #endif 21 21 22 #define get_win_sys_menu( hwnd ) getSysMenu(hwnd) 23 22 24 MDICLIENTINFO *get_client_info( HWND client ); 23 25 HMENU WIN32API getSysMenu(HWND hwnd); 24 26 VOID setSysMenu(HWND hwnd,HMENU hMenu); 25 27 void GetWindowRectParent(HWND hwnd, RECT *pRect); 28 HWND *WIN_ListChildren( HWND hwnd ); 29 26 30 void NC_GetSysPopupPos( HWND hwnd, RECT* rect ); 27 HWND *WIN_ListChildren( HWND hwnd ); 31 BOOL NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down); 32 INT NC_HandleNCHitTest( HWND hwnd, POINT pt); 33 34 HWND WINAPI GetAncestor( HWND hwnd, UINT type ); 28 35 29 36 #ifdef __cplusplus -
trunk/src/user32/windowclass.cpp
r9523 r9598 1 /* $Id: windowclass.cpp,v 1.2 6 2002-12-18 12:28:08 sandervl Exp $ */1 /* $Id: windowclass.cpp,v 1.27 2003-01-03 16:35:58 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Class Code for OS/2 … … 139 139 } 140 140 141 dprintf(("InternalRegisterClass %s %x %x %x %d %x %x", lpszClassName, dwStyle, pfnClassA, pfnClassW, cbExtraWindowWords, lpszCursor, hBrush)); 141 if(HIWORD(lpszClassName)) { 142 dprintf(("InternalRegisterClass %s %x %x %x %d %x %x", lpszClassName, dwStyle, pfnClassA, pfnClassW, cbExtraWindowWords, lpszCursor, hBrush)); 143 } 144 else dprintf(("InternalRegisterClass %x %x %x %x %d %x %x", lpszClassName, dwStyle, pfnClassA, pfnClassW, cbExtraWindowWords, lpszCursor, hBrush)); 145 142 146 wc.cbSize = sizeof(wc); 143 147 wc.style = dwStyle;
Note:
See TracChangeset
for help on using the changeset viewer.