VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/i8042prt/include/ntddmou.h@ 20371

Last change on this file since 20371 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.4 KB
Line 
1/*++ BUILD Version: 0001 // Increment this if a change has global effects
2
3Copyright (c) Microsoft Corporation. All rights reserved.
4
5Module Name:
6
7 ntddmou.h
8
9Abstract:
10
11 This is the include file that defines all constants and types for
12 accessing the mouse device.
13
14Author:
15
16 Lee A. Smith (lees) 02-Aug-1991.
17
18Revision History:
19
20--*/
21
22#ifndef _NTDDMOU_
23#define _NTDDMOU_
24
25#if _MSC_VER > 1000
26#pragma once
27#endif
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33//
34// Device Name - this string is the name of the device. It is the name
35// that should be passed to NtOpenFile when accessing the device.
36//
37// Note: For devices that support multiple units, it should be suffixed
38// with the Ascii representation of the unit number.
39//
40
41#define DD_MOUSE_DEVICE_NAME "\\Device\\PointerClass"
42#define DD_MOUSE_DEVICE_NAME_U L"\\Device\\PointerClass"
43
44//
45// NtDeviceIoControlFile IoControlCode values for this device.
46//
47// Warning: Remember that the low two bits of the code specify how the
48// buffers are passed to the driver!
49//
50
51#define IOCTL_MOUSE_QUERY_ATTRIBUTES CTL_CODE(FILE_DEVICE_MOUSE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
52#define IOCTL_MOUSE_INSERT_DATA CTL_CODE(FILE_DEVICE_MOUSE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
53
54//
55// Declare the GUID that represents the device interface for mice.
56//
57
58#ifndef FAR
59#define FAR
60#endif
61
62DEFINE_GUID( GUID_DEVINTERFACE_MOUSE, 0x378de44c, 0x56ef, 0x11d1,
63 0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd );
64
65//
66// Obsolete device interface class GUID name.
67// (use of above GUID_DEVINTERFACE_* name is recommended).
68//
69
70#define GUID_CLASS_MOUSE GUID_DEVINTERFACE_MOUSE
71
72//
73// NtReadFile Output Buffer record structures for this device.
74//
75
76typedef struct _MOUSE_INPUT_DATA {
77
78 //
79 // Unit number. E.g., for \Device\PointerPort0 the unit is '0',
80 // for \Device\PointerPort1 the unit is '1', and so on.
81 //
82
83 USHORT UnitId;
84
85 //
86 // Indicator flags.
87 //
88
89 USHORT Flags;
90
91 //
92 // The transition state of the mouse buttons.
93 //
94
95 union {
96 ULONG Buttons;
97 struct {
98 USHORT ButtonFlags;
99 USHORT ButtonData;
100 };
101 };
102
103
104 //
105 // The raw state of the mouse buttons.
106 //
107
108 ULONG RawButtons;
109
110 //
111 // The signed relative or absolute motion in the X direction.
112 //
113
114 LONG LastX;
115
116 //
117 // The signed relative or absolute motion in the Y direction.
118 //
119
120 LONG LastY;
121
122 //
123 // Device-specific additional information for the event.
124 //
125
126 ULONG ExtraInformation;
127
128} MOUSE_INPUT_DATA, *PMOUSE_INPUT_DATA;
129
130//
131// Define the mouse button state indicators.
132//
133
134#define MOUSE_LEFT_BUTTON_DOWN 0x0001 // Left Button changed to down.
135#define MOUSE_LEFT_BUTTON_UP 0x0002 // Left Button changed to up.
136#define MOUSE_RIGHT_BUTTON_DOWN 0x0004 // Right Button changed to down.
137#define MOUSE_RIGHT_BUTTON_UP 0x0008 // Right Button changed to up.
138#define MOUSE_MIDDLE_BUTTON_DOWN 0x0010 // Middle Button changed to down.
139#define MOUSE_MIDDLE_BUTTON_UP 0x0020 // Middle Button changed to up.
140
141#define MOUSE_BUTTON_1_DOWN MOUSE_LEFT_BUTTON_DOWN
142#define MOUSE_BUTTON_1_UP MOUSE_LEFT_BUTTON_UP
143#define MOUSE_BUTTON_2_DOWN MOUSE_RIGHT_BUTTON_DOWN
144#define MOUSE_BUTTON_2_UP MOUSE_RIGHT_BUTTON_UP
145#define MOUSE_BUTTON_3_DOWN MOUSE_MIDDLE_BUTTON_DOWN
146#define MOUSE_BUTTON_3_UP MOUSE_MIDDLE_BUTTON_UP
147
148#define MOUSE_BUTTON_4_DOWN 0x0040
149#define MOUSE_BUTTON_4_UP 0x0080
150#define MOUSE_BUTTON_5_DOWN 0x0100
151#define MOUSE_BUTTON_5_UP 0x0200
152
153#define MOUSE_WHEEL 0x0400
154
155//
156// Define the mouse indicator flags.
157//
158
159#define MOUSE_MOVE_RELATIVE 0
160#define MOUSE_MOVE_ABSOLUTE 1
161#define MOUSE_VIRTUAL_DESKTOP 0x02 // the coordinates are mapped to the virtual desktop
162#define MOUSE_ATTRIBUTES_CHANGED 0x04 // requery for mouse attributes
163
164#define MOUSE_TERMSRV_SRC_SHADOW 0x100
165
166//
167// NtDeviceIoControlFile OutputBuffer record structures for
168// IOCTL_MOUSE_QUERY_ATTRIBUTES.
169//
170
171typedef struct _MOUSE_ATTRIBUTES {
172
173 //
174 // Mouse ID value. Used to distinguish between mouse types.
175 //
176
177 USHORT MouseIdentifier;
178
179 //
180 // Number of buttons located on the mouse.
181 //
182
183 USHORT NumberOfButtons;
184
185 //
186 // Specifies the rate at which the hardware reports mouse input
187 // (reports per second). This may not be applicable for every mouse device.
188 //
189
190 USHORT SampleRate;
191
192 //
193 // Length of the readahead buffer, in bytes.
194 //
195
196 ULONG InputDataQueueLength;
197
198} MOUSE_ATTRIBUTES, *PMOUSE_ATTRIBUTES;
199
200//
201// Define the mouse identifier types.
202//
203
204#define MOUSE_INPORT_HARDWARE 0x0001
205#define MOUSE_I8042_HARDWARE 0x0002
206#define MOUSE_SERIAL_HARDWARE 0x0004
207#define BALLPOINT_I8042_HARDWARE 0x0008
208#define BALLPOINT_SERIAL_HARDWARE 0x0010
209#define WHEELMOUSE_I8042_HARDWARE 0x0020
210#define WHEELMOUSE_SERIAL_HARDWARE 0x0040
211#define MOUSE_HID_HARDWARE 0x0080
212#define WHEELMOUSE_HID_HARDWARE 0x0100
213
214
215//
216// Generic NtDeviceIoControlFile Input Buffer record structure for
217// various mouse IOCTLs.
218//
219
220typedef struct _MOUSE_UNIT_ID_PARAMETER {
221
222 //
223 // Unit identifier. Specifies the device unit for which this
224 // request is intended.
225 //
226
227 USHORT UnitId;
228
229} MOUSE_UNIT_ID_PARAMETER, *PMOUSE_UNIT_ID_PARAMETER;
230
231//
232// Define the base values for the mouse error log packet's
233// UniqueErrorValue field.
234//
235
236#define MOUSE_ERROR_VALUE_BASE 20000
237
238#ifdef __cplusplus
239}
240#endif
241
242#endif // _NTDDMOU_
243
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette