VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/input.h@ 78293

Last change on this file since 78293 was 69098, checked in by vboxsync, 7 years ago

Clean up XFree86 driver header files.
bugref:3810: X11 Guest Additions maintenance
Over the years we have cleaned up the layout in the tree of the X.Org
header files we use to build drivers. The XFree86 ones were still in their
original, rather sub-optimal layout. This change fixes that.

  • Property svn:eol-style set to native
File size: 11.6 KB
Line 
1/* $Xorg: input.h,v 1.4 2001/02/09 02:05:15 xorgcvs Exp $ */
2/************************************************************
3
4Copyright 1987, 1998 The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26
27Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
28
29 All Rights Reserved
30
31Permission to use, copy, modify, and distribute this software and its
32documentation for any purpose and without fee is hereby granted,
33provided that the above copyright notice appear in all copies and that
34both that copyright notice and this permission notice appear in
35supporting documentation, and that the name of Digital not be
36used in advertising or publicity pertaining to distribution of the
37software without specific, written prior permission.
38
39DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
40ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
41DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
42ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
43WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
44ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45SOFTWARE.
46
47********************************************************/
48/* $XFree86: xc/programs/Xserver/include/input.h,v 3.7 2001/12/14 19:59:54 dawes Exp $ */
49
50#ifndef INPUT_H
51#define INPUT_H
52
53#include "misc.h"
54#include "screenint.h"
55#include "X11/Xmd.h"
56#include "X11/Xproto.h"
57#include "window.h" /* for WindowPtr */
58
59#define DEVICE_INIT 0
60#define DEVICE_ON 1
61#define DEVICE_OFF 2
62#define DEVICE_CLOSE 3
63
64#define MAP_LENGTH 256
65#define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */
66#define NullGrab ((GrabPtr)NULL)
67#define PointerRootWin ((WindowPtr)PointerRoot)
68#define NoneWin ((WindowPtr)None)
69#define NullDevice ((DevicePtr)NULL)
70
71#ifndef FollowKeyboard
72#define FollowKeyboard 3
73#endif
74#ifndef FollowKeyboardWin
75#define FollowKeyboardWin ((WindowPtr) FollowKeyboard)
76#endif
77#ifndef RevertToFollowKeyboard
78#define RevertToFollowKeyboard 3
79#endif
80
81typedef unsigned long Leds;
82typedef struct _OtherClients *OtherClientsPtr;
83typedef struct _InputClients *InputClientsPtr;
84typedef struct _DeviceIntRec *DeviceIntPtr;
85
86typedef int (*DeviceProc)(
87#if NeedNestedPrototypes
88 DeviceIntPtr /*device*/,
89 int /*what*/
90#endif
91);
92
93typedef void (*ProcessInputProc)(
94#if NeedNestedPrototypes
95 xEventPtr /*events*/,
96 DeviceIntPtr /*device*/,
97 int /*count*/
98#endif
99);
100
101typedef struct _DeviceRec {
102 pointer devicePrivate;
103 ProcessInputProc processInputProc; /* current */
104 ProcessInputProc realInputProc; /* deliver */
105 ProcessInputProc enqueueInputProc; /* enqueue */
106 Bool on; /* used by DDX to keep state */
107} DeviceRec, *DevicePtr;
108
109typedef struct {
110 int click, bell, bell_pitch, bell_duration;
111 Bool autoRepeat;
112 unsigned char autoRepeats[32];
113 Leds leds;
114 unsigned char id;
115} KeybdCtrl;
116
117typedef struct {
118 KeySym *map;
119 KeyCode minKeyCode,
120 maxKeyCode;
121 int mapWidth;
122} KeySymsRec, *KeySymsPtr;
123
124typedef struct {
125 int num, den, threshold;
126 unsigned char id;
127} PtrCtrl;
128
129typedef struct {
130 int resolution, min_value, max_value;
131 int integer_displayed;
132 unsigned char id;
133} IntegerCtrl;
134
135typedef struct {
136 int max_symbols, num_symbols_supported;
137 int num_symbols_displayed;
138 KeySym *symbols_supported;
139 KeySym *symbols_displayed;
140 unsigned char id;
141} StringCtrl;
142
143typedef struct {
144 int percent, pitch, duration;
145 unsigned char id;
146} BellCtrl;
147
148typedef struct {
149 Leds led_values;
150 Mask led_mask;
151 unsigned char id;
152} LedCtrl;
153
154extern KeybdCtrl defaultKeyboardControl;
155extern PtrCtrl defaultPointerControl;
156
157#undef AddInputDevice
158extern DevicePtr AddInputDevice(
159#if NeedFunctionPrototypes
160 DeviceProc /*deviceProc*/,
161 Bool /*autoStart*/
162#endif
163);
164
165#define AddInputDevice(deviceProc, autoStart) \
166 _AddInputDevice(deviceProc, autoStart)
167
168extern DeviceIntPtr _AddInputDevice(
169#if NeedFunctionPrototypes
170 DeviceProc /*deviceProc*/,
171 Bool /*autoStart*/
172#endif
173);
174
175extern Bool EnableDevice(
176#if NeedFunctionPrototypes
177 DeviceIntPtr /*device*/
178#endif
179);
180
181extern Bool DisableDevice(
182#if NeedFunctionPrototypes
183 DeviceIntPtr /*device*/
184#endif
185);
186
187extern int InitAndStartDevices(
188#if NeedFunctionPrototypes
189 void
190#endif
191);
192
193extern void CloseDownDevices(
194#if NeedFunctionPrototypes
195 void
196#endif
197);
198
199extern void RemoveDevice(
200#if NeedFunctionPrototypes
201 DeviceIntPtr /*dev*/
202#endif
203);
204
205extern int NumMotionEvents(
206#if NeedFunctionPrototypes
207 void
208#endif
209);
210
211#undef RegisterPointerDevice
212extern void RegisterPointerDevice(
213#if NeedFunctionPrototypes
214 DevicePtr /*device*/
215#endif
216);
217
218#define RegisterPointerDevice(device) \
219 _RegisterPointerDevice(device)
220
221extern void _RegisterPointerDevice(
222#if NeedFunctionPrototypes
223 DeviceIntPtr /*device*/
224#endif
225);
226
227#undef RegisterKeyboardDevice
228extern void RegisterKeyboardDevice(
229#if NeedFunctionPrototypes
230 DevicePtr /*device*/
231#endif
232);
233
234#define RegisterKeyboardDevice(device) \
235 _RegisterKeyboardDevice(device)
236
237extern void _RegisterKeyboardDevice(
238#if NeedFunctionPrototypes
239 DeviceIntPtr /*device*/
240#endif
241);
242
243extern DevicePtr LookupKeyboardDevice(
244#if NeedFunctionPrototypes
245 void
246#endif
247);
248
249extern DevicePtr LookupPointerDevice(
250#if NeedFunctionPrototypes
251 void
252#endif
253);
254
255extern DevicePtr LookupDevice(
256#if NeedFunctionPrototypes
257 int /* id */
258#endif
259);
260
261extern void QueryMinMaxKeyCodes(
262#if NeedFunctionPrototypes
263 KeyCode* /*minCode*/,
264 KeyCode* /*maxCode*/
265#endif
266);
267
268extern Bool SetKeySymsMap(
269#if NeedFunctionPrototypes
270 KeySymsPtr /*dst*/,
271 KeySymsPtr /*src*/
272#endif
273);
274
275extern Bool InitKeyClassDeviceStruct(
276#if NeedFunctionPrototypes
277 DeviceIntPtr /*device*/,
278 KeySymsPtr /*pKeySyms*/,
279 CARD8 /*pModifiers*/[]
280#endif
281);
282
283extern Bool InitButtonClassDeviceStruct(
284#if NeedFunctionPrototypes
285 DeviceIntPtr /*device*/,
286 int /*numButtons*/,
287 CARD8* /*map*/
288#endif
289);
290
291typedef int (*ValuatorMotionProcPtr)(
292#if NeedNestedPrototypes
293 DeviceIntPtr /*pdevice*/,
294 xTimecoord * /*coords*/,
295 unsigned long /*start*/,
296 unsigned long /*stop*/,
297 ScreenPtr /*pScreen*/
298#endif
299);
300
301extern Bool InitValuatorClassDeviceStruct(
302#if NeedFunctionPrototypes
303 DeviceIntPtr /*device*/,
304 int /*numAxes*/,
305 ValuatorMotionProcPtr /* motionProc */,
306 int /*numMotionEvents*/,
307 int /*mode*/
308#endif
309);
310
311extern Bool InitFocusClassDeviceStruct(
312#if NeedFunctionPrototypes
313 DeviceIntPtr /*device*/
314#endif
315);
316
317typedef void (*BellProcPtr)(
318#if NeedNestedPrototypes
319 int /*percent*/,
320 DeviceIntPtr /*device*/,
321 pointer /*ctrl*/,
322 int
323#endif
324);
325
326typedef void (*KbdCtrlProcPtr)(
327#if NeedNestedPrototypes
328 DeviceIntPtr /*device*/,
329 KeybdCtrl * /*ctrl*/
330#endif
331);
332
333extern Bool InitKbdFeedbackClassDeviceStruct(
334#if NeedFunctionPrototypes
335 DeviceIntPtr /*device*/,
336 BellProcPtr /*bellProc*/,
337 KbdCtrlProcPtr /*controlProc*/
338#endif
339);
340
341typedef void (*PtrCtrlProcPtr)(
342#if NeedNestedPrototypes
343 DeviceIntPtr /*device*/,
344 PtrCtrl * /*ctrl*/
345#endif
346);
347
348extern Bool InitPtrFeedbackClassDeviceStruct(
349#if NeedFunctionPrototypes
350 DeviceIntPtr /*device*/,
351 PtrCtrlProcPtr /*controlProc*/
352#endif
353);
354
355typedef void (*StringCtrlProcPtr)(
356#if NeedNestedPrototypes
357 DeviceIntPtr /*device*/,
358 StringCtrl * /*ctrl*/
359#endif
360);
361
362extern Bool InitStringFeedbackClassDeviceStruct(
363#if NeedFunctionPrototypes
364 DeviceIntPtr /*device*/,
365 StringCtrlProcPtr /*controlProc*/,
366 int /*max_symbols*/,
367 int /*num_symbols_supported*/,
368 KeySym* /*symbols*/
369#endif
370);
371
372typedef void (*BellCtrlProcPtr)(
373#if NeedNestedPrototypes
374 DeviceIntPtr /*device*/,
375 BellCtrl * /*ctrl*/
376#endif
377);
378
379extern Bool InitBellFeedbackClassDeviceStruct(
380#if NeedFunctionPrototypes
381 DeviceIntPtr /*device*/,
382 BellProcPtr /*bellProc*/,
383 BellCtrlProcPtr /*controlProc*/
384#endif
385);
386
387typedef void (*LedCtrlProcPtr)(
388#if NeedNestedPrototypes
389 DeviceIntPtr /*device*/,
390 LedCtrl * /*ctrl*/
391#endif
392);
393
394extern Bool InitLedFeedbackClassDeviceStruct(
395#if NeedFunctionPrototypes
396 DeviceIntPtr /*device*/,
397 LedCtrlProcPtr /*controlProc*/
398#endif
399);
400
401typedef void (*IntegerCtrlProcPtr)(
402#if NeedNestedPrototypes
403 DeviceIntPtr /*device*/,
404 IntegerCtrl * /*ctrl*/
405#endif
406);
407
408
409extern Bool InitIntegerFeedbackClassDeviceStruct(
410#if NeedFunctionPrototypes
411 DeviceIntPtr /*device*/,
412 IntegerCtrlProcPtr /*controlProc*/
413#endif
414);
415
416extern Bool InitPointerDeviceStruct(
417#if NeedFunctionPrototypes
418 DevicePtr /*device*/,
419 CARD8* /*map*/,
420 int /*numButtons*/,
421 ValuatorMotionProcPtr /*motionProc*/,
422 PtrCtrlProcPtr /*controlProc*/,
423 int /*numMotionEvents*/
424#endif
425);
426
427extern Bool InitKeyboardDeviceStruct(
428#if NeedFunctionPrototypes
429 DevicePtr /*device*/,
430 KeySymsPtr /*pKeySyms*/,
431 CARD8 /*pModifiers*/[],
432 BellProcPtr /*bellProc*/,
433 KbdCtrlProcPtr /*controlProc*/
434#endif
435);
436
437extern void SendMappingNotify(
438#if NeedFunctionPrototypes
439 unsigned int /*request*/,
440 unsigned int /*firstKeyCode*/,
441 unsigned int /*count*/,
442 ClientPtr /* client */
443#endif
444);
445
446extern Bool BadDeviceMap(
447#if NeedFunctionPrototypes
448 BYTE* /*buff*/,
449 int /*length*/,
450 unsigned /*low*/,
451 unsigned /*high*/,
452 XID* /*errval*/
453#endif
454);
455
456extern Bool AllModifierKeysAreUp(
457#if NeedFunctionPrototypes
458 DeviceIntPtr /*device*/,
459 CARD8* /*map1*/,
460 int /*per1*/,
461 CARD8* /*map2*/,
462 int /*per2*/
463#endif
464);
465
466extern void NoteLedState(
467#if NeedFunctionPrototypes
468 DeviceIntPtr /*keybd*/,
469 int /*led*/,
470 Bool /*on*/
471#endif
472);
473
474extern void MaybeStopHint(
475#if NeedFunctionPrototypes
476 DeviceIntPtr /*device*/,
477 ClientPtr /*client*/
478#endif
479);
480
481extern void ProcessPointerEvent(
482#if NeedFunctionPrototypes
483 xEventPtr /*xE*/,
484 DeviceIntPtr /*mouse*/,
485 int /*count*/
486#endif
487);
488
489extern void ProcessKeyboardEvent(
490#if NeedFunctionPrototypes
491 xEventPtr /*xE*/,
492 DeviceIntPtr /*keybd*/,
493 int /*count*/
494#endif
495);
496
497#ifdef XKB
498extern void CoreProcessPointerEvent(
499#if NeedFunctionPrototypes
500 xEventPtr /*xE*/,
501 DeviceIntPtr /*mouse*/,
502 int /*count*/
503#endif
504);
505
506extern void CoreProcessKeyboardEvent(
507#if NeedFunctionPrototypes
508 xEventPtr /*xE*/,
509 DeviceIntPtr /*keybd*/,
510 int /*count*/
511#endif
512);
513#endif
514
515extern Bool LegalModifier(
516#if NeedFunctionPrototypes
517 unsigned int /*key*/,
518 DevicePtr /*pDev*/
519#endif
520);
521
522extern void ProcessInputEvents(
523#if NeedFunctionPrototypes
524 void
525#endif
526);
527
528extern void InitInput(
529#if NeedFunctionPrototypes
530 int /*argc*/,
531 char ** /*argv*/
532#endif
533);
534
535#endif /* INPUT_H */
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