Implemented GetKeyState, GetKeyboardState & SetKeyboardState.
[reactos.git] / reactos / lib / user32 / windows / input.c
1 /*
2 * ReactOS kernel
3 * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19 /* $Id: input.c,v 1.9 2003/07/20 05:32:19 jimtabor Exp $
20 *
21 * PROJECT: ReactOS user32.dll
22 * FILE: lib/user32/windows/input.c
23 * PURPOSE: Input
24 * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
25 * UPDATE HISTORY:
26 * 09-05-2001 CSH Created
27 */
28
29 /* INCLUDES ******************************************************************/
30
31 #include <windows.h>
32 #include <user32.h>
33 #include <debug.h>
34
35 /* FUNCTIONS *****************************************************************/
36
37 /*
38 * @unimplemented
39 */
40 HKL STDCALL
41 ActivateKeyboardLayout(HKL hkl,
42 UINT Flags)
43 {
44 UNIMPLEMENTED;
45 return (HKL)0;
46 }
47
48
49 /*
50 * @unimplemented
51 */
52 WINBOOL STDCALL
53 BlockInput(WINBOOL fBlockIt)
54 {
55 UNIMPLEMENTED;
56 return FALSE;
57 }
58
59
60 /*
61 * @unimplemented
62 */
63 WINBOOL STDCALL
64 EnableWindow(HWND hWnd,
65 WINBOOL bEnable)
66 {
67 UNIMPLEMENTED;
68 return FALSE;
69 }
70
71
72 /*
73 * @unimplemented
74 */
75 SHORT STDCALL
76 GetAsyncKeyState(int vKey)
77 {
78 UNIMPLEMENTED;
79 return 0;
80 }
81
82
83 /*
84 * @unimplemented
85 */
86 HKL STDCALL
87 GetKeyboardLayout(DWORD idThread)
88 {
89 UNIMPLEMENTED;
90 return (HKL)0;
91 }
92
93
94 /*
95 * @unimplemented
96 */
97 WINBOOL STDCALL GetInputState(VOID)
98 {
99 UNIMPLEMENTED;
100 return FALSE;
101 }
102
103
104 /*
105 * @unimplemented
106 */
107 UINT STDCALL
108 GetKBCodePage(VOID)
109 {
110 UNIMPLEMENTED;
111 return 0;
112 }
113
114
115 /*
116 * @unimplemented
117 */
118 int STDCALL
119 GetKeyNameTextA(LONG lParam,
120 LPSTR lpString,
121 int nSize)
122 {
123 UNIMPLEMENTED;
124 return 0;
125 }
126
127
128 /*
129 * @unimplemented
130 */
131 int STDCALL
132 GetKeyNameTextW(LONG lParam,
133 LPWSTR lpString,
134 int nSize)
135 {
136 UNIMPLEMENTED;
137 return 0;
138 }
139
140
141 /*
142 * @unimplemented
143 */
144 SHORT STDCALL
145 GetKeyState(int nVirtKey)
146 {
147 return (SHORT) NtUserGetKeyState((DWORD) nVirtKey);
148 }
149
150
151 /*
152 * @unimplemented
153 */
154 UINT STDCALL
155 GetKeyboardLayoutList(int nBuff,
156 HKL FAR *lpList)
157 {
158 UNIMPLEMENTED;
159 return 0;
160 }
161
162
163 /*
164 * @unimplemented
165 */
166 WINBOOL STDCALL
167 GetKeyboardLayoutNameA(LPSTR pwszKLID)
168 {
169 UNIMPLEMENTED;
170 return FALSE;
171 }
172
173
174 /*
175 * @unimplemented
176 */
177 WINBOOL STDCALL
178 GetKeyboardLayoutNameW(LPWSTR pwszKLID)
179 {
180 UNIMPLEMENTED;
181 return FALSE;
182 }
183
184
185 /*
186 * @unimplemented
187 */
188 WINBOOL STDCALL
189 GetKeyboardState(PBYTE lpKeyState)
190 {
191
192 return (WINBOOL) NtUserGetKeyboardState((LPBYTE) lpKeyState);
193 }
194
195
196 /*
197 * @unimplemented
198 */
199 int STDCALL
200 GetKeyboardType(int nTypeFlag)
201 {
202 UNIMPLEMENTED;
203 return 0;
204 }
205
206
207 /*
208 * @unimplemented
209 */
210 WINBOOL STDCALL
211 GetLastInputInfo(PLASTINPUTINFO plii)
212 {
213 UNIMPLEMENTED;
214 return FALSE;
215 }
216
217
218 /*
219 * @unimplemented
220 */
221 HKL STDCALL
222 LoadKeyboardLayoutA(LPCSTR pwszKLID,
223 UINT Flags)
224 {
225 UNIMPLEMENTED;
226 return (HKL)0;
227 }
228
229
230 /*
231 * @unimplemented
232 */
233 HKL STDCALL
234 LoadKeyboardLayoutW(LPCWSTR pwszKLID,
235 UINT Flags)
236 {
237 UNIMPLEMENTED;
238 return (HKL)0;
239 }
240
241
242 /*
243 * @unimplemented
244 */
245 UINT STDCALL
246 MapVirtualKeyA(UINT uCode,
247 UINT uMapType)
248 {
249 UNIMPLEMENTED;
250 return 0;
251 }
252
253
254 /*
255 * @unimplemented
256 */
257 UINT STDCALL
258 MapVirtualKeyExA(UINT uCode,
259 UINT uMapType,
260 HKL dwhkl)
261 {
262 UNIMPLEMENTED;
263 return 0;
264 }
265
266
267 /*
268 * @unimplemented
269 */
270 UINT STDCALL
271 MapVirtualKeyExW(UINT uCode,
272 UINT uMapType,
273 HKL dwhkl)
274 {
275 UNIMPLEMENTED;
276 return 0;
277 }
278
279
280 /*
281 * @unimplemented
282 */
283 UINT STDCALL
284 MapVirtualKeyW(UINT uCode,
285 UINT uMapType)
286 {
287 UNIMPLEMENTED;
288 return 0;
289 }
290
291
292 /*
293 * @unimplemented
294 */
295 DWORD STDCALL
296 OemKeyScan(WORD wOemChar)
297 {
298 UNIMPLEMENTED;
299 return 0;
300 }
301
302
303 /*
304 * @unimplemented
305 */
306 HWND STDCALL
307 SetFocus(HWND hWnd)
308 {
309 return NtUserSetFocus(hWnd);
310 }
311
312
313 /*
314 * @unimplemented
315 */
316 WINBOOL STDCALL
317 SetKeyboardState(LPBYTE lpKeyState)
318 {
319 return (WINBOOL) NtUserSetKeyboardState((LPBYTE)lpKeyState);
320 }
321
322
323 /*
324 * @unimplemented
325 */
326 int STDCALL
327 ToAscii(UINT uVirtKey,
328 UINT uScanCode,
329 CONST PBYTE lpKeyState,
330 LPWORD lpChar,
331 UINT uFlags)
332 {
333 UNIMPLEMENTED;
334 return 0;
335 }
336
337
338 /*
339 * @unimplemented
340 */
341 int STDCALL
342 ToAsciiEx(UINT uVirtKey,
343 UINT uScanCode,
344 CONST PBYTE lpKeyState,
345 LPWORD lpChar,
346 UINT uFlags,
347 HKL dwhkl)
348 {
349 UNIMPLEMENTED;
350 return 0;
351 }
352
353
354 /*
355 * @unimplemented
356 */
357 int STDCALL
358 ToUnicode(UINT wVirtKey,
359 UINT wScanCode,
360 CONST PBYTE lpKeyState,
361 LPWSTR pwszBuff,
362 int cchBuff,
363 UINT wFlags)
364 {
365 UNIMPLEMENTED;
366 return 0;
367 }
368
369
370 /*
371 * @unimplemented
372 */
373 int STDCALL
374 ToUnicodeEx(UINT wVirtKey,
375 UINT wScanCode,
376 CONST PBYTE lpKeyState,
377 LPWSTR pwszBuff,
378 int cchBuff,
379 UINT wFlags,
380 HKL dwhkl)
381 {
382 UNIMPLEMENTED;
383 return 0;
384 }
385
386
387 /*
388 * @unimplemented
389 */
390 WINBOOL STDCALL
391 UnloadKeyboardLayout(HKL hkl)
392 {
393 UNIMPLEMENTED;
394 return FALSE;
395 }
396
397
398 /*
399 * @unimplemented
400 */
401 SHORT STDCALL
402 VkKeyScanA(CHAR ch)
403 {
404 UNIMPLEMENTED;
405 return 0;
406 }
407
408
409 /*
410 * @unimplemented
411 */
412 SHORT STDCALL
413 VkKeyScanExA(CHAR ch,
414 HKL dwhkl)
415 {
416 UNIMPLEMENTED;
417 return 0;
418 }
419
420
421 /*
422 * @unimplemented
423 */
424 SHORT STDCALL
425 VkKeyScanExW(WCHAR ch,
426 HKL dwhkl)
427 {
428 UNIMPLEMENTED;
429 return 0;
430 }
431
432
433 /*
434 * @unimplemented
435 */
436 SHORT STDCALL
437 VkKeyScanW(WCHAR ch)
438 {
439 UNIMPLEMENTED;
440 return 0;
441 }
442
443
444 /*
445 * @unimplemented
446 */
447 UINT
448 STDCALL
449 SendInput(
450 UINT nInputs,
451 LPINPUT pInputs,
452 int cbSize)
453 {
454 UNIMPLEMENTED;
455 return 0;
456 }