Skip to content

[GameController] Implement Xcode 16.0 beta 1, beta 2 and beta 3 changes. #20874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions src/gamecontroller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
using UIViewController = AppKit.NSViewController;
using CHHapticEngine = Foundation.NSObject;
using BezierPath = AppKit.NSBezierPath;
using UIScene = Foundation.NSObject;
using UISceneConnectionOptions = Foundation.NSObject;
using UIInteraction = Foundation.NSObject;
#else
using CoreHaptics;
using UIKit;
Expand Down Expand Up @@ -2768,4 +2771,51 @@ interface GCControllerUserCustomizations {
[Notification, Field ("GCControllerUserCustomizationsDidChangeNotification")]
NSString DidChangeNotification { get; }
}

[TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0), NoWatch]
[Native]
enum GCUIEventTypes : ulong {
None = 0U,
Gamepad = (1U << 0),
}

#if IOS || MACCATALYST
[NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0), NoWatch]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface GCEventInteraction : UIInteraction {
[DesignatedInitializer]
[Export ("init")]
NativeHandle Constructor ();

[Export ("handledEventTypes")]
GCUIEventTypes HandledEventTypes { get; set; }
}
#endif // IOS || MACCATALYST

[NoTV, NoMac, iOS (18, 0), NoMacCatalyst, NoWatch]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface GCGameControllerActivationContext {
[Export ("previousApplicationBundleID"), NullAllowed]
string PreviousApplicationBundleId { get; }
}

[NoTV, NoMac, iOS (18, 0), NoMacCatalyst, NoWatch]
[BaseType (typeof (NSObject))]
[Protocol (BackwardsCompatibleCodeGeneration = false), Model]
interface GCGameControllerSceneDelegate {
[Abstract]
[Export ("scene:didActivateGameControllerWithContext:")]
void DidActivateGameController (UIScene scene, GCGameControllerActivationContext context);
}

[NoTV, NoMac, iOS (18, 0), NoMacCatalyst, NoWatch]
[Category]
[BaseType (typeof (UISceneConnectionOptions))]
interface UISceneConnectionOptions_GameController {
[Export ("gameControllerActivationContext")]
[return: NullAllowed]
GCGameControllerActivationContext GetGameControllerActivationContext ();
}
}
18 changes: 18 additions & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10215,6 +10215,8 @@ F:GameController.GCSystemGestureState.Enabled
F:GameController.GCTouchState.Down
F:GameController.GCTouchState.Moving
F:GameController.GCTouchState.Up
F:GameController.GCUIEventTypes.Gamepad
F:GameController.GCUIEventTypes.None
F:GameKit.GKAccessPointLocation.BottomLeading
F:GameKit.GKAccessPointLocation.BottomTrailing
F:GameKit.GKAccessPointLocation.TopLeading
Expand Down Expand Up @@ -35381,6 +35383,10 @@ M:GameController.GCDualSenseAdaptiveTrigger.SetModeWeapon(System.Single,System.S
M:GameController.GCDualSenseAdaptiveTriggerPositionalAmplitudes.#ctor(System.Single[])
M:GameController.GCDualSenseAdaptiveTriggerPositionalResistiveStrengths.#ctor(System.Single[])
M:GameController.GCDualShockGamepad.EncodeTo(Foundation.NSCoder)
M:GameController.GCEventInteraction.#ctor
M:GameController.GCEventInteraction.DidMoveToView(UIKit.UIView)
M:GameController.GCEventInteraction.Dispose(System.Boolean)
M:GameController.GCEventInteraction.WillMoveToView(UIKit.UIView)
M:GameController.GCEventViewController.#ctor(System.String,Foundation.NSBundle)
M:GameController.GCExtendedGamepad.Dispose(System.Boolean)
M:GameController.GCExtendedGamepad.SaveSnapshot
Expand All @@ -35391,6 +35397,7 @@ M:GameController.GCExtendedGamepadSnapshot.TryGetExtendedSnapShotData(Foundation
M:GameController.GCExtendedGamepadSnapshot.TryGetSnapShotData(Foundation.NSData,GameController.GCExtendedGamepadSnapShotDataV100@)
M:GameController.GCExtendedGamepadSnapshotData.ToNSData
M:GameController.GCExtendedGamepadSnapShotDataV100.ToNSData
M:GameController.GCGameControllerSceneDelegate.DidActivateGameController(UIKit.UIScene,GameController.GCGameControllerActivationContext)
M:GameController.GCGamepad.Dispose(System.Boolean)
M:GameController.GCGamepadSnapshot.#ctor(Foundation.NSData)
M:GameController.GCGamepadSnapshot.#ctor(GameController.GCController,Foundation.NSData)
Expand Down Expand Up @@ -35434,6 +35441,8 @@ M:GameController.GCVirtualController.UpdateConfiguration(System.String,GameContr
M:GameController.GCXboxGamepad.EncodeTo(Foundation.NSCoder)
M:GameController.IGCDevicePhysicalInputState.GetObject(System.String)
M:GameController.IGCDevicePhysicalInputStateDiff.GetChange(GameController.IGCPhysicalInputElement)
M:GameController.IGCGameControllerSceneDelegate.DidActivateGameController(UIKit.UIScene,GameController.GCGameControllerActivationContext)
M:GameController.UISceneConnectionOptions_GameController.GetGameControllerActivationContext(UIKit.UISceneConnectionOptions)
M:GameKit.GKAccessPoint.Dispose(System.Boolean)
M:GameKit.GKAchievement.#ctor
M:GameKit.GKAchievement.ChallengeComposeControllerAsync(System.String,GameKit.GKPlayer[],AppKit.NSViewController@)
Expand Down Expand Up @@ -65158,6 +65167,8 @@ P:GameController.GCDualSenseGamepad.TouchpadSecondary
P:GameController.GCDualShockGamepad.TouchpadButton
P:GameController.GCDualShockGamepad.TouchpadPrimary
P:GameController.GCDualShockGamepad.TouchpadSecondary
P:GameController.GCEventInteraction.HandledEventTypes
P:GameController.GCEventInteraction.View
P:GameController.GCEventViewController.ControllerUserInteractionEnabled
P:GameController.GCExtendedGamepad.ButtonA
P:GameController.GCExtendedGamepad.ButtonB
Expand All @@ -65179,6 +65190,7 @@ P:GameController.GCExtendedGamepad.RightTrigger
P:GameController.GCExtendedGamepad.ValueChangedHandler
P:GameController.GCExtendedGamepadSnapshot.DataVersion
P:GameController.GCExtendedGamepadSnapshot.SnapshotData
P:GameController.GCGameControllerActivationContext.PreviousApplicationBundleId
P:GameController.GCGamepad.ButtonA
P:GameController.GCGamepad.ButtonB
P:GameController.GCGamepad.ButtonX
Expand Down Expand Up @@ -79527,9 +79539,12 @@ T:GameController.GCDualSenseAdaptiveTriggerPositionalResistiveStrengths
T:GameController.GCDualSenseAdaptiveTriggerStatus
T:GameController.GCDualSenseGamepad
T:GameController.GCDualShockGamepad
T:GameController.GCEventInteraction
T:GameController.GCExtendedGamepadSnapshotData
T:GameController.GCExtendedGamepadSnapShotDataV100
T:GameController.GCExtendedGamepadSnapshotDataVersion
T:GameController.GCGameControllerActivationContext
T:GameController.GCGameControllerSceneDelegate
T:GameController.GCGamepadSnapShotDataV100
T:GameController.GCGearShifterElement
T:GameController.GCHapticsLocality
Expand Down Expand Up @@ -79558,6 +79573,7 @@ T:GameController.GCRotationRate
T:GameController.GCSteeringWheelElement
T:GameController.GCSystemGestureState
T:GameController.GCTouchState
T:GameController.GCUIEventTypes
T:GameController.GCVirtualController
T:GameController.GCVirtualControllerConfiguration
T:GameController.GCVirtualControllerElementConfiguration
Expand All @@ -79571,6 +79587,7 @@ T:GameController.IGCDevicePhysicalInput
T:GameController.IGCDevicePhysicalInputState
T:GameController.IGCDevicePhysicalInputStateDiff
T:GameController.IGCDirectionPadElement
T:GameController.IGCGameControllerSceneDelegate
T:GameController.IGCLinearInput
T:GameController.IGCPhysicalInputElement
T:GameController.IGCPressedStateInput
Expand All @@ -79579,6 +79596,7 @@ T:GameController.IGCSwitchElement
T:GameController.IGCSwitchPositionInput
T:GameController.IGCTouchedStateInput
T:GameController.InputStateAvailableHandler
T:GameController.UISceneConnectionOptions_GameController
T:GameKit.GKAccessPointLocation
T:GameKit.GKAchievementDescriptionHandler
T:GameKit.GKCategoryResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,13 @@
!missing-type! GCControllerInputState not bound
!missing-type! GCControllerLiveInput not bound
!missing-type! GCPhysicalInputElementCollection not bound
!missing-enum! GCUIEventTypes not bound
!missing-field! GCInputLeftBumper not bound
!missing-field! GCInputRightBumper not bound
!missing-field! GCPoint2Zero not bound
!missing-pinvoke! GCInputBackLeftButton is not bound
!missing-pinvoke! GCInputBackRightButton is not bound
!missing-pinvoke! NSStringFromGCPoint2 is not bound
!missing-protocol! GCAxis2DInput not bound
!missing-protocol! GCGameControllerSceneDelegate not bound
!missing-protocol-member! GCDirectionPadElement::xyAxes not found
!missing-selector! +NSValue::valueWithGCPoint2: not bound
!missing-selector! GCEventInteraction::handledEventTypes not bound
!missing-selector! GCEventInteraction::init not bound
!missing-selector! GCEventInteraction::setHandledEventTypes: not bound
!missing-selector! GCGameControllerActivationContext::previousApplicationBundleID not bound
!missing-selector! NSValue::GCPoint2Value not bound
!missing-selector! UISceneConnectionOptions::gameControllerActivationContext not bound
!missing-type! GCEventInteraction not bound
!missing-type! GCGameControllerActivationContext not bound
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
!missing-selector! GCControllerLiveInput::unmappedInput not bound
!missing-type! GCControllerInputState not bound
!missing-type! GCControllerLiveInput not bound
!missing-enum! GCUIEventTypes not bound
!missing-field! GCInputLeftBumper not bound
!missing-field! GCInputRightBumper not bound
!missing-field! GCPoint2Zero not bound
Expand Down
9 changes: 0 additions & 9 deletions tests/xtro-sharpie/iOS-GameController.todo
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,13 @@
!missing-type! GCControllerInputState not bound
!missing-type! GCControllerLiveInput not bound
!missing-type! GCPhysicalInputElementCollection not bound
!missing-enum! GCUIEventTypes not bound
!missing-field! GCInputLeftBumper not bound
!missing-field! GCInputRightBumper not bound
!missing-field! GCPoint2Zero not bound
!missing-pinvoke! GCInputBackLeftButton is not bound
!missing-pinvoke! GCInputBackRightButton is not bound
!missing-pinvoke! NSStringFromGCPoint2 is not bound
!missing-protocol! GCAxis2DInput not bound
!missing-protocol! GCGameControllerSceneDelegate not bound
!missing-protocol-member! GCDirectionPadElement::xyAxes not found
!missing-selector! +NSValue::valueWithGCPoint2: not bound
!missing-selector! GCEventInteraction::handledEventTypes not bound
!missing-selector! GCEventInteraction::init not bound
!missing-selector! GCEventInteraction::setHandledEventTypes: not bound
!missing-selector! GCGameControllerActivationContext::previousApplicationBundleID not bound
!missing-selector! NSValue::GCPoint2Value not bound
!missing-selector! UISceneConnectionOptions::gameControllerActivationContext not bound
!missing-type! GCEventInteraction not bound
!missing-type! GCGameControllerActivationContext not bound
1 change: 0 additions & 1 deletion tests/xtro-sharpie/tvOS-GameController.todo
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
!missing-selector! GCControllerLiveInput::unmappedInput not bound
!missing-type! GCControllerInputState not bound
!missing-type! GCControllerLiveInput not bound
!missing-enum! GCUIEventTypes not bound
!missing-field! GCInputLeftBumper not bound
!missing-field! GCInputRightBumper not bound
!missing-field! GCPoint2Zero not bound
Expand Down