Skip to content
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
14 changes: 7 additions & 7 deletions src/GLKit/Defs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace GLKit {
public enum GLKVertexAttrib {
Position, Normal, Color, TexCoord0, TexCoord1
}

// GLint (32 bits on 64 bit hardware) -> GLKEffectPropertyLight.h
public enum GLKLightingType {
PerVertex,
Expand Down Expand Up @@ -87,7 +87,7 @@ public enum GLKViewDrawableStencilFormat {
public enum GLKViewDrawableMultisample {
None, Sample4x
}

// GLint (32 bits on 64 bit hardware) -> GLKTextureLoader.h
public enum GLKTextureInfoAlphaState {
None, NonPremultiplied, Premultiplied
Expand Down Expand Up @@ -137,11 +137,11 @@ public enum GLKTextureLoaderError {
[ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")]
[ObsoletedOSPlatform ("ios12.0", "Use 'Metal' instead.")]
#else
[Deprecated (PlatformName.iOS, 12,0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.TvOS, 12,0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.MacOSX, 10,14, message: "Use 'Metal' instead.")]
[iOS (9,0)]
[Mac (10,11)]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Metal' instead.")]
[iOS (9, 0)]
[Mac (10, 11)]
#endif
[StructLayout (LayoutKind.Sequential)]
public struct GLKVertexAttributeParameters {
Expand Down
16 changes: 8 additions & 8 deletions src/GLKit/GLTextureLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void BeginLoadCubeMap (NSUrl [] urls, NSDictionary? textureOperations, Di
using (var array = NSArray.FromNSObjects (urls))
return CubeMapFromFiles (array, textureOperations?.Dictionary, out error);
}

public static GLKTextureInfo? CubeMapFromFile (string path, GLKTextureOperations? textureOperations, out NSError error)
{
return CubeMapFromFile (path, textureOperations?.Dictionary, out error);
Expand Down Expand Up @@ -147,7 +147,7 @@ public void BeginLoadCubeMap (NSUrl filePath, GLKTextureOperations? textureOpera
{
BeginLoadCubeMap (filePath, textureOperations?.Dictionary, queue, onComplete);
}

}

#if NET
Expand All @@ -162,14 +162,14 @@ public void BeginLoadCubeMap (NSUrl filePath, GLKTextureOperations? textureOpera
[ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")]
[ObsoletedOSPlatform ("ios12.0", "Use 'Metal' instead.")]
#else
[Deprecated (PlatformName.iOS, 12,0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.TvOS, 12,0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.MacOSX, 10,14, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.iOS, 12, 0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'Metal' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Metal' instead.")]
#endif
public class GLKTextureOperations : DictionaryContainer {
public GLKTextureOperations () : base (new NSMutableDictionary ()) {}
public GLKTextureOperations () : base (new NSMutableDictionary ()) { }

public GLKTextureOperations (NSDictionary options) : base (options) {}
public GLKTextureOperations (NSDictionary options) : base (options) { }

public bool? ApplyPremultiplication {
get {
Expand Down Expand Up @@ -219,7 +219,7 @@ public bool? GrayscaleAsAlpha {
[ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")]
[ObsoletedOSPlatform ("ios12.0", "Use 'Metal' instead.")]
#else
[iOS (7,0)]
[iOS (7, 0)]
#endif
public bool? SRGB {
get {
Expand Down
29 changes: 12 additions & 17 deletions src/GameController/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,47 +17,43 @@ namespace GameController {
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'GCController.GetMicroGamepadController()' instead.")]
[Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'GCController.GetMicroGamepadController()' instead.")]
[Native]
public enum GCExtendedGamepadSnapshotDataVersion : long
{
public enum GCExtendedGamepadSnapshotDataVersion : long {
Version1 = 0x0100,
Version2 = 0x0101,
}

[Native]
public enum GCMicroGamepadSnapshotDataVersion : long
{
public enum GCMicroGamepadSnapshotDataVersion : long {
Version1 = 0x0100,
}

[TV (14,0), Mac (11,0), iOS (14,0)]
[TV (14, 0), Mac (11, 0), iOS (14, 0)]
[Native]
public enum GCTouchState : long
{
public enum GCTouchState : long {
Up,
Down,
Moving,
}

[TV (14,0), Mac (11,0), iOS (14,0)]
[TV (14, 0), Mac (11, 0), iOS (14, 0)]
[Native]
public enum GCDeviceBatteryState : long
{
public enum GCDeviceBatteryState : long {
Unknown = -1,
Discharging,
Charging,
Full,
}

[TV (14,0), Mac (11,0), iOS (14,0)]
[TV (14, 0), Mac (11, 0), iOS (14, 0)]
[Native]
public enum GCSystemGestureState : long
{
public enum GCSystemGestureState : long {
Enabled = 0,
AlwaysReceive,
Disabled,
}

[iOS (9,0)][Mac (10,11)]
[iOS (9, 0)]
[Mac (10, 11)]
[Native]
public enum GCControllerPlayerIndex : long {
Unset = -1,
Expand All @@ -67,10 +63,9 @@ public enum GCControllerPlayerIndex : long {
Index4,
}

[iOS (16,0), Mac (13,0), NoWatch, TV (16,0), MacCatalyst (16,0)]
[iOS (16, 0), Mac (13, 0), NoWatch, TV (16, 0), MacCatalyst (16, 0)]
[Native]
public enum GCDevicePhysicalInputElementChange : long
{
public enum GCDevicePhysicalInputElementChange : long {
UnknownChange = -1,
NoChange = 0,
Changed = 1,
Expand Down
18 changes: 9 additions & 9 deletions src/GameController/GCExtendedGamepadSnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ namespace GameController {
[ObsoletedOSPlatform ("tvos12.2", "Use 'GCExtendedGamepadSnapshotData' instead.")]
[ObsoletedOSPlatform ("ios12.2", "Use 'GCExtendedGamepadSnapshotData' instead.")]
#else
[iOS (7,0)]
[Mac (10,9)]
[iOS (7, 0)]
[Mac (10, 9)]
[Deprecated (PlatformName.iOS, 12, 2, message: "Use 'GCExtendedGamepadSnapshotData' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, 4, message: "Use 'GCExtendedGamepadSnapshotData' instead.")]
[Deprecated (PlatformName.TvOS, 12, 2, message: "Use 'GCExtendedGamepadSnapshotData' instead.")]
Expand Down Expand Up @@ -99,7 +99,7 @@ public struct GCExtendedGamepadSnapShotDataV100 {
return p == IntPtr.Zero ? null : new NSData (p);
}
}

#if NET
[UnsupportedOSPlatform ("macos10.15")]
[UnsupportedOSPlatform ("tvos13.0")]
Expand Down Expand Up @@ -181,7 +181,7 @@ public struct GCExtendedGamepadSnapshotData {
#endif
[MarshalAs (UnmanagedType.I1)]
bool LeftThumbstickButton;

#if NET
[SupportedOSPlatform ("tvos12.2")]
[SupportedOSPlatform ("macos10.14.4")]
Expand Down Expand Up @@ -245,14 +245,14 @@ public struct GCExtendedGamepadSnapshotData {
}

public partial class GCExtendedGamepadSnapshot {

// GCExtendedGamepadSnapshot.h
[DllImport (Constants.GameControllerLibrary)]
[return: MarshalAs (UnmanagedType.I1)]
static extern bool GCExtendedGamepadSnapShotDataV100FromNSData (
/* GCExtendedGamepadSnapShotDataV100 * __nullable */ out GCExtendedGamepadSnapShotDataV100 snapshotData,
/* GCExtendedGamepadSnapShotDataV100 * __nullable */ out GCExtendedGamepadSnapShotDataV100 snapshotData,
/* NSData * __nullable */ IntPtr data);

#if NET
[SupportedOSPlatform ("tvos12.2")]
[SupportedOSPlatform ("macos10.14.4")]
Expand All @@ -272,14 +272,14 @@ static extern bool GCExtendedGamepadSnapShotDataV100FromNSData (
[DllImport (Constants.GameControllerLibrary)]
[return: MarshalAs (UnmanagedType.I1)]
static extern bool GCExtendedGamepadSnapshotDataFromNSData (
/* GCExtendedGamepadSnapshotData * __nullable */ out GCExtendedGamepadSnapshotData snapshotData,
/* GCExtendedGamepadSnapshotData * __nullable */ out GCExtendedGamepadSnapshotData snapshotData,
/* NSData * __nullable */ IntPtr data);

public static bool TryGetSnapShotData (NSData? data, out GCExtendedGamepadSnapShotDataV100 snapshotData)
{
return GCExtendedGamepadSnapShotDataV100FromNSData (out snapshotData, data.GetHandle ());
}

#if NET
[SupportedOSPlatform ("tvos12.2")]
[SupportedOSPlatform ("macos10.14.4")]
Expand Down
6 changes: 3 additions & 3 deletions src/GameController/GCGamepadSnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ namespace GameController {
[Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'GCExtendedGamepad' instead.")]
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'GCExtendedGamepad' instead.")]
[Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'GCExtendedGamepad' instead.")]
[iOS (7,0)]
[Mac (10,9)]
[iOS (7, 0)]
[Mac (10, 9)]
#endif
[StructLayout (LayoutKind.Sequential, Pack = 1)]
public struct GCGamepadSnapShotDataV100 {
Expand Down Expand Up @@ -67,7 +67,7 @@ public struct GCGamepadSnapShotDataV100 {
}

public partial class GCGamepadSnapshot {

// GCGamepadSnapshot.h
[DllImport (Constants.GameControllerLibrary)]
[return: MarshalAs (UnmanagedType.I1)]
Expand Down
8 changes: 4 additions & 4 deletions src/GameController/GCMicroGamepadSnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ namespace GameController {
[ObsoletedOSPlatform ("tvos12.2", "Use 'GCController.GetMicroGamepadController()' instead.")]
[ObsoletedOSPlatform ("ios12.2", "Use 'GCController.GetMicroGamepadController()' instead.")]
#else
[iOS (10,0)]
[Mac (10,12)]
[iOS (10, 0)]
[Mac (10, 12)]
[Deprecated (PlatformName.iOS, 12, 2, message: "Use 'GCController.GetMicroGamepadController()' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, 4, message: "Use 'GCController.GetMicroGamepadController()' instead.")]
[Deprecated (PlatformName.TvOS, 12, 2, message: "Use 'GCController.GetMicroGamepadController()' instead.")]
Expand Down Expand Up @@ -195,7 +195,7 @@ public static bool TryGetSnapshotData (NSData? data, out GCMicroGamepadSnapShotD
{
return GCMicroGamepadSnapShotDataV100FromNSData (out snapshotData, data.GetHandle ());
}

#if NET
[SupportedOSPlatform ("tvos12.2")]
[SupportedOSPlatform ("macos10.14.4")]
Expand Down Expand Up @@ -243,4 +243,4 @@ public static bool TryGetSnapshotData (NSData? data, out GCMicroGamepadSnapshotD
}
}

#endif
#endif
18 changes: 9 additions & 9 deletions src/GameKit/GKCompat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ namespace GameKit {

#if !XAMCORE_3_0
public partial class GKMatchRequest {

#if !NET
[iOS (8,0), Mac (10,10)]
[iOS (8, 0), Mac (10, 10)]
[Obsolete ("Use 'RecipientResponseHandler' property.")]
#else
[Obsolete ("Use 'RecipientResponseHandler' property.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
Expand All @@ -28,7 +28,7 @@ public virtual void SetRecipientResponseHandler (Action<GKPlayer, GKInviteRecipi
}

public partial class GKMatchmaker {

[Obsolete ("Use 'InviteHandler' property.")]
public virtual void SetInviteHandler (GKInviteHandler handler)
{
Expand All @@ -50,22 +50,22 @@ public static class GKGameSessionErrorCodeExtensions {
public partial class GKGameSession {

[Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")]
public static void DidAddPlayer (GKGameSession session, GKCloudPlayer player) {}
public static void DidAddPlayer (GKGameSession session, GKCloudPlayer player) { }

[Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")]
public static void DidChangeConnectionState (GKGameSession session, GKCloudPlayer player, GKConnectionState newState) {}
public static void DidChangeConnectionState (GKGameSession session, GKCloudPlayer player, GKConnectionState newState) { }

[Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")]
public static void DidReceiveData (GKGameSession session, Foundation.NSData data, GKCloudPlayer player) {}
public static void DidReceiveData (GKGameSession session, Foundation.NSData data, GKCloudPlayer player) { }

[Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")]
public static void DidReceiveMessage (GKGameSession session, string message, Foundation.NSData data, GKCloudPlayer player) {}
public static void DidReceiveMessage (GKGameSession session, string message, Foundation.NSData data, GKCloudPlayer player) { }

[Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")]
public static void DidRemovePlayer (GKGameSession session, GKCloudPlayer player) {}
public static void DidRemovePlayer (GKGameSession session, GKCloudPlayer player) { }

[Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")]
public static void DidSaveData (GKGameSession session, GKCloudPlayer player, Foundation.NSData data) {}
public static void DidSaveData (GKGameSession session, GKCloudPlayer player, Foundation.NSData data) { }
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/GameKit/GKLocalPlayerListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class GKLocalPlayerListener {
// GKInviteEventListener and GKTurnBasedEventListener both export same selector
// but generator changes now catch this. Stub it out to prevent API break
[Obsolete ("Use 'DidRequestMatch (GKPlayer player, GKPlayer[] recipientPlayers)' instead.")]
public virtual void DidRequestMatchWithPlayers (GKPlayer player, string[] playerIDsToInvite)
public virtual void DidRequestMatchWithPlayers (GKPlayer player, string [] playerIDsToInvite)
{
}
}
Expand Down
Loading