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