Skip to content

Commit 168bac8

Browse files
authored
[GameController] Implement Xcode 16.0 beta 1, beta 2 and beta 3 changes. (#20874)
Note: there were no changes in beta 2 or beta 3.
1 parent ec61254 commit 168bac8

File tree

6 files changed

+68
-20
lines changed

6 files changed

+68
-20
lines changed

src/gamecontroller.cs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
using UIViewController = AppKit.NSViewController;
2323
using CHHapticEngine = Foundation.NSObject;
2424
using BezierPath = AppKit.NSBezierPath;
25+
using UIScene = Foundation.NSObject;
26+
using UISceneConnectionOptions = Foundation.NSObject;
27+
using UIInteraction = Foundation.NSObject;
2528
#else
2629
using CoreHaptics;
2730
using UIKit;
@@ -2768,4 +2771,51 @@ interface GCControllerUserCustomizations {
27682771
[Notification, Field ("GCControllerUserCustomizationsDidChangeNotification")]
27692772
NSString DidChangeNotification { get; }
27702773
}
2774+
2775+
[TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0), NoWatch]
2776+
[Native]
2777+
enum GCUIEventTypes : ulong {
2778+
None = 0U,
2779+
Gamepad = (1U << 0),
2780+
}
2781+
2782+
#if IOS || MACCATALYST
2783+
[NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0), NoWatch]
2784+
[BaseType (typeof (NSObject))]
2785+
[DisableDefaultCtor]
2786+
interface GCEventInteraction : UIInteraction {
2787+
[DesignatedInitializer]
2788+
[Export ("init")]
2789+
NativeHandle Constructor ();
2790+
2791+
[Export ("handledEventTypes")]
2792+
GCUIEventTypes HandledEventTypes { get; set; }
2793+
}
2794+
#endif // IOS || MACCATALYST
2795+
2796+
[NoTV, NoMac, iOS (18, 0), NoMacCatalyst, NoWatch]
2797+
[BaseType (typeof (NSObject))]
2798+
[DisableDefaultCtor]
2799+
interface GCGameControllerActivationContext {
2800+
[Export ("previousApplicationBundleID"), NullAllowed]
2801+
string PreviousApplicationBundleId { get; }
2802+
}
2803+
2804+
[NoTV, NoMac, iOS (18, 0), NoMacCatalyst, NoWatch]
2805+
[BaseType (typeof (NSObject))]
2806+
[Protocol (BackwardsCompatibleCodeGeneration = false), Model]
2807+
interface GCGameControllerSceneDelegate {
2808+
[Abstract]
2809+
[Export ("scene:didActivateGameControllerWithContext:")]
2810+
void DidActivateGameController (UIScene scene, GCGameControllerActivationContext context);
2811+
}
2812+
2813+
[NoTV, NoMac, iOS (18, 0), NoMacCatalyst, NoWatch]
2814+
[Category]
2815+
[BaseType (typeof (UISceneConnectionOptions))]
2816+
interface UISceneConnectionOptions_GameController {
2817+
[Export ("gameControllerActivationContext")]
2818+
[return: NullAllowed]
2819+
GCGameControllerActivationContext GetGameControllerActivationContext ();
2820+
}
27712821
}

tests/cecil-tests/Documentation.KnownFailures.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10232,6 +10232,8 @@ F:GameController.GCSystemGestureState.Enabled
1023210232
F:GameController.GCTouchState.Down
1023310233
F:GameController.GCTouchState.Moving
1023410234
F:GameController.GCTouchState.Up
10235+
F:GameController.GCUIEventTypes.Gamepad
10236+
F:GameController.GCUIEventTypes.None
1023510237
F:GameKit.GKAccessPointLocation.BottomLeading
1023610238
F:GameKit.GKAccessPointLocation.BottomTrailing
1023710239
F:GameKit.GKAccessPointLocation.TopLeading
@@ -35412,6 +35414,10 @@ M:GameController.GCDualSenseAdaptiveTrigger.SetModeWeapon(System.Single,System.S
3541235414
M:GameController.GCDualSenseAdaptiveTriggerPositionalAmplitudes.#ctor(System.Single[])
3541335415
M:GameController.GCDualSenseAdaptiveTriggerPositionalResistiveStrengths.#ctor(System.Single[])
3541435416
M:GameController.GCDualShockGamepad.EncodeTo(Foundation.NSCoder)
35417+
M:GameController.GCEventInteraction.#ctor
35418+
M:GameController.GCEventInteraction.DidMoveToView(UIKit.UIView)
35419+
M:GameController.GCEventInteraction.Dispose(System.Boolean)
35420+
M:GameController.GCEventInteraction.WillMoveToView(UIKit.UIView)
3541535421
M:GameController.GCEventViewController.#ctor(System.String,Foundation.NSBundle)
3541635422
M:GameController.GCExtendedGamepad.Dispose(System.Boolean)
3541735423
M:GameController.GCExtendedGamepad.SaveSnapshot
@@ -35422,6 +35428,7 @@ M:GameController.GCExtendedGamepadSnapshot.TryGetExtendedSnapShotData(Foundation
3542235428
M:GameController.GCExtendedGamepadSnapshot.TryGetSnapShotData(Foundation.NSData,GameController.GCExtendedGamepadSnapShotDataV100@)
3542335429
M:GameController.GCExtendedGamepadSnapshotData.ToNSData
3542435430
M:GameController.GCExtendedGamepadSnapShotDataV100.ToNSData
35431+
M:GameController.GCGameControllerSceneDelegate.DidActivateGameController(UIKit.UIScene,GameController.GCGameControllerActivationContext)
3542535432
M:GameController.GCGamepad.Dispose(System.Boolean)
3542635433
M:GameController.GCGamepadSnapshot.#ctor(Foundation.NSData)
3542735434
M:GameController.GCGamepadSnapshot.#ctor(GameController.GCController,Foundation.NSData)
@@ -35465,6 +35472,8 @@ M:GameController.GCVirtualController.UpdateConfiguration(System.String,GameContr
3546535472
M:GameController.GCXboxGamepad.EncodeTo(Foundation.NSCoder)
3546635473
M:GameController.IGCDevicePhysicalInputState.GetObject(System.String)
3546735474
M:GameController.IGCDevicePhysicalInputStateDiff.GetChange(GameController.IGCPhysicalInputElement)
35475+
M:GameController.IGCGameControllerSceneDelegate.DidActivateGameController(UIKit.UIScene,GameController.GCGameControllerActivationContext)
35476+
M:GameController.UISceneConnectionOptions_GameController.GetGameControllerActivationContext(UIKit.UISceneConnectionOptions)
3546835477
M:GameKit.GKAccessPoint.Dispose(System.Boolean)
3546935478
M:GameKit.GKAchievement.#ctor
3547035479
M:GameKit.GKAchievement.ChallengeComposeControllerAsync(System.String,GameKit.GKPlayer[],AppKit.NSViewController@)
@@ -65235,6 +65244,8 @@ P:GameController.GCDualSenseGamepad.TouchpadSecondary
6523565244
P:GameController.GCDualShockGamepad.TouchpadButton
6523665245
P:GameController.GCDualShockGamepad.TouchpadPrimary
6523765246
P:GameController.GCDualShockGamepad.TouchpadSecondary
65247+
P:GameController.GCEventInteraction.HandledEventTypes
65248+
P:GameController.GCEventInteraction.View
6523865249
P:GameController.GCEventViewController.ControllerUserInteractionEnabled
6523965250
P:GameController.GCExtendedGamepad.ButtonA
6524065251
P:GameController.GCExtendedGamepad.ButtonB
@@ -65256,6 +65267,7 @@ P:GameController.GCExtendedGamepad.RightTrigger
6525665267
P:GameController.GCExtendedGamepad.ValueChangedHandler
6525765268
P:GameController.GCExtendedGamepadSnapshot.DataVersion
6525865269
P:GameController.GCExtendedGamepadSnapshot.SnapshotData
65270+
P:GameController.GCGameControllerActivationContext.PreviousApplicationBundleId
6525965271
P:GameController.GCGamepad.ButtonA
6526065272
P:GameController.GCGamepad.ButtonB
6526165273
P:GameController.GCGamepad.ButtonX
@@ -79616,9 +79628,12 @@ T:GameController.GCDualSenseAdaptiveTriggerPositionalResistiveStrengths
7961679628
T:GameController.GCDualSenseAdaptiveTriggerStatus
7961779629
T:GameController.GCDualSenseGamepad
7961879630
T:GameController.GCDualShockGamepad
79631+
T:GameController.GCEventInteraction
7961979632
T:GameController.GCExtendedGamepadSnapshotData
7962079633
T:GameController.GCExtendedGamepadSnapShotDataV100
7962179634
T:GameController.GCExtendedGamepadSnapshotDataVersion
79635+
T:GameController.GCGameControllerActivationContext
79636+
T:GameController.GCGameControllerSceneDelegate
7962279637
T:GameController.GCGamepadSnapShotDataV100
7962379638
T:GameController.GCGearShifterElement
7962479639
T:GameController.GCHapticsLocality
@@ -79647,6 +79662,7 @@ T:GameController.GCRotationRate
7964779662
T:GameController.GCSteeringWheelElement
7964879663
T:GameController.GCSystemGestureState
7964979664
T:GameController.GCTouchState
79665+
T:GameController.GCUIEventTypes
7965079666
T:GameController.GCVirtualController
7965179667
T:GameController.GCVirtualControllerConfiguration
7965279668
T:GameController.GCVirtualControllerElementConfiguration
@@ -79660,6 +79676,7 @@ T:GameController.IGCDevicePhysicalInput
7966079676
T:GameController.IGCDevicePhysicalInputState
7966179677
T:GameController.IGCDevicePhysicalInputStateDiff
7966279678
T:GameController.IGCDirectionPadElement
79679+
T:GameController.IGCGameControllerSceneDelegate
7966379680
T:GameController.IGCLinearInput
7966479681
T:GameController.IGCPhysicalInputElement
7966579682
T:GameController.IGCPressedStateInput
@@ -79668,6 +79685,7 @@ T:GameController.IGCSwitchElement
7966879685
T:GameController.IGCSwitchPositionInput
7966979686
T:GameController.IGCTouchedStateInput
7967079687
T:GameController.InputStateAvailableHandler
79688+
T:GameController.UISceneConnectionOptions_GameController
7967179689
T:GameKit.GKAccessPointLocation
7967279690
T:GameKit.GKAchievementDescriptionHandler
7967379691
T:GameKit.GKCategoryResult

tests/xtro-sharpie/api-annotations-dotnet/iOS-GameController.todo

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,13 @@
3333
!missing-type! GCControllerInputState not bound
3434
!missing-type! GCControllerLiveInput not bound
3535
!missing-type! GCPhysicalInputElementCollection not bound
36-
!missing-enum! GCUIEventTypes not bound
3736
!missing-field! GCInputLeftBumper not bound
3837
!missing-field! GCInputRightBumper not bound
3938
!missing-field! GCPoint2Zero not bound
4039
!missing-pinvoke! GCInputBackLeftButton is not bound
4140
!missing-pinvoke! GCInputBackRightButton is not bound
4241
!missing-pinvoke! NSStringFromGCPoint2 is not bound
4342
!missing-protocol! GCAxis2DInput not bound
44-
!missing-protocol! GCGameControllerSceneDelegate not bound
4543
!missing-protocol-member! GCDirectionPadElement::xyAxes not found
4644
!missing-selector! +NSValue::valueWithGCPoint2: not bound
47-
!missing-selector! GCEventInteraction::handledEventTypes not bound
48-
!missing-selector! GCEventInteraction::init not bound
49-
!missing-selector! GCEventInteraction::setHandledEventTypes: not bound
50-
!missing-selector! GCGameControllerActivationContext::previousApplicationBundleID not bound
5145
!missing-selector! NSValue::GCPoint2Value not bound
52-
!missing-selector! UISceneConnectionOptions::gameControllerActivationContext not bound
53-
!missing-type! GCEventInteraction not bound
54-
!missing-type! GCGameControllerActivationContext not bound

tests/xtro-sharpie/api-annotations-dotnet/tvOS-GameController.todo

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
!missing-selector! GCControllerLiveInput::unmappedInput not bound
1717
!missing-type! GCControllerInputState not bound
1818
!missing-type! GCControllerLiveInput not bound
19-
!missing-enum! GCUIEventTypes not bound
2019
!missing-field! GCInputLeftBumper not bound
2120
!missing-field! GCInputRightBumper not bound
2221
!missing-field! GCPoint2Zero not bound

tests/xtro-sharpie/iOS-GameController.todo

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,13 @@
3333
!missing-type! GCControllerInputState not bound
3434
!missing-type! GCControllerLiveInput not bound
3535
!missing-type! GCPhysicalInputElementCollection not bound
36-
!missing-enum! GCUIEventTypes not bound
3736
!missing-field! GCInputLeftBumper not bound
3837
!missing-field! GCInputRightBumper not bound
3938
!missing-field! GCPoint2Zero not bound
4039
!missing-pinvoke! GCInputBackLeftButton is not bound
4140
!missing-pinvoke! GCInputBackRightButton is not bound
4241
!missing-pinvoke! NSStringFromGCPoint2 is not bound
4342
!missing-protocol! GCAxis2DInput not bound
44-
!missing-protocol! GCGameControllerSceneDelegate not bound
4543
!missing-protocol-member! GCDirectionPadElement::xyAxes not found
4644
!missing-selector! +NSValue::valueWithGCPoint2: not bound
47-
!missing-selector! GCEventInteraction::handledEventTypes not bound
48-
!missing-selector! GCEventInteraction::init not bound
49-
!missing-selector! GCEventInteraction::setHandledEventTypes: not bound
50-
!missing-selector! GCGameControllerActivationContext::previousApplicationBundleID not bound
5145
!missing-selector! NSValue::GCPoint2Value not bound
52-
!missing-selector! UISceneConnectionOptions::gameControllerActivationContext not bound
53-
!missing-type! GCEventInteraction not bound
54-
!missing-type! GCGameControllerActivationContext not bound

tests/xtro-sharpie/tvOS-GameController.todo

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
!missing-selector! GCControllerLiveInput::unmappedInput not bound
1717
!missing-type! GCControllerInputState not bound
1818
!missing-type! GCControllerLiveInput not bound
19-
!missing-enum! GCUIEventTypes not bound
2019
!missing-field! GCInputLeftBumper not bound
2120
!missing-field! GCInputRightBumper not bound
2221
!missing-field! GCPoint2Zero not bound

0 commit comments

Comments
 (0)