-
Notifications
You must be signed in to change notification settings - Fork 140
/
IOKitSPI.h
46 lines (35 loc) · 1.29 KB
/
IOKitSPI.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// This file is part of Scroll Reverser <https://pilotmoon.com/scrollreverser/>
// Licensed under Apache License v2.0 <http://www.apache.org/licenses/LICENSE-2.0>
#ifndef IOKitSPI_h
#define IOKitSPI_h
typedef struct __IOHIDEvent * IOHIDEventRef;
enum {
kIOHIDEventTypeNULL,
kIOHIDEventTypeVendorDefined,
kIOHIDEventTypeKeyboard = 3,
kIOHIDEventTypeRotation = 5,
kIOHIDEventTypeScroll = 6,
kIOHIDEventTypeZoom = 8,
kIOHIDEventTypeDigitizer = 11,
kIOHIDEventTypeNavigationSwipe = 16,
kIOHIDEventTypeForce = 32,
};
typedef uint32_t IOHIDEventType;
typedef uint32_t IOHIDEventField;
typedef uint64_t IOHIDEventSenderID;
enum {
kIOHIDEventScrollMomentumInterrupted = (1 << 4),
};
typedef uint8_t IOHIDEventScrollMomentumBits;
#ifdef __LP64__
typedef double IOHIDFloat;
#else
typedef float IOHIDFloat;
#endif
#define IOHIDEventFieldBase(type) (type << 16)
#define kIOHIDEventFieldScrollBase IOHIDEventFieldBase(kIOHIDEventTypeScroll)
static const IOHIDEventField kIOHIDEventFieldScrollX = (kIOHIDEventFieldScrollBase | 0);
static const IOHIDEventField kIOHIDEventFieldScrollY = (kIOHIDEventFieldScrollBase | 1);
IOHIDFloat IOHIDEventGetFloatValue(IOHIDEventRef, IOHIDEventField);
void IOHIDEventSetFloatValue(IOHIDEventRef, IOHIDEventField, IOHIDFloat);
#endif /* IOKitSPI_h */