Skip to content

GameController iOS xcode14.0 beta1

tj_devel709 edited this page Aug 23, 2022 · 3 revisions

#GameController.framework https://github.com/xamarin/xamarin-macios/pull/15692

diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCAxisElement.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCAxisElement.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCAxisElement.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCAxisElement.h	2022-05-31 14:51:38.000000000 -0400
@@ -0,0 +1,36 @@
+//  
+//  GCPhysicalInputElement.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <GameController/GCPhysicalInputElement.h>
+#import <GameController/GCAxisInput.h>
+#import <GameController/GCRelativeInput.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCAxisElement <GCPhysicalInputElement>
+
+/**
+ The input reporting the value of the axis as the position between a lower and
+ upper bound, if available.
+ */
+@property (readonly, nullable) id<GCAxisInput> absoluteInput;
+
+/**
+ The input reporting axis values as the change (delta) since the last event.
+ 
+ Certain kinds of axis elements are only able to report relative values.  The
+ tracking of a computer mouse, for example, has no fixed origin - only the
+ change in position since the last event is reported.  Some freely-rotating
+ dials may also only report a value indicating which direction the dial was
+ turned.
+ */
+@property (readonly) id<GCRelativeInput> relativeInput;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCAxisInput.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCAxisInput.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCAxisInput.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCAxisInput.h	2022-05-31 14:51:37.000000000 -0400
@@ -0,0 +1,80 @@
+//  
+//  GCAxisInput.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@protocol GCPhysicalInputElement;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ An object conforming to \c GCAxisInput represents an input that produces
+ normalized values along an axis with a fixed origin.
+ */
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCAxisInput <NSObject>
+
+/**
+ Set this block to be notified when the value of the axis input changes.
+ 
+ @param element the element that has been modified.
+ @param input the input that has been modified.
+ @param value the value the axis was set to at the time the valueChangedHandler fired.
+ */
+@property (copy, nullable) void (^valueDidChangeHandler)(__kindof id<GCPhysicalInputElement> element, id<GCAxisInput> input, float value);
+
+/**
+ A normalized value for the axis input, between -1 and 1 (inclusive). The values
+ are deadzoned and saturated before they are returned so there is no value
+ outside the range.  Deadzoning does not remove values from the range, the full
+ 0 to 1 magnitude of values are possible from the input.
+
+ As an axis is often used in a digital sense, you can rely on a value of 0
+ meaning the axis is inside the deadzone.  Any value greater than or less than
+ zero is not in the deadzone.
+ */
+@property (readonly) float value;
+
+/**
+ Check if the axis can support more than just digital values.
+ 
+ Defaults to \c YES for most axis inputs.
+ */
+@property (readonly, getter = isAnalog) BOOL analog;
+
+/**
+ Check if the axis input value "rolls over" when reaching either the extreme
+ high or low value.  For example, some dials can be rotated past the position
+ that represents their maximum value causing the reported value to roll over.
+ 
+ Defaults to \c NO for most axis elements.
+ */
+@property (readonly) BOOL canWrap;
+
+/**
+ The timestamp of the last value.
+ 
+ This time interval is not relative to any specific point in time.  You can
+ subtract a previous timestamp from the current timestamp to determine the time
+ (in seconds) between changes to the value.
+ */
+@property (readonly) NSTimeInterval lastValueTimestamp;
+
+/**
+ The interval (in seconds) between the timestamp of the last event and the
+ current time.
+ 
+ This should be treated as a lower bound of the event latency.  It may not
+ include (wired or wireless) transmission latency, or latency accrued on
+ the device before the event was transmitted to the host.
+ */
+@property (readonly) NSTimeInterval lastValueLatency;
+
+@end
+
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCButtonElement.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCButtonElement.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCButtonElement.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCButtonElement.h	2022-05-31 14:51:38.000000000 -0400
@@ -0,0 +1,40 @@
+//  
+//  GCButtonElement.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <GameController/GCPhysicalInputElement.h>
+#import <GameController/GCLinearInput.h>
+#import <GameController/GCPressedStateInput.h>
+#import <GameController/GCTouchedStateInput.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ An object conforming to \c GCButtonElement represents a momentary switch,
+ such as a push button.  A button's input only asserts while the user is
+ interacting with it, and then returns to a preferred state (not pressed, not
+ touched).
+ */
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCButtonElement <GCPhysicalInputElement>
+
+/**
+ Get the input containing the pressed state of the button.
+ */
+@property (readonly) id<GCPressedStateInput, GCLinearInput> pressedInput;
+
+/**
+ Get the input containing the touched state of the button.
+ 
+ Some buttons feature capacitive touch capabilities where the user can touch the
+ button without pressing it.
+ */
+@property (readonly, nullable) id<GCTouchedStateInput> touchedInput;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCController.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCController.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCController.h	2022-02-23 10:56:06.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCController.h	2022-05-31 15:04:51.000000000 -0400
@@ -174,6 +174,16 @@
 @property (nonatomic, copy, readonly, nullable) GCDeviceBattery *battery API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
 
 /**
+ Gets the physical input profile for the device.
+
+ @note This is equivalent to the controller's gamepad, microGamepad, or extendedGamepad instance.
+ @see GCController.gamepad
+ @see GCController.microGamepad
+ @see GCController.extendedGamepad
+*/
+@property (nonatomic, strong, readonly) GCPhysicalInputProfile *physicalInputProfile API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+
+/**
  Gets the profile for the controller that suits current application.
  
  There are several supported profiles, with an additional optional profile for motion as well.
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevice.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevice.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevice.h	2022-02-23 07:58:44.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevice.h	2022-05-31 14:51:37.000000000 -0400
@@ -5,12 +5,10 @@
 //  Copyright © 2020 Apple Inc. All rights reserved.
 //
 
-#import <TargetConditionals.h>
+#import <Foundation/Foundation.h>
 
 @class GCPhysicalInputProfile;
 
-#import <Foundation/Foundation.h>
-
 NS_ASSUME_NONNULL_BEGIN
 
 API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0))
@@ -50,8 +48,7 @@
  @see GCController.microGamepad
  @see GCController.extendedGamepad
 */
-@property (nonatomic, strong, readonly) GCPhysicalInputProfile *physicalInputProfile API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
-
+@property (nonatomic, strong, readonly) GCPhysicalInputProfile *physicalInputProfile API_DEPRECATED("Use the physicalInputProfile property on GCController instead.  For GCKeyboard, use the keyboardInput property.  For GCMouse, use the mouseInput property.", macos(11.0, 13.0), ios(14.0, 16.0), tvos(14.0, 16.0));
 
 @end
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInput.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInput.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInput.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInput.h	2022-05-31 14:51:38.000000000 -0400
@@ -0,0 +1,87 @@
+//  
+//  GCDevicePhysicalInput.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GameController/GCDevicePhysicalInputState.h>
+#import <GameController/GCDevicePhysicalInputStateDiff.h>
+
+@protocol GCDevice;
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCDevicePhysicalInput <GCDevicePhysicalInputState>
+
+/**
+ The device that this profile is mapping input from.
+ */
+@property (weak, readonly) id<GCDevice> device;
+
+#pragma mark Immediate Input
+
+/**
+ Set this block if you want to be notified when a value on a element changed.
+ If multiple elements have changed this block will be called for each element
+ that changed.
+ 
+ The block is called on the \c handlerQueue configured on the \c device.
+ 
+ @note
+ IMPORTANT: It is possible for the value(s) of \c element to change (again)
+ between when your handler is scheduled for execution and when it actually
+ executes.  This may cause your application to "miss" changes to the element.
+ If your application needs to track every element state change - as opposed to
+ just the latest element state - use the methods under "Buffered Input".
+ 
+ @param element
+ The element that has been modified.
+ */
+@property (copy, nullable) void (^elementValueDidChangeHandler)(__kindof id<GCPhysicalInputElement> element);
+
+/**
+ Polls the current state vector of the physical input and saves it to a new
+ instance.
+ 
+ If your application is heavily multithreaded this may also be useful to
+ guarantee atomicity of input handling as a snapshot will not change based on
+ further device input once it is taken.
+ 
+ @return An input state with the duplicated state vector of the current input.
+ */
+- (__kindof id<GCDevicePhysicalInputState>)capture;
+
+#pragma mark Buffered Input
+
+/**
+ Set this block to be notified when a new input state is available.  Your
+ handler should repeatedly call \c -nextInputState until it returns \c nil to
+ drain the pending input states from the queue.
+ */
+@property (copy, nullable) void (^inputStateAvailableHandler)(void);
+
+/**
+ The maximum number of input states to buffer.  If your application does not
+ drain the pending input states queue before this limit is reached, older input
+ states will be discarded - resulting in your application "missing" input state
+ changes.
+ 
+ The default value is \c one (no buffering).  Smaller values are ignored.  A
+ value of \c 20 should be more than enough to ensure no input state changes
+ are missed.
+ */
+@property (readwrite) NSInteger inputStateQueueDepth;
+
+/**
+ Pop the next pending input state from the queue.  This method returns \c nil
+ when there are no more input states pending.
+ */
+- (nullable __kindof id<GCDevicePhysicalInputState, GCDevicePhysicalInputStateDiff>)nextInputState;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputState.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputState.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputState.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputState.h	2022-05-31 14:51:36.000000000 -0400
@@ -0,0 +1,82 @@
+//  
+//  GCDevicePhysicalInputState.h
+//  GameController
+//
+//  Copyright © 2022 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GameController/GCPhysicalInputElement.h>
+#import <GameController/GCButtonElement.h>
+#import <GameController/GCAxisElement.h>
+#import <GameController/GCSwitchElement.h>
+#import <GameController/GCDirectionPadElement.h>
+
+@protocol GCDevice;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ An object conforming to \c GCDevicePhysicalInputState contains the state of
+ a device's physical inputs.
+ */
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCDevicePhysicalInputState <NSObject>
+
+/**
+ The device that this profile is mapping input from.
+ */
+@property (weak, readonly) id<GCDevice> device;
+
+/**
+ The internal time stamp of the last event.
+ 
+ This time interval is not relative to any specific point in time.  Your
+ application can subtract a previous timestamp from the returned timestamp to
+ determine the time (in seconds) between events.  The \c lastEventTimestamp of
+ the inputs from two different devices can be compared to determine which event
+ occurred first.
+ */
+@property (readonly) NSTimeInterval lastEventTimestamp;
+
+/**
+ The interval (in seconds) between the timestamp of the last event and the
+ current time.
+ 
+ This value should be treated as a lower bound of the event latency.  It may
+ not include (wired or wireless) transmission latency, or latency accrued on
+ the device before the event was transmitted to the host.
+ 
+ @note
+ If the system has gone to sleep between when the event occurred and when this
+ property is read, the returned value may not reflect the true latency.
+ */
+@property (readonly) NSTimeInterval lastEventLatency;
+
+/**
+ The following properties allow for runtime lookup of any input element on a
+ profile, when provided with a valid alias.
+
+ @example input.elements["Button A"] == extendedGamepad.buttonA // YES
+ @example input.dpads["Left Thumbstick"] == extendedGamepad.leftThumbstick // YES
+ @example input.dpads["Button B"] // returns nil, "Button B" is not a DirectionPad
+ */
+@property (readonly) NSDictionary<NSString *, id<GCPhysicalInputElement> > *elements;
+@property (readonly) NSDictionary<NSString *, id<GCButtonElement> > *buttons;
+@property (readonly) NSDictionary<NSString *, id<GCAxisElement> > *axes;
+@property (readonly) NSDictionary<NSString *, id<GCSwitchElement> > *switches;
+@property (readonly) NSDictionary<NSString *, id<GCDirectionPadElement> > *dpads;
+
+/**
+ Profile elements can be accessed using keyed subscript notation, with a valid alias of its inputs.
+ 
+ @example physicalInput["Button A"] == extendedGamepad.buttonA // YES
+ @example physicalInput["Button X"] == microGamepad.buttonX // YES
+ @note Equivalent to -elements
+ */
+- (__kindof id<GCPhysicalInputElement> _Nullable)objectForKeyedSubscript:(NSString *)key;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputStateDiff.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputStateDiff.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputStateDiff.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputStateDiff.h	2022-05-31 14:51:37.000000000 -0400
@@ -0,0 +1,54 @@
+//  
+//  GCDevicePhysicalInputStateDiff.h
+//  GameController
+//
+//  Copyright © 2022 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GameController/GCPhysicalInputElement.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef NS_ENUM(NSInteger, GCDevicePhysicalInputElementChange) {
+    /** Diff could not be determined - typically because the input queue
+     *  filled up and older input state snapshots were dropped. */
+    GCDevicePhysicalInputElementUnknownChange = -1,
+    GCDevicePhysicalInputElementNoChange = 0,
+    GCDevicePhysicalInputElementChanged = 1,
+};
+
+
+/**
+ An object conforming to the \c GCDevicePhysicalInputStateDiff protocol
+ contains the input state differences between the current and previous
+ \c GCDevicePhysicalInputState objects returned from the \c -nextInputState
+ method of \c GCDevicePhysicalInput.
+ */
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCDevicePhysicalInputStateDiff <NSObject>
+
+/**
+ Check if a value of \a element changed, compared the previous input state.
+ 
+ @param element
+ The element to check.  This may be a pointer to either the "live" element
+ from the device's physical input, or a pointer to an element from any input
+ state "snapshot" of the device's physical input.
+ */
+- (GCDevicePhysicalInputElementChange)changeForElement:(id<GCPhysicalInputElement>)element;
+
+/**
+ Get an enumerator that iterates over the elements that have changed, compared
+ the previous input state.
+ 
+ This method returns \c nil if the changed elements could not be determined -
+ typically because the input queue filled up and older input state snapshots
+ were dropped.
+ */
+- (nullable NSEnumerator<id<GCPhysicalInputElement>> *)changedElements;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDirectionPadElement.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDirectionPadElement.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDirectionPadElement.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDirectionPadElement.h	2022-05-31 14:51:37.000000000 -0400
@@ -0,0 +1,34 @@
+//  
+//  GCDirectionPadElement.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <GameController/GCPhysicalInputElement.h>
+#import <GameController/GCLinearInput.h>
+#import <GameController/GCAxisInput.h>
+#import <GameController/GCPressedStateInput.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCDirectionPadElement <GCPhysicalInputElement>
+
+/** The horizontal/x-component of the dpad input. */
+@property (readonly) id<GCAxisInput> xAxis;
+/** The vertical/y-component of the dpad input. */
+@property (readonly) id<GCAxisInput> yAxis;
+
+/** The positive y-component of the dpad input. */
+@property (readonly) id<GCLinearInput, GCPressedStateInput> up;
+/** The negative y-component of the dpad input. */
+@property (readonly) id<GCLinearInput, GCPressedStateInput> down;
+/** The negative x-component of the dpad input. */
+@property (readonly) id<GCLinearInput, GCPressedStateInput> left;
+/** The positive x-component of the dpad input. */
+@property (readonly) id<GCLinearInput, GCPressedStateInput> right;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCGearShifterElement.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCGearShifterElement.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCGearShifterElement.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCGearShifterElement.h	2022-05-31 14:51:37.000000000 -0400
@@ -0,0 +1,38 @@
+//  
+//  GCGearShifterElement.h
+//  GameController
+//
+//  Copyright © 2022 Apple Inc. All rights reserved.
+//
+
+#import <GameController/GCPhysicalInputElement.h>
+#import <GameController/GCSwitchPositionInput.h>
+#import <GameController/GCRelativeInput.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ A \c GCGearShifterElement object represents an attached gear shifter.  Both
+ pattern and sequential gear shifters are supported.
+ */
+API_AVAILABLE(macos(13.0))
+@interface GCGearShifterElement : NSObject <GCPhysicalInputElement>
+
+/**
+ Get the input reporting the position of the pattern gear shifter.  If this
+ property is \c nil, the gear shifter is not a pattern gear shifter.
+ 
+ In the returned input, a position of \c -1 corresponds to the "reverse gear".
+ A position of \c 0 corresponds to the neutral gear.
+ */
+@property (readonly, nullable) id<GCSwitchPositionInput> patternInput;
+
+/**
+ Get the input reporting changes to the sequential gear shifter.  If this
+ property is \c nil, the gear shifter is not a sequential gear shifter.
+ */
+@property (readonly, nullable) id<GCRelativeInput> sequentialInput;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h	2022-02-23 07:58:44.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h	2022-05-31 14:51:37.000000000 -0400
@@ -63,3 +63,14 @@
 GAMECONTROLLER_EXTERN NSString *const GCInputDualShockTouchpadOne API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
 GAMECONTROLLER_EXTERN NSString *const GCInputDualShockTouchpadTwo API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
 GAMECONTROLLER_EXTERN NSString *const GCInputDualShockTouchpadButton API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+
+/**
+A set of strings commonly used by racing wheels.
+*/
+GAMECONTROLLER_EXTERN NSString *const GCInputSteeringWheel API_AVAILABLE(macos(13.0));
+GAMECONTROLLER_EXTERN NSString *const GCInputShifter API_AVAILABLE(macos(13.0));
+GAMECONTROLLER_EXTERN NSString *const GCInputPedalAccelerator API_AVAILABLE(macos(13.0));
+GAMECONTROLLER_EXTERN NSString *const GCInputPedalBrake API_AVAILABLE(macos(13.0));
+GAMECONTROLLER_EXTERN NSString *const GCInputPedalClutch API_AVAILABLE(macos(13.0));
+GAMECONTROLLER_EXTERN NSString *const GCInputLeftPaddle API_AVAILABLE(macos(13.0));
+GAMECONTROLLER_EXTERN NSString *const GCInputRightPaddle API_AVAILABLE(macos(13.0));
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCLinearInput.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCLinearInput.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCLinearInput.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCLinearInput.h	2022-05-31 14:51:36.000000000 -0400
@@ -0,0 +1,80 @@
+//  
+//  GCLinearInput.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@protocol GCPhysicalInputElement;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ An object conforming to \c GCLinearInput represents an input that produces
+ normalized values in the unit interval - between [0, 1].
+ */
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCLinearInput <NSObject>
+
+/**
+ Set this block to be notified when the value of the input changes.
+ 
+ @param element the element that has been modified.
+ @param input the input that has been modified.
+ @param value the value the axis was set to at the time the valueDidChangeHandler fired.
+ */
+@property (copy, nullable) void (^valueDidChangeHandler)(__kindof id<GCPhysicalInputElement> element, id<GCLinearInput> input, float value);
+
+/**
+ A normalized value for the axis input, between 0 and 1 (inclusive). The values
+ are deadzoned and saturated before they are returned so there is no value
+ outside the range.  Deadzoning does not remove values from the range, the full
+ 0 to 1 magnitude of values are possible from the input.
+
+ You can rely on a value of 0 meaning the value is inside the deadzone.  Any
+ value greater than zero is not in the deadzone.
+ */
+@property (readonly) float value;
+
+/**
+ Check if the input can support more than just digital values.
+ 
+ If \c YES, the input can produce any value between [0, 1].  Otherwise, the
+ input only produces the values 0 or 1.
+ */
+@property (readonly, getter = isAnalog) BOOL analog;
+
+/**
+ Check if the input value "rolls over" when reaching either the extreme high
+ or low value.  For example, some dials can be rotated past the position that
+ represents their maximum value, causing the next reported value to roll over.
+ 
+ Defaults to NO for most inputs.
+ */
+@property (readonly) BOOL canWrap;
+
+/**
+ The timestamp of the last value.
+ 
+ This time interval is not relative to any specific point in time.  You can
+ subtract a previous timestamp from the current timestamp to determine the time
+ (in seconds) between changes to the value.
+ */
+@property (readonly) NSTimeInterval lastValueTimestamp;
+
+/**
+ The interval (in seconds) between the timestamp of the last event and the
+ current time.
+ 
+ This should be treated as a lower bound of the event latency.  It may not
+ include (wired or wireless) transmission latency, or latency accrued on
+ the device before the event was transmitted to the host.
+ */
+@property (readonly) NSTimeInterval lastValueLatency;
+
+@end
+
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputElement.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputElement.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputElement.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputElement.h	2022-05-31 14:51:38.000000000 -0400
@@ -0,0 +1,33 @@
+//  
+//  GCPhysicalInputElement.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCPhysicalInputElement <NSObject>
+
+/**
+ The element's SF Symbols name.
+ */
+@property (readonly, nullable) NSString *sfSymbolsName;
+
+/**
+ The element's localized name.
+ */
+@property (readonly, nullable) NSString *localizedName;
+
+/**
+ A set of aliases that can be used to access this element with keyed subscript
+ notation.
+ */
+@property (readonly) NSSet<NSString *> *aliases;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputProfile.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputProfile.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputProfile.h	2022-02-23 10:56:05.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputProfile.h	2022-05-31 15:04:50.000000000 -0400
@@ -52,6 +52,15 @@
 @property (nonatomic, readonly) BOOL hasRemappedElements API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
 
 /**
+ Set this block if you want to be notified when a value on a element changed. If multiple elements have changed this block will be called
+ for each element that changed.
+ 
+ @param profile this profile that is being used to map the raw input data into logical values on controller elements such as the dpad or the buttons.
+ @param element the element that has been modified.
+ */
+@property (nonatomic, copy, nullable) void (^valueDidChangeHandler)(__kindof GCPhysicalInputProfile *profile, GCControllerElement *element) API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0));
+
+/**
  The following properties allow for runtime lookup of any input element on a profile, when provided with a valid alias.
 
  @example extendedGamepad.elements["Button A"] == extendedGamepad.buttonA // YES
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPressedStateInput.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPressedStateInput.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPressedStateInput.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPressedStateInput.h	2022-05-31 14:51:36.000000000 -0400
@@ -0,0 +1,64 @@
+//  
+//  GCPressedStateInput.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@protocol GCPhysicalInputElement;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ An object conforming to \c GCPressedStateInput represents the pressed state of
+ an element, typically a button.
+ */
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCPressedStateInput <NSObject>
+
+/**
+ Set this block if you want to be notified when the pressed state changes.
+ */
+@property (copy, nullable) void (^pressedDidChangeHandler)(__kindof id<GCPhysicalInputElement> element, id<GCPressedStateInput> input, BOOL pressed);
+
+/**
+ Buttons are mostly used in a digital sense, thus we have a recommended method
+ for checking for pressed state instead of interpreting the value.
+ 
+ As a general guideline a button is pressed if the value exceeds 0. However
+ there may be hysteresis applied to counter noisy input values, thus incidental
+ values around the threshold value may not trigger a change in pressed state.
+ 
+ Other buttons may support two-stage actuation, where the button reports a
+ value between 0 and 1 but is only considered pressed when its value is greater
+ than some threshold other than 0.
+ 
+ @see pressedDidChangeHandler
+ */
+@property (readonly, getter = isPressed) BOOL pressed;
+
+/**
+ The timestamp of the last pressed state change.
+ 
+ This time interval is not relative to any specific point in time.  You can
+ subtract a previous timestamp from the current timestamp to determine the time
+ (in seconds) between changes to the value.
+ */
+@property (readonly) NSTimeInterval lastPressedStateTimestamp;
+
+/**
+ The interval (in seconds) between the timestamp of the last pressed state
+ change and the current time.
+ 
+ This should be treated as a lower bound of the event latency.  It may not
+ include (wired or wireless) transmission latency, or latency accrued on
+ the device before the event was transmitted to the host.
+ */
+@property (readonly) NSTimeInterval lastPressedStateLatency;
+
+@end
+
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCProductCategories.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCProductCategories.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCProductCategories.h	2022-02-23 07:58:44.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCProductCategories.h	2022-05-31 14:51:37.000000000 -0400
@@ -23,6 +23,7 @@
 GAMECONTROLLER_EXTERN NSString *const GCProductCategoryDualShock4 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
 GAMECONTROLLER_EXTERN NSString *const GCProductCategoryMFi API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
 GAMECONTROLLER_EXTERN NSString *const GCProductCategoryXboxOne API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
+GAMECONTROLLER_EXTERN NSString *const GCProductCategoryHID API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0));
 
 
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRacingWheel.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRacingWheel.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRacingWheel.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRacingWheel.h	2022-05-31 14:51:37.000000000 -0400
@@ -0,0 +1,99 @@
+//  
+//  GCRacingWheel.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <GameController/GameController.h>
+
+@class GCRacingWheelInput;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ Use these constants with NSNotificationCenter to listen to connection and disconnection events.
+ 
+ Use GCRacingWheelDidConnectNotification for observing connections of racing wheels.
+ Use GCRacingWheelDidDisconnectNotification for observing disconnections of racing wheels.
+ 
+ Connections and disconnections of racing wheels will also be reflected in the connectedRacingWheels array
+ of the GCRacingWheel class.
+ 
+ The 'object' property of the notification will contain the GCRacingWheel that was connected or disconnected.
+ For example:
+ 
+ - (void)wheelDidConnect:(NSNotification *)note {
+     GCRacingWheel *controller = note.object;
+     ....
+ }
+ 
+ @see NSNotificationCenter
+ @see GCRacingWheel.connectedRacingWheels
+ */
+GAMECONTROLLER_EXTERN NSString *const GCRacingWheelDidConnectNotification API_AVAILABLE(macos(13.0));
+GAMECONTROLLER_EXTERN NSString *const GCRacingWheelDidDisconnectNotification API_AVAILABLE(macos(13.0));
+
+
+API_AVAILABLE(macos(13.0))
+@interface GCRacingWheel : NSObject <GCDevice>
+
+- (instancetype)init NS_UNAVAILABLE;
+
+/**
+ Get the collection of racing wheels currently attached to the system.
+ 
+ @see GCRacingWheelDidConnectNotification
+ @see GCRacingWheelDidDisconnectNotification
+ */
+@property (nonatomic, readonly, class) NSSet<GCRacingWheel*> *connectedRacingWheels;
+
+/**
+ A GCRacingWheel must be acquired before your application can begin receiving
+ events from it.  Prior to acquisition, your application may only query the
+ properties of the racing wheel.  Acquisition is exclusive and may fail.
+ */
+- (BOOL)acquireDeviceWithError:(NSError * __autoreleasing __nullable * __nullable)error;
+
+/**
+ Releases a previous acquisition of the racing wheel.
+ */
+- (void)relinquishDevice;
+
+/**
+ Checks if the racing wheel has been acquired by the application.
+ 
+ This property is observable.
+ */
+@property (readonly, getter = isAcquired) BOOL acquired;
+
+/** Get the physical input profile for the racing wheel. */
+@property (strong, readonly) GCRacingWheelInput *wheelInput;
+
+#pragma mark Snapshots
+
+/**
+ A GCRacingWheel may represent a real device managed by the operating system,
+ or a snapshot created by the developer.
+ 
+ @see capture
+ */
+@property (atomic, readonly, getter = isSnapshot) BOOL snapshot;
+
+/**
+ Polls the state vector of the racing wheel and saves it to a new instance of
+ GCRacingWheel.
+ 
+ If your application is heavily multithreaded this may also be useful to
+ guarantee atomicity of input handling as a snapshot will not change based on
+ user input once it is taken.
+ 
+ @see snapshot
+ @return A new racing wheel with the duplicated state vector of the receiver.
+ */
+- (GCRacingWheel *)capture;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRacingWheelInput.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRacingWheelInput.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRacingWheelInput.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRacingWheelInput.h	2022-05-31 14:51:37.000000000 -0400
@@ -0,0 +1,56 @@
+//  
+//  GCRacingWheelInput.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <GameController/GCDevicePhysicalInput.h>
+
+@protocol GCButtonInput;
+@protocol GCSwitchInput;
+@class GCSteeringWheelElement;
+@class GCGearShifterElement;
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0))
+@interface GCRacingWheelInputState : NSObject <GCDevicePhysicalInputState>
+
+/** The steering wheel element. */
+@property (readonly) GCSteeringWheelElement *wheel;
+
+@property (readonly, nullable) id<GCButtonElement> acceleratorPedal;
+
+@property (readonly, nullable) id<GCButtonElement> brakePedal;
+
+@property (readonly, nullable) id<GCButtonElement> clutchPedal;
+
+/**
+ The element representing an attached gear shifter accessory.
+ 
+ Note that this element only represents an external gear shifter accessory.
+ Many racing wheels have a pair of built in paddle buttons that can be used for
+ sequential gear shifting.  Those buttons are can be looked up with the
+ \c GCInputLeftPaddle and \c GCInputRightPaddle input names.
+ */
+@property (readonly, nullable) GCGearShifterElement *shifter;
+
+@end
+
+
+
+API_AVAILABLE(macos(13.0))
+@interface GCRacingWheelInput : GCRacingWheelInputState <GCDevicePhysicalInput>
+
+/**
+ Polls the current state vector of the racing wheel input and saves it to a new
+ instance.
+ */
+- (GCRacingWheelInputState *)capture;
+
+- (nullable GCRacingWheelInputState<GCDevicePhysicalInputStateDiff> *)nextInputState;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRelativeInput.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRelativeInput.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRelativeInput.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRelativeInput.h	2022-05-31 14:51:37.000000000 -0400
@@ -0,0 +1,65 @@
+//  
+//  GCRelativeInput.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@protocol GCPhysicalInputElement;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ An object conforming to \c GCRelativeInput represents an input that reports
+ its change in position along an axis (delta) since the previous event.
+ */
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCRelativeInput <NSObject>
+
+/**
+ Set this block to be notified when the delta of the input changes.
+ 
+ @param delta
+ The amount that the input has changed since the last time
+ \c deltaDidChangeHandler fired.
+ */
+@property (copy, nullable) void (^deltaDidChangeHandler)(__kindof id<GCPhysicalInputElement> element, id<GCRelativeInput> input, float delta);
+
+/**
+ The last reported delta for the input.
+ */
+@property (readonly) float delta;
+
+/**
+ Check if the input can support more than just digital values.
+ 
+ Defaults to \c YES for most relative inputs.
+ */
+@property (readonly, getter = isAnalog) BOOL analog;
+
+/**
+ The timestamp of the last change.
+ 
+ This time interval is not relative to any specific point in time.  You can
+ subtract a previous timestamp from the current timestamp to determine the time
+ (in seconds) between changes to the value.
+ */
+@property (readonly) NSTimeInterval lastDeltaTimestamp;
+
+/**
+ The interval (in seconds) between the timestamp of the last change and the
+ current time.
+ 
+ This should be treated as a lower bound of the event latency.  It may not
+ include (wired or wireless) transmission latency, or latency accrued on
+ the device before the event was transmitted to the host.
+ */
+@property (readonly) NSTimeInterval lastDeltaLatency;
+
+@end
+
+
+NS_ASSUME_NONNULL_END
+
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSteeringWheelElement.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSteeringWheelElement.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSteeringWheelElement.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSteeringWheelElement.h	2022-05-31 14:51:37.000000000 -0400
@@ -0,0 +1,23 @@
+//  
+//  GCSteeringWheelElement.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <GameController/GCPhysicalInputElement.h>
+#import <GameController/GCAxisElement.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0))
+@interface GCSteeringWheelElement : NSObject <GCAxisElement>
+
+- (instancetype)init NS_UNAVAILABLE;
+
+/* The maximum angle, in degrees, the wheel can be rotated. */
+@property (readonly) float maximumDegreesOfRotation;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSwitchElement.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSwitchElement.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSwitchElement.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSwitchElement.h	2022-05-31 14:51:38.000000000 -0400
@@ -0,0 +1,28 @@
+//
+//  GCSwitchElement.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <GameController/GCPhysicalInputElement.h>
+#import <GameController/GCSwitchPositionInput.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ An object conforming to \c GCSwitchElement represents a latching switch.
+ A switch may be in one of several positions, and remains in its last position
+ after the user stops interacting with it.
+ */
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCSwitchElement <GCPhysicalInputElement>
+
+/**
+ Get the input containing the absolute position of the switch.
+ */
+@property (readonly) id<GCSwitchPositionInput> positionInput;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSwitchPositionInput.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSwitchPositionInput.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSwitchPositionInput.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSwitchPositionInput.h	2022-05-31 14:51:38.000000000 -0400
@@ -0,0 +1,71 @@
+//
+//  GCSwitchPositionInput.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCSwitchPositionInput <NSObject>
+
+/**
+ Set this block if you want to be notified when the value on the switch changes.
+ 
+ @param input the element that has been modified.
+ @see value
+ */
+@property (copy, nullable) void (^positionDidChangeHandler)(__kindof id<GCPhysicalInputElement> element, id<GCSwitchPositionInput> input, NSInteger position);
+
+/**
+ The switch's position.
+ 
+ @see valueDidChangeHandler
+ */
+@property (readonly) NSInteger position;
+
+/**
+ The (inclusive) bounds of possible position values for the switch.
+ */
+@property (readonly) NSRange positionRange;
+
+/**
+ \c YES if the switch input can only transition to positions that are adjacent
+ to the current position.
+ */
+@property (readonly, getter = isSequential) BOOL sequential;
+
+/**
+ Check if the position input value can "roll over" when reaching either of its
+ bounds.
+ 
+ This will always be \c YES for non-sequential switch inputs.
+ */
+@property (readonly) BOOL canWrap;
+
+/**
+ The timestamp of the last value.
+ 
+ This time interval is not relative to any specific point in time.  You can
+ subtract a previous timestamp from the returned timestamp to determine the time
+ (in seconds) between changes to the value.
+ */
+@property (readonly) NSTimeInterval lastPositionTimestamp;
+
+/**
+ The interval (in seconds) between the timestamp of the last event and the
+ current time.
+ 
+ This should be treated as a lower bound of the event latency.  It may not
+ include (wired or wireless) transmission latency, or latency accrued on
+ the device before the event was transmitted to the host.
+ */
+@property (readonly) NSTimeInterval lastPositionLatency;
+
+@end
+
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSyntheticDeviceKeys.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSyntheticDeviceKeys.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSyntheticDeviceKeys.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSyntheticDeviceKeys.h	2022-05-25 21:45:32.000000000 -0400
@@ -0,0 +1,59 @@
+//  
+//  GCSyntheticDeviceKeys.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#ifndef GCSyntheticDeviceKeys_h
+#define GCSyntheticDeviceKeys_h
+
+/**
+ *  This key is present with a \c Boolean value of \c true on all synthetic
+ *  HID devices created by the GameController framework.
+ *
+ *  If your application needs to exclude these synthetic HID devices from being
+ *  discovered by \c IOHIDManager, \c IOServiceGetMatchingServices, or
+ *  \c IOServiceAddMatchingNotification, include '"GCSyntheticDevice" = false'
+ *  in your matching criteria.
+ *
+ *  Example using \c IOHIDManager to discover connected HID devices, excluding
+ *  synthetic HID devices:
+ *
+ *    IOHIDManagerRef manager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDManagerOptionNone);
+ *    IOHIDManagerSetDeviceMatching(manager, (__bridge CFDictionaryRef)@{
+ *        @kIOProviderClassKey: @kIOHIDDeviceKey,
+ *        @kIOHIDGCSyntheticDeviceKey: @(NO)
+ *    });
+ *
+ *  Example using \c IOServiceAddMatchingNotification to discover kernel
+ *  \c IOHIDDevice objects, excluding synthetic HID devices:
+ *
+ *    CFMutableDictionaryRef matchingDict = IOServiceMatching(kIOHIDDeviceKey);
+ *    CFDictionarySetValue(matchingDict, CFSTR(kIOHIDGCSyntheticDeviceKey), kCFBooleanFalse);
+ *
+ *    io_iterator_t iterator = IO_OBJECT_NULL;
+ *    IOServiceAddMatchingNotification(
+ *      notifyPort,
+ *      kIOFirstMatchNotification,
+ *      matchingDict,
+ *      NULL,
+ *      serviceMatchedCallback,
+ *      &iterator);
+ *
+ *  If you have an \c io_service_t or \c IOHIDDeviceRef, you can check if it
+ *  refers to a synthetic HID device by querying the "GCSyntheticDevice"
+ *  property.
+ *
+ *    if ( IOHIDDeviceGetProperty(device, CFSTR(kIOHIDGCSyntheticDeviceKey)) == kCFBooleanTrue ) {
+ *        // Is synthetic HID device
+ *    }
+ *
+ *  @note
+ *  Checking for the "GCSyntheticDevice" property is the ONLY supported way to
+ *  determine if a \c IOHIDDeviceRef or \c io_service_t refers to a synthetic
+ *  HID device.
+ */
+#define kIOHIDGCSyntheticDeviceKey          "GCSyntheticDevice"
+
+#endif /* GCSyntheticDeviceKeys_h */
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCTouchedStateInput.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCTouchedStateInput.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCTouchedStateInput.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCTouchedStateInput.h	2022-05-31 14:51:37.000000000 -0400
@@ -0,0 +1,62 @@
+//  
+//  GCTouchedStateInput.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@protocol GCPhysicalInputElement;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ An object conforming to \c GCTouchedStateInput represents the touched state of
+ an element.
+ 
+ Some buttons feature capacitive touch capabilities, where the user can touch
+ the button without pressing it.  In such cases, a button can be touched without
+ being pressed.
+ */
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
+@protocol GCTouchedStateInput <NSObject>
+
+/**
+ Set this block if you want to be notified when the touched state changes.
+ */
+@property (copy, nullable) void (^touchedDidChangeHandler)(__kindof id<GCPhysicalInputElement> element, id<GCTouchedStateInput> input, BOOL touched);
+
+/**
+ Some buttons feature capacitive touch capabilities, where the user can touch
+ the button without pressing it. In such cases, a button will be touched before
+ it is pressed.
+ 
+ @see touchedDidChangeHandler
+ @see GCPressedStateInput
+ */
+@property (readonly, getter = isTouched) BOOL touched;
+
+/**
+ The timestamp of the last touched state change.
+ 
+ This time interval is not relative to any specific point in time.  You can
+ subtract a previous timestamp from the returned timestamp to determine the time
+ (in seconds) between changes to the value.
+ */
+@property (readonly) NSTimeInterval lastTouchedStateTimestamp;
+
+/**
+ The interval (in seconds) between the timestamp of the last touched state
+ change and the current time.
+ 
+ This should be treated as a lower bound of the event latency.  It may not
+ include (wired or wireless) transmission latency, or latency accrued on
+ the device before the event was transmitted to the host.
+ */
+@property (readonly) NSTimeInterval lastTouchedStateLatency;
+
+@end
+
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h	2022-02-05 15:21:02.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h	2022-05-25 21:45:32.000000000 -0400
@@ -11,6 +11,21 @@
 #import <GameController/GCExtern.h>
 #import <GameController/GCColor.h>
 
+#import <GameController/GCDevice.h>
+#import <GameController/GCDevicePhysicalInput.h>
+
+#import <GameController/GCPhysicalInputElement.h>
+#import <GameController/GCLinearInput.h>
+#import <GameController/GCAxisInput.h>
+#import <GameController/GCRelativeInput.h>
+#import <GameController/GCPressedStateInput.h>
+#import <GameController/GCTouchedStateInput.h>
+#import <GameController/GCSwitchPositionInput.h>
+#import <GameController/GCButtonElement.h>
+#import <GameController/GCAxisElement.h>
+#import <GameController/GCSwitchElement.h>
+#import <GameController/GCDirectionPadElement.h>
+
 #import <GameController/GCDeviceLight.h>
 #import <GameController/GCDeviceBattery.h>
 
@@ -47,12 +62,18 @@
 #import <GameController/GCDirectionalGamepad.h>
 
 #import <GameController/GCProductCategories.h>
-#import <GameController/GCDevice.h>
 #import <GameController/GCController.h>
 #import <GameController/GCKeyboard.h>
 #import <GameController/GCMouse.h>
 #import <GameController/GCEventViewController.h>
 
+#import <GameController/GCRacingWheel.h>
+#import <GameController/GCRacingWheelInput.h>
+#import <GameController/GCSteeringWheelElement.h>
+#import <GameController/GCGearShifterElement.h>
+
 #import <GameController/GCDeviceHaptics.h>
 
 #import <GameController/GCVirtualController.h>
+
+#import <GameController/GCSyntheticDeviceKeys.h>
Clone this wiki locally