-
Notifications
You must be signed in to change notification settings - Fork 516
GameController tvOS xcode14.0 beta4
tj_devel709 edited this page Aug 23, 2022
·
3 revisions
#GameController.framework https://github.com/xamarin/xamarin-macios/pull/15692
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCAxisInput.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCAxisInput.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCAxisInput.h 2022-06-30 09:28:34.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCAxisInput.h 2022-07-22 10:03:29.000000000 -0400
@@ -13,7 +13,8 @@
/**
An object conforming to \c GCAxisInput represents an input that produces
- normalized values along an axis with a fixed origin.
+ normalized values - between [-1, 1] - along an axis with a fixed origin.
+ The origin - a value of 0 - corresponds the neutral state of the input.
*/
API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
@protocol GCAxisInput <NSObject>
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCController.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCController.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCController.h 2022-06-30 19:25:38.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCController.h 2022-07-22 10:05:53.000000000 -0400
@@ -174,12 +174,11 @@
@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.
+ Gets the physical input profile for the controller.
- @note This is equivalent to the controller's gamepad, microGamepad, or extendedGamepad instance.
- @see GCController.gamepad
- @see GCController.microGamepad
- @see GCController.extendedGamepad
+ @note This is equivalent to the controller's microGamepad, or extendedGamepad instance.
+ @see microGamepad
+ @see extendedGamepad
*/
@property (nonatomic, strong, readonly) GCPhysicalInputProfile *physicalInputProfile API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevice.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevice.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevice.h 2022-06-30 09:28:34.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevice.h 2022-07-22 10:03:29.000000000 -0400
@@ -44,7 +44,6 @@
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
*/
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInput.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInput.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInput.h 2022-06-30 09:28:36.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInput.h 2022-07-22 10:03:30.000000000 -0400
@@ -14,6 +14,11 @@
NS_ASSUME_NONNULL_BEGIN
+/**
+ An objecting conforming to \c GCDevicePhysicalInput provides properties and
+ methods for accessing common physical elements - buttons, thumbsticks, dpads,
+ etc - of a device.
+*/
API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
@protocol GCDevicePhysicalInput <GCDevicePhysicalInputState>
@@ -25,9 +30,8 @@
#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.
+ Set this block to be notified when a value on a element changed. If multiple
+ elements change this block will be called for each element that changed.
The block is called on the \c handlerQueue configured on the \c device.
@@ -61,14 +65,42 @@
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.
+
+ physicalInput.inputStateQueueDepth = 20;
+ physicalInput.inputStateAvailableHandler = ^{
+ id<GCDevicePhysicalInputState, GCDevicePhysicalInputStateDiff> nextInputState;
+ while ((nextInputState = [physicalInput nextInputState])) {
+
+ // You can grab the individual states of all elements that your app
+ // is interested in.
+ id<GCButtonElement> buttonA = nextInputState.buttons[GCInputButtonA];
+ BOOL buttonAPressed = buttonA.pressedInput.pressed;
+ if (buttonAPressed) {
+ // Handle button A pressed
+ }
+
+ // Your code can first query whether an element's input value changed
+ // from the prior input state.
+ GCDevicePhysicalInputElementChange buttonAChange = [nextInputState changeForElement:buttonA];
+ if (buttonAChange == GCDevicePhysicalInputElementChanged) {
+ // Handle button A input changed
+ }
+
+ // Or, your code can request an enumerator of elements with input
+ // values that changed from the prior input state
+ for (id<GCPhysicalInputElement> changedElement in nextInputState.changedElements) {
+
+ }
+ }
+ };
*/
@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.
+ drain the pending input states in the 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
@@ -77,7 +109,7 @@
@property (readwrite) NSInteger inputStateQueueDepth;
/**
- Pop the next pending input state from the queue. This method returns \c nil
+ Pop the oldest 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;
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputState.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputState.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputState.h 2022-06-30 09:28:34.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputState.h 2022-07-22 10:03:28.000000000 -0400
@@ -20,7 +20,9 @@
/**
An object conforming to \c GCDevicePhysicalInputState contains the state of
- a device's physical inputs.
+ a device's physical inputs. This may be either the "live" physical input
+ state if the same object also conforms to \c GCDevicePhysicalInput, or a
+ snapshot of the physical input state.
*/
API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
@protocol GCDevicePhysicalInputState <NSObject>
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputStateDiff.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputStateDiff.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputStateDiff.h 2022-06-30 09:28:34.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevicePhysicalInputStateDiff.h 2022-07-22 10:03:29.000000000 -0400
@@ -12,7 +12,7 @@
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, GCDevicePhysicalInputElementChange) {
- /** Diff could not be determined - typically because the input queue
+ /** Diff could not be determined - typically because the input state queue
* filled up and older input state snapshots were dropped. */
GCDevicePhysicalInputElementUnknownChange = -1,
GCDevicePhysicalInputElementNoChange = 0,
@@ -40,12 +40,12 @@
- (GCDevicePhysicalInputElementChange)changeForElement:(id<GCPhysicalInputElement>)element;
/**
- Get an enumerator that iterates over the elements that have changed, compared
+ Gets 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.
+ typically because the input state queue filled up and older input state
+ snapshots were dropped.
*/
- (nullable NSEnumerator<id<GCPhysicalInputElement>> *)changedElements;
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDirectionPadElement.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDirectionPadElement.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDirectionPadElement.h 2022-06-30 09:28:34.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDirectionPadElement.h 2022-07-22 10:03:29.000000000 -0400
@@ -12,6 +12,15 @@
NS_ASSUME_NONNULL_BEGIN
+/**
+ An object conforming to \c GCDirectionPadElement represents a four-way
+ directional control with one button on each point.
+
+ A direction pad element contains a common grouping of 2 axis inputs where the
+ input can also be interpreted as 2 sets of mutually exclusive button pairs.
+ Only one button in each pair, {up, down} and {left, right}, can be pressed at
+ any one time.
+ */
API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
@protocol GCDirectionPadElement <GCPhysicalInputElement>
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDualSenseAdaptiveTrigger.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDualSenseAdaptiveTrigger.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDualSenseAdaptiveTrigger.h 2022-06-30 09:31:01.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDualSenseAdaptiveTrigger.h 2022-07-22 10:06:58.000000000 -0400
@@ -10,7 +10,7 @@
NS_ASSUME_NONNULL_BEGIN
enum {
- /** The number of discrete control positions supported by the DualSense adaptive triggers. Each of these positions can be configured separately in multi-position feedback and multi-positiion vibration modes. */
+ /** The number of discrete control positions supported by the DualSense adaptive triggers. Each of these positions can be configured separately in multi-position feedback and multi-position vibration modes. */
GCDualSenseAdaptiveTriggerDiscretePositionCount NS_SWIFT_NAME(GCDualSenseAdaptiveTrigger.discretePositionCount) = 10,
};
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h 2022-06-30 22:07:25.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h 2022-07-22 10:06:57.000000000 -0400
@@ -67,6 +67,11 @@
GAMECONTROLLER_EXTERN GCInputButtonName GCInputButtonOptions NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
GAMECONTROLLER_EXTERN GCInputButtonName GCInputButtonShare NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
+GAMECONTROLLER_EXTERN GCInputButtonName GCInputButtonL4 NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0));
+GAMECONTROLLER_EXTERN GCInputButtonName GCInputButtonL5 NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0));
+GAMECONTROLLER_EXTERN GCInputButtonName GCInputButtonR4 NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0));
+GAMECONTROLLER_EXTERN GCInputButtonName GCInputButtonR5 NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0));
+
/**
A set of strings commonly used to access Xbox buttons
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputElement.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputElement.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputElement.h 2022-06-30 09:28:36.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputElement.h 2022-07-22 10:03:31.000000000 -0400
@@ -9,6 +9,10 @@
NS_ASSUME_NONNULL_BEGIN
+/**
+ The \c GCPhysicalInputElement protocol is a base protocol for specific types
+ of elements that represent controls on a device.
+ */
API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
@protocol GCPhysicalInputElement <NSObject>
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRelativeInput.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRelativeInput.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRelativeInput.h 2022-06-30 09:28:34.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCRelativeInput.h 2022-07-22 10:03:29.000000000 -0400
@@ -14,6 +14,8 @@
/**
An object conforming to \c GCRelativeInput represents an input that reports
its change in position along an axis (delta) since the previous event.
+ Relative inputs have no fixed origin from which a coordinate syatem can be
+ defined.
*/
API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0))
@protocol GCRelativeInput <NSObject>
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status
- xcode16.1 Binding Status
- xcode16.2 Binding Status