Skip to content

Commit

Permalink
[GameController] Updates for Xcode13 beta1 (#12014)
Browse files Browse the repository at this point in the history
* Initial changes for xcode13 GameController beta1

* syntax and name change

* name change and adding async

Co-authored-by: tj_devel709 <[email protected]>
  • Loading branch information
tj-devel709 and tj_devel709 authored Jun 28, 2021
1 parent a134a75 commit 3240249
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 105 deletions.
123 changes: 122 additions & 1 deletion src/gamecontroller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
// Authors:
// Aaron Bockover ([email protected])
// TJ Lambert (t-anlamb@microsoft.com)
// TJ Lambert (antlambe@microsoft.com)
// Whitney Schmidt ([email protected])
//
// Copyright 2013, 2015 Xamarin Inc.
Expand All @@ -19,9 +19,11 @@
using AppKit;
using UIViewController = AppKit.NSViewController;
using CHHapticEngine = Foundation.NSObject;
using BezierPath = AppKit.NSBezierPath;
#else
using CoreHaptics;
using UIKit;
using BezierPath = UIKit.UIBezierPath;
#endif

namespace GameController {
Expand Down Expand Up @@ -963,6 +965,14 @@ interface GCPhysicalInputProfile

[Export ("setStateFromPhysicalInput:")]
void SetState (GCPhysicalInputProfile physicalInput);

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("allTouchpads", ArgumentSemantic.Strong)]
NSSet<GCControllerTouchpad> AllTouchpads { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Export ("touchpads", ArgumentSemantic.Strong)]
NSDictionary<NSString, GCControllerTouchpad> Touchpads { get; }
}

[TV (14, 0), Mac (11, 0), iOS (14, 0)]
Expand Down Expand Up @@ -1267,6 +1277,38 @@ partial interface GCKey
[Field ("GCKeyF12")]
NSString F12 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyF13")]
NSString F13 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyF14")]
NSString F14 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyF15")]
NSString F15 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyF16")]
NSString F16 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyF17")]
NSString F17 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyF18")]
NSString F18 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyF19")]
NSString F19 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyF20")]
NSString F20 { get; }

[Field ("GCKeyPrintScreen")]
NSString PrintScreen { get; }

Expand Down Expand Up @@ -1651,6 +1693,38 @@ interface GCKeyCode
[Field ("GCKeyCodeF12")]
nint F12 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyCodeF13")]
nint F13 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyCodeF14")]
nint F14 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyCodeF15")]
nint F15 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyCodeF16")]
nint F16 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyCodeF17")]
nint F17 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyCodeF18")]
nint F18 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyCodeF19")]
nint F19 { get; }

[TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
[Field ("GCKeyCodeF20")]
nint F20 { get; }

[Field ("GCKeyCodePrintScreen")]
nint PrintScreen { get; }

Expand Down Expand Up @@ -1922,4 +1996,51 @@ enum GCInputDirectional {
[Field ("GCInputDirectionalCardinalDpad")]
CardinalDpad,
}

delegate GCVirtualControllerElementConfiguration GCVirtualControllerElementUpdateBlock (GCVirtualControllerElementConfiguration configuration);

[NoTV, NoMac, NoWatch, iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface GCVirtualController
{
[Static]
[Export ("virtualControllerWithConfiguration:")]
GCVirtualController Create (GCVirtualControllerConfiguration configuration);

[Async]
[Export ("connectWithReply:")]
void Connect ([NullAllowed] Action<NSError> reply);

[Export ("disconnect")]
void Disconnect ();

[NullAllowed, Export ("controller", ArgumentSemantic.Weak)]
GCController Controller { get; }

[Export ("changeElement:configuration:")]
void Change (string element, GCVirtualControllerElementUpdateBlock configuration);
}

[NoTV, NoMac, NoWatch, iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
interface GCVirtualControllerConfiguration
{
[Export ("elements", ArgumentSemantic.Strong)]
NSSet<NSString> Elements { get; set; }
}

[NoTV, NoMac, NoWatch, iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
interface GCVirtualControllerElementConfiguration
{
[Export ("hidden")]
bool Hidden { get; set; }

[NullAllowed, Export ("path", ArgumentSemantic.Strong)]
BezierPath Path { get; set; }

[Export ("touchpad")]
bool Touchpad { get; set; }
}
}
34 changes: 0 additions & 34 deletions tests/xtro-sharpie/MacCatalyst-GameController.todo

This file was deleted.

34 changes: 0 additions & 34 deletions tests/xtro-sharpie/iOS-GameController.todo

This file was deleted.

18 changes: 0 additions & 18 deletions tests/xtro-sharpie/macOS-GameController.todo

This file was deleted.

18 changes: 0 additions & 18 deletions tests/xtro-sharpie/tvOS-GameController.todo

This file was deleted.

8 comments on commit 3240249

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

ℹ️ API Diff (from PR only) (please review changes)
ℹ️ Generator Diff (please review changes)

Packages generated

View packages

Test results

1 tests failed, 220 tests passed.

Failed tests

  • monotouch-test/Mac [dotnet]/Debug [dotnet]: TimedOut (Execution timed out after 1200 seconds.
    Test run crashed)

Pipeline on Agent XAMBOT-1028.BigSur'
[GameController] Updates for Xcode13 beta1 (#12014)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Tests failed catastrophically on VSTS: device tests tvOS 🔥

Not enough free space in the host.

Pipeline on Agent
[GameController] Updates for Xcode13 beta1 (#12014)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Tests were not ran (VSTS: device tests tvOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[GameController] Updates for Xcode13 beta1 (#12014)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Tests were not ran (VSTS: device tests iOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[GameController] Updates for Xcode13 beta1 (#12014)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Tests passed on macOS Mac Catalina (10.15) ✅

Tests passed

All tests on macOS X Mac Catalina (10.15) passed.

Pipeline on Agent
[GameController] Updates for Xcode13 beta1 (#12014)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Tests passed on macOS Mac Mojave (10.14) ✅

Tests passed

All tests on macOS X Mac Mojave (10.14) passed.

Pipeline on Agent
[GameController] Updates for Xcode13 beta1 (#12014)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Tests passed on macOS Mac High Sierra (10.13) ✅

Tests passed

All tests on macOS X Mac High Sierra (10.13) passed.

Pipeline on Agent
[GameController] Updates for Xcode13 beta1 (#12014)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Tests were not ran (VSTS: device tests iOS32b). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[GameController] Updates for Xcode13 beta1 (#12014)

Please sign in to comment.