[autoformat] Add the GLKit, GameController, GameKit, GameplayKit, HealthKit and HomeKit frameworks. (#16716)
This commit is contained in:
Родитель
0ed4ad3a26
Коммит
76c6c67fa8
|
@ -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,
|
||||
|
@ -87,7 +87,7 @@ namespace GLKit {
|
|||
public enum GLKViewDrawableMultisample {
|
||||
None, Sample4x
|
||||
}
|
||||
|
||||
|
||||
// GLint (32 bits on 64 bit hardware) -> GLKTextureLoader.h
|
||||
public enum GLKTextureInfoAlphaState {
|
||||
None, NonPremultiplied, Premultiplied
|
||||
|
@ -137,11 +137,11 @@ namespace GLKit {
|
|||
[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 {
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace GLKit {
|
|||
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);
|
||||
|
@ -147,7 +147,7 @@ namespace GLKit {
|
|||
{
|
||||
BeginLoadCubeMap (filePath, textureOperations?.Dictionary, queue, onComplete);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#if NET
|
||||
|
@ -162,14 +162,14 @@ namespace GLKit {
|
|||
[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 {
|
||||
|
@ -219,7 +219,7 @@ namespace GLKit {
|
|||
[ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")]
|
||||
[ObsoletedOSPlatform ("ios12.0", "Use 'Metal' instead.")]
|
||||
#else
|
||||
[iOS (7,0)]
|
||||
[iOS (7, 0)]
|
||||
#endif
|
||||
public bool? SRGB {
|
||||
get {
|
||||
|
|
|
@ -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,
|
||||
|
@ -67,10 +63,9 @@ namespace GameController {
|
|||
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,
|
||||
|
|
|
@ -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.")]
|
||||
|
@ -99,7 +99,7 @@ namespace GameController {
|
|||
return p == IntPtr.Zero ? null : new NSData (p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if NET
|
||||
[UnsupportedOSPlatform ("macos10.15")]
|
||||
[UnsupportedOSPlatform ("tvos13.0")]
|
||||
|
@ -181,7 +181,7 @@ namespace GameController {
|
|||
#endif
|
||||
[MarshalAs (UnmanagedType.I1)]
|
||||
bool LeftThumbstickButton;
|
||||
|
||||
|
||||
#if NET
|
||||
[SupportedOSPlatform ("tvos12.2")]
|
||||
[SupportedOSPlatform ("macos10.14.4")]
|
||||
|
@ -245,14 +245,14 @@ namespace GameController {
|
|||
}
|
||||
|
||||
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")]
|
||||
|
@ -272,14 +272,14 @@ namespace GameController {
|
|||
[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")]
|
||||
|
|
|
@ -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 {
|
||||
|
@ -67,7 +67,7 @@ namespace GameController {
|
|||
}
|
||||
|
||||
public partial class GCGamepadSnapshot {
|
||||
|
||||
|
||||
// GCGamepadSnapshot.h
|
||||
[DllImport (Constants.GameControllerLibrary)]
|
||||
[return: MarshalAs (UnmanagedType.I1)]
|
||||
|
|
|
@ -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.")]
|
||||
|
@ -195,7 +195,7 @@ namespace GameController {
|
|||
{
|
||||
return GCMicroGamepadSnapShotDataV100FromNSData (out snapshotData, data.GetHandle ());
|
||||
}
|
||||
|
||||
|
||||
#if NET
|
||||
[SupportedOSPlatform ("tvos12.2")]
|
||||
[SupportedOSPlatform ("macos10.14.4")]
|
||||
|
@ -243,4 +243,4 @@ namespace GameController {
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -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")]
|
||||
|
@ -28,7 +28,7 @@ namespace GameKit {
|
|||
}
|
||||
|
||||
public partial class GKMatchmaker {
|
||||
|
||||
|
||||
[Obsolete ("Use 'InviteHandler' property.")]
|
||||
public virtual void SetInviteHandler (GKInviteHandler handler)
|
||||
{
|
||||
|
@ -50,22 +50,22 @@ namespace GameKit {
|
|||
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
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace GameKit {
|
|||
// 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace GameKit {
|
|||
[Deprecated (PlatformName.iOS, 7, 0)]
|
||||
[ErrorDomain ("GKVoiceChatServiceErrorDomain")]
|
||||
public enum GKVoiceChatServiceError {
|
||||
Internal = 32000,
|
||||
Internal = 32000,
|
||||
NoRemotePackets = 32001,
|
||||
UnableToConnect = 32002,
|
||||
RemoteParticipantHangup = 32003,
|
||||
|
@ -61,15 +61,15 @@ namespace GameKit {
|
|||
public enum GKSendDataMode {
|
||||
Reliable,
|
||||
Unreliable,
|
||||
}
|
||||
}
|
||||
|
||||
// untyped enum -> GKPublicConstants.h
|
||||
[Deprecated (PlatformName.iOS, 7, 0)]
|
||||
[Deprecated (PlatformName.MacOSX, 10, 10)]
|
||||
public enum GKSessionMode {
|
||||
Server,
|
||||
Client,
|
||||
Peer,
|
||||
Server,
|
||||
Client,
|
||||
Peer,
|
||||
}
|
||||
|
||||
// untyped enum -> GKPublicConstants.h
|
||||
|
@ -78,7 +78,7 @@ namespace GameKit {
|
|||
public enum GKPeerConnectionState {
|
||||
Available,
|
||||
Unavailable,
|
||||
Connected,
|
||||
Connected,
|
||||
Disconnected,
|
||||
Connecting,
|
||||
ConnectedRelay = 5,
|
||||
|
@ -146,27 +146,27 @@ namespace GameKit {
|
|||
FriendRequestNotAvailable = 103,
|
||||
}
|
||||
|
||||
[iOS (10,0)]
|
||||
[Mac (10,12)]
|
||||
[TV (10,0)]
|
||||
[iOS (10, 0)]
|
||||
[Mac (10, 12)]
|
||||
[TV (10, 0)]
|
||||
[Native]
|
||||
public enum GKConnectionState : long {
|
||||
NotConnected,
|
||||
Connected,
|
||||
}
|
||||
|
||||
[iOS (10,0)]
|
||||
[Mac (10,12)]
|
||||
[TV (10,0)]
|
||||
[iOS (10, 0)]
|
||||
[Mac (10, 12)]
|
||||
[TV (10, 0)]
|
||||
[Native]
|
||||
public enum GKTransportType : long {
|
||||
Unreliable,
|
||||
Reliable,
|
||||
}
|
||||
|
||||
[Deprecated (PlatformName.MacOSX, 10,14)]
|
||||
[Deprecated (PlatformName.TvOS, 12,0)]
|
||||
[Deprecated (PlatformName.iOS, 12,0)]
|
||||
[Deprecated (PlatformName.MacOSX, 10, 14)]
|
||||
[Deprecated (PlatformName.TvOS, 12, 0)]
|
||||
[Deprecated (PlatformName.iOS, 12, 0)]
|
||||
[Native]
|
||||
#if WATCH
|
||||
// removed in Xcode 10 but a breaking change (for us) to remove
|
||||
|
@ -244,9 +244,9 @@ namespace GameKit {
|
|||
}
|
||||
|
||||
// NSInteger -> GKChallenge.h
|
||||
[Mac (10,9)]
|
||||
[Mac (10, 9)]
|
||||
[Native]
|
||||
public enum GKChallengeState : long {
|
||||
public enum GKChallengeState : long {
|
||||
Invalid = 0,
|
||||
Pending,
|
||||
Completed,
|
||||
|
@ -258,48 +258,45 @@ namespace GameKit {
|
|||
[Native]
|
||||
public enum GKGameCenterViewControllerState : long {
|
||||
Default = -1,
|
||||
Leaderboards ,
|
||||
Leaderboards,
|
||||
Achievements,
|
||||
Challenges,
|
||||
[iOS (14,0)]
|
||||
[TV (14,0)]
|
||||
[iOS (14, 0)]
|
||||
[TV (14, 0)]
|
||||
LocalPlayerProfile = 3,
|
||||
[iOS (14,0)]
|
||||
[TV (14,0)]
|
||||
[iOS (14, 0)]
|
||||
[TV (14, 0)]
|
||||
Dashboard = 4,
|
||||
[iOS (15,0)]
|
||||
[Mac (12,0)]
|
||||
[MacCatalyst (15,0)]
|
||||
[TV (15,0)]
|
||||
[iOS (15, 0)]
|
||||
[Mac (12, 0)]
|
||||
[MacCatalyst (15, 0)]
|
||||
[TV (15, 0)]
|
||||
[NoWatch]
|
||||
LocalPlayerFriendsList = 5,
|
||||
}
|
||||
|
||||
// NSInteger -> GKMatchmaker.h
|
||||
[Native]
|
||||
public enum GKInviteeResponse : long
|
||||
{
|
||||
Accepted = 0,
|
||||
Declined = 1,
|
||||
Failed = 2,
|
||||
Incompatible = 3,
|
||||
UnableToConnect = 4,
|
||||
NoAnswer = 5,
|
||||
public enum GKInviteeResponse : long {
|
||||
Accepted = 0,
|
||||
Declined = 1,
|
||||
Failed = 2,
|
||||
Incompatible = 3,
|
||||
UnableToConnect = 4,
|
||||
NoAnswer = 5,
|
||||
}
|
||||
|
||||
// NSUInteger -> GKMatchmaker.h
|
||||
[Native]
|
||||
public enum GKMatchType : ulong
|
||||
{
|
||||
public enum GKMatchType : ulong {
|
||||
PeerToPeer,
|
||||
Hosted,
|
||||
TurnBased
|
||||
}
|
||||
|
||||
// uint8_t -> GKTurnBasedMatch.h
|
||||
[iOS (7,0)]
|
||||
public enum GKTurnBasedExchangeStatus : sbyte
|
||||
{
|
||||
[iOS (7, 0)]
|
||||
public enum GKTurnBasedExchangeStatus : sbyte {
|
||||
Unknown,
|
||||
Active,
|
||||
Complete,
|
||||
|
@ -318,9 +315,12 @@ namespace GameKit {
|
|||
}
|
||||
|
||||
#if !NET
|
||||
[iOS (11,3)][Deprecated (PlatformName.iOS, 14,0, message: "Do not use; this API was removed.")]
|
||||
[Mac (10,13,4)][Deprecated (PlatformName.MacOSX, 11,0, message: "Do not use; this API was removed.")]
|
||||
[TV (11,3)][Deprecated (PlatformName.TvOS, 14,0, message: "Do not use; this API was removed.")]
|
||||
[iOS (11, 3)]
|
||||
[Deprecated (PlatformName.iOS, 14, 0, message: "Do not use; this API was removed.")]
|
||||
[Mac (10, 13, 4)]
|
||||
[Deprecated (PlatformName.MacOSX, 11, 0, message: "Do not use; this API was removed.")]
|
||||
[TV (11, 3)]
|
||||
[Deprecated (PlatformName.TvOS, 14, 0, message: "Do not use; this API was removed.")]
|
||||
[Native]
|
||||
public enum GKAuthenticationType : ulong {
|
||||
WithoutUI = 0,
|
||||
|
@ -329,51 +329,48 @@ namespace GameKit {
|
|||
}
|
||||
#endif
|
||||
|
||||
[TV (14,0)]
|
||||
[Mac (11,0)]
|
||||
[iOS (14,0)]
|
||||
[TV (14, 0)]
|
||||
[Mac (11, 0)]
|
||||
[iOS (14, 0)]
|
||||
[NoWatch]
|
||||
[Native]
|
||||
public enum GKAccessPointLocation : long
|
||||
{
|
||||
public enum GKAccessPointLocation : long {
|
||||
TopLeading,
|
||||
TopTrailing,
|
||||
BottomLeading,
|
||||
BottomTrailing,
|
||||
}
|
||||
|
||||
[TV (14,0)]
|
||||
[Mac (11,0)]
|
||||
[iOS (14,0)]
|
||||
[Watch (7,0)]
|
||||
[TV (14, 0)]
|
||||
[Mac (11, 0)]
|
||||
[iOS (14, 0)]
|
||||
[Watch (7, 0)]
|
||||
[Native]
|
||||
public enum GKLeaderboardType : long
|
||||
{
|
||||
public enum GKLeaderboardType : long {
|
||||
Classic,
|
||||
Recurring,
|
||||
}
|
||||
|
||||
[TV (14,0)]
|
||||
[Mac (11,0)]
|
||||
[iOS (14,0)]
|
||||
[TV (14, 0)]
|
||||
[Mac (11, 0)]
|
||||
[iOS (14, 0)]
|
||||
[NoWatch]
|
||||
[Native]
|
||||
public enum GKMatchmakingMode : long
|
||||
{
|
||||
public enum GKMatchmakingMode : long {
|
||||
Default = 0,
|
||||
NearbyOnly = 1,
|
||||
AutomatchOnly = 2,
|
||||
[TV (15,0)]
|
||||
[Mac (12,0)]
|
||||
[iOS (15,0)]
|
||||
[MacCatalyst (15,0)]
|
||||
[TV (15, 0)]
|
||||
[Mac (12, 0)]
|
||||
[iOS (15, 0)]
|
||||
[MacCatalyst (15, 0)]
|
||||
InviteOnly = 3,
|
||||
}
|
||||
|
||||
[Watch (7,4)]
|
||||
[TV (14,5)]
|
||||
[Mac (11,3)]
|
||||
[iOS (14,5)]
|
||||
[Watch (7, 4)]
|
||||
[TV (14, 5)]
|
||||
[Mac (11, 3)]
|
||||
[iOS (14, 5)]
|
||||
[Native]
|
||||
public enum GKFriendsAuthorizationStatus : long {
|
||||
NotDetermined = 0,
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace GameKit {
|
|||
if (receiver is not null)
|
||||
receiver (session, new GKDataReceivedEventArgs (data, peer, session));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -55,14 +55,14 @@ namespace GameKit {
|
|||
ReceiverObject? receiver;
|
||||
public event EventHandler<GKDataReceivedEventArgs>? ReceiveData {
|
||||
add {
|
||||
if (receiver is null){
|
||||
if (receiver is null) {
|
||||
receiver = new ReceiverObject ();
|
||||
_SetDataReceiveHandler (receiver, IntPtr.Zero);
|
||||
MarkDirty ();
|
||||
}
|
||||
receiver.receiver += value;
|
||||
}
|
||||
|
||||
|
||||
remove {
|
||||
if (receiver is null)
|
||||
return;
|
||||
|
@ -82,9 +82,9 @@ namespace GameKit {
|
|||
Mono_GKSessionDelegate EnsureDelegate ()
|
||||
{
|
||||
var del = WeakDelegate;
|
||||
if (del is null || (!(del is Mono_GKSessionDelegate))){
|
||||
del = new Mono_GKSessionDelegate ();
|
||||
WeakDelegate = del;
|
||||
if (del is null || (!(del is Mono_GKSessionDelegate))) {
|
||||
del = new Mono_GKSessionDelegate ();
|
||||
WeakDelegate = del;
|
||||
}
|
||||
return (Mono_GKSessionDelegate) del;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ namespace GameKit {
|
|||
EnsureDelegate ().cbPeerChanged -= value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public event EventHandler<GKPeerConnectionEventArgs> ConnectionRequest {
|
||||
add {
|
||||
EnsureDelegate ().cbConnectionRequest += value;
|
||||
|
@ -144,14 +144,14 @@ namespace GameKit {
|
|||
if (cbPeerChanged is not null)
|
||||
cbPeerChanged (session, new GKPeerChangedStateEventArgs (session, peerID, state));
|
||||
}
|
||||
|
||||
|
||||
[Preserve (Conditional = true)]
|
||||
public override void PeerConnectionRequest (GKSession session, string peerID)
|
||||
{
|
||||
if (cbConnectionRequest is not null)
|
||||
cbConnectionRequest (session, new GKPeerConnectionEventArgs (session, peerID, null));
|
||||
}
|
||||
|
||||
|
||||
[Preserve (Conditional = true)]
|
||||
public override void PeerConnectionFailed (GKSession session, string peerID, NSError error)
|
||||
{
|
||||
|
@ -159,7 +159,7 @@ namespace GameKit {
|
|||
cbConnectionFailed (session, new GKPeerConnectionEventArgs (session, peerID, error));
|
||||
|
||||
}
|
||||
|
||||
|
||||
[Preserve (Conditional = true)]
|
||||
public override void FailedWithError (GKSession session, NSError error)
|
||||
{
|
||||
|
|
|
@ -20,8 +20,8 @@ namespace GameplayKit {
|
|||
return new GKQuadTree (min, max, minCellSize);
|
||||
}
|
||||
|
||||
[Deprecated (PlatformName.iOS, 10,0, message: "Empty stub (always return 'false') as this API is now rejected).")]
|
||||
[Deprecated (PlatformName.TvOS, 10,0, message: "Empty stub (always return 'false') as this API is now rejected).")]
|
||||
[Deprecated (PlatformName.iOS, 10, 0, message: "Empty stub (always return 'false') as this API is now rejected).")]
|
||||
[Deprecated (PlatformName.TvOS, 10, 0, message: "Empty stub (always return 'false') as this API is now rejected).")]
|
||||
public virtual bool RemoveData (NSObject data)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -15,13 +15,13 @@ using ObjCRuntime;
|
|||
|
||||
namespace GameplayKit {
|
||||
public partial class GKComponentSystem<TComponent> {
|
||||
|
||||
|
||||
public GKComponentSystem ()
|
||||
: this (GKState.GetClass (typeof (TComponent), "componentType"))
|
||||
{
|
||||
}
|
||||
|
||||
public Type? ComponentType {
|
||||
public Type? ComponentType {
|
||||
get { return Class.Lookup (ComponentClass); }
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ using Vector2i = global::OpenTK.Vector2i;
|
|||
|
||||
namespace GameplayKit {
|
||||
public partial class GKGridGraph {
|
||||
|
||||
|
||||
#if !NET
|
||||
public virtual GKGridGraphNode? GetNodeAt (Vector2i position)
|
||||
{
|
||||
|
|
|
@ -36,9 +36,9 @@ namespace GameplayKit {
|
|||
[SupportedOSPlatform ("macos10.12")]
|
||||
[SupportedOSPlatform ("maccatalyst")]
|
||||
#else
|
||||
[iOS (10,0)]
|
||||
[TV (10,0)]
|
||||
[Mac (10,12)]
|
||||
[iOS (10, 0)]
|
||||
[TV (10, 0)]
|
||||
[Mac (10, 12)]
|
||||
#endif
|
||||
[Register ("GKObstacleGraph", SkipRegistration = true)]
|
||||
public partial class GKObstacleGraph<NodeType> : GKObstacleGraph where NodeType : GKGraphNode2D {
|
||||
|
@ -58,7 +58,7 @@ namespace GameplayKit {
|
|||
|
||||
public static new GKObstacleGraph<NodeType>? FromObstacles (GKPolygonObstacle [] obstacles, float bufferRadius)
|
||||
{
|
||||
return Runtime.GetNSObject <GKObstacleGraph<NodeType>> (GraphWithObstacles (obstacles, bufferRadius, new Class (typeof (NodeType))));
|
||||
return Runtime.GetNSObject<GKObstacleGraph<NodeType>> (GraphWithObstacles (obstacles, bufferRadius, new Class (typeof (NodeType))));
|
||||
}
|
||||
|
||||
public new NodeType [] GetNodes (GKPolygonObstacle obstacle)
|
||||
|
|
|
@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
|
|||
namespace GameplayKit {
|
||||
public partial class GKPath {
|
||||
|
||||
public static GKPath FromPoints (Vector2[] points, float radius, bool cyclical)
|
||||
public static GKPath FromPoints (Vector2 [] points, float radius, bool cyclical)
|
||||
{
|
||||
if (points is null)
|
||||
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (points));
|
||||
|
@ -34,7 +34,7 @@ namespace GameplayKit {
|
|||
try {
|
||||
PrepareBuffer (out buffer, ref points);
|
||||
|
||||
return FromPoints (buffer, (nuint)points.Length, radius, cyclical);
|
||||
return FromPoints (buffer, (nuint) points.Length, radius, cyclical);
|
||||
} finally {
|
||||
if (buffer != IntPtr.Zero)
|
||||
Marshal.FreeHGlobal (buffer);
|
||||
|
@ -46,12 +46,12 @@ namespace GameplayKit {
|
|||
{
|
||||
if (points is null)
|
||||
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (points));
|
||||
|
||||
|
||||
var buffer = IntPtr.Zero;
|
||||
try {
|
||||
PrepareBuffer (out buffer, ref points);
|
||||
|
||||
Handle = InitWithPoints (buffer, (nuint)points.Length, radius, cyclical);
|
||||
Handle = InitWithPoints (buffer, (nuint) points.Length, radius, cyclical);
|
||||
} finally {
|
||||
if (buffer != IntPtr.Zero)
|
||||
Marshal.FreeHGlobal (buffer);
|
||||
|
@ -64,9 +64,9 @@ namespace GameplayKit {
|
|||
[SupportedOSPlatform ("macos10.12")]
|
||||
[SupportedOSPlatform ("maccatalyst")]
|
||||
#else
|
||||
[iOS (10,0)]
|
||||
[TV (10,0)]
|
||||
[Mac (10,12)]
|
||||
[iOS (10, 0)]
|
||||
[TV (10, 0)]
|
||||
[Mac (10, 12)]
|
||||
#endif
|
||||
public static GKPath FromPoints (Vector3 [] points, float radius, bool cyclical)
|
||||
{
|
||||
|
@ -78,8 +78,7 @@ namespace GameplayKit {
|
|||
PrepareBuffer (out buffer, ref points);
|
||||
|
||||
return FromFloat3Points (buffer, (nuint) points.Length, radius, cyclical);
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
if (buffer != IntPtr.Zero)
|
||||
Marshal.FreeHGlobal (buffer);
|
||||
}
|
||||
|
@ -91,9 +90,9 @@ namespace GameplayKit {
|
|||
[SupportedOSPlatform ("macos10.12")]
|
||||
[SupportedOSPlatform ("maccatalyst")]
|
||||
#else
|
||||
[iOS (10,0)]
|
||||
[TV (10,0)]
|
||||
[Mac (10,12)]
|
||||
[iOS (10, 0)]
|
||||
[TV (10, 0)]
|
||||
[Mac (10, 12)]
|
||||
#endif
|
||||
public GKPath (Vector3 [] points, float radius, bool cyclical)
|
||||
{
|
||||
|
@ -105,14 +104,13 @@ namespace GameplayKit {
|
|||
PrepareBuffer (out buffer, ref points);
|
||||
|
||||
Handle = InitWithFloat3Points (buffer, (nuint) points.Length, radius, cyclical);
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
if (buffer != IntPtr.Zero)
|
||||
Marshal.FreeHGlobal (buffer);
|
||||
}
|
||||
}
|
||||
|
||||
static void PrepareBuffer<T> (out IntPtr buffer, ref T[] points) where T : struct
|
||||
static void PrepareBuffer<T> (out IntPtr buffer, ref T [] points) where T : struct
|
||||
{
|
||||
var type = typeof (T);
|
||||
// Vector3 is 12 bytes but vector_float3 is 16
|
||||
|
|
|
@ -26,16 +26,16 @@ namespace GameplayKit {
|
|||
{
|
||||
if (points is null)
|
||||
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (points));
|
||||
|
||||
|
||||
var size = Marshal.SizeOf (typeof (Vector2));
|
||||
var length = points.Length * size;
|
||||
var buffer = Marshal.AllocHGlobal (length);
|
||||
|
||||
try {
|
||||
for (int i = 0; i < points.Length; i++)
|
||||
Marshal.StructureToPtr (points[i], IntPtr.Add (buffer, i * size), false);
|
||||
Marshal.StructureToPtr (points [i], IntPtr.Add (buffer, i * size), false);
|
||||
|
||||
return FromPoints (buffer, (nuint)points.Length);
|
||||
return FromPoints (buffer, (nuint) points.Length);
|
||||
} finally {
|
||||
if (buffer != IntPtr.Zero)
|
||||
Marshal.FreeHGlobal (buffer);
|
||||
|
@ -45,7 +45,7 @@ namespace GameplayKit {
|
|||
[ThreadStatic]
|
||||
static IntPtr ctor_pointer;
|
||||
|
||||
static unsafe IntPtr GetPointer (Vector2[] points)
|
||||
static unsafe IntPtr GetPointer (Vector2 [] points)
|
||||
{
|
||||
if (points is null)
|
||||
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (points));
|
||||
|
@ -61,7 +61,7 @@ namespace GameplayKit {
|
|||
var buffer = Marshal.AllocHGlobal (length);
|
||||
|
||||
for (int i = 0; i < points.Length; i++)
|
||||
Marshal.StructureToPtr (points[i], IntPtr.Add (buffer, i * size), false);
|
||||
Marshal.StructureToPtr (points [i], IntPtr.Add (buffer, i * size), false);
|
||||
|
||||
ctor_pointer = buffer;
|
||||
return ctor_pointer = buffer;
|
||||
|
|
|
@ -29,9 +29,9 @@ namespace GameplayKit {
|
|||
[SupportedOSPlatform ("macos10.12")]
|
||||
[SupportedOSPlatform ("maccatalyst")]
|
||||
#else
|
||||
[iOS (10,0)]
|
||||
[TV (10,0)]
|
||||
[Mac (10,12)]
|
||||
[iOS (10, 0)]
|
||||
[TV (10, 0)]
|
||||
[Mac (10, 12)]
|
||||
#endif
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
public struct GKBox {
|
||||
|
@ -45,9 +45,9 @@ namespace GameplayKit {
|
|||
[SupportedOSPlatform ("macos10.12")]
|
||||
[SupportedOSPlatform ("maccatalyst")]
|
||||
#else
|
||||
[iOS (10,0)]
|
||||
[TV (10,0)]
|
||||
[Mac (10,12)]
|
||||
[iOS (10, 0)]
|
||||
[TV (10, 0)]
|
||||
[Mac (10, 12)]
|
||||
#endif
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
public struct GKQuad {
|
||||
|
@ -61,9 +61,9 @@ namespace GameplayKit {
|
|||
[SupportedOSPlatform ("macos10.12")]
|
||||
[SupportedOSPlatform ("maccatalyst")]
|
||||
#else
|
||||
[iOS (10,0)]
|
||||
[TV (10,0)]
|
||||
[Mac (10,12)]
|
||||
[iOS (10, 0)]
|
||||
[TV (10, 0)]
|
||||
[Mac (10, 12)]
|
||||
#endif
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
public struct GKTriangle {
|
||||
|
|
|
@ -33,11 +33,11 @@ namespace GameplayKit {
|
|||
{
|
||||
if (instance is null)
|
||||
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (parameterName));
|
||||
|
||||
var klass = instance.Class;
|
||||
|
||||
var klass = instance.Class;
|
||||
if ((klass is null) || (klass.Handle == IntPtr.Zero))
|
||||
throw new ArgumentException ("Not an type exposed to ObjC", parameterName);
|
||||
|
||||
|
||||
return klass;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ using ObjCRuntime;
|
|||
|
||||
namespace GameplayKit {
|
||||
public partial class GKStateMachine : NSObject {
|
||||
|
||||
|
||||
public GKState? GetState (Type stateType)
|
||||
{
|
||||
return GetState (GKState.GetClass (stateType, "stateType"));
|
||||
|
|
|
@ -21,9 +21,9 @@ namespace GameplayKit {
|
|||
[SupportedOSPlatform ("macos10.12")]
|
||||
[SupportedOSPlatform ("maccatalyst")]
|
||||
#else
|
||||
[iOS (10,0)]
|
||||
[TV (10,0)]
|
||||
[Mac (10,12)]
|
||||
[iOS (10, 0)]
|
||||
[TV (10, 0)]
|
||||
[Mac (10, 12)]
|
||||
#endif
|
||||
public static class NSArray_GameplayKit {
|
||||
|
||||
|
|
|
@ -3,12 +3,11 @@ using ObjCRuntime;
|
|||
using Foundation;
|
||||
using System;
|
||||
|
||||
namespace HealthKit
|
||||
{
|
||||
namespace HealthKit {
|
||||
// NSInteger -> HKDefines.h
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKUpdateFrequency : long {
|
||||
Immediate = 1,
|
||||
|
@ -18,9 +17,9 @@ namespace HealthKit
|
|||
}
|
||||
|
||||
// NSInteger -> HKDefines.h
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKAuthorizationStatus : long {
|
||||
NotDetermined = 0,
|
||||
|
@ -29,22 +28,22 @@ namespace HealthKit
|
|||
}
|
||||
|
||||
// NSInteger -> HKDefines.h
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKBiologicalSex : long {
|
||||
NotSet = 0,
|
||||
Female,
|
||||
Male,
|
||||
[iOS (8,2)]
|
||||
[iOS (8, 2)]
|
||||
Other
|
||||
}
|
||||
|
||||
// NSInteger -> HKDefines.h
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKBloodType : long {
|
||||
NotSet = 0,
|
||||
|
@ -59,9 +58,9 @@ namespace HealthKit
|
|||
}
|
||||
|
||||
// NSInteger -> HKMetadata.h
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKBodyTemperatureSensorLocation : long {
|
||||
Other = 0,
|
||||
|
@ -79,9 +78,9 @@ namespace HealthKit
|
|||
}
|
||||
|
||||
// NSInteger -> HKMetadata.h
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKHeartRateSensorLocation : long {
|
||||
Other = 0,
|
||||
|
@ -94,9 +93,9 @@ namespace HealthKit
|
|||
}
|
||||
|
||||
// NSInteger -> HKObjectType.h
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKQuantityAggregationStyle : long {
|
||||
Cumulative = 0,
|
||||
|
@ -112,58 +111,58 @@ namespace HealthKit
|
|||
}
|
||||
|
||||
// NSInteger -> HKObjectType.h
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKCategoryValueSleepAnalysis : long {
|
||||
InBed,
|
||||
Asleep,
|
||||
[Watch (3,0), iOS (10,0)]
|
||||
[Watch (3, 0), iOS (10, 0)]
|
||||
Awake,
|
||||
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV]
|
||||
[Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV]
|
||||
AsleepCore = 3,
|
||||
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV]
|
||||
[Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV]
|
||||
AsleepDeep = 4,
|
||||
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV]
|
||||
[Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV]
|
||||
AsleepREM = 5,
|
||||
}
|
||||
|
||||
// NSUInteger -> HKQuery.h
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
[Flags]
|
||||
public enum HKQueryOptions : ulong {
|
||||
None = 0,
|
||||
StrictStartDate = 1 << 0,
|
||||
StrictEndDate = 1 << 1
|
||||
None = 0,
|
||||
StrictStartDate = 1 << 0,
|
||||
StrictEndDate = 1 << 1
|
||||
}
|
||||
|
||||
// NSUInteger -> HKStatistics.h
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
[Flags]
|
||||
public enum HKStatisticsOptions : ulong {
|
||||
None = 0,
|
||||
SeparateBySource = 1 << 0,
|
||||
DiscreteAverage = 1 << 1,
|
||||
DiscreteMin = 1 << 2,
|
||||
DiscreteMax = 1 << 3,
|
||||
CumulativeSum = 1 << 4,
|
||||
None = 0,
|
||||
SeparateBySource = 1 << 0,
|
||||
DiscreteAverage = 1 << 1,
|
||||
DiscreteMin = 1 << 2,
|
||||
DiscreteMax = 1 << 3,
|
||||
CumulativeSum = 1 << 4,
|
||||
[iOS (13, 0), Watch (6, 0)]
|
||||
MostRecent = 1 << 5,
|
||||
MostRecent = 1 << 5,
|
||||
[iOS (13, 0), Watch (6, 0)]
|
||||
Duration = 1 << 6,
|
||||
Duration = 1 << 6,
|
||||
}
|
||||
|
||||
// NSInteger -> HKUnit.h
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKMetricPrefix : long {
|
||||
None = 0,
|
||||
|
@ -184,9 +183,9 @@ namespace HealthKit
|
|||
}
|
||||
|
||||
[Native]
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
public enum HKWorkoutActivityType : ulong {
|
||||
AmericanFootball = 1,
|
||||
Archery,
|
||||
|
@ -249,35 +248,35 @@ namespace HealthKit
|
|||
WaterSports,
|
||||
Wrestling,
|
||||
Yoga,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
Barre,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
CoreTraining,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
CrossCountrySkiing,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
DownhillSkiing,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
Flexibility,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
HighIntensityIntervalTraining,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
JumpRope,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
Kickboxing,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
Pilates,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
Snowboarding,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
Stairs,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
StepTraining,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
WheelchairWalkPace,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
WheelchairRunPace,
|
||||
[iOS (11,0), Watch (4,0)]
|
||||
[iOS (11, 0), Watch (4, 0)]
|
||||
TaiChi,
|
||||
[iOS (11, 0), Watch (4, 0)]
|
||||
MixedCardio,
|
||||
|
@ -287,36 +286,40 @@ namespace HealthKit
|
|||
DiscSports,
|
||||
[iOS (13, 0), Watch (6, 0)]
|
||||
FitnessGaming,
|
||||
[iOS (14,0)][Watch (7,0)]
|
||||
[iOS (14, 0)]
|
||||
[Watch (7, 0)]
|
||||
CardioDance = 77,
|
||||
[iOS (14,0)][Watch (7,0)]
|
||||
[iOS (14, 0)]
|
||||
[Watch (7, 0)]
|
||||
SocialDance = 78,
|
||||
[iOS (14,0)][Watch (7,0)]
|
||||
[iOS (14, 0)]
|
||||
[Watch (7, 0)]
|
||||
Pickleball = 79,
|
||||
[iOS (14,0)][Watch (7,0)]
|
||||
[iOS (14, 0)]
|
||||
[Watch (7, 0)]
|
||||
Cooldown = 80,
|
||||
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV]
|
||||
[Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV]
|
||||
SwimBikeRun = 82,
|
||||
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV]
|
||||
[Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV]
|
||||
Transition = 83,
|
||||
[iOS (8,2)]
|
||||
[iOS (8, 2)]
|
||||
Other = 3000
|
||||
}
|
||||
|
||||
[Native]
|
||||
[Watch (2,0)]
|
||||
[iOS (8,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (8, 0)]
|
||||
[Mac (13, 0)]
|
||||
public enum HKWorkoutEventType : long {
|
||||
Pause = 1,
|
||||
Resume,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
Lap,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
Marker,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
MotionPaused,
|
||||
[iOS (10,0), Watch (3,0)]
|
||||
[iOS (10, 0), Watch (3, 0)]
|
||||
MotionResumed,
|
||||
[iOS (11, 0), Watch (4, 0)]
|
||||
Segment,
|
||||
|
@ -324,17 +327,17 @@ namespace HealthKit
|
|||
PauseOrResumeRequest,
|
||||
}
|
||||
|
||||
[Watch (2,0)]
|
||||
[iOS (9,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (9, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKCategoryValue : long {
|
||||
NotApplicable = 0
|
||||
}
|
||||
|
||||
[Watch (2,0)]
|
||||
[iOS (9,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (9, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKCategoryValueCervicalMucusQuality : long {
|
||||
NotApplicable = 0,
|
||||
|
@ -345,9 +348,9 @@ namespace HealthKit
|
|||
EggWhite
|
||||
}
|
||||
|
||||
[Watch (2,0)]
|
||||
[iOS (9,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (9, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKCategoryValueMenstrualFlow : long {
|
||||
NotApplicable = 0,
|
||||
|
@ -355,13 +358,14 @@ namespace HealthKit
|
|||
Light,
|
||||
Medium,
|
||||
Heavy,
|
||||
[iOS (12,0)][Watch (5,0)]
|
||||
[iOS (12, 0)]
|
||||
[Watch (5, 0)]
|
||||
None,
|
||||
}
|
||||
|
||||
[Watch (2,0)]
|
||||
[iOS (9,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (9, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKCategoryValueOvulationTestResult : long {
|
||||
NotApplicable = 0,
|
||||
|
@ -376,26 +380,26 @@ namespace HealthKit
|
|||
EstrogenSurge = 4,
|
||||
}
|
||||
|
||||
[Watch (2,0)]
|
||||
[iOS (9,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (9, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKCategoryValueAppleStandHour : long {
|
||||
Stood = 0,
|
||||
Idle
|
||||
}
|
||||
|
||||
[iOS (13,0)]
|
||||
[Watch (6,0)]
|
||||
[Mac (13,0)]
|
||||
[iOS (13, 0)]
|
||||
[Watch (6, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKCategoryValueAudioExposureEvent : long {
|
||||
LoudEnvironment = 1,
|
||||
}
|
||||
|
||||
[Watch (2,0)]
|
||||
[iOS (9,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (2, 0)]
|
||||
[iOS (9, 0)]
|
||||
[Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKFitzpatrickSkinType : long {
|
||||
NotSet = 0,
|
||||
|
@ -407,7 +411,7 @@ namespace HealthKit
|
|||
VI
|
||||
}
|
||||
|
||||
[Watch (3,0), iOS (10,0), Mac (13,0)]
|
||||
[Watch (3, 0), iOS (10, 0), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKWheelchairUse : long {
|
||||
NotSet = 0,
|
||||
|
@ -415,7 +419,7 @@ namespace HealthKit
|
|||
Yes,
|
||||
}
|
||||
|
||||
[Watch (3,0), iOS (10,0), Mac (13,0)]
|
||||
[Watch (3, 0), iOS (10, 0), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKWeatherCondition : long {
|
||||
None = 0,
|
||||
|
@ -448,7 +452,7 @@ namespace HealthKit
|
|||
Tornado,
|
||||
}
|
||||
|
||||
[Watch (3,0), iOS (10,0), Mac (13,0)]
|
||||
[Watch (3, 0), iOS (10, 0), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKWorkoutSwimmingLocationType : long {
|
||||
Unknown = 0,
|
||||
|
@ -456,7 +460,7 @@ namespace HealthKit
|
|||
OpenWater,
|
||||
}
|
||||
|
||||
[Watch (3,0), iOS (10,0), Mac (13,0)]
|
||||
[Watch (3, 0), iOS (10, 0), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKSwimmingStrokeStyle : long {
|
||||
Unknown = 0,
|
||||
|
@ -465,7 +469,7 @@ namespace HealthKit
|
|||
Backstroke,
|
||||
Breaststroke,
|
||||
Butterfly,
|
||||
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV]
|
||||
[Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV]
|
||||
Kickboard = 6,
|
||||
}
|
||||
|
||||
|
@ -502,8 +506,8 @@ namespace HealthKit
|
|||
PredictionSubMaxExercise,
|
||||
PredictionNonExercise,
|
||||
}
|
||||
|
||||
[NoWatch, iOS (12, 0), Mac (13,0)]
|
||||
|
||||
[NoWatch, iOS (12, 0), Mac (13, 0)]
|
||||
public enum HKFhirResourceType {
|
||||
[Field ("HKFHIRResourceTypeAllergyIntolerance")]
|
||||
AllergyIntolerance,
|
||||
|
@ -551,16 +555,15 @@ namespace HealthKit
|
|||
CoverageRecord,
|
||||
}
|
||||
|
||||
[Watch (5,0), iOS (12,0), Mac (13,0)]
|
||||
[Watch (5, 0), iOS (12, 0), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKAuthorizationRequestStatus : long
|
||||
{
|
||||
public enum HKAuthorizationRequestStatus : long {
|
||||
Unknown = 0,
|
||||
ShouldRequest,
|
||||
Unnecessary,
|
||||
}
|
||||
|
||||
[Watch (7,0), iOS (13,6), Mac (13,0)]
|
||||
[Watch (7, 0), iOS (13, 6), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKCategoryValueAppetiteChanges : long {
|
||||
Unspecified = 0,
|
||||
|
@ -569,27 +572,27 @@ namespace HealthKit
|
|||
Increased,
|
||||
}
|
||||
|
||||
[Watch (7,0), iOS (14,0), Mac (13,0)]
|
||||
[Watch (7, 0), iOS (14, 0), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKAppleEcgAlgorithmVersion : long {
|
||||
Version1 = 1,
|
||||
Version2 = 2,
|
||||
}
|
||||
|
||||
[Watch (7,0), iOS (14,0), Mac (13,0)]
|
||||
[Watch (7, 0), iOS (14, 0), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKCategoryValueEnvironmentalAudioExposureEvent : long {
|
||||
MomentaryLimit = 1,
|
||||
}
|
||||
|
||||
[Watch (7,0), iOS (13,6), Mac (13,0)]
|
||||
[Watch (7, 0), iOS (13, 6), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKCategoryValuePresence : long {
|
||||
Present = 0,
|
||||
NotPresent,
|
||||
}
|
||||
|
||||
[Watch (7,0), iOS (13,6), Mac (13,0)]
|
||||
[Watch (7, 0), iOS (13, 6), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKCategoryValueSeverity : long {
|
||||
Unspecified = 0,
|
||||
|
@ -599,7 +602,7 @@ namespace HealthKit
|
|||
Severe,
|
||||
}
|
||||
|
||||
[Watch (7,0), iOS (14,0), Mac (13,0)]
|
||||
[Watch (7, 0), iOS (14, 0), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKDevicePlacementSide : long {
|
||||
Unknown = 0,
|
||||
|
@ -608,7 +611,7 @@ namespace HealthKit
|
|||
Central,
|
||||
}
|
||||
|
||||
[Watch (7,0), iOS (14,0), Mac (13,0)]
|
||||
[Watch (7, 0), iOS (14, 0), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKElectrocardiogramClassification : long {
|
||||
NotSet = 0,
|
||||
|
@ -621,13 +624,13 @@ namespace HealthKit
|
|||
Unrecognized = 100,
|
||||
}
|
||||
|
||||
[Watch (7,0), iOS (14,0), Mac (13,0)]
|
||||
[Watch (7, 0), iOS (14, 0), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKElectrocardiogramLead : long {
|
||||
AppleWatchSimilarToLeadI = 1,
|
||||
}
|
||||
|
||||
[Watch (7,0), iOS (14,0), Mac (13,0)]
|
||||
[Watch (7, 0), iOS (14, 0), Mac (13, 0)]
|
||||
[Native]
|
||||
public enum HKElectrocardiogramSymptomsStatus : long {
|
||||
NotSet = 0,
|
||||
|
@ -645,19 +648,17 @@ namespace HealthKit
|
|||
Unknown,
|
||||
}
|
||||
|
||||
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV]
|
||||
[Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV]
|
||||
[Native]
|
||||
public enum HKHeartRateRecoveryTestType : long
|
||||
{
|
||||
public enum HKHeartRateRecoveryTestType : long {
|
||||
MaxExercise = 1,
|
||||
PredictionSubMaxExercise,
|
||||
PredictionNonExercise,
|
||||
}
|
||||
|
||||
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV]
|
||||
[Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV]
|
||||
[Native]
|
||||
public enum HKPrismBase : long
|
||||
{
|
||||
public enum HKPrismBase : long {
|
||||
None = 0,
|
||||
Up,
|
||||
Down,
|
||||
|
@ -665,27 +666,24 @@ namespace HealthKit
|
|||
Out,
|
||||
}
|
||||
|
||||
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV]
|
||||
[Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV]
|
||||
[Native]
|
||||
public enum HKUserMotionContext : long
|
||||
{
|
||||
public enum HKUserMotionContext : long {
|
||||
NotSet = 0,
|
||||
Stationary,
|
||||
Active,
|
||||
}
|
||||
|
||||
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV]
|
||||
[Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV]
|
||||
[Native]
|
||||
public enum HKVisionEye : long
|
||||
{
|
||||
public enum HKVisionEye : long {
|
||||
Left = 1,
|
||||
Right,
|
||||
}
|
||||
|
||||
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV]
|
||||
[Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV]
|
||||
[Native]
|
||||
public enum HKVisionPrescriptionType : ulong
|
||||
{
|
||||
public enum HKVisionPrescriptionType : ulong {
|
||||
Glasses = 1,
|
||||
Contacts,
|
||||
}
|
||||
|
|
|
@ -14,12 +14,11 @@ namespace HealthKit {
|
|||
[SupportedOSPlatform ("maccatalyst15.0")]
|
||||
[SupportedOSPlatform ("macos13.0")]
|
||||
#else
|
||||
[Watch (8,0)]
|
||||
[iOS (15,0)]
|
||||
[Mac (13,0)]
|
||||
[Watch (8, 0)]
|
||||
[iOS (15, 0)]
|
||||
[Mac (13, 0)]
|
||||
#endif
|
||||
public static class HKAppleWalkingSteadiness
|
||||
{
|
||||
public static class HKAppleWalkingSteadiness {
|
||||
|
||||
[DllImport (Constants.HealthKitLibrary)]
|
||||
[return: MarshalAs (UnmanagedType.I1)]
|
||||
|
@ -33,10 +32,10 @@ namespace HealthKit {
|
|||
error = null;
|
||||
if (HKAppleWalkingSteadinessClassificationForQuantity (value.GetHandle (), out var classificationOut, out var errorPtr)) {
|
||||
classification = (HKAppleWalkingSteadinessClassification) (long) classificationOut;
|
||||
error = Runtime.GetNSObject<NSError> (errorPtr, false);
|
||||
error = Runtime.GetNSObject<NSError> (errorPtr, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
@ -44,13 +43,13 @@ namespace HealthKit {
|
|||
static extern HKQuantityRef HKAppleWalkingSteadinessMinimumQuantityForClassification (nint classification);
|
||||
|
||||
public static HKQuantity? GetMinimumQuantity (HKAppleWalkingSteadinessClassification classification)
|
||||
=> Runtime.GetNSObject<HKQuantity> (HKAppleWalkingSteadinessMinimumQuantityForClassification ((nint) (long) classification), false);
|
||||
=> Runtime.GetNSObject<HKQuantity> (HKAppleWalkingSteadinessMinimumQuantityForClassification ((nint) (long) classification), false);
|
||||
|
||||
[DllImport (Constants.HealthKitLibrary)]
|
||||
static extern HKQuantityRef HKAppleWalkingSteadinessMaximumQuantityForClassification (nint classification);
|
||||
|
||||
public static HKQuantity? GetMaximumQuantity (HKAppleWalkingSteadinessClassification classification)
|
||||
=> Runtime.GetNSObject<HKQuantity> (HKAppleWalkingSteadinessMaximumQuantityForClassification ((nint) (long) classification), false);
|
||||
=> Runtime.GetNSObject<HKQuantity> (HKAppleWalkingSteadinessMaximumQuantityForClassification ((nint) (long) classification), false);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,8 +23,7 @@ using System.Collections.Generic;
|
|||
using NativeHandle = System.IntPtr;
|
||||
#endif
|
||||
|
||||
namespace HealthKit
|
||||
{
|
||||
namespace HealthKit {
|
||||
public partial class HKCategoryValueSleepAnalysisAsleep {
|
||||
|
||||
#if NET
|
||||
|
@ -33,7 +32,7 @@ namespace HealthKit
|
|||
[SupportedOSPlatform ("maccatalyst16.0")]
|
||||
[UnsupportedOSPlatform ("tvos")]
|
||||
#else
|
||||
[iOS (16,0), Mac (13,0), Watch (9,0), NoTV, MacCatalyst (16,0)]
|
||||
[iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)]
|
||||
#endif // NET
|
||||
[DllImport (Constants.HealthKitLibrary)]
|
||||
static extern NativeHandle HKCategoryValueSleepAnalysisAsleepValues ();
|
||||
|
@ -44,14 +43,14 @@ namespace HealthKit
|
|||
[SupportedOSPlatform ("maccatalyst16.0")]
|
||||
[UnsupportedOSPlatform ("tvos")]
|
||||
#else
|
||||
[iOS (16,0), Mac (13,0), Watch (9,0), NoTV, MacCatalyst (16,0)]
|
||||
[iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)]
|
||||
#endif // NET
|
||||
public static HashSet<HKCategoryValueSleepAnalysis> GetAsleepValues ()
|
||||
{
|
||||
using var values = Runtime.GetNSObject<NSSet<NSNumber>> (HKCategoryValueSleepAnalysisAsleepValues ())!;
|
||||
var hashSet = new HashSet<HKCategoryValueSleepAnalysis> ();
|
||||
foreach (NSNumber value in values) {
|
||||
hashSet.Add ((HKCategoryValueSleepAnalysis) (int)value);
|
||||
hashSet.Add ((HKCategoryValueSleepAnalysis) (int) value);
|
||||
}
|
||||
return hashSet;
|
||||
}
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
|
||||
using System;
|
||||
using Foundation;
|
||||
namespace HealthKit
|
||||
{
|
||||
namespace HealthKit {
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
public partial class HKQuantityType {
|
||||
public static HKQuantityType? Create (HKQuantityTypeIdentifier kind)
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace HealthKit {
|
|||
|
||||
#if !XAMCORE_3_0
|
||||
public partial class HKStatisticsCollectionQuery {
|
||||
|
||||
|
||||
[Obsolete ("Use 'InitialResultsHandler'.")]
|
||||
public virtual void SetInitialResultsHandler (HKStatisticsCollectionQueryInitialResultsHandler handler)
|
||||
{
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace HealthKit
|
||||
{
|
||||
public partial class HKUnit
|
||||
{
|
||||
namespace HealthKit {
|
||||
public partial class HKUnit {
|
||||
public const double MolarMassBloodGlucose = 180.15588000005408;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace HomeKit {
|
|||
[SupportedOSPlatform ("tvos10.0")]
|
||||
[SupportedOSPlatform ("maccatalyst14.0")]
|
||||
#else
|
||||
[iOS (9,0)]
|
||||
[iOS (9, 0)]
|
||||
#endif
|
||||
public HMActionSetType ActionSetType {
|
||||
get {
|
||||
|
|
|
@ -6,21 +6,20 @@ using Foundation;
|
|||
|
||||
namespace HomeKit {
|
||||
|
||||
partial class HMCharacteristic
|
||||
{
|
||||
partial class HMCharacteristic {
|
||||
public bool SupportsEventNotification {
|
||||
get {
|
||||
foreach (var p in Properties){
|
||||
foreach (var p in Properties) {
|
||||
if (p == HMCharacteristicPropertyInternal.SupportsEventNotification)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool Readable {
|
||||
get {
|
||||
foreach (var p in Properties){
|
||||
foreach (var p in Properties) {
|
||||
if (p == HMCharacteristicPropertyInternal.Readable)
|
||||
return true;
|
||||
}
|
||||
|
@ -30,7 +29,7 @@ namespace HomeKit {
|
|||
|
||||
public bool Writable {
|
||||
get {
|
||||
foreach (var p in Properties){
|
||||
foreach (var p in Properties) {
|
||||
if (p == HMCharacteristicPropertyInternal.Writable)
|
||||
return true;
|
||||
}
|
||||
|
@ -43,8 +42,8 @@ namespace HomeKit {
|
|||
[SupportedOSPlatform ("tvos10.0")]
|
||||
[SupportedOSPlatform ("maccatalyst14.0")]
|
||||
#else
|
||||
[iOS (9,3)]
|
||||
[Watch (2,2)]
|
||||
[iOS (9, 3)]
|
||||
[Watch (2, 2)]
|
||||
#endif
|
||||
public bool Hidden {
|
||||
get {
|
||||
|
|
|
@ -7,8 +7,7 @@ using Foundation;
|
|||
|
||||
namespace HomeKit {
|
||||
|
||||
public partial class HMCharacteristicMetadata
|
||||
{
|
||||
public partial class HMCharacteristicMetadata {
|
||||
public HMCharacteristicMetadataUnits Units {
|
||||
get {
|
||||
var u = _Units;
|
||||
|
|
|
@ -12,8 +12,8 @@ namespace HomeKit {
|
|||
[SupportedOSPlatform ("maccatalyst")]
|
||||
[SupportedOSPlatform ("tvos10.0")]
|
||||
#else
|
||||
[iOS (8,0)]
|
||||
[TV (10,0)]
|
||||
[iOS (8, 0)]
|
||||
[TV (10, 0)]
|
||||
#endif
|
||||
public class HMCharacteristicProperties {
|
||||
|
||||
|
|
|
@ -56,16 +56,16 @@ namespace HomeKit {
|
|||
protected HMChipServiceTopology (IntPtr handle) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public HMChipServiceTopology (NSCoder coder) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
protected HMChipServiceTopology (NSObjectFlag t) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public HMChipServiceTopology (HMChipServiceHome[] homes) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public HMChipServiceTopology (HMChipServiceHome [] homes) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
||||
public virtual NSObject Copy (NSZone? zone) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual void EncodeTo (NSCoder encoder) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual HMChipServiceHome[] Homes => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual HMChipServiceHome [] Homes => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
||||
} /* class HMChipServiceTopology */
|
||||
|
||||
[Obsolete ("This class is removed, use 'HMMatterRoom' instead.")]
|
||||
[Register("HMCHIPServiceRoom", SkipRegistration = true)]
|
||||
[Register ("HMCHIPServiceRoom", SkipRegistration = true)]
|
||||
public class HMChipServiceRoom : NSObject, INSCoding, INSCopying, INSSecureCoding {
|
||||
|
||||
public override IntPtr ClassHandle => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
@ -75,7 +75,7 @@ namespace HomeKit {
|
|||
protected HMChipServiceRoom (NSObjectFlag t) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public HMChipServiceRoom (NSUuid uuid, string name) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
||||
public virtual NSObject Copy (NSZone? zone)=> throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual NSObject Copy (NSZone? zone) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual void EncodeTo (NSCoder encoder) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual string Name => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual NSUuid Uuid => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
@ -83,7 +83,7 @@ namespace HomeKit {
|
|||
} /* class HMChipServiceRoom */
|
||||
|
||||
[Obsolete ("This class is removed.")]
|
||||
[Register("HMCHIPServiceHome", SkipRegistration = true)]
|
||||
[Register ("HMCHIPServiceHome", SkipRegistration = true)]
|
||||
public partial class HMChipServiceHome : NSObject, INSCoding, INSCopying, INSSecureCoding {
|
||||
|
||||
public override IntPtr ClassHandle => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
@ -112,7 +112,7 @@ namespace HomeKit {
|
|||
[Obsolete (Constants.RemovedFromHomeKit)]
|
||||
public virtual Task AddAndSetUpAccessoriesAsync (HMChipServiceTopology topology) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
#pragma warning restore CS0618 // HMChipServiceTopology and HMErrorHandler is obsolete
|
||||
}
|
||||
}
|
||||
#endif // !NET
|
||||
|
||||
#if !XAMCORE_5_0
|
||||
|
@ -157,7 +157,7 @@ namespace HomeKit {
|
|||
public virtual string Name => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual NSUuid Uuid => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
||||
public virtual NSObject Copy (NSZone? zone)=> throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual NSObject Copy (NSZone? zone) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual void EncodeTo (NSCoder encoder) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ namespace HomeKit {
|
|||
[UnsupportedOSPlatform ("maccatalyst16.1")]
|
||||
[UnsupportedOSPlatform ("macos13.0")]
|
||||
#endif
|
||||
[Register("HMMatterHome", SkipRegistration = true)]
|
||||
[Register ("HMMatterHome", SkipRegistration = true)]
|
||||
public partial class HMMatterHome : NSObject, INSCoding, INSCopying, INSSecureCoding {
|
||||
|
||||
public override NativeHandle ClassHandle => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
@ -196,7 +196,7 @@ namespace HomeKit {
|
|||
[UnsupportedOSPlatform ("maccatalyst16.1")]
|
||||
[UnsupportedOSPlatform ("macos13.0")]
|
||||
#endif
|
||||
[Register("HMMatterTopology", SkipRegistration = true)]
|
||||
[Register ("HMMatterTopology", SkipRegistration = true)]
|
||||
public partial class HMMatterTopology : NSObject, INSCoding, INSCopying, INSSecureCoding {
|
||||
|
||||
public override NativeHandle ClassHandle => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
@ -208,11 +208,11 @@ namespace HomeKit {
|
|||
public HMMatterTopology (HMMatterHome [] homes) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
||||
public virtual HMMatterHome [] Homes => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual NSObject Copy (NSZone? zone)=> throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual NSObject Copy (NSZone? zone) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual void EncodeTo (NSCoder encoder) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
}
|
||||
|
||||
public delegate void HMFetchRoomHandler (HMMatterRoom [] rooms, NSError error);
|
||||
public delegate void HMFetchRoomHandler (HMMatterRoom [] rooms, NSError error);
|
||||
|
||||
#if !NET
|
||||
[Obsolete ("This class is removed.")]
|
||||
|
@ -222,7 +222,7 @@ namespace HomeKit {
|
|||
[UnsupportedOSPlatform ("maccatalyst16.1")]
|
||||
[UnsupportedOSPlatform ("macos13.0")]
|
||||
#endif
|
||||
[Register("HMMatterRequestHandler", SkipRegistration = true)]
|
||||
[Register ("HMMatterRequestHandler", SkipRegistration = true)]
|
||||
public partial class HMMatterRequestHandler : NSObject, INSExtensionRequestHandling {
|
||||
public override NativeHandle ClassHandle => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
||||
|
@ -231,7 +231,7 @@ namespace HomeKit {
|
|||
protected HMMatterRequestHandler (NSObjectFlag t) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
||||
public virtual void FetchRooms (HMMatterHome home, HMFetchRoomHandler completion) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual Task<HMMatterRoom[]> FetchRoomsAsync (HMMatterHome home) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual Task<HMMatterRoom []> FetchRoomsAsync (HMMatterHome home) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
||||
public virtual void PairAccessory (HMMatterHome home, string onboardingPayload, Action<NSError> completion) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
public virtual Task PairAccessoryAsync (HMMatterHome home, string onboardingPayload) => throw new InvalidOperationException (Constants.RemovedFromHomeKit);
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -8,29 +8,28 @@ using Foundation;
|
|||
|
||||
namespace HomeKit {
|
||||
|
||||
public partial class HMHome
|
||||
{
|
||||
public partial class HMHome {
|
||||
public HMService []? GetServices (HMServiceType serviceTypes)
|
||||
{
|
||||
var arr = new ServiceTypeList<NSString> ();
|
||||
|
||||
if ((serviceTypes & HMServiceType.LightBulb) == HMServiceType.LightBulb)
|
||||
if ((serviceTypes & HMServiceType.LightBulb) == HMServiceType.LightBulb)
|
||||
arr.Add (HMServiceType.LightBulb.GetConstant ());
|
||||
if ((serviceTypes & HMServiceType.Switch) == HMServiceType.Switch)
|
||||
if ((serviceTypes & HMServiceType.Switch) == HMServiceType.Switch)
|
||||
arr.Add (HMServiceType.Switch.GetConstant ());
|
||||
if ((serviceTypes & HMServiceType.Thermostat) == HMServiceType.Thermostat)
|
||||
if ((serviceTypes & HMServiceType.Thermostat) == HMServiceType.Thermostat)
|
||||
arr.Add (HMServiceType.Thermostat.GetConstant ());
|
||||
if ((serviceTypes & HMServiceType.GarageDoorOpener) == HMServiceType.GarageDoorOpener)
|
||||
if ((serviceTypes & HMServiceType.GarageDoorOpener) == HMServiceType.GarageDoorOpener)
|
||||
arr.Add (HMServiceType.GarageDoorOpener.GetConstant ());
|
||||
if ((serviceTypes & HMServiceType.AccessoryInformation) == HMServiceType.AccessoryInformation)
|
||||
if ((serviceTypes & HMServiceType.AccessoryInformation) == HMServiceType.AccessoryInformation)
|
||||
arr.Add (HMServiceType.AccessoryInformation.GetConstant ());
|
||||
if ((serviceTypes & HMServiceType.Fan) == HMServiceType.Fan)
|
||||
if ((serviceTypes & HMServiceType.Fan) == HMServiceType.Fan)
|
||||
arr.Add (HMServiceType.Fan.GetConstant ());
|
||||
if ((serviceTypes & HMServiceType.Outlet) == HMServiceType.Outlet)
|
||||
if ((serviceTypes & HMServiceType.Outlet) == HMServiceType.Outlet)
|
||||
arr.Add (HMServiceType.Outlet.GetConstant ());
|
||||
if ((serviceTypes & HMServiceType.LockMechanism) == HMServiceType.LockMechanism)
|
||||
if ((serviceTypes & HMServiceType.LockMechanism) == HMServiceType.LockMechanism)
|
||||
arr.Add (HMServiceType.LockMechanism.GetConstant ());
|
||||
if ((serviceTypes & HMServiceType.LockManagement) == HMServiceType.LockManagement)
|
||||
if ((serviceTypes & HMServiceType.LockManagement) == HMServiceType.LockManagement)
|
||||
arr.Add (HMServiceType.LockManagement.GetConstant ());
|
||||
// iOS 9
|
||||
if ((serviceTypes & HMServiceType.AirQualitySensor) == HMServiceType.AirQualitySensor)
|
||||
|
@ -96,8 +95,9 @@ namespace HomeKit {
|
|||
#if (WATCH || TVOS)
|
||||
[Obsolete ("This API is not available on this platform.")]
|
||||
#endif // WATCH || TVOS
|
||||
[Obsoleted (PlatformName.iOS, 9,0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")]
|
||||
public virtual void RemoveUser (HMUser user, Action<NSError> completion) {
|
||||
[Obsoleted (PlatformName.iOS, 9, 0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")]
|
||||
public virtual void RemoveUser (HMUser user, Action<NSError> completion)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
|
@ -106,8 +106,9 @@ namespace HomeKit {
|
|||
#if (WATCH || TVOS)
|
||||
[Obsolete ("This API is not available on this platform.")]
|
||||
#endif // WATCH || TVOS
|
||||
[Obsoleted (PlatformName.iOS, 9,0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")]
|
||||
public virtual Task RemoveUserAsync (HMUser user) {
|
||||
[Obsoleted (PlatformName.iOS, 9, 0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")]
|
||||
public virtual Task RemoveUserAsync (HMUser user)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -88,6 +88,12 @@ dotnet format whitespace --folder "$SRC_DIR/src/ExternalAccessory"
|
|||
dotnet format whitespace --folder "$SRC_DIR/src/FileProvider"
|
||||
dotnet format whitespace --folder "$SRC_DIR/src/FinderSync"
|
||||
dotnet format whitespace --folder "$SRC_DIR/src/Foundation"
|
||||
dotnet format whitespace --folder "$SRC_DIR/src/GLKit"
|
||||
dotnet format whitespace --folder "$SRC_DIR/src/GameController"
|
||||
dotnet format whitespace --folder "$SRC_DIR/src/GameKit"
|
||||
dotnet format whitespace --folder "$SRC_DIR/src/GameplayKit"
|
||||
dotnet format whitespace --folder "$SRC_DIR/src/HealthKit"
|
||||
dotnet format whitespace --folder "$SRC_DIR/src/HomeKit"
|
||||
|
||||
# dotnet format "$SRC_DIR/[...]"
|
||||
# add more projects here...
|
||||
|
|
Загрузка…
Ссылка в новой задаче