[CMAKE]
[reactos.git] / subsystems / win32 / win32k / include / input.h
1 #pragma once
2
3 #include <internal/kbd.h>
4
5 typedef struct _KBL
6 {
7 LIST_ENTRY List;
8 DWORD Flags;
9 WCHAR Name[KL_NAMELENGTH]; // used w GetKeyboardLayoutName same as wszKLID.
10 struct _KBDTABLES* KBTables; // KBDTABLES in ntoskrnl/include/internal/kbd.h
11 HANDLE hModule;
12 ULONG RefCount;
13 HKL hkl;
14 DWORD klid; // Low word - language id. High word - device id.
15 } KBL, *PKBL;
16
17 typedef struct _ATTACHINFO
18 {
19 struct _ATTACHINFO* paiNext;
20 PTHREADINFO pti1;
21 PTHREADINFO pti2;
22 } ATTACHINFO, *PATTACHINFO;
23
24 extern PATTACHINFO gpai;
25
26 #define KBL_UNLOAD 1
27 #define KBL_PRELOAD 2
28 #define KBL_RESET 4
29
30 INIT_FUNCTION
31 NTSTATUS
32 NTAPI
33 InitInputImpl(VOID);
34
35 INIT_FUNCTION
36 NTSTATUS
37 NTAPI
38 InitKeyboardImpl(VOID);
39
40 PUSER_MESSAGE_QUEUE W32kGetPrimitiveMessageQueue(VOID);
41 VOID W32kUnregisterPrimitiveMessageQueue(VOID);
42 PKBL W32kGetDefaultKeyLayout(VOID);
43 VOID FASTCALL W32kKeyProcessMessage(LPMSG Msg, PKBDTABLES KeyLayout, BYTE Prefix);
44 BOOL FASTCALL IntBlockInput(PTHREADINFO W32Thread, BOOL BlockIt);
45 BOOL FASTCALL IntMouseInput(MOUSEINPUT *mi);
46 BOOL FASTCALL IntKeyboardInput(KEYBDINPUT *ki);
47
48 BOOL UserInitDefaultKeyboardLayout();
49 PKBL UserHklToKbl(HKL hKl);
50 BOOL FASTCALL UserAttachThreadInput(PTHREADINFO,PTHREADINFO,BOOL);
51 BOOL FASTCALL IntConnectThreadInput(PTHREADINFO,PTHREADINFO*,PUSER_MESSAGE_QUEUE*);
52
53 #define ThreadHasInputAccess(W32Thread) \
54 (TRUE)
55
56 extern PTHREADINFO ptiRawInput;