[Main] Bring all Xcode 12.2 changes to main.

This commit is contained in:
Manuel de la Pena 2020-11-18 21:45:09 -05:00 коммит произвёл GitHub
Родитель 6a726517b4 3ed6d978d5
Коммит ea0071823d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
180 изменённых файлов: 5321 добавлений и 3037 удалений

Просмотреть файл

@ -35,7 +35,7 @@ $(TOP)/Make.config.inc: $(TOP)/Make.config $(TOP)/mk/mono.mk
include $(TOP)/Make.versions
APIDIFF_REFERENCES=https://bosstoragemirror.blob.core.windows.net/wrench/jenkins/xcode12.1/e0ce496804e49056ab8eb41da55813083ab7f58b/15/package/bundle.zip
APIDIFF_REFERENCES=https://bosstoragemirror.blob.core.windows.net/wrench/jenkins/d16-8/e30c41de32f64eca655953b17c78c1d9d70249e3/39/package/bundle.zip
PACKAGE_HEAD_REV=$(shell git rev-parse HEAD)
@ -111,9 +111,9 @@ WATCHOS_NUGET_VERSION_NO_METADATA=$(WATCHOS_NUGET_VERSION)-$(NUGET_PRERELEASE_ID
WATCHOS_NUGET_VERSION_FULL=$(WATCHOS_NUGET_VERSION_NO_METADATA)+$(NUGET_BUILD_METADATA)
# Xcode version should have both a major and a minor version (even if the minor version is 0)
XCODE_VERSION=12.1
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_12.1.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_12.1.0.app/Contents/Developer
XCODE_VERSION=12.2
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_12.2.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_12.2.0.app/Contents/Developer
XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist)
# Mono version embedded in XI/XM (NEEDED_MONO_VERSION/BRANCH) are specified in mk/mono.mk
@ -181,7 +181,7 @@ MIN_TVOS_SIMULATOR_VERSION=10.2
EXTRA_SIMULATORS=com.apple.pkg.iPhoneSimulatorSDK10_3 com.apple.pkg.AppleTVSimulatorSDK10_2 com.apple.pkg.WatchSimulatorSDK3_2
INCLUDE_IOS=1
#INCLUDE_MAC=1
INCLUDE_MAC=1
INCLUDE_WATCH=1
INCLUDE_TVOS=1
INCLUDE_DEVICE=1

Просмотреть файл

@ -48,8 +48,8 @@
# line changed in git).
#
IOS_PACKAGE_VERSION=14.7.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=6.99.0.$(MAC_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION=14.9.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=7.3.0.$(MAC_COMMIT_DISTANCE)
#
# ** NuGet package version numbers **
@ -66,7 +66,7 @@ MAC_PACKAGE_VERSION=6.99.0.$(MAC_COMMIT_DISTANCE)
# WARNING: Do **not** use versions higher than the available Xcode SDK or else we will have issues with mtouch (See https://github.com/xamarin/xamarin-macios/issues/7705)
# When bumping the major macOS version in MACOS_NUGET_VERSION also update the macOS version where we execute on bots in jenkins/Jenkinsfile (in the 'node' element)
IOS_NUGET_VERSION=14.1.100
TVOS_NUGET_VERSION=14.0.100
WATCHOS_NUGET_VERSION=7.0.100
MACOS_NUGET_VERSION=10.15.100
IOS_NUGET_VERSION=14.2.100
TVOS_NUGET_VERSION=14.2.100
WATCHOS_NUGET_VERSION=7.1.100
MACOS_NUGET_VERSION=11.0.100

Просмотреть файл

@ -42,6 +42,7 @@
<string>13.6</string>
<string>14.0</string>
<string>14.1</string>
<string>14.2</string>
</array>
<key>tvOS</key>
<array>
@ -66,6 +67,7 @@
<string>13.3</string>
<string>13.4</string>
<string>14.0</string>
<string>14.2</string>
</array>
<key>watchOS</key>
<array>
@ -87,6 +89,7 @@
<string>6.1</string>
<string>6.2</string>
<string>7.0</string>
<string>7.1</string>
</array>
</dict>
<key>RecommendedXcodeVersion</key>

Просмотреть файл

@ -17,8 +17,8 @@
<string>10.13</string>
<string>10.14</string>
<string>10.15</string>
<!-- <string>10.16</string> --> <!-- Reverted by Xcode 12 GM -->
<!-- <string>11.0</string> -->
<string>10.16</string>
<string>11.0</string>
</array>
</dict>
<key>RecommendedXcodeVersion</key>

Просмотреть файл

@ -37,11 +37,11 @@ Copyright (C) 2013-2014 Xamarin. All rights reserved.
</PropertyGroup>
</Target>
<Target Name="_GenerateBundleName" DependsOnTargets="_DetectSigningIdentity">
<Target Name="_GenerateBundleName" DependsOnTargets="_DetectSigningIdentity;_ParseBundlerArguments">
<PropertyGroup>
<AppBundleDir Condition="'$(AppBundleDir)' == ''">$(DeviceSpecificOutputPath)$(_AppBundleName)$(_AppBundleDirExt)</AppBundleDir>
<_AppBundlePath>$(AppBundleDir)\</_AppBundlePath>
<_AppContentsPath>$(_AppBundlePath)Contents\$(_CustomBundleName)\</_AppContentsPath>
<_AppResourcesPath>$(_AppBundlePath)Contents\Resources\</_AppResourcesPath>
<!-- needed for GetTargetPath/Build/Rebuild task outputs -->

Просмотреть файл

@ -105,8 +105,10 @@ namespace Xamarin.MacDev.Tasks
if (IsAppExtension)
args.Add ("--deep");
if (UseHardenedRuntime)
args.Add ("-o runtime");
if (UseHardenedRuntime) {
args.Add ("-o");
args.Add ("runtime");
}
if (UseSecureTimestamp)
args.Add ("--timestamp");

Просмотреть файл

@ -1,4 +1,4 @@
using System;
using System;
using System.IO;
using System.Linq;
using System.Text;

Просмотреть файл

@ -209,9 +209,7 @@ namespace AVFoundation {
VideoCompositorFailed = -11858,
#if !MONOMAC
RecordingAlreadyInProgress = -11859,
#endif
CreateContentKeyRequestFailed = -11860,
UnsupportedOutputSettings = -11861,
OperationNotAllowed = -11862,
@ -228,6 +226,7 @@ namespace AVFoundation {
UnsupportedDeviceActiveFormat = -11873,
IncorrectlyConfigured = -11875,
SegmentStartedWithNonSyncSample = -11876,
RosettaNotInstalled = -11877,
}
[Watch (6,0)]
@ -703,6 +702,8 @@ namespace AVFoundation {
public enum AVSampleBufferRequestMode : long {
Immediate,
Scheduled,
[Mac (10,15)]
Opportunistic = 2,
}
[NoTV, NoWatch, Mac (10,15), iOS (10,0)]

Просмотреть файл

@ -64,7 +64,9 @@ namespace AppKit {
DisableMenuBarTransparency = (1 << 9),
FullScreen = (1 << 10),
AutoHideToolbar = (1 << 11)
AutoHideToolbar = (1 << 11),
[Mac (10,11,2)]
DisableCursorLocationAssistance = (1 << 12),
}
[Native]
@ -432,7 +434,9 @@ namespace AppKit {
SmartMagnify = 32,
QuickLook = 33,
Pressure = 34, // 10.10.3, 64-bit-only
DirectTouch = 37 // 10.10
DirectTouch = 37, // 10.10
[Mac (10,15)]
ChangeMode = 38,
}
[Flags]
@ -469,6 +473,8 @@ namespace AppKit {
SmartMagnify = 1UL << (int)NSEventType.SmartMagnify,
Pressure = 1UL << (int)NSEventType.Pressure, // 10.10.3, 64-bit-only
DirectTouch = 1UL << (int)NSEventType.DirectTouch, // 10.10
[Mac (10,15)]
ChangeMode = 1UL << (int)NSEventType.ChangeMode,
AnyEvent = unchecked ((ulong)UInt64.MaxValue)
}
@ -711,9 +717,14 @@ namespace AppKit {
WindowExposed = 0,
ApplicationActivated = 1,
ApplicationDeactivated = 2,
[Mac (10,10)]
Touch = 3,
WindowMoved = 4,
ScreenChanged = 8,
AWT = 16
#if !XAMCORE_4_0
[Obsolete ("This API is not available on this platform.")]
AWT = 16,
#endif
}
#if !XAMCORE_4_0
@ -767,7 +778,12 @@ namespace AppKit {
[Native]
public enum NSViewLayerContentsRedrawPolicy : long {
Never, OnSetNeedsDisplay, DuringViewResize, BeforeViewResize
Never,
OnSetNeedsDisplay,
DuringViewResize,
BeforeViewResize,
[Mac (10,9)]
Crossfade = 4,
}
[Native]
@ -914,10 +930,10 @@ namespace AppKit {
[Native]
public enum NSBoxType : ulong {
NSBoxPrimary,
[Advice ("Identical to 'NSBoxPrimary'.")]
[Obsoleted (PlatformName.MacOSX, 10,15, message: "Identical to 'NSBoxPrimary'.")]
NSBoxSecondary,
NSBoxSeparator,
[Advice ("'NSBoxOldStyle' is discouraged. Use 'NSBoxPrimary' or 'NSBoxCustom'.")]
[Obsoleted (PlatformName.MacOSX, 10,15, message: "'NSBoxOldStyle' is discouraged. Use 'NSBoxPrimary' or 'NSBoxCustom'.")]
NSBoxOldStyle,
NSBoxCustom
};
@ -1197,7 +1213,7 @@ namespace AppKit {
AllObsolete = 15,
Move = 16,
Delete = 32,
All = UInt32.MaxValue
All = ulong.MaxValue,
}
[Native]
@ -1214,7 +1230,10 @@ namespace AppKit {
public enum NSWritingDirection : long {
Natural = -1, LeftToRight, RightToLeft,
Embedding = 0,
#if !XAMCORE_4_0
[Obsolete ("This API is not available on this platform.")]
Override = 2,
#endif
}
#if !XAMCORE_4_0
@ -1421,7 +1440,10 @@ namespace AppKit {
[Native]
[Deprecated (PlatformName.MacOSX, 10, 14)]
public enum NSScrollArrowPosition : ulong {
MaxEnd, MinEnd, DefaultSetting, None
MaxEnd = 0,
MinEnd = 1,
DefaultSetting = 0,
None = 2,
}
[Native]
@ -1479,7 +1501,12 @@ namespace AppKit {
[Native]
public enum NSTextBlockDimension : ulong {
Width, MinimumWidth, MaximumWidth, Height, MinimumHeight, MaximumHeight
Width = 0,
MinimumWidth = 1,
MaximumWidth = 2,
Height = 4,
MinimumHeight = 5,
MaximumHeight = 6,
}
[Native]
@ -1601,14 +1628,16 @@ namespace AppKit {
public enum NSTableViewSelectionHighlightStyle : long {
None = -1,
Regular = 0,
SourceList = 1
[Deprecated (PlatformName.MacOSX, 11, 0, message: "Set 'NSTableView.Style' to 'NSTableViewStyle.SourceList' instead.")]
SourceList = 1,
}
[Native]
public enum NSTableViewDraggingDestinationFeedbackStyle : long {
None = -1,
Regular = 0,
SourceList = 1
SourceList = 1,
FeedbackStyleGap = 2,
}
[Native]
@ -1739,7 +1768,9 @@ namespace AppKit {
public enum NSTokenStyle : ulong {
Default,
PlainText,
Rounded
Rounded,
Squared = 3,
PlainSquared = 4,
}
[Flags]
@ -1747,6 +1778,7 @@ namespace AppKit {
[Deprecated (PlatformName.MacOSX, 11, 0)]
public enum NSWorkspaceLaunchOptions : ulong {
Print = 2,
WithErrorPresentation = 0x40,
InhibitingBackgroundOnly = 0x80,
WithoutAddingToRecents = 0x100,
WithoutActivation = 0x200,
@ -2592,7 +2624,10 @@ namespace AppKit {
public enum NSWindowTitleVisibility : long {
Visible = 0,
Hidden = 1,
HiddenWhenActive = 2
#if !XAMCORE_4_0
[Obsolete ("This API is not available on this platform.")]
HiddenWhenActive = 2,
#endif
}
[Flags]
@ -3026,6 +3061,7 @@ namespace AppKit {
FullWidth,
Inset,
SourceList,
Plain,
}
[Mac (11,0)]

Просмотреть файл

@ -69,9 +69,13 @@ namespace AppKit
High = 90
}
#if !COREBUILD
[Mac (10,10)] // protocol added in 10.10
public partial interface INSAccessibility {}
[Mac (10,9)] // but the field/notifications are in 10.9
public partial class NSAccessibility
{
#if !COREBUILD
[Mac (10,10)]
[DllImport (Constants.AppKitLibrary)]
static extern CGRect NSAccessibilityFrameInView (NSView parentView, CGRect frame);
@ -225,6 +229,6 @@ namespace AppKit
{
return NSAccessibilitySetMayContainProtectedContent (flag);
}
}
#endif
}
}

Просмотреть файл

@ -202,11 +202,11 @@ namespace AppKit {
public extern static void DrawWindowBackground (CGRect aRect);
[DllImport (Constants.AppKitLibrary, EntryPoint="NSDisableScreenUpdates")]
[Deprecated (PlatformName.MacOSX, 10, 14, message : "Not usually necessary, 'NSAnimationContext.RunAnimation' can be used instead and not suffer from performance issues.")]
[Deprecated (PlatformName.MacOSX, 10, 11, message : "Not usually necessary, 'NSAnimationContext.RunAnimation' can be used instead and not suffer from performance issues.")]
public extern static void DisableScreenUpdates ();
[DllImport (Constants.AppKitLibrary, EntryPoint="NSEnableScreenUpdates")]
[Deprecated (PlatformName.MacOSX, 10, 14, message : "Not usually necessary, 'NSAnimationContext.RunAnimation' can be used instead and not suffer from performance issues.")]
[Deprecated (PlatformName.MacOSX, 10, 11, message : "Not usually necessary, 'NSAnimationContext.RunAnimation' can be used instead and not suffer from performance issues.")]
public extern static void EnableScreenUpdates ();
}

Просмотреть файл

@ -44,9 +44,6 @@ namespace AppKit {
[DllImport (Constants.FoundationLibrary)]
extern static IntPtr NSFileTypeForHFSTypeCode (uint /* OSType = int32_t */ hfsFileTypeCode);
[DllImport (Constants.FoundationLibrary)]
extern static int UTGetOSTypeFromString (IntPtr str);
private static IntPtr GetNSFileType (uint fourCcTypeCode)
{
return NSFileTypeForHFSTypeCode (fourCcTypeCode);

Просмотреть файл

@ -57,6 +57,7 @@ namespace AudioUnit
}
[Deprecated (PlatformName.iOS, 14,0, message: "Use 'AVAudioEngine' instead.")]
[Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'AVAudioEngine' instead.")]
public class AUGraph : INativeObject, IDisposable
{
readonly GCHandle gcHandle;

36
src/CarPlay/CPCompat.cs Normal file
Просмотреть файл

@ -0,0 +1,36 @@
//
// CPCompat.cs
//
// Authors:
// Alex Soto <alexsoto@microsoft.com>
//
// Copyright (c) Microsoft Corporation.
//
using System;
using Foundation;
using ObjCRuntime;
using System.ComponentModel;
#if !XAMCORE_4_0
namespace CarPlay {
[Register (SkipRegistration = true)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("This API has been removed from the native SDK.")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class CPEntity : NSObject, INSSecureCoding {
public CPEntity () => throw new NotSupportedException ();
public CPEntity (NSCoder coder) => throw new NotSupportedException ();
protected CPEntity (NSObjectFlag t) => throw new NotSupportedException ();
protected internal CPEntity (IntPtr handle) => throw new NotSupportedException ();
public virtual void EncodeTo (NSCoder encoder) => throw new NotSupportedException ();
public override IntPtr ClassHandle => throw new NotSupportedException ();
}
}
#endif

Просмотреть файл

@ -168,6 +168,7 @@ namespace ObjCRuntime {
public const string PassKitLibrary = "/System/Library/Frameworks/PassKit.framework/PassKit";
public const string MLComputeLibrary = "/System/Library/Frameworks/MLCompute.framework/MLCompute";
public const string NearbyInteractionLibrary = "/System/Library/Frameworks/NearbyInteraction.framework/NearbyInteraction";
public const string OSLogLibrary = "/System/Library/Frameworks/OSLog.framework/OSLog";
public const string ReplayKitLibrary = "/System/Library/Frameworks/ReplayKit.framework/ReplayKit";
public const string ScreenTimeLibrary = "/System/Library/Frameworks/ScreenTime.framework/ScreenTime";
public const string UniformTypeIdentifiersLibrary = "/System/Library/Frameworks/UniformTypeIdentifiers.framework/UniformTypeIdentifiers";

Просмотреть файл

@ -115,6 +115,7 @@ namespace CoreBluetooth {
OperationNotSupported,
PeerRemovedPairingInformation,
EncryptionTimedOut,
TooManyLEPairedDevices = 16,
}
[Watch (4,0)]

Просмотреть файл

@ -608,5 +608,46 @@ namespace CoreFoundation {
}
}
}
#if MONOMAC
[Introduced (PlatformName.MacOSX, 11, 0)]
[DllImport (Constants.CoreFoundationLibrary)]
[return: MarshalAs (UnmanagedType.I1)]
extern static bool CFBundleIsExecutableLoadable (IntPtr bundle);
[Introduced (PlatformName.MacOSX, 11, 0)]
public static bool IsExecutableLoadable (CFBundle bundle)
{
if (bundle == null)
throw new ArgumentNullException (nameof (bundle));
if (bundle.Handle == IntPtr.Zero)
throw new ObjectDisposedException (nameof (bundle));
return CFBundleIsExecutableLoadable (bundle.Handle);
}
[Introduced (PlatformName.MacOSX, 11, 0)]
[DllImport (Constants.CoreFoundationLibrary)]
[return: MarshalAs (UnmanagedType.I1)]
extern static bool CFBundleIsExecutableLoadableForURL (IntPtr bundle);
[Introduced (PlatformName.MacOSX, 11, 0)]
public static bool IsExecutableLoadable (NSUrl url)
{
if (url == null)
throw new ArgumentNullException (nameof (url));
return CFBundleIsExecutableLoadableForURL (url.Handle);
}
[Introduced (PlatformName.MacOSX, 11, 0)]
[DllImport (Constants.CoreFoundationLibrary)]
[return: MarshalAs (UnmanagedType.I1)]
extern static bool CFBundleIsArchitectureLoadable (/*cpu_type_t => integer_t => int*/ Architecture architecture);
[Introduced (PlatformName.MacOSX, 11, 0)]
public static bool IsArchitectureLoadable (Architecture architecture) => CFBundleIsArchitectureLoadable (architecture);
#endif
}
}

Просмотреть файл

@ -68,7 +68,7 @@ namespace CoreFoundation {
[DllImport ("__Internal")]
extern static void xamarin_os_log (IntPtr logHandle, OSLogLevel level, string message);
OSLog (IntPtr handle, bool owns)
internal OSLog (IntPtr handle, bool owns)
: base (handle, owns)
{
}

Просмотреть файл

@ -560,35 +560,33 @@ namespace CoreGraphics {
}
}
#if __IOS__
[iOS (14,1)][NoTV][NoWatch][NoMac]
[iOS (14,1), TV (14,2), Watch (7,1), Mac (11,0)]
[DllImport (Constants.CoreGraphicsLibrary)]
static extern bool CGColorSpaceUsesITUR_2100TF (/* CGColorSpaceRef */ IntPtr space);
[iOS (14,1)][NoTV][NoWatch][NoMac]
[iOS (14,1), TV (14,2), Watch (7,1), Mac (11,0)]
public bool UsesItur2100TF => CGColorSpaceUsesITUR_2100TF (handle);
[iOS (14,1)][NoTV][NoWatch][NoMac]
[iOS (14,1), TV (14,2), Watch (7,1), Mac (11,0)]
[DllImport (Constants.CoreGraphicsLibrary)]
static extern IntPtr CGColorSpaceCreateLinearized (/* CGColorSpaceRef */ IntPtr space);
[iOS (14,1)][NoTV][NoWatch][NoMac]
[iOS (14,1), TV (14,2), Watch (7,1), Mac (11,0)]
public CGColorSpace CreateLinearized () => Runtime.GetINativeObject<CGColorSpace> (CGColorSpaceCreateLinearized (handle), owns: true);
[iOS (14,1)][NoTV][NoWatch][NoMac]
[iOS (14,1), TV (14,2), Watch (7,1), Mac (11,0)]
[DllImport (Constants.CoreGraphicsLibrary)]
static extern IntPtr CGColorSpaceCreateExtended (/* CGColorSpaceRef */ IntPtr space);
[iOS (14,1)][NoTV][NoWatch][NoMac]
[iOS (14,1), TV (14,2), Watch (7,1), Mac (11,0)]
public CGColorSpace CreateExtended () => Runtime.GetINativeObject<CGColorSpace> (CGColorSpaceCreateExtended (handle), owns: true);
[iOS (14,1)][NoTV][NoWatch][NoMac]
[iOS (14,1), TV (14,2), Watch (7,1), Mac (11,0)]
[DllImport (Constants.CoreGraphicsLibrary)]
static extern IntPtr CGColorSpaceCreateExtendedLinearized (/* CGColorSpaceRef */ IntPtr space);
[iOS (14,1)][NoTV][NoWatch][NoMac]
[iOS (14,1), TV (14,2), Watch (7,1), Mac (11,0)]
public CGColorSpace CreateExtendedLinearized () => Runtime.GetINativeObject<CGColorSpace> (CGColorSpaceCreateExtendedLinearized (handle), owns: true);
#endif
#endif // !COREBUILD
}

Просмотреть файл

@ -508,6 +508,7 @@ namespace CoreMidi {
extern static int /* OSStatus = SInt32 */ MIDIClientDispose (MidiObjectRef handle);
[Deprecated (PlatformName.iOS, 14,0)]
[Deprecated (PlatformName.MacOSX, 11,0)]
[DllImport (Constants.CoreMidiLibrary)]
extern static int /* OSStatus = SInt32 */ MIDISourceCreate (MidiObjectRef handle, IntPtr name, out MidiObjectRef endpoint);
@ -545,6 +546,7 @@ namespace CoreMidi {
}
[Deprecated (PlatformName.iOS, 14,0)]
[Deprecated (PlatformName.MacOSX, 11,0)]
public MidiEndpoint CreateVirtualSource (string name, out MidiError statusCode)
{
using (var nsstr = new NSString (name)){
@ -560,6 +562,7 @@ namespace CoreMidi {
}
[Deprecated (PlatformName.iOS, 14,0)]
[Deprecated (PlatformName.MacOSX, 11,0)]
public MidiEndpoint CreateVirtualDestination (string name, out MidiError status)
{
var m = new MidiEndpoint (this, name, out status);
@ -875,6 +878,7 @@ namespace CoreMidi {
public class MidiPort : MidiObject {
#if !COREBUILD
[Deprecated (PlatformName.iOS, 14,0)]
[Deprecated (PlatformName.MacOSX, 11,0)]
[DllImport (Constants.CoreMidiLibrary)]
extern static int /* OSStatus = SInt32 */ MIDIInputPortCreate (MidiClientRef client, IntPtr /* CFStringRef */ portName, MidiReadProc readProc, IntPtr context, out MidiPortRef midiPort);
@ -973,10 +977,12 @@ namespace CoreMidi {
}
[Deprecated (PlatformName.iOS, 14,0)]
[Deprecated (PlatformName.MacOSX, 11,0)]
[DllImport (Constants.CoreMidiLibrary)]
extern static MidiError /* OSStatus = SInt32 */ MIDISend (MidiPortRef port, MidiEndpointRef endpoint, IntPtr packets);
[Deprecated (PlatformName.iOS, 14,0)]
[Deprecated (PlatformName.MacOSX, 11,0)]
public MidiError Send (MidiEndpoint endpoint, MidiPacket [] packets)
{
if (endpoint == null)
@ -1397,6 +1403,7 @@ namespace CoreMidi {
extern static MidiEntityRef MIDIDeviceGetEntity (MidiDeviceRef handle, nint item);
[Deprecated (PlatformName.iOS, 14,0)]
[Deprecated (PlatformName.MacOSX, 11,0)]
[DllImport (Constants.CoreMidiLibrary)]
extern static int MIDIDeviceAddEntity (MidiDeviceRef device, /* CFString */ IntPtr name, bool embedded, nuint numSourceEndpoints, nuint numDestinationEndpoints, MidiEntityRef newEntity);
@ -1909,6 +1916,7 @@ namespace CoreMidi {
extern static int /* OSStatus = SInt32 */ MIDIEndpointDispose (MidiEndpointRef handle);
[Deprecated (PlatformName.iOS, 14,0)]
[Deprecated (PlatformName.MacOSX, 11,0)]
[DllImport (Constants.CoreMidiLibrary)]
extern static MidiError /* OSStatus = SInt32 */ MIDIDestinationCreate (MidiClientRef client, IntPtr /* CFStringRef */ name, MidiReadProc readProc, IntPtr context, out MidiEndpointRef midiEndpoint);
@ -1917,6 +1925,7 @@ namespace CoreMidi {
[DllImport (Constants.CoreMidiLibrary)]
[Deprecated (PlatformName.iOS, 14,0)]
[Deprecated (PlatformName.MacOSX, 11,0)]
extern static MidiError /* OSStatus = SInt32 */ MIDIReceived (MidiEndpointRef handle, IntPtr /* MIDIPacketList* */ packetList);
[DllImport (Constants.CoreMidiLibrary)]
@ -2006,6 +2015,7 @@ namespace CoreMidi {
}
[Deprecated (PlatformName.iOS, 14,0)]
[Deprecated (PlatformName.MacOSX, 11,0)]
public MidiError Received (MidiPacket [] packets)
{
if (packets == null)

Просмотреть файл

@ -256,9 +256,11 @@ namespace CoreServices
);
}
[Deprecated (PlatformName.MacOSX, 10,15)]
[DllImport (Constants.CoreServicesLibrary)]
static extern IntPtr LSCopyAllHandlersForURLScheme (IntPtr inUrlScheme);
[Deprecated (PlatformName.MacOSX, 10,15, message: "Use 'GetApplicationUrlsForUrl' instead.")]
public static string [] GetAllHandlersForUrlScheme (string urlScheme)
{
if (urlScheme == null)
@ -269,9 +271,11 @@ namespace CoreServices
);
}
[Deprecated (PlatformName.MacOSX, 10,15)]
[DllImport (Constants.CoreServicesLibrary)]
static extern IntPtr LSCopyDefaultHandlerForURLScheme (IntPtr inUrlScheme);
[Deprecated (PlatformName.MacOSX, 10,15, message: "Use 'GetDefaultApplicationUrlForUrl' instead.")]
public static string GetDefaultHandlerForUrlScheme (string urlScheme)
{
if (urlScheme == null)

Просмотреть файл

@ -5,7 +5,16 @@ using ObjCRuntime;
namespace FileProvider {
#if !MONOMAC
#if MONOMAC
public static partial class NSFileProviderItem_Extensions {
[Obsolete ("This API was removed from macOS in Xcode 12.2 beta 2.")]
public static Foundation.NSNumber GetFavoriteRank (this INSFileProviderItem This)
{
throw new NotSupportedException ();
}
}
#else
[iOS (13,0)]
[Obsoleted (PlatformName.iOS, 14,0)]
public interface INSFileProviderItemDecorating : INSFileProviderItem {

Просмотреть файл

@ -168,7 +168,10 @@ namespace Foundation {
[Native]
public enum NSDateFormatterBehavior : ulong {
Default = 0, Mode_10_4 = 1040
Default = 0,
[NoiOS][NoTV][NoWatch]
Mode_10_0 = 1000,
Mode_10_4 = 1040,
}
[Native]

Просмотреть файл

@ -91,10 +91,8 @@ namespace GameController {
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'GCController.GetMicroGamepadController()' instead.")]
[Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'GCController.GetMicroGamepadController()' instead.")]
[DllImport (Constants.GameControllerLibrary)]
[Mac (10, 12)]
static extern bool GCMicroGamepadSnapShotDataV100FromNSData (out GCMicroGamepadSnapShotDataV100 snapshotData, /* NSData */ IntPtr data);
[Mac (10, 12)]
[Deprecated (PlatformName.iOS, 12, 2, message: "Use 'TryGetSnapshotData (NSData, out GCMicroGamepadSnapshotData)' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 14, 4, message: "Use 'TryGetSnapshotData (NSData, out GCMicroGamepadSnapshotData)' instead.")]
[Deprecated (PlatformName.TvOS, 12, 2, message: "Use 'TryGetSnapshotData (NSData, out GCMicroGamepadSnapshotData)' instead.")]

Просмотреть файл

@ -74,8 +74,7 @@ namespace ImageIO {
}
// Yes, no [Native] here
[iOS (14,1)]
[NoTV][NoWatch][NoMac]
[Mac (11,0), iOS (14,1), TV (14,2), Watch (7,1)]
public enum CGImagePropertyTgaCompression : uint {
None = 0,
Rle,

Просмотреть файл

@ -47,11 +47,11 @@ namespace Metal {
}
#if MONOMAC
[Mac (10,11), NoiOS, NoWatch, NoTV]
[NoiOS, NoWatch, NoTV]
[DllImport (Constants.MetalLibrary)]
unsafe static extern IntPtr MTLCopyAllDevices ();
[Mac (10,11), NoiOS, NoWatch, NoTV]
[NoiOS, NoWatch, NoTV]
public static IMTLDevice [] GetAllDevices ()
{
var rv = MTLCopyAllDevices ();

Просмотреть файл

@ -410,7 +410,7 @@ namespace Metal {
[iOS (9,0)]
Depth32Float_Stencil8 = 260,
[NoWatch, iOS (9,0), TV (9,0), Mac (10,11)]
[NoWatch, iOS (9,0), TV (9,0)]
X32_Stencil8 = 261,
[Mac (10,12)][NoiOS][NoTV]
@ -803,9 +803,8 @@ namespace Metal {
[iOS (9,0)][Mac (10,11)]
[Native]
public enum MTLLanguageVersion : ulong {
#if !MONOMAC
[NoMac]
v1_0 = (1 << 16),
#endif
v1_1 = (1 << 16) + 1,
[iOS (10,0), TV (10,0), NoWatch, Mac (10,12)]
v1_2 = (1 << 16) + 2,
@ -833,9 +832,8 @@ namespace Metal {
None = 0,
DepthFromDepthStencil = 1 << 0,
StencilFromDepthStencil = 1 << 1,
#if !MONOMAC
[NoMac]
RowLinearPvrtc = 1 << 2
#endif
}
[iOS (9,0)][Mac (10,11)]

Просмотреть файл

@ -62,13 +62,13 @@ namespace MetalPerformanceShaders {
Int8 = SignedBit | 8,
Int16 = SignedBit | 16,
Int32 = SignedBit | 32,
[iOS (14,1)][NoTV][NoMac]
[iOS (14,1)][TV (14,2)][Mac (11,0)]
Int64 = SignedBit | 64,
UInt8 = 8,
UInt16 = 16,
UInt32 = 32,
[iOS (14,1)][NoTV][NoMac]
[iOS (14,1)][TV (14,2)][Mac (11,0)]
UInt64 = 64,
[iOS (11,0), TV (11,0)]

Просмотреть файл

@ -0,0 +1,19 @@
#if IOS
using System;
using CoreFoundation;
using Foundation;
using ObjCRuntime;
namespace MetricKit {
public partial class MXMetricManager {
public static OSLog MakeLogHandle (NSString category)
{
var ptr = _MakeLogHandle (category);
return new OSLog (ptr, owns: true);
}
}
}
#endif

Просмотреть файл

@ -0,0 +1,271 @@
using System;
using System.Runtime.InteropServices;
using ObjCRuntime;
using Foundation;
using CoreFoundation;
using OS_nw_connection=System.IntPtr;
using OS_nw_connection_group=System.IntPtr;
using OS_nw_group_descriptor=System.IntPtr;
using OS_nw_parameters=System.IntPtr;
using OS_nw_content_context=System.IntPtr;
using OS_nw_path=System.IntPtr;
using OS_nw_endpoint=System.IntPtr;
#nullable enable
namespace Network {
[TV (14,0), Mac (11,0), iOS (14,0), Watch (7,0)]
public enum NWConnectionGroupState
{
Invalid = 0,
Waiting = 1,
Ready = 2,
Failed = 3,
Cancelled = 4,
}
[TV (14,0), Mac (11,0), iOS (14,0), Watch (7,0)]
public delegate void NWConnectionGroupReceiveDelegate (DispatchData content, NWContentContext context, bool isCompleted);
[TV (14,0), Mac (11,0), iOS (14,0), Watch (7,0)]
public delegate void NWConnectionGroupStateChangedDelegate (NWConnectionGroupState state, NWError? error);
[TV (14,0), Mac (11,0), iOS (14,0), Watch (7,0)]
public class NWConnectionGroup : NativeObject {
protected NWConnectionGroup (IntPtr handle, bool owns) : base (handle, owns) {}
[DllImport (Constants.NetworkLibrary)]
static extern OS_nw_connection_group nw_connection_group_create (OS_nw_group_descriptor group_descriptor, OS_nw_parameters parameters);
public NWConnectionGroup (NWMulticastGroup groupDescriptor, NWParameters parameters)
{
if (groupDescriptor == null)
throw new ArgumentNullException (nameof (groupDescriptor));
if (parameters == null)
throw new ArgumentNullException (nameof (parameters));
InitializeHandle (nw_connection_group_create (groupDescriptor.GetCheckedHandle (), parameters.GetCheckedHandle ()));
}
[DllImport (Constants.NetworkLibrary)]
static extern OS_nw_group_descriptor nw_connection_group_copy_descriptor (OS_nw_connection_group group);
public NWMulticastGroup? GroupDescriptor {
get {
var x = nw_connection_group_copy_descriptor (GetCheckedHandle ());
if (x == IntPtr.Zero)
return null;
return new NWMulticastGroup (x, owns: true);
}
}
[DllImport (Constants.NetworkLibrary)]
static extern OS_nw_parameters nw_connection_group_copy_parameters (OS_nw_connection_group group);
public NWParameters? Parameters {
get {
var x = nw_connection_group_copy_parameters (GetCheckedHandle ());
if (x == IntPtr.Zero)
return null;
return new NWParameters (x, owns: true);
}
}
[DllImport (Constants.NetworkLibrary)]
static extern void nw_connection_group_start (OS_nw_connection_group group);
public void Start () => nw_connection_group_start (GetCheckedHandle ());
[DllImport (Constants.NetworkLibrary)]
static extern void nw_connection_group_cancel (OS_nw_connection_group group);
public void Cancel () => nw_connection_group_cancel (GetCheckedHandle ());
[DllImport (Constants.NetworkLibrary)]
static extern void nw_connection_group_set_queue (OS_nw_connection_group group, IntPtr queue);
public void SetQueue (DispatchQueue queue)
{
if (queue == null)
throw new ArgumentNullException (nameof (queue));
nw_connection_group_set_queue (GetCheckedHandle (), queue.GetCheckedHandle ());
}
// can return null
[DllImport (Constants.NetworkLibrary)]
static extern OS_nw_endpoint nw_connection_group_copy_local_endpoint_for_message (OS_nw_connection_group group, OS_nw_content_context context);
public NWEndpoint? GetLocalEndpoint (NWContentContext context)
{
if (context == null)
throw new ArgumentNullException (nameof (context));
var ptr = nw_connection_group_copy_local_endpoint_for_message (GetCheckedHandle (), context.GetCheckedHandle ());
return ptr == IntPtr.Zero ? null : new NWEndpoint (ptr, owns: true);
}
// can return null
[DllImport (Constants.NetworkLibrary)]
static extern OS_nw_path nw_connection_group_copy_path_for_message (OS_nw_connection_group group, OS_nw_content_context context);
public NWPath? GetPath (NWContentContext context)
{
if (context == null)
throw new ArgumentNullException (nameof (context));
var ptr = nw_connection_group_copy_path_for_message (GetCheckedHandle (), context.GetCheckedHandle ());
return ptr == IntPtr.Zero ? null : new NWPath (ptr, owns: true);
}
// can return null
[DllImport (Constants.NetworkLibrary)]
static extern OS_nw_endpoint nw_connection_group_copy_remote_endpoint_for_message (OS_nw_connection_group group, OS_nw_content_context context);
public NWEndpoint? GetRemmoteEndpoint (NWContentContext context)
{
if (context == null)
throw new ArgumentNullException (nameof (context));
var ptr = nw_connection_group_copy_remote_endpoint_for_message (GetCheckedHandle (), context.GetCheckedHandle ());
return ptr == IntPtr.Zero ? null : new NWEndpoint (ptr, owns: true);
}
// can return null
[DllImport (Constants.NetworkLibrary)]
static extern OS_nw_connection nw_connection_group_extract_connection_for_message (OS_nw_connection_group group, OS_nw_content_context context);
public NWConnection? GetConnection (NWContentContext context)
{
if (context == null)
throw new ArgumentNullException (nameof (context));
var ptr = nw_connection_group_extract_connection_for_message (GetCheckedHandle (), context.GetCheckedHandle ());
return ptr == IntPtr.Zero ? null : new NWConnection (ptr, owns: true);
}
[DllImport (Constants.NetworkLibrary)]
static extern void nw_connection_group_reply (OS_nw_connection_group group, OS_nw_content_context inbound_message, OS_nw_content_context outbound_message, /* [NullAllowed] DispatchData */ IntPtr content);
public void Reply (NWContentContext inboundMessage, NWContentContext outboundMessage, DispatchData content)
{
if (inboundMessage == null)
throw new ArgumentNullException (nameof (inboundMessage));
if (outboundMessage == null)
throw new ArgumentNullException (nameof (outboundMessage));
nw_connection_group_reply (GetCheckedHandle (), inboundMessage.GetCheckedHandle (), outboundMessage.GetCheckedHandle (), content.GetHandle ());
}
[DllImport (Constants.NetworkLibrary)]
unsafe static extern void nw_connection_group_send_message (OS_nw_connection_group group, /* [NullAllowed] DispatchData */ IntPtr content, /* [NullAllowed] */ OS_nw_endpoint endpoint, OS_nw_content_context context, BlockLiteral *handler);
delegate void nw_connection_group_send_completion_t (IntPtr block, IntPtr error);
static nw_connection_group_send_completion_t static_SendCompletion = TrampolineSendCompletion;
[MonoPInvokeCallback (typeof (nw_connection_group_send_completion_t))]
static void TrampolineSendCompletion (IntPtr block, IntPtr error)
{
var del = BlockLiteral.GetTarget<Action<NWError?>> (block);
if (del != null) {
using var err = error == IntPtr.Zero ? null : new NWError (error, owns: false);
del (err);
}
}
[BindingImpl (BindingImplOptions.Optimizable)]
public void Send (DispatchData? content, NWEndpoint? endpoint, NWContentContext context, Action<NWError?>? handler)
{
unsafe {
if (handler == null) {
nw_connection_group_send_message (GetCheckedHandle (),
content.GetHandle (),
endpoint.GetHandle (),
context.GetCheckedHandle (),
null);
return;
}
BlockLiteral block_handler = new BlockLiteral ();
block_handler.SetupBlockUnsafe (static_SendCompletion, handler);
try {
nw_connection_group_send_message (GetCheckedHandle (),
content.GetHandle (),
endpoint.GetHandle (),
context.GetCheckedHandle (),
&block_handler);
} finally {
block_handler.CleanupBlock ();
}
}
}
[DllImport (Constants.NetworkLibrary)]
unsafe static extern void nw_connection_group_set_receive_handler (OS_nw_connection_group group, uint maximum_message_size, bool reject_oversized_messages, BlockLiteral *handler);
delegate void nw_connection_group_receive_handler_t (IntPtr block, IntPtr content, IntPtr context, bool isCompleted);
static nw_connection_group_receive_handler_t static_ReceiveHandler = TrampolineReceiveHandler;
[MonoPInvokeCallback (typeof (nw_connection_group_receive_handler_t))]
static void TrampolineReceiveHandler (IntPtr block, IntPtr content, IntPtr context, bool isCompleted)
{
var del = BlockLiteral.GetTarget<NWConnectionGroupReceiveDelegate> (block);
if (del != null) {
using var nsContent = new DispatchData (content, owns: false);
using var nsContext = new NWContentContext (context, owns: false);
del (nsContent, nsContext, isCompleted);
}
}
[BindingImpl (BindingImplOptions.Optimizable)]
public void SetReceiveHandler (uint maximumMessageSize, bool rejectOversizedMessages, NWConnectionGroupReceiveDelegate? handler)
{
unsafe {
if (handler == null) {
nw_connection_group_set_receive_handler (GetCheckedHandle (), maximumMessageSize, rejectOversizedMessages, null);
return;
}
BlockLiteral block_handler = new BlockLiteral ();
block_handler.SetupBlockUnsafe (static_ReceiveHandler, handler);
try {
nw_connection_group_set_receive_handler (GetCheckedHandle (), maximumMessageSize, rejectOversizedMessages, &block_handler);
} finally {
block_handler.CleanupBlock ();
}
}
}
[DllImport (Constants.NetworkLibrary)]
unsafe static extern void nw_connection_group_set_state_changed_handler (OS_nw_connection_group group, BlockLiteral *handler);
delegate void nw_connection_group_state_changed_handler_t (IntPtr block, NWConnectionGroupState state , IntPtr error);
static nw_connection_group_state_changed_handler_t static_StateChangedHandler = TrampolineStateChangedHandler;
[MonoPInvokeCallback (typeof (nw_connection_group_state_changed_handler_t))]
static void TrampolineStateChangedHandler (IntPtr block, NWConnectionGroupState state, IntPtr error)
{
var del = BlockLiteral.GetTarget<NWConnectionGroupStateChangedDelegate> (block);
if (del != null) {
using var nwError = (error == IntPtr.Zero) ? null : new NWError (error, owns: false);
del (state, nwError);
}
}
[BindingImpl (BindingImplOptions.Optimizable)]
public void SetStateChangedHandler (NWConnectionGroupStateChangedDelegate handler)
{
unsafe {
if (handler == null) {
nw_connection_group_set_state_changed_handler (GetCheckedHandle (), null);
return;
}
BlockLiteral block_handler = new BlockLiteral ();
block_handler.SetupBlockUnsafe (static_StateChangedHandler, handler);
try {
nw_connection_group_set_state_changed_handler (GetCheckedHandle (), &block_handler);
} finally {
block_handler.CleanupBlock ();
}
}
}
}
}

Просмотреть файл

@ -0,0 +1,91 @@
using System;
using System.Runtime.InteropServices;
using ObjCRuntime;
using Foundation;
using CoreFoundation;
using OS_nw_group_descriptor=System.IntPtr;
using OS_nw_endpoint=System.IntPtr;
#nullable enable
namespace Network {
[TV (14,0), Mac (11,0), iOS (14,0), Watch (7,0)]
public class NWMulticastGroup : NativeObject {
internal NWMulticastGroup (IntPtr handle, bool owns) : base (handle, owns) {}
[DllImport (Constants.NetworkLibrary)]
static extern OS_nw_group_descriptor nw_group_descriptor_create_multicast (OS_nw_endpoint multicast_group);
public NWMulticastGroup (NWEndpoint endpoint)
{
if (endpoint == null)
throw new ArgumentNullException (nameof (endpoint));
InitializeHandle (nw_group_descriptor_create_multicast (endpoint.GetCheckedHandle ()));
}
[DllImport (Constants.NetworkLibrary)]
static extern bool nw_group_descriptor_add_endpoint (OS_nw_group_descriptor descriptor, OS_nw_endpoint endpoint);
public void AddEndpoint (NWEndpoint endpoint)
{
if (endpoint == null)
throw new ArgumentNullException (nameof (endpoint));
nw_group_descriptor_add_endpoint (GetCheckedHandle (), endpoint.GetCheckedHandle ());
}
[DllImport (Constants.NetworkLibrary)]
static extern bool nw_multicast_group_descriptor_get_disable_unicast_traffic (OS_nw_group_descriptor multicast_descriptor);
[DllImport (Constants.NetworkLibrary)]
static extern void nw_multicast_group_descriptor_set_disable_unicast_traffic (OS_nw_group_descriptor multicast_descriptor, bool disable_unicast_traffic);
public bool DisabledUnicastTraffic {
get => nw_multicast_group_descriptor_get_disable_unicast_traffic (GetCheckedHandle ());
set => nw_multicast_group_descriptor_set_disable_unicast_traffic (GetCheckedHandle (), value);
}
[DllImport (Constants.NetworkLibrary)]
static extern void nw_multicast_group_descriptor_set_specific_source (OS_nw_group_descriptor multicast_descriptor, OS_nw_endpoint source);
public void SetSpecificSource (NWEndpoint endpoint)
{
if (endpoint == null)
throw new ArgumentNullException (nameof (endpoint));
nw_multicast_group_descriptor_set_specific_source (GetCheckedHandle (), endpoint.GetCheckedHandle ());
}
[DllImport (Constants.NetworkLibrary)]
static extern void nw_group_descriptor_enumerate_endpoints (OS_nw_group_descriptor descriptor, ref BlockLiteral enumerate_block);
delegate bool nw_group_descriptor_enumerate_endpoints_block_t (IntPtr block, OS_nw_endpoint endpoint);
static nw_group_descriptor_enumerate_endpoints_block_t static_EnumerateEndpointsHandler = TrampolineEnumerateEndpointsHandler;
[MonoPInvokeCallback (typeof (nw_group_descriptor_enumerate_endpoints_block_t))]
static bool TrampolineEnumerateEndpointsHandler (IntPtr block, OS_nw_endpoint endpoint)
{
var del = BlockLiteral.GetTarget<Func<NWEndpoint, bool>> (block);
if (del != null) {
using var nsEndpoint = new NWEndpoint (endpoint, owns: false);
return del (nsEndpoint);
}
return false;
}
[BindingImpl (BindingImplOptions.Optimizable)]
public void EnumerateEndpoints (Func<NWEndpoint, bool> handler)
{
if (handler == null)
throw new ArgumentNullException (nameof (handler));
BlockLiteral block_handler = new BlockLiteral ();
block_handler.SetupBlockUnsafe (static_EnumerateEndpointsHandler, handler);
try {
nw_group_descriptor_enumerate_endpoints (GetCheckedHandle (), ref block_handler);
} finally {
block_handler.CleanupBlock ();
}
}
}
}

Просмотреть файл

@ -12,5 +12,7 @@ namespace ObjCRuntime {
internal const string WatchKitRemoved = "The WatchKit framework has been removed from iOS.";
internal const string UnavailableOnWatchOS = "This type is not available on watchOS.";
internal const string MacOS32bitsUnavailable = "This framework is not available on 64bits macOS versions.";
}
}

Просмотреть файл

@ -288,6 +288,7 @@ namespace ObjCRuntime
const int sys2 = 1937339186;
// Deprecated in OSX 10.8 - but no good alternative is (yet) available
[Deprecated (PlatformName.MacOSX, 10, 8)]
[DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")]
static extern int Gestalt (int selector, out int result);

Просмотреть файл

@ -1,115 +0,0 @@
//
// Copyright 2010, Novell, Inc.
// Copyright 2014 Xamarin Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
using ObjCRuntime;
namespace QTKit {
[Deprecated (PlatformName.MacOSX, 10, 9)]
[StructLayout (LayoutKind.Sequential)]
public partial struct QTTime {
public static readonly QTTime Zero = new QTTime (0, 1, 0);
public static readonly QTTime IndefiniteTime = new QTTime (0, 1, TimeFlags.TimeIsIndefinite);
// QTKit/Headers/QTTime.h:
// typedef struct {
// long long timeValue;
// long timeScale;
// long flags;
// } QTTime;
long timeValue;
nint timeScale;
nint flags; // TimeFlags enum
public long TimeValue {
get { return timeValue; }
set { timeValue = value; }
}
public nint TimeScale {
get { return timeScale; }
set { timeScale = value; }
}
public TimeFlags Flags {
get { return (TimeFlags)(long)flags; }
set { flags = (nint)(long)value; }
}
public QTTime (long timeValue, nint timeScale, TimeFlags flags)
{
this.timeValue = timeValue;
this.timeScale = timeScale;
this.flags = (nint)(long)flags;
}
public QTTime (long timeValue, nint timeScale)
: this (timeValue, timeScale, 0)
{
}
public override string ToString ()
{
if (Flags == 0)
return String.Format ("[TimeValue={0} scale={1}]", TimeValue, TimeScale);
else
return String.Format ("[TimeValue={0} scale={1} Flags={2}]", TimeValue, TimeScale, Flags);
}
}
[Deprecated (PlatformName.MacOSX, 10, 9)]
public struct QTTimeRange {
// QTKit/Headers/QTTime.h:
// typedef struct {
// QTTime time;
// QTTime duration;
// } QTTimeRange;
QTTime time;
QTTime duration;
public QTTime Time {
get { return time; }
set { time = value; }
}
public QTTime Duration {
get { return duration; }
set { duration = value; }
}
public QTTimeRange (QTTime time, QTTime duration)
{
this.time = time;
this.duration = duration;
}
public override string ToString ()
{
return String.Format ("[Time={0} Duration={2}]", Time, Duration);
}
}
}

Просмотреть файл

@ -1,145 +0,0 @@
//
// Copyright 2010, Novell, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
using ObjCRuntime;
namespace QTKit {
// Untyped anonymous enum in ObjC
[Flags]
public enum TimeFlags : int {
TimeIsIndefinite = 1
}
// Untyped anonymous enum in ObjC
[Flags]
public enum QTMovieFileTypeOptions : uint {
StillImageTypes = 1 << 0,
TranslatableTypes = 1 << 1,
AggressiveTypes = 1 << 2,
DynamicTypes = 1 << 3,
CommonTypes = 0,
AllTypes = 0xffff
}
[Native]
public enum QTCaptureDevicePlaybackMode : ulong {
NotPlaying,
Playing
}
[Native]
public enum QTCaptureDeviceControlsSpeed : long {
FastestReverse = -19000,
VeryFastReverse = -16000,
FastReverse = -13000,
NormalReverse = -10000,
SlowReverse = -7000,
VerySlowReverse = -4000,
SlowestReverse = -1000,
Stopped = 0,
SlowestForward = 1000,
VerySlowForward = 4000,
SlowForward = 7000,
NormalForward = 10000,
FastForward = 13000,
VeryFastForward = 16000,
FastestForward = 19000,
}
[Native]
public enum QTCaptureDestination : ulong {
NewFile = 1,
OldFile = 2
}
[Native]
public enum QTError : long {
Unknown = -1,
None,
IncompatibleInput = 1002,
IncompatibleOutput = 1003,
InvalidInputsOrOutputs = 1100,
DeviceAlreadyUsedbyAnotherSession = 1101,
NoDataCaptured = 1200,
SessionConfigurationChanged = 1201,
DiskFull = 1202,
DeviceWasDisconnected = 1203,
MediaChanged = 1204,
MaximumDurationReached = 1205,
MaximumFileSizeReached = 1206,
MediaDiscontinuity = 1207,
MaximumNumberOfSamplesForFileFormatReached = 1208,
DeviceNotConnected = 1300,
DeviceInUseByAnotherApplication = 1301,
DeviceExcludedByAnotherDevice = 1302,
}
// Convenience enum for strings in ObjC
public enum QTMediaType : int {
Video, Sound, Text, Base, Mpeg, Music, TimeCode, Sprite, Flash, Movie, Tween, Type3D, Skin, Qtvr, Hint, Stream, Muxed, QuartzComposer
}
public enum QTFileType : int {
AIFF = 0x41494646, // 'AIFF'
AIFC = 0x41494643, // 'AIFC'
DVC = 0x64766321, // 'dvc!'
MIDI = 0x4d696469, // 'Midi'
Picture = 0x50494354, // 'PICT'
Movie = 0x4d6f6f56, // 'MooV'
Text = 0x54455854, // 'TEXT'
Wave = 0x57415645, // 'WAVE'
SystemSevenSound = 0x7366696c, // 'sfil'
MuLaw = 0x554c4157, // 'ULAW'
AVI = 0x56665720, // 'VfW '
SoundDesignerII = 0x53643266, // 'Sd2f'
AudioCDTrack = 0x7472616b, // 'trak'
PICS = 0x50494353, // 'PICS'
GIF = 0x47494666, // 'GIFf'
PNG = 0x504e4766, // 'PNGf'
TIFF = 0x54494646, // 'TIFF'
PhotoShop = 0x38425053, // '8BPS'
SGIImage = 0x2e534749, // '.SGI'
BMP = 0x424d5066, // 'BMPf'
JPEG = 0x4a504547, // 'JPEG'
JFIF = 0x4a504547, // 'JPEG'
MacPaint = 0x504e5447, // 'PNTG'
TargaImage = 0x54504943, // 'TPIC'
QuickDrawGXPicture = 0x71646778,// 'qdgx'
QuickTimeImage = 0x71746966, // 'qtif'
T3DMF = 0x33444d46, // '3DMF'
FLC = 0x464c4320, // 'FLC '
Flash = 0x5357464c, // 'SWFL'
FlashPix = 0x46506978, // 'FPix'
MP4 = 0x6d706734, // 'mpg4'
PDF = 0x50444620, // 'PDF '
T3GPP = 0x33677070, // '3gpp'
AMR = 0x616d7220, // 'amr '
SDV = 0x73647620, // 'sdv '
T3GP2 = 0x33677032, // '3gp2'
AMC = 0x616d6320, // 'amc '
JPEG2000 = 0x6a703220, // 'jp2
}
}

Просмотреть файл

@ -1,26 +0,0 @@
using System;
using Foundation;
namespace QTKit
{
public partial class QTCaptureConnection
{
public NSObject GetAttribute (string attributeKey)
{
return GetAttribute ((NSString)attributeKey);
}
public void SetAttribute (NSObject attribute, string key)
{
SetAttribute (attribute, (NSString)key);
}
public QTMediaType MediaTypeValue
{
get {
return QTMedia.QTMediaTypeFromNSString ((NSString)MediaType);
}
}
}
}

Просмотреть файл

@ -1,96 +0,0 @@
//
// Copyright 2010, Novell, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using Foundation;
using System;
namespace QTKit {
public partial class QTCaptureDevice {
public static QTCaptureDevice [] GetInputDevices (QTMediaType mediaType)
{
var t = (QTMedia.NSStringFromQTMediaType (mediaType));
if (t == null)
return null;
return _GetInputDevices (t);
}
public static QTCaptureDevice GetDefaultInputDevice (QTMediaType mediaType)
{
var t = QTMedia.NSStringFromQTMediaType (mediaType);
if (t == null)
return null;
return _GetDefaultInputDevice (t);
}
public bool HasMediaType (QTMediaType mediaType)
{
return _HasMediaType (QTMedia.NSStringFromQTMediaType (mediaType));
}
public bool IsAvcTransportControlReadOnly {
get {
return IsAttributeReadOnly (AVCTransportControlsAttribute);
}
}
public QTCaptureDeviceTransportControl AvcTransportControl {
get {
var dict = (NSDictionary) GetAttribute (AVCTransportControlsAttribute);
if (dict == null)
return null;
return new QTCaptureDeviceTransportControl (dict);
}
set {
var dict = new NSMutableDictionary ();
if (value.Speed.HasValue)
dict [QTCaptureDevice.AVCTransportControlsSpeedKey] = NSNumber.FromInt32 ((int) value.Speed.Value);
if (value.PlaybackMode.HasValue)
dict [QTCaptureDevice.AVCTransportControlsSpeedKey] = NSNumber.FromInt32 ((int) value.PlaybackMode.Value);
SetAttribute (dict, AVCTransportControlsAttribute);
}
}
public bool IsSuspended {
get {
var val = (NSNumber) GetAttribute (SuspendedAttribute);
return (val != null && val.BoolValue);
}
}
}
public class QTCaptureDeviceTransportControl {
public QTCaptureDeviceTransportControl () {}
internal QTCaptureDeviceTransportControl (NSDictionary dict)
{
var number = (NSNumber) dict [QTCaptureDevice.AVCTransportControlsSpeedKey];
if (number != null)
Speed = (QTCaptureDeviceControlsSpeed) number.Int32Value;
number = (NSNumber) dict [QTCaptureDevice.AVCTransportControlsPlaybackModeKey];
if (number != null)
PlaybackMode = (QTCaptureDevicePlaybackMode) number.Int32Value;
}
public QTCaptureDeviceControlsSpeed? Speed { get; set; }
public QTCaptureDevicePlaybackMode? PlaybackMode { get; set; }
}
}

3501
src/QTKit/QTCompat.cs Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,21 +0,0 @@
using System;
using Foundation;
namespace QTKit
{
public partial class QTCompressionOptions
{
public QTMediaType MediaTypeValue
{
get {
return QTMedia.QTMediaTypeFromNSString ((NSString)MediaType);
}
}
public string [] GetCompressionOptionsIdentifiers (QTMediaType forMediaType)
{
return GetCompressionOptionsIdentifiers (QTMedia.NSStringFromQTMediaType (forMediaType));
}
}
}

Просмотреть файл

@ -1,16 +0,0 @@
using System;
using Foundation;
namespace QTKit
{
public partial class QTFormatDescription
{
public QTMediaType MediaTypeValue
{
get {
return QTMedia.QTMediaTypeFromNSString ((NSString)MediaType);
}
}
}
}

Просмотреть файл

@ -1,93 +0,0 @@
using System;
using Foundation;
namespace QTKit
{
public partial class QTMedia
{
internal static QTMediaType QTMediaTypeFromNSString (NSString str)
{
if (str == QTMedia.TypeVideo)
return QTMediaType.Video;
else if (str == QTMedia.TypeSound)
return QTMediaType.Sound;
else if (str == QTMedia.TypeText)
return QTMediaType.Text;
else if (str == QTMedia.TypeBase)
return QTMediaType.Base;
else if (str == QTMedia.TypeMusic)
return QTMediaType.Music;
else if (str == QTMedia.TypeTimeCode)
return QTMediaType.TimeCode;
else if (str == QTMedia.TypeSprite)
return QTMediaType.Sprite;
else if (str == QTMedia.TypeFlash)
return QTMediaType.Flash;
else if (str == QTMedia.TypeMovie)
return QTMediaType.Movie;
else if (str == QTMedia.TypeTween)
return QTMediaType.Tween;
else if (str == QTMedia.Type3D)
return QTMediaType.Type3D;
else if (str == QTMedia.TypeSkin)
return QTMediaType.Skin;
else if (str == QTMedia.TypeQTVR)
return QTMediaType.Qtvr;
else if (str == QTMedia.TypeHint)
return QTMediaType.Hint;
else if (str == QTMedia.TypeStream)
return QTMediaType.Stream;
else if (str == QTMedia.TypeMuxed)
return QTMediaType.Muxed;
else if (str == QTMedia.TypeQuartzComposer)
return QTMediaType.QuartzComposer;
throw new ArgumentException ("No enum found matching the supplied NSString");
}
internal static NSString NSStringFromQTMediaType (QTMediaType mediaType)
{
switch (mediaType) {
case QTMediaType.Video:
return QTMedia.TypeVideo;
case QTMediaType.Sound:
return QTMedia.TypeSound;
case QTMediaType.Text:
return QTMedia.TypeText;
case QTMediaType.Base:
return QTMedia.TypeBase;
case QTMediaType.Mpeg:
return QTMedia.TypeMpeg;
case QTMediaType.Music:
return QTMedia.TypeMusic;
case QTMediaType.TimeCode:
return QTMedia.TypeTimeCode;
case QTMediaType.Sprite:
return QTMedia.TypeSprite;
case QTMediaType.Flash:
return QTMedia.TypeFlash;
case QTMediaType.Movie:
return QTMedia.TypeMovie;
case QTMediaType.Tween:
return QTMedia.TypeTween;
case QTMediaType.Type3D:
return QTMedia.Type3D;
case QTMediaType.Skin:
return QTMedia.TypeSkin;
case QTMediaType.Qtvr:
return QTMedia.TypeQTVR;
case QTMediaType.Hint:
return QTMedia.TypeHint;
case QTMediaType.Stream:
return QTMedia.TypeStream;
case QTMediaType.Muxed:
return QTMedia.TypeMuxed;
case QTMediaType.QuartzComposer:
return QTMedia.TypeQuartzComposer;
default:
throw new ArgumentException ("No enum found matching the supplied NSString");
}
}
}
}

Просмотреть файл

@ -1,122 +0,0 @@
//
// Copyright 2010, Novell, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using Foundation;
using AppKit;
namespace QTKit {
// Untyped and anonymous enum in ObjC
public enum QTCodecQuality {
Lossless = 0x00000400,
Max = 0x000003FF,
Min = 0x00000000,
Low = 0x00000100,
Normal = 0x00000200,
High = 0x00000300
}
public class QTImageAttributes {
public QTImageAttributes ()
{
}
public string CodecType { get; set; }
public QTCodecQuality? Quality { get; set; }
public int? TimeScale { get; set; }
public NSDictionary ToDictionary ()
{
var dict = new NSMutableDictionary ();
if (CodecType != null)
dict.SetObject (new NSString (CodecType), QTMovie.ImageCodecType);
if (Quality.HasValue)
dict.SetObject (NSNumber.FromInt32 ((int) Quality.Value), QTMovie.ImageCodecQuality);
if (TimeScale.HasValue)
dict.SetObject (NSNumber.FromInt32 (TimeScale.Value), QTTrack.TimeScaleAttribute);
return dict;
}
}
public class QTMovieSaveOptions {
public QTMovieSaveOptions ()
{
}
public bool Flatten { get; set; }
public QTFileType? ExportType { get; set; }
public NSData ExportSettings { get; set; }
public int? ManufacturerCode { get; set; }
public NSDictionary ToDictionary ()
{
var dict = new NSMutableDictionary ();
if (Flatten)
dict.SetObject (NSNumber.FromInt32 (1), QTMovie.KeyFlatten);
if (ExportType.HasValue){
dict.SetObject (NSNumber.FromInt32 (1), QTMovie.KeyExport);
dict.SetObject (NSNumber.FromInt32 ((int) ExportType.Value), QTMovie.KeyExportType);
}
if (ExportSettings != null)
dict.SetObject (ExportSettings, QTMovie.KeyExportSettings);
if (ManufacturerCode.HasValue)
dict.SetObject (NSNumber.FromInt32 ((int) ManufacturerCode.Value), QTMovie.KeyExportManufacturer);
return dict;
}
}
public partial class QTTrack {
public void AddImage (NSImage image, QTTime forDuration, QTImageAttributes attributes)
{
if (attributes == null)
throw new ArgumentNullException ("attributes");
AddImage (image, forDuration, attributes.ToDictionary ());
}
}
public partial class QTMovie {
public bool SaveTo (string fileName, QTMovieSaveOptions options, out NSError error)
{
return SaveTo (fileName, options == null ? null : options.ToDictionary (), out error);
}
public bool SaveTo (string fileName, QTMovieSaveOptions options)
{
return SaveTo (fileName, options == null ? null : options.ToDictionary ());
}
public void AddImage (NSImage image, QTTime forDuration, QTImageAttributes attributes)
{
if (attributes == null)
throw new ArgumentNullException ("attributes");
AddImage (image, forDuration, attributes.ToDictionary ());
}
public QTTrack[] TracksOfMediaType (QTMediaType mediaType)
{
return TracksOfMediaType (QTMedia.NSStringFromQTMediaType (mediaType));
}
}
}

Просмотреть файл

@ -465,7 +465,7 @@ namespace SearchKit
[DllImport (Constants.SearchKitLibrary)]
extern static nint SKIndexGetMaximumBytesBeforeFlush (IntPtr h);
[Advice ("Apple recommends to use Flush instead of setting these parameters")]
[Advice ("Apple recommends to use Flush instead of setting these parameters.")]
public nint MaximumBytesBeforeFlush {
get {
return SKIndexGetMaximumBytesBeforeFlush (handle);

Просмотреть файл

@ -61,6 +61,7 @@ namespace Security {
PartialRights = 1 << 2,
DestroyRights = 1 << 3,
PreAuthorize = 1 << 4,
NoData = 1 << 20,
}
//
@ -100,6 +101,7 @@ namespace Security {
[DllImport (Constants.SecurityLibrary)]
extern static int /* OSStatus = int */ AuthorizationCreate (AuthorizationItemSet *rights, AuthorizationItemSet *environment, AuthorizationFlags flags, out IntPtr auth);
[Deprecated (PlatformName.MacOSX, 10,7)]
[DllImport (Constants.SecurityLibrary)]
extern static int /* OSStatus = int */ AuthorizationExecuteWithPrivileges (IntPtr handle, string pathToTool, AuthorizationFlags flags, string [] args, IntPtr FILEPtr);
@ -111,6 +113,7 @@ namespace Security {
this.handle = handle;
}
[Deprecated (PlatformName.MacOSX, 10,7)]
public int ExecuteWithPrivileges (string pathToTool, AuthorizationFlags flags, string [] args)
{
return AuthorizationExecuteWithPrivileges (handle, pathToTool, flags, args, IntPtr.Zero);

Просмотреть файл

@ -449,9 +449,17 @@ namespace Security {
public enum SecAuthenticationUI {
NotSet = -1,
[Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'LAContext.InteractionNotAllowed' instead.")]
[Deprecated (PlatformName.iOS, 14,0, message: "Use 'LAContext.InteractionNotAllowed' instead.")]
[Deprecated (PlatformName.TvOS, 14,0, message: "Use 'LAContext.InteractionNotAllowed' instead.")]
[Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'LAContext.InteractionNotAllowed' instead.")]
[Field ("kSecUseAuthenticationUIAllow")]
Allow,
[Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'LAContext.InteractionNotAllowed' instead.")]
[Deprecated (PlatformName.iOS, 14,0, message: "Use 'LAContext.InteractionNotAllowed' instead.")]
[Deprecated (PlatformName.TvOS, 14,0, message: "Use 'LAContext.InteractionNotAllowed' instead.")]
[Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'LAContext.InteractionNotAllowed' instead.")]
[Field ("kSecUseAuthenticationUIFail")]
Fail,

Просмотреть файл

@ -75,7 +75,15 @@ namespace Security {
public enum SecAuthenticationType {
Invalid = -1,
Ntlm, Msn, Dpa, Rpa, HttpBasic, HttpDigest, HtmlForm, Default
Any = 0,
Ntlm = 1835824238,
Msn = 1634628461,
Dpa = 1633775716,
Rpa = 1633775730,
HttpBasic = 1886680168,
HttpDigest = 1685353576,
HtmlForm = 1836216166,
Default = 1953261156,
}
public class SecKeyChain : INativeObject {

Просмотреть файл

@ -50,6 +50,7 @@ namespace StoreKit {
OverlayInvalidConfiguration = 16,
OverlayTimeout = 17,
IneligibleForOffer = 18,
UnsupportedPlatform = 19,
}
// typedef NSInteger SKDownloadState;
@ -110,7 +111,6 @@ namespace StoreKit {
FreeTrial,
}
[Unavailable (PlatformName.MacCatalyst)]
[NoWatch, NoTV, NoMac, iOS (14,0)]
[Native, Advice ("This API is not available when using UIKit on macOS.")]
public enum SKOverlayPosition : long {

Просмотреть файл

@ -30,15 +30,8 @@ namespace VideoToolbox {
var dicts = NSArray.ArrayFromHandle<NSDictionary> (array);
var ret = new VTVideoEncoder [dicts.Length];
int i = 0;
foreach (var dict in dicts){
ret [i] = new VTVideoEncoder (
dict [VTVideoEncoderList.CodecType] as NSNumber,
dict [VTVideoEncoderList.CodecName] as NSString,
dict [VTVideoEncoderList.DisplayName] as NSString,
dict [VTVideoEncoderList.EncoderID] as NSString,
dict [VTVideoEncoderList.EncoderName] as NSString);
i++;
}
foreach (var dict in dicts)
ret [i++] = new VTVideoEncoder (dict);
CFObject.CFRelease (array);
return ret;
}
@ -49,13 +42,78 @@ namespace VideoToolbox {
public string EncoderId { get; private set; }
public string EncoderName { get; private set; }
internal VTVideoEncoder (NSNumber codecType, NSString codecName, NSString displayName, NSString encoderId, NSString encoderName)
[Mac (10,14,6), iOS (13,0), TV (13,0)]
public ulong? GpuRegistryId { get; private set; } // optional, same type as `[MTLDevice registryID]`
[Mac (10,14,6), iOS (13,0), TV (13,0)]
public NSDictionary SupportedSelectionProperties {get; private set; }
[Mac (10,14,6), iOS (13,0), TV (13,0)]
public NSNumber PerformanceRating { get; private set; }
[Mac (10,14,6), iOS (13,0), TV (13,0)]
public NSNumber QualityRating { get; private set; }
[Mac (10,14,6), iOS (13,0), TV (13,0)]
public bool? InstanceLimit { get; private set; }
[Mac (10,14,6), iOS (13,0), TV (13,0)]
public bool? IsHardwareAccelerated { get; private set; }
[iOS (14,2)][TV (14,2)][Mac (11,0)]
public bool SupportsFrameReordering { get; private set; }
internal VTVideoEncoder (NSDictionary dict)
{
CodecType = codecType.Int32Value;
CodecName = codecName;
DisplayName = displayName;
EncoderId = encoderId;
EncoderName = encoderName;
CodecType = (dict [VTVideoEncoderList.CodecType] as NSNumber).Int32Value;
CodecName = dict [VTVideoEncoderList.CodecName] as NSString;
DisplayName = dict [VTVideoEncoderList.DisplayName] as NSString;
EncoderId = dict [VTVideoEncoderList.EncoderID] as NSString;
EncoderName = dict [VTVideoEncoderList.EncoderName] as NSString;
// added in Xcode 11 so the constants won't exists in earlier SDK, making all values optional
var constant = VTVideoEncoderList.GpuRegistryId;
if (constant != null) {
var gri = dict [constant] as NSNumber;
GpuRegistryId = gri?.UInt64Value; // optional
}
constant = VTVideoEncoderList.SupportedSelectionProperties;
if (constant != null) {
if (dict.TryGetValue (constant, out NSDictionary d)) // optional
SupportedSelectionProperties = d;
}
constant = VTVideoEncoderList.PerformanceRating;
if (constant != null) {
PerformanceRating = dict [constant] as NSNumber; // optional
}
constant = VTVideoEncoderList.QualityRating;
if (constant != null) {
QualityRating = dict [constant] as NSNumber; // optional
}
constant = VTVideoEncoderList.InstanceLimit;
if (constant != null) {
var il = dict [constant] as NSNumber;
InstanceLimit = il?.BoolValue; // optional
}
constant = VTVideoEncoderList.IsHardwareAccelerated;
if (constant != null) {
var ha = dict [constant] as NSNumber;
IsHardwareAccelerated = ha?.BoolValue; // optional
}
// added in xcode 12.2 so the constant won't exists in earlier SDK
constant = VTVideoEncoderList.SupportsFrameReordering;
if (constant != null) {
var sfr = dict [constant] as NSNumber;
SupportsFrameReordering = sfr == null ? true : sfr.BoolValue; // optional, default true
}
}
[Mac (10,13), iOS (11,0), TV (11,0)]

Просмотреть файл

@ -367,7 +367,6 @@ namespace AppKit {
[Export ("initWithAppearanceNamed:bundle:")]
IntPtr Constructor (string name, [NullAllowed] NSBundle bundle);
[Mac (10,9)]
[Export ("name")]
string Name { get; }
@ -392,7 +391,6 @@ namespace AppKit {
[Static, Export ("appearanceNamed:")]
NSAppearance GetAppearance (NSString name);
[Mac (10,9)]
[Field ("NSAppearanceNameAqua")]
NSString NameAqua { get; }
@ -400,7 +398,7 @@ namespace AppKit {
[Field ("NSAppearanceNameDarkAqua")]
NSString NameDarkAqua { get; }
[Availability (Introduced = Platform.Mac_10_9, Deprecated = Platform.Mac_10_10)]
[Availability (Deprecated = Platform.Mac_10_10)]
[Field ("NSAppearanceNameLightContent")]
NSString NameLightContent { get; }
@ -7322,7 +7320,6 @@ namespace AppKit {
[Export ("mergeCellsInHorizontalRange:verticalRange:")]
void MergeCells (NSRange hRange, NSRange vRange);
[Mac (10, 12)]
[Field ("NSGridViewSizeForContent")]
nfloat SizeForContent { get; }
}
@ -14621,7 +14618,7 @@ namespace AppKit {
[Export ("spacing")]
nfloat Spacing { get; set; }
[Availability (Introduced = Platform.Mac_10_9, Deprecated = Platform.Mac_10_11, Message = "Set Distribution to NSStackViewDistribution.EqualSpacing instead.")]
[Availability (Deprecated = Platform.Mac_10_11, Message = "Set Distribution to NSStackViewDistribution.EqualSpacing instead.")]
[Export ("hasEqualSpacing")]
bool HasEqualSpacing { get; set; }
@ -23470,7 +23467,8 @@ namespace AppKit {
interface INSAccessibility {};
interface INSAccessibilityElement {};
[Mac (10,10)]
// 10.9 for fields/notification but 10.10 for protocol
// attributes added to both cases in NSAccessibility.cs
[Protocol]
interface NSAccessibility
{
@ -24285,7 +24283,6 @@ namespace AppKit {
[Field ("NSAccessibilityCreatedNotification")]
NSString CreatedNotification { get; }
[Mac (10, 9)]
[Notification]
[Field ("NSAccessibilityLayoutChangedNotification")]
NSString LayoutChangedNotification { get; }

Просмотреть файл

@ -3892,27 +3892,27 @@ namespace AVFoundation {
[Field ("AVAssetResourceLoadingRequestStreamingContentKeyRequestRequiresPersistentKey")]
NSString StreamingContentKeyRequestRequiresPersistentKey { get; }
[iOS (7,0), Mac (10, 9)]
[iOS (7,0)]
[Export ("isCancelled")]
bool IsCancelled { get; }
[iOS (7,0), Mac (10, 9)]
[iOS (7,0)]
[Export ("contentInformationRequest"), NullAllowed]
AVAssetResourceLoadingContentInformationRequest ContentInformationRequest { get; }
[iOS (7,0), Mac (10, 9)]
[iOS (7,0)]
[Export ("dataRequest"), NullAllowed]
AVAssetResourceLoadingDataRequest DataRequest { get; }
[iOS (7,0), Mac (10, 9)]
[iOS (7,0)]
[Export ("response", ArgumentSemantic.Copy), NullAllowed]
NSUrlResponse Response { get; set; }
[iOS (7,0), Mac (10, 9)]
[iOS (7,0)]
[Export ("redirect", ArgumentSemantic.Copy), NullAllowed]
NSUrlRequest Redirect { get; set; }
[iOS (7,0), Mac (10, 9)]
[iOS (7,0)]
[Export ("finishLoading")]
void FinishLoading ();
@ -6728,7 +6728,7 @@ namespace AVFoundation {
CMTime Time{ get;}
#if !XAMCORE_4_0
[Field ("AVMetadataObjectTypeFace"), Mac (10,10)]
[Field ("AVMetadataObjectTypeFace")]
NSString TypeFace { get; }
[NoTV, iOS (7,0), Mac (10,15)]
@ -7422,22 +7422,20 @@ namespace AVFoundation {
interface AVFragmentedMovieTrack
{
#if !XAMCORE_4_0
[Mac (10, 10), NoiOS, NoWatch]
[NoiOS, NoWatch]
[Field ("AVFragmentedMovieTrackTimeRangeDidChangeNotification")]
NSString ATimeRangeDidChangeNotification { get; }
#endif
[Mac (10, 10)]
[Field ("AVFragmentedMovieTrackTimeRangeDidChangeNotification")]
[Notification]
NSString TimeRangeDidChangeNotification { get; }
[Mac (10, 10)]
[Notification]
[Field ("AVFragmentedMovieTrackSegmentsDidChangeNotification")]
NSString SegmentsDidChangeNotification { get; }
[Mac (10, 10), NoiOS, NoWatch]
[NoiOS, NoWatch]
[Deprecated (PlatformName.MacOSX, 10, 11, message: "Use either 'AVFragmentedMovieTrackTimeRangeDidChangeNotification' or 'AVFragmentedMovieTrackSegmentsDidChangeNotification' instead. In either case, you can assume that the sender's 'TotalSampleDataLength' has changed.")]
[Field ("AVFragmentedMovieTrackTotalSampleDataLengthDidChangeNotification")]
NSString TotalSampleDataLengthDidChangeNotification { get; }
@ -11534,7 +11532,8 @@ namespace AVFoundation {
bool StartsOnFirstEligibleVariant { get; set; }
[iOS (14,1)]
[NoWatch][NoTV][NoMac]
[TV (14,2)][Mac (11,0)]
[NoWatch]
[Export ("appliesPerFrameHDRDisplayMetadata")]
bool AppliesPerFrameHdrDisplayMetadata { get; set; }
}
@ -12413,12 +12412,10 @@ namespace AVFoundation {
[Export ("timebase", ArgumentSemantic.Retain)]
CMTimebase Timebase { get; }
[Mac (10,10)]
[Field ("AVSampleBufferDisplayLayerFailedToDecodeNotification")]
[Notification]
NSString FailedToDecodeNotification { get; }
[Mac (10,10)]
[Field ("AVSampleBufferDisplayLayerFailedToDecodeNotificationErrorKey")]
NSString FailedToDecodeNotificationErrorKey { get; }
@ -12494,15 +12491,15 @@ namespace AVFoundation {
[Field ("AVSpeechSynthesisVoiceIdentifierAlex")]
NSString IdentifierAlex { get; }
[iOS (10, 0), TV (10,0), Mac (10,15)]
[iOS (10, 0), TV (10,0)]
[Field ("AVSpeechSynthesisIPANotationAttribute")]
NSString IpaNotationAttribute { get; }
[Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)]
[Watch (6,0), TV (13,0), iOS (13,0)]
[Export ("gender")]
AVSpeechSynthesisVoiceGender Gender { get; }
[Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)]
[Watch (6,0), TV (13,0), iOS (13,0)]
[Export ("audioFileSettings")]
NSDictionary<NSString, NSObject> AudioFileSettings { get; }
}
@ -13723,7 +13720,8 @@ namespace AVFoundation {
[Field ("AVSemanticSegmentationMatteTypeTeeth")]
Teeth,
[iOS (14,1)]
[NoWatch][NoTV][NoMac]
[Mac (11,0)]
[NoWatch][NoTV]
[Field ("AVSemanticSegmentationMatteTypeGlasses")]
Glasses,
}

Просмотреть файл

@ -105,6 +105,11 @@ namespace AVKit {
[NoWatch, NoMac, NoiOS]
[Export ("canStopPictureInPicture")]
bool CanStopPictureInPicture { get; }
[iOS (14,2)]
[NoWatch, NoTV, NoMac]
[Export ("canStartPictureInPictureAutomaticallyFromInline")]
bool CanStartPictureInPictureAutomaticallyFromInline { get; set; }
}
interface IAVPictureInPictureControllerDelegate {}
@ -260,6 +265,11 @@ namespace AVKit {
[iOS (14, 0), NoTV]
[Export ("showsTimecodes")]
bool ShowsTimecodes { get; set; }
[iOS (14,2)]
[NoWatch, NoTV]
[Export ("canStartPictureInPictureAutomaticallyFromInline")]
bool CanStartPictureInPictureAutomaticallyFromInline { get; set; }
}
[NoMac]
@ -444,32 +454,26 @@ namespace AVKit {
[Export ("updatesNowPlayingInfoCenter")]
bool UpdatesNowPlayingInfoCenter { get; set; }
[Mac (10,9)]
[NullAllowed]
[Export ("actionPopUpButtonMenu")]
NSMenu ActionPopUpButtonMenu { get; set; }
[Mac (10,9)] // No async
// No async
[Export ("beginTrimmingWithCompletionHandler:")]
void BeginTrimming ([NullAllowed] Action<AVPlayerViewTrimResult> handler);
[Mac (10,9)]
[Export ("canBeginTrimming")]
bool CanBeginTrimming { get; }
[Mac (10,9)]
[Export ("flashChapterNumber:chapterTitle:")]
void FlashChapter (nuint chapterNumber, [NullAllowed] string chapterTitle);
[Mac (10,9)]
[Export ("showsFrameSteppingButtons")]
bool ShowsFrameSteppingButtons { get; set; }
[Mac (10,9)]
[Export ("showsFullScreenToggleButton")]
bool ShowsFullScreenToggleButton { get; set; }
[Mac (10,9)]
[Export ("showsSharingServiceButton")]
bool ShowsSharingServiceButton { get; set; }

Просмотреть файл

@ -542,11 +542,12 @@ namespace CarPlay {
[Export ("initWithTitle:sections:")]
IntPtr Constructor ([NullAllowed] string title, CPListSection[] sections);
[Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CPListItem.Handler' instead.")]
[Wrap ("WeakDelegate")]
[NullAllowed]
ICPListTemplateDelegate Delegate { get; set; }
[Deprecated (PlatformName.iOS, 14, 0)]
[Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CPListItem.Handler' instead.")]
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }
@ -593,6 +594,7 @@ namespace CarPlay {
interface ICPListTemplateDelegate { }
[Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CPListItem.Handler' instead.")]
[NoWatch, NoTV, NoMac, iOS (12,0)]
[Protocol, Model (AutoGeneratedName = true)]
[BaseType (typeof (NSObject))]
@ -1133,11 +1135,9 @@ namespace CarPlay {
[Export ("carWindow", ArgumentSemantic.Strong)]
CPWindow CarWindow { get; }
#if !XAMCORE_4_0
[Field ("CPTemplateApplicationSceneSessionRoleApplication")]
[Advice ("Use 'UIWindowSceneSessionRole.CarTemplateApplication' instead.")]
NSString SessionRoleApplication { get; }
#endif
}
[NoWatch, NoTV, NoMac, iOS (12,0)]
@ -1773,10 +1773,6 @@ namespace CarPlay {
string PhoneOrEmail { get; }
}
[NoWatch, NoTV, NoMac, iOS (14,0)]
[BaseType (typeof (NSObject))]
interface CPEntity : NSSecureCoding {}
[NoWatch, NoTV, NoMac, iOS (14,0)]
[BaseType (typeof (CPNowPlayingButton))]
interface CPNowPlayingShuffleButton {}

Просмотреть файл

@ -273,37 +273,37 @@ namespace ClassKit {
void ResignActive ();
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch, NoTV, Mac (11,0), iOS (14, 0)]
[iOS (14, 0)]
[Export ("assignable")]
bool Assignable { [Bind ("isAssignable")] get; set; }
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch, NoTV, Mac (11,0), iOS (14, 0)]
[iOS (14, 0)]
[Export ("suggestedAge", ArgumentSemantic.Assign)]
NSRange SuggestedAge { get; set; }
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch, NoTV, Mac (11,0), iOS (14, 0)]
[iOS (14, 0)]
[Export ("suggestedCompletionTime", ArgumentSemantic.Assign)]
NSRange SuggestedCompletionTime { get; set; }
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch, NoTV, Mac (11,0), iOS (14, 0)]
[iOS (14, 0)]
[Export ("progressReportingCapabilities", ArgumentSemantic.Copy)]
NSSet<CLSProgressReportingCapability> ProgressReportingCapabilities { get; }
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch, NoTV, Mac (11,0), iOS (14, 0)]
[iOS (14, 0)]
[Export ("setType:")]
void SetType (CLSContextType type);
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch, NoTV, Mac (11,0), iOS (14, 0)]
[iOS (14, 0)]
[Export ("addProgressReportingCapabilities:")]
void AddProgressReportingCapabilities (NSSet<CLSProgressReportingCapability> capabilities);
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch, NoTV, Mac (11,0), iOS (14, 0)]
[iOS (14, 0)]
[Export ("resetProgressReportingCapabilities")]
void ResetProgressReportingCapabilities ();

Просмотреть файл

@ -445,7 +445,7 @@ namespace CoreBluetooth {
[Override]
CBDescriptor [] Descriptors { get; set; }
[iOS (7,0), Export ("subscribedCentrals"), Mac (10,9)]
[iOS (7,0), Export ("subscribedCentrals")]
CBCentral [] SubscribedCentrals { get; }
}
@ -835,7 +835,6 @@ namespace CoreBluetooth {
[BaseType (typeof (CBManager), Delegates=new[] { "WeakDelegate" }, Events=new[] { typeof (CBPeripheralManagerDelegate) })]
interface CBPeripheralManager {
[Mac (10,9)]
[Export ("init")]
IntPtr Constructor ();
@ -848,7 +847,7 @@ namespace CoreBluetooth {
[NoTV]
[NoWatch]
[DesignatedInitializer]
[iOS (7,0),Mac (10,9)]
[iOS (7,0)]
[Export ("initWithDelegate:queue:options:")]
[PostGet ("WeakDelegate")]
IntPtr Constructor ([Protocolize] CBPeripheralManagerDelegate peripheralDelegate, [NullAllowed] DispatchQueue queue, [NullAllowed] NSDictionary options);
@ -1000,19 +999,16 @@ namespace CoreBluetooth {
[Watch (4,0)][iOS (11,0)][TV (11,0)][Mac (10,13)]
[BaseType (typeof (NSObject), Name = "CBL2CAPChannel")]
interface CBL2CapChannel {
[Mac (10,13)]
[Export ("peer")]
CBPeer Peer { get; }
[Mac (10,13)]
[Export ("inputStream")]
NSInputStream InputStream { get; }
[Mac (10,13)]
[Export ("outputStream")]
NSOutputStream OutputStream { get; }
[Mac (10,13)]
[Export ("PSM")]
/* uint16_t */ ushort Psm { get; }
}

Просмотреть файл

@ -208,7 +208,7 @@ namespace CoreGraphics {
[Field ("kCGColorSpaceExtendedLinearITUR_2020")]
NSString ExtendedLinearItur_2020 { get; }
[iOS (14,1)][NoTV][NoWatch][NoMac]
[iOS (14,1), Mac (11,0), TV (14,2), Watch (7,1)]
[Field ("kCGColorSpaceExtendedITUR_2020")]
NSString ExtendedItur_2020 { get; }
@ -217,7 +217,7 @@ namespace CoreGraphics {
[Field ("kCGColorSpaceExtendedLinearDisplayP3")]
NSString ExtendedLinearDisplayP3 { get; }
[iOS (14,1)][NoTV][NoWatch][NoMac]
[iOS (14,1), Mac (11,0), TV (14,2), Watch (7,1)]
[Field ("kCGColorSpaceExtendedDisplayP3")]
NSString ExtendedDisplayP3 { get; }

Просмотреть файл

@ -507,8 +507,7 @@ namespace CoreImage {
[return: NullAllowed]
CIFilter GetDepthBlurEffectFilter (CIImage image, CIImage disparityImage, [NullAllowed] CIImage portraitEffectsMatte, [NullAllowed] CIImage hairSemanticSegmentation, CGImagePropertyOrientation orientation, [NullAllowed] NSDictionary options);
[iOS (14,1)]
[NoTV][NoMac]
[iOS (14,1)][TV (14,2)][Mac (11,0)]
[Export ("depthBlurEffectFilterForImage:disparityImage:portraitEffectsMatte:hairSemanticSegmentation:glassesMatte:gainMap:orientation:options:")]
[return: NullAllowed]
CIFilter GetDepthBlurEffectFilter (CIImage image, CIImage disparityImage, [NullAllowed] CIImage portraitEffectsMatte, [NullAllowed] CIImage hairSemanticSegmentation, [NullAllowed] CIImage glassesMatte, [NullAllowed] CIImage gainMap, CGImagePropertyOrientation orientation, [NullAllowed] NSDictionary options);
@ -1334,12 +1333,10 @@ namespace CoreImage {
[iOS (13,0)][TV (13,0)][Mac (10,15)]
bool AuxiliarySemanticSegmentationTeethMatte { get; set; }
[iOS (14,1)]
[NoTV][NoMac]
[iOS (14,1)][TV (14,2)][Mac (11,0)]
bool AuxiliarySemanticSegmentationGlassesMatte { get; set; }
[iOS (14,1)]
[NoTV][NoMac]
[iOS (14,1)][TV (14,2)][Mac (11,0)]
bool ToneMapHdrToSdr { get; set; }
}
@ -1384,13 +1381,11 @@ namespace CoreImage {
[Field ("kCIImageAuxiliarySemanticSegmentationTeethMatte")]
NSString AuxiliarySemanticSegmentationTeethMatteKey { get; }
[iOS (14, 1)]
[NoTV][NoMac]
[iOS (14,1)][TV (14,2)][Mac (11,0)]
[Field ("kCIImageAuxiliarySemanticSegmentationGlassesMatte")]
NSString AuxiliarySemanticSegmentationGlassesMatteKey { get; }
[iOS (14,1)]
[NoTV][NoMac]
[iOS (14,1)][TV (14,2)][Mac (11,0)]
[Field ("kCIImageToneMapHDRtoSDR")]
NSString ToneMapHdrToSdrKey { get; }
@ -5191,13 +5186,11 @@ namespace CoreImage {
[CoreImageFilterProperty ("inputAuxDataMetadata")]
CGImageMetadata AuxDataMetadata { get; set; }
[iOS (14,1)]
[NoTV][NoMac]
[iOS (14,1)][TV (14,2)][Mac (11,0)]
[CoreImageFilterProperty ("inputGainMap")]
CIImage GainMap { get; set; }
[iOS (14,1)]
[NoTV][NoMac]
[iOS (14,1)][TV (14,2)][Mac (11,0)]
[CoreImageFilterProperty ("inputGlassesImage")]
CIImage GlassesImage { get; set; }
}
@ -5753,8 +5746,7 @@ namespace CoreImage {
[Field ("kCIImageRepresentationSemanticSegmentationTeethMatteImage")]
NSString SemanticSegmentationTeethMatteImageKey { get; }
[iOS (14,1)]
[NoTV][NoMac]
[iOS (14,1)][TV (14,2)][Mac (11,0)]
[Field ("kCIImageRepresentationSemanticSegmentationGlassesMatteImage")]
NSString SemanticSegmentationGlassesMatteImage { get; }
}

Просмотреть файл

@ -375,7 +375,7 @@ namespace CoreMidi {
[Mac (11, 0), iOS (14, 0)]
[BaseType (typeof (NSObject), Name="MIDICIDiscoveredNode")]
[DisableDefaultCtor]
interface MidiCIDiscoveredNode
interface MidiCIDiscoveredNode : NSSecureCoding
{
[Internal]
[Export ("destination")]

Просмотреть файл

@ -1011,36 +1011,36 @@ namespace CoreSpotlight {
// CSSearchableItemAttributeSet_CSGeneral
[iOS (11,0), NoTV, Mac (10, 11)]
[iOS (11,0), NoTV]
[NullAllowed, Export ("userCreated", ArgumentSemantic.Strong)]
[Internal] // We would like to use [BindAs (typeof (bool?))]
NSNumber _IsUserCreated { [Bind ("isUserCreated")] get; set; }
[iOS (11, 0), NoTV, Mac (10, 11)]
[iOS (11, 0), NoTV]
[NullAllowed, Export ("userOwned", ArgumentSemantic.Strong)]
[Internal] // We would like to use[BindAs (typeof (bool?))]
NSNumber _IsUserOwned { [Bind ("isUserOwned")] get; set; }
[iOS (11, 0), NoTV, Mac (10, 11)]
[iOS (11, 0), NoTV]
[NullAllowed, Export ("userCurated", ArgumentSemantic.Strong)]
[Internal] // We would like to use [BindAs (typeof (bool?))]
NSNumber _IsUserCurated { [Bind ("isUserCurated")] get; set; }
[iOS (11, 0), NoTV, Mac (10, 11)]
[iOS (11, 0), NoTV]
[NullAllowed, Export ("rankingHint", ArgumentSemantic.Strong)]
NSNumber RankingHint { get; set; }
// CSSearchableItemAttributeSet_CSItemProvider
[iOS (11, 0), NoTV, Mac (10, 11)]
[iOS (11, 0), NoTV]
[NullAllowed, Export ("providerDataTypeIdentifiers", ArgumentSemantic.Copy)]
string[] ProviderDataTypeIdentifiers { get; set; }
[iOS (11, 0), NoTV, Mac (10, 11)]
[iOS (11, 0), NoTV]
[NullAllowed, Export ("providerFileTypeIdentifiers", ArgumentSemantic.Copy)]
string[] ProviderFileTypeIdentifiers { get; set; }
[iOS (11, 0), NoTV, Mac (10, 11)]
[iOS (11, 0), NoTV]
[NullAllowed, Export ("providerInPlaceFileTypeIdentifiers", ArgumentSemantic.Copy)]
string[] ProviderInPlaceFileTypeIdentifiers { get; set; }
}

Просмотреть файл

@ -110,6 +110,7 @@ namespace ExternalAccessory {
NSString BluetoothAccessoryPickerErrorDomain { get; }
#endif
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoMac]
[Export ("showBluetoothAccessoryPickerWithNameFilter:completion:")]
[Async]

Просмотреть файл

@ -242,9 +242,18 @@ namespace FileProvider {
Renaming = 1 << 3,
Trashing = 1 << 4,
Deleting = 1 << 5,
[NoiOS][NoTV][NoWatch]
Evicting = 1 << 6,
AddingSubItems = Writing,
ContentEnumerating = Reading,
#if !XAMCORE_4_0
[Obsolete ("This enum value is not constant across OS and versions.")]
#if MONOMAC
All = Reading | Writing | Reparenting | Renaming | Trashing | Deleting | Evicting,
#else
All = Reading | Writing | Reparenting | Renaming | Trashing | Deleting,
#endif
#endif
}
[iOS (11,0)]
@ -277,15 +286,21 @@ namespace FileProvider {
[BaseType (typeof (NSObject))]
interface NSFileProviderDomain {
[NoMac]
[Export ("initWithIdentifier:displayName:pathRelativeToDocumentStorage:")]
IntPtr Constructor (string identifier, string displayName, string pathRelativeToDocumentStorage);
[NoiOS]
[Export ("initWithIdentifier:displayName:")]
IntPtr Constructor (string identifier, string displayName);
[Export ("identifier")]
string Identifier { get; }
[Export ("displayName")]
string DisplayName { get; }
[NoMac]
[Export ("pathRelativeToDocumentStorage")]
string PathRelativeToDocumentStorage { get; }
@ -447,6 +462,7 @@ namespace FileProvider {
[Export ("tagData", ArgumentSemantic.Copy)]
NSData GetTagData ();
[NoMac]
[return: NullAllowed]
[Export ("favoriteRank", ArgumentSemantic.Copy)]
NSNumber GetFavoriteRank ();
@ -505,10 +521,6 @@ namespace FileProvider {
[Export ("userInfo")]
NSDictionary GetUserInfo ();
[NoiOS]
[Export ("excludedFromSync")]
bool ExcludedFromSync { [Bind ("isExcludedFromSync")] get; }
[NoiOS]
[Export ("fileSystemFlags")]
NSFileProviderFileSystemFlags FileSystemFlags { get; }
@ -533,6 +545,7 @@ namespace FileProvider {
[DisableDefaultCtor]
interface NSFileProviderManager {
[NoMac]
[Static]
[Export ("defaultManager", ArgumentSemantic.Strong)]
NSFileProviderManager DefaultManager { get; }
@ -545,16 +558,20 @@ namespace FileProvider {
[Export ("registerURLSessionTask:forItemWithIdentifier:completionHandler:")]
void Register (NSUrlSessionTask task, string identifier, Action<NSError> completion);
[NoMac]
[Export ("providerIdentifier")]
string ProviderIdentifier { get; }
[NoMac]
[Export ("documentStorageURL")]
NSUrl DocumentStorageUrl { get; }
[NoMac]
[Static]
[Export ("writePlaceholderAtURL:withMetadata:error:")]
bool WritePlaceholder (NSUrl placeholderUrl, INSFileProviderItem metadata, out NSError error);
[NoMac]
[Static]
[Export ("placeholderURLForURL:")]
NSUrl GetPlaceholderUrl (NSUrl url);
@ -643,13 +660,6 @@ namespace FileProvider {
void Reconnect (Action<NSError> completionHandler);
#endregion
#region Attribution (NSFileProviderManager)
[NoiOS]
[Async]
[Export ("lookupRequestingApplicationIdentifier:reason:completionHandler:")]
void LookupRequestingApplicationIdentifier (NSUuid app, string reason, Action<NSUrl, NSError> completionHandler);
#endregion
#region Barrier (NSFileProviderManager)
[NoiOS]
[Async]
@ -774,9 +784,6 @@ namespace FileProvider {
[BaseType (typeof (NSObject))]
interface NSFileProviderRequest {
[Export ("requestingApplicationIdentifier", ArgumentSemantic.Strong)]
NSUuid RequestingApplicationIdentifier { get; }
[Export ("isSystemRequest")]
bool IsSystemRequest { get; }

Просмотреть файл

@ -6264,7 +6264,7 @@ namespace Foundation
[Field ("NSURLIsApplicationKey")]
NSString IsApplicationKey { get; }
[iOS (9,0)][NoMac]
[iOS (9,0), Mac(11,0)]
[Field ("NSURLFileProtectionKey")]
NSString FileProtectionKey { get; }
@ -7346,6 +7346,7 @@ namespace Foundation
[Export ("discretionary")]
bool Discretionary { [Bind ("isDiscretionary")] get; set; }
[Mac (11,0)]
[Export ("sessionSendsLaunchEvents")]
bool SessionSendsLaunchEvents { get; set; }
@ -7457,6 +7458,7 @@ namespace Foundation
[Export ("URLSession:didReceiveChallenge:completionHandler:")]
void DidReceiveChallenge (NSUrlSession session, NSUrlAuthenticationChallenge challenge, Action<NSUrlSessionAuthChallengeDisposition,NSUrlCredential> completionHandler);
[Mac (11,0)]
[Export ("URLSessionDidFinishEventsForBackgroundURLSession:")]
void DidFinishEventsForBackgroundSession (NSUrlSession session);
}
@ -10069,15 +10071,12 @@ namespace Foundation
NSString ErrorDomain { get; }
#if MONOMAC
[Mac (10,10)]
[Export ("sourceFrame")]
CGRect SourceFrame { get; }
[Mac (10,10)]
[Export ("containerFrame")]
CGRect ContainerFrame { get; }
[Mac (10,10)]
[Export ("preferredPresentationSize")]
CGSize PreferredPresentationSize { get; }

Просмотреть файл

@ -302,6 +302,7 @@ CALLKIT_SOURCES = \
# CarPlay
CARPLAY_SOURCES = \
CarPlay/CPCompat.cs \
CarPlay/CPNavigationAlert.cs \
CarPlay/CPMessageListItem.cs \
@ -1123,6 +1124,7 @@ METALPERFORMANCESHADERS_SOURCES = \
METRICKIT_SOURCES = \
MetricKit/MXMetaData.cs \
MetricKit/MXMetric.cs \
MetricKit/MXMetricManager.cs \
MetricKit/MXMetricPayload.cs \
# MLCompute
@ -1183,6 +1185,7 @@ NETWORK_SOURCES = \
Network/NWBrowseResult.cs \
Network/NWBrowser.cs \
Network/NWConnection.cs \
Network/NWConnectionGroup.cs \
Network/NWContentContext.cs \
Network/NWDataTransferReport.cs \
Network/NWEthernetChannel.cs \
@ -1191,6 +1194,7 @@ NETWORK_SOURCES = \
Network/NWError.cs \
Network/NWFramer.cs \
Network/NWFramerMessage.cs \
Network/NWMulticastGroup.cs \
Network/NWInterface.cs \
Network/NWIPMetadata.cs \
Network/NWListener.cs \
@ -1353,17 +1357,8 @@ PRINTCORE_SOURCES = \
# QTKit
QTKIT_CORE_SOURCES = \
QTKit/Defs.cs \
QTKit/Enums.cs \
QTKIT_SOURCES = \
QTKit/QTCaptureConnection.cs \
QTKit/QTCaptureDevice.cs \
QTKit/QTCompressionOptions.cs \
QTKit/QTFormatDescription.cs \
QTKit/QTMedia.cs \
QTKit/QTMovie.cs \
QTKit/QTCompat.cs \
# QuickLook
@ -1921,6 +1916,7 @@ MAC_FRAMEWORKS = \
NetworkExtension \
NotificationCenter \
OpenGL \
OSLog \
PassKit \
PdfKit \
PencilKit \

Просмотреть файл

@ -50,11 +50,11 @@ namespace GameController {
[NullAllowed, Export ("localizedName", ArgumentSemantic.Strong)]
string LocalizedName { get; set; }
[NoTV, NoMac, iOS (14, 0)]
[TV (14, 2), Mac (11, 0), iOS (14, 0)]
[NullAllowed, Export ("unmappedSfSymbolsName", ArgumentSemantic.Strong)]
string UnmappedSfSymbolsName { get; set; }
[NoTV, NoMac, iOS (14, 0)]
[TV (14, 2), Mac (11, 0), iOS (14, 0)]
[NullAllowed, Export ("unmappedLocalizedName", ArgumentSemantic.Strong)]
string UnmappedLocalizedName { get; set; }

Просмотреть файл

@ -2124,6 +2124,9 @@ namespace GameKit {
GKAchievement Achievement { get; }
}
#if XAMCORE_4_0
[DisableDefaultCtor] // the native 'init' method returned nil.
#endif
[NoWatch]
[Mac (10,9)]
[BaseType (
@ -2326,7 +2329,7 @@ namespace GameKit {
[Export ("data")]
NSData Data { get; }
[iOS (8,0)][Mac (10,10)]
[iOS (8,0)]
[Export ("replyDate")]
NSDate ReplyDate { get; }
}

Просмотреть файл

@ -5786,7 +5786,7 @@ public partial class Generator : IMemberGatherer {
}
PrintXpcInterfaceAttribute (type);
print ("{0} interface I{1} : INativeObject, IDisposable{2}", class_visibility, TypeName, ifaces.Count () > 0 ? ", " : string.Empty);
print ("{0} partial interface I{1} : INativeObject, IDisposable{2}", class_visibility, TypeName, ifaces.Count () > 0 ? ", " : string.Empty);
indent++;
sb.Clear ();
foreach (var iface in ifaces) {

Просмотреть файл

@ -85,6 +85,12 @@ namespace HealthKit {
AppleMoveTime = 2,
}
[Watch (7,1), iOS (14,2)]
[Native]
public enum HKCategoryValueHeadphoneAudioExposureEvent : long {
SevenDayLimit = 1,
}
delegate void HKAnchoredObjectResultHandler2 (HKAnchoredObjectQuery query, HKSample[] results, nuint newAnchor, NSError error);
[Obsolete ("Use HKAnchoredObjectResultHandler2 instead")]
@ -924,6 +930,10 @@ namespace HealthKit {
[Field ("HKMetadataKeyAudioExposureLevel")]
NSString AudioExposureLevel { get; }
[Watch (7, 1), iOS (14, 2)]
[Field ("HKMetadataKeyAudioExposureDuration")]
NSString AudioExposureDuration { get; }
[Watch (7, 0), iOS (14, 0)]
[Field ("HKMetadataKeyDevicePlacementSide")]
NSString DevicePlacementSide { get; }
@ -2122,6 +2132,10 @@ namespace HealthKit {
[Watch (7, 0), iOS (14, 0)]
[Field ("HKCategoryTypeIdentifierHandwashingEvent")]
HandwashingEvent,
[Watch (7, 1), iOS (14, 2)]
[Field ("HKCategoryTypeIdentifierHeadphoneAudioExposureEvent")]
HeadphoneAudioExposureEvent,
}
[Watch (2,0)]

Просмотреть файл

@ -71,8 +71,7 @@ namespace ImageIO {
[Field ("kCGImagePropertyWebPDictionary")]
NSString WebPDictionary { get; }
[iOS (14,1)]
[NoTV][NoWatch][NoMac]
[Mac (11,0), iOS (14,1), TV (14,2), Watch (7,1)]
[Field ("kCGImagePropertyTGADictionary")]
NSString TgaDictionary { get; }
@ -2036,10 +2035,7 @@ namespace ImageIO {
[Field ("kCGImagePropertyWebPCanvasPixelHeight")]
NSString WebPCanvasPixelHeight { get; }
// TGA Dictionary Keys
[iOS (14,1)]
[NoTV][NoWatch][NoMac]
[Mac (11,0), iOS (14,1), TV (14,2), Watch (7,1)]
[Field ("kCGImagePropertyTGACompression")]
NSString TgaCompression { get; }
}
@ -2217,13 +2213,12 @@ namespace ImageIO {
[Export ("WebPDictionary")]
NSDictionary WebPDictionary { get; set; }
[iOS (14,1)]
[NoTV][NoWatch][NoMac]
[Mac (11,0), iOS (14,1), TV (14,2), Watch (7,1)]
[Export ("TgaDictionary")]
NSDictionary TgaDictionary { get; set; }
[iOS (14,1)]
[NoTV][NoWatch][NoMac]
[TV (14,2)][Watch (7,1)][Mac (11,0)]
bool PreserveGainMap { get; set; }
}
@ -2302,13 +2297,12 @@ namespace ImageIO {
[Static][Wrap ("CGImageProperties.WebPDictionary")]
NSString WebPDictionary { get; }
[iOS (14,1)]
[NoTV][NoWatch][NoMac]
[Mac (11,0), iOS (14,1), TV (14,2), Watch (7,1)]
[Static][Wrap ("CGImageProperties.TgaDictionary")]
NSString TgaDictionary { get; }
[iOS (14,1)]
[NoTV][NoWatch][NoMac]
[TV (14,2)][Watch (7,1)][Mac (11,0)]
[Field ("kCGImageDestinationPreserveGainMap")]
NSString PreserveGainMapKey { get; }
}
@ -2366,12 +2360,12 @@ namespace ImageIO {
SemanticSegmentationTeethMatte,
[iOS (14,1)]
[NoTV][NoWatch][NoMac]
[TV (14,2)][Watch (7,1)][Mac (11,0)]
[Field ("kCGImageAuxiliaryDataTypeSemanticSegmentationGlassesMatte")]
SemanticSegmentationGlassesMatte,
[iOS (14,1)]
[NoTV][NoWatch][NoMac]
[TV (14,2)][Watch (7,1)][Mac (11,0)]
[Field ("kCGImageAuxiliaryDataTypeHDRGainMap")]
TypeHdrGainMap,
}

Просмотреть файл

@ -444,7 +444,7 @@ namespace Intents {
[Mac (11,0), NoTV]
[Native]
public enum INPersonSuggestionType : long {
[iOS (12,0), Mac (10,14), Watch (5,0)]
[iOS (12,0), Watch (5,0)]
None = 0,
SocialProfile = 1,
InstantMessageAddress,

Просмотреть файл

@ -30,7 +30,7 @@ namespace LocalAuthentication {
string LocalizedFallbackTitle { get; set; }
#if !XAMCORE_4_0
[iOS (8,3), Mac (10,10)]
[iOS (8,3)]
[Field ("LAErrorDomain")]
NSString ErrorDomain { get; }
#endif

Просмотреть файл

@ -619,7 +619,7 @@ namespace MapKit {
// void _HandleSelectionAtPoint (CGPoint locationInView);
[NoTV]
[Mac(10,9), iOS(9,0)]
[iOS(9,0)]
[Export ("showsCompass")]
bool ShowsCompass { get; set; }

Просмотреть файл

@ -1755,7 +1755,7 @@ namespace MediaPlayer {
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface MPRemoteCommandCenter {
[Mac (10,12,2)]
[Static]
[Export ("sharedCommandCenter")]
MPRemoteCommandCenter Shared { get; }

Просмотреть файл

@ -2061,7 +2061,7 @@ namespace Metal {
MTLPixelFormat StencilAttachmentPixelFormat { get; set; }
[iOS (12,0)]
[NoTV, NoWatch, Mac (10,11)]
[NoTV, NoWatch]
[Export ("inputPrimitiveTopology", ArgumentSemantic.Assign)]
MTLPrimitiveTopologyClass InputPrimitiveTopology { get; set; }
@ -2532,7 +2532,7 @@ namespace Metal {
[Export ("fastMathEnabled")]
bool FastMathEnabled { get; set; }
[iOS (9,0)][Mac (10,11)]
[iOS (9,0)]
[Export ("languageVersion", ArgumentSemantic.Assign)]
MTLLanguageVersion LanguageVersion { get; set; }
@ -3365,7 +3365,6 @@ namespace Metal {
MTLRenderPassDescriptor CreateRenderPassDescriptor ();
[iOS (12,0)]
[Mac (10,11)]
[NoTV]
[Export ("renderTargetArrayLength")]
nuint RenderTargetArrayLength { get; set; }
@ -4121,7 +4120,7 @@ namespace Metal {
[Export ("reset")]
void Reset ();
[Mac (11, 0), iOS (14,0)]
[iOS (14,0)]
[NullAllowed, Export ("binaryArchives", ArgumentSemantic.Copy)]
IMTLBinaryArchive[] BinaryArchives { get; set; }
}
@ -4192,7 +4191,7 @@ namespace Metal {
#if XAMCORE_4_0
[Abstract]
#endif
[iOS (13,0), TV (13,0), Mac (10,14)]
[iOS (13,0), TV (13,0)]
[Export ("setRenderPipelineState:")]
void SetRenderPipelineState (IMTLRenderPipelineState pipelineState);
@ -4588,20 +4587,16 @@ namespace Metal {
[BaseType (typeof (NSObject))]
interface MTLCounterSampleBufferDescriptor : NSCopying
{
[Mac (10, 15)]
[NullAllowed]
[Export ("counterSet", ArgumentSemantic.Retain)]
IMTLCounterSet CounterSet { get; set; }
[Mac (10, 15)]
[Export ("label")]
string Label { get; set; }
[Mac (10, 15)]
[Export ("storageMode", ArgumentSemantic.Assign)]
MTLStorageMode StorageMode { get; set; }
[Mac (10, 15)]
[Export ("sampleCount")]
nuint SampleCount { get; set; }
}

Просмотреть файл

@ -51,7 +51,7 @@ namespace MetalPerformanceShaders {
IntPtr Constructor (IMTLDevice device);
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -61,7 +61,7 @@ namespace MetalPerformanceShaders {
[BaseType (typeof (MPSUnaryImageKernel))]
[DisableDefaultCtor]
interface MPSImageBox {
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -95,7 +95,7 @@ namespace MetalPerformanceShaders {
[BaseType (typeof (MPSUnaryImageKernel))]
[DisableDefaultCtor]
interface MPSImageGaussianBlur {
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -115,7 +115,7 @@ namespace MetalPerformanceShaders {
[DisableDefaultCtor]
interface MPSImageSobel {
// inlining .ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -136,7 +136,7 @@ namespace MetalPerformanceShaders {
[BaseType (typeof (MPSUnaryImageKernel))]
[DisableDefaultCtor]
interface MPSImagePyramid {
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -170,7 +170,7 @@ namespace MetalPerformanceShaders {
IntPtr InitWithDevice (IMTLDevice device, nuint kernelWidth, nuint kernelHeight, /* float* */ IntPtr kernelWeights);
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -279,7 +279,7 @@ namespace MetalPerformanceShaders {
IntPtr Constructor (IMTLDevice device);
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -295,7 +295,7 @@ namespace MetalPerformanceShaders {
IntPtr Constructor (IMTLDevice device);
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -336,7 +336,7 @@ namespace MetalPerformanceShaders {
[DesignatedInitializer]
IntPtr Constructor (IMTLDevice device);
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -346,7 +346,7 @@ namespace MetalPerformanceShaders {
[BaseType (typeof (MPSKernel))]
[DisableDefaultCtor]
interface MPSBinaryImageKernel {
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -417,7 +417,7 @@ namespace MetalPerformanceShaders {
[Export ("minKernelDiameter")]
nuint MinKernelDiameter { get; }
[TV (11, 0), Mac (10, 13), iOS (11, 0)]
[TV (11, 0), iOS (11, 0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -439,7 +439,7 @@ namespace MetalPerformanceShaders {
[DesignatedInitializer]
IntPtr Constructor (IMTLDevice device, nuint kernelWidth, nuint kernelHeight);
[TV (11, 0), Mac (10, 13), iOS (11, 0)]
[TV (11, 0), iOS (11, 0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -489,7 +489,7 @@ namespace MetalPerformanceShaders {
// inlining ctor from base class -> done in manual bindings (wrt float* argument)
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -508,7 +508,7 @@ namespace MetalPerformanceShaders {
IntPtr Constructor (IMTLDevice device);
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -537,7 +537,7 @@ namespace MetalPerformanceShaders {
IntPtr _Transform { get; }
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -564,7 +564,7 @@ namespace MetalPerformanceShaders {
IntPtr _Transform { get; }
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -588,7 +588,7 @@ namespace MetalPerformanceShaders {
IntPtr _Transform { get; }
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -612,7 +612,7 @@ namespace MetalPerformanceShaders {
IntPtr _Transform { get; }
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -636,7 +636,7 @@ namespace MetalPerformanceShaders {
IntPtr _Transform { get; }
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -684,7 +684,7 @@ namespace MetalPerformanceShaders {
IntPtr Constructor (IMTLDevice device);
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -807,7 +807,7 @@ namespace MetalPerformanceShaders {
[Export ("appendBatchBarrier")]
bool AppendBatchBarrier { get; }
[TV (11,0), Mac (10,13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("destinationImageDescriptorForSourceImages:sourceStates:")]
MPSImageDescriptor GetDestinationImageDescriptor (NSArray<MPSImage> sourceImages, [NullAllowed] NSArray<MPSState> sourceStates);
@ -847,7 +847,7 @@ namespace MetalPerformanceShaders {
IntPtr Constructor (IMTLDevice device);
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[DesignatedInitializer]
[Export ("initWithCoder:device:")]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -868,7 +868,7 @@ namespace MetalPerformanceShaders {
[Export ("c")]
float C { get; }
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[NullAllowed, Export ("data", ArgumentSemantic.Retain)]
NSData Data { get; }
@ -1245,12 +1245,12 @@ namespace MetalPerformanceShaders {
// [Export ("initWithDevice:")] marked as NS_UNAVAILABLE - Use initWithDevice:convolutionDescriptor:kernelWeights:biasTerms instead
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
[TV (11, 0), Mac (10, 13), iOS (11, 0)]
[TV (11, 0), iOS (11, 0)]
[Export ("initWithDevice:weights:")]
[DesignatedInitializer]
IntPtr Constructor (IMTLDevice device, IMPSCnnConvolutionDataSource weights);
@ -1286,7 +1286,7 @@ namespace MetalPerformanceShaders {
// [Export ("initWithDevice:")] marked as NS_UNAVAILABLE - Use initWithDevice:kernelWidth:kernelHeight:strideInPixelsX:strideInPixelsY: instead
[TV (11, 0), Mac (10, 13), iOS (11, 0)]
[TV (11, 0), iOS (11, 0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -1874,7 +1874,7 @@ namespace MetalPerformanceShaders {
IntPtr InitWithDevice (IMTLDevice device, MPSAlphaType srcAlpha, MPSAlphaType destAlpha, [NullAllowed] /* nfloat* */ IntPtr backgroundColor, [NullAllowed] CGColorConversionInfo conversionInfo);
// inlining ctor from base class
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithCoder:device:")]
[DesignatedInitializer]
IntPtr Constructor (NSCoder aDecoder, IMTLDevice device);
@ -2011,7 +2011,7 @@ namespace MetalPerformanceShaders {
[BaseType (typeof (MPSKernel))]
[DisableDefaultCtor]
interface MPSMatrixMultiplication {
[TV (11,0), Mac (10, 13), iOS (11,0)]
[TV (11,0), iOS (11,0)]
[Export ("initWithDevice:resultRows:resultColumns:interiorColumns:")]
IntPtr Constructor (IMTLDevice device, nuint resultRows, nuint resultColumns, nuint interiorColumns);

Просмотреть файл

@ -405,6 +405,11 @@ namespace MetricKit {
[iOS (14,0)]
[Export ("pastDiagnosticPayloads", ArgumentSemantic.Strong)]
MXDiagnosticPayload[] PastDiagnosticPayloads { get; }
[Static]
[Internal]
[Export ("makeLogHandleWithCategory:")]
IntPtr /* os_log_t */ _MakeLogHandle (NSString category);
}
interface IMXMetricManagerSubscriber { }

Просмотреть файл

@ -82,6 +82,7 @@ namespace MLCompute {
Float32 = 1,
Boolean = 4,
Int64 = 5,
Int32 = 7,
// Count, // must be last, not available in swift
}
@ -455,7 +456,6 @@ namespace MLCompute {
[NoWatch]
[BaseType (typeof (MLCOptimizer))]
[DisableDefaultCtor]
[TV (14,0), Mac (10,15), iOS (14,0)]
interface MLCAdamOptimizer : NSCopying {
[Export ("beta1")]
@ -509,6 +509,12 @@ namespace MLCompute {
[Export ("deviceWithGPUDevices:")]
[return: NullAllowed]
MLCDevice GetDevice (IMTLDevice[] gpus);
[iOS (14,2)][TV (14,2)]
[Static]
[Export ("deviceWithType:selectsMultipleComputeDevices:")]
[return: NullAllowed]
MLCDevice GetDevice (MLCDeviceType type, bool selectsMultipleComputeDevices);
}
[iOS (14,0)][TV (14,0)][Mac (11,0)]
@ -2012,7 +2018,7 @@ namespace MLCompute {
bool Compile (MLCOptimizer optimizer);
[Export ("linkWithGraphs:")]
bool Link ([NullAllowed] MLCTrainingGraph[] graphs);
bool Link (MLCTrainingGraph[] graphs);
[Export ("sourceGradientTensorsForLayer:")]
MLCTensor[] GetSourceGradientTensors (MLCLayer layer);
@ -2065,6 +2071,10 @@ namespace MLCompute {
[Export ("gradientTensorForInput:")]
[return: NullAllowed]
MLCTensor GetGradientTensor (MLCTensor input);
[iOS (14,2)][TV (14,2)]
[Export ("bindOptimizerData:deviceData:withTensor:")]
bool BindOptimizer (MLCTensorData[] data, [NullAllowed] MLCTensorOptimizerDeviceData[] deviceData, MLCTensor tensor);
}
[TV (14,0), Mac (11,0), iOS (14,0)]
@ -2093,7 +2103,7 @@ namespace MLCompute {
bool Compile (MLCGraphCompilationOptions options, MLCDevice device);
[Export ("linkWithGraphs:")]
bool Link ([NullAllowed] MLCInferenceGraph[] graphs);
bool Link (MLCInferenceGraph[] graphs);
[Async (ResultTypeName = "MLCGraphCompletionResult")]
[Export ("executeWithInputsData:batchSize:options:completionHandler:")]

Просмотреть файл

@ -229,16 +229,13 @@ namespace MultipeerConnectivity {
partial interface MCNearbyServiceBrowserDelegate {
[Abstract]
[Mac (10,9)]
[Export ("browser:foundPeer:withDiscoveryInfo:")]
void FoundPeer (MCNearbyServiceBrowser browser, MCPeerID peerID, [NullAllowed] NSDictionary info);
[Abstract]
[Mac (10,9)]
[Export ("browser:lostPeer:")]
void LostPeer (MCNearbyServiceBrowser browser, MCPeerID peerID);
[Mac (10,9)]
[Export ("browser:didNotStartBrowsingForPeers:")]
void DidNotStartBrowsingForPeers (MCNearbyServiceBrowser browser, NSError error);
}

Просмотреть файл

@ -488,7 +488,7 @@ namespace NetworkExtension {
[NullAllowed, Export ("sourceAppAuditToken")]
NSData SourceAppAuditToken { get; }
[Mac (10, 15), iOS (13, 1)]
[iOS (13, 1)]
[Export ("identifier")]
NSUuid Identifier { get; }
}

253
src/oslog.cs Normal file
Просмотреть файл

@ -0,0 +1,253 @@
using System;
using Foundation;
using ObjCRuntime;
using CoreFoundation;
namespace OSLog {
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[Native]
enum OSLogEntryLogLevel : long {
Undefined,
Debug,
Info,
Notice,
Error,
Fault,
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[Native]
enum OSLogEntrySignpostType : long {
Undefined,
IntervalBegin,
IntervalEnd,
Event,
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[Native]
enum OSLogEntryStoreCategory : long {
Undefined,
Metadata,
ShortTerm,
LongTermAuto,
LongTerm1,
LongTerm3,
LongTerm7,
LongTerm14,
LongTerm30,
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[Flags]
[Native]
enum OSLogEnumeratorOptions : ulong {
Reverse = 0x1,
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[Native]
enum OSLogMessageComponentArgumentCategory : long {
Undefined,
Data,
Double,
Int64,
String,
UInt64,
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[Protocol]
interface OSLogEntryFromProcess {
[Abstract]
[Export ("activityIdentifier")]
ulong ActivityIdentifier { get; }
[Abstract]
[Export ("process")]
string Process { get; }
[Abstract]
[Export ("processIdentifier")]
int ProcessIdentifier { get; }
[Abstract]
[Export ("sender")]
string Sender { get; }
[Abstract]
[Export ("threadIdentifier")]
ulong ThreadIdentifier { get; }
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[Protocol]
interface OSLogEntryWithPayload {
[Abstract]
[Export ("category")]
string Category { get; }
[Abstract]
[Export ("components")]
OSLogMessageComponent[] Components { get; }
[Abstract]
[Export ("formatString")]
string FormatString { get; }
[Abstract]
[Export ("subsystem")]
string Subsystem { get; }
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface OSLogEntry {
[Export ("composedMessage")]
string ComposedMessage { get; }
[Export ("date")]
NSDate Date { get; }
[Export ("storeCategory")]
OSLogEntryStoreCategory StoreCategory { get; }
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[BaseType (typeof (OSLogEntry))]
[DisableDefaultCtor]
interface OSLogEntryActivity : OSLogEntryFromProcess {
[Export ("parentActivityIdentifier")]
ulong ParentActivityIdentifier { get; }
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[BaseType (typeof (OSLogEntry))]
[DisableDefaultCtor]
interface OSLogEntryBoundary {
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[BaseType (typeof (OSLogEntry))]
[DisableDefaultCtor]
interface OSLogEntryLog : OSLogEntryFromProcess, OSLogEntryWithPayload {
[Export ("level")]
OSLogEntryLogLevel Level { get; }
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[BaseType (typeof (OSLogEntry))]
[DisableDefaultCtor]
interface OSLogEntrySignpost : OSLogEntryFromProcess, OSLogEntryWithPayload {
[Export ("signpostIdentifier")]
ulong SignpostIdentifier { get; }
[Export ("signpostName")]
string SignpostName { get; }
[Export ("signpostType")]
OSLogEntrySignpostType SignpostType { get; }
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[BaseType (typeof (NSEnumerator))]
[DisableDefaultCtor]
interface OSLogEnumerator {
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface OSLogMessageComponent {
[Export ("formatSubstring")]
string FormatSubstring { get; }
[Export ("placeholder")]
string Placeholder { get; }
[Export ("argumentCategory")]
OSLogMessageComponentArgumentCategory ArgumentCategory { get; }
[NullAllowed, Export ("argumentDataValue")]
NSData ArgumentDataValue { get; }
[Export ("argumentDoubleValue")]
double ArgumentDoubleValue { get; }
[Export ("argumentInt64Value")]
long ArgumentInt64Value { get; }
[NullAllowed, Export ("argumentNumberValue")]
NSNumber ArgumentNumberValue { get; }
[NullAllowed, Export ("argumentStringValue")]
string ArgumentStringValue { get; }
[Export ("argumentUInt64Value")]
ulong ArgumentUInt64Value { get; }
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface OSLogPosition {
}
[NoWatch, NoTV, NoiOS]
[Mac (11,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface OSLogStore {
[Static]
[Export ("localStoreAndReturnError:")]
[return: NullAllowed]
OSLogStore CreateLocalStore ([NullAllowed] out NSError error);
[Static]
[Export ("storeWithURL:error:")]
[return: NullAllowed]
OSLogStore CreateStore (NSUrl url, [NullAllowed] out NSError error);
[Export ("entriesEnumeratorWithOptions:position:predicate:error:")]
[return: NullAllowed]
OSLogEnumerator GetEntriesEnumerator (OSLogEnumeratorOptions options, [NullAllowed] OSLogPosition position, [NullAllowed] NSPredicate predicate, [NullAllowed] out NSError error);
[Export ("entriesEnumeratorAndReturnError:")]
[return: NullAllowed]
OSLogEnumerator GetEntriesEnumerator ([NullAllowed] out NSError error);
[Export ("positionWithDate:")]
OSLogPosition GetPosition (NSDate date);
[Export ("positionWithTimeIntervalSinceEnd:")]
OSLogPosition GetPositionWithTimeIntervalSinceEnd (double seconds);
[Export ("positionWithTimeIntervalSinceLatestBoot:")]
OSLogPosition GetPositionWithTimeIntervalSinceLatestBoot (double seconds);
}
}

Просмотреть файл

@ -690,6 +690,12 @@ namespace Photos
[return: NullAllowed]
PHCollectionListChangeRequest ChangeRequest (PHCollectionList collectionList, PHFetchResult childCollections);
[TV (14,2), Mac (11,0), iOS (14,2)]
[Static]
[Export ("changeRequestForTopLevelCollectionListUserCollections:")]
[return: NullAllowed]
PHCollectionListChangeRequest ChangeRequestForTopLevelCollectionList (PHFetchResult childCollections);
[Export ("title", ArgumentSemantic.Strong)]
string Title { get; set; }
@ -1284,7 +1290,7 @@ namespace Photos
void PrepareLivePhotoForPlayback (CGSize targetSize, [NullAllowed] NSDictionary<NSString, NSObject> options, Action<PHLivePhoto, NSError> handler);
// the API existed earlier but the key needed to create the strong dictionary did not work
[iOS (11,0)][TV (11,0)][Mac (10,12)]
[iOS (11,0)][TV (11,0)]
[Async]
[Wrap ("_PrepareLivePhotoForPlayback (targetSize, options.GetDictionary (), handler)")]
void PrepareLivePhotoForPlayback (CGSize targetSize, [NullAllowed] PHLivePhotoEditingOption options, Action<PHLivePhoto, NSError> handler);
@ -1302,7 +1308,7 @@ namespace Photos
void SaveLivePhoto (PHContentEditingOutput output, [NullAllowed] NSDictionary<NSString, NSObject> options, Action<bool, NSError> handler);
// the API existed earlier but the key needed to create the strong dictionary did not work
[iOS (11,0)][TV (11,0)][Mac (10,12)]
[iOS (11,0)][TV (11,0)]
[Async]
[Wrap ("_SaveLivePhoto (output, options.GetDictionary (), handler)")]
void SaveLivePhoto (PHContentEditingOutput output, [NullAllowed] PHLivePhotoEditingOption options, Action<bool, NSError> handler);

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -725,11 +725,15 @@ namespace Security {
[Field ("kSecUseDataProtectionKeychain")]
IntPtr UseDataProtectionKeychain { get; }
#if !MONOMAC // Don't break compat API
[iOS (8,0)]
[Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'LAContext.InteractionNotAllowed' instead.")]
[Deprecated (PlatformName.iOS, 14,0, message: "Use 'LAContext.InteractionNotAllowed' instead.")]
[Deprecated (PlatformName.TvOS, 14,0, message: "Use 'LAContext.InteractionNotAllowed' instead.")]
[Deprecated (PlatformName.WatchOS, 7,0, message: "Use 'LAContext.InteractionNotAllowed' instead.")]
[iOS (8,0)][Mac (10,10)]
[Field ("kSecUseOperationPrompt")]
IntPtr UseOperationPrompt { get; }
#if !MONOMAC // Don't break compat API
[Availability (Introduced = Platform.iOS_8_0, Deprecated = Platform.iOS_9_0)]
[Field ("kSecUseNoAuthenticationUI")]
IntPtr UseNoAuthenticationUI { get; }

Просмотреть файл

@ -1015,7 +1015,6 @@ namespace StoreKit {
}
[Unavailable (PlatformName.MacCatalyst)]
[NoWatch, NoTV, NoMac, iOS (14,0)]
[Advice ("This API is not available when using UIKit on macOS.")]
[BaseType (typeof (NSObject))]
@ -1036,7 +1035,6 @@ namespace StoreKit {
[BaseType (typeof (NSObject))]
interface SKOverlayConfiguration {}
[Unavailable (PlatformName.MacCatalyst)]
[NoWatch, NoTV, NoMac, iOS (14,0)]
[Advice ("This API is not available when using UIKit on macOS.")]
[BaseType (typeof (SKOverlayConfiguration))]
@ -1069,7 +1067,6 @@ namespace StoreKit {
NSObject GetAdditionalValue (string key);
}
[Unavailable (PlatformName.MacCatalyst)]
[NoWatch, NoTV, NoMac, iOS (14,0)]
[Advice ("This API is not available when using UIKit on macOS.")]
[BaseType (typeof (SKOverlayConfiguration))]
@ -1098,7 +1095,6 @@ namespace StoreKit {
interface ISKOverlayDelegate {}
[Unavailable (PlatformName.MacCatalyst)]
[NoWatch, NoTV, NoMac, iOS (14,0)]
[Protocol, Model (AutoGeneratedName = true), Advice ("This API is not available when using UIKit on macOS.")]
[BaseType (typeof (NSObject))]
@ -1119,8 +1115,6 @@ namespace StoreKit {
void DidFinishDismissal (SKOverlay overlay, SKOverlayTransitionContext transitionContext);
}
[Unavailable (PlatformName.MacCatalyst)]
[NoWatch, NoTV, NoMac, iOS (14,0)]
[Advice ("This API is not available when using UIKit on macOS.")]
[BaseType (typeof (NSObject))]

Просмотреть файл

@ -4119,15 +4119,15 @@ namespace UIKit {
[Export ("collectionView:didEndDisplayingSupplementaryView:forElementOfKind:atIndexPath:")]
void SupplementaryViewDisplayingEnded (UICollectionView collectionView, UICollectionReusableView view, NSString elementKind, NSIndexPath indexPath);
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'GetContextMenuConfigurationForRow' instead.")]
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'GetContextMenuConfiguration' instead.")]
[Export ("collectionView:shouldShowMenuForItemAtIndexPath:")]
bool ShouldShowMenu (UICollectionView collectionView, NSIndexPath indexPath);
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'GetContextMenuConfigurationForRow' instead.")]
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'GetContextMenuConfiguration' instead.")]
[Export ("collectionView:canPerformAction:forItemAtIndexPath:withSender:")]
bool CanPerformAction (UICollectionView collectionView, Selector action, NSIndexPath indexPath, NSObject sender);
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'GetContextMenuConfigurationForRow' instead.")]
[Deprecated (PlatformName.iOS, 13, 0, message: "Use 'GetContextMenuConfiguration' instead.")]
[Export ("collectionView:performAction:forItemAtIndexPath:withSender:")]
void PerformAction (UICollectionView collectionView, Selector action, NSIndexPath indexPath, NSObject sender);
@ -15689,6 +15689,8 @@ namespace UIKit {
IUIViewControllerTransitionCoordinator GetTransitionCoordinator ();
}
[Unavailable (PlatformName.MacCatalyst)]
[Advice ("This API is not available when using UIKit on macOS.")]
[NoTV]
[Deprecated (PlatformName.iOS, 12, 0, message: "No longer supported; please adopt 'WKWebView'.")]
[BaseType (typeof (UIView), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UIWebViewDelegate)})]
@ -15792,6 +15794,8 @@ namespace UIKit {
bool AllowsLinkPreview { get; set; }
}
[Unavailable (PlatformName.MacCatalyst)]
[Advice ("This API is not available when using UIKit on macOS.")]
[NoTV]
[Deprecated (PlatformName.iOS, 12, 0, message: "No longer supported; please adopt 'WKWebView' APIs.")]
[BaseType (typeof (NSObject))]

Просмотреть файл

@ -594,11 +594,11 @@ namespace UserNotifications {
[Export ("showPreviewsSetting")]
UNShowPreviewsSetting ShowPreviewsSetting { get; }
[Watch (5, 0), NoTV, Mac (10, 14), iOS (12, 0)]
[Watch (5, 0), NoTV, iOS (12, 0)]
[Export ("criticalAlertSetting")]
UNNotificationSetting CriticalAlertSetting { get; }
[Watch (5, 0), NoTV, Mac (10, 14), iOS (12, 0)]
[Watch (5, 0), NoTV, iOS (12, 0)]
[Export ("providesAppNotificationSettings")]
bool ProvidesAppNotificationSettings { get; }

Просмотреть файл

@ -253,6 +253,10 @@ namespace VideoSubscriberAccount {
[iOS (13,0)][TV (13,0)][Mac (10,15)]
[NullAllowed, Export ("accountProviderAuthenticationToken")]
string AccountProviderAuthenticationToken { get; set; }
[TV (14,2), iOS (14,2), Mac (11,0)]
[NullAllowed, Export ("applicationAccountProviders", ArgumentSemantic.Copy)]
VSAccountApplicationProvider [] ApplicationAccountProviders { get; set; }
}
[iOS (10,2)]
@ -331,5 +335,21 @@ namespace VideoSubscriberAccount {
[Export ("setCurrentSubscription:")]
void SetCurrentSubscription ([NullAllowed] VSSubscription currentSubscription);
}
[TV (14,2), iOS (14,2), Mac (11,0)]
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface VSAccountApplicationProvider {
[Export ("initWithLocalizedDisplayName:identifier:")]
IntPtr Constructor (string localizedDisplayName, string identifier);
[Export ("localizedDisplayName")]
string LocalizedDisplayName { get; }
[Export ("identifier")]
string Identifier { get; }
}
}

Просмотреть файл

@ -198,7 +198,7 @@ namespace VideoToolbox {
NSString PrioritizeEncodingSpeedOverQuality { get; }
[iOS (14,1)]
[NoTV][NoMac]
[TV (14,2)][Mac (11,0)]
[Field ("kVTCompressionPropertyKey_PreserveDynamicHDRMetadata")]
NSString PreserveDynamicHdrMetadata { get; }
}
@ -332,7 +332,7 @@ namespace VideoToolbox {
uint UsingGpuRegistryId { get; }
[iOS (14,1)]
[NoTV][NoMac]
[TV (14,2)][Mac (11,0)]
[Export ("PreserveDynamicHdrMetadata")]
bool PreserveDynamicHdrMetadata { get; set; }
}
@ -724,7 +724,7 @@ namespace VideoToolbox {
NSString PixelTransferProperties { get; }
[iOS (14,1)]
[NoTV][NoMac]
[TV (14,2)][Mac (11,0)]
[Field ("kVTDecompressionPropertyKey_PropagatePerFrameHDRDisplayMetadata")]
NSString PropagatePerFrameHdrDisplayMetadata { get; }
}
@ -810,7 +810,7 @@ namespace VideoToolbox {
uint UsingGpuRegistryId { get; }
[iOS (14,1)]
[NoTV][NoMac]
[TV (14,2)][Mac (11,0)]
[Export ("PropagatePerFrameHdrDisplayMetadata")]
bool PropagatePerFrameHhrDisplayMetadata { get; set; }
}
@ -982,6 +982,13 @@ namespace VideoToolbox {
[Mac (10,14,6), iOS (13,0), TV (13,0)]
[Field ("kVTVideoEncoderList_IsHardwareAccelerated")]
NSString IsHardwareAccelerated { get; }
[iOS (14,2)][TV (14,2)][Mac (11,0)]
[Field ("kVTVideoEncoderList_SupportsFrameReordering")]
NSString SupportsFrameReordering { get; }
// VTVideoEncoder.cs should be updated when new constants are added here
// some are missing https://github.com/xamarin/xamarin-macios/issues/9904
}
// VTMultiPassStorage.h

Просмотреть файл

@ -123,16 +123,18 @@ namespace Xamarin.Mac.Tests
if (IntPtr.Size == 4 && PlatformHelper.CheckSystemVersion(10, 13)) // Removed from 32-bit in macOS 10.13
return true;
break;
case "QTMovie":
return TestRuntime.CheckSystemVersion (PlatformName.MacOSX, 10, 14, 4); // Broke in macOS 10.14.4.
case "AVCaptureView":
// Deallocating a AVCaptureView makes it trigger a permission dialog, which we don't want, so just skip this type.
return true;
case "GKGameCenterViewController": // the native 'init' method returned nil.
if (PlatformHelper.CheckSystemVersion (11, 0))
return true;
break;
}
switch (t.Namespace) {
case "QTKit":
return TestRuntime.CheckSystemVersion (PlatformName.MacOSX, 10, 15); // QTKit is gone in 10.15.
return true; // QTKit has been removed from macos.
}
return false;

Просмотреть файл

@ -43,6 +43,15 @@ partial class TestRuntime
public const string BuildVersion_iOS9_GM = "13A340";
// Xcode 12.0 removed macOS 11.0 SDK and moved it up to Xcode 12.2
// we use this constant to make up for that difference when using
// AssertXcodeVersion and CheckXcodeVersion
#if __MACOS__
public const int MinorXcode12APIMismatch = 2;
#else
public const int MinorXcode12APIMismatch = 0;
#endif
public static string GetiOSBuildVersion ()
{
#if __WATCHOS__
@ -173,12 +182,30 @@ partial class TestRuntime
watchOS = new { Major = 6, Minor = 0, Build = "?" },
};
var twelvedot2b2 = new {
Xcode = new { Major = 12, Minor = 2, Beta = 2 },
iOS = new { Major = 14, Minor = 2, Build = "18B5061" },
tvOS = new { Major = 14, Minor = 2, Build = "18K5036" },
macOS = new { Major = 11, Minor = 0, Build = "?" },
watchOS = new { Major = 7, Minor = 1, Build = "18R5561" },
};
var twelvedot2b3 = new {
Xcode = new { Major = 12, Minor = 2, Beta = 3 },
iOS = new { Major = 14, Minor = 2, Build = "18B5072" },
tvOS = new { Major = 14, Minor = 2, Build = "18K5047" },
macOS = new { Major = 11, Minor = 0, Build = "20A5395" },
watchOS = new { Major = 7, Minor = 1, Build = "18R5572" },
};
var versions = new [] {
nineb1,
nineb2,
nineb3,
elevenb5,
elevenb6,
twelvedot2b2,
twelvedot2b3,
};
foreach (var v in versions) {
@ -197,6 +224,28 @@ partial class TestRuntime
var actual = GetiOSBuildVersion ();
Console.WriteLine (actual);
return actual.StartsWith (v.iOS.Build, StringComparison.Ordinal);
#elif __TVOS__
if (!CheckExacttvOSSystemVersion (v.tvOS.Major, v.tvOS.Minor))
return false;
if (v.tvOS.Build == "?")
throw new NotImplementedException ($"Build number for tvOS {v.tvOS.Major}.{v.tvOS.Minor} beta {beta} (candidate: {GetiOSBuildVersion ()})");
var actual = GetiOSBuildVersion ();
Console.WriteLine (actual);
return actual.StartsWith (v.tvOS.Build, StringComparison.Ordinal);
#elif __MACOS__
if (!CheckExactmacOSSystemVersion (v.macOS.Major, v.macOS.Minor))
return false;
if (v.macOS.Build == "?")
throw new NotImplementedException ($"Build number for macOS {v.macOS.Major}.{v.macOS.Minor} beta {beta}.");
/*
* I could be parsing the string but docs says it is not suitable for parsing and this is ugly enough so
* an apology in advance (I'm very sorry =]) to my future self or whoever is dealing with this if it broke
* but there are no better solutions at this time. That said this is good enough for the current use case.
* Example: Version 10.16 (Build 20A5395g)
*
* The above statement also applies to 'CheckExactmacOSSystemVersion' =S
*/
return NSProcessInfo.ProcessInfo.OperatingSystemVersionString.Contains (v.macOS.Build, StringComparison.Ordinal);
#else
throw new NotImplementedException ();
#endif
@ -233,6 +282,18 @@ partial class TestRuntime
return CheckMacSystemVersion (10, 15, 6);
#else
throw new NotImplementedException ();
#endif
case 2:
#if __WATCHOS__
return CheckWatchOSSystemVersion (7, 1);
#elif __TVOS__
return ChecktvOSSystemVersion (14, 2);
#elif __IOS__
return CheckiOSSystemVersion (14, 2);
#elif MONOMAC
return CheckMacSystemVersion (11, 0, 0);
#else
throw new NotImplementedException ();
#endif
default:
throw new NotImplementedException ();
@ -671,6 +732,29 @@ partial class TestRuntime
#endif
}
static bool CheckExacttvOSSystemVersion (int major, int minor)
{
#if __TVOS__
var version = Version.Parse (UIDevice.CurrentDevice.SystemVersion);
return version.Major == major && version.Minor == minor;
#else
throw new Exception ("Can't get tvOS System version on other platforms.");
#endif
}
static bool CheckExactmacOSSystemVersion (int major, int minor, int build = 0)
{
#if __MACOS__
var v = NSProcessInfo.ProcessInfo.OperatingSystemVersion;
var currentVersion = new Version ((int) v.Major, (int) v.Minor, (int) v.PatchVersion);
if (currentVersion == new Version (10, 16, 0))
currentVersion = new Version (11, 0, 0);
return currentVersion == new Version (major, minor, build);
#else
throw new Exception ("Can't get macOS System version on other platforms.");
#endif
}
// This method returns true if:
// system version >= specified version
// AND

Просмотреть файл

@ -52,7 +52,7 @@ namespace Introspection {
Minimum = new Version (10,9);
// Need to special case macOS 'Maximum' version for OS minor subversions (can't change Constants.SdkVersion)
// Please comment the code below if needed
Maximum = new Version (10,15,5);
Maximum = new Version (11,0,0);
#endif
Filter = (AvailabilityBaseAttribute arg) => {
return (arg.AvailabilityKind != AvailabilityKind.Introduced) || (arg.Platform != Platform);
@ -137,7 +137,16 @@ namespace Introspection {
// Duplicate checks, e.g. same attribute on member and type (extranous metadata)
if (ma.Version == ta.Version) {
switch (t.FullName) {
case "AppKit.INSAccessibility":
// special case for [I]NSAccessibility type (10.9) / protocol (10.10) mix up
// https://github.com/xamarin/xamarin-macios/issues/10009
// better some dupes than being inaccurate when protocol members are inlined
break;
default:
AddErrorLine ($"[FAIL] {ma.Version} ({m}) == {ta.Version} ({t})");
break;
}
}
// Consistency checks, e.g. member lower than type
// note: that's valid in some cases, like a new base type being introduced

Просмотреть файл

@ -118,16 +118,24 @@ namespace Introspection {
case "CKSubscription":
case "MPSCnnConvolutionState":
return true;
case "QTMovie":
return TestRuntime.CheckSystemVersion (PlatformName.MacOSX, 10, 14, 4); // Broke in macOS 10.14.4.
case "AVSpeechSynthesisVoice": // Calling description crashes the test
#if __WATCHOS__
return TestRuntime.CheckXcodeVersion (12, 2); // CheckExactXcodeVersion is not implemented in watchOS yet but will be covered by iOS parrot below
#else
return TestRuntime.CheckExactXcodeVersion (12, 2, beta: 3);
#endif
}
#if __IOS__
switch (type.Namespace) {
#if __IOS__
case "WatchKit":
return true; // WatchKit has been removed from iOS.
}
#elif MONOMAC
case "QTKit":
return true; // QTKit has been removed from macos.
#endif
}
// skip types that we renamed / rewrite since they won't behave correctly (by design)
if (SkipDueToRejectedTypes (type))
return true;

Просмотреть файл

@ -114,6 +114,8 @@ namespace Introspection {
case "PKShippingMethod":
case "PKSuicaPassProperties": // Conformance not in headers
case "PKTransitPassProperties": // Conformance not in headers
// Xcode 12.2
case "VSAccountApplicationProvider": // Conformance not in headers
return true;
}
break;
@ -223,6 +225,8 @@ namespace Introspection {
case "PKPaymentMerchantSession":
case "PKPaymentRequestMerchantSessionUpdate":
case "PKShareablePassMetadata":
// Xcode 12.2
case "VSAccountApplicationProvider": // Conformance not in headers
return true;
}
break;
@ -328,6 +332,8 @@ namespace Introspection {
case "PKPaymentMerchantSession":
case "PKPaymentRequestMerchantSessionUpdate":
case "PKShareablePassMetadata":
// Xcode 12.2
case "VSAccountApplicationProvider": // Conformance not in headers
return true;
}
break;

Просмотреть файл

@ -198,6 +198,8 @@ namespace Introspection {
return true;
case "AVFoundation.AVAudioRecorder": // Stopped working in macOS 10.15.2
return TestRuntime.CheckXcodeVersion (11, 2);
case "GameKit.GKGameCenterViewController": // the native 'init' method returned nil.
return TestRuntime.CheckXcodeVersion (11, 2);
}
@ -228,6 +230,10 @@ namespace Introspection {
if (Mac.CheckSystemVersion (10, 15)) // QTKit is gone in 10.15
return true;
break;
case "ModelIO": // Looks like it is broken in macOS beta 9
if (Mac.CheckSystemVersion (11, 0)) // Causes error on test: turning unknown type for VtValue with unregistered C++ type bool
return true;
break;
}
return base.Skip (type);
@ -300,6 +306,11 @@ namespace Introspection {
case "CoreLocation.CLBeacon":
case "GameKit.GKTurnBasedMatch":
break;
// crash with xcode 12.2 Beta 2 (and GM in iOS)
case "CoreSpotlight.CSLocalizedString":
if (TestRuntime.CheckXcodeVersion (12, 0))
return;
break;
default:
base.CheckToString (obj);
break;

Просмотреть файл

@ -52,6 +52,9 @@ namespace Introspection {
if (!Mac.CheckSystemVersion (10, 12) || IntPtr.Size != 8)
return true;
break;
case "MonoMac.QTKit": // QTKit has been removed from macOS
case "QTKit":
return true;
}
return false;
}

Просмотреть файл

@ -20,6 +20,13 @@ namespace Introspection {
case "VNImageOptions":
return true;
}
switch (type.Namespace) {
case "MonoMac.QTKit": // QTKit has been removed from macOS
case "QTKit":
return true;
}
return base.Skip (type);
}
}

Просмотреть файл

@ -97,6 +97,9 @@ namespace Introspection {
// Just available on device
case "UsageKey":
return Runtime.Arch == Arch.SIMULATOR;
// Xcode 12.2 Beta 1 does not ship this but it is available in Xcode 12.0...
case "BarometricPressure":
return true;
default:
return base.Skip (p);
}
@ -144,6 +147,9 @@ namespace Introspection {
case "MTKModelErrorDomain":
case "MTKModelErrorKey":
return Runtime.Arch == Arch.SIMULATOR;
// Xcode 12.2 Beta 1 does not ship this but it is available in Xcode 12.0...
case "HKMetadataKeyBarometricPressure":
return true;
default:
return false;
}

Просмотреть файл

@ -53,7 +53,7 @@ namespace MonoTouchFixtures.AudioUnit
[Test]
public void CopyIconTest ()
{
TestRuntime.AssertXcodeVersion (12, 0);
TestRuntime.AssertXcodeVersion (12, TestRuntime.MinorXcode12APIMismatch);
AudioComponentDescription cd = new AudioComponentDescription () {
ComponentType = AudioComponentType.Output,
#if MONOMAC

Просмотреть файл

@ -334,5 +334,38 @@ namespace MonoTouchFixtures.CoreFoundation {
{
Assert.Throws<ArgumentNullException> (() => CFBundle.GetInfoDictionary (null));
}
#if MONOMAC
[Test]
public void TestIsArchitectureLoadable ()
{
TestRuntime.AssertXcodeVersion (12, 2);
bool loadable_x86_64 = CFBundle.IsArchitectureLoadable (CFBundle.Architecture.X86_64);
if (global::System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture == global::System.Runtime.InteropServices.Architecture.X64)
Assert.IsTrue (loadable_x86_64, "x86_64 Expected => true");
else
Assert.IsFalse (loadable_x86_64, "x86_64 Expected => false");
bool loadable_arm64 = CFBundle.IsArchitectureLoadable (CFBundle.Architecture.ARM64);
if (global::System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture == global::System.Runtime.InteropServices.Architecture.Arm64)
Assert.IsTrue (loadable_arm64, "arm64 Expected => true");
else
Assert.IsFalse (loadable_arm64, "arm64 Expected => false");
}
[Test]
public void TestIsExecutableLoadable ()
{
TestRuntime.AssertXcodeVersion (12, 2);
var main = CFBundle.GetMain ();
var loadableBundle = CFBundle.IsExecutableLoadable (main);
Assert.IsTrue (loadableBundle, "loadableBundle");
var loadableBundleUrl = CFBundle.IsExecutableLoadable (main.ExecutableUrl);
Assert.IsTrue (loadableBundleUrl, "loadableBundleUrl");
}
#endif
}
}

Просмотреть файл

@ -23,15 +23,15 @@ namespace MonoTouchFixtures.CoreFoundation {
[Test]
public void Default ()
{
OSLog.Default.Log (OSLogLevel.Default, "monotouch-test / Default / Default");
global::CoreFoundation.OSLog.Default.Log (global::CoreFoundation.OSLogLevel.Default, "monotouch-test / Default / Default");
// this will show in the application output (e.g. inside VSfM)
}
[Test]
public void Custom ()
{
using (var log = new OSLog ("subsystem", "category")) {
log.Log (OSLogLevel.Error, "monotouch-test / custom / Debug");
using (var log = new global::CoreFoundation.OSLog ("subsystem", "category")) {
log.Log (global::CoreFoundation.OSLogLevel.Error, "monotouch-test / custom / Debug");
// this will show in the application output (e.g. inside VSfM)
// and also inside Console.app under the simulator/device
}

Просмотреть файл

@ -399,7 +399,6 @@ namespace MonoTouchFixtures.CoreGraphics {
Assert.True (cs.IsHdr, "DisplayP3_Hlg");
}
#if __IOS__
[Test]
public void CGColorSpaceUsesITUR_2100TFTest ()
{
@ -442,6 +441,5 @@ namespace MonoTouchFixtures.CoreGraphics {
Assert.That ((nint) TestRuntime.CFGetRetainCount (csl.Handle), Is.EqualTo ((nint) 1));
}
}
#endif
}
}

Просмотреть файл

@ -101,7 +101,7 @@ namespace MonoTouchFixtures.CoreGraphics {
[Test]
public void GetAXName ()
{
TestRuntime.AssertXcodeVersion (12, 0);
TestRuntime.AssertXcodeVersion (12, TestRuntime.MinorXcode12APIMismatch);
using (var c = new CGColor (CGConstantColor.Black)) {
Assert.IsNotNull (c.AXName, "AXName");
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше