OSDN Git Service

Manual resolution for LICENSE for files already containing a file
[mingw/mingw-org-wsl.git] / include / ddk / kbdmou.h
1 /**
2  * @file kbdmou.h
3  * @copy 2012 MinGW.org project
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24
25 /*
26  * Structures and definitions for Keyboard/Mouse class and port drivers.
27  */
28
29 #ifndef __KBDMOU_H
30 #define __KBDMOU_H
31
32 #include <ddk/ntddkbd.h>
33 #include <ddk/ntddmou.h>
34
35 #define DD_KEYBOARD_PORT_DEVICE_NAME      "\\Device\\KeyboardPort"
36 #define DD_KEYBOARD_PORT_DEVICE_NAME_U    L"\\Device\\KeyboardPort"
37 #define DD_KEYBOARD_PORT_BASE_NAME_U      L"KeyboardPort"
38 #define DD_POINTER_PORT_DEVICE_NAME       "\\Device\\PointerPort"
39 #define DD_POINTER_PORT_DEVICE_NAME_U     L"\\Device\\PointerPort"
40 #define DD_POINTER_PORT_BASE_NAME_U       L"PointerPort"
41
42 #define DD_KEYBOARD_CLASS_BASE_NAME_U     L"KeyboardClass"
43 #define DD_POINTER_CLASS_BASE_NAME_U      L"PointerClass"
44
45 #define DD_KEYBOARD_RESOURCE_CLASS_NAME_U             L"Keyboard"
46 #define DD_POINTER_RESOURCE_CLASS_NAME_U              L"Pointer"
47 #define DD_KEYBOARD_MOUSE_COMBO_RESOURCE_CLASS_NAME_U L"Keyboard/Pointer"
48
49 #define POINTER_PORTS_MAXIMUM             8
50 #define KEYBOARD_PORTS_MAXIMUM            8
51
52 #define KBDMOU_COULD_NOT_SEND_COMMAND     0x0000
53 #define KBDMOU_COULD_NOT_SEND_PARAM       0x0001
54 #define KBDMOU_NO_RESPONSE                0x0002
55 #define KBDMOU_INCORRECT_RESPONSE         0x0004
56
57 #define I8042_ERROR_VALUE_BASE            1000
58 #define INPORT_ERROR_VALUE_BASE           2000
59 #define SERIAL_MOUSE_ERROR_VALUE_BASE     3000
60
61 #define IOCTL_INTERNAL_KEYBOARD_CONNECT \
62   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
63
64 #define IOCTL_INTERNAL_KEYBOARD_DISCONNECT \
65   CTL_CODE(FILE_DEVICE_KEYBOARD,0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
66
67 #define IOCTL_INTERNAL_KEYBOARD_ENABLE \
68   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS)
69
70 #define IOCTL_INTERNAL_KEYBOARD_DISABLE \
71   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS)
72
73 #define IOCTL_INTERNAL_MOUSE_CONNECT \
74   CTL_CODE(FILE_DEVICE_MOUSE, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
75
76 #define IOCTL_INTERNAL_MOUSE_DISCONNECT \
77   CTL_CODE(FILE_DEVICE_MOUSE, 0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
78
79 #define IOCTL_INTERNAL_MOUSE_ENABLE \
80   CTL_CODE(FILE_DEVICE_MOUSE, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS)
81
82 #define IOCTL_INTERNAL_MOUSE_DISABLE \
83   CTL_CODE(FILE_DEVICE_MOUSE, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS)
84
85 typedef struct _CONNECT_DATA {
86         PDEVICE_OBJECT  ClassDeviceObject;
87         PVOID  ClassService;
88 } CONNECT_DATA, *PCONNECT_DATA;
89
90 typedef VOID
91 (STDAPICALLTYPE *PSERVICE_CALLBACK_ROUTINE)(
92   /*IN*/ PVOID NormalContext,
93   /*IN*/ PVOID SystemArgument1,
94   /*IN*/ PVOID SystemArgument2,
95   /*IN OUT*/ PVOID SystemArgument3);
96
97 #endif /* __KBDMOU_H */