52 lines
1.3 KiB
Objective-C
52 lines
1.3 KiB
Objective-C
//
|
|
// XSIosTouch.h
|
|
// nochange
|
|
//
|
|
// Created by mac on 2024/10/15.
|
|
//
|
|
|
|
#ifndef XSIosTouch_h
|
|
#define XSIosTouch_h
|
|
|
|
#import <IOKit/hid/IOHIDEvent.h>
|
|
#import <IOKit/hid/IOHIDEventSystem.h>
|
|
#import <IOKit/hid/IOHIDService.h>
|
|
#import <IOKit/hid/IOHIDUserDevice.h>
|
|
#import <IOKit/hid/IOHIDEventSystemClient.h>
|
|
#import <IOKit/hid/IOHIDEventTypes.h>
|
|
#import <IOKit/hid/IOHIDDisplay.h>
|
|
#import <UIKit/UIKit.h>
|
|
#import "IOHIDUsageTables.h"
|
|
|
|
void XSInitGetSenderId(void);
|
|
|
|
OBJC_EXTERN IOHIDEventSystemClientRef IOHIDEventSystemClientCreate(CFAllocatorRef allocator);
|
|
void IOHIDEventSetSenderID(IOHIDEventRef event, uint64_t senderID);
|
|
void IOHIDEventSystemClientDispatchEvent(IOHIDEventSystemClientRef client, IOHIDEventRef event);
|
|
// #define kIOHIDEventDigitizerSenderID 0xDEFACEDBEEFFECE5
|
|
|
|
uint64_t IOHIDEventGetSenderID(IOHIDEventRef event);
|
|
uint64_t IOHIDEventGetSenderIDForEvent(IOHIDEventRef event);
|
|
|
|
enum {
|
|
TOUCH_UP,
|
|
TOUCH_DOWN,
|
|
TOUCH_MOVE
|
|
};
|
|
|
|
@interface XSIosTouch : NSObject
|
|
+ (instancetype)sharedInstance;
|
|
- (void) Down:(int) index x:(float)x y:(float) y;
|
|
- (void) Move:(int) index x:(float)x y:(float) y;
|
|
- (void) Up:(int) index x:(float)x y:(float) y;
|
|
// - (void) End;
|
|
- (void) Tap:(int) index x:(float)x y:(float)y;
|
|
|
|
- (void) KeyDown:(uint16_t)usage ;
|
|
|
|
- (void) KeyUp:(uint16_t)usage ;
|
|
|
|
@end
|
|
|
|
#endif /* XSIosTouch_h */
|