[src] Remove Classic code from the CoreMedia, CoreMidi, CoreML, CoreMotion, CoreNFC, CoreTelephony and CoreText frameworks. (#8786)
This commit is contained in:
Родитель
bc2db4c60a
Коммит
60941a1efb
|
@ -7,8 +7,6 @@
|
||||||
// Copyright 2017 Xamarin Inc. All rights reserved.
|
// Copyright 2017 Xamarin Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Foundation;
|
using Foundation;
|
||||||
using ObjCRuntime;
|
using ObjCRuntime;
|
||||||
|
@ -22,4 +20,3 @@ namespace CoreML {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
// Copyright 2017 Xamarin Inc. All rights reserved.
|
// Copyright 2017 Xamarin Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Foundation;
|
using Foundation;
|
||||||
using ObjCRuntime;
|
using ObjCRuntime;
|
||||||
|
@ -88,4 +86,3 @@ namespace CoreML {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
// Copyright 2017 Microsoft Inc. All rights reserved.
|
// Copyright 2017 Microsoft Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Foundation;
|
using Foundation;
|
||||||
using ObjCRuntime;
|
using ObjCRuntime;
|
||||||
|
@ -22,4 +20,3 @@ namespace CoreML {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ namespace CoreMedia {
|
||||||
return Runtime.GetNSObject<NSDictionary> (attachments, true);
|
return Runtime.GetNSObject<NSDictionary> (attachments, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
// There is some API that needs a more strongly typed version of a NSDictionary
|
// There is some API that needs a more strongly typed version of a NSDictionary
|
||||||
// and there is no easy way to downcast from NSDictionary to NSDictionary<TKey, TValue>
|
// and there is no easy way to downcast from NSDictionary to NSDictionary<TKey, TValue>
|
||||||
public static NSDictionary<TKey, TValue> GetAttachments<TKey, TValue> (this ICMAttachmentBearer target, CMAttachmentMode attachmentMode)
|
public static NSDictionary<TKey, TValue> GetAttachments<TKey, TValue> (this ICMAttachmentBearer target, CMAttachmentMode attachmentMode)
|
||||||
|
@ -45,7 +44,6 @@ namespace CoreMedia {
|
||||||
|
|
||||||
return Runtime.GetNSObject<NSDictionary<TKey, TValue>> (attachments, true);
|
return Runtime.GetNSObject<NSDictionary<TKey, TValue>> (attachments, true);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
extern static /* CFTypeRef */ IntPtr CMGetAttachment (/* CMAttachmentBearerRef */ IntPtr target, /* CFStringRef */ IntPtr key,
|
extern static /* CFTypeRef */ IntPtr CMGetAttachment (/* CMAttachmentBearerRef */ IntPtr target, /* CFStringRef */ IntPtr key,
|
||||||
|
|
|
@ -21,11 +21,6 @@ using ObjCRuntime;
|
||||||
using CoreVideo;
|
using CoreVideo;
|
||||||
using AudioToolbox;
|
using AudioToolbox;
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
using System.Drawing;
|
|
||||||
using CMVideoDimensions = System.Drawing.Size;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace CoreMedia {
|
namespace CoreMedia {
|
||||||
|
|
||||||
// untyped enum (uses as OSStatus) -> CMFormatDescription.h
|
// untyped enum (uses as OSStatus) -> CMFormatDescription.h
|
||||||
|
@ -324,41 +319,6 @@ namespace CoreMedia {
|
||||||
[DllImport (Constants.CoreMediaLibrary)]
|
[DllImport (Constants.CoreMediaLibrary)]
|
||||||
internal extern static /* Boolean */ bool CMVideoFormatDescriptionMatchesImageBuffer (/* CMVideoFormatDescriptionRef */ IntPtr videoDesc, /* CVImageBufferRef */ IntPtr imageBuffer);
|
internal extern static /* Boolean */ bool CMVideoFormatDescriptionMatchesImageBuffer (/* CMVideoFormatDescriptionRef */ IntPtr videoDesc, /* CVImageBufferRef */ IntPtr imageBuffer);
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
[Advice ("Use 'CMVideoFormatDescription'.")]
|
|
||||||
public Size VideoDimensions {
|
|
||||||
get {
|
|
||||||
return CMVideoFormatDescriptionGetDimensions (handle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Advice ("Use 'CMVideoFormatDescription'.")]
|
|
||||||
public CGRect GetVideoCleanAperture (bool originIsAtTopLeft)
|
|
||||||
{
|
|
||||||
return CMVideoFormatDescriptionGetCleanAperture (handle, originIsAtTopLeft);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Belongs to CMVideoFormatDescription
|
|
||||||
public static NSObject [] GetExtensionKeysCommonWithImageBuffers ()
|
|
||||||
{
|
|
||||||
var arr = CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers ();
|
|
||||||
return NSArray.ArrayFromHandle<NSString> (arr);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Advice ("Use 'CMVideoFormatDescription'.")]
|
|
||||||
public CGSize GetVideoPresentationDimensions (bool usePixelAspectRatio, bool useCleanAperture)
|
|
||||||
{
|
|
||||||
return CMVideoFormatDescriptionGetPresentationDimensions (handle, usePixelAspectRatio, useCleanAperture);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Belongs to CMVideoFormatDescription
|
|
||||||
public bool VideoMatchesImageBuffer (CVImageBuffer imageBuffer)
|
|
||||||
{
|
|
||||||
if (imageBuffer == null)
|
|
||||||
throw new ArgumentNullException ("imageBuffer");
|
|
||||||
return CMVideoFormatDescriptionMatchesImageBuffer (handle, imageBuffer.Handle);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -525,7 +485,6 @@ namespace CoreMedia {
|
||||||
return CMVideoFormatDescriptionGetPresentationDimensions (handle, usePixelAspectRatio, useCleanAperture);
|
return CMVideoFormatDescriptionGetPresentationDimensions (handle, usePixelAspectRatio, useCleanAperture);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
public static NSObject [] GetExtensionKeysCommonWithImageBuffers ()
|
public static NSObject [] GetExtensionKeysCommonWithImageBuffers ()
|
||||||
{
|
{
|
||||||
var arr = CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers ();
|
var arr = CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers ();
|
||||||
|
@ -538,7 +497,6 @@ namespace CoreMedia {
|
||||||
throw new ArgumentNullException ("imageBuffer");
|
throw new ArgumentNullException ("imageBuffer");
|
||||||
return CMVideoFormatDescriptionMatchesImageBuffer (handle, imageBuffer.Handle);
|
return CMVideoFormatDescriptionMatchesImageBuffer (handle, imageBuffer.Handle);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
[iOS (11,0), Mac (10,13), TV (11,0)]
|
[iOS (11,0), Mac (10,13), TV (11,0)]
|
||||||
[DllImport (Constants.CoreMediaLibrary)]
|
[DllImport (Constants.CoreMediaLibrary)]
|
||||||
|
|
|
@ -346,20 +346,6 @@ namespace CoreMedia {
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
extern static /* CMFormatDescriptionRef */ IntPtr CMSampleBufferGetFormatDescription (/* CMSampleBufferRef */ IntPtr sbuf);
|
extern static /* CMFormatDescriptionRef */ IntPtr CMSampleBufferGetFormatDescription (/* CMSampleBufferRef */ IntPtr sbuf);
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
[Advice ("Use 'GetAudioFormatDescription' or 'GetVideoFormatDescription'.")]
|
|
||||||
public CMFormatDescription GetFormatDescription ()
|
|
||||||
{
|
|
||||||
var desc = default(CMFormatDescription);
|
|
||||||
var descHandle = CMSampleBufferGetFormatDescription (handle);
|
|
||||||
if (descHandle != IntPtr.Zero)
|
|
||||||
{
|
|
||||||
desc = new CMFormatDescription (descHandle, false);
|
|
||||||
}
|
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public CMAudioFormatDescription GetAudioFormatDescription ()
|
public CMAudioFormatDescription GetAudioFormatDescription ()
|
||||||
{
|
{
|
||||||
var descHandle = CMSampleBufferGetFormatDescription (handle);
|
var descHandle = CMSampleBufferGetFormatDescription (handle);
|
||||||
|
@ -440,13 +426,6 @@ namespace CoreMedia {
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
extern static /* OSStatus */ CMSampleBufferError CMSampleBufferSetOutputPresentationTimeStamp (/* CMSampleBufferRef */ IntPtr sbuf, CMTime outputPresentationTimeStamp);
|
extern static /* OSStatus */ CMSampleBufferError CMSampleBufferSetOutputPresentationTimeStamp (/* CMSampleBufferRef */ IntPtr sbuf, CMTime outputPresentationTimeStamp);
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
public int SetOutputPresentationTimeStamp (CMTime outputPresentationTimeStamp)
|
|
||||||
{
|
|
||||||
return (int)CMSampleBufferSetOutputPresentationTimeStamp (handle, outputPresentationTimeStamp);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*[DllImport(Constants.CoreMediaLibrary)]
|
/*[DllImport(Constants.CoreMediaLibrary)]
|
||||||
int CMSampleBufferGetOutputSampleTimingInfoArray (
|
int CMSampleBufferGetOutputSampleTimingInfoArray (
|
||||||
CMSampleBufferRef sbuf,
|
CMSampleBufferRef sbuf,
|
||||||
|
@ -462,13 +441,11 @@ namespace CoreMedia {
|
||||||
get {
|
get {
|
||||||
return CMSampleBufferGetPresentationTimeStamp (handle);
|
return CMSampleBufferGetPresentationTimeStamp (handle);
|
||||||
}
|
}
|
||||||
#if XAMCORE_2_0
|
|
||||||
set {
|
set {
|
||||||
var result = CMSampleBufferSetOutputPresentationTimeStamp (handle, value);
|
var result = CMSampleBufferSetOutputPresentationTimeStamp (handle, value);
|
||||||
if (result != 0)
|
if (result != 0)
|
||||||
throw new ArgumentException (result.ToString ());
|
throw new ArgumentException (result.ToString ());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
|
@ -575,17 +552,10 @@ namespace CoreMedia {
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
extern static /* OSStatus */ CMSampleBufferError CMSampleBufferInvalidate (/* CMSampleBufferRef */ IntPtr sbuf);
|
extern static /* OSStatus */ CMSampleBufferError CMSampleBufferInvalidate (/* CMSampleBufferRef */ IntPtr sbuf);
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
public CMSampleBufferError Invalidate ()
|
public CMSampleBufferError Invalidate ()
|
||||||
{
|
{
|
||||||
return CMSampleBufferInvalidate (handle);
|
return CMSampleBufferInvalidate (handle);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
public int Invalidate()
|
|
||||||
{
|
|
||||||
return (int)CMSampleBufferInvalidate (handle);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
extern static /* Boolean */ bool CMSampleBufferIsValid (/* CMSampleBufferRef */ IntPtr sbuf);
|
extern static /* Boolean */ bool CMSampleBufferIsValid (/* CMSampleBufferRef */ IntPtr sbuf);
|
||||||
|
@ -601,38 +571,19 @@ namespace CoreMedia {
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
extern static /* OSStatus */ CMSampleBufferError CMSampleBufferMakeDataReady (IntPtr handle);
|
extern static /* OSStatus */ CMSampleBufferError CMSampleBufferMakeDataReady (IntPtr handle);
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
public CMSampleBufferError MakeDataReady ()
|
public CMSampleBufferError MakeDataReady ()
|
||||||
{
|
{
|
||||||
return CMSampleBufferMakeDataReady (handle);
|
return CMSampleBufferMakeDataReady (handle);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
public int MakeDataReady ()
|
|
||||||
{
|
|
||||||
return (int)CMSampleBufferMakeDataReady (handle);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
extern static /* OSStatus */ CMSampleBufferError CMSampleBufferSetDataBuffer (IntPtr handle, IntPtr dataBufferHandle);
|
extern static /* OSStatus */ CMSampleBufferError CMSampleBufferSetDataBuffer (IntPtr handle, IntPtr dataBufferHandle);
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
public CMSampleBufferError SetDataBuffer (CMBlockBuffer dataBuffer)
|
public CMSampleBufferError SetDataBuffer (CMBlockBuffer dataBuffer)
|
||||||
{
|
{
|
||||||
var dataBufferHandle = dataBuffer == null ? IntPtr.Zero : dataBuffer.handle;
|
var dataBufferHandle = dataBuffer == null ? IntPtr.Zero : dataBuffer.handle;
|
||||||
return CMSampleBufferSetDataBuffer (handle, dataBufferHandle);
|
return CMSampleBufferSetDataBuffer (handle, dataBufferHandle);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
public int /*CMSampleBufferError*/ SetDataBuffer (CMBlockBuffer dataBuffer)
|
|
||||||
{
|
|
||||||
var dataBufferHandle = IntPtr.Zero;
|
|
||||||
if (dataBuffer != null)
|
|
||||||
{
|
|
||||||
dataBufferHandle = dataBuffer.handle;
|
|
||||||
}
|
|
||||||
return (int)CMSampleBufferSetDataBuffer (handle, dataBufferHandle);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*[DllImport(Constants.CoreMediaLibrary)]
|
/*[DllImport(Constants.CoreMediaLibrary)]
|
||||||
int CMSampleBufferSetDataBufferFromAudioBufferList (
|
int CMSampleBufferSetDataBufferFromAudioBufferList (
|
||||||
|
@ -646,17 +597,10 @@ namespace CoreMedia {
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
extern static /* OSStatus */ CMSampleBufferError CMSampleBufferSetDataReady (/* CMSampleBufferRef */ IntPtr sbuf);
|
extern static /* OSStatus */ CMSampleBufferError CMSampleBufferSetDataReady (/* CMSampleBufferRef */ IntPtr sbuf);
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
public CMSampleBufferError SetDataReady ()
|
public CMSampleBufferError SetDataReady ()
|
||||||
{
|
{
|
||||||
return CMSampleBufferSetDataReady (handle);
|
return CMSampleBufferSetDataReady (handle);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
public int/*CMSampleBufferError*/ SetDataReady ()
|
|
||||||
{
|
|
||||||
return (int)CMSampleBufferSetDataReady (handle);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if false
|
#if false
|
||||||
// new in iOS 8 beta 5 - but the signature is not easy to bind with the AOT limitation, i.e. MonoPInvokeCallback
|
// new in iOS 8 beta 5 - but the signature is not easy to bind with the AOT limitation, i.e. MonoPInvokeCallback
|
||||||
|
@ -709,22 +653,11 @@ namespace CoreMedia {
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
extern static /* OSStatus */ CMSampleBufferError CMSampleBufferTrackDataReadiness (/* CMSampleBufferRef */ IntPtr sbuf, /* CMSampleBufferRef */ IntPtr sbufToTrack);
|
extern static /* OSStatus */ CMSampleBufferError CMSampleBufferTrackDataReadiness (/* CMSampleBufferRef */ IntPtr sbuf, /* CMSampleBufferRef */ IntPtr sbufToTrack);
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
public CMSampleBufferError TrackDataReadiness (CMSampleBuffer bufferToTrack)
|
public CMSampleBufferError TrackDataReadiness (CMSampleBuffer bufferToTrack)
|
||||||
{
|
{
|
||||||
var handleToTrack = bufferToTrack == null ? IntPtr.Zero : bufferToTrack.handle;
|
var handleToTrack = bufferToTrack == null ? IntPtr.Zero : bufferToTrack.handle;
|
||||||
return CMSampleBufferTrackDataReadiness (handle, handleToTrack);
|
return CMSampleBufferTrackDataReadiness (handle, handleToTrack);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
public int/*CMSampleBufferError*/ TrackDataReadiness (CMSampleBuffer bufferToTrack)
|
|
||||||
{
|
|
||||||
var handleToTrack = IntPtr.Zero;
|
|
||||||
if (bufferToTrack != null) {
|
|
||||||
handleToTrack = bufferToTrack.handle;
|
|
||||||
}
|
|
||||||
return (int)CMSampleBufferTrackDataReadiness (handle, handleToTrack);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
[iOS (7,0)][Mac (10,9)]
|
[iOS (7,0)][Mac (10,9)]
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
|
|
|
@ -57,14 +57,7 @@ namespace CoreMedia {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MONOMAC && !XAMCORE_2_0
|
#if !MONOMAC
|
||||||
// avoid breaking change on MonoMac.dll
|
|
||||||
[Obsolete ("The 'CMAudioClockCreate' API is only available on iOS.")]
|
|
||||||
public static CMClock CreateAudioClock (out CMClockError clockError)
|
|
||||||
{
|
|
||||||
throw new NotSupportedException ();
|
|
||||||
}
|
|
||||||
#elif !MONOMAC
|
|
||||||
// CMAudioClock.h
|
// CMAudioClock.h
|
||||||
[Mac (10,10)]
|
[Mac (10,10)]
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
|
|
|
@ -28,33 +28,18 @@ namespace CoreMedia {
|
||||||
}
|
}
|
||||||
#if !COREBUILD
|
#if !COREBUILD
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
public readonly static CMTime Invalid = new CMTime (0);
|
||||||
readonly
|
|
||||||
#endif
|
|
||||||
public static CMTime Invalid = new CMTime (0);
|
|
||||||
|
|
||||||
const Flags kIndefinite = Flags.Valid | Flags.Indefinite;
|
const Flags kIndefinite = Flags.Valid | Flags.Indefinite;
|
||||||
#if XAMCORE_2_0
|
public readonly static CMTime Indefinite = new CMTime (kIndefinite);
|
||||||
readonly
|
|
||||||
#endif
|
|
||||||
public static CMTime Indefinite = new CMTime (kIndefinite);
|
|
||||||
|
|
||||||
const Flags kPositive = Flags.Valid | Flags.PositiveInfinity;
|
const Flags kPositive = Flags.Valid | Flags.PositiveInfinity;
|
||||||
#if XAMCORE_2_0
|
public readonly static CMTime PositiveInfinity = new CMTime (kPositive);
|
||||||
readonly
|
|
||||||
#endif
|
|
||||||
public static CMTime PositiveInfinity = new CMTime (kPositive);
|
|
||||||
|
|
||||||
const Flags kNegative = Flags.Valid | Flags.NegativeInfinity;
|
const Flags kNegative = Flags.Valid | Flags.NegativeInfinity;
|
||||||
#if XAMCORE_2_0
|
public readonly static CMTime NegativeInfinity = new CMTime (kNegative);
|
||||||
readonly
|
|
||||||
#endif
|
|
||||||
public static CMTime NegativeInfinity = new CMTime (kNegative);
|
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
public readonly static CMTime Zero = new CMTime (Flags.Valid, 1);
|
||||||
readonly
|
|
||||||
#endif
|
|
||||||
public static CMTime Zero = new CMTime (Flags.Valid, 1);
|
|
||||||
|
|
||||||
public const int MaxTimeScale = 0x7fffffff;
|
public const int MaxTimeScale = 0x7fffffff;
|
||||||
|
|
||||||
|
@ -342,15 +327,6 @@ namespace CoreMedia {
|
||||||
return new NSDictionary (CMTimeCopyAsDictionary (this, IntPtr.Zero), true);
|
return new NSDictionary (CMTimeCopyAsDictionary (this, IntPtr.Zero), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
[Obsolete ("Use 'ToDictionary' instead.")]
|
|
||||||
public IntPtr AsDictionary {
|
|
||||||
get {
|
|
||||||
return CMTimeCopyAsDictionary (this, IntPtr.Zero);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
[DllImport(Constants.CoreMediaLibrary)]
|
[DllImport(Constants.CoreMediaLibrary)]
|
||||||
extern static /* CFStringRef */ IntPtr CMTimeCopyDescription (/* CFAllocatorRef */ IntPtr allocator, CMTime time);
|
extern static /* CFStringRef */ IntPtr CMTimeCopyDescription (/* CFAllocatorRef */ IntPtr allocator, CMTime time);
|
||||||
|
|
||||||
|
@ -374,16 +350,6 @@ namespace CoreMedia {
|
||||||
throw new ArgumentNullException ("dict");
|
throw new ArgumentNullException ("dict");
|
||||||
return CMTimeMakeFromDictionary (dict.Handle);
|
return CMTimeMakeFromDictionary (dict.Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
#if !WATCH
|
|
||||||
[Obsolete ("Use 'FromDictionary (NSDictionary)' instead.")]
|
|
||||||
public static CMTime FromDictionary (IntPtr dict)
|
|
||||||
{
|
|
||||||
return CMTimeMakeFromDictionary (dict);
|
|
||||||
}
|
|
||||||
#endif // !WATCH
|
|
||||||
#endif // !XAMCORE_2_0
|
|
||||||
#endif // !COREBUILD
|
#endif // !COREBUILD
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,13 +25,6 @@ namespace CoreMedia {
|
||||||
ClosedCaption = 1668047728, // 'clcp'
|
ClosedCaption = 1668047728, // 'clcp'
|
||||||
Subtitle = 1935832172, // 'sbtl'
|
Subtitle = 1935832172, // 'sbtl'
|
||||||
TimeCode = 1953325924, // 'tmcd'
|
TimeCode = 1953325924, // 'tmcd'
|
||||||
#if !XAMCORE_2_0
|
|
||||||
#if !WATCH
|
|
||||||
// not part of the header file anymore
|
|
||||||
[Obsolete ("Use 'Metadata' instead.")]
|
|
||||||
TimedMetadata = 1953326452, // 'tmet'
|
|
||||||
#endif // !WATCH
|
|
||||||
#endif // !XAMCORE_2_0
|
|
||||||
// note: the 4CC was obsoleted, i.e. Metadata is a new 4CC
|
// note: the 4CC was obsoleted, i.e. Metadata is a new 4CC
|
||||||
Metadata = 0x6D657461, // 'meta'
|
Metadata = 0x6D657461, // 'meta'
|
||||||
}
|
}
|
||||||
|
@ -270,7 +263,6 @@ namespace CoreMedia {
|
||||||
Hevc = 0x68766331
|
Hevc = 0x68766331
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
// CMVideoDimensions => int32_t width + int32_t height
|
// CMVideoDimensions => int32_t width + int32_t height
|
||||||
[Watch (6,0)]
|
[Watch (6,0)]
|
||||||
public struct CMVideoDimensions {
|
public struct CMVideoDimensions {
|
||||||
|
@ -283,7 +275,6 @@ namespace CoreMedia {
|
||||||
Height = height;
|
Height = height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// UInt32 enum => CMFormatDescription.h
|
// UInt32 enum => CMFormatDescription.h
|
||||||
[Watch (6,0)]
|
[Watch (6,0)]
|
||||||
|
|
|
@ -161,16 +161,8 @@ namespace CoreMidi {
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MidiObject
|
public class MidiObject
|
||||||
#if !XAMCORE_2_0
|
|
||||||
#if !COREBUILD
|
|
||||||
: IDisposable, INativeObject
|
|
||||||
#else
|
|
||||||
: INativeObject
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#if !COREBUILD
|
#if !COREBUILD
|
||||||
: IDisposable
|
: IDisposable
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if !COREBUILD
|
#if !COREBUILD
|
||||||
|
@ -280,15 +272,9 @@ namespace CoreMidi {
|
||||||
kMIDIPropertyNameConfigurationDictionary = Dlfcn.GetIntPtr (midiLibrary, "kMIDIPropertyNameConfigurationDictionary");
|
kMIDIPropertyNameConfigurationDictionary = Dlfcn.GetIntPtr (midiLibrary, "kMIDIPropertyNameConfigurationDictionary");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
public MidiObjectRef Handle {
|
public MidiObjectRef Handle {
|
||||||
get { return handle; }
|
get { return handle; }
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
public IntPtr Handle {
|
|
||||||
get { return (IntPtr) handle; }
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
internal MidiObjectRef MidiHandle {
|
internal MidiObjectRef MidiHandle {
|
||||||
get { return handle; }
|
get { return handle; }
|
||||||
|
@ -422,14 +408,6 @@ namespace CoreMidi {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
[Obsolete ("Use the (int) overload instead.")]
|
|
||||||
public MidiObject (IntPtr handle)
|
|
||||||
: this ((int) handle, true)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public MidiObject (MidiObjectRef handle)
|
public MidiObject (MidiObjectRef handle)
|
||||||
: this (handle, true)
|
: this (handle, true)
|
||||||
{
|
{
|
||||||
|
@ -461,11 +439,7 @@ namespace CoreMidi {
|
||||||
GC.SuppressFinalize (this);
|
GC.SuppressFinalize (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
protected virtual void Dispose (bool disposing)
|
protected virtual void Dispose (bool disposing)
|
||||||
#else
|
|
||||||
public virtual void Dispose (bool disposing)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
DisposeHandle ();
|
DisposeHandle ();
|
||||||
}
|
}
|
||||||
|
@ -569,24 +543,6 @@ namespace CoreMidi {
|
||||||
return Name;
|
return Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
[Obsolete ("It is better to use 'CreateVirtualSource (string name, out MidiError statusCode)' to flag errors.")]
|
|
||||||
public MidiEndpoint CreateVirtualSource (string name)
|
|
||||||
{
|
|
||||||
using (var nsstr = new NSString (name)){
|
|
||||||
MidiObjectRef ret;
|
|
||||||
var code = MIDISourceCreate (handle, nsstr.Handle, out ret);
|
|
||||||
if (code != 0){
|
|
||||||
if (code == (int)MidiError.NotPermitted){
|
|
||||||
Console.WriteLine ("Does your Info.plist contain a UIBackgroundModes to contain the key 'audio'?");
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return new MidiEndpoint (ret, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public MidiEndpoint CreateVirtualSource (string name, out MidiError statusCode)
|
public MidiEndpoint CreateVirtualSource (string name, out MidiError statusCode)
|
||||||
{
|
{
|
||||||
using (var nsstr = new NSString (name)){
|
using (var nsstr = new NSString (name)){
|
||||||
|
@ -691,11 +647,7 @@ namespace CoreMidi {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
protected override void Dispose (bool disposing)
|
protected override void Dispose (bool disposing)
|
||||||
#else
|
|
||||||
public override void Dispose (bool disposing)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
SetupChanged = null;
|
SetupChanged = null;
|
||||||
ObjectAdded = null;
|
ObjectAdded = null;
|
||||||
|
@ -965,11 +917,7 @@ namespace CoreMidi {
|
||||||
gch.Free ();
|
gch.Free ();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
protected override void Dispose (bool disposing)
|
protected override void Dispose (bool disposing)
|
||||||
#else
|
|
||||||
public override void Dispose (bool disposing)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
MessageReceived = null;
|
MessageReceived = null;
|
||||||
base.Dispose (disposing);
|
base.Dispose (disposing);
|
||||||
|
@ -1169,7 +1117,6 @@ namespace CoreMidi {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
public bool IsBroadcast {
|
public bool IsBroadcast {
|
||||||
get {
|
get {
|
||||||
return GetInt (kMIDIPropertyIsBroadcast) != 0;
|
return GetInt (kMIDIPropertyIsBroadcast) != 0;
|
||||||
|
@ -1178,16 +1125,6 @@ namespace CoreMidi {
|
||||||
SetInt (kMIDIPropertyIsBroadcast, value ? 1 : 0);
|
SetInt (kMIDIPropertyIsBroadcast, value ? 1 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
public int IsBroadcast {
|
|
||||||
get {
|
|
||||||
return GetInt (kMIDIPropertyIsBroadcast);
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
SetInt (kMIDIPropertyIsBroadcast, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public bool IsDrumMachine {
|
public bool IsDrumMachine {
|
||||||
get {
|
get {
|
||||||
|
@ -2032,11 +1969,7 @@ namespace CoreMidi {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
protected override void Dispose (bool disposing)
|
protected override void Dispose (bool disposing)
|
||||||
#else
|
|
||||||
public override void Dispose (bool disposing)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
MessageReceived = null;
|
MessageReceived = null;
|
||||||
base.Dispose (disposing);
|
base.Dispose (disposing);
|
||||||
|
@ -2152,7 +2085,6 @@ namespace CoreMidi {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
public bool IsBroadcast {
|
public bool IsBroadcast {
|
||||||
get {
|
get {
|
||||||
return GetInt (kMIDIPropertyIsBroadcast) != 0;
|
return GetInt (kMIDIPropertyIsBroadcast) != 0;
|
||||||
|
@ -2161,16 +2093,6 @@ namespace CoreMidi {
|
||||||
SetInt (kMIDIPropertyIsBroadcast, value ? 1 : 0);
|
SetInt (kMIDIPropertyIsBroadcast, value ? 1 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
public int IsBroadcast {
|
|
||||||
get {
|
|
||||||
return GetInt (kMIDIPropertyIsBroadcast);
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
SetInt (kMIDIPropertyIsBroadcast, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public string Manufacturer {
|
public string Manufacturer {
|
||||||
get {
|
get {
|
||||||
|
|
|
@ -6,65 +6,7 @@ using System;
|
||||||
|
|
||||||
namespace CoreMotion {
|
namespace CoreMotion {
|
||||||
|
|
||||||
#if !XAMCORE_2_0 && !MONOMAC
|
|
||||||
public partial class CMAttitude {
|
|
||||||
|
|
||||||
[Obsolete ("This type is not meant to be created by application code")]
|
|
||||||
public CMAttitude () : base (IntPtr.Zero)
|
|
||||||
{
|
|
||||||
// calling ToString, 'description' selector, would crash the application
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public partial class CMDeviceMotion {
|
|
||||||
|
|
||||||
[Obsolete ("This type is not meant to be created by application code")]
|
|
||||||
public CMDeviceMotion () : base (IntPtr.Zero)
|
|
||||||
{
|
|
||||||
// calling ToString, 'description' selector, would crash the application
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public partial class CMGyroData {
|
|
||||||
|
|
||||||
[Obsolete ("This type is not meant to be created by application code")]
|
|
||||||
public CMGyroData () : base (IntPtr.Zero)
|
|
||||||
{
|
|
||||||
// calling ToString, 'description' selector, would crash the application
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public partial class CMMagnetometerData {
|
|
||||||
|
|
||||||
[Obsolete ("This type is not meant to be created by application code")]
|
|
||||||
public CMMagnetometerData () : base (IntPtr.Zero)
|
|
||||||
{
|
|
||||||
// calling ToString, 'description' selector, would crash the application
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public partial class CMLogItem {
|
|
||||||
|
|
||||||
[Obsolete ("This type is not meant to be created by application code")]
|
|
||||||
public CMLogItem () : base (IntPtr.Zero)
|
|
||||||
{
|
|
||||||
// calling ObjC init would crash when calling it's Timestamp property
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public partial class CMAccelerometerData {
|
public partial class CMAccelerometerData {
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
[Obsolete ("This type is not meant to be created by application code")]
|
|
||||||
public CMAccelerometerData ()
|
|
||||||
{
|
|
||||||
// calling ObjC init would crash when calling it's (base) Timestamp property
|
|
||||||
// or Acceleration property - which is exactly what ToString does (and what
|
|
||||||
// the debugger does since it calls ToString).
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public override string ToString ()
|
public override string ToString ()
|
||||||
{
|
{
|
||||||
return String.Format ("t={0} {1}", Acceleration.ToString (), Timestamp);
|
return String.Format ("t={0} {1}", Acceleration.ToString (), Timestamp);
|
||||||
|
|
|
@ -66,7 +66,6 @@ namespace CoreText {
|
||||||
return ((NSNumber) value).Int32Value;
|
return ((NSNumber) value).Int32Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
public static nuint? GetUnsignedIntegerValue (IDictionary<NSObject, NSObject> dictionary, NSObject key)
|
public static nuint? GetUnsignedIntegerValue (IDictionary<NSObject, NSObject> dictionary, NSObject key)
|
||||||
{
|
{
|
||||||
var value = dictionary [key];
|
var value = dictionary [key];
|
||||||
|
@ -74,7 +73,6 @@ namespace CoreText {
|
||||||
return null;
|
return null;
|
||||||
return ((NSNumber) value).NUIntValue;
|
return ((NSNumber) value).NUIntValue;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
public static T[] GetNativeArray<T> (NSDictionary dictionary, NSObject key, Converter<IntPtr, T> converter)
|
public static T[] GetNativeArray<T> (NSDictionary dictionary, NSObject key, Converter<IntPtr, T> converter)
|
||||||
{
|
{
|
||||||
|
@ -156,7 +154,6 @@ namespace CoreText {
|
||||||
dictionary.Remove (key);
|
dictionary.Remove (key);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
public static void SetValue (IDictionary<NSObject, NSObject> dictionary, NSObject key, nuint? value)
|
public static void SetValue (IDictionary<NSObject, NSObject> dictionary, NSObject key, nuint? value)
|
||||||
{
|
{
|
||||||
if (value.HasValue)
|
if (value.HasValue)
|
||||||
|
@ -164,7 +161,6 @@ namespace CoreText {
|
||||||
else
|
else
|
||||||
dictionary.Remove (key);
|
dictionary.Remove (key);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
public static void SetValue (IDictionary<NSObject, NSObject> dictionary, NSObject key, IEnumerable<string> value)
|
public static void SetValue (IDictionary<NSObject, NSObject> dictionary, NSObject key, IEnumerable<string> value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -227,14 +227,6 @@ namespace CoreText {
|
||||||
|
|
||||||
public NSDictionary Dictionary {get; private set;}
|
public NSDictionary Dictionary {get; private set;}
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
[Advice ("Use 'FeatureGroup' property instead.")]
|
|
||||||
public NSNumber Identifier {
|
|
||||||
get {return (NSNumber) Dictionary [CTFontFeatureKey.Identifier];}
|
|
||||||
set {Adapter.SetValue (Dictionary, CTFontFeatureKey.Identifier, value);}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public string Name {
|
public string Name {
|
||||||
get {return Adapter.GetStringValue (Dictionary, CTFontFeatureKey.Name);}
|
get {return Adapter.GetStringValue (Dictionary, CTFontFeatureKey.Name);}
|
||||||
set {Adapter.SetValue (Dictionary, CTFontFeatureKey.Name, value);}
|
set {Adapter.SetValue (Dictionary, CTFontFeatureKey.Name, value);}
|
||||||
|
@ -377,14 +369,6 @@ namespace CoreText {
|
||||||
|
|
||||||
public NSDictionary Dictionary {get; private set;}
|
public NSDictionary Dictionary {get; private set;}
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
[Advice ("Use one of descendant classes")]
|
|
||||||
public NSNumber Identifier {
|
|
||||||
get {return (NSNumber) Dictionary [CTFontFeatureSelectorKey.Identifier];}
|
|
||||||
set {Adapter.SetValue (Dictionary, CTFontFeatureSelectorKey.Identifier, value);}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected int FeatureWeak {
|
protected int FeatureWeak {
|
||||||
get {
|
get {
|
||||||
return (int) (NSNumber) Dictionary [CTFontFeatureSelectorKey.Identifier];
|
return (int) (NSNumber) Dictionary [CTFontFeatureSelectorKey.Identifier];
|
||||||
|
@ -1367,13 +1351,7 @@ namespace CoreText {
|
||||||
|
|
||||||
public class CTFontFeatureSettings {
|
public class CTFontFeatureSettings {
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
internal CTFontFeatureSettings (NSDictionary dictionary)
|
||||||
internal
|
|
||||||
#else
|
|
||||||
// It should be internal
|
|
||||||
public
|
|
||||||
#endif
|
|
||||||
CTFontFeatureSettings (NSDictionary dictionary)
|
|
||||||
{
|
{
|
||||||
if (dictionary == null)
|
if (dictionary == null)
|
||||||
throw new ArgumentNullException ("dictionary");
|
throw new ArgumentNullException ("dictionary");
|
||||||
|
@ -1382,28 +1360,12 @@ namespace CoreText {
|
||||||
|
|
||||||
public NSDictionary Dictionary {get; private set;}
|
public NSDictionary Dictionary {get; private set;}
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
[Advice ("Use 'FeatureGroup' property instead.")]
|
|
||||||
public NSNumber TypeIdentifier {
|
|
||||||
get {return (NSNumber) Dictionary [CTFontFeatureKey.Identifier];}
|
|
||||||
set {Adapter.SetValue (Dictionary, CTFontFeatureKey.Identifier, value);}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public FontFeatureGroup FeatureGroup {
|
public FontFeatureGroup FeatureGroup {
|
||||||
get {
|
get {
|
||||||
return (FontFeatureGroup) (int) (NSNumber) Dictionary [CTFontFeatureKey.Identifier];
|
return (FontFeatureGroup) (int) (NSNumber) Dictionary [CTFontFeatureKey.Identifier];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
[Advice ("Use 'FeatureWeak' or 'FeatureGroup' instead.")]
|
|
||||||
public NSNumber SelectorIdentifier {
|
|
||||||
get {return (NSNumber) Dictionary [CTFontFeatureSelectorKey.Identifier];}
|
|
||||||
set {Adapter.SetValue (Dictionary, CTFontFeatureSelectorKey.Identifier, value);}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public int FeatureWeak {
|
public int FeatureWeak {
|
||||||
get {
|
get {
|
||||||
return (int) (NSNumber) Dictionary [CTFontFeatureSelectorKey.Identifier];
|
return (int) (NSNumber) Dictionary [CTFontFeatureSelectorKey.Identifier];
|
||||||
|
|
|
@ -312,7 +312,6 @@ namespace CoreText {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
public CTFontManagerScope? RegistrationScope {
|
public CTFontManagerScope? RegistrationScope {
|
||||||
get {
|
get {
|
||||||
var value = Adapter.GetUnsignedIntegerValue (Dictionary, CTFontDescriptorAttributeKey.RegistrationScope);
|
var value = Adapter.GetUnsignedIntegerValue (Dictionary, CTFontDescriptorAttributeKey.RegistrationScope);
|
||||||
|
@ -323,13 +322,6 @@ namespace CoreText {
|
||||||
value.HasValue ? (nuint?) (ulong) value.Value : null);
|
value.HasValue ? (nuint?) (ulong) value.Value : null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
// TODO: docs mention CTFontManagerScope values, but I don't see any such enumeration.
|
|
||||||
public NSNumber RegistrationScope {
|
|
||||||
get {return (NSNumber) Dictionary [CTFontDescriptorAttributeKey.RegistrationScope];}
|
|
||||||
set {Adapter.SetValue (Dictionary, CTFontDescriptorAttributeKey.RegistrationScope, value);}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public CTFontPriority? Priority {
|
public CTFontPriority? Priority {
|
||||||
get {
|
get {
|
||||||
|
@ -457,18 +449,6 @@ namespace CoreText {
|
||||||
[DllImport (Constants.CoreTextLibrary)]
|
[DllImport (Constants.CoreTextLibrary)]
|
||||||
static extern IntPtr CTFontDescriptorCreateCopyWithFeature (IntPtr original, IntPtr featureTypeIdentifier, IntPtr featureSelectorIdentifier);
|
static extern IntPtr CTFontDescriptorCreateCopyWithFeature (IntPtr original, IntPtr featureTypeIdentifier, IntPtr featureSelectorIdentifier);
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
[Advice ("Use 'WithFeature' with specific selector.")]
|
|
||||||
public CTFontDescriptor WithFeature (NSNumber featureTypeIdentifier, NSNumber featureSelectorIdentifier)
|
|
||||||
{
|
|
||||||
if (featureTypeIdentifier == null)
|
|
||||||
throw new ArgumentNullException ("featureTypeIdentifier");
|
|
||||||
if (featureSelectorIdentifier == null)
|
|
||||||
throw new ArgumentNullException ("featureSelectorIdentifier");
|
|
||||||
return CreateDescriptor (CTFontDescriptorCreateCopyWithFeature (handle, featureTypeIdentifier.Handle, featureSelectorIdentifier.Handle));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public CTFontDescriptor WithFeature (CTFontFeatureAllTypographicFeatures.Selector featureSelector)
|
public CTFontDescriptor WithFeature (CTFontFeatureAllTypographicFeatures.Selector featureSelector)
|
||||||
{
|
{
|
||||||
return WithFeature (FontFeatureGroup.AllTypographicFeatures, (int) featureSelector);
|
return WithFeature (FontFeatureGroup.AllTypographicFeatures, (int) featureSelector);
|
||||||
|
@ -484,14 +464,6 @@ namespace CoreText {
|
||||||
return WithFeature (FontFeatureGroup.CursiveConnection, (int) featureSelector);
|
return WithFeature (FontFeatureGroup.CursiveConnection, (int) featureSelector);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
[Obsolete]
|
|
||||||
public CTFontDescriptor WithFeature (CTFontFeatureLetterCase.Selector featureSelector)
|
|
||||||
{
|
|
||||||
return WithFeature (FontFeatureGroup.LetterCase, (int) featureSelector);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public CTFontDescriptor WithFeature (CTFontFeatureVerticalSubstitutionConnection.Selector featureSelector)
|
public CTFontDescriptor WithFeature (CTFontFeatureVerticalSubstitutionConnection.Selector featureSelector)
|
||||||
{
|
{
|
||||||
return WithFeature (FontFeatureGroup.VerticalSubstitution, (int) featureSelector);
|
return WithFeature (FontFeatureGroup.VerticalSubstitution, (int) featureSelector);
|
||||||
|
|
|
@ -57,7 +57,6 @@ namespace CoreText {
|
||||||
handle = GCHandle.Alloc (this);
|
handle = GCHandle.Alloc (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
~CTRunDelegateOperations ()
|
~CTRunDelegateOperations ()
|
||||||
{
|
{
|
||||||
Dispose (false);
|
Dispose (false);
|
||||||
|
@ -72,11 +71,6 @@ namespace CoreText {
|
||||||
protected virtual void Dispose (bool disposing)
|
protected virtual void Dispose (bool disposing)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
public virtual void Dispose ()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if XAMCORE_4_0
|
#if XAMCORE_4_0
|
||||||
public virtual nfloat GetAscent ()
|
public virtual nfloat GetAscent ()
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
// Copyright 2017 Xamarin Inc. All rights reserved.
|
// Copyright 2017 Xamarin Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using ObjCRuntime;
|
using ObjCRuntime;
|
||||||
using CoreFoundation;
|
using CoreFoundation;
|
||||||
|
@ -985,4 +983,3 @@ namespace CoreML {
|
||||||
bool Write (NSUrl url, [NullAllowed] out NSError error);
|
bool Write (NSUrl url, [NullAllowed] out NSError error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // XAMCORE_2_0
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
// Copyright 2017 Xamarin Inc. All rights reserved.
|
// Copyright 2017 Xamarin Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using ObjCRuntime;
|
using ObjCRuntime;
|
||||||
using CoreFoundation;
|
using CoreFoundation;
|
||||||
|
@ -937,4 +935,3 @@ namespace CoreNFC {
|
||||||
IntPtr Constructor (NFCVasCommandConfiguration[] commandConfigurations, INFCVasReaderSessionDelegate @delegate, [NullAllowed] DispatchQueue queue);
|
IntPtr Constructor (NFCVasCommandConfiguration[] commandConfigurations, INFCVasReaderSessionDelegate @delegate, [NullAllowed] DispatchQueue queue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
|
@ -26,10 +26,6 @@ namespace CoreTelephony {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
delegate void CTCarrierEventHandler (CTCarrier call);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
[Static]
|
[Static]
|
||||||
[iOS (7,0)]
|
[iOS (7,0)]
|
||||||
interface CTRadioAccessTechnology {
|
interface CTRadioAccessTechnology {
|
||||||
|
@ -88,11 +84,7 @@ namespace CoreTelephony {
|
||||||
[Deprecated (PlatformName.iOS, 12,0, message: "Use 'ServiceSubscriberCellularProvidersDidUpdateNotifier' instead.")]
|
[Deprecated (PlatformName.iOS, 12,0, message: "Use 'ServiceSubscriberCellularProvidersDidUpdateNotifier' instead.")]
|
||||||
[NullAllowed] // by default this property is null
|
[NullAllowed] // by default this property is null
|
||||||
[Export ("subscriberCellularProviderDidUpdateNotifier")]
|
[Export ("subscriberCellularProviderDidUpdateNotifier")]
|
||||||
#if XAMCORE_2_0
|
|
||||||
Action<CTCarrier> CellularProviderUpdatedEventHandler { get; set; }
|
Action<CTCarrier> CellularProviderUpdatedEventHandler { get; set; }
|
||||||
#else
|
|
||||||
CTCarrierEventHandler CellularProviderUpdatedEventHandler { get; set; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
[Deprecated (PlatformName.iOS, 12,0, message: "Use 'ServiceCurrentRadioAccessTechnology' instead.")]
|
[Deprecated (PlatformName.iOS, 12,0, message: "Use 'ServiceCurrentRadioAccessTechnology' instead.")]
|
||||||
[iOS (7,0), Export ("currentRadioAccessTechnology")]
|
[iOS (7,0), Export ("currentRadioAccessTechnology")]
|
||||||
|
@ -133,21 +125,13 @@ namespace CoreTelephony {
|
||||||
NSObject WeakDelegate { get; set; }
|
NSObject WeakDelegate { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
delegate void CTCallEventHandler (CTCall call);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
[Deprecated (PlatformName.iOS, 10, 0, message: "Replaced by 'CXCallObserver' from 'CallKit'.")]
|
[Deprecated (PlatformName.iOS, 10, 0, message: "Replaced by 'CXCallObserver' from 'CallKit'.")]
|
||||||
[BaseType (typeof (NSObject))]
|
[BaseType (typeof (NSObject))]
|
||||||
interface CTCallCenter {
|
interface CTCallCenter {
|
||||||
[Availability (Deprecated = Platform.iOS_10_0, Message = "Use 'CallKit' instead.")]
|
[Availability (Deprecated = Platform.iOS_10_0, Message = "Use 'CallKit' instead.")]
|
||||||
[NullAllowed] // by default this property is null
|
[NullAllowed] // by default this property is null
|
||||||
[Export ("callEventHandler")]
|
[Export ("callEventHandler")]
|
||||||
#if XAMCORE_2_0
|
|
||||||
Action<CTCall> CallEventHandler { get; set; }
|
Action<CTCall> CallEventHandler { get; set; }
|
||||||
#else
|
|
||||||
CTCallEventHandler CallEventHandler { get; set; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
[Availability (Deprecated = Platform.iOS_10_0, Message = "Use 'CallKit' instead.")]
|
[Availability (Deprecated = Platform.iOS_10_0, Message = "Use 'CallKit' instead.")]
|
||||||
[Export ("currentCalls")]
|
[Export ("currentCalls")]
|
||||||
|
@ -210,10 +194,6 @@ namespace CoreTelephony {
|
||||||
ICTSubscriberDelegate Delegate { get; set; }
|
ICTSubscriberDelegate Delegate { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !XAMCORE_2_0
|
|
||||||
delegate void SimAuthenticationCallback (NSDictionary dictionary);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
[BaseType (typeof (NSObject))]
|
[BaseType (typeof (NSObject))]
|
||||||
partial interface CTSubscriberInfo {
|
partial interface CTSubscriberInfo {
|
||||||
[Deprecated (PlatformName.iOS, 12, 1, message : "Use 'Subscribers' instead.")]
|
[Deprecated (PlatformName.iOS, 12, 1, message : "Use 'Subscribers' instead.")]
|
||||||
|
|
|
@ -13,11 +13,7 @@ using ObjCRuntime;
|
||||||
|
|
||||||
namespace CoreText {
|
namespace CoreText {
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
[Static]
|
[Static]
|
||||||
#else
|
|
||||||
[Partial]
|
|
||||||
#endif
|
|
||||||
interface CTFontFeatureKey {
|
interface CTFontFeatureKey {
|
||||||
[Field ("kCTFontFeatureTypeIdentifierKey")]
|
[Field ("kCTFontFeatureTypeIdentifierKey")]
|
||||||
NSString Identifier { get; }
|
NSString Identifier { get; }
|
||||||
|
@ -32,11 +28,7 @@ namespace CoreText {
|
||||||
NSString Selectors { get; }
|
NSString Selectors { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#if XAMCORE_2_0
|
|
||||||
[Static]
|
[Static]
|
||||||
#else
|
|
||||||
[Partial]
|
|
||||||
#endif
|
|
||||||
interface CTFontFeatureSelectorKey {
|
interface CTFontFeatureSelectorKey {
|
||||||
[Field ("kCTFontFeatureSelectorIdentifierKey")]
|
[Field ("kCTFontFeatureSelectorIdentifierKey")]
|
||||||
NSString Identifier { get; }
|
NSString Identifier { get; }
|
||||||
|
|
Загрузка…
Ссылка в новой задаче