Implemented the Win32 debug API functions.
[wine] / include / keyboard.h
1 /*
2  * KEYBOARD driver interface
3  *
4  * Copyright 1998 Ulrich Weigand
5  */
6
7 #ifndef __WINE_KEYBOARD_H
8 #define __WINE_KEYBOARD_H
9
10 #include "windef.h"
11
12 #include "pshpack1.h"
13 typedef struct _KBINFO
14 {
15     BYTE Begin_First_Range;
16     BYTE End_First_Range;
17     BYTE Begin_Second_Range;
18     BYTE End_Second_Range;
19     WORD StateSize;
20 } KBINFO, *LPKBINFO;
21 #include "poppack.h"
22
23 typedef VOID (CALLBACK *LPKEYBD_EVENT_PROC)(BYTE,BYTE,DWORD,DWORD);
24
25 WORD WINAPI KEYBOARD_Inquire(LPKBINFO kbInfo);
26 VOID WINAPI KEYBOARD_Enable(LPKEYBD_EVENT_PROC lpKeybEventProc,
27                             LPBYTE lpKeyState);
28 VOID WINAPI KEYBOARD_Disable(VOID);
29
30 /* Wine internals */
31
32 typedef struct tagKEYBOARD_DRIVER {
33   void   (*pInit)(void);
34   WORD   (*pVkKeyScan)(CHAR);
35   UINT16 (*pMapVirtualKey)(UINT16, UINT16);
36   INT16  (*pGetKeyNameText)(LONG, LPSTR, INT16);
37   INT16  (*pToAscii)(UINT16, UINT16, LPBYTE, LPVOID, UINT16);
38   BOOL   (*pGetBeepActive)(void);
39   void   (*pSetBeepActive)(BOOL bActivate);
40   void   (*pBeep)(void);
41 } KEYBOARD_DRIVER;
42
43 extern KEYBOARD_DRIVER *KEYBOARD_Driver;
44
45 extern BOOL KEYBOARD_GetBeepActive(void);
46 extern void KEYBOARD_SetBeepActive(BOOL bActivate);
47 extern void KEYBOARD_Beep(void);
48
49 extern void KEYBOARD_SendEvent(BYTE bVk, BYTE bScan, DWORD dwFlags, DWORD posX, DWORD posY, DWORD time);
50
51 #define WINE_KEYBDEVENT_MAGIC  ( ('K'<<24)|('E'<<16)|('Y'<<8)|'B' )
52 typedef struct _WINE_KEYBDEVENT
53 {
54     DWORD magic;
55     DWORD posX;
56     DWORD posY;
57     DWORD time;
58
59 } WINE_KEYBDEVENT;
60
61 #endif /* __WINE_KEYBOARD_H */
62