- Timestamp:
- Nov 27, 1999, 1:10:22 AM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsg.cpp
r1836 r1855 1 /* $Id: oslibmsg.cpp,v 1.1 2 1999-11-24 20:11:36sandervl Exp $ */1 /* $Id: oslibmsg.cpp,v 1.13 1999-11-27 00:10:20 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 247 247 } 248 248 //****************************************************************************** 249 //****************************************************************************** 249 //TODO: QS_HOTKEY 250 //****************************************************************************** 251 ULONG OSLibWinQueryQueueStatus() 252 { 253 ULONG statusOS2, statusWin32; 254 255 statusOS2 = WinQueryQueueStatus(HWND_DESKTOP); 256 257 if(statusOS2 & QS_KEY) 258 statusWin32 |= QS_KEY_W; 259 if(statusOS2 & QS_MOUSEBUTTON) 260 statusWin32 |= QS_MOUSEBUTTON_W; 261 if(statusOS2 & QS_MOUSEMOVE) 262 statusWin32 |= QS_MOUSEMOVE_W; 263 if(statusOS2 & QS_TIMER) 264 statusWin32 |= QS_TIMER_W; 265 if(statusOS2 & QS_PAINT) 266 statusWin32 |= QS_PAINT_W; 267 if(statusOS2 & QS_POSTMSG) 268 statusWin32 |= QS_POSTMESSAGE_W; 269 if(statusOS2 & QS_SENDMSG) 270 statusWin32 |= QS_SENDMESSAGE_W; 271 272 return statusWin32; 273 } 274 //****************************************************************************** 275 //****************************************************************************** -
trunk/src/user32/oslibmsg.h
r1688 r1855 1 /* $Id: oslibmsg.h,v 1. 4 1999-11-10 14:16:45sandervl Exp $ */1 /* $Id: oslibmsg.h,v 1.5 1999-11-27 00:10:20 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 33 33 BOOL OSLibInitMsgQueue(); 34 34 BOOL OSLibWinWaitMessage(); 35 36 ULONG OSLibWinQueryQueueStatus(); 35 37 36 38 #define WINWM_NULL 0x0000 -
trunk/src/user32/pmwindow.cpp
r1849 r1855 1 /* $Id: pmwindow.cpp,v 1.5 7 1999-11-26 17:06:08 cbratschiExp $ */1 /* $Id: pmwindow.cpp,v 1.58 1999-11-27 00:10:20 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 692 692 dprintf(("PM: WM_CHAR: %x %x %d %x", SHORT1FROMMP(mp2), SHORT2FROMMP(mp2), repeatCount, scanCode)); 693 693 dprintf(("PM: WM_CHAR: %x", flags)); 694 695 // vitali add begin 696 if ( ( SHORT1FROMMP(mp2) & 0x0FF ) == 0x0E0 ) 697 { 698 // an extended key ( arrows, ins, del and so on ) 699 // get "virtual" scancode from character code cause 700 // for "regular" keys they are equal 701 scanCode = ( SHORT1FROMMP(mp2) >> 8) & 0x0FF; 702 } 703 // vitali add end 704 694 705 // both WM_KEYUP & WM_KEYDOWN want a virtual key, find the right Win32 virtual key 695 706 // given the OS/2 virtual key and OS/2 character -
trunk/src/user32/user32.cpp
r1849 r1855 1 /* $Id: user32.cpp,v 1.5 6 1999-11-26 17:06:08 cbratschiExp $ */1 /* $Id: user32.cpp,v 1.57 1999-11-27 00:10:21 sandervl Exp $ */ 2 2 3 3 /* … … 1571 1571 } 1572 1572 1573 /* Synchronization Functions */1574 ODINFUNCTION5(DWORD,MsgWaitForMultipleObjects,DWORD, nCount,1575 LPHANDLE, pHandles,1576 BOOL, fWaitAll,1577 DWORD, dwMilliseconds,1578 DWORD, dwWakeMask)1579 {1580 // @@@PH that's a really difficult function to implement1581 1582 // @@@PH this is a temporary bugfix for WINFILE.EXE1583 if (nCount == 0)1584 {1585 // only listens to incoming thread messages.1586 return (WAIT_OBJECT_0);1587 }1588 1589 return O32_MsgWaitForMultipleObjects(nCount,pHandles,fWaitAll,dwMilliseconds,dwWakeMask);1590 }1591 1592 1573 /* Button Functions */ 1593 1574 … … 1874 1855 /* Message and Message Queue Functions */ 1875 1856 1876 /*****************************************************************************1877 * Name : BOOL WIN32API GetInputState1878 * Purpose : The GetInputState function determines whether there are1879 * mouse-button or keyboard messages in the calling thread's message queue.1880 * Parameters:1881 * Variables :1882 * Result : If the queue contains one or more new mouse-button or keyboard1883 * messages, the return value is TRUE.1884 * If the function fails, the return value is FALSE.1885 * Remark :1886 * Status : UNTESTED STUB1887 *1888 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1889 *****************************************************************************/1890 BOOL WIN32API GetInputState(VOID)1891 {1892 dprintf(("USER32:GetInputState () not implemented.\n"));1893 1894 return (FALSE);1895 }1896 //******************************************************************************1897 //******************************************************************************1898 DWORD WIN32API GetQueueStatus( UINT flags)1899 {1900 #ifdef DEBUG1901 WriteLog("USER32: GetQueueStatus\n");1902 #endif1903 return O32_GetQueueStatus(flags);1904 }1905 1857 1906 1858 /* Font and Text Functions */ -
trunk/src/user32/windowmsg.cpp
r1831 r1855 1 /* $Id: windowmsg.cpp,v 1. 6 1999-11-24 19:32:23sandervl Exp $ */1 /* $Id: windowmsg.cpp,v 1.7 1999-11-27 00:10:22 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message APIs for OS/2 … … 9 9 * Copyright 1993, 1994 Alexandre Julliard 10 10 * 11 * TODO: GetQueueStatus: QS_HOTKEY (oslibmsg.cpp) & low word bits 12 * TODO: MsgWaitForMultipleObjects: timeout isn't handled correctly (can return too late) 11 13 * 12 14 * Project Odin Software License can be found in LICENSE.TXT … … 1017 1019 return WINPROC_CallProc32WTo32A( func, hwnd, msg, wParam, lParam); 1018 1020 } 1021 //****************************************************************************** 1022 //TODO: QS_HOTKEY (oslibmsg.cpp) & low word bits 1023 //high word = messages currently in queue 1024 //low word = messages that have been added to the queue and are still in the 1025 // queue since the last call to GetQueueStatus 1026 //****************************************************************************** 1027 DWORD WIN32API GetQueueStatus( UINT flags) 1028 { 1029 DWORD queueStatus; 1030 1031 dprintf(("USER32: GetQueueStatus")); 1032 queueStatus = OSLibWinQueryQueueStatus(); 1033 1034 queueStatus = MAKELONG(queueStatus, queueStatus); 1035 return queueStatus & MAKELONG(flags, flags); 1036 } 1037 /***************************************************************************** 1038 * Name : BOOL WIN32API GetInputState 1039 * Purpose : The GetInputState function determines whether there are 1040 * mouse-button or keyboard messages in the calling thread's message queue. 1041 * Parameters: 1042 * Variables : 1043 * Result : If the queue contains one or more new mouse-button or keyboard 1044 * messages, the return value is TRUE. 1045 * If the function fails, the return value is FALSE. 1046 * Remark : 1047 * Status : UNTESTED STUB 1048 * 1049 * Author : Patrick Haller [Thu, 1998/02/26 11:55] 1050 *****************************************************************************/ 1051 BOOL WIN32API GetInputState(VOID) 1052 { 1053 DWORD queueStatus; 1054 1055 dprintf(("USER32:GetInputState()")); 1056 queueStatus = OSLibWinQueryQueueStatus(); 1057 1058 return (queueStatus & (QS_KEY | QS_MOUSEBUTTON)) ? TRUE : FALSE; 1059 } 1060 //****************************************************************************** 1061 /* Synchronization Functions */ 1062 //****************************************************************************** 1063 DWORD MsgWaitForMultipleObjects(DWORD nCount, LPHANDLE pHandles, BOOL fWaitAll, 1064 DWORD dwMilliseconds, DWORD dwWakeMask) 1065 { 1066 DWORD curtime, endtime; 1067 1068 dprintf(("MsgWaitForMultipleObjects %x %x %d %d %x", nCount, pHandles, fWaitAll, dwMilliseconds, dwWakeMask)); 1069 // @@@PH this is a temporary bugfix for WINFILE.EXE 1070 if (nCount == 0) 1071 { 1072 if(dwMilliseconds == 0) { 1073 if(GetQueueStatus(dwWakeMask) == 0) { 1074 return WAIT_TIMEOUT; 1075 } 1076 return WAIT_OBJECT_0; 1077 } 1078 //SvL: Check time, wait for any message, check msg type and determine if 1079 // we have to return 1080 //TODO: Timeout isn't handled correctly (can return too late) 1081 curtime = GetCurrentTime(); 1082 endtime = curtime + dwMilliseconds; 1083 while(curtime < endtime || dwMilliseconds == INFINITE) { 1084 if(OSLibWinWaitMessage() == FALSE) { 1085 dprintf(("OSLibWinWaitMessage returned FALSE!")); 1086 return -1; 1087 } 1088 if(GetQueueStatus(dwWakeMask) != 0) { 1089 return WAIT_OBJECT_0; 1090 } 1091 curtime = GetCurrentTime(); 1092 } 1093 return WAIT_TIMEOUT; 1094 } 1095 return O32_MsgWaitForMultipleObjects(nCount,pHandles,fWaitAll,dwMilliseconds,dwWakeMask); 1096 }
Note:
See TracChangeset
for help on using the changeset viewer.