-
Notifications
You must be signed in to change notification settings - Fork 520
GameController tvOS xcode16.0 b1
Rolf Bjarne Kvinge edited this page Jul 11, 2024
·
3 revisions
#GameController.framework https://github.com/xamarin/xamarin-macios/pull/20874
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCEventInteraction.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCEventInteraction.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCEventInteraction.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCEventInteraction.h 2024-05-30 04:44:47
@@ -0,0 +1,54 @@
+//
+// GCEventInteraction.h
+// GameController
+//
+// Copyright © 2024 Apple Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef NS_OPTIONS(NSUInteger, GCUIEventTypes) {
+ GCUIEventTypeNone = (0U),
+ GCUIEventTypeGamepad = (1U << 0),
+};
+
+/**
+ * An interaction that indicates your views's intent to receive game controller
+ * events through the GameController framework.
+ *
+ * @discussion
+ * On some platforms controllers can be used to control the general UIKit user
+ * interface and for many views that is the default behavior. By attaching a
+ * \c GCEventInteraction to one or more of your app's views you get fine
+ * grained control over whether the controller events go through the UIEvent &
+ * UIResponder chain, or if they are decoupled from the UI and all incoming
+ * data is served via Game Controller framework.
+ *
+ * On visionOS, while the user is gazing a view with the \c GCEventInteraction,
+ * or one of its subviews, the interaction's \c handledEventTypes property
+ * determines whether the system will deliver game controller events through
+ * the Game Controller framework instead of through the UIEvent & UIResponder
+ * chain.
+ *
+ * On iOS, iPadOS, and tvOS, while a view with the \c GCEventInteraction, is
+ * the first responder, or is part of the current responder chain, the
+ * interaction's \c handledEventTypes property determines whether the system
+ * will deliver game controller events through the Game Controller framework
+ * instead of through the UIEvent & UIResponder chain.
+ */
+API_AVAILABLE(macCatalyst(18.0), ios(18.0), visionos(2.0)) API_UNAVAILABLE(tvos) API_UNAVAILABLE(macos)
+@interface GCEventInteraction : NSObject <UIInteraction>
+
+- (instancetype)init NS_DESIGNATED_INITIALIZER;
+
+/**
+ * The types of game controller events that should be delivered through
+ * the Game Controller framework.
+ */
+@property (nonatomic, readwrite) GCUIEventTypes handledEventTypes;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCEventViewController.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCEventViewController.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCEventViewController.h 2024-04-13 15:05:17
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCEventViewController.h 2024-05-30 04:44:46
@@ -5,8 +5,6 @@
// Copyright © 2018 Apple Inc. All rights reserved.
//
-#import <TargetConditionals.h>
-
#import <Foundation/Foundation.h>
#import <UIKit/UIViewController.h>
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCExtern.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCExtern.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCExtern.h 2024-04-13 15:05:14
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCExtern.h 2024-05-30 04:44:43
@@ -10,3 +10,5 @@
#else
#define GAMECONTROLLER_EXTERN extern __attribute__((visibility ("default")))
#endif
+
+
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCGameControllerActivationContext.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCGameControllerActivationContext.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCGameControllerActivationContext.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCGameControllerActivationContext.h 2024-05-30 04:44:46
@@ -0,0 +1,26 @@
+//
+// GCGameControllerActivationContext.h
+// GameController
+//
+// Copyright © 2024 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GameController/GCExtern.h>
+
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+API_AVAILABLE(ios(18.0))
+API_UNAVAILABLE(macCatalyst, tvos, visionos)
+API_UNAVAILABLE(macos)
+@interface GCGameControllerActivationContext : NSObject
+
+- (instancetype)init NS_UNAVAILABLE;
+
+/** The bundle identifier of the previously active application, if any. */
+@property (nonatomic, nullable, readonly) NSString *previousApplicationBundleID;
+
+@end
+
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCGameControllerSceneDelegate.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCGameControllerSceneDelegate.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCGameControllerSceneDelegate.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCGameControllerSceneDelegate.h 2024-05-30 04:44:48
@@ -0,0 +1,48 @@
+//
+// GCGameControllerSceneDelegate.h
+// GameControllerFramework
+//
+// Created by Chris Donegan on 1/26/24.
+//
+
+#import <Foundation/Foundation.h>
+#import <GameController/GCExtern.h>
+#import <GameController/GCGameControllerActivationContext.h>
+
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+GAMECONTROLLER_EXTERN
+API_AVAILABLE(ios(18.0))
+API_UNAVAILABLE(macCatalyst, tvos, visionos)
+API_UNAVAILABLE(macos)
+@protocol GCGameControllerSceneDelegate <NSObject>
+
+/**
+ * The scene has activated in response to a game controller event.
+ *
+ * @param scene
+ * The activated scene
+ *
+ * @param context
+ * The game controller activation context
+ */
+- (void)scene:(UIScene *)scene didActivateGameControllerWithContext:(GCGameControllerActivationContext *)context;
+
+@end
+
+
+GAMECONTROLLER_EXTERN
+API_AVAILABLE(ios(18.0))
+API_UNAVAILABLE(macCatalyst, tvos, visionos)
+API_UNAVAILABLE(macos)
+@interface UISceneConnectionOptions (GameController)
+
+/**
+ * The activation context if the scene is being connected in response to a
+ * game controller.
+ */
+@property (nonatomic, nullable, readonly) GCGameControllerActivationContext *gameControllerActivationContext;
+
+@end
+
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCProductCategories.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCProductCategories.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCProductCategories.h 2024-04-13 15:05:17
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GCProductCategories.h 2024-05-30 04:44:46
@@ -24,6 +24,7 @@
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));
+
GAMECONTROLLER_EXTERN NSString *const GCProductCategoryArcadeStick API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0));
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h 2024-04-13 15:05:15
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h 2024-05-30 04:44:45
@@ -68,7 +68,6 @@
#import <GameController/GCController.h>
#import <GameController/GCKeyboard.h>
#import <GameController/GCMouse.h>
-#import <GameController/GCEventViewController.h>
#import <GameController/GCRacingWheel.h>
#import <GameController/GCRacingWheelInput.h>
@@ -77,5 +76,15 @@
#import <GameController/GCDeviceHaptics.h>
+
+#import <GameController/GCEventViewController.h>
+#if __has_include(<UIKit/UIKit.h>)
+#import <GameController/GCEventInteraction.h>
+#import <GameController/GCGameControllerActivationContext.h>
+#import <GameController/GCGameControllerSceneDelegate.h>
+#endif
+#if __has_include(<GameController/GCVirtualController.h>)
+#import <GameController/GCVirtualController.h>
+#endif
#import <GameController/GCSyntheticDeviceKeys.h>