From cd79f9b40adb947d9d806a4cd4d38f89a07591e4 Mon Sep 17 00:00:00 2001 From: Thatchapon Unprasert Date: Sun, 5 Mar 2023 09:48:58 +0700 Subject: [PATCH] Corrections --- CoreMedia/CoreMedia.h | 2 +- GraphicsServices/GraphicsServices.h | 2 +- GraphicsServices/Types.h | 13 ++++++------ IOKit/IOKit.h | 2 +- UIKit/UIKit.h | 32 ++++++++++++++++------------- 5 files changed, 27 insertions(+), 24 deletions(-) diff --git a/CoreMedia/CoreMedia.h b/CoreMedia/CoreMedia.h index ec761ee..3a1bbc9 100644 --- a/CoreMedia/CoreMedia.h +++ b/CoreMedia/CoreMedia.h @@ -26,7 +26,7 @@ CFDictionaryRef CMCopyDictionaryOfAttachments(CFAllocatorRef allocator, CMAttach CFDictionaryRef CMFormatDescriptionGetExtensions(CMFormatDescriptionRef desc); CFDictionaryRef CMTimeCopyAsDictionary(CMTime time, CFAllocatorRef allocator); -CFNotificationCenterRef CMNotificationCenterCreate(void); // CMNotificationCenterRef ? +CMNotificationCenterRef CMNotificationCenterCreate(void); CFPropertyListRef CMFormatDescriptionGetExtension(CMFormatDescriptionRef desc, CFStringRef extensionKey); diff --git a/GraphicsServices/GraphicsServices.h b/GraphicsServices/GraphicsServices.h index 46790f5..efa999f 100644 --- a/GraphicsServices/GraphicsServices.h +++ b/GraphicsServices/GraphicsServices.h @@ -40,7 +40,7 @@ void GSEventSetBacklightLevel(float level); void GSEventSetBacklightFactor(int factor); void GSEventSetType(GSEventRef event, GSEventType type); void GSEventSetPathInfoAtIndex(GSEventRef event, GSPathInfo pathInfo, CFIndex index); -// void GSEventSetSensitivity(int (float) sensitivity); +void GSEventSetSensitivity(unsigned sensitivity); void GSEventSetHardwareKeyboardAttached(Boolean attached); void GSEventRemoveShouldRouteToFrontMost(GSEventRef event); void GSEventRotateSimulator(int x); diff --git a/GraphicsServices/Types.h b/GraphicsServices/Types.h index a394a30..f0af213 100644 --- a/GraphicsServices/Types.h +++ b/GraphicsServices/Types.h @@ -162,7 +162,6 @@ typedef struct GSScrollWheelInfo { int deltaX; } GSScrollWheelInfo; -// Suspect that there are more to this since OS 3.2 typedef struct GSEventRecord { GSEventType type; GSEventSubType subtype; @@ -172,14 +171,14 @@ typedef struct GSEventRecord { uint64_t timestamp; GSWindowRef window; GSEventFlags flags; - unsigned senderPID; + pid_t senderPID; CFIndex infoSize; +#if !TARGET_OS_SIMULATOR && !TARGET_OS_OSX + uint64_t HIDtime; +#endif + unit8_t data[]; } GSEventRecord; -typedef struct GSEvent { - CFRuntimeBase _base; - GSEventRecord record; -} GSEvent; -typedef struct GSEvent *GSEventRef; +typedef struct __GSEvent *GSEventRef; #endif \ No newline at end of file diff --git a/IOKit/IOKit.h b/IOKit/IOKit.h index 7307285..082930b 100644 --- a/IOKit/IOKit.h +++ b/IOKit/IOKit.h @@ -137,7 +137,7 @@ IOHIDEventRef IOHIDEventGetEventWithOptions(IOHIDEventRef event, IOHIDEventType IOHIDEventRef IOHIDEventGetEvent(IOHIDEventRef event, IOHIDEventType type); IOHIDEventRef IOHIDServiceClientCopyEvent(IOHIDServiceClientRef, int64_t, int32_t, int64_t); -IOHIDEventRef _IOHIDEventGetContext(IOHIDEventRef event); // get record size +IOHIDEventRef _IOHIDEventGetContext(IOHIDEventRef event); IOHIDEventType IOHIDEventGetType(IOHIDEventRef event); diff --git a/UIKit/UIKit.h b/UIKit/UIKit.h index 4ea23e7..d63286e 100644 --- a/UIKit/UIKit.h +++ b/UIKit/UIKit.h @@ -24,10 +24,15 @@ NSData *UIImageJPEGRepresentation(UIImage *image, CGFloat compressionQuality); UIImage *UIGraphicsGetImageFromCurrentImageContext(void); -CGRect UIRectCenteredAboutPoint(CGRect, CGPoint, CGFloat, CGFloat); -CGRect UIRectCenteredAboutPointScale(CGRect, CGPoint); -CGRect UIRectInset(CGRect, CGFloat top, CGFloat right, CGFloat bottom, CGFloat left); -CGRect UIRectInsetEdges(CGRect, UIRectEdge edges, CGFloat v); +CGRect UIRectCenteredAboutPoint(CGRect rect, CGPoint center); +CGRect UIRectCenteredAboutPointScale(CGRect rect, CGPoint center, CGFloat scale); +CGRect UIRectCenteredXInRect(CGRect rect, CGRect bounds); +CGRect UIRectCenteredYInRect(CGRect rect, CGRect bounds); +CGRect UIRectCenteredIntegralRect(CGRect rect, CGRect bounds); +CGRect UIRectCenteredIntegralRectScale(CGRect rect, CGRect bounds, CGFloat scale); +CGRect UIRectInset(CGRect rect, CGFloat top, CGFloat right, CGFloat bottom, CGFloat left); +CGRect UIRectInsetEdges(CGRect rect, UIRectEdge edges, CGFloat v); +CGRect UIRectIntegralWithScale(CGRect rect, CGFloat scale); CGRect CGRectFromString(NSString *str); CGSize CGSizeFromString(NSString *str); @@ -38,16 +43,15 @@ CGPoint CGPointFromString(NSString *str); CGVector CGVectorFromString(NSString *str); -CGFloat UIRoundToScale(CGFloat, CGFloat); -CGFloat UIRoundToViewScale(CGFloat); -CGFloat UIRoundToScreenScale(CGFloat); -CGFloat UIFloorToScale(CGFloat, CGFloat); -CGFloat UIFloorToViewScale(CGFloat); -CGFloat UIFloorToScreenScale(CGFloat); -CGFloat UICeilToScale(CGFloat, CGFloat); -CGFloat UICeilToViewScale(CGFloat); -CGFloat UICeilToScreenScale(CGFloat); -// CGFloat UIRectCenteredXInRect(CGRect); +CGFloat UIRoundToScale(CGFloat value, CGFloat scale); +CGFloat UIRoundToViewScale(CGFloat value, id view); +CGFloat UIRoundToScreenScale(CGFloat value, id screen); +CGFloat UIFloorToScale(CGFloat value, CGFloat scale); +CGFloat UIFloorToViewScale(CGFloat value, id view); +CGFloat UIFloorToScreenScale(CGFloat value, id screen); +CGFloat UICeilToScale(CGFloat value, CGFloat scale); +CGFloat UICeilToViewScale(CGFloat value, id view); +CGFloat UICeilToScreenScale(CGFloat value, id screen); CGFloat UIAnimationDragCoefficient(void); CGFloat UIDistanceBetweenPoints(CGPoint a, CGPoint b);