-
Notifications
You must be signed in to change notification settings - Fork 507
GameController tvOS xcode13.0 beta5
Manuel de la Pena edited this page Aug 16, 2021
·
3 revisions
#GameController.framework https://github.com/xamarin/xamarin-macios/pull/12445
diff -ruN /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h
--- /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h 2021-07-22 04:35:36.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h 2021-08-07 08:50:36.000000000 -0400
@@ -37,6 +37,7 @@
GAMECONTROLLER_EXTERN NSString *const GCInputButtonHome API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
GAMECONTROLLER_EXTERN NSString *const GCInputButtonMenu API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
GAMECONTROLLER_EXTERN NSString *const GCInputButtonOptions API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+GAMECONTROLLER_EXTERN NSString *const GCInputButtonShare API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
/**
A set of strings commonly used to access Xbox buttons
diff -ruN /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCMicroGamepad.h /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCMicroGamepad.h
--- /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCMicroGamepad.h 2021-07-22 04:38:00.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCMicroGamepad.h 2021-08-07 05:23:23.000000000 -0400
@@ -43,6 +43,18 @@
GAMECONTROLLER_EXTERN NSString *const GCInputMicroGamepadButtonX API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
/**
+ The primary menu button for the microgamepad
+
+ @note Equivalent to microgamepad.buttonMenu
+
+ @note For the 1st generation Siri Remote, this represents pressing the play/pause button. For the 2nd generation Siri Remote, this represents pressing the back button.
+
+ @note You should avoid polling this button every frame. tvOS will run a gesture recognizer on events before forwarding them to your application that can reduce the window
+ to poll button changes. Instead, register a pressedChangedHandler or a valueChangedHandler.
+*/
+GAMECONTROLLER_EXTERN NSString *const GCInputMicroGamepadButtonMenu API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
+
+/**
Micro Gamepad profile.
All controller profiles provide a base level of information about the controller they belong to.
diff -ruN /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputProfile.h /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputProfile.h
--- /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputProfile.h 2021-07-22 14:34:48.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputProfile.h 2021-08-09 03:24:43.000000000 -0400
@@ -45,6 +45,13 @@
@property (atomic, readonly) NSTimeInterval lastEventTimestamp API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
/**
+ Whether the user has remapped their physical input controls for this profile at the system level.
+
+ @discussion On iOS and tvOS, users can remap their game controller inputs in Settings.
+ */
+@property (nonatomic, readonly) BOOL hasRemappedElements API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.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
@@ -94,6 +101,34 @@
*/
- (void)setStateFromPhysicalInput:(GCPhysicalInputProfile *)physicalInput API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+/**
+ Returns the primary alias of the GCControllerElement that a given physical input maps to.
+
+ @discussion If the user were to map a physical press of the A button of their game controller to the B button, then
+ -[GCPhysicalInputProfile mappedElementAliasForPhysicalInputName: GCInputButtonA] would return GCInputButtonB.
+ Note that mappings can change anytime your app is backgrounded, so make sure you update any relevant visuals when
+ returning to foreground.
+
+ @param inputName A GCInput string corresponding to the physical button you want the mapped element alias for.
+
+ @returns A GCInput string corresponding to the primary alias of the GCControllerElement that a given physical button maps to, or nil if there is no mapping.
+ */
+- (NSString *)mappedElementAliasForPhysicalInputName:(NSString *)inputName API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
+
+/**
+ Returns a set of GCInput strings corresponding to physical inputs that are mapped to a given GCControllerElement.
+
+ @discussion If the user mapped the physical press of the A button, the B button, and the X button to the B button, then
+ -[GCPhysicalInputProfile mappedPhysicalInputNamesForElementAlias: GCInputButtonB] would return [GCInputButtonA, GCInputButtonB, GCInputButtonX].
+ Note that mappings can change anytime your app is backgrounded, so make sure you update any relevant visuals when
+ returning to foreground.
+
+ @param elementAlias A GCInput string corresponding to an alias of the GCControllerElement you want the physical buttons for.
+
+ @returns A set of GCInput strings corresponding to physical inputs that are mapped to a given GCControllerElement, or an empty set if there are no mappings.
+ */
+- (NSSet<NSString *> *)mappedPhysicalInputNamesForElementAlias:(NSString *)elementAlias API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCXboxGamepad.h /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCXboxGamepad.h
--- /Applications/Xcode_13.0.0-beta4.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCXboxGamepad.h 2021-07-22 04:35:35.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta5.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCXboxGamepad.h 2021-08-07 08:50:35.000000000 -0400
@@ -29,4 +29,16 @@
@property (nonatomic, readonly, nullable) GCControllerButtonInput *paddleButton3;
@property (nonatomic, readonly, nullable) GCControllerButtonInput *paddleButton4;
+/**
+ Some Xbox controller variants feature a Share button.
+
+ @example The Bluetooth-enabled Xbox Wireless Controller introduced with the Xbox Series X and Xbox Series S in 2020
+ has a Share button.
+
+ @note The Share button is reserved by the system for screenshot and video recording gestures. If you wish to disable these
+ gestures in your app and take control of the Share button, set buttonShare.preferredSystemGestureState to
+ GCSystemGestureStateDisabled.
+ */
+@property (nonatomic, readonly, nullable) GCControllerButtonInput *buttonShare API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
+
@end
- 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