- Timestamp:
- Oct 15, 1999, 12:03:16 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsg.cpp
r1067 r1307 1 /* $Id: oslibmsg.cpp,v 1. 3 1999-09-26 22:24:28sandervl Exp $ */1 /* $Id: oslibmsg.cpp,v 1.4 1999-10-15 10:03:14 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 26 26 #include <wprocess.h> 27 27 28 typedef BOOL (EXPENTRY FNTRANS)(MSG *, QMSG *); 29 typedef FNTRANS *PFNTRANS; 30 31 typedef struct 32 { 33 ULONG msgOS2; 34 ULONG msgWin32; 35 // PFNTRANS toOS2; 36 // PFNTRANS toWIN32; 37 } MSGTRANSTAB, *PMSGTRANSTAB; 38 39 #define MAX_MSGTRANSTAB 12 40 MSGTRANSTAB MsgTransTab[MAX_MSGTRANSTAB] = { 41 0x0000, 0x0000, // WM_NULL, WM_NULL 42 0x0070, 0x0200, // WM_MOUSEMOVE, WM_MOUSEMOVE 43 0x0071, 0x0201, // WM_BUTTON1DOWN, WM_LBUTTONDOWN 44 0x0072, 0x0202, // WM_BUTTON1UP, WM_LBUTTONUP 45 0x0073, 0x0203, // WM_BUTTON1DBLCLK, WM_LBUTTONDBLCLK 46 0x0074, 0x0204, // WM_BUTTON2DOWN, WM_RBUTTONDOWN 47 0x0075, 0x0205, // WM_BUTTON2UP, WM_RBUTTONUP 48 0x0076, 0x0206, // WM_BUTTON2DBLCLK, WM_RBUTTONDBLCLK 49 0x0077, 0x0207, // WM_BUTTON3DOWN, WM_MBUTTONDOWN 50 0x0078, 0x0208, // WM_BUTTON3UP, WM_MBUTTONUP 51 0x0079, 0x0209, // WM_BUTTON3DBLCLK, WM_MBUTTONDBLCLK 52 0x020a, 0x020a, // WM_???, WM_??? 53 }; 54 28 55 QMSG *MsgThreadPtr = 0; 29 56 … … 44 71 void WinToOS2MsgTranslate(MSG *winMsg, QMSG *os2Msg, BOOL isUnicode) 45 72 { 73 int i; 74 46 75 memcpy(os2Msg, winMsg, sizeof(MSG)); 76 os2Msg->hwnd = Win32Window::Win32ToOS2Handle(winMsg->hwnd); 47 77 os2Msg->reserved = 0; 78 for(i=0;i<MAX_MSGTRANSTAB;i++) 79 { 80 if(MsgTransTab[i].msgWin32 == winMsg->message) 81 { 82 os2Msg->msg = MsgTransTab[i].msgOS2; 83 break; 84 } 85 } 48 86 } 49 87 //****************************************************************************** … … 51 89 void OS2ToWinMsgTranslate(QMSG *os2Msg, MSG *winMsg, BOOL isUnicode) 52 90 { 91 int i; 92 53 93 memcpy(winMsg, os2Msg, sizeof(MSG)); 54 94 winMsg->hwnd = Win32Window::OS2ToWin32Handle(os2Msg->hwnd); 95 for(i=0;i<MAX_MSGTRANSTAB;i++) 96 { 97 if(MsgTransTab[i].msgOS2 == os2Msg->msg) 98 { 99 winMsg->message = MsgTransTab[i].msgWin32; 100 break; 101 } 102 } 55 103 } 56 104 //****************************************************************************** … … 68 116 thdb->fMsgTranslated = TRUE; 69 117 } 70 118 119 for(int i=0;i<MAX_MSGTRANSTAB;i++) 120 { 121 if(MsgTransTab[i].msgWin32 == msg) 122 { 123 return MsgTransTab[i].msgOS2; 124 } 125 } 126 71 127 return 0; 72 128 } -
trunk/src/user32/win32wbase.cpp
r1299 r1307 1 /* $Id: win32wbase.cpp,v 1.4 3 1999-10-14 19:31:32sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.44 1999-10-15 10:03:15 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2258 2258 ULONG magic; 2259 2259 ULONG getcmd = 0; 2260 HWND hwndRelated ;2260 HWND hwndRelated, hwnd; 2261 2261 2262 2262 dprintf(("GetWindow %x %d NOT COMPLETE", getWindowHandle(), uCmd)); 2263 hwnd = OS2Hwnd; 2263 2264 switch(uCmd) 2264 2265 { … … 2268 2269 case GW_HWNDFIRST: 2269 2270 if(getParent()) { 2271 hwnd = getParent()->getOS2WindowHandle(); 2270 2272 getcmd = QWOS_TOP; //top of child windows 2271 2273 } … … 2274 2276 case GW_HWNDLAST: 2275 2277 if(getParent()) { 2278 hwnd = getParent()->getOS2WindowHandle(); 2276 2279 getcmd = QWOS_BOTTOM; //bottom of child windows 2277 2280 } … … 2290 2293 else return 0; 2291 2294 } 2292 hwndRelated = OSLibWinQueryWindow( OS2Hwnd, getcmd);2295 hwndRelated = OSLibWinQueryWindow(hwnd, getcmd); 2293 2296 if(hwndRelated) 2294 2297 { 2298 win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwndRelated, OFFSET_WIN32WNDPTR); 2299 magic = OSLibWinGetWindowULong(hwndRelated, OFFSET_WIN32PM_MAGIC); 2300 if(CheckMagicDword(magic) && win32wnd) 2301 { 2302 return win32wnd->getWindowHandle(); 2303 } 2304 2305 hwndRelated = OSLibWinWindowFromID(hwndRelated, OSLIB_FID_CLIENT); 2295 2306 win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwndRelated, OFFSET_WIN32WNDPTR); 2296 2307 magic = OSLibWinGetWindowULong(hwndRelated, OFFSET_WIN32PM_MAGIC); -
trunk/src/user32/window.cpp
r1297 r1307 1 /* $Id: window.cpp,v 1.1 5 1999-10-14 18:27:59sandervl Exp $ */1 /* $Id: window.cpp,v 1.16 1999-10-15 10:03:16 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 400 400 { 401 401 Win32BaseWindow *window; 402 HWND rc; 402 403 403 404 window = Win32BaseWindow::GetWindowFromHandle(hwnd); … … 407 408 return 0; 408 409 } 409 dprintf(("GetWindow %x %d", hwnd, uCmd)); 410 return window->GetWindow(uCmd); 410 rc = window->GetWindow(uCmd); 411 dprintf(("GetWindow %x %d returned %x", hwnd, uCmd, rc)); 412 return rc; 411 413 } 412 414 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.