Changeset 342 for trunk/src/user32/new/oslibmsg.cpp
- Timestamp:
- Jul 20, 1999, 9:42:36 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/oslibmsg.cpp
r321 r342 1 /* $Id: oslibmsg.cpp,v 1. 1 1999-07-17 11:52:22sandervl Exp $ */1 /* $Id: oslibmsg.cpp,v 1.2 1999-07-20 07:42:35 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 9 9 * Project Odin Software License can be found in LICENSE.TXT 10 10 * 11 * TODO: Simply copy for now. Probably need to make a real translation11 * TODO: Simply copy for now. Need to make a real translation 12 12 * 13 13 */ 14 14 #define INCL_WIN 15 15 #define INCL_PM 16 #define INCL_DOSPROCESS 16 17 #include <os2.h> 17 18 #include <os2wrap.h> … … 19 20 #include <misc.h> 20 21 #include "oslibmsg.h" 22 #include <win32wnd.h> 23 #include "oslibutil.h" 21 24 25 QMSG *MsgThreadPtr = 0; 26 27 //****************************************************************************** 28 //****************************************************************************** 29 BOOL OSLibInitMsgQueue() 30 { 31 if(DosAllocThreadLocalMemory(sizeof(QMSG)/sizeof(ULONG), (PULONG *)&MsgThreadPtr) != 0) 32 { 33 dprintf(("OSLibInitMsgQueue: local thread memory alloc failed!!")); 34 DebugInt3(); 35 return FALSE; 36 } 37 return TRUE; 38 } 22 39 //****************************************************************************** 23 40 //****************************************************************************** … … 32 49 { 33 50 memcpy(winMsg, os2Msg, sizeof(MSG)); 51 winMsg->hwnd = Win32Window::OS2ToWin32Handle(os2Msg->hwnd); 34 52 } 35 53 //****************************************************************************** … … 42 60 //****************************************************************************** 43 61 //****************************************************************************** 62 void OSLibWinPostQuitMessage(ULONG nExitCode) 63 { 64 WinPostQueueMsg(GetThreadMessageQueue(), WM_QUIT, (MPARAM)nExitCode, 0); 65 } 66 //****************************************************************************** 67 //****************************************************************************** 68 LONG OSLibWinDispatchMsg(MSG *msg, BOOL isUnicode) 69 { 70 //TODO: What to do if app changed msg? (translate) 71 // WinToOS2MsgTranslate(msg, &qmsg, isUnicode); 72 73 return (LONG)WinDispatchMsg(GetThreadHAB(), MsgThreadPtr); 74 } 75 //****************************************************************************** 76 //****************************************************************************** 77 BOOL OSLibWinGetMsg(LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax, BOOL isUnicode) 78 { 79 BOOL rc; 80 81 rc = WinGetMsg(GetThreadHAB(), MsgThreadPtr, TranslateWinMsg(uMsgFilterMin), TranslateWinMsg(uMsgFilterMax), 0); 82 OS2ToWinMsgTranslate(MsgThreadPtr, pMsg, isUnicode); 83 return rc; 84 } 85 //****************************************************************************** 86 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.