~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to packages/extra/univint/CGEventTypes.pas

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
*  CGEventTypes.h
 
3
*  CoreGraphics
 
4
*
 
5
*  Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
 
6
*
 
7
}
 
8
{       Pascal Translation:  Peter N Lewis, <peter@stairways.com.au>, August 2005 }
 
9
{
 
10
    Modified for use with Free Pascal
 
11
    Version 200
 
12
    Please report any bugs to <gpc@microbizz.nl>
 
13
}
 
14
 
 
15
{$mode macpas}
 
16
{$packenum 1}
 
17
{$macro on}
 
18
{$inline on}
 
19
{$CALLING MWPASCAL}
 
20
 
 
21
unit CGEventTypes;
 
22
interface
 
23
{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
 
24
{$setc GAP_INTERFACES_VERSION := $0200}
 
25
 
 
26
{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
 
27
    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
 
28
{$endc}
 
29
 
 
30
{$ifc defined CPUPOWERPC and defined CPUI386}
 
31
        {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
 
32
{$endc}
 
33
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
 
34
        {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
 
35
{$endc}
 
36
 
 
37
{$ifc not defined __ppc__ and defined CPUPOWERPC}
 
38
        {$setc __ppc__ := 1}
 
39
{$elsec}
 
40
        {$setc __ppc__ := 0}
 
41
{$endc}
 
42
{$ifc not defined __i386__ and defined CPUI386}
 
43
        {$setc __i386__ := 1}
 
44
{$elsec}
 
45
        {$setc __i386__ := 0}
 
46
{$endc}
 
47
 
 
48
{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
 
49
        {$error Conflicting definitions for __ppc__ and __i386__}
 
50
{$endc}
 
51
 
 
52
{$ifc defined __ppc__ and __ppc__}
 
53
        {$setc TARGET_CPU_PPC := TRUE}
 
54
        {$setc TARGET_CPU_X86 := FALSE}
 
55
{$elifc defined __i386__ and __i386__}
 
56
        {$setc TARGET_CPU_PPC := FALSE}
 
57
        {$setc TARGET_CPU_X86 := TRUE}
 
58
{$elsec}
 
59
        {$error Neither __ppc__ nor __i386__ is defined.}
 
60
{$endc}
 
61
{$setc TARGET_CPU_PPC_64 := FALSE}
 
62
 
 
63
{$ifc defined FPC_BIG_ENDIAN}
 
64
        {$setc TARGET_RT_BIG_ENDIAN := TRUE}
 
65
        {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
 
66
{$elifc defined FPC_LITTLE_ENDIAN}
 
67
        {$setc TARGET_RT_BIG_ENDIAN := FALSE}
 
68
        {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
 
69
{$elsec}
 
70
        {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
 
71
{$endc}
 
72
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
 
73
{$setc CALL_NOT_IN_CARBON := FALSE}
 
74
{$setc OLDROUTINENAMES := FALSE}
 
75
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
 
76
{$setc OPAQUE_UPP_TYPES := TRUE}
 
77
{$setc OTCARBONAPPLICATION := TRUE}
 
78
{$setc OTKERNEL := FALSE}
 
79
{$setc PM_USE_SESSION_APIS := TRUE}
 
80
{$setc TARGET_API_MAC_CARBON := TRUE}
 
81
{$setc TARGET_API_MAC_OS8 := FALSE}
 
82
{$setc TARGET_API_MAC_OSX := TRUE}
 
83
{$setc TARGET_CARBON := TRUE}
 
84
{$setc TARGET_CPU_68K := FALSE}
 
85
{$setc TARGET_CPU_MIPS := FALSE}
 
86
{$setc TARGET_CPU_SPARC := FALSE}
 
87
{$setc TARGET_OS_MAC := TRUE}
 
88
{$setc TARGET_OS_UNIX := FALSE}
 
89
{$setc TARGET_OS_WIN32 := FALSE}
 
90
{$setc TARGET_RT_MAC_68881 := FALSE}
 
91
{$setc TARGET_RT_MAC_CFM := FALSE}
 
92
{$setc TARGET_RT_MAC_MACHO := TRUE}
 
93
{$setc TYPED_FUNCTION_POINTERS := TRUE}
 
94
{$setc TYPE_BOOL := FALSE}
 
95
{$setc TYPE_EXTENDED := FALSE}
 
96
{$setc TYPE_LONGLONG := TRUE}
 
97
uses MacTypes,MacOSXPosix,CGRemoteOperation,CGBase;
 
98
{$ALIGN POWER}
 
99
 
 
100
 
 
101
{
 
102
 * The CGEventRef object may be created or copied, retained, released, and
 
103
 * modified.  The object provides an opaque representation of one low level
 
104
 * hardware event.
 
105
 }
 
106
type
 
107
        CGEventRef = ^SInt32; { an opaque 32-bit type }
 
108
 
 
109
{
 
110
 * Types common to both CGEvent.h and CGEventSource.h
 
111
 }
 
112
type
 
113
        _CGMouseButton = SInt32;
 
114
const
 
115
        kCGMouseButtonLeft = 0;
 
116
        kCGMouseButtonRight = 1;
 
117
        kCGMouseButtonCenter = 2;
 
118
type
 
119
        CGMouseButton = UInt32;
 
120
 
 
121
{
 
122
 * The flags field includes both modifier key state at the time the event was created,
 
123
 * as well as other event related state.
 
124
 *
 
125
 * Note that any bits not specified are reserved.
 
126
 }
 
127
type
 
128
        _CGEventFlags = SInt32;
 
129
(*
 
130
Uncomment when IOKit is translated
 
131
 
 
132
const { Masks for the bits in event flags }
 
133
{ device-independent modifier key bits }
 
134
        kCGEventFlagMaskAlphaShift = NX_ALPHASHIFTMASK;
 
135
        kCGEventFlagMaskShift = NX_SHIFTMASK;
 
136
        kCGEventFlagMaskControl = NX_CONTROLMASK;
 
137
        kCGEventFlagMaskAlternate = NX_ALTERNATEMASK;
 
138
        kCGEventFlagMaskCommand = NX_COMMANDMASK;
 
139
 
 
140
    { Special key identifiers }
 
141
        kCGEventFlagMaskHelp = NX_HELPMASK;
 
142
        kCGEventFlagMaskSecondaryFn = NX_SECONDARYFNMASK;
 
143
 
 
144
    { Identifies key events from numeric keypad area on extended keyboards }
 
145
        kCGEventFlagMaskNumericPad = NX_NUMERICPADMASK;
 
146
 
 
147
    { Indicates if mouse/pen movement events are not being coalesced }
 
148
        kCGEventFlagMaskNonCoalesced = NX_NONCOALSESCEDMASK;
 
149
*)
 
150
type
 
151
        CGEventFlags = UInt64;      { Flags for events }
 
152
 
 
153
 
 
154
{
 
155
 *
 
156
 * The following enumeration describes all event types currently presented
 
157
 * in this API.  Apple reserves the right to extend or create new event
 
158
 * types at any time.
 
159
 *
 
160
 * Notes:
 
161
 *      Tablet devices may generate mice events with embedded tablet
 
162
 *      data, or tablet pointer and proximity events.  The tablet
 
163
 *      events as mouse events allow tablets to be used with programs
 
164
 *      which are not tablet-aware.
 
165
 }
 
166
 
 
167
{ Event types }
 
168
type
 
169
        _CGEventType = SInt32;
 
170
(*
 
171
Uncomment when IOKit is translated
 
172
 
 
173
const
 
174
        kCGEventNull = NX_NULLEVENT;                    { Placeholder; the Null Event }
 
175
    { mouse events }
 
176
        kCGEventLeftMouseDown = NX_LMOUSEDOWN;          { left mouse-down event }
 
177
        kCGEventLeftMouseUp = NX_LMOUSEUP;                      { left mouse-up event }
 
178
        kCGEventRightMouseDown = NX_RMOUSEDOWN;         { right mouse-down event }
 
179
        kCGEventRightMouseUp = NX_RMOUSEUP;                     { right mouse-up event }
 
180
        kCGEventMouseMoved = NX_MOUSEMOVED;                     { mouse-moved event }
 
181
        kCGEventLeftMouseDragged = NX_LMOUSEDRAGGED;    { left mouse-dragged event }
 
182
        kCGEventRightMouseDragged = NX_RMOUSEDRAGGED;   { right mouse-dragged event }
 
183
 
 
184
    { keyboard events }
 
185
        kCGEventKeyDown = NX_KEYDOWN;                   { key-down event }
 
186
        kCGEventKeyUp = NX_KEYUP;                               { key-up event }
 
187
        kCGEventFlagsChanged = NX_FLAGSCHANGED;         { flags-changed (modifier keys and status) event }
 
188
 
 
189
    { Specialized control devices }
 
190
        kCGEventScrollWheel = NX_SCROLLWHEELMOVED;              { Scroll wheel input device }
 
191
        kCGEventTabletPointer = NX_TABLETPOINTER;               { specialized tablet pointer event, in addition to tablet mouse event }
 
192
        kCGEventTabletProximity = NX_TABLETPROXIMITY;   { specialized tablet proximity event, in addition to tablet mouse event }
 
193
        kCGEventOtherMouseDown = NX_OMOUSEDOWN;         { Mouse button 2-31 down }
 
194
        kCGEventOtherMouseUp = NX_OMOUSEUP;                     { Mouse button 2-31 up }
 
195
        kCGEventOtherMouseDragged = NX_OMOUSEDRAGGED;   { Drag with mouse button 2-31 down }
 
196
*)
 
197
 
 
198
    {
 
199
     * Out of band types, delivered for unusual conditions
 
200
     * These are delivered to the event tap callback to notify of unusual
 
201
     * conditions that disable the event tap.
 
202
     }
 
203
const
 
204
        kCGEventTapDisabledByTimeout = $FFFFFFFE;
 
205
        kCGEventTapDisabledByUserInput = $FFFFFFFF;
 
206
type
 
207
        CGEventType = UInt32;
 
208
 
 
209
 
 
210
type
 
211
        CGEventTimestamp = UInt64;  { Event timestamp, roughly, nanoseconds since startup }
 
212
 
 
213
{
 
214
 * Low level functions provide access to specialized fields of the events
 
215
 * The fields are identified by tokens defined in this enumeration.
 
216
 }
 
217
type
 
218
        _CGEventField = SInt32;
 
219
const
 
220
{ Additional keys and values found in mouse events, including the OtherMouse events: }
 
221
 
 
222
        kCGMouseEventNumber = 0;
 
223
    { Key associated with an integer encoding the mouse button event number as an integer.  Matching mouse-down and mouse-up events will have the same event number. }
 
224
 
 
225
        kCGMouseEventClickState = 1;
 
226
    { Key associated with an integer encoding the mouse button clickState as an integer.  A clickState of 1 represents a single click.  A clickState of 2 represents a double-click.  A clickState of 3 represents a triple-click. }
 
227
 
 
228
        kCGMouseEventPressure = 2;
 
229
    { Key associated with a double encoding the mouse button pressurr.  The pressure value may range from 0 to 1.0, with 0 representing the mouse being up.  This value is commonly set by tablet pens mimicing a mouse. }
 
230
 
 
231
        kCGMouseEventButtonNumber = 3;
 
232
    { Key associated with an integer representing the mouse button number.  The left mouse button reports as button 0.  A right mouse button reports as button 1.  A middle button reports as button 2, and additional buttons report as the appropriate USB button. }
 
233
 
 
234
        kCGMouseEventDeltaX = 4;
 
235
        kCGMouseEventDeltaY = 5;
 
236
    { Key associated with an integer encoding the mouse delta since the last mouse movement event. }
 
237
 
 
238
        kCGMouseEventInstantMouser = 6;
 
239
    { Key associated with an integer value, non-zero if the event should be ignored by the Inkwell subsystem. }
 
240
 
 
241
        kCGMouseEventSubtype = 7;
 
242
    {
 
243
     * Key associated with an integer encoding the mouse event subtype as a kCFNumberIntType.
 
244
     *
 
245
     * Tablets may generate specially annotated mouse events,
 
246
     * which will contain additional keys and values.
 
247
     *
 
248
     * Mouse events of subtype kCGEventMouseSubtypeTabletPoint may also use the tablet  accessor keys.
 
249
     * Mouse events of subtype kCGEventMouseSubtypeTabletProximity may also use the tablet  proximity accessor keys.
 
250
     }
 
251
 
 
252
    { Additional keys and values found in keyboard events:      }
 
253
 
 
254
        kCGKeyboardEventAutorepeat = 8;
 
255
    { Key associated with an integer, non-zero when when this is an autorepeat of a key-down, and zero otherwise. }
 
256
 
 
257
        kCGKeyboardEventKeycode = 9;
 
258
    { Key associated with the integer virtual keycode of the key-down or key-up event. }
 
259
 
 
260
        kCGKeyboardEventKeyboardType = 10;
 
261
    { Key associated with the integer representing the keyboard type identifier. }
 
262
 
 
263
 
 
264
    { Additional keys and values found in scroll wheel events:  }
 
265
 
 
266
        kCGScrollWheelEventDeltaAxis1 = 11;
 
267
        kCGScrollWheelEventDeltaAxis2 = 12;
 
268
        kCGScrollWheelEventDeltaAxis3 = 13;
 
269
    { Key associated with an integer value representing a change in scrollwheel position. }
 
270
 
 
271
        kCGScrollWheelEventInstantMouser = 14;
 
272
    { Key associated with an integer value, non-zero if the event should be ignored by the Inkwell subsystem. }
 
273
 
 
274
 
 
275
    {
 
276
     * Additional keys and values found in tablet pointer events,
 
277
     * and in mouse events containing embedded tablet event data:
 
278
     }
 
279
 
 
280
        kCGTabletEventPointX = 15;
 
281
        kCGTabletEventPointY = 16;
 
282
        kCGTabletEventPointZ = 17;
 
283
    { Key associated with an integer encoding the absolute X, Y, or Z tablet coordinate in tablet space at full tablet resolution. }
 
284
 
 
285
        kCGTabletEventPointButtons = 18;
 
286
    { Key associated with an integer encoding the tablet button state. Bit 0 is the first button, and a set bit represents a closed or pressed button. Up to 16 buttons are supported. }
 
287
 
 
288
        kCGTabletEventPointPressure = 19;
 
289
    { Key associated with a double encoding the tablet pen pressure.  0 represents no pressure, and 1.0 represents maximum pressure. }
 
290
 
 
291
        kCGTabletEventTiltX = 20;
 
292
        kCGTabletEventTiltY = 21;
 
293
    { Key associated with a double encoding the tablet pen tilt.  0 represents no tilt, and 1.0 represents maximum tilt. } 
 
294
 
 
295
        kCGTabletEventRotation = 22;
 
296
    { Key associated with a double encoding the tablet pen rotation. }
 
297
 
 
298
        kCGTabletEventTangentialPressure = 23;
 
299
    { Key associated with a double encoding the tangential pressure on the device. 0 represents no pressure, and 1.0 represents maximum pressure.  }
 
300
 
 
301
        kCGTabletEventDeviceID = 24;
 
302
    { Key associated with an integer encoding the system-assigned unique device ID. }
 
303
 
 
304
        kCGTabletEventVendor1 = 25;
 
305
        kCGTabletEventVendor2 = 26;
 
306
        kCGTabletEventVendor3 = 27;
 
307
    { Key associated with an integer containing vendor-specified values.}
 
308
 
 
309
 
 
310
    {
 
311
     * Additional keys and values found in tablet proximity events,
 
312
     * and in mouse events containing embedded tablet proximity data:
 
313
     }
 
314
 
 
315
        kCGTabletProximityEventVendorID = 28;
 
316
    { Key associated with an integer encoding the vendor-defined ID, typically the USB vendor ID. }
 
317
 
 
318
        kCGTabletProximityEventTabletID = 29;
 
319
    { Key associated with an integer encoding the vendor-defined tablet ID, typically the USB product ID. }
 
320
 
 
321
        kCGTabletProximityEventPointerID = 30;
 
322
    { Key associated with an integer encoding the vendor-defined ID of the pointing device. }
 
323
 
 
324
        kCGTabletProximityEventDeviceID = 31;
 
325
    { Key associated with an integer encoding the system-assigned device ID. }
 
326
 
 
327
        kCGTabletProximityEventSystemTabletID = 32;
 
328
    { Key associated with an integer encoding the system-assigned unique tablet ID. }
 
329
 
 
330
        kCGTabletProximityEventVendorPointerType = 33;
 
331
    { Key associated with an integer encoding the vendor-assigned pointer type. }
 
332
 
 
333
        kCGTabletProximityEventVendorPointerSerialNumber = 34;
 
334
    { Key associated with an integer encoding the vendor-defined pointer serial number. }
 
335
 
 
336
        kCGTabletProximityEventVendorUniqueID = 35;
 
337
    { Key associated with an integer encoding the vendor-defined unique ID. }
 
338
 
 
339
        kCGTabletProximityEventCapabilityMask = 36;
 
340
    { Key associated with an integer encoding the device capabilities mask. }
 
341
 
 
342
        kCGTabletProximityEventPointerType = 37;
 
343
    { Key associated with an integer encoding the pointer type. }
 
344
 
 
345
        kCGTabletProximityEventEnterProximity = 38;
 
346
    { Key associated with an integer, non-zero when pen is in proximity to the tablet, and zero when leaving the tablet. }
 
347
 
 
348
        kCGEventTargetProcessSerialNumber = 39;
 
349
    { Key for the event target process serial number as a 64 bit longword. }
 
350
 
 
351
        kCGEventTargetUnixProcessID = 40;
 
352
    { Key for the event target Unix process ID }
 
353
 
 
354
        kCGEventSourceUnixProcessID = 41;
 
355
    { Key for the event source, or poster's Unix process ID }
 
356
 
 
357
        kCGEventSourceUserData = 42;
 
358
    { Key for the event source user-supplied data, up to 64 bits }
 
359
 
 
360
        kCGEventSourceUserID = 43;
 
361
    { Key for the event source Unix effective UID }
 
362
 
 
363
        kCGEventSourceGroupID = 44;
 
364
    { Key for the event source Unix effective GID }
 
365
    
 
366
        kCGEventSourceStateID = 45;
 
367
    { Key for the event source state ID used to create this event }
 
368
type
 
369
        CGEventField = UInt32;
 
370
 
 
371
{ Values used with the kCGMouseEventSubtype }
 
372
type
 
373
        _CGEventMouseSubtype = SInt32;
 
374
const
 
375
        kCGEventMouseSubtypeDefault = 0;
 
376
        kCGEventMouseSubtypeTabletPoint = 1;
 
377
        kCGEventMouseSubtypeTabletProximity = 2;
 
378
type
 
379
        CGEventMouseSubtype = UInt32;
 
380
 
 
381
{
 
382
 * Event Taps
 
383
 *
 
384
 * Taps may be placed at the point where HIDSystem events enter
 
385
 * the server, at the point where HIDSystem and remote control
 
386
 * events enter a session, at the point where events have been
 
387
 * annotated to flow to a specific application, or at the point
 
388
 * where events are delivered to the application.  Taps may be
 
389
 * inserted at a specified point at the head of pre-existing filters,
 
390
 * or appended after any pre-existing filters.
 
391
 *
 
392
 * Taps may be passive event listeners, or active filters.
 
393
 * An active filter may pass an event through unmodified, modify
 
394
 * an event, or discard an event.  When a tap is registered, it
 
395
 * identifies the set of events to be observed with a mask, and
 
396
 * indicates if it is a passive or active event filter.  Multiple
 
397
 * event type bitmasks may be ORed together.
 
398
 *
 
399
 * Taps may only be placed at kCGHIDEventTap by a process running
 
400
 * as the root user.  NULL is returned for other users.
 
401
 *
 
402
 * Taps placed at kCGHIDEventTap, kCGSessionEventTap,
 
403
 * kCGAnnotatedSessionEventTap, or on a specific process may
 
404
 * only receive key up and down events if access for assistive
 
405
 * devices is enabled (Preferences Universal Access panel,
 
406
 * Keyboard view). If the tap is not permitted to monitor these
 
407
 * when the tap is being created, then the appropriate bits
 
408
 * in the mask are cleared.  If that results in an empty mask,
 
409
 * then NULL is returned.
 
410
 *
 
411
 * The CGEventTapProxy is an opaque reference to state within
 
412
 * the client application associated with the tap.  The tap
 
413
 * function may pass this reference to other functions, such as
 
414
 * the event-posting routines.
 
415
 *
 
416
 }
 
417
{ Possible tapping points for events }
 
418
type
 
419
        _CGEventTapLocation = SInt32;
 
420
const
 
421
        kCGHIDEventTap = 0;
 
422
        kCGSessionEventTap = 1;
 
423
        kCGAnnotatedSessionEventTap = 2;
 
424
type
 
425
        CGEventTapLocation = UInt32;
 
426
 
 
427
type
 
428
        _CGEventTapPlacement = SInt32;
 
429
const
 
430
        kCGHeadInsertEventTap = 0;
 
431
        kCGTailAppendEventTap = 1;
 
432
type
 
433
        CGEventTapPlacement = UInt32;
 
434
 
 
435
type
 
436
        _CGEventTapOptions = SInt32;
 
437
const
 
438
        kCGEventTapOptionListenOnly = $00000001;
 
439
type
 
440
        CGEventTapOptions = UInt32;
 
441
 
 
442
 
 
443
type
 
444
        CGEventMask = UInt64;
 
445
{
 
446
#define CGEventMaskBit(eventType)       ((CGEventMask)1 << (eventType))
 
447
}
 
448
 
 
449
type
 
450
        CGEventTapProxy = ^SInt32; { an opaque 32-bit type }
 
451
 
 
452
{
 
453
 * The callback is passed a proxy for the tap, the event type, the incoming event,
 
454
 * and the refcon the callback was registered with.
 
455
 * The function should return the (possibly modified) passed in event,
 
456
 * a newly constructed event, or NULL if the event is to be deleted.
 
457
 *
 
458
 * The CGEventRef passed into the callback is retained by the calling code, and is
 
459
 * released after the callback returns and the data is passed back to the event
 
460
 * system.  If a different event is returned by the callback function, then that
 
461
 * event will be released by the calling code along with the original event, after
 
462
 * the event data has been passed back to the event system.
 
463
 }
 
464
type
 
465
        CGEventTapCallBack = function( proxy: CGEventTapProxy; typ: CGEventType; event: CGEventRef; refcon: UnivPtr ): CGEventRef;
 
466
 
 
467
 
 
468
{
 
469
 * When an event tap is installed or released, a notification
 
470
 * is posted via the notify_post() API.  See notify (3) and
 
471
 * notify.h for details.
 
472
 }
 
473
const
 
474
        kCGNotifyEventTapAdded = 'com.apple.coregraphics.eventTapAdded';
 
475
const
 
476
        kCGNotifyEventTapRemoved = 'com.apple.coregraphics.eventTapRemoved';
 
477
 
 
478
{
 
479
 * Structure used to report information on event taps
 
480
 }
 
481
type
 
482
        CGEventTapInformationPtr = ^CGEventTapInformation;
 
483
        CGEventTapInformation = record
 
484
                eventTapID: UInt32;
 
485
                tapPoint: CGEventTapLocation;           { HID, session, annotated session }
 
486
                options: CGEventTapOptions;             { Listener, Filter }
 
487
                eventsOfInterest: CGEventMask;  { Mask of events being tapped }
 
488
                tappingProcess: pid_t;          { Process that is tapping events }
 
489
                processBeingTapped: pid_t;      { Zero if not a per-process tap }
 
490
                enabled: CBool;         { True if tap is enabled }
 
491
                minUsecLatency: Float32;                { Minimum latency in microseconds }
 
492
                avgUsecLatency: Float32;                { Average latency in microseconds }
 
493
                maxUsecLatency: Float32;                { Maximum latency in microseconds }
 
494
        end;
 
495
 
 
496
 
 
497
{
 
498
 * The CGEventSourceRef is an opaque representation of the source of an event.
 
499
 *
 
500
 * API is provided to obtain the CGEventSource from an event, and to create
 
501
 * a new event with a CGEventSourceRef.
 
502
 }
 
503
type
 
504
        CGEventSourceRef = ^SInt32; { an opaque 32-bit type }
 
505
 
 
506
type
 
507
        CGEventSourceStateID = UInt32;
 
508
const
 
509
        kCGEventSourceStatePrivate = -1;
 
510
        kCGEventSourceStateCombinedSessionState = 0;
 
511
        kCGEventSourceStateHIDSystemState = 1;
 
512
 
 
513
type
 
514
        CGEventSourceKeyboardType = UInt32;
 
515
 
 
516
const
 
517
        kCGAnyInputEventType = $FFFFFFFF;
 
518
 
 
519
 
 
520
end.