Merge pull request #3086 from VincentDondain/xcode9.2-merge
Xcode 9.2 merge
This commit is contained in:
Коммит
c32474b7e9
12
Make.config
12
Make.config
|
@ -55,9 +55,9 @@ IOS_PACKAGE_VERSION_REV=$(PACKAGE_VERSION_REV)
|
|||
IOS_PACKAGE_VERSION_BUILD=$(IOS_COMMIT_DISTANCE)
|
||||
IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(IOS_PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD))
|
||||
|
||||
XCODE_VERSION=9.1
|
||||
XCODE_URL=http://xamarin-storage/bot-provisioning/Xcode_9.1.xip
|
||||
XCODE_DEVELOPER_ROOT=/Applications/Xcode91.app/Contents/Developer
|
||||
XCODE_VERSION=9.2
|
||||
XCODE_URL=http://xamarin-storage/bot-provisioning/Xcode_9.2.xip
|
||||
XCODE_DEVELOPER_ROOT=/Applications/Xcode92.app/Contents/Developer
|
||||
|
||||
# Minimum Mono version
|
||||
MIN_MONO_VERSION=5.8.0.0
|
||||
|
@ -83,10 +83,10 @@ MIN_OSX_BUILD_VERSION=10.12
|
|||
MIN_OSX_VERSION_FOR_IOS=10.11
|
||||
MIN_OSX_VERSION_FOR_MAC=10.11
|
||||
|
||||
IOS_SDK_VERSION=11.1
|
||||
IOS_SDK_VERSION=11.2
|
||||
OSX_SDK_VERSION=10.13
|
||||
WATCH_SDK_VERSION=4.1
|
||||
TVOS_SDK_VERSION=11.1
|
||||
WATCH_SDK_VERSION=4.2
|
||||
TVOS_SDK_VERSION=11.2
|
||||
|
||||
MIN_IOS_SDK_VERSION=6.0
|
||||
MIN_OSX_SDK_VERSION=10.7
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
<string>10.3</string>
|
||||
<string>11.0</string>
|
||||
<string>11.1</string>
|
||||
<string>11.2</string>
|
||||
</array>
|
||||
<key>tvOS</key>
|
||||
<array>
|
||||
|
@ -38,6 +39,7 @@
|
|||
<string>10.2</string>
|
||||
<string>11.0</string>
|
||||
<string>11.1</string>
|
||||
<string>11.2</string>
|
||||
</array>
|
||||
<key>watchOS</key>
|
||||
<array>
|
||||
|
@ -50,6 +52,7 @@
|
|||
<string>3.2</string>
|
||||
<string>4.0</string>
|
||||
<string>4.1</string>
|
||||
<string>4.2</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>RecommendedXcodeVersion</key>
|
||||
|
|
|
@ -92,6 +92,28 @@ namespace XamCore.AVFoundation {
|
|||
}
|
||||
}
|
||||
|
||||
#if !MONOMAC
|
||||
partial class AVSampleBufferAudioRenderer
|
||||
{
|
||||
[Obsolete ("This API is not available on this platform.")]
|
||||
public virtual string AudioOutputDeviceUniqueId {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !IOS
|
||||
partial class AVContentKeyRequest
|
||||
{
|
||||
[Obsolete ("This API is not available on this platform.")]
|
||||
public virtual void RespondByRequestingPersistableContentKeyRequest ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if TVOS
|
||||
// tvOS removed some types - we need to keep stubs of them for binary compatibility
|
||||
[Obsolete ("Removed in tvOS 10.")]
|
||||
|
|
|
@ -243,6 +243,20 @@ namespace XamCore.AVFoundation {
|
|||
UnsupportedOutputSettings = -11861,
|
||||
[NoWatch, iOS (10,0), TV (10,0), Mac (10,12)]
|
||||
OperationNotAllowed = -11862,
|
||||
[NoWatch, iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
ContentIsUnavailable = -11863,
|
||||
[NoWatch, iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
FormatUnsupported = -11864,
|
||||
[NoWatch, iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
MalformedDepth = -11865,
|
||||
[NoWatch, iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
ContentNotUpdated = -11866,
|
||||
[NoWatch, iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
NoLongerPlayable = -11867,
|
||||
[NoWatch, iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
NoCompatibleAlternatesForExternalDisplay = -11868,
|
||||
[NoWatch, iOS (11,2), TV (11,2), Mac (10,13,2)]
|
||||
NoSourceTrack = -11869,
|
||||
}
|
||||
|
||||
[NoWatch]
|
||||
|
@ -990,4 +1004,13 @@ namespace XamCore.AVFoundation {
|
|||
PeakPower = (1 << 1),
|
||||
DepthModuleTemperature = (1 << 2)
|
||||
}
|
||||
|
||||
[TV (11,2), NoWatch, NoMac, iOS (11,2)]
|
||||
[Native]
|
||||
[Flags]
|
||||
public enum AVPlayerHdrMode : nint {
|
||||
Hlg = 0x1,
|
||||
Hdr10 = 0x2,
|
||||
DolbyVision = 0x4,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1223,7 +1223,11 @@ namespace XamCore.AppKit {
|
|||
|
||||
// NSStackView.h:typedef float NSStackViewVisibilityPriority
|
||||
public enum NSStackViewVisibilityPriority : int {
|
||||
Musthold = 1000,
|
||||
MustHold = 1000,
|
||||
#if !XAMCORE_4_0
|
||||
[Obsolete ("Use 'MustHold' instead.")]
|
||||
Musthold = MustHold,
|
||||
#endif
|
||||
DetachOnlyIfNecessary = 900,
|
||||
NotVisible = 0
|
||||
}
|
||||
|
@ -1981,7 +1985,11 @@ namespace XamCore.AppKit {
|
|||
public enum NSOpenGLPixelFormatAttribute : uint_compat_int { // uint32_t NSOpenGLPixelFormatAttribute
|
||||
AllRenderers = 1,
|
||||
DoubleBuffer = 5,
|
||||
[Lion] TrippleBuffer = 3,
|
||||
[Lion] TripleBuffer = 3,
|
||||
#if !XAMCORE_4_0
|
||||
[Obsolete ("Use 'TripleBuffer' instead.")]
|
||||
[Lion] TrippleBuffer = TripleBuffer,
|
||||
#endif
|
||||
Stereo = 6,
|
||||
AuxBuffers = 7,
|
||||
ColorSize = 8,
|
||||
|
|
|
@ -13,5 +13,14 @@ namespace XamCore.AppKit {
|
|||
{
|
||||
_RegisterClassForSupplementaryView (viewClass == null ? IntPtr.Zero : Class.GetHandle (viewClass), kind, identifier);
|
||||
}
|
||||
|
||||
#if !XAMCORE_4_0
|
||||
[Mac (10, 11)]
|
||||
[Obsolete ("Use 'GetLayoutAttributes' instead.")]
|
||||
public virtual NSCollectionViewLayoutAttributes GetLayoutAttributest (string kind, NSIndexPath indexPath)
|
||||
{
|
||||
return GetLayoutAttributes (kind, indexPath);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,5 +37,13 @@ namespace XamCore.AppKit {
|
|||
}
|
||||
return returnArray;
|
||||
}
|
||||
|
||||
#if !XAMCORE_4_0
|
||||
[Obsolete ("Use 'GetIntAttribute' instead.")]
|
||||
public virtual nint IntAttributeforGlyphAtIndex (nint attributeTag, nint glyphIndex)
|
||||
{
|
||||
return GetIntAttribute (attributeTag, glyphIndex);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,5 +132,6 @@ namespace MonoMac {
|
|||
public const string IOSurfaceLibrary = "/System/Library/Frameworks/IOSurface.framework/IOSurface";
|
||||
public const string PhotosUILibrary = "/System/Library/Frameworks/PhotosUI.framework/PhotosUI";
|
||||
public const string ExternalAccessoryLibrary = "/System/Library/Frameworks/ExternalAccessory.framework/ExternalAccessory";
|
||||
public const string MetalPerformanceShadersLibrary = "/System/Library/Frameworks/MetalPerformanceShaders.framework/MetalPerformanceShaders";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -311,6 +311,8 @@ namespace XamCore.CoreGraphics {
|
|||
[DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)]
|
||||
extern static void CGEventSetTimestamp (IntPtr handle, ulong timeStampp);
|
||||
|
||||
#if !XAMCORE_4_0
|
||||
[Obsolete ("Use 'Timestamp' instead.")]
|
||||
public ulong Timestampe {
|
||||
get {
|
||||
return CGEventGetTimestamp (handle);
|
||||
|
@ -319,6 +321,16 @@ namespace XamCore.CoreGraphics {
|
|||
CGEventSetTimestamp (handle, value);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
public ulong Timestamp {
|
||||
get {
|
||||
return CGEventGetTimestamp (handle);
|
||||
}
|
||||
set {
|
||||
CGEventSetTimestamp (handle, value);
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)]
|
||||
extern static void CGEventTapEnable (IntPtr machPort, bool enable);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Adding new Filters:
|
||||
// * Create new class with the two constructors
|
||||
// * Create a new class/interface in coreimage.cs
|
||||
// * Add it to CIFilter.FromName switch
|
||||
// * Implement properties for each parameter
|
||||
// * Use the documented string in "Parameter" in each section as the key for the get/set methods
|
||||
|
@ -86,6 +86,26 @@
|
|||
// CIPDF417BarcodeGenerator
|
||||
// * most of OSX specicic filters are now available on iOS9
|
||||
//
|
||||
// New filters on Xcode 9
|
||||
// CIAreaMinMaxRed
|
||||
// CIAttributedTextImageGenerator
|
||||
// CIBarcodeGenerator
|
||||
// CIBicubicScaleTransform
|
||||
// CIBokehBlur
|
||||
// CIColorCubesMixedWithMask
|
||||
// CIColorCurves
|
||||
// CIDepthBlurEffect
|
||||
// CIDepthToDisparity
|
||||
// CIDisparityToDepth
|
||||
// CIEdgePreserveUpsampleFilter
|
||||
// CILabDeltaE
|
||||
// CITextImageGenerator
|
||||
// CIMorphologyGradient
|
||||
// CIMorphologyMaximum
|
||||
// CIMorphologyMinimum
|
||||
// CIBlendWithBlueMask
|
||||
// CIBlendWithRedMask
|
||||
//
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using XamCore.Foundation;
|
||||
|
@ -612,6 +632,42 @@ namespace XamCore.CoreImage {
|
|||
case "CIPDF417BarcodeGenerator":
|
||||
case "CIPdf417BarcodeGenerator":
|
||||
return new CIPdf417BarcodeGenerator (handle);
|
||||
case "CIAreaMinMaxRed":
|
||||
return new CIAreaMinMaxRed (handle);
|
||||
case "CIAttributedTextImageGenerator":
|
||||
return new CIAttributedTextImageGenerator (handle);
|
||||
case "CIBarcodeGenerator":
|
||||
return new CIBarcodeGenerator (handle);
|
||||
case "CIBicubicScaleTransform":
|
||||
return new CIBicubicScaleTransform (handle);
|
||||
case "CIBokehBlur":
|
||||
return new CIBokehBlur (handle);
|
||||
case "CIColorCubesMixedWithMask":
|
||||
return new CIColorCubesMixedWithMask (handle);
|
||||
case "CIColorCurves":
|
||||
return new CIColorCurves (handle);
|
||||
case "CIDepthBlurEffect":
|
||||
return new CIDepthBlurEffect (handle);
|
||||
case "CIDepthToDisparity":
|
||||
return new CIDepthToDisparity (handle);
|
||||
case "CIDisparityToDepth":
|
||||
return new CIDisparityToDepth (handle);
|
||||
case "CIEdgePreserveUpsampleFilter":
|
||||
return new CIEdgePreserveUpsampleFilter (handle);
|
||||
case "CILabDeltaE":
|
||||
return new CILabDeltaE (handle);
|
||||
case "CITextImageGenerator":
|
||||
return new CITextImageGenerator (handle);
|
||||
case "CIMorphologyGradient":
|
||||
return new CIMorphologyGradient (handle);
|
||||
case "CIMorphologyMaximum":
|
||||
return new CIMorphologyMaximum (handle);
|
||||
case "CIMorphologyMinimum":
|
||||
return new CIMorphologyMinimum (handle);
|
||||
case "CIBlendWithBlueMask":
|
||||
return new CIBlendWithBlueMask (handle);
|
||||
case "CIBlendWithRedMask":
|
||||
return new CIBlendWithRedMask (handle);
|
||||
default:
|
||||
throw new NotImplementedException (String.Format ("Unknown filter type returned: `{0}', returning a default CIFilter", filterName));
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ namespace XamCore.CoreImage {
|
|||
throw new ArgumentNullException ("colorSpace");
|
||||
|
||||
using (var arr = NSArray.FromIntPtrs (new IntPtr [] { colorSpace.Handle })){
|
||||
using (var keys = NSArray.FromIntPtrs (new IntPtr [] { CIImageColorSpaceKey.Handle } )){
|
||||
using (var keys = NSArray.FromIntPtrs (new IntPtr [] { CIImageInitializationOptionsKeys.ColorSpaceKey.Handle } )){
|
||||
using (var dict = NSDictionary.FromObjectsAndKeysInternal (arr, keys)){
|
||||
return FromCGImage (image, dict);
|
||||
}
|
||||
|
|
|
@ -34,30 +34,21 @@ using XamCore.CoreGraphics;
|
|||
|
||||
namespace XamCore.CoreImage {
|
||||
|
||||
public class CIImageInitializationOptions : DictionaryContainer
|
||||
public partial class CIImageInitializationOptions
|
||||
{
|
||||
#if !COREBUILD
|
||||
public CIImageInitializationOptions ()
|
||||
: base (new NSMutableDictionary ())
|
||||
{
|
||||
}
|
||||
|
||||
public CIImageInitializationOptions (NSDictionary dictionary)
|
||||
: base (dictionary)
|
||||
{
|
||||
}
|
||||
|
||||
public CGColorSpace ColorSpace {
|
||||
get {
|
||||
return GetNativeValue<CGColorSpace> (CIImage.CIImageColorSpaceKey);
|
||||
return GetNativeValue<CGColorSpace> (CIImageInitializationOptionsKeys.ColorSpaceKey);
|
||||
}
|
||||
set {
|
||||
SetNativeValue (CIImage.CIImageColorSpaceKey, value == null ? null : value);
|
||||
SetNativeValue (CIImageInitializationOptionsKeys.ColorSpaceKey, value == null ? null : value);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Keeping 'CIImageInitializationOptionsWithMetadata' to avoid breaking change
|
||||
public class CIImageInitializationOptionsWithMetadata : CIImageInitializationOptions
|
||||
{
|
||||
#if !COREBUILD
|
||||
|
@ -69,18 +60,6 @@ namespace XamCore.CoreImage {
|
|||
: base (dictionary)
|
||||
{
|
||||
}
|
||||
|
||||
public CGImageProperties Properties {
|
||||
get {
|
||||
var dict = GetNativeValue<NSDictionary> (CIImage.CIImagePropertiesKey);
|
||||
if (dict == null)
|
||||
return null;
|
||||
return new CGImageProperties (dict);
|
||||
}
|
||||
set {
|
||||
SetNativeValue (CIImage.CIImagePropertiesKey, value == null ? null : value.Dictionary, false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
using System;
|
||||
using XamCore.Foundation;
|
||||
using XamCore.ObjCRuntime;
|
||||
|
||||
namespace XamCore.CoreImage {
|
||||
public partial class CIVector {
|
||||
|
@ -35,24 +37,38 @@ namespace XamCore.CoreImage {
|
|||
return ValueAtIndex (index);
|
||||
}
|
||||
}
|
||||
|
||||
static IntPtr GetPtr (nfloat [] values)
|
||||
|
||||
public CIVector (nfloat [] values) :
|
||||
this (values, values == null ? 0 : values.Length)
|
||||
{
|
||||
}
|
||||
|
||||
[DesignatedInitializer]
|
||||
[Export ("initWithValues:count:")]
|
||||
public unsafe CIVector (nfloat [] values, nint count) : base (NSObjectFlag.Empty)
|
||||
{
|
||||
if (values == null)
|
||||
throw new ArgumentNullException (@nameof (values));
|
||||
if (count > values.Length)
|
||||
throw new ArgumentOutOfRangeException (@nameof (count));
|
||||
|
||||
fixed (nfloat *ptr = values) {
|
||||
var handle = IntPtr.Zero;
|
||||
if (IsDirectBinding) {
|
||||
handle = Messaging.IntPtr_objc_msgSend_IntPtr_nint (Handle, Selector.GetHandle ("initWithValues:count:"), (IntPtr) ptr, count);
|
||||
} else {
|
||||
handle = Messaging.IntPtr_objc_msgSendSuper_IntPtr_nint (SuperHandle, Selector.GetHandle ("initWithValues:count:"), (IntPtr) ptr, count);
|
||||
}
|
||||
InitializeHandle (handle, "initWithValues:count:");
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static CIVector FromValues (nfloat [] values)
|
||||
{
|
||||
if (values == null)
|
||||
throw new ArgumentNullException ("values");
|
||||
unsafe {
|
||||
fixed (nfloat *ptr = values)
|
||||
return (IntPtr) ptr;
|
||||
}
|
||||
}
|
||||
|
||||
public CIVector (nfloat [] values) : this (GetPtr (values), values.Length)
|
||||
{
|
||||
}
|
||||
|
||||
public static CIVector FromValues (nfloat [] values)
|
||||
{
|
||||
return _FromValues (GetPtr (values), values.Length);
|
||||
fixed (nfloat *ptr = values)
|
||||
return _FromValues ((IntPtr) ptr, values.Length);
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
|
|
|
@ -237,6 +237,8 @@ namespace XamCore.Foundation {
|
|||
throw new ArgumentNullException ("key");
|
||||
|
||||
var dict = GetNSDictionary (key);
|
||||
if (dict == null)
|
||||
return null;
|
||||
T value = (T)Activator.CreateInstance (typeof(T),
|
||||
new object[] { dict }
|
||||
);
|
||||
|
|
|
@ -102,6 +102,7 @@ namespace XamCore.Foundation {
|
|||
static IntPtr vn = Dlfcn.dlopen (Constants.VisionLibrary, 1);
|
||||
static IntPtr ios = Dlfcn.dlopen (Constants.IOSurfaceLibrary, 1);
|
||||
static IntPtr ex = Dlfcn.dlopen (Constants.ExternalAccessoryLibrary, 1);
|
||||
static IntPtr ms = Dlfcn.dlopen (Constants.MetalPerformanceShadersLibrary, 1);
|
||||
#endif
|
||||
// ** IF YOU ADD ITEMS HERE PLEASE UPDATE linker/ObjCExtensions.cs and mmp/linker/MonoMac.Tuner/MonoMacNamespaces.cs
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ namespace XamCore.HomeKit {
|
|||
[TV (10,0)]
|
||||
[Native]
|
||||
public enum HMError : nint {
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
UnexpectedError = -1,
|
||||
AlreadyExists = 1,
|
||||
NotFound = 2,
|
||||
InvalidParameter = 3,
|
||||
|
@ -146,8 +148,10 @@ namespace XamCore.HomeKit {
|
|||
[Field ("HMCharacteristicTypeHeatingThreshold")]
|
||||
HeatingThreshold,
|
||||
|
||||
#if !XAMCORE_4_0
|
||||
[Obsolete ("This value does not exist anymore and will always return null.")]
|
||||
HeatingCoolingStatus,
|
||||
#endif
|
||||
|
||||
[Field ("HMCharacteristicTypeCurrentRelativeHumidity")]
|
||||
CurrentRelativeHumidity,
|
||||
|
@ -576,6 +580,30 @@ namespace XamCore.HomeKit {
|
|||
[iOS (11,0), Watch (4,0), TV (11,0)]
|
||||
[Field ("HMCharacteristicTypeColorTemperature")]
|
||||
ColorTemperature,
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Field ("HMCharacteristicTypeProgramMode")]
|
||||
ProgramMode,
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Field ("HMCharacteristicTypeInUse")]
|
||||
InUse,
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Field ("HMCharacteristicTypeSetDuration")]
|
||||
SetDuration,
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Field ("HMCharacteristicTypeRemainingDuration")]
|
||||
RemainingDuration,
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Field ("HMCharacteristicTypeValveType")]
|
||||
ValveType,
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Field ("HMCharacteristicTypeIsConfigured")]
|
||||
IsConfigured,
|
||||
}
|
||||
|
||||
// conveniance enum (ObjC uses NSString)
|
||||
|
@ -756,6 +784,18 @@ namespace XamCore.HomeKit {
|
|||
[iOS (10,3), Watch (3,2), TV (10,2)]
|
||||
[Field ("HMServiceTypeLabel")]
|
||||
Label,
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Field ("HMServiceTypeIrrigationSystem")]
|
||||
IrrigationSystem,
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Field ("HMServiceTypeValve")]
|
||||
Valve,
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Field ("HMServiceTypeFaucet")]
|
||||
Faucet,
|
||||
}
|
||||
|
||||
// conveniance enum (ObjC uses NSString)
|
||||
|
@ -1070,6 +1110,18 @@ namespace XamCore.HomeKit {
|
|||
[iOS (10,2), TV (10,1)]
|
||||
[Field ("HMAccessoryCategoryTypeAirDehumidifier")]
|
||||
AirDehumidifier,
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Field ("HMAccessoryCategoryTypeSprinkler")]
|
||||
Sprinkler,
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Field ("HMAccessoryCategoryTypeFaucet")]
|
||||
Faucet,
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Field ("HMAccessoryCategoryTypeShowerHead")]
|
||||
ShowerHead,
|
||||
}
|
||||
|
||||
[iOS (9,0)]
|
||||
|
@ -1288,4 +1340,35 @@ namespace XamCore.HomeKit {
|
|||
HomeUsers = 2,
|
||||
CustomUsers = 3,
|
||||
}
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Native]
|
||||
public enum HMCharacteristicValueProgramMode : nint {
|
||||
NotScheduled = 0,
|
||||
Scheduled,
|
||||
ScheduleOverriddenToManual,
|
||||
}
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Native]
|
||||
public enum HMCharacteristicValueUsageState : nint {
|
||||
NotInUse = 0,
|
||||
InUse,
|
||||
}
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Native]
|
||||
public enum HMCharacteristicValueValveType : nint {
|
||||
GenericValve = 0,
|
||||
Irrigation,
|
||||
ShowerHead,
|
||||
WaterFaucet,
|
||||
}
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[Native]
|
||||
public enum HMCharacteristicValueConfigurationState : nint {
|
||||
NotConfigured = 0,
|
||||
Configured,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace XamCore.HomeKit {
|
|||
if ((serviceTypes & HMServiceType.Slats) == HMServiceType.Slats)
|
||||
arr.Add (HMServiceType.Slats.GetConstant ());
|
||||
|
||||
return _ServicesWithTypes (arr.ToArray ());
|
||||
return GetServices (arr.ToArray ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ namespace XamCore.HomeKit {
|
|||
|
||||
public virtual HMSignificantEvent SignificantEvent {
|
||||
get {
|
||||
return (HMSignificantEvent) (HMSignificantEventExtensions.GetValue (_SignificantEvent));
|
||||
return (HMSignificantEvent) (HMSignificantEventExtensions.GetValue (WeakSignificantEvent));
|
||||
}
|
||||
set {
|
||||
_SignificantEvent = HMSignificantEventExtensions.GetConstant (value);
|
||||
WeakSignificantEvent = HMSignificantEventExtensions.GetConstant (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ namespace XamCore.HomeKit {
|
|||
|
||||
public virtual HMSignificantEvent SignificantEvent {
|
||||
get {
|
||||
return (HMSignificantEvent) (HMSignificantEventExtensions.GetValue (_SignificantEvent));
|
||||
return (HMSignificantEvent) (HMSignificantEventExtensions.GetValue (WeakSignificantEvent));
|
||||
}
|
||||
set {
|
||||
_SignificantEvent = HMSignificantEventExtensions.GetConstant (value);
|
||||
WeakSignificantEvent = HMSignificantEventExtensions.GetConstant (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#if XAMCORE_2_0 || !MONOMAC
|
||||
using System;
|
||||
namespace XamCore.MetalPerformanceShaders {
|
||||
public partial class MPSCnnConvolutionDescriptor {
|
||||
public unsafe void SetBatchNormalizationParameters (float [] mean, float [] variance, float [] gamma, float [] beta, float epsilon)
|
||||
{
|
||||
fixed (void* meanHandle = mean)
|
||||
fixed (void* varianceHandle = variance)
|
||||
fixed (void* gammaHandle = gamma)
|
||||
fixed (void* betaHandle = beta)
|
||||
SetBatchNormalizationParameters ((IntPtr) meanHandle, (IntPtr) varianceHandle, (IntPtr) gammaHandle, (IntPtr) betaHandle, epsilon);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,31 @@
|
|||
#if XAMCORE_2_0 || !MONOMAC
|
||||
using System;
|
||||
using XamCore.Metal;
|
||||
using XamCore.Foundation;
|
||||
|
||||
namespace XamCore.MetalPerformanceShaders {
|
||||
public partial class MPSCnnBinaryConvolution {
|
||||
public unsafe MPSCnnBinaryConvolution (IMTLDevice device, IMPSCnnConvolutionDataSource convolutionData, float [] outputBiasTerms, float [] outputScaleTerms, float [] inputBiasTerms, float [] inputScaleTerms, MPSCnnBinaryConvolutionType type, MPSCnnBinaryConvolutionFlags flags)
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
fixed (void *outputBiasTermsHandle = outputBiasTerms)
|
||||
fixed (void* outputScaleTermsHandle = outputScaleTerms)
|
||||
fixed (void* inputBiasTermsHandle = inputBiasTerms)
|
||||
fixed (void* inputScaleTermsHandle = inputScaleTerms)
|
||||
InitializeHandle (InitWithDevice (device, convolutionData, (IntPtr) outputBiasTermsHandle, (IntPtr) outputScaleTermsHandle, (IntPtr) inputBiasTermsHandle, (IntPtr) inputScaleTermsHandle, type, flags));
|
||||
}
|
||||
}
|
||||
|
||||
public partial class MPSCnnBinaryFullyConnected {
|
||||
public unsafe MPSCnnBinaryFullyConnected (IMTLDevice device, IMPSCnnConvolutionDataSource convolutionData, float [] outputBiasTerms, float [] outputScaleTerms, float [] inputBiasTerms, float [] inputScaleTerms, MPSCnnBinaryConvolutionType type, MPSCnnBinaryConvolutionFlags flags)
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
fixed (void *outputBiasTermsHandle = outputBiasTerms)
|
||||
fixed (void* outputScaleTermsHandle = outputScaleTerms)
|
||||
fixed (void* inputBiasTermsHandle = inputBiasTerms)
|
||||
fixed (void* inputScaleTermsHandle = inputScaleTerms)
|
||||
InitializeHandle (InitWithDevice (device, convolutionData, (IntPtr) outputBiasTermsHandle, (IntPtr) outputScaleTermsHandle, (IntPtr) inputBiasTermsHandle, (IntPtr) inputScaleTermsHandle, type, flags));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,15 @@
|
|||
#if XAMCORE_2_0 || !MONOMAC
|
||||
using System;
|
||||
using XamCore.Metal;
|
||||
using XamCore.Foundation;
|
||||
|
||||
namespace XamCore.MetalPerformanceShaders {
|
||||
public partial class MPSCnnNeuronPReLU {
|
||||
public unsafe MPSCnnNeuronPReLU (IMTLDevice device, float [] a) : this (NSObjectFlag.Empty)
|
||||
{
|
||||
fixed (void* aHandle = a)
|
||||
InitializeHandle (InitWithDevice (device, (IntPtr) aHandle, (nuint)a.Length));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
#if XAMCORE_2_0 || !MONOMAC
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using XamCore.Foundation;
|
||||
|
@ -8,23 +9,24 @@ using Vector4 = global::OpenTK.Vector4;
|
|||
|
||||
namespace XamCore.MetalPerformanceShaders {
|
||||
|
||||
[iOS (9,0)]
|
||||
[iOS (9,0)][Mac (10, 13, onlyOn64: true)]
|
||||
[Native] // NSUInteger
|
||||
[Flags] // NS_OPTIONS
|
||||
public enum MPSKernelOptions : nuint {
|
||||
None = 0,
|
||||
SkipApiValidation = 1 << 0,
|
||||
MPSKernelOptionsAllowReducedPrecision = 1 << 1,
|
||||
Verbose = 1 << 4,
|
||||
}
|
||||
|
||||
[iOS (9,0)]
|
||||
[iOS (9,0)][Mac (10, 13, onlyOn64: true)]
|
||||
[Native] // NSUInteger
|
||||
public enum MPSImageEdgeMode : nuint {
|
||||
Zero,
|
||||
Clamp = 1
|
||||
}
|
||||
|
||||
[iOS (10,0)][TV (10,0)]
|
||||
[iOS (10,0)][TV (10,0)][Mac (10, 13, onlyOn64: true)]
|
||||
[Native]
|
||||
public enum MPSAlphaType : nuint {
|
||||
NonPremultiplied = 0,
|
||||
|
@ -32,13 +34,17 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
Premultiplied = 2,
|
||||
}
|
||||
|
||||
[iOS (10,0)][TV (10,0)]
|
||||
[iOS (10,0)][TV (10,0)][Mac (10, 13, onlyOn64: true)]
|
||||
public enum MPSDataType : uint { // uint32_t
|
||||
FloatBit = 0x10000000,
|
||||
Float16 = FloatBit | 16,
|
||||
Float32 = FloatBit | 32,
|
||||
NormalizedBit = 0x40000000,
|
||||
Unorm1 = NormalizedBit | 1,
|
||||
Unorm8 = NormalizedBit | 8,
|
||||
}
|
||||
|
||||
[iOS (10,0)][TV (10,0)]
|
||||
[iOS (10,0)][TV (10,0)][Mac (10, 13, onlyOn64: true)]
|
||||
[Native]
|
||||
public enum MPSImageFeatureChannelFormat : nuint {
|
||||
Invalid = 0,
|
||||
|
@ -49,6 +55,7 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
}
|
||||
|
||||
// uses NSInteger
|
||||
[Mac (10, 13, onlyOn64: true)]
|
||||
public struct MPSOffset {
|
||||
public nint X;
|
||||
public nint Y;
|
||||
|
@ -56,6 +63,7 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
}
|
||||
|
||||
// really use double, not CGFloat
|
||||
[Mac (10, 13, onlyOn64: true)]
|
||||
public struct MPSOrigin {
|
||||
public double X;
|
||||
public double Y;
|
||||
|
@ -63,18 +71,21 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
}
|
||||
|
||||
// really use double, not CGFloat
|
||||
[Mac (10, 13, onlyOn64: true)]
|
||||
public struct MPSSize {
|
||||
public double Width;
|
||||
public double Height;
|
||||
public double Depth;
|
||||
}
|
||||
|
||||
[Mac (10, 13, onlyOn64: true)]
|
||||
public struct MPSRegion {
|
||||
public MPSOrigin Origin;
|
||||
public MPSSize Size;
|
||||
}
|
||||
|
||||
// really use double, not CGFloat
|
||||
[Mac (10, 13, onlyOn64: true)]
|
||||
public struct MPSScaleTransform {
|
||||
public double ScaleX;
|
||||
public double ScaleY;
|
||||
|
@ -83,6 +94,7 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
}
|
||||
|
||||
// MPSImageHistogram.h
|
||||
[Mac (10, 13, onlyOn64: true)]
|
||||
[StructLayout (LayoutKind.Explicit)]
|
||||
public struct MPSImageHistogramInfo {
|
||||
[FieldOffset (0)]
|
||||
|
@ -99,8 +111,111 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
public Vector4 MaxPixelValue;
|
||||
}
|
||||
|
||||
[TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
public enum MPSMatrixDecompositionStatus {
|
||||
Success = 0,
|
||||
Failure = -1,
|
||||
Singular = -2,
|
||||
NonPositiveDefinite = -3,
|
||||
}
|
||||
|
||||
// MPSTypes.h
|
||||
// FIXME: public delegate IMTLTexture MPSCopyAllocator (MPSKernel filter, IMTLCommandBuffer commandBuffer, IMTLTexture sourceTexture);
|
||||
public delegate NSObject MPSCopyAllocator (MPSKernel filter, NSObject commandBuffer, NSObject sourceTexture);
|
||||
// https://trello.com/c/GqtNId1C/517-generator-our-block-delegates-needs-to-use-wrapper-for-protocols
|
||||
}
|
||||
|
||||
[TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
[Native]
|
||||
public enum MPSRnnSequenceDirection : nuint {
|
||||
Forward = 0,
|
||||
Backward,
|
||||
}
|
||||
|
||||
[TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
[Native]
|
||||
public enum MPSRnnBidirectionalCombineMode : nuint {
|
||||
None = 0,
|
||||
Add,
|
||||
Concatenate,
|
||||
}
|
||||
|
||||
[TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
public enum MPSCnnNeuronType {
|
||||
None = 0,
|
||||
ReLU,
|
||||
Linear,
|
||||
Sigmoid,
|
||||
HardSigmoid,
|
||||
TanH,
|
||||
Absolute,
|
||||
SoftPlus,
|
||||
SoftSign,
|
||||
Elu,
|
||||
PReLU,
|
||||
ReLun,
|
||||
Count,
|
||||
}
|
||||
|
||||
[TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
[Native]
|
||||
public enum MPSCnnBinaryConvolutionFlags : nuint {
|
||||
None = 0,
|
||||
UseBetaScaling = 1 << 0,
|
||||
}
|
||||
|
||||
[TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
[Native]
|
||||
public enum MPSCnnBinaryConvolutionType : nuint {
|
||||
BinaryWeights = 0,
|
||||
Xnor,
|
||||
And,
|
||||
}
|
||||
|
||||
[TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
[Native]
|
||||
public enum MPSNNPaddingMethod : nuint {
|
||||
AlignCentered = 0,
|
||||
AlignTopLeft = 1,
|
||||
AlignBottomRight = 2,
|
||||
AlignReserved = 3,
|
||||
AddRemainderToTopLeft = 0 << 2,
|
||||
AddRemainderToTopRight = 1 << 2,
|
||||
AddRemainderToBottomLeft = 2 << 2,
|
||||
AddRemainderToBottomRight = 3 << 2,
|
||||
SizeValidOnly = 0,
|
||||
SizeSame = 1 << 4,
|
||||
SizeFull = 2 << 4,
|
||||
SizeReserved = 3 << 4,
|
||||
Custom = (1 << 14),
|
||||
SizeMask = 2032,
|
||||
ExcludeEdges = (1 << 15),
|
||||
}
|
||||
|
||||
[TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
[Native]
|
||||
public enum MPSDataLayout : nuint {
|
||||
HeightPerWidthPerFeatureChannels = 0,
|
||||
FeatureChannelsPerHeightPerWidth = 1,
|
||||
}
|
||||
|
||||
[TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
public struct MPSMatrixCopyOffsets {
|
||||
public uint SourceRowOffset;
|
||||
public uint SourceColumnOffset;
|
||||
public uint DestinationRowOffset;
|
||||
public uint DestinationColumnOffset;
|
||||
}
|
||||
|
||||
[TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
public struct MPSImageReadWriteParams {
|
||||
public nuint FeatureChannelOffset;
|
||||
public nuint NumberOfFeatureChannelsToReadWrite;
|
||||
}
|
||||
|
||||
[TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
public struct MPSImageKeypointRangeInfo {
|
||||
public nuint MaximumKeypoints;
|
||||
public float MinimumThresholdValue;
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,15 @@
|
|||
#if (XAMCORE_2_0 && !MONOMAC) && !XAMCORE_4_0
|
||||
using System;
|
||||
using XamCore.Metal;
|
||||
using XamCore.Foundation;
|
||||
|
||||
namespace XamCore.MetalPerformanceShaders {
|
||||
public partial class MPSImageHistogram {
|
||||
[Obsolete ("Please use 'GetHistogramSize' instead.")]
|
||||
public virtual nuint HistogramSizeForSourceFormat (MTLPixelFormat sourceFormat)
|
||||
{
|
||||
return GetHistogramSize (sourceFormat);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -1,7 +1,6 @@
|
|||
#if XAMCORE_2_0 || !MONOMAC
|
||||
// Copyright 2015 Xamarin Inc. All rights reserved.
|
||||
|
||||
#if IOS
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using XamCore.Foundation;
|
||||
|
@ -11,7 +10,6 @@ using XamCore.ObjCRuntime;
|
|||
namespace XamCore.MetalPerformanceShaders {
|
||||
|
||||
public partial class MPSImageLanczosScale {
|
||||
|
||||
static int size_of_scale_transform = Marshal.SizeOf (typeof(MPSScaleTransform));
|
||||
|
||||
public virtual MPSScaleTransform? ScaleTransform {
|
||||
|
@ -37,5 +35,4 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -1,3 +1,4 @@
|
|||
#if XAMCORE_2_0 || !MONOMAC
|
||||
// Copyright 2015-2016 Xamarin Inc. All rights reserved.
|
||||
|
||||
using System;
|
||||
|
@ -8,7 +9,6 @@ using XamCore.Metal;
|
|||
using XamCore.ObjCRuntime;
|
||||
|
||||
namespace XamCore.MetalPerformanceShaders {
|
||||
|
||||
public partial class MPSKernel : NSObject {
|
||||
|
||||
#if !COREBUILD
|
||||
|
@ -20,28 +20,6 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
return MPSSupportsMTLDevice (device == null ? IntPtr.Zero : device.Handle);
|
||||
}
|
||||
|
||||
internal static IntPtr GetPtr (float [] values, bool throwOnNull)
|
||||
{
|
||||
if (throwOnNull && (values == null))
|
||||
throw new ArgumentNullException ("values");
|
||||
unsafe {
|
||||
fixed (float *ptr = values)
|
||||
return (IntPtr) ptr;
|
||||
}
|
||||
}
|
||||
|
||||
#if XAMCORE_2_0
|
||||
internal static IntPtr GetPtr (nfloat [] values, bool throwOnNull)
|
||||
{
|
||||
if (throwOnNull && (values == null))
|
||||
throw new ArgumentNullException ("values");
|
||||
unsafe {
|
||||
fixed (nfloat *ptr = values)
|
||||
return (IntPtr) ptr;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
internal unsafe static float [] GetTransform (IntPtr transform)
|
||||
{
|
||||
var t = (float*) transform;
|
||||
|
@ -68,9 +46,17 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
#if !COREBUILD
|
||||
public partial class MPSImageDilate {
|
||||
|
||||
[DesignatedInitializer]
|
||||
public MPSImageDilate (IMTLDevice device, nuint kernelWidth, nuint kernelHeight, float[] values)
|
||||
: this (device, kernelWidth, kernelHeight, MPSKernel.GetPtr (values, true))
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
if (values == null)
|
||||
throw new ArgumentNullException (nameof (values));
|
||||
|
||||
unsafe {
|
||||
fixed (float* ptr = values)
|
||||
InitializeHandle (InitWithDevice (device, kernelWidth, kernelHeight, (IntPtr) ptr), "initWithDevice:kernelWidth:kernelHeight:values:");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,8 +71,14 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
public partial class MPSImageThresholdBinary {
|
||||
|
||||
public MPSImageThresholdBinary (IMTLDevice device, float thresholdValue, float maximumValue, /*[NullAllowed]*/ float[] transform)
|
||||
: this (device, thresholdValue, maximumValue, MPSKernel.GetPtr (transform, false))
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
// From: https://github.com/dotnet/csharplang/blob/master/spec/unsafe-code.md#unsafe-code
|
||||
// If the array expression is null or if the array has zero elements, the initializer computes an address equal to zero.
|
||||
unsafe {
|
||||
fixed (float* ptr = transform)
|
||||
InitializeHandle (InitWithDevice (device, thresholdValue, maximumValue, (IntPtr) ptr), "initWithDevice:thresholdValue:maximumValue:linearGrayColorTransform:");
|
||||
}
|
||||
}
|
||||
|
||||
public float[] Transform {
|
||||
|
@ -96,9 +88,14 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
|
||||
public partial class MPSImageThresholdBinaryInverse {
|
||||
|
||||
[DesignatedInitializer]
|
||||
public MPSImageThresholdBinaryInverse (IMTLDevice device, float thresholdValue, float maximumValue, /*[NullAllowed]*/ float[] transform)
|
||||
: this (device, thresholdValue, maximumValue, MPSKernel.GetPtr (transform, false))
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
unsafe {
|
||||
fixed (float* ptr = transform)
|
||||
InitializeHandle (InitWithDevice (device, thresholdValue, maximumValue, (IntPtr) ptr), "initWithDevice:thresholdValue:maximumValue:linearGrayColorTransform:");
|
||||
}
|
||||
}
|
||||
|
||||
public float[] Transform {
|
||||
|
@ -108,9 +105,14 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
|
||||
public partial class MPSImageThresholdTruncate {
|
||||
|
||||
[DesignatedInitializer]
|
||||
public MPSImageThresholdTruncate (IMTLDevice device, float thresholdValue, /*[NullAllowed]*/ float[] transform)
|
||||
: this (device, thresholdValue, MPSKernel.GetPtr (transform, false))
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
unsafe {
|
||||
fixed (float* ptr = transform)
|
||||
InitializeHandle (InitWithDevice (device, thresholdValue, (IntPtr) ptr), "initWithDevice:thresholdValue:linearGrayColorTransform:");
|
||||
}
|
||||
}
|
||||
|
||||
public float[] Transform {
|
||||
|
@ -120,9 +122,14 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
|
||||
public partial class MPSImageThresholdToZero {
|
||||
|
||||
[DesignatedInitializer]
|
||||
public MPSImageThresholdToZero (IMTLDevice device, float thresholdValue, /*[NullAllowed]*/ float[] transform)
|
||||
: this (device, thresholdValue, MPSKernel.GetPtr (transform, false))
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
unsafe {
|
||||
fixed (float* ptr = transform)
|
||||
InitializeHandle (InitWithDevice (device, thresholdValue, (IntPtr) ptr), "initWithDevice:thresholdValue:linearGrayColorTransform:");
|
||||
}
|
||||
}
|
||||
|
||||
public float[] Transform {
|
||||
|
@ -132,9 +139,14 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
|
||||
public partial class MPSImageThresholdToZeroInverse {
|
||||
|
||||
[DesignatedInitializer]
|
||||
public MPSImageThresholdToZeroInverse (IMTLDevice device, float thresholdValue, /*[NullAllowed]*/ float[] transform)
|
||||
: this (device, thresholdValue, MPSKernel.GetPtr (transform, false))
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
unsafe {
|
||||
fixed (float* ptr = transform)
|
||||
InitializeHandle (InitWithDevice (device, thresholdValue, (IntPtr) ptr), "initWithDevice:thresholdValue:linearGrayColorTransform:");
|
||||
}
|
||||
}
|
||||
|
||||
public float[] Transform {
|
||||
|
@ -143,9 +155,18 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
}
|
||||
|
||||
public partial class MPSImageSobel {
|
||||
|
||||
[DesignatedInitializer]
|
||||
public MPSImageSobel (IMTLDevice device, float[] transform)
|
||||
: this (device, MPSKernel.GetPtr (transform, true))
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
if (transform == null)
|
||||
throw new ArgumentNullException (nameof (transform));
|
||||
|
||||
unsafe {
|
||||
fixed (float* ptr = transform)
|
||||
InitializeHandle (InitWithDevice (device, (IntPtr) ptr), "initWithDevice:linearGrayColorTransform:");
|
||||
}
|
||||
}
|
||||
|
||||
public float[] ColorTransform {
|
||||
|
@ -154,38 +175,81 @@ namespace XamCore.MetalPerformanceShaders {
|
|||
}
|
||||
|
||||
public partial class MPSCnnConvolution {
|
||||
|
||||
[DesignatedInitializer]
|
||||
public MPSCnnConvolution (IMTLDevice device, MPSCnnConvolutionDescriptor convolutionDescriptor, float[] kernelWeights, float[] biasTerms, MPSCnnConvolutionFlags flags)
|
||||
: this (device, convolutionDescriptor, MPSKernel.GetPtr (kernelWeights, true), MPSKernel.GetPtr (biasTerms, false), flags)
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
if (kernelWeights == null)
|
||||
throw new ArgumentNullException (nameof (kernelWeights));
|
||||
|
||||
unsafe {
|
||||
fixed (float* kernelWeightsptr = kernelWeights)
|
||||
fixed (float* biasTermsptr = biasTerms)
|
||||
InitializeHandle (InitWithDevice (device, convolutionDescriptor, (IntPtr) kernelWeightsptr, (IntPtr) biasTermsptr, flags), "initWithDevice:convolutionDescriptor:kernelWeights:biasTerms:flags:");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class MPSCnnFullyConnected {
|
||||
|
||||
[DesignatedInitializer]
|
||||
public MPSCnnFullyConnected (IMTLDevice device, MPSCnnConvolutionDescriptor convolutionDescriptor, float[] kernelWeights, float[] biasTerms, MPSCnnConvolutionFlags flags)
|
||||
: this (device, convolutionDescriptor, MPSKernel.GetPtr (kernelWeights, true), MPSKernel.GetPtr (biasTerms, false), flags)
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
if (kernelWeights == null)
|
||||
throw new ArgumentNullException (nameof (kernelWeights));
|
||||
|
||||
unsafe {
|
||||
fixed (float* kernelWeightsptr = kernelWeights)
|
||||
fixed (float* biasTermsptr = biasTerms)
|
||||
InitializeHandle (InitWithDevice (device, convolutionDescriptor, (IntPtr) kernelWeightsptr, (IntPtr) biasTermsptr, flags), "initWithDevice:convolutionDescriptor:kernelWeights:biasTerms:flags:");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class MPSImageConversion {
|
||||
public MPSImageConversion (IMTLDevice device, MPSAlphaType srcAlpha, MPSAlphaType destAlpha, nfloat[] backgroundColor, CGColorConversionInfo conversionInfo)
|
||||
: this (device, srcAlpha, destAlpha, MPSKernel.GetPtr (backgroundColor, false), conversionInfo)
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
unsafe {
|
||||
fixed (nfloat* ptr = backgroundColor)
|
||||
InitializeHandle (InitWithDevice (device, srcAlpha, destAlpha, (IntPtr) ptr, conversionInfo), "initWithDevice:srcAlpha:destAlpha:backgroundColor:conversionInfo:");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class MPSImagePyramid {
|
||||
|
||||
[DesignatedInitializer]
|
||||
public MPSImagePyramid (IMTLDevice device, nuint kernelWidth, nuint kernelHeight, float[] kernelWeights)
|
||||
: this (device, kernelWidth, kernelHeight, MPSKernel.GetPtr (kernelWeights, true))
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
if (kernelWeights == null)
|
||||
throw new ArgumentNullException (nameof (kernelWeights));
|
||||
|
||||
unsafe {
|
||||
fixed (float* ptr = kernelWeights)
|
||||
InitializeHandle (InitWithDevice (device, kernelWidth, kernelHeight, (IntPtr) ptr), "initWithDevice:kernelWidth:kernelHeight:weights:");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class MPSImageGaussianPyramid {
|
||||
|
||||
[DesignatedInitializer]
|
||||
public MPSImageGaussianPyramid (IMTLDevice device, nuint kernelWidth, nuint kernelHeight, float[] kernelWeights)
|
||||
: this (device, kernelWidth, kernelHeight, MPSKernel.GetPtr (kernelWeights, true))
|
||||
: base (NSObjectFlag.Empty)
|
||||
{
|
||||
if (kernelWeights == null)
|
||||
throw new ArgumentNullException (nameof (kernelWeights));
|
||||
|
||||
unsafe {
|
||||
fixed (float* ptr = kernelWeights)
|
||||
InitializeHandle (InitWithDevice (device, kernelWidth, kernelHeight, (IntPtr) ptr), "initWithDevice:kernelWidth:kernelHeight:weights:");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,16 @@
|
|||
#if (XAMCORE_2_0 && !MONOMAC) && !XAMCORE_4_0
|
||||
using System;
|
||||
using XamCore.Metal;
|
||||
using XamCore.Foundation;
|
||||
|
||||
namespace XamCore.MetalPerformanceShaders {
|
||||
public partial class MPSMatrixDescriptor {
|
||||
|
||||
[Obsolete ("Please use 'GetRowBytesFromColumns' instead.")]
|
||||
public static nuint GetRowBytes (nuint columns, MPSDataType dataType)
|
||||
{
|
||||
return GetRowBytesFromColumns (columns, dataType);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -51,7 +51,7 @@ namespace XamCore.ObjCRuntime {
|
|||
static public class System {
|
||||
static public readonly IntPtr Handle = Dlfcn.dlopen (Constants.libSystemLibrary, 0);
|
||||
}
|
||||
#if IOS || TVOS
|
||||
#if !WATCH
|
||||
static public class MetalPerformanceShaders {
|
||||
static public readonly IntPtr Handle = Dlfcn.dlopen (Constants.MetalPerformanceShadersLibrary, 0);
|
||||
}
|
||||
|
|
|
@ -329,6 +329,11 @@ namespace XamCore.ObjCRuntime {
|
|||
public extern static void void_objc_msgSendSuper_IntPtr_RectangleF_IntPtr (IntPtr receiver, IntPtr selector, IntPtr arg1, System.Drawing.RectangleF arg2, IntPtr arg3);
|
||||
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSendSuper")]
|
||||
public extern static void void_objc_msgSend_IntPtr_RectangleF_IntPtr (IntPtr receiver, IntPtr selector, IntPtr arg1, System.Drawing.RectangleF arg2, IntPtr arg3);
|
||||
|
||||
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
|
||||
public extern static IntPtr IntPtr_objc_msgSend_IntPtr_nint (IntPtr receiver, IntPtr selector, global::System.IntPtr arg1, nint arg2);
|
||||
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSendSuper")]
|
||||
public extern static IntPtr IntPtr_objc_msgSendSuper_IntPtr_nint (IntPtr receiver, IntPtr selector, global::System.IntPtr arg1, nint arg2);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -599,7 +599,13 @@ namespace XamCore.ObjCRuntime {
|
|||
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
|
||||
public extern static int int_objc_msgSend_NSRange_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr (IntPtr receiver, IntPtr selector, MonoMac.Foundation.NSRange arg1, IntPtr arg2, IntPtr arg3, IntPtr arg4, IntPtr arg5, IntPtr arg6);
|
||||
|
||||
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
|
||||
public extern static int int_objc_msgSend_NSRange_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr (IntPtr receiver, IntPtr selector, MonoMac.Foundation.NSRange arg1, IntPtr arg2, IntPtr arg3, IntPtr arg4, IntPtr arg5, IntPtr arg6);
|
||||
|
||||
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")]
|
||||
public extern static IntPtr IntPtr_objc_msgSend_IntPtr_nint (IntPtr receiver, IntPtr selector, global::System.IntPtr arg1, nint arg2);
|
||||
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSendSuper")]
|
||||
public extern static IntPtr IntPtr_objc_msgSendSuper_IntPtr_nint (IntPtr receiver, IntPtr selector, global::System.IntPtr arg1, nint arg2);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,16 @@ namespace XamCore.ReplayKit {
|
|||
ActivePhoneCall = -5811,
|
||||
FailedToSave = -5812,
|
||||
CarPlay = -5813,
|
||||
[iOS (11,2), TV (11,2)]
|
||||
FailedApplicationConnectionInvalid = -5814,
|
||||
[iOS (11,2), TV (11,2)]
|
||||
FailedApplicationConnectionInterrupted = -5815,
|
||||
[iOS (11,2), TV (11,2)]
|
||||
FailedNoMatchingApplicationContext = -5816,
|
||||
[iOS (11,2), TV (11,2)]
|
||||
FailedMediaServicesFailure = -5817,
|
||||
[iOS (11,2), TV (11,2)]
|
||||
VideoMixingFailure = -5818,
|
||||
}
|
||||
|
||||
[NoiOS]
|
||||
|
|
|
@ -343,6 +343,10 @@ namespace XamCore.Security {
|
|||
#endif
|
||||
[iOS (10,3)]
|
||||
[Mac (10,7)]
|
||||
[Deprecated (PlatformName.iOS, 11,0, message: "Use 'GetSerialNumber(out NSError)' instead.")]
|
||||
[Deprecated (PlatformName.MacOSX, 10,13, message: "Use 'GetSerialNumber(out NSError)' instead.")]
|
||||
[Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'GetSerialNumber(out NSError)' instead.")]
|
||||
[Deprecated (PlatformName.TvOS, 11,0, message: "Use 'GetSerialNumber(out NSError)' instead.")]
|
||||
public NSData GetSerialNumber ()
|
||||
{
|
||||
#if MONOMAC
|
||||
|
@ -353,6 +357,19 @@ namespace XamCore.Security {
|
|||
return (data == IntPtr.Zero) ? null : new NSData (data, true);
|
||||
}
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[DllImport (Constants.SecurityLibrary)]
|
||||
static extern /* __nullable CFDataRef */ IntPtr SecCertificateCopySerialNumberData (IntPtr /* SecCertificateRef */ certificate, ref IntPtr /* CFErrorRef * */ error);
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
public NSData GetSerialNumber (out NSError error)
|
||||
{
|
||||
IntPtr err = IntPtr.Zero;
|
||||
IntPtr data = SecCertificateCopySerialNumberData (handle, ref err);
|
||||
error = Runtime.GetNSObject<NSError> (err);
|
||||
return (data == IntPtr.Zero) ? null : new NSData (data, true);
|
||||
}
|
||||
|
||||
#endif // COREBUILD
|
||||
|
||||
~SecCertificate ()
|
||||
|
|
|
@ -68,6 +68,7 @@ namespace XamCore.Security {
|
|||
NoTrustSettings = -25263,
|
||||
Pkcs12VerifyFailure = -25264,
|
||||
NotSigner = -26267,
|
||||
MissingEntitlement = -34018,
|
||||
ServiceNotAvailable = -67585,
|
||||
InsufficientClientID = -67586,
|
||||
DeviceReset = -67587,
|
||||
|
|
|
@ -1306,6 +1306,16 @@ namespace XamCore.Security {
|
|||
}
|
||||
}
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
public bool PersistentReference {
|
||||
get {
|
||||
return Fetch (SecAttributeKey.PersistentReference) == CFBoolean.True.Handle;
|
||||
}
|
||||
set {
|
||||
SetValue (CFBoolean.FromBoolean (value).Handle, SecAttributeKey.PersistentReference);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Matches
|
||||
//
|
||||
|
|
|
@ -18,6 +18,8 @@ namespace XamCore.Security {
|
|||
Tls_1_1 = 7,
|
||||
Tls_1_2 = 8,
|
||||
Dtls_1_0 = 9,
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
Tls_1_3 = 10,
|
||||
|
||||
/* Obsolete on iOS */
|
||||
Ssl_2_0 = 1,
|
||||
|
@ -107,6 +109,9 @@ namespace XamCore.Security {
|
|||
|
||||
[iOS (10,0)][Mac (10,12)]
|
||||
AllowRenegotiation = 8,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
EnableSessionTickets = 9,
|
||||
}
|
||||
|
||||
// Security.framework/Headers/SecureTransport.h
|
||||
|
@ -267,6 +272,10 @@ namespace XamCore.Security {
|
|||
TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = 0xC031, // iOS 9+
|
||||
TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = 0xC032, // iOS 9+
|
||||
|
||||
// https://tools.ietf.org/html/rfc7905
|
||||
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA8, // Xcode 9+
|
||||
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA9, // Xcode 9+
|
||||
|
||||
TLS_AES_128_GCM_SHA256 = 0x1301, // iOS 11+
|
||||
TLS_AES_256_GCM_SHA384 = 0x1302, // iOS 11+
|
||||
TLS_CHACHA20_POLY1305_SHA256 = 0x1303, // iOS 11+
|
||||
|
|
|
@ -608,5 +608,73 @@ namespace XamCore.Security {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[DllImport (Constants.SecurityLibrary)]
|
||||
static extern /* OSStatus */ int SSLSetSessionTicketsEnabled (IntPtr /* SSLContextRef */ context, [MarshalAs (UnmanagedType.I1)] bool /* Boolean */ enabled);
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
public int SetSessionTickets (bool enabled)
|
||||
{
|
||||
return SSLSetSessionTicketsEnabled (Handle, enabled);
|
||||
}
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[DllImport (Constants.SecurityLibrary)]
|
||||
static extern /* OSStatus */ int SSLSetError (IntPtr /* SSLContextRef */ context, SecStatusCode /* OSStatus */ status);
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
public int SetError (SecStatusCode status)
|
||||
{
|
||||
return SSLSetError (Handle, status);
|
||||
}
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[DllImport (Constants.SecurityLibrary)]
|
||||
static extern /* OSStatus */ int SSLSetOCSPResponse (IntPtr /* SSLContextRef */ context, IntPtr /* CFDataRef __nonnull */ response);
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
public int SetOcspResponse (NSData response)
|
||||
{
|
||||
if (response == null)
|
||||
throw new ArgumentNullException (nameof (response));
|
||||
return SSLSetOCSPResponse (Handle, response.Handle);
|
||||
}
|
||||
|
||||
#if !MONOMAC
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)] //[Mac (10,13)] Apple forgot to export SSLSetALPNProtocols. https://bugs.swift.org/browse/SR-6131
|
||||
[DllImport (Constants.SecurityLibrary)]
|
||||
static extern /* OSStatus */ int SSLSetALPNProtocols (IntPtr /* SSLContextRef */ context, IntPtr /* CFArrayRef */ protocols);
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)] //[Mac (10,13)] Apple forgot to export SSLSetALPNProtocols. https://bugs.swift.org/browse/SR-6131
|
||||
public int SetAlpnProtocols (string[] protocols)
|
||||
{
|
||||
using (var array = NSArray.FromStrings (protocols))
|
||||
return SSLSetALPNProtocols (Handle, array.Handle);
|
||||
}
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)] //[Mac (10,13)] Apple forgot to export SSLCopyALPNProtocols.
|
||||
[DllImport (Constants.SecurityLibrary)]
|
||||
static extern /* OSStatus */ int SSLCopyALPNProtocols (IntPtr /* SSLContextRef */ context, ref IntPtr /* CFArrayRef* */ protocols);
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)] //[Mac (10,13)] Apple forgot to export the SSLCopyALPNProtocols.
|
||||
public string[] GetAlpnProtocols (out int error)
|
||||
{
|
||||
IntPtr protocols = IntPtr.Zero; // must be null, CFArray allocated by SSLCopyALPNProtocols
|
||||
error = SSLCopyALPNProtocols (Handle, ref protocols);
|
||||
if (protocols == IntPtr.Zero)
|
||||
return Array.Empty<string> ();
|
||||
var result = NSArray.StringArrayFromHandle (protocols);
|
||||
CFObject.CFRelease (protocols);
|
||||
return result;
|
||||
}
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)] //[Mac (10,13)] Apple forgot to export the SSLCopyALPNProtocols.
|
||||
public string[] GetAlpnProtocols ()
|
||||
{
|
||||
int error;
|
||||
return GetAlpnProtocols (out error);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,4 +67,20 @@ namespace XamCore.StoreKit {
|
|||
Hide,
|
||||
}
|
||||
#endif
|
||||
[iOS (11,2), TV (11,2), Mac (10,13,2)]
|
||||
[Native]
|
||||
public enum SKProductPeriodUnit : nuint {
|
||||
Day,
|
||||
Week,
|
||||
Month,
|
||||
Year,
|
||||
}
|
||||
|
||||
[iOS (11,2), TV (11,2), Mac (10,13,2)]
|
||||
[Native]
|
||||
public enum SKProductDiscountPaymentMode : nuint {
|
||||
PayAsYouGo,
|
||||
PayUpFront,
|
||||
FreeTrial,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#if __IOS__
|
||||
|
||||
using System;
|
||||
using XamCore.ObjCRuntime;
|
||||
using XamCore.Foundation;
|
||||
|
||||
namespace XamCore.StoreKit {
|
||||
|
||||
partial class SKCloudServiceSetupOptions {
|
||||
|
||||
[iOS (10,1)]
|
||||
public virtual SKCloudServiceSetupAction? Action {
|
||||
get {
|
||||
return (SKCloudServiceSetupAction?) (SKCloudServiceSetupActionExtensions.GetValue (_Action));
|
||||
}
|
||||
set {
|
||||
_Action = value != null ? SKCloudServiceSetupActionExtensions.GetConstant (value.Value) : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __IOS__
|
|
@ -300,6 +300,7 @@ namespace XamCore.UIKit {
|
|||
InfoLight,
|
||||
InfoDark,
|
||||
ContactAdd,
|
||||
[TV (11,0)][NoiOS]
|
||||
Plain,
|
||||
System = RoundedRect,
|
||||
}
|
||||
|
|
|
@ -2784,7 +2784,7 @@ namespace XamCore.AppKit {
|
|||
[Mac (10,11)]
|
||||
[Export ("layoutAttributesForSupplementaryElementOfKind:atIndexPath:")]
|
||||
[return: NullAllowed]
|
||||
NSCollectionViewLayoutAttributes GetLayoutAttributest (string kind, NSIndexPath indexPath);
|
||||
NSCollectionViewLayoutAttributes GetLayoutAttributes (string kind, NSIndexPath indexPath);
|
||||
|
||||
// -(NSInteger)numberOfSections __attribute__((availability(macosx, introduced=10.11)));
|
||||
[Mac (10,11)]
|
||||
|
@ -10489,7 +10489,7 @@ namespace XamCore.AppKit {
|
|||
nuint GlyphIndexForCharacterAtIndex (nint charIndex);
|
||||
|
||||
[Export ("intAttribute:forGlyphAtIndex:")]
|
||||
nint IntAttributeforGlyphAtIndex (nint attributeTag, nint glyphIndex);
|
||||
nint GetIntAttribute (nint attributeTag, nint glyphIndex);
|
||||
|
||||
[Export ("setTextContainer:forGlyphRange:")]
|
||||
void SetTextContainerForRange (NSTextContainer container, NSRange glyphRange);
|
||||
|
@ -14959,9 +14959,13 @@ namespace XamCore.AppKit {
|
|||
|
||||
#if !XAMCORE_4_0
|
||||
[Abstract]
|
||||
#endif
|
||||
[Export ("drawCharactersInRange:forContentView:")]
|
||||
void DrawCharactersInRangeforContentView (NSRange range, NSView view);
|
||||
#else
|
||||
[Export ("drawCharactersInRange:forContentView:")]
|
||||
void DrawCharacters (NSRange range, NSView view);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
[BaseType (typeof (NSObject)), Model, Protocol]
|
||||
|
@ -18885,8 +18889,13 @@ namespace XamCore.AppKit {
|
|||
[Export ("textView:didCheckTextInRange:types:options:results:orthography:wordCount:"), DelegateName ("NSTextViewTextChecked"), DefaultValueFromArgument ("results")]
|
||||
NSTextCheckingResult [] DidCheckText (NSTextView view, NSRange range, NSTextCheckingTypes checkingTypes, NSDictionary options, NSTextCheckingResult [] results, NSOrthography orthography, nint wordCount);
|
||||
|
||||
#if !XAMCORE_4_0
|
||||
[Export ("textView:draggedCell:inRect:event:"), EventArgs ("NSTextViewDraggedCell")]
|
||||
void DraggedCell (NSTextView view, NSTextAttachmentCell cell, CGRect rect, NSEvent theevent);
|
||||
#else
|
||||
[Export ("textView:draggedCell:inRect:event:"), EventArgs ("NSTextViewDraggedCell")]
|
||||
void DraggedCell (NSTextView view, NSTextAttachmentCell cell, CGRect rect, NSEvent theEvent);
|
||||
#endif
|
||||
|
||||
[Export ("undoManagerForTextView:"), DelegateName ("NSTextViewGetUndoManager"), DefaultValue (null)]
|
||||
NSUndoManager GetUndoManager (NSTextView view);
|
||||
|
@ -23762,8 +23771,14 @@ namespace XamCore.AppKit {
|
|||
[Field ("NSAccessibilityWindowAttribute")]
|
||||
NSString WindowAttribute { get; }
|
||||
|
||||
#if !XAMCORE_4_0
|
||||
[Obsolete ("Use 'TopLevelUIElementAttribute' instead.")]
|
||||
[Field ("NSAccessibilityTopLevelUIElementAttribute")]
|
||||
NSString ToplevelUIElementAttribute { get; }
|
||||
#endif
|
||||
|
||||
[Field ("NSAccessibilityTopLevelUIElementAttribute")]
|
||||
NSString TopLevelUIElementAttribute { get; }
|
||||
|
||||
[Field ("NSAccessibilitySelectedChildrenAttribute")]
|
||||
NSString SelectedChildrenAttribute { get; }
|
||||
|
|
|
@ -2785,6 +2785,12 @@ namespace XamCore.AVFoundation {
|
|||
NSNumber[] AvailableEncodeChannelLayoutTags { get; }
|
||||
}
|
||||
|
||||
[TV (11,2), NoWatch, NoMac, NoiOS]
|
||||
[Abstract]
|
||||
[BaseType (typeof (NSObject))]
|
||||
interface AVDisplayCriteria : NSCopying {
|
||||
}
|
||||
|
||||
[NoWatch]
|
||||
[Since (4,0)]
|
||||
[BaseType (typeof (NSObject))]
|
||||
|
@ -2807,6 +2813,10 @@ namespace XamCore.AVFoundation {
|
|||
[Availability (Introduced = Platform.iOS_4_0 | Platform.Mac_10_7, Deprecated = Platform.iOS_5_0 | Platform.Mac_10_8, Message = "Use 'NaturalSize/PreferredTransform' as appropriate on the video track instead.")]
|
||||
CGSize NaturalSize { get; }
|
||||
|
||||
[TV (11,2), NoWatch, NoMac, NoiOS]
|
||||
[Export ("preferredDisplayCriteria")]
|
||||
AVDisplayCriteria PreferredDisplayCriteria { get; }
|
||||
|
||||
[Export ("providesPreciseDurationAndTiming")]
|
||||
bool ProvidesPreciseDurationAndTiming { get; }
|
||||
|
||||
|
@ -3233,7 +3243,7 @@ namespace XamCore.AVFoundation {
|
|||
[NullAllowed, Export ("error")]
|
||||
NSError Error { get; }
|
||||
|
||||
[NullAllowed, Export ("audioOutputDeviceUniqueID")]
|
||||
[NullAllowed, Export ("audioOutputDeviceUniqueID"), NoWatch, NoTV, NoiOS]
|
||||
string AudioOutputDeviceUniqueId { get; set; }
|
||||
|
||||
[Export ("audioTimePitchAlgorithm")]
|
||||
|
@ -3837,6 +3847,10 @@ namespace XamCore.AVFoundation {
|
|||
[iOS (8,0), Mac (10, 10)]
|
||||
[Export ("renewalDate", ArgumentSemantic.Copy), NullAllowed]
|
||||
NSDate RenewalDate { get; set; }
|
||||
|
||||
[Watch (4,2), TV (11,2), Mac (10,13,2), iOS (11,2)]
|
||||
[NullAllowed, Export ("allowedContentTypes")]
|
||||
string[] AllowedContentTypes { get; }
|
||||
}
|
||||
|
||||
[NoWatch]
|
||||
|
@ -10290,6 +10304,18 @@ namespace XamCore.AVFoundation {
|
|||
[iOS (10, 0), TV (10,0), Mac (10,12)]
|
||||
[Field ("AVPlayerWaitingWithNoItemToPlayReason")]
|
||||
NSString WaitingWithNoItemToPlayReason { get; }
|
||||
|
||||
// From AVPlayer (AVPlayerPlaybackCapabilities) Category
|
||||
|
||||
[TV (11,2), NoWatch, NoMac, iOS (11,2)]
|
||||
[Static]
|
||||
[Export ("availableHDRModes")]
|
||||
AVPlayerHdrMode AvailableHdrModes { get; }
|
||||
|
||||
[TV (11, 2), NoWatch, NoMac, iOS (11, 2)]
|
||||
[Field ("AVPlayerAvailableHDRModesDidChangeNotification")]
|
||||
[Notification]
|
||||
NSString AvailableHdrModesDidChangeNotification { get; }
|
||||
}
|
||||
|
||||
[NoWatch]
|
||||
|
@ -12488,8 +12514,13 @@ namespace XamCore.AVFoundation {
|
|||
[Export ("processContentKeyResponseError:")]
|
||||
void Process (NSError error);
|
||||
|
||||
[Export ("respondByRequestingPersistableContentKeyRequest")]
|
||||
[Deprecated (PlatformName.iOS, 11, 2, message: "Use the 'NSError' overload instead.")]
|
||||
[Export ("respondByRequestingPersistableContentKeyRequest"), NoWatch, NoTV, NoMac]
|
||||
void RespondByRequestingPersistableContentKeyRequest ();
|
||||
|
||||
[NoWatch, NoTV, NoMac, iOS (11,2)]
|
||||
[Export ("respondByRequestingPersistableContentKeyRequestAndReturnError:")]
|
||||
bool RespondByRequestingPersistableContentKeyRequest ([NullAllowed] out NSError error);
|
||||
}
|
||||
|
||||
[Category]
|
||||
|
|
25
src/avkit.cs
25
src/avkit.cs
|
@ -204,6 +204,10 @@ namespace XamCore.AVKit {
|
|||
[NoiOS, TV (11, 0), NoWatch, NoMac]
|
||||
[Export ("customInfoViewController", ArgumentSemantic.Assign)]
|
||||
UIViewController CustomInfoViewController { get; set; }
|
||||
|
||||
[NoiOS, TV (11,2), NoMac, NoWatch]
|
||||
[Export ("appliesPreferredDisplayCriteriaAutomatically")]
|
||||
bool AppliesPreferredDisplayCriteriaAutomatically { get; set; }
|
||||
}
|
||||
|
||||
[Protocol, Model]
|
||||
|
@ -549,5 +553,26 @@ namespace XamCore.AVKit {
|
|||
[Export ("routePickerViewDidEndPresentingRoutes:")]
|
||||
void DidEndPresentingRoutes (AVRoutePickerView routePickerView);
|
||||
}
|
||||
|
||||
[TV (11,2), NoiOS, NoMac, NoWatch]
|
||||
[BaseType (typeof (NSObject))]
|
||||
[DisableDefaultCtor]
|
||||
interface AVDisplayManager {
|
||||
|
||||
[NullAllowed, Export ("preferredDisplayCriteria", ArgumentSemantic.Copy)]
|
||||
AVDisplayCriteria PreferredDisplayCriteria { get; set; }
|
||||
|
||||
[Export ("displayModeSwitchInProgress")]
|
||||
bool DisplayModeSwitchInProgress { [Bind ("isDisplayModeSwitchInProgress")] get; }
|
||||
}
|
||||
|
||||
[TV (11,2), NoiOS, NoMac, NoWatch]
|
||||
[Category]
|
||||
[BaseType (typeof (UIWindow))]
|
||||
interface UIWindow_AVAdditions {
|
||||
|
||||
[Export ("avDisplayManager")]
|
||||
AVDisplayManager GetAVDisplayManager ();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -311,7 +311,7 @@ namespace XamCore.Contacts {
|
|||
|
||||
[iOS (9,0), Mac (10,11, onlyOn64: true)]
|
||||
[BaseType (typeof (NSFormatter))]
|
||||
interface CNContactFormatter {
|
||||
interface CNContactFormatter : NSSecureCoding {
|
||||
|
||||
[Static]
|
||||
[Export ("descriptorForRequiredKeysForStyle:")]
|
||||
|
|
|
@ -643,6 +643,11 @@ namespace XamCore.CoreAnimation {
|
|||
[TV (11,0)][Mac (10,13)][iOS (11,0)]
|
||||
[Export ("allowsNextDrawableTimeout")]
|
||||
bool AllowsNextDrawableTimeout { get; set; }
|
||||
|
||||
[NoWatch] // headers not updated
|
||||
[TV (11,2)][Mac (10,13,2)][iOS (11,2)]
|
||||
[Export ("maximumDrawableCount")]
|
||||
nuint MaximumDrawableCount { get; set; }
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -116,6 +116,11 @@ namespace XamCore.CoreBluetooth {
|
|||
[Field ("CBConnectPeripheralOptionNotifyOnNotificationKey")]
|
||||
NSString OptionNotifyOnNotificationKey { get; }
|
||||
|
||||
[NoMac] // xcode 9.2 beta 2 does not include this inside its macOS header files
|
||||
[iOS (11,2)][TV (11,2)][Watch (4,2)]
|
||||
[Field ("CBConnectPeripheralOptionStartDelayKey")]
|
||||
NSString OptionStartDelayKey { get; }
|
||||
|
||||
[Field ("CBCentralManagerOptionRestoreIdentifierKey")]
|
||||
[Since (7,0)]
|
||||
[Mac (10,13)]
|
||||
|
|
388
src/coreimage.cs
388
src/coreimage.cs
|
@ -25,6 +25,7 @@
|
|||
//
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Reflection;
|
||||
using XamCore.AVFoundation;
|
||||
using XamCore.Foundation;
|
||||
|
@ -941,6 +942,14 @@ namespace XamCore.CoreImage {
|
|||
[Since (7,0)]
|
||||
[Field ("kCIInputExtentKey", "+CoreImage")]
|
||||
NSString Extent { get; }
|
||||
|
||||
[iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
[Field ("kCIInputDepthImageKey", "+CoreImage")]
|
||||
NSString DepthImage { get; }
|
||||
|
||||
[iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
[Field ("kCIInputDisparityImageKey", "+CoreImage")]
|
||||
NSString DisparityImage { get; }
|
||||
}
|
||||
|
||||
[Since (5,0)]
|
||||
|
@ -1261,6 +1270,54 @@ namespace XamCore.CoreImage {
|
|||
[Export ("extent")]
|
||||
CGRect Extent { get; }
|
||||
}
|
||||
|
||||
[StrongDictionary ("CIImageInitializationOptionsKeys")]
|
||||
interface CIImageInitializationOptions {
|
||||
// Bug #60726: [Generator] Support INativeObject in StrongDictionary
|
||||
// (https://bugzilla.xamarin.com/show_bug.cgi?id=60726)
|
||||
// CGColorSpace ColorSpace { get; set; }
|
||||
|
||||
CoreGraphics.CGImageProperties Properties { get; set; }
|
||||
|
||||
[iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
bool ApplyOrientationProperty { get; set; }
|
||||
|
||||
[iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
bool NearestSampling { get; set; }
|
||||
|
||||
[iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
bool AuxiliaryDepth { get; set; }
|
||||
|
||||
[iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
bool AuxiliaryDisparity { get; set; }
|
||||
}
|
||||
|
||||
[Internal]
|
||||
[Static]
|
||||
interface CIImageInitializationOptionsKeys {
|
||||
[Field ("kCIImageColorSpace")]
|
||||
NSString ColorSpaceKey { get; }
|
||||
|
||||
[MountainLion]
|
||||
[Field ("kCIImageProperties")]
|
||||
NSString PropertiesKey { get; }
|
||||
|
||||
[iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
[Field ("kCIImageNearestSampling")]
|
||||
NSString NearestSamplingKey { get; }
|
||||
|
||||
[iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
[Field ("kCIImageApplyOrientationProperty")]
|
||||
NSString ApplyOrientationPropertyKey { get; }
|
||||
|
||||
[iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
[Field ("kCIImageAuxiliaryDepth")]
|
||||
NSString AuxiliaryDepthKey { get; }
|
||||
|
||||
[iOS (11,0), TV (11,0), Mac (10,13)]
|
||||
[Field ("kCIImageAuxiliaryDisparity")]
|
||||
NSString AuxiliaryDisparityKey { get; }
|
||||
}
|
||||
|
||||
[BaseType (typeof (NSObject))]
|
||||
[Since (5,0)]
|
||||
|
@ -1270,6 +1327,7 @@ namespace XamCore.CoreImage {
|
|||
[Export ("imageWithCGImage:")]
|
||||
CIImage FromCGImage (CGImage image);
|
||||
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Static]
|
||||
[Export ("imageWithCGImage:options:")]
|
||||
CIImage FromCGImage (CGImage image, [NullAllowed] NSDictionary d);
|
||||
|
@ -1306,6 +1364,7 @@ namespace XamCore.CoreImage {
|
|||
[Export ("imageWithContentsOfURL:")]
|
||||
CIImage FromUrl (NSUrl url);
|
||||
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Static]
|
||||
[Export ("imageWithContentsOfURL:options:")]
|
||||
CIImage FromUrl (NSUrl url, [NullAllowed] NSDictionary d);
|
||||
|
@ -1318,6 +1377,7 @@ namespace XamCore.CoreImage {
|
|||
[Export ("imageWithData:")]
|
||||
CIImage FromData (NSData data);
|
||||
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Static]
|
||||
[Export ("imageWithData:options:")]
|
||||
CIImage FromData (NSData data, [NullAllowed] NSDictionary d);
|
||||
|
@ -1332,18 +1392,21 @@ namespace XamCore.CoreImage {
|
|||
CIImage FromImageBuffer (CVImageBuffer imageBuffer);
|
||||
|
||||
#if MONOMAC && !XAMCORE_4_0
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Static]
|
||||
[Mac(10,4)]
|
||||
[Export ("imageWithCVImageBuffer:options:")]
|
||||
CIImage FromImageBuffer (CVImageBuffer imageBuffer, [NullAllowed] NSDictionary dict);
|
||||
#else
|
||||
#if XAMCORE_2_0
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Static]
|
||||
[iOS(9,0)]
|
||||
[Internal] // This overload is needed for our strong dictionary support (but only for Unified, since for Classic the generic version is transformed to this signature)
|
||||
[Export ("imageWithCVImageBuffer:options:")]
|
||||
CIImage FromImageBuffer (CVImageBuffer imageBuffer, [NullAllowed] NSDictionary dict);
|
||||
#endif
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Static]
|
||||
[iOS(9,0)]
|
||||
[Export ("imageWithCVImageBuffer:options:")]
|
||||
|
@ -1359,6 +1422,7 @@ namespace XamCore.CoreImage {
|
|||
[Export ("imageWithCVPixelBuffer:")]
|
||||
CIImage FromImageBuffer (CVPixelBuffer buffer);
|
||||
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Static]
|
||||
[Export ("imageWithCVPixelBuffer:options:")]
|
||||
CIImage FromImageBuffer (CVPixelBuffer buffer, [NullAllowed] NSDictionary dict);
|
||||
|
@ -1377,6 +1441,7 @@ namespace XamCore.CoreImage {
|
|||
[iOS (11,0)]
|
||||
[TV (11,0)]
|
||||
[Mac (10,13)]
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Static]
|
||||
[Export ("imageWithIOSurface:options:")]
|
||||
CIImage FromSurface (IOSurface.IOSurface surface, NSDictionary options);
|
||||
|
@ -1399,6 +1464,7 @@ namespace XamCore.CoreImage {
|
|||
[Export ("initWithCGImage:")]
|
||||
IntPtr Constructor (CGImage image);
|
||||
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Export ("initWithCGImage:options:")]
|
||||
IntPtr Constructor (CGImage image, [NullAllowed] NSDictionary d);
|
||||
|
||||
|
@ -1409,6 +1475,7 @@ namespace XamCore.CoreImage {
|
|||
[Export ("initWithCGLayer:")]
|
||||
IntPtr Constructor (CGLayer layer);
|
||||
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Export ("initWithCGLayer:options:")]
|
||||
IntPtr Constructor (CGLayer layer, [NullAllowed] NSDictionary d);
|
||||
|
||||
|
@ -1681,13 +1748,6 @@ namespace XamCore.CoreImage {
|
|||
[Export ("autoAdjustmentFiltersWithOptions:"), Internal]
|
||||
NSArray _GetAutoAdjustmentFilters ([NullAllowed] NSDictionary opts);
|
||||
|
||||
[Field ("kCIImageColorSpace"), Internal]
|
||||
NSString CIImageColorSpaceKey { get; }
|
||||
|
||||
[MountainLion]
|
||||
[Field ("kCIImageProperties"), Internal]
|
||||
NSString CIImagePropertiesKey { get; }
|
||||
|
||||
[Since (6,0)] // publicly documented in 7.0 but really available since 6.0
|
||||
[Mac (10,12)]
|
||||
[Export ("regionOfInterestForImage:inRect:")]
|
||||
|
@ -2178,10 +2238,6 @@ namespace XamCore.CoreImage {
|
|||
[Export ("vectorWithString:")]
|
||||
CIVector FromString (string representation);
|
||||
|
||||
[DesignatedInitializer]
|
||||
[Internal, Export ("initWithValues:count:")]
|
||||
IntPtr Constructor (IntPtr values, nint count);
|
||||
|
||||
[Mac (10,9)]
|
||||
[iOS (5,0)]
|
||||
[Export ("initWithCGPoint:")]
|
||||
|
@ -2615,7 +2671,7 @@ namespace XamCore.CoreImage {
|
|||
CIVector Extent { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
[CoreImageFilter (StringCtorVisibility = MethodAttributes.Public)]
|
||||
[iOS (9,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIAreaMaximum {
|
||||
|
@ -3723,12 +3779,9 @@ namespace XamCore.CoreImage {
|
|||
|
||||
[CoreImageFilter]
|
||||
[iOS (8,3)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
[BaseType (typeof (CILinearBlur))]
|
||||
interface CIMotionBlur {
|
||||
|
||||
[CoreImageFilterProperty ("inputRadius")]
|
||||
float Radius { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputAngle")]
|
||||
float Angle { get; set; }
|
||||
}
|
||||
|
@ -4696,31 +4749,35 @@ namespace XamCore.CoreImage {
|
|||
interface CIXRay {
|
||||
}
|
||||
|
||||
#if false // Needs review: https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
[BaseType (typeof (CIAreaMaximum))]
|
||||
interface CIAreaMinMaxRed {
|
||||
// TODO: Needs review
|
||||
//[CoreImageProperty ("inputExtent")]
|
||||
//CIVector Extent { get; set; }
|
||||
[CoreImageFilterProperty ("inputExtent")]
|
||||
CIVector Extent { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
[Abstract]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIImageGenerator {
|
||||
[CoreImageFilterProperty ("inputScaleFactor")]
|
||||
float ScaleFactor { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
[BaseType (typeof (CIImageGenerator))]
|
||||
interface CIAttributedTextImageGenerator {
|
||||
// TODO: Needs review
|
||||
//[CoreImageProperty ("inputText")]
|
||||
//NSAttributedString Text { get; set; }
|
||||
|
||||
//[CoreImageProperty ("inputScaleFactor")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float ScaleFactor { get; set; }
|
||||
[CoreImageFilterProperty ("inputText")]
|
||||
NSAttributedString Text { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
|
@ -4729,70 +4786,75 @@ namespace XamCore.CoreImage {
|
|||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIBarcodeGenerator {
|
||||
// TODO: Needs review
|
||||
//[CoreImageProperty ("inputBarcodeDescriptor")]
|
||||
//CIBarcodeDescriptor BarcodeDescriptor { get; set; }
|
||||
[CoreImageFilterProperty ("inputBarcodeDescriptor")]
|
||||
CIBarcodeDescriptor BarcodeDescriptor { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
// Maybe 'typeof (CIScaleTransform)' (shared 'Scale' and 'AspectRatio' property).
|
||||
// It's possible to add ours but it can bite us back in the future if Apple introduce the same with different properties.
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIBicubicScaleTransform {
|
||||
// TODO: Needs review
|
||||
//[CoreImageProperty ("inputB")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float B { get; set; }
|
||||
//[CoreImageProperty ("inputScale")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float Scale { get; set; }
|
||||
//[CoreImageProperty ("inputC")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float C { get; set; }
|
||||
//[CoreImageProperty ("inputAspectRatio")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float AspectRatio { get; set; }
|
||||
[CoreImageFilterProperty ("inputB")]
|
||||
float B { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputC")]
|
||||
float C { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputScale")]
|
||||
float Scale { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputAspectRatio")]
|
||||
float AspectRatio { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
[Abstract]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CILinearBlur {
|
||||
[CoreImageFilterProperty ("inputRadius")]
|
||||
float Radius { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
[BaseType (typeof (CILinearBlur))]
|
||||
interface CIBokehBlur {
|
||||
// TODO: Needs review
|
||||
//[CoreImageProperty ("inputSoftness")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float Softness { get; set; }
|
||||
//[CoreImageProperty ("inputRadius")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float Radius { get; set; }
|
||||
//[CoreImageProperty ("inputRingSize")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float RingSize { get; set; }
|
||||
//[CoreImageProperty ("inputRingAmount")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float RingAmount { get; set; }
|
||||
[CoreImageFilterProperty ("inputSoftness")]
|
||||
float Softness { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputRingSize")]
|
||||
float RingSize { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputRingAmount")]
|
||||
float RingAmount { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
[BaseType (typeof (CIFilter))] // Could almost be typeof 'CIColorCube' but property is 'inputCube0Data' not 'inputCubeData'
|
||||
interface CIColorCubesMixedWithMask {
|
||||
// TODO: Needs review
|
||||
//[CoreImageProperty ("inputCubeDimension")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float CubeDimension { get; set; }
|
||||
//[CoreImageProperty ("inputMaskImage")]
|
||||
//CIImage MaskImage { get; set; }
|
||||
//[CoreImageProperty ("inputCube0Data")]
|
||||
//NSData Cube0Data { get; set; }
|
||||
//[CoreImageProperty ("inputCube1Data")]
|
||||
//NSData Cube1Data { get; set; }
|
||||
//[CoreImageProperty ("inputColorSpace")]
|
||||
//NSObject ColorSpace { get; set; }
|
||||
[CoreImageFilterProperty ("inputCubeDimension")]
|
||||
float CubeDimension { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputMaskImage")]
|
||||
CIImage MaskImage { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputCube0Data")]
|
||||
NSData Cube0Data { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputCube1Data")]
|
||||
NSData Cube1Data { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputColorSpace")]
|
||||
CGColorSpace ColorSpace { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
|
@ -4801,13 +4863,14 @@ namespace XamCore.CoreImage {
|
|||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIColorCurves {
|
||||
// TODO: Needs review
|
||||
//[CoreImageProperty ("inputColorSpace")]
|
||||
//NSObject ColorSpace { get; set; }
|
||||
//[CoreImageProperty ("inputCurvesDomain")]
|
||||
//CIVector CurvesDomain { get; set; }
|
||||
//[CoreImageProperty ("inputCurvesData")]
|
||||
//NSData CurvesData { get; set; }
|
||||
[CoreImageFilterProperty ("inputColorSpace")]
|
||||
CGColorSpace ColorSpace { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputCurvesDomain")]
|
||||
CIVector CurvesDomain { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputCurvesData")]
|
||||
NSData CurvesData { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
|
@ -4816,67 +4879,78 @@ namespace XamCore.CoreImage {
|
|||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIDepthBlurEffect {
|
||||
// TODO: Needs review
|
||||
//[CoreImageProperty ("inputAperture")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float Aperture { get; set; }
|
||||
//[CoreImageProperty ("inputCalibrationData")]
|
||||
//AVCameraCalibrationData CalibrationData { get; set; }
|
||||
//[CoreImageProperty ("inputTuningParameters")]
|
||||
//NSDictionary TuningParameters { get; set; }
|
||||
//[CoreImageProperty ("inputNosePositions")]
|
||||
//CIVector NosePositions { get; set; }
|
||||
//[CoreImageProperty ("inputLumaNoiseScale")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float LumaNoiseScale { get; set; }
|
||||
//[CoreImageProperty ("inputChinPositions")]
|
||||
//CIVector ChinPositions { get; set; }
|
||||
//[CoreImageProperty ("inputDisparityImage")]
|
||||
//CIImage DisparityImage { get; set; }
|
||||
//[CoreImageProperty ("inputScaleFactor")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float ScaleFactor { get; set; }
|
||||
//[CoreImageProperty ("inputRightEyePositions")]
|
||||
//CIVector RightEyePositions { get; set; }
|
||||
//[CoreImageProperty ("inputLeftEyePositions")]
|
||||
//CIVector LeftEyePositions { get; set; }
|
||||
//[CoreImageProperty ("inputFocusRect")]
|
||||
//CIVector FocusRect { get; set; }
|
||||
[CoreImageFilterProperty ("inputAperture")]
|
||||
float Aperture { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputCalibrationData")]
|
||||
AVCameraCalibrationData CalibrationData { get; set; }
|
||||
|
||||
// Radar: https://trello.com/c/9eA2BA2o
|
||||
// Don't know how to test this as I don't know which keys are valid.
|
||||
// [CoreImageFilterProperty ("inputTuningParameters")]
|
||||
// NSDictionary WeakTuningParameters { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputNosePositions")]
|
||||
CIVector NosePositions { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputLumaNoiseScale")]
|
||||
float LumaNoiseScale { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputChinPositions")]
|
||||
CIVector ChinPositions { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputDisparityImage")]
|
||||
CIImage DisparityImage { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputScaleFactor")]
|
||||
float ScaleFactor { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputRightEyePositions")]
|
||||
CIVector RightEyePositions { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputLeftEyePositions")]
|
||||
CIVector LeftEyePositions { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputFocusRect")]
|
||||
CIVector FocusRect { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
[Abstract]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIDepthDisparityConverter {}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIDepthToDisparity {
|
||||
// TODO: Needs review
|
||||
}
|
||||
[BaseType (typeof (CIDepthDisparityConverter))]
|
||||
interface CIDepthToDisparity {}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIDisparityToDepth {
|
||||
// TODO: Needs review
|
||||
}
|
||||
[BaseType (typeof (CIDepthDisparityConverter))]
|
||||
interface CIDisparityToDepth {}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[NoMac]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIEdgePreserveUpsampleFilter {
|
||||
// TODO: Needs review
|
||||
//[CoreImageProperty ("inputLumaSigma")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float LumaSigma { get; set; }
|
||||
//[CoreImageProperty ("inputSmallImage")]
|
||||
//CIImage SmallImage { get; set; }
|
||||
//[CoreImageProperty ("inputSpatialSigma")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float SpatialSigma { get; set; }
|
||||
[CoreImageFilterProperty ("inputLumaSigma")]
|
||||
float LumaSigma { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputSmallImage")]
|
||||
CIImage SmallImage { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputSpatialSigma")]
|
||||
float SpatialSigma { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
|
@ -4885,75 +4959,71 @@ namespace XamCore.CoreImage {
|
|||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CILabDeltaE {
|
||||
// TODO: Needs review
|
||||
//[CoreImageProperty ("inputImage2")]
|
||||
//CIImage Image2 { get; set; }
|
||||
[CoreImageFilterProperty ("inputImage2")]
|
||||
CIImage Image2 { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
[BaseType (typeof (CIImageGenerator))]
|
||||
interface CITextImageGenerator {
|
||||
// TODO: Needs review
|
||||
//[CoreImageProperty ("inputText")]
|
||||
//NSString Text { get; set; }
|
||||
//[CoreImageProperty ("inputFontName")]
|
||||
//NSString FontName { get; set; }
|
||||
//[CoreImageProperty ("inputScaleFactor")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float ScaleFactor { get; set; }
|
||||
//[CoreImageProperty ("inputFontSize")]
|
||||
//// TODO: this was an NSNumber transformed to float, but maybe an int or bool is more appropriate
|
||||
//float FontSize { get; set; }
|
||||
[CoreImageFilterProperty ("inputText")]
|
||||
string Text { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputFontName")]
|
||||
string FontName { get; set; }
|
||||
|
||||
[CoreImageFilterProperty ("inputFontSize")]
|
||||
float FontSize { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
[Abstract]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIMorphology {
|
||||
[CoreImageFilterProperty ("inputRadius")]
|
||||
float Radius { get; set; }
|
||||
}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIMorphologyGradient {
|
||||
// TODO: Needs review: https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
}
|
||||
[BaseType (typeof (CIMorphology))]
|
||||
interface CIMorphologyGradient {}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIMorphologyMaximum {
|
||||
// TODO: Needs review: https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
}
|
||||
[BaseType (typeof (CIMorphology))]
|
||||
interface CIMorphologyMaximum {}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIMorphologyMinimum {
|
||||
// TODO: Needs review: https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
}
|
||||
[BaseType (typeof (CIMorphology))]
|
||||
interface CIMorphologyMinimum {}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIBlendWithBlueMask {
|
||||
// TODO: Needs review: https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
}
|
||||
[BaseType (typeof (CIBlendWithMask))]
|
||||
interface CIBlendWithBlueMask {}
|
||||
|
||||
[CoreImageFilter]
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
[TV (11,0)]
|
||||
[BaseType (typeof (CIFilter))]
|
||||
interface CIBlendWithRedMask {
|
||||
// TODO: Needs review: https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
}
|
||||
#endif // false
|
||||
[BaseType (typeof (CIBlendWithMask))]
|
||||
interface CIBlendWithRedMask {}
|
||||
|
||||
[iOS (11,0)]
|
||||
[Mac (10,13)]
|
||||
|
|
|
@ -15,6 +15,13 @@ using XamCore.CoreFoundation;
|
|||
using XamCore.CoreVideo;
|
||||
using XamCore.Foundation;
|
||||
|
||||
#if !WATCH
|
||||
using XamCore.Metal;
|
||||
#else
|
||||
using IMTLCommandBuffer = global::XamCore.Foundation.NSObject; // Won't be used just to make compilation happy.
|
||||
using IMTLTexture = global::XamCore.Foundation.NSObject; // Won't be used just to make compilation happy.
|
||||
#endif
|
||||
|
||||
namespace XamCore.CoreML {
|
||||
|
||||
[Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)]
|
||||
|
@ -36,6 +43,8 @@ namespace XamCore.CoreML {
|
|||
Generic = 0,
|
||||
FeatureType = 1,
|
||||
IO = 3,
|
||||
[Watch (4,2), TV (11,2), Mac (10,13,2, onlyOn64: true), iOS (11,2)]
|
||||
CustomLayer = 4,
|
||||
}
|
||||
|
||||
[Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)]
|
||||
|
@ -346,5 +355,31 @@ namespace XamCore.CoreML {
|
|||
[Export ("usesCPUOnly")]
|
||||
bool UsesCpuOnly { get; set; }
|
||||
}
|
||||
|
||||
[NoWatch, TV (11,2), Mac (10,13,2, onlyOn64: true), iOS (11,2)]
|
||||
[Protocol]
|
||||
interface MLCustomLayer {
|
||||
|
||||
// Must be manually inlined in classes implementing this protocol
|
||||
//[Abstract]
|
||||
//[Export ("initWithParameterDictionary:error:")]
|
||||
//IntPtr Constructor (NSDictionary<NSString, NSObject> parameters, [NullAllowed] out NSError error);
|
||||
|
||||
[Abstract]
|
||||
[Export ("setWeightData:error:")]
|
||||
bool SetWeightData (NSData[] weights, [NullAllowed] out NSError error);
|
||||
|
||||
[Abstract]
|
||||
[Export ("outputShapesForInputShapes:error:")]
|
||||
[return: NullAllowed]
|
||||
NSArray[] GetOutputShapes (NSArray[] inputShapes, [NullAllowed] out NSError error);
|
||||
|
||||
[Abstract]
|
||||
[Export ("evaluateOnCPUWithInputs:outputs:error:")]
|
||||
bool EvaluateOnCpu (MLMultiArray[] inputs, MLMultiArray[] outputs, [NullAllowed] out NSError error);
|
||||
|
||||
[Export ("encodeToCommandBuffer:inputs:outputs:error:")]
|
||||
bool Encode (IMTLCommandBuffer commandBuffer, IMTLTexture[] inputs, IMTLTexture[] outputs, [NullAllowed] out NSError error);
|
||||
}
|
||||
}
|
||||
#endif // XAMCORE_2_0
|
||||
|
|
|
@ -1005,6 +1005,11 @@ METALPERFORMANCESHADERS_CORE_SOURCES = \
|
|||
|
||||
METALPERFORMANCESHADERS_SOURCES = \
|
||||
MetalPerformanceShaders/MPSImageLanczosScale.cs \
|
||||
MetalPerformanceShaders/MPSCnnConvolutionDescriptor.cs \
|
||||
MetalPerformanceShaders/MPSCnnNeuron.cs \
|
||||
MetalPerformanceShaders/MPSCnnKernel.cs \
|
||||
MetalPerformanceShaders/MPSMatrixDescriptor.cs \
|
||||
MetalPerformanceShaders/MPSImageHistogram.cs \
|
||||
|
||||
# MobileCoreServices
|
||||
|
||||
|
@ -1301,6 +1306,7 @@ STOREKIT_CORE_SOURCES = \
|
|||
|
||||
STOREKIT_SOURCES = \
|
||||
StoreKit/NativeMethods.cs \
|
||||
StoreKit/SKCloudServiceSetupOptions.cs \
|
||||
StoreKit/SKPayment.cs \
|
||||
StoreKit/SKPaymentTransactionObserver.cs \
|
||||
|
||||
|
@ -1641,6 +1647,7 @@ MAC_FRAMEWORKS = \
|
|||
MediaToolbox \
|
||||
Metal \
|
||||
MetalKit \
|
||||
MetalPerformanceShaders \
|
||||
MobileCoreServices \
|
||||
ModelIO \
|
||||
MultipeerConnectivity \
|
||||
|
|
|
@ -168,8 +168,10 @@ public partial class Generator {
|
|||
indent--;
|
||||
print ("return new CGAffineTransform (1, 0, 0, 1, 0, 0);");
|
||||
break;
|
||||
// NSObject should not be added - the only case it's found (right now) is for CGColorSpace
|
||||
// NSObject should not be added
|
||||
case "AVCameraCalibrationData":
|
||||
case "CGColorSpace":
|
||||
case "CIBarcodeDescriptor":
|
||||
print ("return Runtime.GetINativeObject <{0}> (GetHandle (\"{1}\"), true);", propertyType, propertyName);
|
||||
break;
|
||||
case "CIColor":
|
||||
|
@ -187,11 +189,13 @@ public partial class Generator {
|
|||
case "int":
|
||||
print ("return GetInt (\"{0}\");", propertyName);
|
||||
break;
|
||||
case "NSAttributedString":
|
||||
case "NSData":
|
||||
// NSNumber should not be added - it should be bound as a float (common), int32 or bool
|
||||
print ("return ValueForKey (\"{0}\") as {1};", propertyName, propertyType);
|
||||
break;
|
||||
case "string":
|
||||
// NSString should not be added - it should be bound as a string
|
||||
print ("return (string) (ValueForKey (\"{0}\") as NSString);", propertyName);
|
||||
break;
|
||||
default:
|
||||
|
@ -220,18 +224,22 @@ public partial class Generator {
|
|||
case "int":
|
||||
print ("SetInt (\"{0}\", value);", propertyName);
|
||||
break;
|
||||
// NSObject should not be added - the only case it's found (right now) is for CGColorSpace
|
||||
// NSObject should not be added
|
||||
case "AVCameraCalibrationData":
|
||||
case "CGColorSpace":
|
||||
case "CIBarcodeDescriptor":
|
||||
print ("SetHandle (\"{0}\", value == null ? IntPtr.Zero : value.Handle);", propertyName);
|
||||
break;
|
||||
case "CIColor":
|
||||
case "CIImage":
|
||||
case "CIVector":
|
||||
case "NSAttributedString":
|
||||
case "NSData":
|
||||
// NSNumber should not be added - it should be bound as a int or a float
|
||||
print ("SetValue (\"{0}\", value);", propertyName);
|
||||
break;
|
||||
case "string":
|
||||
// NSString should not be added - it should be bound as a string
|
||||
print ("using (var ns = new NSString (value))");
|
||||
indent++;
|
||||
print ("SetValue (\"{0}\", ns);", propertyName);
|
||||
|
|
|
@ -626,6 +626,26 @@ namespace XamCore.HealthKit {
|
|||
[Watch (4,0), iOS (11,0)]
|
||||
[Export ("HeartRateMotionContext")]
|
||||
HKHeartRateMotionContext HeartRateMotionContext { get; }
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[Export ("AverageSpeed")]
|
||||
HKQuantity AverageSpeed { get; set; }
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[Export ("MaximumSpeed")]
|
||||
HKQuantity MaximumSpeed { get; set; }
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[Export ("AlpineSlopeGrade")]
|
||||
HKQuantity AlpineSlopeGrade { get; set; }
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[Export ("ElevationAscended")]
|
||||
HKQuantity ElevationAscended { get; set; }
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[Export ("ElevationDescended")]
|
||||
HKQuantity ElevationDescended { get; set; }
|
||||
}
|
||||
|
||||
[Watch (2,0)]
|
||||
|
@ -744,6 +764,26 @@ namespace XamCore.HealthKit {
|
|||
[Watch (4,0), iOS (11,0)]
|
||||
[Field ("HKMetadataKeyHeartRateMotionContext")]
|
||||
NSString HeartRateMotionContext { get; }
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[Field ("HKMetadataKeyAverageSpeed")]
|
||||
NSString AverageSpeed { get; }
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[Field ("HKMetadataKeyMaximumSpeed")]
|
||||
NSString MaximumSpeed { get; }
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[Field ("HKMetadataKeyAlpineSlopeGrade")]
|
||||
NSString AlpineSlopeGrade { get; }
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[Field ("HKMetadataKeyElevationAscended")]
|
||||
NSString ElevationAscended { get; }
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[Field ("HKMetadataKeyElevationDescended")]
|
||||
NSString ElevationDescended { get; }
|
||||
}
|
||||
|
||||
[Watch (2,0)]
|
||||
|
@ -1533,6 +1573,10 @@ namespace XamCore.HealthKit {
|
|||
[Field ("HKQuantityTypeIdentifierVO2Max")]
|
||||
NSString VO2Max { get; }
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[Field ("HKQuantityTypeIdentifierDistanceDownhillSnowSports")]
|
||||
NSString DistanceDownhillSnowSports { get; }
|
||||
|
||||
// If you add field, add them to the enum too.
|
||||
}
|
||||
|
||||
|
@ -2356,10 +2400,11 @@ namespace XamCore.HealthKit {
|
|||
nuint Count { get; }
|
||||
}
|
||||
|
||||
[Watch (4, 0), iOS (11, 0)]
|
||||
[BaseType (typeof(HKSeriesSample))]
|
||||
[DisableDefaultCtor]
|
||||
interface HKWorkoutRoute : NSCopying {
|
||||
[Watch (4, 0), iOS (11, 0)]
|
||||
|
||||
[Field ("HKWorkoutRouteTypeIdentifier")]
|
||||
NSString TypeIdentifier { get; }
|
||||
}
|
||||
|
|
|
@ -344,11 +344,11 @@ namespace XamCore.HomeKit {
|
|||
[BaseType (typeof (NSObject))]
|
||||
partial interface HMCharacteristic {
|
||||
|
||||
[Internal]
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Export ("characteristicType", ArgumentSemantic.Copy)]
|
||||
NSString _CharacteristicType { get; }
|
||||
NSString WeakCharacteristicType { get; }
|
||||
|
||||
[Wrap ("HMCharacteristicTypeExtensions.GetValue (_CharacteristicType)")]
|
||||
[Wrap ("HMCharacteristicTypeExtensions.GetValue (WeakCharacteristicType)")]
|
||||
HMCharacteristicType CharacteristicType { get; }
|
||||
|
||||
[Export ("service", ArgumentSemantic.Weak)]
|
||||
|
@ -583,9 +583,9 @@ namespace XamCore.HomeKit {
|
|||
[Export ("assignAccessory:toRoom:completionHandler:")]
|
||||
void AssignAccessory (HMAccessory accessory, HMRoom room, Action<NSError> completion);
|
||||
|
||||
[Internal]
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Export ("servicesWithTypes:")]
|
||||
HMService [] _ServicesWithTypes (NSString [] serviceTypes);
|
||||
HMService [] GetServices (NSString [] serviceTypes);
|
||||
|
||||
[NoTV]
|
||||
[NoWatch]
|
||||
|
@ -871,11 +871,11 @@ namespace XamCore.HomeKit {
|
|||
[Export ("accessory", ArgumentSemantic.Weak)]
|
||||
HMAccessory Accessory { get; }
|
||||
|
||||
[Internal]
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Export ("serviceType", ArgumentSemantic.Copy)]
|
||||
NSString _ServiceType { get; }
|
||||
NSString WeakServiceType { get; }
|
||||
|
||||
[Wrap ("HMServiceTypeExtensions.GetValue (_ServiceType)")]
|
||||
[Wrap ("HMServiceTypeExtensions.GetValue (WeakServiceType)")]
|
||||
HMServiceType ServiceType { get; }
|
||||
|
||||
[Export ("name")]
|
||||
|
@ -1140,11 +1140,11 @@ namespace XamCore.HomeKit {
|
|||
[BaseType (typeof (NSObject))]
|
||||
[DisableDefaultCtor] // NSInternalInconsistencyException Reason: init is unavailable
|
||||
interface HMAccessoryCategory {
|
||||
[Internal]
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Export ("categoryType")]
|
||||
NSString _CategoryType { get; }
|
||||
NSString WeakCategoryType { get; }
|
||||
|
||||
[Wrap ("HMAccessoryCategoryTypeExtensions.GetValue (_CategoryType)")]
|
||||
[Wrap ("HMAccessoryCategoryTypeExtensions.GetValue (WeakCategoryType)")]
|
||||
HMAccessoryCategoryType CategoryType { get; }
|
||||
|
||||
[Export ("localizedDescription")]
|
||||
|
@ -1331,7 +1331,7 @@ namespace XamCore.HomeKit {
|
|||
|
||||
[iOS (9,0)]
|
||||
[TV (10,0)]
|
||||
[BaseType (typeof (NSObject))]
|
||||
[BaseType (typeof (HMAccessControl))]
|
||||
[DisableDefaultCtor]
|
||||
interface HMHomeAccessControl {
|
||||
[Export ("administrator")]
|
||||
|
@ -1711,12 +1711,12 @@ namespace XamCore.HomeKit {
|
|||
[Wrap ("this (HMSignificantEventExtensions.GetConstant (significantEvent), offset)")]
|
||||
IntPtr Constructor (HMSignificantEvent significantEvent, [NullAllowed] NSDateComponents offset);
|
||||
|
||||
[Internal]
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Export ("significantEvent", ArgumentSemantic.Strong)]
|
||||
NSString _SignificantEvent { get; [NotImplemented] set; }
|
||||
NSString WeakSignificantEvent { get; [NotImplemented] set; }
|
||||
|
||||
// FIXME: Bug https://bugzilla.xamarin.com/show_bug.cgi?id=57870
|
||||
// [Wrap ("HMSignificantEventExtensions.GetValue (_SignificantEvent)")]
|
||||
// [Wrap ("HMSignificantEventExtensions.GetValue (WeakSignificantEvent)")]
|
||||
// HMSignificantEvent SignificantEvent { get; [NotImplemented] set; }
|
||||
|
||||
[NullAllowed, Export ("offset", ArgumentSemantic.Strong)]
|
||||
|
@ -1734,18 +1734,27 @@ namespace XamCore.HomeKit {
|
|||
[Wrap ("this (HMSignificantEventExtensions.GetConstant (significantEvent), offset)")]
|
||||
IntPtr Constructor (HMSignificantEvent significantEvent, [NullAllowed] NSDateComponents offset);
|
||||
|
||||
[Internal]
|
||||
[EditorBrowsable (EditorBrowsableState.Advanced)]
|
||||
[Override]
|
||||
[Export ("significantEvent", ArgumentSemantic.Strong)]
|
||||
NSString _SignificantEvent { get; set; }
|
||||
NSString WeakSignificantEvent { get; set; }
|
||||
|
||||
// FIXME: Bug https://bugzilla.xamarin.com/show_bug.cgi?id=57870
|
||||
// [Override]
|
||||
// [Wrap ("HMSignificantEventExtensions.GetValue (_SignificantEvent)")]
|
||||
// [Wrap ("HMSignificantEventExtensions.GetValue (WeakSignificantEvent)")]
|
||||
// HMSignificantEvent SignificantEvent { get; set; }
|
||||
|
||||
[Override]
|
||||
[Export ("offset", ArgumentSemantic.Strong)]
|
||||
NSDateComponents Offset { get; set; }
|
||||
}
|
||||
|
||||
[Watch (4,2), TV (11,2), iOS (11,2)]
|
||||
[BaseType (typeof (NSObject))]
|
||||
[DisableDefaultCtor]
|
||||
interface HMAccessControl {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -730,8 +730,13 @@ namespace XamCore.ImageKit {
|
|||
[Export ("backgroundColor", ArgumentSemantic.Assign)]
|
||||
NSColor BackgroundColor { get; set; }
|
||||
|
||||
#if !XAMCORE_4_0
|
||||
[Export ("setImage:imageProperties:")]
|
||||
void SetImageimageProperties (CGImage image, NSDictionary metaData);
|
||||
#else
|
||||
[Export ("setImage:imageProperties:")]
|
||||
void SetImage (CGImage image, NSDictionary metaData);
|
||||
#endif
|
||||
|
||||
[Export ("setImageWithURL:")]
|
||||
void SetImageWithURL (NSUrl url);
|
||||
|
|
|
@ -7818,10 +7818,16 @@ namespace XamCore.Intents {
|
|||
[BaseType (typeof (INIntent))]
|
||||
interface INSearchForNotebookItemsIntent {
|
||||
|
||||
[Deprecated (PlatformName.WatchOS, 4, 2, message: "Use the constructor with 'string notebookItemIdentifier' instead.")]
|
||||
[Deprecated (PlatformName.iOS, 11, 2, message: "Use the constructor with 'string notebookItemIdentifier' instead.")]
|
||||
[Export ("initWithTitle:content:itemType:status:location:locationSearchType:dateTime:dateSearchType:")]
|
||||
[DesignatedInitializer]
|
||||
IntPtr Constructor ([NullAllowed] INSpeakableString title, [NullAllowed] string content, INNotebookItemType itemType, INTaskStatus status, [NullAllowed] CLPlacemark location, INLocationSearchType locationSearchType, [NullAllowed] INDateComponentsRange dateTime, INDateSearchType dateSearchType);
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[Export ("initWithTitle:content:itemType:status:location:locationSearchType:dateTime:dateSearchType:notebookItemIdentifier:")]
|
||||
[DesignatedInitializer]
|
||||
IntPtr Constructor ([NullAllowed] INSpeakableString title, [NullAllowed] string content, INNotebookItemType itemType, INTaskStatus status, [NullAllowed] CLPlacemark location, INLocationSearchType locationSearchType, [NullAllowed] INDateComponentsRange dateTime, INDateSearchType dateSearchType, [NullAllowed] string notebookItemIdentifier);
|
||||
|
||||
[NullAllowed, Export ("title", ArgumentSemantic.Copy)]
|
||||
INSpeakableString Title { get; }
|
||||
|
||||
|
@ -7845,6 +7851,10 @@ namespace XamCore.Intents {
|
|||
|
||||
[Export ("dateSearchType", ArgumentSemantic.Assign)]
|
||||
INDateSearchType DateSearchType { get; }
|
||||
|
||||
[Watch (4,2), iOS (11,2)]
|
||||
[NullAllowed, Export ("notebookItemIdentifier")]
|
||||
string NotebookItemIdentifier { get; }
|
||||
}
|
||||
|
||||
[Watch (4,0), NoMac, iOS (11,0)]
|
||||
|
|
|
@ -5,12 +5,18 @@ using XamCore.Security;
|
|||
|
||||
namespace XamCore.LocalAuthentication {
|
||||
|
||||
[iOS (11,0), NoMac]
|
||||
[Mac (10,13,2)][iOS (11,0)]
|
||||
[Native]
|
||||
public enum LABiometryType : nint {
|
||||
None,
|
||||
TouchId,
|
||||
TypeFaceId,
|
||||
[NoMac]
|
||||
FaceId,
|
||||
#if !XAMCORE_4_0
|
||||
[NoMac]
|
||||
[Obsolete ("Use 'FaceId' instead.")]
|
||||
TypeFaceId = FaceId,
|
||||
#endif
|
||||
}
|
||||
|
||||
[iOS (8,0), Mac (10,10)]
|
||||
|
@ -86,7 +92,7 @@ namespace XamCore.LocalAuthentication {
|
|||
[Export ("interactionNotAllowed")]
|
||||
bool InteractionNotAllowed { get; set; }
|
||||
|
||||
[NoMac, iOS (11,0)]
|
||||
[Mac (10,13,2)][iOS (11,0)]
|
||||
[Export ("biometryType")]
|
||||
LABiometryType BiometryType { get; }
|
||||
}
|
||||
|
|
|
@ -1375,7 +1375,7 @@ namespace XamCore.MediaPlayer {
|
|||
|
||||
[NoiOS]
|
||||
[NoTV]
|
||||
[Export ("playbackState", ArgumentSemantic.Assign)]
|
||||
[Export ("playbackState")]
|
||||
MPNowPlayingPlaybackState PlaybackState { get; set; }
|
||||
|
||||
[Internal]
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -192,9 +192,15 @@ namespace XamCore.NotificationCenter {
|
|||
[BaseType (typeof(NSObject))]
|
||||
interface NCWidgetSearchViewDelegate
|
||||
{
|
||||
#if !XAMCORE_4_0
|
||||
[Abstract]
|
||||
[Export ("widgetSearch:searchForTerm:maxResults:"), EventArgs ("NSWidgetSearchForTerm"), DefaultValue (false)]
|
||||
void SearchForTearm (NCWidgetSearchViewController controller, string searchTerm, nuint max);
|
||||
#else
|
||||
[Abstract]
|
||||
[Export ("widgetSearch:searchForTerm:maxResults:"), EventArgs ("NSWidgetSearchForTerm"), DefaultValue (false)]
|
||||
void SearchForTerm (NCWidgetSearchViewController controller, string searchTerm, nuint max);
|
||||
#endif
|
||||
|
||||
[Abstract]
|
||||
[Export ("widgetSearchTermCleared:"), EventArgs ("NSWidgetSearchViewController"), DefaultValue (false)]
|
||||
|
|
|
@ -779,15 +779,21 @@ namespace XamCore.PassKit {
|
|||
NSString Amex { get; }
|
||||
|
||||
[iOS (10,3), Watch (3,2)]
|
||||
[Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'CarteBancaires' instead.")]
|
||||
[Deprecated (PlatformName.iOS, 11,0, message: "Use 'CarteBancaires' instead.")]
|
||||
[Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'CartesBancaires' instead.")]
|
||||
[Deprecated (PlatformName.iOS, 11,0, message: "Use 'CartesBancaires' instead.")]
|
||||
[Field ("PKPaymentNetworkCarteBancaire")]
|
||||
NSString CarteBancaire { get; }
|
||||
|
||||
[iOS (11,0)][Watch (4,0)]
|
||||
[Deprecated (PlatformName.WatchOS, 4,2, message: "Use 'CartesBancaires' instead.")]
|
||||
[Deprecated (PlatformName.iOS, 11,2, message: "Use 'CartesBancaires' instead.")]
|
||||
[Field ("PKPaymentNetworkCarteBancaires")]
|
||||
NSString CarteBancaires { get; }
|
||||
|
||||
[iOS (11,2)][Watch (4,2)]
|
||||
[Field ("PKPaymentNetworkCartesBancaires")]
|
||||
NSString CartesBancaires { get; }
|
||||
|
||||
[iOS (9,2)]
|
||||
[Watch (2,2)]
|
||||
[Field ("PKPaymentNetworkChinaUnionPay")]
|
||||
|
|
|
@ -674,6 +674,10 @@ namespace XamCore.PdfKit {
|
|||
[NullAllowed, Export ("fontColor", ArgumentSemantic.Copy)]
|
||||
NSColor FontColor { get; set; }
|
||||
|
||||
[Mac (10,13,2), iOS (11,2)]
|
||||
[NullAllowed, Export ("interiorColor", ArgumentSemantic.Copy)]
|
||||
NSColor InteriorColor { get; set; }
|
||||
|
||||
[Mac (10,13)]
|
||||
[Export ("alignment", ArgumentSemantic.Assign)]
|
||||
NSTextAlignment Alignment { get; set; }
|
||||
|
@ -816,6 +820,10 @@ namespace XamCore.PdfKit {
|
|||
[Mac (10,13)]
|
||||
[NullAllowed, Export ("backgroundColor", ArgumentSemantic.Copy)]
|
||||
NSColor BackgroundColor { get; set; }
|
||||
|
||||
[Mac (10,13,2), iOS (11,2)]
|
||||
[NullAllowed, Export ("stampName")]
|
||||
string StampName { get; set; }
|
||||
}
|
||||
|
||||
[NoiOS]
|
||||
|
@ -909,11 +917,19 @@ namespace XamCore.PdfKit {
|
|||
[Export ("paths")]
|
||||
NSBezierPath [] Paths { get; }
|
||||
|
||||
#if !XAMCORE_4_0
|
||||
[Export ("addBezierPath:")]
|
||||
void AddBezierPathpath (NSBezierPath path);
|
||||
|
||||
[Export ("removeBezierPath:")]
|
||||
void RemoveBezierPathpath (NSBezierPath path);
|
||||
#else
|
||||
[Export ("addBezierPath:")]
|
||||
void AddBezierPath (NSBezierPath path);
|
||||
|
||||
[Export ("removeBezierPath:")]
|
||||
void RemoveBezierPath (NSBezierPath path);
|
||||
#endif
|
||||
}
|
||||
|
||||
[NoiOS]
|
||||
|
@ -1396,6 +1412,7 @@ namespace XamCore.PdfKit {
|
|||
[Export ("index")]
|
||||
nint Index { get; }
|
||||
|
||||
[return: NullAllowed]
|
||||
[Export ("childAtIndex:")]
|
||||
PdfOutline Child (nint index);
|
||||
|
||||
|
@ -1524,7 +1541,7 @@ namespace XamCore.PdfKit {
|
|||
[return: NullAllowed]
|
||||
PdfSelection GetSelection (NSRange range);
|
||||
|
||||
[Export ("dataRepresentation")]
|
||||
[Export ("dataRepresentation"), NullAllowed]
|
||||
NSData DataRepresentation { get; }
|
||||
}
|
||||
|
||||
|
|
|
@ -302,6 +302,10 @@ namespace XamCore.ReplayKit {
|
|||
[Field ("RPVideoSampleOrientationKey")]
|
||||
NSString VideoSampleOrientationKey { get; }
|
||||
|
||||
[NoTV, iOS (11, 2)]
|
||||
[Field ("RPApplicationInfoBundleIdentifierKey")]
|
||||
NSString ApplicationInfoBundleIdentifierKey { get; }
|
||||
|
||||
[Export ("broadcastStartedWithSetupInfo:")]
|
||||
void BroadcastStarted ([NullAllowed] NSDictionary<NSString, NSObject> setupInfo);
|
||||
|
||||
|
@ -314,6 +318,10 @@ namespace XamCore.ReplayKit {
|
|||
[Export ("broadcastFinished")]
|
||||
void BroadcastFinished ();
|
||||
|
||||
[NoTV, iOS (11,2)]
|
||||
[Export ("broadcastAnnotatedWithApplicationInfo:")]
|
||||
void BroadcastAnnotated (NSDictionary applicationInfo);
|
||||
|
||||
[Export ("processSampleBuffer:withType:")]
|
||||
void ProcessSampleBuffer (CMSampleBuffer sampleBuffer, RPSampleBufferType sampleBufferType);
|
||||
|
||||
|
|
|
@ -121,12 +121,14 @@ namespace XamCore.SceneKit {
|
|||
[Export ("addAnimation:forKey:")]
|
||||
void AddAnimation (CAAnimation animation, [NullAllowed] NSString key);
|
||||
|
||||
#if XAMCORE_2_0
|
||||
#if XAMCORE_4_0
|
||||
[Abstract]
|
||||
#endif
|
||||
[iOS (11,0), TV (11,0), Watch (4,0), Mac (10,13, onlyOn64: true)]
|
||||
[Export ("addAnimationPlayer:forKey:")]
|
||||
void AddAnimation (SCNAnimationPlayer player, [NullAllowed] NSString key);
|
||||
#endif
|
||||
|
||||
#if XAMCORE_2_0
|
||||
[Abstract]
|
||||
|
@ -146,6 +148,7 @@ namespace XamCore.SceneKit {
|
|||
[Export ("animationKeys")]
|
||||
NSString [] GetAnimationKeys ();
|
||||
|
||||
#if XAMCORE_2_0
|
||||
#if XAMCORE_4_0
|
||||
[Abstract]
|
||||
#endif
|
||||
|
@ -153,6 +156,7 @@ namespace XamCore.SceneKit {
|
|||
[iOS (11,0), TV (11,0), Watch (4,0), Mac (10,13, onlyOn64: true)]
|
||||
[Export ("animationPlayerForKey:")]
|
||||
SCNAnimationPlayer GetAnimationPlayer (NSString key);
|
||||
#endif
|
||||
|
||||
#if XAMCORE_2_0
|
||||
[Abstract]
|
||||
|
@ -2716,6 +2720,10 @@ namespace XamCore.SceneKit {
|
|||
[Field ("SCNSceneSourceStrictConformanceKey")]
|
||||
NSString StrictConformanceKey { get; }
|
||||
|
||||
[Deprecated (PlatformName.WatchOS, 4, 0)]
|
||||
[Deprecated (PlatformName.TvOS, 11, 0)]
|
||||
[Deprecated (PlatformName.iOS, 11, 0)]
|
||||
[Deprecated (PlatformName.MacOSX, 10, 13)]
|
||||
[Field ("SCNSceneSourceUseSafeModeKey")]
|
||||
NSString UseSafeModeKey { get; }
|
||||
|
||||
|
@ -3340,11 +3348,11 @@ namespace XamCore.SceneKit {
|
|||
SCNAntialiasingMode AntialiasingMode { get; set; }
|
||||
|
||||
#if XAMCORE_2_0
|
||||
[Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)]
|
||||
[Watch (4, 0), TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
[Export ("cameraControlConfiguration")]
|
||||
ISCNCameraControlConfiguration CameraControlConfiguration { get; }
|
||||
|
||||
[Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)]
|
||||
[Watch (4, 0), TV (11, 0), Mac (10, 13, onlyOn64: true), iOS (11, 0)]
|
||||
[Export ("defaultCameraController")]
|
||||
SCNCameraController DefaultCameraController { get; }
|
||||
#endif
|
||||
|
@ -4833,7 +4841,7 @@ namespace XamCore.SceneKit {
|
|||
unsafe void Length (IntPtr bytes, nuint length);
|
||||
}
|
||||
|
||||
[Watch (4,0), TV (11,0), Mac (10, 13), iOS (11,0)]
|
||||
[Watch (4,0), TV (11,0), Mac (10, 13, onlyOn64: true), iOS (11,0)]
|
||||
[BaseType (typeof(NSObject))]
|
||||
interface SCNTimingFunction : NSSecureCoding
|
||||
{
|
||||
|
@ -4853,7 +4861,7 @@ namespace XamCore.SceneKit {
|
|||
|
||||
interface ISCNAnimationProtocol {}
|
||||
|
||||
[Watch (4,0), TV (11,0), Mac (10, 13), iOS (11,0)]
|
||||
[Watch (4,0), TV (11,0), Mac (10, 13, onlyOn64: true), iOS (11,0)]
|
||||
[BaseType (typeof(NSObject))]
|
||||
interface SCNAnimation : SCNAnimationProtocol, NSCopying, NSSecureCoding
|
||||
{
|
||||
|
@ -4927,7 +4935,7 @@ namespace XamCore.SceneKit {
|
|||
bool Cumulative { [Bind ("isCumulative")] get; set; }
|
||||
}
|
||||
|
||||
[Watch (4,0), TV (11,0), Mac (10, 13), iOS (11,0)]
|
||||
[Watch (4,0), TV (11,0), Mac (10, 13, onlyOn64: true), iOS (11,0)]
|
||||
[BaseType (typeof(NSObject))]
|
||||
interface SCNAnimationPlayer : SCNAnimatable, NSCopying, NSSecureCoding
|
||||
{
|
||||
|
|
|
@ -155,11 +155,16 @@ namespace XamCore.ScriptingBridge {
|
|||
[Model]
|
||||
[Protocol]
|
||||
interface SBApplicationDelegate {
|
||||
#if !XAMCORE_4_0
|
||||
[Abstract]
|
||||
[Export ("eventDidFail:withError:"), DelegateName ("SBApplicationError"), DefaultValue (null)]
|
||||
//NSObject EventDidFailwithError (const AppleEvent event, NSError error);
|
||||
NSObject EventDidFailwithError (IntPtr appleEvent, NSError error);
|
||||
|
||||
#else
|
||||
[Abstract]
|
||||
[Export ("eventDidFail:withError:"), DelegateName ("SBApplicationError"), DefaultValue (null)]
|
||||
NSObject EventFailed (IntPtr appleEvent, NSError error);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
104
src/security.cs
104
src/security.cs
|
@ -134,9 +134,10 @@ namespace XamCore.Security {
|
|||
[Field ("kSecTrustCertificateTransparency")]
|
||||
NSString CertificateTransparency { get; }
|
||||
|
||||
[iOS (10,0)][Mac (10,12)]
|
||||
[Watch (3,0)]
|
||||
[TV (10,0)]
|
||||
[iOS (10,0)][Deprecated (PlatformName.iOS, 11,0)]
|
||||
[Mac (10,12)][Deprecated (PlatformName.MacOSX, 10,13)]
|
||||
[Watch (3,0)][Deprecated (PlatformName.WatchOS, 4,0)]
|
||||
[TV (10,0)][Deprecated (PlatformName.TvOS, 11,0)]
|
||||
[Field ("kSecTrustCertificateTransparencyWhiteList")]
|
||||
NSString CertificateTransparencyWhiteList { get; }
|
||||
}
|
||||
|
@ -503,6 +504,11 @@ namespace XamCore.Security {
|
|||
[TV (10,0)]
|
||||
[Field ("kSecAttrAccessGroupToken")]
|
||||
IntPtr AccessGroupToken { get; }
|
||||
|
||||
// note: kSecAttrPersistentReference (beta 1) is a typo that was not removed
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecAttrPersistentReference")]
|
||||
IntPtr PersistentReference { get; }
|
||||
}
|
||||
|
||||
[Static][Internal]
|
||||
|
@ -828,10 +834,86 @@ namespace XamCore.Security {
|
|||
|
||||
[Field ("kSecKeyAlgorithmECDHKeyExchangeCofactorX963SHA512")]
|
||||
EcdhKeyExchangeCofactorX963Sha512,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmRSASignatureDigestPSSSHA1")]
|
||||
RsaSignatureDigestPssSha1,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmRSASignatureDigestPSSSHA224")]
|
||||
RsaSignatureDigestPssSha224,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmRSASignatureDigestPSSSHA256")]
|
||||
RsaSignatureDigestPssSha256,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmRSASignatureDigestPSSSHA384")]
|
||||
RsaSignatureDigestPssSha384,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmRSASignatureDigestPSSSHA512")]
|
||||
RsaSignatureDigestPssSha512,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmRSASignatureMessagePSSSHA1")]
|
||||
RsaSignatureMessagePssSha1,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmRSASignatureMessagePSSSHA224")]
|
||||
RsaSignatureMessagePssSha224,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmRSASignatureMessagePSSSHA256")]
|
||||
RsaSignatureMessagePssSha256,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmRSASignatureMessagePSSSHA384")]
|
||||
RsaSignatureMessagePssSha384,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmRSASignatureMessagePSSSHA512")]
|
||||
RsaSignatureMessagePssSha512,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmECIESEncryptionStandardVariableIVX963SHA224AESGCM")]
|
||||
EciesEncryptionStandardVariableIvx963Sha224AesGcm,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmECIESEncryptionStandardVariableIVX963SHA256AESGCM")]
|
||||
EciesEncryptionStandardVariableIvx963Sha256AesGcm,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmECIESEncryptionStandardVariableIVX963SHA384AESGCM")]
|
||||
EciesEncryptionStandardVariableIvx963Sha384AesGcm,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmECIESEncryptionStandardVariableIVX963SHA512AESGCM")]
|
||||
EciesEncryptionStandardVariableIvx963Sha512AesGcm,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmECIESEncryptionCofactorVariableIVX963SHA224AESGCM")]
|
||||
EciesEncryptionCofactorVariableIvx963Sha224AesGcm,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmECIESEncryptionCofactorVariableIVX963SHA256AESGCM")]
|
||||
EciesEncryptionCofactorVariableIvx963Sha256AesGcm,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmECIESEncryptionCofactorVariableIVX963SHA384AESGCM")]
|
||||
EciesEncryptionCofactorVariableIvx963Sha384AesGcm,
|
||||
|
||||
[iOS (11,0)][TV (11,0)][Watch (4,0)][Mac (10,13)]
|
||||
[Field ("kSecKeyAlgorithmECIESEncryptionCofactorVariableIVX963SHA512AESGCM")]
|
||||
EciesEncryptionCofactorVariableIvx963Sha512AesGcm,
|
||||
}
|
||||
|
||||
[iOS (10,0)][TV (10,0)][Watch (3,0)][Mac (10,12)]
|
||||
enum SslSessionConfig {
|
||||
[Deprecated (PlatformName.iOS, 11,0)]
|
||||
[Deprecated (PlatformName.MacOSX, 10,13)]
|
||||
[Deprecated (PlatformName.WatchOS, 4,0)]
|
||||
[Deprecated (PlatformName.TvOS, 11,0)]
|
||||
[Field ("kSSLSessionConfig_default")]
|
||||
Default,
|
||||
|
||||
|
@ -844,12 +926,20 @@ namespace XamCore.Security {
|
|||
[Field ("kSSLSessionConfig_standard")]
|
||||
Standard,
|
||||
|
||||
[Deprecated (PlatformName.iOS, 11,0)]
|
||||
[Deprecated (PlatformName.MacOSX, 10,13)]
|
||||
[Deprecated (PlatformName.WatchOS, 4,0)]
|
||||
[Deprecated (PlatformName.TvOS, 11,0)]
|
||||
[Field ("kSSLSessionConfig_RC4_fallback")]
|
||||
RC4Fallback,
|
||||
|
||||
[Field ("kSSLSessionConfig_TLSv1_fallback")]
|
||||
Tls1Fallback,
|
||||
|
||||
[Deprecated (PlatformName.iOS, 11,0)]
|
||||
[Deprecated (PlatformName.MacOSX, 10,13)]
|
||||
[Deprecated (PlatformName.WatchOS, 4,0)]
|
||||
[Deprecated (PlatformName.TvOS, 11,0)]
|
||||
[Field ("kSSLSessionConfig_TLSv1_RC4_fallback")]
|
||||
Tls1RC4Fallback,
|
||||
|
||||
|
@ -864,11 +954,19 @@ namespace XamCore.Security {
|
|||
|
||||
[iOS (10,2)][TV (10,1)][Mac (10,12,2)]
|
||||
[Watch (3,2)]
|
||||
[Deprecated (PlatformName.iOS, 11,0)]
|
||||
[Deprecated (PlatformName.MacOSX, 10,13)]
|
||||
[Deprecated (PlatformName.WatchOS, 4,0)]
|
||||
[Deprecated (PlatformName.TvOS, 11,0)]
|
||||
[Field ("kSSLSessionConfig_3DES_fallback")]
|
||||
ThreeDesFallback,
|
||||
|
||||
[iOS (10,2)][TV (10,1)][Mac (10,12,2)]
|
||||
[Watch (3,2)]
|
||||
[Deprecated (PlatformName.iOS, 11,0)]
|
||||
[Deprecated (PlatformName.MacOSX, 10,13)]
|
||||
[Deprecated (PlatformName.WatchOS, 4,0)]
|
||||
[Deprecated (PlatformName.TvOS, 11,0)]
|
||||
[Field ("kSSLSessionConfig_TLSv1_3DES_fallback")]
|
||||
Tls1ThreeDesFallback,
|
||||
}
|
||||
|
|
|
@ -234,6 +234,14 @@ namespace XamCore.StoreKit {
|
|||
[Export ("downloadContentVersion")]
|
||||
#endif
|
||||
string DownloadContentVersion { get; }
|
||||
|
||||
[iOS (11,2), TV (11,2), Mac (10,13,2)]
|
||||
[NullAllowed, Export ("subscriptionPeriod")]
|
||||
SKProductSubscriptionPeriod SubscriptionPeriod { get; }
|
||||
|
||||
[iOS (11,2), TV (11,2), Mac (10,13,2)]
|
||||
[NullAllowed, Export ("introductoryPrice")]
|
||||
SKProductDiscount IntroductoryPrice { get; }
|
||||
}
|
||||
|
||||
[BaseType (typeof (NSObject))]
|
||||
|
@ -538,7 +546,11 @@ namespace XamCore.StoreKit {
|
|||
interface SKCloudServiceSetupOptions
|
||||
{
|
||||
// Headers comment: Action for setup entry point (of type SKCloudServiceSetupAction).
|
||||
SKCloudServiceSetupAction Action { get; set; }
|
||||
// FIXME: Once https://bugzilla.xamarin.com/show_bug.cgi?id=57870 is fixed we should have a wrapper on a new property
|
||||
// `SKCloudServiceSetupAction Action { get; set; }` and avoid manual code.
|
||||
[Internal]
|
||||
[Export ("ActionKey")]
|
||||
NSString _Action { get; set; }
|
||||
|
||||
// Headers comment: Identifier of the iTunes Store item the user is trying to access which requires cloud service setup (NSNumber).
|
||||
nint ITunesItemIdentifier { get; set; }
|
||||
|
@ -631,4 +643,35 @@ namespace XamCore.StoreKit {
|
|||
void Update (SKProduct[] storePromotionOrder, [NullAllowed] Action<NSError> completionHandler);
|
||||
}
|
||||
#endif
|
||||
|
||||
[iOS (11,2), TV (11,2), Mac (10,13,2)]
|
||||
[BaseType (typeof (NSObject))]
|
||||
interface SKProductSubscriptionPeriod {
|
||||
|
||||
[Export ("numberOfUnits")]
|
||||
nuint NumberOfUnits { get; }
|
||||
|
||||
[Export ("unit")]
|
||||
SKProductPeriodUnit Unit { get; }
|
||||
}
|
||||
|
||||
[iOS (11,2), TV (11,2), Mac (10,13,2)]
|
||||
[BaseType (typeof (NSObject))]
|
||||
interface SKProductDiscount {
|
||||
|
||||
[Export ("price")]
|
||||
NSDecimalNumber Price { get; }
|
||||
|
||||
[Export ("priceLocale")]
|
||||
NSLocale PriceLocale { get; }
|
||||
|
||||
[Export ("subscriptionPeriod")]
|
||||
SKProductSubscriptionPeriod SubscriptionPeriod { get; }
|
||||
|
||||
[Export ("numberOfPeriods")]
|
||||
nuint NumberOfPeriods { get; }
|
||||
|
||||
[Export ("paymentMode")]
|
||||
SKProductDiscountPaymentMode PaymentMode { get; }
|
||||
}
|
||||
}
|
||||
|
|
12
src/uikit.cs
12
src/uikit.cs
|
@ -14206,8 +14206,8 @@ namespace XamCore.UIKit {
|
|||
bool ExtendedLayoutIncludesOpaqueBars { get; set; }
|
||||
|
||||
[Since (7,0)]
|
||||
[Deprecated (PlatformName.iOS, 11, 0, message: "Use UIScrollView's 'ContentInsetAdjustmentBehavior' instead.")]
|
||||
[Deprecated (PlatformName.TvOS, 11, 0, message: "Use UIScrollView's 'ContentInsetAdjustmentBehavior' instead.")]
|
||||
[Deprecated (PlatformName.iOS, 11, 0, message: "Use 'UIScrollView.ContentInsetAdjustmentBehavior' instead.")]
|
||||
[Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'UIScrollView.ContentInsetAdjustmentBehavior' instead.")]
|
||||
[Export ("automaticallyAdjustsScrollViewInsets", ArgumentSemantic.Assign)]
|
||||
bool AutomaticallyAdjustsScrollViewInsets { get; set; }
|
||||
|
||||
|
@ -14254,14 +14254,14 @@ namespace XamCore.UIKit {
|
|||
UIViewController ChildViewControllerForStatusBarHidden ();
|
||||
|
||||
[Since (7,0)]
|
||||
[Deprecated (PlatformName.iOS, 11, 0, message: "Use UIView's 'SafeAreaLayoutGuide' instead.")]
|
||||
[Deprecated (PlatformName.TvOS, 11, 0, message: "Use UIView's 'SafeAreaLayoutGuide' instead.")]
|
||||
[Deprecated (PlatformName.iOS, 11, 0, message: "Use 'UIView.SafeAreaLayoutGuide.TopAnchor' instead.")]
|
||||
[Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'UIView.SafeAreaLayoutGuide.TopAnchor' instead.")]
|
||||
[Export ("topLayoutGuide")]
|
||||
IUILayoutSupport TopLayoutGuide { get; }
|
||||
|
||||
[Since (7,0)]
|
||||
[Deprecated (PlatformName.iOS, 11, 0, message: "Use UIView's 'SafeAreaLayoutGuide' instead.")]
|
||||
[Deprecated (PlatformName.TvOS, 11, 0, message: "Use UIView's 'SafeAreaLayoutGuide' instead.")]
|
||||
[Deprecated (PlatformName.iOS, 11, 0, message: "Use 'UIView.SafeAreaLayoutGuide.BottomAnchor' instead.")]
|
||||
[Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'UIView.SafeAreaLayoutGuide.BottomAnchor' instead.")]
|
||||
[Export ("bottomLayoutGuide")]
|
||||
IUILayoutSupport BottomLayoutGuide { get; }
|
||||
|
||||
|
|
|
@ -892,6 +892,10 @@ namespace XamCore.WatchKit {
|
|||
[Export ("autorotating")]
|
||||
bool Autorotating { [Bind ("isAutorotating")] get; set; }
|
||||
|
||||
[Watch (4,2)]
|
||||
[Export ("autorotated")]
|
||||
bool Autorotated { [Bind ("isAutorotated")] get; }
|
||||
|
||||
[Watch (4,0)]
|
||||
[Export ("frontmostTimeoutExtended")]
|
||||
bool FrontmostTimeoutExtended { [Bind ("isFrontmostTimeoutExtended")] get; set; }
|
||||
|
|
|
@ -2323,8 +2323,13 @@ namespace XamCore.WebKit {
|
|||
[Export ("webView:validateUserInterfaceItem:defaultValidation:"), DelegateName ("WebViewValidateUserInterface"), DefaultValueFromArgument ("defaultValidation")]
|
||||
bool UIValidateUserInterfaceItem (WebView webView, NSObject validatedUserInterfaceItem, bool defaultValidation);
|
||||
|
||||
#if !XAMCORE_4_0
|
||||
[Export ("webView:shouldPerformAction:fromSender:"), DelegateName("WebViewPerformAction"), DefaultValue (null)]
|
||||
bool UIShouldPerformActionfromSender (WebView webView, Selector action, NSObject sender);
|
||||
#else
|
||||
[Export ("webView:shouldPerformAction:fromSender:"), DelegateName("WebViewPerformAction"), DefaultValue (null)]
|
||||
bool UIShouldPerformAction (WebView webView, Selector action, NSObject sender);
|
||||
#endif
|
||||
|
||||
[Export ("webView:dragDestinationActionMaskForDraggingInfo:"), DelegateName ("DragDestinationGetActionMask"), DefaultValue (0)]
|
||||
NSEventModifierMask UIGetDragDestinationActionMask (WebView webView, NSDraggingInfo draggingInfo);
|
||||
|
|
|
@ -313,6 +313,11 @@ wrench-mac-binding-project:
|
|||
wrench-mac-introspection:
|
||||
@echo Not here anymore
|
||||
|
||||
wrench-mac-xammac_tests:
|
||||
@# This entire target can be removed when merging to master.
|
||||
$(Q) $(MAKE) run-mac-xammac_tests
|
||||
$(Q) $(MAKE) clean-mac-xammac_tests
|
||||
git clean -xfdq
|
||||
else
|
||||
wrench-mac-%:
|
||||
@echo "Mac tests have been disabled [$@]"
|
||||
|
|
|
@ -59,6 +59,7 @@ namespace Xamarin.Mac.Tests
|
|||
case "MapKitLibrary":
|
||||
case "MediaLibraryLibrary":
|
||||
case "MetalKitLibrary":
|
||||
case "MetalPerformanceShadersLibrary":
|
||||
case "ModelIOLibrary":
|
||||
case "MultipeerConnectivityLibrary":
|
||||
case "NetworkExtensionLibrary":
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace Xamarin.Tests {
|
|||
static PlatformInfo host => PlatformInfo.Host;
|
||||
|
||||
public static bool CheckSystemVersion (int major, int minor) => host.Version >= new Version (major, minor);
|
||||
public static bool CheckSystemVersion (int major, int minor, int build) => host.Version >= new Version (major, minor, build);
|
||||
public static bool Is32BitMavericks => host.IsArch32 && IsAtLeast (Version_10_9);
|
||||
public static bool IsYosemiteOrHigher => IsAtLeast (Version_10_10);
|
||||
public static bool IsElCapitanOrHigher => IsAtLeast (Version_10_11);
|
||||
|
|
|
@ -65,26 +65,6 @@ namespace Introspection {
|
|||
// Both reported in radar #21548819
|
||||
// NSUnknownKeyException [<CIDepthOfField 0x158586970> valueForUndefinedKey:]: this class is not key value coding-compliant for the key inputPoint2.
|
||||
case "CIDepthOfField":
|
||||
// NSUnknownKeyException [<CISunbeamsGenerator 0x1586d0810> valueForUndefinedKey:]: this class is not key value coding-compliant for the key inputCropAmount.
|
||||
case "CISunbeamsGenerator":
|
||||
case "CIAreaMinMaxRed": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIAttributedTextImageGenerator": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIBarcodeGenerator": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIBicubicScaleTransform": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIBlendWithBlueMask": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIBlendWithRedMask": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIBokehBlur": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIColorCubesMixedWithMask": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIColorCurves": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIDepthBlurEffect": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIDepthToDisparity": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIDisparityToDepth": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIEdgePreserveUpsampleFilter": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CILabDeltaE": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIMorphologyGradient": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIMorphologyMaximum": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CIMorphologyMinimum": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
case "CITextImageGenerator": // https://bugzilla.xamarin.com/show_bug.cgi?id=57350
|
||||
return true;
|
||||
// FIXME: Remove if fixed. Doesn't appear to exist in El Capitan. Reported in radar #22099780
|
||||
// case "CIMaskedVariableBlur":
|
||||
|
@ -121,6 +101,7 @@ namespace Introspection {
|
|||
public void CheckManagedFilters ()
|
||||
{
|
||||
List<string> filters = new List<string> (CIFilter.FilterNamesInCategories (null));
|
||||
var superFilters = new List<string> ();
|
||||
var nspace = CIFilterType.Namespace;
|
||||
var types = CIFilterType.Assembly.GetTypes ();
|
||||
foreach (Type t in types) {
|
||||
|
@ -144,8 +125,14 @@ namespace Introspection {
|
|||
// check base type - we might have our own base type or different names, so it's debug only (not failure)
|
||||
var super = new Class (obj.Class.SuperClass).Name;
|
||||
var bt = t.BaseType.Name;
|
||||
if ((super != bt) && (bt == "CIFilter")) // check if we should (like Apple) use a non-default base type for filters
|
||||
if ((super != bt) && (bt == "CIFilter")) { // check if we should (like Apple) use a non-default base type for filters
|
||||
Console.WriteLine ("[WARN] {0}.SuperClass == {1} (native) and {2} managed", t.Name, super, bt);
|
||||
if (!superFilters.Contains (super)) {
|
||||
superFilters.Add (super);
|
||||
Console.WriteLine ("[GENERATED] {0}", super);
|
||||
GenerateBinding (CIFilter.FromName (super), Console.Out);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
int result = filters.RemoveAll (s => StringComparer.OrdinalIgnoreCase.Compare (t.Name, s) == 0);
|
||||
Assert.That (result, Is.GreaterThan (0), t.Name);
|
||||
|
@ -206,7 +193,7 @@ namespace Introspection {
|
|||
writer.WriteLine ();
|
||||
var dict = attributes [k] as NSDictionary;
|
||||
var type = dict [(NSString) "CIAttributeClass"];
|
||||
writer.WriteLine ("\t[CoreImageProperty (\"{0}\")]", key);
|
||||
writer.WriteLine ("\t[CoreImageFilterProperty (\"{0}\")]", key);
|
||||
|
||||
// by default we drop the "input" prefix, but keep the "output" prefix to avoid confusion
|
||||
if (key.StartsWith ("input", StringComparison.Ordinal))
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
|
@ -108,6 +110,23 @@ namespace Introspection {
|
|||
case "NSUnitPressure": // -init should never be called on NSUnit!
|
||||
case "NSUnitSpeed": // -init should never be called on NSUnit!
|
||||
return true;
|
||||
case "MPSCnnNeuron": // Cannot directly initialize MPSCNNNeuron. Use one of the sub-classes of MPSCNNNeuron
|
||||
case "MPSCnnNeuronPReLU":
|
||||
case "MPSCnnNeuronHardSigmoid":
|
||||
case "MPSCnnNeuronSoftPlus":
|
||||
return true;
|
||||
case "MPSCnnBinaryConvolution": // [MPSCNNBinaryConvolution initWithDevice:] is not allowed. Please use initializers that are not marked NS_UNAVAILABLE.
|
||||
case "MPSCnnDilatedPoolingMax": // [MPSCNNDilatedPoolingMax initWithDevice:] is not allowed. Please use initializers that are not marked NS_UNAVAILABLE.
|
||||
case "MPSCnnPoolingL2Norm": // [MPSCNNPoolingL2Norm initWithDevice:] is not allowed. Please use initializers that are not marked NS_UNAVAILABLE.
|
||||
return true;
|
||||
case "MPSCnnBinaryFullyConnected": // Please initialize the MPSCNNBinaryFullyConnected class with initWithDevice:convolutionDescriptor:kernelWeights:biasTerms
|
||||
return true;
|
||||
case "MPSCnnUpsampling": // Cannot directly initialize MPSCNNUpsampling. Use one of the sub-classes of MPSCNNUpsampling
|
||||
case "MPSCnnUpsamplingBilinear":
|
||||
case "MPSCnnUpsamplingNearest":
|
||||
return true;
|
||||
case "MPSImageArithmetic": // Cannot directly initialize MPSImageArithmetic. Use one of the sub-classes of MPSImageArithmetic.
|
||||
return true;
|
||||
}
|
||||
|
||||
return SkipDueToAttribute (type);
|
||||
|
@ -398,5 +417,82 @@ namespace Introspection {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldNotExposeDefaultCtorTest ()
|
||||
{
|
||||
Errors = 0;
|
||||
int n = 0;
|
||||
|
||||
// Set to 'true' to generate alloc/init ObjC code of types that fail this test.
|
||||
bool genObjCTestCode = false;
|
||||
var objCCode = genObjCTestCode ? new StringBuilder () : null;
|
||||
|
||||
var types = Assembly.GetTypes ();
|
||||
var cifiltertype = types.FirstOrDefault (c => c.Name == "CIFilter");
|
||||
foreach (Type t in types) {
|
||||
// TODO: Remove this MPS check in the future, at the time of writing this we currently only care about MPS.
|
||||
if (!t.Name.StartsWith ("MPS", StringComparison.OrdinalIgnoreCase))
|
||||
continue;
|
||||
|
||||
if (!t.IsPublic || !NSObjectType.IsAssignableFrom (t))
|
||||
continue;
|
||||
|
||||
// ignore CIFilter derived subclasses since they are specially generated
|
||||
if (cifiltertype != null && t.IsSubclassOf (cifiltertype))
|
||||
continue;
|
||||
|
||||
if (SkipCheckShouldNotExposeDefaultCtor (t))
|
||||
continue;
|
||||
|
||||
var ctor = t.GetConstructor (Type.EmptyTypes);
|
||||
if (SkipDueToAttribute (ctor))
|
||||
continue;
|
||||
|
||||
if (ctor == null || ctor.IsAbstract) {
|
||||
if (LogUntestedTypes)
|
||||
Console.WriteLine ("[WARNING] {0} was skipped because it had no default constructor", t);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (LogProgress)
|
||||
Console.WriteLine ($"{n}: {t.FullName}");
|
||||
|
||||
var parentType = t.BaseType;
|
||||
var parentCtor = parentType.GetConstructor (BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, Type.EmptyTypes, null);
|
||||
|
||||
if (parentCtor == null) {
|
||||
ReportError ($"Type '{t.FullName}' is a possible candidate for [DisableDefaultCtor] because its BaseType '{parentType.FullName}' does not have one.");
|
||||
|
||||
// Useful to test in Xcode
|
||||
if (genObjCTestCode) {
|
||||
var export = t.GetCustomAttribute<RegisterAttribute> ();
|
||||
var typeName = export?.Name ?? t.Name;
|
||||
objCCode.AppendLine ($"{typeName}* test{n} = [[{typeName} alloc] init];");
|
||||
}
|
||||
}
|
||||
n++;
|
||||
}
|
||||
Assert.AreEqual (0, Errors, $"{Errors} potential errors found in {n} BaseType empty ctor validated: \n{ErrorData}\n{(genObjCTestCode ? $"\n\n{objCCode}\n" : string.Empty)}");
|
||||
}
|
||||
|
||||
protected virtual bool SkipCheckShouldNotExposeDefaultCtor (Type type)
|
||||
{
|
||||
if (type.ContainsGenericParameters)
|
||||
return true;
|
||||
|
||||
foreach (object ca in type.GetCustomAttributes (false)) {
|
||||
if (ca is ProtocolAttribute || ca is ModelAttribute)
|
||||
return true;
|
||||
}
|
||||
|
||||
// Add Skipped types here
|
||||
//switch (type.Namespace) {
|
||||
//case "":
|
||||
// return true;
|
||||
//}
|
||||
|
||||
return SkipDueToAttribute (type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,6 +152,8 @@ namespace Introspection {
|
|||
case "NSConstraintConflict": // Conformance not in headers
|
||||
case "VSSubscription":
|
||||
return true;
|
||||
case "MPSImageAllocator": // Header shows NSSecureCoding, but intro gives: MPSImageAllocator conforms to NSSecureCoding but SupportsSecureCoding returned false
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
// conformance added in Xcode 8 (iOS 10 / macOS 10.12)
|
||||
|
|
|
@ -473,6 +473,78 @@ namespace Introspection {
|
|||
return !TestRuntime.CheckXcodeVersion (9,0);
|
||||
}
|
||||
break;
|
||||
case "MPSCnnConvolution":
|
||||
switch (selectorName) {
|
||||
case "initWithDevice:convolutionDescriptor:kernelWeights:biasTerms:flags:":
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case "MPSCnnFullyConnected":
|
||||
switch (selectorName) {
|
||||
case "initWithDevice:convolutionDescriptor:kernelWeights:biasTerms:flags:":
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case "MPSImageConversion":
|
||||
switch (selectorName) {
|
||||
case "initWithDevice:srcAlpha:destAlpha:backgroundColor:conversionInfo:":
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case "MPSImageDilate":
|
||||
switch (selectorName) {
|
||||
case "initWithDevice:kernelWidth:kernelHeight:values:":
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case "MPSImageGaussianPyramid":
|
||||
switch (selectorName) {
|
||||
case "initWithDevice:kernelWidth:kernelHeight:weights:":
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case "MPSImagePyramid":
|
||||
switch (selectorName) {
|
||||
case "initWithDevice:kernelWidth:kernelHeight:weights:":
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case "MPSImageSobel":
|
||||
switch (selectorName) {
|
||||
case "initWithDevice:linearGrayColorTransform:":
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case "MPSImageThresholdBinary":
|
||||
switch (selectorName) {
|
||||
case "initWithDevice:thresholdValue:maximumValue:linearGrayColorTransform:":
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case "MPSImageThresholdBinaryInverse":
|
||||
switch (selectorName) {
|
||||
case "initWithDevice:thresholdValue:maximumValue:linearGrayColorTransform:":
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case "MPSImageThresholdToZero":
|
||||
switch (selectorName) {
|
||||
case "initWithDevice:thresholdValue:linearGrayColorTransform:":
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case "MPSImageThresholdToZeroInverse":
|
||||
switch (selectorName) {
|
||||
case "initWithDevice:thresholdValue:linearGrayColorTransform:":
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case "MPSImageThresholdTruncate":
|
||||
switch (selectorName) {
|
||||
case "initWithDevice:thresholdValue:linearGrayColorTransform:":
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// old binding mistake
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//
|
||||
//
|
||||
// Test the generated API selectors against typos or non-existing cases
|
||||
//
|
||||
// Authors:
|
||||
|
@ -83,7 +83,9 @@ namespace Introspection
|
|||
"Adjustmentfor",
|
||||
"Aifc",
|
||||
"Aiff",
|
||||
"Aio",
|
||||
"Alg", // short for Algorithm
|
||||
"Alpn", // Application-Layer Protocol Negotiation RFC7301
|
||||
"Amete",
|
||||
"Amr",
|
||||
"Anglet",
|
||||
|
@ -99,9 +101,11 @@ namespace Introspection
|
|||
"Automapping",
|
||||
"Automounted",
|
||||
"Autoredirect",
|
||||
"Autospace",
|
||||
"Avci", // file type
|
||||
"Aliasable",
|
||||
"Arcball",
|
||||
"Avg",
|
||||
"Backface",
|
||||
"Bancaire", // french
|
||||
"Bancaires", // french
|
||||
|
@ -121,16 +125,19 @@ namespace Introspection
|
|||
"Cabac",
|
||||
"Caf", // acronym: Core Audio Format
|
||||
"Cancellable",
|
||||
"Cartes", // french
|
||||
"Cavlc",
|
||||
"Cda", // acronym: Clinical Document Architecture
|
||||
"Celp", // MPEG4ObjectID
|
||||
"Characterteristic",
|
||||
"Chapv",
|
||||
"Cholesky",
|
||||
"Chromaticities",
|
||||
"Ciff",
|
||||
"Cinepak",
|
||||
"Clearcoat",
|
||||
"Cnn", // Convolutional Neural Network
|
||||
"Cns",
|
||||
"Colos",
|
||||
"Commerical",
|
||||
"Composable",
|
||||
|
@ -159,6 +166,7 @@ namespace Introspection
|
|||
"dlerror",
|
||||
"Dlfcn",
|
||||
"dlopen",
|
||||
"Dls",
|
||||
"Dlsym",
|
||||
"dlsym",
|
||||
"Dng",
|
||||
|
@ -181,6 +189,7 @@ namespace Introspection
|
|||
"Ecies", // Elliptic Curve Integrated Encryption Scheme
|
||||
"Editability",
|
||||
"Eof", // acronym End-Of-File
|
||||
"Elu",
|
||||
"Emagic",
|
||||
"Emaili",
|
||||
"Eppc",
|
||||
|
@ -193,6 +202,7 @@ namespace Introspection
|
|||
"Fov",
|
||||
"Framebuffer",
|
||||
"Framesetter",
|
||||
"Froms", // NSMetadataItemWhereFromsKey
|
||||
"Freq",
|
||||
"Ftps",
|
||||
"Func",
|
||||
|
@ -201,9 +211,11 @@ namespace Introspection
|
|||
"Geocoder",
|
||||
"Gigapascals",
|
||||
"Gpp",
|
||||
"Gps",
|
||||
"Gpu", // acronym for Graphics Processing Unit
|
||||
"Grbg", // acronym for Green-Red-Blue-Green
|
||||
"Greeking",
|
||||
"Hardlink",
|
||||
"Hdmi",
|
||||
"Hdr",
|
||||
"Hectopascals",
|
||||
|
@ -229,7 +241,9 @@ namespace Introspection
|
|||
"Indoorrun",
|
||||
"Indoorcycle",
|
||||
"Inklist",
|
||||
"Indeterm",
|
||||
"Indoorwalk",
|
||||
"Inode",
|
||||
"Inser",
|
||||
"Interac",
|
||||
"Interframe",
|
||||
|
@ -248,6 +262,8 @@ namespace Introspection
|
|||
"Json",
|
||||
"Keyerror",
|
||||
"Keyi",
|
||||
"Keypoint",
|
||||
"Keypoints",
|
||||
"Keyspace",
|
||||
"ks",
|
||||
"Kiloampere",
|
||||
|
@ -263,6 +279,8 @@ namespace Introspection
|
|||
"Lod",
|
||||
"Lopass",
|
||||
"Lowlevel",
|
||||
"Lun",
|
||||
"Luma",
|
||||
"Mapbuffer",
|
||||
"Matchingcoalesce",
|
||||
"Megaampere",
|
||||
|
@ -286,6 +304,7 @@ namespace Introspection
|
|||
"Mobike", // acronym
|
||||
"Morpher",
|
||||
"Mpe", // acronym
|
||||
"Mps",
|
||||
"Mtu", // acronym
|
||||
"Mtc", // acronym
|
||||
"Mul",
|
||||
|
@ -304,12 +323,14 @@ namespace Introspection
|
|||
"Ntsc",
|
||||
"nuint",
|
||||
"Ndef",
|
||||
"Nop",
|
||||
"Numbernumber",
|
||||
"Nyquist",
|
||||
"Oaep", // Optimal asymmetric encryption padding
|
||||
"Objectfor",
|
||||
"Occlussion",
|
||||
"Ocurrences",
|
||||
"Ocsp", // Online Certificate Status Protocol
|
||||
"Octree",
|
||||
"Oid",
|
||||
"Olus",
|
||||
|
@ -335,12 +356,14 @@ namespace Introspection
|
|||
"Pkcs",
|
||||
"Placemark",
|
||||
"Playthrough",
|
||||
"Pnorm",
|
||||
"Pointillize",
|
||||
"Polyline",
|
||||
"Popularimeter",
|
||||
"Preds", // short for Predicates
|
||||
"Prerolls",
|
||||
"Preseti",
|
||||
"Prev",
|
||||
"Propogate",
|
||||
"Psec",
|
||||
"Psm", // Protocol/Service Multiplexer
|
||||
|
@ -352,6 +375,7 @@ namespace Introspection
|
|||
"Reacquirer",
|
||||
"Reinvitation",
|
||||
"Reinvite",
|
||||
"Rel",
|
||||
"Reprandial",
|
||||
"Replayable",
|
||||
"Requestwith",
|
||||
|
@ -359,6 +383,7 @@ namespace Introspection
|
|||
"Rgb",
|
||||
"Rgba",
|
||||
"Rggb", // acronym for Red, Green, Green, Blue
|
||||
"Rnn",
|
||||
"Roi",
|
||||
"Romm", // acronym: Reference Output Medium Metric
|
||||
"Rpa",
|
||||
|
@ -404,6 +429,8 @@ namespace Introspection
|
|||
"Submesh",
|
||||
"Submeshes",
|
||||
"Subpixel",
|
||||
"Subresource",
|
||||
"Subresources",
|
||||
"Subsec",
|
||||
"Suica", // Japanese contactless smart card type
|
||||
"Superentity",
|
||||
|
@ -411,6 +438,7 @@ namespace Introspection
|
|||
"Synchronizable",
|
||||
"Symbologies",
|
||||
"Tanh",
|
||||
"Tensorflow",
|
||||
"Tessellator",
|
||||
"Texcoord",
|
||||
"Texel",
|
||||
|
@ -448,6 +476,7 @@ namespace Introspection
|
|||
"Untrash",
|
||||
"Utf",
|
||||
"Upce",
|
||||
"Uri",
|
||||
"Uti",
|
||||
"Varispeed",
|
||||
"Vergence",
|
||||
|
@ -459,6 +488,7 @@ namespace Introspection
|
|||
"Warpable",
|
||||
"Whitespaces",
|
||||
"Writeability",
|
||||
"Xnor",
|
||||
"Xpc",
|
||||
"xy",
|
||||
"Xyz",
|
||||
|
@ -588,6 +618,7 @@ namespace Introspection
|
|||
"Usedby",
|
||||
"Viewwrite",
|
||||
"Wep",
|
||||
"Wlan",
|
||||
"Wme",
|
||||
"Writeln",
|
||||
"Xattr",
|
||||
|
@ -723,6 +754,22 @@ namespace Introspection
|
|||
"Ycbcr",
|
||||
"Ycrcba",
|
||||
#endif
|
||||
#endif
|
||||
#if !XAMCORE_4_0
|
||||
"Actionfrom",
|
||||
"Attributefor",
|
||||
"Attributest",
|
||||
"Failwith",
|
||||
"Imageimage",
|
||||
"Musthold",
|
||||
"Pathpath",
|
||||
"Rangefor",
|
||||
"Failwith",
|
||||
"Tearm",
|
||||
"Theevent",
|
||||
"Timestampe", // Existing binding so we can't just remove it.
|
||||
"Toplevel",
|
||||
"Tripple",
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -43,6 +43,9 @@ namespace Introspection {
|
|||
// the selector starts with `weak`
|
||||
case "WeakRelatedUniqueIdentifier":
|
||||
return property.DeclaringType.Name == "CSSearchableItemAttributeSet";
|
||||
// this is a weakly typed API (not a weak reference) with a [NotImplemented] so there's no [Export]
|
||||
case "WeakSignificantEvent":
|
||||
return property.DeclaringType.Name == "HMSignificantTimeEvent";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
using System;
|
||||
#if XAMCORE_2_0
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
#if XAMCORE_2_0
|
||||
using Foundation;
|
||||
using ObjCRuntime;
|
||||
using AppKit;
|
||||
#else
|
||||
using MonoMac;
|
||||
using MonoMac.Foundation;
|
||||
using MonoMac.ObjCRuntime;
|
||||
using MonoMac.AppKit;
|
||||
#endif
|
||||
|
||||
namespace Introspection
|
||||
{
|
||||
|
@ -31,7 +25,8 @@ namespace Introspection
|
|||
public override string GetTypo (string txt)
|
||||
{
|
||||
var checkRange = new NSRange (0, txt.Length);
|
||||
var typoRange = checker.CheckSpelling (txt, 0);
|
||||
nint wordCount;
|
||||
var typoRange = checker.CheckSpelling (txt, 0, "en_US", false, 0, out wordCount);
|
||||
if (typoRange.Length == 0)
|
||||
return String.Empty;
|
||||
return txt.Substring ((int)typoRange.Location, (int)typoRange.Length);
|
||||
|
@ -46,3 +41,4 @@ namespace Introspection
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -218,6 +218,10 @@ namespace Introspection {
|
|||
case "HKSeriesBuilder":
|
||||
case "HKWorkoutRouteBuilder":
|
||||
return true;
|
||||
// Xcode 9.2 undocumented conformance (like due to new base type)
|
||||
case "HMHomeAccessControl":
|
||||
case "HMAccessControl":
|
||||
return true;
|
||||
#if __WATCHOS__
|
||||
case "CLKComplicationTemplate":
|
||||
case "CLKComplicationTemplateCircularSmallRingImage":
|
||||
|
@ -363,6 +367,10 @@ namespace Introspection {
|
|||
case "HKSeriesBuilder":
|
||||
case "HKWorkoutRouteBuilder":
|
||||
return true;
|
||||
// Xcode 9.2 undocumented conformance (like due to new base type)
|
||||
case "HMHomeAccessControl":
|
||||
case "HMAccessControl":
|
||||
return true;
|
||||
#if __WATCHOS__
|
||||
case "CLKComplicationTemplate":
|
||||
case "CLKComplicationTemplateCircularSmallRingImage":
|
||||
|
|
|
@ -78,21 +78,12 @@ namespace DontLink {
|
|||
// this same test existed in linksdk.app and linkall.app to test the linker optimizing IL code
|
||||
// around [Autorelease] decorated methods. However iOS7 changed it's behavior and returns null now
|
||||
using (UIImage img = new UIImage ()) {
|
||||
#if __WATCHOS__
|
||||
if (true) {
|
||||
#else
|
||||
if (UIDevice.CurrentDevice.CheckSystemVersion (7, 0)) {
|
||||
#endif
|
||||
// different versions of iOS returns null or something - so we're not validating the return
|
||||
// value since it's not the goal of the test
|
||||
#if !__TVOS__
|
||||
Assert.Null (img.StretchableImage (10, 10), "StretchableImage");
|
||||
img.StretchableImage (10, 10);
|
||||
#endif
|
||||
Assert.Null (img.CreateResizableImage (new UIEdgeInsets (1, 2, 3, 4)), "CreateResizableImage");
|
||||
} else {
|
||||
#if !__TVOS__
|
||||
Assert.NotNull (img.StretchableImage (10, 10), "StretchableImage");
|
||||
#endif
|
||||
Assert.NotNull (img.CreateResizableImage (new UIEdgeInsets (1, 2, 3, 4)), "CreateResizableImage");
|
||||
}
|
||||
img.CreateResizableImage (new UIEdgeInsets (1, 2, 3, 4));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ TESTS_4_0 = \
|
|||
link-posix-2 \
|
||||
link-system.web-icalls \
|
||||
link-keep-resources-1 \
|
||||
link-keep-resources-2 \
|
||||
link-preserve-assembly \
|
||||
link-uithread-1 \
|
||||
link-uithread-2 \
|
||||
|
|
|
@ -43,11 +43,8 @@ namespace MonoTouchFixtures.AddressBook {
|
|||
// ABRecord
|
||||
// some bots returns -1 (invalid) and I get 0 after a reset (maybe permission related?)
|
||||
Assert.That (source.Id, Is.LessThanOrEqualTo (0), "Id");
|
||||
if (TestRuntime.CheckXcodeVersion (9, 0)) {
|
||||
Assert.That (source.Type, Is.EqualTo (ABRecordType.Person), "Type");
|
||||
} else {
|
||||
Assert.That (source.Type, Is.EqualTo (ABRecordType.Source), "Type");
|
||||
}
|
||||
// iOS [9,11.2[ returned ABRecordType.Person, otherwise ABRecordType.Source
|
||||
Assert.That (source.Type, Is.Not.EqualTo (ABRecordType.Group), "Type");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
#if XAMCORE_2_0
|
||||
#if !__WATCHOS__
|
||||
using ModelIO;
|
||||
#if !MONOMAC
|
||||
using MetalPerformanceShaders;
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
using MonoTouch.ModelIO;
|
||||
#endif
|
||||
|
@ -188,7 +186,7 @@ public static class Asserts
|
|||
Assert.AreEqual (expected.W, actual.W, message + " (W)");
|
||||
}
|
||||
|
||||
#if !MONOMAC && !__WATCHOS__
|
||||
#if !__WATCHOS__
|
||||
public static void AreEqual (MPSImageHistogramInfo expected, MPSImageHistogramInfo actual, string message)
|
||||
{
|
||||
Assert.AreEqual (expected.HistogramForAlpha, actual.HistogramForAlpha, message + " HistogramForAlpha");
|
||||
|
@ -196,7 +194,7 @@ public static class Asserts
|
|||
Asserts.AreEqual (expected.MinPixelValue, actual.MinPixelValue, message + " MinPixelValue");
|
||||
Assert.AreEqual (expected.NumberOfHistogramEntries, actual.NumberOfHistogramEntries, message + " NumberOfHistogramEntries");
|
||||
}
|
||||
#endif // !MONOMAC && !__WATCHOS__
|
||||
#endif // !__WATCHOS__
|
||||
|
||||
public static void AreEqual (MatrixFloat2x2 expected, MatrixFloat2x2 actual, string message)
|
||||
{
|
||||
|
|
|
@ -49,10 +49,9 @@ namespace MonoTouchFixtures.Contacts {
|
|||
using (var store = new CNContactStore ()) {
|
||||
var contacts = store.GetUnifiedContacts (predicate, fetchKeys, out error);
|
||||
// we can't be sure what's on devices, so check there's no error is the only thing we do
|
||||
Assert.Null (error, "error");
|
||||
// but it's in the default simulator build (but not the watchOS simulator)
|
||||
#if !__WATCHOS__ && !MONOMAC
|
||||
if (Runtime.Arch == Arch.SIMULATOR) {
|
||||
#if !MONOMAC && !__WATCHOS__
|
||||
if ((error == null) && (Runtime.Arch == Arch.SIMULATOR)) {
|
||||
Assert.That (contacts.Length, Is.EqualTo (1), "Length");
|
||||
identifier = contacts [0].Identifier;
|
||||
}
|
||||
|
@ -69,17 +68,13 @@ namespace MonoTouchFixtures.Contacts {
|
|||
// it's in the default simulator build
|
||||
#if !MONOMAC
|
||||
if (Runtime.Arch == Arch.SIMULATOR) {
|
||||
Assert.Null (error, "error");
|
||||
// it fails on some bots (watchOS 4.2 on jenkins) so we cannot assume it always work
|
||||
if (error != null)
|
||||
return;
|
||||
Assert.NotNull (contact, "contact");
|
||||
Assert.False (contact.AreKeysAvailable (CNContactOptions.OrganizationName | CNContactOptions.Note), "AreKeysAvailable-1");
|
||||
Assert.True (contact.AreKeysAvailable (CNContactOptions.None), "AreKeysAvailable-2");
|
||||
Assert.True (contact.AreKeysAvailable (fetchKeys), "AreKeysAvailable-3");
|
||||
} else {
|
||||
#endif
|
||||
// and it's a safe bet that id does not exists on any device
|
||||
Assert.NotNull (error, "error"); // Updated Record Does Not Exist
|
||||
|
||||
#if !MONOMAC
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -39,12 +39,9 @@ namespace MonoTouchFixtures.CoreBluetooth {
|
|||
using (CBUUID uuid = CBUUID.FromString ("1234")) {
|
||||
Assert.That (uuid.Handle, Is.Not.EqualTo (IntPtr.Zero), "Handle");
|
||||
Assert.IsNotNull (uuid.Data, "Data");
|
||||
#if MONOMAC
|
||||
var expected = !TestRuntime.CheckXcodeVersion (9, 0) ? "Unknown (<1234>)" : "1234";
|
||||
#else
|
||||
var expected = UIDevice.CurrentDevice.CheckSystemVersion (7, 1) ? "1234" : "Unknown (<1234>)";
|
||||
#endif
|
||||
Assert.That (uuid.Description, Is.EqualTo (expected), "Description");
|
||||
var firstExpected = "Unknown (<1234>)";
|
||||
var secondExpected = "1234";
|
||||
Assert.That (uuid.Description, Is.EqualTo (firstExpected).Or.EqualTo (secondExpected), "Description");
|
||||
Assert.That (uuid.ToString (false), Is.EqualTo ("1234"), "ToString(false)");
|
||||
Assert.That (uuid.ToString (true), Is.EqualTo ("00001234-0000-1000-8000-00805f9b34fb"), "ToString(true)");
|
||||
using (CBUUID u2 = CBUUID.FromString (uuid.ToString ())) {
|
||||
|
@ -59,12 +56,9 @@ namespace MonoTouchFixtures.CoreBluetooth {
|
|||
using (CBUUID uuid = CBUUID.FromString ("12345678-90AB-CDEF-cafe-c80c20443d0b")) {
|
||||
Assert.That (uuid.Handle, Is.Not.EqualTo (IntPtr.Zero), "Handle");
|
||||
Assert.IsNotNull (uuid.Data, "Data");
|
||||
#if MONOMAC
|
||||
var expected = !TestRuntime.CheckXcodeVersion (9, 0) ? "Unknown (<12345678 90abcdef cafec80c 20443d0b>)" : "12345678-90AB-CDEF-CAFE-C80C20443D0B";
|
||||
#else
|
||||
var expected = UIDevice.CurrentDevice.CheckSystemVersion (7, 1) ? "12345678-90AB-CDEF-CAFE-C80C20443D0B" : "Unknown (<12345678 90abcdef cafec80c 20443d0b>)";
|
||||
#endif
|
||||
Assert.That (uuid.Description, Is.EqualTo (expected), "Description");
|
||||
var firstExpected = "Unknown (<12345678 90abcdef cafec80c 20443d0b>)";
|
||||
var secondExpected = "12345678-90AB-CDEF-CAFE-C80C20443D0B";
|
||||
Assert.That (uuid.Description, Is.EqualTo (firstExpected).Or.EqualTo (secondExpected), "Description");
|
||||
Assert.That (uuid.ToString (false), Is.EqualTo (uuid.ToString (true)), "ToString");
|
||||
using (CBUUID u2 = CBUUID.FromString (uuid.ToString ())) {
|
||||
Assert.That (u2.ToString (), Is.EqualTo (uuid.ToString ()), "Roundtrip");
|
||||
|
|
|
@ -37,14 +37,33 @@ namespace MonoTouchFixtures.CoreImage {
|
|||
public class CIVectorTest {
|
||||
|
||||
[Test]
|
||||
public void Constructors ()
|
||||
public void CtorFloatArray ()
|
||||
{
|
||||
// Make sure these do not crash
|
||||
Assert.That (new CIVector (new nfloat [0]).Count, Is.EqualTo ((nint) 0));
|
||||
Assert.That (new CIVector (new nfloat [] {1}).Count, Is.EqualTo ((nint) 1));
|
||||
Assert.That (new CIVector (new nfloat [] {1,2}).Count, Is.EqualTo ((nint) 2));
|
||||
Assert.That (new CIVector (new nfloat [] {1,2,3}).Count, Is.EqualTo ((nint) 3));
|
||||
Assert.That (new CIVector (new nfloat [] {1,2,3,4}).Count, Is.EqualTo ((nint) 4));
|
||||
Assert.That (new CIVector (new nfloat [0]).Count, Is.EqualTo ((nint) 0), "0");
|
||||
Assert.That (new CIVector (new nfloat [] {1}).Count, Is.EqualTo ((nint) 1), "1");
|
||||
Assert.That (new CIVector (new nfloat [] {1,2}).Count, Is.EqualTo ((nint) 2), "2'");
|
||||
Assert.That (new CIVector (new nfloat [] {1,2,3}).Count, Is.EqualTo ((nint) 3), "3");
|
||||
Assert.That (new CIVector (new nfloat [] {1,2,3,4}).Count, Is.EqualTo ((nint) 4), "4");
|
||||
|
||||
Assert.Throws<ArgumentNullException> (() => new CIVector ((nfloat[]) null), "null");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CtorFloatArrayCount ()
|
||||
{
|
||||
Assert.That (new CIVector (new nfloat [0], 0).Count, Is.EqualTo ((nint) 0), "0");
|
||||
Assert.That (new CIVector (new nfloat [] {1}, 1).Count, Is.EqualTo ((nint) 1), "1");
|
||||
Assert.That (new CIVector (new nfloat [] {1,2}, 2).Count, Is.EqualTo ((nint) 2), "2'");
|
||||
Assert.That (new CIVector (new nfloat [] {1,2,3,4}, 2).Count, Is.EqualTo ((nint) 2), "4/2");
|
||||
|
||||
Assert.Throws<ArgumentNullException> (() => new CIVector ((nfloat[]) null, 0), "null");
|
||||
Assert.Throws<ArgumentOutOfRangeException> (() => new CIVector (new nfloat [] {1}, 2), "out-of-range");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CtorInts ()
|
||||
{
|
||||
Assert.That (new CIVector (1).Count, Is.EqualTo ((nint) 1));
|
||||
Assert.That (new CIVector (1,2).Count, Is.EqualTo ((nint) 2));
|
||||
Assert.That (new CIVector (1,2,3).Count, Is.EqualTo ((nint) 3));
|
||||
|
|
|
@ -14,14 +14,18 @@ using System.IO;
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
#if XAMCORE_2_0
|
||||
using AVFoundation;
|
||||
using CoreGraphics;
|
||||
using CoreImage;
|
||||
using CoreText;
|
||||
using Foundation;
|
||||
using ObjCRuntime;
|
||||
#else
|
||||
using MonoTouch;
|
||||
using MonoTouch.AVFoundation;
|
||||
using MonoTouch.CoreGraphics;
|
||||
using MonoTouch.CoreImage;
|
||||
using MonoTouch.CoreText;
|
||||
using MonoTouch.Foundation;
|
||||
using MonoTouch.ObjCRuntime;
|
||||
#endif
|
||||
|
@ -109,6 +113,43 @@ namespace MonoTouchFixtures.CoreImage {
|
|||
Assert.Null (f.ColorSpace, "ColorSpace/reset-null");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CIBarcodeDescriptorTest ()
|
||||
{
|
||||
TestRuntime.AssertXcodeVersion (9, 0);
|
||||
|
||||
using (var f = new CIBarcodeGenerator ()) {
|
||||
Assert.Null (f.BarcodeDescriptor, "CIBarcodeDescriptor/default");
|
||||
using (var b = new CIQRCodeDescriptor (new NSData (), 1, 0, CIQRCodeErrorCorrectionLevel.Q)) {
|
||||
f.BarcodeDescriptor = b;
|
||||
var rc = CFGetRetainCount (b.Handle);
|
||||
for (int i = 0; i < 5; i++)
|
||||
Assert.NotNull (f.BarcodeDescriptor, i.ToString ());
|
||||
Assert.That (CFGetRetainCount (b.Handle), Is.EqualTo (rc), "RetainCount");
|
||||
f.BarcodeDescriptor = null;
|
||||
}
|
||||
Assert.Null (f.BarcodeDescriptor, "CIBarcodeDescriptor/reset-null");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CIAttributedTextImageGenerator ()
|
||||
{
|
||||
TestRuntime.AssertXcodeVersion (9, 0);
|
||||
|
||||
using (var f = new CIAttributedTextImageGenerator ()) {
|
||||
Assert.Null (f.Text, "NSAttributedString/default");
|
||||
var attr = new CTStringAttributes () {
|
||||
ForegroundColorFromContext = true,
|
||||
Font = new CTFont ("Arial", 24)
|
||||
};
|
||||
using (var s = new NSAttributedString ("testString", attr)) {
|
||||
f.Text = s;
|
||||
Assert.NotNull (f.Text, "NSAttributedString/not-null");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,15 +3,14 @@
|
|||
#if !__WATCHOS__ && !MONOMAC
|
||||
|
||||
using System;
|
||||
using Foundation;
|
||||
|
||||
#if XAMCORE_2_0
|
||||
using Metal;
|
||||
using MetalPerformanceShaders;
|
||||
using UIKit;
|
||||
#else
|
||||
using MonoTouch.Metal;
|
||||
using MonoTouch.MetalPerformanceShaders;
|
||||
using MonoTouch.UIKit;
|
||||
#endif
|
||||
|
||||
using NUnit.Framework;
|
||||
|
@ -24,7 +23,11 @@ namespace MonoTouchFixtures.MetalPerformanceShaders {
|
|||
[Test]
|
||||
public void RectNoClip ()
|
||||
{
|
||||
#if !MONOMAC
|
||||
TestRuntime.AssertXcodeVersion (7,0);
|
||||
#else
|
||||
TestRuntime.AssertXcodeVersion (9, 0);
|
||||
#endif
|
||||
|
||||
var d = MTLDevice.SystemDefault;
|
||||
// some older hardware won't have a default
|
||||
|
@ -41,6 +44,48 @@ namespace MonoTouchFixtures.MetalPerformanceShaders {
|
|||
Assert.That (s.Height, Is.EqualTo (-1), "Height");
|
||||
Assert.That (s.Width, Is.EqualTo (-1), "Width");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MPSKernelCopyTest ()
|
||||
{
|
||||
#if !MONOMAC
|
||||
TestRuntime.AssertDevice ();
|
||||
#endif
|
||||
|
||||
TestRuntime.AssertXcodeVersion (9, 0);
|
||||
|
||||
var kernel = new MPSKernel (MTLDevice.SystemDefault);
|
||||
var kernel2 = kernel.CopyWithZone (NSZone.Default, MTLDevice.SystemDefault);
|
||||
Assert.That (kernel2.RetainCount, Is.EqualTo (1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MPSRnnImageInferenceLayerCopyTest ()
|
||||
{
|
||||
#if !MONOMAC
|
||||
TestRuntime.AssertDevice ();
|
||||
#endif
|
||||
|
||||
TestRuntime.AssertXcodeVersion (9, 0);
|
||||
|
||||
var layer = new MPSRnnImageInferenceLayer (MTLDevice.SystemDefault, MPSRnnSingleGateDescriptor.Create (1, 1));
|
||||
var layer2 = layer.Copy (NSZone.Default, MTLDevice.SystemDefault);
|
||||
Assert.That (layer2.RetainCount, Is.EqualTo (1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MPSRnnMatrixInferenceLayerTest ()
|
||||
{
|
||||
#if !MONOMAC
|
||||
TestRuntime.AssertDevice ();
|
||||
#endif
|
||||
|
||||
TestRuntime.AssertXcodeVersion (9, 0);
|
||||
|
||||
var layer = new MPSRnnMatrixInferenceLayer (MTLDevice.SystemDefault, MPSRnnSingleGateDescriptor.Create (1, 1));
|
||||
var layer2 = layer.Copy (NSZone.Default, MTLDevice.SystemDefault);
|
||||
Assert.That (layer2.RetainCount, Is.EqualTo (1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,11 +7,9 @@ using System;
|
|||
#if XAMCORE_2_0
|
||||
using Metal;
|
||||
using MetalPerformanceShaders;
|
||||
using UIKit;
|
||||
#else
|
||||
using MonoTouch.Metal;
|
||||
using MonoTouch.MetalPerformanceShaders;
|
||||
using MonoTouch.UIKit;
|
||||
#endif
|
||||
|
||||
using NUnit.Framework;
|
||||
|
@ -26,8 +24,12 @@ namespace MonoTouchFixtures.MetalPerformanceShaders
|
|||
[Test]
|
||||
public void Constructors ()
|
||||
{
|
||||
#if !MONOMAC
|
||||
TestRuntime.AssertDevice ();
|
||||
TestRuntime.AssertXcodeVersion (7, 0);
|
||||
#else
|
||||
TestRuntime.AssertXcodeVersion (9, 0);
|
||||
#endif
|
||||
|
||||
MPSImageHistogramInfo info = new MPSImageHistogramInfo ();
|
||||
info.NumberOfHistogramEntries = 256;
|
||||
|
|
|
@ -7,11 +7,9 @@ using System;
|
|||
#if XAMCORE_2_0
|
||||
using Metal;
|
||||
using MetalPerformanceShaders;
|
||||
using UIKit;
|
||||
#else
|
||||
using MonoTouch.Metal;
|
||||
using MonoTouch.MetalPerformanceShaders;
|
||||
using MonoTouch.UIKit;
|
||||
#endif
|
||||
|
||||
using NUnit.Framework;
|
||||
|
@ -26,8 +24,12 @@ namespace MonoTouchFixtures.MetalPerformanceShaders
|
|||
[Test]
|
||||
public void Constructors ()
|
||||
{
|
||||
#if !MONOMAC
|
||||
TestRuntime.AssertDevice ();
|
||||
TestRuntime.AssertXcodeVersion (7, 0);
|
||||
#else
|
||||
TestRuntime.AssertXcodeVersion (9, 0);
|
||||
#endif
|
||||
|
||||
MPSImageHistogramInfo info = new MPSImageHistogramInfo ();
|
||||
info.NumberOfHistogramEntries = 256;
|
||||
|
|
|
@ -7,11 +7,9 @@ using System;
|
|||
#if XAMCORE_2_0
|
||||
using Metal;
|
||||
using MetalPerformanceShaders;
|
||||
using UIKit;
|
||||
#else
|
||||
using MonoTouch.Metal;
|
||||
using MonoTouch.MetalPerformanceShaders;
|
||||
using MonoTouch.UIKit;
|
||||
#endif
|
||||
|
||||
using NUnit.Framework;
|
||||
|
@ -26,8 +24,12 @@ namespace MonoTouchFixtures.MetalPerformanceShaders
|
|||
[Test]
|
||||
public void Constructors ()
|
||||
{
|
||||
#if !MONOMAC
|
||||
TestRuntime.AssertDevice ();
|
||||
TestRuntime.AssertXcodeVersion (7, 0);
|
||||
#else
|
||||
TestRuntime.AssertXcodeVersion (9, 0);
|
||||
#endif
|
||||
|
||||
MPSImageHistogramInfo info = new MPSImageHistogramInfo ();
|
||||
info.NumberOfHistogramEntries = 256;
|
||||
|
@ -42,7 +44,7 @@ namespace MonoTouchFixtures.MetalPerformanceShaders
|
|||
// > /BuildRoot/Library/Caches/com.apple.xbs/Sources/MetalImage/MetalImage-39.3/MetalImage/Filters/MIHistogram.mm:103: failed assertion `[MPSImageHistogram histogramSizeForSourceFormat:] unsupported texture format: 114'
|
||||
// I made sure the MTLPixelFormat values I tested with were also added in iOS 9, so that's not the problem.
|
||||
// Conclusion: just avoid executing HistogramSizeForSourceFormat on anything below iOS 10.rm
|
||||
Assert.AreEqual (3072, obj.HistogramSizeForSourceFormat (MTLPixelFormat.RGBA16Sint), "HistogramSizeForSourceFormat");
|
||||
Assert.AreEqual (3072, obj.GetHistogramSize (MTLPixelFormat.RGBA16Sint), "HistogramSizeForSourceFormat");
|
||||
}
|
||||
var crs = obj.ClipRectSource;
|
||||
Assert.AreEqual (0, crs.Origin.X, "ClipRectSource.Origin.X");
|
||||
|
|
|
@ -340,7 +340,7 @@ namespace MonoTouchFixtures.ModelIO {
|
|||
var onesDoubleArr = TestMatrices.CreateOnesArray<double> ((int) doubleArr.ElementCount);
|
||||
var timesDoubleArr = new [] { 5d };
|
||||
doubleArr.Reset (onesDoubleArr, timesDoubleArr);
|
||||
var doubleValues = doubleArr.GetFloatValues (5);
|
||||
var doubleValues = doubleArr.GetDoubleValues (5);
|
||||
for (int i = 0; i < onesDoubleArr.Length; i++)
|
||||
Asserts.AreEqual (onesDoubleArr [i], doubleValues [i], $"onesDoubleArr iter: {i}");
|
||||
|
||||
|
|
|
@ -525,6 +525,11 @@ namespace MonoTouchFixtures.Security {
|
|||
Assert.NotNull (cert.GetNormalizedSubjectSequence (), "GetNormalizedSubjectSequence");
|
||||
Assert.NotNull (cert.GetPublicKey (), "GetPublicKey");
|
||||
}
|
||||
if (TestRuntime.CheckXcodeVersion (9,0)) {
|
||||
NSError err;
|
||||
Assert.That (cert.GetSerialNumber (out err).Description, Is.EqualTo ("<2b9f7ee5 ca25a625 14204782 753a9bb9>"), "GetSerialNumber/NSError");
|
||||
Assert.Null (err, "err") ;
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
|
@ -114,23 +114,19 @@ namespace MonoTouchFixtures.Security {
|
|||
byte [] cipher;
|
||||
if (TestRuntime.CheckXcodeVersion (8,0)) {
|
||||
Assert.True (public_key.IsAlgorithmSupported (SecKeyOperationType.Encrypt, SecKeyAlgorithm.RsaEncryptionPkcs1), "public/IsAlgorithmSupported/Encrypt");
|
||||
Action<bool> decryptTest = v => {
|
||||
Assert.That (public_key.IsAlgorithmSupported (SecKeyOperationType.Decrypt, SecKeyAlgorithm.RsaEncryptionPkcs1), Is.EqualTo (v), "public/IsAlgorithmSupported/Decrypt");
|
||||
|
||||
using (var pub = public_key.GetPublicKey ())
|
||||
{
|
||||
// a new native instance of the key is returned (so having a new managed SecKey is fine)
|
||||
Assert.That (pub.Handle == public_key.Handle, Is.Not.EqualTo (v), "public/GetPublicKey");
|
||||
}
|
||||
};
|
||||
#if MONOMAC
|
||||
if (TestRuntime.CheckXcodeVersion (9, 0))
|
||||
Assert.True (public_key.IsAlgorithmSupported (SecKeyOperationType.Decrypt, SecKeyAlgorithm.RsaEncryptionPkcs1), "public/IsAlgorithmSupported/Decrypt");
|
||||
else
|
||||
Assert.False (public_key.IsAlgorithmSupported (SecKeyOperationType.Decrypt, SecKeyAlgorithm.RsaEncryptionPkcs1), "public/IsAlgorithmSupported/Decrypt");
|
||||
|
||||
using (var pub = public_key.GetPublicKey ()) {
|
||||
Assert.That (pub.Handle, Is.EqualTo (public_key.Handle), "public/GetPublicKey");
|
||||
}
|
||||
decryptTest (TestRuntime.CheckMacSystemVersion (10, 13));
|
||||
#else
|
||||
// I would have expect false
|
||||
Assert.True (public_key.IsAlgorithmSupported (SecKeyOperationType.Decrypt, SecKeyAlgorithm.RsaEncryptionPkcs1), "public/IsAlgorithmSupported/Decrypt");
|
||||
|
||||
using (var pub = public_key.GetPublicKey ()) {
|
||||
// a new native instance of the key is returned (so having a new managed SecKey is fine)
|
||||
Assert.That (pub.Handle, Is.Not.EqualTo (public_key.Handle), "public/GetPublicKey");
|
||||
}
|
||||
decryptTest (true);
|
||||
#endif
|
||||
using (var attrs = public_key.GetAttributes ()) {
|
||||
Assert.That (attrs.Count, Is.GreaterThan (0), "public/GetAttributes");
|
||||
|
@ -217,10 +213,7 @@ namespace MonoTouchFixtures.Security {
|
|||
Assert.True (public_key.IsAlgorithmSupported (SecKeyOperationType.Encrypt, SecKeyAlgorithm.RsaEncryptionOaepSha1), "public/IsAlgorithmSupported/Encrypt");
|
||||
// I would have expect false
|
||||
#if MONOMAC
|
||||
if (TestRuntime.CheckXcodeVersion (9, 0))
|
||||
Assert.True (public_key.IsAlgorithmSupported (SecKeyOperationType.Decrypt, SecKeyAlgorithm.RsaEncryptionOaepSha1), "public/IsAlgorithmSupported/Decrypt");
|
||||
else
|
||||
Assert.False (public_key.IsAlgorithmSupported (SecKeyOperationType.Decrypt, SecKeyAlgorithm.RsaEncryptionOaepSha1), "public/IsAlgorithmSupported/Decrypt");
|
||||
Assert.That (public_key.IsAlgorithmSupported (SecKeyOperationType.Decrypt, SecKeyAlgorithm.RsaEncryptionOaepSha1), Is.EqualTo (TestRuntime.CheckMacSystemVersion (10, 13)), "public/IsAlgorithmSupported/Decrypt");
|
||||
#else
|
||||
Assert.True (public_key.IsAlgorithmSupported (SecKeyOperationType.Decrypt, SecKeyAlgorithm.RsaEncryptionOaepSha1), "public/IsAlgorithmSupported/Decrypt");
|
||||
#endif
|
||||
|
|
|
@ -90,9 +90,45 @@ namespace MonoTouchFixtures.Security {
|
|||
Assert.That ((int)ssl.SetDatagramHelloCookie (new byte [32]), Is.EqualTo (-50), "no cookie in stream");
|
||||
|
||||
// Assert.Null (ssl.GetDistinguishedNames<string> (), "GetDistinguishedNames");
|
||||
|
||||
if (TestRuntime.CheckXcodeVersion (9,0)) {
|
||||
Assert.That (ssl.SetSessionTickets (false), Is.EqualTo (0), "SetSessionTickets");
|
||||
Assert.That (ssl.SetError (SecStatusCode.Success), Is.EqualTo (0), "SetError");
|
||||
|
||||
Assert.Throws<ArgumentNullException> (() => ssl.SetOcspResponse (null), "SetOcspResponse/null");
|
||||
using (var data = new NSData ())
|
||||
Assert.That (ssl.SetOcspResponse (data), Is.EqualTo (0), "SetOcspResponse/empty");
|
||||
|
||||
// Test disabled for macOS due to Apple is not shipping SSLSetALPNProtocols and SSLCopyALPNProtocols on macOS
|
||||
#if !MONOMAC
|
||||
int error;
|
||||
var alpn = ssl.GetAlpnProtocols (out error);
|
||||
Assert.That (alpn, Is.Empty, "alpn");
|
||||
Assert.That (error, Is.EqualTo ((int) SecStatusCode.Param), "GetAlpnProtocols");
|
||||
var protocols = new [] { "HTTP/1.1", "SPDY/1" };
|
||||
Assert.That (ssl.SetAlpnProtocols (protocols), Is.EqualTo (0), "SetAlpnProtocols");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if MONOMAC
|
||||
[Test]
|
||||
public void ReenableSSLGetSetAlpnProtocols ()
|
||||
{
|
||||
TestRuntime.AssertXcodeVersion (9,0);
|
||||
|
||||
// It seems that apple forgot to ship SSLSetALPNProtocols and SSLCopyALPNProtocols in macOS
|
||||
// there are already radars filled about this https://bugs.swift.org/browse/SR-6131
|
||||
// So this test will fail once Apple fixes this issue. when this happens we need to do two things, reenable
|
||||
// the API and reenable the [Get|Set]AlpnProtocols test above, the one inside 'StreamDefaults' for the mac.
|
||||
|
||||
IntPtr seclib = Dlfcn.dlopen (Constants.SecurityLibrary, 0);
|
||||
Assert.IsTrue (Dlfcn.GetIndirect (seclib, "SSLSetALPNProtocols") == IntPtr.Zero, "Reenable 'SetAlpnProtocols' inside src/Security/SslContext.cs and remove this test.");
|
||||
Assert.IsTrue (Dlfcn.GetIndirect (seclib, "SSLCopyALPNProtocols") == IntPtr.Zero, "Reenable 'GetAlpnProtocols' inside src/Security/SslContext.cs and remove this test.");
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void DatagramDefaults ()
|
||||
{
|
||||
|
|
|
@ -101,10 +101,7 @@ namespace MonoTouchFixtures.SpriteKit {
|
|||
{
|
||||
using (var n = new SKSpriteNode (UIColor.Blue, SizeF.Empty)) {
|
||||
#if MONOMAC
|
||||
if (TestRuntime.CheckXcodeVersion (9, 0))
|
||||
Assert.That (n.Color.ToString (), Is.EqualTo ("Device RGB(0,0,1,1)"), "Color-1");
|
||||
else
|
||||
Assert.That (n.Color.ToString (), Is.EqualTo ("Device RGB(0.016804177314043,0.198350995779037,1,1)"), "Color-1");
|
||||
Assert.That (n.Color.ToString (), Is.EqualTo ("Device RGB(0.016804177314043,0.198350995779037,1,1)").Or.EqualTo ("Device RGB(0,0,1,1)"), "Color-1");
|
||||
#else
|
||||
Assert.That (n.Color.ToString (), Is.EqualTo ("UIColor [A=255, R=0, G=0, B=255]"), "Color-1");
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
//
|
||||
// Unit tests for SKCloudServiceSetupOptionsTest
|
||||
//
|
||||
// Authors:
|
||||
// Vincent Dondain <vidondai@microsoft.com>
|
||||
//
|
||||
// Copyright 2017 Microsoft. All rights reserved.
|
||||
//
|
||||
|
||||
#if __IOS__
|
||||
|
||||
using System;
|
||||
using Foundation;
|
||||
using NUnit.Framework;
|
||||
using StoreKit;
|
||||
|
||||
namespace MonoTouchFixtures.StoreKit {
|
||||
|
||||
[TestFixture]
|
||||
[Preserve (AllMembers = true)]
|
||||
public class SKCloudServiceSetupOptionsTest {
|
||||
|
||||
[Test]
|
||||
public void ActionTest ()
|
||||
{
|
||||
TestRuntime.AssertXcodeVersion (8, 1);
|
||||
|
||||
var optionsObject = new SKCloudServiceSetupOptions {
|
||||
Action = SKCloudServiceSetupAction.Subscribe
|
||||
};
|
||||
Assert.AreEqual ("sdkSubscribe", optionsObject.Dictionary ["SKCloudServiceSetupOptionsActionKey"].ToString (), "SKCloudServiceSetupOptionsActionKey");
|
||||
Assert.AreEqual (SKCloudServiceSetupAction.Subscribe, optionsObject.Action, "SKCloudServiceSetupOptions.Action");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __IOS__
|
|
@ -88,16 +88,9 @@ namespace MonoTouchFixtures.UIKit {
|
|||
{
|
||||
// https://bugzilla.xamarin.com/show_bug.cgi?id=20572
|
||||
using (UITextField tf = new UITextField ()) {
|
||||
var rect = tf.GetCaretRectForPosition (null);
|
||||
if (TestRuntime.CheckXcodeVersion (9, 0)) {
|
||||
#if __TVOS__
|
||||
Assert.AreEqual (new CGRect (0, -24, 2, 19), rect, "IsEmpty");
|
||||
#else
|
||||
Assert.AreEqual (new CGRect (0, -12, 2, 18.5), rect, "IsEmpty");
|
||||
#endif
|
||||
} else {
|
||||
Assert.AreEqual (CGRect.Empty, rect, "IsEmpty");
|
||||
}
|
||||
// most iOS versions returns `CGRect.Empty` but iOS [9-11.2[ did not
|
||||
// so we're not checking the return value - just that the call works (original bug)
|
||||
tf.GetCaretRectForPosition (null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,9 @@
|
|||
<Compile Include="..\api-shared\ObjCRuntime\Registrar.cs">
|
||||
<Link>Registrar.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\monotouch-test\ObjCRuntime\RegistrarTest.cs">
|
||||
<Link>ObjCRuntime\RegistrarTest.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\api-shared\ObjCRuntime\RegistrarTest.cs">
|
||||
<Link>api-shared\ObjCRuntime\RegistrarTest.cs</Link>
|
||||
</Compile>
|
||||
|
@ -88,6 +91,18 @@
|
|||
<Compile Include="..\monotouch-test\**\*.cs" Exclude="..\monotouch-test\obj\**;..\monotouch-test\ObjCRuntime\TrampolineTest.generated.cs;..\monotouch-test\ObjCRuntime\RegistrarTest.generated.cs">
|
||||
<Link>%(RecursiveDir)%(Filename).cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\monotouch-test\MetalPerformanceShaders\KernelTest.cs">
|
||||
<Link>MetalPerformanceShaders\KernelTest.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\monotouch-test\MetalPerformanceShaders\MPSImageHistogramEqualizationTest.cs">
|
||||
<Link>MetalPerformanceShaders\MPSImageHistogramEqualizationTest.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\monotouch-test\MetalPerformanceShaders\MPSImageHistogramSpecificationTest.cs">
|
||||
<Link>MetalPerformanceShaders\MPSImageHistogramSpecificationTest.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\monotouch-test\MetalPerformanceShaders\MPSImageHistogramTest.cs">
|
||||
<Link>MetalPerformanceShaders\MPSImageHistogramTest.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace Extrospection {
|
|||
|
||||
// the original name can be lost and, if not registered (e.g. enums), might not be available
|
||||
static Dictionary<string,string> map = new Dictionary<string, string> () {
|
||||
{ "AVPlayerHDRMode", "AVPlayerHdrMode" },
|
||||
{ "CFURLPathStyle", "CFUrlPathStyle" },
|
||||
{ "CIDataMatrixCodeECCVersion", "CIDataMatrixCodeEccVersion" },
|
||||
{ "CXPlayDTMFCallActionType", "CXPlayDtmfCallActionType" },
|
||||
|
@ -79,6 +80,12 @@ namespace Extrospection {
|
|||
{ "UITableViewCellAccessoryType", "UITableViewCellAccessory" },
|
||||
{ "UITableViewCellStateMask", "UITableViewCellState" },
|
||||
{ "WatchKitErrorCode", "WKErrorCode" }, // WebKit already had that name
|
||||
{ "MPSCNNBinaryConvolutionFlags", "MPSCnnBinaryConvolutionFlags"},
|
||||
{ "MPSCNNBinaryConvolutionType", "MPSCnnBinaryConvolutionType" },
|
||||
{ "MPSCNNNeuronType", "MPSCnnNeuronType" },
|
||||
{ "MPSNNPaddingMethod", "MPSNnPaddingMethod" },
|
||||
{ "MPSRNNBidirectionalCombineMode", "MPSRnnBidirectionalCombineMode" },
|
||||
{ "MPSRNNSequenceDirection", "MPSRnnSequenceDirection" },
|
||||
// not enums
|
||||
{ "NSMutableURLRequest", "NSMutableUrlRequest" },
|
||||
{ "UIImagePickerControllerImageURLExportPreset", "UIImagePickerControllerImageUrlExportPreset" },
|
||||
|
|
|
@ -57,7 +57,7 @@ osx.results run-osx: build $(XMAC_PCH)
|
|||
$(MONO) bin/Debug/xtro-sharpie.exe $(XMAC_PCH) $(XMAC) | sort > osx.results
|
||||
|
||||
$(XMAC_PCH): .stamp-check-sharpie
|
||||
sharpie sdk-db -s macosx$(OSX_SDK_VERSION) -a $(XMAC_ARCH) -x InputMethodKit
|
||||
sharpie sdk-db -s macosx$(OSX_SDK_VERSION) -a $(XMAC_ARCH)
|
||||
|
||||
preclassify: ios.results osx.results
|
||||
@comm -12 ios.results osx.results > common.unclassified.tmp
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче