Skip to content

GameController tvOS xcode13.0 beta1

tj_devel709 edited this page Jun 24, 2021 · 3 revisions

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

diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCKeyCodes.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCKeyCodes.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCKeyCodes.h	2021-03-16 09:53:20.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCKeyCodes.h	2021-06-02 05:37:21.000000000 -0400
@@ -87,6 +87,14 @@
 GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodeF10 API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));                         /* F10 */
 GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodeF11 API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));                         /* F11 */
 GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodeF12 API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));                         /* F12 */
+GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodeF13 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F13 */
+GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodeF14 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F14 */
+GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodeF15 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F15 */
+GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodeF16 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F16 */
+GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodeF17 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F17 */
+GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodeF18 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F18 */
+GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodeF19 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F19 */
+GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodeF20 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F20 */
 
 GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodePrintScreen API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));                 /* Print Screen */
 GAMECONTROLLER_EXTERN GCKeyCode const GCKeyCodeScrollLock API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));                  /* Scroll Lock */
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCKeyNames.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCKeyNames.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCKeyNames.h	2021-03-16 13:58:13.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCKeyNames.h	2021-06-02 11:08:30.000000000 -0400
@@ -86,6 +86,14 @@
 GAMECONTROLLER_EXTERN NSString *const GCKeyF10 API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));                         /* F10 */
 GAMECONTROLLER_EXTERN NSString *const GCKeyF11 API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));                         /* F11 */
 GAMECONTROLLER_EXTERN NSString *const GCKeyF12 API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));                         /* F12 */
+GAMECONTROLLER_EXTERN NSString *const GCKeyF13 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F13 */
+GAMECONTROLLER_EXTERN NSString *const GCKeyF14 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F14 */
+GAMECONTROLLER_EXTERN NSString *const GCKeyF15 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F15 */
+GAMECONTROLLER_EXTERN NSString *const GCKeyF16 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F16 */
+GAMECONTROLLER_EXTERN NSString *const GCKeyF17 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F17 */
+GAMECONTROLLER_EXTERN NSString *const GCKeyF18 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F18 */
+GAMECONTROLLER_EXTERN NSString *const GCKeyF19 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F19 */
+GAMECONTROLLER_EXTERN NSString *const GCKeyF20 API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));                         /* F20 */
 GAMECONTROLLER_EXTERN NSString *const GCKeyPrintScreen API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));                 /* Print Screen */
 GAMECONTROLLER_EXTERN NSString *const GCKeyScrollLock API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));                  /* Scroll Lock */
 GAMECONTROLLER_EXTERN NSString *const GCKeyPause API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));                       /* Pause */
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputProfile.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputProfile.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputProfile.h	2021-03-16 08:46:46.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputProfile.h	2021-06-02 05:37:21.000000000 -0400
@@ -11,11 +11,13 @@
 @class GCControllerButtonInput;
 @class GCControllerAxisInput;
 @class GCControllerDirectionPad;
+@class GCControllerTouchpad;
 
 @compatibility_alias GCDeviceElement GCControllerElement;
 @compatibility_alias GCDeviceButtonInput GCControllerButtonInput;
 @compatibility_alias GCDeviceAxisInput GCControllerAxisInput;
 @compatibility_alias GCDeviceDirectionPad GCControllerDirectionPad;
+@compatibility_alias GCDeviceTouchpad GCControllerTouchpad;
 
 #import <Foundation/Foundation.h>
 
@@ -53,6 +55,7 @@
 @property (nonatomic, readonly, strong) NSDictionary<NSString *, GCDeviceButtonInput *> *buttons API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
 @property (nonatomic, readonly, strong) NSDictionary<NSString *, GCDeviceAxisInput *> *axes API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
 @property (nonatomic, readonly, strong) NSDictionary<NSString *, GCDeviceDirectionPad *> *dpads API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+@property (nonatomic, readonly, strong) NSDictionary<NSString *, GCDeviceTouchpad *> *touchpads API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
 
 /**
  The following properties allow for dynamic querying of the input elements available on a profile.
@@ -61,6 +64,7 @@
 @property (nonatomic, readonly, strong) NSSet<GCDeviceButtonInput *> *allButtons API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
 @property (nonatomic, readonly, strong) NSSet<GCDeviceAxisInput *> *allAxes API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
 @property (nonatomic, readonly, strong) NSSet<GCDeviceDirectionPad *> *allDpads API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+@property (nonatomic, readonly, strong) NSSet<GCDeviceTouchpad *> *allTouchpads API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
 
 /**
  Profile elements can be accessed using keyed subscript notation, with a valid alias of its inputs.
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCVirtualController.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCVirtualController.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCVirtualController.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCVirtualController.h	2021-06-02 05:34:46.000000000 -0400
@@ -0,0 +1,90 @@
+//  
+//  GCVirtualController.h
+//  GameController
+//
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <TargetConditionals.h>
+
+
+#if TARGET_OS_IPHONE
+#import <GameController/GameController.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+
+
+/**
+ GCVirtualControllerConfiguration
+ 
+*/
+API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(macos, tvos)
+@interface GCVirtualControllerConfiguration : NSObject
+ 
+// The set of controller elements e.g. [GCInputDirectionPad, GCInputLeftShoulder,  etc...]
+@property (nonatomic, strong) NSSet<NSString *> *elements;
+   
+@end
+
+
+/**
+ GCVirtualControllerElementConfiguration
+ 
+*/
+API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(macos, tvos)
+@interface GCVirtualControllerElementConfiguration : NSObject
+
+/**
+ A Boolean value that determines whether the element is hidden
+ */
+@property (nonatomic) BOOL hidden;
+
+/**
+ Path that defines custom element image
+ Only supported for button elements
+ */
+@property (nonatomic, strong, nullable) UIBezierPath* path;
+
+/**
+ A Boolean value that determines if the thumbstick is acting as a touchpad
+ Only supported for thumbsticks
+ */
+@property (nonatomic) BOOL touchpad;
+
+@end
+
+
+
+/**
+ GCVirtualController
+ 
+*/
+API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(macos, tvos)
+@interface GCVirtualController : NSObject
+
+/**
+ Create a virtual controller
+ 
+ @see GCVirtualControllerConfiguration
+ */
++(GCVirtualController *)virtualControllerWithConfiguration:(GCVirtualControllerConfiguration *)configuration;
+
+-(void)connectWithReply:(void(^ _Nullable )(NSError * _Nullable error))reply;
+
+-(void)disconnect;
+
+
+/**
+ GCController is only availible when GCVirtualController is connected
+ */
+@property (nonatomic, weak, readonly, nullable) GCController *controller;
+
+typedef GCVirtualControllerElementConfiguration* _Nonnull (^GCVirtualControllerElementUpdateBlock)(GCVirtualControllerElementConfiguration* oldConfiguration) API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(macos, tvos);
+-(void)changeElement:(NSString*)element configuration:(GCVirtualControllerElementUpdateBlock)config;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h	2021-03-16 13:52:02.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h	2021-06-01 22:26:50.000000000 -0400
@@ -6,6 +6,7 @@
 //
 
 #import <Foundation/Foundation.h>
+#import <TargetConditionals.h>
 
 #import <GameController/GCExtern.h>
 #import <GameController/GCColor.h>
@@ -52,3 +53,5 @@
 #import <GameController/GCEventViewController.h>
 
 #import <GameController/GCDeviceHaptics.h>
+
+#import <GameController/GCVirtualController.h>
Clone this wiki locally