Changeset 1831 for trunk/src/user32
- Timestamp:
- Nov 24, 1999, 8:32:23 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/Makefile
r1818 r1831 1 # $Id: Makefile,v 1.4 4 1999-11-23 19:34:19sandervl Exp $1 # $Id: Makefile,v 1.45 1999-11-24 19:32:21 sandervl Exp $ 2 2 3 3 # … … 141 141 oslibwin.obj: oslibwin.cpp oslibwin.h oslibutil.h oslibgdi.h $(PDWIN32_INCLUDE)\winconst.h 142 142 oslibutil.obj: oslibutil.cpp oslibutil.h $(PDWIN32_INCLUDE)\wprocess.h oslibmsg.h 143 oslibmsg.obj: oslibmsg.cpp oslibmsg.h timer.h 143 oslibmsg.obj: oslibmsg.cpp oslibmsg.h timer.h win32wbase.h win32wnd.h 144 144 oslibmenu.obj: oslibmenu.cpp oslibmenu.h 145 145 oslibgdi.obj: oslibgdi.cpp oslibgdi.h win32wbase.h -
trunk/src/user32/char.cpp
r1309 r1831 1 /* $Id: char.cpp,v 1. 8 1999-10-15 11:28:28 phallerExp $ */1 /* $Id: char.cpp,v 1.9 1999-11-24 19:32:21 sandervl Exp $ */ 2 2 3 3 /* … … 29 29 LPSTR WIN32API CharLowerA( LPSTR arg1) 30 30 { 31 dprintf (("USER32: OS2CharLowerA\n"));31 dprintf2(("USER32: OS2CharLowerA\n")); 32 32 return O32_CharLower(arg1); 33 33 } … … 36 36 DWORD WIN32API CharLowerBuffA( LPSTR arg1, DWORD arg2) 37 37 { 38 dprintf (("USER32: OS2CharLowerBuffA\n"));38 dprintf2(("USER32: OS2CharLowerBuffA\n")); 39 39 return O32_CharLowerBuff(arg1, arg2); 40 40 } … … 45 45 DWORD done=0; 46 46 47 dprintf (("USER32: CharLowerBuffW(%08xh,%08xh)\n",47 dprintf2(("USER32: CharLowerBuffW(%08xh,%08xh)\n", 48 48 x, 49 49 buflen)); … … 65 65 LPWSTR WIN32API CharLowerW( LPWSTR x) 66 66 { 67 dprintf (("USER32: CharLowerW(%08xh)\n",67 dprintf2(("USER32: CharLowerW(%08xh)\n", 68 68 x)); 69 69 … … 85 85 LPSTR WIN32API CharNextA( LPCSTR arg1) 86 86 { 87 dprintf (("USER32: OS2CharNextA(%08xh)\n",87 dprintf2(("USER32: OS2CharNextA(%08xh)\n", 88 88 arg1)); 89 89 … … 94 94 LPWSTR WIN32API CharNextW(LPCWSTR x) 95 95 { 96 dprintf (("USER32: OS2CharNextW(%08xh)\n",96 dprintf2(("USER32: OS2CharNextW(%08xh)\n", 97 97 x)); 98 98 … … 106 106 LPSTR WIN32API CharPrevA( LPCSTR arg1, LPCSTR arg2) 107 107 { 108 dprintf (("USER32: OS2CharPrevA\n"));108 dprintf2(("USER32: OS2CharPrevA\n")); 109 109 return O32_CharPrev(arg1, arg2); 110 110 } … … 114 114 LPCWSTR x) 115 115 { 116 dprintf (("USER32: OS2CharPrevW(%08xh,%08xh)\n",116 dprintf2(("USER32: OS2CharPrevW(%08xh,%08xh)\n", 117 117 start, 118 118 x)); … … 128 128 BOOL WIN32API CharToOemA( LPCSTR arg1, LPSTR arg2) 129 129 { 130 dprintf (("USER32: OS2CharToOemA\n"));130 dprintf2(("USER32: OS2CharToOemA\n")); 131 131 return O32_CharToOem(arg1, arg2); 132 132 } … … 135 135 BOOL WIN32API CharToOemBuffA( LPCSTR arg1, LPSTR arg2, DWORD arg3) 136 136 { 137 dprintf (("USER32: OS2CharToOemBuffA\n"));137 dprintf2(("USER32: OS2CharToOemBuffA\n")); 138 138 return O32_CharToOemBuff(arg1, arg2, arg3); 139 139 } … … 142 142 BOOL WIN32API CharToOemBuffW( LPCWSTR arg1, LPSTR arg2, DWORD arg3) 143 143 { 144 dprintf (("USER32: OS2CharToOemBuffW DOESN'T WORK\n"));144 dprintf2(("USER32: OS2CharToOemBuffW DOESN'T WORK\n")); 145 145 // NOTE: This will not work as is (needs UNICODE support) 146 146 return 0; … … 151 151 BOOL WIN32API CharToOemW( LPCWSTR arg1, LPSTR arg2) 152 152 { 153 dprintf (("USER32: OS2CharToOemW DOESN'T WORK\n"));153 dprintf2(("USER32: OS2CharToOemW DOESN'T WORK\n")); 154 154 // NOTE: This will not work as is (needs UNICODE support) 155 155 return 0; … … 163 163 164 164 if((int)arg1 >> 16 != 0) { 165 dprintf (("USER32: OS2CharUpperA %s\n", arg1));165 dprintf2(("USER32: OS2CharUpperA %s\n", arg1)); 166 166 } 167 167 else { 168 dprintf (("USER32: OS2CharUpperA %X\n", arg1));168 dprintf2(("USER32: OS2CharUpperA %X\n", arg1)); 169 169 } 170 170 … … 172 172 173 173 if((int)rc >> 16 != 0) { 174 dprintf (("USER32: OS2CharUpperA %s\n", rc));174 dprintf2(("USER32: OS2CharUpperA %s\n", rc)); 175 175 } 176 176 else { 177 dprintf (("USER32: OS2CharUpperA %X\n", rc));177 dprintf2(("USER32: OS2CharUpperA %X\n", rc)); 178 178 } 179 179 … … 184 184 DWORD WIN32API CharUpperBuffA( LPSTR arg1, DWORD arg2) 185 185 { 186 dprintf (("USER32: OS2CharUpperBuffA\n"));186 dprintf2(("USER32: OS2CharUpperBuffA\n")); 187 187 return O32_CharUpperBuff(arg1, arg2); 188 188 } … … 193 193 DWORD done=0; 194 194 195 dprintf (("USER32: OS2CharUpperBuffW(%08xh,%08xh)\n",195 dprintf2(("USER32: OS2CharUpperBuffW(%08xh,%08xh)\n", 196 196 x, 197 197 buflen)); … … 269 269 DWORD dwFlags) 270 270 { 271 dprintf (("USER32:CharNextExW(%u,%08xh,%08x) not implemented.\n",271 dprintf2(("USER32:CharNextExW(%u,%08xh,%08x) not implemented.\n", 272 272 CodePage, 273 273 lpCurrentChar, … … 299 299 DWORD dwFlags) 300 300 { 301 dprintf (("USER32:CharPrevExW(%u,%08xh,%08xh,%08x) not implemented.\n",301 dprintf2(("USER32:CharPrevExW(%u,%08xh,%08xh,%08x) not implemented.\n", 302 302 CodePage, 303 303 lpStart, -
trunk/src/user32/oslibmsg.cpp
r1688 r1831 1 /* $Id: oslibmsg.cpp,v 1.1 0 1999-11-10 14:16:45sandervl Exp $ */1 /* $Id: oslibmsg.cpp,v 1.11 1999-11-24 19:32:21 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 10 10 * 11 11 * TODO: Simply copy for now. Need to make a real translation 12 * TODO: Filter translation isn't correct for posted messages 12 13 * 13 14 */ … … 124 125 void OS2ToWinMsgTranslate(QMSG *os2Msg, MSG *winMsg, BOOL isUnicode) 125 126 { 127 POSTMSG_PACKET *packet; 126 128 int i; 127 129 … … 129 131 winMsg->hwnd = Win32Window::OS2ToWin32Handle(os2Msg->hwnd); 130 132 131 if(os2Msg->msg >= WIN32APP_USERMSGBASE) { 132 winMsg->message = os2Msg->msg - WIN32APP_USERMSGBASE; 133 if(os2Msg->msg == WIN32APP_POSTMSG) { 134 packet = (POSTMSG_PACKET *)os2Msg->mp2; 135 if(packet && (ULONG)os2Msg->mp1 == WIN32PM_MAGIC) { 136 winMsg->message = packet->Msg; 137 winMsg->wParam = packet->wParam; 138 winMsg->lParam = packet->lParam; 139 } 133 140 return; 134 141 } … … 150 157 ULONG TranslateWinMsg(ULONG msg) 151 158 { 159 POSTMSG_PACKET *packet; 152 160 THDB *thdb; 153 161 … … 157 165 } 158 166 159 if(msg >= WIN WM_USER)160 return msg + WIN32APP_USERMSGBASE;167 if(msg >= WIN32APP_USERMSGBASE) 168 return WIN32APP_POSTMSG; 161 169 162 170 for(int i=0;i<MAX_MSGTRANSTAB;i++) -
trunk/src/user32/oslibwin.cpp
r1801 r1831 1 /* $Id: oslibwin.cpp,v 1.4 6 1999-11-21 17:07:50 cbratschiExp $ */1 /* $Id: oslibwin.cpp,v 1.47 1999-11-24 19:32:21 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 259 259 //****************************************************************************** 260 260 //****************************************************************************** 261 ULONG OSLibWinBroadcastMsg(ULONG msg, ULONG wParam, ULONG lParam, BOOL fSend) 262 { 263 return WinBroadcastMsg(HWND_DESKTOP, msg, (MPARAM)wParam, (MPARAM)lParam, 264 (fSend) ? BMSG_SEND : BMSG_POST); 265 } 261 266 //****************************************************************************** 262 267 //****************************************************************************** -
trunk/src/user32/oslibwin.h
r1704 r1831 1 /* $Id: oslibwin.h,v 1.2 5 1999-11-11 13:17:30sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.26 1999-11-24 19:32:21 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 52 52 BOOL OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam); 53 53 ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam); 54 ULONG OSLibWinBroadcastMsg(ULONG msg, ULONG wParam, ULONG lParam, BOOL fSend); 54 55 55 56 #define WAOS_WARNING 0 -
trunk/src/user32/pmwindow.cpp
r1818 r1831 1 /* $Id: pmwindow.cpp,v 1.5 5 1999-11-23 19:34:19sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.56 1999-11-24 19:32:22 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 212 212 goto RunDefWndProc; 213 213 } 214 if(msg > WIN32APP_USERMSGBASE) { 215 //win32 app user message 216 return (MRESULT)win32wnd->SendMessageA((ULONG)msg-WIN32APP_USERMSGBASE, (ULONG)mp1, (ULONG)mp2); 214 if(msg == WIN32APP_POSTMSG && (ULONG)mp1 == WIN32PM_MAGIC) { 215 //win32 app user message 216 win32wnd->PostMessage((POSTMSG_PACKET *)mp2); 217 return (MRESULT)0; 217 218 } 218 219 switch( msg ) -
trunk/src/user32/win32wbase.cpp
r1814 r1831 1 /* $Id: win32wbase.cpp,v 1.9 2 1999-11-22 21:42:06 cbratschiExp $ */1 /* $Id: win32wbase.cpp,v 1.93 1999-11-24 19:32:22 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2010 2010 BOOL Win32BaseWindow::PostMessageA(ULONG msg, WPARAM wParam, LPARAM lParam) 2011 2011 { 2012 return OSLibPostMessage(OS2Hwnd, WIN32APP_USERMSGBASE+msg, wParam, lParam); 2012 POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET)); 2013 2014 packet->Msg = msg; 2015 packet->wParam = wParam; 2016 packet->lParam = lParam; 2017 packet->fUnicode = FALSE; 2018 return OSLibPostMessage(OS2Hwnd, WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet); 2013 2019 } 2014 2020 //****************************************************************************** … … 2016 2022 BOOL Win32BaseWindow::PostMessageW(ULONG msg, WPARAM wParam, LPARAM lParam) 2017 2023 { 2018 return OSLibPostMessage(OS2Hwnd, WIN32APP_USERMSGBASE+msg, wParam, lParam); 2024 POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET)); 2025 2026 packet->Msg = msg; 2027 packet->wParam = wParam; 2028 packet->lParam = lParam; 2029 packet->fUnicode = TRUE; 2030 return OSLibPostMessage(OS2Hwnd, WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet); 2031 } 2032 //****************************************************************************** 2033 //****************************************************************************** 2034 BOOL Win32BaseWindow::PostThreadMessageA(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam) 2035 { 2036 POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET)); 2037 2038 packet->Msg = msg; 2039 packet->wParam = wParam; 2040 packet->lParam = lParam; 2041 packet->fUnicode = FALSE; 2042 return O32_PostThreadMessage(threadid, WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet); 2043 } 2044 //****************************************************************************** 2045 //****************************************************************************** 2046 BOOL Win32BaseWindow::PostThreadMessageW(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam) 2047 { 2048 POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET)); 2049 2050 packet->Msg = msg; 2051 packet->wParam = wParam; 2052 packet->lParam = lParam; 2053 packet->fUnicode = TRUE; 2054 return O32_PostThreadMessage(threadid, WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet); 2055 } 2056 //****************************************************************************** 2057 //****************************************************************************** 2058 void Win32BaseWindow::PostMessage(POSTMSG_PACKET *packet) 2059 { 2060 if(packet == NULL) 2061 return; 2062 2063 if(packet->fUnicode) { 2064 SendMessageW(packet->Msg, packet->wParam, packet->lParam); 2065 } 2066 else SendMessageA(packet->Msg, packet->wParam, packet->lParam); 2067 2068 free(packet); 2069 } 2070 //****************************************************************************** 2071 //TODO: Probably not complete compatible with win32 implementation 2072 //****************************************************************************** 2073 LRESULT Win32BaseWindow::BroadcastMessageA(int type, UINT msg, WPARAM wParam, LPARAM lParam) 2074 { 2075 POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET)); 2076 2077 dprintf(("BroadCastMessageA %x %x %x", msg, wParam, lParam)); 2078 return 0; 2079 2080 packet->Msg = msg; 2081 packet->wParam = wParam; 2082 packet->lParam = lParam; 2083 packet->fUnicode = FALSE; 2084 2085 return OSLibWinBroadcastMsg(WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet, type == BROADCAST_SEND); 2086 } 2087 //****************************************************************************** 2088 //TODO: Probably not complete compatible with win32 implementation 2089 //****************************************************************************** 2090 LRESULT Win32BaseWindow::BroadcastMessageW(int type, UINT msg, WPARAM wParam, LPARAM lParam) 2091 { 2092 POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET)); 2093 2094 dprintf(("BroadCastMessageW %x %x %x", msg, wParam, lParam)); 2095 return 0; 2096 2097 packet->Msg = msg; 2098 packet->wParam = wParam; 2099 packet->lParam = lParam; 2100 packet->fUnicode = TRUE; 2101 2102 return OSLibWinBroadcastMsg(WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet, type == BROADCAST_SEND); 2019 2103 } 2020 2104 //****************************************************************************** … … 2441 2525 //****************************************************************************** 2442 2526 HWND Win32BaseWindow::FindWindowEx(HWND hwndParent, HWND hwndChildAfter, LPSTR lpszClass, LPSTR lpszWindow, 2443 BOOL fUnicode)2527 BOOL fUnicode) 2444 2528 { 2445 2529 Win32BaseWindow *parent = GetWindowFromHandle(hwndParent); … … 2862 2946 Win32BaseWindow *window; 2863 2947 2864 if(hwnd == NULL && windowDesktop)2865 return windowDesktop;2866 2867 2948 if(HwGetWindowHandleData(hwnd, (DWORD *)&window) == TRUE) { 2868 2949 return window; -
trunk/src/user32/win32wbase.h
r1801 r1831 1 /* $Id: win32wbase.h,v 1.4 4 1999-11-21 17:07:52 cbratschiExp $ */1 /* $Id: win32wbase.h,v 1.45 1999-11-24 19:32:23 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 33 33 #define CheckMagicDword(a) (a==WIN32PM_MAGIC) 34 34 35 #define WIN32APP_USERMSGBASE 0x100036 37 35 typedef struct { 38 36 USHORT cb; … … 41 39 } CUSTOMWNDDATA; 42 40 41 #define WIN32APP_USERMSGBASE 0x1000 42 #define WIN32APP_POSTMSG 0x6666 43 43 44 typedef struct 44 45 { … … 46 47 ULONG wParam; 47 48 ULONG lParam; 49 ULONG fUnicode; 48 50 } POSTMSG_PACKET; 49 51 50 52 #define WM_WIN32_POSTMESSAGEA 0x4000 51 53 #define WM_WIN32_POSTMESSAGEW 0x4001 54 55 #define BROADCAST_SEND 0 56 #define BROADCAST_POST 1 52 57 53 58 class Win32BaseWindow : public GenericObject, public ChildWindow … … 204 209 BOOL PostMessageA(ULONG msg, WPARAM wParam, LPARAM lParam); 205 210 BOOL PostMessageW(ULONG msg, WPARAM wParam, LPARAM lParam); 211 void PostMessage(POSTMSG_PACKET *packet); 212 static BOOL PostThreadMessageA(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam); 213 static BOOL PostThreadMessageW(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam); 214 static LRESULT BroadcastMessageA(int type, UINT msg, WPARAM wParam, LPARAM lParam); 215 static LRESULT BroadcastMessageW(int type, UINT msg, WPARAM wParam, LPARAM lParam); 216 206 217 LRESULT DefWindowProcA(UINT msg, WPARAM wParam, LPARAM lParam); 207 218 LRESULT DefWindowProcW(UINT msg, WPARAM wParam, LPARAM lParam); -
trunk/src/user32/win32wdesktop.cpp
r1433 r1831 1 /* $Id: win32wdesktop.cpp,v 1. 5 1999-10-24 22:56:10sandervl Exp $ */1 /* $Id: win32wdesktop.cpp,v 1.6 1999-11-24 19:32:23 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Desktop Window for OS/2 … … 47 47 OS2HwndFrame = OSLIB_HWND_DESKTOP; 48 48 rectClient = rectWindow; 49 Win32Hwnd = 0; 49 50 if(HwAllocateWindowHandle(&Win32Hwnd, (ULONG)this) == FALSE) 51 { 52 dprintf(("Win32BaseWindow::Init HwAllocateWindowHandle failed!!")); 53 DebugInt3(); 54 } 50 55 51 56 /* Find the window class */ -
trunk/src/user32/windowmsg.cpp
r1688 r1831 1 /* $Id: windowmsg.cpp,v 1. 5 1999-11-10 14:16:45sandervl Exp $ */1 /* $Id: windowmsg.cpp,v 1.6 1999-11-24 19:32:23 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message APIs for OS/2 … … 114 114 } 115 115 //****************************************************************************** 116 //TODO: hwnd == HWND_BROADCAST117 116 //****************************************************************************** 118 117 LRESULT WIN32API SendMessageA(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) 119 118 { 120 119 Win32BaseWindow *window; 120 121 if (hwnd == HWND_BROADCAST|| hwnd == HWND_TOPMOST) 122 { 123 Win32BaseWindow::BroadcastMessageA(BROADCAST_SEND, msg, wParam, lParam); 124 return TRUE; 125 } 121 126 122 127 window = Win32BaseWindow::GetWindowFromHandle(hwnd); … … 128 133 } 129 134 //****************************************************************************** 130 //TODO: hwnd == HWND_BROADCAST131 135 //****************************************************************************** 132 136 LRESULT WIN32API SendMessageW(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) 133 137 { 134 138 Win32BaseWindow *window; 139 140 if (hwnd == HWND_BROADCAST|| hwnd == HWND_TOPMOST) 141 { 142 Win32BaseWindow::BroadcastMessageW(BROADCAST_SEND, msg, wParam, lParam); 143 return TRUE; 144 } 135 145 136 146 window = Win32BaseWindow::GetWindowFromHandle(hwnd); … … 142 152 } 143 153 //****************************************************************************** 144 //TODO: hwnd == HWND_BROADCAST145 154 //****************************************************************************** 146 155 BOOL WIN32API PostMessageA(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) 147 156 { 148 157 Win32BaseWindow *window; 158 159 if (hwnd == HWND_BROADCAST) //Not HWND_TOPMOST??? 160 { 161 Win32BaseWindow::BroadcastMessageA(BROADCAST_POST, msg, wParam, lParam); 162 return TRUE; 163 } 149 164 150 165 if(hwnd == NULL) … … 160 175 } 161 176 //****************************************************************************** 162 //TODO: hwnd == HWND_BROADCAST163 177 //****************************************************************************** 164 178 BOOL WIN32API PostMessageW(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) 165 179 { 166 180 Win32BaseWindow *window; 181 182 if (hwnd == HWND_BROADCAST) //Not HWND_TOPMOST??? 183 { 184 Win32BaseWindow::BroadcastMessageW(BROADCAST_POST, msg, wParam, lParam); 185 return TRUE; 186 } 167 187 168 188 if(hwnd == NULL) … … 208 228 { 209 229 dprintf(("USER32: PostThreadMessageA\n")); 210 return O32_PostThreadMessage(threadid, WIN32APP_USERMSGBASE+msg, wParam, lParam);230 return Win32BaseWindow::PostThreadMessageA(threadid, msg, wParam, lParam); 211 231 } 212 232 //****************************************************************************** … … 215 235 { 216 236 dprintf(("USER32: PostThreadMessageW\n")); 217 return O32_PostThreadMessage(threadid, WIN32APP_USERMSGBASE+msg, wParam, lParam);237 return Win32BaseWindow::PostThreadMessageW(threadid, msg, wParam, lParam); 218 238 } 219 239 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.