Changeset 1704
- Timestamp:
- Nov 11, 1999, 2:17:33 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/user32/dc.cpp ¶
r1688 r1704 1 /* $Id: dc.cpp,v 1.2 0 1999-11-10 14:16:44sandervl Exp $ */1 /* $Id: dc.cpp,v 1.21 1999-11-11 13:17:29 sandervl Exp $ */ 2 2 3 3 /* … … 875 875 if (hwnd == NULLHANDLE) 876 876 { 877 #if 1 878 // Don't do this for now (causes lots of desktop repaints in WordPad) 879 O32_SetLastError (ERROR_INVALID_PARAMETER); 880 return FALSE; 881 #else 877 882 hwnd = HWND_DESKTOP; 878 883 wnd = Win32BaseWindow::GetWindowFromOS2Handle(OSLIB_HWND_DESKTOP); … … 885 890 return FALSE; 886 891 } 887 892 #endif 888 893 } 889 894 else … … 1415 1420 //****************************************************************************** 1416 1421 //****************************************************************************** 1422 INT WIN32API ExcludeUpdateRgn( HDC hDC, HWND hWnd) 1423 { 1424 dprintf(("USER32: ExcludeUpdateRgn\n")); 1425 hWnd = Win32BaseWindow::Win32ToOS2Handle(hWnd); 1426 1427 return O32_ExcludeUpdateRgn(hDC,hWnd); 1428 } 1429 //****************************************************************************** 1430 //****************************************************************************** -
TabularUnified trunk/src/user32/dc.h ¶
r1550 r1704 1 /* $Id: dc.h,v 1. 7 1999-11-02 19:13:00sandervl Exp $ */1 /* $Id: dc.h,v 1.8 1999-11-11 13:17:29 sandervl Exp $ */ 2 2 /* 3 3 * public dc functions … … 332 332 } 333 333 334 BOOL OPEN32API _O32_ExcludeUpdateRgn( HDC, HWND ); 335 336 inline BOOL O32_ExcludeUpdateRgn(HDC a, HWND b) 337 { 338 BOOL yyrc; 339 USHORT sel = RestoreOS2FS(); 340 341 yyrc = _O32_ExcludeUpdateRgn(a, b); 342 SetFS(sel); 343 344 return yyrc; 345 } 346 334 347 BOOL OPEN32API _O32_CreateCaret (HWND hwnd, HBITMAP hbm, int width, int height); 335 348 -
TabularUnified trunk/src/user32/oslibwin.cpp ¶
r1693 r1704 1 /* $Id: oslibwin.cpp,v 1.4 3 1999-11-10 17:11:29 cbratschiExp $ */1 /* $Id: oslibwin.cpp,v 1.44 1999-11-11 13:17:29 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 1164 1164 //****************************************************************************** 1165 1165 //****************************************************************************** 1166 BOOL OSLibWinGetKeyboardStateTable(unsigned char *PMKeyState) 1167 { 1168 return WinSetKeyboardStateTable(HWND_DESKTOP, (PBYTE)&PMKeyState, FALSE ); 1169 } 1170 //****************************************************************************** 1171 //****************************************************************************** 1172 BOOL OSLibWinSetKeyboardStateTable(unsigned char *PMKeyState) 1173 { 1174 return WinSetKeyboardStateTable(HWND_DESKTOP, (PBYTE)&PMKeyState, TRUE ); 1175 } 1176 //****************************************************************************** 1177 //****************************************************************************** -
TabularUnified trunk/src/user32/oslibwin.h ¶
r1693 r1704 1 /* $Id: oslibwin.h,v 1.2 4 1999-11-10 17:11:29 cbratschiExp $ */1 /* $Id: oslibwin.h,v 1.25 1999-11-11 13:17:30 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 281 281 BOOL OSLibSetWindowMinPos(HWND hwnd, ULONG x, ULONG y); 282 282 283 BOOL OSLibWinGetKeyboardStateTable(unsigned char * PMKeyState); 284 BOOL OSLibWinSetKeyboardStateTable(unsigned char * PMKeyState); 285 283 286 #endif //__OSLIBWIN_H__ -
TabularUnified trunk/src/user32/pmframe.cpp ¶
r1693 r1704 1 /* $Id: pmframe.cpp,v 1.2 2 1999-11-10 17:11:29 cbratschiExp $ */1 /* $Id: pmframe.cpp,v 1.23 1999-11-11 13:17:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 312 312 goto RunDefFrameProc; //CB: must call def frame proc or frame control activation is broken 313 313 } 314 314 315 315 case WM_WINDOWPOSCHANGED: 316 316 { -
TabularUnified trunk/src/user32/user32.cpp ¶
r1671 r1704 1 /* $Id: user32.cpp,v 1.5 2 1999-11-09 19:23:16sandervl Exp $ */1 /* $Id: user32.cpp,v 1.53 1999-11-11 13:17:30 sandervl Exp $ */ 2 2 3 3 /* … … 1038 1038 /* Help Functions */ 1039 1039 1040 DWORD WIN32API GetWindowContextHelpId(HWND hwnd)1041 {1042 #ifdef DEBUG1043 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");1044 #endif1045 hwnd = Win32Window::Win32ToOS2Handle(hwnd);1046 1047 return(0);1048 }1049 //******************************************************************************1050 //******************************************************************************1051 BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)1052 {1053 #ifdef DEBUG1054 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");1055 #endif1056 hwnd = Win32Window::Win32ToOS2Handle(hwnd);1057 1058 return(TRUE);1059 }1060 //******************************************************************************1061 //******************************************************************************1062 1040 BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData) 1063 1041 { … … 1123 1101 { 1124 1102 return (GetOEMCP()); 1125 }1126 /*****************************************************************************1127 * Name : BOOL WIN32API GetKeyboardLayoutNameA1128 * Purpose : The GetKeyboardLayoutName function retrieves the name of the1129 * active keyboard layout.1130 * Parameters: LPTSTR pwszKLID address of buffer for layout name1131 * Variables :1132 * Result : If the function succeeds, the return value is TRUE.1133 * If the function fails, the return value is FALSE. To get extended1134 * error information, call GetLastError.1135 * Remark :1136 * Status : UNTESTED STUB1137 *1138 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1139 *****************************************************************************/1140 // @@@PH Win32 BOOL's are casted to INTs1141 INT WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)1142 {1143 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",1144 pwszKLID));1145 1146 return(FALSE);1147 }1148 //******************************************************************************1149 //******************************************************************************1150 int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)1151 {1152 dprintf(("USER32: GetKeyboardLayoutList, not implemented\n"));1153 return(0);1154 }1155 //******************************************************************************1156 //******************************************************************************1157 HKL WIN32API GetKeyboardLayout(DWORD dwLayout)1158 {1159 #ifdef DEBUG1160 WriteLog("USER32: GetKeyboardLayout, not implemented\n");1161 #endif1162 return(0);1163 }1164 /*****************************************************************************1165 * Name : BOOL WIN32API GetKeyboardLayoutNameW1166 * Purpose : The GetKeyboardLayoutName function retrieves the name of the1167 * active keyboard layout.1168 * Parameters: LPTSTR pwszKLID address of buffer for layout name1169 * Variables :1170 * Result : If the function succeeds, the return value is TRUE.1171 * If the function fails, the return value is FALSE. To get extended1172 * error information, call GetLastError.1173 * Remark :1174 * Status : UNTESTED STUB1175 *1176 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1177 *****************************************************************************/1178 // @@@PH Win32 BOOL's are casted to INTs1179 INT WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)1180 {1181 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",1182 pwszKLID));1183 1184 return(FALSE);1185 }1186 //******************************************************************************1187 //******************************************************************************1188 BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)1189 {1190 #ifdef DEBUG1191 WriteLog("USER32: GetKeyboardState, not properly implemented\n");1192 #endif1193 memset(lpKeyState, 0, 256);1194 return(TRUE);1195 1103 } 1196 1104 //****************************************************************************** … … 1409 1317 #endif 1410 1318 hwnd = Win32Window::Win32ToOS2Handle(hwnd); 1411 return(TRUE);1412 }1413 //******************************************************************************1414 //******************************************************************************1415 BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)1416 {1417 #ifdef DEBUG1418 WriteLog("USER32: SetKeyboardState, not implemented\n");1419 #endif1420 1319 return(TRUE); 1421 1320 } … … 1713 1612 return (FALSE); 1714 1613 } 1715 //****************************************************************************** 1716 //****************************************************************************** 1717 HWND WIN32API GetForegroundWindow(void) 1718 { 1719 #ifdef DEBUG 1720 WriteLog("USER32: GetForegroundWindow\n"); 1721 #endif 1722 return Win32Window::OS2ToWin32Handle(O32_GetForegroundWindow()); 1723 } 1724 //****************************************************************************** 1725 //****************************************************************************** 1726 HWND WIN32API GetLastActivePopup( HWND hWnd) 1727 { 1728 #ifdef DEBUG 1729 WriteLog("USER32: GetLastActivePopup\n"); 1730 #endif 1731 hWnd = Win32Window::Win32ToOS2Handle(hWnd); 1732 1733 return Win32Window::OS2ToWin32Handle(O32_GetLastActivePopup(hWnd)); 1734 } 1735 //****************************************************************************** 1736 //****************************************************************************** 1737 DWORD WIN32API GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId) 1738 { 1739 #ifdef DEBUG 1740 WriteLog("USER32: GetWindowThreadProcessId\n"); 1741 #endif 1742 hWnd = Win32Window::Win32ToOS2Handle(hWnd); 1743 1744 return O32_GetWindowThreadProcessId(hWnd,lpdwProcessId); 1745 } 1746 1747 /* Painting and Drawing Functions */ 1748 1749 INT WIN32API ExcludeUpdateRgn( HDC hDC, HWND hWnd) 1750 { 1751 #ifdef DEBUG 1752 WriteLog("USER32: ExcludeUpdateRgn\n"); 1753 #endif 1754 hWnd = Win32Window::Win32ToOS2Handle(hWnd); 1755 1756 return O32_ExcludeUpdateRgn(hDC,hWnd); 1757 } 1614 1758 1615 //****************************************************************************** 1759 1616 //****************************************************************************** -
TabularUnified trunk/src/user32/win32dlg.cpp ¶
r1622 r1704 1 /* $Id: win32dlg.cpp,v 1.3 2 1999-11-05 17:50:30 achimhaExp $ */1 /* $Id: win32dlg.cpp,v 1.33 1999-11-11 13:17:31 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 85 85 } 86 86 } 87 88 //Set help id 89 setWindowContextHelpId(dlgInfo.helpId); 87 90 88 91 /* Create dialog main window */ … … 209 212 } 210 213 } 211 212 //TODO:213 // wndPtr->helpContext = helpId;214 214 215 215 if (hUserFont) … … 1021 1021 LONG oldval; 1022 1022 1023 dprintf2(("Win32Dialog::SetWindowLongA %x %d %x", getWindowHandle(), index, value)); 1023 1024 switch(index) 1024 1025 { 1025 1026 case DWL_DLGPROC: 1026 1027 oldval = (LONG)Win32DlgProc; 1027 Win32DlgProc = (DLGPROC) index;1028 Win32DlgProc = (DLGPROC)value; 1028 1029 return oldval; 1029 1030 case DWL_MSGRESULT: … … 1043 1044 ULONG Win32Dialog::GetWindowLongA(int index) 1044 1045 { 1046 dprintf2(("Win32Dialog::GetWindowLongA %x %d", getWindowHandle(), index)); 1045 1047 switch(index) 1046 1048 { -
TabularUnified trunk/src/user32/win32wbase.cpp ¶
r1694 r1704 1 /* $Id: win32wbase.cpp,v 1.8 0 1999-11-10 20:02:48sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.81 1999-11-11 13:17:31 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 173 173 windowId = 0xFFFFFFFF; //default = -1 174 174 userData = 0; 175 contextHelpId = 0; 175 176 176 177 pOldFrameProc = NULL; … … 1151 1152 1152 1153 if(ISMOUSE_CAPTURED()) { 1153 1154 POINT point = {x,y}; 1154 1155 1155 1156 MapWindowPoints(getWindowHandle(), HWND_DESKTOP, &point, 1); 1156 1157 1157 if(DInputMouseHandler(getWindowHandle(), MOUSEMSG_MOVE, point.x, point.y, keystate)) 1158 return 0; 1158 1159 } 1159 1160 … … 2692 2693 LONG oldval; 2693 2694 2694 switch(index) { 2695 dprintf2(("SetWindowLongA %x %d %x", getWindowHandle(), index, value)); 2696 switch(index) { 2695 2697 case GWL_EXSTYLE: 2696 2698 { … … 2752 2754 SetLastError(ERROR_INVALID_PARAMETER); 2753 2755 return 0; 2754 }2756 } 2755 2757 } 2756 2758 //****************************************************************************** … … 2758 2760 ULONG Win32BaseWindow::GetWindowLongA(int index) 2759 2761 { 2760 switch(index) { 2762 dprintf2(("GetWindowLongA %x %d", getWindowHandle(), index)); 2763 switch(index) { 2761 2764 case GWL_EXSTYLE: 2762 2765 return dwExStyle; … … 2783 2786 SetLastError(ERROR_INVALID_PARAMETER); 2784 2787 return 0; 2785 }2788 } 2786 2789 } 2787 2790 //****************************************************************************** … … 2838 2841 Win32BaseWindow *win32wnd; 2839 2842 DWORD magic; 2843 2844 if(hwnd == OSLIB_HWND_DESKTOP) 2845 { 2846 return windowDesktop; 2847 } 2840 2848 2841 2849 win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32WNDPTR); -
TabularUnified trunk/src/user32/win32wbase.h ¶
r1693 r1704 1 /* $Id: win32wbase.h,v 1.4 2 1999-11-10 17:11:31 cbratschiExp $ */1 /* $Id: win32wbase.h,v 1.43 1999-11-11 13:17:32 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 107 107 HWND getOS2FrameWindowHandle() { return OS2HwndFrame; }; 108 108 Win32WndClass *getWindowClass() { return windowClass; }; 109 110 DWORD getWindowContextHelpId() { return contextHelpId; }; 111 void setWindowContextHelpId(DWORD id){ contextHelpId = id; }; 109 112 110 113 BOOL isFrameWindow(); … … 268 271 HWND hwndLinkAfter; 269 272 DWORD flags; 273 DWORD contextHelpId; 270 274 LONG lastHitTestVal; //Last value returned by WM_NCHITTEST handler 271 275 -
TabularUnified trunk/src/user32/window.cpp ¶
r1606 r1704 1 /* $Id: window.cpp,v 1.3 3 1999-11-05 09:16:22 sandervl Exp $ */1 /* $Id: window.cpp,v 1.34 1999-11-11 13:17:32 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 1141 1141 { 1142 1142 dprintf(("USER32: ChildWindowFromPoint\n")); 1143 // return O32_ChildWindowFromPoint(arg1, arg2);1144 1143 return ChildWindowFromPointEx(hwnd, pt, 0); 1145 1144 } … … 1304 1303 return (0); 1305 1304 } 1306 /***************************************************************************** 1307 * Name : BOOL WIN32API SwitchToThisWindow 1308 * Purpose : Unknown 1309 * Parameters: Unknown 1310 * Variables : 1311 * Result : 1312 * Remark : 1313 * Status : UNTESTED UNKNOWN STUB 1314 * 1315 * Author : Patrick Haller [Wed, 1998/06/16 11:55] 1316 *****************************************************************************/ 1317 1318 BOOL WIN32API SwitchToThisWindow(HWND hwnd, 1319 BOOL x2) 1320 { 1321 dprintf(("USER32: SwitchToThisWindow(%08xh,%08xh) not implemented.\n", 1322 hwnd, 1323 x2)); 1324 1325 return (FALSE); /* default */ 1305 /*********************************************************************** 1306 * SwitchToThisWindow (USER32.539) 1307 */ 1308 DWORD WINAPI SwitchToThisWindow( HWND hwnd, BOOL restore ) 1309 { 1310 return ShowWindow( hwnd, restore ? SW_RESTORE : SW_SHOWMINIMIZED ); 1326 1311 } 1327 1312 //****************************************************************************** … … 1433 1418 BOOL WIN32API OpenIcon(HWND hwnd) 1434 1419 { 1435 #ifdef DEBUG 1436 WriteLog("USER32: OpenIcon\n"); 1437 #endif 1420 dprintf(("USER32: OpenIcon")); 1421 1438 1422 if(!IsIconic(hwnd)) 1439 1423 return FALSE; … … 1450 1434 //****************************************************************************** 1451 1435 //****************************************************************************** 1452 1436 HWND WIN32API GetForegroundWindow(void) 1437 { 1438 dprintf(("USER32: GetForegroundWindow")); 1439 return Win32BaseWindow::OS2ToWin32Handle(O32_GetForegroundWindow()); 1440 } 1441 //****************************************************************************** 1442 //****************************************************************************** 1443 HWND WIN32API GetLastActivePopup( HWND hWnd) 1444 { 1445 dprintf(("USER32: GetLastActivePopup")); 1446 hWnd = Win32BaseWindow::Win32ToOS2Handle(hWnd); 1447 1448 return Win32BaseWindow::OS2ToWin32Handle(O32_GetLastActivePopup(hWnd)); 1449 } 1450 //****************************************************************************** 1451 //****************************************************************************** 1452 DWORD WIN32API GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId) 1453 { 1454 dprintf(("USER32: GetWindowThreadProcessId")); 1455 hWnd = Win32BaseWindow::Win32ToOS2Handle(hWnd); 1456 1457 return O32_GetWindowThreadProcessId(hWnd,lpdwProcessId); 1458 } 1459 //****************************************************************************** 1460 //****************************************************************************** 1461 DWORD WIN32API GetWindowContextHelpId(HWND hwnd) 1462 { 1463 dprintf(("USER32: GetWindowContextHelpId, not implemented\n")); 1464 hwnd = Win32BaseWindow::Win32ToOS2Handle(hwnd); 1465 1466 return(0); 1467 } 1468 //****************************************************************************** 1469 //****************************************************************************** 1470 BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId) 1471 { 1472 dprintf(("USER32: SetWindowContextHelpId, not implemented")); 1473 hwnd = Win32BaseWindow::Win32ToOS2Handle(hwnd); 1474 1475 return(TRUE); 1476 } 1477 //****************************************************************************** 1478 //****************************************************************************** -
TabularUnified trunk/src/user32/windowword.cpp ¶
r1333 r1704 1 /* $Id: windowword.cpp,v 1. 2 1999-10-17 12:17:46 cbratschiExp $ */1 /* $Id: windowword.cpp,v 1.3 1999-11-11 13:17:33 sandervl Exp $ */ 2 2 3 3 /* … … 25 25 { 26 26 return window->SetWindowLongA(nIndex,lNewLong); 27 } else 27 } 28 else 28 29 { 29 30 if (nIndex == GWL_WNDPROC && !Win32BaseWindow::GetWindowFromOS2Handle(hwnd)) … … 47 48 48 49 return (LONG)window->getOldWndProc(); 49 } else dprintf(("SetWindowLongA; window %x not found!", hwnd)); 50 } 51 else dprintf(("SetWindowLongA; window %x not found!", hwnd)); 50 52 } 51 53 return 0; … … 61 63 { 62 64 return window->SetWindowLongA(nIndex,lNewLong); 63 } else 65 } 66 else 64 67 { 65 68 if (nIndex == GWL_WNDPROC && !Win32BaseWindow::GetWindowFromOS2Handle(hwnd)) … … 83 86 84 87 return (LONG)window->getOldWndProc(); 85 } else dprintf(("SetWindowLongW; window %x not found!", hwnd)); 88 } 89 else dprintf(("SetWindowLongW; window %x not found!", hwnd)); 86 90 } 87 91 return 0; … … 96 100 if(window) 97 101 { 98 return window->GetWindowWord(nIndex);102 return window->GetWindowWord(nIndex); 99 103 } 100 104 else 101 105 { 102 dprintf(("GetWindowWord; window %x not found!", hwnd));106 dprintf(("GetWindowWord; window %x not found!", hwnd)); 103 107 } 104 108 return 0; … … 113 117 if(window) 114 118 { 115 return window->SetWindowWord(nIndex, arg3);119 return window->SetWindowWord(nIndex, arg3); 116 120 } 117 121 else 118 122 { 119 dprintf(("SetWindowWord; window %x not found!", hwnd));123 dprintf(("SetWindowWord; window %x not found!", hwnd)); 120 124 } 121 125 return 0; … … 130 134 if(window) 131 135 { 132 return window->GetWindowLongA(nIndex);136 return window->GetWindowLongA(nIndex); 133 137 } 134 138 else 135 139 { 136 dprintf(("GetWindowLongA; window %x not found!", hwnd));140 dprintf(("GetWindowLongA; window %x not found!", hwnd)); 137 141 } 138 142 return 0; … … 147 151 if(window) 148 152 { 149 return window->GetWindowLongA(nIndex);153 return window->GetWindowLongA(nIndex); 150 154 } 151 155 else 152 156 { 153 dprintf(("GetWindowLongW; window %x not found!", hwnd));157 dprintf(("GetWindowLongW; window %x not found!", hwnd)); 154 158 } 155 159 return 0; -
TabularUnified trunk/src/user32/winkeyboard.cpp ¶
r1629 r1704 1 /* $Id: winkeyboard.cpp,v 1. 1 1999-11-08 13:44:40sandervl Exp $ */1 /* $Id: winkeyboard.cpp,v 1.2 1999-11-11 13:17:33 sandervl Exp $ */ 2 2 /* 3 3 * Win32 <-> PM key translation … … 9 9 #include <os2win.h> 10 10 #include <odin.h> 11 #include <string.h> 12 #include <stdio.h> 11 13 #include <winkeyboard.h> 14 #include "oslibwin.h" 15 #include <heapstring.h> 12 16 13 17 BYTE abPMScanToWinVKey[256] = … … 289 293 //****************************************************************************** 290 294 //****************************************************************************** 295 BOOL WIN32API GetKeyboardState(PBYTE lpKeyState) 296 { 297 BYTE PMKeyState[256]; 298 BOOL rc; 299 300 dprintf(("USER32: GetKeyboardState")); 301 rc = OSLibWinGetKeyboardStateTable((PBYTE)&PMKeyState ); 302 303 if(rc == TRUE) 304 { 305 KeyTranslatePMToWinBuf((BYTE *)&PMKeyState, lpKeyState, 256); 306 return TRUE; 307 } 308 return FALSE; 309 } 310 //****************************************************************************** 311 //****************************************************************************** 312 BOOL WIN32API SetKeyboardState(PBYTE lpKeyState) 313 { 314 dprintf(("USER32: SetKeyboardState, not implemented")); 315 return(TRUE); 316 } 317 /*********************************************************************** 318 * GetKeyboardLayout (USER32.250) 319 * 320 * FIXME: - device handle for keyboard layout defaulted to 321 * the language id. This is the way Windows default works. 322 * - the thread identifier (dwLayout) is also ignored. 323 */ 324 // * Remark : Based on Wine version (991031) 325 HKL WIN32API GetKeyboardLayout(DWORD dwLayout) 326 { 327 HKL layout; 328 layout = GetSystemDefaultLCID(); /* FIXME */ 329 layout |= (layout<<16); /* FIXME */ 330 dprintf(("GetKeyboardLayout returning %08x\n",layout)); 331 return layout; 332 } 333 /***************************************************************************** 334 * Name : BOOL WIN32API GetKeyboardLayoutNameA 335 * Purpose : The GetKeyboardLayoutName function retrieves the name of the 336 * active keyboard layout. 337 * Parameters: LPTSTR pwszKLID address of buffer for layout name 338 * Variables : 339 * Result : If the function succeeds, the return value is TRUE. 340 * If the function fails, the return value is FALSE. To get extended 341 * error information, call GetLastError. 342 * Remark : Based on Wine version (991031) 343 * Status : UNTESTED STUB 344 * 345 * Author : Patrick Haller [Thu, 1998/02/26 11:55] 346 *****************************************************************************/ 347 INT WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID) 348 { 349 dprintf(("USER32:GetKeyboardLayoutNameA")); 350 351 sprintf(pwszKLID, "%08x",GetKeyboardLayout(0)); 352 return 1; 353 } 354 /***************************************************************************** 355 * Name : BOOL WIN32API GetKeyboardLayoutNameW 356 * Purpose : The GetKeyboardLayoutName function retrieves the name of the 357 * active keyboard layout. 358 * Parameters: LPTSTR pwszKLID address of buffer for layout name 359 * Variables : 360 * Result : If the function succeeds, the return value is TRUE. 361 * If the function fails, the return value is FALSE. To get extended 362 * error information, call GetLastError. 363 * Remark : Based on Wine version (991031) 364 * Status : UNTESTED STUB 365 * 366 * Author : Patrick Haller [Thu, 1998/02/26 11:55] 367 *****************************************************************************/ 368 INT WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID) 369 { 370 LPSTR buf = (LPSTR)HEAP_xalloc( GetProcessHeap(), 0, strlen("00000409")+1); 371 372 dprintf(("USER32:GetKeyboardLayoutNameA")); 373 int res = GetKeyboardLayoutNameA(buf); 374 lstrcpyAtoW(pwszKLID,buf); 375 HeapFree( GetProcessHeap(), 0, buf ); 376 return res; 377 } 378 /*********************************************************************** 379 * GetKeyboardLayoutList (USER32.251) 380 * 381 * FIXME: Supports only the system default language and layout and 382 * returns only 1 value. 383 * 384 * Return number of values available if either input parm is 385 * 0, per MS documentation. 386 * 387 * Remark : Based on Wine version (991031) 388 */ 389 INT WINAPI GetKeyboardLayoutList(INT nBuff,HKL *layouts) 390 { 391 dprintf(("GetKeyboardLayoutList(%d,%p)\n",nBuff,layouts)); 392 if (!nBuff || !layouts) 393 return 1; 394 if (layouts) 395 layouts[0] = GetKeyboardLayout(0); 396 return 1; 397 } 398 399 //****************************************************************************** 400 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.