Chameleon

Chameleon Svn Source Tree

Root/branches/ErmaC/Modules/i386/include/IOKit/hidsystem/IOLLEvent.h

1/*
2 * @APPLE_LICENSE_HEADER_START@
3 *
4 * Copyright (c) 1999-2009 Apple Computer, Inc. All Rights Reserved.
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23/******************************************************************************
24event.h (PostScript side version)
25
26CONFIDENTIAL
27Copyright (c) 1988 NeXT, Inc. as an unpublished work.
28All Rights Reserved.
29
30Created Leo 01Mar88
31
32Modified:
3304May88 Leo Final event types and record
3422Aug88 Leo Change short -> int for window, add reserved
3526May90 Ted Added NX_UNDIMMASK to correct triggering of UndoAutoDim
3612Dec91 Mike Brought into sync with dpsclient/event.h, and fixed
37 the #ifndef interlock with dpsclient/event.h that was
38 broken during the Great Header Revision.
39
40The PostScript version of this file differs from the
41Window Kit version in that the coordinates here are
42ints instead of floats.
43******************************************************************************/
44
45#ifndef _DEV_EVENT_H
46#define _DEV_EVENT_H
47
48#include <libkern/OSTypes.h>
49#include <IOKit/hidsystem/IOHIDTypes.h>
50
51#ifdef EVENT_H/* Interlock with dpsclient/event.h */
52#if !defined(_NXSIZE_)/* Work around patch for old event.h in Phase 3 projs*/
53#define _NXSIZE_1/* NXCoord, NXPoint, NXSize decl seen */
54#define _NXSize_NXSize
55#endif /* _NXSIZE_ */
56#else /* EVENT_H *//* Haven't seen dpsclient/event.h, so define away */
57#define EVENT_H
58
59#ifdefKERNEL
60#else/* KERNEL */
61
62#if !defined(_NXSIZE_)/* Work around patch for old event.h in Phase 3 projs*/
63#define _NXSIZE_1/* NXCoord, NXPoint, NXSize decl seen */
64typedef float NXCoord;
65
66typedef struct _NXPoint {/* point */
67 NXCoord x, y;
68} NXPoint;
69
70typedef struct _NXSize {/* size */
71 NXCoord width, height;
72} NXSize;
73#define _NXSize_NXSize/* Correct usage in event_status_driver.h */
74#endif /* _NXSIZE_ */
75
76#endif/* KERNEL */
77
78/* Event types */
79
80#define NX_NULLEVENT0/* internal use */
81
82/* mouse events */
83
84#define NX_LMOUSEDOWN1/* left mouse-down event */
85#define NX_LMOUSEUP2/* left mouse-up event */
86#define NX_RMOUSEDOWN3/* right mouse-down event */
87#define NX_RMOUSEUP4/* right mouse-up event */
88#define NX_MOUSEMOVED5/* mouse-moved event */
89#define NX_LMOUSEDRAGGED6/* left mouse-dragged event */
90#define NX_RMOUSEDRAGGED7/* right mouse-dragged event */
91#define NX_MOUSEENTERED8/* mouse-entered event */
92#define NX_MOUSEEXITED9/* mouse-exited event */
93
94/* other mouse events
95 *
96 * event.data.mouse.buttonNumber should contain the
97 * button number (2-31) changing state.
98 */
99#define NX_OMOUSEDOWN25/* other mouse-down event */
100#define NX_OMOUSEUP26/* other mouse-up event */
101#define NX_OMOUSEDRAGGED27/* other mouse-dragged event */
102
103/* keyboard events */
104
105#define NX_KEYDOWN10/* key-down event */
106#define NX_KEYUP11/* key-up event */
107#define NX_FLAGSCHANGED12/* flags-changed event */
108
109/* composite events */
110
111#define NX_KITDEFINED13/* application-kit-defined event */
112#define NX_SYSDEFINED14/* system-defined event */
113#define NX_APPDEFINED15/* application-defined event */
114/* There are additional DPS client defined events past this point. */
115
116/* Scroll wheel events */
117
118#define NX_SCROLLWHEELMOVED22
119
120/* Zoom events */
121#define NX_ZOOM 28
122
123/* tablet events */
124
125#define NX_TABLETPOINTER23/* for non-mousing transducers */
126#define NX_TABLETPROXIMITY24 /* for non-mousing transducers */
127
128/* event range */
129
130#define NX_FIRSTEVENT0
131#define NX_LASTEVENT28
132#define NX_NUMPROCS(NX_LASTEVENT-NX_FIRSTEVENT+1)
133
134/* Event masks */
135#define NX_NULLEVENTMASK (1 << NX_NULLEVENT) /* NULL event */
136#define NX_LMOUSEDOWNMASK (1 << NX_LMOUSEDOWN)/* left mouse-down */
137#define NX_LMOUSEUPMASK (1 << NX_LMOUSEUP) /* left mouse-up */
138#define NX_RMOUSEDOWNMASK (1 << NX_RMOUSEDOWN)/* right mouse-down */
139#define NX_RMOUSEUPMASK (1 << NX_RMOUSEUP) /* right mouse-up */
140#define NX_OMOUSEDOWNMASK (1 << NX_OMOUSEDOWN)/* other mouse-down */
141#define NX_OMOUSEUPMASK (1 << NX_OMOUSEUP) /* other mouse-up */
142#define NX_MOUSEMOVEDMASK (1 << NX_MOUSEMOVED)/* mouse-moved */
143#define NX_LMOUSEDRAGGEDMASK(1 << NX_LMOUSEDRAGGED)/* left-dragged */
144#define NX_RMOUSEDRAGGEDMASK(1 << NX_RMOUSEDRAGGED)/* right-dragged */
145#define NX_OMOUSEDRAGGEDMASK(1 << NX_OMOUSEDRAGGED)/* other-dragged */
146#define NX_MOUSEENTEREDMASK (1 << NX_MOUSEENTERED)/* mouse-entered */
147#define NX_MOUSEEXITEDMASK (1 << NX_MOUSEEXITED)/* mouse-exited */
148#define NX_KEYDOWNMASK (1 << NX_KEYDOWN) /* key-down */
149#define NX_KEYUPMASK (1 << NX_KEYUP) /* key-up */
150#define NX_FLAGSCHANGEDMASK (1 << NX_FLAGSCHANGED)/* flags-changed */
151#define NX_KITDEFINEDMASK (1 << NX_KITDEFINED)/* kit-defined */
152#define NX_SYSDEFINEDMASK (1 << NX_SYSDEFINED)/* system-defined */
153#define NX_APPDEFINEDMASK (1 << NX_APPDEFINED)/* app-defined */
154#define NX_SCROLLWHEELMOVEDMASK(1 << NX_SCROLLWHEELMOVED)/* scroll wheel moved */
155#define NX_ZOOMMASK (1 << NX_ZOOM) /* Zoom */
156#define NX_TABLETPOINTERMASK(1 << NX_TABLETPOINTER)/* tablet pointer moved */
157#define NX_TABLETPROXIMITYMASK(1 << NX_TABLETPROXIMITY)/* tablet pointer proximity */
158
159#define EventCodeMask(type)(1 << (type))
160#define NX_ALLEVENTS-1/* Check for all events */
161
162/* sub types for mouse and move events */
163
164#define NX_SUBTYPE_DEFAULT0
165#define NX_SUBTYPE_TABLET_POINT1
166#define NX_SUBTYPE_TABLET_PROXIMITY2
167#define NX_SUBTYPE_MOUSE_TOUCH 3
168
169/* sub types for system defined events */
170
171#define NX_SUBTYPE_POWER_KEY1
172#define NX_SUBTYPE_AUX_MOUSE_BUTTONS7
173
174/*
175 * NX_SUBTYPE_AUX_CONTROL_BUTTONS usage
176 *
177 * The incoming NXEvent for other mouse button down/up has event.type
178 * NX_SYSDEFINED and event.data.compound.subtype NX_SUBTYPE_AUX_MOUSE_BUTTONS.
179 * Within the event.data.compound.misc.L[0] contains bits for all the buttons
180 * that have changed state, and event.data.compound.misc.L[1] contains the
181 * current button state as a bitmask, with 1 representing down, and 0
182 * representing up. Bit 0 is the left button, bit one is the right button,
183 * bit 2 is the center button and so forth.
184 */
185#define NX_SUBTYPE_AUX_CONTROL_BUTTONS8
186
187#define NX_SUBTYPE_EJECT_KEY10
188#define NX_SUBTYPE_SLEEP_EVENT11
189#define NX_SUBTYPE_RESTART_EVENT12
190#define NX_SUBTYPE_SHUTDOWN_EVENT13
191
192#define NX_SUBTYPE_STICKYKEYS_ON100
193#define NX_SUBTYPE_STICKYKEYS_OFF101
194#define NX_SUBTYPE_STICKYKEYS_SHIFT102
195#define NX_SUBTYPE_STICKYKEYS_CONTROL103
196#define NX_SUBTYPE_STICKYKEYS_ALTERNATE104
197#define NX_SUBTYPE_STICKYKEYS_COMMAND105
198#define NX_SUBTYPE_STICKYKEYS_RELEASE106
199#define NX_SUBTYPE_STICKYKEYS_TOGGLEMOUSEDRIVING107
200
201// New stickykeys key events
202// These were created to send an event describing the
203// different state of the modifiers
204#define NX_SUBTYPE_STICKYKEYS_SHIFT_DOWN110
205#define NX_SUBTYPE_STICKYKEYS_CONTROL_DOWN111
206#define NX_SUBTYPE_STICKYKEYS_ALTERNATE_DOWN112
207#define NX_SUBTYPE_STICKYKEYS_COMMAND_DOWN113
208#define NX_SUBTYPE_STICKYKEYS_FN_DOWN114
209
210#define NX_SUBTYPE_STICKYKEYS_SHIFT_LOCK120
211#define NX_SUBTYPE_STICKYKEYS_CONTROL_LOCK121
212#define NX_SUBTYPE_STICKYKEYS_ALTERNATE_LOCK122
213#define NX_SUBTYPE_STICKYKEYS_COMMAND_LOCK123
214#define NX_SUBTYPE_STICKYKEYS_FN_LOCK124
215
216#define NX_SUBTYPE_STICKYKEYS_SHIFT_UP130
217#define NX_SUBTYPE_STICKYKEYS_CONTROL_UP131
218#define NX_SUBTYPE_STICKYKEYS_ALTERNATE_UP132
219#define NX_SUBTYPE_STICKYKEYS_COMMAND_UP133
220#define NX_SUBTYPE_STICKYKEYS_FN_UP134
221
222
223
224// SlowKeys
225#define NX_SUBTYPE_SLOWKEYS_START200
226#define NX_SUBTYPE_SLOWKEYS_ABORT201
227#define NX_SUBTYPE_SLOWKEYS_END202
228
229// HID Parameter Property Modified
230#define NX_SUBTYPE_HIDPARAMETER_MODIFIED210
231
232/* Masks for the bits in event.flags */
233
234/* device-independent */
235
236#defineNX_ALPHASHIFTMASK0x00010000
237#defineNX_SHIFTMASK0x00020000
238#defineNX_CONTROLMASK0x00040000
239#defineNX_ALTERNATEMASK0x00080000
240#defineNX_COMMANDMASK0x00100000
241#defineNX_NUMERICPADMASK0x00200000
242#defineNX_HELPMASK0x00400000
243#defineNX_SECONDARYFNMASK0x00800000
244
245/* device-dependent (really?) */
246
247#defineNX_DEVICELCTLKEYMASK0x00000001
248#defineNX_DEVICELSHIFTKEYMASK0x00000002
249#defineNX_DEVICERSHIFTKEYMASK0x00000004
250#defineNX_DEVICELCMDKEYMASK0x00000008
251#defineNX_DEVICERCMDKEYMASK0x00000010
252#defineNX_DEVICELALTKEYMASK0x00000020
253#defineNX_DEVICERALTKEYMASK0x00000040
254#define NX_DEVICERCTLKEYMASK0x00002000
255
256/*
257 * Additional reserved bits in event.flags
258 */
259
260#define NX_STYLUSPROXIMITYMASK0x00000080/* deprecated */
261#define NX_NONCOALSESCEDMASK0x00000100
262
263/* click state values
264 * If you have the following events in close succession, the click
265 * field has the indicated value:
266 *
267 * EventClick ValueComments
268 * mouse-down1Not part of any click yet
269 * mouse-up1Aha! A click!
270 * mouse-down2Doing a double-click
271 * mouse-up2It's finished
272 * mouse-down3A triple
273 * mouse-up3
274 */
275
276/* Values for the character set in event.data.key.charSet */
277
278#defineNX_ASCIISET0
279#define NX_SYMBOLSET1
280#defineNX_DINGBATSSET2
281
282/* tablet button masks
283 * Mask bits for the tablet barrel buttons placed in tablet.buttons.
284 * The buttons field uses adopts the following convention:
285 *
286 * Bit Comments
287 * 0 Left Mouse Button ( kHIDUsage_Button_1 )
288 * 1 Right Mouse Button ( kHIDUsage_Button_2 )
289 * 2 Middle Mouse Button ( kHIDUsage_Button_3 )
290 * 3 4th Mouse Button ( kHIDUsage_Button_4 )
291 * ...
292 * 15 15th Mouse Button
293 *
294 * For your convenience, the following mask bits have been defined
295 * for tablet specific application:
296 */
297
298#define NX_TABLET_BUTTON_PENTIPMASK 0x0001
299#define NX_TABLET_BUTTON_PENLOWERSIDEMASK 0x0002
300#define NX_TABLET_BUTTON_PENUPPERSIDEMASK 0x0004
301
302
303/* tablet capability masks
304 * Mask bits for the tablet capabilities field. Use these
305 * masks with the capabilities field of a proximity event to
306 * determine what fields in a Tablet Event are valid for this
307 * device.
308 */
309#define NX_TABLET_CAPABILITY_DEVICEIDMASK 0x0001
310#define NX_TABLET_CAPABILITY_ABSXMASK 0x0002
311#define NX_TABLET_CAPABILITY_ABSYMASK 0x0004
312#define NX_TABLET_CAPABILITY_VENDOR1MASK 0x0008
313#define NX_TABLET_CAPABILITY_VENDOR2MASK 0x0010
314#define NX_TABLET_CAPABILITY_VENDOR3MASK 0x0020
315#define NX_TABLET_CAPABILITY_BUTTONSMASK 0x0040
316#define NX_TABLET_CAPABILITY_TILTXMASK 0x0080
317#define NX_TABLET_CAPABILITY_TILTYMASK 0x0100
318#define NX_TABLET_CAPABILITY_ABSZMASK 0x0200
319#define NX_TABLET_CAPABILITY_PRESSUREMASK 0x0400
320#define NX_TABLET_CAPABILITY_TANGENTIALPRESSUREMASK 0x0800
321#define NX_TABLET_CAPABILITY_ORIENTINFOMASK 0x1000
322#define NX_TABLET_CAPABILITY_ROTATIONMASK 0x2000
323
324/* proximity pointer types
325 * Value that describes the type of pointing device placed in
326 * proximity.pointerType.
327 */
328
329#define NX_TABLET_POINTER_UNKNOWN 0
330#define NX_TABLET_POINTER_PEN 1
331#define NX_TABLET_POINTER_CURSOR 2
332#define NX_TABLET_POINTER_ERASER 3
333
334/* TabletPointData type: defines the tablet data for points included
335 * in mouse events created by a tablet driver.
336 */
337
338typedef struct _NXTabletPointData {
339SInt32 x; /* absolute x coordinate in tablet space at full tablet resolution */
340 SInt32 y; /* absolute y coordinate in tablet space at full tablet resolution */
341SInt32 z; /* absolute z coordinate in tablet space at full tablet resolution */
342 UInt16 buttons; /* one bit per button - bit 0 is first button - 1 = closed */
343 UInt16 pressure; /* scaled pressure value; MAX=(2^16)-1, MIN=0 */
344 struct { /* tilt range is -((2^15)-1) to (2^15)-1 (-32767 to 32767) */
345 SInt16 x; /* scaled tilt x value */
346 SInt16 y; /* scaled tilt y value */
347} tilt;
348UInt16 rotation; /* Fixed-point representation of device rotation in a 10.6 format */
349SInt16 tangentialPressure; /* tangential pressure on the device; same range as tilt */
350UInt16 deviceID; /* system-assigned unique device ID */
351SInt16 vendor1; /* vendor-defined signed 16-bit integer */
352SInt16 vendor2; /* vendor-defined signed 16-bit integer */
353SInt16 vendor3; /* vendor-defined signed 16-bit integer */
354} NXTabletPointData, *NXTabletPointDataPtr;
355
356/* TabletProximityData type: defines the tablet data for proximity
357 * events included in mouse events created by a tablet driver.
358 */
359
360typedef struct _NXTabletProximityData {
361 UInt16 vendorID; /* vendor-defined ID - typically the USB vendor ID */
362UInt16 tabletID; /* vendor-defined tablet ID - typically the USB product ID */
363UInt16 pointerID; /* vendor-defined ID of the specific pointing device */
364UInt16 deviceID; /* system-assigned unique device ID */
365UInt16 systemTabletID; /* system-assigned unique tablet ID */
366UInt16 vendorPointerType; /* vendor-defined pointer type */
367UInt32 pointerSerialNumber; /* vendor-defined serial number */
368UInt64 uniqueID __attribute__ ((packed)); /* vendor-defined unique ID */
369UInt32 capabilityMask; /* capabilities mask of the device */
370UInt8 pointerType; /* type of pointing device */
371UInt8 enterProximity; /* non-zero = entering; zero = leaving */
372SInt16 reserved1;
373} NXTabletProximityData, *NXTabletProximityDataPtr;
374
375/* EventData type: defines the data field of an event */
376
377typedefunion {
378 struct { /* For mouse-down and mouse-up events */
379 UInt8 subx; /* sub-pixel position for x */
380 UInt8 suby; /* sub-pixel position for y */
381 SInt16 eventNum; /* unique identifier for this button */
382 SInt32 click; /* click state of this event */
383 UInt8 pressure; /* pressure value: 0=none, 255=full */
384 UInt8 buttonNumber;/* button generating other button event (0-31) */
385 UInt8 subType;
386 UInt8 reserved2;
387 SInt32 reserved3;
388 union {
389 NXTabletPointData point; /* tablet point data */
390 NXTabletProximityData proximity; /* tablet proximity data */
391 } tablet;
392 } mouse;
393 struct {
394 SInt32 dx;
395 SInt32 dy;
396 UInt8 subx;
397 UInt8 suby;
398 UInt8 subType;
399 UInt8 reserved1;
400 SInt32 reserved2;
401 union {
402 NXTabletPointData point; /* tablet point data */
403 NXTabletProximityData proximity; /* tablet proximity data */
404 } tablet;
405 } mouseMove;
406 struct { /* For key-down and key-up events */
407 UInt16 origCharSet; /* unmodified character set code */
408 SInt16 repeat; /* for key-down: nonzero if really a repeat */
409 UInt16 charSet; /* character set code */
410 UInt16 charCode; /* character code in that set */
411 UInt16 keyCode; /* device-dependent key number */
412 UInt16 origCharCode; /* unmodified character code */
413 SInt32 reserved1;
414 UInt32 keyboardType;
415 SInt32 reserved2;
416 SInt32 reserved3;
417 SInt32 reserved4;
418 SInt32 reserved5[4];
419 } key;
420 struct { /* For mouse-entered and mouse-exited events */
421 SInt16 reserved;
422 SInt16 eventNum; /* unique identifier from mouse down event */
423 SInt32 trackingNum; /* unique identifier from settrackingrect */
424 SInt32 userData; /* uninterpreted integer from settrackingrect */
425 SInt32 reserved1;
426 SInt32 reserved2;
427 SInt32 reserved3;
428 SInt32 reserved4;
429 SInt32 reserved5;
430 SInt32 reserved6[4];
431 } tracking;
432 struct {
433 SInt16 deltaAxis1;
434 SInt16 deltaAxis2;
435 SInt16 deltaAxis3;
436 SInt16 reserved1;
437 SInt32 fixedDeltaAxis1;
438 SInt32 fixedDeltaAxis2;
439 SInt32 fixedDeltaAxis3;
440 SInt32 pointDeltaAxis1;
441 SInt32 pointDeltaAxis2;
442 SInt32 pointDeltaAxis3;
443 SInt32 reserved8[4];
444 } scrollWheel, zoom;
445 struct { /* For window-changed, sys-defined, and app-defined events */
446 SInt16 reserved;
447 SInt16 subType; /* event subtype for compound events */
448 union {
449 float F[11]; /* for use in compound events */
450 SInt32 L[11]; /* for use in compound events */
451 SInt16 S[22]; /* for use in compound events */
452 char C[44]; /* for use in compound events */
453 } misc;
454 } compound;
455 struct {
456 SInt32 x; /* absolute x coordinate in tablet space at full tablet resolution */
457 SInt32 y; /* absolute y coordinate in tablet space at full tablet resolution */
458 SInt32 z; /* absolute z coordinate in tablet space at full tablet resolution */
459 UInt16 buttons; /* one bit per button - bit 0 is first button - 1 = closed */
460 UInt16 pressure; /* scaled pressure value; MAX=(2^16)-1, MIN=0 */
461 struct { /* tilt range is -((2^15)-1) to (2^15)-1 (-32767 to 32767) */
462 SInt16 x; /* scaled tilt x value */
463 SInt16 y; /* scaled tilt y value */
464 } tilt;
465 UInt16 rotation; /* Fixed-point representation of device rotation in a 10.6 format */
466 SInt16 tangentialPressure; /* tangential pressure on the device; same range as tilt */
467 UInt16 deviceID; /* system-assigned unique device ID */
468 SInt16 vendor1; /* vendor-defined signed 16-bit integer */
469 SInt16 vendor2; /* vendor-defined signed 16-bit integer */
470 SInt16 vendor3; /* vendor-defined signed 16-bit integer */
471 SInt32 reserved[4];
472 } tablet;
473 struct {
474 UInt16 vendorID; /* vendor-defined ID - typically the USB vendor ID */
475 UInt16 tabletID; /* vendor-defined tablet ID - typically the USB product ID */
476 UInt16 pointerID; /* vendor-defined ID of the specific pointing device */
477 UInt16 deviceID; /* system-assigned unique device ID */
478 UInt16 systemTabletID; /* system-assigned unique tablet ID */
479 UInt16 vendorPointerType; /* vendor-defined pointer type */
480 UInt32 pointerSerialNumber; /* vendor-defined serial number */
481 UInt64 uniqueID __attribute__ ((packed)); /* vendor-defined unique ID */
482 UInt32 capabilityMask; /* capabilities mask of the device */
483 UInt8 pointerType; /* type of pointing device */
484 UInt8 enterProximity; /* non-zero = entering; zero = leaving */
485 SInt16 reserved1;
486 SInt32 reserved2[4];
487 } proximity;
488} NXEventData;
489
490/* The current version number of the NXEventData structure. */
491
492#define kNXEventDataVersion2
493
494/* Finally! The event record! */
495#ifndef __ppc__
496typedef struct _NXEvent {
497SInt32 type;/* An event type from above */
498 struct {
499 SInt32x, y;/* Base coordinates in window, */
500 } location;/* from bottom left */
501 UInt64 time __attribute__ ((packed));/* time since launch */
502 SInt32 flags;/* key state flags */
503 UInt32 window;/* window number of assigned window */
504 UInt64 service_id __attribute__ ((packed)); /* service id */
505 SInt32 ext_pid; /* external pid */
506 NXEventDatadata;/* type-dependent data */
507} NXEvent, *NXEventPtr;
508
509#else
510
511typedef struct _NXEvent {
512SInt32 type;/* An event type from above */
513 struct {
514 SInt32x, y;/* Base coordinates in window, */
515 } location;/* from bottom left */
516 UInt64 time __attribute__ ((packed));/* time since launch */
517 SInt32 flags;/* key state flags */
518 UInt32 window;/* window number of assigned window */
519 NXEventDatadata;/* type-dependent data */
520 UInt64 service_id __attribute__ ((packed)); /* service id */
521 SInt32 ext_pid; /* external pid */
522} NXEvent, *NXEventPtr;
523#endif
524
525/* The current version number of the NXEvent structure. */
526
527#define kNXEventVersion2
528
529/* How to pick window(s) for event (for PostEvent) */
530#define NX_NOWINDOW-1
531#define NX_BYTYPE0
532#define NX_BROADCAST1
533#define NX_TOPWINDOW2
534#define NX_FIRSTWINDOW3
535#define NX_MOUSEWINDOW4
536#define NX_NEXTWINDOW5
537#define NX_LASTLEFT6
538#define NX_LASTRIGHT7
539#define NX_LASTKEY8
540#define NX_EXPLICIT9
541#define NX_TRANSMIT10
542#define NX_BYPSCONTEXT11
543
544#endif /* EVENT_H *//* End of defs common with dpsclient/event.h */
545
546/* Mask of events that cause screen to undim */
547
548#define NX_UNDIMMASK(NX_KEYDOWNMASK | NX_KEYUPMASK | \
549 NX_LMOUSEDOWNMASK | NX_LMOUSEUPMASK | \
550 NX_RMOUSEDOWNMASK | NX_RMOUSEUPMASK | \
551 NX_MOUSEMOVEDMASK | NX_FLAGSCHANGEDMASK | \
552 NX_MOUSEENTEREDMASK | NX_MOUSEEXITEDMASK | \
553 NX_LMOUSEDRAGGEDMASK | NX_RMOUSEDRAGGEDMASK | \
554 NX_SCROLLWHEELMOVEDMASK | NX_TABLETPOINTERMASK | \
555 NX_TABLETPROXIMITYMASK | NX_NULLEVENTMASK)
556
557#endif /* !_DEV_EVENT_H */
558
559

Archive Download this file

Revision: 1621