Changeset 6162 for trunk/src/user32/user32.cpp
- Timestamp:
- Jul 4, 2001, 8:39:01 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/user32.cpp
r6156 r6162 1 /* $Id: user32.cpp,v 1.10 4 2001-07-03 18:33:27sandervl Exp $ */1 /* $Id: user32.cpp,v 1.105 2001-07-04 06:39:01 sandervl Exp $ */ 2 2 3 3 /* … … 1077 1077 } 1078 1078 1079 /* Keyboard and Input Functions */1080 1081 BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)1082 {1083 dprintf(("USER32: ActivateKeyboardLayout, not implemented\n"));1084 return(TRUE);1085 }1086 /*****************************************************************************1087 * Name : UINT WIN32API GetKBCodePage1088 * Purpose : The GetKBCodePage function is provided for compatibility with1089 * earlier versions of Windows. In the Win32 application programming1090 * interface (API) it just calls the GetOEMCP function.1091 * Parameters:1092 * Variables :1093 * Result : If the function succeeds, the return value is an OEM code-page1094 * identifier, or it is the default identifier if the registry1095 * value is not readable. For a list of OEM code-page identifiers,1096 * see GetOEMCP.1097 * Remark :1098 * Status : COMPLETELY IMPLEMENTED UNTESTED1099 *1100 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1101 *****************************************************************************/1102 1103 UINT WIN32API GetKBCodePage(VOID)1104 {1105 return (GetOEMCP());1106 }1107 //******************************************************************************1108 //******************************************************************************1109 int WIN32API GetKeyNameTextA( LPARAM lParam, LPSTR lpString, int nSize)1110 {1111 dprintf(("USER32: GetKeyNameTextA\n"));1112 return O32_GetKeyNameText(lParam,lpString,nSize);1113 }1114 //******************************************************************************1115 //******************************************************************************1116 int WIN32API GetKeyNameTextW( LPARAM lParam, LPWSTR lpString, int nSize)1117 {1118 dprintf(("USER32: GetKeyNameTextW DOES NOT WORK\n"));1119 // NOTE: This will not work as is (needs UNICODE support)1120 return 0;1121 // return O32_GetKeyNameText(arg1, arg2, arg3);1122 }1123 //******************************************************************************1124 //******************************************************************************1125 SHORT WIN32API GetKeyState( int nVirtKey)1126 {1127 dprintf2(("USER32: GetKeyState %x", nVirtKey));1128 return O32_GetKeyState(nVirtKey);1129 }1130 //******************************************************************************1131 //******************************************************************************1132 WORD WIN32API GetAsyncKeyState(INT nVirtKey)1133 {1134 dprintf2(("USER32: GetAsyncKeyState %x", nVirtKey));1135 return O32_GetAsyncKeyState(nVirtKey);1136 }1137 1138 /*****************************************************************************1139 * Name : VOID WIN32API keybd_event1140 * Purpose : The keybd_event function synthesizes a keystroke. The system1141 * can use such a synthesized keystroke to generate a WM_KEYUP or1142 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls1143 * the keybd_event function.1144 * Parameters: BYTE bVk virtual-key code1145 1146 * BYTE bScan hardware scan code1147 * DWORD dwFlags flags specifying various function options1148 * DWORD dwExtraInfo additional data associated with keystroke1149 * Variables :1150 * Result :1151 * Remark :1152 * Status : UNTESTED STUB1153 *1154 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1155 *****************************************************************************/1156 VOID WIN32API keybd_event (BYTE bVk,1157 BYTE bScan,1158 DWORD dwFlags,1159 DWORD dwExtraInfo)1160 {1161 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",1162 bVk,1163 bScan,1164 dwFlags,1165 dwExtraInfo));1166 }1167 /*****************************************************************************1168 * Name : HLK WIN32API LoadKeyboardLayoutA1169 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into1170 * the system. Several keyboard layouts can be loaded at a time, but1171 * only one per process is active at a time. Loading multiple keyboard1172 * layouts makes it possible to rapidly switch between layouts.1173 * Parameters:1174 * Variables :1175 * Result : If the function succeeds, the return value is the handle of the1176 * keyboard layout.1177 * If the function fails, the return value is NULL. To get extended1178 * error information, call GetLastError.1179 * Remark :1180 * Status : UNTESTED STUB1181 *1182 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1183 *****************************************************************************/1184 HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,1185 UINT Flags)1186 {1187 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",1188 pwszKLID,1189 Flags));1190 1191 return (NULL);1192 }1193 /*****************************************************************************1194 * Name : HLK WIN32API LoadKeyboardLayoutW1195 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into1196 * the system. Several keyboard layouts can be loaded at a time, but1197 * only one per process is active at a time. Loading multiple keyboard1198 * layouts makes it possible to rapidly switch between layouts.1199 * Parameters:1200 * Variables :1201 * Result : If the function succeeds, the return value is the handle of the1202 * keyboard layout.1203 * If the function fails, the return value is NULL. To get extended1204 * error information, call GetLastError.1205 * Remark :1206 * Status : UNTESTED STUB1207 *1208 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1209 *****************************************************************************/1210 HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,1211 UINT Flags)1212 {1213 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",1214 pwszKLID,1215 Flags));1216 1217 return (NULL);1218 }1219 //******************************************************************************1220 //******************************************************************************1221 UINT WIN32API MapVirtualKeyA( UINT uCode, UINT uMapType)1222 {1223 dprintf(("USER32: MapVirtualKeyA\n"));1224 /* A quick fix for Commandos, very incomplete */1225 switch (uMapType) {1226 case 2:1227 if (uCode >= VK_A && uCode <= VK_Z) {1228 return 'A' + uCode - VK_A;1229 }1230 break;1231 }1232 return O32_MapVirtualKey(uCode,uMapType);1233 }1234 //******************************************************************************1235 //******************************************************************************1236 UINT WIN32API MapVirtualKeyW( UINT uCode, UINT uMapType)1237 {1238 dprintf(("USER32: MapVirtualKeyW\n"));1239 // NOTE: This will not work as is (needs UNICODE support)1240 return O32_MapVirtualKey(uCode,uMapType);1241 }1242 /*****************************************************************************1243 * Name : UINT WIN32API MapVirtualKeyExA1244 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key1245 * code into a scan code or character value, or translates a scan1246 * code into a virtual-key code. The function translates the codes1247 * using the input language and physical keyboard layout identified1248 * by the given keyboard layout handle.1249 * Parameters:1250 * Variables :1251 * Result : The return value is either a scan code, a virtual-key code, or1252 * a character value, depending on the value of uCode and uMapType.1253 * If there is no translation, the return value is zero.1254 * Remark :1255 * Status : UNTESTED STUB1256 *1257 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1258 *****************************************************************************/1259 UINT WIN32API MapVirtualKeyExA(UINT uCode,1260 UINT uMapType,1261 HKL dwhkl)1262 {1263 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",1264 uCode,1265 uMapType,1266 dwhkl));1267 1268 return (0);1269 }1270 /*****************************************************************************1271 * Name : UINT WIN32API MapVirtualKeyExW1272 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key1273 * code into a scan code or character value, or translates a scan1274 * code into a virtual-key code. The function translates the codes1275 * using the input language and physical keyboard layout identified1276 * by the given keyboard layout handle.1277 * Parameters:1278 * Variables :1279 * Result : The return value is either a scan code, a virtual-key code, or1280 * a character value, depending on the value of uCode and uMapType.1281 * If there is no translation, the return value is zero.1282 * Remark :1283 * Status : UNTESTED STUB1284 1285 *1286 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1287 *****************************************************************************/1288 UINT WIN32API MapVirtualKeyExW(UINT uCode,1289 UINT uMapType,1290 HKL dwhkl)1291 {1292 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",1293 uCode,1294 uMapType,1295 dwhkl));1296 1297 return (0);1298 }1299 /*****************************************************************************1300 * Name : DWORD WIN32API OemKeyScan1301 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF1302 * into the OEM scan codes and shift states. The function provides1303 * information that allows a program to send OEM text to another1304 * program by simulating keyboard input.1305 * Parameters:1306 * Variables :1307 * Result :1308 * Remark :1309 * Status : UNTESTED STUB1310 *1311 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1312 *****************************************************************************/1313 DWORD WIN32API OemKeyScan(WORD wOemChar)1314 {1315 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",1316 wOemChar));1317 1318 return (wOemChar);1319 }1320 //******************************************************************************1321 //******************************************************************************1322 BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)1323 {1324 dprintf(("USER32: RegisterHotKey, not implemented\n"));1325 hwnd = Win32ToOS2Handle(hwnd);1326 return(TRUE);1327 }1328 /*****************************************************************************1329 * Name : BOOL WIN32API UnloadKeyboardLayout1330 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.1331 * Parameters: HKL hkl handle of keyboard layout1332 * Variables :1333 * Result : If the function succeeds, the return value is the handle of the1334 * keyboard layout; otherwise, it is NULL. To get extended error1335 * information, use the GetLastError function.1336 * Remark :1337 * Status : UNTESTED STUB1338 *1339 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1340 *****************************************************************************/1341 BOOL WIN32API UnloadKeyboardLayout (HKL hkl)1342 {1343 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",1344 hkl));1345 1346 return (0);1347 }1348 //******************************************************************************1349 //******************************************************************************1350 BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)1351 {1352 dprintf(("USER32: UnregisterHotKey, not implemented\n"));1353 hwnd = Win32ToOS2Handle(hwnd);1354 1355 return(TRUE);1356 }1357 //******************************************************************************1358 //SvL: 24-6-'97 - Added1359 //******************************************************************************1360 WORD WIN32API VkKeyScanA( char ch)1361 {1362 dprintf(("USER32: VkKeyScanA %x", ch));1363 return O32_VkKeyScan(ch);1364 }1365 //******************************************************************************1366 //******************************************************************************1367 WORD WIN32API VkKeyScanW( WCHAR wch)1368 {1369 dprintf(("USER32: VkKeyScanW %x", wch));1370 // NOTE: This will not work as is (needs UNICODE support)1371 return O32_VkKeyScan((char)wch);1372 }1373 /*****************************************************************************1374 * Name : SHORT WIN32API VkKeyScanExW1375 * Purpose : The VkKeyScanEx function translates a character to the1376 * corresponding virtual-key code and shift state. The function1377 * translates the character using the input language and physical1378 * keyboard layout identified by the given keyboard layout handle.1379 * Parameters: UINT uChar character to translate1380 * HKL hkl keyboard layout handle1381 * Variables :1382 * Result : see docs1383 * Remark :1384 * Status : UNTESTED STUB1385 *1386 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1387 *****************************************************************************/1388 WORD WIN32API VkKeyScanExW(WCHAR uChar,1389 HKL hkl)1390 {1391 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",1392 uChar,1393 hkl));1394 1395 return (uChar);1396 }1397 /*****************************************************************************1398 * Name : SHORT WIN32API VkKeyScanExA1399 * Purpose : The VkKeyScanEx function translates a character to the1400 * corresponding virtual-key code and shift state. The function1401 * translates the character using the input language and physical1402 * keyboard layout identified by the given keyboard layout handle.1403 * Parameters: UINT uChar character to translate1404 * HKL hkl keyboard layout handle1405 * Variables :1406 * Result : see docs1407 * Remark :1408 * Status : UNTESTED STUB1409 *1410 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1411 *****************************************************************************/1412 WORD WIN32API VkKeyScanExA(CHAR uChar,1413 HKL hkl)1414 {1415 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",1416 uChar,1417 hkl));1418 1419 return (uChar);1420 }1421 1079 1422 1080 /* Window Functions */
Note:
See TracChangeset
for help on using the changeset viewer.