-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from lujjjh/fix-webkit-scrolling
Fix scrolling in WebKit
- Loading branch information
Showing
5 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// 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 CoreGraphicsSPI_h | ||
#define CoreGraphicsSPI_h | ||
|
||
IOHIDEventRef CGEventCopyIOHIDEvent(CGEventRef); | ||
|
||
#endif /* CoreGraphicsSPI_h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters