diff --git a/Make.config b/Make.config index 9239051e95c..95bb98c184c 100644 --- a/Make.config +++ b/Make.config @@ -18,7 +18,6 @@ PACKAGE_HEAD_REV=$(shell git rev-parse HEAD) # PACKAGE_HEAD_BRANCH (set to the release branch name, this shows up in the IDE's version information, as well as mtouch/mmp --version) # IOS_PACKAGE_VERSION (major/minor #) # MAC_PACKAGE_VERSION (major/minor #) -# PACKAGE_VERSION_REV (set to 0 and increment for service releases or previews) # (and updating the same on master as well, to next version) # @@ -38,23 +37,21 @@ else CURRENT_BRANCH:=$(PACKAGE_HEAD_BRANCH) endif -# for service releases and previews -PACKAGE_VERSION_REV=0 - IOS_PRODUCT=Xamarin.iOS IOS_PACKAGE_NAME=Xamarin.iOS IOS_PACKAGE_NAME_LOWER=$(shell echo $(IOS_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]") # NEVER customize IOS_PACKAGE_VERSION itself, other parts (mtouch, web updater) are using the IOS_PACKAGE_VERSION_* variables -IOS_PACKAGE_VERSION=11.3.$(PACKAGE_VERSION_REV).$(IOS_COMMIT_DISTANCE) +IOS_PACKAGE_VERSION=10.15.0.$(IOS_COMMIT_DISTANCE) IOS_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(IOS_PACKAGE_VERSION))) IOS_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(IOS_PACKAGE_VERSION))) -IOS_PACKAGE_VERSION_REV=$(PACKAGE_VERSION_REV) +IOS_PACKAGE_VERSION_REV=$(word 3, $(subst ., ,$(IOS_PACKAGE_VERSION))) 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 -XCODE_URL=http://xamarin-storage/bot-provisioning/Xcode_9_GM_seed.xip -XCODE_DEVELOPER_ROOT=/Applications/Xcode9-GM.app/Contents/Developer +# Xcode 8.3 +XCODE_VERSION=8.3 +XCODE_URL=http://xamarin-storage/bot-provisioning/Xcode_8.3.xip +XCODE_DEVELOPER_ROOT=/Applications/Xcode83.app/Contents/Developer # Minimum Mono version MIN_MONO_VERSION=5.4.0.60 @@ -75,10 +72,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.0 -OSX_SDK_VERSION=10.13 -WATCH_SDK_VERSION=4.0 -TVOS_SDK_VERSION=11.0 +IOS_SDK_VERSION=10.3 +OSX_SDK_VERSION=10.12 +WATCH_SDK_VERSION=3.2 +TVOS_SDK_VERSION=10.2 MIN_IOS_SDK_VERSION=6.0 MIN_OSX_SDK_VERSION=10.7 @@ -252,10 +249,10 @@ MAC_PRODUCT=Xamarin.Mac MAC_PACKAGE_NAME=xamarin.mac MAC_PACKAGE_NAME_LOWER=$(shell echo $(MAC_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]") -MAC_PACKAGE_VERSION=4.1.$(PACKAGE_VERSION_REV).$(MAC_COMMIT_DISTANCE) +MAC_PACKAGE_VERSION=3.9.0.$(MAC_COMMIT_DISTANCE) MAC_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(MAC_PACKAGE_VERSION))) MAC_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(MAC_PACKAGE_VERSION))) -MAC_PACKAGE_VERSION_REV=$(PACKAGE_VERSION_REV) +MAC_PACKAGE_VERSION_REV=$(word 3, $(subst ., ,$(MAC_PACKAGE_VERSION))) MAC_PACKAGE_VERSION_BUILD=$(word 4, $(subst ., ,$(MAC_PACKAGE_VERSION))) MAC_PACKAGE_VERSION_MAJOR_MINOR=$(MAC_PACKAGE_VERSION_MAJOR).$(MAC_PACKAGE_VERSION_MINOR) MAC_PACKAGE_UPDATE_ID=$(shell echo $(subst ., ,$(MAC_PACKAGE_VERSION).$(MAC_PACKAGE_VERSION_BUILD)) | awk '{printf "2%02d%02d%02d%03d",$$1,$$2,$$3,$$4}') diff --git a/README.md b/README.md index 1ac8445b609..3ad16fb71e7 100644 --- a/README.md +++ b/README.md @@ -142,3 +142,4 @@ We use [Mono's Coding Guidelines](http://www.mono-project.com/community/contribu ### Reporting Bugs We use [Bugzilla](https://bugzilla.xamarin.com/newbug) to track issues. + diff --git a/Versions-ios.plist.in b/Versions-ios.plist.in index 738f00f802a..859bc81aed4 100644 --- a/Versions-ios.plist.in +++ b/Versions-ios.plist.in @@ -23,7 +23,6 @@ 10.1 10.2 10.3 - 11.0 tvOS @@ -33,7 +32,6 @@ 10.0 10.1 10.2 - 11.0 watchOS @@ -44,7 +42,6 @@ 3.0 3.1 3.2 - 4.0 RecommendedXcodeVersion diff --git a/Versions-mac.plist.in b/Versions-mac.plist.in index 8b90fc642e3..02734a11e84 100644 --- a/Versions-mac.plist.in +++ b/Versions-mac.plist.in @@ -12,7 +12,6 @@ 10.10 10.11 10.12 - 10.13 RecommendedXcodeVersion diff --git a/builds/Makefile b/builds/Makefile index 6545c0ac010..2241e3d477e 100644 --- a/builds/Makefile +++ b/builds/Makefile @@ -805,7 +805,6 @@ SIM_ACVARS = \ $(COMMON_ACVARS) \ ac_cv_func_clock_nanosleep=no \ mono_cv_uscore=yes \ - ac_cv_func_system=no \ define SimulatorBuildTemplate @@ -1857,7 +1856,6 @@ endif LLVM_BASE_CONFIGURE_FLAGS=--enable-libcpp --enable-optimized --enable-assertions=no --disable-jit --disable-docs --disable-doxygen LLVM_CXXFLAGS=$(CCACHE_CXXFLAGS) -LLVM_BASE_CONFIGURE_ENVIRONMENT=$(COMMON_ACVARS) # This is used just for linking with the 32 bit cross compiler # FIXME: Avoid building the libs not needed by mono @@ -1865,7 +1863,6 @@ LLVM_BASE_CONFIGURE_ENVIRONMENT=$(COMMON_ACVARS) @mkdir -p llvm/ @echo "Configuring llvm" @cd llvm && \ - $(LLVM_BASE_CONFIGURE_ENVIRONMENT) \ $(abspath $(LLVM_PATH)/configure) --prefix=$$PWD/usr --build=i386-apple-darwin10.7 --enable-targets="arm" $(LLVM_BASE_CONFIGURE_FLAGS) --cache-file=../llvm.config.cache CC="$(CCACHE)clang" CXX="$(CCACHE)clang++" CXXFLAGS="$(LLVM_CXXFLAGS)" > $@.log 2>&1 || (echo "Configuring llvm failed:" && cat $@.log | sed "s/^/ /" && exit 1) $(Q) @touch $@ @echo Configured llvm @@ -1874,7 +1871,6 @@ LLVM_BASE_CONFIGURE_ENVIRONMENT=$(COMMON_ACVARS) @mkdir -p llvm64/ @echo "Configuring llvm64" @cd llvm64 && \ - $(LLVM_BASE_CONFIGURE_ENVIRONMENT) \ $(abspath $(LLVM_PATH)/configure) --prefix=$$PWD/usr --enable-targets="arm arm64" $(LLVM_BASE_CONFIGURE_FLAGS) --cache-file=../llvm64.config.cache CC="$(CCACHE)clang" CXX="$(CCACHE)clang++" CXXFLAGS="-Qunused-arguments" > $@.log 2>&1 || (echo "Configuring llvm64 failed:" && cat $@.log | sed "s/^/ /" && exit 1) $(Q) @touch $@ @echo "Configured llvm64" diff --git a/docs/website/mtouch-errors.md b/docs/website/mtouch-errors.md index b255e499c7b..12eb1da7d5e 100644 --- a/docs/website/mtouch-errors.md +++ b/docs/website/mtouch-errors.md @@ -560,21 +560,9 @@ linker. This will most likely result in native linker errors. The solution is to remove the `--dynamic-symbol-mode=linker` argument from the additional mtouch arguments in the project's Build options. -### MT0116: Invalid architecture: {arch}. 32-bit architectures are not supported when deployment target is 11 or later. Make sure the project does not build for a 32-bit architecture. +### MT0116: Aot files could not be found at the expected directory '{msymdir}'. -iOS 11 does not contain support for 32-bit applications, so it's not supported -to build for a 32-bit application when the deployment target is iOS 11 or -later. - -Either change the target architecture in the project's iOS build options to -arm64, or change the deployment target in the project's Info.plist to an -earlier iOS version. - -### MT0117: Can't launch a 32-bit app on a simulator that only supports 64-bit. - -### MT0116: Aot files could not be found at the expected directory '{msymdir}'. - - + ### MT0123: The current language was set to '{language}' according to the LANG environment variable (LANG={LANG}). diff --git a/external/Touch.Unit b/external/Touch.Unit index 8f1e19d731c..055659f10af 160000 --- a/external/Touch.Unit +++ b/external/Touch.Unit @@ -1 +1 @@ -Subproject commit 8f1e19d731c7490993e5b25aaa2fc340498079b5 +Subproject commit 055659f10af409c7e369ee3372bd3f4b1a99fd2c diff --git a/external/Xamarin.MacDev b/external/Xamarin.MacDev index 59023905966..da6aeb0f492 160000 --- a/external/Xamarin.MacDev +++ b/external/Xamarin.MacDev @@ -1 +1 @@ -Subproject commit 59023905966b465cc92bb46535cf66a59a38d39f +Subproject commit da6aeb0f49243a497a921c0cef24264b1ca1279c diff --git a/external/llvm b/external/llvm index 975e3a69030..6aa74ae5723 160000 --- a/external/llvm +++ b/external/llvm @@ -1 +1 @@ -Subproject commit 975e3a6903003d7dba1b01f8a3c4a42a55049842 +Subproject commit 6aa74ae5723b13433adce76e94adcc090f2768ee diff --git a/external/mono b/external/mono index 7d788778005..b2acee0ade0 160000 --- a/external/mono +++ b/external/mono @@ -1 +1 @@ -Subproject commit 7d7887780057e40f3921ceedca6c1579a928655d +Subproject commit b2acee0ade0c53b0e70a322f3adb15071517add0 diff --git a/external/opentk b/external/opentk index 396bc90c7ac..2335bde3612 160000 --- a/external/opentk +++ b/external/opentk @@ -1 +1 @@ -Subproject commit 396bc90c7ac2e7ce442840a5e8bd91e5e79b381e +Subproject commit 2335bde3612c0cfcc1f0057d494c2ce681b54df4 diff --git a/jenkins/nunit-summary.xslt b/jenkins/nunit-summary.xslt new file mode 100644 index 00000000000..bf270e66d55 --- /dev/null +++ b/jenkins/nunit-summary.xslt @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + [PASS] + + + [FAIL] + + + [IGNORED] + + + [INCONCLUSIVE] + + + [INFO] + + + . : + + + + + + + + + + + + + + + + + + + + diff --git a/mk/xamarin.mk b/mk/xamarin.mk index 5ea227abed3..e09a031c6bc 100644 --- a/mk/xamarin.mk +++ b/mk/xamarin.mk @@ -1,5 +1,5 @@ ifdef ENABLE_XAMARIN -NEEDED_MACCORE_VERSION := e2905474b133977db654cf4036e78616ed92c3bf +NEEDED_MACCORE_VERSION := 93175c63568e00cf7cf7ac4be5a5cbd4d51bb0b9 NEEDED_MACCORE_BRANCH := master MACCORE_DIRECTORY := maccore diff --git a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets index f601b56c045..3c0c2782f7c 100644 --- a/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets +++ b/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets @@ -1856,7 +1856,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved. - diff --git a/msbuild/tests/MyPhotoEditingExtension/Info.plist b/msbuild/tests/MyPhotoEditingExtension/Info.plist index 37a6585165d..3698f5d349b 100644 --- a/msbuild/tests/MyPhotoEditingExtension/Info.plist +++ b/msbuild/tests/MyPhotoEditingExtension/Info.plist @@ -18,8 +18,6 @@ 1.0 CFBundleSignature ???? - MinimumOSVersion - 8.0 CFBundleVersion 1 NSExtension diff --git a/msbuild/tests/MyShareExtension/Info.plist b/msbuild/tests/MyShareExtension/Info.plist index 7d795b753f7..70c38f8e2eb 100644 --- a/msbuild/tests/MyShareExtension/Info.plist +++ b/msbuild/tests/MyShareExtension/Info.plist @@ -18,8 +18,6 @@ 1.0 CFBundleSignature ???? - MinimumOSVersion - 8.0 CFBundleVersion 1 NSExtension diff --git a/msbuild/tests/MySingleView/Info.plist b/msbuild/tests/MySingleView/Info.plist index dbf35be44e9..bb938e4d18a 100644 --- a/msbuild/tests/MySingleView/Info.plist +++ b/msbuild/tests/MySingleView/Info.plist @@ -15,7 +15,7 @@ UIMainStoryboardFile MainStoryboard MinimumOSVersion - 7.0 + 6.1 CFBundleDisplayName ApplicationName CFBundleIdentifier diff --git a/msbuild/tests/MyTodayExtension/Info.plist b/msbuild/tests/MyTodayExtension/Info.plist index bde8933a301..3081b14e398 100644 --- a/msbuild/tests/MyTodayExtension/Info.plist +++ b/msbuild/tests/MyTodayExtension/Info.plist @@ -18,8 +18,6 @@ 1.0 CFBundleSignature ???? - MinimumOSVersion - 8.0 CFBundleVersion 1 NSExtension diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/TargetTests/TargetTests.cs b/msbuild/tests/Xamarin.iOS.Tasks.Tests/TargetTests/TargetTests.cs index de2f3b7e3e6..2b2560b97b8 100644 --- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/TargetTests/TargetTests.cs +++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/TargetTests/TargetTests.cs @@ -36,7 +36,6 @@ string[] ExpectedExecutableBundleResources { "LaunchImage-568h@2x.png", "LaunchImage.png", "LaunchImage@2x.png", - "Assets.car", }; return files.Select (s => Path.Combine (AppBundlePath, s)).ToArray (); } @@ -436,7 +435,7 @@ public void BundleResources () var path = Path.Combine (MonoTouchProjectPath, "Info.plist"); var plist = PDictionary.FromFile (path); - plist.SetMinimumOSVersion ("7.0"); + plist.SetMinimumOSVersion ("6.1"); plist.Save (path, true); RunTarget (MonoTouchProject, TargetName.CollectBundleResources); @@ -481,7 +480,7 @@ public void AddAppIcon_NoClean() // Start without app icon. plist.Remove("XSAppIconAssets"); - plist.SetMinimumOSVersion ("7.0"); + plist.SetMinimumOSVersion ("6.1"); plist.Save (path, true); RunTarget (project, TargetName.CompileImageAssets); diff --git a/runtime/Makefile b/runtime/Makefile index 82b82ffb201..aea83e63102 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -41,7 +41,7 @@ Delegates.generated.cs: Delegates.cs.t4 delegates.t4 $(Q_GEN) $(TT) $< -o $@ bindings-generator.exe: bindings-generator.cs - $(Q) $(SYSTEM_MCS) $< -o:$@ -debug:full + $(Q) $(SYSTEM_MCS) $< -o:$@ bindings-generated.m: bindings-generator.exe $(Q_GEN) $(SYSTEM_MONO) --debug $< $@ diff --git a/runtime/bindings-generator.cs b/runtime/bindings-generator.cs index 72906481807..f22abaa890b 100644 --- a/runtime/bindings-generator.cs +++ b/runtime/bindings-generator.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; /* @@ -36,7 +35,6 @@ public static int Main (string[] args) writer.WriteLine ("/* This file is generated */"); writer.WriteLine (); writer.WriteLine ("#include \"bindings.h\""); - writer.WriteLine ("#include "); writer.WriteLine (); writer.WriteLine ("#ifdef __cplusplus"); writer.WriteLine ("extern \"C\" {"); @@ -77,26 +75,6 @@ static IEnumerable GetFunctionData () { var data = new List (); - data.Add ( - new FunctionData { - Comment = " // NVector3 func ()", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.NVector3, - } - ); - - data.Add ( - new FunctionData { - Comment = " // void func (NVector3)", - Prefix = "simd__", - Variants = Variants.msgSend | Variants.msgSendSuper, - Parameters = new ParameterData[] { - new ParameterData { TypeData = Types.NVector3 } - }, - } - ); - data.Add ( new FunctionData { Comment = " // void func (Vector3)", @@ -691,32 +669,6 @@ static IEnumerable GetFunctionData () } ); - data.Add ( - new FunctionData { - Comment = " // MDLAxisAlignedBoundingBox func (float)", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.MDLAxisAlignedBoundingBox, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.Float }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // IntPtr func (IntPtr, MDLAxisAlignedBoundingBox, float)", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.IntPtr, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.IntPtr }, - new ParameterData { TypeData = Types.MDLAxisAlignedBoundingBox }, - new ParameterData { TypeData = Types.Float }, - }, - } - ); - data.Add ( new FunctionData { Comment = " // Vector3 func (Vector4i)", @@ -1491,26 +1443,6 @@ static IEnumerable GetFunctionData () } ); - data.Add ( - new FunctionData { - Comment = " // Quaternion func ()", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.QuatF, - } - ); - - data.Add ( - new FunctionData { - Comment = " // void func (Quaternion)", - Prefix = "simd__", - Variants = Variants.NonStret, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.QuatF }, - }, - } - ); - // Required for ModelIO data.Add ( new FunctionData { @@ -1930,372 +1862,6 @@ static IEnumerable GetFunctionData () } ); - // Required for ARKit - - data.Add ( - new FunctionData { - Comment = " // Matrix4 func (/* UIInterfaceOrientation */ Int32, CGSize, nfloat, nfloat)", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.Matrix4f, - Parameters = new ParameterData[] { - new ParameterData { TypeData = Types.Int32 }, - new ParameterData { TypeData = Types.CGSize }, - new ParameterData { TypeData = Types.NFloat }, - new ParameterData { TypeData = Types.NFloat }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // Matrix4 func (/* UIInterfaceOrientation */ Int64, CGSize, nfloat, nfloat)", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.Matrix4f, - Parameters = new ParameterData[] { - new ParameterData { TypeData = Types.Int64 }, - new ParameterData { TypeData = Types.CGSize }, - new ParameterData { TypeData = Types.NFloat }, - new ParameterData { TypeData = Types.NFloat }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // CGPoint func (Vector3, /* UIInterfaceOrientation */ Int32, CGSize)", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.CGPoint, - Parameters = new ParameterData[] { - new ParameterData { TypeData = Types.NVector3 }, - new ParameterData { TypeData = Types.Int32 }, - new ParameterData { TypeData = Types.CGSize }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // CGPoint func (Vector3, /* UIInterfaceOrientation */ Int64, CGSize)", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.CGPoint, - Parameters = new ParameterData[] { - new ParameterData { TypeData = Types.NVector3 }, - new ParameterData { TypeData = Types.Int64 }, - new ParameterData { TypeData = Types.CGSize }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // Matrix4 func (/* UIInterfaceOrientation */ nint)", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.Matrix4f, - Parameters = new ParameterData[] { - new ParameterData { TypeData = Types.NInt }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // MPSImageHistogramInfo func ()", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.MPSImageHistogramInfo, - } - ); - - data.Add ( - new FunctionData { - Comment = " // void func (NMatrix2)", - Prefix = "simd__", - Variants = Variants.NonStret, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.NMatrix2 }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // NMatrix2 func ()", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.NMatrix2, - } - ); - - data.Add ( - new FunctionData { - Comment = " // IntPtr func (IntPtr, ref MPSImageHistogramInfo)", - Prefix = "simd__", - Variants = Variants.NonStret, - ReturnType = Types.IntPtr, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.IntPtr }, - new ParameterData { TypeData = Types.MPSImageHistogramInfo, IsRef = true }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // IntPtr func (IntPtr, NMatrix2)", - Prefix = "simd__", - Variants = Variants.NonStret, - ReturnType = Types.IntPtr, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.IntPtr }, - new ParameterData { TypeData = Types.NMatrix2 }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // void func (NMatrix3)", - Prefix = "simd__", - Variants = Variants.NonStret, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.NMatrix3 }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // IntPtr func (NMatrix3)", - Prefix = "simd__", - Variants = Variants.NonStret, - ReturnType = Types.IntPtr, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.NMatrix3 }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // MDLVoxelIndexExtent2 func ()", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.MDLVoxelIndexExtent2, - } - ); - - data.Add ( - new FunctionData { - Comment = " // NMatrix3 func ()", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.NMatrix3, - } - ); - - data.Add ( - new FunctionData { - Comment = " // void func (MDLVoxelIndexExtent2)", - Prefix = "simd__", - Variants = Variants.NonStret, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.MDLVoxelIndexExtent2 }, - } - } - ); - - data.Add ( - new FunctionData { - Comment = " // IntPtr func (IntPtr, NMatrix3)", - Prefix = "simd__", - Variants = Variants.NonStret, - ReturnType = Types.IntPtr, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.IntPtr }, - new ParameterData { TypeData = Types.NMatrix3 }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // void func (NMatrix4)", - Prefix = "simd__", - Variants = Variants.NonStret, - Parameters = new ParameterData[] { - new ParameterData { TypeData = Types.NMatrix4 }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // IntPtr func (NMatrix4)", - Prefix = "simd__", - Variants = Variants.NonStret, - ReturnType = Types.IntPtr, - Parameters = new ParameterData[] { - new ParameterData { TypeData = Types.NMatrix4 }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // void func (NMatrix4, double)", - Prefix = "simd__", - Variants = Variants.NonStret, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.NMatrix4 }, - new ParameterData { TypeData = Types.Double }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // IntPtr func (NMatrix4, bool)", - Prefix = "simd__", - Variants = Variants.NonStret, - ReturnType = Types.IntPtr, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.NMatrix4 }, - new ParameterData { TypeData = Types.Bool }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // IntPtr func (MDLVoxelIndexExtent2)", - Prefix = "simd__", - Variants = Variants.NonStret, - ReturnType = Types.IntPtr, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.MDLVoxelIndexExtent2 }, - }, - } - ); - - - data.Add ( - new FunctionData { - Comment = " // IntPtr func (IntPtr, nuint, NMatrix4)", - Prefix = "simd__", - Variants = Variants.NonStret, - ReturnType = Types.IntPtr, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.IntPtr }, - new ParameterData { TypeData = Types.NUInt }, - new ParameterData { TypeData = Types.NMatrix4 }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // NMatrix4 func ()", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.NMatrix4, - } - ); - - data.Add ( - new FunctionData { - Comment = " // NMatrix4 func (int, CGSize, nfloat, nfloat)", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.NMatrix4, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.Int32 }, - new ParameterData { TypeData = Types.CGSize }, - new ParameterData { TypeData = Types.NFloat }, - new ParameterData { TypeData = Types.NFloat }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // NMatrix4 func (Int64, CGSize, nfloat, nfloat)", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.NMatrix4, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.Int64 }, - new ParameterData { TypeData = Types.CGSize }, - new ParameterData { TypeData = Types.NFloat }, - new ParameterData { TypeData = Types.NFloat }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // NMatrix4 func (double)", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.NMatrix4, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.Double }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // NMatrix4 func (nint)", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.NMatrix4, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.NInt }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // IntPtr func (IntPtr, nint, NMatrix4)", - Prefix = "simd__", - Variants = Variants.NonStret, - ReturnType = Types.IntPtr, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.IntPtr }, - new ParameterData { TypeData = Types.NInt }, - new ParameterData { TypeData = Types.NMatrix4 }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // IntPtr func (IntPtr, NMatrix4)", - Prefix = "simd__", - Variants = Variants.NonStret, - ReturnType = Types.IntPtr, - Parameters = new ParameterData [] { - new ParameterData { TypeData = Types.IntPtr }, - new ParameterData { TypeData = Types.NMatrix4 }, - }, - } - ); - - data.Add ( - new FunctionData { - Comment = " // NMatrix4x3 func ()", - Prefix = "simd__", - Variants = Variants.All, - ReturnType = Types.NMatrix4x3, - } - ); - // We must expand functions with native types to their actual type as well. for (int i = data.Count - 1; i >= 0; i--) { if (!data [i].HasNativeType) @@ -2312,260 +1878,176 @@ static string GetTypeNameForSignature (string managed_type) return managed_type; } - static void MarshalToManaged (StringWriter writer, TypeData type, string nativeVariable, string managedVariable, bool isRef = false) + static void MarshalToManaged (StringWriter writer, TypeData type, string nativeVariable, string managedVariable) { - var accessor = isRef ? "->" : "."; switch (type.ManagedType) { case "Vector2d": case "Vector2i": case "Vector2": - writer.WriteLine ("\t{0}{2}a = {1} [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}b = {1} [1];", managedVariable, nativeVariable, accessor); + writer.WriteLine ("\t{0}.a = {1} [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.b = {1} [1];", managedVariable, nativeVariable); break; case "Vector3d": case "Vector3i": case "Vector3": - case "NVector3": - case "NVector3d": - writer.WriteLine ("\t{0}{2}a = {1} [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}b = {1} [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}c = {1} [2];", managedVariable, nativeVariable, accessor); + writer.WriteLine ("\t{0}.a = {1} [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.b = {1} [1];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.c = {1} [2];", managedVariable, nativeVariable); break; case "Vector4d": case "Vector4i": case "Vector4": if (type.NativeType == "vector_float3") { - writer.WriteLine ("\t{0}{2}a = {1} [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}b = {1} [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}c = {1} [2];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{1}d = 0;", managedVariable, accessor); + writer.WriteLine ("\t{0}.a = {1} [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.b = {1} [1];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.c = {1} [2];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.d = 0;", managedVariable); } else if (type.NativeType == "vector_float4" || type.NativeType == "vector_int4" || type.NativeType == "vector_double4") { - writer.WriteLine ("\t{0}{2}a = {1} [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}b = {1} [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}c = {1} [2];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}d = {1} [3];", managedVariable, nativeVariable, accessor); + writer.WriteLine ("\t{0}.a = {1} [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.b = {1} [1];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.c = {1} [2];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.d = {1} [3];", managedVariable, nativeVariable); } else { goto default; } break; case "Matrix2": - case "NMatrix2": writer.WriteLine ("\tfor (int i = 0; i < 2; i++) {"); - writer.WriteLine ("\t\t{0}{2}columns [i].a = {1}.columns [i] [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t\t{0}{2}columns [i].b = {1}.columns [i] [1];", managedVariable, nativeVariable, accessor); + writer.WriteLine ("\t\t{0}.columns [i].a = {1}.columns [i] [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t\t{0}.columns [i].b = {1}.columns [i] [1];", managedVariable, nativeVariable); writer.WriteLine ("\t}"); break; case "Matrix3": - case "NMatrix3": writer.WriteLine ("\tfor (int i = 0; i < 3; i++) {"); - writer.WriteLine ("\t\t{0}{2}columns [i].a = {1}.columns [i] [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t\t{0}{2}columns [i].b = {1}.columns [i] [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t\t{0}{2}columns [i].c = {1}.columns [i] [2];", managedVariable, nativeVariable, accessor); + writer.WriteLine ("\t\t{0}.columns [i].a = {1}.columns [i] [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t\t{0}.columns [i].b = {1}.columns [i] [1];", managedVariable, nativeVariable); + writer.WriteLine ("\t\t{0}.columns [i].c = {1}.columns [i] [2];", managedVariable, nativeVariable); writer.WriteLine ("\t}"); break; case "Matrix4": - case "NMatrix4": - case "NMatrix4d": - writer.WriteLine ("\tfor (int i = 0; i < 4; i++) {"); - writer.WriteLine ("\t\t{0}{2}columns [i].a = {1}.columns [i] [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t\t{0}{2}columns [i].b = {1}.columns [i] [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t\t{0}{2}columns [i].c = {1}.columns [i] [2];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t\t{0}{2}columns [i].d = {1}.columns [i] [3];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t}"); - break; - case "NMatrix4x3": writer.WriteLine ("\tfor (int i = 0; i < 4; i++) {"); - writer.WriteLine ("\t\t{0}{2}columns [i].a = {1}.columns [i] [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t\t{0}{2}columns [i].b = {1}.columns [i] [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t\t{0}{2}columns [i].c = {1}.columns [i] [2];", managedVariable, nativeVariable, accessor); + writer.WriteLine ("\t\t{0}.columns [i].a = {1}.columns [i] [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t\t{0}.columns [i].b = {1}.columns [i] [1];", managedVariable, nativeVariable); + writer.WriteLine ("\t\t{0}.columns [i].c = {1}.columns [i] [2];", managedVariable, nativeVariable); + writer.WriteLine ("\t\t{0}.columns [i].d = {1}.columns [i] [3];", managedVariable, nativeVariable); writer.WriteLine ("\t}"); break; case "MDLAxisAlignedBoundingBox": - writer.WriteLine ("\t{0}{2}maxBounds.a = {1}.maxBounds [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maxBounds.b = {1}.maxBounds [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maxBounds.c = {1}.maxBounds [2];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minBounds.a = {1}.minBounds [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minBounds.b = {1}.minBounds [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minBounds.c = {1}.minBounds [2];", managedVariable, nativeVariable, accessor); + writer.WriteLine ("\t{0}.maxBounds.a = {1}.maxBounds [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.maxBounds.b = {1}.maxBounds [1];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.maxBounds.c = {1}.maxBounds [2];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.minBounds.a = {1}.minBounds [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.minBounds.b = {1}.minBounds [1];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.minBounds.c = {1}.minBounds [2];", managedVariable, nativeVariable); break; case "GKBox": - writer.WriteLine ("\t{0}{2}maxBounds.a = {1}.maxBounds [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maxBounds.b = {1}.maxBounds [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maxBounds.c = {1}.maxBounds [2];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minBounds.a = {1}.minBounds [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minBounds.b = {1}.minBounds [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minBounds.c = {1}.minBounds [2];", managedVariable, nativeVariable, accessor); + writer.WriteLine ("\t{0}.maxBounds.a = {1}.maxBounds [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.maxBounds.b = {1}.maxBounds [1];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.maxBounds.c = {1}.maxBounds [2];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.minBounds.a = {1}.minBounds [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.minBounds.b = {1}.minBounds [1];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.minBounds.c = {1}.minBounds [2];", managedVariable, nativeVariable); break; case "GKQuad": - writer.WriteLine ("\t{0}{2}maxBounds.a = {1}.maxBounds [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maxBounds.b = {1}.maxBounds [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minBounds.a = {1}.minBounds [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minBounds.b = {1}.minBounds [1];", managedVariable, nativeVariable, accessor); + writer.WriteLine ("\t{0}.maxBounds.a = {1}.maxBounds [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.maxBounds.b = {1}.maxBounds [1];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.minBounds.a = {1}.minBounds [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t{0}.minBounds.b = {1}.minBounds [1];", managedVariable, nativeVariable); break; case "GKTriangle": writer.WriteLine ("\tfor (int i = 0; i < 3; i++) {"); - writer.WriteLine ("\t\t{0}{2}points [i].a = {1}.points [i] [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t\t{0}{2}points [i].b = {1}.points [i] [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t\t{0}{2}points [i].c = {1}.points [i] [2];", managedVariable, nativeVariable, accessor); + writer.WriteLine ("\t\t{0}.points [i].a = {1}.points [i] [0];", managedVariable, nativeVariable); + writer.WriteLine ("\t\t{0}.points [i].b = {1}.points [i] [1];", managedVariable, nativeVariable); + writer.WriteLine ("\t\t{0}.points [i].c = {1}.points [i] [2];", managedVariable, nativeVariable); writer.WriteLine ("\t}"); break; - case "Quaternion": - writer.WriteLine ("\t{0}{2}vector.a = {1}.vector [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}vector.b = {1}.vector [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}vector.c = {1}.vector [2];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}vector.d = {1}.vector [3];", managedVariable, nativeVariable, accessor); - break; - case "MPSImageHistogramInfo": - writer.WriteLine ("\t{0}{2}numberOfHistogramEntries = {1}.numberOfHistogramEntries;", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}histogramForAlpha = {1}.histogramForAlpha;", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minPixelValue.a = {1}.minPixelValue [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minPixelValue.b = {1}.minPixelValue [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minPixelValue.c = {1}.minPixelValue [2];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minPixelValue.d = {1}.minPixelValue [3];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maxPixelValue.a = {1}.maxPixelValue [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maxPixelValue.b = {1}.maxPixelValue [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maxPixelValue.c = {1}.maxPixelValue [2];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maxPixelValue.d = {1}.maxPixelValue [3];", managedVariable, nativeVariable, accessor); - break; - case "MDLVoxelIndexExtent2": - writer.WriteLine ("\t{0}{2}minimumExtent.a = {1}.minimumExtent [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minimumExtent.b = {1}.minimumExtent [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minimumExtent.c = {1}.minimumExtent [2];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}minimumExtent.d = {1}.minimumExtent [3];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maximumExtent.a = {1}.maximumExtent [0];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maximumExtent.b = {1}.maximumExtent [1];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maximumExtent.c = {1}.maximumExtent [2];", managedVariable, nativeVariable, accessor); - writer.WriteLine ("\t{0}{2}maximumExtent.d = {1}.maximumExtent [3];", managedVariable, nativeVariable, accessor); - break; default: throw new NotImplementedException (string.Format ("MarshalToManaged for: NativeType: {0} ManagedType: {1}", type.NativeType, type.ManagedType)); } } - static void MarshalToNative (StringWriter writer, TypeData type, string nativeVariable, string managedVariable, bool isRef) + static void MarshalToNative (StringWriter writer, TypeData type, string nativeVariable, string managedVariable) { - var accessor = isRef ? "->" : "."; switch (type.ManagedType) { case "Vector2d": case "Vector2i": case "Vector2": - writer.WriteLine ("\t{0} [0] = {1}{2}a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0} [1] = {1}{2}b;", nativeVariable, managedVariable, accessor); + writer.WriteLine ("\t{0} [0] = {1}.a;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0} [1] = {1}.b;", nativeVariable, managedVariable); break; case "Vector3d": case "Vector3i": case "Vector3": - case "NVector3": - case "NVector3d": - writer.WriteLine ("\t{0} [0] = {1}{2}a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0} [1] = {1}{2}b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0} [2] = {1}{2}c;", nativeVariable, managedVariable, accessor); + writer.WriteLine ("\t{0} [0] = {1}.a;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0} [1] = {1}.b;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0} [2] = {1}.c;", nativeVariable, managedVariable); break; case "Vector4d": case "Vector4i": case "Vector4": if (type.NativeType == "vector_float3") { - writer.WriteLine ("\t{0} [0] = {1}{2}a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0} [1] = {1}{2}b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0} [2] = {1}{2}c;", nativeVariable, managedVariable, accessor); + writer.WriteLine ("\t{0} [0] = {1}.a;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0} [1] = {1}.b;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0} [2] = {1}.c;", nativeVariable, managedVariable); } else if (type.NativeType == "vector_float4" || type.NativeType == "vector_int4" || type.NativeType == "vector_double4") { - writer.WriteLine ("\t{0} [0] = {1}{2}a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0} [1] = {1}{2}b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0} [2] = {1}{2}c;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0} [3] = {1}{2}d;", nativeVariable, managedVariable, accessor); + writer.WriteLine ("\t{0} [0] = {1}.a;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0} [1] = {1}.b;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0} [2] = {1}.c;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0} [3] = {1}.d;", nativeVariable, managedVariable); } else { goto default; } break; case "Matrix2": - case "NMatrix2": writer.WriteLine ("\tfor (int i = 0; i < 2; i++) {"); - writer.WriteLine ("\t\t{0}.columns [i][0] = {1}{2}columns [i].a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t\t{0}.columns [i][1] = {1}{2}columns [i].b;", nativeVariable, managedVariable, accessor); + writer.WriteLine ("\t\t{0}.columns [i][0] = {1}.columns [i].a;", nativeVariable, managedVariable); + writer.WriteLine ("\t\t{0}.columns [i][1] = {1}.columns [i].b;", nativeVariable, managedVariable); writer.WriteLine ("\t}"); break; case "Matrix3": - case "NMatrix3": writer.WriteLine ("\tfor (int i = 0; i < 3; i++) {"); - writer.WriteLine ("\t\t{0}.columns [i][0] = {1}{2}columns [i].a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t\t{0}.columns [i][1] = {1}{2}columns [i].b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t\t{0}.columns [i][2] = {1}{2}columns [i].c;", nativeVariable, managedVariable, accessor); + writer.WriteLine ("\t\t{0}.columns [i][0] = {1}.columns [i].a;", nativeVariable, managedVariable); + writer.WriteLine ("\t\t{0}.columns [i][1] = {1}.columns [i].b;", nativeVariable, managedVariable); + writer.WriteLine ("\t\t{0}.columns [i][2] = {1}.columns [i].c;", nativeVariable, managedVariable); writer.WriteLine ("\t}"); break; case "Matrix4": - case "NMatrix4": - case "NMatrix4d": - writer.WriteLine ("\tfor (int i = 0; i < 4; i++) {"); - writer.WriteLine ("\t\t{0}.columns [i][0] = {1}{2}columns [i].a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t\t{0}.columns [i][1] = {1}{2}columns [i].b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t\t{0}.columns [i][2] = {1}{2}columns [i].c;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t\t{0}.columns [i][3] = {1}{2}columns [i].d;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t}"); - break; - case "NMatrix4x3": writer.WriteLine ("\tfor (int i = 0; i < 4; i++) {"); - writer.WriteLine ("\t\t{0}.columns [i][0] = {1}{2}columns [i].a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t\t{0}.columns [i][1] = {1}{2}columns [i].b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t\t{0}.columns [i][2] = {1}{2}columns [i].c;", nativeVariable, managedVariable, accessor); + writer.WriteLine ("\t\t{0}.columns [i][0] = {1}.columns [i].a;", nativeVariable, managedVariable); + writer.WriteLine ("\t\t{0}.columns [i][1] = {1}.columns [i].b;", nativeVariable, managedVariable); + writer.WriteLine ("\t\t{0}.columns [i][2] = {1}.columns [i].c;", nativeVariable, managedVariable); + writer.WriteLine ("\t\t{0}.columns [i][3] = {1}.columns [i].d;", nativeVariable, managedVariable); writer.WriteLine ("\t}"); break; case "MDLAxisAlignedBoundingBox": - writer.WriteLine ("\t{0}.maxBounds [0] = {1}{2}maxBounds.a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maxBounds [1] = {1}{2}maxBounds.b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maxBounds [2] = {1}{2}maxBounds.c;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minBounds [0] = {1}{2}minBounds.a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minBounds [1] = {1}{2}minBounds.b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minBounds [2] = {1}{2}minBounds.c;", nativeVariable, managedVariable, accessor); + writer.WriteLine ("\t{0}.maxBounds [0] = {1}.maxBounds.a;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.maxBounds [1] = {1}.maxBounds.b;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.maxBounds [2] = {1}.maxBounds.c;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.minBounds [0] = {1}.minBounds.a;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.minBounds [1] = {1}.minBounds.b;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.minBounds [2] = {1}.minBounds.c;", nativeVariable, managedVariable); break; case "GKBox": - writer.WriteLine ("\t{0}.maxBounds [0] = {1}{2}maxBounds.a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maxBounds [1] = {1}{2}maxBounds.b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maxBounds [2] = {1}{2}maxBounds.c;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minBounds [0] = {1}{2}minBounds.a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minBounds [1] = {1}{2}minBounds.b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minBounds [2] = {1}{2}minBounds.c;", nativeVariable, managedVariable, accessor); + writer.WriteLine ("\t{0}.maxBounds [0] = {1}.maxBounds.a;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.maxBounds [1] = {1}.maxBounds.b;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.maxBounds [2] = {1}.maxBounds.c;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.minBounds [0] = {1}.minBounds.a;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.minBounds [1] = {1}.minBounds.b;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.minBounds [2] = {1}.minBounds.c;", nativeVariable, managedVariable); break; case "GKQuad": - writer.WriteLine ("\t{0}.maxBounds [0] = {1}{2}maxBounds.a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maxBounds [1] = {1}{2}maxBounds.b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minBounds [0] = {1}{2}minBounds.a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minBounds [1] = {1}{2}minBounds.b;", nativeVariable, managedVariable, accessor); + writer.WriteLine ("\t{0}.maxBounds [0] = {1}.maxBounds.a;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.maxBounds [1] = {1}.maxBounds.b;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.minBounds [0] = {1}.minBounds.a;", nativeVariable, managedVariable); + writer.WriteLine ("\t{0}.minBounds [1] = {1}.minBounds.b;", nativeVariable, managedVariable); break; case "GKTriangle": writer.WriteLine ("\tfor (int i = 0; i < 3; i++) {"); - writer.WriteLine ("\t\t{0}.points [i][0] = {1}{2}points [i].a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t\t{0}.points [i][1] = {1}{2}points [i].b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t\t{0}.points [i][2] = {1}{2}points [i].c;", nativeVariable, managedVariable, accessor); + writer.WriteLine ("\t\t{0}.points [i][0] = {1}.points [i].a;", nativeVariable, managedVariable); + writer.WriteLine ("\t\t{0}.points [i][1] = {1}.points [i].b;", nativeVariable, managedVariable); + writer.WriteLine ("\t\t{0}.points [i][2] = {1}.points [i].c;", nativeVariable, managedVariable); writer.WriteLine ("\t}"); break; - case "Quaternion": - writer.WriteLine ("\t{0}.vector [0] = {1}{2}vector.a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.vector [1] = {1}{2}vector.b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.vector [2] = {1}{2}vector.c;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.vector [3] = {1}{2}vector.d;", nativeVariable, managedVariable, accessor); - break; - case "MPSImageHistogramInfo": - writer.WriteLine ("\t{0}.numberOfHistogramEntries = {1}{2}numberOfHistogramEntries;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.histogramForAlpha = {1}{2}histogramForAlpha;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minPixelValue [0] = {1}{2}minPixelValue.a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minPixelValue [1] = {1}{2}minPixelValue.b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minPixelValue [2] = {1}{2}minPixelValue.c;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minPixelValue [3] = {1}{2}minPixelValue.d;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maxPixelValue [0] = {1}{2}maxPixelValue.a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maxPixelValue [1] = {1}{2}maxPixelValue.b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maxPixelValue [2] = {1}{2}maxPixelValue.c;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maxPixelValue [3] = {1}{2}maxPixelValue.d;", nativeVariable, managedVariable, accessor); - break; - case "MDLVoxelIndexExtent2": - writer.WriteLine ("\t{0}.minimumExtent [0] = {1}{2}minimumExtent.a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minimumExtent [1] = {1}{2}minimumExtent.b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minimumExtent [2] = {1}{2}minimumExtent.c;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.minimumExtent [3] = {1}{2}minimumExtent.d;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maximumExtent [0] = {1}{2}maximumExtent.a;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maximumExtent [1] = {1}{2}maximumExtent.b;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maximumExtent [2] = {1}{2}maximumExtent.c;", nativeVariable, managedVariable, accessor); - writer.WriteLine ("\t{0}.maximumExtent [3] = {1}{2}maximumExtent.d;", nativeVariable, managedVariable, accessor); - break; default: throw new NotImplementedException (string.Format ("MarshalToNative for: NativeType: {0} ManagedType: {1}", type.NativeType, type.ManagedType)); } @@ -2604,7 +2086,7 @@ static void WriteParametersMarshal (StringWriter writer, ParameterData [] ps) continue; writer.WriteLine ("\t{0} v{1};", p.TypeData.NativeType, i); - MarshalToNative (writer, p.TypeData, "v" + i.ToString (), "p" + i.ToString (), p.IsRef); + MarshalToNative (writer, p.TypeData, "v" + i.ToString (), "p" + i.ToString ()); } } @@ -2615,35 +2097,14 @@ static void WriteParametersInvoke (StringWriter writer, ParameterData [] ps) for (int i = 0; i < ps.Length; i++) { var p = ps [i]; - writer.Write (", "); - if (p.IsRef && p.TypeData != Types.IntPtr) - writer.Write ("&"); if (p.TypeData.RequireMarshal) { - writer.Write ("v{0}", i); + writer.Write (", v{0}", i); } else { - writer.Write ("p{0}", i); + writer.Write (", p{0}", i); } } } - static void WriteParametersNativeDeclaration (StringWriter writer, ParameterData [] parameters, bool isTypedef) - { - if (parameters == null) - return; - - - for (int i = 0; i < parameters.Length; i++) { - var p = parameters [i]; - writer.Write (", "); - writer.Write (isTypedef ? p.TypeData.NativeType : p.TypeData.NativeWrapperType); - if (p.IsRef && p.TypeData != Types.IntPtr) - writer.Write ("*"); - writer.Write (" "); - writer.Write (isTypedef ? "f" : "p"); - writer.Write (i); - } - } - static void WriteMessageStretSenderCode (StringWriter writer, TypeData type, bool isSuper) { var nonstret = isSuper ? "objc_msgSendSuper" : "objc_msgSend"; @@ -2669,56 +2130,35 @@ static void WriteCatchHandler (StringWriter writer) writer.WriteLine ("\t}"); } - static void WriteMarshalParametersToManaged (StringWriter writer, FunctionData func) - { - if (func.Parameters == null) - return; - - for (int i = 0; i < func.Parameters.Length; i++) { - var p = func.Parameters [i]; - if (!p.IsRef || !p.TypeData.RequireMarshal) - continue; - MarshalToManaged (writer, p.TypeData, $"v{i}", $"p{i}", true); - } - } - - static void WriteMarshalReturnValue (StringWriter writer, FunctionData func, string indent, bool tmpReturnValue) - { - if (func.ReturnType != null) { - if (func.ReturnType.RequireMarshal) { - // Marshal return value back - writer.WriteLine ("{0}{1} rvm;", indent, func.ReturnType.NativeWrapperType); - MarshalToManaged (writer, func.ReturnType, "rv", "rvm"); - writer.WriteLine ("{0}return rvm;", indent); - } else if (tmpReturnValue) { - writer.WriteLine ("{0}return rv;", indent); - } - } - } - static void Write_objc_msgSend (StringWriter writer, FunctionData func) { - var tmpReturnValue = func.ReturnType != null && (func.ReturnType.RequireMarshal == true || func.Parameters?.Any ((v) => v.IsRef && v.TypeData.RequireMarshal) == true); - // func name var overload = "objc_msgSend"; var funcName = GetFuncName (func, overload); // typedef writer.Write ("typedef {0} (*func_{1}) (id self, SEL sel", func.ReturnType == null ? "void" : func.ReturnType.NativeType, funcName.ToString ()); - WriteParametersNativeDeclaration (writer, func.Parameters, true); + if (func.Parameters != null) { + for (int i = 0; i < func.Parameters.Length; i++) { + writer.Write (", {0} f{1}", func.Parameters [i].TypeData.NativeType, i); + } + } writer.WriteLine (");"); // declaration writer.WriteLine (func.ReturnType != null ? func.ReturnType.NativeWrapperType : "void"); writer.Write (funcName); writer.Write (" (id self, SEL sel"); - WriteParametersNativeDeclaration (writer, func.Parameters, false); + if (func.Parameters != null) { + for (int i = 0; i < func.Parameters.Length; i++) { + writer.Write (", {0} p{1}", func.Parameters [i].TypeData.NativeWrapperType, i); + } + } writer.WriteLine (")"); // body writer.WriteLine ("{"); - if (tmpReturnValue) { + if (func.ReturnType != null && func.ReturnType.RequireMarshal) { writer.WriteLine ("\t{0} rv;", func.ReturnType.NativeType); } @@ -2738,7 +2178,7 @@ static void Write_objc_msgSend (StringWriter writer, FunctionData func) // invoke writer.Write (indent); if (func.ReturnType != null) { - if (tmpReturnValue) { + if (func.ReturnType.RequireMarshal) { writer.Write ("rv = "); } else { writer.Write ("return "); @@ -2748,8 +2188,14 @@ static void Write_objc_msgSend (StringWriter writer, FunctionData func) WriteParametersInvoke (writer, func.Parameters); writer.WriteLine (");"); - WriteMarshalParametersToManaged (writer, func); - WriteMarshalReturnValue (writer, func, indent, tmpReturnValue); + if (func.ReturnType != null) { + if (func.ReturnType.RequireMarshal) { + // Marshal return value back + writer.WriteLine ("{0}{1} rvm;", indent, func.ReturnType.NativeWrapperType); + MarshalToManaged (writer, func.ReturnType, "rv", "rvm"); + writer.WriteLine ("{0}return rvm;", indent); + } + } // @catch if (func.MarshalExceptions) @@ -2761,27 +2207,33 @@ static void Write_objc_msgSend (StringWriter writer, FunctionData func) static void Write_objc_msgSendSuper (StringWriter writer, FunctionData func) { - var tmpReturnValue = func.ReturnType != null && (func.ReturnType.RequireMarshal == true || func.Parameters?.Any ((v) => v.IsRef && v.TypeData.RequireMarshal) == true); - // func name var overload = "objc_msgSendSuper"; var funcName = GetFuncName (func, overload); // typedef writer.Write ("typedef {0} (*func_{1}) (struct objc_super *super, SEL sel", func.ReturnType == null ? "void" : func.ReturnType.NativeType, funcName.ToString ()); - WriteParametersNativeDeclaration (writer, func.Parameters, true); + if (func.Parameters != null) { + for (int i = 0; i < func.Parameters.Length; i++) { + writer.Write (", {0} f{1}", func.Parameters [i].TypeData.NativeType, i); + } + } writer.WriteLine (");"); // declaration writer.WriteLine (func.ReturnType != null ? func.ReturnType.NativeWrapperType : "void"); writer.Write (funcName); writer.Write (" (struct objc_super *super, SEL sel"); - WriteParametersNativeDeclaration (writer, func.Parameters, false); + if (func.Parameters != null) { + for (int i = 0; i < func.Parameters.Length; i++) { + writer.Write (", {0} p{1}", func.Parameters [i].TypeData.NativeWrapperType, i); + } + } writer.WriteLine (")"); // body writer.WriteLine ("{"); - if (tmpReturnValue) { + if (func.ReturnType != null && func.ReturnType.RequireMarshal) { writer.WriteLine ("\t{0} rv;", func.ReturnType.NativeType); } @@ -2801,7 +2253,7 @@ static void Write_objc_msgSendSuper (StringWriter writer, FunctionData func) // invoke writer.Write (indent); if (func.ReturnType != null) { - if (tmpReturnValue) { + if (func.ReturnType.RequireMarshal) { writer.Write ("rv = "); } else { writer.Write ("return "); @@ -2811,8 +2263,14 @@ static void Write_objc_msgSendSuper (StringWriter writer, FunctionData func) WriteParametersInvoke (writer, func.Parameters); writer.WriteLine (");"); - WriteMarshalParametersToManaged (writer, func); - WriteMarshalReturnValue (writer, func, indent, tmpReturnValue); + if (func.ReturnType != null) { + if (func.ReturnType.RequireMarshal) { + // Marshal return value back + writer.WriteLine ("{0}{1} rvm;", indent, func.ReturnType.NativeWrapperType); + MarshalToManaged (writer, func.ReturnType, "rv", "rvm"); + writer.WriteLine ("{0}return rvm;", indent); + } + } // @catch if (func.MarshalExceptions) @@ -2833,14 +2291,22 @@ static void Write_objc_msgSend_stret (StringWriter writer, FunctionData func) // typedef writer.Write ("typedef {0} (*func_{1}) (id self, SEL sel", func.ReturnType.NativeType, funcName.ToString ()); - WriteParametersNativeDeclaration (writer, func.Parameters, true); + if (func.Parameters != null) { + for (int i = 0; i < func.Parameters.Length; i++) { + writer.Write (", {0} f{1}", func.Parameters [i].TypeData.NativeType, i); + } + } writer.WriteLine (");"); // declaration writer.WriteLine ("void"); writer.Write (funcName); writer.Write (" ({0} *stret_rv, id self, SEL sel", func.ReturnType.NativeWrapperType); - WriteParametersNativeDeclaration (writer, func.Parameters, false); + if (func.Parameters != null) { + for (int i = 0; i < func.Parameters.Length; i++) { + writer.Write (", {0} p{1}", func.Parameters [i].TypeData.NativeWrapperType, i); + } + } writer.WriteLine (")"); // body @@ -2872,7 +2338,6 @@ static void Write_objc_msgSend_stret (StringWriter writer, FunctionData func) WriteParametersInvoke (writer, func.Parameters); writer.WriteLine (");"); - WriteMarshalParametersToManaged (writer, func); if (func.ReturnType.RequireMarshal) { // Marshal return value back MarshalToManaged (writer, func.ReturnType, "rv", "(*stret_rv)"); @@ -2897,14 +2362,22 @@ static void Write_objc_msgSendSuper_stret (StringWriter writer, FunctionData fun // typedef writer.Write ("typedef {0} (*func_{1}) (struct objc_super *super, SEL sel", func.ReturnType.NativeType, funcName.ToString ()); - WriteParametersNativeDeclaration (writer, func.Parameters, true); + if (func.Parameters != null) { + for (int i = 0; i < func.Parameters.Length; i++) { + writer.Write (", {0} f{1}", func.Parameters [i].TypeData.NativeType, i); + } + } writer.WriteLine (");"); // declaration writer.WriteLine ("void"); writer.Write (funcName); writer.Write (" ({0} *stret_rv, struct objc_super *super, SEL sel", func.ReturnType.NativeWrapperType); - WriteParametersNativeDeclaration (writer, func.Parameters, false); + if (func.Parameters != null) { + for (int i = 0; i < func.Parameters.Length; i++) { + writer.Write (", {0} p{1}", func.Parameters [i].TypeData.NativeWrapperType, i); + } + } writer.WriteLine (")"); // body @@ -2936,7 +2409,6 @@ static void Write_objc_msgSendSuper_stret (StringWriter writer, FunctionData fun WriteParametersInvoke (writer, func.Parameters); writer.WriteLine (");"); - WriteMarshalParametersToManaged (writer, func); if (func.ReturnType.RequireMarshal) { // Marshal return value back MarshalToManaged (writer, func.ReturnType, "rv", "(*stret_rv)"); @@ -2964,12 +2436,6 @@ public static class Types { NativeWrapperType = "struct Vector3f", RequireMarshal = true, }; - public static TypeData NVector3 = new TypeData { - ManagedType = "NVector3", - NativeType = "vector_float3", - NativeWrapperType = "struct Vector4f", // Yes, Vector4f, since NVector3 has 4 floats. - RequireMarshal = true, - }; public static TypeData Vector4 = new TypeData { ManagedType = "Vector4", NativeType = "vector_float4", @@ -3013,12 +2479,6 @@ public static class Types { NativeWrapperType = "struct Vector3d", RequireMarshal = true, }; - public static TypeData VectorDouble3 = new TypeData { - ManagedType = "VectorDouble3", - NativeType = "vector_double3", - NativeWrapperType = "struct Vector3d", - RequireMarshal = true, - }; public static TypeData Vector4d = new TypeData { ManagedType = "Vector4d", NativeType = "vector_double4", @@ -3034,15 +2494,6 @@ public static class Types { IsX86Stret = true, IsX64Stret = false, }; - public static TypeData NMatrix2 = new TypeData { - ManagedType = "NMatrix2", - NativeType = "matrix_float2x2", - NativeWrapperType = "struct NMatrix2", - RequireMarshal = true, - IsARMStret = true, - IsX86Stret = true, - IsX64Stret = false, - }; public static TypeData Matrix3f = new TypeData { ManagedType = "Matrix3", NativeType = "matrix_float3x3", @@ -3052,15 +2503,6 @@ public static class Types { IsX86Stret = true, IsX64Stret = true, }; - public static TypeData NMatrix3 = new TypeData { - ManagedType = "NMatrix3", - NativeType = "matrix_float3x3", - NativeWrapperType = "struct NMatrix3", - RequireMarshal = true, - IsARMStret = true, - IsX86Stret = true, - IsX64Stret = true, - }; public static TypeData Matrix4f = new TypeData { ManagedType = "Matrix4", NativeType = "matrix_float4x4", @@ -3070,35 +2512,6 @@ public static class Types { IsX86Stret = true, IsX64Stret = true, }; - public static TypeData NMatrix4 = new TypeData { - ManagedType = "NMatrix4", - NativeType = "matrix_float4x4", - NativeWrapperType = "struct NMatrix4", - RequireMarshal = true, - IsARMStret = true, - IsX86Stret = true, - IsX64Stret = true, - }; - - public static TypeData NMatrix4d = new TypeData { - ManagedType = "NMatrix4d", - NativeType = "matrix_double4x4", - NativeWrapperType = "struct NMatrix4d", - RequireMarshal = true, - IsARMStret = true, - IsX86Stret = true, - IsX64Stret = true, - }; - - public static TypeData NMatrix4x3 = new TypeData { - ManagedType = "NMatrix4x3", - NativeType = "matrix_float4x3", - NativeWrapperType = "struct NMatrix4x3", - RequireMarshal = true, - IsARMStret = true, - IsX86Stret = true, - IsX64Stret = true, - }; public static TypeData Double = new TypeData { ManagedType = "Double", NativeType = "double", @@ -3205,47 +2618,6 @@ public static class Types { IsX86Stret = true, IsX64Stret = true, }; - - public static TypeData CGSize = new TypeData { - ManagedType = "CGSize", - NativeType = "CGSize", - NativeWrapperType = "CGSize", - RequireMarshal = false, - }; - - public static TypeData CGPoint = new TypeData { - ManagedType = "CGPoint", - NativeType = "CGPoint", - NativeWrapperType = "CGPoint", - RequireMarshal = false, - }; - - public static TypeData QuatF = new TypeData { - ManagedType = "Quaternion", - NativeType = "simd_quatf", - NativeWrapperType = "struct QuatF", - RequireMarshal = true, - }; - - public static TypeData MPSImageHistogramInfo = new TypeData { - ManagedType = "MPSImageHistogramInfo", - NativeType = "MPSImageHistogramInfo", - NativeWrapperType = "struct MPSImageHistogramInfoWrapper", - RequireMarshal = true, - IsARMStret = true, - IsX86Stret = true, - IsX64Stret = true, - }; - - public static TypeData MDLVoxelIndexExtent2 = new TypeData { - ManagedType = "MDLVoxelIndexExtent2", - NativeType = "MDLVoxelIndexExtent", - NativeWrapperType = "struct MDLVoxelIndexExtentWrapper", - RequireMarshal = true, - IsARMStret = true, - IsX86Stret = true, - IsX64Stret = true, - }; } } diff --git a/runtime/bindings-generator.csproj b/runtime/bindings-generator.csproj index 2400ef66e07..700f3a30966 100644 --- a/runtime/bindings-generator.csproj +++ b/runtime/bindings-generator.csproj @@ -6,7 +6,7 @@ {6B616492-49F0-43EF-8390-F9D1B4CCC632} Exe zzg - bindings-generator + zzg v4.5 8.0.30703 2.0 @@ -21,6 +21,7 @@ 4 x86 false + /work/maccore/xcode7/maccore/bindings-generated.m full @@ -31,10 +32,6 @@ true x86 - - Project - ${ProjectDir}/bindings-generated.m - diff --git a/runtime/bindings.h b/runtime/bindings.h index e98d8d3e054..fd91e261a07 100644 --- a/runtime/bindings.h +++ b/runtime/bindings.h @@ -2,7 +2,6 @@ #define __BINDINGS_H__ #import -#import #include #include #include @@ -83,11 +82,6 @@ typedef __attribute__((__ext_vector_type__(4))) float vector_float4; typedef struct { vector_float2 columns[2]; } matrix_float2x2; typedef struct { vector_float3 columns[3]; } matrix_float3x3; typedef struct { vector_float4 columns[4]; } matrix_float4x4; -typedef struct { vector_float3 columns[4]; } matrix_float4x3; - -typedef struct { vector_double4 columns[4]; } matrix_double4x4; - -typedef struct { vector_float4 vector; } simd_quatf; typedef struct { vector_float3 maxBounds; @@ -108,20 +102,6 @@ typedef struct { vector_float3 points[3]; } GKTriangle; -typedef struct -{ - NSUInteger numberOfHistogramEntries; - BOOL histogramForAlpha; - vector_float4 minPixelValue; - vector_float4 maxPixelValue; -} MPSImageHistogramInfo; - -typedef vector_int4 MDLVoxelIndex; -typedef struct { - MDLVoxelIndex minimumExtent; - MDLVoxelIndex maximumExtent; -} MDLVoxelIndexExtent; - /* * iOS has a vector type (vector_float3) which can't be expressed * in P/Invoke signatures, so we need custom wrappers. @@ -161,39 +141,14 @@ struct Matrix2f { Vector2f columns [2]; }; -struct NMatrix2 { - Vector2f columns [2]; -}; - struct Matrix3f { Vector3f columns [3]; }; -struct NMatrix3 { - Vector4f columns [3]; -}; - struct Matrix4f { Vector4f columns [4]; }; -struct NMatrix4 { - Vector4f columns [4]; -}; - -struct NMatrix4d { - Vector4d columns [4]; -}; - -struct NMatrix4x3 { - // Use Vector4f here, since the managed version has padding to match accordingly. - Vector4f columns [4]; -}; - -struct QuatF { - Vector4f vector; -}; - struct MDLAxisAlignedBoundingBoxWrapper { Vector3f maxBounds; Vector3f minBounds; @@ -213,32 +168,6 @@ struct GKTriangleWrapper { Vector3f points [3]; }; -struct MPSImageHistogramInfoWrapper { - NSUInteger numberOfHistogramEntries; - BOOL histogramForAlpha; - // The minPixelValue field starts at offset 16, but we can't use - // __attribute__ ((aligned (16))), because that will make clang align the - // entire struct on a 16-byte boundary, which doesn't match how we've - // defined it in managed code (explicit layout, but no specific alignment). - // So we need to manually pad the struct to match the managed definition. -#if defined (__x86_64__) || defined (__arm64__) - uint8_t dummy[7]; -#else - uint8_t dummy[11]; -#endif - Vector4f minPixelValue; - Vector4f maxPixelValue; -}; - -typedef Vector4i MDLVoxelIndexWrapper; - -struct MDLVoxelIndexExtentWrapper { - MDLVoxelIndexWrapper minimumExtent; - MDLVoxelIndexWrapper maximumExtent; -}; - -static_assert (sizeof (MPSImageHistogramInfoWrapper) == sizeof (MPSImageHistogramInfo), "Sizes aren't equal"); - struct Vector4f xamarin_vector_float3__Vector4_objc_msgSend (id self, SEL sel); void xamarin_vector_float3__Vector4_objc_msgSend_stret (struct Vector4f *v4, id self, SEL sel); void xamarin_vector_float3__void_objc_msgSend_Vector4 (id self, SEL sel, struct Vector4f p0); @@ -256,8 +185,6 @@ void xamarin_vector_float3__Vector3_objc_msgSendSuper_stret (struct void xamarin_vector_float3__void_objc_msgSendSuper_Vector3 (struct objc_super *super, SEL sel, struct Vector3f p0); void xamarin_vector_float3__Vector3_objc_msgSendSuper_stret_Vector3 (struct Vector3f *v3, struct objc_super *super, SEL sel, struct Vector3f p0); struct Vector3f xamarin_vector_float3__Vector3_objc_msgSendSuper_Vector3 (struct objc_super *super, SEL sel, struct Vector3f p0); -CGPoint xamarin_CGPoint__VNNormalizedFaceBoundingBoxPointForLandmarkPoint_Vector2_CGRect_nuint_nuint_string (struct Vector2f faceLandmarkPoint, CGRect faceBoundingBox, xm_nuint_t imageWidth, xm_nuint_t imageHeight, const char **error_msg); -CGPoint xamarin_CGPoint__VNImagePointForFaceLandmarkPoint_Vector2_CGRect_nuint_nuint_string (struct Vector2f faceLandmarkPoint, CGRect faceBoundingBox, xm_nuint_t imageWidth, xm_nuint_t imageHeight, const char **error_msg); #ifndef XAMCORE_2_0 #ifdef MONOMAC diff --git a/runtime/bindings.m b/runtime/bindings.m index 0ffdf803e45..3be38bf87c2 100644 --- a/runtime/bindings.m +++ b/runtime/bindings.m @@ -11,7 +11,6 @@ */ #include "bindings.h" -#include /* * Hand-written bindings to support ObjectiveC exceptions. @@ -89,67 +88,3 @@ #endif #endif -/* - * Vector c bindings - * - * The following code uses dlsym to not have a linking dependency on Xcode 9, - * the code can be simplified once we require to remove dlsym or xcode 9 becomes the minimum supported version - */ - -typedef CGPoint (*vision_func) (vector_float2 faceLandmarkPoint, CGRect faceBoundingBox, size_t imageWidth, size_t imageHeight); - -CGPoint -xamarin_CGPoint__VNNormalizedFaceBoundingBoxPointForLandmarkPoint_Vector2_CGRect_nuint_nuint_string (struct Vector2f faceLandmarkPoint, CGRect faceBoundingBox, xm_nuint_t imageWidth, xm_nuint_t imageHeight, const char **error_msg) { - - static vision_func func = NULL; - *error_msg = NULL; - - if (func == NULL) { - void *vision_handle = dlopen ("/System/Library/Frameworks/Vision.framework/Vision", RTLD_LAZY); - if (vision_handle == NULL) { - *error_msg = "Could not open Vision Framework"; - return CGPointMake (0, 0); - } - - func = (vision_func) dlsym (vision_handle, "VNNormalizedFaceBoundingBoxPointForLandmarkPoint"); - - if (func == NULL) { - *error_msg = "Could not obtain the address for VNNormalizedFaceBoundingBoxPointForLandmarkPoint"; - return CGPointMake (0, 0); - } - } - - vector_float2 flp; - flp [0] = faceLandmarkPoint.a; - flp [1] = faceLandmarkPoint.b; - - return func (flp, faceBoundingBox, imageWidth, imageHeight); -} - -CGPoint -xamarin_CGPoint__VNImagePointForFaceLandmarkPoint_Vector2_CGRect_nuint_nuint_string (struct Vector2f faceLandmarkPoint, CGRect faceBoundingBox, xm_nuint_t imageWidth, xm_nuint_t imageHeight, const char **error_msg) { - - static vision_func func = NULL; - *error_msg = NULL; - - if (func == NULL) { - void *vision_handle = dlopen ("/System/Library/Frameworks/Vision.framework/Vision", RTLD_LAZY); - if (vision_handle == NULL) { - *error_msg = "Could not open Vision Framework"; - return CGPointMake (0, 0); - } - - func = (vision_func) dlsym (vision_handle, "VNImagePointForFaceLandmarkPoint"); - - if (func == NULL) { - *error_msg = "Could not obtain the address for VNImagePointForFaceLandmarkPoint"; - return CGPointMake (0, 0); - } - } - - vector_float2 flp; - flp [0] = faceLandmarkPoint.a; - flp [1] = faceLandmarkPoint.b; - - return func (flp, faceBoundingBox, imageWidth, imageHeight); -} diff --git a/runtime/delegates.t4 b/runtime/delegates.t4 index f56fb311417..8f311a3d0b4 100644 --- a/runtime/delegates.t4 +++ b/runtime/delegates.t4 @@ -71,8 +71,7 @@ new XDelegate ("MethodDescription", "UnmanagedMethodDescription", "xamarin_get_method_for_selector", "Class", "IntPtr", "cls", - "SEL", "IntPtr", "sel", - "bool", "bool", "is_static" + "SEL", "IntPtr", "sel" ) { WrappedManagedFunction = "GetMethodForSelector" }, new XDelegate ("MonoObject *", "IntPtr", "xamarin_get_nsobject", @@ -141,7 +140,6 @@ new XDelegate ("MethodDescription", "UnmanagedMethodDescription", "xamarin_get_method_and_object_for_selector", "Class", "IntPtr", "cls", "SEL", "IntPtr", "sel", - "bool", "bool", "is_static", "id", "IntPtr", "obj", "MonoObject **", "ref IntPtr", "mthis" ) { WrappedManagedFunction = "GetMethodAndObjectForSelector" }, diff --git a/runtime/runtime.m b/runtime/runtime.m index f820eb6df0b..8b25e4c9913 100644 --- a/runtime/runtime.m +++ b/runtime/runtime.m @@ -1119,7 +1119,7 @@ -(void) xamarinSetGCHandle: (int) gc_handle; Dl_info info; if (dladdr ((void *) xamarin_initialize_embedded, &info) != 0) { - const char *last_sep = strrchr (info.dli_fname, '/'); + char *last_sep = strrchr (info.dli_fname, '/'); if (last_sep == NULL) { libname = strdup (info.dli_fname); } else { diff --git a/runtime/trampolines-invoke.m b/runtime/trampolines-invoke.m index 28aa4db00fd..5c52a83ccc2 100644 --- a/runtime/trampolines-invoke.m +++ b/runtime/trampolines-invoke.m @@ -88,9 +88,9 @@ int mofs = 0; if (is_ctor || is_static) { - desc = xamarin_get_method_for_selector ([self class], sel, is_static, &exception_gchandle); + desc = xamarin_get_method_for_selector ([self class], sel, &exception_gchandle); } else { - desc = xamarin_get_method_and_object_for_selector ([self class], sel, is_static, self, &mthis, &exception_gchandle); + desc = xamarin_get_method_and_object_for_selector ([self class], sel, self, &mthis, &exception_gchandle); } if (exception_gchandle != 0) goto exception_handling; diff --git a/runtime/xamarin/runtime.h b/runtime/xamarin/runtime.h index 32affb4bee2..e79af184a47 100644 --- a/runtime/xamarin/runtime.h +++ b/runtime/xamarin/runtime.h @@ -225,7 +225,7 @@ MonoObject* xamarin_get_class (Class ptr, guint32 *exception_gchandle) MonoObject* xamarin_get_selector (SEL ptr, guint32 *exception_gchandle); Class xamarin_get_class_handle (MonoObject *obj, guint32 *exception_gchandle); SEL xamarin_get_selector_handle (MonoObject *obj, guint32 *exception_gchandle); -MethodDescription xamarin_get_method_for_selector (Class cls, SEL sel, bool is_static, guint32 *exception_gchandle); +MethodDescription xamarin_get_method_for_selector (Class cls, SEL sel, guint32 *exception_gchandle); bool xamarin_has_nsobject (id obj, guint32 *exception_gchandle); MonoObject* xamarin_get_nsobject (id obj, guint32 *exception_gchandle); id xamarin_get_handle_for_inativeobject (MonoObject *obj, guint32 *exception_gchandle); @@ -239,7 +239,7 @@ MonoObject* xamarin_get_nsobject_with_type (id obj, void *type, int32_t * void xamarin_dispose (MonoObject *mobj, guint32 *exception_gchandle); bool xamarin_is_parameter_transient (MonoReflectionMethod *method, int parameter /* 0-based */, guint32 *exception_gchandle); bool xamarin_is_parameter_out (MonoReflectionMethod *method, int parameter /* 0-based */, guint32 *exception_gchandle); -MethodDescription xamarin_get_method_and_object_for_selector (Class cls, SEL sel, bool is_static, id self, MonoObject **mthis, guint32 *exception_gchandle); +MethodDescription xamarin_get_method_and_object_for_selector (Class cls, SEL sel, id self, MonoObject **mthis, guint32 *exception_gchandle); guint32 xamarin_create_product_exception_for_error (int code, const char *message, guint32 *exception_gchandle); #ifdef __cplusplus diff --git a/src/.gitignore b/src/.gitignore index c59267add1f..670a8c1c0e2 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -11,5 +11,3 @@ xammac.csproj xamtvos.csproj xamwatch.csproj generator-ikvm.csproj -~.pmcs-* -*~ diff --git a/src/ARKit/ARPointCloud.cs b/src/ARKit/ARPointCloud.cs deleted file mode 100644 index 3684d1d92f4..00000000000 --- a/src/ARKit/ARPointCloud.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// ARPointCloud.cs: Nicer code for ARPointCloud -// -// Authors: -// Vincent Dondain -// -// Copyright 2017 Microsoft Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using System.Runtime.InteropServices; -using Vector3 = global::OpenTK.NVector3; - -namespace XamCore.ARKit { - public partial class ARPointCloud { - - public unsafe Vector3 [] Points { - get { - var count = (int)Count; - var rv = new Vector3 [count]; - var ptr = (Vector3 *) GetRawPoints (); - for (int i = 0; i < count; i++) - rv [i] = *ptr++; - return rv; - } - } - - public unsafe ulong [] Identifiers { - get { - var count = (int)Count; - var rv = new ulong [count]; - var ptr = (ulong*)GetRawIdentifiers (); - for (int i = 0; i < count; i++) - rv [i] = *ptr++; - return rv; - } - } - } -} - -#endif \ No newline at end of file diff --git a/src/AVFoundation/AVAssetDownloadUrlSession.cs b/src/AVFoundation/AVAssetDownloadUrlSession.cs index 1462c3f8305..0d9ba9cddf8 100644 --- a/src/AVFoundation/AVAssetDownloadUrlSession.cs +++ b/src/AVFoundation/AVAssetDownloadUrlSession.cs @@ -27,7 +27,7 @@ public partial class AVAssetDownloadUrlSession : NSUrlSession { } #if !XAMCORE_4_0 - [Obsolete ("Use the overload with a 'INSUrlSessionDelegate' parameter.")] + [Obsolete ("Use the overload with a `INSUrlSessionDelegate` parameter.")] public new static NSUrlSession FromConfiguration (NSUrlSessionConfiguration configuration, NSUrlSessionDelegate sessionDelegate, NSOperationQueue delegateQueue) { throw new NotSupportedException ("NS_UNAVAILABLE"); diff --git a/src/AVFoundation/AVCompat.cs b/src/AVFoundation/AVCompat.cs index 74031ae3983..1996dfad95d 100644 --- a/src/AVFoundation/AVCompat.cs +++ b/src/AVFoundation/AVCompat.cs @@ -14,7 +14,7 @@ namespace XamCore.AVFoundation { #if !XAMCORE_2_0 partial class AVAssetResourceLoadingDataRequest { - [Obsolete ("Type is not meant to be created by user code.")] + [Obsolete ("Type is not meant to be created by user code")] public AVAssetResourceLoadingDataRequest () { } @@ -24,7 +24,7 @@ public AVAssetResourceLoadingDataRequest () #if !XAMCORE_3_0 partial class AVAsset { - [Obsolete ("Use 'GetChapterMetadataGroups'.")] + [Obsolete ("Use GetChapterMetadataGroups")] public virtual AVMetadataItem[] ChapterMetadataGroups (NSLocale forLocale, AVMetadataItem[] commonKeys) { return null; @@ -33,7 +33,7 @@ public virtual AVMetadataItem[] ChapterMetadataGroups (NSLocale forLocale, AVMet partial class AVAssetTrack { - [Obsolete ("Use 'GetAssociatedTracks'.")] + [Obsolete ("Use GetAssociatedTracks")] public virtual NSString GetAssociatedTracksOfType (NSString avAssetTrackTrackAssociationType) { return null; @@ -42,7 +42,7 @@ public virtual NSString GetAssociatedTracksOfType (NSString avAssetTrackTrackAss partial class AVMutableCompositionTrack { - [Obsolete ("Use 'InsertTimeRanges' overload accepting an 'NSValue' array.")] + [Obsolete ("Use InsertTimeRanges overload accepting an NSValue array")] public virtual bool InsertTimeRanges (NSValue cmTimeRanges, AVAssetTrack[] tracks, CMTime startTime, out NSError error) { return InsertTimeRanges (new NSValue [] { cmTimeRanges }, tracks, startTime, out error); @@ -52,7 +52,7 @@ public virtual bool InsertTimeRanges (NSValue cmTimeRanges, AVAssetTrack[] track partial class AVCaptureAudioDataOutputSampleBufferDelegate { - [Obsolete ("This member only exists for 'AVCaptureVideoDataOutputSampleBufferDelegate'.")] + [Obsolete ("This member only exists for AVCaptureVideoDataOutputSampleBufferDelegate")] public virtual void DidDropSampleBuffer (AVCaptureOutput captureOutput, CMSampleBuffer sampleBuffer, AVCaptureConnection connection) { } @@ -60,7 +60,7 @@ public virtual void DidDropSampleBuffer (AVCaptureOutput captureOutput, CMSample static partial class AVCaptureAudioDataOutputSampleBufferDelegate_Extensions { - [Obsolete ("This member only exists for 'AVCaptureVideoDataOutputSampleBufferDelegate'.")] + [Obsolete ("This member only exists for AVCaptureVideoDataOutputSampleBufferDelegate")] public static void DidDropSampleBuffer (IAVCaptureAudioDataOutputSampleBufferDelegate This, AVCaptureOutput captureOutput, CMSampleBuffer sampleBuffer, AVCaptureConnection connection) { } @@ -68,17 +68,9 @@ public static void DidDropSampleBuffer (IAVCaptureAudioDataOutputSampleBufferDel #endif #if !XAMCORE_4_0 - partial class AVCaptureInputPort { - - [Obsolete ("Valid instance of this type cannot be directly created.")] - public AVCaptureInputPort () - { - } - } - partial class AVAudioChannelLayout { - [Obsolete ("Valid instance of this type cannot be directly created.")] + [Obsolete ("Valid instance of this type cannot be directly created")] public AVAudioChannelLayout () { } @@ -86,7 +78,7 @@ public AVAudioChannelLayout () partial class AVAudioConnectionPoint { - [Obsolete ("Valid instance of this type cannot be directly created.")] + [Obsolete ("Valid instance of this type cannot be directly created")] public AVAudioConnectionPoint () { } @@ -94,8 +86,8 @@ public AVAudioConnectionPoint () #if TVOS // tvOS removed some types - we need to keep stubs of them for binary compatibility - [Obsolete ("Removed in tvOS 10.")] - [Deprecated (PlatformName.TvOS, 10, 0, PlatformArchitecture.None)] + [Obsolete ("Removed in tvOS 10")] + [Deprecated (PlatformName.TvOS, 10, 0, PlatformArchitecture.None, "Removed in tvOS 10")] public class AVAssetDownloadDelegate : NSObject, IAVAssetDownloadDelegate { public AVAssetDownloadDelegate () { @@ -160,13 +152,13 @@ public virtual void WillPerformHttpRedirection (NSUrlSession session, NSUrlSessi } } - [Obsolete ("Removed in tvOS 10.")] - [Deprecated (PlatformName.TvOS, 10, 0, PlatformArchitecture.None)] + [Obsolete ("Removed in tvOS 10")] + [Deprecated (PlatformName.TvOS, 10, 0, PlatformArchitecture.None, "Removed in tvOS 10")] public interface IAVAssetDownloadDelegate : INativeObject, IDisposable, INSUrlSessionTaskDelegate, INSUrlSessionDelegate { } - [Obsolete ("Removed in tvOS 10.")] - [Deprecated (PlatformName.TvOS, 10, 0, PlatformArchitecture.None)] + [Obsolete ("Removed in tvOS 10")] + [Deprecated (PlatformName.TvOS, 10, 0, PlatformArchitecture.None, "Removed in tvOS 10")] public static class AVAssetDownloadDelegate_Extensions { public static void DidFinishDownloadingToUrl (this IAVAssetDownloadDelegate This, NSUrlSession session, AVAssetDownloadTask assetDownloadTask, NSUrl location) @@ -185,8 +177,8 @@ public static void DidResolveMediaSelection (this IAVAssetDownloadDelegate This, } } - [Obsolete ("Removed in tvOS 10.")] - [Deprecated (PlatformName.TvOS, 10, 0, PlatformArchitecture.None)] + [Obsolete ("Removed in tvOS 10")] + [Deprecated (PlatformName.TvOS, 10, 0, PlatformArchitecture.None, "Removed in tvOS 10")] public class AVAssetDownloadTask : NSUrlSessionTask { public override IntPtr ClassHandle { @@ -250,8 +242,8 @@ protected internal AVAssetDownloadTask (IntPtr handle) } } - [Obsolete ("Removed in tvOS 10.")] - [Deprecated (PlatformName.TvOS, 10, 0, PlatformArchitecture.None)] + [Obsolete ("Removed in tvOS 10")] + [Deprecated (PlatformName.TvOS, 10, 0, PlatformArchitecture.None, "Removed in tvOS 10")] public class AVAssetDownloadUrlSession : NSUrlSession { public new static NSUrlSession SharedSession { @@ -288,7 +280,7 @@ public static AVAssetDownloadUrlSession CreateSession (NSUrlSessionConfiguration throw new NotImplementedException (); } - [Obsolete ("Use the overload with a 'INSUrlSessionDelegate' parameter.")] + [Obsolete ("Use the overload with a `INSUrlSessionDelegate` parameter.")] public new static NSUrlSession FromConfiguration (NSUrlSessionConfiguration configuration, NSUrlSessionDelegate sessionDelegate, NSOperationQueue delegateQueue) { throw new NotImplementedException (); @@ -395,6 +387,104 @@ public AVAssetDownloadTask GetAssetDownloadTask (AVUrlAsset urlAsset, string tit } } + [Obsolete ("Removed in tvOS 10")] + [Deprecated (PlatformName.TvOS, 10, 0, PlatformArchitecture.None, "Removed in tvOS 10")] + public class AVAudioInputNode : AVAudioIONode, IAVAudio3DMixing, IAVAudioMixing, IAVAudioStereoMixing { + + public override IntPtr ClassHandle { + get { + throw new NotImplementedException (); + } + } + + public virtual float Obstruction { + get { + throw new NotImplementedException (); + } + set { + throw new NotImplementedException (); + } + } + + public virtual float Occlusion { + get { + throw new NotImplementedException (); + } + set { + throw new NotImplementedException (); + } + } + + public virtual float Pan { + get { + throw new NotImplementedException (); + } + set { + throw new NotImplementedException (); + } + } + + public virtual Vector3 Position { + get { + throw new NotImplementedException (); + } + set { + throw new NotImplementedException (); + } + } + + public virtual float Rate { + get { + throw new NotImplementedException (); + } + set { + throw new NotImplementedException (); + } + } + + public virtual AVAudio3DMixingRenderingAlgorithm RenderingAlgorithm { + get { + throw new NotImplementedException (); + } + set { + throw new NotImplementedException (); + } + } + + public virtual float ReverbBlend { + get { + throw new NotImplementedException (); + } + set { + throw new NotImplementedException (); + } + } + + public virtual float Volume { + get { + throw new NotImplementedException (); + } + set { + throw new NotImplementedException (); + } + } + + [EditorBrowsable (EditorBrowsableState.Advanced)] + protected AVAudioInputNode (NSObjectFlag t) : base (t) + { + throw new NotImplementedException (); + } + + [EditorBrowsable (EditorBrowsableState.Advanced)] + protected internal AVAudioInputNode (IntPtr handle) : base (handle) + { + } + + public virtual AVAudioMixingDestination DestinationForMixer (AVAudioNode mixer, nuint bus) + { + throw new NotImplementedException (); + } + } #endif // TVOS #endif // !XAMCORE_4_0 } diff --git a/src/AVFoundation/AVDepthData.cs b/src/AVFoundation/AVDepthData.cs deleted file mode 100644 index 3bc17e77707..00000000000 --- a/src/AVFoundation/AVDepthData.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// AVDepthData.cs -// -// Authors: -// Alex Soto (alexsoto@microsoft.com) -// -// Copyright 2017 Xamarin Inc. -// - -#if !WATCH -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; -using XamCore.CoreVideo; -using XamCore.ImageIO; - -namespace XamCore.AVFoundation { - public partial class AVDepthData { - - public static AVDepthData Create (CGImageAuxiliaryDataInfo dataInfo, out NSError error) - { - return Create (dataInfo.Dictionary, out error); - } - - public CVPixelFormatType [] AvailableDepthDataTypes { - get { - var values = WeakAvailableDepthDataTypes; - if (values == null) - return null; - - var count = values.Length; - var arr = new CVPixelFormatType [count]; - for (int i = 0; i < count; i++) - arr [i] = (CVPixelFormatType) values [i].UInt32Value; // CVPixelFormatType is uint. - - return arr; - } - } - } -} -#endif \ No newline at end of file diff --git a/src/AVFoundation/AVOutputSettingsAssistant.cs b/src/AVFoundation/AVOutputSettingsAssistant.cs index dd25aeb5825..be7d66f90f4 100644 --- a/src/AVFoundation/AVOutputSettingsAssistant.cs +++ b/src/AVFoundation/AVOutputSettingsAssistant.cs @@ -43,19 +43,6 @@ public AVOutputSettingsAssistant Preset3840x2160 { return FromPreset (_Preset3840x2160); } } - - public AVOutputSettingsAssistant PresetHevc1920x1080 { - get { - return FromPreset (_PresetHevc1920x1080); - } - } - - public AVOutputSettingsAssistant PresetHevc3840x2160 { - get { - return FromPreset (_PresetHevc3840x2160); - } - } - } } diff --git a/src/AVFoundation/AVPlayerLooper.cs b/src/AVFoundation/AVPlayerLooper.cs deleted file mode 100644 index 2be117f53c3..00000000000 --- a/src/AVFoundation/AVPlayerLooper.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -#if !WATCH - -using XamCore.Foundation; -using XamCore.CoreFoundation; -using XamCore.AudioToolbox; -using XamCore.ObjCRuntime; -using System; - -namespace XamCore.AVFoundation { - - public partial class AVPlayerLooper { - -#if !XAMCORE_4_0 // This API got introduced in Xcode 8.0 binding but is not currently present nor in Xcode 8.3 or Xcode 9.0 needs research - - bool loopingEnabled = true; - - [Obsolete ("This selector does not exist in the header and was wrongly added.")] - public virtual bool LoopingEnabled { - get { - return loopingEnabled; - } - } -#endif - } -} -#endif // !WATCH diff --git a/src/AVFoundation/Enums.cs b/src/AVFoundation/Enums.cs index 0f1900cde40..b9cd4a88da4 100644 --- a/src/AVFoundation/Enums.cs +++ b/src/AVFoundation/Enums.cs @@ -803,11 +803,7 @@ public enum AVContentKeyRequestRetryReason { [TV (10, 2), Mac (10, 12, 4), iOS (10, 3), NoWatch] public enum AVContentKeySystem { [Field ("AVContentKeySystemFairPlayStreaming")] - FairPlayStreaming = 0, - - [TV (11, 0), NoWatch, Mac (10, 13), iOS (11, 0)] - [Field ("AVContentKeySystemClearKey")] - AVContentKeySystemClearKey = 1, + FairPlayStreaming, } // Convience enum for native string values @@ -840,141 +836,5 @@ public enum AVAssetExportSessionPreset { AppleM4A = 8, // AVAssetExportPresetAppleM4A [Field ("AVAssetExportPresetPassthrough")] Passthrough = 9, // AVAssetExportPresetPassthrough - - [iOS (11, 0), Mac (10, 13)] - [Field ("AVOutputSettingsPresetHEVC1920x1080")] - PresetHevc1920x1080 = 11, - - [iOS (11, 0), Mac (10, 13)] - [Field ("AVOutputSettingsPresetHEVC3840x2160")] - PresetHevc3840x2160 = 12, - } - - [TV (11,0), NoWatch, iOS (11,0)] - [Native] - public enum AVDepthDataAccuracy : nint { - Relative = 0, - Absolute = 1, - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum AVAudioEngineManualRenderingMode : nint { - Offline = 0, - Realtime = 1 - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum AVAudioEngineManualRenderingStatus : nint { - Error = -1, - Success = 0, - InsufficientDataFromInputNode = 1, - CannotDoInCurrentContext = 2 - } - - [TV (11,0), NoWatch, Mac (10,13), iOS (11,0)] - [Native] - public enum AVAudioSessionRouteSharingPolicy : nuint { - Default = 0, - LongForm = 1, - Independent = 2 - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum AVAudioPlayerNodeCompletionCallbackType : nint { - Consumed = 0, - Rendered = 1, - PlayedBack = 2 - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - public enum AVAudioEngineManualRenderingError - { - InvalidMode = -80800, - Initialized = -80801, - NotRunning = -80802, - } - - [NoTV, iOS (11,0)] - [NoWatch] - [Native] - public enum AVCaptureLensStabilizationStatus : nint - { - Unsupported = 0, - Off = 1, - Active = 2, - OutOfRange = 3, - Unavailable = 4 - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum AVCaptureOutputDataDroppedReason : nint - { - None = 0, - LateData = 1, - OutOfBuffers = 2, - Discontinuity = 3, - } - - [TV (11, 0), NoWatch, Mac (10, 13), iOS (11, 0)] - public enum AVVideoApertureMode { - [Field ("AVVideoApertureModeCleanAperture")] - CleanAperture = 0, - - [Field ("AVVideoApertureModeProductionAperture")] - ProductionAperture = 1, - - [Field ("AVVideoApertureModeEncodedPixels")] - EncodedPixels = 2, - } - - /* - // Enum values are present in header but missing rdar filed at: https://bugreport.apple.com/web/?problemID=34184435 - [NoWatch, NoTV, NoMac, iOS (11, 0)] - public enum AVAssetDownloadedAssetEvictionPriority { - [Field ("AVAssetDownloadedAssetEvictionPriorityDefault")] - Default = 0, - - [Field ("AVAssetDownloadedAssetEvictionPriorityImportant")] - Important = 1, - } - */ - - [NoWatch, iOS (11, 0), TV (11,0), Mac (10,13)] - public enum AVAssetWriterInputMediaDataLocation { - [Field ("AVAssetWriterInputMediaDataLocationInterleavedWithMainMediaData")] - InterleavedWithMainMediaData = 0, - - [Field ("AVAssetWriterInputMediaDataLocationBeforeMainMediaDataNotInterleaved")] - BeforeMainMediaDataNotInterleaved = 1, - } - - [TV (11, 0), NoWatch, Mac (10, 13), iOS (11, 0)] - public enum AVVideoCodecType { - [Field ("AVVideoCodecTypeH264")] - H264 = 0, - - [Field ("AVVideoCodecTypeJPEG")] - Jpeg = 1, - - [Field ("AVVideoCodecTypeAppleProRes422")] - AppleProRes422 = 3, - - [Field ("AVVideoCodecTypeAppleProRes4444")] - AppleProRes4444 = 4, - - [Field ("AVVideoCodecTypeHEVC")] - Hevc = 5, - - } - - [TV (11,0), NoWatch, iOS (11,0)] - [Native] - public enum AVDepthDataQuality : nint { - Low = 0, - High = 1 } } diff --git a/src/Accounts/Enums.cs b/src/Accounts/Enums.cs index 3e7d95b91c5..46ccf9e2099 100644 --- a/src/Accounts/Enums.cs +++ b/src/Accounts/Enums.cs @@ -29,7 +29,7 @@ public enum ACErrorCode { #if XAMCORE_3_0 MissingTransportMessageId, #else - [Obsolete ("Use 'MissingTransportMessageId'.")] + [Obsolete ("Use MissingTransportMessageId")] MissingMessageID, #pragma warning disable 618 // MissingMessageID is obsolete MissingTransportMessageId = MissingMessageID, diff --git a/src/AddressBook/ABAddressBook.cs b/src/AddressBook/ABAddressBook.cs index f71fff844df..c1bbcf69e44 100644 --- a/src/AddressBook/ABAddressBook.cs +++ b/src/AddressBook/ABAddressBook.cs @@ -39,7 +39,7 @@ using XamCore.ObjCRuntime; namespace XamCore.AddressBook { - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ExternalChangeEventArgs : EventArgs { public ExternalChangeEventArgs (ABAddressBook addressBook, NSDictionary info) { @@ -91,7 +91,7 @@ static InitConstants () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABAddressBook : INativeObject, IDisposable, IEnumerable { public static readonly NSString ErrorDomain; diff --git a/src/AddressBook/ABEnums.cs b/src/AddressBook/ABEnums.cs index 836d66417a0..43f41d813dd 100644 --- a/src/AddressBook/ABEnums.cs +++ b/src/AddressBook/ABEnums.cs @@ -34,7 +34,7 @@ using XamCore.ObjCRuntime; namespace XamCore.AddressBook { - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] [Native] [ErrorDomain ("ABAddressBookErrorDomain")] public enum ABAddressBookError : nint { @@ -42,7 +42,7 @@ public enum ABAddressBookError : nint { OperationNotPermittedByUserError } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] [Native] public enum ABAuthorizationStatus : nint { NotDetermined = 0, diff --git a/src/AddressBook/ABGroup.cs b/src/AddressBook/ABGroup.cs index 7a61d9245d0..d8ab3461fda 100644 --- a/src/AddressBook/ABGroup.cs +++ b/src/AddressBook/ABGroup.cs @@ -63,7 +63,7 @@ internal static void Init () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABGroup : ABRecord, IEnumerable { [DllImport (Constants.AddressBookLibrary)] diff --git a/src/AddressBook/ABMultiValue.cs b/src/AddressBook/ABMultiValue.cs index fd4985e5622..0c0507836a6 100644 --- a/src/AddressBook/ABMultiValue.cs +++ b/src/AddressBook/ABMultiValue.cs @@ -94,7 +94,7 @@ public static IntPtr ToIntPtr (NSObject value) } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public struct ABMultiValueEntry { ABMultiValue self; @@ -166,7 +166,7 @@ public int Identifier { } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABMultiValue : INativeObject, IDisposable, IEnumerable> { IntPtr handle; @@ -286,7 +286,7 @@ public ABMutableMultiValue ToMutableMultiValue () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABMutableMultiValue : ABMultiValue { internal ABMutableMultiValue (IntPtr handle) @@ -331,7 +331,7 @@ public bool RemoveAt (nint index) } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABMutableDateMultiValue : ABMutableMultiValue { public ABMutableDateMultiValue () : base (ABMultiValue.CreateMutable (ABPropertyType.MultiDateTime)) @@ -339,7 +339,7 @@ public ABMutableDateMultiValue () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABMutableDictionaryMultiValue : ABMutableMultiValue { public ABMutableDictionaryMultiValue () : base (ABMultiValue.CreateMutable (ABPropertyType.MultiDictionary)) @@ -347,7 +347,7 @@ public ABMutableDictionaryMultiValue () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABMutableStringMultiValue : ABMutableMultiValue { public ABMutableStringMultiValue () : base (ABMultiValue.CreateMutable (ABPropertyType.MultiString), diff --git a/src/AddressBook/ABPerson.cs b/src/AddressBook/ABPerson.cs index ff513a767f6..f031e426cca 100644 --- a/src/AddressBook/ABPerson.cs +++ b/src/AddressBook/ABPerson.cs @@ -39,19 +39,19 @@ using XamCore.ObjCRuntime; namespace XamCore.AddressBook { - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public enum ABPersonSortBy : uint /* uint32_t */ { FirstName = 0, LastName = 1, } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public enum ABPersonCompositeNameFormat : uint /* uint32_t */ { FirstNameFirst = 0, LastNameFirst = 1, } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public enum ABPersonProperty { Address, Birthday, @@ -80,7 +80,7 @@ public enum ABPersonProperty { SocialProfile } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] [Native] [iOS (4,1)] public enum ABPersonImageFormat : nint_compat_int { @@ -88,7 +88,7 @@ public enum ABPersonImageFormat : nint_compat_int { OriginalSize = 2 } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] static class ABPersonPropertyId { public static int Address {get; private set;} @@ -223,7 +223,7 @@ public static ABPersonProperty ToPersonProperty (int id) } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public static class ABPersonAddressKey { public static NSString City {get; private set;} @@ -257,7 +257,7 @@ internal static void Init () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public static class ABPersonDateLabel { public static NSString Anniversary {get; private set;} @@ -280,14 +280,14 @@ internal static void Init () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public enum ABPersonKind { None, Organization, Person, } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] static class ABPersonKindId { public static NSNumber Organization {get; private set;} public static NSNumber Person {get; private set;} @@ -330,7 +330,7 @@ public static NSNumber FromPersonKind (ABPersonKind value) } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] static class ABPersonSocialProfile { public static readonly NSString URLKey; public static readonly NSString ServiceKey; @@ -353,7 +353,7 @@ static ABPersonSocialProfile () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public static class ABPersonSocialProfileService { public static readonly NSString Twitter; @@ -384,7 +384,7 @@ static ABPersonSocialProfileService () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public static class ABPersonPhoneLabel { public static NSString HomeFax {get; private set;} public static NSString iPhone {get; private set;} @@ -421,7 +421,7 @@ internal static void Init () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public static class ABPersonInstantMessageService { public static NSString Aim {get; private set;} public static NSString Icq {get; private set;} @@ -463,7 +463,7 @@ internal static void Init () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public static class ABPersonInstantMessageKey { public static NSString Service {get; private set;} public static NSString Username {get; private set;} @@ -488,7 +488,7 @@ internal static void Init () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public static class ABPersonUrlLabel { public static NSString HomePage {get; private set;} @@ -511,7 +511,7 @@ internal static void Init () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public static class ABPersonRelatedNamesLabel { public static NSString Assistant {get; private set;} public static NSString Brother {get; private set;} @@ -554,7 +554,7 @@ internal static void Init () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public static class ABLabel { public static NSString Home {get; private set;} public static NSString Other {get; private set;} @@ -581,7 +581,7 @@ internal static void Init () } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABPerson : ABRecord, IComparable, IComparable { [DllImport (Constants.AddressBookLibrary)] extern static IntPtr ABPersonCreate (); @@ -1089,7 +1089,7 @@ public static ABPerson[] CreateFromVCard (ABRecord source, NSData vCardData) } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class SocialProfile : DictionaryContainer { public SocialProfile () @@ -1147,7 +1147,7 @@ public string Url { } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class InstantMessageService : DictionaryContainer { public InstantMessageService () @@ -1190,7 +1190,7 @@ public string Username { } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class PersonAddress : DictionaryContainer { public PersonAddress () diff --git a/src/AddressBook/ABRecord.cs b/src/AddressBook/ABRecord.cs index 4d9b2f775ce..42b83b959b8 100644 --- a/src/AddressBook/ABRecord.cs +++ b/src/AddressBook/ABRecord.cs @@ -37,14 +37,14 @@ using XamCore.ObjCRuntime; namespace XamCore.AddressBook { - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public enum ABRecordType : uint /* uint32_t */ { Person = 0, Group = 1, Source = 2 } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public enum ABPropertyType : uint /* uint32_t */ { Invalid = 0, String = 0x1, @@ -59,7 +59,7 @@ public enum ABPropertyType : uint /* uint32_t */ { MultiDictionary = ABMultiValue.Mask | Dictionary, } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public abstract class ABRecord : INativeObject, IDisposable { public const int InvalidRecordId = -1; diff --git a/src/AddressBook/ABSource.cs b/src/AddressBook/ABSource.cs index 700528a6868..de699c362ca 100644 --- a/src/AddressBook/ABSource.cs +++ b/src/AddressBook/ABSource.cs @@ -39,7 +39,7 @@ namespace XamCore.AddressBook { // note: not a true flag - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public enum ABSourceType : int /* typedef int */ { Local = 0x0, Exchange = 0x1, @@ -52,7 +52,7 @@ public enum ABSourceType : int /* typedef int */ { SearchableMask = 0x01000000 }; - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABSource : ABRecord { #if !XAMCORE_2_0 [Advice ("Use ABSourceType.SearchableMask")] @@ -82,13 +82,13 @@ public ABSourceType SourceType { } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public enum ABSourceProperty { Name, Type, } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] static class ABSourcePropertyId { public static int Name { get; private set;} diff --git a/src/AddressBookUI/ABAddressFormatting.cs b/src/AddressBookUI/ABAddressFormatting.cs index c35bfb684b3..470e4873fc1 100644 --- a/src/AddressBookUI/ABAddressFormatting.cs +++ b/src/AddressBookUI/ABAddressFormatting.cs @@ -16,7 +16,7 @@ namespace XamCore.AddressBookUI { // http://developer.apple.com/library/ios/#DOCUMENTATION/AddressBookUI/Reference/AddressBookUI_Functions/Reference/reference.html#//apple_ref/c/func/ABCreateStringWithAddressDictionary - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] static public class ABAddressFormatting { [DllImport (Constants.AddressBookUILibrary)] diff --git a/src/AddressBookUI/ABNewPersonViewController.cs b/src/AddressBookUI/ABNewPersonViewController.cs index bbd7a4bdc19..956c8abbd0b 100644 --- a/src/AddressBookUI/ABNewPersonViewController.cs +++ b/src/AddressBookUI/ABNewPersonViewController.cs @@ -14,7 +14,7 @@ namespace XamCore.AddressBookUI { - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABNewPersonCompleteEventArgs : EventArgs { public ABNewPersonCompleteEventArgs (ABPerson person) @@ -53,7 +53,7 @@ public override void DidCompleteWithNewPerson (ABNewPersonViewController control #endif } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] partial class ABNewPersonViewController { ABPerson displayedPerson; diff --git a/src/AddressBookUI/ABPeoplePickerNavigationController.cs b/src/AddressBookUI/ABPeoplePickerNavigationController.cs index 913fb7f9ac5..d51eced3ec8 100644 --- a/src/AddressBookUI/ABPeoplePickerNavigationController.cs +++ b/src/AddressBookUI/ABPeoplePickerNavigationController.cs @@ -14,7 +14,7 @@ using XamCore.ObjCRuntime; namespace XamCore.AddressBookUI { - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABPeoplePickerSelectPersonEventArgs : EventArgs { public ABPeoplePickerSelectPersonEventArgs (ABPerson person) @@ -27,7 +27,7 @@ public ABPeoplePickerSelectPersonEventArgs (ABPerson person) public bool Continue {get; set;} } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABPeoplePickerPerformActionEventArgs : ABPeoplePickerSelectPersonEventArgs { public ABPeoplePickerPerformActionEventArgs (ABPerson person, ABPersonProperty property, int? identifier) @@ -41,7 +41,7 @@ public ABPeoplePickerPerformActionEventArgs (ABPerson person, ABPersonProperty p public int? Identifier {get; private set;} } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABPeoplePickerSelectPerson2EventArgs : EventArgs { public ABPeoplePickerSelectPerson2EventArgs (ABPerson person) @@ -52,7 +52,7 @@ public ABPeoplePickerSelectPerson2EventArgs (ABPerson person) public ABPerson Person {get; private set;} } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABPeoplePickerPerformAction2EventArgs : ABPeoplePickerSelectPerson2EventArgs { public ABPeoplePickerPerformAction2EventArgs (ABPerson person, ABPersonProperty property, int? identifier) @@ -170,7 +170,7 @@ public override void Cancelled (ABPeoplePickerNavigationController peoplePicker) } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] partial class ABPeoplePickerNavigationController { DisplayedPropertiesCollection displayedProperties; diff --git a/src/AddressBookUI/ABPersonViewController.cs b/src/AddressBookUI/ABPersonViewController.cs index f16d0571ea5..15974cbafa4 100644 --- a/src/AddressBookUI/ABPersonViewController.cs +++ b/src/AddressBookUI/ABPersonViewController.cs @@ -13,7 +13,7 @@ using XamCore.ObjCRuntime; namespace XamCore.AddressBookUI { - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABPersonViewPerformDefaultActionEventArgs : EventArgs { public ABPersonViewPerformDefaultActionEventArgs (ABPerson person, ABPersonProperty property, int? identifier) { @@ -56,7 +56,7 @@ public override bool ShouldPerformDefaultActionForPerson (ABPersonViewController } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] partial class ABPersonViewController { ABPerson displayedPerson; diff --git a/src/AddressBookUI/ABUnknownPersonViewController.cs b/src/AddressBookUI/ABUnknownPersonViewController.cs index 1194341bad3..321fee8e403 100644 --- a/src/AddressBookUI/ABUnknownPersonViewController.cs +++ b/src/AddressBookUI/ABUnknownPersonViewController.cs @@ -13,7 +13,7 @@ using XamCore.ObjCRuntime; namespace XamCore.AddressBookUI { - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class ABUnknownPersonCreatedEventArgs : EventArgs { public ABUnknownPersonCreatedEventArgs (ABPerson person) @@ -65,7 +65,7 @@ public override bool ShouldPerformDefaultActionForPerson (ABUnknownPersonViewCon } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] partial class ABUnknownPersonViewController { ABPerson displayedPerson; diff --git a/src/AddressBookUI/DisplayedPropertiesCollection.cs b/src/AddressBookUI/DisplayedPropertiesCollection.cs index c23c6f25dad..6ca79146009 100644 --- a/src/AddressBookUI/DisplayedPropertiesCollection.cs +++ b/src/AddressBookUI/DisplayedPropertiesCollection.cs @@ -18,7 +18,7 @@ namespace XamCore.AddressBookUI { delegate T ABFunc (); - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] public class DisplayedPropertiesCollection : ICollection { ABFunc g; diff --git a/src/AppKit/Enums.cs b/src/AppKit/Enums.cs index 11dfbb68b7e..6275208e28b 100644 --- a/src/AppKit/Enums.cs +++ b/src/AppKit/Enums.cs @@ -116,7 +116,7 @@ public enum NSComposite : nuint_compat_int { DestinationAtop, XOR, PlusDarker, - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use NSCompositeSourceOver instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use NSCompositeSourceOver instead")] Highlight, PlusLighter, [Mac (10,10)] Multiply, @@ -138,11 +138,7 @@ public enum NSComposite : nuint_compat_int { [Native] public enum NSBackingStore : nuint_compat_int { - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_13, Message = "Use 'Buffered' instead.")] - Retained, - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_13, Message = "Use 'Buffered' instead.")] - Nonretained, - Buffered, + Retained, Nonretained, Buffered } [Native] @@ -198,7 +194,7 @@ public enum NSColorSpaceModel : nint { #if !XAMCORE_3_0 [Flags] [Native] - [Obsolete ("Use NSFileWrapperReadingOptions in Foundation instead.")] + [Obsolete ("Use NSFileWrapperReadingOptions in Foundation instead")] public enum NSFileWrapperReadingOptions : nuint_compat_int { Immediate = 1, WithoutMapping = 2 } @@ -227,7 +223,7 @@ public enum NSLineBreakMode : nuint_compat_int { #if !XAMCORE_4_0 [Native] - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use formatters instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use formatters instead")] public enum NSType : nuint_compat_int { Any = 0, Int = 1, @@ -933,7 +929,7 @@ public enum NSSelectionDirection : nuint_compat_int { [Native] public enum NSWindowButton : nuint_compat_int { CloseButton, MiniaturizeButton, ZoomButton, ToolbarButton, DocumentIconButton, DocumentVersionsButton = 6, - [Availability (Deprecated = Platform.Mac_10_12, Message = "The standard window button for FullScreenButton is always null; use ZoomButton instead.")] + [Availability (Deprecated = Platform.Mac_10_12, Message = "The standard window button for FullScreenButton is always null; use ZoomButton instead")] FullScreenButton } @@ -1448,7 +1444,6 @@ public enum NSPrintingPaginationMode : nuint_compat_int { [Flags] #if !XAMCORE_4_0 [Native] - [Availability (Deprecated = Platform.Mac_10_11, Message = "Use 'NSGlyphProperty' instead.")] public enum NSGlyphStorageOptions : nuint_compat_int { #else public enum NSGlyphStorageOptions : int @@ -1459,7 +1454,7 @@ public enum NSGlyphStorageOptions : int } #if !XAMCORE_4_0 - [Availability (Deprecated = Platform.Mac_10_11, Message = "Use NSTextStorageEditActions instead.")] + [Availability (Deprecated = Platform.Mac_10_11, Message = "Use NSTextStorageEditActions instead")] [Flags] [Native] public enum NSTextStorageEditedFlags : nuint_compat_int { @@ -1563,10 +1558,7 @@ public enum NSFontSymbolicTraits : int { // uint32_t NSFontSymbolicTraits MonoSpaceTrait = (1 << 10), VerticalTrait = (1 << 11), UIOptimizedTrait = (1 << 12), - [Mac (10,13)] - TraitTightLeading = 1 << 15, - [Mac (10,13)] - TraitLooseLeading = 1 << 16, + UnknownClass = 0 << 28, OldStyleSerifsClass = 1 << 28, TransitionalSerifsClass = 2 << 28, @@ -1616,7 +1608,7 @@ public enum NSToolbarSizeMode : nuint_compat_int { Default, Regular, Small } - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use NSAlertButtonReturn instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use NSAlertButtonReturn instead")] #if !XAMCORE_4_0 [Native] public enum NSAlertType : nint { @@ -1630,7 +1622,7 @@ public enum NSAlertType : int { } #if !XAMCORE_4_0 - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use NSModalResponse instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use NSModalResponse instead")] [Native] public enum NSPanelButtonType : nint { Cancel, Ok @@ -2120,7 +2112,6 @@ public static class NSFileTypeForHFSTypeCode { // These constants specify the possible states of a drawer. [Native] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSSplitViewController' instead.")] public enum NSDrawerState : nuint_compat_int { Closed = 0, Opening = 1, @@ -2157,7 +2148,6 @@ public enum NSRuleEditorNestingMode : nuint_compat_int { } [Native] - [Availability (Deprecated = Platform.Mac_10_11, Message = "Use 'NSGlyphProperty' instead.")] public enum NSGlyphInscription : nuint_compat_int { Base, Below, Above, Overstrike, OverBelow } @@ -2745,100 +2735,4 @@ public enum NSScrubberAlignment : nint Center } - [Mac (10,13)] - public enum NSFontError : int { - AssetDownloadError = 66304, - ErrorMinimum = 66304, - ErrorMaximum = 66335, - } - - [Mac (10,13)] - [Native] - public enum NSAccessibilityAnnotationPosition : nint { - FullRange, - Start, - End, - } - - [Mac (10,13)] - [Native] - public enum NSAccessibilityCustomRotorSearchDirection : nint { - Previous, - Next, - } - - [Mac (10,13)] - [Native] - public enum NSAccessibilityCustomRotorType : nint { - Custom = 0, - Any = 1, - Annotation, - BoldText, - Heading, - HeadingLevel1, - HeadingLevel2, - HeadingLevel3, - HeadingLevel4, - HeadingLevel5, - HeadingLevel6, - Image, - ItalicText, - Landmark, - Link, - List, - MisspelledWord, - Table, - TextField, - UnderlinedText, - VisitedLink, - } - - [Mac (10, 13)] - [Native] - public enum NSColorType : nint { - ComponentBased, - Pattern, - Catalog, - } - - [Mac (10,13)] - [Native] - [Flags] - public enum NSFontAssetRequestOptions : nuint { - UsesStandardUI = 1 << 0, - } - - [Mac (10,13)] - [Native] - [Flags] - public enum NSFontPanelModeMask : nuint { - Face = 1 << 0, - Size = 1 << 1, - Collection = 1 << 2, - UnderlineEffect = 1 << 8, - StrikethroughEffect = 1 << 9, - TextColorEffect = 1 << 10, - DocumentColorEffect = 1 << 11, - ShadowEffect = 1 << 12, - AllEffects = (nuint)0XFFF00, - StandardModes = (nuint)0XFFFF, - AllModes = (nuint)0XFFFFFFFF, - } - - [Mac (10,13)] - [Native] - public enum NSLevelIndicatorPlaceholderVisibility : nint { - Automatic = 0, - Always = 1, - WhileEditing = 2, - } - - [Mac (10,13)] - [Native] - public enum NSSegmentDistribution : nint { - Fit = 0, - Fill, - FillEqually, - FillProportionally, - } } diff --git a/src/AppKit/NSApplication.cs b/src/AppKit/NSApplication.cs index e6206d88293..90841fddacb 100644 --- a/src/AppKit/NSApplication.cs +++ b/src/AppKit/NSApplication.cs @@ -132,7 +132,7 @@ public void DiscardEvents (NSEventMask mask, NSEvent lastEvent) DiscardEvents ((nuint)(ulong) mask, lastEvent); } - [Obsolete ("This method does nothing.")] + [Obsolete ("This method does nothing")] public static void RestoreWindow (string identifier, Foundation.NSCoder state, NSWindowCompletionHandler onCompletion) { } diff --git a/src/AppKit/NSBezierPath.cs b/src/AppKit/NSBezierPath.cs index b069738604f..ec44e5cac15 100644 --- a/src/AppKit/NSBezierPath.cs +++ b/src/AppKit/NSBezierPath.cs @@ -88,7 +88,7 @@ public unsafe void SetAssociatedPointsAtIndex (CGPoint[] points, nint index) _SetAssociatedPointsAtIndex ((IntPtr)ptr, index); } - public unsafe void Append (CGPoint[] points) + public unsafe void AppendPathWithPoints (CGPoint[] points) { if (points == null) throw new ArgumentNullException ("points"); @@ -99,14 +99,6 @@ public unsafe void Append (CGPoint[] points) _AppendPathWithPoints ((IntPtr)ptr, points.Length); } -#if !XAMCORE_4_0 - [Obsolete ("Use 'Append (CGPoint[])' instead.")] - public unsafe void AppendPathWithPoints (CGPoint[] points) - { - Append (points); - } - - [Obsolete ("Use 'Append (uint[], NSFont)' instead.")] public unsafe void AppendPathWithGlyphs (uint[] glyphs, NSFont font) { if (glyphs == null) @@ -117,18 +109,6 @@ public unsafe void AppendPathWithGlyphs (uint[] glyphs, NSFont font) fixed (uint* ptr = &glyphs [0]) _AppendPathWithGlyphs ((IntPtr)ptr, glyphs.Length, font); } -#endif - [Mac (10,13)] - public unsafe void Append (uint[] glyphs, NSFont font) - { - if (glyphs == null) - throw new ArgumentNullException ("glyphs"); - if (glyphs.Length < 1) - throw new ArgumentException ("glyphs array is empty"); - - fixed (uint* ptr = &glyphs [0]) - _AppendBezierPathWithCGGlyphs ((IntPtr)ptr, glyphs.Length, font); - } } } diff --git a/src/AppKit/NSComboBox.cs b/src/AppKit/NSComboBox.cs index 1440a353a14..63917b1250f 100644 --- a/src/AppKit/NSComboBox.cs +++ b/src/AppKit/NSComboBox.cs @@ -5,7 +5,7 @@ namespace XamCore.AppKit { public partial class NSComboBox { - [Obsolete ("Use GetItemObject instead.")] + [Obsolete ("Use GetItemObject instead")] public virtual NSComboBox GetItem (nint index) { return (NSComboBox) GetItemObject (index); diff --git a/src/AppKit/NSFont.cs b/src/AppKit/NSFont.cs deleted file mode 100644 index 2a53fbb14bc..00000000000 --- a/src/AppKit/NSFont.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using XamCore.CoreFoundation; -using XamCore.Foundation; -using XamCore.ObjCRuntime; -using XamCore.CoreGraphics; -using XamCore.CoreAnimation; -using XamCore.CoreText; - -using CGGlyph = System.UInt16; - -namespace XamCore.AppKit { - public partial class NSFont - { - public static NSFont FromCTFont (CTFont font) - { - if (font == null) - return null; - return new NSFont (font.Handle); - } - - [Mac (10,13)] - public unsafe CGRect [] GetBoundingRects (CGGlyph [] glyphs) - { - if (glyphs == null) - throw new ArgumentNullException ("glyphs"); - if (glyphs.Length < 1) - throw new ArgumentException ("glyphs array is empty"); - - CGRect [] bounds = new CGRect [glyphs.Length]; - fixed (CGRect* boundsPtr = &bounds [0]) { - fixed (CGGlyph* glyphsPtr = &glyphs [0]) { - _GetBoundingRects ((IntPtr)boundsPtr, (IntPtr)glyphsPtr, (nuint)glyphs.Length); - } - } - return bounds; - } - - [Mac (10,13)] - public unsafe CGSize [] GetAdvancements (CGGlyph [] glyphs) - { - if (glyphs == null) - throw new ArgumentNullException ("glyphs"); - if (glyphs.Length < 1) - throw new ArgumentException ("glyphs array is empty"); - - CGSize [] advancements = new CGSize [glyphs.Length]; - fixed (CGSize* advancementsPtr = &advancements [0]) { - fixed (CGGlyph* glyphsPtr = &glyphs [0]) { - _GetAdvancements ((IntPtr)advancementsPtr, (IntPtr)glyphsPtr, (nuint)glyphs.Length); - } - } - return advancements; - } - } -} diff --git a/src/AppKit/NSTextContainer.cs b/src/AppKit/NSTextContainer.cs index 04901e790c2..ced7c2d17a7 100644 --- a/src/AppKit/NSTextContainer.cs +++ b/src/AppKit/NSTextContainer.cs @@ -6,7 +6,7 @@ namespace XamCore.AppKit { public partial class NSTextContainer { - [Availability (Obsoleted = Platform.Mac_10_11, Message = "Use NSTextContainer.FromSize instead.")] + [Availability (Obsoleted = Platform.Mac_10_11, Message = "Use NSTextContainer.FromSize instead")] public NSTextContainer (CGSize size) { Handle = InitWithContainerSize (size); @@ -26,7 +26,7 @@ public static NSTextContainer FromSize (CGSize size) return new NSTextContainer (size, false); } - [Availability (Deprecated = Platform.Mac_10_11, Message = "Use NSTextContainer.FromSize instead.")] + [Availability (Deprecated = Platform.Mac_10_11, Message = "Use NSTextContainer.FromSize instead")] public static NSTextContainer FromContainerSize (CGSize containerSize) { return new NSTextContainer (containerSize, true); diff --git a/src/AssetsLibrary/ALAsset.cs b/src/AssetsLibrary/ALAsset.cs index 516bed6938c..bc71600b93c 100644 --- a/src/AssetsLibrary/ALAsset.cs +++ b/src/AssetsLibrary/ALAsset.cs @@ -17,12 +17,12 @@ namespace XamCore.AssetsLibrary { // internally used (not exposed by ObjC) - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] public enum ALAssetType { Video, Photo, Unknown } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] public partial class ALAsset { public ALAssetType AssetType { get { diff --git a/src/AssetsLibrary/ALAssetsGroup.cs b/src/AssetsLibrary/ALAssetsGroup.cs index 805fa57d435..1ad52b6b566 100644 --- a/src/AssetsLibrary/ALAssetsGroup.cs +++ b/src/AssetsLibrary/ALAssetsGroup.cs @@ -16,7 +16,7 @@ namespace XamCore.AssetsLibrary { - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] public partial class ALAssetsGroup { public NSString Name { get { diff --git a/src/AssetsLibrary/ALAssetsLibrary.cs b/src/AssetsLibrary/ALAssetsLibrary.cs index 3fdcf7235ab..6c97c2378aa 100644 --- a/src/AssetsLibrary/ALAssetsLibrary.cs +++ b/src/AssetsLibrary/ALAssetsLibrary.cs @@ -20,7 +20,7 @@ namespace XamCore.AssetsLibrary { - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] public partial class ALAssetsLibrary { [Obsolete ("Use the overload that takes a CGImage instead")] diff --git a/src/AssetsLibrary/Enums.cs b/src/AssetsLibrary/Enums.cs index 47c15acc289..eabe42c11ce 100644 --- a/src/AssetsLibrary/Enums.cs +++ b/src/AssetsLibrary/Enums.cs @@ -4,7 +4,7 @@ namespace XamCore.AssetsLibrary { // NSInteger -> ALAssetsLibrary.h - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] [Native] public enum ALAssetOrientation : nint { Up, @@ -18,7 +18,7 @@ public enum ALAssetOrientation : nint { } // NSUInteger -> ALAssetsLibrary.h - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] [Native] [Flags] public enum ALAssetsGroupType : nuint { @@ -32,7 +32,7 @@ public enum ALAssetsGroupType : nuint { } // untyped enum -> ALAssetsLibrary.h - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] [ErrorDomain ("ALAssetsLibraryErrorDomain")] public enum ALAssetsError { UnknownError = -1, @@ -48,7 +48,7 @@ public enum ALAssetsError { } // NSInteger -> ALAssetsLibrary.h - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] [Native] public enum ALAuthorizationStatus : nint { NotDetermined, diff --git a/src/AudioToolbox/AudioFile.cs b/src/AudioToolbox/AudioFile.cs index f6f1ad929f4..463981623f4 100644 --- a/src/AudioToolbox/AudioFile.cs +++ b/src/AudioToolbox/AudioFile.cs @@ -46,8 +46,6 @@ public enum AudioFileType { // UInt32 AudioFileTypeID AIFF = 0x41494646, // AIFF AIFC = 0x41494643, // AIFC WAVE = 0x57415645, // WAVE - [NoWatch, iOS (11,0), Mac(10,13), TV (11,0)] - RF64 = 0x52463634, // RF64 SoundDesigner2 = 0x53643266, // Sd2f Next = 0x4e655854, // NeXT MP3 = 0x4d504733, // MPG3 @@ -62,8 +60,6 @@ public enum AudioFileType { // UInt32 AudioFileTypeID ThreeGP = 0x33677070, // 3gpp ThreeGP2 = 0x33677032, // 3gp2 AMR = 0x616d7266, // amrf - [NoWatch, iOS (11,0), Mac(10,13), TV (11,0)] - FLAC = 0x666c6163, // flac } public enum AudioFileError {// Implictly cast to OSType in AudioFile.h diff --git a/src/AudioToolbox/AudioQueue.cs b/src/AudioToolbox/AudioQueue.cs index fde1576377a..b0585c980c2 100644 --- a/src/AudioToolbox/AudioQueue.cs +++ b/src/AudioToolbox/AudioQueue.cs @@ -262,7 +262,7 @@ public unsafe void CopyToAudioData (IntPtr source, int size) [StructLayout(LayoutKind.Explicit)] public struct AudioQueueParameterEvent { [FieldOffset(0)] - [Advice ("Use Parameter.")] + [Advice ("Use Parameter")] public uint ID; [FieldOffset(0)] diff --git a/src/AudioToolbox/AudioSession.cs b/src/AudioToolbox/AudioSession.cs index 91723e52f97..974df949197 100644 --- a/src/AudioToolbox/AudioSession.cs +++ b/src/AudioToolbox/AudioSession.cs @@ -194,7 +194,7 @@ public AudioSessionOutputRouteKind [] CurrentOutputRoutes { } } - [Availability (Deprecated = Platform.iOS_7_0, Message = "Use 'AVAudioSession' instead.")] + [Availability (Deprecated = Platform.iOS_7_0, Message = "Use AVAudioSession instead")] public static class AudioSession { static bool initialized; public static event EventHandler Interrupted; diff --git a/src/AudioToolbox/AudioType.cs b/src/AudioToolbox/AudioType.cs index 34919b9e5c8..f0a1607b251 100644 --- a/src/AudioToolbox/AudioType.cs +++ b/src/AudioToolbox/AudioType.cs @@ -78,8 +78,6 @@ public enum AudioFormatType : uint_compat_int { // UInt32 in AudioStreamBasicDes MicrosoftGSM = 0x6d730031, AES3 = 0x61657333, // 'aes3' EnhancedAES3 = 0x65632d33, // 'ec-3' - Flac = 0x666c6163, // 'flac' - Opus = 0x6f707573, // 'opus' } [Flags] @@ -144,7 +142,7 @@ public struct AudioStreamBasicDescription { const int AudioUnitSampleFractionBits = 24; const AudioFormatFlags AudioFormatFlagIsBigEndian = 0; - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Canonical is no longer encouraged, since fixed-point no longer provides a performance advantage over floating point. 'AudioFormatFlagsNativeFloatPacked' is preffered instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Canonical is no longer encouraged, since fixed-point no longer provides a performance advantage over floating point. AudioFormatFlagsNativeFloatPacked is preffered instead")] public static readonly AudioFormatFlags AudioFormatFlagsAudioUnitCanonical = AudioFormatFlags.IsSignedInteger | (BitConverter.IsLittleEndian ? 0 : AudioFormatFlags.IsBigEndian) | AudioFormatFlags.IsPacked | AudioFormatFlags.IsNonInterleaved | (AudioFormatFlags) (AudioUnitSampleFractionBits << (int)AudioFormatFlags.LinearPCMSampleFractionShift); @@ -426,31 +424,7 @@ public enum AudioChannelLabel : int { // UInt32 AudioChannelLabel Discrete_13 = (1<<16) | 13, Discrete_14 = (1<<16) | 14, Discrete_15 = (1<<16) | 15, - Discrete_65535 = (1<<16) | 65535, - - // HOA ACN channels - - // generic - HoaAcn = 500, - - // numbered - HoaAcn0 = (2 << 16) | 0, - HoaAcn1 = (2 << 16) | 1, - HoaAcn2 = (2 << 16) | 2, - HoaAcn3 = (2 << 16) | 3, - HoaAcn4 = (2 << 16) | 4, - HoaAcn5 = (2 << 16) | 5, - HoaAcn6 = (2 << 16) | 6, - HoaAcn7 = (2 << 16) | 7, - HoaAcn8 = (2 << 16) | 8, - HoaAcn9 = (2 << 16) | 9, - HoaAcn10 = (2 << 16) | 10, - HoaAcn11 = (2 << 16) | 11, - HoaAcn12 = (2 << 16) | 12, - HoaAcn13 = (2 << 16) | 13, - HoaAcn14 = (2 << 16) | 14, - HoaAcn15 = (2 << 16) | 15, - HoaAcn65024 = (2 << 16) | 65024 + Discrete_65535 = (1<<16) | 65535 } [Flags] @@ -689,10 +663,7 @@ public enum AudioChannelLayoutTag : uint { // UInt32 AudioChannelLayoutTag DTS_8_0_B = (179<<16) | 8, DTS_8_1_A = (180<<16) | 9, DTS_8_1_B = (181<<16) | 9, - DTS_6_1_D = (182<<16) | 7, - - HOA_ACN_SN3D = (190U<<16), - HOA_ACN_N3D = (191U<<16), + DTS_6_1_D = (182<<16) | 7, DiscreteInOrder = (147<<16) | 0, // needs to be ORed with the actual number of channels Unknown = 0xFFFF0000 // needs to be ORed with the actual number of channels @@ -1140,6 +1111,7 @@ public override string ToString () } } +#if !WATCH [StructLayout(LayoutKind.Sequential)] public struct AudioBuffer { public int NumberChannels; @@ -1164,4 +1136,5 @@ public struct CABarBeatTime { public /* UInt16 */ ushort Reserved; } #endif +#endif // !WATCH } diff --git a/src/AudioUnit/AudioComponent.cs b/src/AudioUnit/AudioComponent.cs index a4fad8fefec..a3984660623 100644 --- a/src/AudioUnit/AudioComponent.cs +++ b/src/AudioUnit/AudioComponent.cs @@ -38,177 +38,6 @@ namespace XamCore.AudioUnit { - -#if !COREBUILD - // keys are not constants and had to be found in AudioToolbox.framework/Headers/AudioComponent.h - [NoWatch, NoTV, Mac (10,13), iOS (11,0)] - public partial class ResourceUsageInfo : DictionaryContainer { - static NSString userClientK = new NSString ("iokit.user-client"); - static NSString globalNameK = new NSString ("mach-lookup.global-name"); - static NSString networkClientK = new NSString ("network.client"); - static NSString exceptionK = new NSString ("temporary-exception.files.all.read-write"); - - public ResourceUsageInfo () : base () {} - - public ResourceUsageInfo (NSDictionary dic) : base (dic) {} - - public string[] IOKitUserClient { - get { - var array = GetNativeValue (userClientK); - if (array == null ) - return null; - return NSArray.StringArrayFromHandle (array.Handle); - } - set { - if (value == null) - RemoveValue (userClientK); - else - SetArrayValue (userClientK, value); - } - } - - public string[] MachLookUpGlobalName { - get { - var array = GetNativeValue (globalNameK); - if (array == null) - return null; - return NSArray.StringArrayFromHandle (array.Handle); - } - set { - if (value == null) - RemoveValue (globalNameK); - else - SetArrayValue (globalNameK, value); - } - } - - public bool? NetworkClient { - get { - return GetBoolValue (networkClientK); - } - set { - SetBooleanValue (networkClientK, value); - } - } - - public bool? TemporaryExceptionReadWrite { - get { - return GetBoolValue (exceptionK); - } - set { - SetBooleanValue (exceptionK, value); - } - } - } - - // keys are not constants and had to be found in AudioToolbox.framework/Headers/AudioComponent.h - [NoWatch, NoTV, Mac (10,13), iOS (11,0)] - public partial class AudioComponentInfo : DictionaryContainer { - static NSString typeK = new NSString ("type"); - static NSString subtypeK = new NSString ("subtype"); - static NSString manufacturerK = new NSString ("manufacturer"); - static NSString nameK = new NSString ("name"); - static NSString versionK = new NSString ("version"); - static NSString factoryFunctionK = new NSString ("factoryFunction"); - static NSString sandboxSafeK = new NSString ("sandboxSafe"); - static NSString resourceUsageK = new NSString ("resourceUsage"); - static NSString tagsK = new NSString ("tags"); - - public AudioComponentInfo () : base () {} - - public AudioComponentInfo (NSDictionary dic) : base (dic) {} - - public string Type { - get { - return GetStringValue (typeK); - } - set { - SetStringValue (typeK, value); - } - } - - public string Subtype { - get { - return GetStringValue (subtypeK); - } - set { - SetStringValue (subtypeK, value); - } - } - - public string Manufacturer { - get { - return GetStringValue (manufacturerK); - } - set { - SetStringValue (manufacturerK, value); - } - } - - public string Name { - get { - return GetStringValue (nameK); - } - set { - SetStringValue (nameK, value); - } - } - - public nuint? Version { - get { - return GetNUIntValue (versionK); - } - set { - SetNumberValue (versionK, value); - } - } - - public string FactoryFunction { - get { - return GetStringValue (factoryFunctionK); - } - set { - SetStringValue (factoryFunctionK, value); - } - } - - public bool? SandboxSafe { - get { - return GetBoolValue (sandboxSafeK); - } - set { - SetBooleanValue (sandboxSafeK, value); - } - } - - public ResourceUsageInfo ResourceUsage { - get { - return GetStrongDictionary (resourceUsageK); - } - set { - SetNativeValue (resourceUsageK, value?.Dictionary, true); - } - } - - public string[] Tags { - get { - var array = GetNativeValue (tagsK); - if (array == null) - return null; - return NSArray.StringArrayFromHandle (array.Handle); - } - set { - if (value == null) - RemoveValue (tagsK); - else - SetArrayValue (tagsK, value); - } - } - } - -#endif - - public class AudioComponent : INativeObject { #if !COREBUILD internal IntPtr handle; @@ -395,59 +224,6 @@ public XamCore.AppKit.NSImage GetIcon () return new XamCore.AppKit.NSImage (AudioComponentGetIcon (handle)); } #endif - -#if IOS || MONOMAC - [NoWatch, NoTV, Mac (10,13), iOS (11,0)] - [DllImport (Constants.AudioUnitLibrary)] - static extern int /* OSStatus */ AudioUnitExtensionSetComponentList (IntPtr /* CFString */ extensionIdentifier, /* CFArrayRef */ IntPtr audioComponentInfo); - - [NoWatch, NoTV, Mac (10,13), iOS (11,0)] - [DllImport (Constants.AudioUnitLibrary)] - static extern /* CFArrayRef */ IntPtr AudioUnitExtensionCopyComponentList (IntPtr /* CFString */ extensionIdentifier); - - [NoWatch, NoTV, Mac (10,13), iOS (11,0)] - public AudioComponentInfo[] ComponentList { - get { - using (var cfString = new CFString (Name)) { - var cHandle = AudioUnitExtensionCopyComponentList (cfString.Handle); - if (cHandle == IntPtr.Zero) - return null; - using (var nsArray = Runtime.GetNSObject (cHandle, owns: true)) { - if (nsArray == null) - return null; - // make things easier for developers since we do not know how to have an implicit conversion from NSObject to AudioComponentInfo - var dics = NSArray.FromArray (nsArray); - var result = new AudioComponentInfo [dics.Length]; - for (var i = 0; i < result.Length; i++) { - result [i] = new AudioComponentInfo (dics[i]); - } - return result; - } - } - } - set { - if (value == null) - throw new ArgumentNullException (nameof (value)); - using (var cfString = new CFString (Name)) { - var dics = new NSDictionary [value.Length]; - for (var i = 0; i < value.Length; i++) { - dics [i] = value [i].Dictionary; - } - using (var array = NSArray.FromNSObjects (dics)) { - var result = (AudioConverterError) AudioUnitExtensionSetComponentList (cfString.Handle, array.Handle); - switch (result) { - case AudioConverterError.None: - return; - default: - throw new InvalidOperationException ($"ComponentList could not be set, error {result.ToString ()}"); - - } - } - } - } - } -#endif - #endif // !COREBUILD } @@ -465,4 +241,4 @@ public static class AudioComponentConfigurationInfo { public static NSString ValidationResult = new NSString ("ValidationResult"); } #endif -} +} \ No newline at end of file diff --git a/src/AudioUnit/AudioComponentDescription.cs b/src/AudioUnit/AudioComponentDescription.cs index 6198fabb827..8b2bc1a2044 100644 --- a/src/AudioUnit/AudioComponentDescription.cs +++ b/src/AudioUnit/AudioComponentDescription.cs @@ -142,10 +142,10 @@ public enum AudioTypeMixer { // OSType in AudioComponentDescription Spacial=0x3364656d, // Same as Embedded3D #if MONOMAC Stereo=0x736d7872, // 'smxr' - [Availability (Deprecated = Platform.Mac_10_10, Message = "Use 'Spacial' instead.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Use Spacial instead")] ThreeD=0x33646d78, // '3dmx' #else - [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'Spacial' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Use Spacial instead")] Embedded3D=0x3364656d, // '3dem' #endif } diff --git a/src/AudioUnit/AudioUnit.cs b/src/AudioUnit/AudioUnit.cs index 60ae7eef178..3838a768112 100644 --- a/src/AudioUnit/AudioUnit.cs +++ b/src/AudioUnit/AudioUnit.cs @@ -63,10 +63,6 @@ public enum AudioUnitStatus { // Implictly cast to OSType Initialized = -10849, InvalidOfflineRender = -10848, Unauthorized = -10847, - [iOS (11,0), Mac (10,13, onlyOn64: true), TV (11,0), NoWatch] - MidiOutputBufferFull = -66753, - [iOS (11,0), Mac (10,13, onlyOn64: true), TV (11,0), NoWatch] - ExtensionNotFound = -66744, } public enum AudioComponentStatus { // Implictly cast to OSType @@ -356,50 +352,6 @@ public enum AudioUnitClumpID // UInt32 in AudioUnitParameterInfo System = 0 } - public enum AUParameterEventType : uint - { - Immediate = 1, - Ramped = 2, - } - - [StructLayout (LayoutKind.Sequential)] - public struct AudioUnitParameterEvent - { - public uint Scope; - public uint Element; - public uint Parameter; - public AUParameterEventType EventType; - - [StructLayout (LayoutKind.Explicit)] - public struct EventValuesStruct - { - [StructLayout (LayoutKind.Sequential)] - public struct RampStruct - { - public int StartBufferOffset; - public uint DurationInFrames; - public float StartValue; - public float EndValue; - } - - - [FieldOffset (0)] - public RampStruct Ramp; - - [StructLayout (LayoutKind.Sequential)] - public struct ImmediateStruct - { - public uint BufferOffset; - public float Value; - } - - [FieldOffset (0)] - public ImmediateStruct Immediate; - } - - public EventValuesStruct EventValues; - } - public class AudioUnit : IDisposable, XamCore.ObjCRuntime.INativeObject { internal IntPtr handle; @@ -508,7 +460,7 @@ static int renderCallback(IntPtr inRefCon, ref AudioUnitRenderActionFlags _ioAct #endif #if !XAMCORE_3_0 - [Obsolete ("Use 'SetFormat' instead as it has the ability of returning a status code.")] + [Obsolete ("Use SetFormat instead as it has the ability of returning a status code")] public void SetAudioFormat(XamCore.AudioToolbox.AudioStreamBasicDescription audioFormat, AudioUnitScopeType scope, uint audioUnitElement = 0) { var err = AudioUnitSetProperty(handle, @@ -549,7 +501,7 @@ public uint GetCurrentDevice (AudioUnitScopeType scope, uint audioUnitElement = #if !XAMCORE_3_0 || MONOMAC #if !MONOMAC - [Obsolete ("This API is not available on iOS.")] + [Obsolete ("This API is not available on iOS")] #endif public static uint GetCurrentInputDevice () { @@ -921,11 +873,6 @@ public AudioUnitStatus SetParameter (AudioUnitParameterType type, float value, A return AudioUnitSetParameter (handle, type, scope, audioUnitElement, value, 0); } - public AudioUnitStatus ScheduleParameter (AudioUnitParameterEvent inParameterEvent, uint inNumParamEvents) - { - return AudioUnitScheduleParameters (handle, inParameterEvent, inNumParamEvents); - } - public void Dispose() { Dispose (true); @@ -1085,9 +1032,6 @@ static extern AudioUnitStatus AudioUnitGetPropertyInfo (IntPtr inUnit, AudioUnit static extern AudioUnitStatus AudioUnitSetParameter (IntPtr inUnit, AudioUnitParameterType inID, AudioUnitScopeType inScope, uint inElement, float inValue, uint inBufferOffsetInFrames); - [DllImport (Constants.AudioUnitLibrary)] - static extern AudioUnitStatus AudioUnitScheduleParameters (IntPtr inUnit, AudioUnitParameterEvent inParameterEvent, uint inNumParamEvents); - #if MONOMAC [DllImport (Constants.AudioUnitLibrary)] static extern int AudioObjectGetPropertyData ( @@ -2015,8 +1959,7 @@ public enum AUSpatializationAlgorithm : uint Hrtf = 2, SoundField = 3, VectorBasedPanning = 4, - StereoPassThrough = 5, - HrtfHQ = 6, + StereoPassThrough = 5 } public enum AU3DMixerAttenuationCurve : uint @@ -2130,7 +2073,7 @@ public enum AudioUnitSubType : uint } #if !XAMCORE_4_0 && !COREBUILD #if XAMCORE_2_0 || !MONOMAC - [Obsolete ("Use 'AUImplementorStringFromValueCallback' instead.")] + [Obsolete ("Use AUImplementorStringFromValueCallback instead")] public delegate NSString _AUImplementorStringFromValueCallback (AUParameter param, IntPtr value); #endif #endif diff --git a/src/CFNetwork/CFHTTPStream.cs b/src/CFNetwork/CFHTTPStream.cs index 047645f693c..b0c124cd70e 100644 --- a/src/CFNetwork/CFHTTPStream.cs +++ b/src/CFNetwork/CFHTTPStream.cs @@ -20,7 +20,7 @@ namespace XamCore.CoreServices { #endif // all fields constants that this is using are deprecated in Xcode 7 - [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use 'NSUrlSession'.")] + [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use NSUrlSession")] public partial class CFHTTPStream : CFReadStream { internal CFHTTPStream (IntPtr handle) diff --git a/src/CloudKit/CKCompat.cs b/src/CloudKit/CKCompat.cs index 202d95c9c98..d9aef88830c 100644 --- a/src/CloudKit/CKCompat.cs +++ b/src/CloudKit/CKCompat.cs @@ -12,7 +12,7 @@ namespace XamCore.CloudKit { #if !XAMCORE_4_0 && !WATCH public partial class CKOperation { - [Obsoleted (PlatformName.iOS, 9,3, message: "Do not use; this API was removed and will always return 0.")] + [Obsoleted (PlatformName.iOS, 9,3, message: "Do not use; this API was removed in iOS 9.3 and will always return 0")] public virtual ulong ActivityStart () { return 0; @@ -21,7 +21,7 @@ public virtual ulong ActivityStart () public partial class CKNotificationID { - [Obsolete ("This type is not meant to be created by user code.")] + [Obsolete ("This type is not meant to be created by user code")] public CKNotificationID () { } diff --git a/src/CloudKit/Enums.cs b/src/CloudKit/Enums.cs index 7075c64976d..199d99ab879 100644 --- a/src/CloudKit/Enums.cs +++ b/src/CloudKit/Enums.cs @@ -80,7 +80,6 @@ public enum CKErrorCode : nint { [iOS (10,0), TV (10,0), Mac (10,12)] ReferenceViolation = 31, [iOS (10,0), TV (10,0), Mac (10,12)] ManagedAccountRestricted = 32, [iOS (10,0), TV (10,0), Mac (10,12)] ParticipantMayNeedVerification = 33, - [iOS (11,0), TV (11,0), Mac (10,13), Watch (4,0)] ResponseLost = 34, } // NSInteger -> CKModifyRecordsOperation.h @@ -103,7 +102,7 @@ public enum CKNotificationType : nint { Query = 1, RecordZone = 2, ReadNotification = 3, - [iOS (10,0), TV (10,0), Mac (10,12), Watch (3,0)] Database = 4, + [iOS (10,0), TV (10,0), Mac (10,12)] Database = 4, } // NSInteger -> CKNotification.h @@ -153,7 +152,7 @@ public enum CKSubscriptionType : nint { // NSInteger -> CKSubscription.h [NoWatch] - [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use 'CKQuerySubscriptionOptions' instead.")] + [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use CKQuerySubscriptionOptions instead")] [Flags] [Native] public enum CKSubscriptionOptions : nuint { @@ -216,18 +215,4 @@ public enum CKQuerySubscriptionOptions : nuint RecordDeletion = 1 << 2, FiresOnce = 1 << 3, } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum CKOperationGroupTransferSize : nint - { - Unknown, - Kilobytes, - Megabytes, - TensOfMegabytes, - HundredsOfMegabytes, - Gigabytes, - TensOfGigabytes, - HundredsOfGigabytes, - } } diff --git a/src/Constants.iOS.cs.in b/src/Constants.iOS.cs.in index d7247c38c0f..fe2270d4654 100644 --- a/src/Constants.iOS.cs.in +++ b/src/Constants.iOS.cs.in @@ -37,7 +37,6 @@ namespace MonoTouch { public const string MapKitLibrary = "/System/Library/Frameworks/MapKit.framework/MapKit"; public const string GameKitLibrary = "/System/Library/Frameworks/GameKit.framework/GameKit"; public const string EventKitLibrary = "/System/Library/Frameworks/EventKit.framework/EventKit"; - public const string EventKitUILibrary = "/System/Library/Frameworks/EventKitUI.framework/EventKitUI"; public const string ImageIOLibrary = "/System/Library/Frameworks/ImageIO.framework/ImageIO"; public const string AssetsLibraryLibrary = "/System/Library/Frameworks/AssetsLibrary.framework/AssetsLibrary"; public const string CoreVideoLibrary = "/System/Library/Frameworks/CoreVideo.framework/CoreVideo"; @@ -106,16 +105,5 @@ namespace MonoTouch { public const string UserNotificationsUILibrary = "/System/Library/Frameworks/UserNotificationsUI.framework/UserNotificationsUI"; public const string IntentsLibrary = "/System/Library/Frameworks/Intents.framework/Intents"; public const string IntentsUILibrary = "/System/Library/Frameworks/IntentsUI.framework/IntentsUI"; - // iOS 11.0 - public const string ARKitLibrary = "/System/Library/Frameworks/ARKit.framework/ARKit"; - public const string CoreNFCLibrary = "/System/Library/Frameworks/CoreNFC.framework/CoreNFC"; - public const string DeviceCheckLibrary = "/System/Library/Frameworks/DeviceCheck.framework/DeviceCheck"; - public const string IdentityLookupLibrary = "/System/Library/Frameworks/IdentityLookup.framework/IdentityLookup"; - public const string CoreMLLibrary = "/System/Library/Frameworks/CoreML.framework/CoreML"; - public const string VisionLibrary = "/System/Library/Frameworks/Vision.framework/Vision"; - public const string FileProviderLibrary = "/System/Library/Frameworks/FileProvider.framework/FileProvider"; - public const string FileProviderUILibrary = "/System/Library/Frameworks/FileProviderUI.framework/FileProviderUI"; - public const string IOSurfaceLibrary = "/System/Library/Frameworks/IOSurface.framework/IOSurface"; - public const string PdfKitLibrary = "/System/Library/Frameworks/PDFKit.framework/PDFKit"; } } diff --git a/src/Constants.mac.cs.in b/src/Constants.mac.cs.in index 5f08f1c7a01..629560446c2 100644 --- a/src/Constants.mac.cs.in +++ b/src/Constants.mac.cs.in @@ -125,12 +125,5 @@ namespace MonoMac { public const string PhotosLibrary = "/System/Library/Frameworks/Photos.framework/Photos"; public const string IntentsLibrary = "/System/Library/Frameworks/Intents.framework/Intents"; public const string MediaPlayerLibrary = "/System/Library/Frameworks/MediaPlayer.framework/MediaPlayer"; - - // macOS 10.13 - public const string CoreMLLibrary = "/System/Library/Frameworks/CoreML.framework/CoreML"; - public const string VisionLibrary = "/System/Library/Frameworks/Vision.framework/Vision"; - public const string IOSurfaceLibrary = "/System/Library/Frameworks/IOSurface.framework/IOSurface"; - public const string PhotosUILibrary = "/System/Library/Frameworks/Photos.framework/PhotosUI"; - public const string ExternalAccessoryLibrary = "/System/Library/Frameworks/ExternalAccessory.framework/ExternalAccessory"; } } diff --git a/src/Constants.tvos.cs.in b/src/Constants.tvos.cs.in index 940bd22ac0a..ce9c31ea4d7 100644 --- a/src/Constants.tvos.cs.in +++ b/src/Constants.tvos.cs.in @@ -69,10 +69,5 @@ namespace ObjCRuntime { // tvOS 10.2 public const string VideoToolboxLibrary = "/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox"; - // tvOS 11.0 - public const string DeviceCheckLibrary = "/System/Library/Frameworks/DeviceCheck.framework/DeviceCheck"; - public const string CoreMLLibrary = "/System/Library/Frameworks/CoreML.framework/CoreML"; - public const string VisionLibrary = "/System/Library/Frameworks/Vision.framework/Vision"; - public const string IOSurfaceLibrary = "/System/Library/Frameworks/IOSurface.framework/IOSurface"; } } diff --git a/src/Constants.watch.cs.in b/src/Constants.watch.cs.in index 52cf432001e..df181fa9691 100644 --- a/src/Constants.watch.cs.in +++ b/src/Constants.watch.cs.in @@ -42,11 +42,6 @@ namespace ObjCRuntime { // WatchOS 3.2 public const string IntentsLibrary = "/System/Library/Frameworks/Intents.framework/Intents"; - - // WatchOS 4.0 - public const string CoreBluetoothLibrary = "/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth"; - public const string CoreMLLibrary = "/System/Library/Frameworks/CoreML.framework/CoreML"; - public const string CoreVideoLibrary = "/System/Library/Frameworks/CoreVideo.framework/CoreVideo"; - public const string VisionLibrary = "/System/Library/Frameworks/Vision.framework/Vision"; + } } diff --git a/src/Contacts/CNEnums.cs b/src/Contacts/CNEnums.cs index d1ef6a26a15..4de1f60b257 100644 --- a/src/Contacts/CNEnums.cs +++ b/src/Contacts/CNEnums.cs @@ -94,13 +94,7 @@ public enum CNErrorCode : nint { ValidationTypeMismatch = 301, ValidationConfigurationError = 302, PredicateInvalid = 400, - PolicyViolation = 500, - [iOS (11,0), Mac (10,13)] - ClientIdentifierInvalid = 600, - [iOS (11,0), Mac (10,13)] - ClientIdentifierDoesNotExist = 601, - [iOS (11,0), Mac (10,13)] - VCardMalformed = 700, + PolicyViolation = 500 } // NSInteger -> CNPostalAddressFormatter.h diff --git a/src/Contacts/CNObsolete.cs b/src/Contacts/CNObsolete.cs index a52a5d69800..377370dbfe9 100644 --- a/src/Contacts/CNObsolete.cs +++ b/src/Contacts/CNObsolete.cs @@ -13,7 +13,7 @@ namespace XamCore.Contacts { public static partial class CNGroup_PredicatesExtension { #if !MONOMAC - [Obsolete ("This API is only available on macOS 10.11+.")] + [Obsolete ("This API is only available on OSX 10.11+")] public static Foundation.NSPredicate GetPredicateForSubgroupsInGroup (CNGroup This, string parentGroupIdentifier) { return null; diff --git a/src/Contacts/CNPostalAddress.cs b/src/Contacts/CNPostalAddress.cs new file mode 100644 index 00000000000..84700382198 --- /dev/null +++ b/src/Contacts/CNPostalAddress.cs @@ -0,0 +1,55 @@ +// +// CNPostalAddress.cs: Implements some nicer methods for CNPostalAddress +// +// Authors: +// Alex Soto +// +// Copyright 2015 Xamarin Inc. All rights reserved. +// + +using System; +using XamCore.Foundation; + +namespace XamCore.Contacts { +#if XAMCORE_2_0 // The Contacts framework uses generics heavily, which is only supported in Unified (for now at least) + // Strong typed Keys to enum + public enum CNPostalAddressKeyOption { + Street, + City, + State, + PostalCode, + Country, + IsoCountryCode + } + + public partial class CNPostalAddress { + + public static string LocalizeProperty (CNPostalAddressKeyOption option) + { + var srvc = LocalizeOptionsToNSString (option); + return LocalizeProperty (srvc); + } + + static NSString LocalizeOptionsToNSString (CNPostalAddressKeyOption option) + { + switch (option) { + case CNPostalAddressKeyOption.Street: + return CNPostalAddressKey.Street; + case CNPostalAddressKeyOption.City: + return CNPostalAddressKey.City; + case CNPostalAddressKeyOption.State: + return CNPostalAddressKey.State; + case CNPostalAddressKeyOption.PostalCode: + return CNPostalAddressKey.PostalCode; + case CNPostalAddressKeyOption.Country: + return CNPostalAddressKey.Country; + case CNPostalAddressKeyOption.IsoCountryCode: + return CNPostalAddressKey.IsoCountryCode; + default: + throw new ArgumentOutOfRangeException ("option"); + } + } + } +#endif // XAMCORE_2_0 +} + diff --git a/src/CoreAnimation/CAEnums.cs b/src/CoreAnimation/CAEnums.cs index 23caa9ecc8c..f20cd0c670b 100644 --- a/src/CoreAnimation/CAEnums.cs +++ b/src/CoreAnimation/CAEnums.cs @@ -31,7 +31,6 @@ using XamCore.Foundation; using System.Runtime.InteropServices; using XamCore.CoreGraphics; -using XamCore.ObjCRuntime; namespace XamCore.CoreAnimation { @@ -48,16 +47,6 @@ public enum CAEdgeAntialiasingMask : uint_compat_int { TopBottomEdges = TopEdge | BottomEdge } - [NoWatch] // headers not updated - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Native][Flags] - public enum CACornerMask : nuint { - MinXMinYCorner = 1 << 0, - MaxXMinYCorner = 1 << 1, - MinXMaxYCorner = 1 << 2, - MaxXMaxYCorner = 1 << 3, - } - #if MONOMAC // untyped enum -> CALayer.h (only on OSX headers) // note: autoresizingMask is an `unsigned int` @property diff --git a/src/CoreBluetooth/AdvertisementDataOptions.cs b/src/CoreBluetooth/AdvertisementDataOptions.cs index 35d8b242e35..96a398a59f3 100644 --- a/src/CoreBluetooth/AdvertisementDataOptions.cs +++ b/src/CoreBluetooth/AdvertisementDataOptions.cs @@ -37,7 +37,6 @@ namespace XamCore.CoreBluetooth { // It's intentionally not called AdvertisementDataOptions because different options // are valid in different contexts // - [Watch (4,0)] [iOS (6,0)] public class StartAdvertisingOptions : DictionaryContainer { diff --git a/src/CoreBluetooth/CBUUID.cs b/src/CoreBluetooth/CBUUID.cs index 43b6d6f6267..8d09c3963b0 100644 --- a/src/CoreBluetooth/CBUUID.cs +++ b/src/CoreBluetooth/CBUUID.cs @@ -205,15 +205,5 @@ public unsafe string ToString (bool fullUuid) return sb.ToString (); } - -#if MONOMAC - // workaround for 27160443 – Trello: https://trello.com/c/oqB27JA6 - // try new constant (10.13+) and fallback to the old/misnamed one - public static NSString CharacteristicValidRangeString { - get { - return CBUUIDCharacteristicValidRangeString ?? CBUUIDValidRangeString; - } - } -#endif } } diff --git a/src/CoreBluetooth/CoreBluetooth.cs b/src/CoreBluetooth/CoreBluetooth.cs index dc5ed96ae03..b35e460060f 100644 --- a/src/CoreBluetooth/CoreBluetooth.cs +++ b/src/CoreBluetooth/CoreBluetooth.cs @@ -113,10 +113,10 @@ public CBPeer () } } #endif -#if !WATCH && !XAMCORE_4_0 +#if !MONOMAC && !XAMCORE_4_0 public partial class CBCentralManager { - public new virtual CBCentralManagerState State { + public virtual CBCentralManagerState State { get { return (CBCentralManagerState)base.State; } diff --git a/src/CoreBluetooth/Enums.cs b/src/CoreBluetooth/Enums.cs index 6e7aa419426..f1bca381733 100644 --- a/src/CoreBluetooth/Enums.cs +++ b/src/CoreBluetooth/Enums.cs @@ -13,11 +13,13 @@ namespace XamCore.CoreBluetooth { - [Mac (10,13)] - [Watch (4,0)] +#if !MONOMAC [iOS (10,0)] [Native] public enum CBManagerState : nint { +#else + internal enum CBManagerState { +#endif Unknown = 0, Resetting, Unsupported, @@ -28,8 +30,7 @@ public enum CBManagerState : nint { // NSInteger -> CBCentralManager.h [Introduced (PlatformName.iOS, 5, 0)] - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CBManagerState' instead.")] - [NoWatch] + [Deprecated (PlatformName.iOS, 10, 0, message: "Use CBManagerState instead")] [Native] public enum CBCentralManagerState : nint { Unknown = CBManagerState.Unknown, @@ -42,8 +43,7 @@ public enum CBCentralManagerState : nint { // NSInteger -> CBPeripheralManager.h [Introduced (PlatformName.iOS, 6, 0)] - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CBManagerState' instead.")] - [NoWatch] + [Deprecated (PlatformName.iOS, 10, 0, message: "Use CBManagerState instead")] [Native] public enum CBPeripheralManagerState : nint { Unknown = CBManagerState.Unknown, @@ -55,19 +55,16 @@ public enum CBPeripheralManagerState : nint { } // NSInteger -> CBPeripheralManager.h - [Watch (4,0)] [Native] public enum CBPeripheralState : nint { Disconnected, Connecting, Connected, - [iOS (9,0)][Mac (10,13)] - Disconnecting, + Disconnecting } #if !XAMCORE_4_0 // NSInteger -> CBPeripheralManager.h - [Watch (4,0)] [Native] public enum CBPeripheralManagerAuthorizationStatus : nint { NotDetermined, @@ -78,7 +75,6 @@ public enum CBPeripheralManagerAuthorizationStatus : nint { #endif // NSUInteger -> CBCharacteristic.h - [Watch (4,0)] [Flags] [Native] public enum CBCharacteristicProperties : nuint_compat_int { @@ -90,13 +86,10 @@ public enum CBCharacteristicProperties : nuint_compat_int { Indicate = 32, AuthenticatedSignedWrites = 64, ExtendedProperties = 128, - [Mac (10,9)] NotifyEncryptionRequired = 0x100, - [Mac (10,9)] IndicateEncryptionRequired = 0x200 } - [Watch (4,0)] [ErrorDomain ("CBErrorDomain")] [Native] // NSInteger -> CBError.h public enum CBError : nint { @@ -111,15 +104,12 @@ public enum CBError : nint { PeripheralDisconnected, UUIDNotAllowed, AlreadyAdvertising, - [iOS (7,1)][Mac (10,13)] + // iOS7.1 ConnectionFailed, - [iOS (9,0)][Mac (10,13)] - ConnectionLimitReached, - [iOS (11,0)][TV (11,0)][Mac (10,13)] - UnknownDevice, + // iOS 9 + ConnectionLimitReached } - [Watch (4,0)] [ErrorDomain ("CBATTErrorDomain")] [Native] // NSInteger -> CBError.h public enum CBATTError : nint { @@ -144,7 +134,6 @@ public enum CBATTError : nint { } // NSInteger -> CBPeripheral.h - [Watch (4,0)] [Native] public enum CBCharacteristicWriteType : nint { WithResponse, @@ -152,8 +141,6 @@ public enum CBCharacteristicWriteType : nint { } // NSUInteger -> CBCharacteristic.h - [Mac (10,9)] - [Watch (4,0)] [Flags] [Native] public enum CBAttributePermissions : nuint_compat_int { @@ -164,7 +151,6 @@ public enum CBAttributePermissions : nuint_compat_int { } // NSInteger -> CBPeripheralManager.h - [Watch (4,0)] [Native] public enum CBPeripheralManagerConnectionLatency : nint { Low = 0, diff --git a/src/CoreBluetooth/GuidWrapper.cs b/src/CoreBluetooth/GuidWrapper.cs index 599496b8289..ff98b6d7bc7 100644 --- a/src/CoreBluetooth/GuidWrapper.cs +++ b/src/CoreBluetooth/GuidWrapper.cs @@ -58,8 +58,8 @@ public void ConnectPeripheral (CBPeripheral peripheral, PeripheralConnectionOpti ConnectPeripheral (peripheral, options == null ? null : options.Dictionary); } -#if !TVOS && !WATCH - [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_9_0, Message = "Use 'RetrievePeripheralsWithIdentifiers' instead.")] +#if !TVOS + [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_9_0, Message = "Use RetrievePeripheralsWithIdentifiers instead")] public void RetrievePeripherals (CBUUID [] peripheralUuids) { if (peripheralUuids == null) @@ -83,19 +83,19 @@ public void RetrievePeripherals (CBUUID peripheralUuid) #endif #if !XAMCORE_2_0 - [Obsolete ("Use the 'CBUUID' overload since Guid internal memory representation is different.")] + [Obsolete ("Use the CBUUID overload since Guid internal memory representation is different")] public void RetrievePeripherals (Guid [] peripheralUuids) { CFUUID.WithArray (peripheralUuids, "peripheralUuids", x => RetrievePeripherals (x)); } - [Obsolete ("Use the 'CBUUID' overload since Guid internal memory representation is different.")] + [Obsolete ("Use the CBUUID overload since Guid internal memory representation is different")] public void RetrievePeripherals (Guid peripheralUuid) { RetrievePeripherals (new [] { peripheralUuid }); } - [Obsolete ("Use the 'CBUUID' overload since Guid internal memory representation is different.")] + [Obsolete ("Use the CBUUID overload since Guid internal memory representation is different")] public void ScanForPeripherals (Guid [] serviceUuids, NSDictionary options) { if (serviceUuids == null) @@ -104,25 +104,25 @@ public void ScanForPeripherals (Guid [] serviceUuids, NSDictionary options) CFUUID.WithArray (serviceUuids, "serviceUuids", x => ScanForPeripherals (x, options)); } - [Obsolete ("Use the 'CBUUID' overload since Guid internal memory representation is different.")] + [Obsolete ("Use the CBUUID overload since Guid internal memory representation is different")] public void ScanForPeripherals (Guid[] serviceUuids, PeripheralScanningOptions options = null) { ScanForPeripherals (serviceUuids, options == null ? null : options.Dictionary); } - [Obsolete ("Use the 'CBUUID' overload since Guid internal memory representation is different.")] + [Obsolete ("Use the CBUUID overload since Guid internal memory representation is different")] public void ScanForPeripherals (Guid [] serviceUuids) { ScanForPeripherals (serviceUuids, null as NSDictionary); } - [Obsolete ("Use the 'CBUUID' overload since Guid internal memory representation is different.")] + [Obsolete ("Use the CBUUID overload since Guid internal memory representation is different")] public void ScanForPeripherals (Guid serviceUuid, NSDictionary options) { ScanForPeripherals (new [] { serviceUuid }, options); } - [Obsolete ("Use the 'CBUUID' overload since Guid internal memory representation is different.")] + [Obsolete ("Use the CBUUID overload since Guid internal memory representation is different")] public void ScanForPeripherals (Guid serviceUuid) { ScanForPeripherals (new [] { serviceUuid }, null as NSDictionary); diff --git a/src/CoreBluetooth/PeripheralConnectionOptions.cs b/src/CoreBluetooth/PeripheralConnectionOptions.cs index 1a6e4679780..6622f311030 100644 --- a/src/CoreBluetooth/PeripheralConnectionOptions.cs +++ b/src/CoreBluetooth/PeripheralConnectionOptions.cs @@ -33,7 +33,6 @@ namespace XamCore.CoreBluetooth { - [Watch (4,0)] public class PeripheralConnectionOptions : DictionaryContainer { #if !COREBUILD diff --git a/src/CoreData/Enums.cs b/src/CoreData/Enums.cs index 3b09557d5f6..36a54225927 100644 --- a/src/CoreData/Enums.cs +++ b/src/CoreData/Enums.cs @@ -51,10 +51,6 @@ public enum NSAttributeType : nuint { Boolean = 800, Date = 900, Binary = 1000, - [iOS (11,0), TV (11,0), Mac (10,13), Watch (4,0)] - Uuid = 1100, - [iOS (11,0), TV (11,0), Mac (10,13), Watch (4,0)] - Uri = 1200, Transformable = 1800, ObjectID = 2000 } @@ -151,9 +147,7 @@ public enum ValidationErrorType : nuint { InvalidDate = 1650, StringTooLong = 1660, StringTooShort = 1670, - StringPatternMatching = 1680, - [iOS (11,0), TV (11,0), Mac (10,13), Watch (4,0)] - InvalidUri = 1690, + StringPatternMatching = 1680 } [Native] @@ -189,37 +183,6 @@ public enum MigrationErrorType { MigrationManagerDestinationStore = 134160, EntityMigrationPolicy = 134170, InferredMappingModel = 134190, - ExternalRecordImport = 134200, - [iOS (11,0), TV (11,0), Mac (10,3), Watch (4,0)] - HistoryTokenExpired = 134301, - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum NSFetchIndexElementType : nuint - { - Binary, - RTree - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum NSPersistentHistoryChangeType : nint - { - Insert, - Update, - Delete - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum NSPersistentHistoryResultType : nint - { - StatusOnly = 0, - ObjectIds = 1, - Count = 2, - TransactionsOnly = 3, - ChangesOnly = 4, - TransactionsAndChanges = 5 + ExternalRecordImport = 134200 } } diff --git a/src/CoreFoundation/CFStream.cs b/src/CoreFoundation/CFStream.cs index 1e4b6cda17b..2ea4d117044 100644 --- a/src/CoreFoundation/CFStream.cs +++ b/src/CoreFoundation/CFStream.cs @@ -244,7 +244,7 @@ public static void CreatePairWithSocketToHost (string host, int port, internal extern static /* CFReadStreamRef __nonnull */ IntPtr CFReadStreamCreateForHTTPRequest ( /* CFAllocatorRef __nullable */ IntPtr alloc, /* CFHTTPMessageRef __nonnull */ IntPtr request); - [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use 'NSUrlSession'.")] + [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use NSUrlSession")] public static CFHTTPStream CreateForHTTPRequest (CFHTTPMessage request) { if (request == null) diff --git a/src/CoreGraphics/CGColorConverter.cs b/src/CoreGraphics/CGColorConverter.cs index 6f9a3645e08..3ee9cb913c5 100644 --- a/src/CoreGraphics/CGColorConverter.cs +++ b/src/CoreGraphics/CGColorConverter.cs @@ -21,17 +21,17 @@ namespace XamCore.CoreGraphics { // uint32_t enum -> CGColorConverter.h - [TV (9,2)][Obsoleted (PlatformName.TvOS, 10,0, message: "Replaced by 'CGColorConversionInfoTransformType'.")] - [iOS (9,3)][Obsoleted (PlatformName.iOS, 10,0, message: "Replaced by 'CGColorConversionInfoTransformType'.")] - [Obsolete ("Use 'CGColorConversionInfoTransformType'.")] + [TV (9,2)][Obsoleted (PlatformName.TvOS, 10,0, message: "Replaced by CGColorConversionInfoTransformType. This code does not work on tvOS 10+")] + [iOS (9,3)][Obsoleted (PlatformName.iOS, 10,0, message: "Replaced by CGColorConversionInfoTransformType. This code does not work on iOS 10+")] + [Obsolete ("Use CGColorConversionInfoTransformType")] public enum CGColorConverterTransformType : uint { FromSpace, ToSpace, ApplySpace } - [TV (9,2)][Obsoleted (PlatformName.TvOS, 10,0, message: "Replaced by 'GColorConversionInfoTriple'.")] - [iOS (9,3)][Obsoleted (PlatformName.iOS, 10,0, message: "Replaced by 'GColorConversionInfoTriple'.")] + [TV (9,2)][Obsoleted (PlatformName.TvOS, 10,0, message: "Replaced by GColorConversionInfoTriple. This code does not work on tvOS 10+")] + [iOS (9,3)][Obsoleted (PlatformName.iOS, 10,0, message: "Replaced by GColorConversionInfoTriple. This code does not work on iOS 10+")] [StructLayout (LayoutKind.Sequential)] public struct CGColorConverterTriple { public CGColorSpace Space; @@ -40,8 +40,8 @@ public struct CGColorConverterTriple { } // CGColorConverter.h - [TV (9,2)][Obsoleted (PlatformName.TvOS, 10,0, message: "Replaced by 'CGColorConversionInfo'.")] - [iOS (9,3)][Obsoleted (PlatformName.iOS, 10,0, message: "Replaced by 'CGColorConversionInfo'.")] + [TV (9,2)][Obsoleted (PlatformName.TvOS, 10,0, message: "Replaced by CGColorConversionInfo. This code does not work on tvOS 10+")] + [iOS (9,3)][Obsoleted (PlatformName.iOS, 10,0, message: "Replaced by CGColorConversionInfo. This code does not work on iOS 10+")] public class CGColorConverter : INativeObject, IDisposable { /* invoked by marshallers */ diff --git a/src/CoreGraphics/CGColorSpace.cs b/src/CoreGraphics/CGColorSpace.cs index 4f2994e4c2f..1534e137ab7 100644 --- a/src/CoreGraphics/CGColorSpace.cs +++ b/src/CoreGraphics/CGColorSpace.cs @@ -66,7 +66,7 @@ public class CGColorSpace : INativeObject internal IntPtr handle; #if !XAMCORE_3_0 - [Obsolete ("Use a real 'null' value instead of this managed wrapper over a null native instance.")] + [Obsolete ("Use a real `null` value instead of this managed wrapper over a null native instance")] #if XAMCORE_2_0 readonly #endif @@ -143,7 +143,7 @@ public static CGColorSpace CreateDeviceRGB () } #if !XAMCORE_3_0 - [Obsolete ("This method has been renamed 'CreateDeviceCmyk'.")] + [Obsolete ("This method has been renamed CreateDeviceCmyk()")] [EditorBrowsable (EditorBrowsableState.Never)] public static /* CGColorSpaceRef */ CGColorSpace CreateDeviceCMYK () { diff --git a/src/CoreGraphics/CGContext.cs b/src/CoreGraphics/CGContext.cs index 70cfc810de2..170b14fbebf 100644 --- a/src/CoreGraphics/CGContext.cs +++ b/src/CoreGraphics/CGContext.cs @@ -970,7 +970,7 @@ public void SetFontSize (nfloat size) extern static void CGContextSelectFont (/* CGContextRef */ IntPtr c, /* const char* __nullable */ string name, /* CGFloat */ nfloat size, CGTextEncoding textEncoding); - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the 'CoreText' API instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the CoreText API instead")] public void SelectFont (string name, nfloat size, CGTextEncoding textEncoding) { CGContextSelectFont (handle, name, size, textEncoding); @@ -1002,7 +1002,7 @@ public void ShowGlyphsAtPositions (ushort [] glyphs, CGPoint [] positions, int s [DllImport (Constants.CoreGraphicsLibrary)] extern static void CGContextShowText (/* CGContextRef */ IntPtr c, /* const char* __nullable */ string s, /* size_t */ nint length); - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the 'CoreText' API instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the CoreText API instead")] public void ShowText (string str, int count) { if (str == null) @@ -1012,7 +1012,7 @@ public void ShowText (string str, int count) CGContextShowText (handle, str, count); } - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the 'CoreText' API instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the CoreText API instead")] public void ShowText (string str) { CGContextShowText (handle, str, str == null ? 0 : str.Length); @@ -1021,7 +1021,7 @@ public void ShowText (string str) [DllImport (Constants.CoreGraphicsLibrary)] extern static void CGContextShowText (/* CGContextRef */ IntPtr c, /* const char* __nullable */ byte[] bytes, /* size_t */ nint length); - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the 'CoreText' API instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the CoreText API instead")] public void ShowText (byte[] bytes, int count) { if (bytes == null) @@ -1031,7 +1031,7 @@ public void ShowText (byte[] bytes, int count) CGContextShowText (handle, bytes, count); } - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the 'CoreText' API instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the CoreText API instead")] public void ShowText (byte[] bytes) { CGContextShowText (handle, bytes, bytes == null ? 0 : bytes.Length); @@ -1041,13 +1041,13 @@ public void ShowText (byte[] bytes) extern static void CGContextShowTextAtPoint (/* CGContextRef __nullable */ IntPtr c, /* CGFloat */ nfloat x, /* CGFloat */ nfloat y, /* const char* __nullable */ string str, /* size_t */ nint length); - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the 'CoreText' API instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the CoreText API instead")] public void ShowTextAtPoint (nfloat x, nfloat y, string str, int length) { CGContextShowTextAtPoint (handle, x, y, str, length); } - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the 'CoreText' API instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the CoreText API instead")] public void ShowTextAtPoint (nfloat x, nfloat y, string str) { CGContextShowTextAtPoint (handle, x, y, str, str == null ? 0 : str.Length); @@ -1070,13 +1070,13 @@ public void ShowTextAtPoint (nfloat x, nfloat y, byte[] bytes) extern static void CGContextShowGlyphs (/* CGContextRef __nullable */ IntPtr c, /* const CGGlyph * __nullable */ ushort [] glyphs, /* size_t */ nint count); - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the 'CoreText' API instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the CoreText API instead")] public void ShowGlyphs (ushort [] glyphs) { CGContextShowGlyphs (handle, glyphs, glyphs == null ? 0 : glyphs.Length); } - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the 'CoreText' API instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the CoreText API instead")] public void ShowGlyphs (ushort [] glyphs, int count) { if (glyphs == null) @@ -1090,7 +1090,7 @@ public void ShowGlyphs (ushort [] glyphs, int count) extern static void CGContextShowGlyphsAtPoint (/* CGContextRef */ IntPtr context, /* CGFloat */ nfloat x, /* CGFloat */ nfloat y, /* const CGGlyph * __nullable */ ushort [] glyphs, /* size_t */ nint count); - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the 'CoreText' API instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the CoreText API instead")] public void ShowGlyphsAtPoint (nfloat x, nfloat y, ushort [] glyphs, int count) { if (glyphs == null) @@ -1100,7 +1100,7 @@ public void ShowGlyphsAtPoint (nfloat x, nfloat y, ushort [] glyphs, int count) CGContextShowGlyphsAtPoint (handle, x, y, glyphs, count); } - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the 'CoreText' API instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the CoreText API instead")] public void ShowGlyphsAtPoint (nfloat x, nfloat y, ushort [] glyphs) { CGContextShowGlyphsAtPoint (handle, x, y, glyphs, glyphs == null ? 0 : glyphs.Length); @@ -1111,7 +1111,7 @@ extern static void CGContextShowGlyphsWithAdvances (/* CGContextRef __nullable * /* const CGGlyph * __nullable */ ushort [] glyphs, /* const CGSize * __nullable */ CGSize [] advances, /* size_t */ nint count); - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the 'CoreText' API instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use the CoreText API instead")] public void ShowGlyphsWithAdvances (ushort [] glyphs, CGSize [] advances, int count) { if (glyphs == null) diff --git a/src/CoreGraphics/CGPDFOperatorTable.cs b/src/CoreGraphics/CGPDFOperatorTable.cs index 9c21f6f891c..b0420adf8c2 100644 --- a/src/CoreGraphics/CGPDFOperatorTable.cs +++ b/src/CoreGraphics/CGPDFOperatorTable.cs @@ -92,7 +92,7 @@ public void SetCallback (string name, Action callback) })); } - [Advice ("Use the nicer SetCallback(string,Action) API when possible.")] + [Advice ("Use the nicer SetCallback(string,Action) API when possible (OSX)")] #endif // this API is ugly - but I do not see a better way with the AOT limitation public void SetCallback (string name, Action callback) diff --git a/src/CoreImage/CIFilter.cs b/src/CoreImage/CIFilter.cs index df6245ed98f..f6872048c95 100644 --- a/src/CoreImage/CIFilter.cs +++ b/src/CoreImage/CIFilter.cs @@ -643,7 +643,7 @@ bool SupportsInputImage { } #if MONOMAC && !XAMCORE_3_0 - [Obsolete ("This type has been renamed to CICmykHalftone.")] + [Obsolete ("This type has been renamed to CICmykHalftone")] public class CICMYKHalftone : CICmykHalftone { public CICMYKHalftone () {} public CICMYKHalftone (IntPtr handle) : base (handle) {} diff --git a/src/CoreImage/Enums.cs b/src/CoreImage/Enums.cs index 0694bfa1e56..7349c7d4505 100644 --- a/src/CoreImage/Enums.cs +++ b/src/CoreImage/Enums.cs @@ -22,7 +22,6 @@ // using System; -using XamCore.ObjCRuntime; namespace XamCore.CoreImage { @@ -45,14 +44,14 @@ public enum CIFormat { RGBAh = 1, #if MONOMAC RGBA16 = 2, - [Obsolete ("This value can not be shared across Mac/iOS binaries, future proof with kRGBAf instead.")] + [Obsolete ("This value can not be shared across Mac/iOS binaries, future proof with kRGBAf instead")] RGBAf = 3, // Please, do not add values into MonoMac/iOS without adding an explicit value #elif !XAMCORE_3_0 - [Obsolete ("This value can not be shared across Mac/iOS binaries, future proof with kBGRA8 instead.")] + [Obsolete ("This value can not be shared across Mac/iOS binaries, future proof with kBGRA8 instead")] BGRA8 = 2 , - [Obsolete ("This value can not be shared across Mac/iOS binaries, future proof with kRGBA8 instead.")] + [Obsolete ("This value can not be shared across Mac/iOS binaries, future proof with kRGBA8 instead")] RGBA8 = 3, // Please, do not add values into MonoMac/iOS without adding an explicit value #endif @@ -73,38 +72,4 @@ public enum CIFormat { RGh = 21, RGf = 22 } - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [Native] - public enum CIQRCodeErrorCorrectionLevel : nint { - L = 76, - M = 77, - Q = 81, - H = 72, - } - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [Native] - public enum CIDataMatrixCodeEccVersion : nint { - V000 = 0, - V050 = 50, - V080 = 80, - V100 = 100, - V140 = 140, - V200 = 200, - } - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [Native] - public enum CIRenderDestinationAlphaMode : nuint { - None = 0, - Premultiplied = 1, - Unpremultiplied = 2, - } } diff --git a/src/CoreLocation/CLCompat.cs b/src/CoreLocation/CLCompat.cs index ecd3af01fbd..6b7473be9f0 100644 --- a/src/CoreLocation/CLCompat.cs +++ b/src/CoreLocation/CLCompat.cs @@ -8,7 +8,7 @@ namespace XamCore.CoreLocation { #if !XAMCORE_2_0 public partial class CLBeaconRegion { - [Obsolete ("Does not return a valid instance on iOS 8.")] + [Obsolete ("Does not return a valid instance on iOS8")] public CLBeaconRegion () { } @@ -20,7 +20,7 @@ public CLBeaconRegion () #if !TVOS public partial class CLHeading { - [Obsolete ("Use the 'Description' property from 'NSObject'.")] + [Obsolete ("Use the Description property from NSObject")] public new virtual string Description () { return base.Description; @@ -30,7 +30,7 @@ public partial class CLHeading { public partial class CLLocation { - [Obsolete ("Use the 'Description' property from 'NSObject'.")] + [Obsolete ("Use the Description property from NSObject")] public new virtual string Description () { return base.Description; diff --git a/src/CoreLocation/CLEnums.cs b/src/CoreLocation/CLEnums.cs index 44b36dd4e5a..2def304da7a 100644 --- a/src/CoreLocation/CLEnums.cs +++ b/src/CoreLocation/CLEnums.cs @@ -87,7 +87,7 @@ public enum CLAuthorizationStatus : uint_compat_int { Restricted, Denied, - [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'AuthorizedAlways' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Use AuthorizedAlways instead")] Authorized, AuthorizedAlways = Authorized, AuthorizedWhenInUse diff --git a/src/CoreML/MLDictionaryFeatureProvider.cs b/src/CoreML/MLDictionaryFeatureProvider.cs deleted file mode 100644 index b426a8d4395..00000000000 --- a/src/CoreML/MLDictionaryFeatureProvider.cs +++ /dev/null @@ -1,25 +0,0 @@ -// -// MLDictionaryFeatureProvider.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.CoreML { - public partial class MLDictionaryFeatureProvider { - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - public MLFeatureValue this [string featureName] { - get { return GetFeatureValue (featureName); } - } - } -} -#endif diff --git a/src/CoreML/MLMultiArray.cs b/src/CoreML/MLMultiArray.cs deleted file mode 100644 index 650689f1ad0..00000000000 --- a/src/CoreML/MLMultiArray.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// MLMultiArray.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.CoreML { - public partial class MLMultiArray { - static NSNumber[] ConvertArray (nint[] value) - { - if (value == null) - return null; - - return Array.ConvertAll (value, NSNumber.FromNInt); - } - - // NSArray => nint[] - internal static nint[] ConvertArray (IntPtr handle) - { - return NSArray.ArrayFromHandle (handle, (v) => Messaging.nint_objc_msgSend (v, Selector.GetHandle ("integerValue"))); - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - public MLMultiArray (nint [] shape, MLMultiArrayDataType dataType, out NSError error) - : this (ConvertArray (shape), dataType, out error) - { - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - public MLMultiArray (IntPtr dataPointer, nint [] shape, MLMultiArrayDataType dataType, nint [] strides, Action deallocator, out NSError error) - : this (dataPointer, ConvertArray (shape), dataType, ConvertArray (strides), deallocator, out error) - { - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - public NSNumber this [nint idx] { - get { return GetObject (idx); } - set { SetObject (value, idx); } - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - public NSNumber this [params nint[] indices] { - get { return GetObject (indices); } - set { SetObject (value, indices); } - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - public NSNumber this [NSNumber [] key] { - get { return GetObject (key); } - set { SetObject (value, key); } - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - public NSNumber GetObject (params nint[] indices) - { - using (var arr = NSArray.FromNSObjects (NSNumber.FromNInt, indices)) - return GetObject (arr.GetHandle ()); - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - public void SetObject (NSNumber obj, params nint[] indices) - { - using (var arr = NSArray.FromNSObjects (NSNumber.FromNInt, indices)) - SetObject (obj, arr.GetHandle ()); - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - public nint[] Shape { - get { - return ConvertArray (_Shape); - } - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - public nint[] Strides { - get { - return ConvertArray (_Strides); - } - } - } -} -#endif diff --git a/src/CoreML/MLMultiArrayConstraint.cs b/src/CoreML/MLMultiArrayConstraint.cs deleted file mode 100644 index d8c3a3613ac..00000000000 --- a/src/CoreML/MLMultiArrayConstraint.cs +++ /dev/null @@ -1,25 +0,0 @@ -// -// MLMultiArrayConstraint.cs -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright 2017 Microsoft Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.CoreML { - public partial class MLMultiArrayConstraint { - public nint[] Shape { - get { - return MLMultiArray.ConvertArray (_Shape); - } - } - } -} -#endif diff --git a/src/CoreMedia/CMAttachmentBearer.cs b/src/CoreMedia/CMAttachmentBearer.cs index 428899145e8..68ca48e213b 100644 --- a/src/CoreMedia/CMAttachmentBearer.cs +++ b/src/CoreMedia/CMAttachmentBearer.cs @@ -28,23 +28,6 @@ public static NSDictionary GetAttachments (this ICMAttachmentBearer target, CMAt return Runtime.GetNSObject (attachments, true); } -#if XAMCORE_2_0 - // There is some API that needs a more strongly typed version of a NSDictionary - // and there is no easy way to downcast from NSDictionary to NSDictionary - public static NSDictionary GetAttachments (this ICMAttachmentBearer target, CMAttachmentMode attachmentMode) - where TKey : class, INativeObject - where TValue : class, INativeObject - { - if (target == null) - throw new ArgumentNullException (nameof (target)); - var attachments = CMCopyDictionaryOfAttachments (IntPtr.Zero, target.Handle, attachmentMode); - if (attachments == IntPtr.Zero) - return null; - - return Runtime.GetNSObject> (attachments, true); - } -#endif - [DllImport(Constants.CoreMediaLibrary)] extern static /* CFTypeRef */ IntPtr CMGetAttachment (/* CMAttachmentBearerRef */ IntPtr target, /* CFStringRef */ IntPtr key, /* CMAttachmentMode */ out CMAttachmentMode attachmentModeOut); diff --git a/src/CoreMedia/CMSync.cs b/src/CoreMedia/CMSync.cs index f5972bcd80d..482751c38d9 100644 --- a/src/CoreMedia/CMSync.cs +++ b/src/CoreMedia/CMSync.cs @@ -212,7 +212,7 @@ public double Rate { [DllImport(Constants.CoreMediaLibrary)] extern static /* CMTimebaseRef */ IntPtr CMTimebaseGetMasterTimebase (/* CMTimebaseRef */ IntPtr timebase); - [Availability (Introduced = Platform.iOS_6_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message="Use 'CopyMasterTimebase' instead.")] + [Availability (Introduced = Platform.iOS_6_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message="Please use CopyMasterTimebase")] public CMTimebase GetMasterTimebase () { var ptr = CMTimebaseGetMasterTimebase (Handle); @@ -225,7 +225,7 @@ public CMTimebase GetMasterTimebase () [DllImport(Constants.CoreMediaLibrary)] extern static /* CMClockRef */ IntPtr CMTimebaseGetMasterClock (/* CMTimebaseRef */ IntPtr timebase); - [Availability (Introduced = Platform.iOS_6_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message="Use 'CopyMasterClock' instead.")] + [Availability (Introduced = Platform.iOS_6_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message="Please use CopyMasterClock")] public CMClock GetMasterClock () { var ptr = CMTimebaseGetMasterClock (Handle); @@ -238,7 +238,7 @@ public CMClock GetMasterClock () [DllImport(Constants.CoreMediaLibrary)] extern static /* CMClockOrTimebaseRef */ IntPtr CMTimebaseGetMaster (/* CMTimebaseRef */ IntPtr timebase); - [Availability (Introduced = Platform.iOS_6_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message="Use 'CopyMaster' instead.")] + [Availability (Introduced = Platform.iOS_6_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message="Please use CopyMaster")] public CMClockOrTimebase GetMaster () { var ptr = CMTimebaseGetMaster (Handle); @@ -251,7 +251,7 @@ public CMClockOrTimebase GetMaster () [DllImport(Constants.CoreMediaLibrary)] extern static /* CMClockRef */ IntPtr CMTimebaseGetUltimateMasterClock (/* CMTimebaseRef */ IntPtr timebase); - [Availability (Introduced = Platform.iOS_6_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message="Use 'CopyUltimateMasterClock' instead.")] + [Availability (Introduced = Platform.iOS_6_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message="Please use CopyUltimateMasterClock")] public CMClock GetUltimateMasterClock () { var ptr = CMTimebaseGetUltimateMasterClock (Handle); diff --git a/src/CoreMedia/CoreMedia.cs b/src/CoreMedia/CoreMedia.cs index 54382224bd4..88dd775eba9 100644 --- a/src/CoreMedia/CoreMedia.cs +++ b/src/CoreMedia/CoreMedia.cs @@ -104,7 +104,7 @@ public struct CMTimeRange { public static readonly CMTimeRange Zero; #if !XAMCORE_3_0 - [Obsolete ("Use 'InvalidRange'.")] + [Obsolete ("Use InvalidRange")] public static readonly CMTimeRange Invalid; #endif public static readonly CMTimeRange InvalidRange; diff --git a/src/CoreMotion/CMCompat.cs b/src/CoreMotion/CMCompat.cs index a99ca467934..4ce59806016 100644 --- a/src/CoreMotion/CMCompat.cs +++ b/src/CoreMotion/CMCompat.cs @@ -9,7 +9,7 @@ namespace XamCore.CoreMotion { public partial class CMSensorRecorder { - [Obsolete ("Apple removed this API in iOS 9.3.")] + [Obsolete ("Apple removed this API in iOS 9.3")] public virtual CMSensorDataList GetAccelerometerDataSince (ulong identifier) { return null; diff --git a/src/CoreSpotlight/CSSearchableItemAttributeSet.cs b/src/CoreSpotlight/CSSearchableItemAttributeSet.cs index 807861c077e..f761e94e0c2 100644 --- a/src/CoreSpotlight/CSSearchableItemAttributeSet.cs +++ b/src/CoreSpotlight/CSSearchableItemAttributeSet.cs @@ -4,7 +4,6 @@ using System; using XamCore.Foundation; -using XamCore.ObjCRuntime; namespace XamCore.CoreSpotlight { @@ -18,34 +17,6 @@ public INSSecureCoding this [CSCustomAttributeKey key] { SetValue (value, key); } } - - // Manually deal with these properties until we get BindAs working - [iOS (11,0), NoTV, Mac (10, 11)] - public bool? IsUserCreated { - get { - return _IsUserCreated?.BoolValue; - } set { - _IsUserCreated = value.HasValue ? new NSNumber (value.Value) : null; - } - } - - [iOS (11, 0), NoTV, Mac (10, 11)] - public bool? IsUserOwned { - get { - return _IsUserOwned?.BoolValue; - } set { - _IsUserOwned = value.HasValue ? new NSNumber (value.Value) : null; - } - } - - [iOS (11, 0), NoTV, Mac (10, 11)] - public bool? IsUserCurated { - get { - return _IsUserCurated?.BoolValue; - } set { - _IsUserCurated = value.HasValue ? new NSNumber (value.Value) : null; - } - } } } diff --git a/src/CoreText/CTFont.cs b/src/CoreText/CTFont.cs index 911f342c283..298d9ad993e 100644 --- a/src/CoreText/CTFont.cs +++ b/src/CoreText/CTFont.cs @@ -2191,7 +2191,7 @@ public CTFontDescriptor [] GetDefaultCascadeList (string [] languages) var ret = new CTFontDescriptor [n]; for (nint i = 0; i < n; i++) - ret [i] = new CTFontDescriptor (retArray.GetValue (i), false); + ret [i] = new CTFontDescriptor (retArray.GetValue (i), true); return ret; } diff --git a/src/CoreText/CTFontManager.cs b/src/CoreText/CTFontManager.cs index 5c23e28105c..e1ece334be3 100644 --- a/src/CoreText/CTFontManager.cs +++ b/src/CoreText/CTFontManager.cs @@ -64,7 +64,7 @@ public static bool IsFontSupported (NSUrl url) return CTFontManagerIsSupportedFont (url.Handle); } #elif !XAMCORE_3_0 - [Obsolete ("API not available on iOS, it will always return false.")] + [Obsolete ("API not available on iOS, it will always return false")] [Availability (Deprecated = Platform.Mac_10_6, Unavailable = Platform.iOS_Version)] public static bool IsFontSupported (NSUrl url) { diff --git a/src/CoreVideo/CVBuffer.cs b/src/CoreVideo/CVBuffer.cs index 6925166e734..bb905d0e1e3 100644 --- a/src/CoreVideo/CVBuffer.cs +++ b/src/CoreVideo/CVBuffer.cs @@ -34,7 +34,6 @@ namespace XamCore.CoreVideo { // CVBuffer.h - [Watch (4,0)] [iOS (4,0)] public partial class CVBuffer : INativeObject #if !COREBUILD @@ -167,17 +166,6 @@ public NSDictionary GetAttachments (CVAttachmentMode attachmentMode) return (NSDictionary) Runtime.GetNSObject (CVBufferGetAttachments (handle, attachmentMode)); } -#if XAMCORE_2_0 - // There is some API that needs a more strongly typed version of a NSDictionary - // and there is no easy way to downcast from NSDictionary to NSDictionary - public NSDictionary GetAttachments (CVAttachmentMode attachmentMode) - where TKey : class, INativeObject - where TValue : class, INativeObject - { - return Runtime.GetNSObject> (CVBufferGetAttachments (handle, attachmentMode)); - } -#endif - [DllImport (Constants.CoreVideoLibrary)] extern static void CVBufferPropagateAttachments (/* CVBufferRef */ IntPtr sourceBuffer, /* CVBufferRef */ IntPtr destinationBuffer); diff --git a/src/CoreVideo/CVImageBuffer.cs b/src/CoreVideo/CVImageBuffer.cs index 357ac4907eb..185e9977d75 100644 --- a/src/CoreVideo/CVImageBuffer.cs +++ b/src/CoreVideo/CVImageBuffer.cs @@ -36,7 +36,6 @@ namespace XamCore.CoreVideo { // CVImageBuffer.h [iOS (4,0)] - [Watch (4,0)] public partial class CVImageBuffer : CVBuffer { #if !COREBUILD #if !XAMCORE_2_0 diff --git a/src/CoreVideo/CVOpenGLESTexture.cs b/src/CoreVideo/CVOpenGLESTexture.cs index 4d75f8ad155..2748e8a9701 100644 --- a/src/CoreVideo/CVOpenGLESTexture.cs +++ b/src/CoreVideo/CVOpenGLESTexture.cs @@ -7,9 +7,6 @@ // Copyright 2012-2015 Xamarin Inc // // - -#if !WATCH - using System; using System.Runtime.InteropServices; @@ -136,5 +133,3 @@ public void GetCleanTexCoords (out float [] lowerLeft, out float [] lowerRight, } } - -#endif diff --git a/src/CoreVideo/CVOpenGLESTextureCache.cs b/src/CoreVideo/CVOpenGLESTextureCache.cs index 0452f931624..09c0ab0f721 100644 --- a/src/CoreVideo/CVOpenGLESTextureCache.cs +++ b/src/CoreVideo/CVOpenGLESTextureCache.cs @@ -7,9 +7,6 @@ // Copyright 2012-2015 Xamarin Inc // // - -#if !WATCH - using System; using System.Runtime.InteropServices; @@ -158,5 +155,3 @@ extern static CVReturn CVOpenGLESTextureCacheCreateTextureFromImage ( /* CVOpenGLESTextureRef __nullable * __nonnull */ out IntPtr textureOut); } } - -#endif diff --git a/src/CoreVideo/CVPixelBuffer.cs b/src/CoreVideo/CVPixelBuffer.cs index 8fc24b5bf1e..66a1a1ab7db 100644 --- a/src/CoreVideo/CVPixelBuffer.cs +++ b/src/CoreVideo/CVPixelBuffer.cs @@ -14,7 +14,6 @@ namespace XamCore.CoreVideo { - [Watch (4,0)] [iOS (4,0)] public partial class CVPixelBuffer : CVImageBuffer { #if !COREBUILD @@ -455,7 +454,7 @@ extern static CVReturn CVPixelBufferLockBaseAddress ( /* CVPixelBufferRef __nonnull */ IntPtr pixelBuffer, CVPixelBufferLock lockFlags); #if !XAMCORE_3_0 - [Obsolete ("Use 'Lock (CVPixelBufferLock)' instead.")] + [Obsolete ("Use Lock(CVPixelBufferLock) instead")] public CVReturn Lock (CVOptionFlags lockFlags) { return CVPixelBufferLockBaseAddress (handle, (CVPixelBufferLock) lockFlags); @@ -472,7 +471,7 @@ extern static CVReturn CVPixelBufferUnlockBaseAddress ( /* CVPixelBufferRef __nonnull */ IntPtr pixelBuffer, CVPixelBufferLock unlockFlags); #if !XAMCORE_3_0 - [Obsolete ("Use 'Unlock (CVPixelBufferLock)'.")] + [Obsolete ("Use Unlock(CVPixelBufferLock)")] public CVReturn Unlock (CVOptionFlags unlockFlags) { return CVPixelBufferUnlockBaseAddress (handle, (CVPixelBufferLock) unlockFlags); diff --git a/src/CoreVideo/CVPixelBufferAttributes.cs b/src/CoreVideo/CVPixelBufferAttributes.cs index 45c0cbe2962..2686072103e 100644 --- a/src/CoreVideo/CVPixelBufferAttributes.cs +++ b/src/CoreVideo/CVPixelBufferAttributes.cs @@ -32,7 +32,6 @@ namespace XamCore.CoreVideo { - [Watch (4,0)] [iOS (6,0)] public class CVPixelBufferAttributes : DictionaryContainer { @@ -193,8 +192,7 @@ public bool? AllocateWithIOSurface { return GetNSDictionary (CVPixelBuffer.IOSurfacePropertiesKey) != null; } } - -#if !WATCH + [iOS (6,0)] public bool? OpenGLESCompatibility { set { @@ -214,7 +212,6 @@ public bool? MetalCompatibility { return GetBoolValue (CVPixelBuffer.MetalCompatibilityKey); } } -#endif // !WATCH #endif #endif } diff --git a/src/CoreVideo/CVPixelBufferPool.cs b/src/CoreVideo/CVPixelBufferPool.cs index eabf107c9a6..52160ad09a0 100644 --- a/src/CoreVideo/CVPixelBufferPool.cs +++ b/src/CoreVideo/CVPixelBufferPool.cs @@ -16,7 +16,6 @@ namespace XamCore.CoreVideo { // CVPixelBufferPool.h - [Watch (4,0)] [iOS (4,0)] public partial class CVPixelBufferPool : INativeObject #if !COREBUILD diff --git a/src/CoreVideo/CVPixelBufferPoolSettings.cs b/src/CoreVideo/CVPixelBufferPoolSettings.cs index 382a3c0e345..a715bf934e7 100644 --- a/src/CoreVideo/CVPixelBufferPoolSettings.cs +++ b/src/CoreVideo/CVPixelBufferPoolSettings.cs @@ -33,7 +33,6 @@ namespace XamCore.CoreVideo { - [Watch (4,0)] public class CVPixelBufferPoolSettings : DictionaryContainer { #if !COREBUILD @@ -67,7 +66,6 @@ public double? MaximumBufferAgeInSeconds { #endif } - [Watch (4,0)] public partial class CVPixelBufferPoolAllocationSettings : DictionaryContainer { #if !COREBUILD public CVPixelBufferPoolAllocationSettings () diff --git a/src/CoreVideo/CVPixelFormatDescription.cs b/src/CoreVideo/CVPixelFormatDescription.cs index 1fb3d3edffa..bdd61b5a534 100644 --- a/src/CoreVideo/CVPixelFormatDescription.cs +++ b/src/CoreVideo/CVPixelFormatDescription.cs @@ -33,7 +33,6 @@ namespace XamCore.CoreVideo { - [Watch (4,0)] [iOS (4,0)] public static class CVPixelFormatDescription { #if !COREBUILD diff --git a/src/CoreVideo/CVTime.cs b/src/CoreVideo/CVTime.cs index 6f5f5de02aa..36a71763e2b 100644 --- a/src/CoreVideo/CVTime.cs +++ b/src/CoreVideo/CVTime.cs @@ -33,7 +33,6 @@ namespace XamCore.CoreVideo { // CVBase.h - [Watch (4,0)] public struct CVTime { public /* int64_t */ long TimeValue; diff --git a/src/CoreVideo/CoreVideo.cs b/src/CoreVideo/CoreVideo.cs index 1d617251db5..773e730ad88 100644 --- a/src/CoreVideo/CoreVideo.cs +++ b/src/CoreVideo/CoreVideo.cs @@ -33,14 +33,12 @@ namespace XamCore.CoreVideo { // uint32_t -> CVBuffer.h - [Watch (4,0)] public enum CVAttachmentMode : uint { ShouldNotPropagate = 0, ShouldPropagate = 1, } [Flags] - [Watch (4,0)] #if XAMCORE_4_0 public enum CVPixelBufferLock : ulong { #else @@ -53,34 +51,29 @@ public enum CVPixelBufferLock : uint_compat_int { } // CVPixelBuffer.h - [Watch (4,0)] public struct CVPlanarComponentInfo { public /* int32_t */ int Offset; public /* uint32_t */ uint RowBytes; } // CVPixelBuffer.h - [Watch (4,0)] public struct CVPlanarPixelBufferInfo { public CVPlanarComponentInfo[] ComponentInfo; } // CVPixelBuffer.h - [Watch (4,0)] public struct CVPlanarPixelBufferInfo_YCbCrPlanar { public CVPlanarComponentInfo ComponentInfoY; public CVPlanarComponentInfo ComponentInfoCb; public CVPlanarComponentInfo ComponentInfoCr; } - [Watch (4,0)] public struct CVPlanarPixelBufferInfo_YCbCrBiPlanar { public CVPlanarComponentInfo ComponentInfoY; public CVPlanarComponentInfo ComponentInfoCbCr; } // int32_t -> CVReturn.h - [Watch (4,0)] public enum CVReturn : int { Success = 0, First = -6660, @@ -106,12 +99,10 @@ public enum CVReturn : int { // uint64_t -> CVBase.h - [Watch (4,0)] public enum CVOptionFlags : long { None = 0, } - [Watch (4,0)] public struct CVTimeStamp { public UInt32 Version; public Int32 VideoTimeScale; @@ -124,7 +115,6 @@ public struct CVTimeStamp { public UInt64 Reserved; } - [Watch (4,0)] public struct CVSMPTETime { public Int16 Subframes; public Int16 SubframeDivisor; @@ -138,13 +128,11 @@ public struct CVSMPTETime { } [Flags] - [Watch (4,0)] public enum CVTimeFlags : int { IsIndefinite = 1 << 0 } [Flags] - [Watch (4,0)] #if XAMCORE_2_0 public enum CVTimeStampFlags : ulong { #else @@ -162,13 +150,11 @@ public enum CVTimeStampFlags { } [Flags] - [Watch (4,0)] public enum CVSMPTETimeFlags : uint_compat_int { Valid = (1 << 0), Running = (1 << 1) } - [Watch (4,0)] public enum CVSMPTETimeType : uint_compat_int { Type24 = 0, Type25 = 1, @@ -180,18 +166,15 @@ public enum CVSMPTETimeType : uint_compat_int { Type5994 = 7 } - [Watch (4,0)] public struct CVFillExtendedPixelsCallBackData { public nint /* CFIndex */ Version; public CVFillExtendedPixelsCallBack FillCallBack; public IntPtr UserInfo; } - [Watch (4,0)] public delegate bool CVFillExtendedPixelsCallBack (IntPtr pixelBuffer, IntPtr refCon); // CVOptionFlags (uint64_t) -> CVPixelBufferPool.h - [Watch (4,0)] [iOS (9,0)][Mac (10,11)] public enum CVPixelBufferPoolFlushFlags : ulong { FlushExcessBuffers = 1, diff --git a/src/CoreWlan/CWInterface.cs b/src/CoreWlan/CWInterface.cs index 1fd6e7b6b24..8f330c5906e 100644 --- a/src/CoreWlan/CWInterface.cs +++ b/src/CoreWlan/CWInterface.cs @@ -49,24 +49,5 @@ public CWNetwork [] ScanForNetworksWithName (string networkName, out NSError err return networks.ToArray (); return null; } - - [Mac (10,13)] - public CWNetwork [] ScanForNetworksWithSsid (NSData ssid, bool includeHidden, out NSError error) - { - NSSet networks = _ScanForNetworksWithSsid (ssid, includeHidden, out error); - if (networks != null) - return networks.ToArray (); - return null; - } - - [Mac (10,13)] - public CWNetwork [] ScanForNetworksWithName (string networkName, bool includeHidden, out NSError error) - { - NSSet networks = _ScanForNetworksWithName (networkName, includeHidden, out error); - if (networks != null) - return networks.ToArray (); - return null; - } - } } diff --git a/src/EventKit/EKEnums.cs b/src/EventKit/EKEnums.cs index b15ec7c2e1f..81336520f05 100644 --- a/src/EventKit/EKEnums.cs +++ b/src/EventKit/EKEnums.cs @@ -79,7 +79,7 @@ public enum EKErrorCode : nint { // untyped enum -> EKTypes.h // Special note: some API (like `dayOfWeek:` and `dayOfWeek:weekNumber:` use an `NSInteger` instead of the enum - [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use 'EKWeekday'.")] + [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use EKWeekday")] public enum EKDay { NotSet = 0, Sunday = 1, diff --git a/src/EventKit/EventKit.cs b/src/EventKit/EventKit.cs index cb6b4e93773..3c4553aa414 100644 --- a/src/EventKit/EventKit.cs +++ b/src/EventKit/EventKit.cs @@ -72,13 +72,6 @@ public virtual EKRecurrenceRule RecurrenceRule { get { throw new NotSupportedException (); } set { throw new NotSupportedException (); } } -#endif - } - - partial class EKAlarm { -#if !XAMCORE_4_0 - [Obsolete ("Use the static methods FromDate or FromTimeInterval to create alarms")] - public EKAlarm () {} #endif } } diff --git a/src/EventKitUI/EKUIBundle.cs b/src/EventKitUI/EKUIBundle.cs deleted file mode 100644 index e4fb93a21b6..00000000000 --- a/src/EventKitUI/EKUIBundle.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -// EventKitUIBundle C# bindings -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 -using System; -using System.Runtime.InteropServices; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.EventKitUI { - public static class EKUIBundle { - - [iOS (11,0)] - [DllImport (Constants.EventKitUILibrary)] - static extern IntPtr EventKitUIBundle (); - - [iOS (11,0)] - public static NSBundle UIBundle { get; } = Runtime.GetNSObject (EventKitUIBundle ()); - } -} -#endif diff --git a/src/ExternalAccessory/EAEnums.cs b/src/ExternalAccessory/EAEnums.cs index bf22376b3fa..19cbcebc681 100644 --- a/src/ExternalAccessory/EAEnums.cs +++ b/src/ExternalAccessory/EAEnums.cs @@ -9,7 +9,6 @@ namespace XamCore.ExternalAccessory { - [NoMac] [TV (10,0)] [iOS (8,0)] [Native] @@ -20,7 +19,6 @@ public enum EAWiFiUnconfiguredAccessoryProperties : nuint { SupportsHomeKit = (1 << 2), // iOS 8 beta 5 } - [NoMac] [TV (10,0)] [iOS (8,0)] [Native] @@ -32,7 +30,6 @@ public enum EAWiFiUnconfiguredAccessoryBrowserState : nint { } // NSInteger -> EAWiFiUnconfiguredAccessoryBrowser.h - [NoMac] [TV (10,0)] [iOS (8,0)] [Native] @@ -45,7 +42,6 @@ public enum EAWiFiUnconfiguredAccessoryConfigurationStatus : nint { // NSInteger -> EAAccessoryManager.h [TV (10,0)] [iOS (6,0)] - [Mac (10, 13)] [Native] [ErrorDomain ("EABluetoothAccessoryPickerErrorDomain")] public enum EABluetoothAccessoryPickerError : nint { diff --git a/src/Foundation/Compat.cs b/src/Foundation/Compat.cs index 29c435f71f8..c90643b7732 100644 --- a/src/Foundation/Compat.cs +++ b/src/Foundation/Compat.cs @@ -14,7 +14,7 @@ namespace XamCore.Foundation { #if !XAMCORE_3_0 public partial class NSOperation { - [Obsolete ("Use 'WaitUntilFinished' method.")] + [Obsolete ("Use WaitUntilFinished method")] public virtual void WaitUntilFinishedNS () { WaitUntilFinished (); @@ -25,7 +25,7 @@ public virtual void WaitUntilFinishedNS () #if !XAMCORE_4_0 && (XAMCORE_2_0 || !MONOMAC) && !WATCH public partial class NSUserActivity { - [Obsolete ("Use the constructor that allows you to set an activity type.")] + [Obsolete ("Use the constructor that allows you to set an activity type")] public NSUserActivity () #if XAMCORE_2_0 : this (String.Empty) diff --git a/src/Foundation/Enum.cs b/src/Foundation/Enum.cs index 8f7131780a5..dbcf9d2de91 100644 --- a/src/Foundation/Enum.cs +++ b/src/Foundation/Enum.cs @@ -226,7 +226,7 @@ public enum NSDataWritingOptions : nuint { WithoutOverwriting = 2, #if !XAMCORE_2_0 - [Obsolete ("No longer available.")] + [Obsolete ("No longer available")] Coordinated = 1 << 2, #endif @@ -363,8 +363,6 @@ public enum NSCocoaError : int { CoderReadCorruptError = 4864, CoderValueNotFoundError = 4865, - [Mac (10,13), iOS (11,0), Watch (4,0), TV (11,0)] - CoderInvalidValueError = 4866, CoderErrorMinimum = 4864, CoderErrorMaximum = 4991, @@ -724,9 +722,7 @@ public enum NSJsonReadingOptions : nuint_compat_int { [Flags] [Native] public enum NSJsonWritingOptions : nuint_compat_int { - PrettyPrinted = 1, - [Mac (10,13), iOS (11,0), TV (11,0), Watch (4,0)] - SortedKeys = (1 << 1), + PrettyPrinted = 1 } [Native] @@ -809,7 +805,7 @@ public enum NSUnderlineStyle : nint { #if !MONOMAC || !XAMCORE_3_0 [Native] #if MONOMAC - [Obsolete ("Use NSWritingDirection in AppKit instead.")] + [Obsolete ("Use NSWritingDirection in AppKit instead")] #endif public enum NSWritingDirection : nint { Natural = -1, LeftToRight = 0, RightToLeft = 1, @@ -933,7 +929,7 @@ public enum NSDataBase64EncodingOptions : nuint_compat_int { } #if !XAMCORE_3_0 - [iOS (7,0)][Deprecated (PlatformName.iOS, 9, 0, message: "Use 'NSWritingDirectionFormatType'.")] + [iOS (7,0)][Deprecated (PlatformName.iOS, 9, 0, message: "Use NSWritingDirectionFormatType")] [Flags] [Native] public enum NSTextWritingDirection : nint { @@ -1113,14 +1109,12 @@ public override string ToString () } } - [Mac (10,10,3)] - [Watch (4,0)] - [TV (11,0)] - [iOS (11,0)] +#if MONOMAC [Native] public enum NSProcessInfoThermalState : nint { Nominal, Fair, Serious, Critical } +#endif [Native] #if XAMCORE_2_0 @@ -1241,8 +1235,6 @@ public enum NSIso8601DateFormatOptions : nuint { DashSeparatorInDate = 1 << 8, ColonSeparatorInTime = 1 << 9, ColonSeparatorInTimeZone = 1 << 10, - [Mac (10,13), iOS (11,0), TV (11,0), Watch (4,0)] - FractionalSeconds = 1 << 11, FullDate = Year | Month | Day | DashSeparatorInDate, FullTime = Time | ColonSeparatorInTime | TimeZone | ColonSeparatorInTimeZone, InternetDateTime = FullDate | FullTime, @@ -1266,36 +1258,4 @@ public enum NSMeasurementFormatterUnitOptions : nuint { TemperatureWithoutUnit = (1 << 2) } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Native] - public enum NSItemProviderRepresentationVisibility : nint { - All = 0, - Team = 1, - Group = 2, - OwnProcess = 3, - } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Native] - public enum NSItemProviderFileOptions : nint { - OpenInPlace = 1, - } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Native] - public enum NSLinguisticTaggerUnit : nint { - Word, - Sentence, - Paragraph, - Document, - } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Native] - public enum NSUrlSessionDelayedRequestDisposition : nint { - ContinueLoading = 0, - UseNewRequest = 1, - Cancel = 2, - } } diff --git a/src/Foundation/Enums.cs b/src/Foundation/Enums.cs index 2c845f17717..8e1b2bd67e4 100644 --- a/src/Foundation/Enums.cs +++ b/src/Foundation/Enums.cs @@ -116,13 +116,4 @@ public enum NSStringTransform { [Field ("NSStringTransformStripDiacritics")] StripDiacritics, } - - [NoWatch, NoTV, NoMac, iOS (11, 0)] - [Native] - public enum NSUrlSessionMultipathServiceType : nint { - None = 0, - Handover = 1, - Interactive = 2, - Aggregate = 3, - } } diff --git a/src/Foundation/NSDictionary_2.cs b/src/Foundation/NSDictionary_2.cs index 50a9528491f..d25804b0b86 100644 --- a/src/Foundation/NSDictionary_2.cs +++ b/src/Foundation/NSDictionary_2.cs @@ -166,7 +166,7 @@ public static NSDictionary FromObjectsAndKeys (TValue [] objects, #if XAMCORE_4_0 public static NSDictionary FromObjectsAndKeys (TValue [] objects, TKey [] keys) #else - [Obsolete ("'TKey' and 'TValue' are inversed and won't work unless both types are identical. Use the generic overload that takes a count parameter instead.")] + [Obsolete ("TKey and TValue are inversed and won't work unless both types are identical. Use the generic overload that takes a count parameter instead")] public static NSDictionary FromObjectsAndKeys (TKey [] objects, TValue [] keys) #endif { diff --git a/src/Foundation/NSDistributedNotificationCenter.cs b/src/Foundation/NSDistributedNotificationCenter.cs index 762f7dde1f8..c417c5c9533 100644 --- a/src/Foundation/NSDistributedNotificationCenter.cs +++ b/src/Foundation/NSDistributedNotificationCenter.cs @@ -14,15 +14,15 @@ namespace XamCore.Foundation { - [Obsolete ("This is not available in iOS.")] + [Obsolete ("This is not available in iOS")] public partial class NSDistributedNotificationCenter { - [Obsolete ("This is not available in iOS.")] + [Obsolete ("This is not available in iOS")] public void AddObserver (NSObject observer, Selector aSelector, string aName, string anObject) { } - [Obsolete ("This is not available in iOS.")] + [Obsolete ("This is not available in iOS")] public void RemoveObserver (NSObject observer, string aName, string anObject) { } diff --git a/src/Foundation/NSExpression.cs b/src/Foundation/NSExpression.cs index 79462354fc9..acb130491f0 100644 --- a/src/Foundation/NSExpression.cs +++ b/src/Foundation/NSExpression.cs @@ -166,7 +166,7 @@ public virtual NSExpression Operand { } #if !XAMCORE_4_0 && !WATCH - [Obsolete("Use 'EvaluateWith' instead.")] + [Obsolete("ValueWithObject is deprecated, please use EvaluateWith instead.")] public virtual NSExpression ExpressionValueWithObject (NSObject obj, NSMutableDictionary context) { var result = EvaluateWith (obj, context); // if it can be casted, do return an NSEXpression else null diff --git a/src/Foundation/NSFileManagerDelegate.cs b/src/Foundation/NSFileManagerDelegate.cs index 8ec4b64b0fe..291bd15de7b 100644 --- a/src/Foundation/NSFileManagerDelegate.cs +++ b/src/Foundation/NSFileManagerDelegate.cs @@ -19,7 +19,7 @@ public virtual bool ShouldCopyItemAtPath (NSFileManager fileManager, string srcP } #if !XAMCORE_3_0 - [Obsolete ("API removed after iOS 2.0 / macOS 10.5. It will never be called by the OS.")] + [Obsolete ("API removed after iOS 2.0 / OSX 10.5. It will never be called by the OS.")] public virtual bool ShouldProceedAfterError (NSFileManager fm, NSDictionary errorInfo) { return false; @@ -35,7 +35,7 @@ public static bool ShouldCopyItemAtPath (this INSFileManagerDelegate This, NSFil } #if !XAMCORE_3_0 - [Obsolete ("API removed after iOS 2.0 / macOS 10.5. It will never be called by the OS.")] + [Obsolete ("API removed after iOS 2.0 / OSX 10.5. It will never be called by the OS.")] public static bool ShouldProceedAfterError (INSFileManagerDelegate This, NSFileManager fm, NSDictionary errorInfo) { return false; diff --git a/src/Foundation/NSFormatter.cs b/src/Foundation/NSFormatter.cs index 7a5546f8f48..2d83a7da3dc 100644 --- a/src/Foundation/NSFormatter.cs +++ b/src/Foundation/NSFormatter.cs @@ -3,7 +3,7 @@ namespace XamCore.Foundation { public partial class NSFormatter { #if !XAMCORE_4_0 - [Obsolete ("Use 'IsPartialStringValid (ref string partialString, out NSRange proposedSelRange, string origString, NSRange origSelRange, out string error)' instead.")] + [Obsolete ("Use IsPartialStringValid (ref string partialString, out NSRange proposedSelRange, string origString, NSRange origSelRange, out string error) instead")] public virtual bool IsPartialStringValid (out string partialString, out NSRange proposedSelRange, string origString, NSRange origSelRange, out NSString error) { partialString = origString; diff --git a/src/Foundation/NSItemProvider.cs b/src/Foundation/NSItemProvider.cs index b511b55ca2e..8359ad60453 100644 --- a/src/Foundation/NSItemProvider.cs +++ b/src/Foundation/NSItemProvider.cs @@ -1,15 +1,14 @@ using System; using System.Threading.Tasks; using XamCore.CloudKit; -using XamCore.ObjCRuntime; namespace XamCore.Foundation { -#if (MONOMAC || IOS) && XAMCORE_2_0 // Only 64-bit on mac +#if MONOMAC && XAMCORE_2_0 // Only 64-bit on mac public partial class NSItemProvider { -#if !XAMCORE_4_0 && MONOMAC - [Obsolete ("Use RegisterCloudKitShare (CloudKitRegistrationPreparationAction) instead.")] +#if !XAMCORE_4_0 + [Obsolete ("Use RegisterCloudKitShare (CloudKitRegistrationPreparationAction) instead")] public virtual void RegisterCloudKitShare (Action preparationHandler) { CloudKitRegistrationPreparationAction action = handler => preparationHandler (handler); @@ -17,7 +16,6 @@ public virtual void RegisterCloudKitShare (Action RegisterCloudKitShareAsync () { var tcs = new TaskCompletionSource (); @@ -27,45 +25,6 @@ public virtual Task RegisterCloudKitShar RegisterCloudKitShare (action); return tcs.Task; } -#endif - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - public NSProgress LoadObject (Action completionHandler) where T: NSObject, INSItemProviderReading - { - return LoadObject (new Class (typeof (T)), (rv, err) => - { - var obj = rv as T; - if (obj == null && rv != null) - obj = Runtime.ConstructNSObject (rv.Handle); - completionHandler (obj, err); - }); - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - public Task LoadObjectAsync () where T: NSObject, INSItemProviderReading - { - var rv = LoadObjectAsync (new Class (typeof (T))); - return rv.ContinueWith ((v) => - { - var obj = v.Result as T; - if (obj == null && v.Result != null) - obj = Runtime.ConstructNSObject (v.Result.Handle); - return obj; - }); - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - public Task LoadObjectAsync (out NSProgress result) where T: NSObject, INSItemProviderReading - { - var rv = LoadObjectAsync (new Class (typeof (T)), out result); - return rv.ContinueWith ((v) => - { - var obj = v.Result as T; - if (obj == null && v.Result != null) - obj = Runtime.ConstructNSObject (v.Result.Handle); - return obj; - }); - } } -#endif // (MONOMAC || IOS) && XAMCORE_2_0 +#endif } diff --git a/src/Foundation/NSMetadataItem.cs b/src/Foundation/NSMetadataItem.cs index f2b7a3b5a20..72de9c50220 100644 --- a/src/Foundation/NSMetadataItem.cs +++ b/src/Foundation/NSMetadataItem.cs @@ -18,34 +18,12 @@ bool GetBool (NSString key) return n == null ? false : n.BoolValue; } - bool? GetNullableBool (NSString key) - { - var n = Runtime.GetNSObject (GetHandle (key)); - return n?.BoolValue; - } - double GetDouble (NSString key) { var n = Runtime.GetNSObject (GetHandle (key)); return n == null ? 0 : n.DoubleValue; } - double? GetNullableDouble (NSString key) - { - var n = Runtime.GetNSObject (GetHandle (key)); - return n?.DoubleValue; - } - - nint? GetNInt (NSString key) - { - var n = Runtime.GetNSObject (GetHandle (key)); -#if XAMCORE_2_0 - return n?.NIntValue; -#else - return n?.IntValue; -#endif - } - // same order as NSMetadataAttributes.h public NSString FileSystemName { @@ -105,14 +83,12 @@ public NSString[] ContentTypeTree { } } - // XAMCORE_4_0 FIXME return nullable public bool IsUbiquitous { get { return GetBool (NSMetadataQuery.ItemIsUbiquitousKey); } } - // XAMCORE_4_0 FIXME return nullable public bool UbiquitousItemHasUnresolvedConflicts { get { return GetBool (NSMetadataQuery.UbiquitousItemHasUnresolvedConflictsKey); @@ -130,35 +106,30 @@ public NSItemDownloadingStatus DownloadingStatus { } } - // XAMCORE_4_0 FIXME return nullable public bool UbiquitousItemIsDownloading { get { return GetBool (NSMetadataQuery.UbiquitousItemIsDownloadingKey); } } - // XAMCORE_4_0 FIXME return nullable public bool UbiquitousItemIsUploaded { get { return GetBool (NSMetadataQuery.UbiquitousItemIsUploadedKey); } } - // XAMCORE_4_0 FIXME return nullable public bool UbiquitousItemIsUploading { get { return GetBool (NSMetadataQuery.UbiquitousItemIsUploadingKey); } } - // XAMCORE_4_0 FIXME return nullable public double UbiquitousItemPercentDownloaded { get { return GetDouble (NSMetadataQuery.UbiquitousItemPercentDownloadedKey); } } - // XAMCORE_4_0 FIXME return nullable public double UbiquitousItemPercentUploaded { get { return GetDouble (NSMetadataQuery.UbiquitousItemPercentUploadedKey); @@ -179,7 +150,6 @@ public NSError UbiquitousItemUploadingError { } } - // XAMCORE_4_0 FIXME return nullable [iOS (8,0)][Mac (10,10)] public bool UbiquitousItemDownloadRequested { get { @@ -187,7 +157,6 @@ public bool UbiquitousItemDownloadRequested { } } - // XAMCORE_4_0 FIXME return nullable [iOS (8,0)][Mac (10,10)] public bool UbiquitousItemIsExternalDocument { get { @@ -208,1014 +177,5 @@ public NSUrl UbiquitousItemUrlInLocalContainer { return Runtime.GetNSObject (GetHandle (NSMetadataQuery.UbiquitousItemURLInLocalContainerKey)); } } - -#if MONOMAC - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Keywords { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.KeywordsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Title { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.TitleKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Authors { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.AuthorsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Editors { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.EditorsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Participants { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.ParticipantsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Projects { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.ProjectsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public NSDate DownloadedDate { - get { - return Runtime.GetNSObject (GetHandle (NSMetadataQuery.DownloadedDateKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] WhereFroms { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.WhereFromsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Comment { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.CommentKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Copyright { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.CopyrightKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public NSDate LastUsedDate { - get { - return Runtime.GetNSObject (GetHandle (NSMetadataQuery.LastUsedDateKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public NSDate ContentCreationDate { - get { - return Runtime.GetNSObject (GetHandle (NSMetadataQuery.ContentCreationDateKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public NSDate ContentModificationDate { - get { - return Runtime.GetNSObject (GetHandle (NSMetadataQuery.ContentModificationDateKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public NSDate DateAdded { - get { - return Runtime.GetNSObject (GetHandle (NSMetadataQuery.DateAddedKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? DurationSeconds { - get { - return GetNullableDouble (NSMetadataQuery.DurationSecondsKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] ContactKeywords { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.ContactKeywordsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Version { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.VersionKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? PixelHeight { - get { - return GetNInt (NSMetadataQuery.PixelHeightKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? PixelWidth { - get { - return GetNInt (NSMetadataQuery.PixelWidthKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? PixelCount { - get { - return GetNInt (NSMetadataQuery.PixelCountKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string ColorSpace { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.ColorSpaceKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? BitsPerSample { - get { - return GetNInt (NSMetadataQuery.BitsPerSampleKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public bool? FlashOnOff { - get { - return GetNullableBool (NSMetadataQuery.FlashOnOffKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? FocalLength { - get { - return GetNullableDouble (NSMetadataQuery.FocalLengthKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string AcquisitionMake { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.AcquisitionMakeKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string AcquisitionModel { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.AcquisitionModelKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? IsoSpeed { - get { - return GetNullableDouble (NSMetadataQuery.IsoSpeedKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? Orientation { - get { - return GetNInt (NSMetadataQuery.OrientationKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] LayerNames { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.LayerNamesKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? WhiteBalance { - get { - return GetNullableDouble (NSMetadataQuery.WhiteBalanceKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? Aperture { - get { - return GetNullableDouble (NSMetadataQuery.ApertureKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string ProfileName { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.ProfileNameKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? ResolutionWidthDpi { - get { - return GetNInt (NSMetadataQuery.ResolutionWidthDpiKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? ResolutionHeightDpi { - get { - return GetNInt (NSMetadataQuery.ResolutionHeightDpiKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? ExposureMode { - get { - return GetNInt (NSMetadataQuery.ExposureModeKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? ExposureTimeSeconds { - get { - return GetNullableDouble (NSMetadataQuery.ExposureTimeSecondsKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string ExifVersion { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.ExifVersionKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string CameraOwner { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.CameraOwnerKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? FocalLength35mm { - get { - return GetNInt (NSMetadataQuery.FocalLength35mmKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string LensModel { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.LensModelKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string ExifGpsVersion { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.ExifGpsVersionKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? Altitude { - get { - return GetNullableDouble (NSMetadataQuery.AltitudeKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? Latitude { - get { - return GetNullableDouble (NSMetadataQuery.LatitudeKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? Longitude { - get { - return GetNullableDouble (NSMetadataQuery.LongitudeKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? Speed { - get { - return GetNullableDouble (NSMetadataQuery.SpeedKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public NSDate Timestamp { - get { - return Runtime.GetNSObject (GetHandle (NSMetadataQuery.TimestampKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? GpsTrack { - get { - return GetNullableDouble (NSMetadataQuery.GpsTrackKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? ImageDirection { - get { - return GetNullableDouble (NSMetadataQuery.ImageDirectionKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string NamedLocation { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.NamedLocationKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string GpsStatus { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.GpsStatusKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string GpsMeasureMode { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.GpsMeasureModeKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? GpsDop { - get { - return GetNullableDouble (NSMetadataQuery.GpsDopKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string GpsMapDatum { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.GpsMapDatumKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? GpsDestLatitude { - get { - return GetNullableDouble (NSMetadataQuery.GpsDestLatitudeKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? GpsDestLongitude { - get { - return GetNullableDouble (NSMetadataQuery.GpsDestLongitudeKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? GpsDestBearing { - get { - return GetNullableDouble (NSMetadataQuery.GpsDestBearingKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? GpsDestDistance { - get { - return GetNullableDouble (NSMetadataQuery.GpsDestDistanceKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string GpsProcessingMethod { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.GpsProcessingMethodKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string GpsAreaInformation { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.GpsAreaInformationKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public NSDate GpsDateStamp { - get { - return Runtime.GetNSObject (GetHandle (NSMetadataQuery.GpsDateStampKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? GpsDifferental { - get { - return GetNullableDouble (NSMetadataQuery.GpsDifferentalKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Codecs { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.CodecsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] MediaTypes { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.MediaTypesKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public bool? Streamable { - get { - return GetNullableBool (NSMetadataQuery.StreamableKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? TotalBitRate { - get { - return GetNInt (NSMetadataQuery.TotalBitRateKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? VideoBitRate { - get { - return GetNInt (NSMetadataQuery.VideoBitRateKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? AudioBitRate { - get { - return GetNInt (NSMetadataQuery.AudioBitRateKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string DeliveryType { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.DeliveryTypeKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Album { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.AlbumKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public bool? HasAlphaChannel { - get { - return GetNullableBool (NSMetadataQuery.HasAlphaChannelKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public bool? RedEyeOnOff { - get { - return GetNullableBool (NSMetadataQuery.RedEyeOnOffKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string MeteringMode { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.MeteringModeKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? MaxAperture { - get { - return GetNullableDouble (NSMetadataQuery.MaxApertureKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? FNumber { - get { - return GetNInt (NSMetadataQuery.FNumberKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string ExposureProgram { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.ExposureProgramKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string ExposureTimeString { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.ExposureTimeStringKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Headline { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.HeadlineKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Instructions { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.InstructionsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string City { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.CityKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string StateOrProvince { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.StateOrProvinceKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Country { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.CountryKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string TextContent { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.TextContentKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? AudioSampleRate { - get { - return GetNInt (NSMetadataQuery.AudioSampleRateKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? AudioChannelCount { - get { - return GetNInt (NSMetadataQuery.AudioChannelCountKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? Tempo { - get { - return GetNullableDouble (NSMetadataQuery.TempoKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string KeySignature { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.KeySignatureKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string TimeSignature { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.TimeSignatureKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string AudioEncodingApplication { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.AudioEncodingApplicationKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Composer { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.ComposerKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Lyricist { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.LyricistKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? AudioTrackNumber { - get { - return GetNInt (NSMetadataQuery.AudioTrackNumberKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public NSDate RecordingDate { - get { - return Runtime.GetNSObject (GetHandle (NSMetadataQuery.RecordingDateKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string MusicalGenre { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.MusicalGenreKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public bool? IsGeneralMidiSequence { - get { - return GetNullableBool (NSMetadataQuery.IsGeneralMidiSequenceKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? RecordingYear { - get { - return GetNInt (NSMetadataQuery.RecordingYearKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Organizations { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.OrganizationsKey)); } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Languages { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.LanguagesKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Rights { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.RightsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Publishers { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.PublishersKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Contributors { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.ContributorsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Coverage { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.CoverageKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Subject { - get { - return Runtime.GetNSObject (GetHandle (NSMetadataQuery.SubjectKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Theme { - get { - return Runtime.GetNSObject (GetHandle (NSMetadataQuery.ThemeKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Description { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.DescriptionKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Identifier { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.IdentifierKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Audiences { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.AudiencesKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public nint? NumberOfPages { - get { - return GetNInt (NSMetadataQuery.NumberOfPagesKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? PageWidth { - get { - return GetNullableDouble (NSMetadataQuery.PageWidthKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? PageHeight { - get { - return GetNullableDouble (NSMetadataQuery.PageHeightKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string SecurityMethod { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.SecurityMethodKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Creator { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.CreatorKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] EncodingApplications { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.EncodingApplicationsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public NSDate DueDate { - get { - return Runtime.GetNSObject (GetHandle (NSMetadataQuery.DueDateKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public double? StarRating { - get { - return GetNullableDouble (NSMetadataQuery.StarRatingKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] PhoneNumbers { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.PhoneNumbersKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] EmailAddresses { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.EmailAddressesKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] InstantMessageAddresses { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.InstantMessageAddressesKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Kind { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.KindKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Recipients { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.RecipientsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string FinderComment { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.FinderCommentKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Fonts { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.FontsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string AppleLoopsRoot { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.AppleLoopsRootKeyKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string AppleLoopsKeyFilterType { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.AppleLoopsKeyFilterTypeKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string AppleLoopsLoopMode { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.AppleLoopsLoopModeKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] AppleLoopDescriptors { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.AppleLoopDescriptorsKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string MusicalInstrumentCategory { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.MusicalInstrumentCategoryKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string MusicalInstrumentName { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.MusicalInstrumentNameKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string CFBundleIdentifier { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.CFBundleIdentifierKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Information { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.InformationKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Director { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.DirectorKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Producer { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.ProducerKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string Genre { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.GenreKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] Performers { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.PerformersKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string OriginalFormat { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.OriginalFormatKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string OriginalSource { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.OriginalSourceKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] AuthorEmailAddresses { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.AuthorEmailAddressesKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] RecipientEmailAddresses { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.RecipientEmailAddressesKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] AuthorAddresses { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.AuthorAddressesKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] RecipientAddresses { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.RecipientAddressesKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public bool? IsLikelyJunk { - get { - return GetNullableBool (NSMetadataQuery.IsLikelyJunkKey); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] ExecutableArchitectures { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.ExecutableArchitecturesKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string ExecutablePlatform { - get { - return NSString.FromHandle (GetHandle (NSMetadataQuery.ExecutablePlatformKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public string [] ApplicationCategories { - get { - return NSArray.StringArrayFromHandle (GetHandle (NSMetadataQuery.ApplicationCategoriesKey)); - } - } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - public bool? IsApplicationManaged { - get { - return GetNullableBool (NSMetadataQuery.IsApplicationManagedKey); - } - } -#endif } } diff --git a/src/Foundation/NSMutableDictionary_2.cs b/src/Foundation/NSMutableDictionary_2.cs index a57e755a2a2..a8df846f0e7 100644 --- a/src/Foundation/NSMutableDictionary_2.cs +++ b/src/Foundation/NSMutableDictionary_2.cs @@ -230,7 +230,7 @@ public static NSMutableDictionary FromObjectsAndKeys (TValue [] ob #if XAMCORE_4_0 public static NSMutableDictionary FromObjectsAndKeys (TValue [] objects, TKey [] keys) #else - [Obsolete ("'TKey' and 'TValue' are inversed and won't work unless both types are identical. Use the generic overload that takes a count parameter instead.")] + [Obsolete ("TKey and TValue are inversed and won't work unless both types are identical. Use the generic overload that takes a count parameter instead")] public static NSMutableDictionary FromObjectsAndKeys (TKey [] objects, TValue [] keys) #endif { diff --git a/src/Foundation/NSObject.iOS.cs b/src/Foundation/NSObject.iOS.cs index fdcf859f71f..8539ee155ce 100644 --- a/src/Foundation/NSObject.iOS.cs +++ b/src/Foundation/NSObject.iOS.cs @@ -19,7 +19,7 @@ public partial class NSObject : INativeObject #if !COREBUILD #if !XAMCORE_4_0 && !WATCH - [Obsolete ("Use 'PlatformAssembly' for easier code sharing across platforms.")] + [Obsolete ("Use PlatformAssembly for easier code sharing across platforms")] public readonly static Assembly MonoTouchAssembly = typeof (NSObject).Assembly; #endif diff --git a/src/Foundation/NSObject.mac.cs b/src/Foundation/NSObject.mac.cs index c548884f31f..74a4225d1d7 100644 --- a/src/Foundation/NSObject.mac.cs +++ b/src/Foundation/NSObject.mac.cs @@ -97,15 +97,11 @@ public partial class NSObject : INativeObject static IntPtr pl = Dlfcn.dlopen (Constants.PhotosLibrary, 1); static IntPtr mp = Dlfcn.dlopen (Constants.MediaPlayerLibrary, 1); static IntPtr pc = Dlfcn.dlopen (Constants.PrintCoreLibrary, 1); - static IntPtr cml = Dlfcn.dlopen (Constants.CoreMLLibrary, 1); - static IntPtr vn = Dlfcn.dlopen (Constants.VisionLibrary, 1); - static IntPtr ios = Dlfcn.dlopen (Constants.IOSurfaceLibrary, 1); - static IntPtr ex = Dlfcn.dlopen (Constants.ExternalAccessoryLibrary, 1); #endif // ** IF YOU ADD ITEMS HERE PLEASE UPDATE linker/ObjCExtensions.cs and mmp/linker/MonoMac.Tuner/MonoMacNamespaces.cs #if !XAMCORE_4_0 - [Obsolete ("Use PlatformAssembly for easier code sharing across platforms.")] + [Obsolete ("Use PlatformAssembly for easier code sharing across platforms")] public static readonly Assembly MonoMacAssembly = typeof (NSObject).Assembly; #endif diff --git a/src/Foundation/NSPortMessage.cs b/src/Foundation/NSPortMessage.cs index 8b5f96f7d50..69915593bc4 100644 --- a/src/Foundation/NSPortMessage.cs +++ b/src/Foundation/NSPortMessage.cs @@ -9,23 +9,23 @@ public partial class NSPortMessage { // Apple will reject iOS application using those selectors - as they only exists in OSX // However we exposed them in monotouch.dll so we provide stubs for binary compatibility - [Obsolete ("Only available on macOS.")] + [Obsolete ("Only available on OSX")] public virtual uint MsgId { get { throw new NotSupportedException (); } set { throw new NotSupportedException (); } } - [Obsolete ("Only available on macOS.")] + [Obsolete ("Only available on OSX")] public virtual NSPort ReceivePort { get { throw new NotSupportedException (); } } - [Obsolete ("Only available on macOS.")] + [Obsolete ("Only available on OSX")] public virtual NSPort SendPort { get { throw new NotSupportedException (); } } - [Obsolete ("Only available on macOS.")] + [Obsolete ("Only available on OSX")] public virtual bool SendBefore (NSDate date) { throw new NotSupportedException (); diff --git a/src/Foundation/NSProgress.cs b/src/Foundation/NSProgress.cs deleted file mode 100644 index 689e91dc28e..00000000000 --- a/src/Foundation/NSProgress.cs +++ /dev/null @@ -1,30 +0,0 @@ -#if !COREBUILD && XAMCORE_2_0 -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Foundation { - public partial class NSProgress { - //Manual bindings until BindAs support is merged - public nint? EstimatedTimeRemaining { - get { return _EstimatedTimeRemaining?.NIntValue; } - set { _EstimatedTimeRemaining = value != null ? new NSNumber (value.Value) : null; } - } - - public nint? Throughput { - get { return _Throughput?.NIntValue; } - set { _Throughput = value != null ? new NSNumber (value.Value) : null; } - } - - public nint? FileTotalCount { - get { return _FileTotalCount?.NIntValue; } - set { _FileTotalCount = value != null ? new NSNumber (value.Value) : null; } - } - - public nint? FileCompletedCount { - get { return _FileCompletedCount?.NIntValue; } - set { _FileCompletedCount = value != null ? new NSNumber (value.Value) : null; } - } - } -} -#endif diff --git a/src/Foundation/NSProxy.cs b/src/Foundation/NSProxy.cs deleted file mode 100644 index 6763f207387..00000000000 --- a/src/Foundation/NSProxy.cs +++ /dev/null @@ -1,37 +0,0 @@ -// -// NSProxy.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -// HACK: -// Yep this is just a hack to workaround https://bugzilla.xamarin.com/show_bug.cgi?id=59247 -// we need to have a better solution that removes all what NSProxy does not responds to. -// Right now this works because NSObject implements NSObject protocol just like NSProxy, but -// NSProxy responds to far less selectors hence doing it internal so it is not a breaking change -// when we provide the correct fix. - -using System; -using System.ComponentModel; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Foundation { - [EditorBrowsable (EditorBrowsableState.Never)] - [Register ("NSProxy", true)] - internal abstract class NSProxy : NSObject { - } -} - -namespace XamCore.WebKit { - // We need to keep NSProxy (avoid linking it) if WKNavigationDelegate or IWKNavigationDelegate - // is used. Unfortunately [Preserve] can't help us here because we do not generate partial - // interfaces rigth now, so we know WKWebView will be there and can hold a reference to it. - public partial class WKWebView { - [Preserve (Conditional = true)] - static Type hack = typeof (NSProxy); - } -} diff --git a/src/Foundation/NSUnit.cs b/src/Foundation/NSUnit.cs deleted file mode 100644 index cf406cc9813..00000000000 --- a/src/Foundation/NSUnit.cs +++ /dev/null @@ -1,121 +0,0 @@ -// -// NSUnit.cs -// -// Authors: -// Alex Soto (alexsoto@microsoft.com) -// -// Copyright 2017 Xamarin Inc. -// - -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Foundation { -#if !XAMCORE_4_0 - public partial class NSUnit { - [Obsolete ("Use .ctor(string)")] - public NSUnit () { } - } - - public partial class NSUnitAcceleration { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitAcceleration () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitAngle { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitAngle () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitArea { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitArea () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitConcentrationMass { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitConcentrationMass () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitDispersion { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitDispersion () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitDuration { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitDuration () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitElectricCharge { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitElectricCharge () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitElectricCurrent { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitElectricCurrent () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitElectricPotentialDifference { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitElectricPotentialDifference () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitElectricResistance { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitElectricResistance () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitEnergy { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitEnergy () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitFrequency { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitFrequency () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitFuelEfficiency { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitFuelEfficiency () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitLength { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitLength () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitIlluminance { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitIlluminance () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitMass { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitMass () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitPower { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitPower () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitPressure { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitPressure () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitSpeed { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitSpeed () : base (NSObjectFlag.Empty) { } - } - - public partial class NSUnitVolume { - [Obsolete ("Use .ctor(string, NSUnitConverter) or any of the static properties.")] - public NSUnitVolume () : base (NSObjectFlag.Empty) { } - } -#endif -} diff --git a/src/GameKit/GKCompat.cs b/src/GameKit/GKCompat.cs index 53174e2231b..7b330a56163 100644 --- a/src/GameKit/GKCompat.cs +++ b/src/GameKit/GKCompat.cs @@ -10,7 +10,7 @@ namespace XamCore.GameKit { public partial class GKMatchRequest { [iOS (8,0), Mac (10,10)] - [Obsolete ("Use 'RecipientResponseHandler' property.")] + [Obsolete ("Use RecipientResponseHandler property")] public virtual void SetRecipientResponseHandler (Action handler) { RecipientResponseHandler = handler; @@ -19,7 +19,7 @@ public virtual void SetRecipientResponseHandler (Action (out IntPtr buffer, ref T[] points) where T : struct { - var type = typeof (T); - // Vector3 is 12 bytes but vector_float3 is 16 - var size = type == typeof (Vector3) ? 16 : Marshal.SizeOf (type); + var size = Marshal.SizeOf (typeof (T)); var length = points.Length * size; buffer = Marshal.AllocHGlobal (length); diff --git a/src/HealthKit/Enums.cs b/src/HealthKit/Enums.cs index 6be1f017125..036abe3e0f4 100644 --- a/src/HealthKit/Enums.cs +++ b/src/HealthKit/Enums.cs @@ -301,8 +301,8 @@ public enum HKWorkoutActivityType : nuint { Curling, Cycling, Dance, - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'HKWorkoutActivityType.Dance', 'HKWorkoutActivityType.Barre', or 'HKWorkoutActivityType.Pilates'.")] - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'HKWorkoutActivityType.Dance', 'HKWorkoutActivityType.Barre', or 'HKWorkoutActivityType.Pilates'.")] + [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use HKWorkoutActivityType.Dance, HKWorkoutActivityType.Barre, or HKWorkoutActivityType.Pilates")] + [Deprecated (PlatformName.iOS, 10, 0, message: "Use HKWorkoutActivityType.Dance, HKWorkoutActivityType.Barre, or HKWorkoutActivityType.Pilates")] DanceInspiredTraining, Elliptical, EquestrianSports, diff --git a/src/HealthKit/HKObsolete.cs b/src/HealthKit/HKObsolete.cs index beaf13187f0..0fca178689e 100644 --- a/src/HealthKit/HKObsolete.cs +++ b/src/HealthKit/HKObsolete.cs @@ -5,18 +5,18 @@ namespace XamCore.HealthKit { #if !XAMCORE_3_0 public partial class HKStatisticsCollectionQuery { - [Obsolete ("Use 'InitialResultsHandler'.")] + [Obsolete ("Use InitialResultsHandler")] public virtual void SetInitialResultsHandler (HKStatisticsCollectionQueryInitialResultsHandler handler) { InitialResultsHandler = handler; } - [Obsolete ("Use 'StatisticsUpdated', this handler uses an incorrect type and does nothing to avoid a crash.")] + [Obsolete ("Use StatisticsUpdated, this handler use an incorrect type and does nothing to avoid a crash")] public virtual void SetStatisticsUpdateHandler (HKStatisticsCollectionQueryInitialResultsHandler handler) { } - [Obsolete ("Use 'StatisticsUpdated', this handler uses an incorrect type and does nothing to avoid a crash.")] + [Obsolete ("Use StatisticsUpdated, this handler use an incorrect type and does nothing to avoid a crash")] public virtual HKStatisticsCollectionQueryInitialResultsHandler StatisticsUpdateHandler { get; set; } @@ -24,7 +24,7 @@ public virtual HKStatisticsCollectionQueryInitialResultsHandler StatisticsUpdate public partial class HKObjectType { - [Obsolete ("Use 'GetWorkoutType', it will return a valid HKWorkoutType instance.")] + [Obsolete ("Use GetWorkoutType, it will return a valid HKWorkoutType instance")] static public HKWorkout WorkoutType () { // would throw an InvalidCastException since the old selector returned a HKWorkoutType diff --git a/src/HomeKit/HMEnums.cs b/src/HomeKit/HMEnums.cs index 9849944e27c..1d7c329f917 100644 --- a/src/HomeKit/HMEnums.cs +++ b/src/HomeKit/HMEnums.cs @@ -101,9 +101,6 @@ public enum HMError : nint { NotAuthorizedForMicrophoneAccess = 89, // iOS 10.2 IncompatibleNetwork = 90, - // iOS 11 - NoHomeHub = 91, - IncompatibleHomeHub = 92, // HMErrorCodeNoCompatibleHomeHub introduced and deprecated on iOS 11. HMErrorCodeIncompatibleHomeHub = HMErrorCodeNoCompatibleHomeHub. } @@ -146,7 +143,7 @@ public enum HMCharacteristicType { [Field ("HMCharacteristicTypeHeatingThreshold")] HeatingThreshold, - [Obsolete ("This value does not exist anymore and will always return null.")] + [Obsolete ("This value does not exist anymore and will always return null")] HeatingCoolingStatus, [Field ("HMCharacteristicTypeCurrentRelativeHumidity")] @@ -167,21 +164,12 @@ public enum HMCharacteristicType { [Field ("HMCharacteristicTypeName")] Name, - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'HMAccessory.Manufacturer' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'HMAccessory.Manufacturer' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'HMAccessory.Manufacturer' instead.")] [Field ("HMCharacteristicTypeManufacturer")] Manufacturer, - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'HMAccessory.Model' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'HMAccessory.Model' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'HMAccessory.Model' instead.")] [Field ("HMCharacteristicTypeModel")] Model, - [Deprecated (PlatformName.TvOS, 11, 0, message: "No longer supported.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "No longer supported.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "No longer supported.")] [Field ("HMCharacteristicTypeSerialNumber")] SerialNumber, @@ -296,9 +284,6 @@ public enum HMCharacteristicType { CurrentVerticalTilt, [iOS (9,0)] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'HMAccessory.FirmwareVersion' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'HMAccessory.FirmwareVersion' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'HMAccessory.FirmwareVersion' instead.")] [Field ("HMCharacteristicTypeFirmwareVersion")] FirmwareVersion, @@ -572,10 +557,6 @@ public enum HMCharacteristicType { [iOS (10,3), Watch (3,2), TV (10,2)] [Field ("HMCharacteristicTypeLabelIndex")] LabelIndex, - - [iOS (11,0), Watch (4,0), TV (11,0)] - [Field ("HMCharacteristicTypeColorTemperature")] - ColorTemperature, } // conveniance enum (ObjC uses NSString) @@ -1006,7 +987,7 @@ public enum HMAccessoryCategoryType { GarageDoorOpener, #if !WATCH && !TVOS - [Obsolete ("Use 'GarageDoorOpener' instead.")] + [Obsolete ("Use GarageDoorOpener instead")] DoorOpener = GarageDoorOpener, #endif @@ -1074,12 +1055,9 @@ public enum HMAccessoryCategoryType { [iOS (9,0)] [TV (10,0)] + // conveniance enum (ObjC uses NSString) public enum HMSignificantEvent { - - [Field ("HMSignificantEventSunrise")] Sunrise, - - [Field ("HMSignificantEventSunset")] Sunset, } @@ -1251,41 +1229,4 @@ public enum HMCharacteristicValueLabelNamespace : nint { Dot = 0, Numeral, } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [Native] - public enum HMEventTriggerActivationState : nuint { - Disabled = 0, - DisabledNoHomeHub = 1, - DisabledNoCompatibleHomeHub = 2, - DisabledNoLocationServicesAuthorization = 3, - Enabled = 4, - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [Native] - public enum HMHomeHubState : nuint { - NotAvailable = 0, - Connected, - Disconnected, - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [Native] - public enum HMPresenceEventType : nuint { - EveryEntry = 1, - EveryExit = 2, - FirstEntry = 3, - LastExit = 4, - AtHome = FirstEntry, - NotAtHome = LastExit, - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [Native] - public enum HMPresenceEventUserType : nuint { - CurrentUser = 1, - HomeUsers = 2, - CustomUsers = 3, - } } diff --git a/src/HomeKit/HMEventTrigger.cs b/src/HomeKit/HMEventTrigger.cs index f719d7c609f..0a5ce8f0949 100644 --- a/src/HomeKit/HMEventTrigger.cs +++ b/src/HomeKit/HMEventTrigger.cs @@ -6,20 +6,26 @@ namespace XamCore.HomeKit { partial class HMEventTrigger { - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (HMSignificantTimeEvent)' instead.")] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (HMSignificantTimeEvent)' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (HMSignificantTimeEvent)' instead.")] + internal static NSString GetEnumConstant (HMSignificantEvent value) + { + switch (value) { + case HMSignificantEvent.Sunrise: + return HMSignificantEventInternal.Sunrise; + case HMSignificantEvent.Sunset: + return HMSignificantEventInternal.Sunset; + default: + return null; + } + } + static public NSPredicate CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (HMSignificantEvent significantEvent, NSDateComponents offset) { - return CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (significantEvent.GetConstant (), offset); + return CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (GetEnumConstant (significantEvent), offset); } - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent (HMSignificantTimeEvent)' instead.")] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent (HMSignificantTimeEvent)' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent (HMSignificantTimeEvent)' instead.")] static public NSPredicate CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent (HMSignificantEvent significantEvent, NSDateComponents offset) { - return CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent (significantEvent.GetConstant (), offset); + return CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent (GetEnumConstant (significantEvent), offset); } } } diff --git a/src/HomeKit/HMMutableSignificantTimeEvent.cs b/src/HomeKit/HMMutableSignificantTimeEvent.cs deleted file mode 100644 index 027d6c120c6..00000000000 --- a/src/HomeKit/HMMutableSignificantTimeEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using XamCore.ObjCRuntime; - -namespace XamCore.HomeKit { - - partial class HMMutableSignificantTimeEvent { - - public virtual HMSignificantEvent SignificantEvent { - get { - return (HMSignificantEvent) (HMSignificantEventExtensions.GetValue (_SignificantEvent)); - } - set { - _SignificantEvent = HMSignificantEventExtensions.GetConstant (value); - } - } - } -} diff --git a/src/HomeKit/HMSignificantTimeEvent.cs b/src/HomeKit/HMSignificantTimeEvent.cs deleted file mode 100644 index e99ef3d0067..00000000000 --- a/src/HomeKit/HMSignificantTimeEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using XamCore.ObjCRuntime; - -namespace XamCore.HomeKit { - - partial class HMSignificantTimeEvent { - - public virtual HMSignificantEvent SignificantEvent { - get { - return (HMSignificantEvent) (HMSignificantEventExtensions.GetValue (_SignificantEvent)); - } - set { - _SignificantEvent = HMSignificantEventExtensions.GetConstant (value); - } - } - } -} diff --git a/src/IOSurface/IODefs.cs b/src/IOSurface/IODefs.cs deleted file mode 100644 index 071e28a4e57..00000000000 --- a/src/IOSurface/IODefs.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -// IOSurface -// -// Authors: -// Miguel de Icaza (miguel@xamarin.com) -// -// Copyright 2017 Microsoft -// - -using System; -using XamCore.ObjCRuntime; - -namespace XamCore.IOSurface { - - public enum IOSurfaceLockOptions : uint { - ReadOnly = 1, - AvoidSync = 2, - } - - public enum IOSurfacePurgeabilityState : uint { - NonVolatile = 0, - Volatile = 1, - Empty = 2, - KeepCurrent = 3, - } - - // To be used with kIOSurfaceCacheMode or IOSurfacePropertyKeyCacheMode - public enum IOSurfaceMemoryMap { - DefaultCache = 0, - InhibitCache = 1 << 8, - WriteThruCache = 2 << 8, - CopybackCache = 3 << 8, - WriteCombineCache = 4 << 8, - CopybackInnerCache = 5 << 8, - }; - - -} diff --git a/src/IOSurface/IOSurface.cs b/src/IOSurface/IOSurface.cs deleted file mode 100644 index 4db67383561..00000000000 --- a/src/IOSurface/IOSurface.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -// IOSurface.cs -// -// Copyright 2016 Microsoft -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -#if XAMCORE_2_0 -using System; -using System.Runtime.InteropServices; -using XamCore.CoreFoundation; -using XamCore.ObjCRuntime; - -namespace XamCore.IOSurface { - public partial class IOSurface { - - // kern_return_t - // See bug #59201 [iOS (10,0)] - [iOS (11, 0)] - [Mac (10, 12)] - [TV (11, 0)] - public int Lock (IOSurfaceLockOptions options, ref int seed) - { - unsafe { - fixed (int *p = &seed){ - return _Lock (options, (IntPtr) p); - } - } - } - - // kern_return_t - // See bug #59201 [iOS (10,0)] - [iOS (11, 0)] - [Mac (10, 12)] - [TV (11, 0)] - public int Lock (IOSurfaceLockOptions options) - { - return _Lock (options, IntPtr.Zero); - } - - // kern_return_t - // See bug #59201 [iOS (10,0)] - [iOS (11, 0)] - [Mac (10, 12)] - [TV (11, 0)] - public int Unlock (IOSurfaceLockOptions options, ref int seed) - { - unsafe { - fixed (int *p = &seed){ - return _Unlock (options, (IntPtr) p); - } - } - } - - // kern_return_t - // See bug #59201 [iOS (10,0)] - [iOS (11, 0)] - [Mac (10, 12)] - [TV (11, 0)] - public int Unlock (IOSurfaceLockOptions options) - { - return _Unlock (options, IntPtr.Zero); - } - -#if !MONOMAC - // kern_return_t - [iOS (11, 0)] - [TV (11, 0)] - public int SetPurgeable (IOSurfacePurgeabilityState newState, ref IOSurfacePurgeabilityState oldState) - { - unsafe { - fixed (IOSurfacePurgeabilityState *p = &oldState){ - return _SetPurgeable (newState, (IntPtr) p); - } - } - } - - [iOS (11, 0)] - [TV (11, 0)] - public int SetPurgeable (IOSurfacePurgeabilityState newState) - { - return _SetPurgeable (newState, IntPtr.Zero); - } -#endif - } -} -#endif \ No newline at end of file diff --git a/src/ImageIO/CGImageDestination.cs b/src/ImageIO/CGImageDestination.cs index fe9f456a9ed..ee76b3c0bc4 100644 --- a/src/ImageIO/CGImageDestination.cs +++ b/src/ImageIO/CGImageDestination.cs @@ -188,18 +188,6 @@ internal NSMutableDictionary ToDictionary () } #endif - public partial class CGImageAuxiliaryDataInfo { - - public CGImageMetadata Metadata { - get { - return GetNativeValue (CGImageAuxiliaryDataInfoKeys.MetadataKey); - } - set { - SetNativeValue (CGImageAuxiliaryDataInfoKeys.MetadataKey, value); - } - } - } - public class CGImageDestination : INativeObject, IDisposable { internal IntPtr handle; @@ -482,17 +470,5 @@ public bool CopyImageSource (CGImageSource image, CGImageDestinationOptions opti o.Dispose (); } } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [DllImport (Constants.ImageIOLibrary)] - static extern void CGImageDestinationAddAuxiliaryDataInfo (IntPtr /* CGImageDestinationRef* */ idst, IntPtr /* CFStringRef* */ auxiliaryImageDataType, IntPtr /* CFDictionaryRef* */ auxiliaryDataInfoDictionary); - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - public void AddAuxiliaryDataInfo (CGImageAuxiliaryDataType auxiliaryImageDataType, CGImageAuxiliaryDataInfo auxiliaryDataInfo) - { - using (var dict = auxiliaryDataInfo?.Dictionary) { - CGImageDestinationAddAuxiliaryDataInfo (Handle, auxiliaryImageDataType.GetConstant ().GetHandle (), dict.GetHandle ()); - } - } } -} \ No newline at end of file +} diff --git a/src/ImageIO/CGImageMetadata.cs b/src/ImageIO/CGImageMetadata.cs index d1985d46343..3e805a307e0 100644 --- a/src/ImageIO/CGImageMetadata.cs +++ b/src/ImageIO/CGImageMetadata.cs @@ -43,14 +43,6 @@ public CGImageMetadata (IntPtr handle) Handle = handle; } - [Preserve (Conditional = true)] - internal CGImageMetadata (IntPtr handle, bool owns) - { - Handle = handle; - if (!owns) - CFObject.CFRetain (Handle); - } - [DllImport (Constants.ImageIOLibrary)] static extern /* CGImageMetadataRef __nullable */ IntPtr CGImageMetadataCreateFromXMPData ( /* CFDataRef __nonnull */ IntPtr data); diff --git a/src/ImageIO/CGImageSource.cs b/src/ImageIO/CGImageSource.cs index 51de887d3d2..48ec2e38cc9 100644 --- a/src/ImageIO/CGImageSource.cs +++ b/src/ImageIO/CGImageSource.cs @@ -249,14 +249,14 @@ public nint ImageCount { extern static /* CFDictionaryRef __nullable */ IntPtr CGImageSourceCopyProperties ( /* CGImageSourceRef __nonnull */ IntPtr isrc, /* CFDictionaryRef __nullable */ IntPtr options); - [Advice ("Use 'GetProperties'.")] + [Advice ("Use GetProperties")] public NSDictionary CopyProperties (NSDictionary dict) { var result = CGImageSourceCopyProperties (handle, dict == null ? IntPtr.Zero : dict.Handle); return result == IntPtr.Zero ? null : Runtime.GetNSObject (result); } - [Advice ("Use 'GetProperties'.")] + [Advice ("Use GetProperties")] public NSDictionary CopyProperties (CGImageOptions options) { if (options == null) @@ -269,14 +269,14 @@ public NSDictionary CopyProperties (CGImageOptions options) /* CGImageSourceRef __nonnull */ IntPtr isrc, /* size_t */ nint index, /* CFDictionaryRef __nullable */ IntPtr options); - [Advice ("Use 'GetProperties'.")] + [Advice ("Use GetProperties")] public NSDictionary CopyProperties (NSDictionary dict, int imageIndex) { var result = CGImageSourceCopyPropertiesAtIndex (handle, imageIndex, dict == null ? IntPtr.Zero : dict.Handle); return result == IntPtr.Zero ? null : Runtime.GetNSObject (result); } - [Advice ("Use 'GetProperties'.")] + [Advice ("Use GetProperties")] public NSDictionary CopyProperties (CGImageOptions options, int imageIndex) { if (options == null) @@ -376,22 +376,5 @@ public CGImageSourceStatus GetStatus (int index) { return CGImageSourceGetStatusAtIndex (handle, index); } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [DllImport (Constants.ImageIOLibrary)] - static extern IntPtr /* CFDictionaryRef* */ CGImageSourceCopyAuxiliaryDataInfoAtIndex (IntPtr /* CGImageSourceRef* */ isrc, nuint index, IntPtr /* CFStringRef* */ auxiliaryImageDataType); - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - public CGImageAuxiliaryDataInfo CopyAuxiliaryDataInfo (nuint index, CGImageAuxiliaryDataType auxiliaryImageDataType) - { - var ptr = CGImageSourceCopyAuxiliaryDataInfoAtIndex (Handle, index, auxiliaryImageDataType.GetConstant ().GetHandle ()); - if (ptr == IntPtr.Zero) - return null; - - var dictionary = Runtime.GetNSObject (ptr); - var info = new CGImageAuxiliaryDataInfo (dictionary); - - return info; - } } } diff --git a/src/Intents/INBillTypeResolutionResult.cs b/src/Intents/INBillTypeResolutionResult.cs deleted file mode 100644 index a0dd2b65da6..00000000000 --- a/src/Intents/INBillTypeResolutionResult.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// INBillTypeResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INBillTypeResolutionResult { - - public static INBillTypeResolutionResult GetSuccess (INBillType resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return SuccessWithResolvedBillType (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INBillTypeResolutionResult GetConfirmationRequired (INBillType valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return ConfirmationRequiredWithBillTypeToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INCallRecord.cs b/src/Intents/INCallRecord.cs deleted file mode 100644 index 7f61356e872..00000000000 --- a/src/Intents/INCallRecord.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -// INCallRecord.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INCallRecord { - - public double? CallDuration { - get { return WeakCallDuration?.DoubleValue; } - } - - public bool? Unseen { - get { return WeakUnseen?.BoolValue; } - } - } -} -#endif diff --git a/src/Intents/INCallRecordTypeResolutionResult.cs b/src/Intents/INCallRecordTypeResolutionResult.cs deleted file mode 100644 index f2fd7e4b38e..00000000000 --- a/src/Intents/INCallRecordTypeResolutionResult.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -// INCallRecordTypeResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INCallRecordTypeResolutionResult { - - public static INCallRecordTypeResolutionResult GetSuccess (INCallRecordType resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#elif MONOMAC - if (PlatformHelper.CheckSystemVersion (10, 13)) -#endif - return SuccessWithResolvedCallRecordType (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INCallRecordTypeResolutionResult GetConfirmationRequired (INCallRecordType valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#elif MONOMAC - if (PlatformHelper.CheckSystemVersion (10, 13)) -#endif - return ConfirmationRequiredWithCallRecordTypeToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INCarAirCirculationModeResolutionResult.cs b/src/Intents/INCarAirCirculationModeResolutionResult.cs deleted file mode 100644 index 298fb3959fc..00000000000 --- a/src/Intents/INCarAirCirculationModeResolutionResult.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// INCarAirCirculationModeResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INCarAirCirculationModeResolutionResult { - - public static INCarAirCirculationModeResolutionResult GetSuccess (INCarAirCirculationMode resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return SuccessWithResolvedCarAirCirculationMode (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INCarAirCirculationModeResolutionResult GetConfirmationRequired (INCarAirCirculationMode valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return ConfirmationRequiredWithCarAirCirculationModeToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INCarAudioSourceResolutionResult.cs b/src/Intents/INCarAudioSourceResolutionResult.cs deleted file mode 100644 index 3466267f8df..00000000000 --- a/src/Intents/INCarAudioSourceResolutionResult.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// INCarAudioSourceResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INCarAudioSourceResolutionResult { - - public static INCarAudioSourceResolutionResult GetSuccess (INCarAudioSource resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return SuccessWithResolvedCarAudioSource (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INCarAudioSourceResolutionResult GetConfirmationRequired (INCarAudioSource valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return ConfirmationRequiredWithCarAudioSourceToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INCarDefrosterResolutionResult.cs b/src/Intents/INCarDefrosterResolutionResult.cs deleted file mode 100644 index 89e80df50eb..00000000000 --- a/src/Intents/INCarDefrosterResolutionResult.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// INCarDefrosterResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INCarDefrosterResolutionResult { - - public static INCarDefrosterResolutionResult GetSuccess (INCarDefroster resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return SuccessWithResolvedCarDefroster (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INCarDefrosterResolutionResult GetConfirmationRequired (INCarDefroster valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return ConfirmationRequiredWithCarDefrosterToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INCarSeatResolutionResult.cs b/src/Intents/INCarSeatResolutionResult.cs deleted file mode 100644 index 581d3d411e6..00000000000 --- a/src/Intents/INCarSeatResolutionResult.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -// INCarSeatResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INCarSeatResolutionResult { - public static INCarSeatResolutionResult GetSuccess (INCarSeat resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return SuccessWithResolvedCarSeat (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INCarSeatResolutionResult GetConfirmationRequired (INCarSeat valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return ConfirmationRequiredWithCarSeatToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif \ No newline at end of file diff --git a/src/Intents/INCarSignalOptionsResolutionResult.cs b/src/Intents/INCarSignalOptionsResolutionResult.cs deleted file mode 100644 index 4f0450546c2..00000000000 --- a/src/Intents/INCarSignalOptionsResolutionResult.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// INCarAirCirculationModeResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INCarSignalOptionsResolutionResult { - - public static INCarSignalOptionsResolutionResult GetSuccess (INCarSignalOptions resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return SuccessWithResolvedCarSignalOptions (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INCarSignalOptionsResolutionResult GetConfirmationRequired (INCarSignalOptions valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return ConfirmationRequiredWithCarSignalOptionsToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INCompat.cs b/src/Intents/INCompat.cs index de334370f1e..f025cf4438f 100644 --- a/src/Intents/INCompat.cs +++ b/src/Intents/INCompat.cs @@ -24,14 +24,6 @@ public INRideStatus () { } } - - public partial class INRestaurantGuest { - [Obsolete ("This constructor does not create a valid instance of the type")] - public INRestaurantGuest () - : base (IntPtr.Zero) // base class doesn't have a default ctor. - { - } - } #endif } #endif \ No newline at end of file diff --git a/src/Intents/INInteraction.cs b/src/Intents/INInteraction.cs deleted file mode 100644 index 5cbf62d4118..00000000000 --- a/src/Intents/INInteraction.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// INInteraction.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INInteraction { - - public T GetParameterValue (INParameter parameter) where T : NSObject - { - return Runtime.GetNSObject (_GetParameterValue (parameter)); - } - } -} -#endif diff --git a/src/Intents/INMessageAttributeOptionsResolutionResult.cs b/src/Intents/INMessageAttributeOptionsResolutionResult.cs deleted file mode 100644 index a550e690a6d..00000000000 --- a/src/Intents/INMessageAttributeOptionsResolutionResult.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -// INMessageAttributeOptionsResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INMessageAttributeOptionsResolutionResult { - - public static INMessageAttributeOptionsResolutionResult GetSuccess (INMessageAttributeOptions resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#elif MONOMAC - if (PlatformHelper.CheckSystemVersion (10, 13)) -#endif - return SuccessWithResolvedMessageAttributeOptions (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INMessageAttributeOptionsResolutionResult GetConfirmationRequired (INMessageAttributeOptions valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#elif MONOMAC - if (PlatformHelper.CheckSystemVersion (10, 13)) -#endif - return ConfirmationRequiredWithMessageAttributeOptionsToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INMessageAttributeResolutionResult.cs b/src/Intents/INMessageAttributeResolutionResult.cs deleted file mode 100644 index dd9d3f0ffe2..00000000000 --- a/src/Intents/INMessageAttributeResolutionResult.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -// INMessageAttributeResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INMessageAttributeResolutionResult { - - public static INMessageAttributeResolutionResult GetSuccess (INMessageAttribute resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#elif MONOMAC - if (PlatformHelper.CheckSystemVersion (10, 13)) -#endif - return SuccessWithResolvedMessageAttribute (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INMessageAttributeResolutionResult GetConfirmationRequired (INMessageAttribute valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#elif MONOMAC - if (PlatformHelper.CheckSystemVersion (10, 13)) -#endif - return ConfirmationRequiredWithMessageAttributeToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INPaymentStatusResolutionResult.cs b/src/Intents/INPaymentStatusResolutionResult.cs deleted file mode 100644 index 50f43cd96dc..00000000000 --- a/src/Intents/INPaymentStatusResolutionResult.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// INPaymentStatusResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INPaymentStatusResolutionResult { - - public static INPaymentStatusResolutionResult GetSuccess (INPaymentStatus resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return SuccessWithResolvedPaymentStatus (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INPaymentStatusResolutionResult GetConfirmationRequired (INPaymentStatus valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return ConfirmationRequiredWithPaymentStatusToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INRadioTypeResolutionResult.cs b/src/Intents/INRadioTypeResolutionResult.cs deleted file mode 100644 index c018f196c44..00000000000 --- a/src/Intents/INRadioTypeResolutionResult.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// INRadioTypeResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INRadioTypeResolutionResult { - - public static INRadioTypeResolutionResult GetSuccess (INRadioType resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return SuccessWithResolvedRadioType (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INRadioTypeResolutionResult GetConfirmationRequired (INRadioType valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return ConfirmationRequiredWithRadioTypeToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INRelativeReferenceResolutionResult.cs b/src/Intents/INRelativeReferenceResolutionResult.cs deleted file mode 100644 index ea8129300b3..00000000000 --- a/src/Intents/INRelativeReferenceResolutionResult.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// INRelativeReferenceResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INRelativeReferenceResolutionResult { - - public static INRelativeReferenceResolutionResult GetSuccess (INRelativeReference resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return SuccessWithResolvedRelativeReference (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INRelativeReferenceResolutionResult GetConfirmationRequired (INRelativeReference valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return ConfirmationRequiredWithRelativeReferenceToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INRelativeSettingResolutionResult.cs b/src/Intents/INRelativeSettingResolutionResult.cs deleted file mode 100644 index e6dd5868645..00000000000 --- a/src/Intents/INRelativeSettingResolutionResult.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// INRelativeSettingResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INRelativeSettingResolutionResult { - - public static INRelativeSettingResolutionResult GetSuccess (INRelativeSetting resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return SuccessWithResolvedRelativeSetting (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INRelativeSettingResolutionResult GetConfirmationRequired (INRelativeSetting valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return ConfirmationRequiredWithRelativeSettingToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INSearchCallHistoryIntent.cs b/src/Intents/INSearchCallHistoryIntent.cs deleted file mode 100644 index b0ee38f8ef6..00000000000 --- a/src/Intents/INSearchCallHistoryIntent.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// INSearchCallHistoryIntent.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INSearchCallHistoryIntent { - - public bool? Unseen { - get { return WeakUnseen?.BoolValue; } - } - } -} -#endif diff --git a/src/Intents/INSpeakableString.cs b/src/Intents/INSpeakableString.cs deleted file mode 100644 index d3ab88bccde..00000000000 --- a/src/Intents/INSpeakableString.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// INSpeakableString.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INSpeakableString { - public INSpeakableString (string identifier, string spokenPhrase, string pronunciationHint) - : base (NSObjectFlag.Empty) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#elif MONOMAC - if (PlatformHelper.CheckSystemVersion (10, 13)) -#endif - InitializeHandle (InitWithVocabularyIdentifier (identifier, spokenPhrase, pronunciationHint)); - else - InitializeHandle (InitWithIdentifier (identifier, spokenPhrase, pronunciationHint)); - } - } -} -#endif diff --git a/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs b/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs deleted file mode 100644 index 294f343d745..00000000000 --- a/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// INWorkoutGoalUnitTypeResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INWorkoutGoalUnitTypeResolutionResult { - - public static INWorkoutGoalUnitTypeResolutionResult GetSuccess (INWorkoutGoalUnitType resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return SuccessWithResolvedWorkoutGoalUnitType (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INWorkoutGoalUnitTypeResolutionResult GetConfirmationRequired (INWorkoutGoalUnitType valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return ConfirmationRequiredWithWorkoutGoalUnitTypeToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/Intents/INWorkoutLocationTypeResolutionResult.cs b/src/Intents/INWorkoutLocationTypeResolutionResult.cs deleted file mode 100644 index 69c7feb77f0..00000000000 --- a/src/Intents/INWorkoutLocationTypeResolutionResult.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// INWorkoutLocationTypeResolutionResult.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !MONOMAC -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Intents { - public partial class INWorkoutLocationTypeResolutionResult { - - public static INWorkoutLocationTypeResolutionResult GetSuccess (INWorkoutLocationType resolvedValue) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return SuccessWithResolvedWorkoutLocationType (resolvedValue); - else - return SuccessWithResolvedValue (resolvedValue); - } - - public static INWorkoutLocationTypeResolutionResult GetConfirmationRequired (INWorkoutLocationType valueToConfirm) - { -#if IOS - if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) -#elif WATCH - if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) -#endif - return ConfirmationRequiredWithWorkoutLocationTypeToConfirm (valueToConfirm); - else - return ConfirmationRequiredWithValueToConfirm (valueToConfirm); - } - } -} -#endif diff --git a/src/LocalAuthentication/LAEnums.cs b/src/LocalAuthentication/LAEnums.cs index 46bb84ffc3e..69469a0d8fd 100644 --- a/src/LocalAuthentication/LAEnums.cs +++ b/src/LocalAuthentication/LAEnums.cs @@ -30,29 +30,17 @@ public enum LAStatus : nint { /// Authentication could not start, because passcode is not set on the device. PasscodeNotSet = -5, /// Authentication could not start, because Touch ID is not available on the device. - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'BiometryNotAvailable' instead.")] - [Deprecated (PlatformName.MacOSX, 10,13, message: "Use 'BiometryNotAvailable' instead.")] TouchIDNotAvailable = -6, - /// Authentication could not start, because Touch ID has no enrolled fingers. - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'BiometryNotEnrolled' instead.")] - [Deprecated (PlatformName.MacOSX, 10,13, message: "Use 'BiometryNotEnrolled' instead.")] TouchIDNotEnrolled = -7, - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'BiometryLockout' instead.")] - [Deprecated (PlatformName.MacOSX, 10,13, message: "Use 'BiometryLockout' instead.")] TouchIDLockout = -8, AppCancel = -9, - InvalidContext = -10, - - BiometryNotAvailable = TouchIDNotAvailable, - BiometryNotEnrolled = TouchIDNotEnrolled, - BiometryLockout = TouchIDLockout, - - NotInteractive = -1004, + InvalidContext = -10 } - [iOS (9,0), Mac (10,11), Watch (3,0), TV (11,0)] + [iOS (9,0)] + [Mac (10,11)] [Native] public enum LACredentialType : nint { ApplicationPassword = 0 diff --git a/src/Makefile b/src/Makefile index 7c2b213e3f4..bd9d2eb1ee6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -767,7 +767,7 @@ WATCHOS_EXTRA_CORE_SOURCES = \ $(WATCH_BUILD_DIR)/Constants.cs \ $(WATCH_BUILD_DIR)/AssemblyInfo.cs \ $(IOS_OPENTK_1_0_CORE_SOURCES) \ - AudioToolbox/AudioBuffers.cs \ + CoreVideo/CVPixelFormatType.cs \ AudioToolbox/AudioType.cs \ $(SHARED_SYSTEM_DRAWING_SOURCES) \ $(MONO_PATH)/mcs/class/System.Drawing/System.Drawing/Color.cs \ diff --git a/src/MapKit/MKEnums.cs b/src/MapKit/MKEnums.cs index ade73139616..37e25f1ec42 100644 --- a/src/MapKit/MKEnums.cs +++ b/src/MapKit/MKEnums.cs @@ -38,9 +38,7 @@ public enum MKMapType : nuint_compat_int { Satellite, Hybrid, SatelliteFlyover, - HybridFlyover, - [iOS (11,0)][TV (11,0)][Mac (10,13, onlyOn64: true)] - MutedStandard, + HybridFlyover } // NSUInteger -> MKDistanceFormatter.h @@ -99,7 +97,7 @@ public enum MKAnnotationViewDragState : nuint_compat_int { [NoTV] [NoWatch] [Native] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'MKPinAnnotationView.PinTintColor' instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the MKPinAnnotationView's PinTintColor instead")] public enum MKPinAnnotationColor : nuint_compat_int { Red, Green, Purple } @@ -118,28 +116,6 @@ public enum MKSearchCompletionFilterType : nint { AndQueries = 0, Only } - - [TV (11,0)][NoWatch][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [Native] - public enum MKAnnotationViewCollisionMode : nint { - Rectangle, - Circle, - } - - [TV (11,0)][NoWatch][iOS (11,0)][NoMac] - [Native] - public enum MKScaleViewAlignment : nint { - Leading, - Trailing, - } - - [TV (11,0)][NoWatch][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [Native] - public enum MKFeatureVisibility : nint { - Adaptive, - Hidden, - Visible, - } } #endif diff --git a/src/MapKit/MKFeatureDisplayPriority.cs b/src/MapKit/MKFeatureDisplayPriority.cs deleted file mode 100644 index 1b34010970d..00000000000 --- a/src/MapKit/MKFeatureDisplayPriority.cs +++ /dev/null @@ -1,16 +0,0 @@ -#if XAMCORE_2_0 || !MONOMAC -using System; -using XamCore.ObjCRuntime; - -namespace XamCore.MapKit { - - // .net does not allow float-based enumerations - [TV (11,0)][NoWatch][iOS (11,0)][Mac (10,13, onlyOn64: true)] - public static class MKFeatureDisplayPriority { - public const float Required = 1000f; - public const float DefaultHigh = 750f; - public const float DefaultLow = 250f; - } -} - -#endif \ No newline at end of file diff --git a/src/MediaAccessibility/MediaAccessibility.cs b/src/MediaAccessibility/MediaAccessibility.cs index 9763e8deee8..e6a10fa339e 100644 --- a/src/MediaAccessibility/MediaAccessibility.cs +++ b/src/MediaAccessibility/MediaAccessibility.cs @@ -70,10 +70,10 @@ public static partial class MACaptionAppearance { // FIXME: make this a real notification public static readonly NSString SettingsChangedNotification; - [Advice ("Use 'MediaCharacteristic.DescribesMusicAndSoundForAccessibility' getter.")] + [Advice ("Use MediaCharacteristic.DescribesMusicAndSoundForAccessibility getter")] public static readonly NSString MediaCharacteristicDescribesMusicAndSoundForAccessibility; - [Advice ("Use 'MediaCharacteristic.TranscribesSpokenDialogForAccessibility' getter.")] + [Advice ("Use MediaCharacteristic.TranscribesSpokenDialogForAccessibility getter")] public static readonly NSString MediaCharacteristicTranscribesSpokenDialogForAccessibility; static MACaptionAppearance () diff --git a/src/MediaPlayer/MPNowPlayingInfoCenter.cs b/src/MediaPlayer/MPNowPlayingInfoCenter.cs index be0c2a59222..3e69e8142ec 100644 --- a/src/MediaPlayer/MPNowPlayingInfoCenter.cs +++ b/src/MediaPlayer/MPNowPlayingInfoCenter.cs @@ -7,14 +7,13 @@ // Copyright 2011, Xamarin Inc // -#if XAMCORE_2_0 || !MONOMAC +#if XAMCORE_2_0 using XamCore.Foundation; using XamCore.ObjCRuntime; namespace XamCore.MediaPlayer { - [Mac (10,12,2, onlyOn64: true)] public class MPNowPlayingInfo { public MPNowPlayingInfo () { @@ -221,10 +220,13 @@ public MPNowPlayingInfo NowPlaying { return new MPNowPlayingInfo (_NowPlayingInfo); } set { - _NowPlayingInfo = value?.ToDictionary (); + if (value == null) + _NowPlayingInfo = null; + else + _NowPlayingInfo = value.ToDictionary (); } } } } -#endif +#endif \ No newline at end of file diff --git a/src/MediaPlayer/MPPlayableContentDelegate.cs b/src/MediaPlayer/MPPlayableContentDelegate.cs index a352ec77466..fcf60518ee7 100644 --- a/src/MediaPlayer/MPPlayableContentDelegate.cs +++ b/src/MediaPlayer/MPPlayableContentDelegate.cs @@ -7,7 +7,7 @@ namespace XamCore.MediaPlayer { public partial class MPPlayableContentDelegate { - [Obsolete ("Use 'InitiatePlaybackOfContentItem' instead.")] + [Obsolete ("Use InitiatePlaybackOfContentItem instead")] public virtual void PlayableContentManager (MPPlayableContentManager contentManager, NSIndexPath indexPath, Action completionHandler) { InitiatePlaybackOfContentItem (contentManager, indexPath, completionHandler); @@ -16,7 +16,7 @@ public virtual void PlayableContentManager (MPPlayableContentManager contentMana } public static partial class MPPlayableContentDelegate_Extensions { - [Obsolete ("Use 'InitiatePlaybackOfContentItem' instead.")] + [Obsolete ("Use InitiatePlaybackOfContentItem instead")] public static void PlayableContentManager (this IMPPlayableContentDelegate This, MPPlayableContentManager contentManager, NSIndexPath indexPath, Action completionHandler) { This.InitiatePlaybackOfContentItem (contentManager, indexPath, completionHandler); @@ -28,7 +28,7 @@ public static void PlayableContentManager (this IMPPlayableContentDelegate This, public partial class MPPlayableContentDataSource : NSObject { [Unavailable (PlatformName.MacOSX, PlatformArchitecture.All)] [Introduced (PlatformName.iOS, 10, 0)] - [Obsolete ("Use 'MPPlayableContentDataSource_Extensions.GetContentItemAsync' instead.")] + [Obsolete ("Use 'MPPlayableContentDataSource_Extensions.GetContentItemAsync' instead")] public unsafe virtual Task GetContentItemAsync (string identifier) { return MPPlayableContentDataSource_Extensions.GetContentItemAsync (this, identifier); diff --git a/src/MediaPlayer/MediaPlayer.cs b/src/MediaPlayer/MediaPlayer.cs index c878d08cef4..8fe8f54ccb2 100644 --- a/src/MediaPlayer/MediaPlayer.cs +++ b/src/MediaPlayer/MediaPlayer.cs @@ -18,7 +18,6 @@ namespace XamCore.MediaPlayer { [Native] [NoMac] [NoTV] - [Availability (Deprecated = Platform.iOS_9_0)] public enum MPMoviePlaybackState : nint { Stopped, Playing, @@ -32,7 +31,6 @@ public enum MPMoviePlaybackState : nint { [Native] [NoMac] [NoTV] - [Availability (Deprecated = Platform.iOS_9_0)] public enum MPMovieLoadState : nint { Unknown = 0, Playable = 1 << 0, @@ -277,8 +275,6 @@ public enum MPRemoteCommandHandlerStatus : nint { NoSuchContent = 100, [iOS (9,1)] NoActionableNowPlayingItem = 110, - [iOS (11,0)][TV (11,0)][Mac (10,13)] - DeviceNotFound = 120, CommandFailed = 200 } diff --git a/src/Metal/Defs.cs b/src/Metal/Defs.cs index ad007fdaec5..955ee40b123 100644 --- a/src/Metal/Defs.cs +++ b/src/Metal/Defs.cs @@ -92,21 +92,6 @@ public override string ToString () } } - [StructLayout (LayoutKind.Sequential)] - public struct MTLSamplePosition - { - public float X; - - public float Y; - - public MTLSamplePosition (float x, float y) - { - this.X = x; - this.Y = y; - } - } - - public struct MTLClearColor { public double Red, Green, Blue, Alpha; diff --git a/src/Metal/MTLArgumentEncoder.cs b/src/Metal/MTLArgumentEncoder.cs deleted file mode 100644 index a4d1f1e7f18..00000000000 --- a/src/Metal/MTLArgumentEncoder.cs +++ /dev/null @@ -1,13 +0,0 @@ -#if XAMCORE_2_0 -using System; - -namespace XamCore.Metal { - public static partial class MTLArgumentEncoder_Extensions { - public unsafe static void SetBuffers (this IMTLArgumentEncoder This, IMTLBuffer [] buffers, nint [] offsets, Foundation.NSRange range) - { - fixed (void* handle = offsets) - This.SetBuffers (buffers, (IntPtr)handle, range); - } - } -} -#endif \ No newline at end of file diff --git a/src/Metal/MTLArrays.cs b/src/Metal/MTLArrays.cs index 6c2a4344454..3d60902a249 100644 --- a/src/Metal/MTLArrays.cs +++ b/src/Metal/MTLArrays.cs @@ -79,31 +79,5 @@ public MTLAttributeDescriptor this [nuint idx] { } } } - - public partial class MTLPipelineBufferDescriptorArray { - public MTLPipelineBufferDescriptor this [nuint index] - { - get { - return GetObject (index); - } - set { - SetObject (value, index); - } - } - } - -#if IOS - public partial class MTLTileRenderPipelineColorAttachmentDescriptorArray { - public MTLTileRenderPipelineColorAttachmentDescriptor this [nuint index] - { - get { - return GetObject (index); - } - set { - SetObject (value, index); - } - } - } -#endif } #endif diff --git a/src/Metal/MTLCompat.cs b/src/Metal/MTLCompat.cs index 3d14882e433..1273027e501 100644 --- a/src/Metal/MTLCompat.cs +++ b/src/Metal/MTLCompat.cs @@ -4,6 +4,19 @@ namespace XamCore.Metal { +#if IOS || TVOS + public static partial class MTLRenderCommandEncoder_Extensions { + + // Apple removed this in Xcode 8 + [Introduced (PlatformName.iOS, 9,0)] + [Deprecated (PlatformName.iOS, 10,0, message: "Removed in iOS 10")] + [Introduced (PlatformName.TvOS, 9,1)] + [Deprecated (PlatformName.TvOS, 10,0, message: "Removed in tvOS 10")] + public static void SetDepthClipMode (IMTLRenderCommandEncoder This, MTLDepthClipMode depthClipMode) + { + } + } +#endif } #endif diff --git a/src/Metal/MTLDevice.cs b/src/Metal/MTLDevice.cs index bdebca9564d..d28c7297bd7 100644 --- a/src/Metal/MTLDevice.cs +++ b/src/Metal/MTLDevice.cs @@ -16,10 +16,6 @@ using XamCore.ObjCRuntime; namespace XamCore.Metal { -#if MONOMAC - [Advice ("The 'NSString' argument will match a property of 'MTLDeviceNotificationHandler'.")] - public delegate void MTLDeviceNotificationHandler (IMTLDevice device, NSString notifyName); -#endif [iOS (8,0)][Mac (10,11)] public static partial class MTLDevice { @@ -46,73 +42,6 @@ public static IMTLDevice SystemDefault { return system_default; } } - -#if MONOMAC - [Mac (10,11, onlyOn64: true), NoiOS, NoWatch, NoTV] - [DllImport (Constants.MetalLibrary)] - unsafe static extern IntPtr MTLCopyAllDevices (); - - [Mac (10,11, onlyOn64: true), NoiOS, NoWatch, NoTV] - public static IMTLDevice [] GetAllDevices () - { - var rv = MTLCopyAllDevices (); - return NSArray.ArrayFromHandle (rv); - } - - [Mac (10, 13, onlyOn64: true), NoiOS, NoWatch, NoTV] - [DllImport (Constants.MetalLibrary)] - unsafe static extern IntPtr MTLCopyAllDevicesWithObserver (ref IntPtr observer, void* handler); - - [Mac (10, 13, onlyOn64: true), NoiOS, NoWatch, NoTV] - public static IMTLDevice [] GetAllDevices (ref NSObject observer, MTLDeviceNotificationHandler handler) - { - if (observer == null) - throw new ArgumentNullException ("observer"); - - IntPtr handle = observer.Handle; - - unsafe - { - BlockLiteral* block_ptr_handler; - BlockLiteral block_handler; - block_handler = new BlockLiteral (); - block_ptr_handler = &block_handler; - block_handler.SetupBlock (static_notificationHandler, handler); - - var rv = MTLCopyAllDevicesWithObserver (ref handle, (void*) block_ptr_handler); - var obj = NSArray.ArrayFromHandle (rv); - - if (handle != observer.Handle) - observer = Runtime.GetNSObject (handle); - - return obj; - } - } - - internal delegate void InnerNotification (IntPtr block, IntPtr device, IntPtr notifyName); - static readonly InnerNotification static_notificationHandler = TrampolineNotificationHandler; - [MonoPInvokeCallback (typeof (InnerNotification))] - public static unsafe void TrampolineNotificationHandler (IntPtr block, IntPtr device, IntPtr notifyName) - { - var descriptor = (BlockLiteral*) block; - var del = (MTLDeviceNotificationHandler) (descriptor->Target); - if (del != null) - del ((IMTLDevice) Runtime.GetNSObject (device), (XamCore.Foundation.NSString) Runtime.GetNSObject (notifyName)); - } - - [Mac (10, 13, onlyOn64: true), NoiOS, NoWatch, NoTV] - [DllImport (Constants.MetalLibrary)] - static extern void MTLRemoveDeviceObserver (IntPtr observer); - - [Mac (10, 13, onlyOn64: true), NoiOS, NoWatch, NoTV] - public static void RemoveObserver (NSObject observer) - { - if (observer == null) - throw new ArgumentNullException ("observer"); - - MTLRemoveDeviceObserver (observer.Handle); - } -#endif } public static partial class MTLDevice_Extensions { @@ -132,19 +61,11 @@ public static IMTLBuffer CreateBufferNoCopy (this IMTLDevice This, T [] data, var handle = GCHandle.Alloc (data, GCHandleType.Pinned); // This requires a pinned GCHandle, since it's not possible to use unsafe code to get the address of a generic object. try { IntPtr ptr = handle.AddrOfPinnedObject (); - return This.CreateBufferNoCopy (ptr, (nuint)(data.Length * Marshal.SizeOf (typeof (T))), options, deallocator); + return This.CreateBufferNoCopy (ptr, (nuint)(data.Length * Marshal.SizeOf (typeof (T))) , options, deallocator); } finally { handle.Free (); } } - - public unsafe static void GetDefaultSamplePositions (this IMTLDevice This, MTLSamplePosition [] positions, nuint count) - { - if (positions.Length < (nint)count) - throw new ArgumentException ("Length of 'positions' cannot be less than 'count'."); - fixed (void * handle = positions) - GetDefaultSamplePositions (This, (IntPtr)handle, count); - } } } #endif \ No newline at end of file diff --git a/src/Metal/MTLEnums.cs b/src/Metal/MTLEnums.cs index dd2129513d2..21fb0f6e7f7 100644 --- a/src/Metal/MTLEnums.cs +++ b/src/Metal/MTLEnums.cs @@ -79,8 +79,6 @@ public enum MTLCommandBufferError : nuint { InvalidResource = 9, [iOS (10,0), TV (10,0), NoWatch, NoMac] Memoryless = 10, - [Mac (10,13), NoiOS, NoTV, NoWatch] - DeviceRemoved = 11, } [Native] @@ -95,8 +93,6 @@ public enum MTLStoreAction : nuint { StoreAndMultisampleResolve, [iOS (10,0), TV (10,0), NoWatch, Mac (10,12)] Unknown, - [iOS (11,0), TV (11,0), NoWatch, Mac (10,13)] - CustomSampleDepthStore, } [Native] @@ -195,29 +191,6 @@ public enum MTLVertexFormat : nuint { Int1010102Normalized = 40, UInt1010102Normalized = 41, - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - UChar4NormalizedBgra = 42, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - UChar = 45, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - Char = 46, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - UCharNormalized = 47, - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - CharNormalized = 48, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - UShort = 49, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - Short = 50, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - UShortNormalized = 51, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - ShortNormalized = 52, - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - Half = 53, } [Mac (10,11)] @@ -230,7 +203,7 @@ public enum MTLPixelFormat : nuint { #if MONOMAC R8Unorm_sRGB = 11, #elif !XAMCORE_3_0 - [Obsolete ("Only available on macOS.")] + [Obsolete ("Only available on OSX")] R8Unorm_sRGB = 11, #endif R8Snorm = 12, @@ -273,8 +246,6 @@ public enum MTLPixelFormat : nuint { RGB10A2Uint = 91, RG11B10Float = 92, RGB9E5Float = 93, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - BGR10A2Unorm = 94, RG32Uint = 103, RG32Sint = 104, RG32Float = 105, @@ -503,7 +474,7 @@ public enum MTLResourceOptions : nuint { [iOS (10,0), TV (10,0), NoWatch, NoMac] StorageModeMemoryless = MTLStorageMode.Memoryless << 4, - [iOS (10,0), TV (10,0), NoWatch, Mac (10,13)] + [iOS (10,0), TV (10,0), NoWatch, NoMac] HazardTrackingModeUntracked = 1 << 8, } @@ -592,28 +563,7 @@ public enum MTLDataType : nuint { Bool = 53, Bool2 = 54, Bool3 = 55, - Bool4 = 56, - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] Texture = 58, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] Sampler = 59, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] Pointer = 60, - - [NoMac, iOS (11,0), NoTV, NoWatch] R8Unorm = 62, - [NoMac, iOS (11,0), NoTV, NoWatch] R8Snorm = 63, - [NoMac, iOS (11,0), NoTV, NoWatch] R16Unorm = 64, - [NoMac, iOS (11,0), NoTV, NoWatch] R16Snorm = 65, - [NoMac, iOS (11,0), NoTV, NoWatch] Rg8Unorm = 66, - [NoMac, iOS (11,0), NoTV, NoWatch] Rg8Snorm = 67, - [NoMac, iOS (11,0), NoTV, NoWatch] Rg16Unorm = 68, - [NoMac, iOS (11,0), NoTV, NoWatch] Rg16Snorm = 69, - [NoMac, iOS (11,0), NoTV, NoWatch] Rgba8Unorm = 70, - [NoMac, iOS (11,0), NoTV, NoWatch] Rgba8Unorm_sRgb = 71, - [NoMac, iOS (11,0), NoTV, NoWatch] Rgba8Snorm = 72, - [NoMac, iOS (11,0), NoTV, NoWatch] Rgba16Unorm = 73, - [NoMac, iOS (11,0), NoTV, NoWatch] Rgba16Snorm = 74, - [NoMac, iOS (11,0), NoTV, NoWatch] Rgb10A2Unorm = 75, - [NoMac, iOS (11,0), NoTV, NoWatch] Rg11B10Float = 76, - [NoMac, iOS (11,0), NoTV, NoWatch] Rgb9E5Float = 77, + Bool4 = 56 } [Native] @@ -622,9 +572,6 @@ public enum MTLArgumentType : nuint { ThreadgroupMemory= 1, Texture = 2, Sampler = 3, - - [NoMac, iOS (11,0), NoTV, NoWatch] ImageblockData = 16, - [NoMac, iOS (11,0), NoTV, NoWatch] Imageblock = 17, } [Native] @@ -651,42 +598,21 @@ public enum MTLFeatureSet : nuint { iOS_GPUFamily2_v3 = 6, [iOS (10,0), NoTV, NoWatch, NoMac] iOS_GPUFamily3_v2 = 7, - [iOS (11,0), NoTV, NoWatch, NoMac] - iOS_GPUFamily1_v4 = 8, - [iOS (11,0), NoTV, NoWatch, NoMac] - iOS_GPUFamily2_v4 = 9, - [iOS (11,0), NoTV, NoWatch, NoMac] - iOS_GPUFamily3_v3 = 10, - [iOS (11,0), NoTV, NoWatch, NoMac] - iOS_GPUFamily4_v1 = 11, - - [Mac (10,11), NoiOS, NoTV, NoWatch] - macOS_GPUFamily1_v1 = 10000, - - [Availability (Introduced = Platform.Mac_10_11, Deprecated = Platform.Mac_10_13, Message="Use 'macOS_GPUFamily1_v1' instead.")] - OSX_GPUFamily1_v1 = macOS_GPUFamily1_v1, - - [Mac (10,13), NoiOS, NoTV, NoWatch] - macOS_GPUFamily1_v2 = 10001, - [Availability (Introduced = Platform.Mac_10_12, Deprecated = Platform.Mac_10_13, Message="Use 'macOS_GPUFamily1_v2' instead.")] - OSX_GPUFamily1_v2 = macOS_GPUFamily1_v2, - - [Mac (10,13), NoiOS, NoTV, NoWatch] - macOS_ReadWriteTextureTier2 = 10002, - [Availability (Introduced = Platform.Mac_10_12, Deprecated = Platform.Mac_10_13, Message="Use 'macOS_ReadWriteTextureTier2' instead.")] - OSX_ReadWriteTextureTier2 = macOS_ReadWriteTextureTier2, - - [Mac (10,13), NoiOS, NoTV, NoWatch] - macOS_GPUFamily1_v3 = 10003, + + [Mac (10,11)] + OSX_GPUFamily1_v1 = 10000, + + [NoiOS, NoTV, NoWatch, Mac (10,12)] + OSX_GPUFamily1_v2 = 10001, + + [NoiOS, NoTV, NoWatch, Mac (10,12)] + OSX_ReadWriteTextureTier2 = 10002, [TV (9,0)] TVOS_GPUFamily1_v1 = 30000, [NoiOS, TV (10,0), NoWatch, NoMac] - tvOS_GPUFamily1_v2 = 30001, - - [NoiOS, TV (11,0), NoWatch, NoMac] - tvOS_GPUFamily2_v1 = 30003, + tvOS_GPUFamily1_v2 = 30001 } [iOS (9,0)][Mac (10,11)] @@ -698,8 +624,6 @@ public enum MTLLanguageVersion : nuint { v1_1 = (1 << 16) + 1, [iOS (10,0), TV (10,0), NoWatch, Mac (10,12)] v1_2 = (1 << 16) + 2, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - v2_0 = (2 << 16), } [iOS (9,0)][Mac (10,11)] @@ -738,9 +662,6 @@ public enum MTLMultisampleDepthResolveFilter : nuint{ Sample0, Min, Max } -#if XAMCORE_4_0 - [NoiOS][NoTV] -#endif [Mac (10,12)] [Native] public enum MTLSamplerBorderColor : nuint { @@ -843,27 +764,7 @@ public enum MTLAttributeFormat : nuint { UInt3 = 38, UInt4 = 39, Int1010102Normalized = 40, - UInt1010102Normalized = 41, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - UChar4Normalized_Bgra = 42, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - UChar = 45, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - Char = 46, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - UCharNormalized = 47, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - CharNormalized = 48, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - UShort = 49, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - Short = 50, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - UShortNormalized = 51, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - ShortNormalized = 52, - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - Half = 53, + UInt1010102Normalized = 41 } [iOS (10,0), TV (10,0), NoWatch, Mac (10,12)] @@ -886,48 +787,5 @@ public enum MTLRenderStages : nuint { Vertex = (1 << 0), Fragment = (1 << 1) } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [Native, Flags] - public enum MTLResourceUsage : nuint - { - Read = 1 << 0, - Write = 1 << 1, - Sample = 1 << 2, - } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [Native] - public enum MTLMutability : nuint - { - Default = 0, - Mutable = 1, - Immutable = 2, - } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [Native] - public enum MTLReadWriteTextureTier : nuint - { - None = 0, - One = 1, - Two = 2, - } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [Native] - public enum MTLArgumentBuffersTier : nuint - { - One = 0, - Two = 1, - } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [Native, Flags] - public enum MTLStoreActionOptions : nuint - { - None = 0, - CustomSamplePositions = 1 << 0, - } } #endif diff --git a/src/Metal/MTLRenderCommandEncoder.cs b/src/Metal/MTLRenderCommandEncoder.cs deleted file mode 100644 index 0cc9c36b1db..00000000000 --- a/src/Metal/MTLRenderCommandEncoder.cs +++ /dev/null @@ -1,45 +0,0 @@ -#if XAMCORE_2_0 && MONOMAC -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; - -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Metal { - public static class IMTLRenderCommandEncoder_Extensions { - [Mac (10,13, onlyOn64: true), NoiOS, NoTV, NoWatch] - public unsafe static void SetViewports (this IMTLRenderCommandEncoder This, MTLViewport [] viewports) - { - fixed (void* handle = viewports) - This.SetViewports ((IntPtr)handle, (nuint)(viewports?.Length ?? 0)); - } - - [Mac (10,13, onlyOn64: true), NoiOS, NoTV, NoWatch] - public unsafe static void SetScissorRects (this IMTLRenderCommandEncoder This, MTLScissorRect [] scissorRects) - { - fixed (void* handle = scissorRects) - This.SetScissorRects ((IntPtr)handle, (nuint)(scissorRects?.Length ?? 0)); - } - -#if IOS - [iOS (11,0), NoTV, NoMac, NoWatch] - public unsafe static void SetTileBuffers (this IMTLRenderCommandEncoder This, IMTLBuffer[] buffers, nuint[] offsets, NSRange range) - { - fixed (void* handle = offsets) - This.SetTileBuffers (buffers, (IntPtr)handle, range); - } - - [iOS (11,0), NoTV, NoMac, NoWatch] - public unsafe static void SetTileSamplerStates (this IMTLRenderCommandEncoder This, IMTLSamplerState[] samplers, float[] lodMinClamps, float[] lodMaxClamps, NSRange range) - { - fixed (void* minHandle = lodMinClamps) { - fixed (void* maxHandle = lodMaxClamps) { - This.SetTileSamplerStates (samplers, (IntPtr)minHandle, (IntPtr)maxHandle, range); - } - } - } -#endif - } -} -#endif diff --git a/src/Metal/MTLRenderPassDescriptor.cs b/src/Metal/MTLRenderPassDescriptor.cs deleted file mode 100644 index 1bff58de838..00000000000 --- a/src/Metal/MTLRenderPassDescriptor.cs +++ /dev/null @@ -1,21 +0,0 @@ -#if XAMCORE_2_0 && !COREBUILD -using System; - -namespace XamCore.Metal { - public partial class MTLRenderPassDescriptor { - public unsafe void SetSamplePositions (MTLSamplePosition [] positions) - { - fixed (void* handle = positions) - SetSamplePositions ((IntPtr)handle, (nuint)(positions?.Length ?? 0)); - } - - public unsafe nuint GetSamplePositions (MTLSamplePosition [] positions) - { - fixed (void* handle = positions) { - nuint count = GetSamplePositions ((IntPtr)handle, (nuint)(positions?.Length ?? 0)); - return count; - } - } - } -} -#endif \ No newline at end of file diff --git a/src/ModelIO/MDLTransform.cs b/src/ModelIO/MDLTransform.cs deleted file mode 100644 index c8259bd27bb..00000000000 --- a/src/ModelIO/MDLTransform.cs +++ /dev/null @@ -1,16 +0,0 @@ -#if XAMCORE_2_0 || !MONOMAC -using System; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; - -namespace XamCore.ModelIO { - public partial class MDLTransform { -#if !XAMCORE_4_0 - // Inlined from the MDLTransformComponent protocol. - public static MatrixFloat4x4 CreateGlobalTransform4x4 (MDLObject obj, double atTime) - { - return MatrixFloat4x4.Transpose ((MatrixFloat4x4) CreateGlobalTransform (obj, atTime)); - } -#endif - } -} -#endif \ No newline at end of file diff --git a/src/ModelIO/MDLTransformComponent.cs b/src/ModelIO/MDLTransformComponent.cs deleted file mode 100644 index fa59063cac4..00000000000 --- a/src/ModelIO/MDLTransformComponent.cs +++ /dev/null @@ -1,33 +0,0 @@ -#if XAMCORE_2_0 && !XAMCORE_4_0 -using OpenTK; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; - -namespace XamCore.ModelIO { - public partial class MDLTransformComponent_Extensions { - public static MatrixFloat4x4 GetMatrix4x4 (this IMDLTransformComponent self) - { - return MatrixFloat4x4.Transpose ((MatrixFloat4x4) self.Matrix); - } - - public static void SetMatrix4x4 (this IMDLTransformComponent self, MatrixFloat4x4 value) - { - self.Matrix = (Matrix4) MatrixFloat4x4.Transpose (value); - } - - public static MatrixFloat4x4 GetLocalTransform4x4(this IMDLTransformComponent This, double time) - { - return MatrixFloat4x4.Transpose ((MatrixFloat4x4) GetLocalTransform (This, time)); - } - - public static void SetLocalTransform4x4 (this IMDLTransformComponent This, MatrixFloat4x4 transform, double time) - { - SetLocalTransform (This, (Matrix4) MatrixFloat4x4.Transpose (transform), time); - } - - public static void SetLocalTransform4x4 (this IMDLTransformComponent This, MatrixFloat4x4 transform) - { - SetLocalTransform (This, (Matrix4) MatrixFloat4x4.Transpose (transform)); - } - } -} -#endif \ No newline at end of file diff --git a/src/ModelIO/MIEnums.cs b/src/ModelIO/MIEnums.cs index 586f73b1fe3..3f1bec93727 100644 --- a/src/ModelIO/MIEnums.cs +++ b/src/ModelIO/MIEnums.cs @@ -18,8 +18,6 @@ using Vector2 = global::OpenTK.Vector2; using Vector3 = global::OpenTK.Vector3; using Vector4 = global::OpenTK.Vector4; -using Vector4i = global::OpenTK.Vector4i; -using VectorInt4 = global::OpenTK.Vector4i; using Matrix2 = global::OpenTK.Matrix2; using Matrix3 = global::OpenTK.Matrix3; using Matrix4 = global::OpenTK.Matrix4; @@ -252,8 +250,6 @@ public enum MDLLightType : nuint Environment } -#if !XAMCORE_4_0 - [Obsolete ("Use 'MDLVoxelIndexExtent2' instead.")] [StructLayout(LayoutKind.Sequential)] public struct MDLVoxelIndexExtent { public MDLVoxelIndexExtent (Vector4 minimumExtent, Vector4 maximumExtent) @@ -263,27 +259,6 @@ public MDLVoxelIndexExtent (Vector4 minimumExtent, Vector4 maximumExtent) } public Vector4 MinimumExtent, MaximumExtent; } -#endif - - [StructLayout(LayoutKind.Sequential)] -#if XAMCORE_4_0 - public struct MDLVoxelIndexExtent { -#else - public struct MDLVoxelIndexExtent2 { -#endif - public VectorInt4 MinimumExtent { get; private set; } - public VectorInt4 MaximumExtent { get; private set; } - -#if XAMCORE_4_0 - public MDLVoxelIndexExtent (VectorInt4 minimumExtent, VectorInt4 maximumExtent) -#else - public MDLVoxelIndexExtent2 (VectorInt4 minimumExtent, VectorInt4 maximumExtent) -#endif - { - this.MinimumExtent = minimumExtent; - this.MaximumExtent = maximumExtent; - } - } [Native] public enum MDLCameraProjection : nuint diff --git a/src/NativeTypes/Drawing.tt b/src/NativeTypes/Drawing.tt index b0b51f5a23f..a4313674e4b 100644 --- a/src/NativeTypes/Drawing.tt +++ b/src/NativeTypes/Drawing.tt @@ -224,13 +224,13 @@ namespace XamCore.CoreGraphics } #if !XAMCORE_3_0 - [Obsolete ("Use 'ToRoundedCGSize' instead.")] + [Obsolete ("Use ToRoundedCGSize instead")] public CGSize ToSize () { return ToRoundedCGSize (); } - [Obsolete ("Use 'ToCGPoint' instead.")] + [Obsolete ("Use ToCGPoint instead")] public CGPoint ToPointF () { return (CGPoint)this; diff --git a/src/NetworkExtension/NECompat.cs b/src/NetworkExtension/NECompat.cs index 688cede9a80..913895ed498 100644 --- a/src/NetworkExtension/NECompat.cs +++ b/src/NetworkExtension/NECompat.cs @@ -9,7 +9,7 @@ namespace XamCore.NetworkExtension { #if !XAMCORE_4_0 public partial class NEPacketTunnelNetworkSettings { - [Obsolete ("This constructor does not create a valid instance of the type.")] + [Obsolete ("This constructor does not create a valid instance of the type")] public NEPacketTunnelNetworkSettings () : base (NSObjectFlag.Empty) { } @@ -17,7 +17,7 @@ public NEPacketTunnelNetworkSettings () : base (NSObjectFlag.Empty) public partial class NEPacketTunnelProvider { - [Obsolete ("Use the overload accepting a 'INWTcpConnectionAuthenticationDelegate' argument.")] + [Obsolete ("Use the overload accepting a INWTcpConnectionAuthenticationDelegate argument")] public virtual NWTcpConnection CreateTcpConnection (NWEndpoint remoteEndpoint, bool enableTls, NWTlsParameters tlsParameters, NWTcpConnectionAuthenticationDelegate @delegate) { return CreateTcpConnection (remoteEndpoint, enableTls, tlsParameters, (INWTcpConnectionAuthenticationDelegate) @delegate); @@ -26,7 +26,7 @@ public virtual NWTcpConnection CreateTcpConnection (NWEndpoint remoteEndpoint, b public partial class NWTcpConnectionAuthenticationDelegate : NSObject { - [Obsolete ("Use 'NWTcpConnectionAuthenticationDelegate_Extensions.EvaluateTrustAsync' instead.")] + [Obsolete ("Use 'NWTcpConnectionAuthenticationDelegate_Extensions.EvaluateTrustAsync' instead")] public unsafe virtual Task EvaluateTrustAsync (NWTcpConnection connection, NSArray peerCertificateChain) { return NWTcpConnectionAuthenticationDelegate_Extensions.EvaluateTrustAsync (this, connection, peerCertificateChain); diff --git a/src/ObjCRuntime/Dlfcn.cs b/src/ObjCRuntime/Dlfcn.cs index 764c2e83277..7d85761898f 100644 --- a/src/ObjCRuntime/Dlfcn.cs +++ b/src/ObjCRuntime/Dlfcn.cs @@ -169,22 +169,6 @@ public static void SetInt32 (IntPtr handle, string symbol, int value) return; Marshal.WriteInt32 (indirect, value); } - - public static uint GetUInt32 (IntPtr handle, string symbol) - { - var indirect = dlsym (handle, symbol); - if (indirect == IntPtr.Zero) - return 0; - return (uint) Marshal.ReadInt32 (indirect); - } - - public static void SetUInt32 (IntPtr handle, string symbol, uint value) - { - var indirect = dlsym (handle, symbol); - if (indirect == IntPtr.Zero) - return; - Marshal.WriteInt32 (indirect, (int) value); - } public static long GetInt64 (IntPtr handle, string symbol) { @@ -202,24 +186,6 @@ public static void SetInt64 (IntPtr handle, string symbol, long value) Marshal.WriteInt64 (indirect, value); } - public static ulong GetUInt64 (IntPtr handle, string symbol) - { - var indirect = dlsym (handle, symbol); - if (indirect == IntPtr.Zero) - return 0; - - return (ulong) Marshal.ReadInt64 (indirect); - } - - public static void SetUInt64 (IntPtr handle, string symbol, long value) - { - var indirect = dlsym (handle, symbol); - if (indirect == IntPtr.Zero) - return; - - Marshal.WriteInt64 (indirect, (long) value); - } - public static void SetString (IntPtr handle, string symbol, string value) { var indirect = dlsym (handle, symbol); @@ -256,21 +222,11 @@ public static nint GetNInt (IntPtr handle, string symbol) return (nint)GetIntPtr (handle, symbol); } - public static void SetNInt (IntPtr handle, string symbol, nint value) - { - SetIntPtr (handle, symbol, (IntPtr) value); - } - public static nuint GetNUInt (IntPtr handle, string symbol) { return (nuint)GetIntPtr (handle, symbol); } - public static void SetNUInt (IntPtr handle, string symbol, nuint value) - { - SetIntPtr (handle, symbol, (IntPtr) value); - } - public static nfloat GetNFloat (IntPtr handle, string symbol) { var indirect = dlsym (handle, symbol); @@ -284,18 +240,6 @@ public static nfloat GetNFloat (IntPtr handle, string symbol) return (nfloat) (*(double *) indirect); } } - - public static void SetNFloat (IntPtr handle, string symbol, nfloat value) - { - var indirect = dlsym (handle, symbol); - if (indirect == IntPtr.Zero) - return; - - unsafe { - nfloat* ptr = (nfloat*) indirect; - *ptr = value; - } - } #endif public static IntPtr GetIntPtr (IntPtr handle, string symbol) diff --git a/src/ObjCRuntime/DynamicRegistrar.cs b/src/ObjCRuntime/DynamicRegistrar.cs index b10d69020e8..cbba70861e3 100644 --- a/src/ObjCRuntime/DynamicRegistrar.cs +++ b/src/ObjCRuntime/DynamicRegistrar.cs @@ -809,10 +809,10 @@ public void AddCustomType (Type type) custom_type_map [type] = null; } - public UnmanagedMethodDescription GetMethodDescriptionAndObject (Type type, IntPtr selector, bool is_static, IntPtr obj, ref IntPtr mthis) + public UnmanagedMethodDescription GetMethodDescriptionAndObject (Type type, IntPtr selector, IntPtr obj, ref IntPtr mthis) { var sel = new Selector (selector); - var res = GetMethodNoThrow (type, type, sel.Name, is_static); + var res = GetMethodNoThrow (type, type, sel.Name); if (res == null) throw ErrorHelper.CreateError (8006, "Failed to find the selector '{0}' on the type '{1}'", sel.Name, type.FullName); @@ -856,10 +856,10 @@ internal static MethodInfo FindClosedMethod (Type closed_type, MethodBase open_m throw ErrorHelper.CreateError (8003, "Failed to find the closed generic method '{0}' on the type '{1}'.", open_method.Name, closed_type.FullName); } - public UnmanagedMethodDescription GetMethodDescription (Type type, IntPtr selector, bool is_static) + public UnmanagedMethodDescription GetMethodDescription (Type type, IntPtr selector) { var sel = new Selector (selector); - var res = GetMethodNoThrow (type, type, sel.Name, is_static); + var res = GetMethodNoThrow (type, type, sel.Name); if (res == null) throw ErrorHelper.CreateError (8006, "Failed to find the selector '{0}' on the type '{1}'", sel.Name, type.FullName); if (type.IsGenericType && res.Method is ConstructorInfo) @@ -868,7 +868,7 @@ public UnmanagedMethodDescription GetMethodDescription (Type type, IntPtr select return res.MethodDescription.GetUnmanagedDescription (); } - ObjCMethod GetMethodNoThrow (Type original_type, Type type, string selector, bool is_static) + ObjCMethod GetMethodNoThrow (Type original_type, Type type, string selector) { var objcType = RegisterType (type); @@ -877,8 +877,8 @@ ObjCMethod GetMethodNoThrow (Type original_type, Type type, string selector, boo ObjCMember member = null; - if (type.BaseType != typeof (object) && !objcType.TryGetMember (selector, is_static, out member)) - return GetMethodNoThrow (original_type, type.BaseType, selector, is_static); + if (type.BaseType != typeof (object) && !objcType.Map.TryGetValue (selector, out member)) + return GetMethodNoThrow (original_type, type.BaseType, selector); var method = member as ObjCMethod; diff --git a/src/ObjCRuntime/PlatformAvailability.cs b/src/ObjCRuntime/PlatformAvailability.cs index 46c9643b7c8..8b2e905829a 100644 --- a/src/ObjCRuntime/PlatformAvailability.cs +++ b/src/ObjCRuntime/PlatformAvailability.cs @@ -39,7 +39,7 @@ namespace XamCore.ObjCRuntime // Only iOS and Mac versions and architectures can be ORed together. // [Flags] - [Obsolete ("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.")] + [Obsolete ("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName")] public enum Platform : ulong { None = 0, @@ -106,7 +106,7 @@ public enum Platform : ulong iOS_Arch = 0x00000000ff000000 } - [Obsolete ("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.")] + [Obsolete ("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName")] public static class PlatformHelper { public static bool IsValid (this Platform platform) @@ -348,7 +348,7 @@ public static bool CheckSystemVersion (int major, int minor) } [AttributeUsage (AttributeTargets.All, AllowMultiple = true)] - [Obsolete ("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.")] + [Obsolete ("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName")] public class AvailabilityAttribute : Attribute { public static AvailabilityAttribute Merge (IEnumerable attrs) @@ -548,7 +548,7 @@ public override string ToString () } } - [Obsolete ("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.")] + [Obsolete ("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName")] public sealed class iOSAttribute : AvailabilityAttribute { public iOSAttribute (byte major, byte minor) @@ -562,7 +562,7 @@ public iOSAttribute (byte major, byte minor, byte subminor) } } - [Obsolete ("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.")] + [Obsolete ("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName")] public sealed class MacAttribute : AvailabilityAttribute { public MacAttribute (byte major, byte minor) diff --git a/src/ObjCRuntime/Registrar.cs b/src/ObjCRuntime/Registrar.cs index 6c02135f643..274b121ca7a 100644 --- a/src/ObjCRuntime/Registrar.cs +++ b/src/ObjCRuntime/Registrar.cs @@ -148,7 +148,7 @@ internal class ObjCType { public List Methods; public List Properties; - Dictionary Map = new Dictionary (); + public Dictionary Map = new Dictionary (); ObjCType superType; @@ -235,9 +235,8 @@ public void Add (ObjCField field, ref List exceptions) { // Check if there are any base types with the same property. var base_type = BaseType; - var fieldNameInDictionary = (field.IsStatic ? "+" : "-") + field.Name; while (base_type != null) { - if (base_type.Fields != null && base_type.Fields.ContainsKey (fieldNameInDictionary)) { + if (base_type.Fields != null && base_type.Fields.ContainsKey (field.Name)) { // Maybe we should warn here? Not sure if this is something bad or not. return; } @@ -249,7 +248,7 @@ public void Add (ObjCField field, ref List exceptions) if (Fields == null) Fields = new Dictionary (); // Do fields and methods live in the same objc namespace? // AddToMap (field, errorIfExists); - Fields.Add (fieldNameInDictionary, field); + Fields.Add (field.Name, field); } public bool Add (ObjCMethod method, ref List exceptions) @@ -333,20 +332,11 @@ void VerifyIsNotKeyword (ref List exceptions, ObjCProperty property) AddException (ref exceptions, CreateException (4164, property, "Cannot export the property '{0}' because its selector '{1}' is an Objective-C keyword. Please use a different name.", property.Name, property.Selector)); } - public bool TryGetMember (string selector, bool is_static, out ObjCMember member) - { - if (is_static) - selector = "+" + selector; - else - selector = "-" + selector; - return Map.TryGetValue (selector, out member); - } - bool AddToMap (ObjCMember member, ref List exceptions) { ObjCMember existing; bool rv = true; - if (TryGetMember (member.Selector, member.IsNativeStatic, out existing)) { + if (Map.TryGetValue (member.Selector, out existing)) { if (existing.IsImplicit) { AddException (ref exceptions, CreateException (4141, member, "Cannot register the selector '{0}' on the member '{1}.{2}' because Xamarin.iOS implicitly registers this selector.", member.Selector, Registrar.GetTypeFullName (Type), Registrar.GetMemberName (member))); } else { @@ -355,7 +345,7 @@ bool AddToMap (ObjCMember member, ref List exceptions) rv = false; } - Map [(member.IsNativeStatic ? "+" : "-") + member.Selector] = member; + Map [member.Selector] = member; return rv; } @@ -468,7 +458,6 @@ public string Selector { } public abstract string FullName { get; } - public abstract bool IsNativeStatic { get; } public virtual bool IsImplicit { get { return false; } } protected string ToSignature (TType type, ref bool success) @@ -582,12 +571,6 @@ public bool IsStatic { set { is_static = value; } } - public override bool IsNativeStatic { - get { - return IsStatic && !IsCategoryInstance; - } - } - public bool IsCategoryInstance { get { return IsCategory && Registrar.HasThisAttribute (Method); @@ -768,10 +751,6 @@ public bool IsStatic { set { is_static = value; } } - public override bool IsNativeStatic { - get { return IsStatic; } - } - public ObjCProperty () : base () { } @@ -792,22 +771,12 @@ internal class ObjCField : ObjCMember { #endif public string FieldType; public bool IsProperty; - bool is_static; public override string FullName { get { return Registrar.GetTypeFullName (DeclaringType.Type) + "." + Name; } } - - public bool IsStatic { - get { return is_static; } - set { is_static = value; } - } - - public override bool IsNativeStatic { - get { return IsStatic; } - } } protected virtual void OnRegisterType (ObjCType type) {} @@ -1649,7 +1618,6 @@ ObjCType RegisterTypeUnsafe (TType type, ref List exceptions) FieldType = "XamarinObject",// "^v", // void* Name = "__monoObjectGCHandle", IsPrivate = SupportsModernObjectiveC, - IsStatic = false, }, ref exceptions); } #endif @@ -1759,7 +1727,6 @@ ObjCType RegisterTypeUnsafe (TType type, ref List exceptions) #endif FieldType = "@", IsProperty = true, - IsStatic = IsStatic (property), }, ref exceptions); } } diff --git a/src/ObjCRuntime/Runtime.cs b/src/ObjCRuntime/Runtime.cs index 0cccffad8d8..504827c8f66 100644 --- a/src/ObjCRuntime/Runtime.cs +++ b/src/ObjCRuntime/Runtime.cs @@ -556,10 +556,10 @@ static IntPtr GetSelectorHandle (IntPtr sel) return ((Selector) ObjectWrapper.Convert (sel)).Handle; } - static UnmanagedMethodDescription GetMethodForSelector (IntPtr cls, IntPtr sel, bool is_static) + static UnmanagedMethodDescription GetMethodForSelector (IntPtr cls, IntPtr sel) { // This is called by the old registrar code. - return Registrar.GetMethodDescription (Class.Lookup (cls), sel, is_static); + return Registrar.GetMethodDescription (Class.Lookup (cls), sel); } static IntPtr GetNSObjectWrapped (IntPtr ptr) @@ -675,9 +675,9 @@ static bool IsParameterOut (IntPtr info, int parameter) return parameters [parameter].IsOut; } - static UnmanagedMethodDescription GetMethodAndObjectForSelector (IntPtr klass, IntPtr sel, bool is_static, IntPtr obj, ref IntPtr mthis) + static UnmanagedMethodDescription GetMethodAndObjectForSelector (IntPtr klass, IntPtr sel, IntPtr obj, ref IntPtr mthis) { - return Registrar.GetMethodDescriptionAndObject (Class.Lookup (klass), sel, is_static, obj, ref mthis); + return Registrar.GetMethodDescriptionAndObject (Class.Lookup (klass), sel, obj, ref mthis); } static int CreateProductException (int code, string msg) @@ -954,11 +954,6 @@ static NSObject ConstructNSObject (IntPtr ptr, IntPtr klass, MissingCtorResoluti } } - internal static T ConstructNSObject (IntPtr ptr) where T: NSObject - { - return ConstructNSObject (ptr, typeof (T), MissingCtorResolution.ThrowConstructor1NotFound); - } - // The generic argument T is only used to cast the return value. static T ConstructNSObject (IntPtr ptr, Type type, MissingCtorResolution missingCtorResolution) where T: class, INativeObject { diff --git a/src/ObjCRuntime/Runtime.iOS.cs b/src/ObjCRuntime/Runtime.iOS.cs index 808b1daccd4..8244b259b78 100644 --- a/src/ObjCRuntime/Runtime.iOS.cs +++ b/src/ObjCRuntime/Runtime.iOS.cs @@ -69,13 +69,13 @@ static public List GetSurfacedObjects () } #if TVOS || WATCH - [Advice ("This method is present only to help porting code.")] + [Advice ("This method is present only to help porting code")] public static void StartWWAN (Uri uri, Action callback) { NSRunLoop.Main.BeginInvokeOnMainThread (() => callback (null)); } - [Advice ("This method is present only to help porting code.")] + [Advice ("This method is present only to help porting code")] public static void StartWWAN (Uri uri) { } diff --git a/src/PassKit/PKEnums.cs b/src/PassKit/PKEnums.cs index af88f43e0c2..6fb91b81d30 100644 --- a/src/PassKit/PKEnums.cs +++ b/src/PassKit/PKEnums.cs @@ -19,7 +19,6 @@ public enum PKErrorCode { // NSInteger -> PKPass.h [iOS (6,0)] - [ErrorDomain ("PKPassKitErrorDomain")] [Native] public enum PKPassKitErrorCode : nint { Unknown = -1, @@ -55,19 +54,9 @@ public enum PKPassType : nuint { public enum PKPaymentAuthorizationStatus : nint { Success, Failure, - - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentBillingAddressInvalidError'.")] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentBillingAddressInvalidError'.")] InvalidBillingPostalAddress, - - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentShippingAddressInvalidError'.")] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentShippingAddressInvalidError'.")] InvalidShippingPostalAddress, - - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentContactInvalidError'.")] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentContactInvalidError'.")] InvalidShippingContact, - [iOS (9,2)] PinRequired, [iOS (9,2)] @@ -91,8 +80,6 @@ public enum PKMerchantCapability : nuint { } [Watch (3,0)] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'PKContactField' instead.")] - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'PKContactField' instead.")] [Native] [Flags] public enum PKAddressField : nuint { @@ -188,14 +175,4 @@ public enum PKAddPassButtonStyle : nint { Black = 0, Outline } - - [Watch (4,0)][iOS (11,0)] - [ErrorDomain ("PKPaymentErrorDomain")] - [Native] - public enum PKPaymentErrorCode : nint { - Unknown = -1, - ShippingContactInvalid = 1, - BillingContactInvalid, - ShippingAddressUnserviceable, - } } diff --git a/src/PassKit/PKPaymentRequest.cs b/src/PassKit/PKPaymentRequest.cs deleted file mode 100644 index 311d6aa3747..00000000000 --- a/src/PassKit/PKPaymentRequest.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.PassKit { - - public partial class PKContactFieldsExtensions { - - static public PKContactFields GetValue (NSSet set) - { - var fields = PKContactFields.None; - if (set == null) - return fields; - - foreach (PKContactFields value in Enum.GetValues (typeof (PKContactFields))) { - var constant = value.GetConstant (); - // None does not have an associated native value and Contains would throw an ANE - if ((constant != null) && set.Contains (constant)) - fields |= value; - } - return fields; - } - - static public NSSet GetSet (PKContactFields values) - { - var set = new NSMutableSet (); - if (values == PKContactFields.None) - return set; - - foreach (PKContactFields value in Enum.GetValues (typeof (PKContactFields))) { - if (values.HasFlag (value)) { - var constant = value.GetConstant (); - // None does not have an associated native value and Contains would throw an ANE - if (constant != null) - set.Add (constant); - } - } - return set; - } - } - - public partial class PKPaymentRequest { - - [Watch (4,0)][iOS (11,0)] - public PKContactFields RequiredBillingContactFields { - get { return PKContactFieldsExtensions.GetValue (WeakRequiredBillingContactFields); } - set { WeakRequiredBillingContactFields = PKContactFieldsExtensions.GetSet (value); } - } - - [Watch (4,0)][iOS (11,0)] - public PKContactFields RequiredShippingContactFields { - get { return PKContactFieldsExtensions.GetValue (WeakRequiredShippingContactFields); } - set { WeakRequiredShippingContactFields = PKContactFieldsExtensions.GetSet (value); } - } - } -} diff --git a/src/PdfKit/Enums.cs b/src/PdfKit/Enums.cs index 1763f9e198b..28342d6bd75 100644 --- a/src/PdfKit/Enums.cs +++ b/src/PdfKit/Enums.cs @@ -29,11 +29,9 @@ using System; using XamCore.ObjCRuntime; -#if MONOMAC || (IOS && XAMCORE_2_0) namespace XamCore.PdfKit { - [iOS (11,0)] [Native] public enum PdfActionNamedName : nint { None = 0, @@ -50,7 +48,6 @@ public enum PdfActionNamedName : nint { ZoomOut = 11 } - [iOS (11,0)] [Native] public enum PdfWidgetControlType : nint { Unknown = -1, @@ -59,7 +56,6 @@ public enum PdfWidgetControlType : nint { CheckBox = 2 } - [iOS (11,0)] [Native] public enum PdfLineStyle : nint { None = 0, @@ -70,7 +66,6 @@ public enum PdfLineStyle : nint { ClosedArrow = 5 } - [iOS (11,0)] [Native] public enum PdfMarkupType : nint { Highlight = 0, @@ -78,7 +73,6 @@ public enum PdfMarkupType : nint { Underline = 2 } - [iOS (11,0)] [Native] public enum PdfTextAnnotationIconType : nint { Comment = 0, @@ -90,7 +84,6 @@ public enum PdfTextAnnotationIconType : nint { Insert = 6 } - [iOS (11,0)] [Native] public enum PdfBorderStyle : nint { Solid = 0, @@ -100,7 +93,6 @@ public enum PdfBorderStyle : nint { Underline = 4 } - [iOS (11,0)] [Native] public enum PdfPrintScalingMode : nint { None = 0, @@ -108,7 +100,6 @@ public enum PdfPrintScalingMode : nint { DownToFit = 2 } - [iOS (11,0)] [Native] public enum PdfDocumentPermissions : nint { None = 0, @@ -116,7 +107,6 @@ public enum PdfDocumentPermissions : nint { Owner = 2 } - [iOS (11,0)] [Native] public enum PdfDisplayBox : nint { Media = 0, @@ -126,7 +116,6 @@ public enum PdfDisplayBox : nint { Art = 4 } - [iOS (11,0)] [Native] public enum PdfDisplayMode : nint { SinglePage = 0, @@ -135,7 +124,6 @@ public enum PdfDisplayMode : nint { TwoUpContinuous = 3 } - [iOS (11,0)] [Flags] [Native] public enum PdfAreaOfInterest : nint { @@ -150,37 +138,4 @@ public enum PdfAreaOfInterest : nint { PopupArea = 1 << 7, ImageArea = 1 << 8 } - - [Mac (10,13)] - [iOS (11,0)] - [Native] - public enum PdfDisplayDirection : nint { - Vertical = 0, - Horizontal = 1, - } - - [iOS (11,0), Mac (10,7)] - [Native] - public enum PdfInterpolationQuality : nint { - None = 0, - Low = 1, - High = 2, - } - - [NoMac] - [iOS (11,0)] - [Native] - public enum PdfThumbnailLayoutMode : nint { - Vertical = 0, - Horizontal = 1, - } - - [iOS (11,0), Mac (10,12)] - [Native] - public enum PdfWidgetCellState : nint { - Mixed = -1, - Off = 0, - On = 1, - } } -#endif diff --git a/src/PdfKit/PdfAnnotation.cs b/src/PdfKit/PdfAnnotation.cs deleted file mode 100644 index 8c4124062e7..00000000000 --- a/src/PdfKit/PdfAnnotation.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// PdfAnnotation.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -using System; -using XamCore.CoreGraphics; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -#if XAMCORE_2_0 -namespace XamCore.PdfKit { - public partial class PdfAnnotation { - - [Mac (10,12)] - public bool SetValue (T value, PdfAnnotationKey key) where T : class, INativeObject - { - if (value == null) - throw new ArgumentNullException (nameof (value)); - - return _SetValue (value.Handle, key.GetConstant ()); - } - - [Mac (10,12)] - public bool SetValue (string str, PdfAnnotationKey key) - { - var nstr = NSString.CreateNative (str); - try { - return _SetValue (nstr, key.GetConstant ()); - } finally { - NSString.ReleaseNative (nstr); - } - } - - [Mac (10,12)] - public T GetValue (PdfAnnotationKey key) where T : class, INativeObject - { - return Runtime.GetINativeObject (_GetValue (key.GetConstant ()), true); - } - - public PdfAnnotationKey AnnotationType { - get { return PdfAnnotationKeyExtensions.GetValue ((NSString) Type); } - set { Type = value.GetConstant (); } - } - - [Mac (10,13)] - public CGPoint[] QuadrilateralPoints { - get { - return NSArray.ArrayFromHandleFunc (_QuadrilateralPoints, (v) => - { - using (var value = new NSValue (v)) - return value.CGPointValue; - }); - } - set { - if (value == null) { - _QuadrilateralPoints = IntPtr.Zero; - } else { - using (var arr = new NSMutableArray ()) { - for (int i = 0; i < value.Length; i++) - arr.Add (NSValue.FromCGPoint (value [i])); - _QuadrilateralPoints = arr.Handle; - } - } - } - } - } -} -#endif // XAMCORE_2_0 diff --git a/src/PdfKit/PdfKit.cs b/src/PdfKit/PdfKit.cs index bd56bab0110..c2b80f48390 100644 --- a/src/PdfKit/PdfKit.cs +++ b/src/PdfKit/PdfKit.cs @@ -29,7 +29,6 @@ nfloat [] DashPattern { } } -#if !IOS partial class PdfAnnotationMarkup { CGPoint [] QuadrilateralPoints { get { @@ -53,6 +52,5 @@ CGPoint [] QuadrilateralPoints { } } } -#endif // !IOS } #endif diff --git a/src/Photos/Enums.cs b/src/Photos/Enums.cs index 304ff20f42c..c70d70e0354 100644 --- a/src/Photos/Enums.cs +++ b/src/Photos/Enums.cs @@ -18,7 +18,7 @@ public enum PHImageContentMode : nint { // NSInteger -> PHImageManager.h [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [Native] public enum PHImageRequestOptionsVersion : nint { Current = 0, @@ -29,7 +29,7 @@ public enum PHImageRequestOptionsVersion : nint { // NSInteger -> PHImageManager.h [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [Native] public enum PHImageRequestOptionsDeliveryMode : nint { Opportunistic = 0, @@ -40,7 +40,7 @@ public enum PHImageRequestOptionsDeliveryMode : nint { // NSInteger -> PHImageManager.h [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [Native] public enum PHImageRequestOptionsResizeMode : nint { None = 0, @@ -96,9 +96,9 @@ public enum PHCollectionListSubtype : nint { #if !XAMCORE_3_0 // this was added in the wrong enum type (ref bug #40019) - [Obsolete ("Incorrect value (exists in 'PHAssetCollectionSubtype').")] + [Obsolete ("Incorrect value (exists in PHAssetCollectionSubtype)")] SmartAlbumSelfPortraits = 210, - [Obsolete ("Incorrect value (exists in 'PHAssetCollectionSubtype').")] + [Obsolete ("Incorrect value (exists in PHAssetCollectionSubtype)")] SmartAlbumScreenshots = 211, #endif #if XAMCORE_2_0 @@ -162,15 +162,10 @@ public enum PHAssetCollectionSubtype : nint { SmartAlbumSelfPortraits = 210, [iOS (9,0)] SmartAlbumScreenshots = 211, - [iOS (10,2), TV (10,1)][Mac (10,13, onlyOn64 : true)] + [iOS (10,2), TV (10,1)] SmartAlbumDepthEffect = 212, - [iOS (10,3), TV (10,2)][Mac (10,13, onlyOn64 : true)] + [iOS (10,3), TV (10,2)] SmartAlbumLivePhotos = 213, - [iOS (11,0)][TV(11,0)][NoMac] - SmartAlbumAnimated = 214, - [iOS (11,0)][TV(11,0)][NoMac] - SmartAlbumLongExposures = 215, - #if XAMCORE_2_0 Any = Int64.MaxValue #else @@ -236,7 +231,7 @@ public enum PHAssetBurstSelectionType : nuint { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [Native] public enum PHAuthorizationStatus : nint { NotDetermined, Restricted, Denied, Authorized @@ -279,53 +274,4 @@ public enum PHLivePhotoFrameType : nint { Photo, Video } - - [TV (11,0), iOS (11,0)] - [Mac (10,13, onlyOn64 : true)] - [Native] - public enum PHAssetPlaybackStyle : nint { - Unsupported = 0, - Image = 1, - ImageAnimated = 2, - LivePhoto = 3, - Video = 4, - VideoLooping = 5, - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [Native] - public enum PHProjectTextElementType : nint { - Body = 0, - Title, - Subtitle, - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [Native] - public enum PHProjectCreationSource : nint { - Undefined = 0, - UserSelection = 1, - Album = 2, - Memory = 3, - Moment = 4, - Project = 20, - ProjectBook = 21, - ProjectCalendar = 22, - ProjectCard = 23, - ProjectPrintOrder = 24, - ProjectSlideshow = 25, - ProjectExtension = 26, - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [Native] - public enum PHProjectSectionType : nint { - Undefined = 0, - Cover = 1, - Content = 2, - Auxiliary = 3, - } } diff --git a/src/Photos/PHCompat.cs b/src/Photos/PHCompat.cs index 29f0e953739..545e41fe278 100644 --- a/src/Photos/PHCompat.cs +++ b/src/Photos/PHCompat.cs @@ -8,13 +8,13 @@ namespace XamCore.Photos { public partial class PHContentEditingInputRequestOptions { - [Obsolete ("Use 'CanHandleAdjustmentData' property.")] + [Obsolete ("Use CanHandleAdjustmentData property")] public virtual void SetCanHandleAdjustmentDataHandler (Func canHandleAdjustmentDataPredicate) { CanHandleAdjustmentData = canHandleAdjustmentDataPredicate; } - [Obsolete ("Use 'ProgressHandler' property.")] + [Obsolete ("Use ProgressHandler property")] public virtual void SetProgressHandler (PHProgressHandler progressHandler) { ProgressHandler = progressHandler; diff --git a/src/PhotosUI/PHEnums.cs b/src/PhotosUI/PHEnums.cs index d5fdf07ec58..a9fbb023cd0 100644 --- a/src/PhotosUI/PHEnums.cs +++ b/src/PhotosUI/PHEnums.cs @@ -2,7 +2,7 @@ using XamCore.ObjCRuntime; namespace XamCore.PhotosUI { -#if !MONOMAC + [TV (10,0)] [iOS (9,1)] [Native] @@ -22,5 +22,4 @@ public enum PHLivePhotoBadgeOptions : nuint { OverContent = 1 << 0, LiveOff = 1 << 1, } -#endif } diff --git a/src/ReplayKit/RPEnums.cs b/src/ReplayKit/RPEnums.cs index 2689b9d664d..76ee02f715c 100644 --- a/src/ReplayKit/RPEnums.cs +++ b/src/ReplayKit/RPEnums.cs @@ -27,10 +27,6 @@ public enum RPRecordingError : nint { ContentResize = -5807, BroadcastInvalidSession = -5808, SystemDormancy = -5809, - Entitlements = -5810, - ActivePhoneCall = -5811, - FailedToSave = -5812, - CarPlay = -5813, } [NoiOS] @@ -49,12 +45,4 @@ public enum RPSampleBufferType : nint { AudioApp, AudioMic } - - [Native] - [iOS (11,0)] - [NoTV] - public enum RPCameraPosition : nint { - Front = 1, - Back, - } } \ No newline at end of file diff --git a/src/SafariServices/SSEnums.cs b/src/SafariServices/SSEnums.cs index 5230e8d5e8d..0519b95789f 100644 --- a/src/SafariServices/SSEnums.cs +++ b/src/SafariServices/SSEnums.cs @@ -12,16 +12,15 @@ namespace XamCore.SafariServices { // NSInteger -> SSReadingList.h - [NoMac][iOS (7,0)] + [NoMac] [Native] - [ErrorDomain ("SSReadingListErrorDomain")] public enum SSReadingListError : nint { UrlSchemeNotAllowed = 1 } [NoMac] [iOS (9,0)] - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'SFErrorCode' enum.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use SFErrorCode enum")] [Native] [ErrorDomain ("SFContentBlockerErrorDomain")] public enum SFContentBlockerErrorCode : nint { @@ -41,31 +40,4 @@ public enum SFErrorCode : nint NoAttachmentFound = 2, LoadingInterrupted = 3 } - - [NoMac] - [iOS (11,0)] - [Native] - public enum SFSafariViewControllerDismissButtonStyle : nint { - Done, - Close, - Cancel, - } - - [NoMac] - [iOS (11,0)] - [Native] - [ErrorDomain ("SFAuthenticationErrorDomain")] - public enum SFAuthenticationError : nint { - CanceledLogin = 1, - } - - [NoiOS] - [Mac (10,12,4, only64: true)] - [Native] - public enum SFSafariServicesVersion : nint { - V10_0, - V10_1, - [Mac (10,13, only64: true)] - V11_0, - } } diff --git a/src/SceneKit/Defs.cs b/src/SceneKit/Defs.cs index e19a1d7fbce..b84ab9c2243 100644 --- a/src/SceneKit/Defs.cs +++ b/src/SceneKit/Defs.cs @@ -42,10 +42,7 @@ public enum SCNGeometryPrimitiveType : nint { [Native] public enum SCNTransparencyMode : nint { AOne, - RgbZero, - SingleLayer = 2, - DualLayer = 3, - Default = AOne, + RgbZero } [Watch (3,0)] @@ -309,8 +306,7 @@ public enum SCNBlendMode : nint Subtract = 2, Multiply = 3, Screen = 4, - Replace = 5, - Max = 6, + Replace = 5 } [Watch (3,0)] @@ -325,12 +321,7 @@ public enum SCNDebugOptions : nuint ShowLightInfluences = 1 << 2, ShowLightExtents = 1 << 3, ShowPhysicsFields = 1 << 4, - ShowWireframe = 1 << 5, - RenderAsWireframe = 1 << 6, - ShowSkeletons = 1 << 7, - ShowCreases = 1 << 8, - ShowConstraints = 1 << 9, - ShowCameras = 1 << 10, + ShowWireframe = 1 << 5 } [Watch (3,0)] @@ -365,71 +356,4 @@ public enum SCNMovabilityHint : nint { Fixed, Movable } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum SCNColorMask : nint - { - None = 0, - Red = 1 << 3, - Green = 1 << 2, - Blue = 1 << 1, - Alpha = 1 << 0, - All = 15, - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum SCNInteractionMode : nint - { - Fly, - OrbitTurntable, - OrbitAngleMapping, - OrbitCenteredArcball, - OrbitArcball, - Pan, - Truck, - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum SCNFillMode : nuint - { - Fill = 0, - Lines = 1, - } - - [NoWatch, NoTV, Mac (10,13), iOS (11,0)] - [Native] - public enum SCNTessellationSmoothingMode : nint - { - None = 0, - PNTriangles, - Phong, - } - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum SCNHitTestSearchMode : nint - { - Closest = 0, - All = 1, - Any = 2, - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum SCNCameraProjectionDirection : nint - { - Vertical = 0, - Horizontal = 1, - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Native] - public enum SCNNodeFocusBehavior : nint - { - None = 0, - Occluding, - Focusable, - } } diff --git a/src/SceneKit/SCNCompat.cs b/src/SceneKit/SCNCompat.cs index eb85fed4ad0..e29abb0c53f 100644 --- a/src/SceneKit/SCNCompat.cs +++ b/src/SceneKit/SCNCompat.cs @@ -10,7 +10,7 @@ namespace XamCore.SceneKit { #if !XAMCORE_3_0 partial class SCNAction { - [Obsolete ("Use 'TimingFunction' property.")] + [Obsolete ("Use TimingFunction property")] public virtual void SetTimingFunction (Action timingFunction) { TimingFunction = timingFunction; @@ -19,15 +19,15 @@ public virtual void SetTimingFunction (Action timingFunction) #elif TVOS && !XAMCORE_4_0 partial class SCNMaterialProperty { [Introduced (PlatformName.iOS, 8, 0)] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0, message: "This API has been totally removed on tvOS.")] + [Deprecated (PlatformName.iOS, 10, 0, message: "Deprecated")] + [Deprecated (PlatformName.TvOS, 10, 0, message: "Deprecated in iOS 10 but removed from tvOS 10")] public virtual NSObject BorderColor { get; set; } } partial class SCNRenderer { [Introduced (PlatformName.iOS, 8, 0)] - [Deprecated (PlatformName.iOS, 9, 0)] - [Deprecated (PlatformName.TvOS, 10, 0, message: "This API has been totally removed on tvOS.")] + [Deprecated (PlatformName.iOS, 9, 0, message: "Deprecated")] + [Deprecated (PlatformName.TvOS, 10, 0, message: "Deprecated in iOS 9 but removed from tvOS 10")] public virtual void Render () { } @@ -36,14 +36,14 @@ public virtual void Render () #if MONOMAC && !XAMCORE_4_0 partial class SCNScene { - [Obsolete ("Use the 'ISCNSceneExportDelegate' overload instead.")] + [Obsolete ("Use the ISCNSceneExportDelegate overload instead")] [Mac (10, 9)] public virtual bool WriteToUrl (NSUrl url, SCNSceneLoadingOptions options, SCNSceneExportDelegate handler, SCNSceneExportProgressHandler exportProgressHandler) { return WriteToUrl (url: url, options: options == null ? null : options.Dictionary, aDelegate: handler, exportProgressHandler: exportProgressHandler); } - [Obsolete ("Use the 'ISCNSceneExportDelegate' overload instead.")] + [Obsolete ("Use the ISCNSceneExportDelegate overload instead")] [Mac (10, 9)] public virtual bool WriteToUrl (NSUrl url, NSDictionary options, SCNSceneExportDelegate handler, SCNSceneExportProgressHandler exportProgressHandler) { @@ -56,7 +56,7 @@ public virtual bool WriteToUrl (NSUrl url, NSDictionary options, SCNSceneExportD #if XAMCORE_2_0 || !MONOMAC public abstract partial class SCNSceneRenderer : NSObject { [Introduced (PlatformName.MacOSX, 10, 10)] - [Obsolete ("Use 'SCNSceneRenderer_Extensions.PrepareAsync' instead.")] + [Obsolete ("Use 'SCNSceneRenderer_Extensions.PrepareAsync' instead")] public unsafe virtual Task PrepareAsync (NSObject[] objects) { return SCNSceneRenderer_Extensions.PrepareAsync (this, objects); @@ -64,7 +64,7 @@ public unsafe virtual Task PrepareAsync (NSObject[] objects) [Introduced (PlatformName.iOS, 9, 0)] [Introduced (PlatformName.MacOSX, 10, 11, PlatformArchitecture.Arch64)] - [Obsolete ("Use 'SCNSceneRenderer_Extensions.PresentSceneAsync' instead.")] + [Obsolete ("Use 'SCNSceneRenderer_Extensions.PresentSceneAsync' instead")] public unsafe virtual Task PresentSceneAsync (SCNScene scene, global::XamCore.SpriteKit.SKTransition transition, SCNNode pointOfView) { return SCNSceneRenderer_Extensions.PresentSceneAsync (this, scene, transition, pointOfView); diff --git a/src/SceneKit/SCNGeometry.cs b/src/SceneKit/SCNGeometry.cs index 21326fac11a..f4b76d16703 100644 --- a/src/SceneKit/SCNGeometry.cs +++ b/src/SceneKit/SCNGeometry.cs @@ -14,7 +14,7 @@ namespace XamCore.SceneKit { public partial class SCNGeometry { #if !XAMCORE_3_0 - [Obsolete ("Use the 'Create (SCNGeometrySource[], SCNGeometryElement[])' method instead, as it has a strongly typed return.")] + [Obsolete ("Use the Create(SCNGeometrySource[], SCNGeometryElement[]) method instead, as it has a strongly typed return")] public static NSObject FromSources (SCNGeometrySource [] sources, SCNGeometryElement [] elements) { return Create (sources, elements); diff --git a/src/SceneKit/SCNNode.cs b/src/SceneKit/SCNNode.cs index 8feb48ce53e..58fbf2d7326 100644 --- a/src/SceneKit/SCNNode.cs +++ b/src/SceneKit/SCNNode.cs @@ -122,7 +122,7 @@ public bool IsAnimationPaused (string key) // but the actual objective-c definition of the block is // void (^)(SCNNode *child, BOOL *stop) // - [Obsolete ("Use the overload that takes a 'SCNNodeHandler' instead.")] + [Obsolete ("Use the overload that takes a SCNNodeHandler instead")] public virtual void EnumerateChildNodes (SCNNodePredicate predicate) { SCNNodeHandler predHandler = (SCNNode node, out bool stop) => { diff --git a/src/SceneKit/SCNQuaternion.cs b/src/SceneKit/SCNQuaternion.cs index 35d8158e4b4..1bcff108fe2 100644 --- a/src/SceneKit/SCNQuaternion.cs +++ b/src/SceneKit/SCNQuaternion.cs @@ -399,7 +399,7 @@ public static void Multiply(ref SCNQuaternion quaternion, float scale, out SCNQu } #if !XAMCORE_2_0 - [Obsolete ("Use the overload without the 'ref float scale'.")] + [Obsolete ("Use the overload without the ref float scale")] public static void Multiply(ref SCNQuaternion quaternion, ref float scale, out SCNQuaternion result) { result = new SCNQuaternion(quaternion.X * scale, quaternion.Y * scale, quaternion.Z * scale, quaternion.W * scale); diff --git a/src/Security/Enums.cs b/src/Security/Enums.cs index 400a06004df..a728c8f8688 100644 --- a/src/Security/Enums.cs +++ b/src/Security/Enums.cs @@ -312,7 +312,7 @@ public enum SecStatusCode { InvalidCertAuthority = -67826, /* The certificate authority was not valid. */ InvalidCRLAuthority = -67827, /* The CRL authority was not valid. */ #if MONOMAC - [Obsolete ("Use InvalidCRLAuthority.")] + [Obsolete ("Use InvalidCRLAuthority")] InvaldCRLAuthority = InvalidCRLAuthority, #endif InvalidCRLEncoding = -67828, /* The CRL encoding was not valid. */ @@ -341,7 +341,7 @@ public enum SecStatusCode { InvalidBaseACLs = -67851, /* The base ACLs are not valid. */ InvalidTupleCredentials = -67852, /* The tuple credentials are not valid. */ #if MONOMAC - [Obsolete ("Use InvalidTupleCredentials.")] + [Obsolete ("Use InvalidTupleCredentials")] InvalidTupleCredendtials = InvalidTupleCredentials, #endif InvalidEncoding = -67853, /* The encoding was not valid. */ @@ -404,10 +404,10 @@ public enum SecPadding { [iOS (8,3)] Raw = 0x4000, - [Obsolete ("Don't use hash algorithm.")][NoTV][NoWatch] + [Obsolete ("Hash algorithm is deprecated")][NoTV][NoWatch] PKCS1MD2 = 0x8000, - [Obsolete ("Don't use hash algorithm.")][NoTV][NoWatch] + [Obsolete ("Hash algorithm is deprecated")][NoTV][NoWatch] PKCS1MD5 = 0x8001, PKCS1SHA1 = 0x8002, diff --git a/src/Security/SecureTransport.cs b/src/Security/SecureTransport.cs index b73d72fe7aa..9e575f1e873 100644 --- a/src/Security/SecureTransport.cs +++ b/src/Security/SecureTransport.cs @@ -266,11 +266,5 @@ public enum SslCipherSuite : ushort { TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0xC030, // iOS 9+ TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = 0xC031, // iOS 9+ TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = 0xC032, // iOS 9+ - - TLS_AES_128_GCM_SHA256 = 0x1301, // iOS 11+ - TLS_AES_256_GCM_SHA384 = 0x1302, // iOS 11+ - TLS_CHACHA20_POLY1305_SHA256 = 0x1303, // iOS 11+ - TLS_AES_128_CCM_SHA256 = 0x1304, // iOS 11+ - TLS_AES_128_CCM_8_SHA256 = 0x1305, // iOS 11+ } } diff --git a/src/Security/SslContext.cs b/src/Security/SslContext.cs index b37eea56885..cd4fb96e86c 100644 --- a/src/Security/SslContext.cs +++ b/src/Security/SslContext.cs @@ -507,7 +507,7 @@ public SslClientCertificateState ClientCertificateState { [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11)] extern unsafe static /* OSStatus */ SslStatus SSLSetEncryptionCertificate (/* SSLContextRef */ IntPtr context, /* CFArrayRef */ IntPtr certRefs); - [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Export ciphers are not available anymore.")] + [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Export ciphers are not available anymore")] public SslStatus SetEncryptionCertificate (SecIdentity identify, IEnumerable certificates) { using (var array = Bundle (identify, certificates)) { @@ -542,8 +542,8 @@ public static IntPtr GetTypeId () // TODO: Headers say /* Deprecated, does nothing */ but we are not completly sure about it since there is no deprecation macro // Plus they added new members to SslSessionStrengthPolicy enum opened radar://23379052 https://trello.com/c/NbdTLVD3 // Xcode 8 beta 1: the P/Invoke was removed completely. - [Availability (Deprecated = Platform.iOS_9_2 | Platform.Mac_10_11, Unavailable = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "'SetSessionStrengthPolicy' is not available anymore.")] - [Obsolete ("'SetSessionStrengthPolicy' is not available anymore.")] + [Availability (Deprecated = Platform.iOS_9_2 | Platform.Mac_10_11, Unavailable = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "SetSessionStrengthPolicy is not available anymore")] + [Obsolete ("SetSessionStrengthPolicy is not available anymore.")] public SslStatus SetSessionStrengthPolicy (SslSessionStrengthPolicy policyStrength) { Console.WriteLine ("SetSessionStrengthPolicy is not available anymore."); diff --git a/src/Simd/MatrixDouble4x4.cs b/src/Simd/MatrixDouble4x4.cs deleted file mode 100644 index 969c5b03e96..00000000000 --- a/src/Simd/MatrixDouble4x4.cs +++ /dev/null @@ -1,335 +0,0 @@ -// -// MatrixDouble4x4.cs: -// This represents the native matrix_double4x4 type, which has a column-major layout -// (as opposed to OpenTK.Matrix4d, which has a row-major layout). -// -// Authors: -// Rolf Bjarne Kvinge -// Alex Soto -// -// Copyright (c) 2017 Microsoft Inc -// - - -using System; -using System.Runtime.InteropServices; - -namespace OpenTK -{ - [StructLayout (LayoutKind.Sequential)] - public struct NMatrix4d : IEquatable - { - public double M11; - public double M21; - public double M31; - public double M41; - - public double M12; - public double M22; - public double M32; - public double M42; - - public double M13; - public double M23; - public double M33; - public double M43; - - public double M14; - public double M24; - public double M34; - public double M44; - - public readonly static NMatrix4d Identity = new NMatrix4d { - M11 = 1, - M22 = 1, - M33 = 1, - M44 = 1, - }; - - public NMatrix4d (global::OpenTK.Vector4d row0, global::OpenTK.Vector4d row1, global::OpenTK.Vector4d row2, global::OpenTK.Vector4d row3) - { - M11 = row0.X; - M21 = row1.X; - M31 = row2.X; - M41 = row3.X; - M12 = row0.Y; - M22 = row1.Y; - M32 = row2.Y; - M42 = row3.Y; - M13 = row0.Z; - M23 = row1.Z; - M33 = row2.Z; - M43 = row3.Z; - M14 = row0.W; - M24 = row1.W; - M34 = row2.W; - M44 = row3.W; - } - - public NMatrix4d ( - double m11, double m12, double m13, double m14, - double m21, double m22, double m23, double m24, - double m31, double m32, double m33, double m34, - double m41, double m42, double m43, double m44) - { - M11 = m11; - M21 = m21; - M31 = m31; - M41 = m41; - M12 = m12; - M22 = m22; - M32 = m32; - M42 = m42; - M13 = m13; - M23 = m23; - M33 = m33; - M43 = m43; - M14 = m14; - M24 = m24; - M34 = m34; - M44 = m44; - } - - public Vector4d Column0 { - get { - return new Vector4d (M11, M21, M31, M41); - } - set { - M11 = value.X; - M21 = value.Y; - M31 = value.Z; - M41 = value.W; - } - } - - public Vector4d Column1 { - get { - return new Vector4d (M12, M22, M32, M42); - } - set { - M12 = value.X; - M22 = value.Y; - M32 = value.Z; - M42 = value.W; - } - } - - public Vector4d Column2 { - get { - return new Vector4d (M13, M23, M33, M43); - } - set { - M13 = value.X; - M23 = value.Y; - M33 = value.Z; - M43 = value.W; - } - } - - public Vector4d Column3 { - get { - return new Vector4d (M14, M24, M34, M44); - } - set { - M14 = value.X; - M24 = value.Y; - M34 = value.Z; - M44 = value.W; - } - } - - public Vector4d Row0 { - get { - return new Vector4d (M11, M12, M13, M14); - } - set { - M11 = value.X; - M12 = value.Y; - M13 = value.Z; - M14 = value.W; - } - } - - public Vector4d Row1 { - get { - return new Vector4d (M21, M22, M23, M24); - } - set { - M21 = value.X; - M22 = value.Y; - M23 = value.Z; - M24 = value.W; - } - } - - public Vector4d Row2 { - get { - return new Vector4d (M31, M32, M33, M34); - } - set { - M31 = value.X; - M32 = value.Y; - M33 = value.Z; - M34 = value.W; - } - } - - public Vector4d Row3 { - get { - return new Vector4d (M41, M42, M43, M44); - } - set { - M41 = value.X; - M42 = value.Y; - M43 = value.Z; - M44 = value.W; - } - } - - public double Determinant { - get { - double a = M33 * M44 - M34 * M43; - double b = M32 * M44 - M34 * M42; - double c = M32 * M43 - M33 * M42; - double d = M31 * M44 - M34 * M41; - double e = M31 * M43 - M33 * M41; - double f = M31 * M42 - M32 * M41; - - return - M11 * (M22 * a - M23 * b + M24 * c) - - M12 * (M21 * a - M23 * d + M24 * e) + - M13 * (M21 * b - M22 * d + M24 * f) - - M14 * (M21 * c - M22 * e + M23 * f); - } - } - - public void Transpose () - { - this = Transpose (this); - } - - public static NMatrix4d Transpose (NMatrix4d mat) - { - NMatrix4d result; - Transpose (ref mat, out result); - return result; - } - - public static void Transpose (ref NMatrix4d mat, out NMatrix4d result) - { - result.M11 = mat.M11; - result.M21 = mat.M12; - result.M31 = mat.M13; - result.M41 = mat.M14; - - result.M12 = mat.M21; - result.M22 = mat.M22; - result.M32 = mat.M23; - result.M42 = mat.M24; - - result.M13 = mat.M31; - result.M23 = mat.M32; - result.M33 = mat.M33; - result.M43 = mat.M34; - - result.M14 = mat.M41; - result.M24 = mat.M42; - result.M34 = mat.M43; - result.M44 = mat.M44; - } - - public static NMatrix4d Multiply (NMatrix4d left, NMatrix4d right) - { - NMatrix4d result; - Multiply (ref left, ref right, out result); - return result; - } - - public static void Multiply (ref NMatrix4d left, ref NMatrix4d right, out NMatrix4d result) - { - result.M11 = left.M11 * right.M11 + left.M12 * right.M21 + left.M13 * right.M31 + left.M14 * right.M41; - result.M12 = left.M11 * right.M12 + left.M12 * right.M22 + left.M13 * right.M32 + left.M14 * right.M42; - result.M13 = left.M11 * right.M13 + left.M12 * right.M23 + left.M13 * right.M33 + left.M14 * right.M43; - result.M14 = left.M11 * right.M14 + left.M12 * right.M24 + left.M13 * right.M34 + left.M14 * right.M44; - - result.M21 = left.M21 * right.M11 + left.M22 * right.M21 + left.M23 * right.M31 + left.M24 * right.M41; - result.M22 = left.M21 * right.M12 + left.M22 * right.M22 + left.M23 * right.M32 + left.M24 * right.M42; - result.M23 = left.M21 * right.M13 + left.M22 * right.M23 + left.M23 * right.M33 + left.M24 * right.M43; - result.M24 = left.M21 * right.M14 + left.M22 * right.M24 + left.M23 * right.M34 + left.M24 * right.M44; - - result.M31 = left.M31 * right.M11 + left.M32 * right.M21 + left.M33 * right.M31 + left.M34 * right.M41; - result.M32 = left.M31 * right.M12 + left.M32 * right.M22 + left.M33 * right.M32 + left.M34 * right.M42; - result.M33 = left.M31 * right.M13 + left.M32 * right.M23 + left.M33 * right.M33 + left.M34 * right.M43; - result.M34 = left.M31 * right.M14 + left.M32 * right.M24 + left.M33 * right.M34 + left.M34 * right.M44; - - result.M41 = left.M41 * right.M11 + left.M42 * right.M21 + left.M43 * right.M31 + left.M44 * right.M41; - result.M42 = left.M41 * right.M12 + left.M42 * right.M22 + left.M43 * right.M32 + left.M44 * right.M42; - result.M43 = left.M41 * right.M13 + left.M42 * right.M23 + left.M43 * right.M33 + left.M44 * right.M43; - result.M44 = left.M41 * right.M14 + left.M42 * right.M24 + left.M43 * right.M34 + left.M44 * right.M44; - } - - public static NMatrix4d operator * (NMatrix4d left, NMatrix4d right) - { - return Multiply (left, right); - } - - public static bool operator == (NMatrix4d left, NMatrix4d right) - { - return left.Equals (right); - } - - public static bool operator != (NMatrix4d left, NMatrix4d right) - { - return !left.Equals (right); - } - - public static explicit operator global::OpenTK.Matrix4d (NMatrix4d value) - { - return new global::OpenTK.Matrix4d ( - value.M11, value.M12, value.M13, value.M14, - value.M21, value.M22, value.M23, value.M24, - value.M31, value.M32, value.M33, value.M34, - value.M41, value.M42, value.M43, value.M44); - } - - public static explicit operator NMatrix4d (global::OpenTK.Matrix4d value) - { - return new NMatrix4d (value.Row0, value.Row1, value.Row2, value.Row3); - } - - public override string ToString () - { - return - $"({M11}, {M12}, {M13}, {M14})\n" + - $"({M21}, {M22}, {M23}, {M24})\n" + - $"({M31}, {M32}, {M33}, {M34})\n" + - $"({M41}, {M42}, {M43}, {M44})"; - } - - public override int GetHashCode () - { - return - M11.GetHashCode () ^ M12.GetHashCode () ^ M13.GetHashCode () ^ M14.GetHashCode () ^ - M21.GetHashCode () ^ M22.GetHashCode () ^ M23.GetHashCode () ^ M24.GetHashCode () ^ - M31.GetHashCode () ^ M32.GetHashCode () ^ M33.GetHashCode () ^ M34.GetHashCode () ^ - M41.GetHashCode () ^ M42.GetHashCode () ^ M43.GetHashCode () ^ M44.GetHashCode (); - } - - public override bool Equals (object obj) - { - if (!(obj is NMatrix4d)) - return false; - - return Equals ((NMatrix4d) obj); - } - - public bool Equals (NMatrix4d other) - { - return - M11 == other.M11 && M12 == other.M12 && M13 == other.M13 && M14 == other.M14 && - M21 == other.M21 && M22 == other.M22 && M23 == other.M23 && M24 == other.M24 && - M31 == other.M31 && M32 == other.M32 && M33 == other.M33 && M34 == other.M34 && - M41 == other.M41 && M42 == other.M42 && M43 == other.M43 && M44 == other.M44; - } - } -} diff --git a/src/Simd/MatrixFloat2x2.cs b/src/Simd/MatrixFloat2x2.cs deleted file mode 100644 index bf69612c33b..00000000000 --- a/src/Simd/MatrixFloat2x2.cs +++ /dev/null @@ -1,136 +0,0 @@ -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright (c) 2017 Microsoft Inc -// - -// -// This represents the native matrix_float2x2 type, which has a column-major layout -// (as opposed to OpenTK.Matrix2, which has a row-major layout). -// - -using System; -using System.Runtime.InteropServices; - -namespace OpenTK -{ - [StructLayout (LayoutKind.Sequential)] - public struct NMatrix2 : IEquatable - { - public float R0C0; - public float R1C0; - public float R0C1; - public float R1C1; - - public readonly static NMatrix2 Identity = new NMatrix2 ( - 1, 0, - 0, 1); - - public NMatrix2 ( - float r0c0, float r0c1, - float r1c0, float r1c1) - { - R0C0 = r0c0; - R1C0 = r1c0; - R0C1 = r0c1; - R1C1 = r1c1; - } - - public float Determinant { - get { - return R0C0 * R1C1 - R1C0 * R0C1; - } - } - - public void Transpose () - { - this = Transpose (this); - } - - public static NMatrix2 Transpose (NMatrix2 mat) - { - return new NMatrix2 (mat.R0C0, mat.R1C0, mat.R0C1, mat.R1C1); - } - - public static void Transpose (ref NMatrix2 mat, out NMatrix2 result) - { - result.R0C0 = mat.R0C0; - result.R0C1 = mat.R1C0; - result.R1C0 = mat.R0C1; - result.R1C1 = mat.R1C1; - } - - public static NMatrix2 Multiply (NMatrix2 left, NMatrix2 right) - { - NMatrix2 result; - Multiply (ref left, ref right, out result); - return result; - } - - public static void Multiply (ref NMatrix2 left, ref NMatrix2 right, out NMatrix2 result) - { - result.R0C0 = left.R0C0 * right.R0C0 + left.R0C1 * right.R1C0; - result.R0C1 = left.R0C0 * right.R0C1 + left.R0C1 * right.R1C1; - - result.R1C0 = left.R1C0 * right.R0C0 + left.R1C1 * right.R1C0; - result.R1C1 = left.R1C0 * right.R0C1 + left.R1C1 * right.R1C1; - } - - public static NMatrix2 operator * (NMatrix2 left, NMatrix2 right) - { - return Multiply (left, right); - } - - public static bool operator == (NMatrix2 left, NMatrix2 right) - { - return left.Equals (right); - } - - public static bool operator != (NMatrix2 left, NMatrix2 right) - { - return !left.Equals (right); - } - - public static explicit operator global::OpenTK.Matrix2 (NMatrix2 value) - { - return new global::OpenTK.Matrix2 ( - value.R0C0, value.R0C1, - value.R1C0, value.R1C1); - } - - public static explicit operator NMatrix2 (global::OpenTK.Matrix2 value) - { - return new NMatrix2 ( - value.R0C0, value.R0C1, - value.R1C0, value.R1C1); - } - - public override string ToString () - { - return $"({R0C0}, {R0C1})\n({R1C0}, {R1C1})"; - } - - public override int GetHashCode () - { - return R0C0.GetHashCode () ^ R0C1.GetHashCode () ^ R1C0.GetHashCode () ^ R1C1.GetHashCode (); - } - - public override bool Equals (object obj) - { - if (!(obj is NMatrix2)) - return false; - - return Equals ((NMatrix2) obj); - } - - public bool Equals (NMatrix2 other) - { - return - R0C0 == other.R0C0 && - R0C1 == other.R0C1 && - R1C0 == other.R1C0 && - R1C1 == other.R1C1; - } - } -} diff --git a/src/Simd/MatrixFloat3x3.cs b/src/Simd/MatrixFloat3x3.cs deleted file mode 100644 index 97554562b59..00000000000 --- a/src/Simd/MatrixFloat3x3.cs +++ /dev/null @@ -1,191 +0,0 @@ -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright (c) 2017 Microsoft Inc -// - -// -// This represents the native matrix_float3x3 type, which has a column-major layout -// (as opposed to OpenTK.Matrix3, which has a row-major layout). -// - -using System; -using System.Runtime.InteropServices; - -using VectorFloat3 = global::OpenTK.NVector3; - -namespace OpenTK -{ - [StructLayout (LayoutKind.Sequential)] - public struct NMatrix3 : IEquatable - { - /* Due to memory alignment, vectors of length 3 are - * represented as vectors of length 4, so we pad here - * with dummy fields. - * See top of /usr/include/simd/matrix_types.h for more information. */ - public float R0C0; - public float R1C0; - public float R2C0; - float dummy0; - public float R0C1; - public float R1C1; - public float R2C1; - float dummy1; - public float R0C2; - public float R1C2; - public float R2C2; - float dummy2; - - public readonly static NMatrix3 Identity = new NMatrix3 - { - R0C0 = 1f, - R1C1 = 1f, - R2C2 = 1f, - }; - - public NMatrix3 ( - float r0c0, float r0c1, float r0c2, - float r1c0, float r1c1, float r1c2, - float r2c0, float r2c1, float r2c2) - { - R0C0 = r0c0; - R1C0 = r1c0; - R2C0 = r2c0; - R0C1 = r0c1; - R1C1 = r1c1; - R2C1 = r2c1; - R0C2 = r0c2; - R1C2 = r1c2; - R2C2 = r2c2; - dummy0 = 0; - dummy1 = 0; - dummy2 = 0; - } - - public float Determinant { - get { - return - R0C0 * (R1C1 * R2C2 - R1C2 * R2C1) - - R0C1 * (R1C0 * R2C2 - R1C2 * R2C0) + - R0C2 * (R1C0 * R2C1 - R1C1 * R2C0); - } - } - - public void Transpose () - { - this = Transpose (this); - } - - public static NMatrix3 Transpose (NMatrix3 mat) - { - NMatrix3 result = new NMatrix3 (); - Transpose (ref mat, out result); - return result; - } - - public static void Transpose (ref NMatrix3 mat, out NMatrix3 result) - { - result.R0C0 = mat.R0C0; - result.R1C0 = mat.R0C1; - result.R2C0 = mat.R0C2; - result.R0C1 = mat.R1C0; - result.R1C1 = mat.R1C1; - result.R2C1 = mat.R1C2; - result.R0C2 = mat.R2C0; - result.R1C2 = mat.R2C1; - result.R2C2 = mat.R2C2; - result.dummy0 = 0; - result.dummy1 = 0; - result.dummy2 = 0; - } - - public static NMatrix3 Multiply (NMatrix3 left, NMatrix3 right) - { - NMatrix3 result; - Multiply (ref left, ref right, out result); - return result; - } - - public static void Multiply (ref NMatrix3 left, ref NMatrix3 right, out NMatrix3 result) - { - result.R0C0 = left.R0C0 * right.R0C0 + left.R0C1 * right.R1C0 + left.R0C2 * right.R2C0; - result.R0C1 = left.R0C0 * right.R0C1 + left.R0C1 * right.R1C1 + left.R0C2 * right.R2C1; - result.R0C2 = left.R0C0 * right.R0C2 + left.R0C1 * right.R1C2 + left.R0C2 * right.R2C2; - result.dummy0 = 0; - - result.R1C0 = left.R1C0 * right.R0C0 + left.R1C1 * right.R1C0 + left.R1C2 * right.R2C0; - result.R1C1 = left.R1C0 * right.R0C1 + left.R1C1 * right.R1C1 + left.R1C2 * right.R2C1; - result.R1C2 = left.R1C0 * right.R0C2 + left.R1C1 * right.R1C2 + left.R1C2 * right.R2C2; - result.dummy1 = 0; - - result.R2C0 = left.R2C0 * right.R0C0 + left.R2C1 * right.R1C0 + left.R2C2 * right.R2C0; - result.R2C1 = left.R2C0 * right.R0C1 + left.R2C1 * right.R1C1 + left.R2C2 * right.R2C1; - result.R2C2 = left.R2C0 * right.R0C2 + left.R2C1 * right.R1C2 + left.R2C2 * right.R2C2; - result.dummy2 = 0; - } - - public static NMatrix3 operator * (NMatrix3 left, NMatrix3 right) - { - return Multiply (left, right); - } - - public static bool operator == (NMatrix3 left, NMatrix3 right) - { - return left.Equals (right); - } - - public static bool operator != (NMatrix3 left, NMatrix3 right) - { - return !left.Equals (right); - } - - public static explicit operator global::OpenTK.Matrix3 (NMatrix3 value) - { - return new global::OpenTK.Matrix3 ( - value.R0C0, value.R0C1, value.R0C2, - value.R1C0, value.R1C1, value.R1C2, - value.R2C0, value.R2C1, value.R2C2); - } - - public static explicit operator NMatrix3 (global::OpenTK.Matrix3 value) - { - return new NMatrix3 ( - value.R0C0, value.R0C1, value.R0C2, - value.R1C0, value.R1C1, value.R1C2, - value.R2C0, value.R2C1, value.R2C2); - } - - public override string ToString () - { - return - $"({R0C0}, {R0C1}, {R0C2})\n" + - $"({R1C0}, {R1C1}, {R1C2})\n" + - $"({R2C0}, {R2C1}, {R2C2})"; - } - - public override int GetHashCode () - { - return - R0C0.GetHashCode () ^ R0C1.GetHashCode () ^ R0C2.GetHashCode () ^ - R1C0.GetHashCode () ^ R1C1.GetHashCode () ^ R1C2.GetHashCode () ^ - R2C0.GetHashCode () ^ R2C1.GetHashCode () ^ R2C2.GetHashCode (); - } - - public override bool Equals (object obj) - { - if (!(obj is NMatrix3)) - return false; - - return Equals ((NMatrix3) obj); - } - - public bool Equals (NMatrix3 other) - { - return - R0C0 == other.R0C0 && R0C1 == other.R0C1 && R0C2 == other.R0C2 && - R1C0 == other.R1C0 && R1C1 == other.R1C1 && R1C2 == other.R1C2 && - R2C0 == other.R2C0 && R2C1 == other.R2C1 && R2C2 == other.R2C2; - } - } -} diff --git a/src/Simd/MatrixFloat4x3.cs b/src/Simd/MatrixFloat4x3.cs deleted file mode 100644 index 4439e8525a0..00000000000 --- a/src/Simd/MatrixFloat4x3.cs +++ /dev/null @@ -1,187 +0,0 @@ -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright (c) 2017 Microsoft Inc -// - -// -// This represents the native matrix_float4x3 type (3 rows and 4 columns) -// - -using System; -using System.Runtime.InteropServices; - -using VectorFloat4=global::OpenTK.Vector4; - -namespace OpenTK -{ - [StructLayout (LayoutKind.Sequential)] - public struct NMatrix4x3 : IEquatable - { - public float M11; - public float M21; - public float M31; - float dummy1; - - public float M12; - public float M22; - public float M32; - float dummy2; - - public float M13; - public float M23; - public float M33; - float dummy3; - - public float M14; - public float M24; - public float M34; - float dummy4; - - public NMatrix4x3 ( - float m11, float m12, float m13, float m14, - float m21, float m22, float m23, float m24, - float m31, float m32, float m33, float m34) - { - M11 = m11; - M21 = m21; - M31 = m31; - M12 = m12; - M22 = m22; - M32 = m32; - M13 = m13; - M23 = m23; - M33 = m33; - M14 = m14; - M24 = m24; - M34 = m34; - dummy1 = 0; - dummy2 = 0; - dummy3 = 0; - dummy4 = 0; - } - - public NVector3 Column0 { - get { - return new NVector3 (M11, M21, M31); - } - set { - M11 = value.X; - M21 = value.Y; - M31 = value.Z; - } - } - - public NVector3 Column1 { - get { - return new NVector3 (M12, M22, M32); - } - set { - M12 = value.X; - M22 = value.Y; - M32 = value.Z; - } - } - - public NVector3 Column2 { - get { - return new NVector3 (M13, M23, M33); - } - set { - M13 = value.X; - M23 = value.Y; - M33 = value.Z; - } - } - - public NVector3 Column3 { - get { - return new NVector3 (M14, M24, M34); - } - set { - M14 = value.X; - M24 = value.Y; - M34 = value.Z; - } - } - - public Vector4 Row0 { - get { - return new Vector4 (M11, M12, M13, M14); - } - set { - M11 = value.X; - M12 = value.Y; - M13 = value.Z; - M14 = value.W; - } - } - - public Vector4 Row1 { - get { - return new Vector4 (M21, M22, M23, M24); - } - set { - M21 = value.X; - M22 = value.Y; - M23 = value.Z; - M24 = value.W; - } - } - - public Vector4 Row2 { - get { - return new Vector4 (M31, M32, M33, M34); - } - set { - M31 = value.X; - M32 = value.Y; - M33 = value.Z; - M34 = value.W; - } - } - - public static bool operator == (NMatrix4x3 left, NMatrix4x3 right) - { - return left.Equals (right); - } - - public static bool operator != (NMatrix4x3 left, NMatrix4x3 right) - { - return !left.Equals (right); - } - - public override string ToString () - { - return - $"({M11}, {M12}, {M13}, {M14})\n" + - $"({M21}, {M22}, {M23}, {M24})\n" + - $"({M31}, {M32}, {M33}, {M34})"; - } - - public override int GetHashCode () - { - return - M11.GetHashCode () ^ M12.GetHashCode () ^ M13.GetHashCode () ^ M14.GetHashCode () ^ - M21.GetHashCode () ^ M22.GetHashCode () ^ M23.GetHashCode () ^ M24.GetHashCode () ^ - M31.GetHashCode () ^ M32.GetHashCode () ^ M33.GetHashCode () ^ M34.GetHashCode (); - } - - public override bool Equals (object obj) - { - if (!(obj is NMatrix4x3)) - return false; - - return Equals ((NMatrix4x3) obj); - } - - public bool Equals (NMatrix4x3 other) - { - return - M11 == other.M11 && M12 == other.M12 && M13 == other.M13 && M14 == other.M14 && - M21 == other.M21 && M22 == other.M22 && M23 == other.M23 && M24 == other.M24 && - M31 == other.M31 && M32 == other.M32 && M33 == other.M33 && M34 == other.M34; - } - } -} diff --git a/src/Simd/MatrixFloat4x4.cs b/src/Simd/MatrixFloat4x4.cs deleted file mode 100644 index 551490cbe34..00000000000 --- a/src/Simd/MatrixFloat4x4.cs +++ /dev/null @@ -1,334 +0,0 @@ -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright (c) 2017 Microsoft Inc -// - -// -// This represents the native matrix_float4x4 type, which has a column-major layout -// (as opposed to OpenTK.Matrix4, which has a row-major layout). -// - -using System; -using System.Runtime.InteropServices; - -namespace OpenTK -{ - [StructLayout (LayoutKind.Sequential)] - public struct NMatrix4 : IEquatable - { - public float M11; - public float M21; - public float M31; - public float M41; - - public float M12; - public float M22; - public float M32; - public float M42; - - public float M13; - public float M23; - public float M33; - public float M43; - - public float M14; - public float M24; - public float M34; - public float M44; - - public readonly static NMatrix4 Identity = new NMatrix4 { - M11 = 1f, - M22 = 1f, - M33 = 1f, - M44 = 1f, - }; - - public NMatrix4 (global::OpenTK.Vector4 row0, global::OpenTK.Vector4 row1, global::OpenTK.Vector4 row2, global::OpenTK.Vector4 row3) - { - M11 = row0.X; - M21 = row1.X; - M31 = row2.X; - M41 = row3.X; - M12 = row0.Y; - M22 = row1.Y; - M32 = row2.Y; - M42 = row3.Y; - M13 = row0.Z; - M23 = row1.Z; - M33 = row2.Z; - M43 = row3.Z; - M14 = row0.W; - M24 = row1.W; - M34 = row2.W; - M44 = row3.W; - } - - public NMatrix4 ( - float m11, float m12, float m13, float m14, - float m21, float m22, float m23, float m24, - float m31, float m32, float m33, float m34, - float m41, float m42, float m43, float m44) - { - M11 = m11; - M21 = m21; - M31 = m31; - M41 = m41; - M12 = m12; - M22 = m22; - M32 = m32; - M42 = m42; - M13 = m13; - M23 = m23; - M33 = m33; - M43 = m43; - M14 = m14; - M24 = m24; - M34 = m34; - M44 = m44; - } - - public Vector4 Column0 { - get { - return new Vector4 (M11, M21, M31, M41); - } - set { - M11 = value.X; - M21 = value.Y; - M31 = value.Z; - M41 = value.W; - } - } - - public Vector4 Column1 { - get { - return new Vector4 (M12, M22, M32, M42); - } - set { - M12 = value.X; - M22 = value.Y; - M32 = value.Z; - M42 = value.W; - } - } - - public Vector4 Column2 { - get { - return new Vector4 (M13, M23, M33, M43); - } - set { - M13 = value.X; - M23 = value.Y; - M33 = value.Z; - M43 = value.W; - } - } - - public Vector4 Column3 { - get { - return new Vector4 (M14, M24, M34, M44); - } - set { - M14 = value.X; - M24 = value.Y; - M34 = value.Z; - M44 = value.W; - } - } - - public Vector4 Row0 { - get { - return new Vector4 (M11, M12, M13, M14); - } - set { - M11 = value.X; - M12 = value.Y; - M13 = value.Z; - M14 = value.W; - } - } - - public Vector4 Row1 { - get { - return new Vector4 (M21, M22, M23, M24); - } - set { - M21 = value.X; - M22 = value.Y; - M23 = value.Z; - M24 = value.W; - } - } - - public Vector4 Row2 { - get { - return new Vector4 (M31, M32, M33, M34); - } - set { - M31 = value.X; - M32 = value.Y; - M33 = value.Z; - M34 = value.W; - } - } - - public Vector4 Row3 { - get { - return new Vector4 (M41, M42, M43, M44); - } - set { - M41 = value.X; - M42 = value.Y; - M43 = value.Z; - M44 = value.W; - } - } - - public float Determinant { - get { - float a = M33 * M44 - M34 * M43; - float b = M32 * M44 - M34 * M42; - float c = M32 * M43 - M33 * M42; - float d = M31 * M44 - M34 * M41; - float e = M31 * M43 - M33 * M41; - float f = M31 * M42 - M32 * M41; - - return - M11 * (M22 * a - M23 * b + M24 * c) - - M12 * (M21 * a - M23 * d + M24 * e) + - M13 * (M21 * b - M22 * d + M24 * f) - - M14 * (M21 * c - M22 * e + M23 * f); - } - } - - public void Transpose () - { - this = Transpose (this); - } - - public static NMatrix4 Transpose (NMatrix4 mat) - { - NMatrix4 result; - Transpose (ref mat, out result); - return result; - } - - public static void Transpose (ref NMatrix4 mat, out NMatrix4 result) - { - result.M11 = mat.M11; - result.M21 = mat.M12; - result.M31 = mat.M13; - result.M41 = mat.M14; - - result.M12 = mat.M21; - result.M22 = mat.M22; - result.M32 = mat.M23; - result.M42 = mat.M24; - - result.M13 = mat.M31; - result.M23 = mat.M32; - result.M33 = mat.M33; - result.M43 = mat.M34; - - result.M14 = mat.M41; - result.M24 = mat.M42; - result.M34 = mat.M43; - result.M44 = mat.M44; - } - - public static NMatrix4 Multiply (NMatrix4 left, NMatrix4 right) - { - NMatrix4 result; - Multiply (ref left, ref right, out result); - return result; - } - - public static void Multiply (ref NMatrix4 left, ref NMatrix4 right, out NMatrix4 result) - { - result.M11 = left.M11 * right.M11 + left.M12 * right.M21 + left.M13 * right.M31 + left.M14 * right.M41; - result.M12 = left.M11 * right.M12 + left.M12 * right.M22 + left.M13 * right.M32 + left.M14 * right.M42; - result.M13 = left.M11 * right.M13 + left.M12 * right.M23 + left.M13 * right.M33 + left.M14 * right.M43; - result.M14 = left.M11 * right.M14 + left.M12 * right.M24 + left.M13 * right.M34 + left.M14 * right.M44; - - result.M21 = left.M21 * right.M11 + left.M22 * right.M21 + left.M23 * right.M31 + left.M24 * right.M41; - result.M22 = left.M21 * right.M12 + left.M22 * right.M22 + left.M23 * right.M32 + left.M24 * right.M42; - result.M23 = left.M21 * right.M13 + left.M22 * right.M23 + left.M23 * right.M33 + left.M24 * right.M43; - result.M24 = left.M21 * right.M14 + left.M22 * right.M24 + left.M23 * right.M34 + left.M24 * right.M44; - - result.M31 = left.M31 * right.M11 + left.M32 * right.M21 + left.M33 * right.M31 + left.M34 * right.M41; - result.M32 = left.M31 * right.M12 + left.M32 * right.M22 + left.M33 * right.M32 + left.M34 * right.M42; - result.M33 = left.M31 * right.M13 + left.M32 * right.M23 + left.M33 * right.M33 + left.M34 * right.M43; - result.M34 = left.M31 * right.M14 + left.M32 * right.M24 + left.M33 * right.M34 + left.M34 * right.M44; - - result.M41 = left.M41 * right.M11 + left.M42 * right.M21 + left.M43 * right.M31 + left.M44 * right.M41; - result.M42 = left.M41 * right.M12 + left.M42 * right.M22 + left.M43 * right.M32 + left.M44 * right.M42; - result.M43 = left.M41 * right.M13 + left.M42 * right.M23 + left.M43 * right.M33 + left.M44 * right.M43; - result.M44 = left.M41 * right.M14 + left.M42 * right.M24 + left.M43 * right.M34 + left.M44 * right.M44; - } - - public static NMatrix4 operator * (NMatrix4 left, NMatrix4 right) - { - return Multiply (left, right); - } - - public static bool operator == (NMatrix4 left, NMatrix4 right) - { - return left.Equals (right); - } - - public static bool operator != (NMatrix4 left, NMatrix4 right) - { - return !left.Equals (right); - } - - public static explicit operator global::OpenTK.Matrix4 (NMatrix4 value) - { - return new global::OpenTK.Matrix4 ( - value.M11, value.M12, value.M13, value.M14, - value.M21, value.M22, value.M23, value.M24, - value.M31, value.M32, value.M33, value.M34, - value.M41, value.M42, value.M43, value.M44); - } - - public static explicit operator NMatrix4 (global::OpenTK.Matrix4 value) - { - return new NMatrix4 (value.Row0, value.Row1, value.Row2, value.Row3); - } - - public override string ToString () - { - return - $"({M11}, {M12}, {M13}, {M14})\n" + - $"({M21}, {M22}, {M23}, {M24})\n" + - $"({M31}, {M32}, {M33}, {M34})\n" + - $"({M41}, {M42}, {M43}, {M44})"; - } - - public override int GetHashCode () - { - return - M11.GetHashCode () ^ M12.GetHashCode () ^ M13.GetHashCode () ^ M14.GetHashCode () ^ - M21.GetHashCode () ^ M22.GetHashCode () ^ M23.GetHashCode () ^ M24.GetHashCode () ^ - M31.GetHashCode () ^ M32.GetHashCode () ^ M33.GetHashCode () ^ M34.GetHashCode () ^ - M41.GetHashCode () ^ M42.GetHashCode () ^ M43.GetHashCode () ^ M44.GetHashCode (); - } - - public override bool Equals (object obj) - { - if (!(obj is NMatrix4)) - return false; - - return Equals ((NMatrix4) obj); - } - - public bool Equals (NMatrix4 other) - { - return - M11 == other.M11 && M12 == other.M12 && M13 == other.M13 && M14 == other.M14 && - M21 == other.M21 && M22 == other.M22 && M23 == other.M23 && M24 == other.M24 && - M31 == other.M31 && M32 == other.M32 && M33 == other.M33 && M34 == other.M34 && - M41 == other.M41 && M42 == other.M42 && M43 == other.M43 && M44 == other.M44; - } - } -} diff --git a/src/Simd/VectorDouble3.cs b/src/Simd/VectorDouble3.cs deleted file mode 100644 index db1aed4770a..00000000000 --- a/src/Simd/VectorDouble3.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// VectorDouble3.cs: -// This represents the native vector_double3 type, which is 32 bytes. -// -// -// Authors: -// Rolf Bjarne Kvinge -// Alex Soto -// -// Copyright (c) 2017 Microsoft Inc -// - -using System; -using System.Runtime.InteropServices; - -namespace OpenTK -{ - [StructLayout (LayoutKind.Sequential)] - public struct NVector3d : IEquatable - { - public double X; - public double Y; - public double Z; - double dummy; - - public NVector3d (double x, double y, double z) - { - X = x; - Y = y; - Z = z; - dummy = 0; - } - - public static bool operator == (NVector3d left, NVector3d right) - { - return left.Equals (right); - } - - public static bool operator != (NVector3d left, NVector3d right) - { - return !left.Equals (right); - } - - public static explicit operator global::OpenTK.Vector3d (NVector3d value) - { - return new global::OpenTK.Vector3d (value.X, value.Y, value.Z); - } - - public static explicit operator NVector3d (global::OpenTK.Vector3d value) - { - return new NVector3d (value.X, value.Y, value.Z); - } - - public override string ToString () - { - return $"({X}, {Y}, {Z})"; - } - - public override int GetHashCode () - { - return X.GetHashCode () ^ Y.GetHashCode () ^ Z.GetHashCode (); - } - - public override bool Equals (object obj) - { - if (!(obj is NVector3d)) - return false; - - return Equals ((NVector3d) obj); - } - - public bool Equals (NVector3d other) - { - return X == other.X && Y == other.Y && Z == other.Z; - } - } -} diff --git a/src/Simd/VectorFloat3.cs b/src/Simd/VectorFloat3.cs deleted file mode 100644 index abf8a177761..00000000000 --- a/src/Simd/VectorFloat3.cs +++ /dev/null @@ -1,76 +0,0 @@ -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright (c) 2017 Microsoft Inc -// - -// -// This represents the native vector_float3 type, which is 16 bytes. -// - -using System; -using System.Runtime.InteropServices; - -namespace OpenTK -{ - [StructLayout (LayoutKind.Sequential)] - public struct NVector3 : IEquatable - { - public float X; - public float Y; - public float Z; - float dummy; - - public NVector3 (float x, float y, float z) - { - X = x; - Y = y; - Z = z; - dummy = 0; - } - - public static bool operator == (NVector3 left, NVector3 right) - { - return left.Equals (right); - } - - public static bool operator != (NVector3 left, NVector3 right) - { - return !left.Equals (right); - } - - public static explicit operator global::OpenTK.Vector3 (NVector3 value) - { - return new global::OpenTK.Vector3 (value.X, value.Y, value.Z); - } - - public static explicit operator NVector3 (global::OpenTK.Vector3 value) - { - return new NVector3 (value.X, value.Y, value.Z); - } - - public override string ToString () - { - return $"({X}, {Y}, {Z})"; - } - - public override int GetHashCode () - { - return X.GetHashCode () ^ Y.GetHashCode () ^ Z.GetHashCode (); - } - - public override bool Equals (object obj) - { - if (!(obj is NVector3)) - return false; - - return Equals ((NVector3) obj); - } - - public bool Equals (NVector3 other) - { - return X == other.X && Y == other.Y && Z == other.Z; - } - } -} diff --git a/src/Social/SLCompat.cs b/src/Social/SLCompat.cs index c0823a73a4c..9b8d73fd888 100644 --- a/src/Social/SLCompat.cs +++ b/src/Social/SLCompat.cs @@ -8,7 +8,7 @@ namespace XamCore.Social { partial class SLComposeSheetConfigurationItem { - [Obsolete ("Use the 'TapHandler' property.")] + [Obsolete ("Use the TapHandler property")] public virtual void SetTapHandler (Action tapHandler) { TapHandler = tapHandler; diff --git a/src/SpriteKit/Enums.cs b/src/SpriteKit/Enums.cs index 4bdef22eba9..3ca62af8ec7 100644 --- a/src/SpriteKit/Enums.cs +++ b/src/SpriteKit/Enums.cs @@ -183,14 +183,4 @@ public enum SKTileAdjacencyMask : nuint LowerLeftCorner = Up | Right | LowerRight | Down | LowerLeft | Left | UpperLeft, UpperLeftCorner = Up | UpperRight | Right | Down | LowerLeft | Left | UpperLeft, } - - [NoWatch] - [NoMac] - [TV (11,0), iOS (11,0)] - [Native] - public enum SKNodeFocusBehavior : nint { - None = 0, - Occluding, - Focusable, - } } diff --git a/src/SpriteKit/ObsoleteCompat.cs b/src/SpriteKit/ObsoleteCompat.cs index f4d561de1a8..19c9a3aa0a0 100644 --- a/src/SpriteKit/ObsoleteCompat.cs +++ b/src/SpriteKit/ObsoleteCompat.cs @@ -15,13 +15,13 @@ namespace XamCore.SpriteKit { #if !XAMCORE_3_0 && !MONOMAC public partial class SKAction { - [Obsolete ("Use the 'FalloffBy' method.")] + [Obsolete ("Use FalloffBy method")] public static SKAction Falloff (float /* float, not CGFloat */ to, double duration) { return FalloffBy (to, duration); } - [Obsolete ("Use the 'TimingFunction' property.")] + [Obsolete ("Use TimingFunction property")] public virtual void SetTimingFunction (SKActionTimingFunction timingFunction) { TimingFunction = timingFunction; @@ -32,61 +32,61 @@ public virtual void SetTimingFunction (SKActionTimingFunction timingFunction) #if !XAMCORE_2_0 && !MONOMAC public partial class SKPhysicsBody { - [Obsolete ("Use the 'FromBodies' method instead.")] + [Obsolete ("Use the method FromBodies instead")] public static SKPhysicsBody BodyWithBodies (SKPhysicsBody [] bodies) { return FromBodies (bodies); } - [Obsolete ("Use the 'CreateCircularBody' method instead.")] + [Obsolete ("Use the CreateCircularBody method instead")] public static SKPhysicsBody BodyWithCircleOfRadius (nfloat radius) { return CreateCircularBody (radius); } - [Obsolete ("Use the 'CreateCircularBody' method instead.")] + [Obsolete ("Use the CreateCircularBody method instead")] public static SKPhysicsBody BodyWithCircleOfRadius (nfloat radius, CGPoint center) { return CreateCircularBody (radius, center); } - [Obsolete ("Use the 'CreateRectangularBody' method instead.")] + [Obsolete ("Use the CreateRectangularBody method instead")] public static SKPhysicsBody BodyWithRectangleOfSize (CGSize size) { return CreateRectangularBody (size); } - [Obsolete ("Use the 'CreateRectangularBody' method instead.")] + [Obsolete ("Use the CreateRectangularBody method instead")] public static SKPhysicsBody BodyWithRectangleOfSize (CGSize size, CGPoint center) { return CreateRectangularBody (size, center); } - [Obsolete ("Use the 'CreateBodyFromPath' method instead.")] + [Obsolete ("Use the CreateBodyFromPath method instead")] public static SKPhysicsBody BodyWithPolygonFromPath (CGPath path) { return CreateBodyFromPath (path); } - [Obsolete ("Use the 'CreateEdge' method instead.")] + [Obsolete ("Use the CreateEdge method instead")] public static SKPhysicsBody BodyWithEdgeFromPoint (CGPoint fromPoint, CGPoint toPoint) { return CreateEdge (fromPoint, toPoint); } - [Obsolete ("Use the 'CreateEdgeChain' method instead.")] + [Obsolete ("Use the CreateEdgeChain method instead")] public static SKPhysicsBody BodyWithEdgeChainFromPath (CGPath path) { return CreateEdgeChain (path); } - [Obsolete ("Use the 'CreateEdgeLoop' method instead.")] + [Obsolete ("Use the CreateEdgeLoop method instead")] public static SKPhysicsBody BodyWithEdgeLoopFromPath (CGPath path) { return CreateEdgeLoop (path); } - [Obsolete ("Use the 'CreateEdgeLoop' method instead.")] + [Obsolete ("Use the CreateEdgeLoop method instead")] public static SKPhysicsBody BodyWithEdgeLoopFromRect (CGRect rect) { return CreateEdgeLoop (rect); diff --git a/src/SpriteKit/SKFieldNode.cs b/src/SpriteKit/SKFieldNode.cs index 355a95d6a1e..c0b883dbd11 100644 --- a/src/SpriteKit/SKFieldNode.cs +++ b/src/SpriteKit/SKFieldNode.cs @@ -15,7 +15,7 @@ namespace XamCore.SpriteKit { #if !XAMCORE_3_0 && !MONOMAC public partial class SKFieldNode { - [Obsolete ("Use the method 'CreateVortexField' instead.")] + [Obsolete ("Use the method CreateVortexField instead")] public static SKFieldNode CraeteVortexField () { return CreateVortexField (); diff --git a/src/SpriteKit/SKUniform.cs b/src/SpriteKit/SKUniform.cs index c8fedefa7b0..b05c8ab4f06 100644 --- a/src/SpriteKit/SKUniform.cs +++ b/src/SpriteKit/SKUniform.cs @@ -17,9 +17,6 @@ using Matrix2 = global::OpenTK.Matrix2; using Matrix3 = global::OpenTK.Matrix3; using Matrix4 = global::OpenTK.Matrix4; -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; #if (XAMCORE_2_0 || !MONOMAC) && !WATCH namespace XamCore.SpriteKit { @@ -74,18 +71,9 @@ public SKUniform (string name, Vector4 value) InitializeHandle (InitWithNameFloatVector4 (name, value), "initWithName:floatVector4:"); } -#if !XAMCORE_4_0 // Apple deprecated initWithName:floatMatrix2: in macOS10.12/iOS10.0 // and made available initWithName:matrixFloat2x2: so we invoke // the right one at runtime depending on which OS version we are running - // - // Unfortunately our 'initWithName:matrixFloat2x2:' implementation is - // incorrect (the matrix is transposed), but changing it would be a - // breaking change, so we obsolete this constructor and provide a new - // one which implements (only) 'initWithName:matrixFloat2x2:' - // correctly. However, this constructor still does the right thing for - // < macOS 10.12 / iOS 10.0 - [Obsolete ("Use the '(string, MatrixFloat2x2)' overload instead.")] public SKUniform (string name, Matrix2 value) { if (CheckSystemVersion ()) @@ -97,14 +85,6 @@ public SKUniform (string name, Matrix2 value) // Apple deprecated initWithName:floatMatrix3: in macOS10.12/iOS10.0 // and made available initWithName:matrixFloat3x3: so we invoke // the right one at runtime depending on which OS version we are running - // - // Unfortunately our 'initWithName:matrixFloat3x3:' implementation is - // incorrect (the matrix is transposed), but changing it would be a - // breaking change, so we obsolete this constructor and provide a new - // one which implements (only) 'initWithName:matrixFloat3x3:' - // correctly. However, this constructor still does the right thing for - // < macOS 10.12 / iOS 10.0 - [Obsolete ("Use the '(string, MatrixFloat3x3)' overload instead.")] public SKUniform (string name, Matrix3 value) { if (CheckSystemVersion ()) @@ -116,14 +96,6 @@ public SKUniform (string name, Matrix3 value) // Apple deprecated initWithName:floatMatrix4: in macOS10.12/iOS10.0 // and made available initWithName:matrixFloat4x4: so we invoke // the right one at runtime depending on which OS version we are running - // - // Unfortunately our 'initWithName:matrixFloat4x4:' implementation is - // incorrect (the matrix is transposed), but changing it would be a - // breaking change, so we obsolete this constructor and provide a new - // one which implements (only) 'initWithName:matrixFloat4x4:' - // correctly. However, this constructor still does the right thing for - // < macOS 10.12 / iOS 10.0 - [Obsolete ("Use the '(string, MatrixFloat4x4)' overload instead.")] public SKUniform (string name, Matrix4 value) { if (CheckSystemVersion ()) @@ -131,7 +103,6 @@ public SKUniform (string name, Matrix4 value) else InitializeHandle (InitWithNameFloatMatrix4 (name, value), "initWithName:floatMatrix4:"); } -#endif // !XAMCORE_4_0 // Apple deprecated floatVector2Value in macOS10.12/iOS10.0 // and made available vectorFloat2Value so we invoke @@ -190,29 +161,20 @@ public virtual Vector4 FloatVector4Value } } -#if !XAMCORE_4_0 // Apple deprecated floatMatrix2Value in macOS10.12/iOS10.0 // and made available matrixFloat2x2Value so we invoke // the right one at runtime depending on which OS version we are running - // - // Unfortunately our 'matrixFloat2x2Value' implementation is incorrect - // (we return a transposed matrix), but changing it would be a - // breaking change, so we obsolete this property and provide a new one - // which implements (only) 'matrixFloat4x4Value' correctly. However, - // this property still returns the correct matrix for < macOS 10.12 / - // iOS 10.0 - [Obsolete ("Use 'MatrixFloat2x2Value' instead.")] public virtual Matrix2 FloatMatrix2Value { get { if (CheckSystemVersion ()) - return (Matrix2) MatrixFloat2x2.Transpose (MatrixFloat2x2Value); + return _MatrixFloat2x2Value; else return _FloatMatrix2Value; } set { if (CheckSystemVersion ()) - MatrixFloat2x2Value = MatrixFloat2x2.Transpose ((MatrixFloat2x2) value); + _MatrixFloat2x2Value = value; else _FloatMatrix2Value = value; } @@ -221,25 +183,17 @@ public virtual Matrix2 FloatMatrix2Value // Apple deprecated floatMatrix3Value in macOS10.12/iOS10.0 // and made available matrixFloat3x3Value so we invoke // the right one at runtime depending on which OS version we are running - // - // Unfortunately our 'matrixFloat3x3Value' implementation is incorrect - // (we return a transposed matrix), but changing it would be a - // breaking change, so we obsolete this property and provide a new one - // which implements (only) 'matrixFloat3x3Value' correctly. However, - // this property still returns the correct matrix for < macOS 10.12 / - // iOS 10.0 - [Obsolete ("Use 'MatrixFloat3x3Value' instead.")] public virtual Matrix3 FloatMatrix3Value { get { if (CheckSystemVersion ()) - return (Matrix3) MatrixFloat3x3.Transpose (MatrixFloat3x3Value); + return _MatrixFloat3x3Value; else return _FloatMatrix3Value; } set { if (CheckSystemVersion ()) - MatrixFloat3x3Value = MatrixFloat3x3.Transpose ((MatrixFloat3x3) value); + _MatrixFloat3x3Value = value; else _FloatMatrix3Value = value; } @@ -248,30 +202,21 @@ public virtual Matrix3 FloatMatrix3Value // Apple deprecated floatMatrix4Value in macOS10.12/iOS10.0 // and made available matrixFloat4x4Value so we invoke // the right one at runtime depending on which OS version we are running - // - // Unfortunately our 'matrixFloat4x4Value' implementation is incorrect - // (we return a transposed matrix), but changing it would be a - // breaking change, so we obsolete this property and provide a new one - // which implements (only) 'matrixFloat4x4Value' correctly. However, - // this property still returns the correct matrix for < macOS 10.12 / - // iOS 10.0 - [Obsolete ("Use 'MatrixFloat4x4Value' instead.")] public virtual Matrix4 FloatMatrix4Value { get { if (CheckSystemVersion ()) - return (Matrix4) MatrixFloat4x4.Transpose (MatrixFloat4x4Value); + return _MatrixFloat4x4Value; else return _FloatMatrix4Value; } set { if (CheckSystemVersion ()) - MatrixFloat4x4Value = MatrixFloat4x4.Transpose ((MatrixFloat4x4) value); + _MatrixFloat4x4Value = value; else _FloatMatrix4Value = value; } } -#endif // !XAMCORE_4_0 } } #endif // XAMCORE_2_0 diff --git a/src/StoreKit/Enums.cs b/src/StoreKit/Enums.cs index d63babdb804..0ab633b6ed1 100644 --- a/src/StoreKit/Enums.cs +++ b/src/StoreKit/Enums.cs @@ -58,13 +58,5 @@ public enum SKCloudServiceCapability : nuint { MusicCatalogSubscriptionEligible = 1 << 1, AddToCloudMusicLibrary = 1 << 8 } - - [iOS (11,0)][TV (11,0)][NoMac] - [Native] - public enum SKProductStorePromotionVisibility : nint { - Default, - Show, - Hide, - } #endif } diff --git a/src/TVServices/TVEnums.cs b/src/TVServices/TVEnums.cs index 01291dca087..20c6cc1e358 100644 --- a/src/TVServices/TVEnums.cs +++ b/src/TVServices/TVEnums.cs @@ -27,16 +27,6 @@ public enum TVTopShelfContentStyle : nint { Sectioned = 2 } - [TV (11,0)] - [Native] - [Flags] - public enum TVContentItemImageTrait : nuint { - UserInterfaceStyleLight = (1 << 8), - UserInterfaceStyleDark = (2 << 8), - ScreenScale1x = (1 << 12), - ScreenScale2x = (2 << 12), - } - static public class TVContentItemImageShapeExtensions { [DllImport (Constants.TVServicesLibrary)] diff --git a/src/Twitter/TWCompat.cs b/src/Twitter/TWCompat.cs index a0dcbd8e76b..779782b9c67 100644 --- a/src/Twitter/TWCompat.cs +++ b/src/Twitter/TWCompat.cs @@ -8,7 +8,7 @@ namespace XamCore.Twitter { public partial class TWTweetComposeViewController { - [Obsolete ("Use the 'CompletionHandler' property.")] + [Obsolete ("Use the CompletionHandler property")] public virtual void SetCompletionHandler (Action handler) { CompletionHandler = handler; diff --git a/src/UIKit/Compat.cs b/src/UIKit/Compat.cs index 86587eae1a8..5d12fd35a81 100644 --- a/src/UIKit/Compat.cs +++ b/src/UIKit/Compat.cs @@ -62,7 +62,7 @@ public static UIViewController GetAdaptivePresentationStyle (IUIAdaptivePresenta public static partial class NSIdentifier { - [Obsolete ("Use 'GetIdentifier' method.")] + [Obsolete ("Use GetIdentifier method")] public static string Identifier (this NSLayoutConstraint This) { return This.GetIdentifier (); @@ -73,7 +73,7 @@ public static string Identifier (this NSLayoutConstraint This) #if !XAMCORE_4_0 && !WATCH public partial class UIPresentationController { - [Obsolete ("Removed in iOS10. Use '.ctor (UIViewController,UIViewController)'.")] + [Obsolete ("Removed in iOS10. Use .ctor(UIViewController,UIViewController)")] public UIPresentationController () { } @@ -81,7 +81,7 @@ public UIPresentationController () #if !TVOS public partial class UIPreviewInteraction { - [Obsolete ("Use overload accepting a 'IUICoordinateSpace'.")] + [Obsolete ("Use overload accepting a IUICoordinateSpace")] public virtual CGPoint GetLocationInCoordinateSpace (UICoordinateSpace coordinateSpace) { return GetLocationInCoordinateSpace ((IUICoordinateSpace) coordinateSpace); @@ -90,16 +90,4 @@ public virtual CGPoint GetLocationInCoordinateSpace (UICoordinateSpace coordinat #endif #endif - -#if !XAMCORE_4_0 && !WATCH - public partial class UICollectionViewFocusUpdateContext { - [Obsolete ("This cannot be directly created.")] - public UICollectionViewFocusUpdateContext () { } - } - - public partial class UIFocusUpdateContext { - [Obsolete ("This cannot be directly created.")] - public UIFocusUpdateContext () { } - } -#endif } diff --git a/src/UIKit/UIActivityViewController.cs b/src/UIKit/UIActivityViewController.cs index c36d112004a..4a3fb5aff3a 100644 --- a/src/UIKit/UIActivityViewController.cs +++ b/src/UIKit/UIActivityViewController.cs @@ -5,12 +5,12 @@ namespace XamCore.UIKit { public partial class UIActivityViewController { - [Obsolete ("iOS 9 does not allow creating an empty instance.")] + [Obsolete ("iOS9 does not allow creating an empty instance")] public UIActivityViewController () { } - [Obsolete ("Use 'CompletionWithItemsHandler' property.")] + [Obsolete ("Use CompletionWithItemsHandler property")] public virtual void SetCompletionHandler (UIActivityViewControllerCompletion completionHandler) { CompletionWithItemsHandler = completionHandler; diff --git a/src/UIKit/UIDragDropSessionExtensions.cs b/src/UIKit/UIDragDropSessionExtensions.cs deleted file mode 100644 index 9ec824a7a58..00000000000 --- a/src/UIKit/UIDragDropSessionExtensions.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// UIDragDropSessionExtensions.cs -// -// Authors: -// Vincent Dondain -// -// Copyright 2017 Microsoft -// - -#if !TVOS && !WATCH - -using System; -using XamCore.ObjCRuntime; -using XamCore.Foundation; - -namespace XamCore.UIKit { - - public static class UIDragDropSessionExtensions { - - public static NSProgress LoadObjects (this IUIDropSession session, Action completion) where T: NSObject, INSItemProviderReading - { - return session.LoadObjects (new Class (typeof (T)), (v) => - { - var arr = v as T[]; - if (arr == null && v != null) { - arr = new T [v.Length]; - for (int i = 0; i < arr.Length; i++) { - if (v [i] != null) - arr [i] = Runtime.ConstructNSObject (v [i].Handle); - } - } - - completion (arr); - }); - } - - public static bool CanLoadObjects (this IUIDragDropSession session, Type type) - { - return session.CanLoadObjects (new Class (type)); - } - } -} - -#endif \ No newline at end of file diff --git a/src/UIKit/UIEnums.cs b/src/UIKit/UIEnums.cs index e76daeefbe6..424c2c33a0c 100644 --- a/src/UIKit/UIEnums.cs +++ b/src/UIKit/UIEnums.cs @@ -57,7 +57,7 @@ public enum UIAlertViewStyle : nint { public enum UIBarButtonItemStyle : nint { Plain, - [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'UIBarButtonItemStyle.Plain' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Use UIBarButtonItemStyle.Plain when the minimum deployment target is iOS 7")] Bordered, Done, @@ -92,7 +92,6 @@ public enum UIBarButtonSystemItem : nint { Redo, [iOS (4,0)] - [Deprecated (PlatformName.iOS, 11, 0)] PageCurl } @@ -184,8 +183,6 @@ public enum UIControlContentHorizontalAlignment : nint { Left = 1, Right = 2, Fill = 3, - Leading = 4, - Trailing = 5 } // NSUInteger -> UIControl.h @@ -283,10 +280,10 @@ public enum UIBarMetrics : nint { DefaultPrompt = 101, CompactPrompt, - [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_8_0, Message = "Use 'UIBarMetrics.Compat' instead.")] + [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_8_0, Message = "Use UIBarMetrics.Compat instead")] LandscapePhone = Compact, - [Availability (Introduced = Platform.iOS_7_0, Deprecated = Platform.iOS_8_0, Message = "Use 'UIBarMetrics.CompactPrompt' instead.")] + [Availability (Introduced = Platform.iOS_7_0, Deprecated = Platform.iOS_8_0, Message = "Use UIBarMetrics.CompactPrompt instead")] LandscapePhonePrompt = CompactPrompt } @@ -300,8 +297,7 @@ public enum UIButtonType : nint { InfoLight, InfoDark, ContactAdd, - Plain, - System = RoundedRect, + System = RoundedRect } // NSInteger -> UIStringDrawing.h @@ -427,11 +423,11 @@ public enum UIBarStyle : nint { Black, // The header doesn't say when it was deprecated, but the earliest headers I have (iOS 5.1) it is already deprecated. - [Availability (Deprecated = Platform.iOS_5_1, Message = "Use 'UIBarStyle.Black'.")] + [Availability (Deprecated = Platform.iOS_5_1, Message = "Use UIBarStyle.Black")] BlackOpaque = 1, // The header doesn't say when it was deprecated, but the earliest headers I have (iOS 5.1) it is already deprecated. - [Availability (Deprecated = Platform.iOS_5_1, Message = "Use 'UIBarStyle.Black' and set the translucency property to true.")] + [Availability (Deprecated = Platform.iOS_5_1, Message = "Use UIBarStyle.Black and set the translucency property to true")] BlackTranslucent = 2, } @@ -495,7 +491,7 @@ public enum UIKeyboardType : nint { // NSInteger -> UISegmentedControl.h [Native] [NoTV][NoWatch] - [Availability (Deprecated = Platform.iOS_7_0, Message = "This no longer has any effect.")] + [Availability (Deprecated = Platform.iOS_7_0, Message = "Deprecated in iOS 7, this no longer has any effect")] public enum UISegmentedControlStyle : nint { Plain, Bordered, @@ -634,7 +630,6 @@ public enum UITableViewCellStyle : nint { public enum UITableViewCellSeparatorStyle : nint { None, SingleLine, - [Deprecated (PlatformName.iOS, 11, 0, message:"Use 'SingleLine' for a single line separator.")] SingleLineEtched, DoubleLineEtched = SingleLineEtched } @@ -796,12 +791,12 @@ public enum UIActionSheetStyle : nint { public enum UIStatusBarStyle : nint { Default, - [Availability (Deprecated = Platform.iOS_7_0, Message = "Use 'LightContent' instead.")] + [Availability (Deprecated = Platform.iOS_7_0, Message = "Use LightContent instead")] BlackTranslucent = 1, LightContent = 1, - [Availability (Deprecated = Platform.iOS_7_0, Message = "Use 'LightContent' instead.")] + [Availability (Deprecated = Platform.iOS_7_0, Message = "Use LightContent instead")] BlackOpaque = 2, } @@ -885,7 +880,6 @@ public enum UIModalPresentationStyle : nint { OverCurrentContext, [NoTV] Popover, - BlurOverFullScreen, None = -1 } @@ -1073,7 +1067,7 @@ public enum UIAccessibilityScrollDirection : nint { public enum UIScreenOverscanCompensation : nint { Scale, InsetBounds, None, - [Obsolete ("Use 'UIScreenOverscanCompensation.None' instead.")] + [Obsolete ("Use UIScreenOverscanCompensation.None instead")] InsetApplicationFrame = None } @@ -1254,10 +1248,6 @@ public enum NSLayoutFormatOptions : nuint_compat_int { DirectionLeadingToTrailing = 0 << 16, // default DirectionLeftToRight = 1 << 16, DirectionRightToLeft = 2 << 16, - - SpacingEdgeToEdge = 0 << 19, - SpacingBaselineToBaseline = 1 << 19, - SpacingMask = 1 << 19, DirectionMask = 0x3 << 16, } @@ -1661,7 +1651,7 @@ public enum UIPrinterJobTypes : nint { [NoTV][NoWatch] [iOS (8,0)] - [Deprecated (PlatformName.iOS, 10, 0, message:"Use 'UNAuthorizationOptions' instead.")] + [Deprecated (PlatformName.iOS, 10, 0, message:"Use UNAuthorizationOptions instead")] [Native] [Flags] public enum UIUserNotificationType : nuint { @@ -1673,7 +1663,7 @@ public enum UIUserNotificationType : nuint { [NoTV][NoWatch] [iOS (8, 0)] - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UNNotificationActionOptions' instead.")] + [Deprecated (PlatformName.iOS, 10, 0, message: "Use UNNotificationActionOptions instead")] [Native] public enum UIUserNotificationActivationMode : nuint { Foreground, @@ -1682,14 +1672,13 @@ public enum UIUserNotificationActivationMode : nuint { [NoTV][NoWatch] [iOS (8, 0)] - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UNNotificationCategory.Actions' instead.")] + [Deprecated (PlatformName.iOS, 10, 0, message: "Use UNNotificationCategory.Actions instead")] [Native] public enum UIUserNotificationActionContext : nuint { Default, Minimal } - [Deprecated (PlatformName.iOS, 11, 0)] [NoTV][NoWatch] [iOS (8, 0)] [Native] @@ -1799,7 +1788,7 @@ public enum UIPrinterCutterBehavior : nint [NoTV][NoWatch] [iOS (9,0)] - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UNNotificationAction' or 'UNTextInputNotificationAction' instead.")] + [Deprecated (PlatformName.iOS, 10, 0, message: "Use UNNotificationAction or UNTextInputNotificationAction instead")] [Native] public enum UIUserNotificationActionBehavior : nuint { @@ -1999,305 +1988,4 @@ public enum UIScrollViewIndexDisplayMode : nint { Automatic, AlwaysHidden } - - [NoWatch] - [TV (11,0), iOS (11,0)] - [Native] - public enum UIScrollViewContentInsetAdjustmentBehavior : nint - { - Automatic, - ScrollableAxes, - Never, - Always - } - - [iOS (11,0), TV (11,0), Watch (4,0)] - [Native] - public enum UIAccessibilityContainerType : nint - { - None = 0, - DataTable, - List, - Landmark - } - - [NoWatch] - [iOS (11,0), TV (11,0)] - [Native] - public enum UITextSmartQuotesType : nint - { - Default, - No, - Yes - } - - [NoWatch] - [iOS (11,0), TV (11,0)] - [Native] - public enum UITextSmartDashesType : nint - { - Default, - No, - Yes - } - - [NoWatch] - [iOS (11,0), TV (11,0)] - [Native] - public enum UITextSmartInsertDeleteType : nint - { - Default, - No, - Yes - } - - [NoWatch] - [iOS (11,0), TV (11,0)] - [Native] - public enum UIAccessibilityCustomSystemRotorType : nint - { - None = 0, - Link, - VisitedLink, - Heading, - HeadingLevel1, - HeadingLevel2, - HeadingLevel3, - HeadingLevel4, - HeadingLevel5, - HeadingLevel6, - BoldText, - ItalicText, - UnderlineText, - MisspelledWord, - Image, - TextField, - Table, - List, - Landmark - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum UIDropOperation : nuint - { - Cancel = 0, - Forbidden = 1, - Copy = 2, - Move = 3 - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - [Flags] - public enum UITextDragOptions : nint - { - None = 0, - StripTextColorFromPreviews = (1 << 0) - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum UITextDropAction : nuint - { - Insert = 0, - ReplaceSelection, - ReplaceAll - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum UITextDropProgressMode : nuint - { - System = 0, - Custom - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum UITextDropEditability : nuint - { - No = 0, - Temporary, - Yes - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum UICollectionViewReorderingCadence : nint - { - Immediate, - Fast, - Slow - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum UICollectionViewDropIntent : nint - { - Unspecified, - InsertAtDestinationIndexPath, - InsertIntoDestinationIndexPath - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum UICollectionViewCellDragState : nint - { - None, - Lifting, - Dragging - } - - [NoWatch] - [NoTV, iOS (11,0)] - [Native] - public enum UIImagePickerControllerImageUrlExportPreset : nint - { - Compatible = 0, - Current - } - - [NoWatch] - [NoTV, iOS (11,0)] - [Native] - public enum UIContextualActionStyle : nint - { - Normal, - Destructive - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum UITableViewCellDragState : nint - { - None, - Lifting, - Dragging - } - - [NoWatch] - [TV (11,0), iOS (11,0)] - [Native] - public enum UITableViewSeparatorInsetReference : nint - { - CellEdges, - AutomaticInsets - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum UITableViewDropIntent : nint - { - Unspecified, - InsertAtDestinationIndexPath, - InsertIntoDestinationIndexPath, - Automatic - } - - [NoWatch] - [TV (11,0), iOS (11,0)] - [Native] - public enum UISplitViewControllerPrimaryEdge : nint - { - Leading, - Trailing - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum UIDropSessionProgressIndicatorStyle : nuint - { - None, - Default - } - - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum UISpringLoadedInteractionEffectState : nint - { - Inactive, - Possible, - Activating, - Activated - } - - [NoWatch] - [NoTV, iOS (11,0)] - [Native] - public enum UIDocumentBrowserImportMode : nuint - { - None, - Copy, - Move - } - - [NoWatch] - [NoTV, iOS (11,0)] - [Native] - public enum UIDocumentBrowserUserInterfaceStyle : nuint - { - White = 0, - Light, - Dark - } - - [NoWatch] - [NoTV, iOS (11,0)] - [Native] - [Flags] - public enum UIDocumentBrowserActionAvailability : nint - { - Menu = 1, - NavigationBar = 1 << 1 - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Native] - public enum UITextDropPerformer : nuint - { - View = 0, - Delegate, - } - - [NoWatch] - [iOS (11,0), TV (11,0)] - [Native] - public enum UINavigationItemLargeTitleDisplayMode : nint - { - Automatic, - Always, - Never, - } - - [NoWatch] - [iOS (11,0), TV (11,0)] - [Native] - public enum UICollectionViewFlowLayoutSectionInsetReference : nint - { - ContentInset, - SafeArea, - LayoutMargins, - } - - [NoWatch][NoTV] - [iOS (11,0)] - [Native] - public enum UIPreferredPresentationStyle : nint - { - Unspecified = 0, - Inline, - Attachment, - } - - [NoWatch, NoTV, NoMac, iOS (11,0)] - [Native] - [ErrorDomain ("UIDocumentBrowserErrorDomain")] - public enum UIDocumentBrowserErrorCode : nint - { - Generic = 1, - } - - } diff --git a/src/UIKit/UIImagePickerController.cs b/src/UIKit/UIImagePickerController.cs index 170ed0d1fa6..a96c68375b4 100644 --- a/src/UIKit/UIImagePickerController.cs +++ b/src/UIKit/UIImagePickerController.cs @@ -139,20 +139,6 @@ public NSUrl ReferenceUrl { return (NSUrl) Info [UIImagePickerController.ReferenceUrl]; } } - - [iOS (11,0)] - public PHAsset PHAsset { - get { - return (PHAsset) Info [UIImagePickerController.PHAsset]; - } - } - - [iOS (11,0)] - public NSUrl ImageUrl { - get { - return (NSUrl) Info [UIImagePickerController.ImageUrl]; - } - } } } diff --git a/src/UIKit/UIPopoverPresentationController.cs b/src/UIKit/UIPopoverPresentationController.cs index 72a6d941a7c..4c4da55d1b9 100644 --- a/src/UIKit/UIPopoverPresentationController.cs +++ b/src/UIKit/UIPopoverPresentationController.cs @@ -27,14 +27,14 @@ public virtual Type PopoverBackgroundViewType { #if !XAMCORE_3_0 public partial class UIPopoverPresentationControllerDelegate { - [Obsolete ("Use the overload with 'ref' parameters for 'targetRect' and 'inView'.")] + [Obsolete ("Use the overload with `ref` parameters for targetRect and inView")] public virtual void WillRepositionPopover (UIPopoverPresentationController popoverPresentationController, CGRect targetRect, UIView inView) { } } public static partial class UIPopoverPresentationControllerDelegate_Extensions { - [Obsolete ("Use the overload with 'ref' parameters for 'targetRect' and 'inView'.")] + [Obsolete ("Use the overload with `ref` parameters for targetRect and inView")] public static void WillRepositionPopover (IUIPopoverPresentationControllerDelegate This, UIPopoverPresentationController popoverPresentationController, CGRect targetRect, UIView inView) { } diff --git a/src/UIKit/UIResponder.cs b/src/UIKit/UIResponder.cs index 9ea52901195..2b3b7b6587f 100644 --- a/src/UIKit/UIResponder.cs +++ b/src/UIKit/UIResponder.cs @@ -35,7 +35,7 @@ public virtual void Cut () [Obsolete ("Override Paste(NSObject)")] public virtual void Paste () { - Paste ((NSObject)null); + Paste (null); } [Obsolete ("Override Delete(NSObject)")] diff --git a/src/UIKit/UITypes.cs b/src/UIKit/UITypes.cs index 1922da03360..a5ba29651e4 100644 --- a/src/UIKit/UITypes.cs +++ b/src/UIKit/UITypes.cs @@ -102,83 +102,6 @@ public override string ToString () #endif } - [Watch (4,0), TV (11,0), iOS (11,0)] - [StructLayout (LayoutKind.Sequential)] - public struct NSDirectionalEdgeInsets { - - // API match for NSDirectionalEdgeInsetsZero field/constant - [Field ("NSDirectionalEdgeInsetsZero")] // fake (but helps testing and could also help documentation) - public static readonly NSDirectionalEdgeInsets Zero; - - public nfloat Top, Leading, Bottom, Trailing; - -#if !COREBUILD - public NSDirectionalEdgeInsets (nfloat top, nfloat leading, nfloat bottom, nfloat trailing) - { - Top = top; - Leading = leading; - Bottom = bottom; - Trailing = trailing; - } - - // note: NSDirectionalEdgeInsetsEqualToDirectionalEdgeInsets (UIGeometry.h) is a macro - public bool Equals (NSDirectionalEdgeInsets other) - { - if (Leading != other.Leading) - return false; - if (Trailing != other.Trailing) - return false; - if (Top != other.Top) - return false; - return (Bottom == other.Bottom); - } - - public override bool Equals (object obj) - { - if (obj is NSDirectionalEdgeInsets) - return Equals ((NSDirectionalEdgeInsets) obj); - return false; - } - - public static bool operator == (NSDirectionalEdgeInsets insets1, NSDirectionalEdgeInsets insets2) - { - return insets1.Equals (insets2); - } - - public static bool operator != (NSDirectionalEdgeInsets insets1, NSDirectionalEdgeInsets insets2) - { - return !insets1.Equals (insets2); - } - - public override int GetHashCode () - { - return Top.GetHashCode () ^ Leading.GetHashCode () ^ Trailing.GetHashCode () ^ Bottom.GetHashCode (); - } - - [DllImport (Constants.UIKitLibrary)] - extern static NSDirectionalEdgeInsets NSDirectionalEdgeInsetsFromString (IntPtr /* NSString */ s); - - static public NSDirectionalEdgeInsets FromString (string s) - { - // note: null is allowed - var ptr = NSString.CreateNative (s); - var value = NSDirectionalEdgeInsetsFromString (ptr); - NSString.ReleaseNative (ptr); - return value; - } - - [DllImport (Constants.UIKitLibrary)] - extern static IntPtr /* NSString */ NSStringFromDirectionalEdgeInsets (NSDirectionalEdgeInsets insets); - - // note: ensure we can roundtrip ToString into FromString - public override string ToString () - { - using (var ns = new NSString (NSStringFromDirectionalEdgeInsets (this))) - return ns.ToString (); - } -#endif - } - #if !WATCH [iOS (9,0)] [StructLayout (LayoutKind.Sequential)] diff --git a/src/UIKit/UIVibrancyEffect.cs b/src/UIKit/UIVibrancyEffect.cs index ed3f0f90534..52a76d4d030 100644 --- a/src/UIKit/UIVibrancyEffect.cs +++ b/src/UIKit/UIVibrancyEffect.cs @@ -18,7 +18,7 @@ public partial class UIVibrancyEffect { // https://trello.com/c/iQpXOxCd/227-category-and-static-methods-selectors // note: we cannot reuse the same method name - as it would break compilation of existing apps [iOS (8,0)] - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'CreatePrimaryVibrancyEffectForNotificationCenter' instead.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use CreatePrimaryVibrancyEffectForNotificationCenter")] static public UIVibrancyEffect CreateForNotificationCenter () { return (null as UIVibrancyEffect).NotificationCenterVibrancyEffect (); diff --git a/src/UIKit/UIView.cs b/src/UIKit/UIView.cs index 8aa33712a88..f44aa7dde38 100644 --- a/src/UIKit/UIView.cs +++ b/src/UIKit/UIView.cs @@ -118,7 +118,7 @@ public static event NSAction AnimationWillEnd { } } - [Advice ("Use the *Notify method that has 'UICompletionHandler completion' parameter, the 'bool' will tell you if the operation finished.")] + [Advice ("Use the *Notify method that has `UICompletionHandler completion` parameter, the `bool` will tell you if the operation finished")] public static void Animate (double duration, NSAction animation, NSAction completion) { // animation null check will be done in AnimateNotify @@ -128,7 +128,7 @@ public static void Animate (double duration, NSAction animation, NSAction comple }); } - [Advice ("Use the *Notify method that has 'UICompletionHandler completion' parameter, the 'bool' will tell you if the operation finished.")] + [Advice ("Use the *Notify method that has `UICompletionHandler completion` parameter, the `bool` will tell you if the operation finished")] public static void Animate (double duration, double delay, UIViewAnimationOptions options, NSAction animation, NSAction completion) { // animation null check will be done in AnimateNotify @@ -138,7 +138,7 @@ public static void Animate (double duration, double delay, UIViewAnimationOption }); } - [Advice ("Use the *Notify method that has 'UICompletionHandler completion' parameter, the 'bool' will tell you if the operation finished.")] + [Advice ("Use the *Notify method that has `UICompletionHandler completion` parameter, the `bool` will tell you if the operation finished")] public static void Transition (UIView fromView, UIView toView, double duration, UIViewAnimationOptions options, NSAction completion) { TransitionNotify (fromView, toView, duration, options, (x) => { @@ -147,7 +147,7 @@ public static void Transition (UIView fromView, UIView toView, double duration, }); } - [Advice ("Use the *Notify method that has 'UICompletionHandler completion' parameter, the 'bool' will tell you if the operation finished.")] + [Advice ("Use the *Notify method that has `UICompletionHandler completion` parameter, the `bool` will tell you if the operation finished")] public static void Transition (UIView withView, double duration, UIViewAnimationOptions options, NSAction animation, NSAction completion) { // animation null check will be done in AnimateNotify @@ -158,14 +158,14 @@ public static void Transition (UIView withView, double duration, UIViewAnimation } #if !XAMCORE_2_0 - [Advice ("Use the version with a 'ref float actualFontSize'.")] + [Advice ("Use the version with a `ref float actualFontSize`")] public CGSize DrawString (string str, CGPoint point, nfloat width, XamCore.UIKit.UIFont font, nfloat minFontSize, nfloat actualFontSize, XamCore.UIKit.UILineBreakMode breakMode, XamCore.UIKit.UIBaselineAdjustment adjustment) { nfloat temp = actualFontSize; return DrawString (str, point, width, font, minFontSize, ref temp, breakMode, adjustment); } - [Obsolete ("Use 'TranslatesAutoresizingMaskIntoConstraints'.")] + [Obsolete ("Use TranslatesAutoresizingMaskIntoConstraints")] bool TranslatesAutoresizingMaskIntoConstrainst { get { return TranslatesAutoresizingMaskIntoConstraints; } set { TranslatesAutoresizingMaskIntoConstraints = value; } diff --git a/src/Vision/VNBarcodeSymbologyExtensions.cs b/src/Vision/VNBarcodeSymbologyExtensions.cs deleted file mode 100644 index 465ceb86c15..00000000000 --- a/src/Vision/VNBarcodeSymbologyExtensions.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// VNBarcodeSymbologyExtensions.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 -using System; -using XamCore.Foundation; - -namespace XamCore.Vision { - public static partial class VNBarcodeSymbologyExtensions { - public static NSString [] GetConstants (this VNBarcodeSymbology [] self) - { - if (self == null) - throw new ArgumentNullException (nameof (self)); - - var array = new NSString [self.Length]; - for (int n = 0; n < self.Length; n++) - array [n] = self [n].GetConstant (); - return array; - } - - public static VNBarcodeSymbology [] GetValues (NSString [] constants) - { - if (constants == null) - throw new ArgumentNullException (nameof (constants)); - - var array = new VNBarcodeSymbology [constants.Length]; - for (int n = 0; n < constants.Length; n++) - array [n] = GetValue (constants [n]); - return array; - } - } -} -#endif diff --git a/src/Vision/VNDetectBarcodesRequest.cs b/src/Vision/VNDetectBarcodesRequest.cs deleted file mode 100644 index b7aa6062847..00000000000 --- a/src/Vision/VNDetectBarcodesRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -// VNDetectBarcodesRequest.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 -using System; - -namespace XamCore.Vision { - public partial class VNDetectBarcodesRequest { - - public VNBarcodeSymbology [] Symbologies { - get { return VNBarcodeSymbologyExtensions.GetValues (WeakSymbologies); } - set { WeakSymbologies = value.GetConstants (); } - } - } -} -#endif diff --git a/src/Vision/VNFaceLandmarkRegion2D.cs b/src/Vision/VNFaceLandmarkRegion2D.cs deleted file mode 100644 index afff1bca0d5..00000000000 --- a/src/Vision/VNFaceLandmarkRegion2D.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// VNFaceLandmarkRegion2D.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using XamCore.CoreGraphics; - -namespace XamCore.Vision { - public partial class VNFaceLandmarkRegion2D { - - public virtual CGPoint [] NormalizedPoints { - get { - var ret = _GetNormalizedPoints (); - if (ret == IntPtr.Zero) - return null; - - unsafe { - var count = (int) PointCount; - var rv = new CGPoint [count]; - var ptr = (CGPoint*) ret; - for (int i = 0; i < count; i++) - rv [i] = *ptr++; - return rv; - } - } - } - - public virtual CGPoint [] GetPointsInImage (CGSize imageSize) - { - // return the address of the array of pointCount points - // or NULL if the conversion could not take place. - var ret = _GetPointsInImage (imageSize); - if (ret == IntPtr.Zero) - return null; - - unsafe { - var count = (int) PointCount; - var rv = new CGPoint [count]; - var ptr = (CGPoint*) ret; - for (int i = 0; i < count; i++) - rv [i] = *ptr++; - return rv; - } - } - } -} -#endif diff --git a/src/Vision/VNRequest.cs b/src/Vision/VNRequest.cs deleted file mode 100644 index 5d0660c99ed..00000000000 --- a/src/Vision/VNRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -// -// VNRequest.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.Vision { - public partial class VNRequest { - - public virtual T [] GetResults () where T : VNObservation - { - // From docs: If the request failed, this property will be nil; - // otherwise, it will be an array of zero or more VNObservation - // subclasses specific to the VNRequest subclass. - // ArrayFromHandle does the null checking for us. - return NSArray.ArrayFromHandle (_Results); - } - } -} -#endif diff --git a/src/Vision/VNUtils.cs b/src/Vision/VNUtils.cs deleted file mode 100644 index b00c1fc3d26..00000000000 --- a/src/Vision/VNUtils.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// VNUtils.cs -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using System.Runtime.InteropServices; -using XamCore.CoreGraphics; -using XamCore.ObjCRuntime; -using XamCore.Foundation; - -using Vector2 = global::OpenTK.Vector2; - -namespace XamCore.Vision { - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - public static partial class VNUtils { - - [Field ("VNNormalizedIdentityRect", Constants.VisionLibrary)] - public static CGRect NormalizedIdentityRect { get; } = Dlfcn.GetCGRect (Libraries.Vision.Handle, "VNNormalizedIdentityRect"); - - [DllImport (Constants.VisionLibrary, EntryPoint = "VNNormalizedRectIsIdentityRect")] - public static extern bool IsIdentityRect (CGRect rect); - - [DllImport (Constants.VisionLibrary, EntryPoint = "VNImagePointForNormalizedPoint")] - public static extern CGPoint GetImagePoint (CGPoint normalizedPoint, nuint imageWidth, nuint imageHeight); - - [DllImport (Constants.VisionLibrary, EntryPoint = "VNImageRectForNormalizedRect")] - public static extern CGRect GetImageRect (CGRect normalizedRect, nuint imageWidth, nuint imageHeight); - - [DllImport (Constants.VisionLibrary, EntryPoint = "VNNormalizedRectForImageRect")] - public static extern CGRect GetNormalizedRect (CGRect imageRect, nuint imageWidth, nuint imageHeight); - - [DllImport ("__Internal", EntryPoint = "xamarin_CGPoint__VNNormalizedFaceBoundingBoxPointForLandmarkPoint_Vector2_CGRect_nuint_nuint_string")] - static extern CGPoint VNNormalizedFaceBoundingBoxPointForLandmarkPoint (Vector2 faceLandmarkPoint, CGRect faceBoundingBox, nuint imageWidth, nuint imageHeight, out IntPtr error); - - public static CGPoint GetNormalizedFaceBoundingBoxPoint (Vector2 faceLandmarkPoint, CGRect faceBoundingBox, nuint imageWidth, nuint imageHeight) - { - IntPtr error; - var result = VNNormalizedFaceBoundingBoxPointForLandmarkPoint (faceLandmarkPoint, faceBoundingBox, imageWidth, imageHeight, out error); - if (error != IntPtr.Zero) - throw new InvalidOperationException (Marshal.PtrToStringAuto (error)); - - return result; - } - - [DllImport ("__Internal", EntryPoint = "xamarin_CGPoint__VNImagePointForFaceLandmarkPoint_Vector2_CGRect_nuint_nuint_string")] - static extern CGPoint VNImagePointForFaceLandmarkPoint (Vector2 faceLandmarkPoint, CGRect faceBoundingBox, nuint imageWidth, nuint imageHeight, out IntPtr error); - - public static CGPoint GetImagePoint (Vector2 faceLandmarkPoint, CGRect faceBoundingBox, nuint imageWidth, nuint imageHeight) - { - IntPtr error; - var result = VNImagePointForFaceLandmarkPoint (faceLandmarkPoint, faceBoundingBox, imageWidth, imageHeight, out error); - if (error != IntPtr.Zero) - throw new InvalidOperationException (Marshal.PtrToStringAuto (error)); - - return result; - } - } -} -#endif diff --git a/src/WKWebKit/Defs.cs b/src/WKWebKit/Defs.cs index 169b248dacc..716827ca093 100644 --- a/src/WKWebKit/Defs.cs +++ b/src/WKWebKit/Defs.cs @@ -56,14 +56,6 @@ public enum WKErrorCode : nint { JavaScriptExceptionOccurred, [iOS (9,0)][Mac (10,11, onlyOn64 : true)] JavaScriptResultTypeIsUnsupported, - [iOS (11,0)][Mac (10,13, onlyOn64 : true)] - ContentRuleListStoreCompileFailed, - [iOS (11,0)][Mac (10,13, onlyOn64 : true)] - ContentRuleListStoreLookUpFailed, - [iOS (11,0)][Mac (10,13, onlyOn64 : true)] - ContentRuleListStoreRemoveFailed, - [iOS (11,0)][Mac (10,13, onlyOn64 : true)] - ContentRuleListStoreVersionMismatch } #if !MONOMAC || !XAMCORE_4_0 diff --git a/src/WatchKit/WKAccessibility.cs b/src/WatchKit/WKAccessibility.cs index 3e5133bf1c4..6c951fd545a 100644 --- a/src/WatchKit/WKAccessibility.cs +++ b/src/WatchKit/WKAccessibility.cs @@ -15,15 +15,6 @@ public partial class WKAccessibility { static public bool IsVoiceOverRunning { get { return WKAccessibilityIsVoiceOverRunning (); } } - - [Watch (4,0)] - [DllImport (Constants.WatchKitLibrary)] - static extern bool WKAccessibilityIsReduceMotionEnabled (); - - [Watch (4,0)] - static public bool IsReduceMotionEnabled { - get { return WKAccessibilityIsReduceMotionEnabled (); } - } } } diff --git a/src/WatchKit/WKDefs.cs b/src/WatchKit/WKDefs.cs index 0d8719dec41..7eec910f026 100644 --- a/src/WatchKit/WKDefs.cs +++ b/src/WatchKit/WKDefs.cs @@ -216,38 +216,4 @@ public enum WKWaterResistanceRating : nint { Ipx7, Wr50, } - - [Watch (4,0)][NoiOS] - [Native] - public enum WKSnapshotReason : nint { - AppScheduled = 0, - ReturnToDefaultState, - ComplicationUpdate, - Prelaunch, - AppBackgrounded, - } - - [Watch (4,0)][NoiOS] - [Native] - public enum WKPageOrientation : nint { - Horizontal, - Vertical, - } - - [Watch (4,0)][NoiOS] - [Native] - public enum WKInterfaceScrollPosition : nint { - Top, - CenteredVertically, - Bottom, - } - - [Watch (4,0)][NoiOS] - [Native] - public enum WKInterfaceDeviceBatteryState : nint { - Unknown, - Unplugged, - Charging, - Full, - } } diff --git a/src/accounts.cs b/src/accounts.cs index 8e116bf0e94..bfd44026897 100644 --- a/src/accounts.cs +++ b/src/accounts.cs @@ -66,7 +66,6 @@ interface ACAccountCredential : NSSecureCoding { } delegate void ACAccountStoreSaveCompletionHandler (bool success, NSError error); - delegate void ACAccountStoreRemoveCompletionHandler (bool success, NSError error); delegate void ACRequestCompletionHandler (bool granted, NSError error); [Since (5,0)] @@ -90,7 +89,7 @@ interface ACAccountStore { void SaveAccount (ACAccount account, ACAccountStoreSaveCompletionHandler completionHandler); [Export ("requestAccessToAccountsWithType:withCompletionHandler:")] - [Availability (Deprecated = Platform.iOS_6_0, Message = "Use 'RequestAccess (ACAccountType, AccountStoreOptions, ACRequestCompletionHandler)' instead.")] + [Availability (Deprecated = Platform.iOS_6_0, Message = "Use RequestAccewss (ACAccountType, AccountStoreOptions, ACRequestCompletionHandler) instead")] [Async] void RequestAccess (ACAccountType accountType, ACRequestCompletionHandler completionHandler); @@ -113,11 +112,6 @@ interface ACAccountStore { [Wrap ("RequestAccess (accountType, options == null ? null : options.Dictionary, completion)")] [Async] void RequestAccess (ACAccountType accountType, [NullAllowed] AccountStoreOptions options, ACRequestCompletionHandler completion); - - [iOS (6,0)] - [Export ("removeAccount:withCompletionHandler:")] - [Async] - void RemoveAccount (ACAccount account, ACAccountStoreRemoveCompletionHandler completionHandler); } [Since (5,0)] @@ -133,40 +127,29 @@ interface ACAccountType : NSSecureCoding { [Export ("accessGranted")] bool AccessGranted { get; } - [Deprecated (PlatformName.iOS, 11, 0, message: "Use Twitter SDK instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use Twitter SDK instead.")] [Field ("ACAccountTypeIdentifierTwitter")] NSString Twitter { get; } - [Deprecated (PlatformName.iOS, 11, 0, message: "Use Sina Weibo SDK instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use Sina Weibo SDK instead.")] [Since (6,0)] [Field ("ACAccountTypeIdentifierSinaWeibo")] NSString SinaWeibo { get; } - [Deprecated (PlatformName.iOS, 11, 0, message: "Use Facebook SDK instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use Facebook SDK instead.")] [Since (6,0)] [Field ("ACAccountTypeIdentifierFacebook")] NSString Facebook { get; } - [Deprecated (PlatformName.iOS, 11, 0, message: "Use Tencent Weibo SDK instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use Tencent Weibo SDK instead.")] [Since (7,0)] [Mac (10,9)] [Field ("ACAccountTypeIdentifierTencentWeibo")] NSString TencentWeibo { get; } #if MONOMAC - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use LinkedIn SDK instead.")] [Mac (10,9)] [Field ("ACAccountTypeIdentifierLinkedIn")] NSString LinkedIn { get; } #endif } - [Deprecated (PlatformName.iOS, 11, 0, message: "Use Facebook SDK instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use Facebook SDK instead.")] [Since (6,0)] [Mac (10,8, onlyOn64 : true)] [Static] @@ -182,8 +165,6 @@ interface ACFacebookKey { NSString Audience { get; } } - [Deprecated (PlatformName.iOS, 11, 0, message: "Use Facebook SDK instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use Facebook SDK instead.")] [Since (6,0)] [Mac (10,8, onlyOn64 : true)] [Static] @@ -199,8 +180,6 @@ interface ACFacebookAudienceValue NSString OnlyMe { get; } } - [Deprecated (PlatformName.iOS, 11, 0, message: "Use Tencent Weibo SDK instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use Tencent Weibo SDK instead.")] [Since (7,0)] [Mac (10,9, onlyOn64 : true)] [Static] @@ -210,7 +189,6 @@ interface ACTencentWeiboKey { } #if MONOMAC - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use LinkedIn SDK instead.")] [Mac (10,9, onlyOn64 : true)] [Static] interface ACLinkedInKey { diff --git a/src/addressbookui.cs b/src/addressbookui.cs index 93d96dbdad8..bfd2a59fcdd 100644 --- a/src/addressbookui.cs +++ b/src/addressbookui.cs @@ -18,7 +18,7 @@ namespace XamCore.AddressBookUI { - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] [BaseType (typeof (UIViewController))] interface ABNewPersonViewController { [Export ("initWithNibName:bundle:")] @@ -42,7 +42,7 @@ interface ABNewPersonViewController { NSObject WeakDelegate { get; set; } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -57,7 +57,7 @@ interface ABNewPersonViewControllerDelegate { #endif } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] [BaseType (typeof (UINavigationController))] interface ABPeoplePickerNavigationController : UIAppearance { [Export ("initWithNibName:bundle:")] @@ -98,7 +98,7 @@ interface ABPeoplePickerNavigationController : UIAppearance { NSPredicate PredicateForSelectionOfProperty { get; set; } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] #if XAMCORE_3_0 [BaseType (typeof (NSObject))] #else @@ -107,7 +107,7 @@ interface ABPeoplePickerNavigationController : UIAppearance { [Model] [Protocol] interface ABPeoplePickerNavigationControllerDelegate { - [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'DidSelectPerson' instead (or 'ABPeoplePickerNavigationController.PredicateForSelectionOfPerson').")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Use DidSelectPerson instead (or ABPeoplePickerNavigationController.PredicateForSelectionOfPerson)")] [Export ("peoplePickerNavigationController:shouldContinueAfterSelectingPerson:")] #if XAMCORE_2_0 bool ShouldContinue (ABPeoplePickerNavigationController peoplePicker, ABPerson selectedPerson); @@ -115,7 +115,7 @@ interface ABPeoplePickerNavigationControllerDelegate { bool ShouldContinue (ABPeoplePickerNavigationController peoplePicker, IntPtr selectedPerson); #endif - [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'DidSelectPerson' instead (or 'ABPeoplePickerNavigationController.PredicateForSelectionOfProperty').")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Use DidSelectPerson instead (or ABPeoplePickerNavigationController.PredicateForSelectionOfProperty)")] [Export ("peoplePickerNavigationController:shouldContinueAfterSelectingPerson:property:identifier:")] #if XAMCORE_2_0 bool ShouldContinue (ABPeoplePickerNavigationController peoplePicker, ABPerson selectedPerson, int /* ABPropertyId = int32 */ propertyId, int /* ABMultiValueIdentifier = int32 */ identifier); @@ -138,7 +138,7 @@ interface ABPeoplePickerNavigationControllerDelegate { #endif } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] [BaseType (typeof (UIViewController))] interface ABPersonViewController : UIViewControllerRestoration { [Export ("initWithNibName:bundle:")] @@ -181,7 +181,7 @@ interface ABPersonViewController : UIViewControllerRestoration { void SetHighlightedItemForProperty (int /* ABPropertyId = int32 */ property, int /* ABMultiValueIdentifier = int32 */ identifier); } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] [Static, iOS (8,0)] interface ABPersonPredicateKey { [Field ("ABPersonBirthdayProperty")] @@ -254,7 +254,7 @@ interface ABPersonPredicateKey { NSString UrlAddresses { get; } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -269,7 +269,7 @@ interface ABPersonViewControllerDelegate { #endif } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] [BaseType (typeof (UIViewController))] interface ABUnknownPersonViewController { [Export ("initWithNibName:bundle:")] @@ -305,7 +305,7 @@ interface ABUnknownPersonViewController { NSObject WeakDelegate {get; set;} } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Contacts' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Contacts API instead")] [BaseType (typeof (NSObject))] [Model] [Protocol] diff --git a/src/appkit.cs b/src/appkit.cs index e18e3e23273..57faa68536e 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -141,7 +141,7 @@ interface NSAnimation : NSCoding, NSCopying { IntPtr Constructor (double duration, NSAnimationCurve animationCurve); #if !XAMCORE_4_0 - [Obsolete ("Use the constructor instead.")] + [Obsolete ("Use the constructor instead")] [Export ("initWithDuration:animationCurve:")] IntPtr Constant (double duration, NSAnimationCurve animationCurve); #endif @@ -274,7 +274,7 @@ interface NSAlert { [Static, Export ("alertWithError:")] NSAlert WithError (NSError error); - [Availability (Introduced = Platform.Mac_10_3, Deprecated = Platform.Mac_10_10, Message = "Use constructor instead.")] + [Availability (Introduced = Platform.Mac_10_3, Deprecated = Platform.Mac_10_10, Message = "Use constructor instead")] [Static, Export ("alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:")] NSAlert WithMessage([NullAllowed] string message, [NullAllowed] string defaultButton, [NullAllowed] string alternateButton, [NullAllowed] string otherButton, string full); @@ -324,7 +324,7 @@ interface NSAlert { [Export ("runModal")] nint RunModal (); - [Availability (Introduced = Platform.Mac_10_3, Deprecated = Platform.Mac_10_10, Message = "Use BeginSheetModalForWindow (NSWindow sheetWindow, Action handler) instead.")] + [Availability (Introduced = Platform.Mac_10_3, Deprecated = Platform.Mac_10_10, Message = "Use BeginSheetModalForWindow (NSWindow sheetWindow, Action handler) instead")] [Export ("beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:")] void BeginSheet ([NullAllowed] NSWindow window, [NullAllowed] NSObject modalDelegate, [NullAllowed] Selector didEndSelector, IntPtr contextInfo); @@ -505,11 +505,11 @@ interface NSApplication : NSAccessibilityElementProtocol, NSAccessibility { [Export ("cancelUserAttentionRequest:")] void CancelUserAttentionRequest (nint request); - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use NSWindow.BeginSheet instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use NSWindow.BeginSheet instead")] [Export ("beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:")] void BeginSheet (NSWindow sheet, NSWindow docWindow, [NullAllowed] NSObject modalDelegate, [NullAllowed] Selector didEndSelector, IntPtr contextInfo); - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use NSWindow.EndSheet instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use NSWindow.EndSheet instead")] [Export ("endSheet:")] void EndSheet (NSWindow sheet); @@ -763,29 +763,6 @@ interface NSApplication : NSAccessibilityElementProtocol, NSAccessibility { void EnumerateWindows (NSWindowListOptions options, NSApplicationEnumerateWindowsHandler block); } - [Static] - interface NSAboutPanelOption { - [Mac (10, 13)] - [Field ("NSAboutPanelOptionCredits")] - NSString Credits { get; } - - [Mac (10, 13)] - [Field ("NSAboutPanelOptionApplicationName")] - NSString ApplicationName { get; } - - [Mac (10, 13)] - [Field ("NSAboutPanelOptionApplicationIcon")] - NSString ApplicationIcon { get; } - - [Mac (10, 13)] - [Field ("NSAboutPanelOptionVersion")] - NSString Version { get; } - - [Mac (10, 13)] - [Field ("NSAboutPanelOptionApplicationVersion")] - NSString ApplicationVersion { get; } - } - delegate void NSApplicationEnumerateWindowsHandler (NSWindow window, ref bool stop); delegate void ContinueUserActivityRestorationHandler (NSObject [] restorableObjects); @@ -934,10 +911,6 @@ interface NSApplicationDelegate { [Export ("application:userDidAcceptCloudKitShareWithMetadata:"), EventArgs ("NSApplicationUserAcceptedCloudKitShare")] void UserDidAcceptCloudKitShare (NSApplication application, CKShareMetadata metadata); #endif - - [Mac (10,13), EventArgs ("NSApplicationOpenUrls")] - [Export ("application:openURLs:")] - void OpenUrls (NSApplication application, NSUrl[] urls); } [Protocol] @@ -1219,7 +1192,6 @@ interface NSBezierPath : NSCoding, NSCopying { [Export ("appendBezierPathWithArcFromPoint:toPoint:radius:")] void AppendPathWithArc (CGPoint point1, CGPoint point2, nfloat radius); - [Availability (Obsoleted = Platform.Mac_10_13, Message = "Use 'AppendPathWithCGGlyph (CGGlyph, NSFont)' instead.")] [Export ("appendBezierPathWithGlyph:inFont:")] void AppendPathWithGlyph (uint /* NSGlyph = unsigned int */ glyph, NSFont font); @@ -1227,7 +1199,6 @@ interface NSBezierPath : NSCoding, NSCopying { void _AppendPathWithGlyphs (IntPtr glyphs, nint count, NSFont font); //IntPtr is exposed because the packedGlyphs should be treated as a "black box" - [Availability (Obsoleted = Platform.Mac_10_13, Message = "Use 'Append (uint[], NSFont)' instead.")] [Export ("appendBezierPathWithPackedGlyphs:")] void AppendPathWithPackedGlyphs (IntPtr packedGlyphs); @@ -1279,18 +1250,6 @@ interface NSBezierPath : NSCoding, NSCopying { [Export ("flatness")] nfloat Flatness { get; set; } - - [Mac (10,13)] - [Export ("appendBezierPathWithCGGlyph:inFont:")] - void AppendPathWithCGGlyph (CGGlyph glyph, NSFont font); - - [Mac (10,13)] - [Export ("appendBezierPathWithCGGlyphs:count:inFont:")] - [Internal] - void _AppendBezierPathWithCGGlyphs (IntPtr glyphs, nint count, NSFont font); - - [Wrap ("AppendPath (path)")] - void Append (NSBezierPath path); } [BaseType (typeof (NSImageRep))] @@ -1504,7 +1463,7 @@ interface NSBox { bool Transparent { [Bind ("isTransparent")] get; set; } [Export ("setTitleWithMnemonic:")] - [Availability (Deprecated = Platform.Mac_10_8, Message = "For compatability, this method still sets the Title with the ampersand stripped from it.")] + [Availability (Deprecated = Platform.Mac_10_8, Message = "Mnemonics are deprecated in 10.8. Historically they have not done anything. For compatability, this method still sets the Title with the ampersand stripped from it.")] void SetTitleWithMnemonic (string stringWithMnemonic); [Export ("borderWidth")] @@ -1592,7 +1551,6 @@ partial interface NSBrowser { nint SelectedRow (nint column); [Export ("selectionIndexPath", ArgumentSemantic.Copy)] - [NullAllowed] NSIndexPath SelectionIndexPath { get; set; } [Export ("selectionIndexPaths", ArgumentSemantic.Copy)] @@ -1631,11 +1589,11 @@ partial interface NSBrowser { [Export ("lastVisibleColumn")] nint LastVisibleColumn { get; } - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use the item based NSBrowser instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use the item based NSBrowser instead")] [Export ("columnOfMatrix:")] nint ColumnOfMatrix (NSMatrix matrix); - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use the item based NSBrowser instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use the item based NSBrowser instead")] [Export ("matrixInColumn:")] NSMatrix MatrixInColumn (nint column); @@ -1742,7 +1700,7 @@ partial interface NSBrowser { [Export ("doubleAction")] Selector DoubleAction { get; set; } - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use the item based NSBrowser instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use the item based NSBrowser instead")] [Export ("matrixClass")] Class MatrixClass { get; [Bind ("setMatrixClass:")] set; } @@ -1879,7 +1837,6 @@ interface NSBrowserDelegate { [Export ("browser:writeRowsWithIndexes:inColumn:toPasteboard:")] bool WriteRowsWithIndexesToPasteboard (NSBrowser browser, NSIndexSet rowIndexes, nint column, NSPasteboard pasteboard); - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSFilePromiseReceiver' objects instead.")] [Export ("browser:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:inColumn:")] string [] PromisedFilesDroppedAtDestination (NSBrowser browser, NSUrl dropDestination, NSIndexSet rowIndexes, nint column); @@ -1900,7 +1857,6 @@ interface NSBrowserDelegate { [Export ("browser:acceptDrop:atRow:column:dropOperation:")] bool AcceptDrop (NSBrowser browser, [Protocolize (4)] NSDraggingInfo info, nint row, nint column, NSBrowserDropOperation dropOperation); - [return: NullAllowed] [Export ("browser:typeSelectStringForRow:inColumn:")] string TypeSelectString (NSBrowser browser, nint row, nint column); @@ -2394,7 +2350,6 @@ interface NSCell : NSUserInterfaceItemIdentification, NSCoding, NSCopying, NSAcc CGSize CellSizeForBounds (CGRect bounds); [Export ("highlightColorWithFrame:inView:")] - [return: NullAllowed] NSColor HighlightColor (CGRect cellFrame, NSView controlView); [Export ("calcDrawInfo:")] @@ -2451,7 +2406,6 @@ interface NSCell : NSUserInterfaceItemIdentification, NSCoding, NSCopying, NSAcc [Static] [Export ("defaultMenu")] - [NullAllowed] NSMenu DefaultMenu { get; } [Export ("setSendsActionOnEndEditing:")] @@ -2497,15 +2451,15 @@ interface NSCell : NSUserInterfaceItemIdentification, NSCoding, NSCopying, NSAcc [Export ("showsFirstResponder")] bool ShowsFirstResponder { get; set; } - [Availability (Deprecated = Platform.Mac_10_8, Message = "Mnemonic methods have typically not been used.")] + [Availability (Deprecated = Platform.Mac_10_8, Message = "In 10.8 and higher, all the Mnemonic methods are deprecated. On MacOS they have typically not been used.")] [Export ("mnemonicLocation")] nint MnemonicLocation { get; set; } - [Availability (Deprecated = Platform.Mac_10_8, Message = "Mnemonic methods have typically not been used.")] + [Availability (Deprecated = Platform.Mac_10_8, Message = "In 10.8 and higher, all the Mnemonic methods are deprecated. On MacOS they have typically not been used.")] [Export ("mnemonic")] string Mnemonic { get; } - [Availability (Deprecated = Platform.Mac_10_8, Message = "Mnemonic methods have typically not been used.")] + [Availability (Deprecated = Platform.Mac_10_8, Message = "In 10.8 and higher, all the Mnemonic methods are deprecated. On MacOS they have typically not been used.")] [Export ("setTitleWithMnemonic:")] void SetTitleWithMnemonic (string stringWithAmpersand); @@ -2633,7 +2587,7 @@ interface NSClipView { [Export ("autoscroll:")] bool Autoscroll (NSEvent theEvent); - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use ConstrainBoundsRect instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use ConstrainBoundsRect instead")] [Export ("constrainScrollPoint:")] CGPoint ConstrainScrollPoint (CGPoint newOrigin); @@ -2669,7 +2623,6 @@ interface NSCollectionViewItem : NSCopying { IntPtr Constructor ([NullAllowed] string nibNameOrNull, [NullAllowed] NSBundle nibBundleOrNull); [Export ("collectionView")] - [NullAllowed] NSCollectionView CollectionView { get; } [Export ("selected")] @@ -2932,10 +2885,6 @@ interface NSCollectionView : NSDraggingSource, NSDraggingDestination { [Mac (10,12)] [Export ("toggleSectionCollapse:")] void ToggleSectionCollapse (NSObject sender); - - [Mac (10, 13)] - [NullAllowed, Export ("prefetchDataSource", ArgumentSemantic.Weak)] - INSCollectionViewPrefetching PrefetchDataSource { get; set; } } // @protocol NSCollectionViewDataSource @@ -2971,7 +2920,6 @@ partial interface NSCollectionViewDelegate { [Export ("collectionView:writeItemsAtIndexes:toPasteboard:")] bool WriteItems (NSCollectionView collectionView, NSIndexSet indexes, NSPasteboard toPasteboard); - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSFilePromiseReceiver' objects instead.")] [Export ("collectionView:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAtIndexes:")] string [] NamesOfPromisedFilesDroppedAtDestination (NSCollectionView collectionView, NSUrl dropUrl, NSIndexSet indexes); @@ -2997,7 +2945,6 @@ partial interface NSCollectionViewDelegate { bool WriteItems (NSCollectionView collectionView, NSSet indexPaths, NSPasteboard pasteboard); [Mac (10,11)] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSFilePromiseReceiver' objects instead.")] [Export ("collectionView:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAtIndexPaths:")] string[] GetNamesOfPromisedFiles (NSCollectionView collectionView, NSUrl dropURL, NSSet indexPaths); @@ -3461,16 +3408,9 @@ interface NSCollectionViewGridLayout } [Mac (10,11)] - [DisableDefaultCtor] [BaseType (typeof(NSCollectionViewLayout))] interface NSCollectionViewTransitionLayout { -#if !XAMCORE_4_0 - [Obsolete ("Use the constructor that allows you to set currentLayout and newLayout.")] - [Export ("init")] - IntPtr Constructor (); -#endif - [Export ("transitionProgress", ArgumentSemantic.Assign)] nfloat TransitionProgress { get; set; } @@ -3907,72 +3847,6 @@ partial interface NSColor : NSCoding, NSCopying, NSSecureCoding, NSPasteboardRea [Static] [Export ("scrubberTexturedBackgroundColor", ArgumentSemantic.Strong)] NSColor ScrubberTexturedBackgroundColor { get; } - - [Mac (10,13)] - [Static] - [Export ("colorNamed:bundle:")] - [return: NullAllowed] - NSColor FromName (string name, [NullAllowed] NSBundle bundle); - - [Mac (10,13)] - [Static] - [Export ("colorNamed:")] - [return: NullAllowed] - NSColor FromName (string name); - - [Mac (10, 13)] - [Export ("type")] - NSColorType Type { get; } - - [Mac (10,13)] - [Export ("colorUsingType:")] - [return: NullAllowed] - NSColor GetColor (NSColorType type); - - [Mac (10, 10)] - [Static] - [Export ("systemRedColor", ArgumentSemantic.Strong)] - NSColor SystemRedColor { get; } - - [Mac (10, 10)] - [Static] - [Export ("systemGreenColor", ArgumentSemantic.Strong)] - NSColor SystemGreenColor { get; } - - [Mac (10, 10)] - [Static] - [Export ("systemBlueColor", ArgumentSemantic.Strong)] - NSColor SystemBlueColor { get; } - - [Mac (10, 10)] - [Static] - [Export ("systemOrangeColor", ArgumentSemantic.Strong)] - NSColor SystemOrangeColor { get; } - - [Mac (10, 10)] - [Static] - [Export ("systemYellowColor", ArgumentSemantic.Strong)] - NSColor SystemYellowColor { get; } - - [Mac (10, 10)] - [Static] - [Export ("systemBrownColor", ArgumentSemantic.Strong)] - NSColor SystemBrownColor { get; } - - [Mac (10, 10)] - [Static] - [Export ("systemPinkColor", ArgumentSemantic.Strong)] - NSColor SystemPinkColor { get; } - - [Mac (10, 10)] - [Static] - [Export ("systemPurpleColor", ArgumentSemantic.Strong)] - NSColor SystemPurpleColor { get; } - - [Mac (10, 10)] - [Static] - [Export ("systemGrayColor", ArgumentSemantic.Strong)] - NSColor SystemGrayColor { get; } } [BaseType (typeof (NSObject))] @@ -4720,7 +4594,6 @@ interface NSCursor : NSCoding { [Static] [Export ("currentSystemCursor")] - [NullAllowed] NSCursor CurrentSystemCursor { get; } [Static] @@ -4799,7 +4672,7 @@ interface NSCursor : NSCoding { [Export ("initWithImage:hotSpot:")] IntPtr Constructor (NSImage newImage, CGPoint aPoint); - [Availability (Deprecated = Platform.Mac_10_12, Message = "Color hints are ignored. Use NSCursor (NSImage newImage, CGPoint aPoint) instead.")] + [Availability (Deprecated = Platform.Mac_10_12, Message = "Color hints are ignored. Use NSCursor (NSImage newImage, CGPoint aPoint) instead")] [Export ("initWithImage:foregroundColorHint:backgroundColorHint:hotSpot:")] IntPtr Constructor (NSImage newImage, NSColor fg, NSColor bg, CGPoint hotSpot); @@ -4834,28 +4707,22 @@ interface NSCursor : NSCoding { [Export ("set")] void Set (); - [Deprecated (PlatformName.MacOSX, 10, 13)] [Export ("setOnMouseExited:")] void SetOnMouseExited (bool flag); [Export ("setOnMouseEntered:")] - [Deprecated (PlatformName.MacOSX, 10, 13)] void SetOnMouseEntered (bool flag); [Export ("isSetOnMouseExited")] - [Deprecated (PlatformName.MacOSX, 10, 13)] bool IsSetOnMouseExited (); - [Deprecated (PlatformName.MacOSX, 10, 13)] [Export ("isSetOnMouseEntered")] bool IsSetOnMouseEntered (); [Export ("mouseEntered:")] - [Deprecated (PlatformName.MacOSX, 10, 13)] void MouseEntered (NSEvent theEvent); [Export ("mouseExited:")] - [Deprecated (PlatformName.MacOSX, 10, 13)] void MouseExited (NSEvent theEvent); } @@ -5289,11 +5156,11 @@ partial interface NSDocument { [Export ("windowForSheet")] NSWindow WindowForSheet { get; } - [Static, Export ("readableTypes", ArgumentSemantic.Copy)] + [Static, Export ("readableTypes")] string [] ReadableTypes { get; } [Static] - [Export ("writableTypes", ArgumentSemantic.Copy)] + [Export ("writableTypes")] string [] WritableTypes (); [Static] @@ -5423,7 +5290,7 @@ partial interface NSDocument { // This one comes from the NSRestorableState category ('@interface NSResponder (NSRestorableState)') [Static] - [Export ("restorableStateKeyPaths", ArgumentSemantic.Copy)] + [Export ("restorableStateKeyPaths")] string [] RestorableStateKeyPaths (); #if XAMCORE_2_0 @@ -5450,19 +5317,6 @@ partial interface NSDocument { [Export ("stopBrowsingVersionsWithCompletionHandler:")] [Async] void StopBrowsingVersions (Action completionHandler); - - [Mac (10, 13)] - [Export ("allowsDocumentSharing")] - bool AllowsDocumentSharing { get; } - - [Mac (10,13)] - [Export ("shareDocumentWithSharingService:completionHandler:")] - [Async] - void ShareDocument (NSSharingService sharingService, [NullAllowed] Action completionHandler); - - [Mac (10,13)] - [Export ("prepareSharingServicePicker:")] - void Prepare (NSSharingServicePicker sharingServicePicker); } delegate void OpenDocumentCompletionHandler (NSDocument document, bool documentWasAlreadyOpen, NSError error); @@ -5702,7 +5556,6 @@ interface NSDraggingInfo { #if XAMCORE_4_0 [Abstract] #endif - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use NSFilePromiseProvider objects instead.")] [Export ("namesOfPromisedFilesDroppedAtDestination:")] string [] PromisedFilesDroppedAtDestination (NSUrl dropDestination); @@ -5813,7 +5666,6 @@ interface NSDraggingSource { [Export ("draggingSourceOperationMaskForLocal:"), DefaultValue (NSDragOperation.None)] NSDragOperation DraggingSourceOperationMaskForLocal (bool flag); - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use NSFilePromiseProvider objects instead.")] [Export ("namesOfPromisedFilesDroppedAtDestination:"), DefaultValue (new string[0])] string [] NamesOfPromisedFilesDroppedAtDestination (NSUrl dropDestination); @@ -5829,13 +5681,12 @@ interface NSDraggingSource { [Export ("ignoreModifierKeysWhileDragging"), DefaultValue (false)] bool IgnoreModifierKeysWhileDragging { get; } - [Availability (Deprecated = Platform.Mac_10_1, Message = "Use DraggedImageEndedAtOperation instead.")] + [Availability (Deprecated = Platform.Mac_10_1, Message = "Use DraggedImageEndedAtOperation instead")] [Export ("draggedImage:endedAt:deposited:")] void DraggedImageEndedAtDeposited (NSImage image, CGPoint screenPoint, bool deposited); } [BaseType (typeof (NSResponder), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] { typeof (NSDrawerDelegate)})] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSSplitViewController' instead.")] partial interface NSDrawer : NSAccessibilityElementProtocol, NSAccessibility { [Export ("initWithContentSize:preferredEdge:")] IntPtr Constructor (CGSize contentSize, NSRectEdge edge); @@ -5899,7 +5750,6 @@ partial interface NSDrawer : NSAccessibilityElementProtocol, NSAccessibility { [BaseType (typeof (NSObject))] [Model] [Protocol] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSSplitViewController' instead.")] interface NSDrawerDelegate { [Export ("drawerDidClose:"), EventArgs ("NSNotification")] void DrawerDidClose (NSNotification notification); @@ -6044,7 +5894,6 @@ partial interface NSFont : NSSecureCoding, NSCopying { NSStringEncoding MostCompatibleStringEncoding { get; } [Export ("glyphWithName:")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use the 'CGGlyph' APIs instead.")] uint GlyphWithName (string aName); /* NSGlyph = unsigned int */ [Export ("coveredCharacterSet")] @@ -6084,13 +5933,23 @@ partial interface NSFont : NSSecureCoding, NSCopying { bool IsFixedPitch { get; } [Export ("boundingRectForGlyph:")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use the 'CGGlyph' APIs instead.")] CGRect BoundingRectForGlyph (uint /* NSGlyph = unsigned int */ aGlyph); [Export ("advancementForGlyph:")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use the 'CGGlyph' APIs instead.")] CGSize AdvancementForGlyph (uint /* NSGlyph = unsigned int */ aGlyph); + // FIXME binding + //[Export ("getBoundingRects:forGlyphs:count:")] + //void GetBoundingRectsforGlyphscount (NSRect *bounds, uint glyphs, int glyphCount); + + // FIXME binding + //[Export ("getAdvancements:forGlyphs:count:")] + //void GetAdvancementsforGlyphscount (NSSizeArray advancements, const uint glyphs, int glyphCount); + + // FIXME binding + //[Export ("getAdvancements:forPackedGlyphs:length:")] + //void GetAdvancementsforPackedGlyphslength (NSSizeArray advancements, void *packedGlyphs, uint length); + [Export ("set")] void Set (); @@ -6098,19 +5957,15 @@ partial interface NSFont : NSSecureCoding, NSCopying { void SetInContext (NSGraphicsContext graphicsContext); [Export ("printerFont")] - [Deprecated (PlatformName.MacOSX, 10, 13)] NSFont PrinterFont { get; } [Export ("screenFont")] - [Deprecated (PlatformName.MacOSX, 10, 13)] NSFont ScreenFont { get; } [Export ("screenFontWithRenderingMode:")] - [Deprecated (PlatformName.MacOSX, 10, 13)] NSFont ScreenFontWithRenderingMode (NSFontRenderingMode renderingMode); [Export ("renderingMode")] - [Deprecated (PlatformName.MacOSX, 10, 13)] NSFontRenderingMode RenderingMode { get; } [Export ("isVertical")] @@ -6201,23 +6056,6 @@ partial interface NSFont : NSSecureCoding, NSCopying { [Export ("monospacedDigitSystemFontOfSize:weight:")] NSFont MonospacedDigitSystemFontOfSize (nfloat fontSize, nfloat weight); - [Mac (10,13)] - [Export ("boundingRectForCGGlyph:")] - CGRect GetBoundingRect (CGGlyph glyph); - - [Mac (10,13)] - [Export ("advancementForCGGlyph:")] - CGSize GetAdvancement (CGGlyph glyph); - - [Mac (10,13)] - [Internal] - [Export ("getBoundingRects:forCGGlyphs:count:")] - void _GetBoundingRects (IntPtr bounds, IntPtr glyphs, nuint glyphCount); - - [Mac (10,13)] - [Internal] - [Export ("getAdvancements:forCGGlyphs:count:")] - void _GetAdvancements (IntPtr advancements, IntPtr glyphs, nuint glyphCount); } [Lion] @@ -6243,7 +6081,7 @@ interface NSFontCollection : NSSecureCoding, NSMutableCopying { NSFontCollection FromDescriptors (NSFontDescriptor [] queryDescriptors); [Static] - [Export ("fontCollectionWithAllAvailableDescriptors", ArgumentSemantic.Copy)] + [Export ("fontCollectionWithAllAvailableDescriptors")] NSFontCollection GetAllAvailableFonts (); [Static] @@ -6263,7 +6101,7 @@ interface NSFontCollection : NSSecureCoding, NSMutableCopying { bool RenameFontCollection (string fromName, NSFontCollectionVisibility visibility, string toName, out NSError error); [Static] - [Export ("allFontCollectionNames", ArgumentSemantic.Copy)] + [Export ("allFontCollectionNames")] string [] AllFontCollectionNames { get; } [Static] @@ -6362,7 +6200,7 @@ interface NSMutableFontCollection { [Mac(10,10)] [Static] - [Export ("fontCollectionWithAllAvailableDescriptors", ArgumentSemantic.Copy)] + [Export ("fontCollectionWithAllAvailableDescriptors")] NSMutableFontCollection GetAllAvailableFonts (); [Mac(10,10)] @@ -6439,10 +6277,6 @@ interface NSFontDescriptor : NSSecureCoding, NSCopying { [Export ("fontDescriptorWithFamily:")] NSFontDescriptor FontDescriptorWithFamily (string newFamily); - - [Mac (10, 13)] - [Export ("requiresFontAssetRequest")] - bool RequiresFontAssetRequest { get; } } [BaseType (typeof (NSObject))] @@ -6756,7 +6590,7 @@ partial interface NSFormCell { [Export ("titleBaseWritingDirection")] NSWritingDirection TitleBaseWritingDirection { get; set; } - [Availability (Deprecated = Platform.Mac_10_8, Message = "Set Title instead.")] + [Availability (Deprecated = Platform.Mac_10_8, Message = "Deprecated in 10.8 and higher. Set Title instead")] [Export ("setTitleWithMnemonic:")] void SetTitleWithMnemonic (string stringWithAmpersand); @@ -7439,7 +7273,7 @@ interface NSEvent : NSCoding, NSCopying { [BaseType (typeof (NSObject), Delegates=new string [] {"WeakDelegate"}, Events=new Type[] {typeof (NSGestureRecognizerDelegate)})] interface NSGestureRecognizer : NSCoding { [Export ("initWithTarget:action:")] - IntPtr Constructor ([NullAllowed] NSObject target, [NullAllowed] Selector action); + IntPtr Constructor (NSObject target, Selector action); [Export ("target", ArgumentSemantic.Weak), NullAllowed] NSObject Target { get; set; } @@ -7590,7 +7424,7 @@ interface NSGestureRecognizerDelegate { #if !XAMCORE_4_0 [Export ("xamarinselector:removed:"), DelegateName ("NSGestureEvent"), DefaultValue (true)] - [Obsolete ("It will never be called.")] + [Obsolete ("No longer an OS X API - it will never be called")] bool ShouldReceiveEvent (NSGestureRecognizer gestureRecognizer, NSEvent gestureEvent); #endif @@ -7672,7 +7506,7 @@ partial interface NSMenu : NSCoding, NSCopying, NSAccessibility, NSAccessibility nint IndexOf (nint itemTag); [Export ("indexOfItemWithRepresentedObject:")] - nint IndexOfItem ([NullAllowed] NSObject obj); + nint IndexOfItem (NSObject obj); [Export ("indexOfItemWithSubmenu:")] nint IndexOfItem ([NullAllowed] NSMenu submenu); @@ -7828,7 +7662,6 @@ interface NSMenuItem : NSCoding, NSCopying, NSAccessibility, NSAccessibilityElem string UserKeyEquivalent { get; } [Export ("setTitleWithMnemonic:")] - [Availability (Deprecated = Platform.Mac_10_13, Message = "Use 'Title' instead.")] void SetTitleWithMnemonic (string stringWithAmpersand); [Export ("isHighlighted")] @@ -7905,10 +7738,6 @@ interface NSMenuItem : NSCoding, NSCopying, NSAccessibility, NSAccessibilityElem [Export ("toolTip")] string ToolTip { get; set; } - - [Mac (10, 13)] - [Export ("allowsKeyEquivalentWhenHidden")] - bool AllowsKeyEquivalentWhenHidden { get; set; } } [BaseType (typeof (NSButtonCell))] @@ -8383,12 +8212,12 @@ interface NSOpenPanel { bool CanChooseFiles { get; set; } // Deprecated methods, but needed to run on pre 10.6 systems - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use Urls instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use Urls instead")] [Export ("filenames")] string [] Filenames { get; } //runModalForWindows:Completeion - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use NSApplication.RunModal instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use NSApplication.RunModal instead")] [Export ("beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:")] void BeginSheet ([NullAllowed] string directory, [NullAllowed] string fileName, [NullAllowed] string [] fileTypes, [NullAllowed] NSWindow modalForWindow, [NullAllowed] NSObject modalDelegate, [NullAllowed] Selector didEndSelector, IntPtr contextInfo); @@ -8396,11 +8225,11 @@ interface NSOpenPanel { [Export ("beginForDirectory:file:types:modelessDelegate:didEndSelector:contextInfo:")] void Begin ([NullAllowed] string directory, [NullAllowed] string fileName, [NullAllowed] string [] fileTypes, [NullAllowed] NSObject modelessDelegate, [NullAllowed] Selector didEndSelector, IntPtr contextInfo); - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use NSApplication.RunModal instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use NSApplication.RunModal instead")] [Export ("runModalForDirectory:file:types:")] nint RunModal ([NullAllowed] string directory, [NullAllowed] string fileName, [NullAllowed] string [] types); - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use NSApplication.RunModal instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use NSApplication.RunModal instead")] [Export ("runModalForTypes:")] nint RunModal (string [] types); } @@ -8434,19 +8263,19 @@ interface NSOpenSavePanelDelegate { [Export ("panelSelectionDidChange:"), EventArgs ("NSOpenSaveSelectionChanged")] void SelectionDidChange (NSSavePanel panel); - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use ValidateUrl instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use ValidateUrl instead")] [Export ("panel:isValidFilename:"), DelegateName ("NSOpenSaveFilename"), DefaultValue (true)] bool IsValidFilename (NSSavePanel panel, string fileName); - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use DidChangeToDirectory instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use DidChangeToDirectory instead")] [Export ("panel:directoryDidChange:"), EventArgs ("NSOpenSaveFilename")] void DirectoryDidChange (NSSavePanel panel, string path); - [Availability (Deprecated = Platform.Mac_10_6, Message = "This method does not control sorting order.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "This method is obsolete and does not control sorting order")] [Export ("panel:compareFilename:with:caseSensitive:"), DelegateName ("NSOpenSaveCompare"), DefaultValue (NSComparisonResult.Same)] NSComparisonResult CompareFilenames (NSSavePanel panel, string name1, string name2, bool caseSensitive); - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use ShouldEnableUrl instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use ShouldEnableUrl instead")] [Export ("panel:shouldShowFilename:"), DelegateName ("NSOpenSaveFilename"), DefaultValue (true)] bool ShouldShowFilename (NSSavePanel panel, string filename); } @@ -8703,7 +8532,6 @@ partial interface NSOutlineViewDataSource { bool AcceptDrop (NSOutlineView outlineView, [Protocolize (4)] NSDraggingInfo info, [NullAllowed] NSObject item, nint index); [Export ("outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSFilePromiseReceiver' objects instead.")] string [] FilesDropped (NSOutlineView outlineView, NSUrl dropDestination, NSArray items); } @@ -8879,11 +8707,11 @@ partial interface NSImage : NSCoding, NSCopying, NSSecureCoding, NSPasteboardRea string [] ImagePasteboardTypes { get; } [Static] - [Export ("imageTypes", ArgumentSemantic.Copy)] + [Export ("imageTypes")] string [] ImageTypes { get; } [Static] - [Export ("imageUnfilteredTypes", ArgumentSemantic.Copy)] + [Export ("imageUnfilteredTypes")] string [] ImageUnfilteredTypes { get; } [Static] @@ -8962,7 +8790,7 @@ partial interface NSImage : NSCoding, NSCopying, NSSecureCoding, NSPasteboardRea [Sealed] void DrawInRect (CGRect dstRect, CGRect srcRect, NSCompositingOperation operation, nfloat delta); - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use DrawInRect with respectContextIsFlipped instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use DrawInRect with respectContextIsFlipped instead")] [Export ("flipped")] bool Flipped { [Bind ("isFlipped")] get; set; } @@ -9409,10 +9237,6 @@ public enum NSImageName [Mac (10, 12, 2)] [Field ("NSImageNameTouchBarVolumeUpTemplate")] TouchBarVolumeUpTemplate, - - [Mac (10, 13)] - [Field ("NSImageNameTouchBarRemoveTemplate")] - TouchBarRemoveTemplate, } interface NSStringAttributes { @@ -9679,11 +9503,11 @@ partial interface NSImageRep : NSCoding, NSCopying { string [] ImagePasteboardTypes { get; } [Static] - [Export ("imageUnfilteredTypes", ArgumentSemantic.Copy)] + [Export ("imageUnfilteredTypes")] string []ImageUnfilteredTypes { get; } [Static] - [Export ("imageTypes", ArgumentSemantic.Copy)] + [Export ("imageTypes")] string [] ImageTypes { get; } [Static] @@ -10054,38 +9878,6 @@ interface NSLevelIndicator { [Mac (10,10)] [Export ("levelIndicatorStyle")] NSLevelIndicatorStyle LevelIndicatorStyle { get; set; } - - [Mac (10, 13)] - [Export ("fillColor", ArgumentSemantic.Copy)] - NSColor FillColor { get; set; } - - [Mac (10, 13)] - [Export ("warningFillColor", ArgumentSemantic.Copy)] - NSColor WarningFillColor { get; set; } - - [Mac (10, 13)] - [Export ("criticalFillColor", ArgumentSemantic.Copy)] - NSColor CriticalFillColor { get; set; } - - [Mac (10, 13)] - [Export ("drawsTieredCapacityLevels")] - bool DrawsTieredCapacityLevels { get; set; } - - [Mac (10, 13)] - [Export ("placeholderVisibility", ArgumentSemantic.Assign)] - NSLevelIndicatorPlaceholderVisibility PlaceholderVisibility { get; set; } - - [Mac (10, 13)] - [NullAllowed, Export ("ratingImage", ArgumentSemantic.Strong)] - NSImage RatingImage { get; set; } - - [Mac (10, 13)] - [NullAllowed, Export ("ratingPlaceholderImage", ArgumentSemantic.Strong)] - NSImage RatingPlaceholderImage { get; set; } - - [Mac (10, 13)] - [Export ("editable")] - bool Editable { [Bind ("isEditable")] get; set; } } [BaseType (typeof (NSActionCell))] @@ -10166,22 +9958,6 @@ interface NSLayoutAnchor : NSCoding, NSCopying [Export ("constraintLessThanOrEqualToAnchor:constant:")] NSLayoutConstraint ConstraintLessThanOrEqualToAnchor (NSLayoutAnchor anchor, nfloat constant); - - [Mac (10, 12)] - [Export ("name")] - string Name { get; } - - [Mac (10, 12)] - [NullAllowed, Export ("item", ArgumentSemantic.Weak)] - NSObject Item { get; } - - [Mac (10, 12)] - [Export ("hasAmbiguousLayout")] - bool HasAmbiguousLayout { get; } - - [Mac (10, 12)] - [Export ("constraintsAffectingLayout")] - NSLayoutConstraint[] ConstraintsAffectingLayout { get; } } [Mac (10,11)] @@ -10189,9 +9965,6 @@ interface NSLayoutAnchor : NSCoding, NSCopying [DisableDefaultCtor] // Handle is nil interface NSLayoutXAxisAnchor { - [Mac (10,12)] - [Export ("anchorWithOffsetToAnchor:")] - NSLayoutDimension GetAnchorWithOffset (NSLayoutXAxisAnchor otherAnchor); } [Mac (10,11)] @@ -10199,9 +9972,6 @@ interface NSLayoutXAxisAnchor [DisableDefaultCtor] // Handle is nil interface NSLayoutYAxisAnchor { - [Mac (10,12)] - [Export ("anchorWithOffsetToAnchor:")] - NSLayoutDimension GetAnchorWithOffset (NSLayoutYAxisAnchor otherAnchor); } [Mac (10,11)] @@ -10407,7 +10177,7 @@ partial interface NSLayoutManager : NSCoding { void InvalidateDisplayForGlyphRange (NSRange glyphRange); #if !XAMCORE_4_0 - [Availability (Deprecated = Platform.Mac_10_11, Message = "Use ProcessEditing (NSTextStorage textStorage, NSTextStorageEditActions editMask, NSRange newCharRange, nint delta, NSRange invalidatedCharRange) instead).")] + [Availability (Deprecated = Platform.Mac_10_11, Message = "Use ProcessEditing (NSTextStorage textStorage, NSTextStorageEditActions editMask, NSRange newCharRange, nint delta, NSRange invalidatedCharRange) instead)")] [Export ("textStorage:edited:range:changeInLength:invalidatedRange:")] void TextStorageEdited (NSTextStorage str, NSTextStorageEditedFlags editedMask, NSRange newCharRange, nint changeInLength, NSRange invalidatedCharRange); #endif @@ -10482,6 +10252,18 @@ partial interface NSLayoutManager : NSCoding { [Export ("intAttribute:forGlyphAtIndex:")] nint IntAttributeforGlyphAtIndex (nint attributeTag, nint glyphIndex); + // TODO: bind this with a safe version + [Export ("getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:"), Internal] + nint GetGlyphs (NSRange glyphRange, IntPtr glyphBuffer, IntPtr charIndexBuffer, IntPtr inscribeBuffer, IntPtr elasticBuffer); + + // TODO: bind this with a safe version + [Internal, Export ("getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:")] + nint GetGlyphs (NSRange glyphRange, IntPtr glyphBuffer, IntPtr charIndexBuffer, IntPtr inscribeBuffer, IntPtr elasticBuffer, IntPtr bidiLevelBuffer); + + // TODO: bidn this with a safe version + [Internal, Export ("getGlyphs:range:")] + nuint GetGlyphsrange (IntPtr glyphArray, NSRange glyphRange); + [Export ("setTextContainer:forGlyphRange:")] void SetTextContainerForRange (NSTextContainer container, NSRange glyphRange); @@ -10910,7 +10692,7 @@ interface NSPanel { [BaseType (typeof (NSObject))] interface NSParagraphStyle : NSSecureCoding, NSMutableCopying { [Static] - [Export ("defaultParagraphStyle", ArgumentSemantic.Copy)] + [Export ("defaultParagraphStyle")] NSParagraphStyle DefaultParagraphStyle { get; [NotImplemented] set; } [Static] @@ -11254,45 +11036,20 @@ partial interface NSPasteboard // NSPasteboard does _not_ implement NSPasteboard // Pasteboard names: for NSPasteboard.FromName() [Field ("NSGeneralPboard")] - [Availability (Deprecated = Platform.Mac_10_13, Message = "Use 'NSPasteboardNameGeneral' instead.")] NSString NSGeneralPasteboardName { get; } [Field ("NSFontPboard")] - [Availability (Deprecated = Platform.Mac_10_13, Message = "Use 'NSPasteboardNameFont' instead.")] NSString NSFontPasteboardName { get; } [Field ("NSRulerPboard")] - [Availability (Deprecated = Platform.Mac_10_13, Message = "Use 'NSPasteboardNameRuler' instead.")] NSString NSRulerPasteboardName { get; } [Field ("NSFindPboard")] - [Availability (Deprecated = Platform.Mac_10_13, Message = "Use 'NSPasteboardNameFind' instead.")] NSString NSFindPasteboardName { get; } [Field ("NSDragPboard")] - [Availability (Deprecated = Platform.Mac_10_13, Message = "Use 'NSPasteboardNameDrag' instead.")] NSString NSDragPasteboardName { get; } - [Mac (10, 13)] - [Field ("NSPasteboardNameGeneral")] - NSString NSPasteboardNameGeneral { get; } - - [Mac (10, 13)] - [Field ("NSPasteboardNameFont")] - NSString NSPasteboardNameFont { get; } - - [Mac (10, 13)] - [Field ("NSPasteboardNameRuler")] - NSString NSPasteboardNameRuler { get; } - - [Mac (10, 13)] - [Field ("NSPasteboardNameFind")] - NSString NSPasteboardNameFind { get; } - - [Mac (10, 13)] - [Field ("NSPasteboardNameDrag")] - NSString NSPasteboardNameDrag { get; } - [Mac (10,6)] [Field ("NSPasteboardTypeString")] NSString NSPasteboardTypeString { get; } @@ -11349,14 +11106,6 @@ partial interface NSPasteboard // NSPasteboard does _not_ implement NSPasteboard [Field ("NSPasteboardTypeFindPanelSearchOptions")] NSString NSPasteboardTypeFindPanelSearchOptions { get; } - [Mac (10, 13)] - [Field ("NSPasteboardTypeURL")] - NSString NSPasteboardTypeUrl { get; } - - [Mac (10, 13)] - [Field ("NSPasteboardTypeFileURL")] - NSString NSPasteboardTypeFileUrl { get; } - [Mac (10,12)] [Export ("prepareForNewContentsWithOptions:")] nint PrepareForNewContents (NSPasteboardContentsOptions options); @@ -11442,7 +11191,7 @@ interface NSPasteboardReading { // This binding is just broken, it's an ObjC ctor (init*) bound as a normal method. [Abstract] [Export ("xamarinselector:removed:")] - [Obsolete ("It will never be called.")] + [Obsolete ("No longer an OS X API - it will never be called")] NSObject InitWithPasteboardPropertyList (NSObject propertyList, string type); #else FIXME: (compiler error to not forget) @@ -11660,10 +11409,9 @@ interface NSPathControlItem } [BaseType (typeof (NSResponder))] - interface NSPopover : NSAppearanceCustomization, NSAccessibilityElementProtocol, NSAccessibility { - [Obsolete ("Use 'GetAppearance' and 'SetAppearance' methods instead.")] + interface NSPopover : NSAccessibilityElementProtocol, NSAccessibility { [Export ("appearance", ArgumentSemantic.Retain)] - new NSPopoverAppearance Appearance { get; set; } + NSPopoverAppearance Appearance { get; set; } [Export ("behavior")] NSPopoverBehavior Behavior { get; set; } @@ -11995,11 +11743,11 @@ partial interface NSPopUpButtonCell { [BaseType (typeof (NSObject))] interface NSPrinter : NSCoding, NSCopying { [Static] - [Export ("printerNames", ArgumentSemantic.Copy)] + [Export ("printerNames")] string [] PrinterNames{ get; } [Static] - [Export ("printerTypes", ArgumentSemantic.Copy)] + [Export ("printerTypes")] string [] PrinterTypes { get; } [Static] @@ -12501,7 +12249,7 @@ partial interface NSResponder : NSCoding, NSTouchBarProvider { void InvalidateRestorableState (); [Static] - [Lion, Export ("restorableStateKeyPaths", ArgumentSemantic.Copy)] + [Lion, Export ("restorableStateKeyPaths")] string [] RestorableStateKeyPaths (); [Lion] @@ -12540,10 +12288,6 @@ partial interface NSResponder : NSCoding, NSTouchBarProvider { [Sealed] [Export ("presentError:modalForWindow:delegate:didPresentSelector:contextInfo:")] void PresentError (NSError error, NSWindow window, [NullAllowed] NSObject @delegate, [NullAllowed] Selector didPresentSelector, IntPtr contextInfo); - - [Mac (10,13)] - [Export ("encodeRestorableStateWithCoder:backgroundQueue:")] - void EncodeRestorableState (NSCoder coder, NSOperationQueue queue); } [Category] @@ -12680,9 +12424,6 @@ partial interface NSRulerView { nfloat ReservedThicknessForAccessoryView { get; set; } [Export ("measurementUnits")] -#if XAMCORE_4_0 - [BindAs (typeof (NSRulerViewUnits))] -#endif string MeasurementUnits { get; set; } [Export ("originOffset")] @@ -12698,22 +12439,6 @@ partial interface NSRulerView { NSView AccessoryView { get; set; } } - [Mac (10, 13)] - enum NSRulerViewUnits - { - [Field ("NSRulerViewUnitInches")] - Inches, - - [Field ("NSRulerViewUnitCentimeters")] - Centimeters, - - [Field ("NSRulerViewUnitPoints")] - Points, - - [Field ("NSRulerViewUnitPicas")] - Picas, - } - delegate void NSSavePanelComplete (nint result); [BaseType (typeof (NSPanel), Delegates=new string [] { "Delegate" }, Events=new Type [] { typeof (NSOpenSavePanelDelegate)})] @@ -12792,23 +12517,23 @@ interface NSSavePanel { [Export ("showsHiddenFiles")] bool ShowsHiddenFiles { get; set; } - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use Url instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use Url instead")] [Export ("filename")] string Filename { get; } - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use DirectoryUrl instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use DirectoryUrl instead")] [Export ("directory")] string Directory { get; set; } - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use AllowedFileTypes instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use AllowedFileTypes instead")] [Export ("requiredFileType")] string RequiredFileType { get; set; } - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use Begin with the callback instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use Begin with the callback instead")] [Export ("beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo:")] void Begin (string directory, string filename, NSWindow docWindow, NSObject modalDelegate, Selector selector, IntPtr context); - [Availability (Deprecated = Platform.Mac_10_6, Message = "Use RunModal without parameters instead.")] + [Availability (Deprecated = Platform.Mac_10_6, Message = "Use RunModal without parameters instead")] [Export ("runModalForDirectory:file:")] nint RunModal ([NullAllowed] string directory, [NullAllowed] string filename); @@ -12832,7 +12557,7 @@ interface NSRemoteSavePanel {} [BaseType (typeof (NSObject))] partial interface NSScreen { [Static] - [Export ("screens", ArgumentSemantic.Copy)] + [Export ("screens")] NSScreen [] Screens { get; } [Static] @@ -12891,12 +12616,12 @@ interface NSScroller { [Export ("initWithFrame:")] IntPtr Constructor (CGRect frameRect); - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_7, Message = "Use GetScrollerWidth instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_7, Message = "Use GetScrollerWidth instead")] [Static] [Export ("scrollerWidth")] nfloat ScrollerWidth { get; } - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_7, Message = "Use GetScrollerWidth instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_7, Message = "Use GetScrollerWidth instead")] [Static] [Export ("scrollerWidthForControlSize:")] nfloat ScrollerWidthForControlSize (NSControlSize controlSize); @@ -13262,7 +12987,7 @@ interface NSSearchFieldCell { } [BaseType (typeof (NSControl))] - interface NSSegmentedControl : NSUserInterfaceCompression { + interface NSSegmentedControl { [Export ("initWithFrame:")] IntPtr Constructor (CGRect frameRect); @@ -13348,43 +13073,6 @@ interface NSSegmentedControl : NSUserInterfaceCompression { [Mac (10, 12, 2)] [NullAllowed, Export ("selectedSegmentBezelColor", ArgumentSemantic.Copy)] NSColor SelectedSegmentBezelColor { get; set; } - - [Mac (10,13)] - [Export ("setToolTip:forSegment:")] - void SetToolTip ([NullAllowed] string toolTip, nint segment); - - [Mac (10,13)] - [Export ("toolTipForSegment:")] - [return: NullAllowed] - string GetToolTip (nint forSegment); - - [Mac (10,13)] - [Export ("setTag:forSegment:")] - void SetTag (nint tag, nint segment); - - [Mac (10,13)] - [Export ("tagForSegment:")] - nint GetTag (nint segment); - - [Mac (10,13)] - [Export ("setShowsMenuIndicator:forSegment:")] - void SetShowsMenuIndicator (bool showsMenuIndicator, nint segment); - - [Mac (10,13)] - [Export ("showsMenuIndicatorForSegment:")] - bool ShowsMenuIndicator (nint segment); - - [Mac (10,13)] - [Export ("setAlignment:forSegment:")] - void SetAlignment (NSTextAlignment alignment, nint segment); - - [Mac (10,13)] - [Export ("alignmentForSegment:")] - NSTextAlignment GetAlignment (nint segment); - - [Mac (10, 13)] - [Export ("segmentDistribution", ArgumentSemantic.Assign)] - NSSegmentDistribution SegmentDistribution { get; set; } } [BaseType (typeof (NSActionCell))] @@ -14044,7 +13732,7 @@ partial interface NSSound : NSCoding, NSCopying, NSPasteboardReading, NSPasteboa bool CanCreateFromPasteboard (NSPasteboard pasteboard); [Static] - [Export ("soundUnfilteredTypes", ArgumentSemantic.Copy)] + [Export ("soundUnfilteredTypes")] string [] SoundUnfilteredTypes (); [Export ("initWithPasteboard:")] @@ -14198,7 +13886,7 @@ interface INSSplitViewDelegate {} [Mac (10,10)] [BaseType (typeof (NSViewController))] - interface NSSplitViewController : NSSplitViewDelegate, NSUserInterfaceValidations { + interface NSSplitViewController : NSSplitViewDelegate { [Export ("splitView", ArgumentSemantic.Strong)] NSSplitView SplitView { get; set; } @@ -14500,44 +14188,44 @@ partial interface NSStatusItem { [Export ("length")] nfloat Length { get; set; } - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("action"), NullAllowed] Selector Action { get; set; } - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("sendActionOn:")] nint SendActionOn (NSTouchPhase mask); - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("popUpStatusItemMenu:")] void PopUpStatusItemMenu (NSMenu menu); - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("drawStatusBarBackgroundInRect:withHighlight:")] void DrawStatusBarBackground (CGRect rect, bool highlight); //Detected properties - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("doubleAction")] Selector DoubleAction { get; set; } - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("target", ArgumentSemantic.Assign), NullAllowed] NSObject Target { get; set; } - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("title")] string Title { get; set; } - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("attributedTitle")] NSAttributedString AttributedTitle { get; set; } - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("image")] NSImage Image { get; set; } - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("alternateImage")] NSImage AlternateImage { get; set; } @@ -14545,19 +14233,19 @@ partial interface NSStatusItem { [NullAllowed] NSMenu Menu { get; set; } - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("enabled")] bool Enabled { [Bind ("isEnabled")]get; set; } - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("toolTip")] string ToolTip { get; set; } - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("highlightMode")] bool HighlightMode { get; set; } - [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Soft-deprecation, forwards message to button, but will be gone in the future")] [Export ("view")] NSView View { get; [NullAllowed] set; } @@ -14764,11 +14452,6 @@ interface NSStoryboard { [Export ("instantiateControllerWithIdentifier:")] NSObject InstantiateControllerWithIdentifier (string identifier); - - [Mac (10, 13)] - [Static] - [NullAllowed, Export ("mainStoryboard", ArgumentSemantic.Strong)] - NSStoryboard MainStoryboard { get; } } [Mac (10,10)] @@ -15186,11 +14869,9 @@ partial interface NSView : NSDraggingDestination, NSAnimatablePropertyContainer, bool LockFocusIfCanDraw (); [Export ("lockFocusIfCanDrawInContext:")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSView.DisplayRectIgnoringOpacity (CGRect, NSGraphicsContext)' to draw a view subtree into a graphics context.")] bool LockFocusIfCanDrawInContext (NSGraphicsContext context); [Export ("focusView")][Static] - [return: NullAllowed] NSView FocusView (); [Export ("visibleRect")] @@ -15469,16 +15150,14 @@ partial interface NSView : NSDraggingDestination, NSAnimatablePropertyContainer, [Export ("beginDraggingSessionWithItems:event:source:")] NSDraggingSession BeginDraggingSession (NSDraggingItem [] items, NSEvent evnt, [Protocolize] NSDraggingSource source); - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_7, Message = "Use BeginDraggingSession instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_7, Message = "Use BeginDraggingSession instead")] [Export ("dragImage:at:offset:event:pasteboard:source:slideBack:")] void DragImage (NSImage anImage, CGPoint viewLocation, CGSize initialOffset, NSEvent theEvent, NSPasteboard pboard, NSObject sourceObj, bool slideFlag); [Export ("dragFile:fromRect:slideBack:event:")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'BeginDraggingSession (NSDraggingItem [], NSEvent, NSDraggingSource)' instead.")] bool DragFile (string filename, CGRect aRect, bool slideBack, NSEvent theEvent); [Export ("dragPromisedFilesOfTypes:fromRect:source:slideBack:event:")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'BeginDraggingSession (NSDraggingItem [], NSEvent, NSDraggingSource)' instead.")] bool DragPromisedFilesOfTypes (string[] typeArray, CGRect aRect, NSObject sourceObject, bool slideBack, NSEvent theEvent); [Export ("exitFullScreenModeWithOptions:")] @@ -15507,7 +15186,6 @@ partial interface NSView : NSDraggingDestination, NSAnimatablePropertyContainer, NSString FrameChangedNotification { get; } [Notification, Field ("NSViewFocusDidChangeNotification")] - [Deprecated (PlatformName.MacOSX, 10, 4)] NSString FocusChangedNotification { get; } [Notification, Field ("NSViewBoundsDidChangeNotification")] @@ -16517,35 +16195,35 @@ partial interface NSTableView : NSDraggingSource, NSAccessibilityTable { [Export ("frameOfCellAtColumn:row:")] CGRect GetCellFrame (nint column, nint row); - [Availability (Introduced = Platform.Mac_10_5, Deprecated = Platform.Mac_10_10, Message = "Use View Based TableView and GetView.")] + [Availability (Introduced = Platform.Mac_10_5, Deprecated = Platform.Mac_10_10, Message = "Use View Based TableView and GetView")] [Export ("preparedCellAtColumn:row:")] NSCell GetCell (nint column, nint row ); - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView with an NSTextField.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView with an NSTextField")] [Export ("textShouldBeginEditing:")] bool TextShouldBeginEditing (NSText textObject); - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView with an NSTextField.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView with an NSTextField")] [Export ("textShouldEndEditing:")] bool TextShouldEndEditing (NSText textObject); - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView with an NSTextField.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView with an NSTextField")] [Export ("textDidBeginEditing:")] void TextDidBeginEditing (NSNotification notification); - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView with an NSTextField.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView with an NSTextField")] [Export ("textDidEndEditing:")] void TextDidEndEditing (NSNotification notification); - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView with an NSTextField.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView with an NSTextField")] [Export ("textDidChange:")] void TextDidChange (NSNotification notification); - [Availability (Introduced = Platform.Mac_10_6, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView; observe the window’s firstResponder for focus change notifications.")] + [Availability (Introduced = Platform.Mac_10_6, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView; observe the window’s firstResponder for focus change notifications")] [Export ("shouldFocusCell:atColumn:row:")] bool ShouldFocusCell (NSCell cell, nint column, nint row ); - [Availability (Introduced = Platform.Mac_10_6, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView; directly interact with a particular view as required and call PerformClick on it, if necessary.")] + [Availability (Introduced = Platform.Mac_10_6, Deprecated = Platform.Mac_10_10, Message = "Use a View Based TableView; directly interact with a particular view as required and call PerformClick on it, if necessary")] [Export ("performClickOnCellAtColumn:row:")] void PerformClick (nint column, nint row ); @@ -16752,10 +16430,6 @@ partial interface NSTableView : NSDraggingSource, NSAccessibilityTable { [Mac (10,12)] [Export ("userInterfaceLayoutDirection")] NSUserInterfaceLayoutDirection UserInterfaceLayoutDirection { get; set; } - - [Mac (10, 13)] - [Export ("usesAutomaticRowHeights")] - bool UsesAutomaticRowHeights { get; set; } } [BaseType (typeof (NSObject))] @@ -17007,7 +16681,6 @@ interface NSTableViewSource { [Export ("tableView:acceptDrop:row:dropOperation:")] bool AcceptDrop (NSTableView tableView, [Protocolize (4)] NSDraggingInfo info, nint row, NSTableViewDropOperation dropOperation); - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSFilePromiseReceiver' objects instead.")] [Export ("tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:")] string [] FilesDropped (NSTableView tableView, NSUrl dropDestination, NSIndexSet indexSet ); @@ -17935,18 +17608,8 @@ partial interface NSTextInputContext { [BaseType (typeof (NSObject))] interface NSTextList : NSCoding, NSCopying { [Export ("initWithMarkerFormat:options:")] - IntPtr Constructor ( -#if XAMCORE_4_0 - [BindAs (typeof (NSTextListMarkerFormats))] -#endif - string format, NSTextListOptions mask); + IntPtr Constructor (string format, NSTextListOptions mask); - [Wrap ("this (format.GetConstant(), mask)")] - IntPtr Constructor (NSTextListMarkerFormats format, NSTextListOptions mask); - -#if XAMCORE_4_0 - [BindAs (typeof (NSTextListMarkerFormats))] -#endif [Export ("markerFormat")] string MarkerFormat { get; } @@ -17961,77 +17624,6 @@ IntPtr Constructor ( nint StartingItemNumber { get; set; } } - - enum NSTextListMarkerFormats - { - [Mac (10, 13)] - [Field ("NSTextListMarkerBox")] - Box, - - [Mac (10, 13)] - [Field ("NSTextListMarkerCheck")] - Check, - - [Mac (10, 13)] - [Field ("NSTextListMarkerCircle")] - Circle, - - [Mac (10, 13)] - [Field ("NSTextListMarkerDiamond")] - Diamond, - - [Mac (10, 13)] - [Field ("NSTextListMarkerDisc")] - Disc, - - [Mac (10, 13)] - [Field ("NSTextListMarkerHyphen")] - Hyphen, - - [Mac (10, 13)] - [Field ("NSTextListMarkerSquare")] - Square, - - [Mac (10, 13)] - [Field ("NSTextListMarkerLowercaseHexadecimal")] - LowercaseHexadecimal, - - [Mac (10, 13)] - [Field ("NSTextListMarkerUppercaseHexadecimal")] - UppercaseHexadecimal, - - [Mac (10, 13)] - [Field ("NSTextListMarkerOctal")] - Octal, - - [Mac (10, 13)] - [Field ("NSTextListMarkerLowercaseAlpha")] - LowercaseAlpha, - - [Mac (10, 13)] - [Field ("NSTextListMarkerUppercaseAlpha")] - UppercaseAlpha, - - [Mac (10, 13)] - [Field ("NSTextListMarkerLowercaseLatin")] - LowercaseLatin, - - [Mac (10, 13)] - [Field ("NSTextListMarkerUppercaseLatin")] - UppercaseLatin, - - [Mac (10, 13)] - [Field ("NSTextListMarkerLowercaseRoman")] - LowercaseRoman, - - [Mac (10, 13)] - [Field ("NSTextListMarkerUppercaseRoman")] - UppercaseRoman, - - [Mac (10, 13)] - [Field ("NSTextListMarkerDecimal")] - Decimal, - } [BaseType (typeof (NSTextBlock))] [DisableDefaultCtor] @@ -18117,7 +17709,7 @@ partial interface NSTextContainer : NSCoding { [Export ("heightTracksTextView")] bool HeightTracksTextView { get; set; } - [Availability (Deprecated = Platform.Mac_10_11, Message = "Use Size instead.")] + [Availability (Deprecated = Platform.Mac_10_11, Message = "Use Size instead")] [Export ("containerSize")] CGSize ContainerSize { get; set; } @@ -18202,11 +17794,11 @@ partial interface NSTextStorage { [Model] [Protocol] interface NSTextStorageDelegate { - [Availability (Deprecated = Platform.Mac_10_11, Message = "Use WillProcessEditing instead.")] + [Availability (Deprecated = Platform.Mac_10_11, Message = "Use WillProcessEditing instead")] [Export ("textStorageWillProcessEditing:")] void TextStorageWillProcessEditing (NSNotification notification); - [Availability (Deprecated = Platform.Mac_10_11, Message = "Use DidProcessEditing instead.")] + [Availability (Deprecated = Platform.Mac_10_11, Message = "Use DidProcessEditing instead")] [Export ("textStorageDidProcessEditing:")] void TextStorageDidProcessEditing (NSNotification notification); @@ -18950,7 +18542,6 @@ interface NSTokenFieldDelegate { string GetEditingString (NSTokenField tokenField, NSObject representedObject); [Export ("tokenField:representedObjectForEditingString:")] - [return: NullAllowed] NSObject GetRepresentedObject (NSTokenField tokenField, string editingString); [Export ("tokenField:writeRepresentedObjects:toPasteboard:")] @@ -18972,14 +18563,9 @@ interface NSTokenFieldDelegate { [BaseType (typeof (NSObject), Delegates=new string [] { "Delegate" }, Events=new Type [] { typeof (NSToolbarDelegate)})] #if XAMCORE_2_0 - [DisableDefaultCtor] // init was added in 10.13 + [DisableDefaultCtor] #endif partial interface NSToolbar { -#if XAMCORE_2_0 - [Mac (10, 13)] - [Export ("init")] - IntPtr Constructor (); -#endif [Export ("initWithIdentifier:")] IntPtr Constructor (string identifier); @@ -19391,11 +18977,7 @@ interface NSTreeController { void RearrangeObjects (); [Export ("arrangedObjects")] -#if XAMCORE_4_0 - NSTreeNode ArrangedObjects { get; } -#else NSObject ArrangedObjects { get; } -#endif [Export ("childrenKeyPath")] string ChildrenKeyPath { get; set; } @@ -19808,11 +19390,11 @@ partial interface NSWindow : NSAnimatablePropertyContainer, NSUserInterfaceItemI [Export ("preventsApplicationTerminationWhenModal")] bool PreventsApplicationTerminationWhenModal { get; set; } - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_7, Message = "Use ConvertRectToScreen instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_7, Message = "Use ConvertRectToScreen instead")] [Export ("convertBaseToScreen:")] CGPoint ConvertBaseToScreen (CGPoint aPoint); - [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_7, Message = "Use ConvertRectFromScreen instead.")] + [Availability (Introduced = Platform.Mac_10_0, Deprecated = Platform.Mac_10_7, Message = "Use ConvertRectFromScreen instead")] [Export ("convertScreenToBase:")] CGPoint ConvertScreenToBase (CGPoint aPoint); @@ -19952,15 +19534,12 @@ partial interface NSWindow : NSAnimatablePropertyContainer, NSUserInterfaceItemI void RemoveFrameUsingName (string name); [Export ("cacheImageInRect:")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "This method shouldn’t be used as it doesn’t work in all drawing situations; instead, a subview should be used that implements the desired drawing behavior.")] void CacheImageInRect (CGRect aRect); [Export ("restoreCachedImage")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "This method shouldn’t be used as it doesn’t work in all drawing situations; instead, a subview should be used that implements the desired drawing behavior.")] void RestoreCachedImage (); [Export ("discardCachedImage")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "This method shouldn’t be used as it doesn’t work in all drawing situations; instead, a subview should be used that implements the desired drawing behavior.")] void DiscardCachedImage (); [Export ("minSize")] @@ -20137,32 +19716,32 @@ partial interface NSWindow : NSAnimatablePropertyContainer, NSUserInterfaceItemI void SetAnchorAttribute (NSLayoutAttribute layoutAttribute, NSLayoutConstraintOrientation forOrientation); [Lion, Export ("visualizeConstraints:")] - void VisualizeConstraints ([NullAllowed] NSLayoutConstraint [] constraints); + void VisualizeConstraints (NSLayoutConstraint [] constraints); - [Lion, Export ("convertRectToScreen:")] - CGRect ConvertRectToScreen (CGRect aRect); + [Lion, Export ("convertRectToScreen:")] + CGRect ConvertRectToScreen (CGRect aRect); - [Lion, Export ("convertRectFromScreen:")] - CGRect ConvertRectFromScreen (CGRect aRect); + [Lion, Export ("convertRectFromScreen:")] + CGRect ConvertRectFromScreen (CGRect aRect); - [Lion, Export ("convertRectToBacking:")] - CGRect ConvertRectToBacking (CGRect aRect); + [Lion, Export ("convertRectToBacking:")] + CGRect ConvertRectToBacking (CGRect aRect); - [Lion, Export ("convertRectFromBacking:")] - CGRect ConvertRectFromBacking (CGRect aRect); + [Lion, Export ("convertRectFromBacking:")] + CGRect ConvertRectFromBacking (CGRect aRect); - [Lion, Export ("backingAlignedRect:options:")] - CGRect BackingAlignedRect (CGRect aRect, NSAlignmentOptions options); + [Lion, Export ("backingAlignedRect:options:")] + CGRect BackingAlignedRect (CGRect aRect, NSAlignmentOptions options); - [Lion, Export ("backingScaleFactor")] - nfloat BackingScaleFactor { get; } + [Lion, Export ("backingScaleFactor")] + nfloat BackingScaleFactor { get; } - [Lion, Export ("toggleFullScreen:")] - void ToggleFullScreen ([NullAllowed] NSObject sender); + [Lion, Export ("toggleFullScreen:")] + void ToggleFullScreen ([NullAllowed] NSObject sender); - //Detected properties - [Export ("animationBehavior")] - NSWindowAnimationBehavior AnimationBehavior { get; set; } + //Detected properties + [Export ("animationBehavior")] + NSWindowAnimationBehavior AnimationBehavior { get; set; } #if !XAMARIN_MAC // @@ -20325,7 +19904,7 @@ partial interface NSWindow : NSAnimatablePropertyContainer, NSUserInterfaceItemI [Export ("endSheet:returnCode:")] void EndSheet (NSWindow sheetWindow, NSModalResponse returnCode); #if !XAMCORE_4_0 - [Obsolete ("Use the EndSheet(NSWindow,NSModalResponse) overload.")] + [Obsolete ("Use the EndSheet(NSWindow,NSModalResponse) overload")] [Mac (10,9)] [Wrap ("EndSheet (sheetWindow, (NSModalResponse)(long)returnCode)", IsVirtual = true)] void EndSheet (NSWindow sheetWindow, nint returnCode); @@ -21683,16 +21262,14 @@ partial interface NSTypesetter { [Export ("setLineFragmentRect:forGlyphRange:usedRect:baselineOffset:")] void SetLineFragment (CGRect fragmentRect, NSRange glyphRange, CGRect usedRect, nfloat baselineOffset); + // TODO: high level C# binding [Export ("substituteGlyphsInRange:withGlyphs:")] - [Deprecated (PlatformName.MacOSX, 10, 13)] void SubstituteGlyphs (NSRange glyphRange, IntPtr glyphs); [Export ("insertGlyph:atGlyphIndex:characterIndex:")] - [Deprecated (PlatformName.MacOSX, 10, 13)] void InsertGlyph (uint glyph, nuint glyphIndex, nuint characterIndex); // glyph is NSGlyph - typedef unsigned int NSGlyph; [Export ("deleteGlyphsInRange:")] - [Deprecated (PlatformName.MacOSX, 10, 13)] void DeleteGlyphs (NSRange glyphRange); [Export ("setNotShownAttribute:forGlyphRange:")] @@ -22075,18 +21652,6 @@ partial interface NSWindow { [Mac (10, 12)] [Export ("windowTitlebarLayoutDirection")] NSUserInterfaceLayoutDirection WindowTitlebarLayoutDirection { get; } - - [Mac (10,13)] - [Export ("toggleTabOverview:")] - void ToggleTabOverview ([NullAllowed] NSObject sender); - - [Mac (10, 13)] - [Export ("tab", ArgumentSemantic.Strong)] - NSWindowTab Tab { get; } - - [Mac (10, 13)] - [NullAllowed, Export ("tabGroup", ArgumentSemantic.Weak)] - NSWindowTabGroup TabGroup { get; } } partial interface NSPrintOperation { @@ -22413,10 +21978,6 @@ partial interface NSDocument { [MountainLion, Static, Export ("usesUbiquitousStorage")] bool UsesUbiquitousStorage { get; } - - [Mac (10,13)] - [Export ("encodeRestorableStateWithCoder:backgroundQueue:")] - void EncodeRestorableState (NSCoder coder, NSOperationQueue queue); } delegate void NSDocumentControllerOpenPanelWithCompletionHandler (NSArray urlsToOpen); @@ -22429,14 +21990,6 @@ partial interface NSDocumentController { [MountainLion, Export ("beginOpenPanel:forTypes:completionHandler:")] void BeginOpenPanel (NSOpenPanel openPanel, NSArray inTypes, NSDocumentControllerOpenPanelResultHandler completionHandler); - - [Mac (10, 13)] - [Export ("allowsAutomaticShareMenu")] - bool AllowsAutomaticShareMenu { get; } - - [Mac (10, 13)] - [Export ("standardShareMenuItem")] - NSMenuItem StandardShareMenuItem { get; } } partial interface NSImage { @@ -22575,20 +22128,6 @@ partial interface NSGlyphInfo : NSCoding, NSCopying, NSSecureCoding { [Export ("characterCollection")] NSCharacterCollection CharacterCollection { get; } - - [Mac (10,13)] - [Static] - [Export ("glyphInfoWithCGGlyph:forFont:baseString:")] - [return: NullAllowed] - NSGlyphInfo GetGlyphInfo (ushort glyph, NSFont font, string @string); - - [Mac (10, 13)] - [Export ("glyphID")] - ushort GlyphId { get; } - - [Mac (10, 13)] - [Export ("baseString")] - string BaseString { get; } } partial interface NSTableViewDelegate { @@ -22624,19 +22163,15 @@ partial interface NSHelpManager { } partial interface NSDrawer { - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSSplitViewController' instead.")] [Notification, Field ("NSDrawerWillOpenNotification")] NSString WillOpenNotification { get; } - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSSplitViewController' instead.")] [Notification, Field ("NSDrawerDidOpenNotification")] NSString DidOpenNotification { get; } - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSSplitViewController' instead.")] [Notification, Field ("NSDrawerWillCloseNotification")] NSString WillCloseNotification { get; } - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSSplitViewController' instead.")] [Notification, Field ("NSDrawerDidCloseNotification")] NSString DidCloseNotification { get; } } @@ -22733,10 +22268,6 @@ partial interface NSText { [Notification, Field ("NSTextDidChangeNotification")] NSString DidChangeNotification { get; } - - [Mac (10, 13)] - [Field ("NSTextMovementUserInfoKey")] - NSString MovementUserInfoKey { get; } } partial interface NSTextInputContext { @@ -23649,26 +23180,6 @@ interface NSAccessibility [Field ("NSAccessibilityAnnouncementRequestedNotification")] NSString AnnouncementRequestedNotification { get; } - [Mac (10, 13)] -#if XAMCORE_4_0 - [Abstract] -#endif - [NullAllowed, Export ("accessibilityChildrenInNavigationOrder", ArgumentSemantic.Copy)] - NSAccessibilityElement[] AccessibilityChildrenInNavigationOrder { get; set; } - - [Mac (10, 13)] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("accessibilityCustomRotors", ArgumentSemantic.Copy)] - NSAccessibilityCustomRotor[] AccessibilityCustomRotors { get; set; } - - [Mac (10, 13)] -#if XAMCORE_4_0 - [Abstract] -#endif - [NullAllowed, Export ("accessibilityCustomActions", ArgumentSemantic.Copy)] - NSAccessibilityCustomAction[] AccessibilityCustomActions { get; set; } } [Protocol] @@ -24185,31 +23696,6 @@ partial interface NSAccessibilityAttributes { [Mac (10, 12)] [Field ("NSAccessibilityTextAlignmentAttribute")] NSString TextAlignmentAttribute { get; } - - [Mac (10, 13)] - [Field ("NSAccessibilityLanguageTextAttribute")] - NSString LanguageTextAttribute { get; } - - [Mac (10, 13)] - [Field ("NSAccessibilityCustomTextAttribute")] - NSString CustomTextAttribute { get; } - - [Mac (10, 13)] - [Field ("NSAccessibilityAnnotationTextAttribute")] - NSString AnnotationTextAttribute { get; } - } - - [Static] - [Mac (10, 13)] - partial interface NSAccessibilityAnnotationAttributeKey { - [Field ("NSAccessibilityAnnotationLabel")] - NSString AnnotationLabel { get; } - - [Field ("NSAccessibilityAnnotationElement")] - NSString AnnotationElement { get; } - - [Field ("NSAccessibilityAnnotationLocation")] - NSString AnnotationLocation { get; } } [Static] @@ -24399,10 +23885,6 @@ interface NSAccessibilityRoles { [Mac (10, 12)] [Field ("NSAccessibilityMenuBarItemRole")] NSString MenuBarItemRole { get; } - - [Mac (10, 13)] - [Field ("NSAccessibilityPageRole")] - NSString PageRole { get; } } [Static] @@ -24502,18 +23984,6 @@ interface NSAccessibilitySubroles { [Mac (10, 9)] [Field ("NSAccessibilityDescriptionListSubrole")] NSString DescriptionListSubrole { get; } - - [Mac (10, 13)] - [Field ("NSAccessibilityTabButtonSubrole")] - NSString TabButtonSubrole { get; } - - [Mac (10, 13)] - [Field ("NSAccessibilityCollectionListSubrole")] - NSString CollectionListSubrole { get; } - - [Mac (10, 13)] - [Field ("NSAccessibilitySectionListSubrole")] - NSString SectionListSubrole { get; } } #if !XAMCORE_4_0 @@ -24941,43 +24411,43 @@ interface NSAccessibilityLayoutItem : NSAccessibilityGroup { } interface NSObjectAccessibilityExtensions { - [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead.")] + [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead")] [Export ("accessibilityAttributeNames")] NSArray AccessibilityAttributeNames { get; } - [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead.")] + [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead")] [Export ("accessibilityAttributeValue:")] NSObject GetAccessibilityValue (NSString attribute); - [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead.")] + [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead")] [Export ("accessibilityIsAttributeSettable:")] bool IsAccessibilityAttributeSettable (NSString attribute); - [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead.")] + [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead")] [Export ("accessibilitySetValue:forAttribute:")] void SetAccessibilityValue (NSString attribute, NSObject value); - [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead.")] + [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead")] [Export ("accessibilityParameterizedAttributeNames")] NSArray AccessibilityParameterizedAttributeNames { get; } - [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead.")] + [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead")] [Export ("accessibilityAttributeValue:forParameter:")] NSObject GetAccessibilityValue (NSString attribute, NSObject parameter); - [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead.")] + [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead")] [Export ("accessibilityActionNames")] NSArray AccessibilityActionNames { get; } - [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead.")] + [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead")] [Export ("accessibilityActionDescription:")] NSString GetAccessibilityActionDescription (NSString action); - [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead.")] + [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead")] [Export ("accessibilityPerformAction:")] void AccessibilityPerformAction (NSString action); - [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead.")] + [Availability (Obsoleted = Platform.Mac_10_10, Message = "Use the NSAccessibility protocol methods instead")] [Export ("accessibilityIsIgnored")] bool AccessibilityIsIgnored { get; } @@ -25020,14 +24490,6 @@ interface NSWorkspaceAccessibilityExtensions { [Mac (10, 12)] [Export ("accessibilityDisplayShouldReduceMotion")] bool AccessibilityDisplayShouldReduceMotion { get; } - - [Mac (10, 13)] - [Export ("voiceOverEnabled")] - bool VoiceOverEnabled { [Bind ("isVoiceOverEnabled")] get; } - - [Mac (10, 13)] - [Export ("switchControlEnabled")] - bool SwitchControlEnabled { [Bind ("isSwitchControlEnabled")] get; } } interface INSFilePromiseProviderDelegate {} @@ -25069,7 +24531,7 @@ interface NSFilePromiseProviderDelegate interface NSFilePromiseReceiver : NSPasteboardReading { [Static] - [Export ("readableDraggedTypes", ArgumentSemantic.Copy)] + [Export ("readableDraggedTypes")] string[] ReadableDraggedTypes { get; } [Export ("fileTypes", ArgumentSemantic.Copy)] @@ -25142,8 +24604,6 @@ interface NSToolTipOwner string GetStringForToolTip (NSView view, nint tag, CGPoint point, IntPtr data); } - interface INSUserInterfaceValidations {} - [Protocol] interface NSUserInterfaceValidations { @@ -25282,10 +24742,6 @@ interface NSColorPickerTouchBarItem [Export ("enabled")] bool Enabled { [Bind ("isEnabled")] get; set; } - - [Mac (10, 13)] - [NullAllowed, Export ("allowedColorSpaces", ArgumentSemantic.Copy)] - NSColorSpace[] AllowedColorSpaces { get; set; } } [Mac (10,12,2)] @@ -25338,36 +24794,6 @@ interface NSGroupTouchBarItem [Export ("customizationLabel")] string CustomizationLabel { get; set; } - - [Mac (10,13)] - [Static] - [Export ("groupItemWithIdentifier:items:allowedCompressionOptions:")] - NSGroupTouchBarItem CreateGroupItem (string identifier, NSTouchBarItem[] items, NSUserInterfaceCompressionOptions allowedCompressionOptions); - - [Mac (10,13)] - [Static] - [Export ("alertStyleGroupItemWithIdentifier:")] - NSGroupTouchBarItem CreateAlertStyleGroupItem (string identifier); - - [Mac (10, 13)] - [Export ("groupUserInterfaceLayoutDirection", ArgumentSemantic.Assign)] - NSUserInterfaceLayoutDirection GroupUserInterfaceLayoutDirection { get; set; } - - [Mac (10, 13)] - [Export ("prefersEqualWidths")] - bool PrefersEqualWidths { get; set; } - - [Mac (10, 13)] - [Export ("preferredItemWidth")] - nfloat PreferredItemWidth { get; set; } - - [Mac (10, 13)] - [Export ("effectiveCompressionOptions")] - NSUserInterfaceCompressionOptions EffectiveCompressionOptions { get; } - - [Mac (10, 13)] - [Export ("prioritizedCompressionOptions", ArgumentSemantic.Copy)] - NSUserInterfaceCompressionOptions[] PrioritizedCompressionOptions { get; set; } } [Mac (10,12,2)] @@ -25793,274 +25219,4 @@ interface NSSliderAccessoryBehavior : NSCoding, NSCopying [Export ("handleAction:")] void HandleAction (NSSliderAccessory sender); } - - [Mac (10,13)] - [BaseType (typeof(NSObject))] - interface NSAccessibilityCustomAction - { - [Export ("initWithName:handler:")] - IntPtr Constructor (string name, [NullAllowed] Func handler); - - [Export ("initWithName:target:selector:")] - IntPtr Constructor (string name, NSObject target, Selector selector); - - [Export ("name")] - string Name { get; set; } - - [NullAllowed, Export ("handler", ArgumentSemantic.Copy)] - Func Handler { get; set; } - - [NullAllowed, Export ("target", ArgumentSemantic.Weak)] - NSObject Target { get; set; } - - [Advice (@"It must conform to one of the following signatures: 'bool ActionMethod ()' or 'bool ActionMethod (NSAccessibilityCustomAction)' and be decorated with a corresponding [Export].")] - [NullAllowed, Export ("selector", ArgumentSemantic.Assign)] - Selector Selector { get; set; } - } - - [Mac (10,13)] - [BaseType (typeof(NSObject))] - interface NSAccessibilityCustomRotor - { - [Export ("initWithLabel:itemSearchDelegate:")] - IntPtr Constructor (string label, INSAccessibilityCustomRotorItemSearchDelegate itemSearchDelegate); - - [Export ("initWithRotorType:itemSearchDelegate:")] - IntPtr Constructor (NSAccessibilityCustomRotorType rotorType, INSAccessibilityCustomRotorItemSearchDelegate itemSearchDelegate); - - [Export ("type", ArgumentSemantic.Assign)] - NSAccessibilityCustomRotorType Type { get; set; } - - [Export ("label")] - string Label { get; set; } - - [NullAllowed, Export ("itemSearchDelegate", ArgumentSemantic.Weak)] - INSAccessibilityCustomRotorItemSearchDelegate ItemSearchDelegate { get; set; } - - [NullAllowed, Export ("itemLoadingDelegate", ArgumentSemantic.Weak)] - INSAccessibilityElementLoading ItemLoadingDelegate { get; set; } - } - - [Mac (10,13)] - [BaseType (typeof(NSObject))] - interface NSAccessibilityCustomRotorSearchParameters - { - [NullAllowed, Export ("currentItem", ArgumentSemantic.Strong)] - NSAccessibilityCustomRotorItemResult CurrentItem { get; set; } - - [Export ("searchDirection", ArgumentSemantic.Assign)] - NSAccessibilityCustomRotorSearchDirection SearchDirection { get; set; } - - [Export ("filterString")] - string FilterString { get; set; } - } - - [Mac (10,13)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface NSAccessibilityCustomRotorItemResult - { - [Export ("initWithTargetElement:")] - [DesignatedInitializer] - IntPtr Constructor (NSAccessibilityElement targetElement); - - [Export ("initWithItemLoadingToken:customLabel:")] - [DesignatedInitializer] - IntPtr Constructor (INSSecureCoding itemLoadingToken, string customLabel); - - [NullAllowed, Export ("targetElement", ArgumentSemantic.Weak)] - NSAccessibilityElement TargetElement { get; } - - [NullAllowed, Export ("itemLoadingToken", ArgumentSemantic.Strong)] - INSSecureCoding ItemLoadingToken { get; } - - [Export ("targetRange", ArgumentSemantic.Assign)] - NSRange TargetRange { get; set; } - - [NullAllowed, Export ("customLabel")] - string CustomLabel { get; set; } - } - - interface INSAccessibilityCustomRotorItemSearchDelegate {} - - [Mac (10,13)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface NSAccessibilityCustomRotorItemSearchDelegate - { - [Abstract] - [Export ("rotor:resultForSearchParameters:")] - [return: NullAllowed] - NSAccessibilityCustomRotorItemResult GetResult (NSAccessibilityCustomRotor rotor, NSAccessibilityCustomRotorSearchParameters searchParameters); - } - - interface INSAccessibilityElementLoading {} - - [Mac (10,13)] - [Protocol] - interface NSAccessibilityElementLoading - { - [Abstract] - [Export ("accessibilityElementWithToken:")] - [return: NullAllowed] - NSAccessibilityElement GetAccessibilityElement (INSSecureCoding token); - - [Export ("accessibilityRangeInTargetElementWithToken:")] - NSRange GetAccessibilityRangeInTargetElement (INSSecureCoding token); - } - - interface INSCollectionViewPrefetching { } - - [Mac (10,13)] - [Protocol] - interface NSCollectionViewPrefetching - { - [Abstract] - [Export ("collectionView:prefetchItemsAtIndexPaths:")] - void PrefetchItems (NSCollectionView collectionView, NSIndexPath[] indexPaths); - - [Export ("collectionView:cancelPrefetchingForItemsAtIndexPaths:")] - void CancelPrefetching (NSCollectionView collectionView, NSIndexPath[] indexPaths); - } - - delegate bool DownloadFontAssetsRequestCompletionHandler (NSError error); - - [Mac (10,13)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface NSFontAssetRequest : INSProgressReporting - { - [Export ("initWithFontDescriptors:options:")] - [DesignatedInitializer] - IntPtr Constructor (NSFontDescriptor[] fontDescriptors, NSFontAssetRequestOptions options); - - [Export ("downloadedFontDescriptors", ArgumentSemantic.Copy)] - NSFontDescriptor[] DownloadedFontDescriptors { get; } - - [Export ("progress", ArgumentSemantic.Strong)] - NSProgress Progress { get; } - - [Export ("downloadFontAssetsWithCompletionHandler:")] - void DownloadFontAssets (DownloadFontAssetsRequestCompletionHandler completionHandler); - } - - [Category] - [BaseType (typeof(NSObject))] - interface NSObject_NSFontPanelValidationAdditions - { - [Export ("validModesForFontPanel:")] - NSFontPanelModeMask GetValidModes (NSFontPanel fontPanel); - } - - [Mac (10, 13)] - [BaseType (typeof(NSObject))] - interface NSUserInterfaceCompressionOptions : NSCopying, NSCoding - { - [Export ("initWithIdentifier:")] - [DesignatedInitializer] - IntPtr Constructor (string identifier); - - [Export ("initWithCompressionOptions:")] - [DesignatedInitializer] - IntPtr Constructor (NSSet options); - - [Export ("containsOptions:")] - bool Contains (NSUserInterfaceCompressionOptions options); - - [Export ("intersectsOptions:")] - bool Intersects (NSUserInterfaceCompressionOptions options); - - [Export ("empty")] - bool Empty { [Bind ("isEmpty")] get; } - - [Export ("optionsByAddingOptions:")] - NSUserInterfaceCompressionOptions GetOptionsByAdding (NSUserInterfaceCompressionOptions options); - - [Export ("optionsByRemovingOptions:")] - NSUserInterfaceCompressionOptions GetOptionsByRemoving (NSUserInterfaceCompressionOptions options); - - [Static] - [Export ("hideImagesOption", ArgumentSemantic.Copy)] - NSUserInterfaceCompressionOptions HideImagesOption { get; } - - [Static] - [Export ("hideTextOption", ArgumentSemantic.Copy)] - NSUserInterfaceCompressionOptions HideTextOption { get; } - - [Static] - [Export ("reduceMetricsOption", ArgumentSemantic.Copy)] - NSUserInterfaceCompressionOptions ReduceMetricsOption { get; } - - [Static] - [Export ("breakEqualWidthsOption", ArgumentSemantic.Copy)] - NSUserInterfaceCompressionOptions BreakEqualWidthsOption { get; } - - [Static] - [Export ("standardOptions", ArgumentSemantic.Copy)] - NSUserInterfaceCompressionOptions StandardOptions { get; } - } - - [Mac (10, 13)] - [Protocol] - interface NSUserInterfaceCompression - { - [Abstract] - [Export ("compressWithPrioritizedCompressionOptions:")] - void Compress (NSUserInterfaceCompressionOptions[] prioritizedOptions); - - [Abstract] - [Export ("minimumSizeWithPrioritizedCompressionOptions:")] - CGSize GetMinimumSize (NSUserInterfaceCompressionOptions[] prioritizedOptions); - - [Abstract] - [Export ("activeCompressionOptions", ArgumentSemantic.Copy)] - NSUserInterfaceCompressionOptions ActiveCompressionOptions { get; } - } - - [Mac (10,13)] - [BaseType (typeof(NSObject))] - interface NSWindowTab - { - [Export ("title")] - string Title { get; set; } - - [NullAllowed, Export ("attributedTitle", ArgumentSemantic.Copy)] - NSAttributedString AttributedTitle { get; set; } - - [Export ("toolTip")] - string ToolTip { get; set; } - - [NullAllowed, Export ("accessoryView", ArgumentSemantic.Strong)] - NSView AccessoryView { get; set; } - } - - [Mac (10,13)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface NSWindowTabGroup - { - [Export ("identifier")] - string Identifier { get; } - - [Export ("windows", ArgumentSemantic.Copy)] - NSWindow[] Windows { get; } - - [Export ("overviewVisible")] - bool OverviewVisible { [Bind ("isOverviewVisible")] get; set; } - - [Export ("tabBarVisible")] - bool TabBarVisible { [Bind ("isTabBarVisible")] get; } - - [NullAllowed, Export ("selectedWindow", ArgumentSemantic.Weak)] - NSWindow SelectedWindow { get; set; } - - [Export ("addWindow:")] - void Add (NSWindow window); - - [Export ("insertWindow:atIndex:")] - void Insert (NSWindow window, nint index); - - [Export ("removeWindow:")] - void Remove (NSWindow window); - } } diff --git a/src/arkit.cs b/src/arkit.cs deleted file mode 100644 index 0597f698cfa..00000000000 --- a/src/arkit.cs +++ /dev/null @@ -1,895 +0,0 @@ -// -// ARKit bindings -// -// Authors: -// Vincent Dondain -// -// Copyright 2017 Microsoft Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using System.ComponentModel; -using XamCore.AVFoundation; -using XamCore.CoreFoundation; -using XamCore.CoreGraphics; -using XamCore.CoreMedia; -using XamCore.CoreVideo; -using XamCore.Foundation; -using XamCore.ObjCRuntime; -using XamCore.Metal; -using XamCore.SpriteKit; -using XamCore.SceneKit; -using XamCore.UIKit; - -using Vector2 = global::OpenTK.Vector2; -using Vector3 = global::OpenTK.NVector3; -using Matrix3 = global::OpenTK.NMatrix3; -using Matrix4 = global::OpenTK.NMatrix4; - -namespace XamCore.ARKit { - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Native] - public enum ARTrackingState : nint { - NotAvailable, - Limited, - Normal, - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Native] - public enum ARTrackingStateReason : nint { - None, - Initializing, - ExcessiveMotion, - InsufficientFeatures, - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [ErrorDomain ("ARErrorDomain")] - [Native] - public enum ARErrorCode : nint { - UnsupportedConfiguration = 100, - SensorUnavailable = 101, - SensorFailed = 102, - CameraUnauthorized = 103, - WorldTrackingFailed = 200, - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Flags] - [Native] - public enum ARHitTestResultType : nuint { - FeaturePoint = 1 << 0, - EstimatedHorizontalPlane = 1 << 1, - ExistingPlane = 1 << 3, - ExistingPlaneUsingExtent = 1 << 4, - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Native] - public enum ARPlaneAnchorAlignment : nint { - Horizontal, - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Flags] - [Native] - public enum ARSessionRunOptions : nuint { - ResetTracking = 1 << 0, - RemoveExistingAnchors = 1 << 1, - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Native] - public enum ARWorldAlignment : nint { - Gravity, - GravityAndHeading, - Camera, - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Flags] - [Native] - public enum ARPlaneDetection : nuint { - None = 0, - Horizontal = 1 << 0, - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface ARAnchor : NSCopying { - - [NullAllowed, Export ("identifier")] - NSUuid Identifier { get; } - - [Export ("transform")] - Matrix4 Transform { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } - - [Export ("initWithTransform:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - IntPtr Constructor (Matrix4 transform); - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface ARCamera : NSCopying { - - [Export ("transform")] - Matrix4 Transform { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } - - [Export ("eulerAngles")] - Vector3 EulerAngles { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } - - [Export ("trackingState")] - ARTrackingState TrackingState { get; } - - [Export ("trackingStateReason")] - ARTrackingStateReason TrackingStateReason { get; } - - [Export ("intrinsics")] - Matrix3 Intrinsics { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } - - [Export ("imageResolution")] - CGSize ImageResolution { get; } - - [Export ("projectionMatrix")] - Matrix4 ProjectionMatrix { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } - - [Export ("projectPoint:orientation:viewportSize:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - CGPoint GetProjectPoint (Vector3 point, UIInterfaceOrientation orientation, CGSize viewportSize); - - [Export ("projectionMatrixForOrientation:viewportSize:zNear:zFar:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Matrix4 GetProjectionMatrix (UIInterfaceOrientation orientation, CGSize viewportSize, nfloat zNear, nfloat zFar); - - [Export ("viewMatrixForOrientation:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Matrix4 GetViewMatrix (UIInterfaceOrientation orientation); - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface ARFrame : NSCopying { - - [Export ("timestamp")] - double Timestamp { get; } - - [Export ("capturedImage")] - CVPixelBuffer CapturedImage { get; } - - [NullAllowed, Export ("capturedDepthData", ArgumentSemantic.Strong)] - AVDepthData CapturedDepthData { get; } - - [Export ("capturedDepthDataTimestamp")] - double CapturedDepthDataTimestamp { get; } - - [Export ("camera", ArgumentSemantic.Copy)] - ARCamera Camera { get; } - - [Export ("anchors", ArgumentSemantic.Copy)] - ARAnchor[] Anchors { get; } - - [NullAllowed, Export ("lightEstimate", ArgumentSemantic.Strong)] - ARLightEstimate LightEstimate { get; } - - [NullAllowed, Export ("rawFeaturePoints", ArgumentSemantic.Strong)] - ARPointCloud RawFeaturePoints { get; } - - [Export ("hitTest:types:")] - ARHitTestResult[] HitTest (CGPoint point, ARHitTestResultType types); - - [Export ("displayTransformForOrientation:viewportSize:")] - CGAffineTransform GetDisplayTransform (UIInterfaceOrientation orientation, CGSize viewportSize); - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface ARHitTestResult { - - [Export ("type")] - ARHitTestResultType Type { get; } - - [Export ("distance")] - nfloat Distance { get; } - - [Export ("localTransform")] - Matrix4 LocalTransform { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } - - [Export ("worldTransform")] - Matrix4 WorldTransform { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } - - [NullAllowed, Export ("anchor", ArgumentSemantic.Strong)] - ARAnchor Anchor { get; } - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface ARLightEstimate { - - [Export ("ambientIntensity")] - nfloat AmbientIntensity { get; } - - [Export ("ambientColorTemperature")] - nfloat AmbientColorTemperature { get; } - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof (ARAnchor))] - [DisableDefaultCtor] - interface ARPlaneAnchor { - - // [Export ("initWithTransform:")] marked as NS_UNAVAILABLE - - [Export ("alignment")] - ARPlaneAnchorAlignment Alignment { get; } - - [Export ("center")] - Vector3 Center { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } - - [Export ("extent")] - Vector3 Extent { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface ARPointCloud { - - [Export ("count")] - nuint Count { get; } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Protected, Export ("points")] - IntPtr GetRawPoints (); - - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Protected, Export ("identifiers")] - IntPtr GetRawIdentifiers (); - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof (SCNView))] - interface ARSCNView { - - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - IARSCNViewDelegate Delegate { get; set; } - - [Export ("session", ArgumentSemantic.Strong)] - ARSession Session { get; set; } - - [Export ("scene", ArgumentSemantic.Strong)] - SCNScene Scene { get; set; } - - [Export ("automaticallyUpdatesLighting")] - bool AutomaticallyUpdatesLighting { get; set; } - - [Export ("anchorForNode:")] - [return: NullAllowed] - ARAnchor GetAnchor (SCNNode node); - - [Export ("nodeForAnchor:")] - [return: NullAllowed] - SCNNode GetNode (ARAnchor anchor); - - [Export ("hitTest:types:")] - ARHitTestResult[] HitTest (CGPoint point, ARHitTestResultType types); - } - - interface IARSCNViewDelegate {} - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Protocol, Model] - [BaseType (typeof (NSObject))] - interface ARSCNViewDelegate : SCNSceneRendererDelegate, ARSessionObserver { - - [Export ("renderer:nodeForAnchor:")] - [return: NullAllowed] - SCNNode GetNode (ISCNSceneRenderer renderer, ARAnchor anchor); - - [Export ("renderer:didAddNode:forAnchor:")] - void DidAddNode (ISCNSceneRenderer renderer, SCNNode node, ARAnchor anchor); - - [Export ("renderer:willUpdateNode:forAnchor:")] - void WillUpdateNode (ISCNSceneRenderer renderer, SCNNode node, ARAnchor anchor); - - [Export ("renderer:didUpdateNode:forAnchor:")] - void DidUpdateNode (ISCNSceneRenderer renderer, SCNNode node, ARAnchor anchor); - - [Export ("renderer:didRemoveNode:forAnchor:")] - void DidRemoveNode (ISCNSceneRenderer renderer, SCNNode node, ARAnchor anchor); - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof (SKView))] - interface ARSKView { - - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - IARSKViewDelegate Delegate { get; set; } - - [Export ("session", ArgumentSemantic.Strong)] - ARSession Session { get; set; } - - [Export ("anchorForNode:")] - [return: NullAllowed] - ARAnchor GetAnchor (SKNode node); - - [Export ("nodeForAnchor:")] - [return: NullAllowed] - SKNode GetNode (ARAnchor anchor); - - [Export ("hitTest:types:")] - ARHitTestResult[] HitTest (CGPoint point, ARHitTestResultType types); - } - - interface IARSKViewDelegate {} - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Protocol, Model] - [BaseType (typeof (NSObject))] - interface ARSKViewDelegate : SKViewDelegate, ARSessionObserver { - - [Export ("view:nodeForAnchor:")] - [return: NullAllowed] - SKNode GetNode (ARSKView view, ARAnchor anchor); - - [Export ("view:didAddNode:forAnchor:")] - void DidAddNode (ARSKView view, SKNode node, ARAnchor anchor); - - [Export ("view:willUpdateNode:forAnchor:")] - void WillUpdateNode (ARSKView view, SKNode node, ARAnchor anchor); - - [Export ("view:didUpdateNode:forAnchor:")] - void DidUpdateNode (ARSKView view, SKNode node, ARAnchor anchor); - - [Export ("view:didRemoveNode:forAnchor:")] - void DidRemoveNode (ARSKView view, SKNode node, ARAnchor anchor); - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof (NSObject))] - interface ARSession { - - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - IARSessionDelegate Delegate { get; set; } - - [NullAllowed, Export ("delegateQueue", ArgumentSemantic.Strong)] - DispatchQueue DelegateQueue { get; set; } - - [NullAllowed, Export ("currentFrame", ArgumentSemantic.Copy)] - ARFrame CurrentFrame { get; } - - [NullAllowed, Export ("configuration", ArgumentSemantic.Copy)] - ARConfiguration Configuration { get; } - - // 'runWithConfiguration:' selector marked as unavailable in Xcode 9 beta 5. Use 'Run (ARConfiguration configuration, ARSessionRunOptions options)' instead. - [Export ("runWithConfiguration:options:")] - void Run (ARConfiguration configuration, ARSessionRunOptions options); - - [Export ("pause")] - void Pause (); - - [Export ("addAnchor:")] - void AddAnchor (ARAnchor anchor); - - [Export ("removeAnchor:")] - void RemoveAnchor (ARAnchor anchor); - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Protocol] - interface ARSessionObserver { - - [Export ("session:didFailWithError:")] - void DidFail (ARSession session, NSError error); - - [Export ("session:cameraDidChangeTrackingState:")] - void CameraDidChangeTrackingState (ARSession session, ARCamera camera); - - [Export ("sessionWasInterrupted:")] - void WasInterrupted (ARSession session); - - [Export ("sessionInterruptionEnded:")] - void InterruptionEnded (ARSession session); - - [Export ("session:didOutputAudioSampleBuffer:")] - void DidOutputAudioSampleBuffer (ARSession session, CMSampleBuffer audioSampleBuffer); - } - - interface IARSessionDelegate {} - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Protocol, Model] - [BaseType (typeof (NSObject))] - interface ARSessionDelegate : ARSessionObserver { - - [Export ("session:didUpdateFrame:")] - void DidUpdateFrame (ARSession session, ARFrame frame); - - [Export ("session:didAddAnchors:")] - void DidAddAnchors (ARSession session, ARAnchor[] anchors); - - [Export ("session:didUpdateAnchors:")] - void DidUpdateAnchors (ARSession session, ARAnchor[] anchors); - - [Export ("session:didRemoveAnchors:")] - void DidRemoveAnchors (ARSession session, ARAnchor[] anchors); - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof (NSObject))] - [Abstract] - [DisableDefaultCtor] - interface ARConfiguration : NSCopying { - - [Static] - [Export ("isSupported")] - bool IsSupported { get; } - - [Export ("worldAlignment", ArgumentSemantic.Assign)] - ARWorldAlignment WorldAlignment { get; set; } - - [Export ("lightEstimationEnabled")] - bool LightEstimationEnabled { [Bind ("isLightEstimationEnabled")] get; set; } - - [Export ("providesAudioData")] - bool ProvidesAudioData { get; set; } - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof (ARConfiguration))] - interface ARWorldTrackingConfiguration { - - [Export ("planeDetection", ArgumentSemantic.Assign)] - ARPlaneDetection PlaneDetection { get; set; } - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof(ARConfiguration))] - interface AROrientationTrackingConfiguration {} - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Static] - interface ARSCNDebugOptions { - - [Field ("ARSCNDebugOptionShowWorldOrigin")] - SCNDebugOptions ShowWorldOrigin { get; } - - [Field ("ARSCNDebugOptionShowFeaturePoints")] - SCNDebugOptions ShowFeaturePoints { get; } - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Protocol] - interface ARTrackable { - [Abstract] - [Export ("isTracked")] - bool IsTracked { get; } - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof(ARConfiguration))] - interface ARFaceTrackingConfiguration {} - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [StrongDictionary ("ARBlendShapeLocationKeys")] - interface ARBlendShapeLocationOptions { - - float BrowDownLeft { get; set; } - - float BrowDownRight { get; set; } - - float BrowInnerUp { get; set; } - - float BrowOuterUpLeft { get; set; } - - float BrowOuterUpRight { get; set; } - - float CheekPuff { get; set; } - - float CheekSquintLeft { get; set; } - - float CheekSquintRight { get; set; } - - float EyeBlinkLeft { get; set; } - - float EyeBlinkRight { get; set; } - - float EyeLookDownLeft { get; set; } - - float EyeLookDownRight { get; set; } - - float EyeLookInLeft { get; set; } - - float EyeLookInRight { get; set; } - - float EyeLookOutLeft { get; set; } - - float EyeLookOutRight { get; set; } - - float EyeLookUpLeft { get; set; } - - float EyeLookUpRight { get; set; } - - float EyeSquintLeft { get; set; } - - float EyeSquintRight { get; set; } - - float EyeWideLeft { get; set; } - - float EyeWideRight { get; set; } - - float JawForward { get; set; } - - float JawLeft { get; set; } - - float JawOpen { get; set; } - - float JawRight { get; set; } - - float MouthClose { get; set; } - - float MouthDimpleLeft { get; set; } - - float MouthDimpleRight { get; set; } - - float MouthFrownLeft { get; set; } - - float MouthFrownRight { get; set; } - - float MouthFunnel { get; set; } - - float MouthLeft { get; set; } - - float MouthLowerDownLeft { get; set; } - - float MouthLowerDownRight { get; set; } - - float MouthPressLeft { get; set; } - - float MouthPressRight { get; set; } - - float MouthPucker { get; set; } - - float MouthRight { get; set; } - - float MouthRollLower { get; set; } - - float MouthRollUpper { get; set; } - - float MouthShrugLower { get; set; } - - float MouthShrugUpper { get; set; } - - float MouthSmileLeft { get; set; } - - float MouthSmileRight { get; set; } - - float MouthStretchLeft { get; set; } - - float MouthStretchRight { get; set; } - - float MouthUpperUpLeft { get; set; } - - float MouthUpperUpRight { get; set; } - - float NoseSneerLeft { get; set; } - - float NoseSneerRight { get; set; } - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [Static] - [Internal] - interface ARBlendShapeLocationKeys { - - [Field ("ARBlendShapeLocationBrowDownLeft")] - NSString BrowDownLeftKey { get; } - - [Field ("ARBlendShapeLocationBrowDownRight")] - NSString BrowDownRightKey { get; } - - [Field ("ARBlendShapeLocationBrowInnerUp")] - NSString BrowInnerUpKey { get; } - - [Field ("ARBlendShapeLocationBrowOuterUpLeft")] - NSString BrowOuterUpLeftKey { get; } - - [Field ("ARBlendShapeLocationBrowOuterUpRight")] - NSString BrowOuterUpRightKey { get; } - - [Field ("ARBlendShapeLocationCheekPuff")] - NSString CheekPuffKey { get; } - - [Field ("ARBlendShapeLocationCheekSquintLeft")] - NSString CheekSquintLeftKey { get; } - - [Field ("ARBlendShapeLocationCheekSquintRight")] - NSString CheekSquintRightKey { get; } - - [Field ("ARBlendShapeLocationEyeBlinkLeft")] - NSString EyeBlinkLeftKey { get; } - - [Field ("ARBlendShapeLocationEyeBlinkRight")] - NSString EyeBlinkRightKey { get; } - - [Field ("ARBlendShapeLocationEyeLookDownLeft")] - NSString EyeLookDownLeftKey { get; } - - [Field ("ARBlendShapeLocationEyeLookDownRight")] - NSString EyeLookDownRightKey { get; } - - [Field ("ARBlendShapeLocationEyeLookInLeft")] - NSString EyeLookInLeftKey { get; } - - [Field ("ARBlendShapeLocationEyeLookInRight")] - NSString EyeLookInRightKey { get; } - - [Field ("ARBlendShapeLocationEyeLookOutLeft")] - NSString EyeLookOutLeftKey { get; } - - [Field ("ARBlendShapeLocationEyeLookOutRight")] - NSString EyeLookOutRightKey { get; } - - [Field ("ARBlendShapeLocationEyeLookUpLeft")] - NSString EyeLookUpLeftKey { get; } - - [Field ("ARBlendShapeLocationEyeLookUpRight")] - NSString EyeLookUpRightKey { get; } - - [Field ("ARBlendShapeLocationEyeSquintLeft")] - NSString EyeSquintLeftKey { get; } - - [Field ("ARBlendShapeLocationEyeSquintRight")] - NSString EyeSquintRightKey { get; } - - [Field ("ARBlendShapeLocationEyeWideLeft")] - NSString EyeWideLeftKey { get; } - - [Field ("ARBlendShapeLocationEyeWideRight")] - NSString EyeWideRightKey { get; } - - [Field ("ARBlendShapeLocationJawForward")] - NSString JawForwardKey { get; } - - [Field ("ARBlendShapeLocationJawLeft")] - NSString JawLeftKey { get; } - - [Field ("ARBlendShapeLocationJawOpen")] - NSString JawOpenKey { get; } - - [Field ("ARBlendShapeLocationJawRight")] - NSString JawRightKey { get; } - - [Field ("ARBlendShapeLocationMouthClose")] - NSString MouthCloseKey { get; } - - [Field ("ARBlendShapeLocationMouthDimpleLeft")] - NSString MouthDimpleLeftKey { get; } - - [Field ("ARBlendShapeLocationMouthDimpleRight")] - NSString MouthDimpleRightKey { get; } - - [Field ("ARBlendShapeLocationMouthFrownLeft")] - NSString MouthFrownLeftKey { get; } - - [Field ("ARBlendShapeLocationMouthFrownRight")] - NSString MouthFrownRightKey { get; } - - [Field ("ARBlendShapeLocationMouthFunnel")] - NSString MouthFunnelKey { get; } - - [Field ("ARBlendShapeLocationMouthLeft")] - NSString MouthLeftKey { get; } - - [Field ("ARBlendShapeLocationMouthLowerDownLeft")] - NSString MouthLowerDownLeftKey { get; } - - [Field ("ARBlendShapeLocationMouthLowerDownRight")] - NSString MouthLowerDownRightKey { get; } - - [Field ("ARBlendShapeLocationMouthPressLeft")] - NSString MouthPressLeftKey { get; } - - [Field ("ARBlendShapeLocationMouthPressRight")] - NSString MouthPressRightKey { get; } - - [Field ("ARBlendShapeLocationMouthPucker")] - NSString MouthPuckerKey { get; } - - [Field ("ARBlendShapeLocationMouthRight")] - NSString MouthRightKey { get; } - - [Field ("ARBlendShapeLocationMouthRollLower")] - NSString MouthRollLowerKey { get; } - - [Field ("ARBlendShapeLocationMouthRollUpper")] - NSString MouthRollUpperKey { get; } - - [Field ("ARBlendShapeLocationMouthShrugLower")] - NSString MouthShrugLowerKey { get; } - - [Field ("ARBlendShapeLocationMouthShrugUpper")] - NSString MouthShrugUpperKey { get; } - - [Field ("ARBlendShapeLocationMouthSmileLeft")] - NSString MouthSmileLeftKey { get; } - - [Field ("ARBlendShapeLocationMouthSmileRight")] - NSString MouthSmileRightKey { get; } - - [Field ("ARBlendShapeLocationMouthStretchLeft")] - NSString MouthStretchLeftKey { get; } - - [Field ("ARBlendShapeLocationMouthStretchRight")] - NSString MouthStretchRightKey { get; } - - [Field ("ARBlendShapeLocationMouthUpperUpLeft")] - NSString MouthUpperUpLeftKey { get; } - - [Field ("ARBlendShapeLocationMouthUpperUpRight")] - NSString MouthUpperUpRightKey { get; } - - [Field ("ARBlendShapeLocationNoseSneerLeft")] - NSString NoseSneerLeftKey { get; } - - [Field ("ARBlendShapeLocationNoseSneerRight")] - NSString NoseSneerRightKey { get; } - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof(ARAnchor))] - interface ARFaceAnchor : ARTrackable { - [Export ("geometry")] - ARFaceGeometry Geometry { get; } - - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("blendShapes")] - NSDictionary WeakBlendShapes { get; } - - [Wrap ("WeakBlendShapes")] - ARBlendShapeLocationOptions BlendShapes { get; } - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface ARFaceGeometry : NSCopying { - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("initWithBlendShapes:")] - IntPtr Constructor (NSDictionary blendShapes); - - [Wrap ("this ((NSDictionary)blendShapes?.Dictionary)")] - IntPtr Constructor (ARBlendShapeLocationOptions blendShapes); - - [Export ("vertexCount")] - nuint VertexCount { get; } - - [Export ("vertices")] - Vector3 Vertices { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } - - [Export ("textureCoordinateCount")] - nuint TextureCoordinateCount { get; } - - [Export ("textureCoordinates")] - Vector2 TextureCoordinates { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } - - [Export ("triangleCount")] - nuint TriangleCount { get; } - - [Export ("triangleIndices")] - short TriangleIndices { get; } - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof(SCNGeometry))] - [DisableDefaultCtor] - interface ARSCNFaceGeometry { - [Static] - [Export ("faceGeometryWithDevice:")] - [return: NullAllowed] - ARSCNFaceGeometry CreateFaceGeometry (IMTLDevice device); - - [Static] - [Export ("faceGeometryWithDevice:fillMesh:")] - [return: NullAllowed] - ARSCNFaceGeometry CreateFaceGeometry (IMTLDevice device, bool fillMesh); - - [Export ("updateFromFaceGeometry:")] - void Update (ARFaceGeometry faceGeometry); - } - - [iOS (11,0)] - [NoWatch, NoTV, NoMac] - [BaseType (typeof(ARLightEstimate))] - [DisableDefaultCtor] - interface ARDirectionalLightEstimate { - [Export ("sphericalHarmonicsCoefficients", ArgumentSemantic.Copy)] - NSData SphericalHarmonicsCoefficients { get; } - - [Export ("primaryLightDirection")] - Vector3 PrimaryLightDirection { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } - - [Export ("primaryLightIntensity")] - nfloat PrimaryLightIntensity { get; } - } -} - -#endif // XAMCORE_2_0 \ No newline at end of file diff --git a/src/assetslibrary.cs b/src/assetslibrary.cs index b045ea0edd9..8c32f75e86e 100644 --- a/src/assetslibrary.cs +++ b/src/assetslibrary.cs @@ -18,7 +18,7 @@ namespace XamCore.AssetsLibrary { - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] interface ALAssetLibraryChangedEventArgs { [Export ("ALAssetLibraryUpdatedAssetsKey")] NSSet UpdatedAssets { get; } @@ -33,7 +33,7 @@ interface ALAssetLibraryChangedEventArgs { NSSet DeletedAssetGroupsKey { get; } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] [BaseType (typeof (NSObject))] interface ALAssetsLibrary { [Export ("assetForURL:resultBlock:failureBlock:")] @@ -134,17 +134,17 @@ interface ALAssetsLibrary { } #if !XAMCORE_2_0 - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] delegate void ALAssetsLibraryAssetForURLResultDelegate (ALAsset asset); - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] delegate void ALAssetsLibraryAccessFailureDelegate (NSError error); - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] delegate void ALAssetsLibraryWriteCompletionDelegate (NSUrl assetURL, NSError error); #endif - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] delegate void ALAssetsLibraryGroupsEnumerationResultsDelegate (ALAssetsGroup group, ref bool stop); - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] [BaseType (typeof (NSObject))] interface ALAsset { [Export ("valueForProperty:")] @@ -243,7 +243,7 @@ interface ALAsset { } [BaseType (typeof (NSObject))] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] interface ALAssetRepresentation { [Export ("UTI")] string Uti { get; } @@ -287,7 +287,7 @@ interface ALAssetRepresentation { CGSize Dimensions { get; } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] [BaseType (typeof (NSObject))] interface ALAssetsFilter { [Static, Export ("allPhotos")] @@ -300,20 +300,20 @@ interface ALAssetsFilter { ALAssetsFilter AllAssets { get; } } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] delegate void ALAssetsEnumerator (ALAsset result, nint index, ref bool stop); #if !XAMCORE_2_0 [Since (5,0)] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] delegate void ALAssetsLibraryGroupResult (ALAssetsGroup group); [Since (5,0)] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] delegate void ALAssetsLibraryAccessFailure (NSError error); #endif - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the 'Photos' API instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use Photos API instead")] [BaseType (typeof (NSObject))] interface ALAssetsGroup { [Export ("valueForProperty:"), Internal] diff --git a/src/audiounit.cs b/src/audiounit.cs index f20150ad529..66025d3d310 100644 --- a/src/audiounit.cs +++ b/src/audiounit.cs @@ -8,7 +8,6 @@ using System; using System.ComponentModel; -using System.Runtime.InteropServices; using XamCore.AudioUnit; using XamCore.CoreFoundation; @@ -40,8 +39,6 @@ internal delegate AudioUnitStatus AURenderPullInputBlock (ref AudioUnitRenderAct uint frameCount, nint inputBusNumber, AudioBuffers inputData); delegate void AUScheduleParameterBlock (AUEventSampleTime eventSampleTime, uint rampDurationSampleFrames, ulong parameterAddress, float value); - [iOS (11, 0), Mac (10,13), TV (11,0), NoWatch] - delegate int AUMidiOutputEventBlock (long eventSampleTime, byte cable, nint length, IntPtr midiBytes); delegate void AUImplementorValueObserver (AUParameter param, float value); delegate float AUImplementorValueProvider (AUParameter param); @@ -110,10 +107,6 @@ interface AUAudioUnit [NullAllowed, Export ("manufacturerName")] string ManufacturerName { get; } - [iOS (11, 0), Mac (10, 13), TV (11, 0), NoWatch] - [NullAllowed, Export ("audioUnitShortName")] - string ShortName { get; } - [Export ("componentVersion")] uint ComponentVersion { get; } @@ -147,18 +140,6 @@ interface AUAudioUnit // [NullAllowed, Export ("musicalContextBlock", ArgumentSemantic.Copy)] // AUHostMusicalContextBlock MusicalContextBlock { get; set; } - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("MIDIOutputNames", ArgumentSemantic.Copy)] - string[] MidiOutputNames { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("providesUserInterface")] - bool ProvidesUserInterface { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("MIDIOutputEventBlock", ArgumentSemantic.Copy)] - AUMidiOutputEventBlock MidiOutputEventBlock { get; set; } - [NullAllowed, Export ("transportStateBlock", ArgumentSemantic.Copy)] AUHostTransportStateBlock TransportStateBlock { get; set; } @@ -221,7 +202,7 @@ interface AUAudioUnit [NullAllowed, Export ("contextName")] string ContextName { get; set; } - [iOS (10,0), Mac (10,12, onlyOn64 : true), TV (10,0), Watch (4, 0)] + [iOS (10,0), Mac (10,12, onlyOn64 : true), TV (10,0)] [Export ("supportsMPE")] bool SupportsMpe { get; } @@ -248,11 +229,6 @@ interface AUAudioUnit [Mac (10,11)][iOS (7,0)] [Notification, Field ("kAudioComponentInstanceInvalidationNotification")] NSString AudioComponentInstanceInvalidationNotification { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("MIDIOutputBufferSizeHint")] - nint MidiOutputBufferSizeHint { get; set; } - } // kept separate from AUAudioUnit, quote: @@ -262,14 +238,6 @@ interface AUAudioUnit [BaseType (typeof (AUAudioUnit))] interface AUAudioUnit_AUAudioInputOutputUnit { - [Mac (10,12), NoTV, NoiOS, NoWatch] - [Export ("deviceID")] - uint GetDeviceId (); - - [Mac (10,12), NoTV, NoiOS, NoWatch] - [Export ("setDeviceID:error:")] - bool SetDeviceId (uint deviceID, out NSError outError); - [Export ("canPerformInput")] bool GetCanPerformInput (); @@ -305,20 +273,7 @@ interface AUAudioUnit_AUAudioInputOutputUnit { [NullAllowed, Export ("setOutputProvider:")] void SetOutputProvider (AURenderPullInputBlock provider); - - // the following are properties but we cannot have properties in Categories. - [Mac (10, 13), NoWatch, NoiOS, NoTV] - [Export ("deviceInputLatency")] - double GetDeviceInputLatency (); - - [Mac (10, 13), NoWatch, NoiOS, NoTV] - [Export ("deviceOutputLatency")] - double GetDeviceOutputLatency (); - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("running")] - bool IsRunning (); - } +} [iOS (9,0), Mac(10,11, onlyOn64 : true)] [BaseType (typeof(NSObject))] @@ -360,10 +315,6 @@ interface AUAudioUnitBus [Export ("maximumChannelCount")] uint MaximumChannelCount { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("shouldAllocateBuffer")] - bool ShouldAllocateBuffer { get; set; } } [iOS (9,0), Mac(10,11, onlyOn64 : true)] @@ -456,7 +407,7 @@ interface AUParameter : NSSecureCoding #if XAMCORE_4_0 // undo breaking change introduced in xamarin/maccore @ 1f207bd3f3df363cb5a74e59b93acd8eb6e1fec2 [Internal][Sealed] #else - [Obsolete ("Use the 'AUParameterObserverToken' overload.")] + [Obsolete ("Use the AUParameterObserverToken overload")] #endif [Export ("setValue:originator:")] void SetValue (float value, IntPtr originator); @@ -465,7 +416,7 @@ interface AUParameter : NSSecureCoding #if XAMCORE_4_0 // undo breaking change introduced in xamarin/maccore @ 1f207bd3f3df363cb5a74e59b93acd8eb6e1fec2 [Internal][Sealed] #else - [Obsolete ("Use the 'AUParameterObserverToken' overload.")] + [Obsolete ("Use the AUParameterObserverToken overload")] #endif [Export ("setValue:originator:atHostTime:")] void SetValue (float value, IntPtr originator, ulong hostTime); @@ -486,7 +437,8 @@ interface AUParameter : NSSecureCoding [Export ("setValue:originator:atHostTime:eventType:")] void SetValue (float value, IntPtr originator, ulong hostTime, AUParameterAutomationEventType eventType); - [iOS (10,0), Mac (10,12, onlyOn64 : true), Watch (4, 0), TV (10, 0)] + [iOS (10,0), Mac (10,12, onlyOn64 : true)] + [TV (10,0)] [Wrap ("SetValue (value, originator.ObserverToken, hostTime, eventType)")] void SetValue (float value, AUParameterObserverToken originator, ulong hostTime, AUParameterAutomationEventType eventType); } @@ -514,7 +466,7 @@ interface AUParameterNode #if XAMCORE_4_0 // undo breaking change introduced in xamarin/maccore @ 1f207bd3f3df363cb5a74e59b93acd8eb6e1fec2 [Internal][Sealed] #else - [Obsolete ("Use the 'CreateTokenByAddingParameterObserver' instead.")] + [Obsolete ("Use the CreateTokenByAddingParameterObserver instead")] #endif [Export ("tokenByAddingParameterObserver:")] /* void * */ IntPtr TokenByAddingParameterObserver (AUParameterObserver observer); @@ -523,7 +475,7 @@ interface AUParameterNode #if XAMCORE_4_0 // undo breaking change introduced in xamarin/maccore @ 1f207bd3f3df363cb5a74e59b93acd8eb6e1fec2 [Internal][Sealed] #else - [Obsolete ("Use the 'CreateTokenByAddingParameterRecordingObserver' instead.")] + [Obsolete ("Use the CreateTokenByAddingParameterRecordingObserver instead")] #endif [Export ("tokenByAddingParameterRecordingObserver:")] /* void * */ IntPtr TokenByAddingParameterRecordingObserver (AUParameterRecordingObserver observer); @@ -541,7 +493,7 @@ interface AUParameterNode #if XAMCORE_4_0 // undo breaking change introduced in xamarin/maccore @ 1f207bd3f3df363cb5a74e59b93acd8eb6e1fec2 [Internal][Sealed] #else - [Obsolete ("Use the 'AUParameterObserverToken' overload.")] + [Obsolete ("Use the AUParameterObserverToken overload")] #endif [Export ("removeParameterObserver:")] void RemoveParameterObserver (/* void * */ IntPtr token); diff --git a/src/avfoundation.cs b/src/avfoundation.cs index 83249423be7..04c9e7b5090 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -32,10 +32,8 @@ using System.ComponentModel; #if !WATCH -using XamCore.AudioToolbox; using XamCore.AudioUnit; using XamCore.AVKit; -using XamCore.Foundation; using XamCore.CoreAnimation; using XamCore.CoreImage; using XamCore.CoreMedia; @@ -47,8 +45,6 @@ using XamCore.Foundation; using XamCore.CoreFoundation; using XamCore.CoreGraphics; -using XamCore.CoreVideo; -using XamCore.ImageIO; using System; using OpenTK; @@ -178,10 +174,6 @@ enum AVMediaTypes { [Since (6,0)][Mac (10,8)] [Field ("AVMediaTypeMetadata")] Metadata = 9, - - [iOS (11, 0), Mac (10, 13)] - [Field ("AVMediaTypeDepthData")] - DepthData = 10, } #if !XAMCORE_4_0 @@ -262,112 +254,6 @@ interface AVMutableDateRangeMetadataGroup AVMetadataItem[] Items { get; set; } } - [TV (11,0), NoWatch, iOS (11,0), Mac (10, 13)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface AVDepthData { - [Static] - [Export ("depthDataFromDictionaryRepresentation:error:")] - [return: NullAllowed] - AVDepthData Create (NSDictionary imageSourceAuxDataInfoDictionary, [NullAllowed] out NSError outError); - - [Export ("depthDataByConvertingToDepthDataType:")] - AVDepthData ConvertToDepthDataType (CVPixelFormatType depthDataType); - - [Export ("depthDataByApplyingExifOrientation:")] - AVDepthData ApplyExifOrientation (CGImagePropertyOrientation exifOrientation); - - [Export ("depthDataByReplacingDepthDataMapWithPixelBuffer:error:")] - [return: NullAllowed] - AVDepthData ReplaceDepthDataMap (CVPixelBuffer pixelBuffer, [NullAllowed] out NSError outError); - - [Protected] - [Export ("availableDepthDataTypes")] - NSNumber[] WeakAvailableDepthDataTypes { get; } - - [Export ("dictionaryRepresentationForAuxiliaryDataType:")] - [return: NullAllowed] - NSDictionary GetDictionaryRepresentation ([NullAllowed] out string outAuxDataType); - - [Export ("depthDataType")] - CVPixelFormatType DepthDataType { get; } - - [Export ("depthDataMap")] - CVPixelBuffer DepthDataMap { get; } - - [Export ("depthDataFiltered")] - bool IsDepthDataFiltered { [Bind ("isDepthDataFiltered")] get; } - - [Export ("depthDataAccuracy")] - AVDepthDataAccuracy DepthDataAccuracy { get; } - - [NullAllowed, Export ("cameraCalibrationData")] - AVCameraCalibrationData CameraCalibrationData { get; } - } - - // values are manually given since not some are platform specific - [NoWatch] - enum AVMediaCharacteristics { - [Field ("AVMediaCharacteristicVisual")] - Visual = 0, - - [Field ("AVMediaCharacteristicAudible")] - Audible = 1, - - [Field ("AVMediaCharacteristicLegible")] - Legible = 2, - - [Field ("AVMediaCharacteristicFrameBased")] - FrameBased = 3, - - [iOS (10, 0), TV (10,0), Mac (10,12)] - [Field ("AVMediaCharacteristicUsesWideGamutColorSpace")] - UsesWideGamutColorSpace = 4, - - [Mac (10, 8), iOS (5,0)] - [Field ("AVMediaCharacteristicIsMainProgramContent")] - IsMainProgramContent = 5, - - [MountainLion][Since (5,0)] - [Field ("AVMediaCharacteristicIsAuxiliaryContent")] - IsAuxiliaryContent = 6, - - [MountainLion][Since (5,0)] - [Field ("AVMediaCharacteristicContainsOnlyForcedSubtitles")] - ContainsOnlyForcedSubtitles = 7, - - [MountainLion][Since (5,0)] - [Field ("AVMediaCharacteristicTranscribesSpokenDialogForAccessibility")] - TranscribesSpokenDialogForAccessibility = 8, - - [MountainLion][Since (5,0)] - [Field ("AVMediaCharacteristicDescribesMusicAndSoundForAccessibility")] - DescribesMusicAndSoundForAccessibility = 9, - - [MountainLion][Since (5,0)] - [Field ("AVMediaCharacteristicDescribesVideoForAccessibility")] - DescribesVideoForAccessibility = 10, - - [NoMac][Since (6,0)] - [Field ("AVMediaCharacteristicEasyToRead")] - EasyToRead = 11, - - [iOS (9,0), Mac (10,11)] - [Field ("AVMediaCharacteristicLanguageTranslation")] - LanguageTranslation = 12, - - [iOS (9,0), Mac (10,11)] - [Field ("AVMediaCharacteristicDubbedTranslation")] - DubbedTranslation = 13, - - [iOS (9,0), Mac (10,11)] - [Field ("AVMediaCharacteristicVoiceOverTranslation")] - VoiceOverTranslation = 14, - - } - -#if !XAMCORE_4_0 - [Obsolete ("Use AVMediaCharacteristics enum values")] [NoWatch] [Since (4,0)] [BaseType (typeof (NSObject))][Static] @@ -429,115 +315,10 @@ interface AVMediaCharacteristic { [Field ("AVMediaCharacteristicVoiceOverTranslation")] NSString VoiceOverTranslation { get; } } -#endif - - [NoWatch] - enum AVMetadataFormat { - [iOS (8,0)][Mac (10,10)] - [Field ("AVMetadataFormatHLSMetadata")] - FormatHlsMetadata = 0, - - [Field ("AVMetadataFormatiTunesMetadata")] - FormatiTunesMetadata = 1, - - [Field ("AVMetadataFormatID3Metadata")] - FormatID3Metadata = 2, - - [Since (7,0), Mavericks] - [Field ("AVMetadataFormatISOUserData")] - FormatISOUserData = 3, - - [Field ("AVMetadataFormatQuickTimeUserData")] - FormatQuickTimeUserData = 4, - - [iOS (11,0), Mac (10,13), TV (11,0)] - [Field ("AVMetadataFormatUnknown")] - Unknown = 5, - } - - [NoWatch] - enum AVFileTypes { - [Field ("AVFileTypeQuickTimeMovie")] - QuickTimeMovie = 0, - - [Field ("AVFileTypeMPEG4")] - Mpeg4 = 1, - - [Field ("AVFileTypeAppleM4V")] - AppleM4V = 2, - - [Mac (10,11)] - [Field ("AVFileType3GPP")] - ThreeGpp = 3, - - [Field ("AVFileTypeAppleM4A")] - AppleM4a = 4, - - [Field ("AVFileTypeCoreAudioFormat")] - CoreAudioFormat = 5, - - [Field ("AVFileTypeWAVE")] - Wave = 6, - - [Field ("AVFileTypeAIFF")] - Aiff = 7, - - [Field ("AVFileTypeAIFC")] - Aifc = 8, - - [Field ("AVFileTypeAMR")] - Amr = 9, - - [iOS (7,0), Mac (10,11)] - [Field ("AVFileType3GPP2")] - ThreeGpp2 = 10, - - [Since (7,0), Mavericks] - [Field ("AVFileTypeMPEGLayer3")] - MpegLayer3 = 11, - - [Since (7,0), Mavericks] - [Field ("AVFileTypeSunAU")] - SunAU = 12, - - [Since (7,0), Mavericks] - [Field ("AVFileTypeAC3")] - AC3 = 13, - - [iOS (9,0), Mac (10,11)] - [Field ("AVFileTypeEnhancedAC3")] - EnhancedAC3 = 14, - - [iOS (11, 0), Mac (10, 13)] - [Field ("AVFileTypeJPEG")] - Jpeg = 15, - - [iOS (11, 0), Mac (10, 13)] - [Field ("AVFileTypeDNG")] - Dng = 16, - - [iOS (11, 0), Mac (10, 13)] - [Field ("AVFileTypeHEIC")] - Heic = 17, - - [iOS (11, 0), Mac (10, 13)] - [Field ("AVFileTypeAVCI")] - Avci = 18, - - [iOS (11, 0), Mac (10, 13)] - [Field ("AVFileTypeHEIF")] - Heif = 19, - - [iOS (11, 0), Mac (10, 13)] - [Field ("AVFileTypeTIFF")] - Tiff = 20, - } -#if !XAMCORE_4_0 [NoWatch] [Since (4,0)] [BaseType (typeof (NSObject))][Static] - [Obsolete ("Use AVFileTypes enum values")] interface AVFileType { [Field ("AVFileTypeQuickTimeMovie")] NSString QuickTimeMovie { get; } @@ -589,7 +370,6 @@ interface AVFileType { [Field ("AVFileTypeEnhancedAC3")] NSString EnhancedAC3 { get; } } -#endif [NoWatch] [iOS (9,0), Mac (10,11)] @@ -669,20 +449,16 @@ interface AVVideo { [Field ("AVVideoH264EntropyModeKey")] NSString H264EntropyModeKey { get; } - [Availability (Introduced = Platform.iOS_4_0 | Platform.Mac_10_7 | Platform.TV_9_0, Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13 | Platform.TV_11_0, Message = "Use 'AVVideoCodecType' enum instead.")] [Field ("AVVideoCodecH264")] NSString CodecH264 { get; } - [Availability (Introduced = Platform.iOS_4_0 | Platform.Mac_10_7 | Platform.TV_9_0, Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13 | Platform.TV_11_0, Message = "Use 'AVVideoCodecType' enum instead.")] [Field ("AVVideoCodecJPEG")] NSString CodecJPEG { get; } - [Availability (Introduced = Platform.iOS_4_0 | Platform.Mac_10_7 | Platform.TV_9_0, Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13 | Platform.TV_11_0, Message = "Use 'AVVideoCodecType' enum instead.")] [NoiOS, NoTV, Mac (10,7)] [Field ("AVVideoCodecAppleProRes4444")] NSString AppleProRes4444 { get; } - [Availability (Introduced = Platform.Mac_10_7, Deprecated = Platform.Mac_10_13, Message = "Use 'AVVideoCodecType' enum instead.")] [NoiOS, NoTV, Mac (10,7)] [Field ("AVVideoCodecAppleProRes422")] NSString AppleProRes422 { get; } @@ -885,12 +661,7 @@ interface AVAudioConnectionPoint [Export ("bus")] nuint Bus { get; } } - -#if XAMCORE_2_0 - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - delegate AVAudioEngineManualRenderingStatus AVAudioEngineManualRenderingBlock (/* AVAudioFrameCount = uint */ uint numberOfFrames, AudioBuffers outBuffer, [NullAllowed] /* OSStatus */ ref int outError); -#endif - + [Watch (3,0)] [iOS (8,0)][Mac (10,10)] [BaseType (typeof (NSObject))] @@ -904,8 +675,7 @@ interface AVAudioEngine { [Export ("outputNode")] AVAudioOutputNode OutputNode { get; } - [TV (11,0)] - [Watch (4,0)] + [NoTV, NoWatch] [Export ("inputNode"), NullAllowed] AVAudioInputNode InputNode { get; } @@ -971,44 +741,6 @@ interface AVAudioEngine { [Notification] [Field ("AVAudioEngineConfigurationChangeNotification")] NSString ConfigurationChangeNotification { get; } - - [TV (11, 0), NoWatch, Mac (10, 13), iOS (11, 0)] - [Export ("autoShutdownEnabled")] - bool AutoShutdownEnabled { [Bind ("isAutoShutdownEnabled")] get; set; } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("enableManualRenderingMode:format:maximumFrameCount:error:")] - bool EnableManualRenderingMode (AVAudioEngineManualRenderingMode mode, AVAudioFormat pcmFormat, uint maximumFrameCount, out NSError outError); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("renderOffline:toBuffer:error:")] - AVAudioEngineManualRenderingStatus RenderOffline (uint numberOfFrames, AVAudioPcmBuffer buffer, [NullAllowed] out NSError outError); - -#if XAMCORE_2_0 - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("manualRenderingBlock")] - AVAudioEngineManualRenderingBlock ManualRenderingBlock { get; } -#endif - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("isInManualRenderingMode")] - bool InManualRenderingMode { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("manualRenderingMode")] - AVAudioEngineManualRenderingMode ManualRenderingMode { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("manualRenderingFormat")] - AVAudioFormat ManualRenderingFormat { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("manualRenderingMaximumFrameCount")] - uint ManualRenderingMaximumFrameCount { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("manualRenderingSampleTime")] - long ManualRenderingSampleTime { get; } } [NoWatch] @@ -1311,20 +1043,6 @@ interface AVAudioNode { [Export ("removeTapOnBus:")] void RemoveTapOnBus (nuint bus); - -#if XAMCORE_2_0 - [NoWatch, TV (11, 0), Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [Export ("AUAudioUnit")] - AUAudioUnit AUAudioUnit { get; } -#endif - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("latency")] - double Latency { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("outputPresentationLatency")] - double OutputPresentationLatency { get; } } [Watch (3,0)] @@ -1360,23 +1078,14 @@ interface AVAudioOutputNode { } -#if XAMCORE_2_0 - [Watch (4,0), TV (11,0), Mac (10,10), iOS (8,0)] - delegate AudioBuffers AVAudioIONodeInputBlock (uint frameCount); -#endif - - [Watch (4,0)] - [iOS (8,0)][Mac (10,10)][TV (11,0)] - [BaseType (typeof (AVAudioIONode))] + [NoTV] + [NoWatch] + [iOS (8,0)][Mac (10,10)] + [BaseType (typeof (AVAudioIONode))] [DisableDefaultCtor] // returned Handle is nil // note: sample source (header) suggest it comes from AVAudioEngine properties interface AVAudioInputNode : AVAudioMixing { -#if XAMCORE_2_0 - [Mac (10,13), iOS (11,0)] - [Export ("setManualRenderingInputPCMFormat:inputBlock:")] - bool SetManualRenderingInputPcmFormat (AVAudioFormat format, AVAudioIONodeInputBlock block); -#endif } [Watch (3,0)] @@ -1514,8 +1223,7 @@ interface AVAudioPlayer { [Since (7,0), Mac (10,9), Export ("initWithContentsOfURL:fileTypeHint:error:")] IntPtr Constructor (NSUrl url, [NullAllowed] string fileTypeHint, out NSError outError); - [iOS (10, 0), TV (10,0), Mac (10,12)] - [Watch (4,0)] + [NoWatch, iOS (10, 0), TV (10,0), Mac (10,12)] [Export ("format")] AVAudioFormat Format { get; } } @@ -1569,34 +1277,14 @@ interface AVAudioPlayerNode : AVAudioMixing { [Export ("scheduleBuffer:atTime:options:completionHandler:")] void ScheduleBuffer (AVAudioPcmBuffer buffer, [NullAllowed] AVAudioTime when, AVAudioPlayerNodeBufferOptions options, [NullAllowed] Action completionHandler); - [Async] - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("scheduleBuffer:completionCallbackType:completionHandler:")] - void ScheduleBuffer (AVAudioPcmBuffer buffer, AVAudioPlayerNodeCompletionCallbackType callbackType, [NullAllowed] Action completionHandler); - - [Async] - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("scheduleBuffer:atTime:options:completionCallbackType:completionHandler:")] - void ScheduleBuffer (AVAudioPcmBuffer buffer, [NullAllowed] AVAudioTime when, AVAudioPlayerNodeBufferOptions options, AVAudioPlayerNodeCompletionCallbackType callbackType, [NullAllowed] Action completionHandler); - [Async] [Export ("scheduleFile:atTime:completionHandler:")] void ScheduleFile (AVAudioFile file, [NullAllowed] AVAudioTime when, [NullAllowed] Action completionHandler); - [Async] - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("scheduleFile:atTime:completionCallbackType:completionHandler:")] - void ScheduleFile (AVAudioFile file, [NullAllowed] AVAudioTime when, AVAudioPlayerNodeCompletionCallbackType callbackType, [NullAllowed] Action completionHandler); - [Async] [Export ("scheduleSegment:startingFrame:frameCount:atTime:completionHandler:")] void ScheduleSegment (AVAudioFile file, long startFrame, uint /* AVAudioFrameCount = uint32_t */ numberFrames, [NullAllowed] AVAudioTime when, [NullAllowed] Action completionHandler); - [Async] - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("scheduleSegment:startingFrame:frameCount:atTime:completionCallbackType:completionHandler:")] - void ScheduleSegment (AVAudioFile file, long startFrame, uint numberFrames, [NullAllowed] AVAudioTime when, AVAudioPlayerNodeCompletionCallbackType callbackType, [NullAllowed] Action completionHandler); - [Export ("stop")] void Stop (); @@ -1622,8 +1310,7 @@ interface AVAudioPlayerNode : AVAudioMixing { } [BaseType (typeof (NSObject))] - [NoTV] - [Watch (4,0)] + [NoTV, NoWatch] interface AVAudioRecorder { [Export ("initWithURL:settings:error:")][Internal] IntPtr InitWithUrl (NSUrl url, NSDictionary settings, out NSError error); @@ -1718,8 +1405,7 @@ interface AVAudioRecorder { [BaseType (typeof (NSObject))] [Model] [Protocol] - [NoTV] - [Watch (4,0)] + [NoTV, NoWatch] interface AVAudioRecorderDelegate { [Export ("audioRecorderDidFinishRecording:successfully:"), CheckDisposed] void FinishedRecording (AVAudioRecorder recorder, bool flag); @@ -1777,7 +1463,7 @@ interface AVAudioSession { [NoWatch] [Wrap ("WeakDelegate")] [Protocolize] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use 'AVAudioSession.Notification.Observe*' methods instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use AVAudioSession.Notification.Observe* methods instead")] [NoTV] AVAudioSessionDelegate Delegate { get; set; } @@ -1786,14 +1472,14 @@ interface AVAudioSession { [NoTV] [Export ("setActive:withFlags:error:")] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use 'SetActive (bool, AVAudioSessionSetActiveOptions, out NSError)' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use SetActive (bool, AVAudioSessionSetActiveOptions, out NSError) instead")] bool SetActive (bool beActive, AVAudioSessionFlags flags, out NSError outError); [Export ("setCategory:error:")] bool SetCategory (NSString theCategory, out NSError outError); [NoTV] - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_6_0, Message = "Use 'SetPreferredSampleRate' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_6_0, Message = "Use SetPreferredSampleRate instead")] [Export ("setPreferredHardwareSampleRate:error:")] bool SetPreferredHardwareSampleRate (double sampleRate, out NSError outError); @@ -1814,7 +1500,7 @@ interface AVAudioSession { [NoTV] [Export ("preferredHardwareSampleRate")] - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_6_0, Message = "Use 'PreferredSampleRate' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_6_0, Message = "Use PreferredSampleRate instead")] double PreferredHardwareSampleRate { get; } [NoWatch] @@ -1828,17 +1514,17 @@ interface AVAudioSession { [NoTV] [Export ("currentHardwareSampleRate")] - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_6_0, Message = "Use 'SampleRate' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_6_0, Message = "Use SampleRate instead")] double CurrentHardwareSampleRate { get; } [NoTV] [Export ("currentHardwareInputNumberOfChannels")] - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_6_0, Message = "Use 'InputNumberOfChannels' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_6_0, Message = "Use InputNumberOfChannels instead")] nint CurrentHardwareInputNumberOfChannels { get; } [NoTV] [Export ("currentHardwareOutputNumberOfChannels")] - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_6_0, Message = "Use 'OutputNumberOfChannels' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_6_0, Message = "Use OutputNumberOfChannels instead")] nint CurrentHardwareOutputNumberOfChannels { get; } [Field ("AVAudioSessionCategoryAmbient")] @@ -2098,8 +1784,7 @@ interface AVAudioSession { [PostGet ("OutputDataSource")] bool SetOutputDataSource ([NullAllowed] AVAudioSessionDataSourceDescription dataSource, out NSError outError); - [NoTV] - [Watch (4,0)] + [NoTV, NoWatch] [Since (7,0)] [Export ("requestRecordPermission:")] void RequestRecordPermission (AVPermissionGranted responseCallback); @@ -2198,14 +1883,6 @@ interface AVAudioSession { [NoWatch, NoTV, iOS(10,0)] [Export ("setAggregatedIOPreference:error:")] bool SetAggregatedIOPreference (AVAudioSessionIOType ioType, out NSError error); - - [TV (11,0), NoWatch, iOS (11,0), NoMac] - [Export ("setCategory:mode:routeSharingPolicy:options:error:")] - bool SetCategory (string category, string mode, AVAudioSessionRouteSharingPolicy policy, AVAudioSessionCategoryOptions options, [NullAllowed] out NSError outError); - - [TV (11, 0), NoWatch, iOS (11, 0), NoMac] - [Export ("routeSharingPolicy")] - AVAudioSessionRouteSharingPolicy RouteSharingPolicy { get; } } [Since (6,0)] @@ -2408,7 +2085,7 @@ interface AVAudioUnit { [Async] void FromComponentDescription (AudioComponentDescription audioComponentDescription, AudioComponentInstantiationOptions options, Action completionHandler); - [NoWatch, iOS (9,0), Mac (10,11, onlyOn64 : true)] + [iOS (9,0), Mac (10,11, onlyOn64 : true)] [Export ("AUAudioUnit")] AUAudioUnit AUAudioUnit { get; } #endif @@ -2796,7 +2473,7 @@ interface AVAsset : NSCopying { CGAffineTransform PreferredTransform { get; } [Export ("naturalSize")] - [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.")] + [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; } [Export ("providesPreciseDurationAndTiming")] @@ -2815,15 +2492,9 @@ interface AVAsset : NSCopying { [Export ("tracksWithMediaType:")] AVAssetTrack [] TracksWithMediaType (string mediaType); - [Wrap ("TracksWithMediaType (mediaType.GetConstant ())")] - AVAssetTrack [] GetTracks (AVMediaTypes mediaType); - [Export ("tracksWithMediaCharacteristic:")] AVAssetTrack [] TracksWithMediaCharacteristic (string mediaCharacteristic); - [Wrap ("TracksWithMediaType (mediaCharacteristic.GetConstant ())")] - AVAssetTrack [] GetTracks (AVMediaCharacteristics mediaCharacteristic); - [Export ("lyrics"), NullAllowed] string Lyrics { get; } @@ -2833,16 +2504,8 @@ interface AVAsset : NSCopying { [Export ("availableMetadataFormats")] string [] AvailableMetadataFormats { get; } -#if !XAMCORE_4_0 - [Obsolete ("Use 'GetMetadataForFormat' with enum values AVMetadataFormat.")] - [Wrap ("GetMetadataForFormat (new NSString (format))", IsVirtual = true)] - AVMetadataItem [] MetadataForFormat (string format); -#endif [Export ("metadataForFormat:")] - AVMetadataItem [] GetMetadataForFormat (NSString format); - - [Wrap ("GetMetadataForFormat (new NSString (format.GetConstant ()))")] - AVMetadataItem [] GetMetadataForFormat (AVMetadataFormat format); + AVMetadataItem [] MetadataForFormat (string format); [Since (4,2)] [Export ("hasProtectedContent")] @@ -2903,9 +2566,6 @@ interface AVAsset : NSCopying { [Export ("mediaSelectionGroupForMediaCharacteristic:")] AVMediaSelectionGroup MediaSelectionGroupForMediaCharacteristic (string avMediaCharacteristic); - [Wrap ("MediaSelectionGroupForMediaCharacteristic (avMediaCharacteristic.GetConstant ())")] - AVMediaSelectionGroup GetMediaSelectionGroupForMediaCharacteristic (AVMediaCharacteristics avMediaCharacteristic); - [Export ("statusOfValueForKey:error:")] AVKeyValueStatus StatusOfValue (string key, out NSError error); @@ -2978,10 +2638,6 @@ interface AVAsset : NSCopying { [iOS (10, 2), Mac (10,12,2), TV (10, 2)] [Export ("overallDurationHint")] CMTime OverallDurationHint { get; } - - [iOS (11, 0), TV (11, 0), Mac (10, 13), NoWatch] - [Export ("allMediaSelections")] - AVMediaSelection[] AllMediaSelections { get; } } #if MONOMAC @@ -3021,15 +2677,8 @@ interface AVFragmentedAsset_AVFragmentedAssetTrackInspection { [Export ("tracksWithMediaType:")] AVFragmentedAssetTrack [] GetTracks (string mediaType); - [Wrap ("This.GetTracks (mediaType.GetConstant ())")] - AVFragmentedAssetTrack [] GetTracks (AVMediaTypes mediaType); - [Export ("tracksWithMediaCharacteristic:")] AVFragmentedAssetTrack [] GetTracksWithMediaCharacteristic (string mediaCharacteristic); - - [Wrap ("This.GetTracksWithMediaCharacteristic (mediaCharacteristic.GetConstant ())")] - AVFragmentedAssetTrack [] GetTracks (AVMediaCharacteristics mediaCharacteristic); - } [Mac (10,11)] @@ -3072,108 +2721,6 @@ interface AVCaptureFileOutputDelegate { void DidOutputSampleBuffer (AVCaptureOutput captureOutput, CMSampleBuffer sampleBuffer, AVCaptureConnection connection); } -#endif // MONOMAC - - [NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface AVCaptureSynchronizedData - { - [Export ("timestamp")] - CMTime Timestamp { get; } - } - - [NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface AVCaptureSynchronizedDataCollection : INSFastEnumeration - { - [Export ("synchronizedDataForCaptureOutput:")] - [return: NullAllowed] - AVCaptureSynchronizedData From (AVCaptureOutput captureOutput); - - [Export ("objectForKeyedSubscript:")] - [return: NullAllowed] - AVCaptureSynchronizedData ObjectForKeyedSubscript (AVCaptureOutput key); - - [Export ("count")] - nuint Count { get; } - } - - interface IAVCaptureDataOutputSynchronizerDelegate {} - - [NoWatch, NoTV, iOS (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface AVCaptureDataOutputSynchronizerDelegate - { - [Abstract] - [Export ("dataOutputSynchronizer:didOutputSynchronizedDataCollection:")] - void DidOutputSynchronizedDataCollection (AVCaptureDataOutputSynchronizer synchronizer, AVCaptureSynchronizedDataCollection synchronizedDataCollection); - } - - [NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface AVCaptureDataOutputSynchronizer - { - [Export ("initWithDataOutputs:")] - IntPtr Constructor (AVCaptureOutput[] dataOutputs); - - [Export ("dataOutputs", ArgumentSemantic.Retain)] - AVCaptureOutput[] DataOutputs { get; } - - [Export ("setDelegate:queue:")] - void SetDelegate ([NullAllowed] IAVCaptureDataOutputSynchronizerDelegate del, [NullAllowed] DispatchQueue delegateCallbackQueue); - - [Wrap ("WeakDelegate")] - [NullAllowed] - IAVCaptureDataOutputSynchronizerDelegate Delegate { get; } - - [NullAllowed, Export ("delegate")] - NSObject WeakDelegate { get; } - - [NullAllowed, Export ("delegateCallbackQueue")] - DispatchQueue DelegateCallbackQueue { get; } - } - - [NoMac, NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(AVCaptureSynchronizedData))] - interface AVCaptureSynchronizedSampleBufferData - { - [Export ("sampleBuffer")] - CMSampleBuffer SampleBuffer { get; } - - [Export ("sampleBufferWasDropped")] - bool SampleBufferWasDropped { get; } - - [Export ("droppedReason")] - AVCaptureOutputDataDroppedReason DroppedReason { get; } - } - - [NoMac, NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(AVCaptureSynchronizedData))] - interface AVCaptureSynchronizedMetadataObjectData - { - [Export ("metadataObjects")] - AVMetadataObject[] MetadataObjects { get; } - } - - [NoMac, NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(AVCaptureSynchronizedData))] - interface AVCaptureSynchronizedDepthData - { - [Export ("depthData")] - AVDepthData DepthData { get; } - - [Export ("depthDataWasDropped")] - bool DepthDataWasDropped { get; } - - [Export ("droppedReason")] - AVCaptureOutputDataDroppedReason DroppedReason { get; } - } - -#if MONOMAC [Mac (10,10)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -3223,7 +2770,6 @@ interface AVSampleBufferRequest { [Export ("overrideTime", ArgumentSemantic.Assign)] CMTime OverrideTime { get; set; } } - #endif [NoWatch] @@ -3414,7 +2960,7 @@ interface AVAssetReaderTrackOutput { #if XAMCORE_2_0 [Internal] #endif - [Advice ("Use 'Create' method.")] + [Advice ("Use Create method")] [Static, Export ("assetReaderTrackOutputWithTrack:outputSettings:")] AVAssetReaderTrackOutput FromTrack (AVAssetTrack track, [NullAllowed] NSDictionary outputSettings); @@ -3459,7 +3005,7 @@ interface AVAssetReaderAudioMixOutput { #if XAMCORE_2_0 [Internal] #endif - [Advice ("Use 'Create' method.")] + [Advice ("Use Create method")] [Static, Export ("assetReaderAudioMixOutputWithAudioTracks:audioSettings:")] AVAssetReaderAudioMixOutput FromTracks (AVAssetTrack [] audioTracks, [NullAllowed] NSDictionary audioSettings); @@ -3476,7 +3022,7 @@ interface AVAssetReaderAudioMixOutput { #if XAMCORE_2_0 [Internal] #endif - [Advice ("Use 'Settings' property.")] + [Advice ("Use Settings property")] [Export ("audioSettings"), NullAllowed] NSDictionary AudioSettings { get; } @@ -3505,7 +3051,7 @@ interface AVAssetReaderVideoCompositionOutput { #if XAMCORE_2_0 [Internal] #endif - [Advice ("Use 'Create' method.")] + [Advice ("Use Create method")] [Static] [Export ("assetReaderVideoCompositionOutputWithVideoTracks:videoSettings:")] AVAssetReaderVideoCompositionOutput WeakFromTracks (AVAssetTrack [] videoTracks, [NullAllowed] NSDictionary videoSettings); @@ -3623,7 +3169,7 @@ interface AVAssetResourceLoadingRequest { bool Finished { /* [Bind ("isFinished")] */ get; } [Export ("finishLoadingWithResponse:data:redirect:")] - [Availability (Introduced = Platform.iOS_6_0, Deprecated = Platform.iOS_7_0, Message = "Use the 'Response', 'Redirect' properties and the 'AVAssetResourceLoadingDataRequest.Responds' and 'AVAssetResourceLoadingRequest.FinishLoading' methods instead.")] + [Availability (Introduced = Platform.iOS_6_0, Deprecated = Platform.iOS_7_0, Message = "Use the Response, Redirect properties and the AVAssetResourceLoadingDataRequest.Responds and AVAssetResourceLoadingRequest.FinishLoading methods instead")] void FinishLoading ([NullAllowed] NSUrlResponse usingResponse, [NullAllowed] NSData data, [NullAllowed] NSUrlRequest redirect); [Export ("finishLoadingWithError:")] @@ -3770,7 +3316,7 @@ interface AVAssetWriter { void CancelWriting (); [Export ("finishWriting")] - [Availability (Introduced = Platform.iOS_4_1, Deprecated = Platform.iOS_6_0, Message = "Use the asynchronous 'FinishWriting (NSAction completionHandler)' instead.")] + [Availability (Introduced = Platform.iOS_4_1, Deprecated = Platform.iOS_6_0, Message = "Use the asynchronous FinishWriting(NSAction completionHandler) instead")] bool FinishWriting (); [Mac (10,9)] @@ -3959,12 +3505,6 @@ interface AVAssetWriterInput { [Export ("sampleReferenceBaseURL", ArgumentSemantic.Copy), NullAllowed] NSUrl SampleReferenceBaseUrl { get; set; } - // AVAssetWriterInput_AVAssetWriterInputFileTypeSpecificProperties - - [iOS (11, 0), Mac (10, 13), TV (11, 0), NoWatch] - [Export ("mediaDataLocation")] - string MediaDataLocation { get; set; } - } [NoWatch] @@ -4034,7 +3574,7 @@ interface AVAssetWriterInputPixelBufferAdaptor { CVPixelBufferPool PixelBufferPool { get; } #if XAMCORE_2_0 - [Advice ("Use 'Create' method.")] + [Advice ("Use Create method")] #endif [Static, Export ("assetWriterInputPixelBufferAdaptorWithAssetWriterInput:sourcePixelBufferAttributes:")] AVAssetWriterInputPixelBufferAdaptor FromInput (AVAssetWriterInput input, [NullAllowed] NSDictionary sourcePixelBufferAttributes); @@ -4160,10 +3700,6 @@ interface AVAssetTrack : NSCopying { [Export ("mediaType")] string MediaType { get; } - [iOS (11, 0), Mac (10, 13), TV (11, 0), NoWatch] - [Export ("decodable")] - bool Decodable { [Bind ("isDecodable")] get; } - // Weak version [Export ("formatDescriptions")] NSObject [] FormatDescriptionsAsObjects { get; } @@ -4553,11 +4089,8 @@ interface AVMetadata { [Field ("AVMetadataCommonKeySoftware")] NSString CommonKeySoftware { get; } -#if !XAMCORE_4_0 [Field ("AVMetadataFormatQuickTimeUserData")] - [Obsolete ("Use 'AVMetadataFormat' enum values")] NSString FormatQuickTimeUserData { get; } -#endif [Field ("AVMetadataKeySpaceQuickTimeUserData")] NSString KeySpaceQuickTimeUserData { get; } @@ -4732,13 +4265,10 @@ interface AVMetadata { [Field ("AVMetadata3GPUserDataKeyMediaRating")] NSString K3GPUserDataKeyMediaRating { get; } -#if !XAMCORE_4_0 [Since (7,0), Mavericks] [Field ("AVMetadataFormatISOUserData")] - [Obsolete ("Use 'AVMetadataFormat' enum values")] NSString KFormatISOUserData { get; } -#endif - + [Since (7,0), Mavericks] [Field ("AVMetadataKeySpaceISOUserData")] NSString KKeySpaceISOUserData { get; } @@ -4873,11 +4403,8 @@ interface AVMetadata { [Field ("AVMetadataQuickTimeMetadataKeyContentIdentifier")] NSString QuickTimeMetadataKeyContentIdentifier { get; } -#if !XAMCORE_4_0 [Field ("AVMetadataFormatiTunesMetadata")] - [Obsolete ("Use 'AVMetadataFormat' enum values")] NSString FormatiTunesMetadata { get; } -#endif [Field ("AVMetadataKeySpaceiTunes")] NSString KeySpaceiTunes { get; } @@ -5027,12 +4554,9 @@ interface AVMetadata { [Field ("AVMetadataiTunesMetadataKeyExecProducer")] NSString iTunesMetadataKeyExecProducer { get; } -#if !XAMCORE_4_0 [Field ("AVMetadataFormatID3Metadata")] - [Obsolete ("Use 'AVMetadataFormat' enum values")] NSString FormatID3Metadata { get; } -#endif - + [Field ("AVMetadataKeySpaceID3")] NSString KeySpaceID3 { get; } @@ -5338,21 +4862,14 @@ interface AVMetadata { [Field ("AVMetadataIcyMetadataKeyStreamURL")] NSString IcyMetadataKeyStreamUrl { get; } -#if !XAMCORE_4_0 [iOS (8,0)][Mac (10,10)] [Field ("AVMetadataFormatHLSMetadata")] - [Obsolete ("Use 'AVMetadataFormat' enum values")] NSString FormatHlsMetadata { get; } -#endif - [iOS (9,3)][Mac (10, 11, 3)] + [iOS (9,3)][NoMac] [TV (9,2)] [Field ("AVMetadataKeySpaceHLSDateRange")] NSString KeySpaceHlsDateRange { get; } - - [iOS (11, 0), Mac (10, 13)] - [Field ("AVMetadataKeySpaceAudioFile")] - NSString KeySpaceAudioFile { get; } } [NoWatch] @@ -6583,15 +6100,8 @@ interface AVMovie_AVMovieTrackInspection [Export ("tracksWithMediaType:")] AVMovieTrack[] GetTracks (string mediaType); - [Wrap ("This.GetTracks (mediaType.GetConstant ())")] - AVMovieTrack[] GetTracks (AVMediaTypes mediaType); - [Export ("tracksWithMediaCharacteristic:")] AVMovieTrack[] GetTracksWithMediaCharacteristic (string mediaCharacteristic); - - [Wrap ("This.GetTracksWithMediaCharacteristic (mediaCharacteristic.GetConstant ())")] - AVMovieTrack[] GetTracks (AVMediaCharacteristics mediaCharacteristic); - } [Mac (10,11)] @@ -6703,14 +6213,8 @@ interface AVMutableMovie_AVMutableMovieTrackInspection [Export ("tracksWithMediaType:")] AVMutableMovieTrack[] GetTracks (string mediaType); - [Wrap ("This.GetTracks (mediaType.GetConstant ())")] - AVMutableMovieTrack[] GetTracks (AVMediaTypes mediaType); - [Export ("tracksWithMediaCharacteristic:")] AVMutableMovieTrack[] GetTracksWithMediaCharacteristic (string mediaCharacteristic); - - [Wrap ("This.GetTracksWithMediaCharacteristic (mediaCharacteristic.GetConstant ())")] - AVMutableMovieTrack[] GetTracks (AVMediaCharacteristics mediaCharacteristic); } [Mac (10,11)] @@ -6767,14 +6271,8 @@ interface AVFragmentedMovie_AVFragmentedMovieTrackInspection [Export ("tracksWithMediaType:")] AVFragmentedMovieTrack[] GetTracks (string mediaType); - [Wrap ("This.GetTracks (mediaType.GetConstant ())")] - AVFragmentedMovieTrack[] GetTracks (AVMediaTypes mediaType); - [Export ("tracksWithMediaCharacteristic:")] AVFragmentedMovieTrack[] GetTracksWithMediaCharacteristic (string mediaCharacteristic); - - [Wrap ("This.GetTracksWithMediaCharacteristic (mediaCharacteristic.GetConstant ())")] - AVFragmentedMovieTrack[] GetTracks (AVMediaCharacteristics mediaCharacteristic); } [Mac (10,10)] @@ -6956,7 +6454,7 @@ interface AVFragmentedMovieTrack NSString SegmentsDidChangeNotification { get; } [Introduced (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use either 'AVFragmentedMovieTrackTimeRangeDidChangeNotification' or 'AVFragmentedMovieTrackSegmentsDidChangeNotification' instead. In either case, you can assume that the sender's 'TotalSampleDataLength' has changed.")] + [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use either AVFragmentedMovieTrackTimeRangeDidChangeNotification or AVFragmentedMovieTrackSegmentsDidChangeNotification instead. In either case you can assume that the sender's totalSampleDataLength has changed.")] [Field ("AVFragmentedMovieTrackTotalSampleDataLengthDidChangeNotification")] NSString TotalSampleDataLengthDidChangeNotification { get; } } @@ -7178,14 +6676,8 @@ interface AVComposition_AVCompositionTrackInspection { [Export ("tracksWithMediaType:")] AVCompositionTrack[] GetTracks (string mediaType); - [Wrap ("This.GetTracks (mediaType.GetConstant ())")] - AVCompositionTrack[] GetTracks (AVMediaTypes mediaType); - [Export ("tracksWithMediaCharacteristic:")] AVCompositionTrack[] GetTracksWithMediaCharacteristic (string mediaCharacteristic); - - [Wrap ("This.GetTracksWithMediaCharacteristic (mediaCharacteristic.GetConstant ())")] - AVCompositionTrack[] GetTracks (AVMediaCharacteristics mediaCharacteristic); } [NoWatch] @@ -7240,14 +6732,8 @@ interface AVMutableComposition_AVMutableCompositionTrackInspection { [Export ("tracksWithMediaType:")] AVMutableCompositionTrack[] GetTracks (string mediaType); - [Wrap ("This.GetTracks (mediaType.GetConstant ())")] - AVMutableCompositionTrack[] GetTracks (AVMediaTypes mediaType); - [Export ("tracksWithMediaCharacteristic:")] AVMutableCompositionTrack[] GetTracksWithMediaCharacteristic (string mediaCharacteristic); - - [Wrap ("This.GetTracksWithMediaCharacteristic (mediaCharacteristic.GetConstant ())")] - AVMutableCompositionTrack[] GetTracks (AVMediaCharacteristics mediaCharacteristic); } [NoWatch] @@ -7375,14 +6861,6 @@ interface AVAssetExportSession { [Field ("AVAssetExportPresetHighestQuality")] NSString PresetHighestQuality { get; } - [iOS (11, 0), Mac (10,13)] - [Field ("AVAssetExportPresetHEVCHighestQuality")] - NSString PresetHevcHighestQuality { get; } - - [iOS (11, 0), Mac (10,13)] - [Field ("AVAssetExportPresetHEVC3840x2160")] - NSString PresetHevc3840x2160 { get; } - [Field ("AVAssetExportPreset640x480")] NSString Preset640x480 { get; } @@ -7400,10 +6878,6 @@ interface AVAssetExportSession { [Field ("AVAssetExportPreset3840x2160")] NSString Preset3840x2160 { get; } - [iOS (11, 0), Mac (10,13)] - [Field ("AVAssetExportPresetHEVC1920x1080")] - NSString PresetHevc1920x1080 { get; } - [Field ("AVAssetExportPresetAppleM4A")] NSString PresetAppleM4A { get; } @@ -7425,10 +6899,6 @@ interface AVAssetExportSession { [Async] void DetermineCompatibilityOfExportPreset (string presetName, AVAsset asset, [NullAllowed] string outputFileType, Action isCompatibleResult); - [Async] - [Wrap ("DetermineCompatibilityOfExportPreset (presetName, asset, outputFileType.GetConstant (), isCompatibleResult)")] - void DetermineCompatibilityOfExportPreset (string presetName, AVAsset asset, [NullAllowed] AVFileTypes outputFileType, Action isCompatibleResult); - [Since (6,0)] [Mavericks] [Export ("determineCompatibleFileTypesWithCompletionHandler:")] @@ -7868,33 +7338,6 @@ interface AVVideoCompositionCoreAnimationTool { AVVideoCompositionCoreAnimationTool FromComposedVideoFrames (CALayer [] videoLayers, CALayer inAnimationlayer); } - [TV (11,0), NoWatch, iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface AVCameraCalibrationData - { - [Export ("intrinsicMatrix")] - NMatrix3 IntrinsicMatrix { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; } - - [Export ("intrinsicMatrixReferenceDimensions")] - CGSize IntrinsicMatrixReferenceDimensions { get; } - - [Export ("extrinsicMatrix")] - NMatrix4x3 ExtrinsicMatrix { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; } - - [Export ("pixelSize")] - float PixelSize { get; } - - [Export ("lensDistortionLookupTable")] - NSData LensDistortionLookupTable { get; } - - [Export ("inverseLensDistortionLookupTable")] - NSData InverseLensDistortionLookupTable { get; } - - [Export ("lensDistortionCenter")] - CGPoint LensDistortionCenter { get; } - } - [NoWatch] interface AVCaptureSessionRuntimeErrorEventArgs { [Export ("AVCaptureSessionErrorKey")] @@ -8169,11 +7612,11 @@ interface AVCaptureConnection { [Since (6,0)] [Export ("videoStabilizationEnabled")] - [Availability (Deprecated = Platform.iOS_8_0, Message="Use 'ActiveVideoStabilizationMode' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message="Starting with iOS 8, you should use ActiveVideoStabilizationMode instead")] bool VideoStabilizationEnabled { [Bind ("isVideoStabilizationEnabled")] get; } [Since (6,0)] - [Availability (Deprecated = Platform.iOS_8_0, Message="Use 'PreferredVideoStabilizationMode' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message="Starting with iOS 8, you should use PreferredVideoStabilizationMode instead")] [Export ("enablesVideoStabilizationWhenAvailable")] bool EnablesVideoStabilizationWhenAvailable { get; set; } @@ -8193,15 +7636,6 @@ interface AVCaptureConnection { [Export ("videoFieldMode")] AVVideoFieldMode VideoFieldMode { get; set; } #endif - - [iOS (11, 0), NoMac, TV (11, 0), NoWatch] - [Export ("cameraIntrinsicMatrixDeliverySupported")] - bool CameraIntrinsicMatrixDeliverySupported { [Bind ("isCameraIntrinsicMatrixDeliverySupported")] get; } - - [iOS (11, 0), NoMac, TV (11, 0), NoWatch] - [Export ("cameraIntrinsicMatrixDeliveryEnabled")] - bool CameraIntrinsicMatrixDeliveryEnabled { [Bind ("isCameraIntrinsicMatrixDeliveryEnabled")] get; set; } - } [NoWatch] @@ -8243,7 +7677,6 @@ interface AVCaptureInput { [NoTV] [Since (4,0)] [BaseType (typeof (NSObject))] - [DisableDefaultCtor] interface AVCaptureInputPort { [Export ("mediaType")] string MediaType { get; } @@ -8261,44 +7694,6 @@ interface AVCaptureInputPort { CMClock Clock { get; } } - interface IAVCaptureDepthDataOutputDelegate {} - - [NoWatch, NoTV, iOS (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface AVCaptureDepthDataOutputDelegate - { - [Export ("depthDataOutput:didOutputDepthData:timestamp:connection:")] - void DidOutputDepthData (AVCaptureDepthDataOutput output, AVDepthData depthData, CMTime timestamp, AVCaptureConnection connection); - - [Export ("depthDataOutput:didDropDepthData:timestamp:connection:reason:")] - void DidDropDepthData (AVCaptureDepthDataOutput output, AVDepthData depthData, CMTime timestamp, AVCaptureConnection connection, AVCaptureOutputDataDroppedReason reason); - } - - [NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(AVCaptureOutput))] - [DisableDefaultCtor] - interface AVCaptureDepthDataOutput - { - [Export ("setDelegate:callbackQueue:")] - void SetDelegate (IAVCaptureDepthDataOutputDelegate del, DispatchQueue callbackQueue); - - [Wrap ("WeakDelegate")] - IAVCaptureDepthDataOutputDelegate Delegate { get; } - - [NullAllowed, Export ("delegate")] - NSObject WeakDelegate { get; } - - [Export ("delegateCallbackQueue")] - DispatchQueue DelegateCallbackQueue { get; } - - [Export ("alwaysDiscardsLateDepthData")] - bool AlwaysDiscardsLateDepthData { get; set; } - - [Export ("filteringEnabled")] - bool FilteringEnabled { [Bind ("isFilteringEnabled")] get; set; } - } - [NoWatch] [NoTV] [Since (4,0)] @@ -8451,7 +7846,7 @@ interface AVCaptureScreenInput { bool CapturesCursor { get; set; } [Mac (10,8)] - [Availability (Deprecated=Platform.Mac_10_10, Message="Ignored since 10.10, if you want to get this behavior, use AVCaptureVideoDataOutput and compare the frame contents on your own code.")] + [Availability (Deprecated=Platform.Mac_10_10, Message="Ignored since 10.10, if you want to get this behavior, use AVCaptureVideoDataOutput and compare the frame contents on your own code")] [Export ("removesDuplicateFrames")] bool RemovesDuplicateFrames { get; set; } } @@ -8481,23 +7876,23 @@ interface AVCaptureVideoPreviewLayer { #if !MONOMAC [Export ("orientation")] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use 'AVCaptureConnection.VideoOrientation' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use AVCaptureConnection.VideoOrientation instead")] AVCaptureVideoOrientation Orientation { get; set; } [Export ("automaticallyAdjustsMirroring")] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use 'AVCaptureConnection.AutomaticallyAdjustsVideoMirroring' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use AVCaptureConnection.AutomaticallyAdjustsVideoMirroring instead")] bool AutomaticallyAdjustsMirroring { get; set; } [Export ("mirrored")] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use 'AVCaptureConnection.VideoMirrored' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use AVCaptureConnection.VideoMirrored instead")] bool Mirrored { [Bind ("isMirrored")] get; set; } [Export ("isMirroringSupported")] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use 'AVCaptureConnection.IsVideoMirroringSupported' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use AVCaptureConnection.IsVideoMirroringSupported instead")] bool MirroringSupported { get; } [Export ("isOrientationSupported")] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use 'AVCaptureConnection.IsVideoOrientationSupported' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use AVCaptureConnection.IsVideoOrientationSupported instead")] bool OrientationSupported { get; } #endif @@ -8565,14 +7960,14 @@ interface AVCaptureVideoDataOutput { AVVideoSettingsCompressed CompressedVideoSetting { get; set; } [Export ("minFrameDuration")] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_5_0, Message = "Use 'AVCaptureConnection.MinVideoFrameDuration' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_5_0, Message = "Use AVCaptureConnection.MinVideoFrameDuration instead")] CMTime MinFrameDuration { get; set; } [Export ("alwaysDiscardsLateVideoFrames")] bool AlwaysDiscardsLateVideoFrames { get; set; } #if !XAMARIN_4_0 - [Obsolete ("Use overload accepting a 'IAVCaptureVideoDataOutputSampleBufferDelegate'.")] + [Obsolete ("Use overload accepting a IAVCaptureVideoDataOutputSampleBufferDelegate")] [Export ("setSampleBufferDelegate:queue:")] [PostGet ("SampleBufferDelegate")] [PostGet ("SampleBufferCallbackQueue")] @@ -8600,20 +7995,6 @@ interface AVCaptureVideoDataOutput { [Export ("recommendedVideoSettingsForAssetWriterWithOutputFileType:")] NSDictionary GetRecommendedVideoSettingsForAssetWriter (string outputFileType); #endif - - [iOS (11,0), NoMac] - [Export ("availableVideoCodecTypesForAssetWriterWithOutputFileType:")] - string[] GetAvailableVideoCodecTypes (string outputFileType); - - [Internal] - [iOS (11,0), NoMac] - [Export ("recommendedVideoSettingsForVideoCodecType:assetWriterOutputFileType:")] - [return: NullAllowed] - NSDictionary GetWeakRecommendedVideoSettings (string videoCodecType, string outputFileType); - - [iOS (11,0), NoMac] - [Wrap ("new AVPlayerItemVideoOutputSettings (GetWeakRecommendedVideoSettings (videoCodecType, outputFileType))")] - AVPlayerItemVideoOutputSettings GetRecommendedVideoSettings (string videoCodecType, string outputFileType); } [NoWatch] @@ -8654,7 +8035,7 @@ interface AVCaptureAudioDataOutput { [Sealed] void SetSampleBufferDelegateQueue ([NullAllowed] IAVCaptureAudioDataOutputSampleBufferDelegate sampleBufferDelegate, [NullAllowed] DispatchQueue sampleBufferCallbackDispatchQueue); - [Obsolete ("Use overload accepting a 'IAVCaptureVideoDataOutputSampleBufferDelegate'.")] + [Obsolete ("Use overload accepting a IAVCaptureVideoDataOutputSampleBufferDelegate")] [Export ("setSampleBufferDelegate:queue:")] #if XAMCORE_2_0 void SetSampleBufferDelegateQueue ([NullAllowed] AVCaptureAudioDataOutputSampleBufferDelegate sampleBufferDelegate, [NullAllowed] DispatchQueue sampleBufferCallbackDispatchQueue); @@ -8987,18 +8368,12 @@ interface AVCapturePhotoCaptureDelegate [Export ("captureOutput:didCapturePhotoForResolvedSettings:")] void DidCapturePhoto (AVCapturePhotoOutput captureOutput, AVCaptureResolvedPhotoSettings resolvedSettings); - [Deprecated (PlatformName.iOS, 11,0, message: "Use the 'DidFinishProcessingPhoto' overload accepting a 'AVCapturePhoto' instead.")] [Export ("captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:")] void DidFinishProcessingPhoto (AVCapturePhotoOutput captureOutput, [NullAllowed] CMSampleBuffer photoSampleBuffer, [NullAllowed] CMSampleBuffer previewPhotoSampleBuffer, AVCaptureResolvedPhotoSettings resolvedSettings, [NullAllowed] AVCaptureBracketedStillImageSettings bracketSettings, [NullAllowed] NSError error); - [Deprecated (PlatformName.iOS, 11,0, message: "Use the 'DidFinishProcessingPhoto' overload accepting a 'AVCapturePhoto' instead.")] [Export ("captureOutput:didFinishProcessingRawPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:")] void DidFinishProcessingRawPhoto (AVCapturePhotoOutput captureOutput, [NullAllowed] CMSampleBuffer rawSampleBuffer, [NullAllowed] CMSampleBuffer previewPhotoSampleBuffer, AVCaptureResolvedPhotoSettings resolvedSettings, [NullAllowed] AVCaptureBracketedStillImageSettings bracketSettings, [NullAllowed] NSError error); - [iOS (11,0)] - [Export ("captureOutput:didFinishProcessingPhoto:error:")] - void DidFinishProcessingPhoto (AVCapturePhotoOutput output, AVCapturePhoto photo, [NullAllowed] NSError error); - [Export ("captureOutput:didFinishRecordingLivePhotoMovieForEventualFileAtURL:resolvedSettings:")] void DidFinishRecordingLivePhotoMovie (AVCapturePhotoOutput captureOutput, NSUrl outputFileUrl, AVCaptureResolvedPhotoSettings resolvedSettings); @@ -9127,7 +8502,7 @@ interface AVCaptureMovieFileOutput { [NoTV] [NoWatch] [Since (4,0)] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_10_0, Message = "Use 'AVCapturePhotoOutput' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_10_0, Message = "Deprecated class, use AVCapturePhotoOutput instead.")] [BaseType (typeof (AVCaptureOutput))] interface AVCaptureStillImageOutput { [Export ("availableImageDataCVPixelFormatTypes")] @@ -9221,8 +8596,8 @@ enum AVCaptureDeviceType { [Field ("AVCaptureDeviceTypeBuiltInTelephotoCamera")] BuiltInTelephotoCamera, - [Introduced (PlatformName.iOS, 10, 0, message: "Use 'BuiltInDualCamera' instead.")] - [Deprecated (PlatformName.iOS, 10, 2, message: "Use 'BuiltInDualCamera' instead.")] + [Introduced (PlatformName.iOS, 10, 0, message: "Use BuiltInDualCamera instead")] + [Deprecated (PlatformName.iOS, 10, 2, message: "Use BuiltInDualCamera instead")] [Field ("AVCaptureDeviceTypeBuiltInDuoCamera")] BuiltInDuoCamera, @@ -9250,11 +8625,11 @@ interface AVCaptureDevice { [Export ("connected")] bool Connected { [Bind ("isConnected")] get; } - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'AVCaptureDeviceDiscoverySession' instead.")] + [Deprecated (PlatformName.iOS, 10, 0, message: "Use AVCaptureDeviceDiscoverySession instead.")] [Static, Export ("devices")] AVCaptureDevice [] Devices { get; } - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'AVCaptureDeviceDiscoverySession' instead.")] + [Deprecated (PlatformName.iOS, 10, 0, message: "Use AVCaptureDeviceDiscoverySession instead.")] [Static] [Export ("devicesWithMediaType:")] AVCaptureDevice [] DevicesWithMediaType (string mediaType); @@ -9268,7 +8643,7 @@ interface AVCaptureDevice { AVCaptureDevice GetDefaultDevice (AVMediaTypes mediaType); #if !XAMCORE_4_0 - [Obsolete ("Use 'GetDefaultDevice (AVMediaTypes)'.")] + [Obsolete ("Use GetDefaultDevice(AVMediaTypes)")] [Static] [Wrap ("GetDefaultDevice ((NSString) mediaType)")] AVCaptureDevice DefaultDeviceWithMediaType (string mediaType); @@ -9293,11 +8668,11 @@ interface AVCaptureDevice { [Export ("supportsAVCaptureSessionPreset:")] bool SupportsAVCaptureSessionPreset (string preset); - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_10_0, Message="Use 'AVCapturePhotoSettings.FlashMode' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_10_0, Message="Deprecated property, use AVCapturePhotoSettings.FlashMode instead")] [Export ("flashMode")] AVCaptureFlashMode FlashMode { get; set; } - [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_10_0, Message="Use 'AVCapturePhotoOutput.SupportedFlashModes' instead.")] + [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_10_0, Message="Deprecated property, use AVCapturePhotoOutput.SupportedFlashModes instead")] [Export ("isFlashModeSupported:")] bool IsFlashModeSupported (AVCaptureFlashMode flashMode); @@ -9374,7 +8749,7 @@ interface AVCaptureDevice { [Export ("isFlashAvailable")] bool FlashAvailable { get; } - [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_10_0, Message="Use 'AVCapturePhotoOutput.IsFlashScene' instead.")] + [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_10_0, Message="Deprecated property, use AVCapturePhotoOutput.IsFlashScene instead")] [Since(5,0)] [Export ("isFlashActive")] bool FlashActive { get; } @@ -9698,7 +9073,7 @@ interface AVCaptureDeviceFormat { bool VideoBinned { [Bind ("isVideoBinned")] get; } [Export ("videoStabilizationSupported")] - [Availability (Deprecated = Platform.iOS_8_0, Message="Use 'IsVideoStabilizationModeSupported (AVCaptureVideoStabilizationMode)' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message="Starting with iOS 8, you can use IsVideoStabilizationModeSupported(AVCaptureVideoStabilizationMode)")] bool VideoStabilizationSupported { [Bind ("isVideoStabilizationSupported")] get; } [Export ("videoMaxZoomFactor")] @@ -9831,15 +9206,15 @@ interface AVPlayer { #if !MONOMAC // 5.0 - [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_6_0, Message = "Use 'AllowsExternalPlayback' instead.")] + [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_6_0, Message = "Use AllowsExternalPlayback instead")] [Export ("allowsAirPlayVideo")] bool AllowsAirPlayVideo { get; set; } - [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_6_0, Message = "Use 'ExternalPlaybackActive' instead.")] + [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_6_0, Message = "Use ExternalPlaybackActive instead")] [Export ("airPlayVideoActive")] bool AirPlayVideoActive { [Bind ("isAirPlayVideoActive")] get; } - [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_6_0, Message = "Use 'UsesExternalPlaybackWhileExternalScreenIsActive' instead.")] + [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_6_0, Message = "Use UsesExternalPlaybackWhileExternalScreenIsActive instead")] [Export ("usesAirPlayVideoWhileAirPlayScreenIsActive")] bool UsesAirPlayVideoWhileAirPlayScreenIsActive { get; set; } #endif @@ -10457,10 +9832,6 @@ interface AVVideoColorPrimaries { [Field ("AVVideoColorPrimaries_P3_D65")] NSString P3_D65 { get; } - - [iOS (11,0), Mac (10,13), TV (11,0)] - [Field ("AVVideoColorPrimaries_ITU_R_2020")] - NSString Itu_R_2020 { get; } } [NoWatch] @@ -10491,10 +9862,6 @@ interface AVVideoYCbCrMatrix { [Field ("AVVideoYCbCrMatrix_SMPTE_240M_1995")] NSString Smpte_240M_1995 { get; } - [iOS (11, 0), TV (11, 0), Mac (10,13)] - [Field ("AVVideoYCbCrMatrix_ITU_R_2020")] - NSString Itu_R_2020 { get; } - } [NoWatch] @@ -10779,7 +10146,7 @@ interface AVPlayerItemErrorLog : NSCopying { [BaseType (typeof (NSObject))] [Since (4,3)] interface AVPlayerItemAccessLogEvent : NSCopying { - [Availability (Introduced = Platform.iOS_4_3 | Platform.Mac_10_7, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use 'NumberOfMediaRequests' instead.")] + [Availability (Introduced = Platform.iOS_4_3 | Platform.Mac_10_7, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use NumberOfMediaRequests instead")] [Export ("numberOfSegmentsDownloaded")] nint SegmentedDownloadedCount { get; } @@ -11000,12 +10367,12 @@ interface AVPlayerLooper [DesignatedInitializer] IntPtr Constructor (AVQueuePlayer player, AVPlayerItem itemToLoop, CMTimeRange loopRange); -#if !XAMCORE_4_0 // This API got introduced in Xcode 8.0 binding but is not currently present nor in Xcode 8.3 or Xcode 9.0 needs research - [PostSnippet ("loopingEnabled = false;")] -#endif [Export ("disableLooping")] void DisableLooping (); + [Export ("loopingEnabled")] + bool LoopingEnabled { [Bind ("isLoopingEnabled")] get; } + [Export ("loopCount")] nint LoopCount { get; } @@ -11115,10 +10482,6 @@ interface AVAudioSettings { [Field ("AVLinearPCMIsNonInterleaved")] NSString AVLinearPCMIsNonInterleaved { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Field ("AVAudioFileTypeKey")] - NSString FileTypeKey { get; } [Field ("AVEncoderAudioQualityKey")] NSString AVEncoderAudioQualityKey { get; } @@ -11400,49 +10763,6 @@ interface AVSpeechSynthesizerDelegate { void WillSpeakRangeOfSpeechString (AVSpeechSynthesizer synthesizer, NSRange characterRange, AVSpeechUtterance utterance); } - [NoWatch, NoTV, NoMac, iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface AVAssetDownloadStorageManager - { - [Static] - [Export ("sharedDownloadStorageManager")] - AVAssetDownloadStorageManager SharedDownloadStorageManager { get; } - - [Export ("setStorageManagementPolicy:forURL:")] - void SetStorageManagementPolicy (AVAssetDownloadStorageManagementPolicy storageManagementPolicy, NSUrl downloadStorageUrl); - - [Export ("storageManagementPolicyForURL:")] - [return: NullAllowed] - AVAssetDownloadStorageManagementPolicy GetStorageManagementPolicy (NSUrl downloadStorageUrl); - } - - [NoWatch, NoTV, NoMac, iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface AVAssetDownloadStorageManagementPolicy : NSCopying, NSMutableCopying - { - // Commented until rdar is fixed https://bugreport.apple.com/web/?problemID=34184435 - // [Export ("priority")] - // AVAssetDownloadedAssetEvictionPriority Priority { get; } - - [Export ("expirationDate", ArgumentSemantic.Copy)] - NSDate ExpirationDate { get; [NotImplemented] set; } - } - - [NoWatch, NoTV, NoMac, iOS (11,0)] - [BaseType (typeof(AVAssetDownloadStorageManagementPolicy))] - [DisableDefaultCtor] - interface AVMutableAssetDownloadStorageManagementPolicy - { - // Commented until rdar is fixed https://bugreport.apple.com/web/?problemID=34184435 - // [Export ("priority")] - // AVAssetDownloadedAssetEvictionPriority Priority { get; set; } - - [Export ("expirationDate", ArgumentSemantic.Copy)] - NSDate ExpirationDate { get; set; } - } - [NoWatch] [NoTV] [iOS (9,0)] @@ -11466,15 +10786,6 @@ interface AVAssetDownloadTask { } - [NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(NSUrlSessionTask))] - [DisableDefaultCtor] - interface AVAggregateAssetDownloadTask - { - [Export ("URLAsset")] - AVUrlAsset UrlAsset { get; } - } - [NoWatch] [Static, Internal] interface AVAssetDownloadTaskKeys { @@ -11505,7 +10816,7 @@ interface AVAssetDownloadUrlSession { [Export ("sessionWithConfiguration:assetDownloadDelegate:delegateQueue:")] AVAssetDownloadUrlSession CreateSession (NSUrlSessionConfiguration configuration, [NullAllowed] IAVAssetDownloadDelegate @delegate, [NullAllowed] NSOperationQueue delegateQueue); - [Availability (Introduced = Platform.iOS_9_0, Deprecated = Platform.iOS_10_0, Message="Please use 'GetAssetDownloadTask (AVUrlAsset, string, NSData, NSDictionary)'.")] + [Availability (Introduced = Platform.iOS_9_0, Deprecated = Platform.iOS_10_0, Message="Deprecated method, please use GetAssetDownloadTask (AVUrlAsset, string, NSData, NSDictionary)")] [Export ("assetDownloadTaskWithURLAsset:destinationURL:options:")] [return: NullAllowed] AVAssetDownloadTask GetAssetDownloadTask (AVUrlAsset urlAsset, NSUrl destinationUrl, [NullAllowed] NSDictionary options); @@ -11522,17 +10833,11 @@ interface AVAssetDownloadUrlSession { [Wrap ("GetAssetDownloadTask (urlAsset, title, artworkData, options != null ? options.Dictionary : null)")] AVAssetDownloadTask GetAssetDownloadTask (AVUrlAsset urlAsset, string title, [NullAllowed] NSData artworkData, AVAssetDownloadOptions options); - [NoMac, NoTV, NoWatch, iOS (11,0)] - [Export ("aggregateAssetDownloadTaskWithURLAsset:mediaSelections:assetTitle:assetArtworkData:options:")] - [return: NullAllowed] - AVAggregateAssetDownloadTask GetAssetDownloadTask (AVUrlAsset URLAsset, AVMediaSelection[] mediaSelections, string title, [NullAllowed] NSData artworkData, [NullAllowed] NSDictionary options); - } interface IAVAssetDownloadDelegate {} [NoTV] - [NoMac] [NoWatch] [iOS (9,0)] [Protocol, Model] @@ -11547,18 +10852,6 @@ interface AVAssetDownloadDelegate : NSUrlSessionTaskDelegate { [iOS (10,0)] [Export ("URLSession:assetDownloadTask:didFinishDownloadingToURL:")] void DidFinishDownloadingToUrl (NSUrlSession session, AVAssetDownloadTask assetDownloadTask, NSUrl location); - - [iOS (11,0)] - [Export ("URLSession:aggregateAssetDownloadTask:willDownloadToURL:")] - void WillDownloadToUrl (NSUrlSession session, AVAggregateAssetDownloadTask aggregateAssetDownloadTask, NSUrl location); - - [iOS (11,0)] - [Export ("URLSession:aggregateAssetDownloadTask:didCompleteForMediaSelection:")] - void DidCompleteForMediaSelection (NSUrlSession session, AVAggregateAssetDownloadTask aggregateAssetDownloadTask, AVMediaSelection mediaSelection); - - [iOS (11,0)] - [Export ("URLSession:aggregateAssetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad:forMediaSelection:")] - void DidLoadTimeRange (NSUrlSession session, AVAggregateAssetDownloadTask aggregateAssetDownloadTask, CMTimeRange timeRange, NSValue[] loadedTimeRanges, CMTimeRange timeRangeExpectedToLoad, AVMediaSelection mediaSelection); } #endif @@ -11622,14 +10915,6 @@ interface AVOutputSettingsAssistant { [iOS (9,0), Mac (10,10)] [Internal, Field ("AVOutputSettingsPreset3840x2160")] NSString _Preset3840x2160 { get; } - - [iOS (11, 0), Mac (10, 13)] - [Internal, Field ("AVOutputSettingsPresetHEVC1920x1080")] - NSString _PresetHevc1920x1080 { get; } - - [iOS (11, 0), Mac (10, 13)] - [Internal, Field ("AVOutputSettingsPresetHEVC3840x2160")] - NSString _PresetHevc3840x2160 { get; } } [NoWatch] @@ -12008,10 +11293,6 @@ interface AVContentKeySessionDelegate [Export ("contentKeySessionContentProtectionSessionIdentifierDidChange:")] void DidChange (AVContentKeySession session); - - [NoWatch, NoTV, NoMac, iOS (11,0)] - [Export ("contentKeySession:didUpdatePersistableContentKey:forContentKeyIdentifier:")] - void DidUpdate (AVContentKeySession session, NSData persistableContentKey, NSObject keyIdentifier); } partial interface IAVContentKeyRecipient {} @@ -12028,12 +11309,6 @@ interface AVContentKeyRecipient { [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface AVContentKeySession { - - [TV (11,0), NoWatch, Mac (10,13), iOS (11,0)] - [Static] - [Export ("contentKeySessionWithKeySystem:")] - AVContentKeySession Create (string keySystem); - [Static] [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("contentKeySessionWithKeySystem:storageDirectoryAtURL:")] @@ -12074,11 +11349,6 @@ interface AVContentKeySession { [Export ("renewExpiringResponseDataForContentKeyRequest:")] void RenewExpiringResponseData (AVContentKeyRequest contentKeyRequest); - [Async] - [NoWatch, NoTV, NoMac, iOS (11,0)] - [Export ("makeSecureTokenForExpirationDateOfPersistableContentKey:completionHandler:")] - void MakeSecureToken (NSData persistableContentKeyData, Action handler); - #region AVContentKeySession_AVContentKeySessionPendingExpiredSessionReports // binded because they are static and from a category. @@ -12169,74 +11439,6 @@ interface AVContentKeyResponse { [Static] [Export ("contentKeyResponseWithFairPlayStreamingKeyResponseData:")] AVContentKeyResponse Create (NSData fairPlayStreamingKeyResponseData); - - [TV (11,0), NoWatch, Mac (10,13), iOS (11,0)] - [Static] - [Export ("contentKeyResponseWithClearKeyData:initializationVector:")] - AVContentKeyResponse Create (NSData keyData, [NullAllowed] NSData initializationVector); - } - - [TV (11,0), NoWatch, Mac (10,13), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof(NSObject))] - interface AVRouteDetector { - [Notification] - [TV (11, 0), NoWatch, Mac (10, 13), iOS (11, 0)] - [Field ("AVRouteDetectorMultipleRoutesDetectedDidChangeNotification")] - NSString MultipleRoutesDetectedDidChange { get; } - - [Export ("routeDetectionEnabled")] - bool RouteDetectionEnabled { [Bind ("isRouteDetectionEnabled")] get; set; } - - [Export ("multipleRoutesDetected")] - bool MultipleRoutesDetected { get; } } - [NoTV, iOS (11,0), NoWatch, NoMac] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface AVCapturePhoto - { - [Export ("timestamp")] - CMTime Timestamp { get; } - - [Export ("rawPhoto")] - bool RawPhoto { [Bind ("isRawPhoto")] get; } - - [NullAllowed, Export ("pixelBuffer")] - CVPixelBuffer PixelBuffer { get; } - - [NullAllowed, Export ("previewPixelBuffer")] - CVPixelBuffer PreviewPixelBuffer { get; } - - [NullAllowed, Export ("embeddedThumbnailPhotoFormat")] - NSDictionary WeakEmbeddedThumbnailPhotoFormat { get; } - - [Wrap ("WeakEmbeddedThumbnailPhotoFormat")] - AVVideoSettingsCompressed EmbeddedThumbnailPhotoFormat { get; } - - [NullAllowed, Export ("depthData")] - AVDepthData DepthData { get; } - - [Export ("metadata")] - NSDictionary WeakMetadata { get; } - - [Wrap ("WeakMetadata")] - CoreGraphics.CGImageProperties Properties { get; } - - [NullAllowed, Export ("cameraCalibrationData")] - AVCameraCalibrationData CameraCalibrationData { get; } - - [Export ("resolvedSettings")] - AVCaptureResolvedPhotoSettings ResolvedSettings { get; } - - [Export ("photoCount")] - nint PhotoCount { get; } - - [NullAllowed, Export ("sourceDeviceType")] - NSString WeakSourceDeviceType { get; } - - [Wrap ("AVCaptureDeviceTypeExtensions.GetValue (WeakSourceDeviceType)")] - AVCaptureDeviceType SourceDeviceType { get; } - } } diff --git a/src/avkit.cs b/src/avkit.cs index 466cf96de3a..80f8e5a879d 100644 --- a/src/avkit.cs +++ b/src/avkit.cs @@ -124,11 +124,6 @@ interface AVPlayerViewController { [Export ("contentOverlayView")] UIView ContentOverlayView { get; } - [TV (11,0)] - [NoiOS] - [NullAllowed, Export ("unobscuredContentGuide")] - UILayoutGuide UnobscuredContentGuide { get; } - [NoTV] [iOS (9,0)] [Export ("allowsPictureInPicturePlayback")] @@ -139,16 +134,6 @@ interface AVPlayerViewController { [Export ("updatesNowPlayingInfoCenter")] bool UpdatesNowPlayingInfoCenter { get; set; } - [iOS (11,0)] - [NoTV] - [Export ("entersFullScreenWhenPlaybackBegins")] - bool EntersFullScreenWhenPlaybackBegins { get; set; } - - [iOS (11,0)] - [NoTV] - [Export ("exitsFullScreenWhenPlaybackEnds")] - bool ExitsFullScreenWhenPlaybackEnds { get; set; } - [Wrap ("WeakDelegate")] [NullAllowed] [Protocolize] @@ -190,20 +175,6 @@ interface AVPlayerViewController { [NoiOS, TV (10, 0), NoWatch, NoMac] [Export ("skipBackwardEnabled")] bool SkipBackwardEnabled { [Bind ("isSkipBackwardEnabled")] get; set; } - - // From AVPlayerViewControllerControls category - - [NoiOS, TV (11, 0), NoWatch, NoMac] - [Export ("playbackControlsIncludeTransportBar")] - bool PlaybackControlsIncludeTransportBar { get; set; } - - [NoiOS, TV (11, 0), NoWatch, NoMac] - [Export ("playbackControlsIncludeInfoViews")] - bool PlaybackControlsIncludeInfoViews { get; set; } - - [NoiOS, TV (11, 0), NoWatch, NoMac] - [Export ("customInfoViewController", ArgumentSemantic.Assign)] - UIViewController CustomInfoViewController { get; set; } } [Protocol, Model] @@ -243,21 +214,6 @@ interface AVPlayerViewControllerDelegate [Export ("playerViewController:didPresentInterstitialTimeRange:")] void DidPresentInterstitialTimeRange (AVPlayerViewController playerViewController, AVInterstitialTimeRange interstitial); - [NoiOS][NoMac] - [TV (11,0)] - [Export ("playerViewControllerShouldDismiss:")] - bool ShouldDismiss ([NullAllowed] AVPlayerViewController playerViewController); - - [NoiOS][NoMac] - [TV (11,0)] - [Export ("playerViewControllerWillBeginDismissalTransition:")] - void WillBeginDismissalTransition ([NullAllowed] AVPlayerViewController playerViewController); - - [NoiOS][NoMac] - [TV (11,0)] - [Export ("playerViewControllerDidEndDismissalTransition:")] - void DidEndDismissalTransition ([NullAllowed] AVPlayerViewController playerViewController); - [NoiOS][NoMac] [TV (9,0)] [Export ("playerViewController:willPresentInterstitialTimeRange:")] @@ -301,21 +257,6 @@ interface AVPlayerViewControllerDelegate [NoiOS, TV (10,0), NoWatch, NoMac] [Export ("playerViewController:didRejectContentProposal:")] void DidRejectContentProposal (AVPlayerViewController playerViewController, AVContentProposal proposal); - - [NoiOS, TV (11,0), NoWatch, NoMac] - [Export ("playerViewController:willTransitionToVisibilityOfTransportBar:withAnimationCoordinator:")] - void WillTransitionToVisibilityOfTransportBar ([NullAllowed] AVPlayerViewController playerViewController, bool visible, [NullAllowed] IAVPlayerViewControllerAnimationCoordinator coordinator); - } - - interface IAVPlayerViewControllerAnimationCoordinator { } - - [NoiOS, TV (11,0), NoWatch, NoMac] - [Protocol] - interface AVPlayerViewControllerAnimationCoordinator { - - [Abstract] - [Export ("addCoordinatedAnimations:completion:")] - void AddCoordinatedAnimations (Action animations, Action completion); } #else @@ -346,10 +287,6 @@ interface AVPlayerView { [Export ("contentOverlayView")] NSView ContentOverlayView { get; } - [Mac (10,13)] - [Export ("updatesNowPlayingInfoCenter")] - bool UpdatesNowPlayingInfoCenter { get; set; } - [Mac (10,9)] [Export ("actionPopUpButtonMenu")] NSMenu ActionPopUpButtonMenu { get; set; } @@ -451,7 +388,7 @@ interface AVNavigationMarkersGroup { } #if !MONOMAC - [NoiOS, TV (10,0), NoWatch] + [NoiOS, TV (10,0), NoWatch, NoMac] [BaseType (typeof(UIViewController))] interface AVContentProposalViewController { @@ -479,7 +416,7 @@ interface AVContentProposalViewController } [Static] - [NoiOS, TV (10,1), NoWatch] + [NoiOS, TV (10,1), NoWatch, NoMac] interface AVKitMetadataIdentifier { [Field ("AVKitMetadataIdentifierExternalContentIdentifier")] @@ -488,66 +425,7 @@ interface AVKitMetadataIdentifier { NSString ExternalUserProfileIdentifier { get; } [Field ("AVKitMetadataIdentifierPlaybackProgress")] NSString PlaybackProgress { get; } - - [TV (11,0)] - [Field ("AVKitMetadataIdentifierExactStartDate")] - NSString ExactStartDate { get; } - - [TV (11,0)] - [Field ("AVKitMetadataIdentifierApproximateStartDate")] - NSString ApproximateStartDate { get; } - - [TV (11,0)] - [Field ("AVKitMetadataIdentifierExactEndDate")] - NSString ExactEndDate { get; } - - [TV (11,0)] - [Field ("AVKitMetadataIdentifierApproximateEndDate")] - NSString ApproximateEndDate { get; } - - [TV (11,0)] - [Field ("AVKitMetadataIdentifierServiceIdentifier")] - NSString ServiceIdentifier { get; } - } - - [TV (11,0), iOS (11,0)] - [BaseType (typeof (UIView))] - interface AVRoutePickerView { - - [Export ("initWithFrame:")] - IntPtr Constructor (CGRect frame); - - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - IAVRoutePickerViewDelegate Delegate { get; set; } - - [Export ("activeTintColor", ArgumentSemantic.Assign), NullAllowed] - UIColor ActiveTintColor { get; set; } - - [NoiOS] - [Export ("routePickerButtonStyle", ArgumentSemantic.Assign)] - AVRoutePickerViewButtonStyle RoutePickerButtonStyle { get; set; } } - [TV (11,0), NoiOS] - [Native] - public enum AVRoutePickerViewButtonStyle : nint { - System, - Plain, - Custom, - } - - interface IAVRoutePickerViewDelegate { } - - [TV (11,0), iOS (11,0)] - [Protocol, Model] - [BaseType (typeof (NSObject))] - interface AVRoutePickerViewDelegate { - - [Export ("routePickerViewWillBeginPresentingRoutes:")] - void WillBeginPresentingRoutes (AVRoutePickerView routePickerView); - - [Export ("routePickerViewDidEndPresentingRoutes:")] - void DidEndPresentingRoutes (AVRoutePickerView routePickerView); - } #endif } diff --git a/src/callkit.cs b/src/callkit.cs index de2f4fcc8fe..1786e5a822a 100644 --- a/src/callkit.cs +++ b/src/callkit.cs @@ -68,8 +68,6 @@ public enum CXErrorCodeCallDirectoryManagerError : nint { MaximumEntriesExceeded = 5, ExtensionDisabled = 6, CurrentlyLoading = 7, - [iOS (11,0)] - UnexpectedIncrementalRemoval = 8, } [Introduced (PlatformName.iOS, 10, 0)] @@ -201,16 +199,6 @@ interface CXCallController { [Async] [Export ("requestTransaction:completion:")] void RequestTransaction (CXTransaction transaction, Action completion); - - [iOS (11,0)] - [Async] - [Export ("requestTransactionWithActions:completion:")] - void RequestTransaction ([NullAllowed] CXAction[] actions, [NullAllowed] Action completion); - - [iOS (11,0)] - [Async] - [Export ("requestTransactionWithAction:completion:")] - void RequestTransaction ([NullAllowed] CXAction action, [NullAllowed] Action completion); } [Introduced (PlatformName.iOS, 10, 0)] @@ -229,26 +217,6 @@ interface CXCallDirectoryExtensionContext { [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] ICXCallDirectoryExtensionContextDelegate Delegate { get; set; } - - [iOS (11, 0)] - [Export ("incremental")] - bool Incremental { [Bind ("isIncremental")] get; } - - [iOS (11,0)] - [Export ("removeBlockingEntryWithPhoneNumber:")] - void RemoveBlockingEntry (/* CXCallDirectoryPhoneNumber -> int64_t */ long phoneNumber); - - [iOS (11,0)] - [Export ("removeAllBlockingEntries")] - void RemoveAllBlockingEntries (); - - [iOS (11,0)] - [Export ("removeIdentificationEntryWithPhoneNumber:")] - void RemoveIdentificationEntry (/* CXCallDirectoryPhoneNumber -> int64_t */ long phoneNumber); - - [iOS (11,0)] - [Export ("removeAllIdentificationEntries")] - void RemoveAllIdentificationEntries (); } interface ICXCallDirectoryExtensionContextDelegate {} @@ -474,17 +442,12 @@ interface CXProviderConfiguration : NSCopying { [Export ("maximumCallsPerCallGroup")] nuint MaximumCallsPerCallGroup { get; set; } - [iOS (11, 0)] - [Export ("includesCallsInRecents")] - bool IncludesCallsInRecents { get; set; } - [Export ("supportsVideo")] bool SupportsVideo { get; set; } [Export ("supportedHandleTypes", ArgumentSemantic.Copy)] NSSet SupportedHandleTypes { get; set; } - [DesignatedInitializer] [Export ("initWithLocalizedName:")] IntPtr Constructor (string localizedName); } @@ -498,7 +461,7 @@ interface CXSetGroupCallAction { [DesignatedInitializer] IntPtr Constructor (NSUuid callUuid, [NullAllowed] NSUuid callUuidToGroupWith); - [NullAllowed, Export ("callUUIDToGroupWith", ArgumentSemantic.Copy)] + [NullAllowed, Export ("callUUIDToGroupWith", ArgumentSemantic.Assign)] NSUuid CallUuidToGroupWith { get; set; } } diff --git a/src/clockkit.cs b/src/clockkit.cs index eddf43a053f..b9069d7d76a 100644 --- a/src/clockkit.cs +++ b/src/clockkit.cs @@ -53,20 +53,16 @@ interface CLKComplicationDataSource { [Export ("getTimelineEntriesForComplication:afterDate:limit:withHandler:")] void GetTimelineEntriesAfterDate (CLKComplication complication, NSDate afterDate, nuint limit, Action handler); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'WKRefreshBackgroundTask' instead.")] [Export ("getNextRequestedUpdateDateWithHandler:")] void GetNextRequestedUpdateDate (Action handler); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'WKRefreshBackgroundTask' instead.")] [Export ("requestedUpdateDidBegin")] void RequestedUpdateDidBegin (); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'WKRefreshBackgroundTask' instead.")] [Export ("requestedUpdateBudgetExhausted")] void RequestedUpdateBudgetExhausted (); // this was @required in watchOS 2.x but is now deprecated and downgraded to @optional in watchOS 3 (betas) - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'GetLocalizableSampleTemplate' instead.")] [Export ("getPlaceholderTemplateForComplication:withHandler:")] void GetPlaceholderTemplate (CLKComplication complication, Action handler); diff --git a/src/cloudkit.cs b/src/cloudkit.cs index 83ee4a4cabc..b89cf72d095 100644 --- a/src/cloudkit.cs +++ b/src/cloudkit.cs @@ -73,10 +73,6 @@ interface CKUserIdentity : NSSecureCoding, NSCopying [Export ("hasiCloudAccount")] bool HasICloudAccount { get; } - - [Watch (4, 0), NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [Export ("contactIdentifiers", ArgumentSemantic.Copy)] - string[] ContactIdentifiers { get; } } [iOS (10,0), Watch (3,0), TV (10,0), Mac (10,12, onlyOn64 : true)] @@ -182,7 +178,7 @@ interface CKShareParticipant : NSSecureCoding, NSCopying interface CKContainer { [NoWatch] - [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use 'CurrentUserDefaultName' instead.")] + [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use CurrentUserDefaultName instead")] [Field ("CKOwnerDefaultName")] NSString OwnerDefaultName { get; } @@ -240,7 +236,7 @@ interface CKContainer { [Async] void DiscoverAllIdentities (Action completionHandler); - [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use 'DiscoverAllIdentities' instead.")] + [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use DiscoverAllIdentities instead")] [NoWatch] [NoTV] [Export ("discoverAllContactUserInfosWithCompletionHandler:")] @@ -257,7 +253,7 @@ interface CKContainer { [Async] void DiscoverUserIdentityWithPhoneNumber (string phoneNumber, Action completionHandler); - [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use 'DiscoverUserIdentityWithEmailAddress' instead.")] + [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use DiscoverUserIdentityWithEmailAddress instead")] [NoWatch] [Export ("discoverUserInfoWithEmailAddress:completionHandler:")] [Async] @@ -268,7 +264,7 @@ interface CKContainer { [Async] void DiscoverUserIdentity (CKRecordID userRecordID, Action completionHandler); - [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use 'DiscoverUserIdentity' instead.")] + [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use DiscoverUserIdentity instead")] [NoWatch] [Export ("discoverUserInfoWithUserRecordID:completionHandler:")] [Async] @@ -399,7 +395,7 @@ interface CKDatabaseOperation { [NoWatch] [NoTV] - [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use 'CKDiscoverAllUserIdentitiesOperation' instead.")] + [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use CKDiscoverAllUserIdentitiesOperation instead")] [iOS (8,0), Mac (10,10, onlyOn64 : true)] [BaseType (typeof (CKOperation))] interface CKDiscoverAllContactsOperation { @@ -408,7 +404,7 @@ interface CKDiscoverAllContactsOperation { Action DiscoverAllContactsHandler { get; set; } } - [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use 'CKUserIdentity' instead.")] + [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use CKUserIdentity instead")] [iOS (8,0), Mac (10,10, onlyOn64 : true)] [NoWatch] [BaseType (typeof (NSObject))] @@ -417,11 +413,11 @@ interface CKDiscoveredUserInfo : NSCoding, NSCopying, NSSecureCoding { [Export ("userRecordID", ArgumentSemantic.Copy)] CKRecordID UserRecordId { get; } - [Availability (Introduced = Platform.Mac_10_10 | Platform.iOS_8_0, Deprecated = Platform.Mac_10_11 | Platform.iOS_9_0, Message = "Use 'DisplayContact.GivenName'.")] + [Availability (Introduced = Platform.Mac_10_10 | Platform.iOS_8_0, Deprecated = Platform.Mac_10_11 | Platform.iOS_9_0, Message = "Use DisplayContact.GivenName")] [Export ("firstName", ArgumentSemantic.Copy)] string FirstName { get; } - [Availability (Introduced = Platform.Mac_10_10 | Platform.iOS_8_0, Deprecated = Platform.Mac_10_11 | Platform.iOS_9_0, Message = "Use 'DisplayContact.FamilyName'.")] + [Availability (Introduced = Platform.Mac_10_10 | Platform.iOS_8_0, Deprecated = Platform.Mac_10_11 | Platform.iOS_9_0, Message = "Use DisplayContact.FamilyName")] [Export ("lastName", ArgumentSemantic.Copy)] string LastName { get; } @@ -439,7 +435,7 @@ interface CKDiscoveredUserInfo : NSCoding, NSCopying, NSSecureCoding { [iOS (8,0), Mac (10,10, onlyOn64 : true)] delegate void CKDiscoverUserInfosCompletionHandler (NSDictionary emailsToUserInfos, NSDictionary userRecordIdsToUserInfos, NSError operationError); - [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use 'CKDiscoverUserIdentitiesOperation' instead.")] + [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use CKDiscoverUserIdentitiesOperation instead")] [iOS (8,0), Mac (10,10, onlyOn64 : true)] [NoWatch] [BaseType (typeof (CKOperation))] @@ -493,8 +489,6 @@ interface CKErrorFields { [iOS (8,0), Watch (3,0), TV (10,0), Mac (10,10, onlyOn64 : true)] [BaseType (typeof (CKOperation))] - [Availability (Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13 | Platform.Watch_4_0 | Platform.TV_11_0, - Message = "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] interface CKFetchNotificationChangesOperation { [Export ("initWithPreviousServerChangeToken:")] IntPtr Constructor ([NullAllowed] CKServerChangeToken previousServerChangeToken); @@ -536,7 +530,7 @@ interface CKServerChangeToken : NSCopying, NSSecureCoding { [iOS (8,0), Mac (10,10, onlyOn64 : true)] delegate void CKFetchRecordChangesHandler (CKServerChangeToken serverChangeToken, NSData clientChangeTokenData, NSError operationError); - [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use 'CKFetchRecordZoneChangesOperation' instead.")] + [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use CKFetchRecordZoneChangesOperation instead")] [iOS (8,0), Mac (10,10, onlyOn64 : true)] [NoWatch] [BaseType (typeof (CKDatabaseOperation))] @@ -584,16 +578,16 @@ CKFetchRecordChangesHandler AllChangesReported { } } - [iOS (10,0), Watch (3,0), TV (10,0), Mac (10, 12, onlyOn64 : true)] + [iOS (10,0), Watch (3,0), TV (10,0), Mac (12,10, onlyOn64 : true)] delegate void CKFetchRecordZoneChangesWithIDWasDeletedHandler (CKRecordID recordID, NSString recordType); - [iOS (10,0), Watch (3,0), TV (10,0), Mac (10,12, onlyOn64 : true)] + [iOS (10,0), Watch (3,0), TV (10,0), Mac (12,10, onlyOn64 : true)] delegate void CKFetchRecordZoneChangesTokensUpdatedHandler (CKRecordZoneID recordZoneID, CKServerChangeToken serverChangeToken, NSData clientChangeTokenData); - [iOS (10,0), Watch (3,0), TV (10,0), Mac (10,12, onlyOn64 : true)] + [iOS (10,0), Watch (3,0), TV (10,0), Mac (12,10, onlyOn64 : true)] delegate void CKFetchRecordZoneChangesFetchCompletedHandler (CKRecordZoneID recordZoneID, CKServerChangeToken serverChangeToken, NSData clientChangeTokenData, bool moreComing, NSError recordZoneError); - [iOS (10,0), Watch (3,0), TV (10,0), Mac (10,12, onlyOn64 : true)] + [iOS (10,0), Watch (3,0), TV (10,0), Mac (12,10, onlyOn64 : true)] [BaseType (typeof(CKDatabaseOperation))] interface CKFetchRecordZoneChangesOperation { @@ -628,7 +622,7 @@ interface CKFetchRecordZoneChangesOperation [iOS (10,0), Watch (3,0), TV (10,0), Mac (10,12, onlyOn64 : true)] [BaseType (typeof(NSObject))] - interface CKFetchRecordZoneChangesOptions : NSSecureCoding, NSCopying + interface CKFetchRecordZoneChangesOptions : NSSecureCoding { [NullAllowed, Export ("previousServerChangeToken", ArgumentSemantic.Copy)] CKServerChangeToken PreviousServerChangeToken { get; set; } @@ -764,8 +758,6 @@ interface CKLocationSortDescriptor : NSSecureCoding { [iOS (8,0), Mac (10,10, onlyOn64 : true)] [BaseType (typeof (CKOperation))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: You must call -[CKMarkNotificationsReadOperation initWithNotificationIDsToMarkRead:] - [Availability (Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13 | Platform.Watch_4_0 | Platform.TV_11_0, - Message = "Use 'CKDatabaseSubscription', 'CKFetchDatabaseChangesOperation' and 'CKFetchRecordZoneChangesOperation' instead.")] interface CKMarkNotificationsReadOperation { [DesignatedInitializer] @@ -786,7 +778,6 @@ CKMarkNotificationsReadHandler Completed { [iOS (8,0), Watch (3,0), TV (10,0), Mac (10,10, onlyOn64 : true)] [DisableDefaultCtor] // does not work on watchOS, working stub provided to ease source compatibility [BaseType (typeof (CKOperation))] - [Availability (Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13 | Platform.Watch_4_0 | Platform.TV_11_0)] interface CKModifyBadgeOperation { [Export ("initWithBadgeValue:")] @@ -803,7 +794,7 @@ Action Completed { } } - [iOS (8,0), Mac (10,10, onlyOn64 : true), Watch (3,0)] + [iOS (8,0), Mac (10,10, onlyOn64 : true)] delegate void CKModifyRecordsOperationHandler (CKRecord [] savedRecords, CKRecordID [] deletedRecordIds, NSError operationError); [iOS (8,0), Watch (3,0), TV (10,0), Mac (10,10, onlyOn64 : true)] @@ -977,30 +968,6 @@ interface CKNotification : NSSecureCoding { [iOS (9,0)][Mac (10,11)] [NullAllowed, Export ("category")] string Category { get; } - - [Watch (4, 0), NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("title")] - string Title { get; } - - [Watch (4, 0), NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("titleLocalizationKey")] - string TitleLocalizationKey { get; } - - [Watch (4, 0), NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("titleLocalizationArgs", ArgumentSemantic.Copy)] - string[] TitleLocalizationArgs { get; } - - [Watch (4, 0), NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("subtitle")] - string Subtitle { get; } - - [Watch (4, 0), NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("subtitleLocalizationKey")] - string SubtitleLocalizationKey { get; } - - [Watch (4, 0), NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("subtitleLocalizationArgs", ArgumentSemantic.Copy)] - string[] SubtitleLocalizationArgs { get; } } [Watch (3,0)] @@ -1022,7 +989,7 @@ interface CKQueryNotification : NSCoding, NSSecureCoding { [NullAllowed, Export ("recordID", ArgumentSemantic.Copy)] CKRecordID RecordId { get; } - [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use 'DatabaseScope' instead.")] + [Availability (Introduced = Platform.iOS_8_0 | Platform.Mac_10_10 , Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12, Message = "Use DatabaseScope instead")] [Export ("isPublicDatabase", ArgumentSemantic.UnsafeUnretained)] bool IsPublicDatabase { get; } @@ -1054,28 +1021,6 @@ interface CKDatabaseNotification CKDatabaseScope DatabaseScope { get; } } - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64 : true), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface CKOperationConfiguration : NSSecureCoding, NSCopying { - [NullAllowed, Export ("container", ArgumentSemantic.Strong)] - CKContainer Container { get; set; } - - [Export ("qualityOfService", ArgumentSemantic.Assign)] - NSQualityOfService QualityOfService { get; set; } - - [Export ("allowsCellularAccess")] - bool AllowsCellularAccess { get; set; } - - [Export ("longLived")] - bool LongLived { [Bind ("isLongLived")] get; set; } - - [Export ("timeoutIntervalForRequest")] - double TimeoutIntervalForRequest { get; set; } - - [Export ("timeoutIntervalForResource")] - double TimeoutIntervalForResource { get; set; } - } - [Watch (3,0)] [iOS (8,0), Mac (10,10, onlyOn64 : true)] [BaseType (typeof (NSOperation))] @@ -1090,19 +1035,15 @@ interface CKOperation { // [Export ("activityStart")] // ulong ActivityStart (); - [Availability (Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13 | Platform.Watch_4_0 | Platform.TV_11_0, - Message = "Use 'CKOperationConfiguration' instead.")] [NullAllowed, Export ("container", ArgumentSemantic.Retain)] CKContainer Container { get; set; } [NoWatch] - [Deprecated (PlatformName.iOS, 9,0, message: "Use 'QualityOfService' property.")] - [Deprecated (PlatformName.MacOSX, 10,11, message: "Use 'QualityOfService' property.")] + [Deprecated (PlatformName.iOS, 9,0, message: "Use QualityOfService property")] + [Deprecated (PlatformName.MacOSX, 10,11, message: "Use QualityOfService property")] [Export ("usesBackgroundSession", ArgumentSemantic.UnsafeUnretained)] bool UsesBackgroundSession { get; set; } - [Availability (Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13 | Platform.Watch_4_0 | Platform.TV_11_0, - Message = "Use 'CKOperationConfiguration' instead.")] [Export ("allowsCellularAccess", ArgumentSemantic.UnsafeUnretained)] bool AllowsCellularAccess { get; set; } @@ -1114,20 +1055,14 @@ interface CKOperation { [iOS (9,3)][Mac (10,11,4)] [TV (9,2)] [Export ("longLived")] - [Availability (Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13 | Platform.Watch_4_0 | Platform.TV_11_0, - Message = "Use 'CKOperationConfiguration' instead.")] bool LongLived { [Bind ("isLongLived")] get; set; } [iOS (10,0), TV (10,0), Mac (10,12, onlyOn64 : true)] [Export ("timeoutIntervalForRequest")] - [Availability (Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13 | Platform.Watch_4_0 | Platform.TV_11_0, - Message = "Use 'CKOperationConfiguration' instead.")] double TimeoutIntervalForRequest { get; set; } [iOS (10,0), TV (10,0), Mac (10,12, onlyOn64 : true)] [Export ("timeoutIntervalForResource")] - [Availability (Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13 | Platform.Watch_4_0 | Platform.TV_11_0, - Message = "Use 'CKOperationConfiguration' instead.")] double TimeoutIntervalForResource { get; set; } [iOS (9,3)][Mac (10,11,4)] @@ -1135,38 +1070,6 @@ interface CKOperation { [NullAllowed] [Export ("longLivedOperationWasPersistedBlock", ArgumentSemantic.Strong)] Action LongLivedOperationWasPersistedCallback { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [Export ("configuration", ArgumentSemantic.Copy)] - CKOperationConfiguration Configuration { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("group", ArgumentSemantic.Strong)] - CKOperationGroup Group { get; set; } - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64 : true), iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface CKOperationGroup : NSSecureCoding { - - [Export ("operationGroupID")] - string OperationGroupId { get; } - - [Export ("defaultConfiguration", ArgumentSemantic.Copy)] - CKOperationConfiguration DefaultConfiguration { get; set; } - - [NullAllowed, Export ("name")] - string Name { get; set; } - - [Export ("quantity")] - nuint Quantity { get; set; } - - [Export ("expectedSendSize", ArgumentSemantic.Assign)] - CKOperationGroupTransferSize ExpectedSendSize { get; set; } - - [Export ("expectedReceiveSize", ArgumentSemantic.Assign)] - CKOperationGroupTransferSize ExpectedReceiveSize { get; set; } } [Watch (3,0)] @@ -1284,7 +1187,7 @@ interface CKRecord : NSSecureCoding, NSCopying { #if XAMCORE_2_0 CKRecordID Id { get; } #else - [Obsolete ("Use 'Id' instead.")] + [Obsolete ("Use Id instead")] CKRecordID RecordId { get; } #endif @@ -1497,24 +1400,24 @@ interface CKDatabaseSubscription : NSSecureCoding, NSCopying [BaseType (typeof (NSObject))] interface CKSubscription : NSSecureCoding, NSCopying { - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKQuerySubscription'.")] - [Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKQuerySubscription'.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use CKQuerySubscription")] + [Deprecated (PlatformName.MacOSX, 10,12, message: "Use CKQuerySubscription")] [Export ("initWithRecordType:predicate:options:")] IntPtr Constructor (string recordType, NSPredicate predicate, CKSubscriptionOptions subscriptionOptions); - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKQuerySubscription'.")] - [Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKQuerySubscription'.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use CKQuerySubscription")] + [Deprecated (PlatformName.MacOSX, 10,12, message: "Use CKQuerySubscription")] [DesignatedInitializer] [Export ("initWithRecordType:predicate:subscriptionID:options:")] IntPtr Constructor (string recordType, NSPredicate predicate, string subscriptionId, CKSubscriptionOptions subscriptionOptions); - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKRecordZoneSubscription'.")] - [Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKRecordZoneSubscription'.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use CKRecordZoneSubscription")] + [Deprecated (PlatformName.MacOSX, 10,12, message: "Use CKRecordZoneSubscription")] [Export ("initWithZoneID:options:")] IntPtr Constructor (CKRecordZoneID zoneId, CKSubscriptionOptions subscriptionOptions); - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKRecordZoneSubscription'.")] - [Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKRecordZoneSubscription'.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use CKRecordZoneSubscription")] + [Deprecated (PlatformName.MacOSX, 10,12, message: "Use CKRecordZoneSubscription")] [DesignatedInitializer] [Export ("initWithZoneID:subscriptionID:options:")] IntPtr Constructor (CKRecordZoneID zoneId, string subscriptionId, CKSubscriptionOptions subscriptionOptions); @@ -1525,18 +1428,18 @@ interface CKSubscription : NSSecureCoding, NSCopying { [Export ("subscriptionType", ArgumentSemantic.UnsafeUnretained)] CKSubscriptionType SubscriptionType { get; } - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKQuerySubscription'.")] - [Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKQuerySubscription'.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use CKQuerySubscription")] + [Deprecated (PlatformName.MacOSX, 10,12, message: "Use CKQuerySubscription")] [Export ("recordType")] string RecordType { get; } - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKQuerySubscription'.")] - [Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKQuerySubscription'.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use CKQuerySubscription")] + [Deprecated (PlatformName.MacOSX, 10,12, message: "Use CKQuerySubscription")] [Export ("predicate", ArgumentSemantic.Copy)] NSPredicate Predicate { get; } - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKQuerySubscriptionOptions'.")] - [Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKQuerySubscriptionOptions'.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use CKQuerySubscriptionOptions")] + [Deprecated (PlatformName.MacOSX, 10,12, message: "Use CKQuerySubscriptionOptions")] [Export ("subscriptionOptions", ArgumentSemantic.UnsafeUnretained)] CKSubscriptionOptions SubscriptionOptions { get; } @@ -1544,8 +1447,8 @@ interface CKSubscription : NSSecureCoding, NSCopying { [Export ("notificationInfo", ArgumentSemantic.Copy)] CKNotificationInfo NotificationInfo { get; set; } - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'CKRecordZoneSubscription'.")] - [Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'CKRecordZoneSubscription'.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use CKRecordZoneSubscription")] + [Deprecated (PlatformName.MacOSX, 10,12, message: "Use CKRecordZoneSubscription")] [Export ("zoneID", ArgumentSemantic.Copy)] CKRecordZoneID ZoneID { get; set; } } @@ -1600,38 +1503,6 @@ interface CKNotificationInfo : NSSecureCoding, NSCopying, NSCoding { [iOS (9,0)][Mac (10,11)] [NullAllowed, Export ("category")] string Category { get; set; } - - [NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("title")] - string Title { get; set; } - - [NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("titleLocalizationKey")] - string TitleLocalizationKey { get; set; } - - [NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("titleLocalizationArgs", ArgumentSemantic.Copy)] - string[] TitleLocalizationArgs { get; set; } - - [NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("subtitle")] - string Subtitle { get; set; } - - [NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("subtitleLocalizationKey")] - string SubtitleLocalizationKey { get; set; } - - [NoTV, Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("subtitleLocalizationArgs", ArgumentSemantic.Copy)] - string[] SubtitleLocalizationArgs { get; set; } - - [Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [Export ("shouldSendMutableContent")] - bool ShouldSendMutableContent { get; set; } - - [Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("collapseIDKey")] - string CollapseIdKey { get; set; } } [Watch (3,0)] @@ -1785,10 +1656,6 @@ interface CKFetchDatabaseChangesOperation [NullAllowed, Export ("changeTokenUpdatedBlock", ArgumentSemantic.Copy)] Action ChangeTokenUpdated { get; set; } - [Watch (4, 0), TV (11, 0), Mac (10, 13, onlyOn64 : true), iOS (11, 0)] - [NullAllowed, Export ("recordZoneWithIDWasPurgedBlock", ArgumentSemantic.Copy)] - Action WasPurged { get; set; } - [NullAllowed, Export ("fetchDatabaseChangesCompletionBlock", ArgumentSemantic.Copy)] CKFetchDatabaseChangesCompletionHandler ChangesCompleted { get; set; } } diff --git a/src/contacts.cs b/src/contacts.cs index a669dd101e8..ff267e4dde8 100644 --- a/src/contacts.cs +++ b/src/contacts.cs @@ -12,7 +12,6 @@ using XamCore.ObjCRuntime; using XamCore.Foundation; - namespace XamCore.Contacts { #if XAMCORE_2_0 // The Contacts framework uses generics heavily, which is only supported in Unified (for now at least) @@ -27,7 +26,7 @@ interface CNKeyDescriptor : NSObjectProtocol, NSSecureCoding, NSCopying { [iOS (9,0), Mac (10,11, onlyOn64: true)] [BaseType (typeof (NSObject))] - interface CNContact : NSCopying, NSMutableCopying, NSSecureCoding, NSItemProviderReading, NSItemProviderWriting { + interface CNContact : NSCopying, NSMutableCopying, NSSecureCoding { [Export ("identifier")] string Identifier { get; } @@ -421,14 +420,6 @@ interface CNLabelContactRelationKey { [Field ("CNLabelContactRelationManager")] NSString Manager { get; } - - [iOS (11,0), Mac (10,13, onlyOn64: true)] - [Field ("CNLabelContactRelationSon")] - NSString Son { get; } - - [iOS (11,0), Mac (10,13, onlyOn64: true)] - [Field ("CNLabelContactRelationDaughter")] - NSString Daughter { get; } } delegate void CNContactStoreRequestAccessHandler (bool granted, NSError error); @@ -463,7 +454,7 @@ interface CNContactStore { NSObject GetUnifiedMeContact (NSArray keys, out NSError error); #if !XAMCORE_4_0 && !WATCH - [Obsolete ("Use the overload that takes 'CNContactStoreListContactsHandler' instead.")] + [Obsolete ("Use the overload that takes CNContactStoreListContactsHandler instead")] [Export ("enumerateContactsWithFetchRequest:error:usingBlock:")] bool EnumerateContacts (CNContactFetchRequest fetchRequest, out NSError error, CNContactStoreEnumerateContactsHandler handler); @@ -484,7 +475,6 @@ interface CNContactStore { #endif [Export ("defaultContainerIdentifier")] - [NullAllowed] string DefaultContainerIdentifier { get; } [Notification] @@ -531,17 +521,17 @@ interface CNContactVCardSerialization { [BaseType (typeof (CNContainer))] interface CNContainer_PredicatesExtension { - [Obsolete ("Use 'CNContainer.CreatePredicateForContainers' instead.")] + [Obsolete ("Use CNContainer.CreatePredicateForContainers instead")] [Static] [Export ("predicateForContainersWithIdentifiers:")] NSPredicate GetPredicateForContainers (string [] identifiers); - [Obsolete ("Use 'CNContainer.CreatePredicateForContainerOfContact' instead.")] + [Obsolete ("Use CNContainer.CreatePredicateForContainerOfContact instead")] [Static] [Export ("predicateForContainerOfContactWithIdentifier:")] NSPredicate GetPredicateForContainerOfContact (string contactIdentifier); - [Obsolete ("Use 'CNContainer.CreatePredicateForContainerOfGroup' instead.")] + [Obsolete ("Use CNContainer.CreatePredicateForContainerOfGroup instead")] [Static] [Export ("predicateForContainerOfGroupWithIdentifier:")] NSPredicate GetPredicateForContainerOfGroup (string groupIdentifier); @@ -627,18 +617,18 @@ interface CNErrorUserInfoKey { [BaseType (typeof (CNGroup))] interface CNGroup_PredicatesExtension { - [Obsolete ("Use 'CNGroup.CreatePredicateForGroups' instead.")] + [Obsolete ("Use CNGroup.CreatePredicateForGroups instead")] [Static] [Export ("predicateForGroupsWithIdentifiers:")] NSPredicate GetPredicateForGroups (string [] identifiers); - [Obsolete ("Use 'CNGroup.CreatePredicateForSubgroupsInGroup' instead.")] + [Obsolete ("Use CNGroup.CreatePredicateForSubgroupsInGroup instead")] [NoiOS][NoWatch] [Static] [Export ("predicateForSubgroupsInGroupWithIdentifier:")] NSPredicate GetPredicateForSubgroupsInGroup (string parentGroupIdentifier); - [Obsolete ("Use 'CNGroup.CreatePredicateForGroupsInContainer' instead.")] + [Obsolete ("Use CNGroup.CreatePredicateForGroupsInContainer instead")] [Static] [Export ("predicateForGroupsInContainerWithIdentifier:")] NSPredicate GetPredicateForGroupsInContainer (string containerIdentifier); @@ -998,13 +988,15 @@ interface CNMutablePostalAddress { [DisableDefaultCtor] // Apple doc: no handle (nil) if no string (or nil string) is given interface CNPhoneNumber : NSCopying, NSSecureCoding, INSCopying, INSSecureCoding { + // @required + (instancetype)phoneNumberWithStringValue:(NSString *)stringValue; [Static, Export ("phoneNumberWithStringValue:")] - [return: NullAllowed] CNPhoneNumber PhoneNumberWithStringValue (string stringValue); + // @required - (instancetype)initWithStringValue:(NSString *)string; [Export ("initWithStringValue:")] IntPtr Constructor (string stringValue); + // @property (readonly, copy, nonatomic) NSString * stringValue; [Export ("stringValue")] string StringValue { get; } } @@ -1069,13 +1061,8 @@ interface CNPostalAddress : NSCopying, NSMutableCopying, NSSecureCoding, INSCopy [Static] [Export ("localizedStringForKey:")] string LocalizeProperty (NSString property); - - [Static] - [Wrap ("LocalizeProperty (option.GetConstant ())")] - string LocalizeProperty (CNPostalAddressKeyOption option); } -#if !XAMCORE_4_0 [iOS (9,0), Mac (10,11, onlyOn64: true)] [Static] [EditorBrowsable (EditorBrowsableState.Advanced)] @@ -1107,31 +1094,6 @@ interface CNPostalAddressKey { // Can be used in KVO [Field ("CNPostalAddressISOCountryCodeKey")] NSString IsoCountryCode { get; } } -#endif - - [iOS (9,0), Mac (10,11, onlyOn64: true)] - public enum CNPostalAddressKeyOption { - [Field ("CNPostalAddressStreetKey")] - Street, - [Field ("CNPostalAddressCityKey")] - City, - [Field ("CNPostalAddressStateKey")] - State, - [Field ("CNPostalAddressPostalCodeKey")] - PostalCode, - [Field ("CNPostalAddressCountryKey")] - Country, - [Field ("CNPostalAddressISOCountryCodeKey")] - IsoCountryCode, - - [iOS (10,3)] [Mac (10,12,4, onlyOn64: true)] - [Field ("CNPostalAddressSubLocalityKey")] - SubLocality, - - [iOS (10,3)] [Mac (10,12,4, onlyOn64: true)] - [Field ("CNPostalAddressSubAdministrativeAreaKey")] - SubAdministrativeArea, - } [iOS (9,0), Mac (10,11, onlyOn64: true)] [BaseType (typeof (NSFormatter))] @@ -1220,14 +1182,9 @@ interface CNSocialProfile : NSCopying, NSSecureCoding, INSCopying, INSSecureCodi IntPtr Constructor ([NullAllowed] string url, [NullAllowed] string username, [NullAllowed] string userIdentifier, [NullAllowed] string service); [Static] - [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("localizedStringForKey:")] string LocalizeProperty (NSString key); - [Static] - [Wrap ("LocalizeProperty (key.GetConstant ())")] - string LocalizeProperty (CNPostalAddressKeyOption key); - [Static] [Export ("localizedStringForService:")] string LocalizeService (NSString service); diff --git a/src/coreanimation.cs b/src/coreanimation.cs index 7f5adc3092d..28b99457493 100644 --- a/src/coreanimation.cs +++ b/src/coreanimation.cs @@ -114,7 +114,7 @@ interface CAConstraintLayoutManager : NSCoding { } [BaseType (typeof (NSObject))] - interface CAConstraint : NSSecureCoding { + interface CAConstraint : NSCoding { [Export ("attribute")] CAConstraintAttribute Attribute { get; } @@ -170,9 +170,9 @@ interface CADisplayLink { [Export ("paused")] bool Paused { [Bind ("isPaused")] get; set; } - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'PreferredFramesPerSecond' property.")] - [Deprecated (PlatformName.TvOS, 10,0, message: "Use 'PreferredFramesPerSecond' property.")] - [Deprecated (PlatformName.WatchOS, 3,0, message: "Use 'PreferredFramesPerSecond' property.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use PreferredFramesPerSecond property")] + [Deprecated (PlatformName.TvOS, 10,0, message: "Use PreferredFramesPerSecond property")] + [Deprecated (PlatformName.WatchOS, 3,0, message: "Use PreferredFramesPerSecond property")] [Export ("frameInterval")] nint FrameInterval { get; set; } @@ -201,7 +201,7 @@ enum CAContentsFormat { [BaseType (typeof (NSObject))] [Dispose ("OnDispose ();")] - interface CALayer : CAMediaTiming, NSSecureCoding { + interface CALayer : CAMediaTiming, NSCoding { [Export ("layer")][Static] CALayer Create (); @@ -587,11 +587,6 @@ interface CALayer : CAMediaTiming, NSSecureCoding { [NullAllowed] // by default this property is null [Export ("compositingFilter", ArgumentSemantic.Strong)] NSObject CompositingFilter { get; set; } - - [NoWatch] // headers not updated - [TV (11,0)][Mac (10,13)][iOS (11,0)] - [Export ("maskedCorners", ArgumentSemantic.Assign)] - CACornerMask MaskedCorners { get; set; } } #if XAMCORE_2_0 || !MONOMAC @@ -633,16 +628,6 @@ interface CAMetalLayer { [Export ("presentsWithTransaction")] bool PresentsWithTransaction { [Bind ("presentsWithTransaction")] get; set; } - - [NoWatch][NoTV][NoiOS] - [Mac (10,13)] - [Export ("displaySyncEnabled")] - bool DisplaySyncEnabled { get; set; } - - [NoWatch] // headers not updated - [TV (11,0)][Mac (10,13)][iOS (11,0)] - [Export ("allowsNextDrawableTimeout")] - bool AllowsNextDrawableTimeout { get; set; } } #endif @@ -927,7 +912,7 @@ interface CAAction { } [BaseType (typeof (NSObject), Delegates=new string [] {"WeakDelegate"}, Events=new Type [] { typeof (CAAnimationDelegate)})] - interface CAAnimation : CAAction, CAMediaTiming, NSSecureCoding, NSMutableCopying { + interface CAAnimation : CAAction, CAMediaTiming, NSCoding, NSMutableCopying { [Export ("animation"), Static] CAAnimation CreateAnimation (); @@ -1013,15 +998,15 @@ interface CAAnimation : CAAction, CAMediaTiming, NSSecureCoding, NSMutableCopyin NSString RotateModeAutoReverse { get; } #region SceneKitAdditions - [iOS (8,0)][Mac (10,9, onlyOn64 : true)] + [iOS (8,0)] [Export ("usesSceneTimeBase")] bool UsesSceneTimeBase { get; set; } - [iOS (8,0)][Mac (10,9, onlyOn64 : true)] + [iOS (8,0)][Mac (10,9)] [Export ("fadeInDuration")] nfloat FadeInDuration { get; set; } - [iOS (8,0)][Mac (10,9, onlyOn64 : true)] + [iOS (8,0)][Mac (10,9)] [Export ("fadeOutDuration")] nfloat FadeOutDuration { get; set; } @@ -1324,7 +1309,7 @@ interface CAGradientLayer { [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface CAMediaTimingFunction : NSSecureCoding { + interface CAMediaTimingFunction : NSCoding { [Export ("functionWithName:")][Static] CAMediaTimingFunction FromName (NSString name); @@ -1355,7 +1340,7 @@ interface CAMediaTimingFunction : NSSecureCoding { } [BaseType (typeof (NSObject))] - interface CAValueFunction : NSSecureCoding { + interface CAValueFunction : NSCoding { [Export ("functionWithName:"), Static] CAValueFunction FromName (string name); @@ -1429,7 +1414,7 @@ interface CAOpenGLLayer { [Since (5,0)] [BaseType (typeof (NSObject))] - interface CAEmitterCell : CAMediaTiming, NSSecureCoding { + interface CAEmitterCell : CAMediaTiming, NSCoding { [NullAllowed] // by default this property is null [Export ("name", ArgumentSemantic.Copy)] string Name { get; set; } @@ -1660,7 +1645,7 @@ interface CAEmitterLayer { [Since(7,0), Mavericks] [BaseType (typeof (NSObject))] - interface CAEmitterBehavior : NSSecureCoding { + interface CAEmitterBehavior : NSCoding { [Export ("initWithType:")] IntPtr Constructor (NSString type); diff --git a/src/coreaudiokit.cs b/src/coreaudiokit.cs index 4c11fce972a..7f0a95e8b69 100644 --- a/src/coreaudiokit.cs +++ b/src/coreaudiokit.cs @@ -33,33 +33,6 @@ interface AUViewController : NSExtensionRequestHandling { [PostGet ("NibBundle")] IntPtr Constructor ([NullAllowed] string nibName, [NullAllowed] NSBundle bundle); } - - [iOS (11,0)][Mac (10,13, onlyOn64: true)] - [BaseType (typeof (NSObject))] - interface AUAudioUnitViewConfiguration : NSSecureCoding { - [Export ("initWithWidth:height:hostHasController:")] - IntPtr Constructor (nfloat width, nfloat height, bool hostHasController); - - [Export ("width")] - nfloat Width { get; } - - [Export ("height")] - nfloat Height { get; } - - [Export ("hostHasController")] - bool HostHasController { get; } - } - - [Category] - [iOS (11,0)][Mac (10,13, onlyOn64: true)] - [BaseType (typeof (AUAudioUnit))] - interface AUAudioUnitViewControllerExtensions { - [Export ("supportedViewConfigurations:")] - NSIndexSet GetSupportedViewConfigurations (AUAudioUnitViewConfiguration [] availableViewConfigurations); - - [Export ("selectViewConfiguration:")] - void SelectViewConfiguration (AUAudioUnitViewConfiguration viewConfiguration); - } #endif #if !MONOMAC diff --git a/src/corebluetooth.cs b/src/corebluetooth.cs index ec9d2b2dce7..87edad0dea8 100644 --- a/src/corebluetooth.cs +++ b/src/corebluetooth.cs @@ -14,16 +14,15 @@ namespace XamCore.CoreBluetooth { - [Watch (4,0)] +#if !MONOMAC [iOS (8,0)] - [Mac (10,13)] [BaseType (typeof (NSObject))] interface CBAttribute { [Export ("UUID")] CBUUID UUID { get; [NotImplemented] set; } } +#endif - [Watch (4,0)] [StrongDictionary ("CBCentralManager")] interface CBCentralInitOptions { [Export ("OptionShowPowerAlertKey")] @@ -35,9 +34,7 @@ interface CBCentralInitOptions { #endif } - [Watch (4,0)] - [iOS (10,0)] - [Mac (10,13)] + [iOS (10,0)][NoMac] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface CBManager { @@ -45,12 +42,23 @@ interface CBManager { CBManagerState State { get; } } - [Watch (4,0)] [Since (5,0)] [Lion] - [BaseType (typeof (CBManager), Delegates=new[] {"WeakDelegate"}, Events = new[] { typeof (CBCentralManagerDelegate)})] + [BaseType ( +#if MONOMAC + typeof (NSObject) +#else + typeof (CBManager) +#endif + , Delegates=new[] {"WeakDelegate"}, Events = new[] { typeof (CBCentralManagerDelegate)})] [DisableDefaultCtor] // crash (at dispose time) on OSX interface CBCentralManager { +#if MONOMAC + // Removed in iOS 10 – The selector now exists in the base type. + // Note: macOS doesn't inherit from CBManager. + [Export ("state")] + CBCentralManagerState State { get; } +#endif [Export ("delegate", ArgumentSemantic.Assign), NullAllowed] NSObject WeakDelegate { get; set; } @@ -63,7 +71,9 @@ interface CBCentralManager { [PostGet ("WeakDelegate")] IntPtr Constructor ([NullAllowed, Protocolize] CBCentralManagerDelegate centralDelegate, [NullAllowed] DispatchQueue queue); +#if !MONOMAC [DesignatedInitializer] +#endif [iOS (7,0), Mac (10,9)] [Export ("initWithDelegate:queue:options:")] [PostGet ("WeakDelegate")] @@ -74,17 +84,13 @@ interface CBCentralManager { IntPtr Constructor ([NullAllowed, Protocolize] CBCentralManagerDelegate centralDelegate, [NullAllowed] DispatchQueue queue, CBCentralInitOptions options); [NoTV] - [NoWatch] [Availability (Obsoleted = Platform.iOS_9_0)] - [Mac (10, 7, onlyOn64: true)] // Was removed from 32-bit in 10.13 unannounced [Export ("retrievePeripherals:"), Internal] void RetrievePeripherals (NSArray peripheralUUIDs); [NoTV] - [NoWatch] - [Mac (10, 7, onlyOn64: true)] // Was removed from 32-bit in 10.13 unannounced [Export ("retrieveConnectedPeripherals")] - [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_9_0, Message = "Use 'RetrievePeripheralsWithIdentifiers' instead.")] + [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_9_0, Message = "Use RetrievePeripheralsWithIdentifiers instead")] void RetrieveConnectedPeripherals (); [Export ("scanForPeripheralsWithServices:options:"), Internal] @@ -105,35 +111,37 @@ interface CBCentralManager { [Field ("CBConnectPeripheralOptionNotifyOnDisconnectionKey")] NSString OptionNotifyOnDisconnectionKey { get; } - [Mac (10,13)] +#if !MONOMAC + [Availability (Unavailable = Platform.Mac_Version)] [Since (6,0)] [Field ("CBConnectPeripheralOptionNotifyOnConnectionKey")] NSString OptionNotifyOnConnectionKey { get; } - [Mac (10,13)] + [Availability (Unavailable = Platform.Mac_Version)] [Since (6,0)] [Field ("CBConnectPeripheralOptionNotifyOnNotificationKey")] NSString OptionNotifyOnNotificationKey { get; } + [Availability (Unavailable = Platform.Mac_Version)] [Field ("CBCentralManagerOptionRestoreIdentifierKey")] [Since (7,0)] - [Mac (10,13)] NSString OptionRestoreIdentifierKey { get; } [Field ("CBCentralManagerRestoredStatePeripheralsKey")] [Since (7,0)] - [Mac (10,13)] + [Availability (Unavailable = Platform.Mac_Version)] NSString RestoredStatePeripheralsKey { get; } [Field ("CBCentralManagerRestoredStateScanServicesKey")] [Since (7,0)] - [Mac (10,13)] + [Availability (Unavailable = Platform.Mac_Version)] NSString RestoredStateScanServicesKey { get; } [Field ("CBCentralManagerRestoredStateScanOptionsKey")] [Since (7,0)] - [Mac (10,13)] + [Availability (Unavailable = Platform.Mac_Version)] NSString RestoredStateScanOptionsKey { get; } +#endif [Since (7,0), Mac (10,9)] [Export ("retrievePeripheralsWithIdentifiers:")] @@ -151,13 +159,13 @@ interface CBCentralManager { [Since (7,0), Mac (10,9)] NSString ScanOptionSolicitedServiceUUIDsKey { get; } +#if !MONOMAC [iOS (9,0)] - [Mac (10,13)] [Export ("isScanning")] bool IsScanning { get; } +#endif } - [Watch (4,0)] [StrongDictionary ("AdvertisementDataKeys")] interface AdvertisementData { string LocalName { get; set; } @@ -175,7 +183,6 @@ interface AdvertisementData { CBUUID [] SolicitedServiceUuids { get; set; } } - [Watch (4,0)] [Static, Internal] interface AdvertisementDataKeys { [Field ("CBAdvertisementDataLocalNameKey")] @@ -205,11 +212,10 @@ interface AdvertisementDataKeys { NSString SolicitedServiceUuidsKey { get; } } - [Watch (4,0)] [StrongDictionary ("PeripheralScanningOptionsKeys")] interface PeripheralScanningOptions { } - [Watch (4,0)] + [StrongDictionary ("RestoredStateKeys")] interface RestoredState { CBPeripheral [] Peripherals { get; set; } @@ -217,7 +223,6 @@ interface RestoredState { PeripheralScanningOptions ScanOptions { get; set; } } - [Watch (4,0)] [Static, Internal] interface RestoredStateKeys { [Since (7,0)] @@ -233,7 +238,6 @@ interface RestoredStateKeys { NSString ScanOptionsKey { get; } } - [Watch (4,0)] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -243,13 +247,11 @@ interface CBCentralManagerDelegate { void UpdatedState (CBCentralManager central); [NoTV] - [NoWatch] [Availability (Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_8_4)] // Available in iOS 5.0 through iOS 8.4. Deprecated in iOS 7.0. [Export ("centralManager:didRetrievePeripherals:"), EventArgs ("CBPeripherals")] void RetrievedPeripherals (CBCentralManager central, CBPeripheral [] peripherals); [NoTV] - [NoWatch] [Availability (Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_8_4)] // Available in iOS 5.0 through iOS 8.4. Deprecated in iOS 7.0. [Export ("centralManager:didRetrieveConnectedPeripherals:"), EventArgs ("CBPeripherals")] void RetrievedConnectedPeripherals (CBCentralManager central, CBPeripheral [] peripherals); @@ -270,7 +272,6 @@ interface CBCentralManagerDelegate { void WillRestoreState (CBCentralManager central, NSDictionary dict); } - [Watch (4,0)] [Since (5,0)] [Static] interface CBAdvertisement { @@ -303,11 +304,18 @@ interface CBAdvertisement { } - [Watch (4,0)] [Since (5,0)] +#if MONOMAC + [BaseType (typeof (NSObject))] +#else [BaseType (typeof (CBAttribute))] +#endif [DisableDefaultCtor] // crash (at dispose time) on OSX interface CBCharacteristic { +#if MONOMAC + [Export ("UUID")] + CBUUID UUID { get; [NotImplemented] set; } +#endif [Export ("properties")] CBCharacteristicProperties Properties { get; [NotImplemented ("Not available on CBCharacteristic, only available on CBMutableCharacteristic")] set; } @@ -318,8 +326,7 @@ interface CBCharacteristic { [Export ("descriptors", ArgumentSemantic.Retain)] CBDescriptor [] Descriptors { get; [NotImplemented ("Not available on CBCharacteristic, only available on CBMutableCharacteristic")] set; } - [Deprecated (PlatformName.iOS, 8,0)] - [Deprecated (PlatformName.MacOSX, 10,13)] + [Availability (Deprecated=Platform.iOS_8_0)] [Export ("isBroadcasted")] bool IsBroadcasted { get; } @@ -335,15 +342,15 @@ interface CBCharacteristic { #endif } - [Watch (4,0)] [Since (6, 0), Mac (10,9)] [BaseType (typeof (CBCharacteristic))] [DisableDefaultCtor] interface CBMutableCharacteristic { [NoTV] - [NoWatch] +#if !MONOMAC [DesignatedInitializer] +#endif [Export ("initWithType:properties:value:permissions:")] [PostGet ("UUID")] [PostGet ("Value")] @@ -353,11 +360,10 @@ interface CBMutableCharacteristic { CBAttributePermissions Permissions { get; set; } [NoTV] - [NoWatch] [NullAllowed] [Export ("UUID", ArgumentSemantic.Retain)] [Override] - CBUUID UUID { get; [Availability (Obsoleted = Platform.Mac_10_13)] set; } + CBUUID UUID { get; set; } [Export ("properties", ArgumentSemantic.Assign)] [Override] @@ -379,11 +385,18 @@ interface CBMutableCharacteristic { #endif } - [Watch (4,0)] [Since (5,0)] +#if MONOMAC + [BaseType (typeof (NSObject))] +#else [BaseType (typeof (CBAttribute))] +#endif [DisableDefaultCtor] // crash (at dispose time) on OSX interface CBDescriptor { +#if MONOMAC + [Export ("UUID")] + CBUUID UUID { get; } +#endif [Export ("value", ArgumentSemantic.Retain)] NSObject Value { get; } @@ -392,40 +405,41 @@ interface CBDescriptor { CBCharacteristic Characteristic { get; } } - [Watch (4,0)] [Since (6, 0), Mac (10,9)] [BaseType (typeof (CBDescriptor))] [DisableDefaultCtor] interface CBMutableDescriptor { [NoTV] - [NoWatch] +#if !MONOMAC [DesignatedInitializer] +#endif [Export ("initWithType:value:")] [PostGet ("UUID")] [PostGet ("Value")] IntPtr Constructor (CBUUID uuid, NSObject descriptorValue); } - [Watch (4,0)] [Since (5,0)] - [BaseType (typeof (CBPeer), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof (CBPeripheralDelegate)})] + [BaseType ( +#if MONOMAC + typeof (NSObject) +#else + typeof (CBPeer) +#endif + , Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof (CBPeripheralDelegate)})] [DisableDefaultCtor] // crash (at dispose time) on OSX interface CBPeripheral : NSCopying { [Export ("name", ArgumentSemantic.Retain)] [DisableZeroCopy] string Name { get; } - [Deprecated (PlatformName.iOS, 8,0)] - [Deprecated (PlatformName.MacOSX, 10,13)] - [NoWatch] + [Availability (Deprecated=Platform.iOS_8_0)] [Export ("RSSI", ArgumentSemantic.Retain)] NSNumber RSSI { get; } [NoTV] - [NoWatch] [Availability (Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_9_0)] [Export ("isConnected")] - [Mac (10, 7, onlyOn64: true)] // Was removed from 32-bit in 10.13 unannounced bool IsConnected { get; } [Export ("services", ArgumentSemantic.Retain)] @@ -468,6 +482,14 @@ interface CBPeripheral : NSCopying { [Export ("writeValue:forDescriptor:")] void WriteValue (NSData data, CBDescriptor descriptor); +#if MONOMAC + // Provided with the iOS7 SDK, but does not contain an NS_AVAILABLE macro. + // Moved to a new base class, CBPeer, in iOS 8. + [Since (7,0), Mavericks] + [Export ("identifier")] + NSUuid Identifier { get; } +#endif + [iOS (9,0)][Mac (10,12)] [Export ("maximumWriteValueLengthForType:")] nuint GetMaximumWriteValueLength (CBCharacteristicWriteType type); @@ -481,29 +503,29 @@ interface CBPeripheral : NSCopying { [Since (7,0), Mac (10,9)] [Export ("state")] CBPeripheralState State { get; } - - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Export ("canSendWriteWithoutResponse")] - bool CanSendWriteWithoutResponse { get; } - - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Export ("openL2CAPChannel:")] - void OpenL2CapChannel (ushort psm); } - [Watch (4,0)] [BaseType (typeof (NSObject))] [Model] [Protocol] interface CBPeripheralDelegate { - [Availability (Deprecated=Platform.iOS_8_0, Message="Use 'RssiRead' instead.")] + [Availability (Deprecated=Platform.iOS_8_0, Message="Use RssiRead")] [Export ("peripheralDidUpdateRSSI:error:"), EventArgs ("NSError", true)] void RssiUpdated (CBPeripheral peripheral, NSError error); - [iOS (8,0)] - [Mac (10,13)] +#if MONOMAC +#if !XAMCORE_4_0 + // This API was removed or never existed. Can't cleanly remove due to EventsArgs/Delegate + [Availability (Introduced=Platform.iOS_8_0)] + [Export ("xamarin:selector:removed:"), EventArgs ("CBRssi")] + [Obsolete ("No longer an OS X API - it will never be called")] + void RssiRead (CBPeripheral peripheral, NSNumber rssi, NSError error); +#endif +#else + [Availability (Introduced=Platform.iOS_8_0)] [Export ("peripheral:didReadRSSI:error:"), EventArgs ("CBRssi")] void RssiRead (CBPeripheral peripheral, NSNumber rssi, NSError error); +#endif // FIXME: TYPO: missing 's' (plural) [Export ("peripheral:didDiscoverServices:"), EventArgs ("NSError", true)] @@ -539,7 +561,6 @@ interface CBPeripheralDelegate { void WroteDescriptorValue (CBPeripheral peripheral, CBDescriptor descriptor, NSError error); [NoTV] - [NoWatch] [Availability (Introduced = Platform.iOS_6_0, Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_8_4)] [Export ("peripheralDidInvalidateServices:")] void InvalidatedService (CBPeripheral peripheral); @@ -551,22 +572,20 @@ interface CBPeripheralDelegate { [Since (7,0)] [Export ("peripheral:didModifyServices:"), EventArgs ("CBPeripheralServices")] void ModifiedServices (CBPeripheral peripheral, CBService [] services); - - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [EventArgs ("CBPeripheralOpenL2CapChannel")] - [Export ("peripheral:didOpenL2CAPChannel:error:")] - void DidOpenL2CapChannel (CBPeripheral peripheral, [NullAllowed] CBL2CapChannel channel, [NullAllowed] NSError error); - - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Export ("peripheralIsReadyToSendWriteWithoutResponse:")] - void IsReadyToSendWriteWithoutResponse (CBPeripheral peripheral); } - [Watch (4,0)] [Since (5,0)] +#if MONOMAC + [BaseType (typeof (NSObject))] +#else [BaseType (typeof (CBAttribute))] +#endif [DisableDefaultCtor] // crash (at dispose time) on OSX interface CBService { +#if MONOMAC + [Export ("UUID", ArgumentSemantic.Retain)] + CBUUID UUID { get; } +#endif [iOS (6,0), Mac (10,9)] [Export ("isPrimary")] bool Primary { get; [NotImplemented ("Not available on CBCharacteristic, only available on CBMutableService")] set; } @@ -582,26 +601,26 @@ interface CBService { } - [Watch (4,0)] [Since (6, 0), Mac(10,9)] [BaseType (typeof (CBService))] [DisableDefaultCtor] interface CBMutableService { [NoTV] - [NoWatch] +#if !MONOMAC [DesignatedInitializer] +#endif [Export ("initWithType:primary:")] [PostGet ("UUID")] IntPtr Constructor (CBUUID uuid, bool primary); [NoTV] - [NoWatch] [Export ("UUID", ArgumentSemantic.Retain)] +#if !MONOMAC [Override] - CBUUID UUID { get; [Availability (Obsoleted = Platform.Mac_10_13)] set; } +#endif + CBUUID UUID { get; set; } [NoTV] - [NoWatch] [Export ("isPrimary")] [Override] bool Primary { get; set; } @@ -615,7 +634,6 @@ interface CBMutableService { CBCharacteristic[] Characteristics { get; set; } // TODO: check array type } - [Watch (4,0)] [Since (5,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // crash (at dispose time) on OSX @@ -633,7 +651,6 @@ interface CBUUID : NSCopying { CBUUID FromData (NSData theData); [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_9_0)] - [NoWatch] [Static] [Export ("UUIDWithCFUUID:")] CBUUID FromCFUUID (IntPtr theUUID); @@ -673,27 +690,14 @@ interface CBUUID : NSCopying { [Field ("CBUUIDCharacteristicAggregateFormatString")] NSString CharacteristicAggregateFormatString { get; } -#if MONOMAC - [Internal] - [Field ("CBUUIDValidRangeString")] - NSString CBUUIDValidRangeString { get; } - - [Internal] - [Mac (10,13)] - [Field ("CBUUIDCharacteristicValidRangeString")] - NSString CBUUIDCharacteristicValidRangeString { get; } -#else +#if !MONOMAC // Filled radar://27160443 – Trello: https://trello.com/c/oqB27JA6 [iOS (10,0)] [TV (10,0)] [Field ("CBUUIDCharacteristicValidRangeString")] - NSString CharacteristicValidRangeString { get; } +#else + [Field ("CBUUIDValidRangeString")] #endif - - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Field ("CBUUIDL2CAPPSMCharacteristicString")] - NSString L2CapPsmCharacteristicString { get; } + NSString CharacteristicValidRangeString { get; } #if !XAMCORE_3_0 [Deprecated (PlatformName.iOS, 7, 0)] @@ -732,7 +736,6 @@ interface CBUUID : NSCopying { string Uuid { get; } } - [Watch (4,0)] [Since (6,0), Mac(10,9)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -750,10 +753,13 @@ interface CBATTRequest { NSData Value { get; set; } } +#if MONOMAC [Mac (10,9)] - [Watch (4,0)] + [BaseType (typeof (NSObject))] +#else [iOS (6,0)] [BaseType (typeof (CBPeer))] +#endif // `delloc` a default instance crash applications and a default instance, without the ability to change the UUID, does not make sense [DisableDefaultCtor] interface CBCentral : NSCopying { @@ -777,19 +783,24 @@ interface CBCentral : NSCopying { nuint MaximumUpdateValueLength { get; } } - [Watch (4,0)] [Since (6, 0), Mac(10,9)] - [BaseType (typeof (CBManager), Delegates=new[] { "WeakDelegate" }, Events=new[] { typeof (CBPeripheralManagerDelegate) })] + [BaseType ( +#if MONOMAC + typeof (NSObject) +#else + typeof (CBManager) +#endif + , Delegates=new[] { "WeakDelegate" }, Events=new[] { typeof (CBPeripheralManagerDelegate) })] interface CBPeripheralManager { [NoTV] - [NoWatch] [Export ("initWithDelegate:queue:")] [PostGet ("WeakDelegate")] IntPtr Constructor ([Protocolize] CBPeripheralManagerDelegate peripheralDelegate, [NullAllowed] DispatchQueue queue); [NoTV] - [NoWatch] +#if !MONOMAC [DesignatedInitializer] +#endif [Since (7,0),Mac (10,9)] [Export ("initWithDelegate:queue:options:")] [PostGet ("WeakDelegate")] @@ -807,6 +818,13 @@ interface CBPeripheralManager { [Export ("isAdvertising")] bool Advertising { get; } +#if MONOMAC + // Removed in iOS 10 – The selector now exists in the base type. + // Note: macOS doesn't inherit from CBManager. + [Export ("state")] + CBPeripheralManagerState State { get; } +#endif + [Export ("addService:")] void AddService (CBMutableService service); @@ -834,14 +852,6 @@ interface CBPeripheralManager { [Export ("updateValue:forCharacteristic:onSubscribedCentrals:")] bool UpdateValue (NSData value, CBMutableCharacteristic characteristic, [NullAllowed] CBCentral[] subscribedCentrals); - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Export ("publishL2CAPChannelWithEncryption:")] - void PublishL2CapChannel (bool encryptionRequired); - - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Export ("unpublishL2CAPChannel:")] - void UnpublishL2CapChannel (ushort psm); - [Field ("CBPeripheralManagerOptionShowPowerAlertKey")] [Since (7,0)] NSString OptionShowPowerAlertKey { get; } @@ -866,7 +876,6 @@ interface CBPeripheralManager { #endif } - [Watch (4,0)] [Since (6, 0), Mac(10,9)] [BaseType (typeof (NSObject))] [Model] @@ -899,33 +908,15 @@ interface CBPeripheralManagerDelegate { [Export ("peripheralManagerIsReadyToUpdateSubscribers:")] void ReadyToUpdateSubscribers (CBPeripheralManager peripheral); - - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [EventArgs ("CBPeripheralManagerOpenL2CapChannel")] - [Export ("peripheralManager:didOpenL2CAPChannel:error:")] - void DidOpenL2CapChannel (CBPeripheralManager peripheral, [NullAllowed] CBL2CapChannel channel, [NullAllowed] NSError error); - - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [EventArgs ("CBPeripheralManagerL2CapChannelOperation")] - [Export ("peripheralManager:didUnpublishL2CAPChannel:error:")] - void DidUnpublishL2CapChannel (CBPeripheralManager peripheral, ushort psm, [NullAllowed] NSError error); - - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [EventArgs ("CBPeripheralManagerL2CapChannelOperation")] - [Export ("peripheralManager:didPublishL2CAPChannel:error:")] - void DidPublishL2CapChannel (CBPeripheralManager peripheral, ushort psm, [NullAllowed] NSError error); } +#if !MONOMAC [Since (8, 0)] - [Mac (10,13)] - [Watch (4,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // CBPeer.h: - (instancetype)init NS_UNAVAILABLE; interface CBPeer : NSCopying { [Internal] [NoTV] - [NoWatch] - [NoMac] [Availability (Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_9_0)] [Export ("UUID")] IntPtr _UUID { get; } @@ -934,21 +925,5 @@ interface CBPeer : NSCopying { [Export ("identifier")] NSUuid Identifier { get; } } - - [Watch (4,0)][iOS (11,0)][TV (11,0)][Mac (10,13)] - [BaseType (typeof (NSObject), Name = "CBL2CAPChannel")] - interface CBL2CapChannel { - - [Export ("peer")] - CBPeer Peer { get; } - - [Export ("inputStream")] - NSInputStream InputStream { get; } - - [Export ("outputStream")] - NSOutputStream OutputStream { get; } - - [Export ("PSM")] - /* uint16_t */ ushort Psm { get; } - } +#endif } diff --git a/src/coredata.cs b/src/coredata.cs index 16296341983..bbde89b6ad0 100644 --- a/src/coredata.cs +++ b/src/coredata.cs @@ -10,9 +10,6 @@ using System; using XamCore.Foundation; using XamCore.ObjCRuntime; -#if !WATCH && !MONOMAC -using XamCore.CoreSpotlight; -#endif namespace XamCore.CoreData { @@ -127,49 +124,6 @@ interface NSAtomicStore { NSAtomicStore ReferenceObjectForObjectID (NSManagedObjectID objectID); } - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface NSFetchIndexElementDescription : NSCoding - { - [Export ("initWithProperty:collationType:")] - IntPtr Constructor (NSPropertyDescription property, NSFetchIndexElementType collationType); - - [NullAllowed, Export ("property", ArgumentSemantic.Retain)] - NSPropertyDescription Property { get; } - - [NullAllowed, Export ("propertyName", ArgumentSemantic.Retain)] - string PropertyName { get; } - - [Export ("collationType", ArgumentSemantic.Assign)] - NSFetchIndexElementType CollationType { get; set; } - - [Export ("ascending")] - bool IsAscending { [Bind ("isAscending")] get; set; } - - [NullAllowed, Export ("indexDescription", ArgumentSemantic.Assign)] - NSFetchIndexDescription IndexDescription { get; } - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface NSFetchIndexDescription : NSCoding - { - [Export ("initWithName:elements:")] - IntPtr Constructor (string name, [NullAllowed] NSFetchIndexElementDescription[] elements); - - [Export ("name")] - string Name { get; set; } - - [Export ("elements", ArgumentSemantic.Copy)] - NSFetchIndexElementDescription[] Elements { get; set; } - - [NullAllowed, Export ("entity", ArgumentSemantic.Assign)] - NSEntityDescription Entity { get; } - - [NullAllowed, Export ("partialIndexPredicate", ArgumentSemantic.Copy)] - NSPredicate PartialIndexPredicate { get; set; } - } - [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: NSAtomicStoreCacheNodes must be initialized using initWithObjectID:(NSManagedObjectID *) [DisableDefaultCtor] @@ -309,22 +263,12 @@ interface NSEntityDescription : NSCoding, NSCopying { [Since(5,0)] [NullAllowed] // by default this property is null [Export ("compoundIndexes", ArgumentSemantic.Retain)] - [Availability (Introduced = Platform.iOS_5_0 | Platform.Mac_10_7, Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13, Message = "Use 'NSEntityDescription.Indexes' instead.")] NSPropertyDescription [] CompoundIndexes { get; set; } - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed] // by default this property is null - [Export ("indexes", ArgumentSemantic.Copy)] - NSFetchIndexDescription[] Indexes { get; set; } - // @property (strong) NSArray * __nonnull> * __nonnull uniquenessConstraints __attribute__((availability(ios, introduced=9.0))); [iOS (9,0), Mac (10,11)] [Internal, Export ("uniquenessConstraints", ArgumentSemantic.Strong)] NSArray _UniquenessConstraints { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("coreSpotlightDisplayNameExpression", ArgumentSemantic.Retain)] - NSExpression CoreSpotlightDisplayNameExpression { get; set; } } [BaseType (typeof (NSObject))] @@ -900,7 +844,7 @@ interface NSManagedObject { [Watch (3,0), TV (10,0), iOS (10,0), Mac (10,12)] [BaseType (typeof(NSObject))] - interface NSQueryGenerationToken : NSSecureCoding, NSCopying + interface NSQueryGenerationToken : NSCopying { [Static, Export ("currentQueryGenerationToken", ArgumentSemantic.Strong)] NSQueryGenerationToken CurrentToken { get; } @@ -1010,16 +954,16 @@ interface NSManagedObjectContext : NSCoding bool Save (out NSError error); #if !WATCH && !TVOS - [Availability (Introduced = Platform.iOS_3_0 | Platform.Mac_10_4, Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use a queue style context and 'PerformAndWait' instead.")] + [Availability (Introduced = Platform.iOS_3_0 | Platform.Mac_10_4, Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use a queue style context and PerformAndWait instead")] [Export ("lock")] new void Lock (); - [Availability (Introduced = Platform.iOS_3_0 | Platform.Mac_10_4, Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use a queue style context and 'PerformAndWait' instead.")] + [Availability (Introduced = Platform.iOS_3_0 | Platform.Mac_10_4, Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use a queue style context and PerformAndWait instead")] [Export ("unlock")] new void Unlock (); [NoTV] - [Availability (Introduced = Platform.iOS_3_0 | Platform.Mac_10_4, Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use a queue style context and 'Perform' instead.")] + [Availability (Introduced = Platform.iOS_3_0 | Platform.Mac_10_4, Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use a queue style context and Perform instead")] [Export ("tryLock")] bool TryLock { get; } #endif // !WATCH && !TVOS @@ -1121,10 +1065,6 @@ interface NSManagedObjectContext : NSCoding [iOS (8,3), Mac (10,11)] [Export ("refreshAllObjects")] void RefreshAllObjects (); - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("transactionAuthor")] - string TransactionAuthor { get; set; } } interface NSManagedObjectChangeEventArgs { @@ -1452,147 +1392,6 @@ interface NSMigrationManager { bool UsesStoreSpecificMigrationManager { get; set; } } - [Abstract] - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface NSPersistentHistoryChange : NSCopying - { - [Export ("changeID")] - long ChangeId { get; } - - [Export ("changedObjectID", ArgumentSemantic.Copy)] - NSManagedObjectID ChangedObjectId { get; } - - [Export ("changeType")] - NSPersistentHistoryChangeType ChangeType { get; } - - [NullAllowed, Export ("tombstone", ArgumentSemantic.Copy)] - NSDictionary Tombstone { get; } - - [NullAllowed, Export ("transaction", ArgumentSemantic.Strong)] - NSPersistentHistoryTransaction Transaction { get; } - - [NullAllowed, Export ("updatedProperties", ArgumentSemantic.Copy)] - NSSet UpdatedProperties { get; } - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof (NSObject))] - interface NSPersistentHistoryToken : NSCopying //, NSSecureCoding TODO: The class does state that it supports the NSSecureCoding YET SupportsSecureCoding returns false, radar 32761925 - { - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSPersistentStoreRequest))] - [DisableDefaultCtor] - interface NSPersistentHistoryChangeRequest - { - [Static] - [Export ("fetchHistoryAfterDate:")] - NSPersistentHistoryChangeRequest FetchHistoryAfter (NSDate date); - - [Static] - [Export ("fetchHistoryAfterToken:")] - NSPersistentHistoryChangeRequest FetchHistoryAfter ([NullAllowed] NSPersistentHistoryToken token); - - [Static] - [Export ("fetchHistoryAfterTransaction:")] - NSPersistentHistoryChangeRequest FetchHistoryAfter ([NullAllowed] NSPersistentHistoryTransaction transaction); - - [Static] - [Export ("deleteHistoryBeforeDate:")] - NSPersistentHistoryChangeRequest DeleteHistoryBefore (NSDate date); - - [Static] - [Export ("deleteHistoryBeforeToken:")] - NSPersistentHistoryChangeRequest DeleteHistoryBefore ([NullAllowed] NSPersistentHistoryToken token); - - [Static] - [Export ("deleteHistoryBeforeTransaction:")] - NSPersistentHistoryChangeRequest DeleteHistoryBefore ([NullAllowed] NSPersistentHistoryTransaction transaction); - - [Export ("resultType", ArgumentSemantic.Assign)] - NSPersistentHistoryResultType ResultType { get; set; } - - [NullAllowed, Export ("token", ArgumentSemantic.Strong)] - NSPersistentHistoryToken Token { get; } - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSPersistentStoreResult))] - interface NSPersistentHistoryResult - { - [NullAllowed] - [Export ("result", ArgumentSemantic.Strong)] - NSObject Result { get; } - - [Export ("resultType")] - NSPersistentHistoryResultType ResultType { get; } - } - - [Abstract] - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface NSPersistentHistoryTransaction : NSCopying - { - [Export ("timestamp", ArgumentSemantic.Copy)] - NSDate Timestamp { get; } - - [NullAllowed, Export ("changes", ArgumentSemantic.Copy)] - NSPersistentHistoryChange[] Changes { get; } - - [Export ("transactionNumber")] - long TransactionNumber { get; } - - [Export ("storeID")] - string StoreId { get; } - - [Export ("bundleID")] - string BundleId { get; } - - [Export ("processID")] - string ProcessId { get; } - - [NullAllowed, Export ("contextName")] - string ContextName { get; } - - [NullAllowed, Export ("author")] - string Author { get; } - - [Export ("token", ArgumentSemantic.Strong)] - NSPersistentHistoryToken Token { get; } - - [Export ("objectIDNotification")] - NSNotification ObjectIdNotification { get; } - } - -#if !WATCH && !MONOMAC - [NoWatch, NoTV, Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface NSCoreDataCoreSpotlightDelegate - { - [Export ("domainIdentifier")] - string DomainIdentifier { get; } - - [NullAllowed, Export ("indexName")] - string IndexName { get; } - - [Export ("initForStoreWithDescription:model:")] - [DesignatedInitializer] - IntPtr Constructor (NSPersistentStoreDescription description, NSManagedObjectModel model); - - [Export ("attributeSetForObject:")] - [return: NullAllowed] - CSSearchableItemAttributeSet GetAttributeSet (NSManagedObject @object); - - [Export ("searchableIndex:reindexAllSearchableItemsWithAcknowledgementHandler:")] - void ReindexAllSearchableItems (CSSearchableIndex searchableIndex, Action acknowledgementHandler); - - [Export ("searchableIndex:reindexSearchableItemsWithIdentifiers:acknowledgementHandler:")] - void ReindexSearchableItems (CSSearchableIndex searchableIndex, string[] identifiers, Action acknowledgementHandler); - } -#endif - // NSPersistentStore is an abstract type according to Apple's documentation, but Apple // also have internal subclasses of NSPersistentStore, and in those cases our closest // type is NSPersistentStore, which means we must be able to create managed wrappers @@ -1666,12 +1465,6 @@ interface NSPersistentStore { [Field ("NSPersistentStoreSaveConflictsErrorKey")] NSString SaveConflictsErrorKey { get; } -#if !WATCH && !MONOMAC - [NoWatch, NoTV, Mac (10, 13), iOS (11, 0)] - [Export ("coreSpotlightExporter")] - NSCoreDataCoreSpotlightDelegate CoreSpotlightExporter { get; } -#endif - } [Watch (3,0), TV (10,0), iOS (10,0), Mac (10,12)] @@ -1792,7 +1585,7 @@ partial interface NSPersistentStoreCoordinator [Static, Export ("registerStoreClass:forStoreType:")] void RegisterStoreClass (Class storeClass, NSString storeType); - [Availability (Introduced = Platform.iOS_3_0 | Platform.Mac_10_5 , Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use the method that takes an out NSError parameter.")] + [Availability (Introduced = Platform.iOS_3_0 | Platform.Mac_10_5 , Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "This method is obsolete, please use the method that takes an out NSError parameter.")] [Static, Export ("metadataForPersistentStoreOfType:URL:error:")] [return: NullAllowed] NSDictionary MetadataForPersistentStoreOfType (NSString storeType, NSUrl url, out NSError error); @@ -1802,7 +1595,7 @@ partial interface NSPersistentStoreCoordinator [return: NullAllowed] NSDictionary GetMetadata (string storeType, NSUrl url, [NullAllowed] NSDictionary options, out NSError error); - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_9_0, Message = "Use the method that takes an out NSError parameter.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_9_0, Message = "This method is obsolete, please use the method that takes an out NSError parameter.")] [Static, Export ("setMetadata:forPersistentStoreOfType:URL:error:")] bool SetMetadata (NSDictionary metadata, NSString storeType, NSUrl url, out NSError error); @@ -1867,16 +1660,16 @@ partial interface NSPersistentStoreCoordinator NSManagedObjectID ManagedObjectIDForURIRepresentation (NSUrl url); #if !WATCH && !TVOS - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_8_0, Message="Use 'PerformAndWait' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_8_0, Message="Use PerformAndWait instead")] [Export ("lock")] new void Lock (); - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_8_0, Message="Use 'PerformAndWait' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_8_0, Message="Use PerformAndWait instead")] [Export ("unlock")] new void Unlock (); [NoTV] - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_8_0, Message="Use 'Perform' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_8_0, Message="Use Perform instead")] [Export ("tryLock")] bool TryLock { get; } #endif // !WATCH && !TVOS @@ -1894,15 +1687,7 @@ partial interface NSPersistentStoreCoordinator #endif [Field ("NSBinaryStoreType")] NSString BinaryStoreType { get; } - - [Watch (4,0)][TV (11,0)][Mac (10,13)][iOS (11,0)] - [Field ("NSBinaryStoreSecureDecodingClasses")] - NSString BinaryStoreSecureDecodingClasses { get; } - - [Watch (4,0)][TV (11,0)][Mac (10,13)][iOS (11,0)] - [Field ("NSBinaryStoreInsecureDecodingCompatibilityOption")] - NSString BinaryStoreInsecureDecodingCompatibilityOption { get; } - + [Field ("NSInMemoryStoreType")] NSString InMemoryStoreType { get; } @@ -2033,24 +1818,8 @@ partial interface NSPersistentStoreCoordinator [NoWatch][NoTV] [Since (7,0), Mavericks] [Field ("NSPersistentStoreUbiquitousContainerIdentifierKey")] - [Obsolete ("Use 'UbiquitousContainerIdentifierKey' instead.")] NSString eUbiquitousContainerIdentifierKey { get; } - [NoWatch][NoTV] - [Since (7,0), Mavericks] - [Field ("NSPersistentStoreUbiquitousContainerIdentifierKey")] - NSString UbiquitousContainerIdentifierKey { get; } - - // 11.0 - - [NoWatch, NoTV, Mac (10, 13), iOS (11, 0)] - [Field ("NSCoreDataCoreSpotlightExporter")] - NSString CoreSpotlightExporter { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Field ("NSPersistentHistoryTrackingKey")] - NSString HistoryTrackingKey { get; } - [iOS (8,0), Mac (10,10)] [NullAllowed, Export ("name")] string Name { get; set; } @@ -2178,7 +1947,6 @@ interface NSPropertyDescription : NSCoding, NSCopying { NSDictionary UserInfo { get; set; } [Export ("indexed")] - [Availability (Introduced = Platform.iOS_3_0 | Platform.Mac_10_5 , Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13, Message = "Use 'NSEntityDescription.Indexes' instead.")] bool Indexed { [Bind ("isIndexed")] get; set; } [Export ("versionHash")] @@ -2198,7 +1966,6 @@ interface NSPropertyDescription : NSCoding, NSCopying { [Since (5,0)] [Export ("storedInExternalRecord")] - [Availability (Introduced = Platform.iOS_3_0 | Platform.Mac_10_5 , Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13, Message = "Use 'CoreSpotlight' integration instead.")] bool StoredInExternalRecord { [Bind ("isStoredInExternalRecord")]get; set; } } diff --git a/src/coreimage.cs b/src/coreimage.cs index b4072e4ee75..8df5a23a47e 100644 --- a/src/coreimage.cs +++ b/src/coreimage.cs @@ -26,14 +26,11 @@ using System; using System.Reflection; -using XamCore.AVFoundation; using XamCore.Foundation; using XamCore.ObjCRuntime; using XamCore.CoreGraphics; using XamCore.CoreImage; using XamCore.CoreVideo; -using XamCore.ImageIO; -using XamCore.IOSurface; #if !MONOMAC || XAMCORE_2_0 using XamCore.Metal; #endif @@ -131,61 +128,61 @@ interface CIColor : NSSecureCoding, NSCopying { [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Static] - [Export ("blackColor", ArgumentSemantic.Strong)] + [Export ("blackColor")] CIColor BlackColor { get; } [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Static] - [Export ("whiteColor", ArgumentSemantic.Strong)] + [Export ("whiteColor")] CIColor WhiteColor { get; } [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Static] - [Export ("grayColor", ArgumentSemantic.Strong)] + [Export ("grayColor")] CIColor GrayColor { get; } [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Static] - [Export ("redColor", ArgumentSemantic.Strong)] + [Export ("redColor")] CIColor RedColor { get; } [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Static] - [Export ("greenColor", ArgumentSemantic.Strong)] + [Export ("greenColor")] CIColor GreenColor { get; } [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Static] - [Export ("blueColor", ArgumentSemantic.Strong)] + [Export ("blueColor")] CIColor BlueColor { get; } [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Static] - [Export ("cyanColor", ArgumentSemantic.Strong)] + [Export ("cyanColor")] CIColor CyanColor { get; } [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Static] - [Export ("magentaColor", ArgumentSemantic.Strong)] + [Export ("magentaColor")] CIColor MagentaColor { get; } [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Static] - [Export ("yellowColor", ArgumentSemantic.Strong)] + [Export ("yellowColor")] CIColor YellowColor { get; } [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Static] - [Export ("clearColor", ArgumentSemantic.Strong)] + [Export ("clearColor")] CIColor ClearColor { get; } [Export ("stringRepresentation")] @@ -265,12 +262,6 @@ interface CIContext { // null is not documented for CGColorSpace but it makes sense with the other overload not having this parameter (unit tested) void Render (CIImage image, CVPixelBuffer buffer, CGRect rectangle, [NullAllowed] CGColorSpace cs); - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Export ("render:toIOSurface:bounds:colorSpace:")] - void Render (CIImage image, IOSurface.IOSurface surface, CGRect bounds, [NullAllowed] CGColorSpace colorSpace); - #if !MONOMAC [Export ("inputImageMaximumSize")] CGSize InputImageMaximumSize { get; } @@ -285,7 +276,7 @@ interface CIContext { void Render (CIImage image, IMTLTexture texture, [NullAllowed] IMTLCommandBuffer commandBuffer, CGRect bounds, [NullAllowed] CGColorSpace colorSpace); #endif - [Availability (Introduced = Platform.iOS_5_0 | Platform.Mac_10_4, Deprecated = Platform.iOS_6_0 | Platform.Mac_10_8, Message = "Use 'DrawImage (image, CGRect, CGRect)' instead.")] + [Availability (Introduced = Platform.iOS_5_0 | Platform.Mac_10_4, Deprecated = Platform.iOS_6_0 | Platform.Mac_10_8, Message = "Use DrawImage (image, CGRect, CGRect) instead")] [Export ("drawImage:atPoint:fromRect:")] void DrawImage (CIImage image, CGPoint atPoint, CGRect fromRect); @@ -399,88 +390,18 @@ interface CIContext_ImageRepresentation { [return: NullAllowed] NSData GetTiffRepresentation (CIImage image, CIFormat format, CGColorSpace colorSpace, NSDictionary options); -#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294 - [iOS (10,0)][Mac (10,12)] - [Wrap ("GetTiffRepresentation (image, format, colorSpace, options?.Dictionary)")] - [return: NullAllowed] - NSData GetTiffRepresentation (CIImage image, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options); -#endif - [iOS (10,0)][Mac (10,12)] [Export ("JPEGRepresentationOfImage:colorSpace:options:")] [return: NullAllowed] NSData GetJpegRepresentation (CIImage image, CGColorSpace colorSpace, NSDictionary options); -#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294 - [iOS (10,0)][Mac (10,12)] - [Wrap ("GetJpegRepresentation (image, format, colorSpace, options?.Dictionary)")] - [return: NullAllowed] - NSData GetJpegRepresentation (CIImage image, CGColorSpace colorSpace, CIImageRepresentationOptions options); -#endif - - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Export ("HEIFRepresentationOfImage:format:colorSpace:options:")] - [return: NullAllowed] - NSData GetHeifRepresentation (CIImage image, CIFormat format, CGColorSpace colorSpace, NSDictionary options); - -#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294 - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Wrap ("GetHeifRepresentation (image, format, colorSpace, options?.Dictionary)")] - [return: NullAllowed] - NSData GetHeifRepresentation (CIImage image, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options); -#endif - - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Export ("PNGRepresentationOfImage:format:colorSpace:options:")] - [return: NullAllowed] - NSData GetPngRepresentation (CIImage image, CIFormat format, CGColorSpace colorSpace, NSDictionary options); - -#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294 - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Wrap ("GetPngRepresentation (image, format, colorSpace, options?.Dictionary)")] - [return: NullAllowed] - NSData GetPngRepresentation (CIImage image, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options); -#endif - [iOS (10,0)][Mac (10,12)] [Export ("writeTIFFRepresentationOfImage:toURL:format:colorSpace:options:error:")] bool WriteTiffRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, NSDictionary options, out NSError error); -#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294 - [iOS (10,0)][Mac (10,12)] - [Wrap ("WriteTiffRepresentation (image, url, format, colorSpace, options?.Dictionary, out error)")] - bool WriteTiffRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options, out NSError error); -#endif - [iOS (10,0)][Mac (10,12)] [Export ("writeJPEGRepresentationOfImage:toURL:colorSpace:options:error:")] bool WriteJpegRepresentation (CIImage image, NSUrl url, CGColorSpace colorSpace, NSDictionary options, [NullAllowed] out NSError error); - -#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294 - [iOS (10,0)][Mac (10,12)] - [Wrap ("WriteJpegRepresentation (image, url, format, colorSpace, options?.Dictionary, out error)")] - bool WriteJpegRepresentation (CIImage image, NSUrl url, CGColorSpace colorSpace, CIImageRepresentationOptions options, [NullAllowed] out NSError error); -#endif - - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Export ("writeHEIFRepresentationOfImage:toURL:format:colorSpace:options:error:")] - bool WriteHeifRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, NSDictionary options, [NullAllowed] out NSError error); - -#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294 - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Wrap ("WriteHeifRepresentation (image, url, format, colorSpace, options?.Dictionary, out error)")] - bool WriteHeifRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options, [NullAllowed] out NSError error); -#endif - - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Export ("writePNGRepresentationOfImage:toURL:format:colorSpace:options:error:")] - bool WritePngRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, NSDictionary options, [NullAllowed] out NSError error); - -#if false // [Wrap] does not support [Category] extension methods - https://bugzilla.xamarin.com/show_bug.cgi?id=59294 - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Wrap ("WritePngRepresentation (image, url, format, colorSpace, options?.Dictionary, out error)")] - bool WritePngRepresentation (CIImage image, NSUrl url, CIFormat format, CGColorSpace colorSpace, CIImageRepresentationOptions options, [NullAllowed] out NSError error); -#endif } [BaseType (typeof (NSObject))] @@ -555,7 +476,7 @@ string Name { #if XAMCORE_4_0 void RegisterFilterName (string name, ICIFilterConstructor constructorObject, NSDictionary classAttributes); #else - [Advice ("The 'constructorObject' argument must implement 'ICIFilterConstructor'.")] + [Advice ("The constructorObject argument must implement ICIFilterConstructor")] void RegisterFilterName (string name, NSObject constructorObject, NSDictionary classAttributes); #endif #endif @@ -702,10 +623,6 @@ interface CIRawFilterKeys { [Field ("kCIInputNoiseReductionAmountKey")] NSString NoiseReductionAmountKey { get; } - [iOS (11,0)][TV (11,0)][Mac (10,13)] - [Field ("kCIInputMoireAmountKey")] - NSString MoireAmountKey { get; } - [iOS (10,0)][Mac (10,10)] [Field ("kCIInputEnableVendorLensCorrectionKey")] NSString EnableVendorLensCorrectionKey { get; } @@ -1293,7 +1210,7 @@ interface CIImage : NSSecureCoding, NSCopying { #if XAMCORE_2_0 [Internal] // there's a CIFormat enum that maps to the kCIFormatARGB8, kCIFormatRGBA16, kCIFormatRGBAf, kCIFormatRGBAh constants #else - [Obsolete ("Use the overload acceping a 'CIFormat' enum instead of an 'int'.")] + [Obsolete ("Use the overload acceping a CIFormat enum (instead of an int) for pixelFormat")] #endif CIImage FromData (NSData bitmapData, nint bytesPerRow, CGSize size, int /* CIFormat = int */ pixelFormat, [NullAllowed] CGColorSpace colorSpace); @@ -1367,26 +1284,12 @@ interface CIImage : NSSecureCoding, NSCopying { [Wrap ("FromImageBuffer (buffer, options == null ? null : options.Dictionary)")] CIImage FromImageBuffer (CVPixelBuffer buffer, [NullAllowed] CIImageInitializationOptions options); #endif - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Static] - [Export ("imageWithIOSurface:")] - CIImage FromSurface (IOSurface.IOSurface surface); - - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Static] - [Export ("imageWithIOSurface:options:")] - CIImage FromSurface (IOSurface.IOSurface surface, NSDictionary options); - - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Static] - [Wrap ("FromSurface (surface, options == null ? null : options.Dictionary)")] - CIImage FromSurface (IOSurface.IOSurface surface, CIImageInitializationOptions options); + //[Export ("imageWithIOSurface:")] + //CIImage ImageWithIOSurface (IOSurfaceRef surface, ); + // + //[Static] + //[Export ("imageWithIOSurface:options:")] + //CIImage ImageWithIOSurfaceoptions (IOSurfaceRef surface, NSDictionary d, ); [Static] [Export ("imageWithColor:")] @@ -1441,24 +1344,13 @@ interface CIImage : NSSecureCoding, NSCopying { [Wrap ("this (url, options == null ? null : options.Dictionary)")] IntPtr Constructor (NSUrl url, [NullAllowed] CIImageInitializationOptions options); - [iOS (11,0)] // IOSurface was not exposed before Xcode 9 - [TV (11,0)] - [Mac (10,13)] - [Export ("initWithIOSurface:")] - IntPtr Constructor (IOSurface.IOSurface surface); - - [iOS (11,0)] // IOSurface was not exposed before Xcode 9 - [TV (11,0)] - [Mac (10,13)] - [Export ("initWithIOSurface:options:")] - IntPtr Constructor (IOSurface.IOSurface surface, [NullAllowed] NSDictionary options); - - [iOS (11,0)] // IOSurface was not exposed before Xcode 9 - [TV (11,0)] - [Mac (10,13)] - [Wrap ("this (surface, options == null ? null : options.Dictionary)")] - IntPtr Constructor (IOSurface.IOSurface surface, [NullAllowed] CIImageInitializationOptions options); - + // FIXME: bindings + //[Export ("initWithIOSurface:")] + //NSObject InitWithIOSurface (IOSurfaceRef surface, ); + // + //[Export ("initWithIOSurface:options:")] + //NSObject InitWithIOSurfaceoptions (IOSurfaceRef surface, NSDictionary d, ); + // [iOS(9,0)] [Export ("initWithCVImageBuffer:")] IntPtr Constructor (CVImageBuffer imageBuffer); @@ -1532,15 +1424,15 @@ interface CIImage : NSSecureCoding, NSCopying { [Since (5,0)] [Wrap ("WeakProperties")] - CoreGraphics.CGImageProperties Properties { get; } + CGImageProperties Properties { get; } #if MONOMAC - [Export ("definition")] - CIFilterShape Definition { get; } -#endif - [iOS (10,0)] + //[Export ("definition")] + //CIFilterShape Definition (); + [Field ("kCIFormatRGBA16")] int FormatRGBA16 { get; } /* CIFormat = int */ +#endif [Field ("kCIFormatARGB8")] [Since (6,0)] @@ -1614,38 +1506,6 @@ interface CIImage : NSSecureCoding, NSCopying { [iOS (9,0)][Mac (10,11)] int FormatRGf { get; } - [iOS (10,0)][TV (10,0)][Mac (10,12)] - [Field ("kCIFormatL8")] - int FormatL8 { get; } - - [iOS (10,0)][TV (10,0)][Mac (10,12)] - [Field ("kCIFormatL16")] - int FormatL16 { get; } - - [iOS (10,0)][TV (10,0)][Mac (10,12)] - [Field ("kCIFormatLh")] - int FormatLh { get; } - - [iOS (10,0)][TV (10,0)][Mac (10,12)] - [Field ("kCIFormatLf")] - int FormatLf { get; } - - [iOS (10,0)][TV (10,0)][Mac (10,12)] - [Field ("kCIFormatLA8")] - int FormatLA8 { get; } - - [iOS (10,0)][TV (10,0)][Mac (10,12)] - [Field ("kCIFormatLA16")] - int FormatLA16 { get; } - - [iOS (10,0)][TV (10,0)][Mac (10,12)] - [Field ("kCIFormatLAh")] - int FormatLAh { get; } - - [iOS (10,0)][TV (10,0)][Mac (10,12)] - [Field ("kCIFormatLAf")] - int FormatLAf { get; } - #if !MONOMAC // UIKit extensions [Since (5,0)] @@ -1716,12 +1576,6 @@ interface CIImage : NSSecureCoding, NSCopying { [Export ("imageByApplyingFilter:withInputParameters:")] CIImage CreateByFiltering (string filterName, [NullAllowed] NSDictionary inputParameters); - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Export ("imageByApplyingFilter:")] - CIImage CreateByFiltering (string filterName); - [iOS (8,0), Mac (10,10)] [Field ("kCIImageAutoAdjustCrop"), Internal] NSString AutoAdjustCrop { get; } @@ -1806,24 +1660,6 @@ interface CIImage : NSSecureCoding, NSCopying { [TV (10,0)] [NullAllowed, Export ("CGImage")] CGImage CGImage { get; } - - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [NullAllowed, Export ("depthData")] - AVDepthData DepthData { get; } - - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Export ("imageByApplyingCGOrientation:")] - CIImage CreateByApplyingOrientation (CGImagePropertyOrientation orientation); - - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Export ("imageTransformForCGOrientation:")] - CGAffineTransform GetImageTransform (CGImagePropertyOrientation orientation); } interface ICIImageProcessorInput {} @@ -1856,15 +1692,6 @@ interface CIImageProcessorInput { [NullAllowed, Export ("metalTexture")] IMTLTexture MetalTexture { get; } #endif - -#if XAMCORE_4_0 - [Abstract] // @required but it was added in Xcode9 -#endif - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Export ("surface")] - IOSurface.IOSurface Surface { get; } } interface ICIImageProcessorOutput {} @@ -1901,15 +1728,6 @@ interface CIImageProcessorOutput { [NullAllowed, Export ("metalCommandBuffer")] IMTLCommandBuffer MetalCommandBuffer { get; } #endif - -#if XAMCORE_4_0 - [Abstract] // @required but it was added in Xcode9 -#endif - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Export ("surface")] - IOSurface.IOSurface Surface { get; } } [iOS (9,0)] @@ -1961,22 +1779,6 @@ interface CIKernel { [Static, Export ("kernelWithString:")] CIKernel FromProgramSingle (string coreImageShaderProgram); - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Static] - [Export ("kernelWithFunctionName:fromMetalLibraryData:error:")] - [return: NullAllowed] - CIKernel FromFunction (string name, NSData data, [NullAllowed] out NSError error); - - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Static] - [Export ("kernelWithFunctionName:fromMetalLibraryData:outputPixelFormat:error:")] - [return: NullAllowed] - CIKernel FromFunction (string name, NSData data, CIFormat format, [NullAllowed] out NSError error); - [Export ("name")] string Name { get; } @@ -2017,41 +1819,28 @@ interface CIWarpKernel { [iOS (9,0)] [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // does not work in iOS 11 beta 4 interface CIImageAccumulator { -#if !XAMCORE_4_0 - [Obsolete ("The default initializer does not work in recent iOS version (11b4).")] - [Export ("init")] - IntPtr Constructor (); -#endif - [Static] [Export ("imageAccumulatorWithExtent:format:")] - CIImageAccumulator FromRectangle (CGRect rect, CIFormat format); - -#if MONOMAC && !XAMCORE_4_0 - [Obsolete ("Use the overload acceping a 'CIFormat' enum instead of an 'int'.")] - [Static] - [Wrap ("FromRectangle (rect, (CIFormat) ciImageFormat)")] - CIImageAccumulator FromRectangle (CGRect rect, int ciImageFormat); +#if !MONOMAC + [Internal] #endif + CIImageAccumulator FromRectangle (CGRect rect, int /* CIFormat = int */ ciImageFormat); [iOS (9,0)] - [Static] + [Static, Internal] [Export ("imageAccumulatorWithExtent:format:colorSpace:")] - CIImageAccumulator FromRectangle (CGRect extent, CIFormat format, CGColorSpace colorSpace); + CIImageAccumulator FromRectangle (CGRect extent, int format, CGColorSpace colorSpace); - [Export ("initWithExtent:format:")] - IntPtr Constructor (CGRect rectangle, CIFormat format); -#if MONOMAC && !XAMCORE_4_0 - [Obsolete ("Use the overload acceping a 'CIFormat' enum instead of an 'int'.")] - [Wrap ("this (rectangle, (CIFormat) ciImageFormat)")] - IntPtr Constructor (CGRect rectangle, int ciImageFormat); + [Export ("initWithExtent:format:")] +#if !MONOMAC + [Internal] #endif + IntPtr Constructor (CGRect rectangle, int /* CIFormat = int */ ciImageFormat); - [Export ("initWithExtent:format:colorSpace:")] - IntPtr Constructor (CGRect extent, CIFormat format, CGColorSpace colorSpace); + [Export ("initWithExtent:format:colorSpace:")][Internal] + IntPtr Constructor (CGRect extent, int format, CGColorSpace colorSpace); [Export ("extent")] CGRect Extent { get; } @@ -2441,7 +2230,7 @@ interface CIRectangleFeature { [iOS (8,0)] [Mac (10,12)] [BaseType (typeof (CIFeature))] - partial interface CIQRCodeFeature : NSSecureCoding, NSCopying { + partial interface CIQRCodeFeature { [Export ("bounds", ArgumentSemantic.Assign)] CGRect Bounds { get; } @@ -2460,12 +2249,6 @@ partial interface CIQRCodeFeature : NSSecureCoding, NSCopying { [Export ("messageString")] string MessageString { get; } - - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13, onlyOn64 : true)] - [NullAllowed, Export ("symbolDescriptor")] - CIQRCodeDescriptor SymbolDescriptor { get; } } [iOS (9,0)] @@ -2519,13 +2302,6 @@ interface CIImageProcessorKernel { [Export ("applyWithExtent:inputs:arguments:error:")] [return: NullAllowed] CIImage Apply (CGRect extent, [NullAllowed] CIImage[] inputs, [NullAllowed] NSDictionary args, out NSError error); - - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Static] - [Export ("outputIsOpaque")] - bool OutputIsOpaque { get; } } [CoreImageFilter] @@ -4695,706 +4471,4 @@ interface CIThermal { [BaseType (typeof (CIFilter))] 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))] - interface CIAreaMinMaxRed { - // TODO: Needs review - //[CoreImageProperty ("inputExtent")] - //CIVector Extent { get; set; } - } - - [CoreImageFilter] - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIFilter))] - 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; } - } - - [CoreImageFilter] - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIFilter))] - interface CIBarcodeGenerator { - // TODO: Needs review - //[CoreImageProperty ("inputBarcodeDescriptor")] - //CIBarcodeDescriptor BarcodeDescriptor { get; set; } - } - - [CoreImageFilter] - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [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; } - } - - [CoreImageFilter] - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIFilter))] - 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; } - } - [CoreImageFilter] - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIFilter))] - 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; } - } - - [CoreImageFilter] - [iOS (11,0)] - [Mac (10,13)] - [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; } - } - - [CoreImageFilter] - [iOS (11,0)] - [Mac (10,13)] - [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; } - } - - [CoreImageFilter] - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIFilter))] - interface CIDepthToDisparity { - // TODO: Needs review - } - - [CoreImageFilter] - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIFilter))] - interface CIDisparityToDepth { - // TODO: Needs review - } - - [CoreImageFilter] - [iOS (11,0)] - [NoMac] - [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; } - } - - [CoreImageFilter] - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIFilter))] - interface CILabDeltaE { - // TODO: Needs review - //[CoreImageProperty ("inputImage2")] - //CIImage Image2 { get; set; } - } - - [CoreImageFilter] - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIFilter))] - 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; } - } - - [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 - } - - [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 - } - - [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 - } - - [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 - } - - [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 - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [Abstract] - [BaseType (typeof (NSObject))] - interface CIBarcodeDescriptor : NSSecureCoding, NSCopying { - // empty - } - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIBarcodeDescriptor))] - interface CIQRCodeDescriptor { - - [Export ("errorCorrectedPayload")] - NSData ErrorCorrectedPayload { get; } - - [Export ("symbolVersion")] - nint SymbolVersion { get; } - - [Export ("maskPattern")] - byte /* uint8_t */ MaskPattern { get; } - - [Export ("errorCorrectionLevel")] - CIQRCodeErrorCorrectionLevel ErrorCorrectionLevel { get; } - - [Export ("initWithPayload:symbolVersion:maskPattern:errorCorrectionLevel:")] - IntPtr Constructor (NSData errorCorrectedPayload, nint symbolVersion, byte maskPattern, CIQRCodeErrorCorrectionLevel errorCorrectionLevel); - - [Static] - [Export ("descriptorWithPayload:symbolVersion:maskPattern:errorCorrectionLevel:")] - [return: NullAllowed] - CIQRCodeDescriptor CreateDescriptor (NSData errorCorrectedPayload, nint symbolVersion, byte maskPattern, CIQRCodeErrorCorrectionLevel errorCorrectionLevel); - } - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIBarcodeDescriptor))] - interface CIAztecCodeDescriptor { - - [Export ("errorCorrectedPayload")] - NSData ErrorCorrectedPayload { get; } - - [Export ("isCompact")] - bool IsCompact { get; } - - [Export ("layerCount")] - nint LayerCount { get; } - - [Export ("dataCodewordCount")] - nint DataCodewordCount { get; } - - [Export ("initWithPayload:isCompact:layerCount:dataCodewordCount:")] - IntPtr Constructor (NSData errorCorrectedPayload, bool isCompact, nint layerCount, nint dataCodewordCount); - - [Static] - [Export ("descriptorWithPayload:isCompact:layerCount:dataCodewordCount:")] - [return: NullAllowed] - CIAztecCodeDescriptor CreateDescriptor (NSData errorCorrectedPayload, bool isCompact, nint layerCount, nint dataCodewordCount); - } - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIBarcodeDescriptor), Name = "CIPDF417CodeDescriptor")] - interface CIPdf417CodeDescriptor { - - [Export ("errorCorrectedPayload")] - NSData ErrorCorrectedPayload { get; } - - [Export ("isCompact")] - bool IsCompact { get; } - - [Export ("rowCount")] - nint RowCount { get; } - - [Export ("columnCount")] - nint ColumnCount { get; } - - [Export ("initWithPayload:isCompact:rowCount:columnCount:")] - IntPtr Constructor (NSData errorCorrectedPayload, bool isCompact, nint rowCount, nint columnCount); - - [Static] - [Export ("descriptorWithPayload:isCompact:rowCount:columnCount:")] - [return: NullAllowed] - CIPdf417CodeDescriptor CreateDescriptor (NSData errorCorrectedPayload, bool isCompact, nint rowCount, nint columnCount); - } - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIBarcodeDescriptor))] - interface CIDataMatrixCodeDescriptor { - - [Export ("errorCorrectedPayload")] - NSData ErrorCorrectedPayload { get; } - - [Export ("rowCount")] - nint RowCount { get; } - - [Export ("columnCount")] - nint ColumnCount { get; } - - [Export ("eccVersion")] - CIDataMatrixCodeEccVersion EccVersion { get; } - - [Export ("initWithPayload:rowCount:columnCount:eccVersion:")] - IntPtr Constructor (NSData errorCorrectedPayload, nint rowCount, nint columnCount, CIDataMatrixCodeEccVersion eccVersion); - - [Static] - [Export ("descriptorWithPayload:rowCount:columnCount:eccVersion:")] - [return: NullAllowed] - CIDataMatrixCodeDescriptor CreateDescriptor (NSData errorCorrectedPayload, nint rowCount, nint columnCount, CIDataMatrixCodeEccVersion eccVersion); - } - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (CIColorKernel))] - [DisableDefaultCtor] // Handle is nil for `init` - interface CIBlendKernel { - - [Static] - [Export ("kernelWithString:")] - [return: NullAllowed] - CIBlendKernel CreateKernel (string @string); - - [Export ("applyWithForeground:background:")] - [return: NullAllowed] - CIImage Apply (CIImage foreground, CIImage background); - - // @interface BuiltIn (CIBlendKernel) - - [Static] - [Export ("componentAdd", ArgumentSemantic.Strong)] - CIBlendKernel ComponentAdd { get; } - - [Static] - [Export ("componentMultiply", ArgumentSemantic.Strong)] - CIBlendKernel ComponentMultiply { get; } - - [Static] - [Export ("componentMin", ArgumentSemantic.Strong)] - CIBlendKernel ComponentMin { get; } - - [Static] - [Export ("componentMax", ArgumentSemantic.Strong)] - CIBlendKernel ComponentMax { get; } - - [Static] - [Export ("clear", ArgumentSemantic.Strong)] - CIBlendKernel Clear { get; } - - [Static] - [Export ("source", ArgumentSemantic.Strong)] - CIBlendKernel Source { get; } - - [Static] - [Export ("destination", ArgumentSemantic.Strong)] - CIBlendKernel Destination { get; } - - [Static] - [Export ("sourceOver", ArgumentSemantic.Strong)] - CIBlendKernel SourceOver { get; } - - [Static] - [Export ("destinationOver", ArgumentSemantic.Strong)] - CIBlendKernel DestinationOver { get; } - - [Static] - [Export ("sourceIn", ArgumentSemantic.Strong)] - CIBlendKernel SourceIn { get; } - - [Static] - [Export ("destinationIn", ArgumentSemantic.Strong)] - CIBlendKernel DestinationIn { get; } - - [Static] - [Export ("sourceOut", ArgumentSemantic.Strong)] - CIBlendKernel SourceOut { get; } - - [Static] - [Export ("destinationOut", ArgumentSemantic.Strong)] - CIBlendKernel DestinationOut { get; } - - [Static] - [Export ("sourceAtop", ArgumentSemantic.Strong)] - CIBlendKernel SourceAtop { get; } - - [Static] - [Export ("destinationAtop", ArgumentSemantic.Strong)] - CIBlendKernel DestinationAtop { get; } - - [Static] - [Export ("exclusiveOr", ArgumentSemantic.Strong)] - CIBlendKernel ExclusiveOr { get; } - - [Static] - [Export ("multiply", ArgumentSemantic.Strong)] - CIBlendKernel Multiply { get; } - - [Static] - [Export ("screen", ArgumentSemantic.Strong)] - CIBlendKernel Screen { get; } - - [Static] - [Export ("overlay", ArgumentSemantic.Strong)] - CIBlendKernel Overlay { get; } - - [Static] - [Export ("darken", ArgumentSemantic.Strong)] - CIBlendKernel Darken { get; } - - [Static] - [Export ("lighten", ArgumentSemantic.Strong)] - CIBlendKernel Lighten { get; } - - [Static] - [Export ("colorDodge", ArgumentSemantic.Strong)] - CIBlendKernel ColorDodge { get; } - - [Static] - [Export ("colorBurn", ArgumentSemantic.Strong)] - CIBlendKernel ColorBurn { get; } - - [Static] - [Export ("hardLight", ArgumentSemantic.Strong)] - CIBlendKernel HardLight { get; } - - [Static] - [Export ("softLight", ArgumentSemantic.Strong)] - CIBlendKernel SoftLight { get; } - - [Static] - [Export ("difference", ArgumentSemantic.Strong)] - CIBlendKernel Difference { get; } - - [Static] - [Export ("exclusion", ArgumentSemantic.Strong)] - CIBlendKernel Exclusion { get; } - - [Static] - [Export ("hue", ArgumentSemantic.Strong)] - CIBlendKernel Hue { get; } - - [Static] - [Export ("saturation", ArgumentSemantic.Strong)] - CIBlendKernel Saturation { get; } - - [Static] - [Export ("color", ArgumentSemantic.Strong)] - CIBlendKernel Color { get; } - - [Static] - [Export ("luminosity", ArgumentSemantic.Strong)] - CIBlendKernel Luminosity { get; } - - [Static] - [Export ("subtract", ArgumentSemantic.Strong)] - CIBlendKernel Subtract { get; } - - [Static] - [Export ("divide", ArgumentSemantic.Strong)] - CIBlendKernel Divide { get; } - - [Static] - [Export ("linearBurn", ArgumentSemantic.Strong)] - CIBlendKernel LinearBurn { get; } - - [Static] - [Export ("linearDodge", ArgumentSemantic.Strong)] - CIBlendKernel LinearDodge { get; } - - [Static] - [Export ("vividLight", ArgumentSemantic.Strong)] - CIBlendKernel VividLight { get; } - - [Static] - [Export ("linearLight", ArgumentSemantic.Strong)] - CIBlendKernel LinearLight { get; } - - [Static] - [Export ("pinLight", ArgumentSemantic.Strong)] - CIBlendKernel PinLight { get; } - - [Static] - [Export ("hardMix", ArgumentSemantic.Strong)] - CIBlendKernel HardMix { get; } - - [Static] - [Export ("darkerColor", ArgumentSemantic.Strong)] - CIBlendKernel DarkerColor { get; } - - [Static] - [Export ("lighterColor", ArgumentSemantic.Strong)] - CIBlendKernel LighterColor { get; } - } - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // Handle is null if created thru `init` - interface CIRenderDestination { - - [Export ("initWithPixelBuffer:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer); - - [Export ("initWithIOSurface:")] - IntPtr Constructor (IOSurface.IOSurface surface); - -#if XAMCORE_2_0 - [Export ("initWithMTLTexture:commandBuffer:")] - IntPtr Constructor (IMTLTexture texture, [NullAllowed] IMTLCommandBuffer commandBuffer); - - [Export ("initWithWidth:height:pixelFormat:commandBuffer:mtlTextureProvider:")] - IntPtr Constructor (nuint width, nuint height, MTLPixelFormat pixelFormat, [NullAllowed] IMTLCommandBuffer commandBuffer, Func block); -#endif - - [Export ("initWithGLTexture:target:width:height:")] - IntPtr Constructor (uint texture, uint target, nuint width, nuint height); - - [Export ("initWithBitmapData:width:height:bytesPerRow:format:")] - IntPtr Constructor (IntPtr data, nuint width, nuint height, nuint bytesPerRow, CIFormat format); - - [Export ("width")] - nuint Width { get; } - - [Export ("height")] - nuint Height { get; } - - [Export ("alphaMode", ArgumentSemantic.Assign)] - CIRenderDestinationAlphaMode AlphaMode { get; set; } - - [Export ("flipped")] - bool Flipped { [Bind ("isFlipped")] get; set; } - - [Export ("dithered")] - bool Dithered { [Bind ("isDithered")] get; set; } - - [Export ("clamped")] - bool Clamped { [Bind ("isClamped")] get; set; } - - [NullAllowed, Export ("colorSpace", ArgumentSemantic.Assign)] - CGColorSpace ColorSpace { get; set; } - - [NullAllowed, Export ("blendKernel", ArgumentSemantic.Retain)] - CIBlendKernel BlendKernel { get; set; } - - [Export ("blendsInDestinationColorSpace")] - bool BlendsInDestinationColorSpace { get; set; } - } - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // no docs, but only returned from CIRenderTask.WaitUntilCompleted. Handle is null if created thru `init` - interface CIRenderInfo { - - [Export ("kernelExecutionTime")] - double KernelExecutionTime { get; } - - [Export ("passCount")] - nint PassCount { get; } - - [Export ("pixelsProcessed")] - nint PixelsProcessed { get; } - } - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // no docs, but only returned from CIContext.StartTaskToRender. Handle is null if created thru `init` - interface CIRenderTask { - [Export ("waitUntilCompletedAndReturnError:")] - [return: NullAllowed] - CIRenderInfo WaitUntilCompleted ([NullAllowed] out NSError error); - } - - [iOS (11,0)] - [Mac (10,13)] - [TV (11,0)] - [Category] - [BaseType (typeof (CIContext))] - interface CIContext_CIRenderDestination { - - [Export ("prepareRender:fromRect:toDestination:atPoint:error:")] - bool PrepareRender (CIImage image, CGRect fromRect, CIRenderDestination destination, CGPoint atPoint, [NullAllowed] out NSError error); - - [Export ("startTaskToRender:fromRect:toDestination:atPoint:error:")] - [return: NullAllowed] - CIRenderTask StartTaskToRender (CIImage image, CGRect fromRect, CIRenderDestination destination, CGPoint atPoint, [NullAllowed] out NSError error); - - [Export ("startTaskToRender:toDestination:error:")] - [return: NullAllowed] - CIRenderTask StartTaskToRender (CIImage image, CIRenderDestination destination, [NullAllowed] out NSError error); - - [Export ("startTaskToClear:error:")] - [return: NullAllowed] - CIRenderTask StartTaskToClear (CIRenderDestination destination, [NullAllowed] out NSError error); - } - - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [Static] - [Internal] - partial interface CIImageRepresentationKeys { - - [Field ("kCGImageDestinationLossyCompressionQuality", "ImageIO")] - NSString LossyCompressionQualityKey { get; } - - [Field ("kCIImageRepresentationAVDepthData")] - NSString AVDepthDataKey { get; } - - [Field ("kCIImageRepresentationDepthImage")] - NSString DepthImageKey { get; } - - [Field ("kCIImageRepresentationDisparityImage")] - NSString DisparityImageKey { get; } - } - - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13)] - [StrongDictionary ("CIImageRepresentationKeys")] - interface CIImageRepresentationOptions { - - float LossyCompressionQuality { get; set; } - -#if false // keys lack documentation (or sample) to expose properly - https://bugzilla.xamarin.com/show_bug.cgi?id=59296 - bool AVDepthData { get; set; } - - bool DepthImage { get; set; } - - bool DisparityImage { get; set; } -#endif - } } diff --git a/src/corelocation.cs b/src/corelocation.cs index b5677b6446c..dd8401c95bc 100644 --- a/src/corelocation.cs +++ b/src/corelocation.cs @@ -16,9 +16,6 @@ #if !MONOMAC using XamCore.UIKit; #endif -#if XAMCORE_2_0 && !TVOS -using XamCore.Contacts; -#endif using System; namespace XamCore.CoreLocation { @@ -104,7 +101,7 @@ partial interface CLLocation : NSSecureCoding, NSCopying { #if !XAMCORE_2_0 [Export ("getDistanceFrom:")] - [Availability (Deprecated = Platform.iOS_3_2, Message = "Use 'DistanceFrom' instead.")] + [Availability (Deprecated = Platform.iOS_3_2, Message = "Use DistanceFrom instead")] double Distancefrom (CLLocation location); #endif @@ -230,13 +227,13 @@ partial interface CLLocationManager { bool SignificantLocationChangeMonitoringAvailable { get; } [NoWatch][NoTV] - [Availability (Introduced = Platform.iOS_4_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'IsMonitoringAvailable' instead.")] + [Availability (Introduced = Platform.iOS_4_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use IsMonitoringAvailable instead")] [Export ("regionMonitoringAvailable"), Static] bool RegionMonitoringAvailable { get; } [NoWatch][NoTV] [Since (4,0)] - [Availability (Introduced = Platform.iOS_4_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_6_0 | Platform.Mac_10_10, Message = "Use 'IsMonitoringAvailable' and 'AuthorizationStatus' instead.")] + [Availability (Introduced = Platform.iOS_4_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_6_0 | Platform.Mac_10_10, Message = "Use IsMonitoringAvailable and AuthorizationStatus instead")] [Export ("regionMonitoringEnabled"), Static] bool RegionMonitoringEnabled { get; } @@ -302,8 +299,7 @@ partial interface CLLocationManager { void StartMonitoring (CLRegion region); #if !MONOMAC - [NoTV] - [Watch (4,0)] + [NoWatch][NoTV] [Since (6,0)] [Export ("activityType", ArgumentSemantic.Assign)] CLActivityType ActivityType { get; set; } @@ -391,14 +387,10 @@ partial interface CLLocationManager { [Export ("requestLocation")] void RequestLocation (); - [NoTV] - [iOS (9,0), Watch (4,0)] + [NoWatch][NoTV] + [iOS (9,0)] [Export ("allowsBackgroundLocationUpdates")] bool AllowsBackgroundLocationUpdates { get; set; } - - [NoWatch, NoTV, NoMac, iOS (11,0)] - [Export ("showsBackgroundLocationIndicator")] - bool ShowsBackgroundLocationIndicator { get; set; } #endif } @@ -511,12 +503,12 @@ partial interface CLLocationDistance { [DisableDefaultCtor] // will crash, see CoreLocation.cs for compatibility stubs partial interface CLRegion : NSSecureCoding, NSCopying { [NoTV] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'CLCircularRegion' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use CLCircularRegion instead")] [Export ("center")] CLLocationCoordinate2D Center { get; } [NoTV] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'CLCircularRegion' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use CLCircularRegion instead")] [Export ("radius")] double Radius { get; } @@ -524,12 +516,12 @@ partial interface CLRegion : NSSecureCoding, NSCopying { string Identifier { get; } [NoTV] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'CLCircularRegion' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use CLCircularRegion instead")] [Export ("initCircularRegionWithCenter:radius:identifier:")] IntPtr Constructor (CLLocationCoordinate2D center, double radius, string identifier); [NoTV] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'CLCircularRegion' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use CLCircularRegion instead")] [Export ("containsCoordinate:")] bool Contains (CLLocationCoordinate2D coordinate); @@ -547,9 +539,6 @@ partial interface CLRegion : NSSecureCoding, NSCopying { [BaseType (typeof (NSObject))] [DisableDefaultCtor] // will crash, see CoreLocation.cs for compatibility stubs interface CLPlacemark : NSSecureCoding, NSCopying { - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CLPlacemark' properties to access data.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CLPlacemark' properties to access data.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CLPlacemark' properties to access data.")] [Export("addressDictionary", ArgumentSemantic.Copy)] NSDictionary AddressDictionary { get; } @@ -604,12 +593,6 @@ interface CLPlacemark : NSSecureCoding, NSCopying { [Export ("timeZone")] [iOS (9,0), Mac(10,11)] NSTimeZone TimeZone { get; } -#if XAMCORE_2_0 && !TVOS - // From CLPlacemark (ContactsAdditions) category. - [Watch (4,0), NoTV, Mac (10,13), iOS (11,0)] - [NullAllowed, Export ("postalAddress")] - CNPostalAddress PostalAddress { get; } -#endif } [Mac (10,10)] @@ -701,14 +684,6 @@ interface CLGeocoder { [Async] void ReverseGeocodeLocation (CLLocation location, CLGeocodeCompletionHandler completionHandler); - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("reverseGeocodeLocation:preferredLocale:completionHandler:")] - [Async] - void ReverseGeocodeLocation (CLLocation location, [NullAllowed] NSLocale locale, CLGeocodeCompletionHandler completionHandler); - - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")] [Export ("geocodeAddressDictionary:completionHandler:")] [Async] void GeocodeAddress (NSDictionary addressDictionary, CLGeocodeCompletionHandler completionHandler); @@ -721,25 +696,8 @@ interface CLGeocoder { [Async] void GeocodeAddress (string addressString, CLRegion region, CLGeocodeCompletionHandler completionHandler); - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Async] - [Export ("geocodeAddressString:inRegion:preferredLocale:completionHandler:")] - void GeocodeAddress (string addressString, [NullAllowed] CLRegion region, [NullAllowed] NSLocale locale, CLGeocodeCompletionHandler completionHandler); - [Export ("cancelGeocode")] void CancelGeocode (); - -#if XAMCORE_2_0 && !TVOS - [Watch (4,0), NoTV, Mac (10,13), iOS (11,0)] - [Export ("geocodePostalAddress:completionHandler:")] - [Async] - void GeocodePostalAddress (CNPostalAddress postalAddress, CLGeocodeCompletionHandler completionHandler); - - [Watch (4,0), NoTV, Mac (10,13), iOS (11,0)] - [Export ("geocodePostalAddress:preferredLocale:completionHandler:")] - [Async] - void GeocodePostalAddress (CNPostalAddress postalAddress, [NullAllowed] NSLocale locale, CLGeocodeCompletionHandler completionHandler); -#endif } #if !MONOMAC diff --git a/src/coreml.cs b/src/coreml.cs deleted file mode 100644 index 74029a3f68c..00000000000 --- a/src/coreml.cs +++ /dev/null @@ -1,350 +0,0 @@ -// -// CoreML C# bindings -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using XamCore.ObjCRuntime; -using XamCore.CoreFoundation; -using XamCore.CoreVideo; -using XamCore.Foundation; - -namespace XamCore.CoreML { - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Native] - public enum MLFeatureType : nint { - Invalid = 0, - Int64 = 1, - Double = 2, - String = 3, - Image = 4, - MultiArray = 5, - Dictionary = 6, - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [ErrorDomain ("MLModelErrorDomain")] - [Native] - public enum MLModelError : nint { - Generic = 0, - FeatureType = 1, - IO = 3, - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Native] - public enum MLMultiArrayDataType : nint { - Double = 65536 | 64, - Float32 = 65536 | 32, - Int32 = 131072 | 32, - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [BaseType (typeof (NSObject))] - interface MLDictionaryFeatureProvider : MLFeatureProvider { - - [Export ("dictionary")] - NSDictionary Dictionary { get; } - - [Export ("initWithDictionary:error:")] - IntPtr Constructor (NSDictionary dictionary, out NSError error); - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [BaseType (typeof (NSObject))] - interface MLFeatureDescription : NSCopying { - - [Export ("name")] - string Name { get; } - - [Export ("type")] - MLFeatureType Type { get; } - - [Export ("optional")] - bool Optional { [Bind ("isOptional")] get; } - - [Export ("isAllowedValue:")] - bool IsAllowed (MLFeatureValue value); - - // Category MLFeatureDescription (MLFeatureValueConstraints) - - [NullAllowed, Export ("multiArrayConstraint", ArgumentSemantic.Assign)] - MLMultiArrayConstraint MultiArrayConstraint { get; } - - [NullAllowed, Export ("imageConstraint", ArgumentSemantic.Assign)] - MLImageConstraint ImageConstraint { get; } - - [NullAllowed, Export ("dictionaryConstraint", ArgumentSemantic.Assign)] - MLDictionaryConstraint DictionaryConstraint { get; } - } - - interface IMLFeatureProvider { } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Protocol] - interface MLFeatureProvider { - - [Abstract] - [Export ("featureNames")] - NSSet FeatureNames { get; } - - [Abstract] - [Export ("featureValueForName:")] - [return: NullAllowed] - MLFeatureValue GetFeatureValue (string featureName); - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [BaseType (typeof (NSObject))] - interface MLFeatureValue : NSCopying { - - [Export ("type")] - MLFeatureType Type { get; } - - [Export ("undefined")] - bool Undefined { [Bind ("isUndefined")] get; } - - [Export ("int64Value")] - long Int64Value { get; } - - [Export ("doubleValue")] - double DoubleValue { get; } - - [Export ("stringValue")] - string StringValue { get; } - - [NullAllowed, Export ("multiArrayValue")] - MLMultiArray MultiArrayValue { get; } - - [Export ("dictionaryValue")] - NSDictionary DictionaryValue { get; } - - [NullAllowed, Export ("imageBufferValue")] - CVPixelBuffer ImageBufferValue { get; } - - [Static] - [Export ("featureValueWithPixelBuffer:")] - MLFeatureValue Create (CVPixelBuffer value); - - [Static] - [Export ("featureValueWithInt64:")] - MLFeatureValue Create (long value); - - [Static] - [Export ("featureValueWithDouble:")] - MLFeatureValue Create (double value); - - [Static] - [Export ("featureValueWithString:")] - MLFeatureValue Create (string value); - - [Static] - [Export ("featureValueWithMultiArray:")] - MLFeatureValue Create (MLMultiArray value); - - [Static] - [Export ("undefinedFeatureValueWithType:")] - MLFeatureValue CreateUndefined (MLFeatureType type); - - [Static] - [Export ("featureValueWithDictionary:error:")] - [return: NullAllowed] - MLFeatureValue Create (NSDictionary value, out NSError error); - - [Export ("isEqualToFeatureValue:")] - bool IsEqual (MLFeatureValue value); - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [BaseType (typeof (NSObject))] - interface MLModel { - - [Export ("modelDescription")] - MLModelDescription ModelDescription { get; } - - [Static] - [Export ("modelWithContentsOfURL:error:")] - [return: NullAllowed] - MLModel Create (NSUrl url, out NSError error); - - [Export ("predictionFromFeatures:error:")] - [return: NullAllowed] - IMLFeatureProvider GetPrediction (IMLFeatureProvider input, out NSError error); - - [Export ("predictionFromFeatures:options:error:")] - [return: NullAllowed] - IMLFeatureProvider GetPrediction (IMLFeatureProvider input, MLPredictionOptions options, out NSError error); - - // Category MLModel (MLModelCompilation) - - [Static] - [Export ("compileModelAtURL:error:")] - [return: NullAllowed] - NSUrl CompileModel (NSUrl modelUrl, out NSError error); - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [BaseType (typeof (NSObject))] - interface MLModelDescription { - - [Export ("inputDescriptionsByName")] - NSDictionary InputDescriptionsByName { get; } - - [Export ("outputDescriptionsByName")] - NSDictionary OutputDescriptionsByName { get; } - - [NullAllowed, Export ("predictedFeatureName")] - string PredictedFeatureName { get; } - - [NullAllowed, Export ("predictedProbabilitiesName")] - string PredictedProbabilitiesName { get; } - - [Export ("metadata")] - [Internal] - NSDictionary _Metadata { get; } - - [Wrap ("_Metadata")] - MLModelMetadata Metadata { get; } - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Internal] - [Static] - interface MLModelMetadataKeys { - - [Field ("MLModelDescriptionKey")] - NSString DescriptionKey { get; } - - [Field ("MLModelVersionStringKey")] - NSString VersionStringKey { get; } - - [Field ("MLModelAuthorKey")] - NSString AuthorKey { get; } - - [Field ("MLModelLicenseKey")] - NSString LicenseKey { get; } - - [Field ("MLModelCreatorDefinedKey")] - NSString CreatorDefinedKey { get; } - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [StrongDictionary ("MLModelMetadataKeys")] - interface MLModelMetadata { - string Description { get; } - string VersionString { get; } - string Author { get; } - string License { get; } - string CreatorDefined { get; } - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (NSObject))] - interface MLMultiArray { - - [Export ("dataPointer")] - IntPtr DataPointer { get; } - - [Export ("dataType")] - MLMultiArrayDataType DataType { get; } - - [Internal] - [Export ("shape")] - IntPtr _Shape { get; } - - [Internal] - [Export ("strides")] - IntPtr _Strides { get; } - - [Export ("count")] - nint Count { get; } - - // From MLMultiArray (Creation) Category - - [Export ("initWithShape:dataType:error:")] - IntPtr Constructor (NSNumber [] shape, MLMultiArrayDataType dataType, out NSError error); - - [Export ("initWithDataPointer:shape:dataType:strides:deallocator:error:")] - IntPtr Constructor (IntPtr dataPointer, NSNumber [] shape, MLMultiArrayDataType dataType, NSNumber [] strides, Action deallocator, out NSError error); - - // From MLMultiArray (NSNumberDataAccess) Category - - [Export ("objectAtIndexedSubscript:")] - NSNumber GetObject (nint idx); - - [Export ("objectForKeyedSubscript:")] - NSNumber GetObject (NSNumber [] key); - - [Sealed] - [Export ("objectForKeyedSubscript:")] - [Internal] - // Bind 'key' as IntPtr to avoid multiple conversions (nint[] -> NSNumber[] -> NSArray) - NSNumber GetObject (IntPtr key); - - [Export ("setObject:atIndexedSubscript:")] - void SetObject (NSNumber obj, nint idx); - - [Export ("setObject:forKeyedSubscript:")] - void SetObject (NSNumber obj, NSNumber [] key); - - [Sealed] - [Export ("setObject:forKeyedSubscript:")] - [Internal] - // Bind 'key' as IntPtr to avoid multiple conversions (nint[] -> NSNumber[] -> NSArray) - void SetObject (NSNumber obj, IntPtr key); - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (NSObject))] - interface MLDictionaryConstraint { - - [Export ("keyType")] - MLFeatureType KeyType { get; } - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (NSObject))] - interface MLImageConstraint { - - [Export ("pixelsHigh")] - nint PixelsHigh { get; } - - [Export ("pixelsWide")] - nint PixelsWide { get; } - - [Export ("pixelFormatType")] - uint PixelFormatType { get; } - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (NSObject))] - interface MLMultiArrayConstraint { - - [Internal] - [Export ("shape")] - IntPtr _Shape { get; } - - [Export ("dataType")] - MLMultiArrayDataType DataType { get; } - } - - [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [BaseType (typeof (NSObject))] - interface MLPredictionOptions { - - [Export ("usesCPUOnly")] - bool UsesCpuOnly { get; set; } - } -} -#endif // XAMCORE_2_0 diff --git a/src/coremotion.cs b/src/coremotion.cs index c0e399ef7ba..b0082b9f287 100644 --- a/src/coremotion.cs +++ b/src/coremotion.cs @@ -204,10 +204,6 @@ interface CMDeviceMotion : NSSecureCoding { [Since (5,0)] [Export ("magneticField")] CMCalibratedMagneticField MagneticField { get; } - - [Watch (4,0), iOS (11,0)] - [Export ("heading")] - double Heading { get; } } [BaseType (typeof (CMLogItem))] @@ -240,7 +236,7 @@ interface CMMagnetometerData : NSSecureCoding { [NoWatch] [Since (7,0)] [BaseType (typeof (NSObject))] - [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'CMPedometer' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Use CMPedometer instead")] interface CMStepCounter { [Static] @@ -344,11 +340,6 @@ interface CMPedometer { [Watch (3,0)][iOS (10,0)] [Export ("stopPedometerEventUpdates")] void StopPedometerEventUpdates (); - - [Watch (4,0), iOS (11,0)] - [Static] - [Export ("authorizationStatus")] - CMAuthorizationStatus AuthorizationStatus { get; } } [Since (7,0)] @@ -374,11 +365,6 @@ interface CMMotionActivityManager { [Export ("stopActivityUpdates")] void StopActivityUpdates (); - - [Watch (4,0), iOS (11,0)] - [Static] - [Export ("authorizationStatus")] - CMAuthorizationStatus AuthorizationStatus { get; } } [Since (7,0)] @@ -435,20 +421,6 @@ interface CMAltimeter { [Export ("stopRelativeAltitudeUpdates")] void StopRelativeAltitudeUpdates (); - - [Watch (4,0), iOS (11,0)] - [Static] - [Export ("authorizationStatus")] - CMAuthorizationStatus AuthorizationStatus { get; } - } - - [Watch (4,0), iOS (11,0)] - [Native] - public enum CMAuthorizationStatus : nint { - NotDetermined = 0, - Restricted, - Denied, - Authorized, } [iOS (9,0)] @@ -466,8 +438,6 @@ interface CMSensorRecorder [Export ("isAccelerometerRecordingAvailable")] bool IsAccelerometerRecordingAvailable { get; } - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CMSensorRecorder.AuthorizationStatus' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CMSensorRecorder.AuthorizationStatus' instead.")] [Static] [Export ("isAuthorizedForRecording")] bool IsAuthorizedForRecording { get; } @@ -480,11 +450,6 @@ interface CMSensorRecorder [iOS (9,3)] // Apple changed the selector in 9.3 and removed the old one [Export ("recordAccelerometerForDuration:")] void RecordAccelerometer (double duration); - - [Watch (4, 0), iOS (11, 0)] - [Static] - [Export ("authorizationStatus")] - CMAuthorizationStatus AuthorizationStatus { get; } } [Watch (3,0)][NoTV][iOS (10,0)] diff --git a/src/corenfc.cs b/src/corenfc.cs deleted file mode 100644 index 16bfbe4b7f7..00000000000 --- a/src/corenfc.cs +++ /dev/null @@ -1,300 +0,0 @@ -// -// CoreNFC C# bindings -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using XamCore.ObjCRuntime; -using XamCore.CoreFoundation; -using XamCore.Foundation; - -namespace XamCore.CoreNFC { - // Note on Availability: - // This framework says it is available on tvOS but - // nothing else but NFCReaderError is available on it in beta 1 - // keeping the original Availability attributes commented just in case - // this changes in a future beta and will just be enabled in iOS for now. - - //[iOS (11, 0), TV (11, 0), NoWatch, NoMac] - [iOS (11,0)] - [ErrorDomain ("NFCErrorDomain")] - [Native] - public enum NFCReaderError : nint { - UnsupportedFeature = 1, - SecurityViolation, - ReaderTransceiveErrorTagConnectionLost = 100, - ReaderTransceiveErrorRetryExceeded, - ReaderTransceiveErrorTagResponseError, - ReaderSessionInvalidationErrorUserCanceled = 200, - ReaderSessionInvalidationErrorSessionTimeout, - ReaderSessionInvalidationErrorSessionTerminatedUnexpectedly, - ReaderSessionInvalidationErrorSystemIsBusy, - ReaderSessionInvalidationErrorFirstNDEFTagRead, - TagCommandConfigurationErrorInvalidParameters = 300, - } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [Native] - public enum NFCTagType : nuint { - Iso15693 = 1, - } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - public enum NFCTypeNameFormat : byte { // uint8_t - Empty = 0x00, - NFCWellKnown = 0x01, - Media = 0x02, - AbsoluteUri = 0x03, - NFCExternal = 0x04, - Unknown = 0x05, - Unchanged = 0x06, - } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [BaseType (typeof (NFCReaderSession), Name = "NFCISO15693ReaderSession")] - [DisableDefaultCtor] - interface NFCIso15693ReaderSession { - - [Field ("NFCISO15693TagResponseErrorKey")] - NSString TagResponseErrorKey { get; } - - [Export ("initWithDelegate:queue:")] - [DesignatedInitializer] - IntPtr Constructor (INFCReaderSessionDelegate @delegate, [NullAllowed] DispatchQueue queue); - - [Static] - [Export ("readingAvailable")] - bool ReadingAvailable { get; } - - [Export ("restartPolling")] - void RestartPolling (); - } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [BaseType (typeof (NFCTagCommandConfiguration), Name = "NFCISO15693CustomCommandConfiguration")] - interface NFCIso15693CustomCommandConfiguration { - - [Export ("manufacturerCode")] - nuint ManufacturerCode { get; set; } - - [Export ("customCommandCode")] - nuint CustomCommandCode { get; set; } - - [Export ("requestParameters", ArgumentSemantic.Copy)] - NSData RequestParameters { get; set; } - - [Export ("initWithManufacturerCode:customCommandCode:requestParameters:")] - IntPtr Constructor (nuint manufacturerCode, nuint customCommandCode, [NullAllowed] NSData requestParameters); - - [Export ("initWithManufacturerCode:customCommandCode:requestParameters:maximumRetries:retryInterval:")] - IntPtr Constructor (nuint manufacturerCode, nuint customCommandCode, [NullAllowed] NSData requestParameters, nuint maximumRetries, double retryInterval); - } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [BaseType (typeof (NFCTagCommandConfiguration), Name = "NFCISO15693ReadMultipleBlocksConfiguration")] - interface NFCIso15693ReadMultipleBlocksConfiguration { - - [Export ("range", ArgumentSemantic.Assign)] - NSRange Range { get; set; } - - [Export ("chunkSize")] - nuint ChunkSize { get; set; } - - [Export ("initWithRange:chunkSize:")] - IntPtr Constructor (NSRange range, nuint chunkSize); - - [Export ("initWithRange:chunkSize:maximumRetries:retryInterval:")] - IntPtr Constructor (NSRange range, nuint chunkSize, nuint maximumRetries, double retryInterval); - } - - interface INFCIso15693Tag { } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [Protocol (Name = "NFCISO15693Tag")] - interface NFCIso15693Tag : NFCTag { - - [Abstract] - [Export ("identifier", ArgumentSemantic.Copy)] - NSData Identifier { get; } - - [Abstract] - [Export ("icManufacturerCode")] - nuint IcManufacturerCode { get; } - - [Abstract] - [Export ("icSerialNumber", ArgumentSemantic.Copy)] - NSData IcSerialNumber { get; } - - [Abstract] - [Export ("sendCustomCommandWithConfiguration:completionHandler:")] - void SendCustomCommand (NFCIso15693CustomCommandConfiguration commandConfiguration, Action completionHandler); - - [Abstract] - [Export ("readMultipleBlocksWithConfiguration:completionHandler:")] - void ReadMultipleBlocks (NFCIso15693ReadMultipleBlocksConfiguration readConfiguration, Action completionHandler); - } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "NFCNDEFPayload")] - [DisableDefaultCtor] - interface NFCNdefPayload : NSSecureCoding { - - [Export ("typeNameFormat", ArgumentSemantic.Assign)] - NFCTypeNameFormat TypeNameFormat { get; set; } - - [Export ("type", ArgumentSemantic.Copy)] - NSData Type { get; set; } - - [Export ("identifier", ArgumentSemantic.Copy)] - NSData Identifier { get; set; } - - [Export ("payload", ArgumentSemantic.Copy)] - NSData Payload { get; set; } - } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "NFCNDEFMessage")] - [DisableDefaultCtor] - interface NFCNdefMessage : NSSecureCoding { - - [Export ("records", ArgumentSemantic.Copy)] - NFCNdefPayload [] Records { get; set; } - } - - interface INFCNdefReaderSessionDelegate { } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [Protocol, Model] - [BaseType (typeof (NSObject), Name = "NFCNDEFReaderSessionDelegate")] - interface NFCNdefReaderSessionDelegate { - - [Abstract] - [Export ("readerSession:didInvalidateWithError:")] - void DidInvalidate (NFCNdefReaderSession session, NSError error); - - [Abstract] - [Export ("readerSession:didDetectNDEFs:")] - void DidDetect (NFCNdefReaderSession session, NFCNdefMessage [] messages); - } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [BaseType (typeof (NFCReaderSession), Name = "NFCNDEFReaderSession")] - [DisableDefaultCtor] - interface NFCNdefReaderSession { - - [Export ("initWithDelegate:queue:invalidateAfterFirstRead:")] - [DesignatedInitializer] - IntPtr Constructor (INFCNdefReaderSessionDelegate @delegate, [NullAllowed] DispatchQueue queue, bool invalidateAfterFirstRead); - - [Static] - [Export ("readingAvailable")] - bool ReadingAvailable { get; } - } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface NFCReaderSession : NFCReaderSessionContract { - - [Export ("delegate", ArgumentSemantic.Weak), NullAllowed] - INFCReaderSessionDelegate Delegate { get; } - - [Export ("sessionQueue")] - DispatchQueue SessionQueue { get; } - } - - interface INFCReaderSessionContract { } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [Protocol (Name = "NFCReaderSession")] - interface NFCReaderSessionContract { - - [Abstract] - [Export ("ready")] - bool Ready { [Bind ("isReady")] get; } - - [Abstract] - [Export ("alertMessage")] - string AlertMessage { get; set; } - - [Abstract] - [Export ("beginSession")] - void BeginSession (); - - [Abstract] - [Export ("invalidateSession")] - void InvalidateSession (); - } - - interface INFCReaderSessionDelegate { } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [Protocol, Model] - [BaseType (typeof (NSObject))] - interface NFCReaderSessionDelegate { - - [Abstract] - [Export ("readerSessionDidBecomeActive:")] - void DidBecomeActive (NFCReaderSession session); - - [Abstract] - [Export ("readerSession:didDetectTags:")] - void DidDetectTags (NFCReaderSession session, INFCTag [] tags); - - [Abstract] - [Export ("readerSession:didInvalidateWithError:")] - void DidInvalidate (NFCReaderSession session, NSError error); - } - - interface INFCTag { } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [Protocol] - interface NFCTag : NSSecureCoding, NSCopying { - - [Abstract] - [Export ("type", ArgumentSemantic.Assign)] - NFCTagType Type { get; } - - [Abstract] - [NullAllowed, Export ("session", ArgumentSemantic.Weak)] - NFCReaderSession Session { get; } - - [Abstract] - [Export ("available")] - bool Available { [Bind ("isAvailable")] get; } - } - - //[iOS (11,0), NoTV, NoWatch, NoMac] - [iOS (11,0)] - [BaseType (typeof (NSObject))] - interface NFCTagCommandConfiguration : NSCopying { - - [Export ("maximumRetries")] - nuint MaximumRetries { get; set; } - - [Export ("retryInterval")] - double RetryInterval { get; set; } - } -} -#endif diff --git a/src/corespotlight.cs b/src/corespotlight.cs index 08236e41cc0..2302c8b58ca 100644 --- a/src/corespotlight.cs +++ b/src/corespotlight.cs @@ -124,16 +124,6 @@ interface CSSearchableIndexDelegate { [Export ("searchableIndexDidFinishThrottle:")] void DidFinishThrottle (CSSearchableIndex searchableIndex); - - [iOS (11,0), NoTV, Mac (10,13)] - [Export ("dataForSearchableIndex:itemIdentifier:typeIdentifier:error:")] - [return: NullAllowed] - NSData GetData (CSSearchableIndex searchableIndex, string itemIdentifier, string typeIdentifier, out NSError outError); - - [iOS (11,0), NoTV, Mac (10,13)] - [Export ("fileURLForSearchableIndex:itemIdentifier:typeIdentifier:inPlace:error:")] - [return: NullAllowed] - NSUrl GetFileUrl (CSSearchableIndex searchableIndex, string itemIdentifier, string typeIdentifier, bool inPlace, out NSError outError); } [NoTV] // CS_TVOS_UNAVAILABLE @@ -989,41 +979,6 @@ interface CSSearchableItemAttributeSet : NSCopying, NSSecureCoding { [Export ("valueForCustomKey:")] [return: NullAllowed] INSSecureCoding ValueForCustomKey (CSCustomAttributeKey key); - - // CSSearchableItemAttributeSet_CSGeneral - - [iOS (11,0), NoTV, Mac (10, 11)] - [NullAllowed, Export ("userCreated", ArgumentSemantic.Strong)] - [Internal] // We would like to use [BindAs (typeof (bool?))] - NSNumber _IsUserCreated { [Bind ("isUserCreated")] get; set; } - - [iOS (11, 0), NoTV, Mac (10, 11)] - [NullAllowed, Export ("userOwned", ArgumentSemantic.Strong)] - [Internal] // We would like to use[BindAs (typeof (bool?))] - NSNumber _IsUserOwned { [Bind ("isUserOwned")] get; set; } - - [iOS (11, 0), NoTV, Mac (10, 11)] - [NullAllowed, Export ("userCurated", ArgumentSemantic.Strong)] - [Internal] // We would like to use [BindAs (typeof (bool?))] - NSNumber _IsUserCurated { [Bind ("isUserCurated")] get; set; } - - [iOS (11, 0), NoTV, Mac (10, 11)] - [NullAllowed, Export ("rankingHint", ArgumentSemantic.Strong)] - NSNumber RankingHint { get; set; } - - // CSSearchableItemAttributeSet_CSItemProvider - - [iOS (11, 0), NoTV, Mac (10, 11)] - [NullAllowed, Export ("providerDataTypeIdentifiers", ArgumentSemantic.Copy)] - string[] ProviderDataTypeIdentifiers { get; set; } - - [iOS (11, 0), NoTV, Mac (10, 11)] - [NullAllowed, Export ("providerFileTypeIdentifiers", ArgumentSemantic.Copy)] - string[] ProviderFileTypeIdentifiers { get; set; } - - [iOS (11, 0), NoTV, Mac (10, 11)] - [NullAllowed, Export ("providerInPlaceFileTypeIdentifiers", ArgumentSemantic.Copy)] - string[] ProviderInPlaceFileTypeIdentifiers { get; set; } } [NoTV][iOS (10,0)] diff --git a/src/coretelephony.cs b/src/coretelephony.cs index 17335860084..c0c9d72e42b 100644 --- a/src/coretelephony.cs +++ b/src/coretelephony.cs @@ -6,11 +6,11 @@ namespace XamCore.CoreTelephony { [Since (4,0)] [BaseType (typeof (NSObject))] interface CTCall { - [Availability (Deprecated = Platform.iOS_10_0, Message = "Use 'CallKit' instead.")] + [Availability (Deprecated = Platform.iOS_10_0, Message = "Use CallKit")] [Export ("callID")] string CallID { get; } - [Availability (Deprecated = Platform.iOS_10_0, Message = "Use 'CallKit' instead.")] + [Availability (Deprecated = Platform.iOS_10_0, Message = "Use CallKit")] [Export ("callState")] string CallState { get; } @@ -90,11 +90,10 @@ interface CTTelephonyNetworkInfo { delegate void CTCallEventHandler (CTCall call); #endif - [Deprecated (PlatformName.iOS, 10, 0, message: "Replaced by 'CXCallObserver' from 'CallKit'.")] [BaseType (typeof (NSObject))] [Since (4,0)] interface CTCallCenter { - [Availability (Deprecated = Platform.iOS_10_0, Message = "Use 'CallKit' instead.")] + [Availability (Deprecated = Platform.iOS_10_0, Message = "Use CallKit")] [NullAllowed] // by default this property is null [Export ("callEventHandler")] #if XAMCORE_2_0 @@ -103,7 +102,7 @@ interface CTCallCenter { CTCallEventHandler CallEventHandler { get; set; } #endif - [Availability (Deprecated = Platform.iOS_10_0, Message = "Use 'CallKit' instead.")] + [Availability (Deprecated = Platform.iOS_10_0, Message = "Use CallKit")] [Export ("currentCalls")] NSSet CurrentCalls { get; } diff --git a/src/corevideo.cs b/src/corevideo.cs index 69ce5ce1351..793acf00ad7 100644 --- a/src/corevideo.cs +++ b/src/corevideo.cs @@ -267,12 +267,10 @@ interface CVPixelBuffer { NSString PlaneAlignmentKey { get; } #if !MONOMAC || !XAMCORE_2_0 - [NoWatch] [iOS (6,0)] [Field ("kCVPixelBufferOpenGLESCompatibilityKey")] NSString OpenGLESCompatibilityKey { get; } - [NoWatch] [iOS (9,0)] [Field ("kCVPixelBufferOpenGLESTextureCacheCompatibilityKey")] NSString OpenGLESTextureCacheCompatibilityKey { get; } @@ -303,7 +301,6 @@ interface CVPixelBufferPool : CVImageBuffer { } #if !MONOMAC - [NoWatch] [Partial] interface CVMetalTextureCache { [Internal] diff --git a/src/corewlan.cs b/src/corewlan.cs index 889c107e91d..7c4f2a793d5 100644 --- a/src/corewlan.cs +++ b/src/corewlan.cs @@ -409,18 +409,6 @@ interface CWInterface { [Export ("commitConfiguration:authorization:error:")] bool CommitConfiguration (CWConfiguration configuration, NSObject authorization, out NSError error); - - [Mac (10,13)] - [Export ("scanForNetworksWithSSID:includeHidden:error:")] - [return: NullAllowed] - [Internal] - NSSet _ScanForNetworksWithSsid ([NullAllowed] NSData ssid, bool includeHidden, [NullAllowed] out NSError error); - - [Mac (10,13)] - [Export ("scanForNetworksWithName:includeHidden:error:")] - [return: NullAllowed] - [Internal] - NSSet _ScanForNetworksWithName ([NullAllowed] string networkName, bool includeHidden, [NullAllowed] out NSError error); } [BaseType (typeof (NSObject))] diff --git a/src/devicecheck.cs b/src/devicecheck.cs deleted file mode 100644 index 805c331f5bf..00000000000 --- a/src/devicecheck.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// DeviceCheck C# bindings -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 -using System; -using XamCore.ObjCRuntime; -using XamCore.Foundation; - -namespace XamCore.DeviceCheck { - - [TV (11,0), NoWatch, NoMac, iOS (11,0)] - [ErrorDomain ("DCErrorDomain")] - [Native] - public enum DCError : nint { - UnknownSystemFailure, - FeatureUnsupported - } - - [TV (11,0), NoWatch, NoMac, iOS (11,0)] - delegate void DCDeviceGenerateTokenCompletionHandler ([NullAllowed] NSData token, [NullAllowed] NSError error); - - [TV (11,0), NoWatch, NoMac, iOS (11,0)] - [DisableDefaultCtor] // From the documentation it seems the only way to create a usable instance is to use the static CurrentDevice property. - [BaseType (typeof (NSObject))] - interface DCDevice { - - [Static] - [Export ("currentDevice")] - DCDevice CurrentDevice { get; } - - [Export ("supported")] - bool Supported { [Bind ("isSupported")] get; } - - [Async] - [Export ("generateTokenWithCompletionHandler:")] - void GenerateToken (DCDeviceGenerateTokenCompletionHandler completion); - } -} -#endif diff --git a/src/eventkit.cs b/src/eventkit.cs index c10e1234bed..bc4d95c0687 100644 --- a/src/eventkit.cs +++ b/src/eventkit.cs @@ -54,14 +54,11 @@ interface EKObject { [Since (5,0)] [Mac (10,8, onlyOn64: true)] [BaseType (typeof (EKObject))] -#if XAMCORE_4_0 - [Abstract] // "The EKCalendarItem class is a an abstract superclass ..." from Apple docs. -#endif interface EKCalendarItem { #if !MONOMAC // Never made avaialble on MonoMac [Export ("UUID")] - [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_6_0, Message = "Use 'CalendarItemIdentifier' instead.")] + [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_6_0, Message = "Use CalendarItemIdentifier instead")] string UUID { get; } #endif @@ -150,7 +147,7 @@ interface EKSource { #if !MONOMAC [Export ("calendars")] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use 'GetCalendars (EKEntityType)' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use GetCalendars (EKEntityType) instead")] NSSet Calendars { get; } #endif @@ -191,7 +188,6 @@ interface EKStructuredLocation : NSCopying { [Since (4,0)] [Mac (10,8, onlyOn64: true)] [BaseType (typeof (EKObject))] - [DisableDefaultCtor] // Documentation says to use the static methods FromDate/FromTimeInterval to create instances interface EKAlarm : NSCopying { [Export ("relativeOffset")] double RelativeOffset { get; set; } @@ -271,7 +267,7 @@ interface EKCalendar { #if !MONOMAC [Since (5,0)] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use 'Create (EKEntityType, EKEventStore)' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use Create (EKEntityType, EKEventStore) instead")] [Static, Export ("calendarWithEventStore:")] EKCalendar FromEventStore (EKEventStore eventStore); #endif @@ -338,11 +334,11 @@ interface EKEvent { NSDate OccurrenceDate { get; } #if MONOMAC - [Availability (Introduced = Platform.Mac_10_8, Deprecated = Platform.Mac_10_11, Message = "Replaced by 'BirthdayContactIdentifier'.")] + [Availability (Introduced = Platform.Mac_10_8, Deprecated = Platform.Mac_10_11, Message = "Replaced by BirthdayContactIdentifier")] [Export ("birthdayPersonUniqueID")] string BirthdayPersonUniqueID { get; } #else - [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_9_0, Message = "Replaced by 'BirthdayContactIdentifier'.")] + [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_9_0, Message = "Replaced by BirthdayContactIdentifier")] [Export ("birthdayPersonID")] nint BirthdayPersonID { get; } #endif @@ -379,7 +375,7 @@ interface EKParticipant : NSCopying { // ABPerson GetPerson (ABAddressBook addressBook); #else #if !WATCH - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_9_0, Message = "Replaced by 'ContactPredicate'.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_9_0, Message = "Replaced by ContactPredicate")] [Export ("ABRecordWithAddressBook:")] ABRecord GetRecord (ABAddressBook addressBook); #endif // !WATCH @@ -521,20 +517,16 @@ IntPtr Constructor (EKRecurrenceFrequency type, nint interval, [NullAllowed] EKR [Mac (10,8, onlyOn64: true)] [BaseType (typeof (NSObject))] interface EKEventStore { - [NoiOS, Mac (10,11, onlyOn64: true), NoWatch] - [Export ("initWithSources:")] - IntPtr Constructor (EKSource[] sources); - [Export ("eventStoreIdentifier")] string EventStoreIdentifier { get; } #if !MONOMAC [Export ("calendars")] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use 'GetCalendars' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_6_0, Message = "Use GetCalendars instead")] EKCalendar [] Calendars { get; } #endif - [Export ("defaultCalendarForNewEvents"), NullAllowed] + [Export ("defaultCalendarForNewEvents")] EKCalendar DefaultCalendarForNewEvents { get; } #if !MONOMAC @@ -568,7 +560,6 @@ interface EKEventStore { EKSource [] Sources { get; } [Since (5,0)] - [return: NullAllowed] [Export ("sourceWithIdentifier:")] EKSource GetSource (string identifier); @@ -611,7 +602,6 @@ interface EKEventStore { void RefreshSourcesIfNecessary (); [Since (6,0)] - [return: NullAllowed] [Export ("calendarItemWithIdentifier:")] EKCalendarItem GetCalendarItem (string identifier); @@ -624,7 +614,6 @@ interface EKEventStore { EKCalendar[] GetCalendars (EKEntityType entityType); [Since (6,0)] - [NullAllowed] [Export ("defaultCalendarForNewReminders")] EKCalendar DefaultCalendarForNewReminders { get; } diff --git a/src/externalaccessory.cs b/src/externalaccessory.cs index 534287036a8..96d8d129317 100644 --- a/src/externalaccessory.cs +++ b/src/externalaccessory.cs @@ -8,13 +8,11 @@ using XamCore.Foundation; using XamCore.CoreFoundation; using XamCore.ObjCRuntime; -#if !MONOMAC using XamCore.UIKit; -#endif namespace XamCore.ExternalAccessory { - [Mac (10, 13)][TV (10,0)] + [TV (10,0)] [BaseType (typeof (NSObject), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(EAAccessoryDelegate)})] // Objective-C exception thrown. Name: EAAccessoryInitException Reason: -init not supported. EAAccessoryManager is responsible for creating all objects. [DisableDefaultCtor] @@ -58,7 +56,7 @@ interface EAAccessory { string DockType { get; } } - [Mac (10, 13)][TV (10,0)] + [TV (10,0)] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -67,7 +65,7 @@ interface EAAccessoryDelegate { void Disconnected (EAAccessory accessory); } - [Mac (10, 13)][TV (10,0)] + [TV (10,0)] interface EAAccessoryEventArgs { [Export ("EAAccessoryKey")] EAAccessory Accessory { get; } @@ -77,7 +75,7 @@ interface EAAccessoryEventArgs { EAAccessory Selected { get; } } - [Mac (10, 13)][TV (10,0)] + [TV (10,0)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: EAAccessoryManagerInitException Reason: -init is not supported. Use +sharedAccessoryManager. [DisableDefaultCtor] @@ -102,21 +100,20 @@ interface EAAccessoryManager { [Notification (typeof (EAAccessoryEventArgs))] NSString DidDisconnectNotification { get; } -#if !XAMCORE_3_0 && !MONOMAC +#if !XAMCORE_3_0 // now exposed with the corresponding EABluetoothAccessoryPickerError enum [Since (6,0)] [Field ("EABluetoothAccessoryPickerErrorDomain")] NSString BluetoothAccessoryPickerErrorDomain { get; } #endif - [NoMac] [Since (6,0)] [Export ("showBluetoothAccessoryPickerWithNameFilter:completion:")] [Async] void ShowBluetoothAccessoryPicker ([NullAllowed] NSPredicate predicate, [NullAllowed] Action completion); } - [Mac (10, 13)][TV (10,0)] + [TV (10,0)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: EASessionInitException Reason: -init not supported. use -initWithAccessory:forProtocol. [DisableDefaultCtor] @@ -137,7 +134,6 @@ interface EASession { NSOutputStream OutputStream { get; } } - [NoMac] [TV (10,0)] [iOS (8,0)] [BaseType (typeof (NSObject))] @@ -167,7 +163,6 @@ interface IEAWiFiUnconfiguredAccessoryBrowserDelegate {} // This class is exposed for tvOS in the headers, but there's no available initializer (so it can't be constructed) // The API is also clearly unusable (you can list the unconfigured accessories, but you can't search for them first...) [NoTV] // [TV (10,0)] - [NoMac] [iOS (8,0)] #if TVOS [BaseType (typeof (NSObject))] @@ -206,15 +201,12 @@ interface EAWiFiUnconfiguredAccessoryBrowser { [Export ("stopSearchingForUnconfiguredAccessories")] void StopSearchingForUnconfiguredAccessories (); -#if !MONOMAC [NoTV] [iOS (8,0)] [Export ("configureAccessory:withConfigurationUIOnViewController:")] void ConfigureAccessory (EAWiFiUnconfiguredAccessory accessory, UIViewController viewController); -#endif } - [NoMac] [NoTV] // no member is available [iOS (8,0)] [Protocol, Model] diff --git a/src/fileprovider.cs b/src/fileprovider.cs deleted file mode 100644 index 26904f322d0..00000000000 --- a/src/fileprovider.cs +++ /dev/null @@ -1,354 +0,0 @@ -// -// FileProvider C# bindings -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using XamCore.ObjCRuntime; -using XamCore.CoreGraphics; -using XamCore.Foundation; - -namespace XamCore.FileProvider { - - [iOS (11,0)] - [ErrorDomain ("NSFileProviderErrorDomain")] - [Native] - enum NSFileProviderError : nint { - NotAuthenticated = -1000, - FilenameCollision = -1001, - SyncAnchorExpired = -1002, - PageExpired = SyncAnchorExpired, - InsufficientQuota = -1003, - ServerUnreachable = -1004, - NoSuchItem = -1005, - } - - [iOS (11,0)] - [Static] - interface NSFileProviderErrorKeys { - - [Field ("NSFileProviderErrorCollidingItemKey")] - NSString CollidingItemKey { get; } - - [Field ("NSFileProviderErrorNonExistentItemIdentifierKey")] - NSString NonExistentItemIdentifierKey { get; } - } - - [iOS (11,0)] - [Static] - interface NSFileProviderFavoriteRank { - - [Field ("NSFileProviderFavoriteRankUnranked")] - ulong Unranked { get; } - } - - [iOS (11,0)] - [Static] - interface NSFileProviderItemIdentifier { - - [Field ("NSFileProviderRootContainerItemIdentifier")] - NSString RootContainer { get; } - - [Field ("NSFileProviderWorkingSetContainerItemIdentifier")] - NSString WorkingSetContainer { get; } - } - - [iOS (11,0)] - [Native] - [Flags] - enum NSFileProviderItemCapabilities : nuint { - Reading = 1 << 0, - Writing = 1 << 1, - Reparenting = 1 << 2, - Renaming = 1 << 3, - Trashing = 1 << 4, - Deleting = 1 << 5, - AddingSubItems = Writing, - ContentEnumerating = Reading, - All = Reading | Writing | Reparenting | Renaming | Trashing | Deleting, - } - - [iOS (11,0)] - [Static] - interface NSFileProviderPage { - - [Internal] - [Field ("NSFileProviderInitialPageSortedByName")] - IntPtr _InitialPageSortedByName { get; } - - [Static] - [Wrap ("Runtime.GetNSObject (_InitialPageSortedByName)")] - NSData InitialPageSortedByName { get; } - - [Internal] - [Field ("NSFileProviderInitialPageSortedByDate")] - IntPtr _InitialPageSortedByDate { get; } - - [Static] - [Wrap ("Runtime.GetNSObject (_InitialPageSortedByDate)")] - NSData InitialPageSortedByDate { get; } - } - - [iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (NSObject))] - interface NSFileProviderDomain { - - [Export ("initWithIdentifier:displayName:pathRelativeToDocumentStorage:")] - IntPtr Constructor (string identifier, string displayName, string pathRelativeToDocumentStorage); - - [Export ("identifier")] - string Identifier { get; } - - [Export ("displayName")] - string DisplayName { get; } - - [Export ("pathRelativeToDocumentStorage")] - string PathRelativeToDocumentStorage { get; } - } - - interface INSFileProviderEnumerationObserver { } - - [iOS (11,0)] - [Protocol] - interface NSFileProviderEnumerationObserver { - - [Abstract] - [Export ("didEnumerateItems:")] - void DidEnumerateItems (INSFileProviderItem [] updatedItems); - - [Abstract] - [Export ("finishEnumeratingUpToPage:")] - void FinishEnumerating ([NullAllowed] NSData upToPage); - - [Abstract] - [Export ("finishEnumeratingWithError:")] - void FinishEnumerating (NSError error); - } - - interface INSFileProviderChangeObserver { } - - [iOS (11,0)] - [Protocol] - interface NSFileProviderChangeObserver { - - [Abstract] - [Export ("didUpdateItems:")] - void DidUpdateItems (INSFileProviderItem [] updatedItems); - - [Abstract] - [Export ("didDeleteItemsWithIdentifiers:")] - void DidDeleteItems (string [] deletedItemIdentifiers); - - [Abstract] - [Export ("finishEnumeratingChangesUpToSyncAnchor:moreComing:")] - void FinishEnumeratingChanges (NSData anchor, bool moreComing); - - [Abstract] - [Export ("finishEnumeratingWithError:")] - void FinishEnumerating (NSError error); - } - - interface INSFileProviderEnumerator { } - - [iOS (11,0)] - [Protocol] - interface NSFileProviderEnumerator { - - [Abstract] - [Export ("invalidate")] - void Invalidate (); - - [Abstract] - [Export ("enumerateItemsForObserver:startingAtPage:")] - void EnumerateItems (INSFileProviderEnumerationObserver observer, NSData startPage); - - [Export ("enumerateChangesForObserver:fromSyncAnchor:")] - void EnumerateChanges (INSFileProviderChangeObserver observer, NSData syncAnchor); - - [Export ("currentSyncAnchorWithCompletionHandler:")] - void CurrentSyncAnchor (Action completionHandler); - } - - interface INSFileProviderItem { } - - [iOS (11,0)] - [Protocol] - interface NSFileProviderItem { - - [Abstract] - [Export ("itemIdentifier")] - string Identifier { get; } - - [Abstract] - [Export ("parentItemIdentifier")] - string ParentIdentifier { get; } - - [Abstract] - [Export ("filename")] - string Filename { get; } - - [Abstract] - [Export ("typeIdentifier")] - string TypeIdentifier { get; } - - [Export ("capabilities")] - NSFileProviderItemCapabilities GetCapabilities (); - - [return: NullAllowed] - [Export ("documentSize", ArgumentSemantic.Copy)] - NSNumber GetDocumentSize (); - - [return: NullAllowed] - [Export ("childItemCount", ArgumentSemantic.Copy)] - NSNumber GetChildItemCount (); - - [return: NullAllowed] - [Export ("creationDate", ArgumentSemantic.Copy)] - NSDate GetCreationDate (); - - [return: NullAllowed] - [Export ("contentModificationDate", ArgumentSemantic.Copy)] - NSDate GetContentModificationDate (); - - [return: NullAllowed] - [Export ("lastUsedDate", ArgumentSemantic.Copy)] - NSDate GetLastUsedDate (); - - [return: NullAllowed] - [Export ("tagData", ArgumentSemantic.Copy)] - NSData GetTagData (); - - [return: NullAllowed] - [Export ("favoriteRank", ArgumentSemantic.Copy)] - NSNumber GetFavoriteRank (); - - [Export ("isTrashed")] - bool IsTrashed (); - - [Export ("isUploaded")] - bool IsUploaded (); - - [Export ("isUploading")] - bool IsUploading (); - - [return: NullAllowed] - [Export ("uploadingError", ArgumentSemantic.Copy)] - NSError GetUploadingError (); - - [Export ("isDownloaded")] - bool IsDownloaded (); - - [Export ("isDownloading")] - bool IsDownloading (); - - [return: NullAllowed] - [Export ("downloadingError", ArgumentSemantic.Copy)] - NSError GetDownloadingError (); - - [Export ("isMostRecentVersionDownloaded")] - bool IsMostRecentVersionDownloaded (); - - [Export ("isShared")] - bool IsShared (); - - [Export ("isSharedByCurrentUser")] - bool IsSharedByCurrentUser (); - - [return: NullAllowed] - [Export ("ownerNameComponents")] - NSPersonNameComponents GetOwnerNameComponents (); - - [return: NullAllowed] - [Export ("mostRecentEditorNameComponents")] - NSPersonNameComponents GetMostRecentEditorNameComponents (); - - [return: NullAllowed] - [Export ("versionIdentifier")] - NSData GetVersionIdentifier (); - - [return: NullAllowed] - [Export ("userInfo")] - NSDictionary GetUserInfo (); - } - - [iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface NSFileProviderManager { - - [Static] - [Export ("defaultManager", ArgumentSemantic.Strong)] - NSFileProviderManager DefaultManager { get; } - - [Export ("signalEnumeratorForContainerItemIdentifier:completionHandler:")] - // Not Async'ified on purpose, because this can switch from app to extension. - void SignalEnumerator (string containerItemIdentifier, Action completion); - - // Not Async'ified on purpose, because the task must be accesed while the completion action is performing... - [Export ("registerURLSessionTask:forItemWithIdentifier:completionHandler:")] - void Register (NSUrlSessionTask task, string identifier, Action completion); - - [Export ("providerIdentifier")] - string ProviderIdentifier { get; } - - [Export ("documentStorageURL")] - NSUrl DocumentStorageUrl { get; } - - [Static] - [Export ("writePlaceholderAtURL:withMetadata:error:")] - bool WritePlaceholder (NSUrl placeholderUrl, INSFileProviderItem metadata, out NSError error); - - [Static] - [Export ("placeholderURLForURL:")] - NSUrl GetPlaceholderUrl (NSUrl url); - - [Static] - [Async] - [Export ("addDomain:completionHandler:")] - void AddDomain (NSFileProviderDomain domain, Action completionHandler); - - [Static] - [Async] - [Export ("removeDomain:completionHandler:")] - void RemoveDomain (NSFileProviderDomain domain, Action completionHandler); - - [Static] - [Async] - [Export ("getDomainsWithCompletionHandler:")] - void GetDomains (Action completionHandler); - - [Static] - [Async] - [Export ("removeAllDomainsWithCompletionHandler:")] - void RemoveAllDomains (Action completionHandler); - - [Static] - [Export ("managerForDomain:")] - [return: NullAllowed] - NSFileProviderManager FromDomain (NSFileProviderDomain domain); - } - - interface INSFileProviderServiceSource {} - - [iOS (11,0)] - [Protocol] - interface NSFileProviderServiceSource { - - [Abstract] - [Export ("serviceName")] - string ServiceName { get; } - - [Abstract] - [Export ("makeListenerEndpointAndReturnError:")] - [return: NullAllowed] - NSXpcListenerEndpoint MakeListenerEndpoint (out NSError error); - } -} -#endif diff --git a/src/fileproviderui.cs b/src/fileproviderui.cs deleted file mode 100644 index da4fcfdd310..00000000000 --- a/src/fileproviderui.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// FileProvider C# bindings -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using XamCore.ObjCRuntime; -using XamCore.Foundation; -using XamCore.UIKit; -using XamCore.FileProvider; - -namespace XamCore.FileProviderUI { - - [iOS (11,0)] - [ErrorDomain ("FPUIErrorDomain")] - [Native] - enum FPUIExtensionErrorCode : nuint { - UserCancelled, - Failed - } - - [iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (NSExtensionContext))] - interface FPUIActionExtensionContext { - - [NullAllowed, Export ("domainIdentifier")] - string DomainIdentifier { get; } - - [Export ("completeRequest")] - void CompleteRequest (); - - [Export ("cancelRequestWithError:")] - void CancelRequest (NSError error); - } - - [iOS (11,0)] - [BaseType (typeof (UIViewController))] - interface FPUIActionExtensionViewController { - - [Export ("initWithNibName:bundle:")] - [PostGet ("NibBundle")] - IntPtr Constructor ([NullAllowed] string nibName, [NullAllowed] NSBundle bundle); - - [Export ("extensionContext", ArgumentSemantic.Strong)] - FPUIActionExtensionContext ExtensionContext { get; } - - [Export ("prepareForError:")] - void Prepare (NSError error); - - [Export ("prepareForActionWithIdentifier:itemIdentifiers:")] - void Prepare (string actionIdentifier, NSString [] itemIdentifiers); - } -} -#endif diff --git a/src/findersync.cs b/src/findersync.cs index 3e260f37f20..7292fde77cb 100644 --- a/src/findersync.cs +++ b/src/findersync.cs @@ -5,8 +5,6 @@ #if XAMCORE_2_0 namespace XamCore.FinderSync { - delegate void GetValuesCompletionHandler (NSDictionary values, NSError error); - [Mac (10, 10, onlyOn64: true)] [BaseType (typeof(NSExtensionContext))] interface FIFinderSyncController : NSSecureCoding, NSCopying @@ -29,24 +27,6 @@ interface FIFinderSyncController : NSSecureCoding, NSCopying [NullAllowed, Export ("selectedItemURLs")] NSUrl[] SelectedItemURLs { get; } - - [Mac (10,13, onlyOn64 : true)] - [Export ("lastUsedDateForItemWithURL:")] - [return: NullAllowed] - NSDate GetLastUsedDate (NSUrl itemUrl); - - [Mac (10,13, onlyOn64 : true)] - [Async, Export ("setLastUsedDate:forItemWithURL:completion:")] - void SetLastUsedDate (NSDate lastUsedDate, NSUrl itemUrl, Action completion); - - [Mac (10,13, onlyOn64 : true)] - [Export ("tagDataForItemWithURL:")] - [return: NullAllowed] - NSData GetTagData (NSUrl itemUrl); - - [Async, Mac (10,13, onlyOn64 : true)] - [Export ("setTagData:forItemWithURL:completion:")] - void SetTagData ([NullAllowed] NSData tagData, NSUrl itemUrl, Action completion); } [Mac (10, 10, onlyOn64: true)] @@ -74,21 +54,7 @@ interface FIFinderSyncProtocol [Export ("toolbarItemToolTip")] string ToolbarItemToolTip { get; } - - [Mac (10,13, onlyOn64 : true)] - [Export ("supportedServiceNamesForItemWithURL:")] - string[] SupportedServiceNames (NSUrl itemUrl); - -#if FALSE // TODO: Activate after 10.13 foundation APIs have been merged. Bug 57800 - [Mac (10,13, onlyOn64 : true)] - [Export ("makeListenerEndpointForServiceName:andReturnError:")] - [return: NullAllowed] - NSXpcListenerEndpoint MakeListenerEndpoint (string serviceName, [NullAllowed] out NSError error); -#endif - [Mac (10,13, onlyOn64 : true)] - [Async, Export ("valuesForAttributes:forItemWithURL:completion:")] - void GetValues (string[] attributes, NSUrl itemUrl, GetValuesCompletionHandler completion); - } + } [Mac (10, 10, onlyOn64: true)] [BaseType (typeof(NSObject))] diff --git a/src/foundation.cs b/src/foundation.cs index b64c8443d59..7930656f1ae 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -43,9 +43,6 @@ using XamCore.Security; #if IOS using XamCore.CoreSpotlight; -#if XAMCORE_2_0 -using XamCore.FileProvider; -#endif #endif #if MONOMAC @@ -159,16 +156,6 @@ interface NSArray : NSSecureCoding, NSMutableCopying, INSFastEnumeration { [Export ("removeObserver:fromObjectsAtIndexes:forKeyPath:")] void RemoveObserver (NSObject observer, NSIndexSet indexes, string keyPath); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("writeToURL:error:")] - bool Write (NSUrl url, out NSError error); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("arrayWithContentsOfURL:error:")] - [return: NullAllowed] - NSArray FromUrl (NSUrl url, out NSError error); } #if MONOMAC @@ -181,9 +168,6 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin #if MONOMAC , NSPasteboardReading, NSPasteboardWriting #endif - #if IOS - , NSItemProviderReading, NSItemProviderWriting - #endif { #if !WATCH [Static, Export ("attributedStringWithAttachment:")] @@ -618,7 +602,7 @@ interface NSCalendar : NSSecureCoding, NSCopying { NSDateComponents Components (NSCalendarUnit unitFlags, NSDate fromDate, NSDate toDate, NSCalendarOptions opts); #if !XAMCORE_4_0 - [Obsolete ("Use the overload with a 'NSCalendarOptions' parameter.")] + [Obsolete ("Use the overload with a NSCalendarOptions parameter")] [Wrap ("Components (unitFlags, fromDate, toDate, (NSCalendarOptions) opts)")] NSDateComponents Components (NSCalendarUnit unitFlags, NSDate fromDate, NSDate toDate, NSDateComponentsWrappingBehavior opts); #endif @@ -627,7 +611,7 @@ interface NSCalendar : NSSecureCoding, NSCopying { NSDate DateByAddingComponents (NSDateComponents comps, NSDate date, NSCalendarOptions opts); #if !XAMCORE_4_0 - [Obsolete ("Use the overload with a 'NSCalendarOptions' parameter.")] + [Obsolete ("Use the overload with a NSCalendarOptions parameter")] [Wrap ("DateByAddingComponents (comps, date, (NSCalendarOptions) opts)")] NSDate DateByAddingComponents (NSDateComponents comps, NSDate date, NSDateComponentsWrappingBehavior opts); #endif @@ -898,7 +882,7 @@ interface NSCalendar : NSSecureCoding, NSCopying { #if MONOMAC // Obsolete, but the only API surfaced by WebKit.WebHistory. - [Availability (Introduced = Platform.Mac_10_4, Deprecated = Platform.Mac_10_10, Message="Use NSCalendar and NSDateComponents.")] + [Availability (Introduced = Platform.Mac_10_4, Deprecated = Platform.Mac_10_10, Message="Obsolete, use NSCalendar and NSDateComponents")] [BaseType (typeof (NSDate))] interface NSCalendarDate { [Export ("initWithString:calendarFormat:locale:")] @@ -1528,7 +1512,7 @@ interface NSDateComponents : NSSecureCoding, NSCopying, INSCopying, INSSecureCod nint Nanosecond { get; set; } [Export ("week")] - [Availability (Introduced = Platform.Mac_10_4 | Platform.iOS_2_0, Deprecated = Platform.Mac_10_9 | Platform.iOS_7_0, Message = "Use 'WeekOfMonth' or 'WeekOfYear' instead.")] + [Availability (Introduced = Platform.Mac_10_4 | Platform.iOS_2_0, Deprecated = Platform.Mac_10_9 | Platform.iOS_7_0, Message = "Use WeekOfMonth or WeekOfYear, depending on which you mean")] nint Week { get; set; } [Export ("weekday")] @@ -1731,11 +1715,7 @@ interface NSDateFormatter { [iOS (8,0), Mac (10,10)] [Export ("setLocalizedDateFormatFromTemplate:")] - void SetLocalizedDateFormatFromTemplate (string dateFormatTemplate); - - [Watch (2, 0), TV (9, 0), Mac (10, 10), iOS (8, 0)] - [Export ("formattingContext", ArgumentSemantic.Assign)] - NSFormattingContext FormattingContext { get; set; } + void SetLocalizedDateFormatFromTemplate (string dateFormatTemplate); } [iOS (8,0)][Mac(10,10)] @@ -1788,10 +1768,6 @@ interface NSDateComponentsFormatter { [Export ("getObjectValue:forString:errorDescription:")] bool GetObjectValue (out NSObject obj, string str, out string error); - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("referenceDate", ArgumentSemantic.Copy)] - NSDate ReferenceDate { get; set; } } [iOS (8,0)][Mac(10,10)] @@ -2532,7 +2508,7 @@ interface NSMetadataQuery { [Field ("NSMetadataUbiquitousItemHasUnresolvedConflictsKey")] NSString UbiquitousItemHasUnresolvedConflictsKey { get; } - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message="Use 'UbiquitousItemDownloadingStatusKey' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message="Use UbiquitousItemDownloadingStatusKey")] [Field ("NSMetadataUbiquitousItemIsDownloadedKey")] NSString UbiquitousItemIsDownloadedKey { get; } @@ -2581,620 +2557,6 @@ interface NSMetadataQuery { [iOS(8,0),Mac(10,10)] [Field ("NSMetadataUbiquitousItemURLInLocalContainerKey")] NSString UbiquitousItemURLInLocalContainerKey { get; } - -#if MONOMAC - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemKeywordsKey")] - NSString KeywordsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemTitleKey")] - NSString TitleKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAuthorsKey")] - NSString AuthorsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemEditorsKey")] - NSString EditorsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemParticipantsKey")] - NSString ParticipantsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemProjectsKey")] - NSString ProjectsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemDownloadedDateKey")] - NSString DownloadedDateKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemWhereFromsKey")] - NSString WhereFromsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemCommentKey")] - NSString CommentKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemCopyrightKey")] - NSString CopyrightKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemLastUsedDateKey")] - NSString LastUsedDateKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemContentCreationDateKey")] - NSString ContentCreationDateKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemContentModificationDateKey")] - NSString ContentModificationDateKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemDateAddedKey")] - NSString DateAddedKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemDurationSecondsKey")] - NSString DurationSecondsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemContactKeywordsKey")] - NSString ContactKeywordsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemVersionKey")] - NSString VersionKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemPixelHeightKey")] - NSString PixelHeightKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemPixelWidthKey")] - NSString PixelWidthKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemPixelCountKey")] - NSString PixelCountKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemColorSpaceKey")] - NSString ColorSpaceKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemBitsPerSampleKey")] - NSString BitsPerSampleKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemFlashOnOffKey")] - NSString FlashOnOffKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemFocalLengthKey")] - NSString FocalLengthKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAcquisitionMakeKey")] - NSString AcquisitionMakeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAcquisitionModelKey")] - NSString AcquisitionModelKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemISOSpeedKey")] - NSString IsoSpeedKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemOrientationKey")] - NSString OrientationKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemLayerNamesKey")] - NSString LayerNamesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemWhiteBalanceKey")] - NSString WhiteBalanceKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemApertureKey")] - NSString ApertureKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemProfileNameKey")] - NSString ProfileNameKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemResolutionWidthDPIKey")] - NSString ResolutionWidthDpiKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemResolutionHeightDPIKey")] - NSString ResolutionHeightDpiKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemExposureModeKey")] - NSString ExposureModeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemExposureTimeSecondsKey")] - NSString ExposureTimeSecondsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemEXIFVersionKey")] - NSString ExifVersionKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemCameraOwnerKey")] - NSString CameraOwnerKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemFocalLength35mmKey")] - NSString FocalLength35mmKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemLensModelKey")] - NSString LensModelKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemEXIFGPSVersionKey")] - NSString ExifGpsVersionKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAltitudeKey")] - NSString AltitudeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemLatitudeKey")] - NSString LatitudeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemLongitudeKey")] - NSString LongitudeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemSpeedKey")] - NSString SpeedKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemTimestampKey")] - NSString TimestampKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSTrackKey")] - NSString GpsTrackKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemImageDirectionKey")] - NSString ImageDirectionKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemNamedLocationKey")] - NSString NamedLocationKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSStatusKey")] - NSString GpsStatusKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSMeasureModeKey")] - NSString GpsMeasureModeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSDOPKey")] - NSString GpsDopKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSMapDatumKey")] - NSString GpsMapDatumKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSDestLatitudeKey")] - NSString GpsDestLatitudeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSDestLongitudeKey")] - NSString GpsDestLongitudeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSDestBearingKey")] - NSString GpsDestBearingKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSDestDistanceKey")] - NSString GpsDestDistanceKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSProcessingMethodKey")] - NSString GpsProcessingMethodKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSAreaInformationKey")] - NSString GpsAreaInformationKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSDateStampKey")] - NSString GpsDateStampKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGPSDifferentalKey")] - NSString GpsDifferentalKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemCodecsKey")] - NSString CodecsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemMediaTypesKey")] - NSString MediaTypesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemStreamableKey")] - NSString StreamableKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemTotalBitRateKey")] - NSString TotalBitRateKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemVideoBitRateKey")] - NSString VideoBitRateKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAudioBitRateKey")] - NSString AudioBitRateKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemDeliveryTypeKey")] - NSString DeliveryTypeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAlbumKey")] - NSString AlbumKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemHasAlphaChannelKey")] - NSString HasAlphaChannelKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemRedEyeOnOffKey")] - NSString RedEyeOnOffKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemMeteringModeKey")] - NSString MeteringModeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemMaxApertureKey")] - NSString MaxApertureKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemFNumberKey")] - NSString FNumberKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemExposureProgramKey")] - NSString ExposureProgramKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemExposureTimeStringKey")] - NSString ExposureTimeStringKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemHeadlineKey")] - NSString HeadlineKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemInstructionsKey")] - NSString InstructionsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemCityKey")] - NSString CityKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemStateOrProvinceKey")] - NSString StateOrProvinceKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemCountryKey")] - NSString CountryKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemTextContentKey")] - NSString TextContentKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAudioSampleRateKey")] - NSString AudioSampleRateKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAudioChannelCountKey")] - NSString AudioChannelCountKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemTempoKey")] - NSString TempoKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemKeySignatureKey")] - NSString KeySignatureKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemTimeSignatureKey")] - NSString TimeSignatureKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAudioEncodingApplicationKey")] - NSString AudioEncodingApplicationKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemComposerKey")] - NSString ComposerKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemLyricistKey")] - NSString LyricistKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAudioTrackNumberKey")] - NSString AudioTrackNumberKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemRecordingDateKey")] - NSString RecordingDateKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemMusicalGenreKey")] - NSString MusicalGenreKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemIsGeneralMIDISequenceKey")] - NSString IsGeneralMidiSequenceKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemRecordingYearKey")] - NSString RecordingYearKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemOrganizationsKey")] - NSString OrganizationsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemLanguagesKey")] - NSString LanguagesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemRightsKey")] - NSString RightsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemPublishersKey")] - NSString PublishersKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemContributorsKey")] - NSString ContributorsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemCoverageKey")] - NSString CoverageKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemSubjectKey")] - NSString SubjectKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemThemeKey")] - NSString ThemeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemDescriptionKey")] - NSString DescriptionKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemIdentifierKey")] - NSString IdentifierKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAudiencesKey")] - NSString AudiencesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemNumberOfPagesKey")] - NSString NumberOfPagesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemPageWidthKey")] - NSString PageWidthKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemPageHeightKey")] - NSString PageHeightKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemSecurityMethodKey")] - NSString SecurityMethodKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemCreatorKey")] - NSString CreatorKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemEncodingApplicationsKey")] - NSString EncodingApplicationsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemDueDateKey")] - NSString DueDateKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemStarRatingKey")] - NSString StarRatingKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemPhoneNumbersKey")] - NSString PhoneNumbersKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemEmailAddressesKey")] - NSString EmailAddressesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemInstantMessageAddressesKey")] - NSString InstantMessageAddressesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemKindKey")] - NSString KindKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemRecipientsKey")] - NSString RecipientsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemFinderCommentKey")] - NSString FinderCommentKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemFontsKey")] - NSString FontsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAppleLoopsRootKeyKey")] - NSString AppleLoopsRootKeyKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAppleLoopsKeyFilterTypeKey")] - NSString AppleLoopsKeyFilterTypeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAppleLoopsLoopModeKey")] - NSString AppleLoopsLoopModeKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAppleLoopDescriptorsKey")] - NSString AppleLoopDescriptorsKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemMusicalInstrumentCategoryKey")] - NSString MusicalInstrumentCategoryKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemMusicalInstrumentNameKey")] - NSString MusicalInstrumentNameKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemCFBundleIdentifierKey")] - NSString CFBundleIdentifierKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemInformationKey")] - NSString InformationKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemDirectorKey")] - NSString DirectorKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemProducerKey")] - NSString ProducerKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemGenreKey")] - NSString GenreKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemPerformersKey")] - NSString PerformersKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemOriginalFormatKey")] - NSString OriginalFormatKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemOriginalSourceKey")] - NSString OriginalSourceKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAuthorEmailAddressesKey")] - NSString AuthorEmailAddressesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemRecipientEmailAddressesKey")] - NSString RecipientEmailAddressesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemAuthorAddressesKey")] - NSString AuthorAddressesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemRecipientAddressesKey")] - NSString RecipientAddressesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemIsLikelyJunkKey")] - NSString IsLikelyJunkKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemExecutableArchitecturesKey")] - NSString ExecutableArchitecturesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemExecutablePlatformKey")] - NSString ExecutablePlatformKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemApplicationCategoriesKey")] - NSString ApplicationCategoriesKey { get; } - - [NoWatch, NoTV, NoiOS, Mac (10, 9)] - [Field ("NSMetadataItemIsApplicationManagedKey")] - NSString IsApplicationManagedKey { get; } -#endif - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSMetadataUbiquitousItemIsSharedKey")] - NSString UbiquitousItemIsSharedKey { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSMetadataUbiquitousSharedItemCurrentUserRoleKey")] - NSString UbiquitousSharedItemCurrentUserRoleKey { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey")] - NSString UbiquitousSharedItemCurrentUserPermissionsKey { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSMetadataUbiquitousSharedItemOwnerNameComponentsKey")] - NSString UbiquitousSharedItemOwnerNameComponentsKey { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey")] - NSString UbiquitousSharedItemMostRecentEditorNameComponentsKey { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSMetadataUbiquitousSharedItemRoleOwner")] - NSString UbiquitousSharedItemRoleOwner { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSMetadataUbiquitousSharedItemRoleParticipant")] - NSString UbiquitousSharedItemRoleParticipant { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSMetadataUbiquitousSharedItemPermissionsReadOnly")] - NSString UbiquitousSharedItemPermissionsReadOnly { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSMetadataUbiquitousSharedItemPermissionsReadWrite")] - NSString UbiquitousSharedItemPermissionsReadWrite { get; } [Since (7,0), Mavericks] [NullAllowed] // by default this property is null @@ -3431,12 +2793,12 @@ interface NSMutableAttributedString { #if !MONOMAC [NoTV] [Since (7,0)] - [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'ReadFromUrl' instead.")] + [Deprecated (PlatformName.iOS, 9, 0, message: "Use ReadFromUrl")] [Export ("readFromFileURL:options:documentAttributes:error:")] bool ReadFromFile (NSUrl url, NSDictionary options, ref NSDictionary returnOptions, ref NSError error); [NoTV] - [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'ReadFromUrl' instead.")] + [Deprecated (PlatformName.iOS, 9, 0, message: "Use ReadFromUrl")] [Wrap ("ReadFromFile (url, options == null ? null : options.Dictionary, ref returnOptions, ref error)")] bool ReadFromFile (NSUrl url, NSAttributedStringDocumentAttributes options, ref NSDictionary returnOptions, ref NSError error); @@ -3602,16 +2964,6 @@ interface NSDictionary : NSSecureCoding, NSMutableCopying { [Export ("initWithContentsOfURL:")] IntPtr Constructor (NSUrl url); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("initWithContentsOfURL:error:")] - IntPtr Constructor (NSUrl url, out NSError error); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("dictionaryWithContentsOfURL:error:")] - [return: NullAllowed] - NSDictionary FromUrl (NSUrl url, out NSError error); [Export ("count")] nuint Count { get; } @@ -3807,14 +3159,6 @@ interface NSError : NSSecureCoding, NSCopying { [Field ("NSFilePathErrorKey")] NSString FilePathErrorKey { get; } - [iOS (9,0)][Mac (10,11)] - [Field ("NSDebugDescriptionErrorKey")] - NSString DebugDescriptionErrorKey { get; } - - [iOS (11,0), Mac (10,13), Watch (4,0), TV (11,0)] - [Field ("NSLocalizedFailureErrorKey")] - NSString LocalizedFailureErrorKey { get; } - [iOS (9,0)][Mac (10,11)] [Static] [Export ("setUserInfoValueProviderForDomain:provider:")] @@ -3825,21 +3169,6 @@ interface NSError : NSSecureCoding, NSCopying { [Export ("userInfoValueProviderForDomain:")] [return: NullAllowed] NSErrorUserInfoValueProvider GetUserInfoValueProvider (string errorDomain); - -#if XAMCORE_2_0 && IOS - - // From NSError (NSFileProviderError) Category to avoid static category uglyness - - [iOS (11,0)] - [Static] - [Export ("fileProviderErrorForCollisionWithItem:")] - NSError GetFileProviderError (INSFileProviderItem existingItem); - - [iOS (11,0)] - [Static] - [Export ("fileProviderErrorForNonExistentItemWithIdentifier:")] - NSError GetFileProviderError (string nonExistentItemIdentifier); -#endif #if false // FIXME that value is present in the header (7.0 DP 6) files but returns NULL (i.e. unusable) @@ -3904,7 +3233,7 @@ interface NSExpression : NSSecureCoding, NSCopying { NSExpression FromFormat (string expressionFormat); #if !XAMCORE_4_0 && !WATCH - [Obsolete("Use 'FromFormat (string, NSObject[])' instead.")] + [Obsolete("FromFormat (string, NSExpression[]) is deprecated, please use FromFormat (string, NSObject[]) instead.")] [Static, Export ("expressionWithFormat:argumentArray:")] NSExpression FromFormat (string format, NSExpression [] parameters); #endif @@ -3933,7 +3262,7 @@ interface NSExpression : NSSecureCoding, NSCopying { NSExpression FromFunction (NSExpression target, string name, NSExpression[] parameters); #if !XAMCORE_4_0 && !WATCH - [Obsolete("Use 'FromFunction (NSExpressionCallbackHandler, NSExpression[])' instead.")] + [Obsolete("FromFunction (NSExpressionHandler, NSExpression[]) is deprecated, please use FromFunction (NSExpressionCallbackHandler, NSExpression[]) instead.")] [Static, Export ("expressionForBlock:arguments:")] NSExpression FromFunction (NSExpressionHandler target, NSExpression[] parameters); #endif @@ -4160,58 +3489,8 @@ interface NSLinguisticTagger { [NullAllowed] // by default this property is null [Export ("string", ArgumentSemantic.Retain)] string AnalysisString { get; set; } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("tagsInRange:unit:scheme:options:tokenRanges:")] - string[] GetTags (NSRange range, NSLinguisticTaggerUnit unit, string scheme, NSLinguisticTaggerOptions options, [NullAllowed] out NSValue[] tokenRanges); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("enumerateTagsInRange:unit:scheme:options:usingBlock:")] - void EnumerateTags (NSRange range, NSLinguisticTaggerUnit unit, string scheme, NSLinguisticTaggerOptions options, LinguisticTagEnumerator enumerator); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("tagAtIndex:unit:scheme:tokenRange:")] - [return: NullAllowed] - string GetTag (nuint charIndex, NSLinguisticTaggerUnit unit, string scheme, [NullAllowed] ref NSRange tokenRange); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("tokenRangeAtIndex:unit:")] - NSRange GetTokenRange (nuint charIndex, NSLinguisticTaggerUnit unit); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("availableTagSchemesForUnit:language:")] - string[] GetAvailableTagSchemes (NSLinguisticTaggerUnit unit, string language); - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("dominantLanguage")] - string DominantLanguage { get; } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("dominantLanguageForString:")] - [return: NullAllowed] - string GetDominantLanguage (string str); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("tagForString:atIndex:unit:scheme:orthography:tokenRange:")] - [return: NullAllowed] - string GetTag (string str, nuint charIndex, NSLinguisticTaggerUnit unit, string scheme, [NullAllowed] NSOrthography orthography, [NullAllowed] ref NSRange tokenRange); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("tagsForString:range:unit:scheme:options:orthography:tokenRanges:")] - string[] GetTags (string str, NSRange range, NSLinguisticTaggerUnit unit, string scheme, NSLinguisticTaggerOptions options, [NullAllowed] NSOrthography orthography, [NullAllowed] out NSValue[] tokenRanges); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("enumerateTagsForString:range:unit:scheme:options:orthography:usingBlock:")] - void EnumerateTags (string str, NSRange range, NSLinguisticTaggerUnit unit, string scheme, NSLinguisticTaggerOptions options, [NullAllowed] NSOrthography orthography, LinguisticTagEnumerator enumerator); } - delegate void LinguisticTagEnumerator (string tag, NSRange tokenRange, bool stop); - [Since (5,0)] [Static] interface NSLinguisticTag { @@ -4595,7 +3874,6 @@ interface NSRunLoop { [Field ("NSRunLoopCommonModes")] NSString NSRunLoopCommonModes { get; } - [Availability (Deprecated = Platform.Mac_10_13, Message = "Use 'NSXpcConnection' instead.")] [NoiOS, NoWatch, NoTV] [Field ("NSConnectionReplyMode")] NSString NSRunLoopConnectionReplyMode { get; } @@ -4897,7 +4175,6 @@ interface NSUbiquitousKeyValueStoreChangeEventArgs { [Since (5,0)] [BaseType (typeof (NSObject))] #if WATCH - [Advice ("Not available on watchOS")] [DisableDefaultCtor] // "NSUbiquitousKeyValueStore is unavailable" is printed to the log. #endif interface NSUbiquitousKeyValueStore { @@ -4995,7 +4272,7 @@ interface NSUuid : NSSecureCoding, NSCopying { string AsString (); } - [iOS (8,0)][Mac (10,10, onlyOn64 : true), Watch (2,0), TV (9,0)] // .objc_class_name_NSUserActivity", referenced from '' not found + [iOS (8,0)][Mac (10,10, onlyOn64 : true)] // .objc_class_name_NSUserActivity", referenced from '' not found [BaseType (typeof (NSObject))] [DisableDefaultCtor] // xcode 8 beta 4 marks it as API_DEPRECATED partial interface NSUserActivity { @@ -5048,31 +4325,31 @@ partial interface NSUserActivity { [Async (ResultTypeName="NSUserActivityContinuation")] void GetContinuationStreams (Action completionHandler); - [Mac(10,11), iOS (9,0), Watch (3,0), TV (10,0)] + [Mac(10,11), iOS (9,0)] [Export ("requiredUserInfoKeys", ArgumentSemantic.Copy)] NSSet RequiredUserInfoKeys { get; set; } - [Mac(10,11), iOS (9,0), Watch (3,0), TV (10,0)] + [Mac(10,11), iOS (9,0)] [Export ("expirationDate", ArgumentSemantic.Copy)] NSDate ExpirationDate { get; set; } - [Mac(10,11), iOS (9,0), Watch (3,0), TV (10,0)] + [Mac(10,11), iOS (9,0)] [Export ("keywords", ArgumentSemantic.Copy)] NSSet Keywords { get; set; } - [Mac(10,11), iOS (9,0), Watch (3,0), TV (10,0)] + [Mac(10,11), iOS (9,0)] [Export ("resignCurrent")] void ResignCurrent (); - [Mac(10,11), iOS (9,0), Watch (3,0), TV (10,0)] + [Mac(10,11), iOS (9,0)] [Export ("eligibleForHandoff")] bool EligibleForHandoff { [Bind ("isEligibleForHandoff")] get; set; } - [Mac(10,11), iOS (9,0), Watch (3,0), TV (10,0)] + [Mac(10,11), iOS (9,0)] [Export ("eligibleForSearch")] bool EligibleForSearch { [Bind ("isEligibleForSearch")] get; set; } - [Mac(10,11), iOS (9,0), Watch (3,0), TV (10,0)] + [Mac(10,11), iOS (9,0)] [Export ("eligibleForPublicIndexing")] bool EligibleForPublicIndexing { [Bind ("isEligibleForPublicIndexing")] get; set; } @@ -5083,9 +4360,6 @@ partial interface NSUserActivity { CSSearchableItemAttributeSet ContentAttributeSet { get; set; } #endif - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("referrerURL", ArgumentSemantic.Copy)] - NSUrl ReferrerUrl { get; set; } } [iOS (8,0)][Mac (10,10, onlyOn64 : true)] // same as NSUserActivity @@ -5095,7 +4369,7 @@ partial interface NSUserActivityType { NSString BrowsingWeb { get; } } - [iOS (8,0)][Mac (10,10, onlyOn64 : true), Watch (3,0), TV (9,0)] // same as NSUserActivity + [iOS (8,0)][Mac (10,10, onlyOn64 : true)] // same as NSUserActivity [Protocol, Model] [BaseType (typeof (NSObject))] partial interface NSUserActivityDelegate { @@ -5280,7 +4554,6 @@ partial interface NSUrl : NSSecureCoding, NSCopying #if MONOMAC , NSPasteboardReading, NSPasteboardWriting #endif - , NSItemProviderWriting, NSItemProviderReading { [Export ("initWithScheme:host:path:")] IntPtr Constructor (string scheme, string host, string path); @@ -5723,46 +4996,6 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Field ("NSURLVolumeLocalizedNameKey")] NSString VolumeLocalizedNameKey { get; } - [Watch (3, 0), TV (10, 0), Mac (10, 12), iOS (10, 0)] - [Field ("NSURLVolumeIsEncryptedKey")] - NSString VolumeIsEncryptedKey { get; } - - [Watch (3, 0), TV (10, 0), Mac (10, 12), iOS (10, 0)] - [Field ("NSURLVolumeIsRootFileSystemKey")] - NSString VolumeIsRootFileSystemKey { get; } - - [Watch (3, 0), TV (10, 0), Mac (10, 12), iOS (10, 0)] - [Field ("NSURLVolumeSupportsCompressionKey")] - NSString VolumeSupportsCompressionKey { get; } - - [Watch (3, 0), TV (10, 0), Mac (10, 12), iOS (10, 0)] - [Field ("NSURLVolumeSupportsFileCloningKey")] - NSString VolumeSupportsFileCloningKey { get; } - - [Watch (3, 0), TV (10, 0), Mac (10, 12), iOS (10, 0)] - [Field ("NSURLVolumeSupportsSwapRenamingKey")] - NSString VolumeSupportsSwapRenamingKey { get; } - - [Watch (3, 0), TV (10, 0), Mac (10, 12), iOS (10, 0)] - [Field ("NSURLVolumeSupportsExclusiveRenamingKey")] - NSString VolumeSupportsExclusiveRenamingKey { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Field ("NSURLVolumeSupportsImmutableFilesKey")] - NSString VolumeSupportsImmutableFilesKey { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Field ("NSURLVolumeSupportsAccessPermissionsKey")] - NSString VolumeSupportsAccessPermissionsKey { get; } - - [NoWatch, NoTV, Mac (10, 13), iOS (11, 0)] - [Field ("NSURLVolumeAvailableCapacityForImportantUsageKey")] - NSString VolumeAvailableCapacityForImportantUsageKey { get; } - - [NoWatch, NoTV, Mac (10, 13), iOS (11, 0)] - [Field ("NSURLVolumeAvailableCapacityForOpportunisticUsageKey")] - NSString VolumeAvailableCapacityForOpportunisticUsageKey { get; } - [Since (5,0)] [Field ("NSURLIsUbiquitousItemKey")] NSString IsUbiquitousItemKey { get; } @@ -5788,49 +5021,13 @@ partial interface NSUrl : NSSecureCoding, NSCopying NSString UbiquitousItemIsUploadingKey { get; } [Field ("NSURLUbiquitousItemPercentDownloadedKey")] - [Availability (Introduced = Platform.iOS_5_0 | Platform.Mac_10_7, Deprecated = Platform.iOS_6_0 | Platform.Mac_10_8, Message = "Use 'NSMetadataQuery.UbiquitousItemPercentDownloadedKey' on 'NSMetadataItem' instead.")] + [Availability (Introduced = Platform.iOS_5_0 | Platform.Mac_10_7, Deprecated = Platform.iOS_6_0 | Platform.Mac_10_8, Message = "NSMetadataQuery.UbiquitousItemPercentDownloadedKey on NSMetadataItem instead")] NSString UbiquitousItemPercentDownloadedKey { get; } - [Availability (Introduced = Platform.iOS_5_0 | Platform.Mac_10_7, Deprecated = Platform.iOS_6_0 | Platform.Mac_10_8, Message = "Use 'NSMetadataQuery.UbiquitousItemPercentUploadedKey' on 'NSMetadataItem' instead.")] + [Availability (Introduced = Platform.iOS_5_0 | Platform.Mac_10_7, Deprecated = Platform.iOS_6_0 | Platform.Mac_10_8, Message = "NSMetadataQuery.UbiquitousItemPercentUploadedKey on NSMetadataItem instead")] [Field ("NSURLUbiquitousItemPercentUploadedKey")] NSString UbiquitousItemPercentUploadedKey { get; } - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSURLUbiquitousItemIsSharedKey")] - NSString UbiquitousItemIsSharedKey { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSURLUbiquitousSharedItemCurrentUserRoleKey")] - NSString UbiquitousSharedItemCurrentUserRoleKey { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSURLUbiquitousSharedItemCurrentUserPermissionsKey")] - NSString UbiquitousSharedItemCurrentUserPermissionsKey { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSURLUbiquitousSharedItemOwnerNameComponentsKey")] - NSString UbiquitousSharedItemOwnerNameComponentsKey { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey")] - NSString UbiquitousSharedItemMostRecentEditorNameComponentsKey { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSURLUbiquitousSharedItemRoleOwner")] - NSString UbiquitousSharedItemRoleOwner { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSURLUbiquitousSharedItemRoleParticipant")] - NSString UbiquitousSharedItemRoleParticipant { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSURLUbiquitousSharedItemPermissionsReadOnly")] - NSString UbiquitousSharedItemPermissionsReadOnly { get; } - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [Field ("NSURLUbiquitousSharedItemPermissionsReadWrite")] - NSString UbiquitousSharedItemPermissionsReadWrite { get; } - [Since (5,1)] [MountainLion] [Field ("NSURLIsExcludedFromBackupKey")] @@ -5970,25 +5167,6 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Field ("NSURLFileProtectionCompleteUntilFirstUserAuthentication")] NSString FileProtectionCompleteUntilFirstUserAuthentication { get; } #endif - - // From the NSItemProviderReading protocol - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("readableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] - new string[] ReadableTypeIdentifiers { get; } - - // From the NSItemProviderReading protocol - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("objectWithItemProviderData:typeIdentifier:error:")] - [return: NullAllowed] - new NSUrl GetObject (NSData data, string typeIdentifier, [NullAllowed] out NSError outError); - - // From the NSItemProviderWriting protocol - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("writableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] - new string[] WritableTypeIdentifiers { get; } } @@ -6213,10 +5391,6 @@ partial interface NSUrlComponents : NSCopying { [iOS (9,0), Mac(10,11)] [Export ("rangeOfFragment"), Mac(10,11)] NSRange RangeOfFragment { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("percentEncodedQueryItems", ArgumentSemantic.Copy)] - NSUrlQueryItem[] PercentEncodedQueryItems { get; set; } } [BaseType (typeof (NSObject), Name="NSURLAuthenticationChallenge")] @@ -6310,18 +5484,18 @@ interface NSUrlConnection : bool CanHandleRequest (NSUrlRequest request); [NoWatch] - [Deprecated (PlatformName.iOS, 9,0, message: "Use 'NSUrlSession' instead.")] - [Deprecated (PlatformName.MacOSX, 10,11, message: "Use 'NSUrlSession' instead.")] + [Deprecated (PlatformName.iOS, 9,0, message: "Use NSUrlSession instead")] + [Deprecated (PlatformName.MacOSX, 10,11, message: "Use NSUrlSession instead")] [Export ("connectionWithRequest:delegate:")][Static] NSUrlConnection FromRequest (NSUrlRequest request, [Protocolize] NSUrlConnectionDelegate connectionDelegate); - [Deprecated (PlatformName.iOS, 9,0, message: "Use 'NSUrlSession' instead.")] - [Deprecated (PlatformName.MacOSX, 10,11, message: "Use 'NSUrlSession' instead.")] + [Deprecated (PlatformName.iOS, 9,0, message: "Use NSUrlSession instead")] + [Deprecated (PlatformName.MacOSX, 10,11, message: "Use NSUrlSession instead")] [Export ("initWithRequest:delegate:")] IntPtr Constructor (NSUrlRequest request, [Protocolize] NSUrlConnectionDelegate connectionDelegate); - [Deprecated (PlatformName.iOS, 9,0, message: "Use 'NSUrlSession' instead.")] - [Deprecated (PlatformName.MacOSX, 10,11, message: "Use 'NSUrlSession' instead.")] + [Deprecated (PlatformName.iOS, 9,0, message: "Use NSUrlSession instead")] + [Deprecated (PlatformName.MacOSX, 10,11, message: "Use NSUrlSession instead")] [Export ("initWithRequest:delegate:startImmediately:")] IntPtr Constructor (NSUrlRequest request, [Protocolize] NSUrlConnectionDelegate connectionDelegate, bool startImmediately); @@ -6385,15 +5559,15 @@ interface NSUrlConnectionDelegate { #endif [Export ("connection:canAuthenticateAgainstProtectionSpace:")] - [Availability (Deprecated=Platform.iOS_8_0|Platform.Mac_10_10, Message="Use 'WillSendRequestForAuthenticationChallenge' instead.")] + [Availability (Deprecated=Platform.iOS_8_0|Platform.Mac_10_10, Message="Use WillSendRequestForAuthenticationChallenge instead")] bool CanAuthenticateAgainstProtectionSpace (NSUrlConnection connection, NSUrlProtectionSpace protectionSpace); [Export ("connection:didReceiveAuthenticationChallenge:")] - [Availability (Deprecated=Platform.iOS_8_0|Platform.Mac_10_10, Message="Use 'WillSendRequestForAuthenticationChallenge' instead.")] + [Availability (Deprecated=Platform.iOS_8_0|Platform.Mac_10_10, Message="Use WillSendRequestForAuthenticationChallenge instead")] void ReceivedAuthenticationChallenge (NSUrlConnection connection, NSUrlAuthenticationChallenge challenge); [Export ("connection:didCancelAuthenticationChallenge:")] - [Availability (Deprecated=Platform.iOS_8_0|Platform.Mac_10_10, Message="Use 'WillSendRequestForAuthenticationChallenge' instead.")] + [Availability (Deprecated=Platform.iOS_8_0|Platform.Mac_10_10, Message="Use WillSendRequestForAuthenticationChallenge instead")] void CanceledAuthenticationChallenge (NSUrlConnection connection, NSUrlAuthenticationChallenge challenge); [Export ("connectionShouldUseCredentialStorage:")] @@ -6636,7 +5810,7 @@ partial interface NSUrlSession { NSUrlSession FromWeakConfiguration (NSUrlSessionConfiguration configuration, [NullAllowed] NSObject weakDelegate, [NullAllowed] NSOperationQueue delegateQueue); #if !XAMCORE_4_0 - [Obsolete ("Use the overload with a 'INSUrlSessionDelegate' parameter.")] + [Obsolete ("Use the overload with a `INSUrlSessionDelegate` parameter.")] [Static, Wrap ("FromWeakConfiguration (configuration, sessionDelegate, delegateQueue);")] NSUrlSession FromConfiguration (NSUrlSessionConfiguration configuration, NSUrlSessionDelegate sessionDelegate, NSOperationQueue delegateQueue); #endif @@ -6836,8 +6010,8 @@ interface NSUrlSessionStreamTask [Since (7,0)] [Availability (Introduced = Platform.Mac_10_9)] [BaseType (typeof (NSObject), Name="NSURLSessionTask")] - partial interface NSUrlSessionTask : NSCopying, NSProgressReporting - { + partial interface NSUrlSessionTask : NSCopying { + [Export ("taskIdentifier")] nuint TaskIdentifier { get; } @@ -6889,19 +6063,6 @@ partial interface NSUrlSessionTask : NSCopying, NSProgressReporting [Export ("priority")] float Priority { get; set; } /* float, not CGFloat */ #endif - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("earliestBeginDate", ArgumentSemantic.Copy)] - NSDate EarliestBeginDate { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("countOfBytesClientExpectsToSend")] - long CountOfBytesClientExpectsToSend { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("countOfBytesClientExpectsToReceive")] - long CountOfBytesClientExpectsToReceive { get; set; } - } [Static] @@ -6962,7 +6123,7 @@ partial interface NSUrlSessionConfiguration : NSCopying { NSUrlSessionConfiguration EphemeralSessionConfiguration { get; } [Static, Export ("backgroundSessionConfiguration:")] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'CreateBackgroundSessionConfiguration' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use CreateBackgroundSessionConfiguration instead")] NSUrlSessionConfiguration BackgroundSessionConfiguration (string identifier); [Export ("identifier", ArgumentSemantic.Copy), NullAllowed] @@ -7043,14 +6204,6 @@ partial interface NSUrlSessionConfiguration : NSCopying { [iOS (9,0), Mac(10,11)] [Export ("shouldUseExtendedBackgroundIdleMode")] bool ShouldUseExtendedBackgroundIdleMode { get; set; } - - [NoWatch, NoTV, NoMac, iOS (11, 0)] - [Export ("multipathServiceType", ArgumentSemantic.Assign)] - NSUrlSessionMultipathServiceType MultipathServiceType { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("waitsForConnectivity")] - bool WaitsForConnectivity { get; set; } } [Since (7,0)] @@ -7093,14 +6246,6 @@ partial interface NSUrlSessionTaskDelegate { [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [Export ("URLSession:task:didFinishCollectingMetrics:")] void DidFinishCollectingMetrics (NSUrlSession session, NSUrlSessionTask task, NSUrlSessionTaskMetrics metrics); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("URLSession:task:willBeginDelayedRequest:completionHandler:")] - void WillBeginDelayedRequest (NSUrlSession session, NSUrlSessionTask task, NSUrlRequest request, Action completionHandler); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("URLSession:taskIsWaitingForConnectivity:")] - void TaskIsWaitingForConnectivity (NSUrlSession session, NSUrlSessionTask task); } [Since (7,0)] @@ -7233,7 +6378,7 @@ interface NSUndoManager { [Export ("redoActionName")] string RedoActionName { get; } - [Advice ("Use the correctly named method: 'SetActionName'.")] + [Advice ("Use correctly named method: SetActionName")] [Export ("setActionName:")] void SetActionname (string actionName); @@ -7788,7 +6933,6 @@ interface NSString2 : NSSecureCoding, NSMutableCopying #if MONOMAC , NSPasteboardReading, NSPasteboardWriting // Documented that it implements NSPasteboard protocols even if header doesn't show it #endif - , NSItemProviderReading, NSItemProviderWriting { [Export ("initWithData:encoding:")] IntPtr Constructor (NSData data, NSStringEncoding encoding); @@ -8047,25 +7191,6 @@ interface NSString2 : NSSecureCoding, NSMutableCopying [Export ("paragraphRangeForRange:")] NSRange GetParagraphRange (NSRange range); - - // From the NSItemProviderReading protocol - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("readableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] - new string[] ReadableTypeIdentifiers { get; } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("objectWithItemProviderData:typeIdentifier:error:")] - [return: NullAllowed] - new NSString GetObject (NSData data, string typeIdentifier, [NullAllowed] out NSError outError); - - // From the NSItemProviderWriting protocol - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("writableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] - new string[] WritableTypeIdentifiers { get; } } [StrongDictionary ("NSString")] @@ -8330,23 +7455,23 @@ interface NSObject2 : NSObjectProtocol { Class GetBindingValueClass (NSString binding); #if !XAMCORE_4_0 - [Obsolete ("Use 'Bind (NSString binding, NSObject observable, string keyPath, [NullAllowed] NSDictionary options)' instead.")] + [Obsolete ("Use Bind (NSString binding, NSObject observable, string keyPath, [NullAllowed] NSDictionary options) instead")] [Export ("bind:toObject:withKeyPath:options:")] void Bind (string binding, NSObject observable, string keyPath, [NullAllowed] NSDictionary options); - [Obsolete ("Use 'Unbind (NSString binding)' instead.")] + [Obsolete ("Use Unbind (NSString binding) instead")] [Export ("unbind:")] void Unbind (string binding); - [Obsolete ("Use 'GetBindingValueClass (NSString binding)' instead.")] + [Obsolete ("Use GetBindingValueClass (NSString binding) instead")] [Export ("valueClassForBinding:")] Class BindingValueClass (string binding); - [Obsolete ("Use 'GetBindingInfo (NSString binding)' instead.")] + [Obsolete ("Use GetBindingInfo (NSString binding) instead")] [Export ("infoForBinding:")] NSDictionary BindingInfo (string binding); - [Obsolete ("Use 'GetBindingOptionDescriptions (NSString aBinding)' instead.")] + [Obsolete ("Use GetBindingOptionDescriptions (NSString aBinding) instead")] [Export ("optionDescriptionsForBinding:")] NSObject[] BindingOptionDescriptions (string aBinding); @@ -8355,7 +7480,7 @@ interface NSObject2 : NSObjectProtocol { NSObject GetDefaultPlaceholder (NSObject marker, string binding); [Static] - [Obsolete ("Use 'SetDefaultPlaceholder (NSObject placeholder, NSObject marker, NSString binding)' instead.")] + [Obsolete ("Use SetDefaultPlaceholder (NSObject placeholder, NSObject marker, NSString binding) instead")] [Wrap ("SetDefaultPlaceholder (placeholder, marker, (NSString) binding)")] void SetDefaultPlaceholder (NSObject placeholder, NSObject marker, string binding); @@ -9653,156 +8778,6 @@ partial interface NSItemProvider : NSCopying { [Export ("registerCloudKitShare:container:")] void RegisterCloudKitShare (CKShare share, CKContainer container); #endif - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("registerDataRepresentationForTypeIdentifier:visibility:loadHandler:")] - void RegisterDataRepresentation (string typeIdentifier, NSItemProviderRepresentationVisibility visibility, RegisterDataRepresentationLoadHandler loadHandler); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:")] - void RegisterFileRepresentation (string typeIdentifier, NSItemProviderFileOptions fileOptions, NSItemProviderRepresentationVisibility visibility, RegisterFileRepresentationLoadHandler loadHandler); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("registeredTypeIdentifiersWithFileOptions:")] - string[] GetRegisteredTypeIdentifiers (NSItemProviderFileOptions fileOptions); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("hasRepresentationConformingToTypeIdentifier:fileOptions:")] - bool HasConformingRepresentation (string typeIdentifier, NSItemProviderFileOptions fileOptions); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Async, Export ("loadDataRepresentationForTypeIdentifier:completionHandler:")] - NSProgress LoadDataRepresentation (string typeIdentifier, Action completionHandler); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Async, Export ("loadFileRepresentationForTypeIdentifier:completionHandler:")] - NSProgress LoadFileRepresentation (string typeIdentifier, Action completionHandler); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Async (ResultTypeName = "LoadInPlaceResult"), Export ("loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:")] - NSProgress LoadInPlaceFileRepresentation (string typeIdentifier, LoadInPlaceFileRepresentationHandler completionHandler); - - [NoWatch, NoTV, NoMac, iOS (11, 0)] - [NullAllowed, Export ("suggestedName")] - string SuggestedName { get; set; } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("initWithObject:")] - IntPtr Constructor (INSItemProviderWriting @object); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("registerObject:visibility:")] - void RegisterObject (INSItemProviderWriting @object, NSItemProviderRepresentationVisibility visibility); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("registerObjectOfClass:visibility:loadHandler:")] - void RegisterObject (Class aClass, NSItemProviderRepresentationVisibility visibility, RegisterObjectRepresentationLoadHandler loadHandler); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Wrap ("RegisterObject (new Class (type), visibility, loadHandler)")] - void RegisterObject (Type type, NSItemProviderRepresentationVisibility visibility, RegisterObjectRepresentationLoadHandler loadHandler); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("canLoadObjectOfClass:")] - bool CanLoadObject (Class aClass); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Wrap ("CanLoadObject (new Class (type))")] - bool CanLoadObject (Type type); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Async, Export ("loadObjectOfClass:completionHandler:")] - NSProgress LoadObject (Class aClass, Action completionHandler); -#if !MONOMAC - // NSItemProvider_UIKitAdditions category - - [NoWatch, NoTV] - [iOS (11,0)] - [NullAllowed, Export ("teamData", ArgumentSemantic.Copy)] - NSData TeamData { get; set; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("preferredPresentationSize", ArgumentSemantic.Assign)] - CGSize PreferredPresentationSize { get; set; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("preferredPresentationStyle", ArgumentSemantic.Assign)] - UIPreferredPresentationStyle PreferredPresentationStyle { get; set; } -#endif // !MONOMAC - } - - delegate NSProgress RegisterFileRepresentationLoadHandler ([BlockCallback] RegisterFileRepresentationCompletionHandler completionHandler); - delegate void RegisterFileRepresentationCompletionHandler (NSUrl fileUrl, bool coordinated, NSError error); - delegate void ItemProviderDataCompletionHandler (NSData data, NSError error); - delegate NSProgress RegisterDataRepresentationLoadHandler ([BlockCallback] ItemProviderDataCompletionHandler completionHandler); - delegate void LoadInPlaceFileRepresentationHandler (NSUrl fileUrl, bool isInPlace, NSError error); - delegate NSProgress RegisterObjectRepresentationLoadHandler ([BlockCallback] RegisterObjectRepresentationCompletionHandler completionHandler); - delegate void RegisterObjectRepresentationCompletionHandler (INSItemProviderWriting @object, NSError error); - - interface INSItemProviderReading {} - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Protocol] - interface NSItemProviderReading - { - // This static method has to be implemented on each class that implements - // this, this is not a capability that exists in C#. - // We are inlining these on each class that implements NSItemProviderReading - // for the sake of the method being callable from C#, for user code, the - // user needs to manually [Export] the selector on a static method, like - // they do for the "layer" property on CALayer subclasses. - // - [Static, Abstract] - [Export ("readableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] - string[] ReadableTypeIdentifiers { get; } - - [Static, Abstract] - [Export ("objectWithItemProviderData:typeIdentifier:error:")] - [return: NullAllowed] - INSItemProviderReading GetObject (NSData data, string typeIdentifier, [NullAllowed] out NSError outError); - } - - interface INSItemProviderWriting {} - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Protocol] - interface NSItemProviderWriting - { - // - // This static method has to be implemented on each class that implements - // this, this is not a capability that exists in C#. - // We are inlining these on each class that implements NSItemProviderWriting - // for the sake of the method being callable from C#, for user code, the - // user needs to manually [Export] the selector on a static method, like - // they do for the "layer" property on CALayer subclasses. - // - [Static, Abstract] - [Export ("writableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] - string[] WritableTypeIdentifiers { get; } - - // This is an optional method, which means the generator will inline it in any classes - // that implements this interface. Unfortunately none of the native classes that implements - // the protocol actually implements this method, which means that inlining the method will cause - // introspection to complain (rightly). So comment out this method to avoid generator a lot of unusable API. - // See also https://bugzilla.xamarin.com/show_bug.cgi?id=59308. - // - // [Static] - // [Export ("itemProviderVisibilityForRepresentationWithTypeIdentifier:")] - // NSItemProviderRepresentationVisibility GetItemProviderVisibility (string typeIdentifier); - - [Export ("writableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] - // 'WritableTypeIdentifiers' is a nicer name, but there's a static property with that name. - string[] WritableTypeIdentifiersForItemProvider { get; } - - [Export ("itemProviderVisibilityForRepresentationWithTypeIdentifier:")] - // 'GetItemProviderVisibility' is a nicer name, but there's a static method with that name. - NSItemProviderRepresentationVisibility GetItemProviderVisibilityForTypeIdentifier (string typeIdentifier); - - [Abstract] - [Async, Export ("loadDataWithTypeIdentifier:forItemProviderCompletionHandler:")] - [return: NullAllowed] - NSProgress LoadData (string typeIdentifier, Action completionHandler); } #if XAMCORE_2_0 @@ -9981,7 +8956,7 @@ interface NSNetService { void Publish (NSNetServiceOptions options); [Export ("resolve")] - [Availability (Introduced = Platform.iOS_2_0 | Platform.Mac_10_2, Deprecated = Platform.iOS_2_0 | Platform.Mac_10_4, Message = "Use 'Resolve (double)' instead.")] + [Availability (Introduced = Platform.iOS_2_0 | Platform.Mac_10_2, Deprecated = Platform.iOS_2_0 | Platform.Mac_10_4, Message = "Use Resolve (double) instead")] [NoWatch] void Resolve (); @@ -10290,7 +9265,6 @@ interface NSNotificationQueue { // init returns NIL [DisableDefaultCtor] partial interface NSValue : NSSecureCoding, NSCopying { - [Availability (Deprecated = Platform.Mac_10_13 | Platform.iOS_11_0 | Platform.TV_11_0 | Platform.Watch_4_0, Message="Potential for buffer overruns. Use 'StoreValueAtAddress (IntPtr, nuint)' instead.")] [Export ("getValue:")] void StoreValueAtAddress (IntPtr value); @@ -10399,21 +9373,12 @@ partial interface NSValue : NSSecureCoding, NSCopying { [Export ("UIEdgeInsetsValue")] UIKit.UIEdgeInsets UIEdgeInsetsValue { get; } - [Watch (4,0), TV (11,0), iOS (11,0)] - [Export ("directionalEdgeInsetsValue")] - NSDirectionalEdgeInsets DirectionalEdgeInsetsValue { get; } - [Export ("valueWithCGAffineTransform:")][Static] NSValue FromCGAffineTransform (XamCore.CoreGraphics.CGAffineTransform tran); [Export ("valueWithUIEdgeInsets:")][Static] NSValue FromUIEdgeInsets (UIKit.UIEdgeInsets insets); - [Watch (4,0), TV (11,0), iOS (11,0)] - [Static] - [Export ("valueWithDirectionalEdgeInsets:")] - NSValue FromDirectionalEdgeInsets (NSDirectionalEdgeInsets insets); - [Since (5,0)] [Export ("valueWithUIOffset:")][Static] NSValue FromUIOffset (UIKit.UIOffset insets); @@ -10484,27 +9449,27 @@ partial interface NSValue : NSSecureCoding, NSCopying { #region SceneKit Additions - [iOS (8,0)][Mac (10,9, onlyOn64 : true)] + [Mac (10,8), iOS (8,0)] [Static, Export ("valueWithSCNVector3:")] NSValue FromVector (SCNVector3 vector); - [iOS (8,0)][Mac (10,9, onlyOn64 : true)] + [Mac (10,8), iOS (8,0)] [Export ("SCNVector3Value")] SCNVector3 Vector3Value { get; } - [iOS (8,0)][Mac (10,9, onlyOn64 : true)] + [Mac (10,8), iOS (8,0)] [Static, Export ("valueWithSCNVector4:")] NSValue FromVector (SCNVector4 vector); - [iOS (8,0)][Mac (10,9, onlyOn64 : true)] + [Mac (10,8), iOS (8,0)] [Export ("SCNVector4Value")] SCNVector4 Vector4Value { get; } - [iOS (8,0)][Mac (10,9, onlyOn64 : true)] + [Mac (10,10), iOS (8,0)] [Static, Export ("valueWithSCNMatrix4:")] NSValue FromSCNMatrix4 (SCNMatrix4 matrix); - [iOS (8,0)][Mac (10,9, onlyOn64 : true)] + [Mac (10,10), iOS (8,0)] [Export ("SCNMatrix4Value")] SCNMatrix4 SCNMatrix4Value { get; } @@ -11299,11 +10264,11 @@ interface NSProcessInfo { [Export ("hostName")] string HostName { get; } - [Availability (Deprecated = Platform.Mac_10_10 | Platform.iOS_8_0, Message="Use 'OperatingSystemVersion' or 'IsOperatingSystemAtLeastVersion' instead.")] + [Availability (Deprecated = Platform.Mac_10_10 | Platform.iOS_8_0, Message="Use OperatingSystemVersion or IsOperatingSystemAtLeastVersion")] [Export ("operatingSystem")] nint OperatingSystem { get; } - [Availability (Deprecated = Platform.Mac_10_10 | Platform.iOS_8_0, Message="Use 'OperatingSystemVersionString' instead.")] + [Availability (Deprecated = Platform.Mac_10_10 | Platform.iOS_8_0, Message="Use OperatingSystemVersionString")] [Export ("operatingSystemName")] string OperatingSystemName { get; } @@ -11374,20 +10339,16 @@ interface NSProcessInfo { NSString PowerStateDidChangeNotification { get; } #endif +#if MONOMAC [Mac (10,10,3)] - [Watch (4,0)] - [TV (11, 0)] - [iOS (11,0)] [Export ("thermalState")] NSProcessInfoThermalState ThermalState { get; } [Mac (10,10,3)] [Field ("NSProcessInfoThermalStateDidChangeNotification")] - [Watch (4,0)] - [TV (11, 0)] - [iOS (11,0)] [Notification] NSString ThermalStateDidChangeNotification { get; } +#endif } [NoWatch][NoTV][NoiOS] @@ -11559,45 +10520,6 @@ partial interface NSProgress { [Field ("NSProgressFileIconKey")] NSString FileIconKey { get; } #endif - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Async, Export ("performAsCurrentWithPendingUnitCount:usingBlock:")] - void PerformAsCurrent (long unitCount, Action work); - - [Export ("finished")] - bool Finished { [Bind ("isFinished")] get; } - - [Internal] - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("estimatedTimeRemaining", ArgumentSemantic.Copy)] - //[BindAs (typeof (nint?))] - NSNumber _EstimatedTimeRemaining { get; set; } - - [Internal] - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("throughput", ArgumentSemantic.Copy)] - //[BindAs (typeof (nint?))] - NSNumber _Throughput { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("fileOperationKind")] - string FileOperationKind { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("fileURL", ArgumentSemantic.Copy)] - NSUrl FileUrl { get; set; } - - [Internal] - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("fileTotalCount", ArgumentSemantic.Copy)] - //[BindAs (typeof (nint?))] - NSNumber _FileTotalCount { get; set; } - - [Internal] - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [NullAllowed, Export ("fileCompletedCount", ArgumentSemantic.Copy)] - //[BindAs (typeof (nint?))] - NSNumber _FileCompletedCount { get; set; } } interface INSProgressReporting {} @@ -11709,10 +10631,6 @@ interface NSFileCoordinator { [iOS (5,0)][Mac (10,7)] [Export ("purposeIdentifier")] string PurposeIdentifier { get; set; } - - [NoWatch, NoTV, Mac (10,13), iOS (11,0)] - [Export ("itemAtURL:didChangeUbiquityAttributes:")] - void ItemUbiquityAttributesChanged (NSUrl url, NSSet attributes); } [iOS (8,0)][Mac (10,10)] @@ -12068,12 +10986,6 @@ partial interface NSFileManager { [Export ("unmountVolumeAtURL:options:completionHandler:")] void UnmountVolume (NSUrl url, NSFileManagerUnmountOptions mask, Action completionHandler); #endif - -#if !WATCH && !TVOS - [NoWatch, NoTV, Mac (10,13), iOS (11,0)] - [Async, Export ("getFileProviderServicesForItemAtURL:completionHandler:")] - void GetFileProviderServices (NSUrl url, Action, NSError> completionHandler); -#endif } [BaseType(typeof(NSObject))] @@ -12212,14 +11124,6 @@ partial interface NSFilePresenter { [Export ("presentedSubitemAtURL:didResolveConflictVersion:")] void PresentedSubitemResolvedConflictVersion (NSUrl url, NSFileVersion version); - - [NoWatch, NoTV, Mac (10,13), iOS (11,0)] - [Export ("presentedItemDidChangeUbiquityAttributes:")] - void PresentedItemChangedUbiquityAttributes (NSSet attributes); - - [NoWatch, NoTV, Mac (10, 13), iOS (11, 0)] - [Export ("observedPresentedItemUbiquityAttributes", ArgumentSemantic.Strong)] - NSSet PresentedItemObservedUbiquityAttributes { get; } } delegate void NSFileVersionNonlocalVersionsCompletionHandler ([NullAllowed] NSFileVersion[] nonlocalFileVersions, [NullAllowed] NSError error); @@ -12306,10 +11210,6 @@ interface NSFileVersion { [Static] [Export ("removeOtherVersionsOfItemAtURL:error:")] bool RemoveOtherVersions (NSUrl url, out NSError outError); - - [NoWatch, NoTV, Mac (10, 12), iOS (10, 0)] - [NullAllowed, Export ("originatorNameComponents", ArgumentSemantic.Copy)] - NSPersonNameComponents OriginatorNameComponents { get; } } [BaseType (typeof (NSObject))] @@ -12973,10 +11873,6 @@ interface NSTextCheckingResult : NSSecureCoding, NSCopying { [Wrap ("TransitInformationCheckingResult (range, components != null ? components.Dictionary : null)")] NSTextCheckingResult TransitInformationCheckingResult (NSRange range, NSTextCheckingTransitComponents components); - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("rangeWithName:")] - NSRange GetRange (string name); - } [StrongDictionary ("NSTextChecking")] @@ -13244,7 +12140,6 @@ interface NSDateInterval : NSCopying, NSSecureCoding { bool ContainsDate (NSDate date); } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSObject))] interface NSUnit : NSCopying, NSSecureCoding { @@ -13252,7 +12147,6 @@ interface NSUnit : NSCopying, NSSecureCoding { string Symbol { get; } [Export ("initWithSymbol:")] - [DesignatedInitializer] IntPtr Constructor (string symbol); } @@ -13289,11 +12183,6 @@ interface NSUnitConverterLinear : NSSecureCoding { [Abstract] // abstract subclass of NSUnit [DisableDefaultCtor] // there's a designated initializer interface NSDimension : NSSecureCoding { - // Inlined from base type - [Export ("initWithSymbol:")] - [DesignatedInitializer] - IntPtr Constructor (string symbol); - [Export ("converter", ArgumentSemantic.Copy)] NSUnitConverter Converter { get; } @@ -13336,25 +12225,13 @@ interface NSUnitTemperature : NSSecureCoding { NSDimension BaseUnit { get; } } -#if !WATCH && !TVOS - [Mac (10,8), iOS (11,0), NoWatch, NoTV] +#if MONOMAC partial interface NSFileManager { [MountainLion, Export ("trashItemAtURL:resultingItemURL:error:")] bool TrashItem (NSUrl url, out NSUrl resultingItemUrl, out NSError error); } - [NoWatch, NoTV, Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface NSFileProviderService - { - [Export ("name")] - string Name { get; } - } -#endif - -#if MONOMAC partial interface NSFilePresenter { [MountainLion, Export ("primaryPresentedItemURL")] @@ -13557,7 +12434,6 @@ interface NSAffineTransform : NSSecureCoding, NSCopying { CGAffineTransform TransformStruct { get; set; } } - [Availability (Deprecated = Platform.Mac_10_13 | Platform.iOS_11_0 | Platform.Watch_2_0 | Platform.TV_11_0, Message = "Use 'NSXpcConnection' instead.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSConnection { @@ -13661,7 +12537,6 @@ interface NSConnection { NSConnectionDelegate Delegate { get; set; } } - [Availability (Deprecated = Platform.Mac_10_13 | Platform.iOS_11_0 | Platform.Watch_2_0 | Platform.TV_11_0, Message = "Use 'NSXpcConnection' instead.")] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -13685,7 +12560,6 @@ interface NSConnectionDelegate { bool AllowNewConnection (NSConnection newConnection, NSConnection parentConnection); } - [Availability (Deprecated = Platform.Mac_10_13 | Platform.iOS_11_0 | Platform.Watch_2_0 | Platform.TV_11_0, Message = "Use 'NSXpcConnection' instead.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSDistantObjectRequest { @@ -13818,11 +12692,11 @@ interface NSAppleEventDescriptor : NSSecureCoding, NSCopying { IntPtr _InitRecordDescriptor (); #if !XAMCORE_3_0 - [Obsolete ("Use the constructor instead.")] + [Obsolete ("Use the constructor instead")] [Export ("initListDescriptor")] NSObject InitListDescriptor (); - [Obsolete ("Use the constructor instead.")] + [Obsolete ("Use the constructor instead")] [Export ("initRecordDescriptor")] NSObject InitRecordDescriptor (); #endif @@ -14349,7 +13223,6 @@ interface NSUrlSessionTaskMetrics { nuint RedirectCount { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitAcceleration : NSSecureCoding { @@ -14372,7 +13245,6 @@ interface NSUnitAcceleration : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitAngle : NSSecureCoding { @@ -14411,7 +13283,6 @@ interface NSUnitAngle : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitArea : NSSecureCoding { @@ -14482,7 +13353,6 @@ interface NSUnitArea : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitConcentrationMass : NSSecureCoding { @@ -14509,7 +13379,6 @@ interface NSUnitConcentrationMass : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitDispersion : NSSecureCoding { @@ -14528,7 +13397,6 @@ interface NSUnitDispersion : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitDuration : NSSecureCoding { @@ -14555,7 +13423,6 @@ interface NSUnitDuration : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitElectricCharge : NSSecureCoding { @@ -14594,7 +13461,6 @@ interface NSUnitElectricCharge : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitElectricCurrent : NSSecureCoding { @@ -14629,7 +13495,6 @@ interface NSUnitElectricCurrent : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitElectricPotentialDifference : NSSecureCoding { @@ -14664,7 +13529,6 @@ interface NSUnitElectricPotentialDifference : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitElectricResistance : NSSecureCoding { @@ -14699,7 +13563,6 @@ interface NSUnitElectricResistance : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitEnergy : NSSecureCoding { @@ -14734,7 +13597,6 @@ interface NSUnitEnergy : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitFrequency : NSSecureCoding { @@ -14781,7 +13643,6 @@ interface NSUnitFrequency : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitFuelEfficiency : NSSecureCoding { @@ -14808,7 +13669,6 @@ interface NSUnitFuelEfficiency : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitLength : NSSecureCoding { @@ -14911,7 +13771,6 @@ interface NSUnitLength : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitIlluminance : NSSecureCoding { @@ -14930,7 +13789,6 @@ interface NSUnitIlluminance : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitMass : NSSecureCoding { @@ -15009,7 +13867,6 @@ interface NSUnitMass : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitPower : NSSecureCoding { @@ -15068,7 +13925,6 @@ interface NSUnitPower : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitPressure : NSSecureCoding { @@ -15123,7 +13979,6 @@ interface NSUnitPressure : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitSpeed : NSSecureCoding { @@ -15154,7 +14009,6 @@ interface NSUnitSpeed : NSSecureCoding { NSDimension BaseUnit { get; } } - [DisableDefaultCtor] // -init should never be called on NSUnit! [Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)] [BaseType (typeof (NSDimension))] interface NSUnitVolume : NSSecureCoding { @@ -15352,10 +14206,4 @@ interface NSMeasurementFormatter : NSSecureCoding { string ToString (NSUnit unit); } - [iOS (6,0), Mac (10,8), Watch (2,0), TV (9,0)] - [BaseType (typeof (NSObject), Name = "NSXPCListenerEndpoint")] - [DisableDefaultCtor] - interface NSXpcListenerEndpoint : NSSecureCoding - { - } } diff --git a/src/frameworks.sources b/src/frameworks.sources index 197eb22ae65..d438aa2e845 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -101,7 +101,6 @@ APPKIT_SOURCES = \ AppKit/NSSharingServiceDelegate.cs \ AppKit/NSDocument.cs \ AppKit/NSEvent.cs \ - AppKit/NSFont.cs \ AppKit/NSGestureRecognizer.cs \ AppKit/NSGradient.cs \ AppKit/NSGraphics.cs \ @@ -151,11 +150,6 @@ APPKIT_SOURCES = \ AppKit/NSColorPickerTouchBarItem.cs \ AppKit/NSSliderTouchBarItem.cs -# ARKit - -ARKIT_SOURCES = \ - ARKit/ARPointCloud.cs \ - # AssetsLibrary ASSETSLIBRARY_API_SOURCES = \ @@ -248,7 +242,6 @@ AVFOUNDATION_SOURCES = \ AVFoundation/AVCaptureVideoDataOutput.cs \ AVFoundation/AVCaptureVideoPreviewLayer.cs \ AVFoundation/AVCompat.cs \ - AVFoundation/AVDepthData.cs \ AVFoundation/AVFragmentedAsset.cs \ AVFoundation/AVFragmentedAssetTrack.cs \ AVFoundation/AVLayerVideoGravity.cs \ @@ -263,7 +256,6 @@ AVFOUNDATION_SOURCES = \ AVFoundation/AVTextStyleRule.cs \ AVFoundation/DescriptionHelpers.cs \ AVFoundation/Events.cs \ - AVFoundation/AVPlayerLooper.cs \ # AVKit @@ -314,6 +306,7 @@ CONTACTS_SOURCES = \ Contacts/CNContactStore.cs \ Contacts/CNInstantMessageAddress.cs \ Contacts/CNObsolete.cs \ + Contacts/CNPostalAddress.cs \ Contacts/CNSocialProfile.cs \ # CoreAnimation (this is really Quartz.framework) @@ -408,8 +401,6 @@ COREGRAPHICS_CORE_SOURCES = \ CoreGraphics/CGLayer.cs \ CoreGraphics/CGPath.cs \ CoreGraphics/CGVector.cs \ - CoreGraphics/CGPDFDocument.cs \ - CoreGraphics/CGPDFPage-2.cs \ COREGRAPHICS_SOURCES = \ CoreGraphics/CGBitmapContext.cs \ @@ -428,8 +419,10 @@ COREGRAPHICS_SOURCES = \ CoreGraphics/CGPDFArray.cs \ CoreGraphics/CGPDFContentStream.cs \ CoreGraphics/CGPDFDictionary.cs \ + CoreGraphics/CGPDFDocument.cs \ CoreGraphics/CGPDFObject.cs \ CoreGraphics/CGPDFOperatorTable.cs \ + CoreGraphics/CGPDFPage-2.cs \ CoreGraphics/CGPDFPage.cs \ CoreGraphics/CGPDFScanner.cs \ CoreGraphics/CGPDFStream.cs \ @@ -490,13 +483,6 @@ COREMIDI_CORE_SOURCES = \ CoreMidi/MidiThruConnection.cs \ CoreMidi/MidiThruConnectionParams.cs \ -# CoreML - -COREML_SOURCES = \ - CoreML/MLDictionaryFeatureProvider.cs \ - CoreML/MLMultiArray.cs \ - CoreML/MLMultiArrayConstraint.cs \ - # CoreMotion COREMOTION_CORE_SOURCES = \ @@ -600,9 +586,6 @@ EVENTKIT_SOURCES = \ EVENTKITUI_CORE_SOURCES = \ EventKitUI/Defs.cs \ -EVENTKITUI_SOURCES = \ - EventKitUI/EKUIBundle.cs \ - # ExternalAccessory EXTERNALACCESSORY_API_SOURCES = \ @@ -637,7 +620,6 @@ FOUNDATION_CORE_SOURCES = \ Foundation/NSNumber.mac.cs \ Foundation/NSNumber2.cs \ Foundation/NSObject2.cs \ - Foundation/NSProgress.cs \ Foundation/NSRange.cs \ Foundation/NSString.cs \ Foundation/NSValue.cs \ @@ -712,7 +694,6 @@ FOUNDATION_SOURCES = \ Foundation/NSPortMessage.cs \ Foundation/NSPredicate.cs \ Foundation/NSPropertyListSerialization.cs \ - Foundation/NSProxy.cs \ Foundation/NSRunLoop.cs \ Foundation/NSScriptCommandDescription.cs \ Foundation/NSScriptCommandArgumentDescription.cs \ @@ -729,7 +710,6 @@ FOUNDATION_SOURCES = \ Foundation/NSTimeZone.cs \ Foundation/NSUbiquitousKeyValueStore.cs \ Foundation/NSUndoManager.cs \ - Foundation/NSUnit.cs \ Foundation/NSUrl.cs \ Foundation/NSUrlComponents.cs \ Foundation/NSUrlConnection.cs \ @@ -822,8 +802,6 @@ HOMEKIT_SOURCES = \ HomeKit/HMCharacteristicProperties.cs \ HomeKit/HMEventTrigger.cs \ HomeKit/HMHome.cs \ - HomeKit/HMSignificantTimeEvent.cs \ - HomeKit/HMMutableSignificantTimeEvent.cs \ HomeKit/HMService.cs \ # iAd @@ -852,45 +830,19 @@ IMAGEKIT_CORE_SOURCES = \ # Intents INTENTS_SOURCES = \ - Intents/INBillTypeResolutionResult.cs \ - Intents/INCallRecord.cs \ - Intents/INCallRecordTypeResolutionResult.cs \ - Intents/INCarAirCirculationModeResolutionResult.cs \ - Intents/INCarAudioSourceResolutionResult.cs \ - Intents/INCarDefrosterResolutionResult.cs \ - Intents/INCarSeatResolutionResult.cs \ - Intents/INCarSignalOptionsResolutionResult.cs \ Intents/INCompat.cs \ Intents/INGetCarLockStatusIntentResponse.cs \ Intents/INGetCarPowerLevelStatusIntentResponse.cs \ Intents/INIntentResolutionResult.cs \ - Intents/INInteraction.cs \ - Intents/INMessageAttributeOptionsResolutionResult.cs \ - Intents/INMessageAttributeResolutionResult.cs \ - Intents/INPaymentStatusResolutionResult.cs \ Intents/INPriceRange.cs \ - Intents/INRadioTypeResolutionResult.cs \ - Intents/INRelativeReferenceResolutionResult.cs \ - Intents/INRelativeSettingResolutionResult.cs \ Intents/INRideOption.cs \ - Intents/INSaveProfileInCarIntent.cs \ - Intents/INSearchCallHistoryIntent.cs \ Intents/INSetCarLockStatusIntent.cs \ Intents/INSetClimateSettingsInCarIntent.cs \ Intents/INSetDefrosterSettingsInCarIntent.cs \ Intents/INSetProfileInCarIntent.cs \ Intents/INSetSeatSettingsInCarIntent.cs \ - Intents/INSpeakableString.cs \ Intents/INStartWorkoutIntent.cs \ - Intents/INWorkoutGoalUnitTypeResolutionResult.cs \ - Intents/INWorkoutLocationTypeResolutionResult.cs \ - -# IOSurface -IOSURFACE_CORE_SOURCES = \ - IOSurface/IODefs.cs - -IOSURFACE_SOURCES = \ - IOSurface/IOSurface.cs + Intents/INSaveProfileInCarIntent.cs \ # JavaScriptCore @@ -914,7 +866,6 @@ MAPKIT_CORE_SOURCES = \ MAPKIT_SOURCES = \ MapKit/MKCircle.cs \ MapKit/MKDirections.cs \ - MapKit/MKFeatureDisplayPriority.cs \ MapKit/MKGeodesicPolyline.cs \ MapKit/MKLocalSearch.cs \ MapKit/MKMapItem.cs \ @@ -977,12 +928,9 @@ METAL_CORE_SOURCES = \ Metal/Defs.cs \ METAL_SOURCES = \ - Metal/MTLArgumentEncoder.cs \ Metal/MTLCompat.cs \ Metal/MTLDevice.cs \ Metal/MTLArrays.cs \ - Metal/MTLRenderCommandEncoder.cs \ - Metal/MTLRenderPassDescriptor.cs \ Metal/MTLVertexDescriptor.cs \ # MetalKit @@ -1014,8 +962,6 @@ MODELIO_CORE_SOURCES = \ MODELIO_SOURCES = \ ModelIO/MDLAsset.cs \ ModelIO/MDLNoiseTexture.cs \ - ModelIO/MDLTransform.cs \ - ModelIO/MDLTransformComponent.cs \ ModelIO/MDLVertexDescriptor.cs \ ModelIO/MDLMesh.cs \ @@ -1113,17 +1059,13 @@ OPENGLES_SOURCES = \ PASSKIT_API_SOURCES = \ PassKit/PKEnums.cs \ - -PASSKIT_SOURCES = \ - PassKit/PKPaymentRequest.cs \ # PdfKit -PDFKIT_API_SOURCES = \ +PDFKIT_CORE_SOURCES = \ PdfKit/Enums.cs \ PDFKIT_SOURCES = \ - PdfKit/PdfAnnotation.cs \ PdfKit/PdfKit.cs \ # Photos @@ -1268,7 +1210,7 @@ SOCIAL_SOURCES = \ # SpriteKit -SPRITEKIT_API_SOURCES = \ +SPRITEKIT_CORE_SOURCES = \ SpriteKit/Enums.cs \ SPRITEKIT_SOURCES = \ @@ -1365,7 +1307,6 @@ UIKIT_SOURCES = \ UIKit/UIDocumentInteractionController.cs \ UIKit/UIDocumentMenuViewController.cs \ UIKit/UIDocumentPickerViewController.cs \ - UIKit/UIDragDropSessionExtensions.cs \ UIKit/UIDynamicAnimator.cs \ UIKit/UIEnumsExtensions.cs \ UIKit/UIEvent.cs \ @@ -1442,15 +1383,6 @@ VIDEOTOOLBOX_SOURCES = \ VideoToolbox/VTUtilities.cs \ VideoToolbox/VTPixelTransferProperties.cs \ -# Vision - -VISION_SOURCES = \ - Vision/VNBarcodeSymbologyExtensions.cs \ - Vision/VNDetectBarcodesRequest.cs \ - Vision/VNFaceLandmarkRegion2D.cs \ - Vision/VNRequest.cs \ - Vision/VNUtils.cs \ - # WatchConnectivity WATCHCONNECTIVITY_CORE_SOURCES = \ @@ -1531,13 +1463,6 @@ SHARED_CORE_SOURCES = \ ObjCRuntime/Protocol.cs \ ObjCRuntime/Registrar.core.cs \ ObjCRuntime/Selector.cs \ - Simd/MatrixDouble4x4.cs \ - Simd/MatrixFloat2x2.cs \ - Simd/MatrixFloat3x3.cs \ - Simd/MatrixFloat4x3.cs \ - Simd/MatrixFloat4x4.cs \ - Simd/VectorDouble3.cs \ - Simd/VectorFloat3.cs \ SHARED_SOURCES = \ ../runtime/Delegates.generated.cs \ @@ -1592,10 +1517,7 @@ SHARED_SOURCES = \ COMMON_FRAMEWORKS = \ AVFoundation \ - CoreBluetooth \ CoreFoundation \ - CoreML \ - CoreVideo \ Foundation \ GameKit \ SceneKit \ @@ -1615,6 +1537,7 @@ MAC_FRAMEWORKS = \ ContactsUI \ CoreAnimation \ CoreAudioKit \ + CoreBluetooth \ CoreData \ CoreGraphics \ CoreImage \ @@ -1623,9 +1546,9 @@ MAC_FRAMEWORKS = \ CoreMidi \ CoreServices \ CoreText \ + CoreVideo \ CoreWlan \ EventKit \ - ExternalAccessory \ FinderSync \ GameController \ GameplayKit \ @@ -1633,7 +1556,6 @@ MAC_FRAMEWORKS = \ ImageIO \ ImageKit \ Intents \ - IOSurface \ JavaScriptCore \ LocalAuthentication \ MapKit \ @@ -1651,7 +1573,6 @@ MAC_FRAMEWORKS = \ OpenGL \ PdfKit \ Photos \ - PhotosUI \ PrintCore \ QTKit \ QuartzComposer \ @@ -1665,7 +1586,6 @@ MAC_FRAMEWORKS = \ StoreKit \ SystemConfiguration \ VideoToolbox \ - Vision \ WebKit \ WKWebKit \ @@ -1677,7 +1597,6 @@ IOS_FRAMEWORKS = \ AdSupport \ AddressBook \ AddressBookUI \ - ARKit \ AssetsLibrary \ AudioToolbox \ AudioUnit \ @@ -1688,6 +1607,7 @@ IOS_FRAMEWORKS = \ ContactsUI \ CoreAnimation \ CoreAudioKit \ + CoreBluetooth \ CoreData \ CoreGraphics \ CoreImage \ @@ -1695,27 +1615,22 @@ IOS_FRAMEWORKS = \ CoreMIDI \ CoreMedia \ CoreMotion \ - CoreNFC \ CoreSpotlight \ CoreTelephony \ CoreText \ - DeviceCheck \ + CoreVideo \ EventKit \ EventKitUI \ ExternalAccessory \ - FileProvider \ - FileProviderUI \ GLKit \ GameController \ GameplayKit \ HealthKit \ HealthKitUI \ HomeKit \ - IdentityLookup \ ImageIO \ Intents \ IntentsUI \ - IOSurface \ JavaScriptCore \ LocalAuthentication \ MapKit \ @@ -1735,7 +1650,6 @@ IOS_FRAMEWORKS = \ NotificationCenter \ OpenGLES \ PassKit \ - PdfKit \ Photos \ PhotosUI \ PushKit \ @@ -1753,7 +1667,6 @@ IOS_FRAMEWORKS = \ UserNotificationsUI \ VideoToolbox \ VideoSubscriberAccount \ - Vision \ WatchConnectivity \ WatchKit \ WKWebKit \ @@ -1793,6 +1706,7 @@ TVOS_FRAMEWORKS = \ CFNetwork \ CloudKit \ CoreAnimation \ + CoreBluetooth \ CoreData \ CoreGraphics \ CoreImage \ @@ -1800,14 +1714,13 @@ TVOS_FRAMEWORKS = \ CoreMedia \ CoreSpotlight \ CoreText \ - DeviceCheck \ + CoreVideo \ ExternalAccessory \ GLKit \ GameController \ GameplayKit \ HomeKit \ ImageIO \ - IOSurface \ JavaScriptCore \ MapKit \ MediaAccessibility \ @@ -1832,7 +1745,6 @@ TVOS_FRAMEWORKS = \ UserNotifications \ VideoSubscriberAccount \ VideoToolbox \ - Vision \ # # Compute the SOURCES variables. diff --git a/src/gamecontroller.cs b/src/gamecontroller.cs index dcb936bdb95..9a8a2402896 100644 --- a/src/gamecontroller.cs +++ b/src/gamecontroller.cs @@ -56,7 +56,7 @@ partial interface GCControllerAxisInput { partial interface GCControllerButtonInput { #if !XAMCORE_4_0 - [Obsolete ("Use the 'ValueChangedHandler' property.")] + [Obsolete ("Use the ValueChangedHandler property")] [Wrap ("ValueChangedHandler = handler;", IsVirtual = true)] void SetValueChangedHandler (GCControllerButtonValueChanged handler); #endif @@ -73,7 +73,7 @@ partial interface GCControllerButtonInput { #if !XAMCORE_4_0 [iOS (8,0), Mac (10,10)] - [Obsolete ("Use the 'PressedChangedHandler' property.")] + [Obsolete ("Use the PressedChangedHandler property")] [Wrap ("PressedChangedHandler = handler;", IsVirtual = true)] void SetPressedChangedHandler (GCControllerButtonValueChanged handler); #endif @@ -310,7 +310,7 @@ partial interface GCMotion { GCController Controller { get; } #if !XAMCORE_4_0 - [Obsolete ("Use the 'ValueChangedHandler' property.")] + [Obsolete ("Use the ValueChangedHandler property")] [Wrap ("ValueChangedHandler = handler;", IsVirtual = true)] void SetValueChangedHandler (Action handler); #endif @@ -325,19 +325,13 @@ partial interface GCMotion { [Export ("userAcceleration", ArgumentSemantic.Assign)] Vector3d UserAcceleration { get; } - [TV (11,0)] + [NoTV] // Xcode 7.2 [Export ("attitude", ArgumentSemantic.Assign)] Quaterniond Attitude { get; } - [TV (11,0)] + [NoTV] // Xcode 7.2 [Export ("rotationRate", ArgumentSemantic.Assign)] Vector3d RotationRate { get; } - - [TV (11,0)] - [iOS (11,0)] - [Mac (10,13, onlyOn64: true)] - [Export ("hasAttitudeAndRotationRate")] - bool HasAttitudeAndRotationRate { get; } } [NoMac] diff --git a/src/gamekit.cs b/src/gamekit.cs index fe635223c88..0a4af64874a 100644 --- a/src/gamekit.cs +++ b/src/gamekit.cs @@ -82,7 +82,7 @@ interface GKPeerPickerControllerDelegate { [NoWatch] [NoTV] [BaseType (typeof (NSObject))] - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_7_0, Message = "Use 'MCBrowserViewController' from the 'MultipeerConnectivity' framework instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_7_0, Message = "Use MCBrowserViewController from the MultipeerConnectivity framework instead")] interface GKPeerPickerController { [Export ("connectionTypesMask", ArgumentSemantic.Assign)] GKPeerPickerConnectionType ConnectionTypesMask { get; set; } @@ -136,7 +136,7 @@ interface GKVoiceChatClient { [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) [NoTV] [BaseType (typeof (NSObject))] - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_7_0, Message = "Use 'GKVoiceChat' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_7_0, Message = "Use GKVoiceChat instead")] interface GKVoiceChatService { [Export ("defaultVoiceChatService")][Static] @@ -218,7 +218,7 @@ interface GKSessionDelegate { [NoTV] [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) [BaseType (typeof (NSObject))] - [Availability (Introduced = Platform.iOS_3_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'MultipeerConnectivity.MCSession' instead.")] + [Availability (Introduced = Platform.iOS_3_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use MultipeerConnectivity.MCSession instead")] interface GKSession { [Export ("initWithSessionID:displayName:sessionMode:")] [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10)] @@ -316,7 +316,7 @@ interface GKLeaderboard { [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) [NoTV] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'Identifier' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use Identifier instead")] [NullAllowed] // by default this property is null [Export ("category", ArgumentSemantic.Copy)] string Category { get; set; } @@ -334,7 +334,7 @@ interface GKLeaderboard { GKScore LocalPlayerScore { get; } [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'ctor (GKPlayer [] players)' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use ctor (GKPlayer [] players) instead")] [Export ("initWithPlayerIDs:")] IntPtr Constructor ([NullAllowed] string [] players); @@ -344,7 +344,7 @@ interface GKLeaderboard { [NoTV] [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) - [Availability (Deprecated = Platform.iOS_6_0 | Platform.Mac_10_9, Message = "Use 'LoadLeaderboards' instead.")] + [Availability (Deprecated = Platform.iOS_6_0 | Platform.Mac_10_9, Message = "Use LoadLeaderboards instead")] [Static] [Export ("loadCategoriesWithCompletionHandler:")] [Async (ResultTypeName = "GKCategoryResult")] @@ -354,7 +354,7 @@ interface GKLeaderboard { [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) [Static] [Since (5,0)] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'SetDefaultLeaderboard' on 'GKLocalPlayer' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use SetDefaultLeaderboard on GKLocalPlayer instead")] [Export ("setDefaultLeaderboard:withCompletionHandler:")] [Async] #if XAMCORE_2_0 @@ -464,7 +464,7 @@ interface GKPlayer : NSSecureCoding { [NoTV] [NoWatch] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'GKLocalPlayer.LoadFriendPlayers' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use GKLocalPlayer.LoadFriendPlayers instead")] [Export ("isFriend")] bool IsFriend { get; } @@ -504,7 +504,7 @@ interface GKPlayer : NSSecureCoding { [BaseType (typeof (NSObject))] interface GKScore : NSSecureCoding { [NoWatch] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'InitWithLeaderboardIdentifier' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use InitWithLeaderboardIdentifier instead")] [Internal][NullAllowed] [Export ("initWithCategory:")] IntPtr InitWithCategory ([NullAllowed] string category); @@ -554,19 +554,19 @@ interface GKScore : NSSecureCoding { [NoWatch] [NoTV] - [Availability (Introduced = Platform.iOS_4_1 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'LeaderboardIdentifier' instead.")] + [Availability (Introduced = Platform.iOS_4_1 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use LeaderboardIdentifier instead")] [NullAllowed] // by default this property is null [Export ("category", ArgumentSemantic.Copy)] #if XAMCORE_2_0 string Category { get; set; } #else - [Obsolete ("Use the 'Category' property instead.")] + [Obsolete ("Use the Category property instead")] string category { get; set; } #endif [NoWatch] [NoTV] - [Availability (Introduced = Platform.iOS_4_1 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'ReportScores' instead.")] + [Availability (Introduced = Platform.iOS_4_1 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use ReportScores instead")] [Export ("reportScoreWithCompletionHandler:")] [Async] #if XAMCORE_2_0 @@ -585,7 +585,7 @@ interface GKScore : NSSecureCoding { [NoTV] [NoWatch] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Pass 'GKPlayers' to 'ChallengeComposeController (GKPlayer [] players, string message, ... )' and present the view controller instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Pass GKPlayers to ChallengeComposeController (GKPlayer [] players, string message, ... ) and present the view controller instead")] [iOS (6,0), Mac (10,8)] [Export ("issueChallengeToPlayers:message:")] void IssueChallengeToPlayers ([NullAllowed] string[] playerIDs, [NullAllowed] string message); @@ -608,7 +608,7 @@ interface GKScore : NSSecureCoding { #if !MONOMAC [NoTV][NoWatch] - [Availability (Deprecated = Platform.iOS_8_0, Message = "Pass 'GKPlayers' to 'ChallengeComposeController (GKPlayer [] players, string message, ...)' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Pass GKPlayers to ChallengeComposeController (GKPlayer [] players, string message, ...) instead")] [iOS (7,0)] [Export ("challengeComposeControllerWithPlayers:message:completionHandler:")] UIViewController ChallengeComposeController ([NullAllowed] string[] playerIDs, [NullAllowed] string message, [NullAllowed] GKChallengeComposeHandler completionHandler); @@ -631,7 +631,7 @@ interface GKScore : NSSecureCoding { [NoWatch] [NoTV] [Since (4,2)] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'GKGameCenterViewController' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use GKGameCenterViewController instead")] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -645,7 +645,7 @@ interface GKLeaderboardViewControllerDelegate { } [NoTV][NoWatch] - [Availability (Introduced = Platform.iOS_4_2 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'GKGameCenterViewController' instead.")] + [Availability (Introduced = Platform.iOS_4_2 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use GKGameCenterViewController instead")] #if MONOMAC [BaseType (typeof (GKGameCenterViewController), Events=new Type [] { typeof (GKLeaderboardViewControllerDelegate)}, Delegates=new string [] {"WeakDelegate"})] interface GKLeaderboardViewController @@ -686,7 +686,7 @@ interface GKLocalPlayer { [NoWatch] [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'LoadFriendPlayers' instead and collect the friends from the invoked callback.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use LoadFriendPlayers instead and collect the friends from the invoked callback")] [Export ("friends", ArgumentSemantic.Retain)] string [] Friends { get; } @@ -698,7 +698,7 @@ interface GKLocalPlayer { [NoTV] [NoWatch] - [Availability (Deprecated = Platform.iOS_6_0 | Platform.Mac_10_8, Message = "Set the 'AuthenticationHandler' instead.")] + [Availability (Deprecated = Platform.iOS_6_0 | Platform.Mac_10_8, Message = "Set the AuthenticationHandler instead")] [Export ("authenticateWithCompletionHandler:")] [Async] #if XAMCORE_2_0 @@ -714,7 +714,7 @@ interface GKLocalPlayer { [NoTV] [NoWatch] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'LoadRecentPlayers' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use LoadRecentPlayers(..) instead")] [Export ("loadFriendsWithCompletionHandler:")] [Async] void LoadFriends ([NullAllowed] GKFriendsHandler handler); @@ -748,7 +748,7 @@ interface GKLocalPlayer { [NoTV] [NoWatch] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'LoadDefaultLeaderboardIdentifier' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use LoadDefaultLeaderboardIdentifier(..) instead")] [Since (6,0)] [Export ("loadDefaultLeaderboardCategoryIDWithCompletionHandler:")] [Async] @@ -756,7 +756,7 @@ interface GKLocalPlayer { [NoTV] [NoWatch] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'SetDefaultLeaderboardIdentifier' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use SetDefaultLeaderboardIdentifier(..) instead")] [iOS (6,0), Mac (10,8)] [Export ("setDefaultLeaderboardCategoryID:completionHandler:")] [Async] @@ -853,7 +853,7 @@ interface GKSavedGameListener { [DisableDefaultCtor] interface GKMatch { [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'Players' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use Players instead")] [Export ("playerIDs")] string [] PlayersIDs { get; } @@ -868,7 +868,7 @@ interface GKMatch { nint ExpectedPlayerCount { get; } [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'SendDataToAllPlayers (NSData, GKPlayer[] players, GKMatchSendDataMode mode, NSError error)' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use SendDataToAllPlayers(NSData, GKPlayer[] players, GKMatchSendDataMode mode, NSError error) instead")] [Export ("sendData:toPlayers:withDataMode:error:")] // OOPS: bug we shipped with and can not realistically fix, but good news: this is deprecated (the NSError should have been an out) bool SendData (NSData data, string [] players, GKMatchSendDataMode mode, out NSError error); @@ -883,7 +883,7 @@ interface GKMatch { GKVoiceChat VoiceChatWithName (string name); [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'ChooseBestHostingPlayer' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use ChooseBestHostingPlayer instead")] [iOS (6,0), Mac (10,9)] [Export ("chooseBestHostPlayerWithCompletionHandler:")] [Async] @@ -916,19 +916,19 @@ interface GKMatch { interface GKMatchDelegate { [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'DataReceivedFromPlayer (GKMatch,NSData,GKPlayer)' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use DataReceivedFromPlayer(GKMatch,NSData,GKPlayer) instead")] [Export ("match:didReceiveData:fromPlayer:"), EventArgs ("GKData")] void DataReceived (GKMatch match, NSData data, string playerId); [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'StateChangedForPlayer (GKMatch,GKPlayer,GKPlayerConnectionState)' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use StateChangedForPlayer(GKMatch,GKPlayer,GKPlayerConnectionState) instead")] [Export ("match:player:didChangeState:"), EventArgs ("GKState")] void StateChanged (GKMatch match, string playerId, GKPlayerConnectionState state); #if MONOMAC #if !XAMCORE_4_0 // This API was removed or never existed. Can't cleanly remove due to EventsArgs/Delegate - [Obsolete ("It will never be called.")] + [Obsolete ("No longer an OS X API - it will never be called")] [Export ("xamarin:selector:removed:"), EventArgs ("GKPlayerError")] void ConnectionFailed (GKMatch match, string playerId, NSError error); #endif @@ -938,7 +938,7 @@ interface GKMatchDelegate { // so we fake a selector (that Apple won't check) and let the generator do it's job // note: not worth throwing an exception using a [PreSnippet] since the code already throws a // You_Should_Not_Call_base_In_This_Method (so it would not be generated) - [Obsolete ("It will never be called.")] + [Obsolete ("No longer an iOS API - it will never be called")] [Export ("xamarin:selector:removed:"), EventArgs ("GKPlayerError")] void ConnectionFailed (GKMatch match, string playerId, NSError error); #endif @@ -947,7 +947,7 @@ interface GKMatchDelegate { void Failed (GKMatch match, [NullAllowed] NSError error); [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'ShouldReinviteDisconnectedPlayer' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use ShouldReinviteDisconnectedPlayer instead")] [Since (5,0)] [Export ("match:shouldReinvitePlayer:"), DelegateName ("GKMatchReinvitation"), DefaultValue (true)] bool ShouldReinvitePlayer (GKMatch match, string playerId); @@ -991,7 +991,7 @@ interface GKVoiceChat { [NoTV] // the API was removed in iOS8 - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'SetMuteStatus' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use SetMuteStatus instead")] [Export ("setMute:forPlayer:")] void SetMute (bool isMuted, string playerID); @@ -1000,7 +1000,7 @@ interface GKVoiceChat { bool IsVoIPAllowed (); [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'SetPlayerVoiceChatStateChangeHandler' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use SetPlayerVoiceChatStateChangeHandler instead")] [NullAllowed] // by default this property is null [Export ("playerStateUpdateHandler", ArgumentSemantic.Copy)] GKPlayerStateUpdateHandler PlayerStateUpdateHandler { get; set; } @@ -1012,7 +1012,7 @@ interface GKVoiceChat { [NoTV] [Since (5,0)] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'Players' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use Players instead")] [Export ("playerIDs")] string [] PlayerIDs { get; } @@ -1057,7 +1057,7 @@ interface GKMatchRequest { [NoTV] [NoWatch] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'RecipientResponseHandler' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use RecipientResponseHandler instead")] [Since (6,0)] [NullAllowed] // by default this property is null [Export ("inviteeResponseHandler", ArgumentSemantic.Copy)] @@ -1082,7 +1082,7 @@ interface GKMatchRequest { interface GKInvite { [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'Sender' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use Sender instead")] [Export ("inviter", ArgumentSemantic.Retain)] string Inviter { get; } @@ -1118,7 +1118,7 @@ interface GKMatchmaker { void FindMatch (GKMatchRequest request, [NullAllowed] GKNotificationMatch matchHandler); [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'FindPlayersForHostedRequest' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use FindPlayersForHostedRequest instead")] [Export ("findPlayersForHostedMatchRequest:withCompletionHandler:")] [Async] void FindPlayers (GKMatchRequest request, [NullAllowed] GKFriendsHandler playerHandler); @@ -1150,7 +1150,7 @@ interface GKMatchmaker { [NoTV] [Since (6,0)][Mac (10, 9)] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'CancelPendingInvite' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use CancelPendingInvite instead")] [Export ("cancelInviteToPlayer:")] void CancelInvite (string playerID); @@ -1160,7 +1160,7 @@ interface GKMatchmaker { [NoTV] [Since (6,0)][Mac (10,9)] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, message: "Use 'StartBrowsingForNearbyPlayers(Action handler)' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10)] [Export ("startBrowsingForNearbyPlayersWithReachableHandler:")] void StartBrowsingForNearbyPlayers ([NullAllowed] Action reachableHandler); @@ -1215,7 +1215,7 @@ interface GKMatchmakerViewController { #if !MONOMAC [NoTV] - [Availability (Deprecated = Platform.iOS_5_0, Message = "Use 'SetHostedPlayerConnected' instead.")] + [Availability (Deprecated = Platform.iOS_5_0, Message = "Use SetHostedPlayerConnected instead")] [Export ("setHostedPlayerReady:")] void SetHostedPlayerReady (string playerID); #endif @@ -1231,7 +1231,7 @@ interface GKMatchmakerViewController { [NoTV] [Since (5,0)] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'SetHostedPlayerConnected (GKPlayer,bool)' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use SetHostedPlayerConnected(GKPlayer,bool) instead")] [Export ("setHostedPlayer:connected:")] void SetHostedPlayerConnected (string playerID, bool connected); @@ -1264,7 +1264,7 @@ interface GKMatchmakerViewControllerDelegate { [Abstract] #endif [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'DidFindHostedPlayers' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use DidFindHostedPlayers")] [Export ("matchmakerViewController:didFindPlayers:"), EventArgs ("GKPlayers")] void DidFindPlayers (GKMatchmakerViewController viewController, string [] playerIDs); @@ -1277,7 +1277,7 @@ interface GKMatchmakerViewControllerDelegate { [NoTV] [Since (5,0)] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'HostedPlayerDidAccept' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use HostedPlayerDidAccept")] [Export ("matchmakerViewController:didReceiveAcceptFromHostedPlayer:"), EventArgs ("GKPlayer")] void ReceivedAcceptFromHostedPlayer (GKMatchmakerViewController viewController, string playerID); @@ -1291,7 +1291,7 @@ interface GKMatchmakerViewControllerDelegate { [Watch (3,0)] interface GKAchievement : NSSecureCoding { [NoTV] - [Availability (Deprecated = Platform.iOS_6_0 | Platform.Mac_10_10, Message = "Use 'IsHidden' on the 'GKAchievementDescription' class instead.")] + [Availability (Deprecated = Platform.iOS_6_0 | Platform.Mac_10_10, Message = "Use IsHidden on the GKAchievementDescription class instead")] [Export ("hidden", ArgumentSemantic.Assign)] bool Hidden { [Bind ("isHidden")] get; } @@ -1327,7 +1327,7 @@ interface GKAchievement : NSSecureCoding { #if !MONOMAC [iOS (7,0)] - [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'ctor (string identifier, GKPlayer player)' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Use ctor (string identifier, GKPlayer player) instead")] [Export ("initWithIdentifier:forPlayer:")] IntPtr Constructor ([NullAllowed] string identifier, string playerId); #endif @@ -1337,10 +1337,10 @@ interface GKAchievement : NSSecureCoding { #if XAMCORE_2_0 [NoWatch] [NoTV] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use ReportAchievements '(GKAchievement[] achievements, Action completionHandler)' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use ReportAchievements (GKAchievement[] achievements, Action completionHandler) instead")] void ReportAchievement ([NullAllowed] Action completionHandler); #else - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use ReportAchievements '(GKAchievement[] achievements, GKNotificationHandler completionHandler)' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use ReportAchievements (GKAchievement[] achievements, GKNotificationHandler completionHandler) instead")] void ReportAchievement ([NullAllowed] GKNotificationHandler completionHandler); #endif @@ -1360,7 +1360,7 @@ interface GKAchievement : NSSecureCoding { [NoTV] [NoWatch] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Pass 'GKPlayers' to 'ChallengeComposeController(GKPlayer[] players, string message, ...)' and present the view controller instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Pass GKPlayers to ChallengeComposeController(GKPlayer[] players, string message, ...) and present the view controller instead")] [iOS (6,0), Mac (10,8)] [Export ("issueChallengeToPlayers:message:")] void IssueChallengeToPlayers ([NullAllowed] string[] playerIDs, [NullAllowed] string message); @@ -1368,7 +1368,7 @@ interface GKAchievement : NSSecureCoding { [NoTV] [NoWatch] [iOS (6,0), Mac (10,8)] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Pass 'GKPlayers' to 'SelectChallengeablePlayers' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Pass GKPlayers to SelectChallengeablePlayers instead")] [Export ("selectChallengeablePlayerIDs:withCompletionHandler:")] [Async] void SelectChallengeablePlayerIDs ([NullAllowed] string[] playerIDs, [NullAllowed] Action completionHandler); @@ -1376,7 +1376,7 @@ interface GKAchievement : NSSecureCoding { #if !MONOMAC [NoTV] [iOS (7,0)] - [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'Player' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Use Player instead")] [Export ("playerID", ArgumentSemantic.Copy)] string PlayerID { get; @@ -1477,7 +1477,7 @@ interface GKAchievementDescription : NSSecureCoding { NSImage PlaceholderCompletedAchievementImage { get; } #else - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_8, Message = "Use 'LoadImage' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_8, Message = "Use LoadImage instead")] [Export ("image")] UIImage Image { get; } @@ -1503,7 +1503,7 @@ interface GKAchievementDescription : NSSecureCoding { [NoWatch] [NoTV] - [Availability (Introduced = Platform.iOS_4_1 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'GKGameCenterViewController' instead.")] + [Availability (Introduced = Platform.iOS_4_1 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use GKGameCenterViewController instead")] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -1517,7 +1517,7 @@ interface GKAchievementViewControllerDelegate { } [NoTV][NoWatch] - [Availability (Introduced = Platform.iOS_4_1 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'GKGameCenterViewController' instead.")] + [Availability (Introduced = Platform.iOS_4_1 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use GKGameCenterViewController instead")] #if MONOMAC [BaseType (typeof (GKGameCenterViewController), Events=new Type [] { typeof (GKAchievementViewControllerDelegate)}, Delegates=new string [] {"WeakDelegate"})] interface GKAchievementViewController @@ -1579,7 +1579,7 @@ interface GKFriendRequestComposeViewController : UIAppearance [Export ("maxNumberOfRecipients")][Static] nint MaxNumberOfRecipients { get; } - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'AddRecipientPlayers' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use AddRecipientPlayers()")] [Export ("addRecipientsWithEmailAddresses:")] void AddRecipientsFromEmails (string [] emailAddresses); @@ -1635,7 +1635,7 @@ interface GKTurnBasedParticipant { GKPlayer Player { get; } [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'Player' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use Player")] [Export ("playerID", ArgumentSemantic.Copy)] string PlayerID { get; } @@ -1657,12 +1657,12 @@ interface GKTurnBasedParticipant { [BaseType (typeof (NSObject))] [Model] [Protocol] - [Availability (Introduced = Platform.iOS_5_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'GKLocalPlayer.RegisterListener' with an object that implements 'IGKTurnBasedEventListener'.")] + [Availability (Introduced = Platform.iOS_5_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use GKLocalPlayer.RegisterListener with an object that implements IGKTurnBasedEventListener.")] [Watch (3,0)] interface GKTurnBasedEventHandlerDelegate { #if !XAMCORE_2_0 [Export ("handleInviteFromGameCenterDoNotUse:")] - [Obsolete ("Use HandleInviteFromGameCenter(NSString[]).")] + [Obsolete ("Use HandleInviteFromGameCenter(NSString[])")] void HandleInviteFromGameCenter (GKPlayer [] playersToInvite); #endif @@ -1673,7 +1673,7 @@ interface GKTurnBasedEventHandlerDelegate { [Availability (Introduced = Platform.iOS_5_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10)] void HandleInviteFromGameCenter (NSString [] playersToInvite); - [Availability (Introduced = Platform.iOS_5_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use 'HandleTurnEvent' instead.")] + [Availability (Introduced = Platform.iOS_5_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_9, Message = "Use HandleTurnEvent instead")] [Export ("handleTurnEventForMatch:")] void HandleTurnEventForMatch (GKTurnBasedMatch match); @@ -1765,7 +1765,7 @@ interface GKTurnBasedMatch { void LoadMatchData ([NullAllowed] GKTurnBasedMatchData onCompletion); [NoTV] - [Availability (Deprecated = Platform.iOS_6_0 | Platform.Mac_10_9, Message = "Use 'EndTurn' instead.")] + [Availability (Deprecated = Platform.iOS_6_0 | Platform.Mac_10_9, Message = "Use EndTurn instead")] [Export ("endTurnWithNextParticipant:matchData:completionHandler:")] [Async] #if XAMCORE_2_0 @@ -1775,7 +1775,7 @@ interface GKTurnBasedMatch { #endif [NoTV] - [Availability (Deprecated = Platform.iOS_6_0 | Platform.Mac_10_9, Message = "Use 'ParticipantQuitInTurn (GKTurnBasedMatchOutcome, GKTurnBasedParticipant[], double, NSData, Action)' instead.")] + [Availability (Deprecated = Platform.iOS_6_0 | Platform.Mac_10_9, Message = "Use ParticipantQuitInTurn (GKTurnBasedMatchOutcome, GKTurnBasedParticipant[], double, NSData, Action) instead")] [Export ("participantQuitInTurnWithOutcome:nextParticipant:matchData:completionHandler:")] [Async] #if XAMCORE_2_0 @@ -1938,7 +1938,7 @@ interface GKTurnBasedMatchmakerViewControllerDelegate { [Abstract] #endif [NoTV] - [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use 'GKTurnBasedEventListener.ReceivedTurnEvent' instead.")] + [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use GKTurnBasedEventListener.ReceivedTurnEvent instead")] [Export ("turnBasedMatchmakerViewController:didFindMatch:")] void FoundMatch (GKTurnBasedMatchmakerViewController viewController, GKTurnBasedMatch match); @@ -1946,7 +1946,7 @@ interface GKTurnBasedMatchmakerViewControllerDelegate { [Abstract] #endif [NoTV] - [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use 'GKTurnBasedEventListener.WantsToQuitMatch' instead.")] + [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use GKTurnBasedEventListener.WantsToQuitMatch instead")] [Export ("turnBasedMatchmakerViewController:playerQuitForMatch:")] void PlayerQuitForMatch (GKTurnBasedMatchmakerViewController viewController, GKTurnBasedMatch match); } @@ -1956,12 +1956,12 @@ interface GKTurnBasedMatchmakerViewControllerDelegate { [BaseType (typeof (NSObject))] interface GKChallenge : NSSecureCoding { [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'IssuingPlayer' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use IssuingPlayer instead")] [Export ("issuingPlayerID", ArgumentSemantic.Copy)] string IssuingPlayerID { get; } [NoTV] - [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use 'ReceivingPlayer' instead.")] + [Availability (Deprecated = Platform.iOS_8_0 | Platform.Mac_10_10, Message = "Use ReceivingPlayer instead")] [Export ("receivingPlayerID", ArgumentSemantic.Copy)] string ReceivingPlayerID { get; } @@ -2037,13 +2037,13 @@ interface GKGameCenterViewController [NoTV] [Export ("leaderboardTimeScope", ArgumentSemantic.Assign)] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "This class no longer support 'LeaderboardTimeScope', will always default to 'AllTime'.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "This class no longer support Leaderboard Time Scopes, will always default to AllTime")] GKLeaderboardTimeScope LeaderboardTimeScope { get; set; } [NoTV] [NullAllowed] // by default this property is null [Export ("leaderboardCategory", ArgumentSemantic.Retain)] - [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use 'LeaderboardIdentifier' instead.")] + [Availability (Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Use LeaderboardIdentifier instead")] string LeaderboardCategory { get; set; } [NoTV] @@ -2070,7 +2070,7 @@ interface GKGameCenterControllerDelegate #if !MONOMAC [NoWatch] [NoTV] - [Availability (Introduced = Platform.iOS_6_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Implement the 'IGKChallengeListener' interface and register a listener with 'GKLocalPlayer'.")] + [Availability (Introduced = Platform.iOS_6_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Implement the IGKChallengeListener interface and register a listener with GKLocalPlayer")] [BaseType (typeof (NSObject), Events=new[] { typeof (GKChallengeEventHandlerDelegate) }, Delegates=new[] { "WeakDelegate"})] [DisableDefaultCtor] [NoTV] @@ -2089,7 +2089,7 @@ interface GKChallengeEventHandler [NoWatch] [NoTV] - [Availability (Introduced = Platform.iOS_6_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Implement the 'IGKChallengeListener' interface and register a listener with 'GKLocalPlayer'.")] + [Availability (Introduced = Platform.iOS_6_0 | Platform.Mac_10_8, Deprecated = Platform.iOS_7_0 | Platform.Mac_10_10, Message = "Implement the IGKChallengeListener interface and register a listener with GKLocalPlayer")] [Model] [BaseType (typeof (NSObject))] [Protocol] @@ -2233,7 +2233,7 @@ interface GKInviteEventListener #if !MONOMAC [NoTV] - [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'DidRequestMatch (GKPlayer player, GKPlayer[] recipientPlayers)' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Use DidRequestMatch(GKPlayer player, GKPlayer[] recipientPlayers) instead")] [Export ("player:didRequestMatchWithPlayers:")] void DidRequestMatch (GKPlayer player, string[] playerIDs); #endif @@ -2249,7 +2249,7 @@ interface GKTurnBasedEventListener { [NoWatch] [NoTV] - [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'DidRequestMatchWithOtherPlayers' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Use DidRequestMatchWithOtherPlayers instead")] [Export ("player:didRequestMatchWithPlayers:")] void DidRequestMatchWithPlayers (GKPlayer player, string[] playerIDsToInvite); diff --git a/src/gameplaykit.cs b/src/gameplaykit.cs index 10e5af0bc1b..3b4305f3dca 100644 --- a/src/gameplaykit.cs +++ b/src/gameplaykit.cs @@ -18,7 +18,6 @@ using Vector3 = global::OpenTK.Vector3; using Vector3d = global::OpenTK.Vector3d; using Matrix3 = global::OpenTK.Matrix3; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; #if MONOMAC using SKColor = XamCore.AppKit.NSColor; @@ -133,8 +132,6 @@ Vector3 Velocity { [Export ("rightHanded")] bool RightHanded { get; set; } -#if !XAMCORE_4_0 - [Obsolete ("Use 'Rotation3x3' instead.")] [Export ("rotation", ArgumentSemantic.Assign)] Matrix3 Rotation { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] @@ -142,20 +139,6 @@ Matrix3 Rotation { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; } -#endif - - [Export ("rotation", ArgumentSemantic.Assign)] -#if XAMCORE_4_0 - MatrixFloat3x3 Rotation { -#else - [Sealed] - MatrixFloat3x3 Rotation3x3 { -#endif - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } [Export ("updateWithDeltaTime:")] void Update (double deltaTimeInSeconds); @@ -998,9 +981,9 @@ interface GKPath { [Wrap ("this (nodes: graphNodes, radius: radius)")] // Avoid breaking change IntPtr Constructor (GKGraphNode2D [] graphNodes, float radius); - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'GetVector2Point' instead.")] - [Deprecated (PlatformName.TvOS, 10, 0, message: "Use 'GetVector2Point' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use 'GetVector2Point' instead.")] + [Deprecated (PlatformName.iOS, 10, 0, message: "Use GetVector2Point instead")] + [Deprecated (PlatformName.TvOS, 10, 0, message: "Use GetVector2Point instead")] + [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use GetVector2Point instead")] [Export ("pointAtIndex:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] Vector2 GetPoint (nuint index); diff --git a/src/generator-enums.cs b/src/generator-enums.cs index 8eba548a1cb..940952ebb21 100644 --- a/src/generator-enums.cs +++ b/src/generator-enums.cs @@ -11,7 +11,6 @@ #endif using XamCore.Foundation; using XamCore.ObjCRuntime; -using System.IO; public partial class Generator { @@ -109,10 +108,13 @@ void GenerateEnum (Type type) print ("static public partial class {0}Extensions {{", type.Name); indent++; - var field = fields.FirstOrDefault (); - var fieldAttr = field.Value; + // note: not every binding namespace will start with ns.Prefix (e.g. MonoTouch.) + if (!String.IsNullOrEmpty (ns.Prefix) && library_name.StartsWith (ns.Prefix, StringComparison.Ordinal)) + library_name = library_name.Substring (ns.Prefix.Length + 1); - ComputeLibraryName (fieldAttr, type, field.Key?.Name, out library_name, out string library_path); + // there might not be any other fields in the framework + if (!libraries.ContainsKey (library_name)) + libraries.Add (library_name, null); } if (error != null) { @@ -142,21 +144,15 @@ void GenerateEnum (Type type) var fa = kvp.Value; // the attributes (availability and field) are important for our tests PrintPlatformAttributes (f); - libraries.TryGetValue (library_name, out var libPath); - var libname = fa.LibraryName?.Replace ("+", string.Empty); - // We need to check for special cases inside FieldAttributes - // fa.LibraryName could contain a different framework i.e UITrackingRunLoopMode (UIKit) inside NSRunLoopMode enum (Foundation). - // libPath could have a custom path i.e. CoreImage which in macOS is inside Quartz - // library_name contains the Framework constant name the Field is inside of, used as fallback. - bool useFieldAttrLibName = libname != null && !string.Equals (libname, library_name, StringComparison.OrdinalIgnoreCase); - print ("[Field (\"{0}\", \"{1}\")]", fa.SymbolName, useFieldAttrLibName ? libname : libPath ?? library_name); + var libname = fa.LibraryName ?? library_name; + print ("[Field (\"{0}\", \"{1}\")]", fa.SymbolName, libname); print ("internal unsafe static IntPtr {0} {{", fa.SymbolName); indent++; print ("get {"); indent++; print ("fixed (IntPtr *storage = &values [{0}])", n++); indent++; - print ("return Dlfcn.CachePointer (Libraries.{0}.Handle, \"{1}\", storage);", useFieldAttrLibName ? libname : library_name, fa.SymbolName); + print ("return Dlfcn.CachePointer (Libraries.{0}.Handle, \"{1}\", storage);", libname, fa.SymbolName); indent--; indent--; print ("}"); diff --git a/src/generator-typemanager.cs b/src/generator-typemanager.cs index e259e65cf70..5b89d0619e5 100644 --- a/src/generator-typemanager.cs +++ b/src/generator-typemanager.cs @@ -62,8 +62,6 @@ public static class TypeManager { public static Type CGColor; public static Type CGColorSpace; public static Type CGContext; - public static Type CGPDFDocument; - public static Type CGPDFPage; public static Type CGGradient; public static Type CGImage; public static Type CGLayer; @@ -102,7 +100,6 @@ public static class TypeManager { public static Type SecTrust; public static Type UIEdgeInsets; public static Type UIOffset; - public static Type NSDirectionalEdgeInsets; public static Type CoreGraphics_CGPoint; public static Type CoreGraphics_CGRect; @@ -253,9 +250,8 @@ public static void Initialize (Assembly api, Assembly corlib, Assembly platform, ABPerson = Lookup (platform_assembly, "AddressBook", "ABPerson"); ABRecord = Lookup (platform_assembly, "AddressBook", "ABRecord"); } - // misplaced API, it's really in CoreAudio (now available everywhere) - AudioBuffers = Lookup (platform_assembly, "AudioToolbox", "AudioBuffers"); if (Frameworks.HaveAudioToolbox) { + AudioBuffers = Lookup (platform_assembly, "AudioToolbox", "AudioBuffers"); MusicSequence = Lookup (platform_assembly, "AudioToolbox", "MusicSequence", true /* may not be found */); } if (Frameworks.HaveAudioUnit) { @@ -272,8 +268,6 @@ public static void Initialize (Assembly api, Assembly corlib, Assembly platform, CGColor = Lookup (platform_assembly, "CoreGraphics", "CGColor"); CGColorSpace = Lookup (platform_assembly, "CoreGraphics", "CGColorSpace"); CGContext = Lookup (platform_assembly, "CoreGraphics", "CGContext"); - CGPDFDocument = Lookup (platform_assembly, "CoreGraphics", "CGPDFDocument"); - CGPDFPage = Lookup (platform_assembly, "CoreGraphics", "CGPDFPage"); CGGradient = Lookup (platform_assembly, "CoreGraphics", "CGGradient"); CGImage = Lookup (platform_assembly, "CoreGraphics", "CGImage"); CGLayer = Lookup (platform_assembly, "CoreGraphics", "CGLayer"); @@ -322,7 +316,6 @@ public static void Initialize (Assembly api, Assembly corlib, Assembly platform, if (Frameworks.HaveUIKit) { UIOffset = Lookup (platform_assembly, "UIKit", "UIOffset"); UIEdgeInsets = Lookup (platform_assembly, "UIKit", "UIEdgeInsets"); - NSDirectionalEdgeInsets = Lookup (platform_assembly, "UIKit", "NSDirectionalEdgeInsets"); } if (Generator.UnifiedAPI) { diff --git a/src/generator.cs b/src/generator.cs index a1c982d9e13..2e595078c5d 100644 --- a/src/generator.cs +++ b/src/generator.cs @@ -677,8 +677,6 @@ public NamespaceManager (string prefix, string customObjCRuntimeNS, bool skipSys if (Frameworks.HaveAudioUnit) ImplicitNamespaces.Add (Get ("AudioUnit")); - if (Frameworks.HaveContacts && Generator.UnifiedAPI) - ImplicitNamespaces.Add (Get ("Contacts")); if (Frameworks.HaveCoreAnimation) ImplicitNamespaces.Add (Get ("CoreAnimation")); if (Frameworks.HaveCoreLocation) @@ -689,7 +687,7 @@ public NamespaceManager (string prefix, string customObjCRuntimeNS, bool skipSys ImplicitNamespaces.Add (Get ("CoreMedia")); if (Frameworks.HaveSecurity && Generator.CurrentPlatform != PlatformName.WatchOS) ImplicitNamespaces.Add (Get ("Security")); - if (Frameworks.HaveAVFoundation) + if (Frameworks.HaveAVFoundation && Generator.CurrentPlatform != PlatformName.WatchOS) ImplicitNamespaces.Add (Get ("AVFoundation")); if (Frameworks.HaveOpenGL) ImplicitNamespaces.Add (Get ("OpenGL")); @@ -731,8 +729,6 @@ public NamespaceManager (string prefix, string customObjCRuntimeNS, bool skipSys ImplicitNamespaces.Add (Get ("GameplayKit")); if (Frameworks.HaveSpriteKit) ImplicitNamespaces.Add (Get ("SpriteKit")); - if (Frameworks.HaveFileProvider && Generator.UnifiedAPI) - ImplicitNamespaces.Add (Get ("FileProvider")); // These are both types and namespaces NamespacesThatConflictWithTypes = new HashSet { @@ -785,7 +781,7 @@ static bool GetValue (string framework) frameworks = macosframeworks; break; default: - throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://bugzilla.xamarin.com) with a test case.", Generator.CurrentPlatform); + throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (http://bugzilla.xamarin.com) with a test case.", Generator.CurrentPlatform); } } @@ -956,19 +952,6 @@ static string CoreServicesMap { } } - static string PDFKitMap { - get { - switch (CurrentPlatform) { - case PlatformName.iOS: - return "PDFKit"; - case PlatformName.MacOSX: - return "Quartz"; - default: - throw new BindingException (1047, "Unsupported platform: {0}. Please file a bug report (https://bugzilla.xamarin.com) with a test case.", CurrentPlatform); - } - } - } - // // We inject thread checks to MonoTouch.UIKit types, unless there is a [ThreadSafe] attribuet on the type. // Set on every call to Generate @@ -1362,7 +1345,6 @@ static Dictionary NSValueReturnMap { if (Frameworks.HaveUIKit) { nsvalue_return_map [TypeManager.UIEdgeInsets] = ".UIEdgeInsetsValue"; nsvalue_return_map [TypeManager.UIOffset] = ".UIOffsetValue"; - nsvalue_return_map [TypeManager.NSDirectionalEdgeInsets] = ".DirectionalEdgeInsetsValue"; } if (TypeManager.MKCoordinateSpan != null) @@ -1762,7 +1744,7 @@ public string MarshalParameter (MethodInfo mi, ParameterInfo pi, bool null_allow } // This means you need to add a new MarshalType in the method "Go" - throw new BindingException (1002, true, "Unknown kind {0} in method '{1}.{2}'", pi.ParameterType.FullName, mi.DeclaringType.FullName, mi.Name.GetSafeParamName ()); + throw new BindingException (1002, true, "Unknown kind {0} in method '{1}.{2}'", pi, mi.DeclaringType.FullName, mi.Name.GetSafeParamName ()); } public bool ParameterNeedsNullCheck (ParameterInfo pi, MethodInfo mi, PropertyInfo propInfo = null) @@ -2096,8 +2078,6 @@ public void Go () marshal_types.Add (TypeManager.CGPath); marshal_types.Add (TypeManager.CGGradient); marshal_types.Add (TypeManager.CGContext); - marshal_types.Add (TypeManager.CGPDFDocument); - marshal_types.Add (TypeManager.CGPDFPage); marshal_types.Add (TypeManager.CGImage); marshal_types.Add (TypeManager.Class); marshal_types.Add (TypeManager.CFRunLoop); @@ -2147,8 +2127,8 @@ public void Go () marshal_types.Add (TypeManager.SecIdentity); marshal_types.Add (TypeManager.SecTrust); marshal_types.Add (TypeManager.SecAccessControl); - marshal_types.Add (TypeManager.AudioBuffers); if (Frameworks.HaveAudioUnit) { + marshal_types.Add (TypeManager.AudioBuffers); marshal_types.Add (TypeManager.AURenderEventEnumerator); } @@ -3141,12 +3121,7 @@ public string FormatType (Type usedIn, Type type) return FormatTypeUsedIn (usedIn == null ? null : usedIn.Namespace, type); } - public string FormatType (Type usedIn, Type type, bool protocolized) - { - return FormatTypeUsedIn (usedIn?.Namespace, type, protocolized); - } - - public string FormatTypeUsedIn (string usedInNamespace, Type type, bool protocolized = false) + public string FormatTypeUsedIn (string usedInNamespace, Type type) { type = GetCorrectGenericType (type); @@ -3190,12 +3165,11 @@ public string FormatTypeUsedIn (string usedInNamespace, Type type, bool protocol if (type.IsArray) return FormatTypeUsedIn (usedInNamespace, type.GetElementType ()) + "[" + new string (',', type.GetArrayRank () - 1) + "]"; - var interfaceTag = protocolized == true ? "I" : ""; string tname; if ((usedInNamespace != null && type.Namespace == usedInNamespace) || ns.StandardNamespaces.Contains (type.Namespace) || string.IsNullOrEmpty (type.FullName)) - tname = interfaceTag + type.Name; + tname = type.Name; else - tname = $"global::{type.Namespace}.{interfaceTag}{type.Name}"; + tname = "global::" + type.FullName; var targs = type.GetGenericArguments (); if (targs.Length > 0) { @@ -3366,19 +3340,18 @@ public void MakeSignatureFromParameterInfo (bool comma, StringBuilder sb, Member if (pari == parCount - 1 && parType.IsArray && (AttributeManager.HasAttribute (pi) || AttributeManager.HasAttribute (pi))) { sb.Append ("params "); } - var protocolized = false; if (!BindThirdPartyLibrary && Protocolize (pi)) { if (!AttributeManager.HasAttribute (parType)) { Console.WriteLine ("Protocolized attribute for type that does not have a [Protocol] for {0}'s parameter {1}", mi, pi); } - protocolized = true; + sb.Append ("I"); } var bindAsAtt = GetBindAsAttribute (pi); if (bindAsAtt != null) - sb.Append (FormatType (bindAsAtt.Type.DeclaringType, bindAsAtt.Type, protocolized)); + sb.Append (FormatType (bindAsAtt.Type.DeclaringType, bindAsAtt.Type)); else - sb.Append (FormatType (declaringType, parType, protocolized)); + sb.Append (FormatType (declaringType, parType)); sb.Append (" "); sb.Append (pi.Name.GetSafeParamName ()); @@ -3902,8 +3875,6 @@ void GenerateTypeLowering (MethodInfo mi, bool null_allowed_override, EnumMode e by_ref_processing.AppendLine(); if (mai.Type.GetElementType () == TypeManager.System_String){ by_ref_processing.AppendFormat("{0} = {0}Value != IntPtr.Zero ? NSString.FromHandle ({0}Value) : null;", pi.Name.GetSafeParamName ()); - } else if (pi.ParameterType.GetElementType ().IsArray) { - by_ref_processing.AppendFormat ("{0} = {0}Value != IntPtr.Zero ? NSArray.ArrayFromHandle<{1}> ({0}Value) : null;", pi.Name.GetSafeParamName (), RenderType (mai.Type.GetElementType ().GetElementType ())); } else if (isForced) { by_ref_processing.AppendFormat("{0} = {0}Value != IntPtr.Zero ? Runtime.GetINativeObject<{1}> ({0}Value, {2}) : null;", pi.Name.GetSafeParamName (), RenderType (mai.Type.GetElementType ()), isForcedOwns); } else { @@ -5545,52 +5516,6 @@ public void PrintAttributes (MemberInfo mi, bool platform = false, bool preserve PrintNotImplementedAttribute (mi); } - public void ComputeLibraryName (FieldAttribute fieldAttr, Type type, string propertyName, out string library_name, out string library_path) - { - library_path = null; - - if (fieldAttr != null && fieldAttr.LibraryName != null) { - // Remapped - library_name = fieldAttr.LibraryName; - if (library_name [0] == '+') { - switch (library_name) { - case "+CoreImage": - library_name = CoreImageMap; - break; - case "+CoreServices": - library_name = CoreServicesMap; - break; - case "+PDFKit": - library_name = "PdfKit"; - library_path = PDFKitMap; - break; - } - } else { - // we get something in LibraryName from FieldAttribute so we asume - // it is a path to a library, so we save the path and change library name - // to a valid identifier if needed - library_path = library_name; - library_name = Path.GetFileName (library_name); - if (library_name.Contains (".")) - library_name = library_name.Replace (".", string.Empty); - } - } else if (BindThirdPartyLibrary) { - // User should provide a LibraryName - throw new BindingException (1042, true, $"Missing '[Field (LibraryName=value)]' for {propertyName} (e.g.\"__Internal\")"); - } else { - library_name = type.Namespace; - - // note: not every binding namespace will start with ns.Prefix (e.g. MonoTouch.) - if (!String.IsNullOrEmpty (ns.Prefix) && library_name.StartsWith (ns.Prefix, StringComparison.Ordinal)) { - library_name = library_name.Substring (ns.Prefix.Length + 1); - library_name = library_name.Replace (".", string.Empty); // Remove dots from namespaces - } - } - - if (!libraries.ContainsKey (library_name)) - libraries.Add (library_name, library_path); - } - public static string GetSelector (MemberInfo mi) { object [] attr = AttributeManager.GetCustomAttributes (mi); @@ -6049,20 +5974,49 @@ public void Generate (Type type) if (field_exports.Count != 0){ foreach (var field_pi in field_exports.OrderBy (f => f.Name, StringComparer.Ordinal)) { var fieldAttr = AttributeManager.GetCustomAttribute (field_pi); - ComputeLibraryName (fieldAttr, type, field_pi.Name, out string library_name, out string library_path); - - bool is_unified_internal = field_pi.IsUnifiedInternal (); + string library_name; + string library_path = null; + + if (fieldAttr.LibraryName != null){ + // Remapped + library_name = fieldAttr.LibraryName; + if (library_name [0] == '+'){ + switch (library_name){ + case "+CoreImage": + library_name = CoreImageMap; + break; + case "+CoreServices": + library_name = CoreServicesMap; + break; + } + } else { + // we get something in LibraryName from FieldAttribute so we asume + // it is a path to a library, so we save the path and change library name + // to a valid identifier if needed + library_path = library_name; + library_name = Path.GetFileName (library_name); + if (library_name.Contains (".")) + library_name = library_name.Replace (".", string.Empty); + } + } else if (BindThirdPartyLibrary) { + // User should provide a LibraryName + throw new BindingException (1042, true, $"Missing '[Field (LibraryName=value)]' for {field_pi.Name} (e.g.\"__Internal\")"); + } else { + library_name = type.Namespace; + // note: not every binding namespace will start with ns.Prefix (e.g. MonoTouch.) + if (!String.IsNullOrEmpty (ns.Prefix) && library_name.StartsWith (ns.Prefix, StringComparison.Ordinal)) { + library_name = library_name.Substring (ns.Prefix.Length + 1); + library_name = library_name.Replace (".", string.Empty); // Remove dots from namespaces + } + } - string fieldTypeName; - string smartEnumTypeName = null; - if (IsSmartEnum (field_pi.PropertyType)) { - fieldTypeName = FormatType (TypeManager.NSString.DeclaringType, TypeManager.NSString); - smartEnumTypeName = FormatType (field_pi.DeclaringType, field_pi.PropertyType); - } else - fieldTypeName = FormatType (field_pi.DeclaringType, field_pi.PropertyType); + if (!libraries.ContainsKey (library_name)) + libraries.Add (library_name, library_path); + bool is_unified_internal = field_pi.IsUnifiedInternal (); + string fieldTypeName = FormatType (field_pi.DeclaringType, field_pi.PropertyType); // Value types we dont cache for now, to avoid Nullable - if (!field_pi.PropertyType.IsValueType || smartEnumTypeName != null) { + if (!field_pi.PropertyType.IsValueType) { print ("[CompilerGenerated]"); PrintPreserveAttribute (field_pi); print ("static {0} _{1};", fieldTypeName, field_pi.Name); @@ -6077,11 +6031,10 @@ public void Generate (Type type) // Check if this is a notification and print Advice to use our Notification API if (AttributeManager.HasAttribute (field_pi)) print ($"[Advice (\"Use {type.Name}.Notifications.Observe{GetNotificationName (field_pi)} helper method instead.\")]"); - - print ("{0} static {1} {2}{3} {{", field_pi.IsInternal () ? "internal" : "public", - smartEnumTypeName ?? fieldTypeName, - field_pi.Name, - is_unified_internal ? "_" : ""); + + print ("{0} static {1} {2}{3} {{", field_pi.IsInternal () ? "internal" : "public", fieldTypeName, + field_pi.Name, + is_unified_internal ? "_" : ""); indent++; PrintAttributes (field_pi, platform:true); @@ -6102,8 +6055,6 @@ public void Generate (Type type) print ("return _{0};", field_pi.Name); } else if (field_pi.PropertyType == TypeManager.System_Int32){ print ("return Dlfcn.GetInt32 (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); - } else if (field_pi.PropertyType == TypeManager.System_UInt32) { - print ("return Dlfcn.GetUInt32 (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (field_pi.PropertyType == TypeManager.System_Double){ print ("return Dlfcn.GetDouble (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (field_pi.PropertyType == TypeManager.System_Float){ @@ -6114,8 +6065,6 @@ public void Generate (Type type) print ("return Dlfcn.GetSizeF (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (field_pi.PropertyType == TypeManager.System_Int64){ print ("return Dlfcn.GetInt64 (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); - } else if (field_pi.PropertyType == TypeManager.System_UInt64) { - print ("return Dlfcn.GetUInt64 (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); } else // // Handle various blittable value types here @@ -6132,33 +6081,6 @@ public void Generate (Type type) print ("return Dlfcn.GetNFloat (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (UnifiedAPI && field_pi.PropertyType == TypeManager.CoreGraphics_CGSize){ print ("return Dlfcn.GetCGSize (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); - } else if (field_pi.PropertyType.IsEnum) { - var btype = field_pi.PropertyType.GetEnumUnderlyingType (); - if (smartEnumTypeName != null) { - print ("if (_{0} == null)", field_pi.Name); - indent++; - print ("_{0} = Dlfcn.GetStringConstant (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); - indent--; - print ($"return {smartEnumTypeName}Extensions.GetValue (_{field_pi.Name});"); - } else if (UnifiedAPI && IsNativeEnum (field_pi.PropertyType)) { - if (btype == TypeManager.System_nint || btype == TypeManager.System_Int64) - print ($"return ({fieldTypeName}) (long) Dlfcn.GetNInt (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\");" ); - else if (btype == TypeManager.System_nuint || btype == TypeManager.System_UInt64) - print ($"return ({fieldTypeName}) (ulong) Dlfcn.GetNUInt (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\");"); - else - throw new BindingException (1014, true, "Unsupported type for Fields: {0}", fieldTypeName); - } else { - if (btype == TypeManager.System_Int32) - print ($"return ({fieldTypeName}) Dlfcn.GetInt32 (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\");"); - else if (btype == TypeManager.System_UInt32) - print ($"return ({fieldTypeName}) Dlfcn.GetUInt32 (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\");"); - else if (btype == TypeManager.System_Int64) - print ($"return ({fieldTypeName}) Dlfcn.GetInt64 (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\");"); - else if (btype == TypeManager.System_UInt64) - print ($"return ({fieldTypeName}) Dlfcn.GetUInt64 (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\");"); - else - throw new BindingException (1014, true, "Unsupported type for Fields: {0}", fieldTypeName); - } } else { if (field_pi.PropertyType == TypeManager.System_String) throw new BindingException (1013, true, "Unsupported type for Fields (string), you probably meant NSString"); @@ -6176,8 +6098,6 @@ public void Generate (Type type) indent++; if (field_pi.PropertyType == TypeManager.System_Int32) { print ("Dlfcn.SetInt32 (Libraries.{2}.Handle, \"{1}\", value);", field_pi.Name, fieldAttr.SymbolName, library_name); - } else if (field_pi.PropertyType == TypeManager.System_UInt32) { - print ("Dlfcn.SetUInt32 (Libraries.{2}.Handle, \"{1}\", value);", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (field_pi.PropertyType == TypeManager.System_Double) { print ("Dlfcn.SetDouble (Libraries.{2}.Handle, \"{1}\", value);", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (field_pi.PropertyType == TypeManager.System_Float) { @@ -6188,8 +6108,6 @@ public void Generate (Type type) print ("Dlfcn.SetSizeF (Libraries.{2}.Handle, \"{1}\", value);", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (field_pi.PropertyType == TypeManager.System_Int64) { print ("Dlfcn.SetInt64 (Libraries.{2}.Handle, \"{1}\", value);", field_pi.Name, fieldAttr.SymbolName, library_name); - } else if (field_pi.PropertyType == TypeManager.System_UInt64) { - print ("Dlfcn.SetUInt64 (Libraries.{2}.Handle, \"{1}\", value);", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (field_pi.PropertyType == TypeManager.NSString){ print ("Dlfcn.SetString (Libraries.{2}.Handle, \"{1}\", value);", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (field_pi.PropertyType.Name == "NSArray"){ @@ -6202,29 +6120,6 @@ public void Generate (Type type) print ("Dlfcn.SetNFloat (Libraries.{2}.Handle, \"{1}\", value);", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (UnifiedAPI && field_pi.PropertyType == TypeManager.CoreGraphics_CGSize) { print ("Dlfcn.SetCGSize (Libraries.{2}.Handle, \"{1}\", value);", field_pi.Name, fieldAttr.SymbolName, library_name); - } else if (field_pi.PropertyType.IsEnum) { - var btype = field_pi.PropertyType.GetEnumUnderlyingType (); - if (smartEnumTypeName != null) - print ($"Dlfcn.SetString (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\", value.GetConstant ());"); - else if (UnifiedAPI && IsNativeEnum (field_pi.PropertyType)) { - if (btype == TypeManager.System_nint || (BindThirdPartyLibrary && btype == TypeManager.System_Int64)) - print ($"Dlfcn.SetNInt (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\", (nint) (long) value);"); - else if (btype == TypeManager.System_nuint || (BindThirdPartyLibrary && btype == TypeManager.System_UInt64)) - print ($"Dlfcn.SetNUInt (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\", (nuint) (ulong) value);"); - else - throw new BindingException (1021, true, "Unsupported type for read/write Fields: {0} for {1}.{2}", fieldTypeName, field_pi.DeclaringType.FullName, field_pi.Name); - } else { - if (btype == TypeManager.System_Int32) - print ($"Dlfcn.SetInt32 (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\", (int) value);"); - else if (btype == TypeManager.System_UInt32) - print ($"Dlfcn.SetUInt32 (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\", (uint) value);"); - else if (btype == TypeManager.System_Int64) - print ($"Dlfcn.SetInt64 (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\", (long) value);"); - else if (btype == TypeManager.System_UInt64) - print ($"Dlfcn.SetUInt64 (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\", (ulong) value);"); - else - throw new BindingException (1021, true, "Unsupported type for read/write Fields: {0} for {1}.{2}", fieldTypeName, field_pi.DeclaringType.FullName, field_pi.Name); - } } else throw new BindingException (1021, true, "Unsupported type for read/write Fields: {0} for {1}.{2}", fieldTypeName, field_pi.DeclaringType.FullName, field_pi.Name); indent--; diff --git a/src/healthkit.cs b/src/healthkit.cs index 93b3db473ee..5fe23d71e20 100644 --- a/src/healthkit.cs +++ b/src/healthkit.cs @@ -393,8 +393,8 @@ interface HKHealthStore { void StopQuery (HKQuery query); // FIXME NS_EXTENSION_UNAVAILABLE("Not available to extensions") ; - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'GetDateOfBirthComponents' instead.")] - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'GetDateOfBirthComponents' instead.")] + [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use GetDateOfBirthComponents instead")] + [Deprecated (PlatformName.iOS, 10, 0, message: "Use GetDateOfBirthComponents instead")] [Export ("dateOfBirthWithError:")] NSDate GetDateOfBirth (out NSError error); @@ -727,7 +727,7 @@ interface HKObjectType : NSSecureCoding, NSCopying { #if XAMCORE_4_0 || WATCH [Internal] #else - [Obsolete ("Use 'HKQuantityType.Create (HKQuantityTypeIdentifier)'.")] + [Obsolete ("Use HKQuantityType.Create (HKQuantityTypeIdentifier)")] #endif [Static] [Export ("quantityTypeForIdentifier:")] @@ -737,7 +737,7 @@ interface HKObjectType : NSSecureCoding, NSCopying { #if XAMCORE_4_0 || WATCH [Internal] #else - [Obsolete ("Use 'HKCategoryType.Create (HKCategoryTypeIdentifier)'.")] + [Obsolete ("Use HKCategoryType.Create (HKCategoryTypeIdentifier)")] #endif [Static] [Export ("categoryTypeForIdentifier:")] @@ -747,7 +747,7 @@ interface HKObjectType : NSSecureCoding, NSCopying { #if XAMCORE_4_0 || WATCH [Internal] #else - [Obsolete ("Use 'HKCharacteristicType.Create (HKCharacteristicTypeIdentifier)'.")] + [Obsolete ("Use HKCharacteristicType.Create (HKCharacteristicTypeIdentifier)")] #endif [Static] [Export ("characteristicTypeForIdentifier:")] @@ -757,7 +757,7 @@ interface HKObjectType : NSSecureCoding, NSCopying { #if XAMCORE_4_0 || WATCH [Internal] #else - [Obsolete ("Use 'HKCorrelationType.Create (HKCorrelationTypeIdentifier)'.")] + [Obsolete ("Use HKCorrelationType.Create (HKCorrelationTypeIdentifier)")] #endif [Static, Export ("correlationTypeForIdentifier:")] [return: NullAllowed] @@ -909,8 +909,8 @@ interface HKQuery { [NullAllowed, Export ("objectType", ArgumentSemantic.Strong)] HKObjectType ObjectType { get; } - [Deprecated (PlatformName.WatchOS, 2,2, message: "Use 'ObjectType' property.")] - [Deprecated (PlatformName.iOS, 9,3, message: "Use 'ObjectType' property.")] + [Deprecated (PlatformName.WatchOS, 2,2, message: "Use ObjectType property")] + [Deprecated (PlatformName.iOS, 9,3, message: "Use ObjectType property")] [Watch (2,0)] [NullAllowed, Export ("sampleType", ArgumentSemantic.Strong)] HKSampleType SampleType { get; } diff --git a/src/homekit.cs b/src/homekit.cs index 6a3d922f392..2e4c8c508fa 100644 --- a/src/homekit.cs +++ b/src/homekit.cs @@ -125,25 +125,9 @@ partial interface HMAccessory { [Export ("services", ArgumentSemantic.Copy)] HMService [] Services { get; } - [Watch (4,0), TV (11,0), iOS (11,0)] - [Export ("profiles", ArgumentSemantic.Copy)] - HMAccessoryProfile[] Profiles { get; } - [Export ("blocked")] bool Blocked { [Bind ("isBlocked")] get; } - [Watch (4, 0), TV (11, 0), iOS (11, 0)] - [NullAllowed, Export ("model")] - string Model { get; } - - [Watch (4, 0), TV (11, 0), iOS (11, 0)] - [NullAllowed, Export ("manufacturer")] - string Manufacturer { get; } - - [Watch (4, 0), TV (11, 0), iOS (11, 0)] - [NullAllowed, Export ("firmwareVersion")] - string FirmwareVersion { get; } - [NoTV] [NoWatch] [Async] @@ -183,23 +167,11 @@ partial interface HMAccessoryDelegate { [Export ("accessoryDidUpdateServices:")] void DidUpdateServices (HMAccessory accessory); - [Watch (4,0), TV (11,0), iOS (11,0)] - [Export ("accessory:didAddProfile:"), EventArgs ("HMAccessoryProfile")] - void DidAddProfile (HMAccessory accessory, HMAccessoryProfile profile); - - [Watch (4,0), TV (11,0), iOS (11,0)] - [Export ("accessory:didRemoveProfile:"), EventArgs ("HMAccessoryProfile")] - void DidRemoveProfile (HMAccessory accessory, HMAccessoryProfile profile); - [Export ("accessoryDidUpdateReachability:")] void DidUpdateReachability (HMAccessory accessory); [Export ("accessory:service:didUpdateValueForCharacteristic:"), EventArgs ("HMAccessoryServiceUpdateCharacteristic")] void DidUpdateValueForCharacteristic (HMAccessory accessory, HMService service, HMCharacteristic characteristic); - - [Watch (4,0), TV (11,0), iOS (11,0)] - [Export ("accessory:didUpdateFirmwareVersion:"), EventArgs ("HMAccessoryFirmwareVersion")] - void DidUpdateFirmwareVersion (HMAccessory accessory, string firmwareVersion); } #if !WATCH @@ -309,7 +281,6 @@ partial interface HMActionSet { NSUuid UniqueIdentifier { get; } [Watch (3,0), iOS (10,0)] - [NullAllowed] [Export ("lastExecutionDate", ArgumentSemantic.Copy)] NSDate LastExecutionDate { get; } } @@ -546,10 +517,6 @@ partial interface HMHome { [Export ("primary")] bool Primary { [Bind ("isPrimary")] get; } - [Watch (4,0), TV (11,0), iOS (11,0)] - [Export ("homeHubState")] - HMHomeHubState HomeHubState { get; } - [NoTV] [NoWatch] [Async] @@ -747,10 +714,6 @@ partial interface HMHomeDelegate { [Export ("homeDidUpdateName:")] void DidUpdateNameForHome (HMHome home); - [Watch (4,0), TV (11,0), iOS (11,0)] - [Export ("homeDidUpdateAccessControlForCurrentUser:")] - void DidUpdateAccessControlForCurrentUser (HMHome home); - [Export ("home:didAddAccessory:"), EventArgs ("HMHomeAccessory")] void DidAddAccessory (HMHome home, HMAccessory accessory); @@ -834,10 +797,6 @@ partial interface HMHomeDelegate { [Export ("home:didEncounterError:forAccessory:"), EventArgs ("HMHomeErrorAccessory")] void DidEncounterError (HMHome home, NSError error, HMAccessory accessory); - - [Watch (4,0), TV (11,0), iOS (11,0)] - [Export ("home:didUpdateHomeHubState:"), EventArgs ("HMHomeHubState")] - void DidUpdateHomeHubState (HMHome home, HMHomeHubState homeHubState); } [TV (10,0)] @@ -1155,20 +1114,19 @@ interface HMAccessoryCategory { [iOS (9,0)] [BaseType (typeof (HMEvent))] [DisableDefaultCtor] - interface HMCharacteristicEvent : NSMutableCopying { + interface HMCharacteristicEvent { [NoTV] [NoWatch] [Export ("initWithCharacteristic:triggerValue:")] IntPtr Constructor (HMCharacteristic characteristic, [NullAllowed] INSCopying triggerValue); [Export ("characteristic", ArgumentSemantic.Strong)] - HMCharacteristic Characteristic { get; [NotImplemented] set; } + HMCharacteristic Characteristic { get; } [NullAllowed] [Export ("triggerValue", ArgumentSemantic.Copy)] - INSCopying TriggerValue { get; [NotImplemented] set; } + INSCopying TriggerValue { get; } - [Deprecated (PlatformName.iOS, 11, 0)] [NoTV] [NoWatch] [Async] @@ -1182,17 +1140,8 @@ interface HMCharacteristicEvent : NSMutableCopying { interface HMEvent { [Export ("uniqueIdentifier", ArgumentSemantic.Copy)] NSUuid UniqueIdentifier { get; } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [Static] - [Export ("isSupportedForHome:")] - bool IsSupported (HMHome home); } - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof (HMEvent))] - interface HMTimeEvent {} - [TV (10,0)] [iOS (9,0)] [BaseType (typeof (HMTrigger))] @@ -1203,57 +1152,20 @@ interface HMEventTrigger { [Export ("initWithName:events:predicate:")] IntPtr Constructor (string name, HMEvent[] events, [NullAllowed] NSPredicate predicate); - [NoTV] - [NoWatch] - [iOS (11,0)] - [Export ("initWithName:events:endEvents:recurrences:predicate:")] - IntPtr Constructor (string name, HMEvent[] events, [NullAllowed] HMEvent[] endEvents, [NullAllowed] NSDateComponents[] recurrences, [NullAllowed] NSPredicate predicate); - [Export ("events", ArgumentSemantic.Copy)] HMEvent[] Events { get; } - [Watch (4, 0), TV (11, 0), iOS (11, 0)] - [Export ("endEvents", ArgumentSemantic.Copy)] - HMEvent[] EndEvents { get; } - [NullAllowed, Export ("predicate", ArgumentSemantic.Copy)] NSPredicate Predicate { get; } - [Watch (4, 0), TV (11, 0), iOS (11, 0)] - [NullAllowed, Export ("recurrences", ArgumentSemantic.Copy)] - NSDateComponents[] Recurrences { get; } - - [Watch (4, 0), TV (11, 0), iOS (11, 0)] - [Export ("executeOnce")] - bool ExecuteOnce { get; } - - [Watch (4, 0), TV (11, 0), iOS (11, 0)] - [Export ("triggerActivationState", ArgumentSemantic.Assign)] - HMEventTriggerActivationState TriggerActivationState { get; } - [Static][Internal] [Export ("predicateForEvaluatingTriggerOccurringBeforeSignificantEvent:applyingOffset:")] NSPredicate CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (NSString significantEvent, [NullAllowed] NSDateComponents offset); - [Watch (4,0), TV (11,0), iOS (11,0)] - [Static] - [Export ("predicateForEvaluatingTriggerOccurringBeforeSignificantEvent:")] - NSPredicate CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (HMSignificantTimeEvent significantEvent); - [Static][Internal] [Export ("predicateForEvaluatingTriggerOccurringAfterSignificantEvent:applyingOffset:")] NSPredicate CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent (NSString significantEvent, [NullAllowed] NSDateComponents offset); - [Watch (4,0), TV (11,0), iOS (11,0)] - [Static] - [Export ("predicateForEvaluatingTriggerOccurringAfterSignificantEvent:")] - NSPredicate CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent (HMSignificantTimeEvent significantEvent); - - [Watch (4,0), TV (11,0), iOS (11,0)] - [Static] - [Export ("predicateForEvaluatingTriggerOccurringBetweenSignificantEvent:secondSignificantEvent:")] - NSPredicate CreatePredicateForEvaluatingTriggerOccurringBetweenSignificantEvent (HMSignificantTimeEvent firstSignificantEvent, HMSignificantTimeEvent secondSignificantEvent); - [Static] [Export ("predicateForEvaluatingTriggerOccurringBeforeDateWithComponents:")] NSPredicate CreatePredicateForEvaluatingTriggerOccurringBeforeDate (NSDateComponents dateComponents); @@ -1266,67 +1178,40 @@ interface HMEventTrigger { [Export ("predicateForEvaluatingTriggerOccurringAfterDateWithComponents:")] NSPredicate CreatePredicateForEvaluatingTriggerOccurringAfterDate (NSDateComponents dateComponents); - [Watch (4,0), TV (11,0), iOS (11,0)] - [Static] - [Export ("predicateForEvaluatingTriggerOccurringBetweenDateWithComponents:secondDateWithComponents:")] - NSPredicate CreatePredicateForEvaluatingTriggerOccurringBetweenDates (NSDateComponents firstDateComponents, NSDateComponents secondDateComponents); - [Static] [Export ("predicateForEvaluatingTriggerWithCharacteristic:relatedBy:toValue:")] NSPredicate CreatePredicateForEvaluatingTrigger (HMCharacteristic characteristic, NSPredicateOperatorType operatorType, NSObject value); - [Watch (4,0), TV (11,0), iOS (11,0)] - [Static] - [Export ("predicateForEvaluatingTriggerWithPresence:")] - NSPredicate CreatePredicateForEvaluatingTrigger (HMPresenceEvent presenceEvent); - [NoTV] [NoWatch] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'UpdateEvents' instead.")] [Async] [Export ("addEvent:completionHandler:")] void AddEvent (HMEvent @event, Action completion); [NoTV] [NoWatch] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'UpdateEvents' instead.")] [Async] [Export ("removeEvent:completionHandler:")] void RemoveEvent (HMEvent @event, Action completion); - [NoTV] - [NoWatch] - [iOS (11,0)] - [Async] - [Export ("updateEvents:completionHandler:")] - void UpdateEvents (HMEvent[] events, Action completion); - - [NoTV] - [NoWatch] - [iOS (11,0)] - [Async] - [Export ("updateEndEvents:completionHandler:")] - void UpdateEndEvents (HMEvent[] endEvents, Action completion); - [NoTV] [NoWatch] [Async] [Export ("updatePredicate:completionHandler:")] void UpdatePredicate ([NullAllowed] NSPredicate predicate, Action completion); + } - [NoTV] - [NoWatch] - [iOS (11,0)] - [Async] - [Export ("updateRecurrences:completionHandler:")] - void UpdateRecurrences ([NullAllowed] NSDateComponents[] recurrences, Action completion); + [Static] + [Internal] + [iOS (9,0)] + [TV (10,0)] + partial interface HMSignificantEventInternal { + + [Field ("HMSignificantEventSunrise")] + NSString Sunrise { get; } - [NoTV] - [NoWatch] - [iOS (11,0)] - [Async] - [Export ("updateExecuteOnce:completionHandler:")] - void UpdateExecuteOnce (bool executeOnce, Action completion); + [Field ("HMSignificantEventSunset")] + NSString Sunset { get; } } [iOS (9,0)] @@ -1342,36 +1227,22 @@ interface HMHomeAccessControl { [TV (10,0)] [BaseType (typeof (HMEvent))] [DisableDefaultCtor] - interface HMLocationEvent : NSMutableCopying { + interface HMLocationEvent { [NoTV] [NoWatch] [Export ("initWithRegion:")] IntPtr Constructor (CLRegion region); [NullAllowed, Export ("region", ArgumentSemantic.Strong)] - CLRegion Region { get; [NotImplemented] set; } + CLRegion Region { get; } [NoTV] [NoWatch] - [Deprecated (PlatformName.iOS, 11, 0)] [Async] [Export ("updateRegion:completionHandler:")] void UpdateRegion (CLRegion region, Action completion); } - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(HMLocationEvent))] - [DisableDefaultCtor] - interface HMMutableLocationEvent { - - [Export ("initWithRegion:")] - IntPtr Constructor (CLRegion region); - - [Override] - [NullAllowed, Export ("region", ArgumentSemantic.Strong)] - CLRegion Region { get; set; } - } - [NoWatch] [TV (10,0), iOS (10,0)] [BaseType (typeof(UIView))] @@ -1545,207 +1416,4 @@ interface HMCameraAudioControl [NullAllowed, Export ("volume", ArgumentSemantic.Strong)] HMCharacteristic Volume { get; } } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(HMTimeEvent))] - [DisableDefaultCtor] - interface HMCalendarEvent : NSMutableCopying { - - [Export ("initWithFireDateComponents:")] - IntPtr Constructor (NSDateComponents fireDateComponents); - - [Export ("fireDateComponents", ArgumentSemantic.Strong)] - NSDateComponents FireDateComponents { get; [NotImplemented] set; } - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(HMCalendarEvent))] - [DisableDefaultCtor] - interface HMMutableCalendarEvent { - - [Export ("initWithFireDateComponents:")] - IntPtr Constructor (NSDateComponents fireDateComponents); - - [Override] - [Export ("fireDateComponents", ArgumentSemantic.Strong)] - NSDateComponents FireDateComponents { get; set; } - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(HMCharacteristicEvent))] - [DisableDefaultCtor] - interface HMMutableCharacteristicEvent : NSMutableCopying { - - [Export ("initWithCharacteristic:triggerValue:")] - IntPtr Constructor (HMCharacteristic characteristic, [NullAllowed] INSCopying triggerValue); - - [Override] - [Export ("characteristic", ArgumentSemantic.Strong)] - HMCharacteristic Characteristic { get; set; } - - [Override] - [NullAllowed, Export ("triggerValue", ArgumentSemantic.Copy)] - INSCopying TriggerValue { get; set; } - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(HMEvent))] - [DisableDefaultCtor] - interface HMCharacteristicThresholdRangeEvent : NSMutableCopying { - - [Export ("initWithCharacteristic:thresholdRange:")] - IntPtr Constructor (HMCharacteristic characteristic, HMNumberRange thresholdRange); - - [Export ("characteristic", ArgumentSemantic.Strong)] - HMCharacteristic Characteristic { get; [NotImplemented] set; } - - [Export ("thresholdRange", ArgumentSemantic.Copy)] - HMNumberRange ThresholdRange { get; [NotImplemented] set; } - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(HMCharacteristicThresholdRangeEvent))] - [DisableDefaultCtor] - interface HMMutableCharacteristicThresholdRangeEvent { - - [Export ("initWithCharacteristic:thresholdRange:")] - IntPtr Constructor (HMCharacteristic characteristic, HMNumberRange thresholdRange); - - [Override] - [Export ("characteristic", ArgumentSemantic.Strong)] - HMCharacteristic Characteristic { get; set; } - - [Override] - [Export ("thresholdRange", ArgumentSemantic.Copy)] - HMNumberRange ThresholdRange { get; set; } - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(HMTimeEvent))] - [DisableDefaultCtor] - interface HMDurationEvent : NSMutableCopying { - - [Export ("initWithDuration:")] - IntPtr Constructor (double duration); - - [Export ("duration")] - double Duration { get; [NotImplemented] set; } - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(HMDurationEvent))] - [DisableDefaultCtor] - interface HMMutableDurationEvent { - - [Export ("initWithDuration:")] - IntPtr Constructor (double duration); - - [Override] - [Export ("duration")] - double Duration { get; set; } - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface HMNumberRange { - - [Static] - [Export ("numberRangeWithMinValue:maxValue:")] - HMNumberRange FromRange (NSNumber minValue, NSNumber maxValue); - - [Static] - [Export ("numberRangeWithMinValue:")] - HMNumberRange FromMin (NSNumber minValue); - - [Static] - [Export ("numberRangeWithMaxValue:")] - HMNumberRange FromMax (NSNumber maxValue); - - [NullAllowed, Export ("minValue", ArgumentSemantic.Strong)] - NSNumber Min { get; } - - [NullAllowed, Export ("maxValue", ArgumentSemantic.Strong)] - NSNumber Max { get; } - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(HMEvent))] - [DisableDefaultCtor] - interface HMPresenceEvent : NSMutableCopying { - - [Export ("initWithPresenceEventType:presenceUserType:")] - IntPtr Constructor (HMPresenceEventType presenceEventType, HMPresenceEventUserType presenceUserType); - - [Export ("presenceEventType")] - HMPresenceEventType PresenceEventType { get; [NotImplemented] set; } - - [Export ("presenceUserType")] - HMPresenceEventUserType PresenceUserType { get; [NotImplemented] set; } - - [Field ("HMPresenceKeyPath")] - NSString KeyPath { get; } - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(HMPresenceEvent))] - [DisableDefaultCtor] - interface HMMutablePresenceEvent { - - [Export ("presenceEventType", ArgumentSemantic.Assign)] - HMPresenceEventType PresenceEventType { get; /* Radar 33883958: https://trello.com/c/TIlzWzrL*/ [NotImplemented] set; } - - [Export ("presenceUserType", ArgumentSemantic.Assign)] - HMPresenceEventUserType PresenceUserType { get; /* Radar 33883958: https://trello.com/c/TIlzWzrL*/ [NotImplemented] set; } - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(HMTimeEvent))] - [DisableDefaultCtor] - interface HMSignificantTimeEvent : NSMutableCopying { - - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("initWithSignificantEvent:offset:")] - IntPtr Constructor (NSString significantEvent, [NullAllowed] NSDateComponents offset); - - [Wrap ("this (HMSignificantEventExtensions.GetConstant (significantEvent), offset)")] - IntPtr Constructor (HMSignificantEvent significantEvent, [NullAllowed] NSDateComponents offset); - - [Internal] - [Export ("significantEvent", ArgumentSemantic.Strong)] - NSString _SignificantEvent { get; [NotImplemented] set; } - - // FIXME: Bug https://bugzilla.xamarin.com/show_bug.cgi?id=57870 - // [Wrap ("HMSignificantEventExtensions.GetValue (_SignificantEvent)")] - // HMSignificantEvent SignificantEvent { get; [NotImplemented] set; } - - [NullAllowed, Export ("offset", ArgumentSemantic.Strong)] - NSDateComponents Offset { get; [NotImplemented] set; } - } - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(HMSignificantTimeEvent))] - interface HMMutableSignificantTimeEvent { - - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("initWithSignificantEvent:offset:")] - IntPtr Constructor (NSString significantEvent, [NullAllowed] NSDateComponents offset); - - [Wrap ("this (HMSignificantEventExtensions.GetConstant (significantEvent), offset)")] - IntPtr Constructor (HMSignificantEvent significantEvent, [NullAllowed] NSDateComponents offset); - - [Internal] - [Override] - [Export ("significantEvent", ArgumentSemantic.Strong)] - NSString _SignificantEvent { get; set; } - - // FIXME: Bug https://bugzilla.xamarin.com/show_bug.cgi?id=57870 - // [Override] - // [Wrap ("HMSignificantEventExtensions.GetValue (_SignificantEvent)")] - // HMSignificantEvent SignificantEvent { get; set; } - - [Override] - [Export ("offset", ArgumentSemantic.Strong)] - NSDateComponents Offset { get; set; } - } } diff --git a/src/iad.cs b/src/iad.cs index 9a8480d22c5..72b3ef82445 100644 --- a/src/iad.cs +++ b/src/iad.cs @@ -132,7 +132,7 @@ interface ADInterstitialAd { bool PresentInView (UIView containerView); [Export ("presentFromViewController:")] - [Availability (Introduced = Platform.iOS_4_3, Deprecated = Platform.iOS_7_0, Message = "Use extension method 'UIViewController.RequestInterstitialAdPresentation' instead.")] + [Availability (Introduced = Platform.iOS_4_3, Deprecated = Platform.iOS_7_0, Message = "Use extension method UIViewController.RequestInterstitialAdPresentation instead")] void PresentFromViewController (UIViewController viewController); } @@ -225,7 +225,6 @@ partial interface IAdAdditions { void SetCanDisplayBannerAds (bool value); [Since (7,0), Export ("originalContentView")] - [NullAllowed] UIView GetOriginalContentView (); [Since (7,0), Export ("isPresentingFullScreenAd")] @@ -251,11 +250,11 @@ interface ADClient { [Export ("sharedClient")] ADClient SharedClient { get; } - [Availability (Introduced = Platform.iOS_7_1, Deprecated = Platform.iOS_9_0, Message = "Replaced by 'RequestAttributionDetails'.")] + [Availability (Introduced = Platform.iOS_7_1, Deprecated = Platform.iOS_9_0, Message = "Replaced by RequestAttributionDetails")] [Export ("determineAppInstallationAttributionWithCompletionHandler:")] void DetermineAppInstallationAttribution (AttributedToiAdCompletionHandler completionHandler); - [Availability (Introduced = Platform.iOS_8_0, Deprecated = Platform.iOS_9_0, Message = "Replaced by 'RequestAttributionDetails'.")] + [Availability (Introduced = Platform.iOS_8_0, Deprecated = Platform.iOS_9_0, Message = "Replaced by RequestAttributionDetails")] [Export ("lookupAdConversionDetails:")] [Async (ResultTypeName="ADClientConversionDetailsResult")] void LookupAdConversionDetails (ADConversionDetails onCompleted); diff --git a/src/identitylookup.cs b/src/identitylookup.cs deleted file mode 100644 index e1766c1b8fa..00000000000 --- a/src/identitylookup.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// IdentityLookup C# bindings -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 -using System; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.IdentityLookup { - - [iOS (11,0)] - [Native] - public enum ILMessageFilterAction : nint { - None = 0, - Allow = 1, - Filter = 2, - } - - [iOS (11,0)] - [ErrorDomain ("ILMessageFilterErrorDomain")] - [Native] - public enum ILMessageFilterError : nint { - System = 1, - InvalidNetworkUrl = 2, - NetworkUrlUnauthorized = 3, - NetworkRequestFailed = 4, - RedundantNetworkDeferral = 5, - } - - [iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (NSObject))] - interface ILMessageFilterExtension { - } - - [iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (NSExtensionContext))] - interface ILMessageFilterExtensionContext { - - [Export ("deferQueryRequestToNetworkWithCompletion:")] - [Async] - void DeferQueryRequestToNetwork (Action completion); - } - - interface IILMessageFilterQueryHandling { } - - [iOS (11,0)] - [Protocol] - interface ILMessageFilterQueryHandling { - - [Abstract] - [Export ("handleQueryRequest:context:completion:")] - void HandleQueryRequest (ILMessageFilterQueryRequest queryRequest, ILMessageFilterExtensionContext context, Action completion); - } - - [iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface ILMessageFilterQueryRequest : NSSecureCoding { - - [NullAllowed, Export ("sender")] - string Sender { get; } - - [NullAllowed, Export ("messageBody")] - string MessageBody { get; } - } - - [iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (NSObject))] - interface ILMessageFilterQueryResponse : NSSecureCoding { - - [Export ("action", ArgumentSemantic.Assign)] - ILMessageFilterAction Action { get; set; } - } - - [iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface ILNetworkResponse : NSSecureCoding { - - [Export ("urlResponse")] - NSHttpUrlResponse UrlResponse { get; } - - [Export ("data")] - NSData Data { get; } - } -} -#endif diff --git a/src/imageio.cs b/src/imageio.cs index b25acf3791f..6f4ee0134ed 100644 --- a/src/imageio.cs +++ b/src/imageio.cs @@ -857,50 +857,6 @@ interface CGImageProperties { [Field ("kCGImagePropertyMakerAppleDictionary")] NSString MakerAppleDictionary { get; } #endif - - [Mac (10, 13), iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("kCGImagePropertyImageCount")] - NSString ImageCount { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("kCGImagePropertyWidth")] - NSString Width { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("kCGImagePropertyHeight")] - NSString Height { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("kCGImagePropertyBytesPerRow")] - NSString BytesPerRow { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("kCGImagePropertyNamedColorSpace")] - NSString NamedColorSpace { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("kCGImagePropertyPixelFormat")] - NSString PixelFormat { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("kCGImagePropertyImages")] - NSString Images { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("kCGImagePropertyThumbnailImages")] - NSString ThumbnailImages { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("kCGImagePropertyAuxiliaryData")] - NSString AuxiliaryData { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("kCGImagePropertyAuxiliaryDataType")] - NSString AuxiliaryDataType { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("kCGImagePropertyFileContentsDictionary")] - NSString FileContentsDictionary { get; } } [Since (7,0), MountainLion] @@ -1213,35 +1169,4 @@ interface CGCopyImageSourceOptions { IntPtr kOrientation { get; } } #endif - - [Mac (10, 13), iOS (11,0), TV (11,0), Watch (4,0)] - enum CGImageAuxiliaryDataType { - [Field ("kCGImageAuxiliaryDataTypeDepth")] - Depth, - - [Field ("kCGImageAuxiliaryDataTypeDisparity")] - Disparity, - } - - [Mac (10,13), iOS (11,0), TV (11,0), Watch (4,0)] - [Static] - [Internal] - interface CGImageAuxiliaryDataInfoKeys { - [Field ("kCGImageAuxiliaryDataInfoData")] - NSString DataKey { get; } - - [Field ("kCGImageAuxiliaryDataInfoDataDescription")] - NSString DataDescriptionKey { get; } - - [Field ("kCGImageAuxiliaryDataInfoMetadata")] - NSString MetadataKey { get; } - } - - [Mac (10,13), iOS (11,0), TV (11,0), Watch (4,0)] - [StrongDictionary ("CGImageAuxiliaryDataInfoKeys")] - interface CGImageAuxiliaryDataInfo { - - NSData Data { get; set; } - NSDictionary DataDescription { get; set; } - } } diff --git a/src/intents.cs b/src/intents.cs index bd26563e3ea..9c22c35a9d0 100644 --- a/src/intents.cs +++ b/src/intents.cs @@ -15,7 +15,6 @@ using XamCore.ObjCRuntime; using XamCore.CoreLocation; using XamCore.Contacts; -using XamCore.EventKit; #if MONOMAC using UIImage = XamCore.Foundation.NSObject; @@ -56,11 +55,7 @@ public enum INCallRecordType : nint { Unknown = 0, Outgoing, Missed, - Received, - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - Latest, - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - Voicemail, + Received } [Introduced (PlatformName.iOS, 10, 0)] @@ -70,15 +65,10 @@ public enum INCallRecordType : nint { public enum INCancelWorkoutIntentResponseCode : nint { Unspecified = 0, Ready, - [Deprecated (PlatformName.iOS, 11, 0, message:"Use 'HandleInApp' instead.")] // yup just iOS ContinueInApp, Failure, FailureRequiringAppLaunch, - FailureNoMatchingWorkout, - [NoWatch, iOS (11,0)] - Success, - [NoWatch, iOS (11,0)] - HandleInApp, + FailureNoMatchingWorkout } [Introduced (PlatformName.iOS, 10, 0)] @@ -152,15 +142,10 @@ public enum INConditionalOperator : nint { public enum INEndWorkoutIntentResponseCode : nint { Unspecified = 0, Ready, - [Deprecated (PlatformName.iOS, 11, 0, message:"Use 'HandleInApp' instead.")] // yup just iOS ContinueInApp, Failure, FailureRequiringAppLaunch, - FailureNoMatchingWorkout, - [NoWatch, iOS (11,0)] - Success, - [NoWatch, iOS (11,0)] - HandleInApp, + FailureNoMatchingWorkout } [Introduced (PlatformName.iOS, 10, 0)] @@ -197,8 +182,6 @@ public enum INGetRestaurantGuestIntentResponseCode : nint { public enum INGetRideStatusIntentResponseCode : nint { Unspecified = 0, Ready, - [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] InProgress, Success, Failure, @@ -268,8 +251,6 @@ public enum INInteractionDirection : nint { public enum INListRideOptionsIntentResponseCode : nint { Unspecified = 0, Ready, - [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] InProgress, Success, Failure, @@ -277,9 +258,7 @@ public enum INListRideOptionsIntentResponseCode : nint { FailureRequiringAppLaunchMustVerifyCredentials, FailureRequiringAppLaunchNoServiceInArea, FailureRequiringAppLaunchServiceTemporarilyUnavailable, - FailureRequiringAppLaunchPreviousRideNeedsCompletion, - [iOS (11,0), Watch (4,0)] - FailurePreviousRideNeedsFeedback, + FailureRequiringAppLaunchPreviousRideNeedsCompletion } [Introduced (PlatformName.iOS, 10, 0)] @@ -291,9 +270,7 @@ public enum INMessageAttribute : nint { Read, Unread, Flagged, - Unflagged, - [iOS (11,0), Mac (10,13, onlyOn64:true), Watch (4,0)] - Played, + Unflagged } [Introduced (PlatformName.iOS, 10, 0)] @@ -305,9 +282,7 @@ public enum INMessageAttributeOptions : nuint { Read = (1 << 0), Unread = (1 << 1), Flagged = (1 << 2), - Unflagged = (1 << 3), - [iOS (11,0), Mac (10,13, onlyOn64:true), Watch (4,0)] - Played = (1UL << 4), + Unflagged = (1 << 3) } [Introduced (PlatformName.iOS, 10, 0)] @@ -317,15 +292,10 @@ public enum INMessageAttributeOptions : nuint { public enum INPauseWorkoutIntentResponseCode : nint { Unspecified = 0, Ready, - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'HandleInApp' instead.")] // yup just iOS ContinueInApp, Failure, FailureRequiringAppLaunch, - FailureNoMatchingWorkout, - [NoWatch, iOS (11,0)] - Success, - [NoWatch, iOS (11,0)] - HandleInApp, + FailureNoMatchingWorkout } [Introduced (PlatformName.iOS, 10, 0)] @@ -442,9 +412,7 @@ public enum INRequestPaymentIntentResponseCode : nint { FailurePaymentsAmountBelowMinimum, FailurePaymentsAmountAboveMaximum, FailurePaymentsCurrencyUnsupported, - FailureNoBankAccount, - [iOS (11,0), Watch (4,0)] - FailureNotEligible, + FailureNoBankAccount } [Introduced (PlatformName.iOS, 10, 0)] @@ -454,8 +422,6 @@ public enum INRequestPaymentIntentResponseCode : nint { public enum INRequestRideIntentResponseCode : nint { Unspecified = 0, Ready, - [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] InProgress, Success, Failure, @@ -482,15 +448,10 @@ public enum INRestaurantReservationUserBookingStatus : nuint { public enum INResumeWorkoutIntentResponseCode : nint { Unspecified = 0, Ready, - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'HandleInApp' instead.")] // yup just iOS ContinueInApp, Failure, FailureRequiringAppLaunch, - FailureNoMatchingWorkout, - [NoWatch, iOS (11,0)] - Success, - [NoWatch, iOS (11,0)] - HandleInApp, + FailureNoMatchingWorkout } [Introduced (PlatformName.iOS, 10, 0)] @@ -533,10 +494,6 @@ public enum INSearchCallHistoryIntentResponseCode : nint { [Introduced (PlatformName.iOS, 10, 2)] [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] FailureAppConfigurationRequired, - [iOS (11,0), Mac (10,13, onlyOn64:true), Watch (4,0)] - InProgress, - [iOS (11,0), Mac (10,13, onlyOn64:true), Watch (4,0)] - Success, } [Introduced (PlatformName.iOS, 10, 0)] @@ -550,9 +507,7 @@ public enum INSearchForMessagesIntentResponseCode : nint { Success, Failure, FailureRequiringAppLaunch, - FailureMessageServiceNotAvailable, - [iOS (11,0), Mac (10,13, onlyOn64:true), Watch (4,0)] - FailureMessageTooManyResults, + FailureMessageServiceNotAvailable } [Introduced (PlatformName.iOS, 10, 0)] @@ -600,10 +555,7 @@ public enum INSendPaymentIntentResponseCode : nint { FailurePaymentsAmountAboveMaximum, FailurePaymentsCurrencyUnsupported, FailureInsufficientFunds, - FailureNoBankAccount, - [Introduced (PlatformName.iOS, 11, 0)] - [Introduced (PlatformName.MacOSX, 10, 13, PlatformArchitecture.Arch64)] - FailureNotEligible, + FailureNoBankAccount } [Introduced (PlatformName.iOS, 10, 0)] @@ -727,10 +679,6 @@ public enum INStartAudioCallIntentResponseCode : nint { [Introduced (PlatformName.iOS, 10, 2)] [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] FailureCallingServiceNotAvailable, - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - FailureContactNotSupportedByApp, - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - FailureNoValidNumber, } [Introduced (PlatformName.iOS, 10, 0)] @@ -763,10 +711,6 @@ public enum INStartVideoCallIntentResponseCode : nint { [Introduced (PlatformName.iOS, 10, 2)] [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] FailureCallingServiceNotAvailable, - [Watch (4,0), iOS (11,0)] - FailureContactNotSupportedByApp, - [Watch (4,0), iOS (11,0)] - FailureInvalidNumber, } [Introduced (PlatformName.iOS, 10, 0)] @@ -780,11 +724,7 @@ public enum INStartWorkoutIntentResponseCode : nint { Failure, FailureRequiringAppLaunch, FailureOngoingWorkout, - FailureNoMatchingWorkout, - [Watch (4,0), iOS (11,0)] - Success, - [Watch (4,0), iOS (11,0)] - HandleInApp, + FailureNoMatchingWorkout } [Introduced (PlatformName.iOS, 10, 0)] @@ -804,10 +744,6 @@ public enum INVocabularyStringType : nint { PaymentsOrganizationName = 400, [Introduced (PlatformName.iOS, 10, 3)] PaymentsAccountNickname, - [iOS (11,0)] - NotebookItemTitle = 500, - [iOS (11,0)] - NotebookItemGroupName, } [Introduced (PlatformName.iOS, 10, 0)] @@ -885,12 +821,6 @@ public enum INAmountType : nint { MinimumDue, AmountDue, CurrentBalance, - [iOS (11,0), Watch (4,0)] - MaximumTransferAmount, - [iOS (11,0), Watch (4,0)] - MinimumTransferAmount, - [iOS (11,0), Watch (4,0)] - StatementBalance, } [Introduced (PlatformName.iOS, 10, 3)] @@ -1002,324 +932,6 @@ public enum INSetCarLockStatusIntentResponseCode : nint { FailureRequiringAppLaunch, } - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INAddTasksIntentResponseCode : nint { - Unspecified = 0, - Ready, - InProgress, - Success, - Failure, - FailureRequiringAppLaunch, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INAppendToNoteIntentResponseCode : nint { - Unspecified = 0, - Ready, - InProgress, - Success, - Failure, - FailureRequiringAppLaunch, - FailureCannotUpdatePasswordProtectedNote, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INBalanceType : nint { - Unknown = 0, - Money, - Points, - Miles, - } - - [Watch (3,2), Mac (10,12, onlyOn64:true), iOS (10,0)] - [Native] - public enum INCallCapability : nint { - Unknown = 0, - AudioCall, - VideoCall, - } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Native] - public enum INCallDestinationType : nint { - Unknown = 0, - Normal, - Emergency, - Voicemail, - Redial, - } - - [Watch (3,2), Mac (10,12, onlyOn64:true), iOS (10,0)] - [Native] - [Flags] - public enum INCallRecordTypeOptions : nuint { - Outgoing = (1 << 0), - Missed = (1 << 1), - Received = (1 << 2), - Latest = (1 << 3), - Voicemail = (1 << 4), - } - - [NoWatch, NoMac, iOS (11,0)] - [Native] - public enum INCancelRideIntentResponseCode : nint { - Unspecified = 0, - Ready, - Success, - Failure, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INCreateNoteIntentResponseCode : nint { - Unspecified = 0, - Ready, - InProgress, - Success, - Failure, - FailureRequiringAppLaunch, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INCreateTaskListIntentResponseCode : nint { - Unspecified = 0, - Ready, - InProgress, - Success, - Failure, - FailureRequiringAppLaunch, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INDateSearchType : nint { - Unknown = 0, - ByDueDate, - ByModifiedDate, - ByCreatedDate, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INGetVisualCodeIntentResponseCode : nint { - Unspecified = 0, - Ready, - ContinueInApp, - InProgress, - Success, - Failure, - FailureRequiringAppLaunch, - FailureAppConfigurationRequired, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INLocationSearchType : nint { - Unknown = 0, - ByLocationTrigger, - } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Native] - public enum INMessageType : nint { - Unspecified = 0, - Text, - Audio, - DigitalTouch, - Handwriting, - Sticker, - TapbackLiked, - TapbackDisliked, - TapbackEmphasized, - TapbackLoved, - TapbackQuestioned, - TapbackLaughed, - MediaCalendar, - MediaLocation, - MediaAddressCard, - MediaImage, - MediaVideo, - MediaPass, - MediaAudio, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INNoteContentType : nint { - Unknown = 0, - Text, - Image, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INNotebookItemType : nint { - Unknown = 0, - Note, - TaskList, - Task, - } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Native] - public enum INRecurrenceFrequency : nint { - Unknown = 0, - Minute, - Hourly, - Daily, - Weekly, - Monthly, - Yearly, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INRequestPaymentCurrencyAmountUnsupportedReason : nint { - AmountBelowMinimum = 1, - AmountAboveMaximum, - CurrencyUnsupported, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INRequestPaymentPayerUnsupportedReason : nint { - CredentialsUnverified = 1, - NoAccount, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INRideFeedbackTypeOptions : nuint { - Rate = (1 << 0), - Tip = (1 << 1), - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INSearchForAccountsIntentResponseCode : nint { - Unspecified = 0, - Ready, - InProgress, - Success, - Failure, - FailureRequiringAppLaunch, - FailureCredentialsUnverified, - FailureAccountNotFound, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INSearchForNotebookItemsIntentResponseCode : nint { - Unspecified = 0, - Ready, - InProgress, - Success, - Failure, - FailureRequiringAppLaunch, - } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Native] - public enum INSendMessageRecipientUnsupportedReason : nint { - NoAccount = 1, - Offline, - MessagingServiceNotEnabledForRecipient, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INSendPaymentCurrencyAmountUnsupportedReason : nint { - AmountBelowMinimum = 1, - AmountAboveMaximum, - CurrencyUnsupported, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INSendPaymentPayeeUnsupportedReason : nint { - CredentialsUnverified = 1, - InsufficientFunds, - NoAccount, - } - - [NoWatch, NoMac, iOS (11,0)] - [Native] - public enum INSendRideFeedbackIntentResponseCode : nint { - Unspecified = 0, - Ready, - Success, - Failure, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INSetTaskAttributeIntentResponseCode : nint { - Unspecified = 0, - Ready, - InProgress, - Success, - Failure, - FailureRequiringAppLaunch, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INSortType : nint { - Unknown = 0, - AsIs, - ByDate, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INSpatialEvent : nint { - Unknown = 0, - Arrive, - Depart, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INTaskStatus : nint { - Unknown = 0, - NotCompleted, - Completed, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INTaskType : nint { - Unknown = 0, - NotCompletable, - Completable, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INTransferMoneyIntentResponseCode : nint { - Unspecified = 0, - Ready, - InProgress, - Success, - Failure, - FailureRequiringAppLaunch, - FailureCredentialsUnverified, - FailureInsufficientFunds, - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Native] - public enum INVisualCodeType : nint { - Unknown = 0, - Contact, - RequestPayment, - SendPayment, - } - [Introduced (PlatformName.iOS, 10, 0)] [Introduced (PlatformName.MacOSX, 10, 12, PlatformArchitecture.Arch64)] [Introduced (PlatformName.WatchOS, 3, 2)] @@ -1590,10 +1202,6 @@ interface CLPlacemark_INIntentsAdditions { [BaseType (typeof (INIntent))] interface INBookRestaurantReservationIntent : NSCopying { - [iOS (11,0)] - [Export ("initWithRestaurant:bookingDateComponents:partySize:bookingIdentifier:guest:selectedOffer:guestProvidedSpecialRequestText:")] - IntPtr Constructor (INRestaurant restaurant, NSDateComponents bookingDateComponents, nuint partySize, [NullAllowed] string bookingIdentifier, [NullAllowed] INRestaurantGuest guest, [NullAllowed] INRestaurantOffer selectedOffer, [NullAllowed] string guestProvidedSpecialRequestText); - [Export ("restaurant", ArgumentSemantic.Copy)] INRestaurant Restaurant { get; set; } @@ -1627,13 +1235,7 @@ interface INBookRestaurantReservationIntentHandling { void HandleBookRestaurantReservation (INBookRestaurantReservationIntent intent, Action completion); [Export ("confirmBookRestaurantReservation:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmBookRestaurantReservation -#endif - (INBookRestaurantReservationIntent intent, Action completion); + void ConfirmBookRestaurantReservation (INBookRestaurantReservationIntent intent, Action completion); [Export ("resolveRestaurantForBookRestaurantReservation:withCompletion:")] void ResolveRestaurant (INBookRestaurantReservationIntent intent, Action completion); @@ -1708,33 +1310,13 @@ interface INBooleanResolutionResult { [DisableDefaultCtor] interface INCallRecordTypeResolutionResult { - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedCallRecordType:")] - INCallRecordTypeResolutionResult SuccessWithResolvedCallRecordType (INCallRecordType resolvedCallRecordType); - - [Internal] - [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("successWithResolvedValue:")] - INCallRecordTypeResolutionResult SuccessWithResolvedValue (INCallRecordType resolvedValue); - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithCallRecordTypeToConfirm:")] - INCallRecordTypeResolutionResult ConfirmationRequiredWithCallRecordTypeToConfirm (INCallRecordType callRecordTypeToConfirm); + INCallRecordTypeResolutionResult GetSuccess (INCallRecordType resolvedValue); - [Internal] - [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INCallRecordTypeResolutionResult ConfirmationRequiredWithValueToConfirm (INCallRecordType valueToConfirm); + INCallRecordTypeResolutionResult GetConfirmationRequired (INCallRecordType valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -1780,13 +1362,7 @@ interface INCancelWorkoutIntentHandling { void HandleCancelWorkout (INCancelWorkoutIntent intent, Action completion); [Export ("confirmCancelWorkout:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmCancelWorkout -#endif - (INCancelWorkoutIntent intent, Action completion); + void ConfirmCancelWorkout (INCancelWorkoutIntent intent, Action completion); [Export ("resolveWorkoutNameForCancelWorkout:withCompletion:")] void ResolveWorkoutName (INCancelWorkoutIntent intent, Action completion); @@ -1813,28 +1389,13 @@ interface INCancelWorkoutIntentResponse { [DisableDefaultCtor] interface INCarAirCirculationModeResolutionResult { - [iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedCarAirCirculationMode:")] - INCarAirCirculationModeResolutionResult SuccessWithResolvedCarAirCirculationMode (INCarAirCirculationMode resolvedCarAirCirculationMode); - - [Deprecated (PlatformName.iOS, 11, 0)] - [Internal] [Static] [Export ("successWithResolvedValue:")] - INCarAirCirculationModeResolutionResult SuccessWithResolvedValue (INCarAirCirculationMode resolvedValue); - - [iOS (11,0)] - [Static] - [Export ("confirmationRequiredWithCarAirCirculationModeToConfirm:")] - INCarAirCirculationModeResolutionResult ConfirmationRequiredWithCarAirCirculationModeToConfirm (INCarAirCirculationMode carAirCirculationModeToConfirm); + INCarAirCirculationModeResolutionResult GetSuccess (INCarAirCirculationMode resolvedValue); - [Deprecated (PlatformName.iOS, 11, 0)] - [Internal] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INCarAirCirculationModeResolutionResult ConfirmationRequiredWithValueToConfirm (INCarAirCirculationMode valueToConfirm); + INCarAirCirculationModeResolutionResult GetConfirmationRequired (INCarAirCirculationMode valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -1861,29 +1422,13 @@ interface INCarAirCirculationModeResolutionResult { [DisableDefaultCtor] interface INCarAudioSourceResolutionResult { - [iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedCarAudioSource:")] - INCarAudioSourceResolutionResult SuccessWithResolvedCarAudioSource (INCarAudioSource resolvedCarAudioSource); - - [Internal] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("successWithResolvedValue:")] - INCarAudioSourceResolutionResult SuccessWithResolvedValue (INCarAudioSource resolvedValue); - - [iOS (11,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithCarAudioSourceToConfirm:")] - INCarAudioSourceResolutionResult ConfirmationRequiredWithCarAudioSourceToConfirm (INCarAudioSource carAudioSourceToConfirm); + INCarAudioSourceResolutionResult GetSuccess (INCarAudioSource resolvedValue); - [Internal] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INCarAudioSourceResolutionResult ConfirmationRequiredWithValueToConfirm (INCarAudioSource valueToConfirm); + INCarAudioSourceResolutionResult GetConfirmationRequired (INCarAudioSource valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -1910,29 +1455,13 @@ interface INCarAudioSourceResolutionResult { [DisableDefaultCtor] interface INCarDefrosterResolutionResult { - [iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedCarDefroster:")] - INCarDefrosterResolutionResult SuccessWithResolvedCarDefroster (INCarDefroster resolvedCarDefroster); - - [Internal] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("successWithResolvedValue:")] - INCarDefrosterResolutionResult SuccessWithResolvedValue (INCarDefroster resolvedValue); - - [iOS (11,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithCarDefrosterToConfirm:")] - INCarDefrosterResolutionResult ConfirmationRequiredWithCarDefrosterToConfirm (INCarDefroster carDefrosterToConfirm); + INCarDefrosterResolutionResult GetSuccess (INCarDefroster resolvedValue); - [Internal] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INCarDefrosterResolutionResult ConfirmationRequiredWithValueToConfirm (INCarDefroster valueToConfirm); + INCarDefrosterResolutionResult GetConfirmationRequired (INCarDefroster valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -1959,29 +1488,13 @@ interface INCarDefrosterResolutionResult { [DisableDefaultCtor] interface INCarSeatResolutionResult { - [iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedCarSeat:")] - INCarSeatResolutionResult SuccessWithResolvedCarSeat (INCarSeat resolvedCarSeat); - - [Internal] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("successWithResolvedValue:")] - INCarSeatResolutionResult SuccessWithResolvedValue (INCarSeat resolvedValue); - - [iOS (11,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithCarSeatToConfirm:")] - INCarSeatResolutionResult ConfirmationRequiredWithCarSeatToConfirm (INCarSeat carSeatToConfirm); + INCarSeatResolutionResult GetSuccess (INCarSeat resolvedValue); - [Internal] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INCarSeatResolutionResult ConfirmationRequiredWithValueToConfirm (INCarSeat valueToConfirm); + INCarSeatResolutionResult GetConfirmationRequired (INCarSeat valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -2066,31 +1579,14 @@ interface INCurrencyAmountResolutionResult { interface INDateComponentsRange : NSCopying, NSSecureCoding { [Export ("initWithStartDateComponents:endDateComponents:")] - IntPtr Constructor ([NullAllowed] NSDateComponents startDateComponents, [NullAllowed] NSDateComponents endDateComponents); - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("initWithEKRecurrenceRule:")] - IntPtr Constructor (EKRecurrenceRule recurrenceRule); - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("initWithStartDateComponents:endDateComponents:recurrenceRule:")] [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] NSDateComponents startDateComponents, [NullAllowed] NSDateComponents endDateComponents, [NullAllowed] INRecurrenceRule recurrenceRule); + IntPtr Constructor ([NullAllowed] NSDateComponents startDateComponents, [NullAllowed] NSDateComponents endDateComponents); [NullAllowed, Export ("startDateComponents", ArgumentSemantic.Copy)] NSDateComponents StartDateComponents { get; } [NullAllowed, Export ("endDateComponents", ArgumentSemantic.Copy)] NSDateComponents EndDateComponents { get; } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [NullAllowed, Export ("recurrenceRule", ArgumentSemantic.Copy)] - INRecurrenceRule RecurrenceRule { get; } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("EKRecurrenceRule")] - [NullAllowed] - EKRecurrenceRule EKRecurrenceRule { get; } } [Introduced (PlatformName.iOS, 10, 0)] @@ -2187,11 +1683,7 @@ interface INMessagesDomainHandling : INSendMessageIntentHandling, INSearchForMes [Introduced (PlatformName.WatchOS, 3, 2)] [Unavailable (PlatformName.MacOSX)] [Protocol] - interface INPaymentsDomainHandling : INSendPaymentIntentHandling, INRequestPaymentIntentHandling, INPayBillIntentHandling, INSearchForBillsIntentHandling -#if XAMCORE_4_0 // Added in iOS 11 -> #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000 - , INSearchForAccountsIntentHandling, INTransferMoneyIntentHandling -#endif - { + interface INPaymentsDomainHandling : INSendPaymentIntentHandling, INRequestPaymentIntentHandling, INPayBillIntentHandling, INSearchForBillsIntentHandling { } [Introduced (PlatformName.iOS, 10, 0)] @@ -2205,21 +1697,7 @@ interface INPhotosDomainHandling : INSearchForPhotosIntentHandling, INStartPhoto [Introduced (PlatformName.WatchOS, 3, 2)] [Unavailable (PlatformName.MacOSX)] [Protocol] - interface INRidesharingDomainHandling : INListRideOptionsIntentHandling, INRequestRideIntentHandling, INGetRideStatusIntentHandling -#if XAMCORE_4_0 // Added in iOS 11 -> #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000 - , INCancelRideIntentHandling, INSendRideFeedbackIntentHandling -#endif - { - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Protocol] - interface INNotebookDomainHandling : INCreateNoteIntentHandling, INAppendToNoteIntentHandling, INAddTasksIntentHandling, INCreateTaskListIntentHandling, INSetTaskAttributeIntentHandling, INSearchForNotebookItemsIntentHandling { - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Protocol] - interface INVisualCodeDomainHandling : INGetVisualCodeIntentHandling { + interface INRidesharingDomainHandling : INListRideOptionsIntentHandling, INRequestRideIntentHandling, INGetRideStatusIntentHandling { } [Introduced (PlatformName.iOS, 10, 0)] @@ -2319,13 +1797,7 @@ interface INEndWorkoutIntentHandling { void HandleEndWorkout (INEndWorkoutIntent intent, Action completion); [Export ("confirmEndWorkout:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmEndWorkout -#endif - (INEndWorkoutIntent intent, Action completion); + void ConfirmEndWorkout (INEndWorkoutIntent intent, Action completion); [Export ("resolveWorkoutNameForEndWorkout:withCompletion:")] void ResolveWorkoutName (INEndWorkoutIntent intent, Action completion); @@ -2370,10 +1842,6 @@ interface INExtension : INIntentHandlerProviding { [BaseType (typeof (INIntent))] interface INGetAvailableRestaurantReservationBookingDefaultsIntent { - [iOS (11,0)] - [Export ("initWithRestaurant:")] - IntPtr Constructor ([NullAllowed] INRestaurant restaurant); - [NullAllowed, Export ("restaurant", ArgumentSemantic.Copy)] INRestaurant Restaurant { get; set; } } @@ -2389,13 +1857,7 @@ interface INGetAvailableRestaurantReservationBookingDefaultsIntentHandling { void HandleAvailableRestaurantReservationBookingDefaults (INGetAvailableRestaurantReservationBookingDefaultsIntent intent, Action completion); [Export ("confirmGetAvailableRestaurantReservationBookingDefaults:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmAvailableRestaurantReservationBookingDefaults -#endif - (INGetAvailableRestaurantReservationBookingDefaultsIntent intent, Action completion); + void ConfirmAvailableRestaurantReservationBookingDefaults (INGetAvailableRestaurantReservationBookingDefaultsIntent intent, Action completion); [Export ("resolveRestaurantForGetAvailableRestaurantReservationBookingDefaults:withCompletion:")] void ResolveAvailableRestaurantReservationBookingDefaults (INGetAvailableRestaurantReservationBookingDefaultsIntent intent, Action completion); @@ -2436,10 +1898,6 @@ interface INGetAvailableRestaurantReservationBookingDefaultsIntentResponse { [BaseType (typeof (INIntent))] interface INGetAvailableRestaurantReservationBookingsIntent : NSCopying { - [iOS (11,0)] - [Export ("initWithRestaurant:partySize:preferredBookingDateComponents:maximumNumberOfResults:earliestBookingDateForResults:latestBookingDateForResults:")] - IntPtr Constructor (INRestaurant restaurant, nuint partySize, [NullAllowed] NSDateComponents preferredBookingDateComponents, [NullAllowed] NSNumber maximumNumberOfResults, [NullAllowed] NSDate earliestBookingDateForResults, [NullAllowed] NSDate latestBookingDateForResults); - [Export ("restaurant", ArgumentSemantic.Copy)] INRestaurant Restaurant { get; set; } @@ -2470,13 +1928,7 @@ interface INGetAvailableRestaurantReservationBookingsIntentHandling { void HandleAvailableRestaurantReservationBookings (INGetAvailableRestaurantReservationBookingsIntent intent, Action completion); [Export ("confirmGetAvailableRestaurantReservationBookings:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmAvailableRestaurantReservationBookings -#endif - (INGetAvailableRestaurantReservationBookingsIntent intent, Action completion); + void ConfirmAvailableRestaurantReservationBookings (INGetAvailableRestaurantReservationBookingsIntent intent, Action completion); [Export ("resolveRestaurantForGetAvailableRestaurantReservationBookings:withCompletion:")] void ResolveAvailableRestaurantReservationBookings (INGetAvailableRestaurantReservationBookingsIntent intent, Action completion); @@ -2532,13 +1984,7 @@ interface INGetRestaurantGuestIntentHandling { void HandleRestaurantGuest (INGetRestaurantGuestIntent intent, Action completion); [Export ("confirmGetRestaurantGuest:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmRestaurantGuest -#endif - (INGetRestaurantGuestIntent guestIntent, Action completion); + void ConfirmRestaurantGuest (INGetRestaurantGuestIntent guestIntent, Action completion); } [Introduced (PlatformName.iOS, 10, 0)] @@ -2565,12 +2011,7 @@ interface INGetRestaurantGuestIntentResponse { [Introduced (PlatformName.WatchOS, 3, 2)] [Unavailable (PlatformName.MacOSX)] [BaseType (typeof (INIntent))] - [DisableDefaultCtor] // DesignatedInitializer below interface INGetRideStatusIntent { - - [DesignatedInitializer] - [Export ("init")] - IntPtr Constructor (); } [Introduced (PlatformName.iOS, 10, 0)] @@ -2592,13 +2033,7 @@ interface INGetRideStatusIntentHandling { void StopSendingUpdates (INGetRideStatusIntent intent); [Export ("confirmGetRideStatus:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmRideStatus -#endif - (INGetRideStatusIntent intent, Action completion); + void ConfirmRideStatus (INGetRideStatusIntent intent, Action completion); } interface IINGetRideStatusIntentResponseObserver { } @@ -2638,14 +2073,6 @@ interface INGetRideStatusIntentResponse { [BaseType (typeof (INIntent))] interface INGetUserCurrentRestaurantReservationBookingsIntent : NSCopying { - [iOS (11,0)] - [Export ("initWithRestaurant:reservationIdentifier:maximumNumberOfResults:earliestBookingDateForResults:")] - IntPtr Constructor ([NullAllowed] INRestaurant restaurant, [NullAllowed] string reservationIdentifier, [NullAllowed] NSNumber maximumNumberOfResults, [NullAllowed] NSDate earliestBookingDateForResults); - - [iOS (11,0)] - [Wrap ("this (restaurant, reservationIdentifier, NSNumber.FromNInt (maximumNumberOfResults), earliestBookingDateForResults)")] - IntPtr Constructor ([NullAllowed] INRestaurant restaurant, [NullAllowed] string reservationIdentifier, nint maximumNumberOfResults, [NullAllowed] NSDate earliestBookingDateForResults); - [NullAllowed, Export ("restaurant", ArgumentSemantic.Copy)] INRestaurant Restaurant { get; set; } @@ -2670,13 +2097,7 @@ interface INGetUserCurrentRestaurantReservationBookingsIntentHandling { void HandleUserCurrentRestaurantReservationBookings (INGetUserCurrentRestaurantReservationBookingsIntent intent, Action completion); [Export ("confirmGetUserCurrentRestaurantReservationBookings:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmUserCurrentRestaurantReservationBookings -#endif - (INGetUserCurrentRestaurantReservationBookingsIntent intent, Action completion); + void ConfirmUserCurrentRestaurantReservationBookings (INGetUserCurrentRestaurantReservationBookingsIntent intent, Action completion); [Export ("resolveRestaurantForGetUserCurrentRestaurantReservationBookings:withCompletion:")] void ResolveUserCurrentRestaurantReservationBookings (INGetUserCurrentRestaurantReservationBookingsIntent intent, Action completion); @@ -2719,12 +2140,6 @@ interface INImage : NSCopying, NSSecureCoding { [Export ("imageWithURL:")] INImage FromUrl (NSUrl url); - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Static] - [Export ("imageWithURL:width:height:")] - [return: NullAllowed] - INImage FromUrl (NSUrl url, double width, double height); - // INImage_IntentsUI (IntentsUI) [NoMac, NoWatch] @@ -2741,11 +2156,6 @@ interface INImage : NSCopying, NSSecureCoding { [Static] [Export ("imageSizeForIntentResponse:")] CGSize GetImageSize (INIntentResponse response); - - [NoMac, NoWatch, iOS (11,0)] - [Async] - [Export ("fetchUIImageWithCompletion:")] - void FetchImage (Action completion); } [Introduced (PlatformName.iOS, 10, 0)] @@ -2795,10 +2205,6 @@ interface INIntent : NSCopying, NSSecureCoding { [Unavailable (PlatformName.MacOSX)] [Wrap ("INIntentIdentifierExtensions.GetValue (IdentifierString)")] INIntentIdentifier? Identifier { get; } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [NullAllowed, Export ("intentDescription")] - string IntentDescription { get; } } interface INIntentResolutionResult : INIntentResolutionResult { } @@ -2888,13 +2294,6 @@ interface INInteraction : NSSecureCoding, NSCopying { [NullAllowed, Export ("groupIdentifier")] string GroupIdentifier { get; set; } - - // From INParameter.h INInteraction () - - [Internal] - [iOS (11,0), Watch (4,0), NoMac] - [Export ("parameterValueForParameter:")] - IntPtr _GetParameterValue (INParameter parameter); } [Introduced (PlatformName.iOS, 10, 0)] @@ -2925,13 +2324,7 @@ interface INListRideOptionsIntentHandling { void HandleListRideOptions (INListRideOptionsIntent intent, Action completion); [Export ("confirmListRideOptions:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmListRideOptions -#endif - (INListRideOptionsIntent intent, Action completion); + void ConfirmListRideOptions (INListRideOptionsIntent intent, Action completion); [Export ("resolvePickupLocationForListRideOptions:withCompletion:")] void ResolvePickupLocation (INListRideOptionsIntent intent, Action completion); @@ -2971,25 +2364,13 @@ interface INListRideOptionsIntentResponse { [DisableDefaultCtor] interface INMessage : NSCopying, NSSecureCoding { - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:messageType:")] - [DesignatedInitializer] - IntPtr Constructor (string identifier, [NullAllowed] string conversationIdentifier, [NullAllowed] string content, [NullAllowed] NSDate dateSent, [NullAllowed] INPerson sender, [NullAllowed] INPerson [] recipients, [NullAllowed] INSpeakableString groupName, INMessageType messageType); - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:messageType:")] - IntPtr Constructor (string identifier, [NullAllowed] string conversationIdentifier, [NullAllowed] string content, [NullAllowed] NSDate dateSent, [NullAllowed] INPerson sender, [NullAllowed] INPerson [] recipients, INMessageType messageType); - [Export ("initWithIdentifier:content:dateSent:sender:recipients:")] + [DesignatedInitializer] IntPtr Constructor (string identifier, [NullAllowed] string content, [NullAllowed] NSDate dateSent, [NullAllowed] INPerson sender, [NullAllowed] INPerson [] recipients); [Export ("identifier")] string Identifier { get; } - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [NullAllowed, Export ("conversationIdentifier")] - string ConversationIdentifier { get; } - [NullAllowed, Export ("content")] string Content { get; } @@ -3001,14 +2382,6 @@ interface INMessage : NSCopying, NSSecureCoding { [NullAllowed, Export ("recipients", ArgumentSemantic.Copy)] INPerson [] Recipients { get; } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [NullAllowed, Export ("groupName", ArgumentSemantic.Copy)] - INSpeakableString GroupName { get; } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("messageType")] - INMessageType MessageType { get; } } [Introduced (PlatformName.iOS, 10, 0)] @@ -3018,33 +2391,13 @@ interface INMessage : NSCopying, NSSecureCoding { [DisableDefaultCtor] interface INMessageAttributeOptionsResolutionResult { - [Watch (4,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedMessageAttributeOptions:")] - INMessageAttributeOptionsResolutionResult SuccessWithResolvedMessageAttributeOptions (INMessageAttributeOptions resolvedMessageAttributeOptions); - - [Internal] - [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("successWithResolvedValue:")] - INMessageAttributeOptionsResolutionResult SuccessWithResolvedValue (INMessageAttributeOptions resolvedValue); - - [Watch (4,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithMessageAttributeOptionsToConfirm:")] - INMessageAttributeOptionsResolutionResult ConfirmationRequiredWithMessageAttributeOptionsToConfirm (INMessageAttributeOptions messageAttributeOptionsToConfirm); + INMessageAttributeOptionsResolutionResult GetSuccess (INMessageAttributeOptions resolvedValue); - [Internal] - [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INMessageAttributeOptionsResolutionResult ConfirmationRequiredWithValueToConfirm (INMessageAttributeOptions valueToConfirm); + INMessageAttributeOptionsResolutionResult GetConfirmationRequired (INMessageAttributeOptions valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -3072,33 +2425,13 @@ interface INMessageAttributeOptionsResolutionResult { [DisableDefaultCtor] interface INMessageAttributeResolutionResult { - [Watch (4,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedMessageAttribute:")] - INMessageAttributeResolutionResult SuccessWithResolvedMessageAttribute (INMessageAttribute resolvedMessageAttribute); - - [Internal] - [Introduced (PlatformName.MacOSX, 10, 12)] - [Introduced (PlatformName.WatchOS, 3, 2)] - [Introduced (PlatformName.iOS, 10, 0)] [Static] [Export ("successWithResolvedValue:")] - INMessageAttributeResolutionResult SuccessWithResolvedValue (INMessageAttribute resolvedValue); + INMessageAttributeResolutionResult GetSuccess (INMessageAttribute resolvedValue); - [Watch (4,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithMessageAttributeToConfirm:")] - INMessageAttributeResolutionResult ConfirmationRequiredWithMessageAttributeToConfirm (INMessageAttribute messageAttributeToConfirm); - - [Internal] - [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INMessageAttributeResolutionResult ConfirmationRequiredWithValueToConfirm (INMessageAttribute valueToConfirm); + INMessageAttributeResolutionResult GetConfirmationRequired (INMessageAttribute valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -3144,13 +2477,7 @@ interface INPauseWorkoutIntentHandling { void HandlePauseWorkout (INPauseWorkoutIntent intent, Action completion); [Export ("confirmPauseWorkout:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmPauseWorkout -#endif - (INPauseWorkoutIntent intent, Action completion); + void ConfirmPauseWorkout (INPauseWorkoutIntent intent, Action completion); [Export ("resolveWorkoutNameForPauseWorkout:withCompletion:")] void ResolveWorkoutName (INPauseWorkoutIntent intent, Action completion); @@ -3291,10 +2618,6 @@ interface INPerson : NSCopying, NSSecureCoding, INSpeakable { [Unavailable (PlatformName.MacOSX)] [Export ("siriMatches", ArgumentSemantic.Copy), NullAllowed] INPerson [] SiriMatches { get; } - - [Mac (10,13, onlyOn64:true), iOS (11,0), Watch (4,0)] - [Export ("isMe")] - bool IsMe { get; } } [Introduced (PlatformName.iOS, 10, 0)] @@ -3304,7 +2627,7 @@ interface INPerson : NSCopying, NSSecureCoding, INSpeakable { [DisableDefaultCtor] interface INPersonHandle : NSCopying, NSSecureCoding { - [Export ("value"), NullAllowed] + [Export ("value")] string Value { get; } [Export ("type")] @@ -3329,10 +2652,10 @@ interface INPersonHandle : NSCopying, NSSecureCoding { [Introduced (PlatformName.iOS, 10, 2)] [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] [Export ("initWithValue:type:label:"), Protected] - IntPtr Constructor ([NullAllowed] string value, INPersonHandleType type, [NullAllowed] NSString stringLabel); + IntPtr Constructor (string value, INPersonHandleType type, [NullAllowed] NSString stringLabel); [Export ("initWithValue:type:")] - IntPtr Constructor ([NullAllowed] string value, INPersonHandleType type); + IntPtr Constructor (string value, INPersonHandleType type); } [Introduced (PlatformName.iOS, 10, 0)] @@ -3474,29 +2797,13 @@ interface INPriceRange : NSCopying, NSSecureCoding { [DisableDefaultCtor] interface INRadioTypeResolutionResult { - [iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedRadioType:")] - INRadioTypeResolutionResult SuccessWithResolvedRadioType (INRadioType resolvedRadioType); - - [Internal] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("successWithResolvedValue:")] - INRadioTypeResolutionResult SuccessWithResolvedValue (INRadioType resolvedValue); - - [iOS (11,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithRadioTypeToConfirm:")] - INRadioTypeResolutionResult ConfirmationRequiredWithRadioTypeToConfirm (INRadioType radioTypeToConfirm); + INRadioTypeResolutionResult GetSuccess (INRadioType resolvedValue); - [Internal] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INRadioTypeResolutionResult ConfirmationRequiredWithValueToConfirm (INRadioType valueToConfirm); + INRadioTypeResolutionResult GetConfirmationRequired (INRadioType valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -3523,29 +2830,13 @@ interface INRadioTypeResolutionResult { [DisableDefaultCtor] interface INRelativeReferenceResolutionResult { - [iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedRelativeReference:")] - INRelativeReferenceResolutionResult SuccessWithResolvedRelativeReference (INRelativeReference resolvedRelativeReference); - - [Internal] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("successWithResolvedValue:")] - INRelativeReferenceResolutionResult SuccessWithResolvedValue (INRelativeReference resolvedValue); - - [iOS (11,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithRelativeReferenceToConfirm:")] - INRelativeReferenceResolutionResult ConfirmationRequiredWithRelativeReferenceToConfirm (INRelativeReference relativeReferenceToConfirm); + INRelativeReferenceResolutionResult GetSuccess (INRelativeReference resolvedValue); - [Internal] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INRelativeReferenceResolutionResult ConfirmationRequiredWithValueToConfirm (INRelativeReference valueToConfirm); + INRelativeReferenceResolutionResult GetConfirmationRequired (INRelativeReference valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -3572,29 +2863,13 @@ interface INRelativeReferenceResolutionResult { [DisableDefaultCtor] interface INRelativeSettingResolutionResult { - [iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedRelativeSetting:")] - INRelativeSettingResolutionResult SuccessWithResolvedRelativeSetting (INRelativeSetting resolvedRelativeSetting); - - [Internal] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("successWithResolvedValue:")] - INRelativeSettingResolutionResult SuccessWithResolvedValue (INRelativeSetting resolvedValue); - - [iOS (11,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithRelativeSettingToConfirm:")] - INRelativeSettingResolutionResult ConfirmationRequiredWithRelativeSettingToConfirm (INRelativeSetting relativeSettingToConfirm); + INRelativeSettingResolutionResult GetSuccess (INRelativeSetting resolvedValue); - [Internal] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INRelativeSettingResolutionResult ConfirmationRequiredWithValueToConfirm (INRelativeSetting valueToConfirm); + INRelativeSettingResolutionResult GetConfirmationRequired (INRelativeSetting valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -3646,32 +2921,14 @@ interface INRequestPaymentIntentHandling { void HandleRequestPayment (INRequestPaymentIntent intent, Action completion); [Export ("confirmRequestPayment:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmRequestPayment -#endif - (INRequestPaymentIntent intent, Action completion); + void ConfirmRequestPayment (INRequestPaymentIntent intent, Action completion); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolvePayer (INRequestPaymentIntent, Action)' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolvePayer (INRequestPaymentIntent, Action)' instead.")] [Export ("resolvePayerForRequestPayment:withCompletion:")] void ResolvePayer (INRequestPaymentIntent intent, Action completion); - [Watch (4,0), iOS (11,0)] - [Export ("resolvePayerForRequestPayment:completion:")] - void ResolvePayer (INRequestPaymentIntent intent, Action completion); - - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolveCurrencyAmount (INRequestPaymentIntent, Action)' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolveCurrencyAmount (INRequestPaymentIntent, Action)' instead.")] [Export ("resolveCurrencyAmountForRequestPayment:withCompletion:")] void ResolveCurrencyAmount (INRequestPaymentIntent intent, Action completion); - [Watch (4,0), iOS (11,0)] - [Export ("resolveCurrencyAmountForRequestPayment:completion:")] - void ResolveCurrencyAmount (INRequestPaymentIntent intent, Action completion); - [Export ("resolveNoteForRequestPayment:withCompletion:")] void ResolveNote (INRequestPaymentIntent intent, Action completion); } @@ -3741,13 +2998,7 @@ interface INRequestRideIntentHandling { void HandleRequestRide (INRequestRideIntent intent, Action completion); [Export ("confirmRequestRide:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmRequestRide -#endif - (INRequestRideIntent intent, Action completion); + void ConfirmRequestRide (INRequestRideIntent intent, Action completion); [Export ("resolvePickupLocationForRequestRide:withCompletion:")] void ResolvePickupLocation (INRequestRideIntent intent, Action completion); @@ -3811,7 +3062,6 @@ interface INRestaurant : NSSecureCoding, NSCopying { [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.WatchOS)] [BaseType (typeof (INPerson))] - [DisableDefaultCtor] // The base type, INPerson, has no default ctor. interface INRestaurantGuest { [Export ("initWithNameComponents:phoneNumber:emailAddress:")] @@ -4049,13 +3299,7 @@ interface INResumeWorkoutIntentHandling { void HandleResumeWorkout (INResumeWorkoutIntent intent, Action completion); [Export ("confirmResumeWorkout:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmResumeWorkout -#endif - (INResumeWorkoutIntent intent, Action completion); + void ConfirmResumeWorkout (INResumeWorkoutIntent intent, Action completion); [Export ("resolveWorkoutNameForResumeWorkout:withCompletion:")] void ResolveWorkoutName (INResumeWorkoutIntent intent, Action completion); @@ -4095,11 +3339,6 @@ interface INRideCompletionStatus : NSCopying, NSSecureCoding { [Export ("completedWithOutstandingPaymentAmount:")] INRideCompletionStatus GetOutstandingPaymentAmount (INCurrencyAmount outstandingPaymentAmount); - [Watch (4,0), iOS (11,0)] - [Static] - [Export ("completedWithOutstandingFeedbackType:")] - INRideCompletionStatus GetCompleted (INRideFeedbackTypeOptions feedbackType); - [Static] [Export ("canceledByService")] INRideCompletionStatus GetCanceledByService (); @@ -4127,16 +3366,8 @@ interface INRideCompletionStatus : NSCopying, NSSecureCoding { [NullAllowed, Export ("paymentAmount", ArgumentSemantic.Strong)] INCurrencyAmount PaymentAmount { get; } - [Watch (4,0), iOS (11,0)] - [Export ("feedbackType", ArgumentSemantic.Assign)] - INRideFeedbackTypeOptions FeedbackType { get; } - [Export ("outstanding")] bool Outstanding { [Bind ("isOutstanding")] get; } - - [Watch (4,0), iOS (11,0)] - [NullAllowed, Export ("defaultTippingOptions", ArgumentSemantic.Strong)] - NSSet DefaultTippingOptions { get; set; } } [Introduced (PlatformName.iOS, 10, 0)] @@ -4345,7 +3576,7 @@ interface INSaveProfileInCarIntent { [NullAllowed, Export ("profileNumber", ArgumentSemantic.Copy)] NSNumber ProfileNumber { get; } - [Deprecated (PlatformName.iOS, 10,2, message:"Use 'ProfileName' instead.")] + [Deprecated (PlatformName.iOS, 10,2, message:"Use ProfileName instead")] [NullAllowed, Export ("profileLabel")] string ProfileLabel { get; } @@ -4365,13 +3596,7 @@ interface INSaveProfileInCarIntentHandling { void HandleSaveProfileInCar (INSaveProfileInCarIntent intent, Action completion); [Export ("confirmSaveProfileInCar:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSaveProfileInCar -#endif - (INSaveProfileInCarIntent intent, Action completion); + void ConfirmSaveProfileInCar (INSaveProfileInCarIntent intent, Action completion); [Export ("resolveProfileNumberForSaveProfileInCar:withCompletion:")] void ResolveProfileNumber (INSaveProfileInCarIntent intent, Action completion); @@ -4402,24 +3627,10 @@ interface INSaveProfileInCarIntentResponse { [BaseType (typeof (INIntent))] interface INSearchCallHistoryIntent { - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("initWithDateCreated:recipient:callCapabilities:callTypes:unseen:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] INDateComponentsRange dateCreated, [NullAllowed] INPerson recipient, INCallCapabilityOptions callCapabilities, INCallRecordTypeOptions callTypes, [NullAllowed] NSNumber unseen); - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Wrap ("this (dateCreated, recipient, callCapabilities, callTypes, new NSNumber (unseen))")] - IntPtr Constructor ([NullAllowed] INDateComponentsRange dateCreated, [NullAllowed] INPerson recipient, INCallCapabilityOptions callCapabilities, INCallRecordTypeOptions callTypes, bool unseen); - - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use '.ctor (INDateComponentsRange, INPerson, INCallCapabilityOptions, INCallRecordTypeOptions, NSNumber)' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use '.ctor (INDateComponentsRange, INPerson, INCallCapabilityOptions, INCallRecordTypeOptions, NSNumber)' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use '.ctor (INDateComponentsRange, INPerson, INCallCapabilityOptions, INCallRecordTypeOptions, NSNumber)' instead.")] [Export ("initWithCallType:dateCreated:recipient:callCapabilities:")] + [DesignatedInitializer] IntPtr Constructor (INCallRecordType callType, [NullAllowed] INDateComponentsRange dateCreated, [NullAllowed] INPerson recipient, INCallCapabilityOptions callCapabilities); - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CallTypes' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CallTypes' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CallTypes' instead.")] [Export ("callType", ArgumentSemantic.Assign)] INCallRecordType CallType { get; } @@ -4431,15 +3642,6 @@ interface INSearchCallHistoryIntent { [Export ("callCapabilities", ArgumentSemantic.Assign)] INCallCapabilityOptions CallCapabilities { get; } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("callTypes", ArgumentSemantic.Assign)] - INCallRecordTypeOptions CallTypes { get; } - - [Protected] - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [NullAllowed, Export ("unseen", ArgumentSemantic.Copy)] - NSNumber WeakUnseen { get; } } [Introduced (PlatformName.iOS, 10, 0)] @@ -4453,17 +3655,8 @@ interface INSearchCallHistoryIntentHandling { void HandleSearchCallHistory (INSearchCallHistoryIntent intent, Action completion); [Export ("confirmSearchCallHistory:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSearchCallHistory -#endif - (INSearchCallHistoryIntent intent, Action completion); + void ConfirmSearchCallHistory (INSearchCallHistoryIntent intent, Action completion); - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'ResolveCallTypes' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolveCallTypes' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolveCallTypes' instead.")] [Export ("resolveCallTypeForSearchCallHistory:withCompletion:")] void ResolveCallType (INSearchCallHistoryIntent intent, Action completion); @@ -4472,14 +3665,6 @@ interface INSearchCallHistoryIntentHandling { [Export ("resolveRecipientForSearchCallHistory:withCompletion:")] void ResolveRecipient (INSearchCallHistoryIntent intent, Action completion); - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("resolveCallTypesForSearchCallHistory:withCompletion:")] - void ResolveCallTypes (INSearchCallHistoryIntent intent, Action completion); - - [Watch (4,0), NoMac, iOS (11,0)] - [Export ("resolveUnseenForSearchCallHistory:withCompletion:")] - void ResolveUnseen (INSearchCallHistoryIntent intent, Action completion); } [Introduced (PlatformName.iOS, 10, 0)] @@ -4495,10 +3680,6 @@ interface INSearchCallHistoryIntentResponse { [Export ("code")] INSearchCallHistoryIntentResponseCode Code { get; } - - [Mac (10,13, onlyOn64:true), iOS (11,0), Watch (4,0)] - [NullAllowed, Export ("callRecords", ArgumentSemantic.Copy)] - INCallRecord [] CallRecords { get; set; } } [Introduced (PlatformName.iOS, 10, 0)] @@ -4507,15 +3688,8 @@ interface INSearchCallHistoryIntentResponse { [BaseType (typeof (INIntent))] interface INSearchForMessagesIntent { - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("initWithRecipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:speakableGroupNames:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] INPerson [] recipients, [NullAllowed] INPerson [] senders, [NullAllowed] string [] searchTerms, INMessageAttributeOptions attributes, [NullAllowed] INDateComponentsRange dateTimeRange, [NullAllowed] string [] identifiers, [NullAllowed] string [] notificationIdentifiers, [NullAllowed] INSpeakableString [] speakableGroupNames); - - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")] [Export ("initWithRecipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:groupNames:")] + [DesignatedInitializer] IntPtr Constructor ([NullAllowed] INPerson [] recipients, [NullAllowed] INPerson [] senders, [NullAllowed] string [] searchTerms, INMessageAttributeOptions attributes, [NullAllowed] INDateComponentsRange dateTimeRange, [NullAllowed] string [] identifiers, [NullAllowed] string [] notificationIdentifiers, [NullAllowed] string [] groupNames); [NullAllowed, Export ("recipients", ArgumentSemantic.Copy)] @@ -4554,25 +3728,11 @@ interface INSearchForMessagesIntent { [Export ("notificationIdentifiersOperator", ArgumentSemantic.Assign)] INConditionalOperator NotificationIdentifiersOperator { get; } - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'SpeakableGroupNames' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SpeakableGroupNames' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SpeakableGroupNames' instead.")] [NullAllowed, Export ("groupNames", ArgumentSemantic.Copy)] string [] GroupNames { get; } - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'SpeakableGroupNamesOperator' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SpeakableGroupNamesOperator' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SpeakableGroupNamesOperator' instead.")] [Export ("groupNamesOperator", ArgumentSemantic.Assign)] INConditionalOperator GroupNamesOperator { get; } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [NullAllowed, Export ("speakableGroupNames", ArgumentSemantic.Copy)] - INSpeakableString [] SpeakableGroupNames { get; } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("speakableGroupNamesOperator", ArgumentSemantic.Assign)] - INConditionalOperator SpeakableGroupNamesOperator { get; } } [Introduced (PlatformName.iOS, 10, 0)] @@ -4586,13 +3746,7 @@ interface INSearchForMessagesIntentHandling { void HandleSearchForMessages (INSearchForMessagesIntent intent, Action completion); [Export ("confirmSearchForMessages:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSearchForMessages -#endif - (INSearchForMessagesIntent intent, Action completion); + void ConfirmSearchForMessages (INSearchForMessagesIntent intent, Action completion); [Export ("resolveRecipientsForSearchForMessages:withCompletion:")] void ResolveRecipients (INSearchForMessagesIntent intent, Action completion); @@ -4606,15 +3760,8 @@ interface INSearchForMessagesIntentHandling { [Export ("resolveDateTimeRangeForSearchForMessages:withCompletion:")] void ResolveDateTimeRange (INSearchForMessagesIntent intent, Action completion); - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'ResolveSpeakableGroupNames' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolveSpeakableGroupNames' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolveSpeakableGroupNames' instead.")] [Export ("resolveGroupNamesForSearchForMessages:withCompletion:")] void ResolveGroupNames (INSearchForMessagesIntent intent, Action completion); - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("resolveSpeakableGroupNamesForSearchForMessages:withCompletion:")] - void ResolveSpeakableGroupNames (INSearchForMessagesIntent intent, Action completion); } [Introduced (PlatformName.iOS, 10, 0)] @@ -4684,13 +3831,7 @@ interface INSearchForPhotosIntentHandling { void HandleSearchForPhotos (INSearchForPhotosIntent intent, Action completion); [Export ("confirmSearchForPhotos:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSearchForPhotos -#endif - (INSearchForPhotosIntent intent, Action completion); + void ConfirmSearchForPhotos (INSearchForPhotosIntent intent, Action completion); [Export ("resolveDateCreatedForSearchForPhotos:withCompletion:")] void ResolveDateCreated (INSearchForPhotosIntent intent, Action completion); @@ -4701,10 +3842,6 @@ interface INSearchForPhotosIntentHandling { [Export ("resolveAlbumNameForSearchForPhotos:withCompletion:")] void ResolveAlbumName (INSearchForPhotosIntent intent, Action completion); - [Watch (4,0), iOS (11,0)] - [Export ("resolveSearchTermsForSearchForPhotos:withCompletion:")] - void ResolveSearchTerms (INSearchForPhotosIntent intent, Action completion); - [Export ("resolvePeopleInPhotoForSearchForPhotos:withCompletion:")] void ResolvePeopleInPhoto (INSearchForPhotosIntent intent, Action completion); } @@ -4733,15 +3870,8 @@ interface INSearchForPhotosIntentResponse { [BaseType (typeof (INIntent))] interface INSendMessageIntent { - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("initWithRecipients:content:speakableGroupName:conversationIdentifier:serviceName:sender:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] INPerson [] recipients, [NullAllowed] string content, [NullAllowed] INSpeakableString speakableGroupName, [NullAllowed] string conversationIdentifier, [NullAllowed] string serviceName, [NullAllowed] INPerson sender); - - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use '.ctor (INPerson [], string, INSpeakableString, string, string, INPerson)' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use '.ctor (INPerson [], string, INSpeakableString, string, string, INPerson)' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use '.ctor (INPerson [], string, INSpeakableString, string, string, INPerson)' instead.")] [Export ("initWithRecipients:content:groupName:serviceName:sender:")] + [DesignatedInitializer] IntPtr Constructor ([NullAllowed] INPerson [] recipients, [NullAllowed] string content, [NullAllowed] string groupName, [NullAllowed] string serviceName, [NullAllowed] INPerson sender); [NullAllowed, Export ("recipients", ArgumentSemantic.Copy)] @@ -4750,17 +3880,6 @@ interface INSendMessageIntent { [NullAllowed, Export ("content")] string Content { get; } - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [NullAllowed, Export ("speakableGroupName", ArgumentSemantic.Copy)] - INSpeakableString SpeakableGroupName { get; } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [NullAllowed, Export ("conversationIdentifier")] - string ConversationIdentifier { get; } - - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'SpeakableGroupNames' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SpeakableGroupNames' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SpeakableGroupNames' instead.")] [NullAllowed, Export ("groupName")] string GroupName { get; } @@ -4782,36 +3901,16 @@ interface INSendMessageIntentHandling { void HandleSendMessage (INSendMessageIntent intent, Action completion); [Export ("confirmSendMessage:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSendMessage -#endif - (INSendMessageIntent intent, Action completion); + void ConfirmSendMessage (INSendMessageIntent intent, Action completion); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolveRecipients (INSendMessageIntent, Action)' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolveRecipients (INSendMessageIntent, Action)' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'ResolveRecipients (INSendMessageIntent, Action)' instead.")] [Export ("resolveRecipientsForSendMessage:withCompletion:")] void ResolveRecipients (INSendMessageIntent intent, Action completion); - [Watch (4,0), iOS (11,0), Mac (10,13, onlyOn64:true)] - [Export ("resolveRecipientsForSendMessage:completion:")] - void ResolveRecipients (INSendMessageIntent intent, Action completion); - [Export ("resolveContentForSendMessage:withCompletion:")] void ResolveContent (INSendMessageIntent intent, Action completion); - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'ResolveSpeakableGroupName' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolveSpeakableGroupName' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolveSpeakableGroupName' instead.")] [Export ("resolveGroupNameForSendMessage:withCompletion:")] void ResolveGroupName (INSendMessageIntent intent, Action completion); - - [Watch (4,0), iOS (11,0), Mac (10,13, onlyOn64:true)] - [Export ("resolveSpeakableGroupNameForSendMessage:withCompletion:")] - void ResolveSpeakableGroupName (INSendMessageIntent intent, Action completion); } [Introduced (PlatformName.iOS, 10, 0)] @@ -4827,10 +3926,6 @@ interface INSendMessageIntentResponse { [Export ("code")] INSendMessageIntentResponseCode Code { get; } - - [Watch (4,0), iOS (11,0), Mac (10,13, onlyOn64:true)] - [NullAllowed, Export ("sentMessage", ArgumentSemantic.Copy)] - INMessage SentMessage { get; set; } } [Introduced (PlatformName.iOS, 10, 0)] @@ -4864,32 +3959,14 @@ interface INSendPaymentIntentHandling { void HandleSendPayment (INSendPaymentIntent intent, Action completion); [Export ("confirmSendPayment:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSendPayment -#endif - (INSendPaymentIntent intent, Action completion); + void ConfirmSendPayment (INSendPaymentIntent intent, Action completion); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolvePayee (INSendPaymentIntent, Action)' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolvePayee (INSendPaymentIntent, Action)' instead.")] [Export ("resolvePayeeForSendPayment:withCompletion:")] void ResolvePayee (INSendPaymentIntent intent, Action completion); - [Watch (4,0), iOS (11,0)] - [Export ("resolvePayeeForSendPayment:completion:")] - void ResolvePayee (INSendPaymentIntent intent, Action completion); - - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolveCurrencyAmount (INSendPaymentIntent, Action)' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolveCurrencyAmount (INSendPaymentIntent, Action)' instead.")] [Export ("resolveCurrencyAmountForSendPayment:withCompletion:")] void ResolveCurrencyAmount (INSendPaymentIntent intent, Action completion); - [Watch (4,0), iOS (11,0)] - [Export ("resolveCurrencyAmountForSendPayment:completion:")] - void ResolveCurrencyAmount (INSendPaymentIntent intent, Action completion); - [Export ("resolveNoteForSendPayment:withCompletion:")] void ResolveNote (INSendPaymentIntent intent, Action completion); } @@ -4940,13 +4017,7 @@ interface INSetAudioSourceInCarIntentHandling { void HandleSetAudioSourceInCar (INSetAudioSourceInCarIntent intent, Action completion); [Export ("confirmSetAudioSourceInCar:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSetAudioSourceInCar -#endif - (INSetAudioSourceInCarIntent intent, Action completion); + void ConfirmSetAudioSourceInCar (INSetAudioSourceInCarIntent intent, Action completion); [Export ("resolveAudioSourceForSetAudioSourceInCar:withCompletion:")] void ResolveAudioSource (INSetAudioSourceInCarIntent intent, Action completion); @@ -5034,13 +4105,7 @@ interface INSetClimateSettingsInCarIntentHandling { void HandleSetClimateSettingsInCar (INSetClimateSettingsInCarIntent intent, Action completion); [Export ("confirmSetClimateSettingsInCar:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSetClimateSettingsInCar -#endif - (INSetClimateSettingsInCarIntent intent, Action completion); + void ConfirmSetClimateSettingsInCar (INSetClimateSettingsInCarIntent intent, Action completion); [Export ("resolveEnableFanForSetClimateSettingsInCar:withCompletion:")] void ResolveEnableFan (INSetClimateSettingsInCarIntent intent, Action completion); @@ -5121,13 +4186,7 @@ interface INSetDefrosterSettingsInCarIntentHandling { void HandleSetDefrosterSettingsInCar (INSetDefrosterSettingsInCarIntent intent, Action completion); [Export ("confirmSetDefrosterSettingsInCar:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSetDefrosterSettingsInCar -#endif - (INSetDefrosterSettingsInCarIntent intent, Action completion); + void ConfirmSetDefrosterSettingsInCar (INSetDefrosterSettingsInCarIntent intent, Action completion); [Export ("resolveEnableForSetDefrosterSettingsInCar:withCompletion:")] void ResolveEnable (INSetDefrosterSettingsInCarIntent intent, Action completion); @@ -5179,13 +4238,7 @@ interface INSetMessageAttributeIntentHandling { void HandleSetMessageAttribute (INSetMessageAttributeIntent intent, Action completion); [Export ("confirmSetMessageAttribute:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSetMessageAttribute -#endif - (INSetMessageAttributeIntent intent, Action completion); + void ConfirmSetMessageAttribute (INSetMessageAttributeIntent intent, Action completion); [Export ("resolveAttributeForSetMessageAttribute:withCompletion:")] void ResolveAttribute (INSetMessageAttributeIntent intent, Action completion); @@ -5223,7 +4276,7 @@ interface INSetProfileInCarIntent { [NullAllowed, Export ("profileNumber", ArgumentSemantic.Copy)] NSNumber ProfileNumber { get; } - [Deprecated (PlatformName.iOS, 10, 2, message: "Use 'ProfileName' instead.")] + [Deprecated (PlatformName.iOS, 10, 2, message: "Use ProfileName instead")] [NullAllowed, Export ("profileLabel")] string ProfileLabel { get; } @@ -5247,18 +4300,11 @@ interface INSetProfileInCarIntentHandling { void HandleSetProfileInCar (INSetProfileInCarIntent intent, Action completion); [Export ("confirmSetProfileInCar:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSetProfileInCar -#endif - (INSetProfileInCarIntent intent, Action completion); + void ConfirmSetProfileInCar (INSetProfileInCarIntent intent, Action completion); [Export ("resolveProfileNumberForSetProfileInCar:withCompletion:")] void ResolveProfileNumber (INSetProfileInCarIntent intent, Action completion); - [Deprecated (PlatformName.iOS, 11, 0, message: "The property doesn't need to be resolved.")] [Export ("resolveDefaultProfileForSetProfileInCar:withCompletion:")] void ResolveDefaultProfile (INSetProfileInCarIntent intent, Action completion); @@ -5319,13 +4365,7 @@ interface INSetRadioStationIntentHandling { void HandleSetRadioStation (INSetRadioStationIntent intent, Action completion); [Export ("confirmSetRadioStation:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSetRadioStation -#endif - (INSetRadioStationIntent intent, Action completion); + void ConfirmSetRadioStation (INSetRadioStationIntent intent, Action completion); [Export ("resolveRadioTypeForSetRadioStation:withCompletion:")] void ResolveRadioType (INSetRadioStationIntent intent, Action completion); @@ -5402,13 +4442,7 @@ interface INSetSeatSettingsInCarIntentHandling { void HandleSetSeatSettingsInCar (INSetSeatSettingsInCarIntent intent, Action completion); [Export ("confirmSetSeatSettingsInCar:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSetSeatSettingsInCar -#endif - (INSetSeatSettingsInCarIntent intent, Action completion); + void ConfirmSetSeatSettingsInCar (INSetSeatSettingsInCarIntent intent, Action completion); [Export ("resolveEnableHeatingForSetSeatSettingsInCar:withCompletion:")] void ResolveEnableHeating (INSetSeatSettingsInCarIntent intent, Action completion); @@ -5444,8 +4478,6 @@ interface INSetSeatSettingsInCarIntentResponse { INSetSeatSettingsInCarIntentResponseCode Code { get; } } - interface IINSpeakable { } - [Introduced (PlatformName.iOS, 10, 0)] [Introduced (PlatformName.MacOSX, 10, 12, PlatformArchitecture.Arch64)] [Introduced (PlatformName.WatchOS, 3, 2)] @@ -5460,26 +4492,7 @@ interface INSpeakable { [NullAllowed, Export ("pronunciationHint")] string PronunciationHint { get; } - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] -#if XAMCORE_4_0 - [Abstract] -#endif - [NullAllowed, Export ("vocabularyIdentifier")] - string VocabularyIdentifier { get; } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] -#if XAMCORE_4_0 - [Abstract] -#endif - [NullAllowed, Export ("alternativeSpeakableMatches")] - IINSpeakable [] AlternativeSpeakableMatches { get; } - - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'VocabularyIdentifier' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'VocabularyIdentifier' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'VocabularyIdentifier' instead.")] -#if !XAMCORE_4_0 // Apple made this @optional in iOS 11 [Abstract] -#endif [NullAllowed, Export ("identifier")] string Identifier { get; } } @@ -5491,14 +4504,9 @@ interface INSpeakable { [DisableDefaultCtor] interface INSpeakableString : INSpeakable { - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Internal] - [Export ("initWithVocabularyIdentifier:spokenPhrase:pronunciationHint:")] - IntPtr InitWithVocabularyIdentifier (string vocabularyIdentifier, string spokenPhrase, [NullAllowed] string pronunciationHint); - - [Internal] [Export ("initWithIdentifier:spokenPhrase:pronunciationHint:")] - IntPtr InitWithIdentifier (string identifier, string spokenPhrase, [NullAllowed] string pronunciationHint); + [DesignatedInitializer] + IntPtr Constructor (string identifier, string spokenPhrase, [NullAllowed] string pronunciationHint); [Introduced (PlatformName.iOS, 10, 2)] [Introduced (PlatformName.MacOSX, 10, 12, 2, PlatformArchitecture.Arch64)] @@ -5550,20 +4558,9 @@ interface INSpeakableStringResolutionResult { [BaseType (typeof (INIntent))] interface INStartAudioCallIntent { - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use '.ctor (INCallDestinationType, INPerson [])' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use '.ctor (INCallDestinationType, INPerson [])' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use '.ctor (INCallDestinationType, INPerson [])' instead.")] [Export ("initWithContacts:")] - IntPtr Constructor ([NullAllowed] INPerson [] contacts); - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("initWithDestinationType:contacts:")] [DesignatedInitializer] - IntPtr Constructor (INCallDestinationType destinationType, [NullAllowed] INPerson [] contacts); - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("destinationType", ArgumentSemantic.Assign)] - INCallDestinationType DestinationType { get; } + IntPtr Constructor ([NullAllowed] INPerson [] contacts); [NullAllowed, Export ("contacts", ArgumentSemantic.Copy)] INPerson [] Contacts { get; } @@ -5580,17 +4577,7 @@ interface INStartAudioCallIntentHandling { void HandleStartAudioCall (INStartAudioCallIntent intent, Action completion); [Export ("confirmStartAudioCall:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmStartAudioCall -#endif - (INStartAudioCallIntent intent, Action completion); - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [Export ("resolveDestinationTypeForStartAudioCall:withCompletion:")] - void ResolveDestinationType (INStartAudioCallIntent intent, Action completion); + void ConfirmStartAudioCall (INStartAudioCallIntent intent, Action completion); [Export ("resolveContactsForStartAudioCall:withCompletion:")] void ResolveContacts (INStartAudioCallIntent intent, Action completion); @@ -5660,13 +4647,7 @@ interface INStartPhotoPlaybackIntentHandling { void HandleStartPhotoPlayback (INStartPhotoPlaybackIntent intent, Action completion); [Export ("confirmStartPhotoPlayback:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmStartPhotoPlayback -#endif - (INStartPhotoPlaybackIntent intent, Action completion); + void ConfirmStartPhotoPlayback (INStartPhotoPlaybackIntent intent, Action completion); [Export ("resolveDateCreatedForStartPhotoPlayback:withCompletion:")] void ResolveDateCreated (INStartPhotoPlaybackIntent intent, Action completion); @@ -5724,13 +4705,7 @@ interface INStartVideoCallIntentHandling { void HandleStartVideoCall (INStartVideoCallIntent intent, Action completion); [Export ("confirmStartVideoCall:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmStartVideoCall -#endif - (INStartVideoCallIntent intent, Action completion); + void ConfirmStartVideoCall (INStartVideoCallIntent intent, Action completion); [Export ("resolveContactsForStartVideoCall:withCompletion:")] void ResolveContacts (INStartVideoCallIntent intent, Action completion); @@ -5790,13 +4765,7 @@ interface INStartWorkoutIntentHandling { void HandleStartWorkout (INStartWorkoutIntent intent, Action completion); [Export ("confirmStartWorkout:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmStartWorkout -#endif - (INStartWorkoutIntent intent, Action completion); + void ConfirmStartWorkout (INStartWorkoutIntent intent, Action completion); [Export ("resolveWorkoutNameForStartWorkout:withCompletion:")] void ResolveWorkoutName (INStartWorkoutIntent intent, Action completion); @@ -5936,16 +4905,11 @@ interface INVocabulary { [Export ("sharedVocabulary")] INVocabulary SharedVocabulary { get; } - [Advice ("This API is not allowed in extensions.")] + [Advice ("This API is not allowed in extensions")] [Export ("setVocabularyStrings:ofType:")] void SetVocabularyStrings (NSOrderedSet vocabulary, INVocabularyStringType type); - [Advice ("This API is not allowed in extensions.")] - [iOS (11,0)] - [Export ("setVocabulary:ofType:")] - void SetVocabulary (NSOrderedSet vocabulary, INVocabularyStringType type); - - [Advice ("This API is not allowed in extensions.")] + [Advice ("This API is not allowed in extensions")] [Export ("removeAllVocabularyStrings")] void RemoveAllVocabularyStrings (); } @@ -5957,31 +4921,13 @@ interface INVocabulary { [BaseType (typeof (INIntentResolutionResult))] interface INWorkoutGoalUnitTypeResolutionResult { - [Watch (4,0), iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedWorkoutGoalUnitType:")] - INWorkoutGoalUnitTypeResolutionResult SuccessWithResolvedWorkoutGoalUnitType (INWorkoutGoalUnitType resolvedWorkoutGoalUnitType); - - [Internal] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("successWithResolvedValue:")] - INWorkoutGoalUnitTypeResolutionResult SuccessWithResolvedValue (INWorkoutGoalUnitType resolvedValue); + INWorkoutGoalUnitTypeResolutionResult GetSuccess (INWorkoutGoalUnitType resolvedValue); - [Watch (4,0), iOS (11,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithWorkoutGoalUnitTypeToConfirm:")] - INWorkoutGoalUnitTypeResolutionResult ConfirmationRequiredWithWorkoutGoalUnitTypeToConfirm (INWorkoutGoalUnitType workoutGoalUnitTypeToConfirm); - - [Internal] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INWorkoutGoalUnitTypeResolutionResult ConfirmationRequiredWithValueToConfirm (INWorkoutGoalUnitType valueToConfirm); + INWorkoutGoalUnitTypeResolutionResult GetConfirmationRequired (INWorkoutGoalUnitType valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -6009,31 +4955,13 @@ interface INWorkoutGoalUnitTypeResolutionResult { [BaseType (typeof (INIntentResolutionResult))] interface INWorkoutLocationTypeResolutionResult { - [Watch (4,0), iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedWorkoutLocationType:")] - INWorkoutLocationTypeResolutionResult SuccessWithResolvedWorkoutLocationType (INWorkoutLocationType resolvedWorkoutLocationType); - - [Internal] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("successWithResolvedValue:")] - INWorkoutLocationTypeResolutionResult SuccessWithResolvedValue (INWorkoutLocationType resolvedValue); + INWorkoutLocationTypeResolutionResult GetSuccess (INWorkoutLocationType resolvedValue); - [Watch (4,0), iOS (11,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithWorkoutLocationTypeToConfirm:")] - INWorkoutLocationTypeResolutionResult ConfirmationRequiredWithWorkoutLocationTypeToConfirm (INWorkoutLocationType workoutLocationTypeToConfirm); - - [Internal] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INWorkoutLocationTypeResolutionResult ConfirmationRequiredWithValueToConfirm (INWorkoutLocationType valueToConfirm); + INWorkoutLocationTypeResolutionResult GetConfirmationRequired (INWorkoutLocationType valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -6094,13 +5022,7 @@ interface INActivateCarSignalIntentHandling { void HandleActivateCarSignal (INActivateCarSignalIntent intent, Action completion); [Export ("confirmActivateCarSignal:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmActivateCarSignal -#endif - (INActivateCarSignalIntent intent, Action completion); + void ConfirmActivateCarSignal (INActivateCarSignalIntent intent, Action completion); [Export ("resolveCarNameForActivateCarSignal:withCompletion:")] void ResolveCarName (INActivateCarSignalIntent intent, Action completion); @@ -6211,31 +5133,13 @@ interface INBillPayeeResolutionResult { [DisableDefaultCtor] interface INBillTypeResolutionResult { - [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Internal] [Static] [Export ("successWithResolvedValue:")] - INBillTypeResolutionResult SuccessWithResolvedValue (INBillType resolvedValue); - - [iOS (11,0), Watch (4,0)] - [Internal] - [Static] - [Export ("successWithResolvedBillType:")] - INBillTypeResolutionResult SuccessWithResolvedBillType (INBillType resolvedBillType); + INBillTypeResolutionResult GetSuccess (INBillType resolvedValue); - [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Internal] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INBillTypeResolutionResult ConfirmationRequiredWithValueToConfirm (INBillType valueToConfirm); - - [iOS (11,0), Watch (4,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithBillTypeToConfirm:")] - INBillTypeResolutionResult ConfirmationRequiredWithBillTypeToConfirm (INBillType billTypeToConfirm); + INBillTypeResolutionResult GetConfirmationRequired (INBillType valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -6263,31 +5167,13 @@ interface INBillTypeResolutionResult { [DisableDefaultCtor] interface INCarSignalOptionsResolutionResult { - [iOS (11,0), Watch (4,0)] - [Internal] - [Static] - [Export ("successWithResolvedCarSignalOptions:")] - INCarSignalOptionsResolutionResult SuccessWithResolvedCarSignalOptions (INCarSignalOptions resolvedCarSignalOptions); - - [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Internal] [Static] [Export ("successWithResolvedValue:")] - INCarSignalOptionsResolutionResult SuccessWithResolvedValue (INCarSignalOptions resolvedValue); - - [iOS (11,0), Watch (4,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithCarSignalOptionsToConfirm:")] - INCarSignalOptionsResolutionResult ConfirmationRequiredWithCarSignalOptionsToConfirm (INCarSignalOptions carSignalOptionsToConfirm); + INCarSignalOptionsResolutionResult GetSuccess (INCarSignalOptions resolvedValue); - [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Internal] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INCarSignalOptionsResolutionResult ConfirmationRequiredWithValueToConfirm (INCarSignalOptions valueToConfirm); + INCarSignalOptionsResolutionResult GetConfirmationRequired (INCarSignalOptions valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -6334,13 +5220,7 @@ interface INGetCarLockStatusIntentHandling { void HandleGetCarLockStatus (INGetCarLockStatusIntent intent, Action completion); [Export ("confirmGetCarLockStatus:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmGetCarLockStatus -#endif - (INGetCarLockStatusIntent intent, Action completion); + void ConfirmGetCarLockStatus (INGetCarLockStatusIntent intent, Action completion); [Export ("resolveCarNameForGetCarLockStatus:withCompletion:")] void ResolveCarName (INGetCarLockStatusIntent intent, Action completion); @@ -6394,13 +5274,7 @@ interface INGetCarPowerLevelStatusIntentHandling { void HandleGetCarPowerLevelStatus (INGetCarPowerLevelStatusIntent intent, Action completion); [Export ("confirmGetCarPowerLevelStatus:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmGetCarPowerLevelStatus -#endif - (INGetCarPowerLevelStatusIntent intent, Action completion); + void ConfirmGetCarPowerLevelStatus (INGetCarPowerLevelStatusIntent intent, Action completion); [Export ("resolveCarNameForGetCarPowerLevelStatus:withCompletion:")] void ResolveCarName (INGetCarPowerLevelStatusIntent intent, Action completion); @@ -6487,13 +5361,7 @@ interface INPayBillIntentHandling { void HandlePayBill (INPayBillIntent intent, Action completion); [Export ("confirmPayBill:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmPayBill -#endif - (INPayBillIntent intent, Action completion); + void ConfirmPayBill (INPayBillIntent intent, Action completion); [Export ("resolveBillPayeeForPayBill:withCompletion:")] void ResolveBillPayee (INPayBillIntent intent, Action completion); @@ -6554,16 +5422,10 @@ interface INPayBillIntentResponse { [BaseType (typeof (NSObject))] interface INPaymentAccount : NSCopying, NSSecureCoding { - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Please use '.ctor (INSpeakableString, string, INAccountType, INSpeakableString, INBalanceAmount, INBalanceAmount)' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Please use '.ctor (INSpeakableString, string, INAccountType, INSpeakableString, INBalanceAmount, INBalanceAmount)' instead.")] + [DesignatedInitializer] [Export ("initWithNickname:number:accountType:organizationName:")] IntPtr Constructor (INSpeakableString nickname, [NullAllowed] string accountNumber, INAccountType accountType, [NullAllowed] INSpeakableString organizationName); - [Watch (4,0), iOS (11,0)] - [Export ("initWithNickname:number:accountType:organizationName:balance:secondaryBalance:")] - [DesignatedInitializer] - IntPtr Constructor (INSpeakableString nickname, [NullAllowed] string accountNumber, INAccountType accountType, [NullAllowed] INSpeakableString organizationName, [NullAllowed] INBalanceAmount balance, [NullAllowed] INBalanceAmount secondaryBalance); - [Export ("nickname", ArgumentSemantic.Copy), NullAllowed] INSpeakableString Nickname { get; } @@ -6575,14 +5437,6 @@ interface INPaymentAccount : NSCopying, NSSecureCoding { [Export ("organizationName", ArgumentSemantic.Copy), NullAllowed] INSpeakableString OrganizationName { get; } - - [Watch (4,0), iOS (11,0)] - [NullAllowed, Export ("balance", ArgumentSemantic.Copy)] - INBalanceAmount Balance { get; } - - [Watch (4,0), iOS (11,0)] - [NullAllowed, Export ("secondaryBalance", ArgumentSemantic.Copy)] - INBalanceAmount SecondaryBalance { get; } } [Introduced (PlatformName.iOS, 10, 3)] @@ -6686,31 +5540,13 @@ interface INPaymentAmountResolutionResult { [DisableDefaultCtor] interface INPaymentStatusResolutionResult { - [Watch (4,0), iOS (11,0)] - [Internal] - [Static] - [Export ("successWithResolvedPaymentStatus:")] - INPaymentStatusResolutionResult SuccessWithResolvedPaymentStatus (INPaymentStatus resolvedPaymentStatus); - - [Internal] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("successWithResolvedValue:")] - INPaymentStatusResolutionResult SuccessWithResolvedValue (INPaymentStatus resolvedValue); - - [Watch (4,0), iOS (11,0)] - [Internal] - [Static] - [Export ("confirmationRequiredWithPaymentStatusToConfirm:")] - INPaymentStatusResolutionResult ConfirmationRequiredWithPaymentStatusToConfirm (INPaymentStatus paymentStatusToConfirm); + INPaymentStatusResolutionResult GetSuccess (INPaymentStatus resolvedValue); - [Internal] - [Deprecated (PlatformName.WatchOS, 4, 0)] - [Deprecated (PlatformName.iOS, 11, 0)] [Static] [Export ("confirmationRequiredWithValueToConfirm:")] - INPaymentStatusResolutionResult ConfirmationRequiredWithValueToConfirm (INPaymentStatus valueToConfirm); + INPaymentStatusResolutionResult GetConfirmationRequired (INPaymentStatus valueToConfirm); // Fixes bug 43205. We need to return the inherited type not the base type // because users won't be able to downcast easily @@ -6771,13 +5607,7 @@ interface INSearchForBillsIntentHandling { void HandleSearch (INSearchForBillsIntent intent, Action completion); [Export ("confirmSearchForBills:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSearch -#endif - (INSearchForBillsIntent intent, Action completion); + void ConfirmSearch (INSearchForBillsIntent intent, Action completion); [Export ("resolveBillPayeeForSearchForBills:withCompletion:")] void ResolveBillPayee (INSearchForBillsIntent intent, Action completion); @@ -6847,13 +5677,7 @@ interface INSetCarLockStatusIntentHandling { void HandleSetCarLockStatus (INSetCarLockStatusIntent intent, Action completion); [Export ("confirmSetCarLockStatus:completion:")] - void -#if XAMCORE_4_0 // Follow Swift's naming, fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=59164 - Confirm -#else - ConfirmSetCarLockStatus -#endif - (INSetCarLockStatusIntent intent, Action completion); + void ConfirmSetCarLockStatus (INSetCarLockStatusIntent intent, Action completion); [Export ("resolveLockedForSetCarLockStatus:withCompletion:")] void ResolveLocked (INSetCarLockStatusIntent intent, Action completion); @@ -6894,1598 +5718,5 @@ interface INActivateCarSignalIntentResponse { [Export ("signals")] INCarSignalOptions Signals { get; set; } } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INAccountTypeResolutionResult { - - [Static] - [Export ("successWithResolvedAccountType:")] - INAccountTypeResolutionResult GetSuccess (INAccountType resolvedAccountType); - - [Static] - [Export ("confirmationRequiredWithAccountTypeToConfirm:")] - INAccountTypeResolutionResult GetConfirmationRequired (INAccountType accountTypeToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INAccountTypeResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INAccountTypeResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INAccountTypeResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntent))] - interface INAddTasksIntent { - - [Export ("initWithTargetTaskList:taskTitles:spatialEventTrigger:temporalEventTrigger:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] INTaskList targetTaskList, [NullAllowed] INSpeakableString[] taskTitles, [NullAllowed] INSpatialEventTrigger spatialEventTrigger, [NullAllowed] INTemporalEventTrigger temporalEventTrigger); - - [NullAllowed, Export ("targetTaskList", ArgumentSemantic.Copy)] - INTaskList TargetTaskList { get; } - - [NullAllowed, Export ("taskTitles", ArgumentSemantic.Copy)] - INSpeakableString [] TaskTitles { get; } - - [NullAllowed, Export ("spatialEventTrigger", ArgumentSemantic.Copy)] - INSpatialEventTrigger SpatialEventTrigger { get; } - - [NullAllowed, Export ("temporalEventTrigger", ArgumentSemantic.Copy)] - INTemporalEventTrigger TemporalEventTrigger { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Protocol] - interface INAddTasksIntentHandling { - - [Abstract] - [Export ("handleAddTasks:completion:")] - void HandleAddTasks (INAddTasksIntent intent, Action completion); - - [Export ("confirmAddTasks:completion:")] - void Confirm (INAddTasksIntent intent, Action completion); - - [Export ("resolveTargetTaskListForAddTasks:withCompletion:")] - void ResolveTargetTaskList (INAddTasksIntent intent, Action completion); - - [Export ("resolveTaskTitlesForAddTasks:withCompletion:")] - void ResolveTaskTitles (INAddTasksIntent intent, Action completion); - - [Export ("resolveSpatialEventTriggerForAddTasks:withCompletion:")] - void ResolveSpatialEventTrigger (INAddTasksIntent intent, Action completion); - - [Export ("resolveTemporalEventTriggerForAddTasks:withCompletion:")] - void ResolveTemporalEventTrigger (INAddTasksIntent intent, Action completion); - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResponse))] - [DisableDefaultCtor] - interface INAddTasksIntentResponse { - - [Export ("initWithCode:userActivity:")] - [DesignatedInitializer] - IntPtr Constructor (INAddTasksIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); - - [Export ("code")] - INAddTasksIntentResponseCode Code { get; } - - [NullAllowed, Export ("modifiedTaskList", ArgumentSemantic.Copy)] - INTaskList ModifiedTaskList { get; set; } - - [NullAllowed, Export ("addedTasks", ArgumentSemantic.Copy)] - INTask [] AddedTasks { get; set; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntent))] - interface INAppendToNoteIntent { - - [Export ("initWithTargetNote:content:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] INNote targetNote, [NullAllowed] INNoteContent content); - - [NullAllowed, Export ("targetNote", ArgumentSemantic.Copy)] - INNote TargetNote { get; } - - [NullAllowed, Export ("content", ArgumentSemantic.Copy)] - INNoteContent Content { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Protocol] - interface INAppendToNoteIntentHandling { - - [Abstract] - [Export ("handleAppendToNote:completion:")] - void HandleAppendToNote (INAppendToNoteIntent intent, Action completion); - - [Export ("confirmAppendToNote:completion:")] - void Confirm (INAppendToNoteIntent intent, Action completion); - - [Export ("resolveTargetNoteForAppendToNote:withCompletion:")] - void ResolveTargetNoteForAppend (INAppendToNoteIntent intent, Action completion); - - [Export ("resolveContentForAppendToNote:withCompletion:")] - void ResolveContentForAppend (INAppendToNoteIntent intent, Action completion); - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResponse))] - [DisableDefaultCtor] - interface INAppendToNoteIntentResponse { - - [Export ("initWithCode:userActivity:")] - [DesignatedInitializer] - IntPtr Constructor (INAppendToNoteIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); - - [Export ("code")] - INAppendToNoteIntentResponseCode Code { get; } - - [NullAllowed, Export ("note", ArgumentSemantic.Copy)] - INNote Note { get; set; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface INBalanceAmount : NSCopying, NSSecureCoding { - - [Export ("initWithAmount:balanceType:")] - [DesignatedInitializer] - IntPtr Constructor (NSDecimalNumber amount, INBalanceType balanceType); - - [Export ("initWithAmount:currencyCode:")] - [DesignatedInitializer] - IntPtr Constructor (NSDecimalNumber amount, string currencyCode); - - [NullAllowed, Export ("amount", ArgumentSemantic.Copy)] - NSDecimalNumber Amount { get; } - - [Export ("balanceType", ArgumentSemantic.Assign)] - INBalanceType BalanceType { get; } - - [NullAllowed, Export ("currencyCode")] - string CurrencyCode { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INBalanceTypeResolutionResult { - - [Static] - [Export ("successWithResolvedBalanceType:")] - INBalanceTypeResolutionResult GetSuccess (INBalanceType resolvedBalanceType); - - [Static] - [Export ("confirmationRequiredWithBalanceTypeToConfirm:")] - INBalanceTypeResolutionResult GetConfirmationRequired (INBalanceType balanceTypeToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INBalanceTypeResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INBalanceTypeResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INBalanceTypeResolutionResult Unsupported { get; } - } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INCallDestinationTypeResolutionResult { - - [Static] - [Export ("successWithResolvedCallDestinationType:")] - INCallDestinationTypeResolutionResult GetSuccess (INCallDestinationType resolvedCallDestinationType); - - [Static] - [Export ("confirmationRequiredWithCallDestinationTypeToConfirm:")] - INCallDestinationTypeResolutionResult GetConfirmationRequired (INCallDestinationType callDestinationTypeToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INCallDestinationTypeResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INCallDestinationTypeResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INCallDestinationTypeResolutionResult Unsupported { get; } - } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface INCallRecord : NSCopying, NSSecureCoding { - - [Export ("initWithIdentifier:dateCreated:caller:callRecordType:callCapability:callDuration:unseen:")] - [DesignatedInitializer] - IntPtr Constructor (string identifier, [NullAllowed] NSDate dateCreated, [NullAllowed] INPerson caller, INCallRecordType callRecordType, INCallCapability callCapability, [NullAllowed] NSNumber callDuration, [NullAllowed] NSNumber unseen); - - [Export ("identifier")] - string Identifier { get; } - - [NullAllowed, Export ("dateCreated", ArgumentSemantic.Copy)] - NSDate DateCreated { get; } - - [NullAllowed, Export ("caller", ArgumentSemantic.Copy)] - INPerson Caller { get; } - - [Export ("callRecordType")] - INCallRecordType CallRecordType { get; } - - [Export ("callCapability")] - INCallCapability CallCapability { get; } - - [Protected] - [NullAllowed, Export ("callDuration", ArgumentSemantic.Copy)] - NSNumber WeakCallDuration { get; } - - [Protected] - [NullAllowed, Export ("unseen", ArgumentSemantic.Copy)] - NSNumber WeakUnseen { get; } - } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INCallRecordTypeOptionsResolutionResult { - - [Static] - [Export ("successWithResolvedCallRecordTypeOptions:")] - INCallRecordTypeOptionsResolutionResult GetSuccess (INCallRecordTypeOptions resolvedCallRecordTypeOptions); - - [Static] - [Export ("confirmationRequiredWithCallRecordTypeOptionsToConfirm:")] - INCallRecordTypeOptionsResolutionResult GetConfirmationRequired (INCallRecordTypeOptions callRecordTypeOptionsToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INCallRecordTypeOptionsResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INCallRecordTypeOptionsResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INCallRecordTypeOptionsResolutionResult Unsupported { get; } - } - - [NoWatch, NoMac, iOS (11,0)] - [BaseType (typeof (INIntent))] - [DisableDefaultCtor] - interface INCancelRideIntent { - - [Export ("initWithRideIdentifier:")] - [DesignatedInitializer] - IntPtr Constructor (string rideIdentifier); - - [Export ("rideIdentifier")] - string RideIdentifier { get; } - } - - [NoWatch, NoMac, iOS (11,0)] - [Protocol] - interface INCancelRideIntentHandling { - - [Abstract] - [Export ("handleCancelRide:completion:")] - void HandleCancelRide (INCancelRideIntent intent, Action completion); - - [Export ("confirmCancelRide:completion:")] - void Confirm (INCancelRideIntent intent, Action completion); - } - - [NoWatch, NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResponse))] - [DisableDefaultCtor] - interface INCancelRideIntentResponse { - - [Export ("initWithCode:userActivity:")] - [DesignatedInitializer] - IntPtr Constructor (INCancelRideIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); - - [Export ("code")] - INCancelRideIntentResponseCode Code { get; } - - [NullAllowed, Export ("cancellationFee", ArgumentSemantic.Assign)] - INCurrencyAmount CancellationFee { get; set; } - - [NullAllowed, Export ("cancellationFeeThreshold", ArgumentSemantic.Assign)] - NSDateComponents CancellationFeeThreshold { get; set; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntent))] - [DisableDefaultCtor] - interface INCreateNoteIntent { - - [Export ("initWithTitle:content:groupName:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] INSpeakableString title, [NullAllowed] INNoteContent content, [NullAllowed] INSpeakableString groupName); - - [NullAllowed, Export ("title", ArgumentSemantic.Copy)] - INSpeakableString Title { get; } - - [NullAllowed, Export ("content", ArgumentSemantic.Copy)] - INNoteContent Content { get; } - - [NullAllowed, Export ("groupName", ArgumentSemantic.Copy)] - INSpeakableString GroupName { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Protocol] - interface INCreateNoteIntentHandling { - - [Abstract] - [Export ("handleCreateNote:completion:")] - void HandleCreateNote (INCreateNoteIntent intent, Action completion); - - [Export ("confirmCreateNote:completion:")] - void Confirm (INCreateNoteIntent intent, Action completion); - - [Export ("resolveTitleForCreateNote:withCompletion:")] - void ResolveTitle (INCreateNoteIntent intent, Action completion); - - [Export ("resolveContentForCreateNote:withCompletion:")] - void ResolveContent (INCreateNoteIntent intent, Action completion); - - [Export ("resolveGroupNameForCreateNote:withCompletion:")] - void ResolveGroupName (INCreateNoteIntent intent, Action completion); - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResponse))] - [DisableDefaultCtor] - interface INCreateNoteIntentResponse { - - [Export ("initWithCode:userActivity:")] - [DesignatedInitializer] - IntPtr Constructor (INCreateNoteIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); - - [Export ("code")] - INCreateNoteIntentResponseCode Code { get; } - - [NullAllowed, Export ("createdNote", ArgumentSemantic.Copy)] - INNote CreatedNote { get; set; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntent))] - [DisableDefaultCtor] - interface INCreateTaskListIntent { - - [Export ("initWithTitle:taskTitles:groupName:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] INSpeakableString title, [NullAllowed] INSpeakableString [] taskTitles, [NullAllowed] INSpeakableString groupName); - - [NullAllowed, Export ("title", ArgumentSemantic.Copy)] - INSpeakableString Title { get; } - - [NullAllowed, Export ("taskTitles", ArgumentSemantic.Copy)] - INSpeakableString [] TaskTitles { get; } - - [NullAllowed, Export ("groupName", ArgumentSemantic.Copy)] - INSpeakableString GroupName { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Protocol] - interface INCreateTaskListIntentHandling { - - [Abstract] - [Export ("handleCreateTaskList:completion:")] - void HandleCreateTaskList (INCreateTaskListIntent intent, Action completion); - - [Export ("confirmCreateTaskList:completion:")] - void Confirm (INCreateTaskListIntent intent, Action completion); - - [Export ("resolveTitleForCreateTaskList:withCompletion:")] - void ResolveTitle (INCreateTaskListIntent intent, Action completion); - - [Export ("resolveTaskTitlesForCreateTaskList:withCompletion:")] - void ResolveTaskTitles (INCreateTaskListIntent intent, Action completion); - - [Export ("resolveGroupNameForCreateTaskList:withCompletion:")] - void ResolveGroupName (INCreateTaskListIntent intent, Action completion); - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResponse))] - [DisableDefaultCtor] - interface INCreateTaskListIntentResponse { - - [Export ("initWithCode:userActivity:")] - [DesignatedInitializer] - IntPtr Constructor (INCreateTaskListIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); - - [Export ("code")] - INCreateTaskListIntentResponseCode Code { get; } - - [NullAllowed, Export ("createdTaskList", ArgumentSemantic.Copy)] - INTaskList CreatedTaskList { get; set; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INDateSearchTypeResolutionResult { - - [Static] - [Export ("successWithResolvedDateSearchType:")] - INDateSearchTypeResolutionResult GetSuccess (INDateSearchType resolvedDateSearchType); - - [Static] - [Export ("confirmationRequiredWithDateSearchTypeToConfirm:")] - INDateSearchTypeResolutionResult GetConfirmationRequired (INDateSearchType dateSearchTypeToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INDateSearchTypeResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INDateSearchTypeResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INDateSearchTypeResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntent))] - [DisableDefaultCtor] - interface INGetVisualCodeIntent { - - [Export ("initWithVisualCodeType:")] - [DesignatedInitializer] - IntPtr Constructor (INVisualCodeType visualCodeType); - - [Export ("visualCodeType", ArgumentSemantic.Assign)] - INVisualCodeType VisualCodeType { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Protocol] - interface INGetVisualCodeIntentHandling { - - [Abstract] - [Export ("handleGetVisualCode:completion:")] - void HandleGetVisualCode (INGetVisualCodeIntent intent, Action completion); - - [Export ("confirmGetVisualCode:completion:")] - void Confirm (INGetVisualCodeIntent intent, Action completion); - - [Export ("resolveVisualCodeTypeForGetVisualCode:withCompletion:")] - void ResolveVisualCodeType (INGetVisualCodeIntent intent, Action completion); - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResponse))] - [DisableDefaultCtor] - interface INGetVisualCodeIntentResponse { - - [Export ("initWithCode:userActivity:")] - [DesignatedInitializer] - IntPtr Constructor (INGetVisualCodeIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); - - [Export ("code")] - INGetVisualCodeIntentResponseCode Code { get; } - - [NullAllowed, Export ("visualCodeImage", ArgumentSemantic.Copy)] - INImage VisualCodeImage { get; set; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INNoteContent))] - interface INImageNoteContent : NSSecureCoding, NSCopying { - - [Export ("initWithImage:")] - IntPtr Constructor (INImage image); - - [NullAllowed, Export ("image", ArgumentSemantic.Copy)] - INImage Image { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INLocationSearchTypeResolutionResult { - - [Static] - [Export ("successWithResolvedLocationSearchType:")] - INLocationSearchTypeResolutionResult GetSuccess (INLocationSearchType resolvedLocationSearchType); - - [Static] - [Export ("confirmationRequiredWithLocationSearchTypeToConfirm:")] - INLocationSearchTypeResolutionResult GetConfirmationRequired (INLocationSearchType locationSearchTypeToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INLocationSearchTypeResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INLocationSearchTypeResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INLocationSearchTypeResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (NSObject))] - interface INNote : NSCopying, NSSecureCoding { - - [Export ("initWithTitle:contents:groupName:createdDateComponents:modifiedDateComponents:identifier:")] - IntPtr Constructor (INSpeakableString title, INNoteContent [] contents, [NullAllowed] INSpeakableString groupName, [NullAllowed] NSDateComponents createdDateComponents, [NullAllowed] NSDateComponents modifiedDateComponents, [NullAllowed] string identifier); - - [Export ("title", ArgumentSemantic.Copy)] - INSpeakableString Title { get; } - - [Export ("contents", ArgumentSemantic.Copy)] - INNoteContent [] Contents { get; } - - [NullAllowed, Export ("groupName", ArgumentSemantic.Copy)] - INSpeakableString GroupName { get; } - - [NullAllowed, Export ("createdDateComponents", ArgumentSemantic.Copy)] - NSDateComponents CreatedDateComponents { get; } - - [NullAllowed, Export ("modifiedDateComponents", ArgumentSemantic.Copy)] - NSDateComponents ModifiedDateComponents { get; } - - [NullAllowed, Export ("identifier")] - string Identifier { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (NSObject))] - interface INNoteContent : NSSecureCoding, NSCopying { - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INNoteContentResolutionResult { - - [Static] - [Export ("successWithResolvedNoteContent:")] - INNoteContentResolutionResult GetSuccess (INNoteContent resolvedNoteContent); - - [Static] - [Export ("disambiguationWithNoteContentsToDisambiguate:")] - INNoteContentResolutionResult GetDisambiguation (INNoteContent [] noteContentsToDisambiguate); - - [Static] - [Export ("confirmationRequiredWithNoteContentToConfirm:")] - INNoteContentResolutionResult GetConfirmationRequired ([NullAllowed] INNoteContent noteContentToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INNoteContentResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INNoteContentResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INNoteContentResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - interface INNoteContentTypeResolutionResult { - - [Static] - [Export ("successWithResolvedNoteContentType:")] - INNoteContentTypeResolutionResult GetSuccess (INNoteContentType resolvedNoteContentType); - - [Static] - [Export ("confirmationRequiredWithNoteContentTypeToConfirm:")] - INNoteContentTypeResolutionResult GetConfirmationRequired (INNoteContentType noteContentTypeToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INNoteContentTypeResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INNoteContentTypeResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INNoteContentTypeResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - interface INNoteResolutionResult { - - [Static] - [Export ("successWithResolvedNote:")] - INNoteResolutionResult GetSuccess (INNote resolvedNote); - - [Static] - [Export ("disambiguationWithNotesToDisambiguate:")] - INNoteResolutionResult GetDisambiguation (INNote [] notesToDisambiguate); - - [Static] - [Export ("confirmationRequiredWithNoteToConfirm:")] - INNoteResolutionResult GetConfirmationRequired ([NullAllowed] INNote noteToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INNoteResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INNoteResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INNoteResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - interface INNotebookItemTypeResolutionResult { - - [Static] - [Export ("successWithResolvedNotebookItemType:")] - INNotebookItemTypeResolutionResult GetSuccess (INNotebookItemType resolvedNotebookItemType); - - [Static] - [Export ("disambiguationWithNotebookItemTypesToDisambiguate:")] - INNotebookItemTypeResolutionResult GetDisambiguation (NSNumber[] notebookItemTypesToDisambiguate); - - [Static] - [Export ("confirmationRequiredWithNotebookItemTypeToConfirm:")] - INNotebookItemTypeResolutionResult GetConfirmationRequired (INNotebookItemType notebookItemTypeToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INNotebookItemTypeResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INNotebookItemTypeResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INNotebookItemTypeResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface INParameter : NSSecureCoding { - - [Static] - [Export ("parameterForClass:keyPath:")] - INParameter GetParameter (Class aClass, string keyPath); - - [Static] - [Wrap ("GetParameter (new Class (type), keyPath)")] - INParameter GetParameter (Type type, string keyPath); - - [Export ("parameterClass")] - Class ParameterClass { get; } - - [Wrap ("Class.Lookup (ParameterClass)")] - Type ParameterType { get; } - - [Export ("parameterKeyPath")] - string ParameterKeyPath { get; } - - [Export ("isEqualToParameter:")] - bool IsEqualTo (INParameter parameter); - - [Export ("setIndex:forSubKeyPath:")] - void SetIndex (nuint index, string subKeyPath); - - [Export ("indexForSubKeyPath:")] - nuint GetIndex (string subKeyPath); - } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface INRecurrenceRule : NSCopying, NSSecureCoding { - - [Export ("initWithInterval:frequency:")] - IntPtr Constructor (nuint interval, INRecurrenceFrequency frequency); - - [Export ("interval")] - nuint Interval { get; } - - [Export ("frequency")] - INRecurrenceFrequency Frequency { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INCurrencyAmountResolutionResult))] - [DisableDefaultCtor] - interface INRequestPaymentCurrencyAmountResolutionResult { - - [Static] - [Export ("unsupportedForReason:")] - INRequestPaymentCurrencyAmountResolutionResult GetUnsupported (INRequestPaymentCurrencyAmountUnsupportedReason reason); - - [Export ("initWithCurrencyAmountResolutionResult:")] - IntPtr Constructor (INCurrencyAmountResolutionResult currencyAmountResolutionResult); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INRequestPaymentCurrencyAmountResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INRequestPaymentCurrencyAmountResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INRequestPaymentCurrencyAmountResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INPersonResolutionResult))] - [DisableDefaultCtor] - interface INRequestPaymentPayerResolutionResult { - - [Static] - [Export ("unsupportedForReason:")] - INRequestPaymentPayerResolutionResult GetUnsupported (INRequestPaymentPayerUnsupportedReason reason); - - [Export ("initWithPersonResolutionResult:")] - IntPtr Constructor (INPersonResolutionResult personResolutionResult); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INRequestPaymentPayerResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INRequestPaymentPayerResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INRequestPaymentPayerResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntent))] - interface INSearchForAccountsIntent { - - [Export ("initWithAccountNickname:accountType:organizationName:requestedBalanceType:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] INSpeakableString accountNickname, INAccountType accountType, [NullAllowed] INSpeakableString organizationName, INBalanceType requestedBalanceType); - - [NullAllowed, Export ("accountNickname", ArgumentSemantic.Copy)] - INSpeakableString AccountNickname { get; } - - [Export ("accountType", ArgumentSemantic.Assign)] - INAccountType AccountType { get; } - - [NullAllowed, Export ("organizationName", ArgumentSemantic.Copy)] - INSpeakableString OrganizationName { get; } - - [Export ("requestedBalanceType", ArgumentSemantic.Assign)] - INBalanceType RequestedBalanceType { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Protocol] - interface INSearchForAccountsIntentHandling { - - [Abstract] - [Export ("handleSearchForAccounts:completion:")] - void HandleSearchForAccounts (INSearchForAccountsIntent intent, Action completion); - - [Export ("confirmSearchForAccounts:completion:")] - void Confirm (INSearchForAccountsIntent intent, Action completion); - - [Export ("resolveAccountNicknameForSearchForAccounts:withCompletion:")] - void ResolveAccountNickname (INSearchForAccountsIntent intent, Action completion); - - [Export ("resolveAccountTypeForSearchForAccounts:withCompletion:")] - void ResolveAccountType (INSearchForAccountsIntent intent, Action completion); - - [Export ("resolveOrganizationNameForSearchForAccounts:withCompletion:")] - void ResolveOrganizationName (INSearchForAccountsIntent intent, Action completion); - - [Export ("resolveRequestedBalanceTypeForSearchForAccounts:withCompletion:")] - void ResolveRequestedBalanceType (INSearchForAccountsIntent intent, Action completion); - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResponse))] - [DisableDefaultCtor] - interface INSearchForAccountsIntentResponse { - - [Export ("initWithCode:userActivity:")] - [DesignatedInitializer] - IntPtr Constructor (INSearchForAccountsIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); - - [Export ("code")] - INSearchForAccountsIntentResponseCode Code { get; } - - [NullAllowed, Export ("accounts", ArgumentSemantic.Copy)] - INPaymentAccount [] Accounts { get; set; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntent))] - interface INSearchForNotebookItemsIntent { - - [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); - - [NullAllowed, Export ("title", ArgumentSemantic.Copy)] - INSpeakableString Title { get; } - - [NullAllowed, Export ("content")] - string Content { get; } - - [Export ("itemType", ArgumentSemantic.Assign)] - INNotebookItemType ItemType { get; } - - [Export ("status", ArgumentSemantic.Assign)] - INTaskStatus Status { get; } - - [NullAllowed, Export ("location", ArgumentSemantic.Copy)] - CLPlacemark Location { get; } - - [Export ("locationSearchType", ArgumentSemantic.Assign)] - INLocationSearchType LocationSearchType { get; } - - [NullAllowed, Export ("dateTime", ArgumentSemantic.Copy)] - INDateComponentsRange DateTime { get; } - - [Export ("dateSearchType", ArgumentSemantic.Assign)] - INDateSearchType DateSearchType { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Protocol] - interface INSearchForNotebookItemsIntentHandling { - - [Abstract] - [Export ("handleSearchForNotebookItems:completion:")] - void HandleSearchForNotebookItems (INSearchForNotebookItemsIntent intent, Action completion); - - [Export ("confirmSearchForNotebookItems:completion:")] - void Confirm (INSearchForNotebookItemsIntent intent, Action completion); - - [Export ("resolveTitleForSearchForNotebookItems:withCompletion:")] - void ResolveTitle (INSearchForNotebookItemsIntent intent, Action completion); - - [Export ("resolveContentForSearchForNotebookItems:withCompletion:")] - void ResolveContent (INSearchForNotebookItemsIntent intent, Action completion); - - [Export ("resolveItemTypeForSearchForNotebookItems:withCompletion:")] - void ResolveItemType (INSearchForNotebookItemsIntent intent, Action completion); - - [Export ("resolveStatusForSearchForNotebookItems:withCompletion:")] - void ResolveStatus (INSearchForNotebookItemsIntent intent, Action completion); - - [Export ("resolveLocationForSearchForNotebookItems:withCompletion:")] - void ResolveLocation (INSearchForNotebookItemsIntent intent, Action completion); - - [Export ("resolveLocationSearchTypeForSearchForNotebookItems:withCompletion:")] - void ResolveLocationSearchType (INSearchForNotebookItemsIntent intent, Action completion); - - [Export ("resolveDateTimeForSearchForNotebookItems:withCompletion:")] - void ResolveDateTime (INSearchForNotebookItemsIntent intent, Action completion); - - [Export ("resolveDateSearchTypeForSearchForNotebookItems:withCompletion:")] - void ResolveDateSearchType (INSearchForNotebookItemsIntent intent, Action completion); - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResponse))] - [DisableDefaultCtor] - interface INSearchForNotebookItemsIntentResponse { - - [Export ("initWithCode:userActivity:")] - [DesignatedInitializer] - IntPtr Constructor (INSearchForNotebookItemsIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); - - [Export ("code")] - INSearchForNotebookItemsIntentResponseCode Code { get; } - - [NullAllowed, Export ("notes", ArgumentSemantic.Copy)] - INNote [] Notes { get; set; } - - [NullAllowed, Export ("taskLists", ArgumentSemantic.Copy)] - INTaskList [] TaskLists { get; set; } - - [NullAllowed, Export ("tasks", ArgumentSemantic.Copy)] - INTask [] Tasks { get; set; } - - [Export ("sortType", ArgumentSemantic.Assign)] - INSortType SortType { get; set; } - } - - [Watch (4,0), Mac (10,13, onlyOn64:true), iOS (11,0)] - [BaseType (typeof (INPersonResolutionResult))] - [DisableDefaultCtor] - interface INSendMessageRecipientResolutionResult { - - [Static] - [Export ("unsupportedForReason:")] - INSendMessageRecipientResolutionResult GetUnsupported (INSendMessageRecipientUnsupportedReason reason); - - [Export ("initWithPersonResolutionResult:")] - IntPtr Constructor (INPersonResolutionResult personResolutionResult); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INSendMessageRecipientResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INSendMessageRecipientResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INSendMessageRecipientResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INCurrencyAmountResolutionResult))] - [DisableDefaultCtor] - interface INSendPaymentCurrencyAmountResolutionResult { - - [Static] - [Export ("unsupportedForReason:")] - INSendPaymentCurrencyAmountResolutionResult GetUnsupported (INSendPaymentCurrencyAmountUnsupportedReason reason); - - [Export ("initWithCurrencyAmountResolutionResult:")] - IntPtr Constructor (INCurrencyAmountResolutionResult currencyAmountResolutionResult); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INSendPaymentCurrencyAmountResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INSendPaymentCurrencyAmountResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INSendPaymentCurrencyAmountResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INPersonResolutionResult))] - [DisableDefaultCtor] - interface INSendPaymentPayeeResolutionResult { - - [Static] - [Export ("unsupportedForReason:")] - INSendPaymentPayeeResolutionResult GetUnsupported (INSendPaymentPayeeUnsupportedReason reason); - - [Export ("initWithPersonResolutionResult:")] - IntPtr Constructor (INPersonResolutionResult personResolutionResult); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INSendPaymentPayeeResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INSendPaymentPayeeResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INSendPaymentPayeeResolutionResult Unsupported { get; } - } - - [NoWatch, NoMac, iOS (11,0)] - [BaseType (typeof (INIntent))] - [DisableDefaultCtor] - interface INSendRideFeedbackIntent { - - [Export ("initWithRideIdentifier:")] - [DesignatedInitializer] - IntPtr Constructor (string rideIdentifier); - - [Export ("rideIdentifier")] - string RideIdentifier { get; } - - [NullAllowed, Export ("rating", ArgumentSemantic.Copy)] - NSNumber Rating { get; set; } - - [NullAllowed, Export ("tip", ArgumentSemantic.Copy)] - INCurrencyAmount Tip { get; set; } - } - - [NoWatch, NoMac, iOS (11,0)] - [Protocol] - interface INSendRideFeedbackIntentHandling { - - [Abstract] - [Export ("handleSendRideFeedback:completion:")] - void HandleSendRideFeedback (INSendRideFeedbackIntent sendRideFeedbackintent, Action completion); - - [Export ("confirmSendRideFeedback:completion:")] - void Confirm (INSendRideFeedbackIntent sendRideFeedbackIntent, Action completion); - } - - [NoWatch, NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResponse))] - [DisableDefaultCtor] - interface INSendRideFeedbackIntentResponse { - - [Export ("initWithCode:userActivity:")] - [DesignatedInitializer] - IntPtr Constructor (INSendRideFeedbackIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); - - [Export ("code")] - INSendRideFeedbackIntentResponseCode Code { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntent))] - interface INSetTaskAttributeIntent { - - [Export ("initWithTargetTask:status:spatialEventTrigger:temporalEventTrigger:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] INTask targetTask, INTaskStatus status, [NullAllowed] INSpatialEventTrigger spatialEventTrigger, [NullAllowed] INTemporalEventTrigger temporalEventTrigger); - - [NullAllowed, Export ("targetTask", ArgumentSemantic.Copy)] - INTask TargetTask { get; } - - [Export ("status", ArgumentSemantic.Assign)] - INTaskStatus Status { get; } - - [NullAllowed, Export ("spatialEventTrigger", ArgumentSemantic.Copy)] - INSpatialEventTrigger SpatialEventTrigger { get; } - - [NullAllowed, Export ("temporalEventTrigger", ArgumentSemantic.Copy)] - INTemporalEventTrigger TemporalEventTrigger { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Protocol] - interface INSetTaskAttributeIntentHandling { - - [Abstract] - [Export ("handleSetTaskAttribute:completion:")] - void HandleSetTaskAttribute (INSetTaskAttributeIntent intent, Action completion); - - [Export ("confirmSetTaskAttribute:completion:")] - void Confirm (INSetTaskAttributeIntent intent, Action completion); - - [Export ("resolveTargetTaskForSetTaskAttribute:withCompletion:")] - void ResolveTargetTask (INSetTaskAttributeIntent intent, Action completion); - - [Export ("resolveStatusForSetTaskAttribute:withCompletion:")] - void ResolveStatus (INSetTaskAttributeIntent intent, Action completion); - - [Export ("resolveSpatialEventTriggerForSetTaskAttribute:withCompletion:")] - void ResolveSpatialEventTrigger (INSetTaskAttributeIntent intent, Action completion); - - [Export ("resolveTemporalEventTriggerForSetTaskAttribute:withCompletion:")] - void ResolveTemporalEventTrigger (INSetTaskAttributeIntent intent, Action completion); - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResponse))] - [DisableDefaultCtor] - interface INSetTaskAttributeIntentResponse { - - [Export ("initWithCode:userActivity:")] - [DesignatedInitializer] - IntPtr Constructor (INSetTaskAttributeIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); - - [Export ("code")] - INSetTaskAttributeIntentResponseCode Code { get; } - - [NullAllowed, Export ("modifiedTask", ArgumentSemantic.Copy)] - INTask ModifiedTask { get; set; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface INSpatialEventTrigger { - - [Export ("initWithPlacemark:event:")] - IntPtr Constructor (CLPlacemark placemark, INSpatialEvent @event); - - [Export ("placemark")] - CLPlacemark Placemark { get; } - - [Export ("event")] - INSpatialEvent Event { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INSpatialEventTriggerResolutionResult { - - [Static] - [Export ("successWithResolvedSpatialEventTrigger:")] - INSpatialEventTriggerResolutionResult GetSuccess (INSpatialEventTrigger resolvedSpatialEventTrigger); - - [Static] - [Export ("disambiguationWithSpatialEventTriggersToDisambiguate:")] - INSpatialEventTriggerResolutionResult GetDisambiguation (INSpatialEventTrigger [] spatialEventTriggersToDisambiguate); - - [Static] - [Export ("confirmationRequiredWithSpatialEventTriggerToConfirm:")] - INSpatialEventTriggerResolutionResult GetConfirmationRequired ([NullAllowed] INSpatialEventTrigger spatialEventTriggerToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INSpatialEventTriggerResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INSpatialEventTriggerResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INSpatialEventTriggerResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface INTask : NSCopying, NSSecureCoding { - - [Export ("initWithTitle:status:taskType:spatialEventTrigger:temporalEventTrigger:createdDateComponents:modifiedDateComponents:identifier:")] - IntPtr Constructor (INSpeakableString title, INTaskStatus status, INTaskType taskType, [NullAllowed] INSpatialEventTrigger spatialEventTrigger, [NullAllowed] INTemporalEventTrigger temporalEventTrigger, [NullAllowed] NSDateComponents createdDateComponents, [NullAllowed] NSDateComponents modifiedDateComponents, [NullAllowed] string identifier); - - [Export ("title", ArgumentSemantic.Copy)] - INSpeakableString Title { get; } - - [Export ("status")] - INTaskStatus Status { get; } - - [Export ("taskType")] - INTaskType TaskType { get; } - - [NullAllowed, Export ("spatialEventTrigger", ArgumentSemantic.Copy)] - INSpatialEventTrigger SpatialEventTrigger { get; } - - [NullAllowed, Export ("temporalEventTrigger", ArgumentSemantic.Copy)] - INTemporalEventTrigger TemporalEventTrigger { get; } - - [NullAllowed, Export ("createdDateComponents", ArgumentSemantic.Copy)] - NSDateComponents CreatedDateComponents { get; } - - [NullAllowed, Export ("modifiedDateComponents", ArgumentSemantic.Copy)] - NSDateComponents ModifiedDateComponents { get; } - - [NullAllowed, Export ("identifier")] - string Identifier { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface INTaskList : NSCopying, NSSecureCoding { - - [Export ("initWithTitle:tasks:groupName:createdDateComponents:modifiedDateComponents:identifier:")] - IntPtr Constructor (INSpeakableString title, INTask [] tasks, [NullAllowed] INSpeakableString groupName, [NullAllowed] NSDateComponents createdDateComponents, [NullAllowed] NSDateComponents modifiedDateComponents, [NullAllowed] string identifier); - - [Export ("title", ArgumentSemantic.Copy)] - INSpeakableString Title { get; } - - [Export ("tasks", ArgumentSemantic.Copy)] - INTask [] Tasks { get; } - - [NullAllowed, Export ("groupName", ArgumentSemantic.Copy)] - INSpeakableString GroupName { get; } - - [NullAllowed, Export ("createdDateComponents", ArgumentSemantic.Copy)] - NSDateComponents CreatedDateComponents { get; } - - [NullAllowed, Export ("modifiedDateComponents", ArgumentSemantic.Copy)] - NSDateComponents ModifiedDateComponents { get; } - - [NullAllowed, Export ("identifier")] - string Identifier { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INTaskListResolutionResult { - - [Static] - [Export ("successWithResolvedTaskList:")] - INTaskListResolutionResult GetSuccess (INTaskList resolvedTaskList); - - [Static] - [Export ("disambiguationWithTaskListsToDisambiguate:")] - INTaskListResolutionResult GetDisambiguation (INTaskList [] taskListsToDisambiguate); - - [Static] - [Export ("confirmationRequiredWithTaskListToConfirm:")] - INTaskListResolutionResult GetConfirmationRequired ([NullAllowed] INTaskList taskListToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INTaskListResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INTaskListResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INTaskListResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INTaskResolutionResult { - - [Static] - [Export ("successWithResolvedTask:")] - INTaskResolutionResult GetSuccess (INTask resolvedTask); - - [Static] - [Export ("disambiguationWithTasksToDisambiguate:")] - INTaskResolutionResult GetDisambiguation (INTask [] tasksToDisambiguate); - - [Static] - [Export ("confirmationRequiredWithTaskToConfirm:")] - INTaskResolutionResult GetConfirmationRequired ([NullAllowed] INTask taskToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INTaskResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INTaskResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INTaskResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INTaskStatusResolutionResult { - - [Static] - [Export ("successWithResolvedTaskStatus:")] - INTaskStatusResolutionResult GetSuccess (INTaskStatus resolvedTaskStatus); - - [Static] - [Export ("confirmationRequiredWithTaskStatusToConfirm:")] - INTaskStatusResolutionResult GetConfirmationRequired (INTaskStatus taskStatusToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INTaskStatusResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INTaskStatusResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INTaskStatusResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface INTemporalEventTrigger : NSCopying, NSSecureCoding { - - [Export ("initWithDateComponentsRange:")] - IntPtr Constructor (INDateComponentsRange dateComponentsRange); - - [Export ("dateComponentsRange")] - INDateComponentsRange DateComponentsRange { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INTemporalEventTriggerResolutionResult { - - [Static] - [Export ("successWithResolvedTemporalEventTrigger:")] - INTemporalEventTriggerResolutionResult GetSuccess (INTemporalEventTrigger resolvedTemporalEventTrigger); - - [Static] - [Export ("disambiguationWithTemporalEventTriggersToDisambiguate:")] - INTemporalEventTriggerResolutionResult GetDisambiguation (INTemporalEventTrigger [] temporalEventTriggersToDisambiguate); - - [Static] - [Export ("confirmationRequiredWithTemporalEventTriggerToConfirm:")] - INTemporalEventTriggerResolutionResult GetConfirmationRequired ([NullAllowed] INTemporalEventTrigger temporalEventTriggerToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INTemporalEventTriggerResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INTemporalEventTriggerResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INTemporalEventTriggerResolutionResult Unsupported { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INNoteContent))] - [DisableDefaultCtor] - interface INTextNoteContent : NSSecureCoding, NSCopying { - - [Export ("initWithText:")] - IntPtr Constructor (string text); - - [NullAllowed, Export ("text")] - string Text { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntent))] - [DisableDefaultCtor] - interface INTransferMoneyIntent { - - [Export ("initWithFromAccount:toAccount:transactionAmount:transactionScheduledDate:transactionNote:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] INPaymentAccount fromAccount, [NullAllowed] INPaymentAccount toAccount, [NullAllowed] INPaymentAmount transactionAmount, [NullAllowed] INDateComponentsRange transactionScheduledDate, [NullAllowed] string transactionNote); - - [NullAllowed, Export ("fromAccount", ArgumentSemantic.Copy)] - INPaymentAccount FromAccount { get; } - - [NullAllowed, Export ("toAccount", ArgumentSemantic.Copy)] - INPaymentAccount ToAccount { get; } - - [NullAllowed, Export ("transactionAmount", ArgumentSemantic.Copy)] - INPaymentAmount TransactionAmount { get; } - - [NullAllowed, Export ("transactionScheduledDate", ArgumentSemantic.Copy)] - INDateComponentsRange TransactionScheduledDate { get; } - - [NullAllowed, Export ("transactionNote")] - string TransactionNote { get; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [Protocol] - interface INTransferMoneyIntentHandling { - - [Abstract] - [Export ("handleTransferMoney:completion:")] - void HandleTransferMoney (INTransferMoneyIntent intent, Action completion); - - [Export ("confirmTransferMoney:completion:")] - void Confirm (INTransferMoneyIntent intent, Action completion); - - [Export ("resolveFromAccountForTransferMoney:withCompletion:")] - void ResolveFromAccount (INTransferMoneyIntent intent, Action completion); - - [Export ("resolveToAccountForTransferMoney:withCompletion:")] - void ResolveToAccount (INTransferMoneyIntent intent, Action completion); - - [Export ("resolveTransactionAmountForTransferMoney:withCompletion:")] - void ResolveTransactionAmount (INTransferMoneyIntent intent, Action completion); - - [Export ("resolveTransactionScheduledDateForTransferMoney:withCompletion:")] - void ResolveTransactionScheduledDate (INTransferMoneyIntent intent, Action completion); - - [Export ("resolveTransactionNoteForTransferMoney:withCompletion:")] - void ResolveTransactionNote (INTransferMoneyIntent intent, Action completion); - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResponse))] - [DisableDefaultCtor] - interface INTransferMoneyIntentResponse { - - [Export ("initWithCode:userActivity:")] - [DesignatedInitializer] - IntPtr Constructor (INTransferMoneyIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); - - [Export ("code")] - INTransferMoneyIntentResponseCode Code { get; } - - [NullAllowed, Export ("fromAccount", ArgumentSemantic.Copy)] - INPaymentAccount FromAccount { get; set; } - - [NullAllowed, Export ("toAccount", ArgumentSemantic.Copy)] - INPaymentAccount ToAccount { get; set; } - - [NullAllowed, Export ("transactionAmount", ArgumentSemantic.Copy)] - INPaymentAmount TransactionAmount { get; set; } - - [NullAllowed, Export ("transactionScheduledDate", ArgumentSemantic.Copy)] - INDateComponentsRange TransactionScheduledDate { get; set; } - - [NullAllowed, Export ("transactionNote")] - string TransactionNote { get; set; } - - [NullAllowed, Export ("transferFee", ArgumentSemantic.Copy)] - INCurrencyAmount TransferFee { get; set; } - } - - [Watch (4,0), NoMac, iOS (11,0)] - [BaseType (typeof (INIntentResolutionResult))] - [DisableDefaultCtor] - interface INVisualCodeTypeResolutionResult { - - [Static] - [Export ("successWithResolvedVisualCodeType:")] - INVisualCodeTypeResolutionResult GetSuccess (INVisualCodeType resolvedVisualCodeType); - - [Static] - [Export ("confirmationRequiredWithVisualCodeTypeToConfirm:")] - INVisualCodeTypeResolutionResult GetConfirmationRequired (INVisualCodeType visualCodeTypeToConfirm); - - // Fixes bug 43205. We need to return the inherited type not the base type - // because users won't be able to downcast easily - - [New] - [Static] - [Export ("needsValue")] - INVisualCodeTypeResolutionResult NeedsValue { get; } - - [New] - [Static] - [Export ("notRequired")] - INVisualCodeTypeResolutionResult NotRequired { get; } - - [New] - [Static] - [Export ("unsupported")] - INVisualCodeTypeResolutionResult Unsupported { get; } - } - } #endif // XAMCORE_2_0 diff --git a/src/intentsui.cs b/src/intentsui.cs index 0bf8c4b8ab5..a8483214668 100644 --- a/src/intentsui.cs +++ b/src/intentsui.cs @@ -25,31 +25,13 @@ public enum INUIHostedViewContext : nuint { MapsCard } - [iOS (11,0)] - [Native] - public enum INUIInteractiveBehavior : nuint { - None, - NextView, - Launch, - GenericAction, - } - - [iOS (11,0)] - delegate void INUIHostedViewControllingConfigureViewHandler (bool success, NSSet configuredParameters, CGSize desiredSize); - [Introduced (PlatformName.iOS, 10, 0)] [Protocol] interface INUIHostedViewControlling { -#if !XAMCORE_4_0 // Apple made this member optional in iOS 11 [Abstract] -#endif [Export ("configureWithInteraction:context:completion:")] void Configure (INInteraction interaction, INUIHostedViewContext context, Action completion); - - [iOS (11,0)] - [Export ("configureViewForParameters:ofInteraction:interactiveBehavior:context:completion:")] - void ConfigureView (NSSet parameters, INInteraction interaction, INUIInteractiveBehavior interactiveBehavior, INUIHostedViewContext context, INUIHostedViewControllingConfigureViewHandler completionHandler); } [Introduced (PlatformName.iOS, 10, 0)] @@ -62,10 +44,6 @@ interface NSExtensionContext_INUIHostedViewControlling { [Export ("hostedViewMaximumAllowedSize")] CGSize GetHostedViewMaximumAllowedSize (); - - [iOS (11,0)] - [Export ("interfaceParametersDescription")] - string GetInterfaceParametersDescription (); } [Introduced (PlatformName.iOS, 10, 0)] diff --git a/src/iosurface.cs b/src/iosurface.cs deleted file mode 100644 index ac4647d9b73..00000000000 --- a/src/iosurface.cs +++ /dev/null @@ -1,220 +0,0 @@ -// -// IOSurface bindings -// -// Authors: -// Miguel de Icaza -// -// Copyright 2017 Microsoft Inc. All rights reserved. -// - -using System; -using XamCore.CoreFoundation; -using XamCore.Foundation; -using XamCore.ObjCRuntime; - -namespace XamCore.IOSurface { - - [Static] - [Internal] - // See bug #59201 [iOS (10,0)] - [iOS (11, 0)] - [TV (11,0)] - [Mac (10, 12)] - interface IOSurfacePropertyKey { - [Field ("IOSurfacePropertyAllocSizeKey")] - NSString AllocSizeKey { get; } - - [Field ("IOSurfacePropertyKeyWidth")] - NSString WidthKey { get; } - - [Field ("IOSurfacePropertyKeyHeight")] - NSString HeightKey { get; } - - [Field ("IOSurfacePropertyKeyBytesPerRow")] - NSString BytesPerRowKey { get; } - - [Field ("IOSurfacePropertyKeyBytesPerElement")] - NSString BytesPerElementKey { get; } - - [Field ("IOSurfacePropertyKeyElementWidth")] - NSString ElementWidthKey { get; } - - [Field ("IOSurfacePropertyKeyElementHeight")] - NSString ElementHeightKey { get; } - - [Field ("IOSurfacePropertyKeyOffset")] - NSString OffsetKey { get; } - - [Field ("IOSurfacePropertyKeyPlaneInfo")] - NSString PlaneInfoKey { get; } - - [Field ("IOSurfacePropertyKeyPlaneWidth")] - NSString PlaneWidthKey { get; } - - [Field ("IOSurfacePropertyKeyPlaneHeight")] - NSString PlaneHeightKey { get; } - - [Field ("IOSurfacePropertyKeyPlaneBytesPerRow")] - NSString PlaneBytesPerRowKey { get; } - - [Field ("IOSurfacePropertyKeyPlaneOffset")] - NSString PlaneOffsetKey { get; } - - [Field ("IOSurfacePropertyKeyPlaneSize")] - NSString PlaneSizeKey { get; } - - [Field ("IOSurfacePropertyKeyPlaneBase")] - NSString PlaneBaseKey { get; } - - [Field ("IOSurfacePropertyKeyPlaneBytesPerElement")] - NSString PlaneBytesPerElementKey { get; } - - [Field ("IOSurfacePropertyKeyPlaneElementWidth")] - NSString PlaneElementWidthKey { get; } - - [Field ("IOSurfacePropertyKeyPlaneElementHeight")] - NSString PlaneElementHeightKey { get; } - - [Field ("IOSurfacePropertyKeyCacheMode")] - NSString CacheModeKey { get; } - - [Field ("IOSurfacePropertyKeyPixelFormat")] - NSString PixelFormatKey { get; } - - [Field ("IOSurfacePropertyKeyPixelSizeCastingAllowed")] - NSString PixelSizeCastingAllowedKey { get; } - } - - [StrongDictionary ("IOSurfacePropertyKey")] - partial interface IOSurfaceOptions { - nint AllocSize { get; set; } - nint Width { get; set; } - nint Height { get; set; } - nint BytesPerRow { get; set; } - nint BytesPerElement { get; set; } - nint ElementWidth { get; set; } - nint ElementHeight { get; set; } - nint Offset { get; set; } - NSDictionary [] PlaneInfo { get; set; } - nint PlaneWidth { get; set; } - nint PlaneHeight { get; set; } - nint PlaneBytesPerRow { get; set; } - nint PlaneOffset { get; set; } - nint PlaneSize { get; set; } - nint PlaneBase { get; set; } - nint PlaneBytesPerElement { get; set; } - nint PlaneElementWidth { get; set; } - nint PlaneElementHeight { get; set; } - IOSurfaceMemoryMap CacheMode { get; set; } - uint PixelFormat { get; set; } - bool PixelSizeCastingAllowed { get; set; } - } - - [iOS (11,0)] - [TV (11,0)] - [Mac (10,12)] - [BaseType (typeof(NSObject))] - interface IOSurface : NSSecureCoding - { - [Internal, Export ("initWithProperties:")] - IntPtr Constructor (NSDictionary properties); - - [Wrap ("this (properties == null ? null : properties.Dictionary)")] - IntPtr Constructor (IOSurfaceOptions properties); - - [Internal, Export ("lockWithOptions:seed:")] - int _Lock (IOSurfaceLockOptions options, IntPtr seedPtr); - - [Internal, Export ("unlockWithOptions:seed:")] - int _Unlock (IOSurfaceLockOptions options, IntPtr seed); - - [Export ("allocationSize")] - nint AllocationSize { get; } - - [Export ("width")] - nint Width { get; } - - [Export ("height")] - nint Height { get; } - - [Export ("baseAddress")] - IntPtr BaseAddress { get; } - - [Export ("pixelFormat")] - uint PixelFormat { get; } - - [Export ("bytesPerRow")] - nint BytesPerRow { get; } - - [Export ("bytesPerElement")] - nint BytesPerElement { get; } - - [Export ("elementWidth")] - nint ElementWidth { get; } - - [Export ("elementHeight")] - nint ElementHeight { get; } - - [Export ("seed")] - uint Seed { get; } - - [Export ("planeCount")] - nuint PlaneCount { get; } - - [Export ("widthOfPlaneAtIndex:")] - nint GetWidth (nuint planeIndex); - - [Export ("heightOfPlaneAtIndex:")] - nint GetHeight (nuint planeIndex); - - [Export ("bytesPerRowOfPlaneAtIndex:")] - nint GetBytesPerRow (nuint planeIndex); - - [Export ("bytesPerElementOfPlaneAtIndex:")] - nint GetBytesPerElement (nuint planeIndex); - - [Export ("elementWidthOfPlaneAtIndex:")] - nint GetElementWidth (nuint planeIndex); - - [Export ("elementHeightOfPlaneAtIndex:")] - nint GetElementHeight (nuint planeIndex); - - [Export ("baseAddressOfPlaneAtIndex:")] - IntPtr GetBaseAddress (nuint planeIndex); - - [Export ("setAttachment:forKey:")] - void SetAttachment (NSObject anObject, NSString key); - - [Export ("attachmentForKey:")] - [return: NullAllowed] - NSObject GetAttachment (NSString key); - - [Export ("removeAttachmentForKey:")] - void RemoveAttachment (NSString key); - - [NullAllowed, Export ("allAttachments")] - NSDictionary AllAttachments { get; set; } - - [Export ("removeAllAttachments")] - void RemoveAllAttachments (); - - [Export ("inUse")] - bool InUse { [Bind ("isInUse")] get; } - - [Export ("incrementUseCount")] - void IncrementUseCount (); - - [Export ("decrementUseCount")] - void DecrementUseCount (); - - [Export ("localUseCount")] - int LocalUseCount { get; } - - [Export ("allowsPixelSizeCasting")] - bool AllowsPixelSizeCasting { get; } - - [iOS (11,0)][Mac (10,13)] - [Internal, Export ("setPurgeable:oldState:")] - int _SetPurgeable (IOSurfacePurgeabilityState newState, IntPtr oldStatePtr); - } -} diff --git a/src/localauthentication.cs b/src/localauthentication.cs index 22dcb588539..7ce605842b1 100644 --- a/src/localauthentication.cs +++ b/src/localauthentication.cs @@ -5,14 +5,6 @@ namespace XamCore.LocalAuthentication { - [iOS (11,0), NoMac] - [Native] - public enum LABiometryType : nint { - None, - TouchId, - TypeFaceId, - } - [iOS (8,0), Mac (10,10)] delegate void LAContextReplyHandler (bool success, NSError error); @@ -78,16 +70,5 @@ interface LAContext { [Export ("maxBiometryFailures")] NSNumber MaxBiometryFailures { get; set; } #endif - [NoWatch, NoTV, Mac (10, 13), iOS (11, 0)] - [Export ("localizedReason")] - string LocalizedReason { get; set; } - - [NoWatch, NoTV, Mac (10, 13), iOS (11, 0)] - [Export ("interactionNotAllowed")] - bool InteractionNotAllowed { get; set; } - - [NoMac, iOS (11,0)] - [Export ("biometryType")] - LABiometryType BiometryType { get; } } } diff --git a/src/mapkit.cs b/src/mapkit.cs index 72f174acaab..14711003b0f 100644 --- a/src/mapkit.cs +++ b/src/mapkit.cs @@ -28,14 +28,9 @@ using UIEdgeInsets=XamCore.AppKit.NSEdgeInsets; using UIColor=XamCore.AppKit.NSColor; #endif -#if WATCH -// helper for [NoWatch] -using MKMapView=XamCore.Foundation.NSObject; -using MKAnnotationView=XamCore.Foundation.NSObject; -#endif namespace XamCore.MapKit { - + [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -180,27 +175,7 @@ interface MKAnnotationView { [Export ("rightCalloutOffset")] CGPoint RightCallpoutOffset { get; set; } #endif - [TV (11,0)][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [NullAllowed, Export ("clusteringIdentifier")] - string ClusteringIdentifier { get; set; } - - [TV (11,0)][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [NullAllowed, Export ("clusterAnnotationView", ArgumentSemantic.Weak)] - MKAnnotationView ClusterAnnotationView { get; } - - [TV (11,0)][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [Advice ("Pre-defined constants are available from 'MKFeatureDisplayPriority'.")] - [Export ("displayPriority")] - float DisplayPriority { get; set; } - - [TV (11,0)][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [Export ("collisionMode", ArgumentSemantic.Assign)] - MKAnnotationViewCollisionMode CollisionMode { get; set; } - - [TV (11,0)][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [Export ("prepareForDisplay")] - [Advice ("You must call the base method when overriding.")] // [RequiresSuper] - void PrepareForDisplay (); + } [ThreadSafe] @@ -229,7 +204,7 @@ interface MKCircle : MKOverlay { #if !MONOMAC && !TVOS [BaseType (typeof (MKOverlayPathView))] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use 'MKCircleRenderer' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use MKCircleRenderer instead")] interface MKCircleView { [Export ("initWithFrame:")] IntPtr Constructor (CGRect frame); @@ -283,11 +258,7 @@ interface MKDirectionsRequest { [Since (6,0)] [TV (9,2)] [Mac (10,9, onlyOn64 : true)] - interface MKMapItem -#if IOS // #if TARGET_OS_IOS - : NSItemProviderReading, NSItemProviderWriting -#endif - { + interface MKMapItem { [Export ("placemark", ArgumentSemantic.Retain)] MKPlacemark Placemark { get; } @@ -372,10 +343,6 @@ interface MKMapItem [iOS (9,0), Mac(10,11)] [NullAllowed] NSTimeZone TimeZone { get; set; } - - [iOS (11,0), Mac (10,13), Watch (4,0), TV (11,0)] - [Field ("MKMapItemTypeIdentifier")] - NSString TypeIdentifier { get; } } #if !WATCH @@ -485,21 +452,8 @@ interface MKMapView { #endif [Export ("dequeueReusableAnnotationViewWithIdentifier:")] - [return: NullAllowed] MKAnnotationView DequeueReusableAnnotation (string withViewIdentifier); - [TV (11,0)][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [Export ("dequeueReusableAnnotationViewWithIdentifier:forAnnotation:")] - MKAnnotationView DequeueReusableAnnotation (string identifier, IMKAnnotation annotation); - - [TV (11,0)][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [Export ("registerClass:forAnnotationViewWithReuseIdentifier:")] - void Register ([NullAllowed] Class viewClass, string identifier); - - [TV (11,0)][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [Wrap ("Register (viewType == null ? null : new Class (viewType), identifier)")] - void Register ([NullAllowed] Type viewType, string identifier); - [Export ("selectAnnotation:animated:")] [PostGet ("SelectedAnnotations")] #if XAMCORE_2_0 @@ -613,7 +567,7 @@ interface MKMapView { #if !MONOMAC && !TVOS [Export ("viewForOverlay:")] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use 'MKOverlayRenderer.RendererForOverlay' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use MKOverlayRenderer.RendererForOverlay instead")] #if XAMCORE_2_0 MKOverlayView ViewForOverlay (IMKOverlay overlay); #else @@ -710,17 +664,6 @@ interface MKMapView { #endif } - [Static] - [TV (11,0)][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [NoWatch] - interface MKMapViewDefault { - [Field ("MKMapViewDefaultAnnotationViewReuseIdentifier")] - NSString AnnotationViewReuseIdentifier { get; } - - [Field ("MKMapViewDefaultClusterAnnotationViewReuseIdentifier")] - NSString ClusterAnnotationViewReuseIdentifier { get; } - } - [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -764,7 +707,7 @@ interface MKMapViewDelegate { #if !MONOMAC && !TVOS [Export ("mapView:viewForOverlay:"), DelegateName ("MKMapViewOverlay"), DefaultValue (null)] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use 'MKOverlayRenderer.RendererForOverlay' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use MKOverlayRenderer.RendererForOverlay instead")] #if XAMCORE_2_0 MKOverlayView GetViewForOverlay (MKMapView mapView, IMKOverlay overlay); #else @@ -772,7 +715,7 @@ interface MKMapViewDelegate { #endif // XAMCORE_2_0 [Export ("mapView:didAddOverlayViews:"), EventArgs ("MKOverlayViews")] - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use 'DidAddOverlayRenderers' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use DidAddOverlayRenderers instead")] void DidAddOverlayViews (MKMapView mapView, MKOverlayView overlayViews); #endif // !MONOMAC && !TVOS @@ -821,10 +764,6 @@ interface MKMapViewDelegate { [Since (7,0), Export ("mapViewDidFinishRenderingMap:fullyRendered:"), EventArgs ("MKDidFinishRenderingMap")] void DidFinishRenderingMap (MKMapView mapView, bool fullyRendered); - - [TV (11,0)][NoWatch][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [Export ("mapView:clusterAnnotationForMemberAnnotations:"), DelegateName ("MKCreateClusterAnnotation"), DefaultValue (null)] - MKClusterAnnotation CreateClusterAnnotation (MKMapView mapView, IMKAnnotation[] memberAnnotations); } [BaseType (typeof (MKAnnotationView))] @@ -845,7 +784,7 @@ interface MKPinAnnotationView { [NoTV] [Export ("pinColor")] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'PinTintColor' instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "Use PinTintColor instead")] MKPinAnnotationColor PinColor { get; set; } [Export ("animatesDrop")] @@ -906,14 +845,13 @@ interface MKPlacemark : MKAnnotation, NSCopying { #endif // !MONOMAC && !WATCH [Watch (3,0)][TV (10,0)][iOS (10,0)] - [Mac (10,12, onlyOn64 : true)] + [NoMac] [Export ("initWithCoordinate:")] IntPtr Constructor (CLLocationCoordinate2D coordinate); -#if !TVOS && XAMCORE_2_0 +#if !TVOS && !MONOMAC && XAMCORE_2_0 [Watch (3,0)][iOS (10,0)] - [Mac (10,12, onlyOn64 : true)] - [NoTV] + [NoTV][NoMac] [Export ("initWithCoordinate:postalAddress:")] IntPtr Constructor (CLLocationCoordinate2D coordinate, CNPostalAddress postalAddress); #endif @@ -924,7 +862,7 @@ interface MKPlacemark : MKAnnotation, NSCopying { #if IOS [BaseType (typeof (NSObject))] - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_5_0, Message = "Use 'CoreLocation.CLGeocoder' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_5_0, Message = "Use CoreLocation.CLGeocoder instead")] // crash (at least) at Dispose time when instance is created by 'init' [DisableDefaultCtor] interface MKReverseGeocoder { @@ -970,7 +908,7 @@ interface MKReverseGeocoderDelegate { } #pragma warning restore 618 - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use 'MKOverlayRenderer' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use MKOverlayRenderer instead")] [BaseType (typeof (UIView))] interface MKOverlayView { [Export ("overlay")] @@ -1021,7 +959,7 @@ interface MKOverlayView { void SetNeedsDisplay (MKMapRect mapRect, /* MKZoomScale */ nfloat zoomScale); } - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use 'MKOverlayPathRenderer' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use MKOverlayPathRenderer instead")] [BaseType (typeof (MKOverlayView))] interface MKOverlayPathView { [Export ("initWithOverlay:")] @@ -1122,7 +1060,7 @@ interface MKPointAnnotation { } #if !MONOMAC && !TVOS - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use 'MKPolygonRenderer' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use MKPolygonRenderer instead")] [BaseType (typeof (MKOverlayPathView))] interface MKPolygonView { [Export ("initWithFrame:")] @@ -1198,7 +1136,7 @@ interface MKPolyline : MKOverlay { } #if !MONOMAC && !TVOS - [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use 'MKPolylineRenderer' instead.")] + [Availability (Introduced = Platform.iOS_4_0, Deprecated = Platform.iOS_7_0, Message = "Use MKPolylineRenderer instead")] [BaseType (typeof (MKOverlayPathView))] interface MKPolylineView { [Export ("initWithFrame:")] @@ -1890,108 +1828,5 @@ interface NSUserActivity_MKMapItem { [Export ("setMapItem:")] void SetMapItem (MKMapItem item); } - -[TV (11,0)][NoWatch][iOS (11,0)][Mac (10,13, onlyOn64: true)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface MKClusterAnnotation : MKAnnotation { - [NullAllowed, Export ("title")] - new string Title { get; set; } - - [NullAllowed, Export ("subtitle")] - new string Subtitle { get; set; } - - [Export ("memberAnnotations")] - IMKAnnotation[] MemberAnnotations { get; } - - [Export ("initWithMemberAnnotations:")] - [DesignatedInitializer] - IntPtr Constructor (IMKAnnotation[] memberAnnotations); - } - - [NoTV][iOS (11,0)][NoMac][NoWatch] - [BaseType (typeof (UIView))] - [DisableDefaultCtor] - interface MKCompassButton { - [Static] - [Export ("compassButtonWithMapView:")] - MKCompassButton FromMapView ([NullAllowed] MKMapView mapView); - - [NullAllowed, Export ("mapView", ArgumentSemantic.Weak)] - MKMapView MapView { get; set; } - - [Export ("compassVisibility", ArgumentSemantic.Assign)] - MKFeatureVisibility CompassVisibility { get; set; } - } - - [TV (11,0)][NoWatch][iOS (11,0)][NoMac] - [BaseType (typeof (MKAnnotationView))] - interface MKMarkerAnnotationView { - - // inlined from base type - [Export ("initWithAnnotation:reuseIdentifier:")] - [PostGet ("Annotation")] - IntPtr Constructor (IMKAnnotation annotation, [NullAllowed] string reuseIdentifier); - - [Export ("titleVisibility", ArgumentSemantic.Assign)] - MKFeatureVisibility TitleVisibility { get; set; } - - [Export ("subtitleVisibility", ArgumentSemantic.Assign)] - MKFeatureVisibility SubtitleVisibility { get; set; } - - [Appearance] - [NullAllowed, Export ("markerTintColor", ArgumentSemantic.Copy)] - UIColor MarkerTintColor { get; set; } - - [Appearance] - [NullAllowed, Export ("glyphTintColor", ArgumentSemantic.Copy)] - UIColor GlyphTintColor { get; set; } - - [Appearance] - [NullAllowed, Export ("glyphText")] - string GlyphText { get; set; } - - [Appearance] - [NullAllowed, Export ("glyphImage", ArgumentSemantic.Copy)] - UIImage GlyphImage { get; set; } - - [Appearance] - [NullAllowed, Export ("selectedGlyphImage", ArgumentSemantic.Copy)] - UIImage SelectedGlyphImage { get; set; } - - [Export ("animatesWhenAdded")] - bool AnimatesWhenAdded { get; set; } - } - - [TV (11,0)][NoWatch][iOS (11,0)][NoMac] - [BaseType (typeof (UIView))] - [DisableDefaultCtor] - interface MKScaleView { - - [Static] - [Export ("scaleViewWithMapView:")] - MKScaleView FromMapView ([NullAllowed] MKMapView mapView); - - [NullAllowed, Export ("mapView", ArgumentSemantic.Weak)] - MKMapView MapView { get; set; } - - [Export ("scaleVisibility", ArgumentSemantic.Assign)] - MKFeatureVisibility ScaleVisibility { get; set; } - - [Export ("legendAlignment", ArgumentSemantic.Assign)] - MKScaleViewAlignment LegendAlignment { get; set; } - } - - [NoTV][iOS (11,0)][NoWatch][NoMac] - [BaseType (typeof (UIView))] - [DisableDefaultCtor] - interface MKUserTrackingButton { - [Static] - [Export ("userTrackingButtonWithMapView:")] - MKUserTrackingButton FromMapView ([NullAllowed] MKMapView mapView); - - [NullAllowed, Export ("mapView", ArgumentSemantic.Weak)] - MKMapView MapView { get; set; } - } } #endif // XAMCORE_2_0 || !MONOMAC diff --git a/src/medialibrary.cs b/src/medialibrary.cs index 1f00309ec41..a64bb31a90d 100644 --- a/src/medialibrary.cs +++ b/src/medialibrary.cs @@ -156,18 +156,6 @@ interface MediaLibraryTypeIdentifierKey { [Field ("MLPhotosFrontCameraGroupTypeIdentifier")] NSString PhotosFrontCameraGroupTypeIdentifier { get; } - [Mac (10,13, onlyOn64 : true)] - [Field ("MLPhotosLivePhotosGroupTypeIdentifier")] - NSString PhotosLivePhotosGroupTypeIdentifier { get; } - - [Mac (10,13, onlyOn64 : true)] - [Field ("MLPhotosLongExposureGroupTypeIdentifier")] - NSString PhotosLongExposureGroupTypeIdentifier { get; } - - [Mac (10,13, onlyOn64 : true)] - [Field ("MLPhotosAnimatedGroupTypeIdentifier")] - NSString PhotosAnimatedGroupTypeIdentifier { get; } - [Mac (10,10, onlyOn64 : true)] [Field ("MLPhotosPanoramasGroupTypeIdentifier")] NSString PhotosPanoramasGroupTypeIdentifier { get; } diff --git a/src/mediaplayer.cs b/src/mediaplayer.cs index e12c4e3814b..299529ee990 100644 --- a/src/mediaplayer.cs +++ b/src/mediaplayer.cs @@ -22,9 +22,10 @@ namespace XamCore.MediaPlayer { #if XAMCORE_2_0 || !MONOMAC - [Mac (10,12,2, onlyOn64: true)] // type exists only to expose fields + [NoMac] + [NoTV] [BaseType (typeof (NSObject))] -#if XAMCORE_2_0 && IOS +#if XAMCORE_2_0 // introduced in 4.2 interface MPMediaEntity : NSSecureCoding { #else @@ -48,7 +49,7 @@ interface MPMediaItem : NSSecureCoding { [Field ("MPMediaEntityPropertyPersistentID")] NSString PropertyPersistentID { get; } -#if XAMCORE_2_0 && IOS +#if XAMCORE_2_0 } #if MONOMAC || TVOS [Mac (10,12,2, onlyOn64: true)] @@ -58,20 +59,20 @@ interface MPMediaItem : NSSecureCoding { #endif interface MPMediaItem { #endif - [NoMac][NoTV] + +#if !MONOMAC [Since (4,2)] [NoMac] [NoTV] [Export ("persistentIDPropertyForGroupingType:")][Static] string GetPersistentIDProperty (MPMediaGrouping groupingType); - [NoMac][NoTV] [Since (4,2)] [NoMac] [NoTV] [Export ("titlePropertyForGroupingType:")][Static] string GetTitleProperty (MPMediaGrouping groupingType); - +#endif [Since (3,0)] [Field ("MPMediaItemPropertyPersistentID")] [EditorBrowsable (EditorBrowsableState.Advanced)] @@ -304,13 +305,13 @@ interface MPMediaItemArtwork { [NoTV] // Objective-C exception thrown. Name: MPMediaItemCollectionInitException Reason: -init is not supported, use -initWithItems: [DisableDefaultCtor] -#if XAMCORE_2_0 && IOS +#if XAMCORE_2_0 // introduced in 4.2 - but the type was never added to classic [BaseType (typeof (MPMediaEntity))] #else [BaseType (typeof (NSObject))] #endif -#if XAMCORE_3_0 || !XAMCORE_2_0 || !IOS +#if XAMCORE_3_0 || !XAMCORE_2_0 interface MPMediaItemCollection : NSSecureCoding { #else // part of the bug is that we inlined MPMediaEntity needlessly @@ -371,7 +372,7 @@ interface MPMediaLibrary : NSSecureCoding { [iOS (9,3)] [Export ("addItemWithProductID:completionHandler:")] [Async] -#if XAMCORE_2_0 && IOS +#if XAMCORE_2_0 // MPMediaEntity was not part of classic void AddItem (string productID, [NullAllowed] Action completionHandler); #else @@ -820,7 +821,7 @@ interface MPMediaPlayback { #if !MONOMAC [NoTV] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] + [Availability (Deprecated = Platform.iOS_9_0)] [BaseType (typeof (NSObject))] interface MPMoviePlayerController : MPMediaPlayback { [DesignatedInitializer] @@ -829,14 +830,14 @@ interface MPMoviePlayerController : MPMediaPlayback { [Export ("backgroundColor", ArgumentSemantic.Retain)] // You should avoid using this property. It is available only when you use the initWithContentURL: method to initialize the movie player controller object. - [Availability (Introduced = Platform.iOS_2_0, Deprecated = Platform.iOS_3_2, Obsoleted = Platform.iOS_8_0, Message = "Do not use; this API was removed and is not always available.")] + [Availability (Introduced = Platform.iOS_2_0, Deprecated = Platform.iOS_3_2, Obsoleted = Platform.iOS_8_0, Message = "Do not use; this API was removed in iOS 8.0 and is not always available")] UIColor BackgroundColor { get; set; } [Export ("scalingMode")] MPMovieScalingMode ScalingMode { get; set; } [Export ("movieControlMode")] - [Availability (Introduced = Platform.iOS_2_0, Deprecated = Platform.iOS_3_2, Obsoleted = Platform.iOS_8_0, Message = "Do not use; this API was removed.")] + [Availability (Introduced = Platform.iOS_2_0, Deprecated = Platform.iOS_3_2, Obsoleted = Platform.iOS_8_0, Message = "Do not use; this API was removed in iOS 8.0")] MPMovieControlMode MovieControlMode { get; set; } [Since (3,2)] @@ -877,7 +878,7 @@ interface MPMoviePlayerController : MPMediaPlayback { bool ShouldAutoplay { get; set; } [Export ("useApplicationAudioSession")] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] + [Availability (Introduced = Platform.iOS_3_2, Deprecated = Platform.iOS_6_0)] bool UseApplicationAudioSession { get; set; } [Since (3,2)] @@ -896,12 +897,10 @@ interface MPMoviePlayerController : MPMediaPlayback { [Export ("airPlayVideoActive")] bool AirPlayVideoActive { [Bind ("isAirPlayVideoActive")] get; } - [Availability (Deprecated = Platform.iOS_9_0)] [Since (4,3)] [Export ("accessLog")] MPMovieAccessLog AccessLog { get; } - [Availability (Deprecated = Platform.iOS_9_0)] [Since (4,3)] [Export ("errorLog")] MPMovieErrorLog ErrorLog { get; } @@ -909,7 +908,7 @@ interface MPMoviePlayerController : MPMediaPlayback { // Brought it from the MPMediaPlayback.h [Export ("thumbnailImageAtTime:timeOption:")] - [Availability (Introduced = Platform.iOS_3_2, Deprecated = Platform.iOS_7_0, Message = "Use 'RequestThumbnails' instead.")] + [Availability (Introduced = Platform.iOS_3_2, Deprecated = Platform.iOS_7_0, Message = "Use RequestThumbnails instead")] UIImage ThumbnailImageAt (double time, MPMovieTimeOption timeOption); [Since (3,2)] @@ -951,156 +950,128 @@ interface MPMoviePlayerController : MPMediaPlayback { [Export ("timedMetadata")] MPTimedMetadata [] TimedMetadata { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerScalingModeDidChangeNotification")] [Notification] NSString ScalingModeDidChangeNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerPlaybackDidFinishNotification")] [Notification (typeof (MPMoviePlayerFinishedEventArgs))] NSString PlaybackDidFinishNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerPlaybackDidFinishReasonUserInfoKey")] // NSNumber (MPMovieFinishReason) NSString PlaybackDidFinishReasonUserInfoKey { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerPlaybackStateDidChangeNotification")] [Notification] NSString PlaybackStateDidChangeNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerLoadStateDidChangeNotification")] [Notification] NSString LoadStateDidChangeNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerNowPlayingMovieDidChangeNotification")] [Notification] NSString NowPlayingMovieDidChangeNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerWillEnterFullscreenNotification")] [Notification (typeof (MPMoviePlayerFullScreenEventArgs))] [Notification] NSString WillEnterFullscreenNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerDidEnterFullscreenNotification")] [Notification] NSString DidEnterFullscreenNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerWillExitFullscreenNotification")] [Notification (typeof (MPMoviePlayerFullScreenEventArgs))] NSString WillExitFullscreenNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerDidExitFullscreenNotification")] [Notification] NSString DidExitFullscreenNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerFullscreenAnimationDurationUserInfoKey")] NSString FullscreenAnimationDurationUserInfoKey { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerFullscreenAnimationCurveUserInfoKey")] NSString FullscreenAnimationCurveUserInfoKey { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMovieMediaTypesAvailableNotification")] [Notification] NSString TypesAvailableNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMovieSourceTypeAvailableNotification")] [Notification] NSString SourceTypeAvailableNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMovieDurationAvailableNotification")] [Notification] NSString DurationAvailableNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMovieNaturalSizeAvailableNotification")] [Notification] NSString NaturalSizeAvailableNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerThumbnailImageRequestDidFinishNotification")] [Notification (typeof (MPMoviePlayerThumbnailEventArgs))] NSString ThumbnailImageRequestDidFinishNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerThumbnailImageKey")] NSString ThumbnailImageKey { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerThumbnailTimeKey")] NSString ThumbnailTimeKey { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (3,2)] [Field ("MPMoviePlayerThumbnailErrorKey")] NSString ThumbnailErrorKey { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (4,0)] [Field ("MPMoviePlayerTimedMetadataUpdatedNotification")] [Notification (typeof (MPMoviePlayerTimedMetadataEventArgs))] NSString TimedMetadataUpdatedNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (4,0)] [Field ("MPMoviePlayerTimedMetadataUserInfoKey")] NSString TimedMetadataUserInfoKey { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (4,0)] [Field ("MPMoviePlayerTimedMetadataKeyName")] NSString TimedMetadataKeyName { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (4,0)] [Field ("MPMoviePlayerTimedMetadataKeyInfo")] NSString TimedMetadataKeyInfo { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (4,0)] [Field ("MPMoviePlayerTimedMetadataKeyMIMEType")] NSString TimedMetadataKeyMIMEType { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (4,0)] [Field ("MPMoviePlayerTimedMetadataKeyDataType")] NSString TimedMetadataKeyDataType { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (4,0)] [Field ("MPMoviePlayerTimedMetadataKeyLanguageCode")] NSString TimedMetadataKeyLanguageCode { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMediaPlaybackIsPreparedToPlayDidChangeNotification")] [Notification] NSString MediaPlaybackIsPreparedToPlayDidChangeNotification { get; } @@ -1109,13 +1080,11 @@ interface MPMoviePlayerController : MPMediaPlayback { [Export ("readyForDisplay")] bool ReadyForDisplay { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [Since (6,0)] [Field ("MPMoviePlayerReadyForDisplayDidChangeNotification")] [Notification] NSString MoviePlayerReadyForDisplayDidChangeNotification { get; } - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] [iOS (5,0)] [Field ("MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification")] [Notification] @@ -1153,7 +1122,7 @@ interface MPTimedMetadata { #if !MONOMAC [NoTV] [BaseType (typeof (UIViewController))] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] + [Availability (Introduced = Platform.iOS_3_2, Deprecated = Platform.iOS_9_0)] interface MPMoviePlayerViewController { [DesignatedInitializer] [Export ("initWithContentURL:")] @@ -1163,7 +1132,7 @@ interface MPMoviePlayerViewController { MPMoviePlayerController MoviePlayer { get; } // Directly removed, shows up in iOS 6.1 SDK, but not any later SDKs. - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_7_0, Message = "Do not use; this API was removed.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_7_0, Message = "Do not use; this API was removed in iOS 7.0")] [Export ("shouldAutorotateToInterfaceOrientation:")] bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation orientation); } @@ -1182,7 +1151,7 @@ interface MPMusicPlayerController : MPMediaPlayback { MPMusicPlayerApplicationController ApplicationQueuePlayer { get; } [Static, Export ("iPodMusicPlayer")] - [Availability (Deprecated = Platform.iOS_8_0, Message="Use 'SystemMusicPlayer' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message="Use SystemMusicPlayer starting with iOS 8.0")] MPMusicPlayerController iPodMusicPlayer { get; } [iOS (8,0)] @@ -1198,7 +1167,7 @@ interface MPMusicPlayerController : MPMediaPlayback { [Export ("shuffleMode")] MPMusicShuffleMode ShuffleMode { get; set; } - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_7_0, Message = "Use 'MPVolumeView' for volume control instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_7_0, Message = "Use MPVolumeView for volume control instead")] [Export ("volume")] float Volume { get; set; } // nfloat, not CGFloat @@ -1433,12 +1402,6 @@ interface MPNowPlayingInfoCenter { [Field ("MPNowPlayingInfoPropertyExternalUserProfileIdentifier")] NSString PropertyExternalUserProfileIdentifier { get; } - [iOS (11,0)] - [TV (11,0)] - [Mac (10,13, onlyOn64: true)] - [Field ("MPNowPlayingInfoPropertyServiceIdentifier")] - NSString PropertyServiceIdentifier { get; } - [iOS (10,0)] [TV (10,0)] [Field ("MPNowPlayingInfoPropertyPlaybackProgress")] @@ -1456,7 +1419,6 @@ interface MPNowPlayingInfoCenter { [iOS (10,3)] [TV (10,2)] - [Mac (10,12,3, onlyOn64: true)] [Field ("MPNowPlayingInfoPropertyAssetURL")] NSString PropertyAssetUrl { get; } } @@ -1486,11 +1448,13 @@ interface MPContentItem { [Export ("title")] string Title { get; set; } + [NoMac] [iOS (10,0)] [TV (10,0)] [Export ("streamingContent")] bool StreamingContent { [Bind ("isStreamingContent")] get; set; } + [NoMac] [iOS (10,0)] [TV (10,0)] [Export ("explicitContent")] @@ -1558,7 +1522,7 @@ interface MPPlayableContentDelegate { void ContextUpdated (MPPlayableContentManager contentManager, MPPlayableContentManagerContext context); [iOS (9,0)] - [Deprecated (PlatformName.iOS, 9, 3, message: "Use 'InitializePlaybackQueue (MPPlayableContentManager, MPContentItem[], Action)' instead.")] + [Deprecated (PlatformName.iOS, 9, 3, message: "Use InitializePlaybackQueue (MPPlayableContentManager, MPContentItem[], Action) instead")] [Export ("playableContentManager:initializePlaybackQueueWithCompletionHandler:")] void InitializePlaybackQueue (MPPlayableContentManager contentManager, Action completionHandler); @@ -1626,7 +1590,7 @@ interface MPPlayableContentManagerContext { [Export ("contentLimitsEnforced")] bool ContentLimitsEnforced { get; } - [Availability (Introduced = Platform.iOS_8_4, Deprecated = Platform.iOS_9_0, Message = "Replaced by 'ContentLimitsEnforced'.")] + [Availability (Introduced = Platform.iOS_8_4, Deprecated = Platform.iOS_9_0, Message = "Replaced by ContentLimitsEnforced")] [Export ("contentLimitsEnabled")] bool ContentLimitsEnabled { get; } @@ -1698,6 +1662,7 @@ interface MPFeedbackCommand { [Export ("localizedTitle")] string LocalizedTitle { get; set; } + [NoMac] [iOS (8,2)] // added in 8.2, shown as NS_AVAILABLE_IOS(8_0) [Export ("localizedShortTitle")] string LocalizedShortTitle { get; set; } @@ -2129,61 +2094,5 @@ interface MPMusicPlayerApplicationController [Export ("performQueueTransaction:completionHandler:")] void Perform (Action queueTransaction, Action completionHandler); } - - [NoTV][NoMac] - [iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface MPMusicPlayerPlayParameters : NSSecureCoding { - [Export ("initWithDictionary:")] - IntPtr Constructor (NSDictionary dictionary); - - [Export ("dictionary", ArgumentSemantic.Copy)] - NSDictionary Dictionary { get; } - } - - [NoTV][NoMac] - [iOS (11,0)] - [BaseType (typeof (MPMusicPlayerQueueDescriptor))] - [DisableDefaultCtor] - interface MPMusicPlayerPlayParametersQueueDescriptor { - [Export ("initWithPlayParametersQueue:")] - IntPtr Constructor (MPMusicPlayerPlayParameters[] playParametersQueue); - - [Export ("playParametersQueue", ArgumentSemantic.Copy)] - MPMusicPlayerPlayParameters[] PlayParametersQueue { get; set; } - - [NullAllowed, Export ("startItemPlayParameters", ArgumentSemantic.Strong)] - MPMusicPlayerPlayParameters StartItemPlayParameters { get; set; } - - [Export ("setStartTime:forItemWithPlayParameters:")] - void SetStartTime (/* NSTimeInterval */ double startTime, MPMusicPlayerPlayParameters playParameters); - - [Export ("setEndTime:forItemWithPlayParameters:")] - void SetEndTime (/* NSTimeInterval */ double endTime, MPMusicPlayerPlayParameters playParameters); - } - - interface IMPSystemMusicPlayerController {} - - [NoTV][NoMac] - [iOS (11,0)] - [Protocol] - interface MPSystemMusicPlayerController { - [Abstract] - [Export ("openToPlayQueueDescriptor:")] - void OpenToPlay (MPMusicPlayerQueueDescriptor queueDescriptor); - } - - [Category] - [BaseType (typeof (NSUserActivity))] - [TV (10,0,1)][iOS (10,1)] - [NoWatch][NoMac] - interface NSUserActivity_MediaPlayerAdditions { - [NullAllowed, Export ("externalMediaContentIdentifier")] - NSString GetExternalMediaContentIdentifier (); - - [NullAllowed, Export ("setExternalMediaContentIdentifier:")] - void SetExternalMediaContentIdentifier (NSString identifier); - } #endif } diff --git a/src/messages.cs b/src/messages.cs index ea2058432c6..1f2c10b9bf1 100644 --- a/src/messages.cs +++ b/src/messages.cs @@ -22,8 +22,7 @@ namespace XamCore.Messages { public enum MSMessagesAppPresentationStyle : nuint { Compact, - Expanded, - Transcript, + Expanded } [iOS (10,0)] @@ -39,7 +38,6 @@ public enum MSStickerSize : nint [ErrorDomain ("MSMessagesErrorDomain")] public enum MSMessageErrorCode : nint { - Unknown = -1, FileNotFound = 1, FileUnreadable, ImproperFileType, @@ -48,23 +46,11 @@ public enum MSMessageErrorCode : nint StickerFileImproperFileSize, StickerFileImproperFileFormat, UrlExceedsMaxSize, - SendWithoutRecentInteraction, - SendWhileNotVisible, - } - - [iOS (11,0)] - [Protocol] - interface MSMessagesAppTranscriptPresentation - { - [iOS (11,0)] - [Abstract] - [Export ("contentSizeThatFits:")] - CGSize GetContentSizeThatFits (CGSize size); } [iOS (10,0)] [BaseType (typeof(UIViewController))] - interface MSMessagesAppViewController : MSMessagesAppTranscriptPresentation + interface MSMessagesAppViewController { // inlined ctor [Export ("initWithNibName:bundle:")] @@ -144,26 +130,6 @@ interface MSConversation [Export ("insertAttachment:withAlternateFilename:completionHandler:")] [Async] void InsertAttachment (NSUrl url, [NullAllowed] string filename, [NullAllowed] Action completionHandler); - - [iOS (11,0)] - [Export ("sendMessage:completionHandler:")] - [Async] - void SendMessage (MSMessage message, [NullAllowed] Action completionHandler); - - [iOS (11,0)] - [Export ("sendSticker:completionHandler:")] - [Async] - void SendSticker (MSSticker sticker, [NullAllowed] Action completionHandler); - - [iOS (11,0)] - [Export ("sendText:completionHandler:")] - [Async] - void SendText (string text, [NullAllowed] Action completionHandler); - - [iOS (11,0)] - [Export ("sendAttachment:withAlternateFilename:completionHandler:")] - [Async] - void SendAttachment (NSUrl url, [NullAllowed] string filename, [NullAllowed] Action completionHandler); } [iOS (10,0)] @@ -178,10 +144,6 @@ interface MSMessage : NSCopying, NSSecureCoding [NullAllowed, Export ("session")] MSSession Session { get; } - [iOS (11,0)] - [Export ("pending")] - bool Pending { [Bind ("isPending")] get; } - [Export ("senderParticipantIdentifier")] NSUuid SenderParticipantIdentifier { get; } @@ -347,18 +309,5 @@ interface MSStickerBrowserViewController : MSStickerBrowserViewDataSource [Export ("stickerSize")] MSStickerSize StickerSize { get; } } - - [iOS (11,0)] - [BaseType (typeof(MSMessageLayout))] - [DisableDefaultCtor] - interface MSMessageLiveLayout - { - [Export ("initWithAlternateLayout:")] - [DesignatedInitializer] - IntPtr Constructor (MSMessageTemplateLayout alternateLayout); - - [Export ("alternateLayout")] - MSMessageTemplateLayout AlternateLayout { get; } - } } #endif // !MONOMAC diff --git a/src/messageui.cs b/src/messageui.cs index 9b391d206f7..adf00e9680d 100644 --- a/src/messageui.cs +++ b/src/messageui.cs @@ -46,10 +46,6 @@ interface MFMailComposeViewController : UIAppearance { [Export ("addAttachmentData:mimeType:fileName:")] void AddAttachmentData (NSData attachment, string mimeType, string fileName); - - [iOS (11,0)] - [Export ("setPreferredSendingEmailAddress:")] - void SetPreferredSendingEmailAddress (string emailAddress); } #if XAMCORE_3_0 diff --git a/src/metal.cs b/src/metal.cs index 6ce8f722660..7a41af66efe 100644 --- a/src/metal.cs +++ b/src/metal.cs @@ -24,14 +24,11 @@ using XamCore.ObjCRuntime; namespace XamCore.Metal { + delegate void MTLDeallocator (IntPtr pointer, nuint length); delegate void MTLNewComputePipelineStateWithReflectionCompletionHandler (IMTLComputePipelineState computePipelineState, MTLComputePipelineReflection reflection, NSError error); - - delegate void MTLDrawablePresentedHandler (IMTLDrawable drawable); - - delegate void MTLNewRenderPipelineStateWithReflectionCompletionHandler (IMTLRenderPipelineState renderPipelineState, MTLRenderPipelineReflection reflection, NSError error); - + interface IMTLCommandEncoder {} [iOS (8,0)][Mac (10,11, onlyOn64 : true)] @@ -80,17 +77,13 @@ interface MTLArgument { [Export ("isDepthTexture")] bool IsDepthTexture { get; } - [iOS (10, 0), TV (10,0), NoWatch, Mac (10,13, onlyOn64: true)] + [iOS (10, 0), TV (10,0), NoWatch, NoMac] [Export ("arrayLength")] nuint ArrayLength { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), NoWatch] - [NullAllowed, Export ("bufferPointerType")] - MTLPointerType BufferPointerType { get; } } [iOS (8,0)][Mac (10,11, onlyOn64 : true)] - [BaseType (typeof (MTLType))] + [BaseType (typeof (NSObject))] interface MTLArrayType { [Export ("arrayLength")] nuint Length { get; } @@ -106,18 +99,6 @@ interface MTLArrayType { [Export ("elementArrayType")] MTLArrayType ElementArrayType (); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [Export ("argumentIndexStride")] - nuint ArgumentIndexStride { get; } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [NullAllowed, Export ("elementTextureReferenceType")] - MTLTextureReferenceType ElementTextureReferenceType { get; } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [NullAllowed, Export ("elementPointerType")] - MTLPointerType ElementPointerType { get; } } [iOS (8,0)][Mac (10,11, onlyOn64 : true)] @@ -155,11 +136,10 @@ partial interface MTLBuffer : MTLResource { #if MONOMAC [Abstract, Export ("didModifyRange:")] void DidModify (NSRange range); -#endif - [Mac (10,13, onlyOn64: true)] - [return: NullAllowed] +#else [Abstract, Export ("newTextureWithDescriptor:offset:bytesPerRow:")] IMTLTexture CreateTexture (MTLTextureDescriptor descriptor, nuint offset, nuint bytesPerRow); +#endif [iOS (10,0), TV (10,0), NoWatch, Mac (10,12)] #if XAMCORE_4_0 @@ -259,7 +239,6 @@ partial interface MTLCommandBuffer { [Abstract] #endif [Export ("parallelRenderCommandEncoderWithDescriptor:")] - [return: NullAllowed] IMTLParallelRenderCommandEncoder CreateParallelRenderCommandEncoder (MTLRenderPassDescriptor renderPassDescriptor); #if XAMCORE_2_0 @@ -314,20 +293,6 @@ partial interface MTLCommandBuffer { [iOS (10,3)][TV (10,2)][Mac (10,12,4, onlyOn64 : true)] [Export ("GPUEndTime")] double /* CFTimeInterval */ GpuEndTime { get; } - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] // @required but we can't add abstract members in C# and keep binary compatibility -#endif - [Export ("pushDebugGroup:")] - void PushDebugGroup (string @string); - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] // @required but we can't add abstract members in C# and keep binary compatibility -#endif - [Export ("popDebugGroup")] - void PopDebugGroup (); } interface IMTLCommandQueue {} @@ -344,15 +309,12 @@ partial interface MTLCommandQueue { [Abstract, Export ("commandBuffer")] [Autorelease] - [return: NullAllowed] IMTLCommandBuffer CommandBuffer (); [Abstract, Export ("commandBufferWithUnretainedReferences")] [Autorelease] - [return: NullAllowed] IMTLCommandBuffer CommandBufferWithUnretainedReferences (); - [Availability (Deprecated = Platform.iOS_11_0 | Platform.Mac_10_13, Message = "Use 'MTLCaptureScope' instead.")] [Abstract, Export ("insertDebugCaptureBoundary")] void InsertDebugCaptureBoundary (); } @@ -435,62 +397,19 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { [Export ("setStageInRegion:")] void SetStage (MTLRegion region); - [iOS (10,0), TV (10,0), NoWatch, Mac (10,13, onlyOn64: true)] + [iOS (10,0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif [Export ("updateFence:")] void Update (IMTLFence fence); - [iOS (10,0), TV (10,0), NoWatch, Mac (10,13, onlyOn64: true)] + [iOS (10,0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif [Export ("waitForFence:")] void Wait (IMTLFence fence); - - [Mac (10,13, onlyOn64: true)] - [iOS (11,0), NoTV] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("dispatchThreads:threadsPerThreadgroup:")] - void DispatchThreads (MTLSize threadsPerGrid, MTLSize threadsPerThreadgroup); - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("useResource:usage:")] - void UseResource (IMTLResource resource, MTLResourceUsage usage); - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("useResources:count:usage:")] - void UseResources (IMTLResource[] resources, nuint count, MTLResourceUsage usage); - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("useHeap:")] - void UseHeap (IMTLHeap heap); - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("useHeaps:count:")] - void UseHeaps (IMTLHeap[] heaps, nuint count); - - [iOS (11,0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setImageblockWidth:height:")] - void SetImageblock (nuint width, nuint height); } [iOS (8,0)][Mac (10,11, onlyOn64 : true)] @@ -516,27 +435,6 @@ partial interface MTLComputePipelineState { [Abstract, Export ("threadExecutionWidth")] nuint ThreadExecutionWidth { get; } - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [NullAllowed, Export ("label")] - string Label { get; } - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("staticThreadgroupMemoryLength")] - nuint StaticThreadgroupMemoryLength { get; } - - [iOS (11,0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("imageblockMemoryLengthForDimensions:")] - nuint GetImageblockMemoryLength (MTLSize imageblockDimensions); } interface IMTLBlitCommandEncoder {} @@ -587,14 +485,14 @@ partial interface MTLBlitCommandEncoder : MTLCommandEncoder { [Abstract, Export ("copyFromBuffer:sourceOffset:toBuffer:destinationOffset:size:")] void CopyFromBuffer (IMTLBuffer sourceBuffer, nuint sourceOffset, IMTLBuffer destinationBuffer, nuint destinationOffset, nuint size); - [iOS (10,0), TV (10,0), NoWatch, Mac (10,13, onlyOn64: true)] + [iOS (10,0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif [Export ("updateFence:")] void Update (IMTLFence fence); - [iOS (10,0), TV (10,0), NoWatch, Mac (10,13, onlyOn64: true)] + [iOS (10,0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif @@ -604,7 +502,7 @@ partial interface MTLBlitCommandEncoder : MTLCommandEncoder { interface IMTLFence {} - [iOS (10,0), TV (10,0), NoWatch, Mac (10,13, onlyOn64: true)] + [iOS (10,0), TV (10,0), NoWatch, NoMac] [Protocol] // From Apple Docs: Your app does not define classes that implement this protocol. Model is not needed interface MTLFence { @@ -664,66 +562,49 @@ partial interface MTLDevice { [Export ("depth24Stencil8PixelFormatSupported")] bool Depth24Stencil8PixelFormatSupported { [Bind ("isDepth24Stencil8PixelFormatSupported")] get; } - [iOS (10,0), TV (10,0), NoWatch, Mac (10,13)] + [iOS (10,0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif [Export ("heapTextureSizeAndAlignWithDescriptor:")] MTLSizeAndAlign GetHeapTextureSizeAndAlign (MTLTextureDescriptor desc); - [iOS (10,0), TV (10,0), NoWatch, Mac (10, 13)] + [iOS (10,0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif [Export ("heapBufferSizeAndAlignWithLength:options:")] MTLSizeAndAlign GetHeapBufferSizeAndAlignWithLength (nuint length, MTLResourceOptions options); - [iOS (10,0), TV (10,0), NoWatch, Mac (10, 13)] + [iOS (10,0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif [Export ("newHeapWithDescriptor:")] - [return: NullAllowed] IMTLHeap CreateHeap (MTLHeapDescriptor descriptor); [Abstract, Export ("newCommandQueue")] - [return: NullAllowed] IMTLCommandQueue CreateCommandQueue (); [Abstract, Export ("newCommandQueueWithMaxCommandBufferCount:")] - [return: NullAllowed] IMTLCommandQueue CreateCommandQueue (nuint maxCommandBufferCount); [Abstract, Export ("newBufferWithLength:options:")] - [return: NullAllowed] IMTLBuffer CreateBuffer (nuint length, MTLResourceOptions options); [Abstract, Export ("newBufferWithBytes:length:options:")] - [return: NullAllowed] IMTLBuffer CreateBuffer (IntPtr pointer, nuint length, MTLResourceOptions options); [Abstract, Export ("newBufferWithBytesNoCopy:length:options:deallocator:")] - [return: NullAllowed] IMTLBuffer CreateBufferNoCopy (IntPtr pointer, nuint length, MTLResourceOptions options, MTLDeallocator deallocator); [Abstract, Export ("newDepthStencilStateWithDescriptor:")] - [return: NullAllowed] IMTLDepthStencilState CreateDepthStencilState (MTLDepthStencilDescriptor descriptor); [Abstract, Export ("newTextureWithDescriptor:")] - [return: NullAllowed] IMTLTexture CreateTexture (MTLTextureDescriptor descriptor); -#if XAMCORE_4_0 - [Abstract] -#endif - [iOS (11,0), TV (11,0), NoWatch, Mac (10,11)] - [return: NullAllowed] - [Export ("newTextureWithDescriptor:iosurface:plane:")] - IMTLTexture CreateTexture (MTLTextureDescriptor descriptor, XamCore.IOSurface.IOSurface iosurface, nuint plane); - [Abstract, Export ("newSamplerStateWithDescriptor:")] - [return: NullAllowed] IMTLSamplerState CreateSamplerState (MTLSamplerDescriptor descriptor); [Abstract, Export ("newDefaultLibrary")] @@ -801,7 +682,7 @@ partial interface MTLDevice { [Export ("newComputePipelineStateWithDescriptor:options:completionHandler:")] void CreateComputePipelineState (MTLComputePipelineDescriptor descriptor, MTLPipelineOption options, MTLNewComputePipelineStateWithReflectionCompletionHandler completionHandler); - [iOS (10, 0), TV (10,0), NoWatch, Mac (10,13)] + [iOS (10, 0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif @@ -818,124 +699,6 @@ partial interface MTLDevice { #endif [Export ("supportsTextureSampleCount:")] bool SupportsTextureSampleCount (nuint sampleCount); - - [Mac (10, 13), NoiOS, NoWatch, NoTV] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("removable")] - bool Removable { [Bind ("isRemovable")] get; } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("readWriteTextureSupport")] - MTLReadWriteTextureTier ReadWriteTextureSupport { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("argumentBuffersSupport")] - MTLArgumentBuffersTier ArgumentBuffersSupport { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("rasterOrderGroupsSupported")] - bool RasterOrderGroupsSupported { [Bind ("areRasterOrderGroupsSupported")] get; } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("newLibraryWithURL:error:")] - [return: NullAllowed] - IMTLLibrary CreateLibrary (NSUrl url, [NullAllowed] out NSError error); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("minimumLinearTextureAlignmentForPixelFormat:")] - nuint GetMinimumLinearTextureAlignment (MTLPixelFormat format); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("maxThreadgroupMemoryLength")] - nuint MaxThreadgroupMemoryLength { get; } - -[Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("programmableSamplePositionsSupported")] - bool ProgrammableSamplePositionsSupported { [Bind ("areProgrammableSamplePositionsSupported")] get; } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("getDefaultSamplePositions:count:")] - void GetDefaultSamplePositions (IntPtr positions, nuint count); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("newArgumentEncoderWithArguments:")] - [return: NullAllowed] - IMTLArgumentEncoder CreateArgumentEncoder (MTLArgumentDescriptor[] arguments); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("registryID")] - ulong RegistryId { get; } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("currentAllocatedSize")] - nuint CurrentAllocatedSize { get; } - -#if false // https://bugzilla.xamarin.com/show_bug.cgi?id=59342 - [Mac (10,13, onlyOn64: true), NoiOS, NoTV, NoWatch] - [Notification] - [Field ("MTLDeviceWasAddedNotification")] - NSString DeviceWasAdded { get; } - - [Mac (10,13, onlyOn64: true), NoiOS, NoTV, NoWatch] - [Notification] - [Field ("MTLDeviceRemovalRequestedNotification")] - NSString DeviceRemovalRequested { get; } - - [Mac (10,13, onlyOn64: true), NoiOS, NoTV, NoWatch] - [Notification] - [Field ("MTLDeviceWasRemovedNotification")] - NSString DeviceWasRemoved { get; } -#endif - - [iOS (11,0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("newRenderPipelineStateWithTileDescriptor:options:reflection:error:")] - [return: NullAllowed] - IMTLRenderPipelineState CreateRenderPipelineState (MTLTileRenderPipelineDescriptor descriptor, MTLPipelineOption options, [NullAllowed] out MTLRenderPipelineReflection reflection, [NullAllowed] out NSError error); - - [iOS (11,0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("newRenderPipelineStateWithTileDescriptor:options:completionHandler:")] - void CreateRenderPipelineState (MTLTileRenderPipelineDescriptor descriptor, MTLPipelineOption options, MTLNewRenderPipelineStateWithReflectionCompletionHandler completionHandler); } interface IMTLDrawable {} @@ -1061,7 +824,6 @@ partial interface MTLTexture : MTLResource { bool FramebufferOnly { [Bind ("isFramebufferOnly")] get; } [Abstract, Export ("newTextureViewWithPixelFormat:")] - [return: NullAllowed] IMTLTexture CreateTextureView (MTLPixelFormat pixelFormat); #if XAMCORE_4_0 @@ -1074,7 +836,6 @@ partial interface MTLTexture : MTLResource { [Abstract] #endif [Export ("newTextureViewWithPixelFormat:textureType:levels:slices:")] - [return: NullAllowed] IMTLTexture CreateTextureView (MTLPixelFormat pixelFormat, MTLTextureType textureType, NSRange levelRange, NSRange sliceRange); #if XAMCORE_2_0 @@ -1100,20 +861,6 @@ partial interface MTLTexture : MTLResource { #endif [Export ("replaceRegion:mipmapLevel:withBytes:bytesPerRow:")] void ReplaceRegion (MTLRegion region, nuint level, IntPtr pixelBytes, nuint bytesPerRow); - - [Mac (10, 11), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [NullAllowed, Export ("iosurface")] - XamCore.IOSurface.IOSurface IOSurface { get; } - - [Mac (10, 11), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("iosurfacePlane")] - nuint IOSurfacePlane { get; } } @@ -1219,10 +966,6 @@ partial interface MTLSamplerDescriptor : NSCopying { // /SourceCache/AcceleratorKit/AcceleratorKit-14.9/Framework/MTLSampler.m:240: failed assertion `label must not be nil.' [Export ("label")] string Label { get; set; } - - [Mac (10, 13), iOS (11,0), TV (11,0), NoWatch] - [Export ("supportArgumentBuffers")] - bool SupportArgumentBuffers { get; set; } } interface IMTLSamplerState {} @@ -1312,18 +1055,6 @@ partial interface MTLRenderPipelineDescriptor : NSCopying { [iOS (10, 0), TV (10,0), NoWatch, Mac (10,12)] [Export ("tessellationOutputWindingOrder", ArgumentSemantic.Assign)] MTLWinding TessellationOutputWindingOrder { get; set; } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [Export ("vertexBuffers")] - MTLPipelineBufferDescriptorArray VertexBuffers { get; } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [Export ("fragmentBuffers")] - MTLPipelineBufferDescriptorArray FragmentBuffers { get; } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [Export ("rasterSampleCount")] - nuint RasterSampleCount { get; set; } } [iOS (8,0)][Mac (10,11, onlyOn64 : true)] @@ -1348,35 +1079,6 @@ partial interface MTLRenderPipelineState { [Abstract, Export ("device")] IMTLDevice Device { get; } - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("maxTotalThreadsPerThreadgroup")] - nuint MaxTotalThreadsPerThreadgroup { get; } - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("threadgroupSizeMatchesTileSize")] - bool ThreadgroupSizeMatchesTileSize { get; } - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("imageblockSampleLength")] - nuint ImageblockSampleLength { get; } - - [iOS (11,0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("imageblockMemoryLengthForDimensions:")] - nuint GetImageblockMemoryLength (MTLSize imageblockDimensions); - } [iOS (8,0)][Mac (10,11, onlyOn64 : true)] @@ -1602,20 +1304,6 @@ partial interface MTLFunction { #endif [Export ("functionConstantsDictionary")] NSDictionary FunctionConstants { get; } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("newArgumentEncoderWithBufferIndex:")] - IMTLArgumentEncoder CreateArgumentEncoder (nuint bufferIndex); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("newArgumentEncoderWithBufferIndex:reflection:")] - IMTLArgumentEncoder CreateArgumentEncoder (nuint bufferIndex, [NullAllowed] out MTLArgument reflection); } interface IMTLLibrary {} @@ -1718,22 +1406,10 @@ interface MTLStructMember { [Export ("arrayType")] MTLArrayType ArrayType (); #endif - - [Mac (10, 13), iOS (11,0), TV (11,0), NoWatch] - [Export ("argumentIndex")] - nuint ArgumentIndex { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), NoWatch] - [NullAllowed, Export ("textureReferenceType")] - MTLTextureReferenceType TextureReferenceType { get; } - - [Mac (10, 13), iOS (11,0), TV (11,0), NoWatch] - [NullAllowed, Export ("pointerType")] - MTLPointerType PointerType { get; } } [iOS (8,0)][Mac (10,11, onlyOn64 : true)] - [BaseType (typeof (MTLType))] + [BaseType (typeof (NSObject))] interface MTLStructType { [Export ("members")] MTLStructMember [] Members { get; } @@ -1790,7 +1466,6 @@ interface MTLParallelRenderCommandEncoder : MTLCommandEncoder { [Abstract] [Export ("renderCommandEncoder")] [Autorelease] - [return: NullAllowed] IMTLRenderCommandEncoder CreateRenderCommandEncoder (); [iOS (10,0), TV (10,0), NoWatch, Mac (10,12)] @@ -1813,27 +1488,6 @@ interface MTLParallelRenderCommandEncoder : MTLCommandEncoder { #endif [Export ("setStencilStoreAction:")] void SetStencilStoreAction (MTLStoreAction storeAction); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setColorStoreActionOptions:atIndex:")] - void SetColorStoreActionOptions (MTLStoreActionOptions storeActionOptions, nuint colorAttachmentIndex); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setDepthStoreActionOptions:")] - void SetDepthStoreActionOptions (MTLStoreActionOptions storeActionOptions); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setStencilStoreActionOptions:")] - void SetStencilStoreActionOptions (MTLStoreActionOptions storeActionOptions); } interface IMTLRenderCommandEncoder {} @@ -1866,7 +1520,9 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Abstract, Export ("setCullMode:")] void SetCullMode (MTLCullMode cullMode); - [Mac (10,11, onlyOn64 : true), TV (11,0), iOS (11,0), NoWatch] + [Mac (10,11, onlyOn64 : true)] + [NoTV] + [NoiOS] // it was [iOS (9,0)] but now it's marked as not available on iOS in Xcode 8 #if XAMCORE_4_0 // Apple added a new required member in iOS 9, but that breaks our binary compat, so we can't do that in our existing code. [Abstract] @@ -2030,14 +1686,14 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("textureBarrier")] void TextureBarrier (); - [iOS (10,0), TV (10,0), NoWatch, Mac (10,13)] + [iOS (10,0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif [Export ("updateFence:afterStages:")] void Update (IMTLFence fence, MTLRenderStages stages); - [iOS (10,0), TV (10,0), NoWatch, Mac (10,13)] + [iOS (10,0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif @@ -2085,167 +1741,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { #endif [Export ("drawIndexedPatches:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:indirectBuffer:indirectBufferOffset:")] void DrawIndexedPatches (nuint numberOfPatchControlPoints, [NullAllowed] IMTLBuffer patchIndexBuffer, nuint patchIndexBufferOffset, IMTLBuffer controlPointIndexBuffer, nuint controlPointIndexBufferOffset, IMTLBuffer indirectBuffer, nuint indirectBufferOffset); - - [Mac (10,13), NoiOS, NoTV, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setViewports:count:")] - void SetViewports (IntPtr viewports, nuint count); - - [Mac (10,13), NoiOS, NoTV, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setScissorRects:count:")] - void SetScissorRects (IntPtr scissorRects, nuint count); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setColorStoreActionOptions:atIndex:")] - void SetColorStoreActionOptions (MTLStoreActionOptions storeActionOptions, nuint colorAttachmentIndex); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setDepthStoreActionOptions:")] - void SetDepthStoreActionOptions (MTLStoreActionOptions storeActionOptions); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setStencilStoreActionOptions:")] - void SetStencilStoreActionOptions (MTLStoreActionOptions storeActionOptions); - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("useResource:usage:")] - void UseResource (IMTLResource resource, MTLResourceUsage usage); - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("useResources:count:usage:")] - void UseResources (IMTLResource[] resources, nuint count, MTLResourceUsage usage); - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("useHeap:")] - void UseHeap (IMTLHeap heap); - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("useHeaps:count:")] - void UseHeaps (IMTLHeap[] heaps, nuint count); - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("tileWidth")] - nuint TileWidth { get; } - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("tileHeight")] - nuint TileHeight { get; } - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setTileBytes:length:atIndex:")] - void SetTileBytes (IntPtr /* void* */ bytes, nuint length, nuint index); - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setTileBuffer:offset:atIndex:")] - void SetTileBuffer ([NullAllowed] IMTLBuffer buffer, nuint offset, nuint index); - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setTileBufferOffset:atIndex:")] - void SetTileBufferOffset (nuint offset, nuint index); - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setTileBuffers:offsets:withRange:")] - void SetTileBuffers (IMTLBuffer[] buffers, IntPtr offsets, NSRange range); - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setTileTexture:atIndex:")] - void SetTileTexture ([NullAllowed] IMTLTexture texture, nuint index); - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setTileTextures:withRange:")] - void SetTileTextures (IMTLTexture[] textures, NSRange range); - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setTileSamplerState:atIndex:")] - void SetTileSamplerState ([NullAllowed] IMTLSamplerState sampler, nuint index); - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setTileSamplerStates:withRange:")] - void SetTileSamplerStates (IMTLSamplerState[] samplers, NSRange range); - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setTileSamplerState:lodMinClamp:lodMaxClamp:atIndex:")] - void SetTileSamplerState ([NullAllowed] IMTLSamplerState sampler, float lodMinClamp, float lodMaxClamp, nuint index); - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setTileSamplerStates:lodMinClamps:lodMaxClamps:withRange:")] - void SetTileSamplerStates (IMTLSamplerState[] samplers, IntPtr /* float[] */ lodMinClamps, IntPtr /* float[] */ lodMaxClamps, NSRange range); - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("dispatchThreadsPerTile:")] - void DispatchThreadsPerTile (MTLSize threadsPerTile); - - [iOS (11, 0), NoTV, NoMac, NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("setThreadgroupMemoryLength:offset:atIndex:")] - void SetThreadgroupMemoryLength (nuint length, nuint offset, nuint index); } [iOS (8,0)][Mac (10,11, onlyOn64 : true)] @@ -2296,10 +1791,6 @@ interface MTLRenderPipelineReflection { #else NSObject [] FragmentArguments { get; } #endif - - [iOS (11, 0), NoTV, NoMac, NoWatch] - [NullAllowed, Export ("tileArguments")] - MTLArgument[] TileArguments { get; } } [iOS (8,0)][Mac (10,11, onlyOn64 : true)] @@ -2337,10 +1828,6 @@ interface MTLRenderPassAttachmentDescriptor : NSCopying { [Export ("storeAction")] MTLStoreAction StoreAction { get; set; } - - [Mac (10, 13), iOS (11,0), TV (11,0), NoWatch] - [Export ("storeActionOptions", ArgumentSemantic.Assign)] - MTLStoreActionOptions StoreActionOptions { get; set; } } [iOS (8,0)][Mac (10,11, onlyOn64 : true)] @@ -2406,46 +1893,10 @@ interface MTLRenderPassDescriptor : NSCopying { [NoTV] [Export ("renderTargetArrayLength")] nuint RenderTargetArrayLength { get; set; } - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [Export ("setSamplePositions:count:")] - unsafe void SetSamplePositions ([NullAllowed] IntPtr positions, nuint count); - - [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] - [Export ("getSamplePositions:count:")] - nuint GetSamplePositions ([NullAllowed] IntPtr positions, nuint count); - - [iOS (11, 0), NoTV, NoWatch, NoMac] - [Export ("imageblockSampleLength")] - nuint ImageblockSampleLength { get; set; } - - [iOS (11, 0), NoTV, NoWatch, NoMac] - [Export ("threadgroupMemoryLength")] - nuint ThreadgroupMemoryLength { get; set; } - - [iOS (11, 0), NoTV, NoWatch, NoMac] - [Export ("tileWidth")] - nuint TileWidth { get; set; } - - [iOS (11, 0), NoTV, NoWatch, NoMac] - [Export ("tileHeight")] - nuint TileHeight { get; set; } - - [iOS (11, 0), NoTV, NoWatch, NoMac] - [Export ("defaultRasterSampleCount")] - nuint DefaultRasterSampleCount { get; set; } - - [iOS (11, 0), NoTV, NoWatch, NoMac] - [Export ("renderTargetWidth")] - nuint RenderTargetWidth { get; set; } - - [iOS (11, 0), NoTV, NoWatch, NoMac] - [Export ("renderTargetHeight")] - nuint RenderTargetHeight { get; set; } } - [iOS (10, 0), TV (10,0), NoWatch, Mac (10,13, onlyOn64: true)] + [iOS (10, 0), TV (10,0), NoWatch, NoMac] [BaseType (typeof(NSObject))] // note: type works only on devices, symbol is missing on the simulator interface MTLHeapDescriptor : NSCopying @@ -2460,7 +1911,7 @@ interface MTLHeapDescriptor : NSCopying MTLCpuCacheMode CpuCacheMode { get; set; } } - [iOS (10, 0), TV (10,0), NoWatch, Mac (10,13, onlyOn64: true)] + [iOS (10, 0), TV (10,0), NoWatch, NoMac] [Protocol] // From Apple Docs: Your app does not define classes that implement this protocol. Model is not needed interface MTLHeap { @@ -2503,13 +1954,6 @@ interface MTLHeap [Abstract] [Export ("setPurgeableState:")] MTLPurgeableState SetPurgeableState (MTLPurgeableState state); - - [Mac (10, 13), iOS (11,0), TV (11,0), NoWatch] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("currentAllocatedSize")] - nuint CurrentAllocatedSize { get; } } interface IMTLResource {} @@ -2537,33 +1981,26 @@ partial interface MTLResource { [Abstract, Export ("setPurgeableState:")] MTLPurgeableState SetPurgeableState (MTLPurgeableState state); - [iOS (10, 0), TV (10,0), NoWatch, Mac (10,13)] + [iOS (10, 0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif [NullAllowed, Export ("heap")] IMTLHeap Heap { get; } - [iOS (10, 0), TV (10,0), NoWatch, Mac (10,13)] + [iOS (10, 0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif [Export ("makeAliasable")] void MakeAliasable (); - [iOS (10, 0), TV (10,0), NoWatch, Mac (10,13)] + [iOS (10, 0), TV (10,0), NoWatch, NoMac] #if XAMCORE_4_0 [Abstract] #endif [Export ("isAliasable")] bool IsAliasable { get; } - - [iOS (10, 0), TV (10,0), NoWatch, Mac (10,13)] -#if XAMCORE_4_0 - [Abstract] -#endif - [Export ("allocatedSize")] - nuint AllocatedSize { get; } } [iOS (9,0)][Mac (10,11, onlyOn64: true)] @@ -2588,10 +2025,6 @@ interface MTLComputePipelineDescriptor : NSCopying { [iOS (10, 0), TV (10,0), NoWatch, Mac (10,12)] [NullAllowed, Export ("stageInputDescriptor", ArgumentSemantic.Copy)] MTLStageInputOutputDescriptor StageInputDescriptor { get; set; } - - [Mac (10, 13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] - [Export ("buffers")] - MTLPipelineBufferDescriptorArray Buffers { get; } } [iOS (10,0), TV (10,0), NoWatch, Mac (10,12, onlyOn64 : true)] @@ -2617,277 +2050,5 @@ interface MTLStageInputOutputDescriptor : NSCopying [Export ("reset")] void Reset (); } - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] - [BaseType (typeof(NSObject))] - interface MTLType - { - [Export ("dataType")] - MTLDataType DataType { get; } - } - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] - [BaseType (typeof(MTLType))] - interface MTLPointerType - { - [Export ("elementType")] - MTLDataType ElementType { get; } - - [Export ("access")] - MTLArgumentAccess Access { get; } - - [Export ("alignment")] - nuint Alignment { get; } - - [Export ("dataSize")] - nuint DataSize { get; } - - [Export ("elementIsArgumentBuffer")] - bool ElementIsArgumentBuffer { get; } - - [NullAllowed, Export ("elementStructType")] - MTLStructType ElementStructType { get; } - - [NullAllowed, Export ("elementArrayType")] - MTLArrayType ElementArrayType { get; } - } - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] - [BaseType (typeof(MTLType))] - interface MTLTextureReferenceType - { - [Export ("textureDataType")] - MTLDataType TextureDataType { get; } - - [Export ("textureType")] - MTLTextureType TextureType { get; } - - [Export ("access")] - MTLArgumentAccess Access { get; } - - [Export ("isDepthTexture")] - bool IsDepthTexture { get; } - } - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] - interface IMTLCaptureScope { } - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface MTLCaptureScope - { - [Abstract] - [Export ("beginScope")] - void BeginScope (); - - [Abstract] - [Export ("endScope")] - void EndScope (); - - [Abstract] - [NullAllowed, Export ("label")] - string Label { get; set; } - - [Abstract] - [Export ("device")] - IMTLDevice Device { get; } - - [Abstract] - [NullAllowed, Export ("commandQueue")] - IMTLCommandQueue CommandQueue { get; } - } - - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface MTLCaptureManager - { - [Static] - [Export ("sharedCaptureManager")] - MTLCaptureManager Shared { get; } - - [Export ("newCaptureScopeWithDevice:")] - IMTLCaptureScope CreateNewCaptureScope (IMTLDevice device); - - [Export ("newCaptureScopeWithCommandQueue:")] - IMTLCaptureScope CreateNewCaptureScope (IMTLCommandQueue commandQueue); - - [Export ("startCaptureWithDevice:")] - void StartCapture (IMTLDevice device); - - [Export ("startCaptureWithCommandQueue:")] - void StartCapture (IMTLCommandQueue commandQueue); - - [Export ("startCaptureWithScope:")] - void StartCapture (IMTLCaptureScope captureScope); - - [Export ("stopCapture")] - void StopCapture (); - - [NullAllowed, Export ("defaultCaptureScope", ArgumentSemantic.Strong)] - IMTLCaptureScope DefaultCaptureScope { get; set; } - - [Export ("isCapturing")] - bool IsCapturing { get; } - } - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] - [BaseType (typeof(NSObject))] - interface MTLPipelineBufferDescriptor : NSCopying - { - [Export ("mutability", ArgumentSemantic.Assign)] - MTLMutability Mutability { get; set; } - } - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] - [BaseType (typeof(NSObject))] - interface MTLPipelineBufferDescriptorArray - { - [Internal] - [Export ("objectAtIndexedSubscript:")] - MTLPipelineBufferDescriptor GetObject (nuint bufferIndex); - - [Internal] - [Export ("setObject:atIndexedSubscript:")] - void SetObject ([NullAllowed] MTLPipelineBufferDescriptor buffer, nuint bufferIndex); - } - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] - [BaseType (typeof(NSObject))] - interface MTLArgumentDescriptor : NSCopying - { - [Static] - [Export ("argumentDescriptor")] - MTLArgumentDescriptor Create (); - - [Export ("dataType", ArgumentSemantic.Assign)] - MTLDataType DataType { get; set; } - - [Export ("index")] - nuint Index { get; set; } - - [Export ("arrayLength")] - nuint ArrayLength { get; set; } - - [Export ("access", ArgumentSemantic.Assign)] - MTLArgumentAccess Access { get; set; } - - [Export ("textureType", ArgumentSemantic.Assign)] - MTLTextureType TextureType { get; set; } - - [Export ("constantBlockAlignment")] - nuint ConstantBlockAlignment { get; set; } - } - - interface IMTLArgumentEncoder { } - - [Mac (10,13, onlyOn64: true), iOS (11,0), TV (11,0), NoWatch] - [Protocol] - interface MTLArgumentEncoder - { - [Abstract] - [Export ("device")] - IMTLDevice Device { get; } - - [Abstract] - [NullAllowed, Export ("label")] - string Label { get; set; } - - [Abstract] - [Export ("encodedLength")] - nuint EncodedLength { get; } - - [Abstract] - [Export ("alignment")] - nuint Alignment { get; } - - [Abstract] - [Export ("setArgumentBuffer:offset:")] - void SetArgumentBuffer (IMTLBuffer argumentBuffer, nuint offset); - - [Abstract] - [Export ("setArgumentBuffer:startOffset:arrayElement:")] - void SetArgumentBuffer ([NullAllowed] IMTLBuffer argumentBuffer, nuint startOffset, nuint arrayElement); - - [Abstract] - [Export ("setBuffer:offset:atIndex:")] - void SetBuffer ([NullAllowed] IMTLBuffer buffer, nuint offset, nuint index); - - [Abstract] - [Export ("setBuffers:offsets:withRange:")] - void SetBuffers (IMTLBuffer[] buffers, IntPtr offsets, NSRange range); - - [Abstract] - [Export ("setTexture:atIndex:")] - void SetTexture ([NullAllowed] IMTLTexture texture, nuint index); - - [Abstract] - [Export ("setTextures:withRange:")] - void SetTextures (IMTLTexture[] textures, NSRange range); - - [Abstract] - [Export ("setSamplerState:atIndex:")] - void SetSamplerState ([NullAllowed] IMTLSamplerState sampler, nuint index); - - [Abstract] - [Export ("setSamplerStates:withRange:")] - void SetSamplerStates (IMTLSamplerState[] samplers, NSRange range); - - [Abstract] - [Export ("constantDataAtIndex:")] - IntPtr GetConstantData (nuint index); - - [NoTV][NoiOS] - [Abstract] - [Export ("newArgumentEncoderForBufferAtIndex:")] - [return: NullAllowed] - IMTLArgumentEncoder CreateArgumentEncoder (nuint index); - } - - [iOS (11, 0), NoTV, NoMac, NoWatch] - [BaseType (typeof (NSObject))] - interface MTLTileRenderPipelineColorAttachmentDescriptor : NSCopying { - [Export ("pixelFormat", ArgumentSemantic.Assign)] - MTLPixelFormat PixelFormat { get; set; } - } - - [iOS (11, 0), NoTV, NoMac, NoWatch] - [BaseType (typeof (NSObject))] - interface MTLTileRenderPipelineColorAttachmentDescriptorArray { - [Internal] - [Export ("objectAtIndexedSubscript:")] - MTLTileRenderPipelineColorAttachmentDescriptor GetObject (nuint attachmentIndex); - - [Internal] - [Export ("setObject:atIndexedSubscript:")] - void SetObject (MTLTileRenderPipelineColorAttachmentDescriptor attachment, nuint attachmentIndex); - } - - [iOS (11, 0), NoTV, NoMac, NoWatch] - [BaseType (typeof (NSObject))] - interface MTLTileRenderPipelineDescriptor : NSCopying { - [Export ("label")] - string Label { get; set; } - - [Export ("tileFunction", ArgumentSemantic.Strong)] - IMTLFunction TileFunction { get; set; } - - [Export ("rasterSampleCount")] - nuint RasterSampleCount { get; set; } - - [Export ("colorAttachments")] - MTLTileRenderPipelineColorAttachmentDescriptorArray ColorAttachments { get; } - - [Export ("threadgroupSizeMatchesTileSize")] - bool ThreadgroupSizeMatchesTileSize { get; set; } - - [Export ("tileBuffers")] - MTLPipelineBufferDescriptorArray TileBuffers { get; } - - [Export ("reset")] - void Reset (); - } } #endif diff --git a/src/metalperformanceshaders.cs b/src/metalperformanceshaders.cs index 3b3c6669be7..eda684e2594 100644 --- a/src/metalperformanceshaders.cs +++ b/src/metalperformanceshaders.cs @@ -157,9 +157,7 @@ interface MPSImageHistogram { bool ZeroHistogram { get; set; } [Export ("histogramInfo")] - MPSImageHistogramInfo HistogramInfo { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - } + MPSImageHistogramInfo HistogramInfo { get; } // Could not initialize an instance of the type 'MetalPerformanceShaders.MPSImageHistogram': the native 'initWithDevice:' method returned nil. // [Export ("initWithDevice:")] @@ -167,7 +165,6 @@ MPSImageHistogramInfo HistogramInfo { [Export ("initWithDevice:histogramInfo:")] [DesignatedInitializer] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] IntPtr Constructor (IMTLDevice device, ref MPSImageHistogramInfo histogramInfo); [Export ("encodeToCommandBuffer:sourceTexture:histogram:histogramOffset:")] @@ -183,13 +180,10 @@ MPSImageHistogramInfo HistogramInfo { interface MPSImageHistogramEqualization { [Export ("initWithDevice:histogramInfo:")] [DesignatedInitializer] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] IntPtr Constructor (IMTLDevice device, ref MPSImageHistogramInfo histogramInfo); [Export ("histogramInfo")] - MPSImageHistogramInfo HistogramInfo { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - } + MPSImageHistogramInfo HistogramInfo { get; } [Export ("encodeTransformToCommandBuffer:sourceTexture:histogram:histogramOffset:")] void EncodeTransformToCommandBuffer (IMTLCommandBuffer commandBuffer, IMTLTexture source, IMTLBuffer histogram, nuint histogramOffset); @@ -201,13 +195,10 @@ MPSImageHistogramInfo HistogramInfo { interface MPSImageHistogramSpecification { [Export ("initWithDevice:histogramInfo:")] [DesignatedInitializer] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] IntPtr Constructor (IMTLDevice device, ref MPSImageHistogramInfo histogramInfo); [Export ("histogramInfo")] - MPSImageHistogramInfo HistogramInfo { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - } + MPSImageHistogramInfo HistogramInfo { get; } [Export ("encodeTransformToCommandBuffer:sourceTexture:sourceHistogram:sourceHistogramOffset:desiredHistogram:desiredHistogramOffset:")] void EncodeTransformToCommandBuffer (IMTLCommandBuffer commandBuffer, IMTLTexture source, IMTLBuffer sourceHistogram, nuint sourceHistogramOffset, IMTLBuffer desiredHistogram, nuint desiredHistogramOffset); @@ -519,7 +510,7 @@ interface MPSImageThresholdToZeroInverse { [iOS (9,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface MPSKernel : NSCopying, NSSecureCoding { + interface MPSKernel : NSCopying { [Export ("options", ArgumentSemantic.Assign)] MPSKernelOptions Options { get; set; } @@ -666,7 +657,7 @@ interface MPSCnnNeuronAbsolute { [iOS (10,0)][TV (10,0)] [BaseType (typeof (NSObject), Name = "MPSCNNConvolutionDescriptor")] [DisableDefaultCtor] - interface MPSCnnConvolutionDescriptor : NSCopying, NSSecureCoding { + interface MPSCnnConvolutionDescriptor : NSCopying { [Export ("kernelWidth")] nuint KernelWidth { get; set; } diff --git a/src/modelio.cs b/src/modelio.cs index 3fcdf404f98..b24d398891d 100644 --- a/src/modelio.cs +++ b/src/modelio.cs @@ -22,18 +22,9 @@ using Vector3i = global::OpenTK.Vector3i; using Vector4 = global::OpenTK.Vector4; using Vector4i = global::OpenTK.Vector4i; -#if XAMCORE_4_0 -using Matrix2 = global::OpenTK.NMatrix2; -using Matrix3 = global::OpenTK.NMatrix3; -using Matrix4 = global::OpenTK.NMatrix4; -#else using Matrix2 = global::OpenTK.Matrix2; using Matrix3 = global::OpenTK.Matrix3; using Matrix4 = global::OpenTK.Matrix4; -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; -#endif using Quaternion = global::OpenTK.Quaternion; using MathHelper = global::OpenTK.MathHelper; #if MONOMAC @@ -133,10 +124,7 @@ interface MDLAsset : NSCopying MDLAxisAlignedBoundingBox GetBoundingBox (double atTime); [Export ("boundingBox")] - MDLAxisAlignedBoundingBox BoundingBox { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } + MDLAxisAlignedBoundingBox BoundingBox { get; } [Export ("frameInterval")] double FrameInterval { get; set; } @@ -221,21 +209,10 @@ interface MDLLightProbeIrradianceDataSource interface MDLCamera { [Export ("projectionMatrix")] -#if !XAMCORE_4_0 - [Obsolete ("Use 'ProjectionMatrix4x4' instead.")] -#endif Matrix4 ProjectionMatrix { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; } -#if !XAMCORE_4_0 - [Sealed] - [Export ("projectionMatrix")] - MatrixFloat4x4 ProjectionMatrix4x4 { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - } -#endif - [iOS (10,0)] [Mac (10,12)] [TV (10,0)] @@ -535,19 +512,8 @@ interface MDLMaterialProperty : MDLNamed, NSCopying [Export ("initWithName:semantic:matrix4x4:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] -#if !XAMCORE_4_0 - [Obsolete ("Use the '(string, MDLMaterialSemantic, MatrixFloat4x4)' overload instead.")] -#endif IntPtr Constructor (string name, MDLMaterialSemantic semantic, Matrix4 value); - -#if !XAMCORE_4_0 - [Sealed] - [Export ("initWithName:semantic:matrix4x4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - IntPtr Constructor (string name, MDLMaterialSemantic semantic, MatrixFloat4x4 value); -#endif - [Export ("initWithName:semantic:URL:")] IntPtr Constructor (string name, MDLMaterialSemantic semantic, [NullAllowed] NSUrl url); @@ -603,24 +569,12 @@ Vector4 Float4Value { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; } -#if !XAMCORE_4_0 - [Obsolete ("Use 'MatrixFloat4x4' instead.")] -#endif [Export ("matrix4x4", ArgumentSemantic.Assign)] Matrix4 Matrix4x4 { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; } -#if !XAMCORE_4_0 - [Sealed] - [Export ("matrix4x4", ArgumentSemantic.Assign)] - MatrixFloat4x4 MatrixFloat4x4 { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; - } -#endif - [iOS (10,0)] [Mac (10,12)] [TV (10,0)] @@ -1099,7 +1053,7 @@ interface MDLObject : MDLNamed #if XAMCORE_4_0 [Internal] #endif - [Obsolete ("Use 'GetComponent (Type type)'.")] + [Obsolete ("Use GetComponent (Type type)")] [Export ("componentConformingToProtocol:")] [return: NullAllowed] IMDLComponent IsComponentConforming (Protocol protocol); @@ -1405,77 +1359,29 @@ interface MDLStereoscopicCamera [Export ("overlap")] float Overlap { get; set; } -#if !XAMCORE_4_0 - [Obsolete ("Use 'LeftViewMatrix4x4' instead.")] -#endif [Export ("leftViewMatrix")] Matrix4 LeftViewMatrix { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; } -#if !XAMCORE_4_0 - [Sealed] - [Export ("leftViewMatrix")] - MatrixFloat4x4 LeftViewMatrix4x4 { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } -#endif - -#if !XAMCORE_4_0 - [Obsolete ("Use 'RightViewMatrix4x4' instead.")] -#endif [Export ("rightViewMatrix")] Matrix4 RightViewMatrix { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; } -#if !XAMCORE_4_0 - [Sealed] - [Export ("rightViewMatrix")] - MatrixFloat4x4 RightViewMatrix4x4 { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } -#endif - -#if !XAMCORE_4_0 - [Obsolete ("Use 'LeftProjectionMatrix4x4' instead.")] -#endif [Export ("leftProjectionMatrix")] Matrix4 LeftProjectionMatrix { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; } -#if !XAMCORE_4_0 - [Sealed] - [Export ("leftProjectionMatrix")] - MatrixFloat4x4 LeftProjectionMatrix4x4 { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } -#endif - -#if !XAMCORE_4_0 - [Obsolete ("Use 'RightProjectionMatrix4x4' instead.")] -#endif [Export ("rightProjectionMatrix")] Matrix4 RightProjectionMatrix { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; } - -#if !XAMCORE_4_0 - [Sealed] - [Export ("rightProjectionMatrix")] - MatrixFloat4x4 RightProjectionMatrix4x4 { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } -#endif } [iOS (9,0), Mac(10,11, onlyOn64 : true)] @@ -1667,23 +1573,10 @@ interface MDLTransform : MDLTransformComponent, NSCopying { [Export ("initWithTransformComponent:resetsTransform:")] IntPtr Constructor (IMDLTransformComponent component, bool resetsTransform); -#if !XAMCORE_4_0 - [Obsolete ("Use the '(MatrixFloat4x4)' overload instead.")] -#endif [Export ("initWithMatrix:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] IntPtr Constructor (Matrix4 matrix); -#if !XAMCORE_4_0 - [Sealed] - [Export ("initWithMatrix:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - IntPtr Constructor (MatrixFloat4x4 matrix); -#endif - -#if !XAMCORE_4_0 - [Obsolete ("Use the '(MatrixFloat4x4, bool)' overload instead.")] -#endif [iOS (10,0)] [Mac (10,12)] [TV (10,0)] @@ -1691,14 +1584,6 @@ interface MDLTransform : MDLTransformComponent, NSCopying { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] IntPtr Constructor (Matrix4 matrix, bool resetsTransform); -#if !XAMCORE_4_0 - [Sealed] - [iOS (10,0), Mac (10,12), TV (10,0)] - [Export ("initWithMatrix:resetsTransform:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - IntPtr Constructor (MatrixFloat4x4 matrix, bool resetsTransform); -#endif - [Export ("setIdentity")] void SetIdentity (); @@ -1718,20 +1603,10 @@ interface MDLTransform : MDLTransformComponent, NSCopying { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] Vector3 GetRotation (double atTime); -#if !XAMCORE_4_0 - [Obsolete ("Use 'GetRotationMatrix4x4' instead.")] -#endif [Export ("rotationMatrixAtTime:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] Matrix4 GetRotationMatrix (double atTime); -#if !XAMCORE_4_0 - [Sealed] - [Export ("rotationMatrixAtTime:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - MatrixFloat4x4 GetRotationMatrix4x4 (double atTime); -#endif - [Export ("setShear:forTime:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] void SetShear (Vector3 scale, double time); @@ -1751,19 +1626,8 @@ interface MDLTransform : MDLTransformComponent, NSCopying { [iOS (10,3), TV (10,2), Mac (10,12,4)] [Export ("setMatrix:forTime:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] -#if !XAMCORE_4_0 - [Obsolete ("Use 'SetMatrix4x4' instead.")] -#endif void SetMatrix (Matrix4 matrix, double time); -#if !XAMCORE_4_0 - [Sealed] - [iOS (10,3), TV (10,2), Mac (10,12,4)] - [Export ("setMatrix:forTime:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - void SetMatrix4x4 (MatrixFloat4x4 matrix, double time); -#endif - [Export ("shear", ArgumentSemantic.Assign)] Vector3 Shear { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] @@ -1846,9 +1710,6 @@ Matrix4 Matrix { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] Matrix4 GetLocalTransform (double atTime); -#if !XAMCORE_4_0 - [Obsolete ("Use 'CreateGlobalTransform4x4' instead.")] -#endif [Static] [Export ("globalTransformWithObject:atTime:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] @@ -2000,7 +1861,6 @@ interface MDLVoxelArray IntPtr Constructor (MDLAsset asset, int divisions, float patchRadius); [Export ("initWithData:boundingBox:voxelExtent:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] IntPtr Constructor (NSData voxelData, MDLAxisAlignedBoundingBox boundingBox, float voxelExtent); [Export ("meshUsingAllocator:")] @@ -2021,31 +1881,20 @@ interface MDLVoxelArray [Export ("setVoxelsForMesh:divisions:patchRadius:")] void SetVoxels (MDLMesh mesh, int divisions, float patchRadius); - [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use 'SetVoxels (MDLMesh, int, float)' instead.")] - [Obsoleted (PlatformName.iOS, 10, 0, message: "Use 'SetVoxels (MDLMesh, int, float)' instead.")] + [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use SetVoxels (MDLMesh, int, float)")] + [Obsoleted (PlatformName.iOS, 10, 0, message: "Use SetVoxels (MDLMesh, int, float)")] [Export ("setVoxelsForMesh:divisions:interiorShells:exteriorShells:patchRadius:")] void SetVoxels (MDLMesh mesh, int divisions, int interiorShells, int exteriorShells, float patchRadius); - [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use 'SetVoxels (MDLMesh, int, float)' instead.")] - [Obsoleted (PlatformName.iOS, 10, 0, message: "Use 'SetVoxels (MDLMesh, int, float)' instead.")] + [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use SetVoxels (MDLMesh, int, float)")] + [Obsoleted (PlatformName.iOS, 10, 0, message: "Use SetVoxels (MDLMesh, int, float)")] [Export ("setVoxelsForMesh:divisions:interiorNBWidth:exteriorNBWidth:patchRadius:")] void SetVoxels (MDLMesh mesh, int divisions, float interiorNBWidth, float exteriorNBWidth, float patchRadius); -#if !XAMCORE_4_0 - [Obsolete ("Use 'GetVoxels (MDLVoxelIndexExtent2)' instead.")] -#endif [Export ("voxelsWithinExtent:")] [return: NullAllowed] NSData GetVoxels (MDLVoxelIndexExtent withinExtent); -#if !XAMCORE_4_0 - [Sealed] - [Export ("voxelsWithinExtent:")] - [return: NullAllowed] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - NSData GetVoxels (MDLVoxelIndexExtent2 withinExtent); -#endif - [Export ("voxelIndices")] [return: NullAllowed] NSData GetVoxelIndices (); @@ -2074,26 +1923,11 @@ interface MDLVoxelArray [Export ("count")] nuint Count { get; } -#if !XAMCORE_4_0 - [Obsolete ("Use 'VoxelIndexExtent2' instead.")] -#endif [Export ("voxelIndexExtent")] MDLVoxelIndexExtent VoxelIndexExtent { get; } -#if !XAMCORE_4_0 - [Export ("voxelIndexExtent")] - [Sealed] - MDLVoxelIndexExtent2 VoxelIndexExtent2 { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } -#endif - [Export ("boundingBox")] - MDLAxisAlignedBoundingBox BoundingBox { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - } + MDLAxisAlignedBoundingBox BoundingBox { get; } [iOS (10,0)] [Mac (10,12)] diff --git a/src/multipeerconnectivity.cs b/src/multipeerconnectivity.cs index dc3c9c06178..c15b7f14a42 100644 --- a/src/multipeerconnectivity.cs +++ b/src/multipeerconnectivity.cs @@ -124,7 +124,7 @@ partial interface MCSessionDelegate { [Abstract] [Export ("session:didFinishReceivingResourceWithName:fromPeer:atURL:withError:")] - void DidFinishReceivingResource (MCSession session, string resourceName, MCPeerID fromPeer, [NullAllowed] NSUrl localUrl, [NullAllowed] NSError error); + void DidFinishReceivingResource (MCSession session, string resourceName, MCPeerID fromPeer, NSUrl localUrl, NSError error); [Abstract] [Export ("session:didReceiveStream:withName:fromPeer:")] diff --git a/src/networkextension.cs b/src/networkextension.cs index c673f922ecb..c6ee3da6760 100644 --- a/src/networkextension.cs +++ b/src/networkextension.cs @@ -773,7 +773,7 @@ interface NEVpnManager { [NullAllowed] [Export ("protocol", ArgumentSemantic.Retain)] - [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use 'ProtocolConfiguration' instead.")] + [Availability (Deprecated = Platform.iOS_9_0 | Platform.Mac_10_11, Message = "Use ProtocolConfiguration instead")] NEVpnProtocol Protocol { get; set; } [iOS (9,0)][Mac (10,11, onlyOn64 : true)] diff --git a/src/notificationcenter.cs b/src/notificationcenter.cs index 1c242481ffd..936b34089cb 100644 --- a/src/notificationcenter.cs +++ b/src/notificationcenter.cs @@ -35,7 +35,7 @@ interface NCWidgetProviding { [Export ("widgetMarginInsetsForProposedMarginInsets:"), DelegateName ("NCWidgetProvidingMarginInsets"), DefaultValueFromArgument ("defaultMarginInsets")] #if !MONOMAC - [Deprecated (PlatformName.iOS, 10,0)] + [Deprecated (PlatformName.iOS, 10,0, message: "Never called on iOS10+")] UIEdgeInsets GetWidgetMarginInsets (UIEdgeInsets defaultMarginInsets); #else NSEdgeInsets GetWidgetMarginInsets (NSEdgeInsets defaultMarginInsets); diff --git a/src/opengles.cs b/src/opengles.cs index 106a0f1573d..d245a83dfc8 100644 --- a/src/opengles.cs +++ b/src/opengles.cs @@ -24,7 +24,6 @@ interface EAGLSharegroup { [iOS (6,0)] [Export ("debugLabel")] - [NullAllowed] string DebugLabel { get; set; } } @@ -42,7 +41,6 @@ interface EAGLContext { bool SetCurrentContext([NullAllowed] EAGLContext context); [Static, Export("currentContext")] - [NullAllowed] EAGLContext CurrentContext { get; } [Export("API")] @@ -53,7 +51,6 @@ interface EAGLContext { [iOS (6,0)] [Export ("debugLabel")] - [NullAllowed] string DebugLabel { get; set; } // @@ -66,12 +63,10 @@ interface EAGLContext { [Export ("presentRenderbuffer:")] bool PresentRenderBuffer (nuint target); - [iOS (10,0)][TV (10,0)] [Internal] [Export ("presentRenderbuffer:atTime:")] bool _PresentRenderbufferAtTime (nuint target, double presentationTime); - [iOS (10,3)][TV (10,2)] [Internal] [Export ("presentRenderbuffer:afterMinimumDuration:")] bool _PresentRenderbufferAfterMinimumDuration (nuint target, double duration); @@ -79,13 +74,6 @@ interface EAGLContext { [Since (7,1)] [Export ("multiThreaded")] bool IsMultiThreaded { [Bind ("isMultiThreaded")] get; set; } - - // IOSurface (EAGLContext) - - [iOS (11,0)] - [TV (11,0)] - [Export ("texImageIOSurface:target:internalFormat:width:height:format:type:plane:")] - bool TexImage (IOSurface.IOSurface ioSurface, nuint target, nuint internalFormat, uint width, uint height, nuint format, nuint type, uint plane); } [Protocol] diff --git a/src/passkit.cs b/src/passkit.cs index 57b4dba6459..df1e71c3b72 100644 --- a/src/passkit.cs +++ b/src/passkit.cs @@ -8,7 +8,6 @@ // using System; -using System.ComponentModel; using XamCore.Contacts; using XamCore.ObjCRuntime; using XamCore.Foundation; @@ -43,8 +42,8 @@ interface PKContact : NSSecureCoding #endif // XAMCORE_2_0 [iOS (9,2)] - [Deprecated (PlatformName.iOS, 10,3, message:"Use 'SubLocality' and 'SubAdministrativeArea' on 'PostalAddress' instead.")] - [Deprecated (PlatformName.WatchOS, 3,2, message:"Use 'SubLocality' and 'SubAdministrativeArea' on 'PostalAddress' instead.")] + [Deprecated (PlatformName.iOS, 10,3, message:"Use SubLocality and SubAdministrativeArea on PostalAddress instead")] + [Deprecated (PlatformName.WatchOS, 3,2, message:"Use SubLocality and SubAdministrativeArea on PostalAddress instead")] [NullAllowed, Export ("supplementarySubLocality", ArgumentSemantic.Strong)] string SupplementarySubLocality { get; set; } } @@ -90,7 +89,7 @@ interface PKPassLibrary { [iOS (8,0)] [Static,Export ("isPaymentPassActivationAvailable")] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use the library's instance 'IsLibraryPaymentPassActivationAvailable' property instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "On iOS 9 and higher, use the library's instance IsLibraryPaymentPassActivationAvailable property instead")] bool IsPaymentPassActivationAvailable { get; } [iOS (9,0)] @@ -180,12 +179,12 @@ interface PKPayment { [NoWatch] [Export ("billingAddress", ArgumentSemantic.Assign)] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'BillingContact' instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "On iOS 9 and higher, use BillingContact instead")] ABRecord BillingAddress { get; } [NoWatch] [Export ("shippingAddress", ArgumentSemantic.Assign)] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'ShippingContact' instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "On iOS 9 and higher, use ShippingContact instead")] ABRecord ShippingAddress { get; } [Export ("shippingMethod", ArgumentSemantic.Strong)] @@ -212,13 +211,9 @@ interface PKPayment { [Protocol, Model] [BaseType (typeof (NSObject))] interface PKPaymentAuthorizationViewControllerDelegate { - - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidAuthorizePayment2' instead.")] [Export ("paymentAuthorizationViewController:didAuthorizePayment:completion:")] [EventArgs ("PKPaymentAuthorization")] -#if !XAMCORE_4_0 [Abstract] -#endif void DidAuthorizePayment (PKPaymentAuthorizationViewController controller, PKPayment payment, #if XAMCORE_2_0 Action completion); @@ -226,25 +221,14 @@ void DidAuthorizePayment (PKPaymentAuthorizationViewController controller, PKPay PKPaymentAuthorizationHandler completion); #endif - [iOS (11,0)] - [Export ("paymentAuthorizationViewController:didAuthorizePayment:handler:")] - [EventArgs ("PKPaymentAuthorizationResult")] - void DidAuthorizePayment2 (PKPaymentAuthorizationViewController controller, PKPayment payment, Action completion); - [Export ("paymentAuthorizationViewControllerDidFinish:")] [Abstract] void PaymentAuthorizationViewControllerDidFinish (PKPaymentAuthorizationViewController controller); - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidSelectShippingMethod2' instead.")] [Export ("paymentAuthorizationViewController:didSelectShippingMethod:completion:")] [EventArgs ("PKPaymentShippingMethodSelected")] void DidSelectShippingMethod (PKPaymentAuthorizationViewController controller, PKShippingMethod shippingMethod, PKPaymentShippingMethodSelected completion); - [iOS (11,0)] - [Export ("paymentAuthorizationViewController:didSelectShippingMethod:handler:")] - [EventArgs ("PKPaymentRequestShippingMethodUpdate")] - void DidSelectShippingMethod2 (PKPaymentAuthorizationViewController controller, PKShippingMethod shippingMethod, Action completion); - [Export ("paymentAuthorizationViewController:didSelectShippingAddress:completion:")] [EventArgs ("PKPaymentShippingAddressSelected")] void DidSelectShippingAddress (PKPaymentAuthorizationViewController controller, ABRecord address, PKPaymentShippingAddressSelected completion); @@ -257,26 +241,14 @@ void DidAuthorizePayment (PKPaymentAuthorizationViewController controller, PKPay void WillAuthorizePayment (PKPaymentAuthorizationViewController controller); [iOS (9,0)] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidSelectShippingContact' instead.")] [Export ("paymentAuthorizationViewController:didSelectShippingContact:completion:")] [EventArgs ("PKPaymentSelectedContact")] void DidSelectShippingContact (PKPaymentAuthorizationViewController controller, PKContact contact, PKPaymentShippingAddressSelected completion); - [iOS (11,0)] - [Export ("paymentAuthorizationViewController:didSelectShippingContact:handler:")] - [EventArgs ("PKPaymentRequestShippingContactUpdate")] - void DidSelectShippingContact2 (PKPaymentAuthorizationViewController controller, PKContact contact, Action completion); - [iOS (9,0)] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidSelectPaymentMethod2' instead.")] [Export ("paymentAuthorizationViewController:didSelectPaymentMethod:completion:")] [EventArgs ("PKPaymentMethodSelected")] void DidSelectPaymentMethod (PKPaymentAuthorizationViewController controller, PKPaymentMethod paymentMethod, Action completion); - - [iOS (11,0)] - [Export ("paymentAuthorizationViewController:didSelectPaymentMethod:handler:")] - [EventArgs ("PKPaymentRequestPaymentMethodUpdate")] - void DidSelectPaymentMethod2 (PKPaymentAuthorizationViewController controller, PKPaymentMethod paymentMethod, Action completion); } [iOS (8,0)] @@ -373,26 +345,22 @@ interface PKPaymentRequest { [Export ("currencyCode")] string CurrencyCode { get; set; } - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'RequiredBillingContactFields' instead.")] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'RequiredBillingContactFields' instead.")] [Export ("requiredBillingAddressFields", ArgumentSemantic.UnsafeUnretained)] PKAddressField RequiredBillingAddressFields { get; set; } [NoWatch] [NullAllowed] // by default this property is null [Export ("billingAddress", ArgumentSemantic.Assign)] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'BillingContact' instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "On iOS 9 and higher, use BillingContact instead")] ABRecord BillingAddress { get; set; } - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'RequiredShippingContactFields' instead.")] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'RequiredShippingContactFields' instead.")] [Export ("requiredShippingAddressFields", ArgumentSemantic.UnsafeUnretained)] PKAddressField RequiredShippingAddressFields { get; set; } [NoWatch] [NullAllowed] // by default this property is null [Export ("shippingAddress", ArgumentSemantic.Assign)] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'ShippingContact' instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "On iOS 9 and higher, use ShippingContact instead")] ABRecord ShippingAddress { get; set; } [NullAllowed] // by default this property is null @@ -419,81 +387,6 @@ interface PKPaymentRequest { [Static] [Export ("availableNetworks")] NSString[] AvailableNetworks { get; } - - [Watch (4,0)][iOS (11,0)] - [Export ("requiredBillingContactFields", ArgumentSemantic.Strong)] - NSSet WeakRequiredBillingContactFields { get; set; } - - [Watch (4,0)][iOS (11,0)] - [Export ("requiredShippingContactFields", ArgumentSemantic.Strong)] - NSSet WeakRequiredShippingContactFields { get; set; } - - [Watch (4,0)][iOS (11,0)] - [NullAllowed, Export ("supportedCountries", ArgumentSemantic.Copy)] - NSSet SupportedCountries { get; set; } - - [Watch (4,0)][iOS (11,0)] - [Static] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("paymentContactInvalidErrorWithContactField:localizedDescription:")] - NSError CreatePaymentContactInvalidError (NSString field, [NullAllowed] string localizedDescription); - - [Watch (4,0)][iOS (11,0)] - [Static] - [Wrap ("CreatePaymentContactInvalidError (contactField.GetConstant (), localizedDescription)")] - NSError CreatePaymentContactInvalidError (PKContactFields contactField, [NullAllowed] string localizedDescription); - - [Watch (4,0)][iOS (11,0)] - [Static] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("paymentShippingAddressInvalidErrorWithKey:localizedDescription:")] - NSError CreatePaymentShippingAddressInvalidError (NSString postalAddressKey, [NullAllowed] string localizedDescription); - -#if XAMCORE_2_0 - [Watch (4,0)][iOS (11,0)] - [Static] - [Wrap ("CreatePaymentShippingAddressInvalidError (postalAddress.GetConstant (), localizedDescription)")] - NSError CreatePaymentShippingAddressInvalidError (CNPostalAddressKeyOption postalAddress, [NullAllowed] string localizedDescription); -#endif - - [Watch (4,0)][iOS (11,0)] - [Static] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("paymentBillingAddressInvalidErrorWithKey:localizedDescription:")] - NSError CreatePaymentBillingAddressInvalidError (NSString postalAddressKey, [NullAllowed] string localizedDescription); - -#if XAMCORE_2_0 - [Watch (4,0)][iOS (11,0)] - [Static] - [Wrap ("CreatePaymentBillingAddressInvalidError (postalAddress.GetConstant (), localizedDescription)")] - NSError CreatePaymentBillingAddressInvalidError (CNPostalAddressKeyOption postalAddress, [NullAllowed] string localizedDescription); -#endif - - [Watch (4,0)][iOS (11,0)] - [Static] - [Export ("paymentShippingAddressUnserviceableErrorWithLocalizedDescription:")] - NSError CreatePaymentShippingAddressUnserviceableError ([NullAllowed] string localizedDescription); - } - - [Watch (4,0)][iOS (11,0)] - [Flags] - enum PKContactFields { - None = 0, - - [Field ("PKContactFieldPostalAddress")] - PostalAddress = 1 << 0, - - [Field ("PKContactFieldEmailAddress")] - EmailAddress = 1 << 1, - - [Field ("PKContactFieldPhoneNumber")] - PhoneNumber = 1 << 2, - - [Field ("PKContactFieldName")] - Name = 1 << 3, - - [Field ("PKContactFieldPhoneticName")] - PhoneticName = 1 << 4, } [Watch (3,0)] @@ -503,12 +396,12 @@ interface PKPaymentToken { [NoWatch] [Export ("paymentInstrumentName", ArgumentSemantic.Copy)] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'PaymentMethod' instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "On iOS 9 and higher, use PaymentMethod instead")] string PaymentInstrumentName { get; } [NoWatch] [Export ("paymentNetwork")] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'PaymentMethod' instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message = "On iOS 9 and higher, use PaymentMethod instead")] string PaymentNetwork { get; } [Export ("transactionIdentifier")] @@ -701,10 +594,8 @@ interface PKPass : NSSecureCoding, NSCopying { [Export ("localizedValueForFieldKey:")] NSObject GetLocalizedValue (NSString key); // TODO: Should be enum for PKPassLibraryUserInfoKey -#if !XAMCORE_4_0 [Field ("PKPassKitErrorDomain")] NSString ErrorDomain { get; } -#endif [Since (7,0)] [Export ("userInfo", ArgumentSemantic.Copy)] @@ -779,15 +670,9 @@ interface PKPaymentNetwork { 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.")] [Field ("PKPaymentNetworkCarteBancaire")] NSString CarteBancaire { get; } - [iOS (11,0)][Watch (4,0)] - [Field ("PKPaymentNetworkCarteBancaires")] - NSString CarteBancaires { get; } - [iOS (9,2)] [Watch (2,2)] [Field ("PKPaymentNetworkChinaUnionPay")] @@ -916,16 +801,10 @@ interface IPKPaymentAuthorizationControllerDelegate {} [BaseType (typeof (NSObject))] interface PKPaymentAuthorizationControllerDelegate { - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'DidAuthorizePayment' overload with the 'Action' parameter instead.")] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidAuthorizePayment' overload with the 'Action' parameter instead.")] [Abstract] [Export ("paymentAuthorizationController:didAuthorizePayment:completion:")] void DidAuthorizePayment (PKPaymentAuthorizationController controller, PKPayment payment, Action completion); - [Watch (4,0)][iOS (11,0)] - [Export ("paymentAuthorizationController:didAuthorizePayment:handler:")] - void DidAuthorizePayment (PKPaymentAuthorizationController controller, PKPayment payment, Action completion); - [Abstract] [Export ("paymentAuthorizationControllerDidFinish:")] void DidFinish (PKPaymentAuthorizationController controller); @@ -933,32 +812,14 @@ interface PKPaymentAuthorizationControllerDelegate { [Export ("paymentAuthorizationControllerWillAuthorizePayment:")] void WillAuthorizePayment (PKPaymentAuthorizationController controller); - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'DidSelectShippingMethod' overload with the 'Action' parameter instead.")] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidSelectShippingMethod' overload with the 'Action' parameter instead.")] [Export ("paymentAuthorizationController:didSelectShippingMethod:completion:")] void DidSelectShippingMethod (PKPaymentAuthorizationController controller, PKShippingMethod shippingMethod, Action completion); - [Watch (4,0)][iOS (11,0)] - [Export ("paymentAuthorizationController:didSelectShippingMethod:handler:")] - void DidSelectShippingMethod (PKPaymentAuthorizationController controller, PKPaymentMethod paymentMethod, Action completion); - - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'DidSelectShippingContact' overload with the 'Action' parameter instead.")] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidSelectShippingContact' overload with the 'Action' parameter instead.")] [Export ("paymentAuthorizationController:didSelectShippingContact:completion:")] void DidSelectShippingContact (PKPaymentAuthorizationController controller, PKContact contact, Action completion); - [Watch (4,0)][iOS (11,0)] - [Export ("paymentAuthorizationController:didSelectShippingContact:handler:")] - void DidSelectShippingContact (PKPaymentAuthorizationController controller, PKContact contact, Action completion); - - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'DidSelectPaymentMethod' overload with the 'Action' parameter instead.")] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidSelectPaymentMethod' overload with the 'Action' parameter instead.")] [Export ("paymentAuthorizationController:didSelectPaymentMethod:completion:")] void DidSelectPaymentMethod (PKPaymentAuthorizationController controller, PKPaymentMethod paymentMethod, Action completion); - - [Watch (4,0)][iOS (11,0)] - [Export ("paymentAuthorizationController:didSelectPaymentMethod:handler:")] - void DidSelectPaymentMethod (PKPaymentAuthorizationController controller, PKPaymentMethod paymentMethod, Action completion); } [iOS (10,1)] @@ -1005,85 +866,4 @@ interface PKSuicaPassProperties [Export ("blacklisted")] bool Blacklisted { [Bind ("isBlacklisted")] get; } } - - [Watch (4,0)][iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface PKPaymentAuthorizationResult { - [Export ("initWithStatus:errors:")] - [DesignatedInitializer] - IntPtr Constructor (PKPaymentAuthorizationStatus status, [NullAllowed] NSError[] errors); - - [Export ("status", ArgumentSemantic.Assign)] - PKPaymentAuthorizationStatus Status { get; set; } - - [Export ("errors", ArgumentSemantic.Copy)] - NSError[] Errors { get; set; } - } - - [Watch (4,0)][iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface PKPaymentRequestUpdate { - - [Export ("initWithPaymentSummaryItems:")] - [DesignatedInitializer] - IntPtr Constructor (PKPaymentSummaryItem[] paymentSummaryItems); - - [Export ("status", ArgumentSemantic.Assign)] - PKPaymentAuthorizationStatus Status { get; set; } - - [Export ("paymentSummaryItems", ArgumentSemantic.Copy)] - PKPaymentSummaryItem[] PaymentSummaryItems { get; set; } - } - - [Watch (4,0)][iOS (11,0)] - [BaseType (typeof (PKPaymentRequestUpdate))] - [DisableDefaultCtor] - interface PKPaymentRequestShippingContactUpdate { - - [Export ("initWithErrors:paymentSummaryItems:shippingMethods:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] NSError[] errors, PKPaymentSummaryItem[] paymentSummaryItems, PKShippingMethod[] shippingMethods); - - [Export ("shippingMethods", ArgumentSemantic.Copy)] - PKShippingMethod[] ShippingMethods { get; set; } - - [Export ("errors", ArgumentSemantic.Copy)] - NSError[] Errors { get; set; } - } - - [Watch (4,0)][iOS (11,0)] - [BaseType (typeof (PKPaymentRequestUpdate))] - [DisableDefaultCtor] - interface PKPaymentRequestShippingMethodUpdate { - - // inlined - [Export ("initWithPaymentSummaryItems:")] - [DesignatedInitializer] - IntPtr Constructor (PKPaymentSummaryItem[] paymentSummaryItems); - } - - [Watch (4,0)][iOS (11,0)] - [BaseType (typeof (PKPaymentRequestUpdate))] - [DisableDefaultCtor] - interface PKPaymentRequestPaymentMethodUpdate { - - // inlined - [Export ("initWithPaymentSummaryItems:")] - [DesignatedInitializer] - IntPtr Constructor (PKPaymentSummaryItem[] paymentSummaryItems); - } - - [Static] // not to enum'ify - exposed as NSString inside NSError - interface PKPaymentErrorKeys { - - [Watch (4,0)][iOS (11,0)] - [Field ("PKPaymentErrorContactFieldUserInfoKey")] - NSString ContactFieldUserInfoKey { get; } - - [Watch (4,0)][iOS (11,0)] - [Field ("PKPaymentErrorPostalAddressUserInfoKey")] - NSString PostalAddressUserInfoKey { get; } - } } diff --git a/src/pdfkit.cs b/src/pdfkit.cs index 736a56b320b..28a31b531d3 100644 --- a/src/pdfkit.cs +++ b/src/pdfkit.cs @@ -26,26 +26,8 @@ // // PdfKit.cs: Bindings for the PdfKit API // -#if MONOMAC || (IOS && XAMCORE_2_0) - using System; -#if MONOMAC using XamCore.AppKit; -#else -using XamCore.UIKit; -using NSColor = XamCore.UIKit.UIColor; -using NSFont = XamCore.UIKit.UIFont; -using NSImage = XamCore.UIKit.UIImage; -using NSView = XamCore.UIKit.UIView; -using NSEdgeInsets = XamCore.UIKit.UIEdgeInsets; -using NSEvent = XamCore.UIKit.UIEvent; -using NSBezierPath = XamCore.UIKit.UIBezierPath; -using NSTextAlignment = XamCore.UIKit.UITextAlignment; -// HACK: to make intermediate dll build, since we use these -// types in a few [NoiOS] members (this way we avoid numerous #ifdefs later) -using NSPrintInfo = XamCore.Foundation.NSObject; -using NSPrintOperation = XamCore.Foundation.NSObject; -#endif using XamCore.Foundation; using XamCore.ObjCRuntime; using XamCore.CoreGraphics; @@ -58,401 +40,7 @@ namespace XamCore.PdfKit { - [Mac (10,13)] - [iOS (11,0)] - enum PdfAnnotationKey { - - [Field ("PDFAnnotationKeyAppearanceDictionary", "+PDFKit")] - AppearanceDictionary, - - [Field ("PDFAnnotationKeyAppearanceState", "+PDFKit")] - AppearanceState, - - [Field ("PDFAnnotationKeyBorder", "+PDFKit")] - Border, - - [Field ("PDFAnnotationKeyColor", "+PDFKit")] - Color, - - [Field ("PDFAnnotationKeyContents", "+PDFKit")] - Contents, - - [Field ("PDFAnnotationKeyFlags", "+PDFKit")] - Flags, - - [Field ("PDFAnnotationKeyDate", "+PDFKit")] - Date, - - [Field ("PDFAnnotationKeyName", "+PDFKit")] - Name, - - [Field ("PDFAnnotationKeyPage", "+PDFKit")] - Page, - - [Field ("PDFAnnotationKeyRect", "+PDFKit")] - Rect, - - [Field ("PDFAnnotationKeySubtype", "+PDFKit")] - Subtype, - - [Field ("PDFAnnotationKeyAction", "+PDFKit")] - Action, - - [Field ("PDFAnnotationKeyAdditionalActions", "+PDFKit")] - AdditionalActions, - - [Field ("PDFAnnotationKeyBorderStyle", "+PDFKit")] - BorderStyle, - - [Field ("PDFAnnotationKeyDefaultAppearance", "+PDFKit")] - DefaultAppearance, - - [Field ("PDFAnnotationKeyDestination", "+PDFKit")] - Destination, - - [Field ("PDFAnnotationKeyHighlightingMode", "+PDFKit")] - HighlightingMode, - - [Field ("PDFAnnotationKeyInklist", "+PDFKit")] - Inklist, - - [Field ("PDFAnnotationKeyInteriorColor", "+PDFKit")] - InteriorColor, - - [Field ("PDFAnnotationKeyLinePoints", "+PDFKit")] - LinePoints, - - [Field ("PDFAnnotationKeyLineEndingStyles", "+PDFKit")] - LineEndingStyles, - - [Field ("PDFAnnotationKeyIconName", "+PDFKit")] - IconName, - - [Field ("PDFAnnotationKeyOpen", "+PDFKit")] - Open, - - [Field ("PDFAnnotationKeyParent", "+PDFKit")] - Parent, - - [Field ("PDFAnnotationKeyPopup")] - Popup, - - [Field ("PDFAnnotationKeyQuadding", "+PDFKit")] - Quadding, - - [Field ("PDFAnnotationKeyQuadPoints", "+PDFKit")] - QuadPoints, - - [Field ("PDFAnnotationKeyTextLabel", "+PDFKit")] - TextLabel, - - [Field ("PDFAnnotationKeyWidgetDownCaption", "+PDFKit")] - WidgetDownCaption, - - [Field ("PDFAnnotationKeyWidgetBorderColor", "+PDFKit")] - WidgetBorderColor, - - [Field ("PDFAnnotationKeyWidgetBackgroundColor", "+PDFKit")] - WidgetBackgroundColor, - - [Field ("PDFAnnotationKeyWidgetCaption", "+PDFKit")] - WidgetCaption, - - [Field ("PDFAnnotationKeyWidgetDefaultValue", "+PDFKit")] - WidgetDefaultValue, - - [Field ("PDFAnnotationKeyWidgetFieldFlags", "+PDFKit")] - WidgetFieldFlags, - - [Field ("PDFAnnotationKeyWidgetFieldType", "+PDFKit")] - WidgetFieldType, - - [Field ("PDFAnnotationKeyWidgetAppearanceDictionary", "+PDFKit")] - WidgetAppearanceDictionary, - - [Field ("PDFAnnotationKeyWidgetMaxLen", "+PDFKit")] - WidgetMaxLen, - - [Field ("PDFAnnotationKeyWidgetOptions", "+PDFKit")] - WidgetOptions, - - [Field ("PDFAnnotationKeyWidgetRotation", "+PDFKit")] - WidgetRotation, - - [Field ("PDFAnnotationKeyWidgetRolloverCaption", "+PDFKit")] - WidgetRolloverCaption, - - [Field ("PDFAnnotationKeyWidgetTextLabelUI", "+PDFKit")] - WidgetTextLabelUI, - - [Field ("PDFAnnotationKeyWidgetValue", "+PDFKit")] - WidgetValue, - } - - [Mac (10,13)] - [iOS (11,0)] - enum PdfAnnotationSubtype { - - [Field ("PDFAnnotationSubtypeText", "+PDFKit")] - Text, - - [Field ("PDFAnnotationSubtypeLink", "+PDFKit")] - Link, - - [Field ("PDFAnnotationSubtypeFreeText", "+PDFKit")] - FreeText, - - [Field ("PDFAnnotationSubtypeLine", "+PDFKit")] - Line, - - [Field ("PDFAnnotationSubtypeSquare", "+PDFKit")] - Square, - - [Field ("PDFAnnotationSubtypeCircle", "+PDFKit")] - Circle, - - [Field ("PDFAnnotationSubtypeHighlight", "+PDFKit")] - Highlight, - - [Field ("PDFAnnotationSubtypeUnderline", "+PDFKit")] - Underline, - - [Field ("PDFAnnotationSubtypeStrikeOut", "+PDFKit")] - StrikeOut, - - [Field ("PDFAnnotationSubtypeInk", "+PDFKit")] - Ink, - - [Field ("PDFAnnotationSubtypeStamp", "+PDFKit")] - Stamp, - - [Field ("PDFAnnotationSubtypePopup", "+PDFKit")] - Popup, - - [Field ("PDFAnnotationSubtypeWidget", "+PDFKit")] - Widget, - } - - [Mac (10,13)] - [iOS (11,0)] - enum PdfAnnotationWidgetSubtype { - - [Field ("PDFAnnotationWidgetSubtypeButton", "+PDFKit")] - Button, - - [Field ("PDFAnnotationWidgetSubtypeChoice", "+PDFKit")] - Choice, - - [Field ("PDFAnnotationWidgetSubtypeSignature", "+PDFKit")] - Signature, - - [Field ("PDFAnnotationWidgetSubtypeText", "+PDFKit")] - Text, - } - - [Mac (10,13)] - [iOS (11,0)] - enum PdfAnnotationLineEndingStyle { - - [Field ("PDFAnnotationLineEndingStyleNone", "+PDFKit")] - None, - - [Field ("PDFAnnotationLineEndingStyleSquare", "+PDFKit")] - Square, - - [Field ("PDFAnnotationLineEndingStyleCircle", "+PDFKit")] - Circle, - - [Field ("PDFAnnotationLineEndingStyleDiamond", "+PDFKit")] - Diamond, - - [Field ("PDFAnnotationLineEndingStyleOpenArrow", "+PDFKit")] - OpenArrow, - - [Field ("PDFAnnotationLineEndingStyleClosedArrow", "+PDFKit")] - ClosedArrow, - } - - [Mac (10,13)] - [iOS (11,0)] - enum PdfAnnotationTextIconType { - - [Field ("PDFAnnotationTextIconTypeComment", "+PDFKit")] - Comment, - - [Field ("PDFAnnotationTextIconTypeKey", "+PDFKit")] - Key, - - [Field ("PDFAnnotationTextIconTypeNote", "+PDFKit")] - Note, - - [Field ("PDFAnnotationTextIconTypeHelp", "+PDFKit")] - Help, - - [Field ("PDFAnnotationTextIconTypeNewParagraph", "+PDFKit")] - NewParagraph, - - [Field ("PDFAnnotationTextIconTypeParagraph", "+PDFKit")] - Paragraph, - - [Field ("PDFAnnotationTextIconTypeInsert", "+PDFKit")] - Insert, - } - - [Mac (10,13)] - [iOS (11,0)] - enum PdfAnnotationHighlightingMode { - - [Field ("PDFAnnotationHighlightingModeNone", "+PDFKit")] - None, - - [Field ("PDFAnnotationHighlightingModeInvert", "+PDFKit")] - Invert, - - [Field ("PDFAnnotationHighlightingModeOutline", "+PDFKit")] - Outline, - - [Field ("PDFAnnotationHighlightingModePush", "+PDFKit")] - Push, - } - - [Mac (10,13)] - [iOS (11,0)] - [Static] - interface PdfAppearanceCharacteristicsKeys { - - [Field ("PDFAppearanceCharacteristicsKeyBackgroundColor", "+PDFKit")] - NSString BackgroundColorKey { get; } - - [Field ("PDFAppearanceCharacteristicsKeyBorderColor", "+PDFKit")] - NSString BorderColorKey { get; } - - [Field ("PDFAppearanceCharacteristicsKeyRotation", "+PDFKit")] - NSString RotationKey { get; } - - [Field ("PDFAppearanceCharacteristicsKeyCaption", "+PDFKit")] - NSString CaptionKey { get; } - - [Field ("PDFAppearanceCharacteristicsKeyRolloverCaption", "+PDFKit")] - NSString RolloverCaptionKey { get; } - - [Field ("PDFAppearanceCharacteristicsKeyDownCaption", "+PDFKit")] - NSString DownCaptionKey { get; } - } - - [Mac (10,13)] - [iOS (11,0)] - [Static] - interface PdfBorderKeys { - - [Field ("PDFBorderKeyLineWidth", "+PDFKit")] - NSString LineWidthKey { get; } - - [Field ("PDFBorderKeyStyle", "+PDFKit")] - NSString StyleKey { get; } - - [Field ("PDFBorderKeyDashPattern", "+PDFKit")] - NSString DashPatternKey { get; } - } - - [iOS (11,0)] - [Internal] - [Static] - interface PdfDocumentAttributeKeys { - - [Field ("PDFDocumentTitleAttribute", "+PDFKit")] - NSString TitleKey { get; } - - [Field ("PDFDocumentAuthorAttribute", "+PDFKit")] - NSString AuthorKey { get; } - - [Field ("PDFDocumentSubjectAttribute", "+PDFKit")] - NSString SubjectKey { get; } - - [Field ("PDFDocumentCreatorAttribute", "+PDFKit")] - NSString CreatorKey { get; } - - [Field ("PDFDocumentProducerAttribute", "+PDFKit")] - NSString ProducerKey { get; } - - [Field ("PDFDocumentCreationDateAttribute", "+PDFKit")] - NSString CreationDateKey { get; } - - [Field ("PDFDocumentModificationDateAttribute", "+PDFKit")] - NSString ModificationDateKey { get; } - - [Field ("PDFDocumentKeywordsAttribute", "+PDFKit")] - NSString KeywordsKey { get; } - } - - [iOS (11,0)] - [StrongDictionary ("PdfDocumentAttributeKeys")] - interface PdfDocumentAttributes { - - string Title { get; set; } - string Author { get; set; } - string Subject { get; set; } - string Creator { get; set; } - string Producer { get; set; } - NSDate CreationDate { get; set; } - NSDate ModificationDate { get; set; } - string [] Keywords { get; set; } - } - - [Mac (10,13)] - [iOS (11,0)] - [Internal] - [Static] - interface PdfDocumentWriteOptionKeys { - - [Field ("PDFDocumentOwnerPasswordOption", "+PDFKit")] - NSString OwnerPasswordKey { get; } - - [Field ("PDFDocumentUserPasswordOption", "+PDFKit")] - NSString UserPasswordKey { get; } - } - - [Mac (10,13)] - [iOS (11,0)] - [StrongDictionary ("PdfDocumentWriteOptionKeys")] - interface PdfDocumentWriteOptions { - - string OwnerPassword { get; set; } - string UserPassword { get; set; } - } - - [Mac (10,13)] - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "PDFAppearanceCharacteristics")] - interface PdfAppearanceCharacteristics : NSCopying { - - [Export ("controlType", ArgumentSemantic.Assign)] - PdfWidgetControlType ControlType { get; set; } - - [NullAllowed, Export ("backgroundColor", ArgumentSemantic.Copy)] - NSColor BackgroundColor { get; set; } - - [NullAllowed, Export ("borderColor", ArgumentSemantic.Copy)] - NSColor BorderColor { get; set; } - - [Export ("rotation")] - nint Rotation { get; set; } - - [NullAllowed, Export ("caption")] - string Caption { get; set; } - - [NullAllowed, Export ("rolloverCaption")] - string RolloverCaption { get; set; } - - [NullAllowed, Export ("downCaption")] - string DownCaption { get; set; } - - [Export ("appearanceCharacteristicsKeyValues", ArgumentSemantic.Copy)] - NSDictionary WeakAppearanceCharacteristicsKeyValues { get; } - } - - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "PDFAction")] + [BaseType (typeof (NSObject), Name="PDFAction")] #if XAMCORE_2_0 [Abstract] #endif @@ -465,11 +53,8 @@ interface PdfAction : NSCopying { string Type { get; } } - [iOS (11,0)] [BaseType (typeof (PdfAction), Name="PDFActionGoTo")] interface PdfActionGoTo { - - [DesignatedInitializer] [Export ("initWithDestination:")] IntPtr Constructor (PdfDestination destination); @@ -477,11 +62,8 @@ interface PdfActionGoTo { PdfDestination Destination { get; set; } } - [iOS (11,0)] - [BaseType (typeof (PdfAction), Name = "PDFActionNamed")] + [BaseType (typeof (PdfAction), Name="PDFActionNamed")] interface PdfActionNamed { - - [DesignatedInitializer] [Export ("initWithName:")] IntPtr Constructor (PdfActionNamedName name); @@ -489,11 +71,8 @@ interface PdfActionNamed { PdfActionNamedName Name { get; set; } } - [iOS (11,0)] - [BaseType (typeof (PdfAction), Name = "PDFActionRemoteGoTo")] + [BaseType (typeof (PdfAction), Name="PDFActionRemoteGoTo")] interface PdfActionRemoteGoTo { - - [DesignatedInitializer] [Export ("initWithPageIndex:atPoint:fileURL:")] IntPtr Constructor (nint pageIndex, CGPoint point, NSUrl fileUrl); @@ -507,8 +86,7 @@ interface PdfActionRemoteGoTo { NSUrl Url { get; set; } } - [iOS (11,0)] - [BaseType (typeof (PdfAction), Name = "PDFActionResetForm")] + [BaseType (typeof (PdfAction), Name="PDFActionResetForm")] interface PdfActionResetForm { //has a public Init ??? @@ -517,14 +95,11 @@ interface PdfActionResetForm { string [] Fields { get; set; } [Export ("fieldsIncludedAreCleared")] - bool FieldsIncludedAreCleared { get; set; } + bool FieldsIncludedAreCleared { get; set; } } - [iOS (11,0)] - [BaseType (typeof (PdfAction), Name = "PDFActionURL")] + [BaseType (typeof (PdfAction), Name="PDFActionURL")] interface PdfActionUrl { - - [DesignatedInitializer] [Export ("initWithURL:")] IntPtr Constructor (NSUrl url); @@ -532,35 +107,16 @@ interface PdfActionUrl { NSUrl Url { get; set; } } - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "PDFAnnotation")] + [BaseType (typeof (NSObject), Name="PDFAnnotation")] interface PdfAnnotation : NSCoding, NSCopying { - - [Mac (10,13)] - [Export ("initWithBounds:forType:withProperties:")] - [DesignatedInitializer] - IntPtr Constructor (CGRect bounds, NSString annotationType, [NullAllowed] NSDictionary properties); - - [Mac (10,13)] - [Wrap ("this (bounds, annotationType.GetConstant (), properties)")] - IntPtr Constructor (CGRect bounds, PdfAnnotationKey annotationType, [NullAllowed] NSDictionary properties); - - [Deprecated (PlatformName.iOS, 11, 0, message: "Use '.ctor (CGRect, PDFAnnotationKey, NSDictionary)' instead")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use '.ctor (CGRect, PDFAnnotationKey, NSDictionary)' instead")] [Export ("initWithBounds:")] IntPtr Constructor (CGRect bounds); [Export ("page")] - PdfPage Page { get; set; } + PdfPage Page { get; } -#if XAMCORE_4_0 - [Protected] [Export ("type")] - NSString Type { get; set; } -#else - [Export ("type")] - string Type { get; set; } -#endif + string Type { get; } [Export ("bounds")] CGRect Bounds { get; set; } @@ -571,7 +127,6 @@ interface PdfAnnotation : NSCoding, NSCopying { [Export ("userName")] string UserName { get; set; } - [NoiOS] [Export ("popup")] PdfAnnotationPopup Popup { get; set; } @@ -587,240 +142,26 @@ interface PdfAnnotation : NSCoding, NSCopying { [Export ("color")] NSColor Color { get; set; } - [Deprecated (PlatformName.MacOSX, 10, 13)] [Export ("mouseUpAction")] PdfAction MouseUpAction { get; set; } [Export ("contents")] string Contents { get; set; } - [Deprecated (PlatformName.MacOSX, 10, 12)] [Export ("toolTip")] string ToolTip { get; } [Export ("hasAppearanceStream")] bool HasAppearanceStream { get; } - [Deprecated (PlatformName.MacOSX, 10, 12)] [Export ("removeAllAppearanceStreams")] void RemoveAllAppearanceStreams (); - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] [Export ("drawWithBox:")] void Draw (PdfDisplayBox box); - - [Mac (10,13)] - [Export ("action", ArgumentSemantic.Strong), NullAllowed] - PdfAction Action { get; set; } - - [Mac (10,13)] - [Export ("highlighted")] - bool Highlighted { [Bind ("isHighlighted")] get; set; } - - [Mac (10,12)] - [Export ("drawWithBox:inContext:")] - void Draw (PdfDisplayBox box, CGContext context); - - [Internal] - [Mac (10,12)] - [Export ("setValue:forAnnotationKey:")] - bool _SetValue (IntPtr value, NSString key); - - [Internal] - [Mac (10,12)] - [Export ("valueForAnnotationKey:")] - [return: NullAllowed] - IntPtr _GetValue (NSString key); - - [Protected] - [Mac (10,12)] - [Export ("setBoolean:forAnnotationKey:")] - bool SetValue (bool boolean, NSString key); - - [Mac (10,12)] - [Wrap ("SetValue (boolean, key.GetConstant ())")] - bool SetValue (bool boolean, PdfAnnotationKey key); - - [Protected] - [Mac (10,12)] - [Export ("setRect:forAnnotationKey:")] - bool SetValue (CGRect rect, NSString key); - - [Mac (10,12)] - [Wrap ("SetValue (rect, key.GetConstant ())")] - bool SetValue (CGRect rect, PdfAnnotationKey key); - - [Mac (10,13)] - [Export ("annotationKeyValues", ArgumentSemantic.Copy)] - NSDictionary AnnotationKeyValues { get; } - - [Protected] - [Mac (10,12)] - [Export ("removeValueForAnnotationKey:")] - void RemoveValue (NSString key); - - [Mac (10,12)] - [Wrap ("RemoveValue (key.GetConstant ())")] - void RemoveValue (PdfAnnotationKey key); - - // PDFAnnotation (PDFAnnotationUtilities) Category - - [Mac (10,13)] - [NullAllowed, Export ("font", ArgumentSemantic.Copy)] - NSFont Font { get; set; } - - [Mac (10,13)] - [NullAllowed, Export ("fontColor", ArgumentSemantic.Copy)] - NSColor FontColor { get; set; } - - [Mac (10,13)] - [Export ("alignment", ArgumentSemantic.Assign)] - NSTextAlignment Alignment { get; set; } - - [Mac (10,13)] - [Export ("startPoint", ArgumentSemantic.Assign)] - CGPoint StartPoint { get; set; } - - [Mac (10,13)] - [Export ("endPoint", ArgumentSemantic.Assign)] - CGPoint EndPoint { get; set; } - - [Mac (10,13)] - [Export ("startLineStyle", ArgumentSemantic.Assign)] - PdfLineStyle StartLineStyle { get; set; } - - [Mac (10,13)] - [Export ("endLineStyle", ArgumentSemantic.Assign)] - PdfLineStyle EndLineStyle { get; set; } - - [Mac (10,13)] - [Static] - [Export ("lineStyleFromName:")] - PdfLineStyle GetLineStyle (string fromName); - - [Mac (10,13)] - [Static] - [Export ("nameForLineStyle:")] - string GetName (PdfLineStyle style); - - [Mac (10,13)] - [Export ("iconType", ArgumentSemantic.Assign)] - PdfTextAnnotationIconType IconType { get; set; } - - [Internal] - [Mac (10,13)] - [NullAllowed, Export ("quadrilateralPoints", ArgumentSemantic.Copy)] - IntPtr _QuadrilateralPoints { get; set; } - - [Mac (10,13)] - [Export ("markupType", ArgumentSemantic.Assign)] - PdfMarkupType MarkupType { get; set; } - - [Mac (10,13)] - [Export ("widgetFieldType")] - string WidgetFieldType { get; set; } - - [Mac (10,13)] - [Export ("widgetControlType", ArgumentSemantic.Assign)] - PdfWidgetControlType WidgetControlType { get; set; } - - [Mac (10,13)] - [Export ("multiline")] - bool Multiline { [Bind ("isMultiline")] get; set; } - - [Mac (10,13)] - [Export ("isPasswordField")] - bool IsPasswordField { get; } - - [Mac (10,13)] - [Export ("comb")] - bool Comb { [Bind ("hasComb")] get; set; } - - [Mac (10,13)] - [Export ("maximumLength")] - nint MaximumLength { get; set; } - - [Mac (10,13)] - [NullAllowed, Export ("widgetStringValue")] - string WidgetStringValue { get; set; } - - [Mac (10,13)] - [NullAllowed, Export ("widgetDefaultStringValue")] - string WidgetDefaultStringValue { get; set; } - - [Mac (10,13)] - [Export ("allowsToggleToOff")] - bool AllowsToggleToOff { get; set; } - - [Mac (10,13)] - [Export ("radiosInUnison")] - bool RadiosInUnison { get; set; } - - [Mac (10,13)] - [Export ("readOnly")] - bool ReadOnly { [Bind ("isReadOnly")] get; set; } - - [Mac (10,13)] - [Export ("listChoice")] - bool ListChoice { [Bind ("isListChoice")] get; set; } - - [Mac (10,13)] - [NullAllowed, Export ("choices", ArgumentSemantic.Copy)] - string [] Choices { get; set; } - - [Mac (10,13)] - [NullAllowed, Export ("values", ArgumentSemantic.Copy)] - string [] Values { get; set; } - - [Mac (10,13)] - [Export ("buttonWidgetState", ArgumentSemantic.Assign)] - PdfWidgetCellState ButtonWidgetState { get; set; } - - [Mac (10,13)] - [Export ("buttonWidgetStateString")] - string ButtonWidgetStateString { get; set; } - - [Mac (10,13)] - [Export ("open")] - bool Open { [Bind ("isOpen")] get; set; } - - [Mac (10,13)] - [NullAllowed, Export ("paths")] - NSBezierPath [] Paths { get; } - - [Mac (10,13)] - [Export ("addBezierPath:")] - void AddBezierPath (NSBezierPath path); - - [Mac (10,13)] - [Export ("removeBezierPath:")] - void RemoveBezierPath (NSBezierPath path); - - [Mac (10,13)] - [NullAllowed, Export ("destination", ArgumentSemantic.Strong)] - PdfDestination Destination { get; set; } - - [Mac (10,13)] - [NullAllowed, Export ("URL", ArgumentSemantic.Copy)] - NSUrl Url { get; set; } - - [Mac (10,13)] - [NullAllowed, Export ("fieldName")] - string FieldName { get; set; } - - [Mac (10,13)] - [NullAllowed, Export ("caption")] - string Caption { get; set; } - - [Mac (10,13)] - [NullAllowed, Export ("backgroundColor", ArgumentSemantic.Copy)] - NSColor BackgroundColor { get; set; } } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationButtonWidget")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationButtonWidget")] interface PdfAnnotationButtonWidget { [Export ("controlType")] PdfWidgetControlType ControlType { get; set; } @@ -835,7 +176,7 @@ interface PdfAnnotationButtonWidget { NSColor BackgroundColor { get; set; } [Export ("allowsToggleToOff")] - bool AllowsToggleToOff { get; set; } + bool AllowsToggleToOff { get; } [Export ("font")] NSFont Font { get; set; } @@ -853,9 +194,7 @@ interface PdfAnnotationButtonWidget { string OnStateValue { get; set; } } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationChoiceWidget")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationChoiceWidget")] interface PdfAnnotationChoiceWidget { [Export ("stringValue")] string Text { get; set; } @@ -880,17 +219,13 @@ interface PdfAnnotationChoiceWidget { string [] Choices { get; set; } } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationCircle")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationCircle")] interface PdfAnnotationCircle { [Export ("interiorColor")] NSColor InteriorColor { get; set; } } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationFreeText")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationFreeText")] interface PdfAnnotationFreeText { [Export ("font")] NSFont Font { get; set; } @@ -902,9 +237,7 @@ interface PdfAnnotationFreeText { NSTextAlignment Alignment { get; set; } } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationInk")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationInk")] interface PdfAnnotationInk { [Export ("paths")] NSBezierPath [] Paths { get; } @@ -916,9 +249,7 @@ interface PdfAnnotationInk { void RemoveBezierPathpath (NSBezierPath path); } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationLine")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationLine")] interface PdfAnnotationLine { [Export ("startPoint")] CGPoint StartPoint { get; set; } @@ -936,9 +267,7 @@ interface PdfAnnotationLine { NSColor InteriorColor { get; set; } } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationLink")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationLink")] interface PdfAnnotationLink { [Export ("destination")] PdfDestination Destination { get; set; } @@ -950,9 +279,7 @@ interface PdfAnnotationLink { void SetHighlighted (bool highlighted); } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationMarkup")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationMarkup")] interface PdfAnnotationMarkup { [Export ("quadrilateralPoints", ArgumentSemantic.Assign), NullAllowed] #if XAMCORE_2_0 @@ -965,41 +292,31 @@ interface PdfAnnotationMarkup { PdfMarkupType MarkupType { get; set; } } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationPopup")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationPopup")] interface PdfAnnotationPopup { [Export ("isOpen")] bool IsOpen { get; set; } } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationSquare")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationSquare")] interface PdfAnnotationSquare { [Export ("interiorColor")] NSColor InteriorColor { get; set; } } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationStamp")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationStamp")] interface PdfAnnotationStamp { [Export ("name")] string Name { get; set; } } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationText")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationText")] interface PdfAnnotationText { [Export ("iconType")] PdfTextAnnotationIconType IconType { get; set; } } - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [BaseType (typeof (PdfAnnotation), Name = "PDFAnnotationTextWidget")] + [BaseType (typeof (PdfAnnotation), Name="PDFAnnotationTextWidget")] interface PdfAnnotationTextWidget { [Export ("stringValue")] string StringValue { get; set; } @@ -1024,16 +341,9 @@ interface PdfAnnotationTextWidget { [Export ("fieldName")] string FieldName { get; set; } - - [Export ("attributedStringValue")] - NSAttributedString AttributedStringValue { get; set; } - - [Export ("isMultiline")] - bool IsMultiline { get; set; } } - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "PDFBorder")] + [BaseType (typeof (NSObject), Name="PDFBorder")] interface PdfBorder : NSCoding, NSCopying { [Export ("style")] PdfBorderStyle Style { get; set; } @@ -1054,19 +364,12 @@ interface PdfBorder : NSCoding, NSCopying { NSArray DashPattern { get; set; } #endif - [Mac (10,13)] - [Export ("borderKeyValues", ArgumentSemantic.Copy)] - NSDictionary WeakBorderKeyValues { get; } - [Export ("drawInRect:")] void Draw (CGRect rect); } - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "PDFDestination")] + [BaseType (typeof (NSObject), Name="PDFDestination")] interface PdfDestination : NSCopying { - - [DesignatedInitializer] [Export ("initWithPage:atPoint:")] IntPtr Constructor (PdfPage page, CGPoint point); @@ -1075,98 +378,35 @@ interface PdfDestination : NSCopying { [Export ("point")] CGPoint Point { get; } - - [Mac (10, 7)] - [Export ("zoom")] - nfloat Zoom { get; set; } - + //Should Compare be more more .Net ified ? [Export ("compare:")] NSComparisonResult Compare (PdfDestination destination); } //Add attributes for delegates/events - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "PDFDocument", Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (PdfDocumentDelegate) })] + [BaseType (typeof (NSObject), Name="PDFDocument", Delegates=new string [] { "WeakDelegate" }, Events=new Type [] { typeof (PdfDocumentDelegate)})] interface PdfDocument : NSCopying { - - [Field ("PDFDocumentDidUnlockNotification", "+PDFKit")] - [Notification] - NSString DidUnlockNotification { get; } - - [Field ("PDFDocumentDidBeginFindNotification", "+PDFKit")] - [Notification] - NSString DidBeginFindNotification { get; } - - [Field ("PDFDocumentDidEndFindNotification", "+PDFKit")] - [Notification] - NSString DidEndFindNotification { get; } - - [Field ("PDFDocumentDidBeginPageFindNotification", "+PDFKit")] - [Notification] - NSString DidBeginPageFindNotification { get; } - - [Field ("PDFDocumentDidEndPageFindNotification", "+PDFKit")] - [Notification] - NSString DidEndPageFindNotification { get; } - - [Field ("PDFDocumentDidFindMatchNotification", "+PDFKit")] - [Notification] - NSString DidFindMatchNotification { get; } - - [Field ("PDFDocumentDidBeginWriteNotification", "+PDFKit")] - [Notification] - NSString DidBeginWriteNotification { get; } - - [Field ("PDFDocumentDidEndWriteNotification", "+PDFKit")] - [Notification] - NSString DidEndWriteNotification { get; } - - [Field ("PDFDocumentDidBeginPageWriteNotification", "+PDFKit")] - [Notification] - NSString DidBeginPageWriteNotification { get; } - - [Field ("PDFDocumentDidEndPageWriteNotification", "+PDFKit")] - [Notification] - NSString DidEndPageWriteNotification { get; } - [Export ("initWithURL:")] - [DesignatedInitializer] IntPtr Constructor (NSUrl url); [Export ("initWithData:")] - [DesignatedInitializer] - IntPtr Constructor (NSData data); + IntPtr Constructor (NSData data); [Export ("documentURL")] NSUrl DocumentUrl { get; } - [Export ("documentRef")] - CGPDFDocument Document { get; } + //[Export ("documentRef")] + //CGPdfDocumentRef DocumentRef { get; } - [Advice ("Use the strongly typed '[Get|Set]DocumentAttributes' instead.")] - [Export ("documentAttributes", ArgumentSemantic.Copy)] + [Export ("documentAttributes")] NSDictionary DocumentAttributes { get; set; } - [Wrap ("new PdfDocumentAttributes (DocumentAttributes)")] - PdfDocumentAttributes GetDocumentAttributes (); - - [Wrap ("DocumentAttributes = attributes?.Dictionary")] - void SetDocumentAttributes (PdfDocumentAttributes attributes); - -#if XAMCORE_4_0 || IOS - [Export ("majorVersion")] - nint MajorVersion { get; } - - [Export ("minorVersion")] - nint MinorVersion { get; } -#else [Export ("majorVersion")] int MajorVersion { get; } /* int, not NSInteger */ [Export ("minorVersion")] int MinorVersion { get; } /* int, not NSInteger */ -#endif [Export ("isEncrypted")] bool IsEncrypted { get; } @@ -1183,26 +423,6 @@ interface PdfDocument : NSCopying { [Export ("allowsCopying")] bool AllowsCopying { get; } - [Mac (10,13)] - [Export ("allowsDocumentChanges")] - bool AllowsDocumentChanges { get; } - - [Mac (10,13)] - [Export ("allowsDocumentAssembly")] - bool AllowsDocumentAssembly { get; } - - [Mac (10,13)] - [Export ("allowsContentAccessibility")] - bool AllowsContentAccessibility { get; } - - [Mac (10,13)] - [Export ("allowsCommenting")] - bool AllowsCommenting { get; } - - [Mac (10,13)] - [Export ("allowsFormFieldEntry")] - bool AllowsFormFieldEntry { get; } - [Export ("permissionsStatus")] PdfDocumentPermissions PermissionsStatus { get; } @@ -1228,21 +448,12 @@ interface PdfDocument : NSCopying { [Export ("writeToFile:withOptions:")] bool Write (string path, NSDictionary options); - [Mac (10,13)] - [Wrap ("Write (path, options.Dictionary)")] - bool Write (string path, PdfDocumentWriteOptions options); - [Export ("writeToURL:")] bool Write (NSUrl url); [Export ("writeToURL:withOptions:")] bool Write (NSUrl url, NSDictionary options); - [Mac (10,13)] - [Wrap ("Write (url, options?.Dictionary)")] - bool Write (NSUrl url, PdfDocumentWriteOptions options); - - [NullAllowed] [Export ("outlineRoot")] PdfOutline OutlineRoot { get; set; } @@ -1266,49 +477,24 @@ interface PdfDocument : NSCopying { [Export ("exchangePageAtIndex:withPageAtIndex:")] void ExchangePages (nint indexA, nint indexB); - + + // Check on how Classes map to Types [Export ("pageClass")] Class PageClass { get; } - - [Wrap ("Class.Lookup (PageClass)")] - Type PageType { get; } - + + // Shouldn't options should be a bit flag of comparison methods - find enum. [Export ("findString:withOptions:")] -#if MONOMAC && !XAMCORE_4_0 - [Obsolete ("Use 'Find (string, NSStringCompareOptions)' instead.")] PdfSelection [] Find (string text, nint options); - [Wrap ("Find (text: text, options: (nint) (int) compareOptions)", IsVirtual = true)] -#endif - PdfSelection [] Find (string text, NSStringCompareOptions compareOptions); - [Export ("beginFindString:withOptions:")] -#if MONOMAC && !XAMCORE_4_0 - [Obsolete ("Use 'FindAsync (string, NSStringCompareOptions)' instead.")] void FindAsync (string text, nint options); - [Wrap ("FindAsync (text: text, options: (nint) (int) compareOptions)", IsVirtual = true)] -#endif - void FindAsync (string text, NSStringCompareOptions compareOptions); - [Export ("beginFindStrings:withOptions:")] -#if MONOMAC && !XAMCORE_4_0 - [Obsolete ("Use 'FindAsync (string [], NSStringCompareOptions)' instead.")] void FindAsync (string [] text, nint options); - [Wrap ("FindAsync (text: text, options: (nint) (int) compareOptions)", IsVirtual = true)] -#endif - void FindAsync (string [] text, NSStringCompareOptions compareOptions); - [Export ("findString:fromSelection:withOptions:")] -#if MONOMAC && !XAMCORE_4_0 - [Obsolete ("Use 'Find (string, PdfSelection, NSStringCompareOptions)' instead.")] PdfSelection Find (string text, PdfSelection selection, nint options); - [Wrap ("Find (text: text, selection: selection, options: (nint) (int) compareOptions)", IsVirtual = true)] -#endif - PdfSelection Find (string text, PdfSelection selection, NSStringCompareOptions compareOptions); - [Export ("isFinding")] bool IsFinding { get; } @@ -1323,49 +509,21 @@ interface PdfDocument : NSCopying { [Export ("selectionFromPage:atCharacterIndex:toPage:atCharacterIndex:")] PdfSelection GetSelection (PdfPage startPage, nint startCharIndex, PdfPage endPage, nint endCharIndex); - - [NoiOS] - [Mac (10,7)] - [Export ("printOperationForPrintInfo:scalingMode:autoRotate:")] - [return: NullAllowed] - NSPrintOperation GetPrintOperation ([NullAllowed] NSPrintInfo printInfo, PdfPrintScalingMode scaleMode, bool doRotate); } - - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "PDFDocumentDelegate")] -#if IOS - [Protocol] -#else - [Protocol (FormalSince = "10.13", Name = "PDFDocumentDelegate")] -#endif + + [BaseType (typeof (NSObject))] [Model] + [Protocol (IsInformal = true)] interface PdfDocumentDelegate { - - [Export ("documentDidUnlock:"), EventArgs ("NSNotification")] - void DidUnlock (NSNotification notification); - - [Export ("documentDidBeginDocumentFind:"), EventArgs ("NSNotification")] - void DidBeginDocumentFind (NSNotification notification); - [Export ("didMatchString:"), EventArgs ("PdfSelection")] void DidMatchString (PdfSelection sender); - [Export ("classForPage"), IgnoredInDelegate] - Class GetClassForPage (); - - [Mac (10,13)] - [DelegateName ("ClassForAnnotationTypeDelegate"), DefaultValue (null)] - [Export ("classForAnnotationType:")] - Class GetClassForAnnotationType (string annotationType); + //the delegate method needs to take at least one parameter + //[Export ("classForPage"), DelegateName ("ClassForPageDelegate"), DefaultValue (null)] + //Class ClassForPage (); - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'GetClassForAnnotationType' instead.")] [Export ("classForAnnotationClass:"), DelegateName ("ClassForAnnotationClassDelegate"), DefaultValue (null)] -#if XAMCORE_4_0 - Class GetClassForAnnotationClass (Class sender); -#else Class ClassForAnnotationClass (Class sender); -#endif [Export ("documentDidEndDocumentFind:"), EventArgs ("NSNotification")] void FindFinished (NSNotification notification); @@ -1380,14 +538,15 @@ interface PdfDocumentDelegate { void MatchFound (NSNotification notification); } - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "PDFOutline")] + [BaseType (typeof (NSObject), Name="PDFOutline")] interface PdfOutline { + // Why did this have a special init???? + // Constructor/class needs special documentation on how to use one that is created (not obtained from another object). [Export ("document")] PdfDocument Document { get; } - [Export ("parent"), NullAllowed] + [Export ("parent")] PdfOutline Parent { get; } [Export ("numberOfChildren")] @@ -1411,29 +570,25 @@ interface PdfOutline { [Export ("isOpen")] bool IsOpen { get; set; } - [Export ("destination"), NullAllowed] + [Export ("destination")] PdfDestination Destination { get; set; } - [Mac (10,13)] - [Export ("action"), NullAllowed] + [Export ("action")] PdfAction Action { get; set; } } - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "PDFPage")] + [BaseType (typeof (NSObject), Name="PDFPage")] interface PdfPage : NSCopying { - - [DesignatedInitializer] [Export ("initWithImage:")] IntPtr Constructor (NSImage image); - [Export ("document"), NullAllowed] + [Export ("document")] PdfDocument Document { get; } - [Export ("pageRef"), NullAllowed] - CGPDFPage Page { get; } + //[Export ("pageRef")] + //CGPdfPageRef PageRef { get; } - [Export ("label"), NullAllowed] + [Export ("label")] string Label { get; } [Export ("boundsForBox:")] @@ -1444,7 +599,7 @@ interface PdfPage : NSCopying { [Export ("rotation")] nint Rotation { get; set; } // - (NSInteger) rotation; - rotation is not consistently declared - + //Check Docs say: "array will _most likely_ be typed to subclasses of the PdfAnnotation class" //do they mean that if it isn't a subclass it is the base class ?? //Maybe we should be safe and return NSArray ?? @@ -1461,31 +616,11 @@ interface PdfPage : NSCopying { void RemoveAnnotation (PdfAnnotation annotation); [Export ("annotationAtPoint:")] - [return: NullAllowed] PdfAnnotation GetAnnotation (CGPoint point); - [Mac (10,12)] - [Export ("transformForBox:")] - CGAffineTransform GetTransform (PdfDisplayBox box); - - [NoiOS] - [Mac (10,12)] [Export ("drawWithBox:")] void Draw (PdfDisplayBox box); - [Mac (10,12)] - [Export ("drawWithBox:toContext:")] - void Draw (PdfDisplayBox box, CGContext context); - - [Mac (10,12)] - [Export ("transformContext:forBox:")] - void TransformContext (CGContext context, PdfDisplayBox box); - - [Mac (10,13)] - [Export ("thumbnailOfSize:forBox:")] - NSImage GetThumbnail (CGSize size, PdfDisplayBox box); - - [NoiOS] [Export ("transformContextForBox:")] void TransformContext (PdfDisplayBox box); @@ -1505,61 +640,47 @@ interface PdfPage : NSCopying { nint GetCharacterIndex (CGPoint point); [Export ("selectionForRect:")] - [return: NullAllowed] PdfSelection GetSelection (CGRect rect); [Export ("selectionForWordAtPoint:")] - [return: NullAllowed] PdfSelection SelectWord (CGPoint point); [Export ("selectionForLineAtPoint:")] - [return: NullAllowed] PdfSelection SelectLine (CGPoint point); [Export ("selectionFromPoint:toPoint:")] - [return: NullAllowed] PdfSelection GetSelection (CGPoint startPoint, CGPoint endPoint); [Export ("selectionForRange:")] - [return: NullAllowed] PdfSelection GetSelection (NSRange range); [Export ("dataRepresentation")] NSData DataRepresentation { get; } } - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "PDFSelection")] + [BaseType (typeof (NSObject), Name="PDFSelection")] [DisableDefaultCtor] // An uncaught exception was raised: init: not a valid initializer for PDFSelection interface PdfSelection : NSCopying { - - [DesignatedInitializer] [Export ("initWithDocument:")] IntPtr Constructor (PdfDocument document); + //verify NSArray [Export ("pages")] PdfPage [] Pages { get; } - [Export ("color", ArgumentSemantic.Copy), NullAllowed] + [Export ("color")] NSColor Color { get; set; } - [Export ("string"), NullAllowed] + [Export ("string")] string Text { get; } - [Export ("attributedString"), NullAllowed] + [Export ("attributedString")] NSAttributedString AttributedString { get; } [Export ("boundsForPage:")] CGRect GetBoundsForPage (PdfPage page); - - [Mac (10, 7)] - [Export ("numberOfTextRangesOnPage:")] - nuint GetNumberOfTextRanges (PdfPage page); - - [Mac (10, 7)] - [Export ("rangeAtIndex:onPage:")] - NSRange GetRange (nuint index, PdfPage page); - + + //verify NSArray [Export ("selectionsByLine")] PdfSelection [] SelectionsByLine (); @@ -1575,10 +696,6 @@ interface PdfSelection : NSCopying { [Export ("extendSelectionAtStart:")] void ExtendSelectionAtStart (nint precede); - [Mac (10,13)] - [Export ("extendSelectionForLineBoundaries")] - void ExtendSelectionForLineBoundaries (); - [Export ("drawForPage:active:")] void Draw (PdfPage page, bool active); @@ -1586,67 +703,37 @@ interface PdfSelection : NSCopying { void Draw (PdfPage page, PdfDisplayBox box, bool active); } - [iOS (11,0)] - [BaseType (typeof (NSView), Name = "PDFThumbnailView")] - interface PdfThumbnailView : NSCoding { - - [Export ("initWithFrame:")] - IntPtr Constructor (CGRect frame); - - [Field ("PDFThumbnailViewDocumentEditedNotification", "+PDFKit")] - [Notification] - NSString DocumentEditedNotification { get; } - - [Export ("PDFView"), NullAllowed] + [BaseType (typeof (NSView), Name="PDFThumbnailView")] + interface PdfThumbnailView { + [Export ("PDFView")] PdfView PdfView { get; set; } [Export ("thumbnailSize")] CGSize ThumbnailSize { get; set; } - [NoMac] - [Export ("layoutMode")] - PdfThumbnailLayoutMode LayoutMode { get; set; } - - [NoMac] - [Export ("contentInset")] - NSEdgeInsets ContentInset { get; set; } - - [NoiOS] [Export ("maximumNumberOfColumns")] nint MaximumNumberOfColumns { get; set; } - [NoiOS] [Export ("labelFont")] NSFont LabelFont { get; set; } - [Export ("backgroundColor", ArgumentSemantic.Copy)] + [Export ("backgroundColor")] NSColor BackgroundColor { get; set; } - [NoiOS] [Export ("allowsDragging")] bool AllowsDragging { get; set; } - [NoiOS] [Export ("allowsMultipleSelection")] bool AllowsMultipleSelection { get; set; } - - [Export ("selectedPages", ArgumentSemantic.Strong), NullAllowed] + + //verify NSArray + [Export ("selectedPages")] PdfPage [] SelectedPages { get; } } - [iOS (11,0)] - [BaseType (typeof (NSView), Name = "PDFView", Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (PdfViewDelegate) })] - interface PdfView : -#if IOS - UIGestureRecognizerDelegate -#else - NSMenuDelegate, NSAnimationDelegate -#endif - { - [Export ("initWithFrame:")] - IntPtr Constructor (CGRect frame); - - [Export ("document"), NullAllowed] + [BaseType (typeof (NSView), Name="PDFView", Delegates=new string [] { "WeakDelegate" }, Events=new Type [] { typeof (PdfViewDelegate)})] + interface PdfView : NSMenuDelegate { + [Export ("document")] PdfDocument Document { get; set; } [Export ("canGoToFirstPage")] @@ -1707,53 +794,26 @@ interface PdfView : [Export ("displayMode")] PdfDisplayMode DisplayMode { get; set; } - [Mac (10,13)] - [Export ("displayDirection")] - PdfDisplayDirection DisplayDirection { get; set; } - [Export ("displaysPageBreaks")] bool DisplaysPageBreaks { get; set; } - [Mac (10,13)] - [Export ("pageBreakMargins")] - NSEdgeInsets PageBreakMargins { get; set; } - [Export ("displayBox")] PdfDisplayBox DisplayBox { get; set; } [Export ("displaysAsBook")] bool DisplaysAsBook { get; set; } - [Mac (10,13)] - [Export ("displaysRTL")] - bool DisplaysRtl { get; set; } - - [Deprecated (PlatformName.MacOSX, 10, 12)] [Export ("shouldAntiAlias")] bool ShouldAntiAlias { get; set; } - [Deprecated (PlatformName.MacOSX, 10, 12)] [Export ("greekingThreshold")] nfloat GreekingThreshold { get; set; } - [Deprecated (PlatformName.MacOSX, 10, 12)] [Export ("takeBackgroundColorFrom:")] void TakeBackgroundColor (NSObject sender); [Export ("backgroundColor")] NSColor BackgroundColor { get; set; } - - [Mac (10,7)] - [Export ("interpolationQuality", ArgumentSemantic.Assign)] - PdfInterpolationQuality InterpolationQuality { get; set; } - - [NoMac] - [Export ("usePageViewController:withViewOptions:")] - void UsePageViewController (bool enable, [NullAllowed] NSDictionary viewOptions); - - [NoMac] - [Export ("isUsingPageViewController")] - bool IsUsingPageViewController { get; } [Export ("delegate", ArgumentSemantic.Assign), NullAllowed] NSObject WeakDelegate { get; set; } @@ -1765,14 +825,6 @@ interface PdfView : [Export ("scaleFactor")] nfloat ScaleFactor { get; set; } - [Mac (10,13)] - [Export ("minScaleFactor")] - nfloat MinScaleFactor { get; set; } - - [Mac (10,13)] - [Export ("maxScaleFactor")] - nfloat MaxScaleFactor { get; set; } - [Export ("zoomIn:")] void ZoomIn (NSObject sender); @@ -1788,10 +840,6 @@ interface PdfView : [Export ("autoScales")] bool AutoScales { get; set; } - [Mac (10,13)] - [Export ("scaleFactorForSizeToFit")] - nfloat ScaleFactorForSizeToFit { get; } - [Export ("areaOfInterestForMouse:")] PdfAreaOfInterest GetAreaOfInterest (NSEvent mouseEvent); @@ -1799,7 +847,6 @@ interface PdfView : [Export ("areaOfInterestForPoint:")] PdfAreaOfInterest GetAreaOfInterest (CGPoint point); - [NoiOS] [Export ("setCursorForAreaOfInterest:")] void SetCursor (PdfAreaOfInterest area); @@ -1816,41 +863,30 @@ interface PdfView : void ClearSelection (); [Export ("selectAll:")] - void SelectAll ([NullAllowed] NSObject sender); + void SelectAll (NSObject sender); [Export ("scrollSelectionToVisible:")] void ScrollSelectionToVisible (NSObject sender); + // Verify NSArray [Export ("highlightedSelections")] PdfSelection [] HighlightedSelections { get; set; } [Export ("takePasswordFrom:")] void TakePasswordFrom (NSObject sender); - [NoiOS] [Export ("drawPage:")] void DrawPage (PdfPage page); - [Mac (10,12)] - [Export ("drawPage:toContext:")] - void DrawPage (PdfPage page, CGContext context); - - [Mac (10,12)] - [Export ("drawPagePost:toContext:")] - void DrawPagePost (PdfPage page, CGContext context); - - [NoiOS] [Export ("drawPagePost:")] void DrawPagePost (PdfPage page); [Export ("copy:")] - void Copy ([NullAllowed] NSObject sender); + void Copy (NSObject sender); - [NoiOS] [Export ("printWithInfo:autoRotate:")] void Print (NSPrintInfo printInfo, bool doRotate); - [NoiOS] [Export ("printWithInfo:autoRotate:pageScaling:")] void Print (NSPrintInfo printInfo, bool doRotate, PdfPrintScalingMode scaleMode); @@ -1881,72 +917,57 @@ interface PdfView : [Export ("rowSizeForPage:")] CGSize RowSize (PdfPage page); - [NoiOS] - [Deprecated (PlatformName.MacOSX, 10, 13)] [Export ("allowsDragging")] bool AllowsDragging { get; set; } + //Verify NSArray [Export ("visiblePages")] PdfPage [] VisiblePages { get; } [Export ("enableDataDetectors")] bool EnableDataDetectors { get; set; } - [Field("PDFViewChangedHistoryNotification", "+PDFKit")] + [Field("PDFViewChangedHistoryNotification")] [Notification] NSString ChangedHistoryNotification { get; } - [Field("PDFViewDocumentChangedNotification", "+PDFKit")] + [Field("PDFViewDocumentChangedNotification")] [Notification] NSString DocumentChangedNotification { get; } - [Field ("PDFViewPageChangedNotification", "+PDFKit")] + [Field ("PDFViewPageChangedNotification")] [Notification] NSString PageChangedNotification { get; } - [Field ("PDFViewScaleChangedNotification", "+PDFKit")] + [Field ("PDFViewScaleChangedNotification")] [Notification] NSString ScaleChangedNotification { get; } - [Field ("PDFViewAnnotationHitNotification", "+PDFKit")] + [Field ("PDFViewAnnotationHitNotification")] [Notification (typeof (PdfViewAnnotationHitEventArgs))] NSString AnnotationHitNotification { get; } - [Field ("PDFViewCopyPermissionNotification", "+PDFKit")] + [Field ("PDFViewCopyPermissionNotification")] [Notification] NSString CopyPermissionNotification { get; } - [Field ("PDFViewPrintPermissionNotification", "+PDFKit")] - [Notification] - NSString PrintPermissionNotification { get; } - - [Field ("PDFViewAnnotationWillHitNotification", "+PDFKit")] + [Field ("PDFViewAnnotationWillHitNotification")] [Notification] NSString AnnotationWillHitNotification { get; } - [Field ("PDFViewSelectionChangedNotification", "+PDFKit")] + [Field ("PDFViewSelectionChangedNotification")] [Notification] NSString SelectionChangedNotification { get; } - [Field ("PDFViewDisplayModeChangedNotification", "+PDFKit")] + [Field ("PDFViewDisplayModeChangedNotification")] [Notification] NSString DisplayModeChangedNotification { get; } - [Field ("PDFViewDisplayBoxChangedNotification", "+PDFKit")] + [Field ("PDFViewDisplayBoxChangedNotification")] [Notification] NSString DisplayBoxChangedNotification { get; } - - [Field ("PDFViewVisiblePagesChangedNotification", "+PDFKit")] - [Notification] - NSString VisiblePagesChangedNotification { get; } - - [NoiOS] - [Mac (10,13)] - [Export ("acceptsDraggedFiles")] - bool AcceptsDraggedFiles { get; set; } } - [NoiOS] interface PdfViewAnnotationHitEventArgs { [Export ("PDFAnnotationHit")] PdfAnnotation AnnotationHit { get; } @@ -1954,17 +975,11 @@ interface PdfViewAnnotationHitEventArgs { //Verify delegate methods. There are default actions (not just return null ) that should occur //if the delegate does not implement the method. - [iOS (11,0)] - [BaseType (typeof (NSObject), Name = "PDFViewDelegate")] -#if IOS - [Protocol] -#else - [Protocol (FormalSince = "10.12", Name = "PDFViewDelegate")] -#endif + [BaseType (typeof (NSObject))] [Model] + [Protocol (IsInformal = true)] interface PdfViewDelegate { //from docs: 'By default, the scale factor is restricted to a range between 0.1 and 10.0 inclusive.' - [NoiOS] [Export ("PDFViewWillChangeScaleFactor:toScale:"), DelegateName ("PdfViewScale"), DefaultValueFromArgument ("scale")] nfloat WillChangeScaleFactor (PdfView sender, nfloat scale); @@ -1974,7 +989,6 @@ interface PdfViewDelegate { // from the docs: 'By default, this method uses the string, if any, associated with the // 'Title' key in the view's PDFDocument attribute dictionary. If there is no such string, // this method uses the last path component if the document is URL-based. - [NoiOS] [Export ("PDFViewPrintJobTitle:"), DelegateName ("PdfViewTitle"), DefaultValue ("String.Empty")] string TitleOfPrintJob (PdfView sender); @@ -1984,7 +998,6 @@ interface PdfViewDelegate { [Export ("PDFViewPerformGoToPage:"), EventArgs ("PdfView")] void PerformGoToPage (PdfView sender); - [NoiOS] [Export ("PDFViewPerformPrint:"), EventArgs ("PdfView")] void PerformPrint (PdfView sender); @@ -1993,4 +1006,3 @@ interface PdfViewDelegate { } } -#endif // MONOMAC || (IOS && XAMCORE_2_0) diff --git a/src/photos.cs b/src/photos.cs index 1b2305daafa..f8b2944c6f2 100644 --- a/src/photos.cs +++ b/src/photos.cs @@ -10,9 +10,6 @@ using System; #if !MONOMAC using XamCore.UIKit; -using NSImage = XamCore.Foundation.NSObject; // help [NoiOS] and [NoTV] -#else -using XamCore.AppKit; #endif namespace XamCore.Photos @@ -38,10 +35,7 @@ interface PHAdjustmentData : NSCoding, NSSecureCoding { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] -#if MONOMAC - [DisableDefaultCtor] // Crashes mac introspection test -#endif + [NoMac] [BaseType (typeof (PHObject))] interface PHAsset { @@ -72,10 +66,6 @@ interface PHAsset { [Export ("hidden")] bool Hidden { [Bind ("isHidden")] get; } - [NoTV][NoiOS] - [Export ("syncFailureHidden")] - bool SyncFailureHidden { [Bind ("isSyncFailureHidden")] get; } - [Export ("favorite")] bool Favorite { [Bind ("isFavorite")] get; } @@ -115,9 +105,6 @@ interface PHAsset { [Export ("fetchAssetsWithOptions:")] PHFetchResult FetchAssets ([NullAllowed] PHFetchOptions options); - [Deprecated (PlatformName.TvOS, 11,0)] - [Deprecated (PlatformName.iOS, 11,0)] - [NoMac] [Static] [Export ("fetchAssetsWithALAssetURLs:options:")] PHFetchResult FetchAssets (NSUrl[] assetUrls, [NullAllowed] PHFetchOptions options); @@ -125,14 +112,6 @@ interface PHAsset { [iOS (9,0)] [Export ("sourceType", ArgumentSemantic.Assign)] PHAssetSourceType SourceType { get; } - - [TV (11,0), iOS (11,0), NoMac] - [Export ("playbackStyle", ArgumentSemantic.Assign)] - PHAssetPlaybackStyle PlaybackStyle { get; } - - [NoTV][NoiOS] - [Field ("PHLocalIdentifierNotFound")] - NSString LocalIdentifierNotFound { get; } } [iOS (8,0)] @@ -386,7 +365,7 @@ interface PHAssetResourceRequestOptions : NSCopying [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [BaseType (typeof (NSObject))] interface PHChange { @@ -399,7 +378,7 @@ interface PHChange { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [BaseType (typeof (NSObject))] interface PHObjectChangeDetails { @@ -416,12 +395,12 @@ interface PHObjectChangeDetails { bool ObjectWasDeleted { get; } } - [Mac (10,13, onlyOn64 : true)] + [NoMac] delegate void PHChangeDetailEnumerator (nuint fromIndex, nuint toIndex); [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [BaseType (typeof (NSObject))] interface PHFetchResultChangeDetails { @@ -465,7 +444,7 @@ interface PHFetchResultChangeDetails { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [BaseType (typeof (PHObject))] [DisableDefaultCtor] // not user createable (calling description fails, see below) must be fetched by API // NSInternalInconsistencyException Reason: PHCollection has no identifier @@ -497,7 +476,7 @@ interface PHCollection { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [BaseType (typeof (PHCollection))] interface PHAssetCollection { @@ -557,7 +536,7 @@ interface PHAssetCollection { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [BaseType (typeof (PHCollection))] interface PHCollectionList { @@ -680,10 +659,8 @@ interface PHContentEditingInput { [Export ("adjustmentData", ArgumentSemantic.Strong)] PHAdjustmentData AdjustmentData { get; } +#if !MONOMAC [Export ("displaySizeImage", ArgumentSemantic.Strong)] -#if MONOMAC - NSImage DisplaySizeImage { get; } -#else UIImage DisplaySizeImage { get; } #endif @@ -694,7 +671,7 @@ interface PHContentEditingInput { XamCore.CoreImage.CIImageOrientation FullSizeImageOrientation { get; } [Export ("avAsset", ArgumentSemantic.Strong)] - [Availability (Deprecated = Platform.iOS_9_0, Message="Use 'AudiovisualAsset' property instead.")] + [Availability (Deprecated = Platform.iOS_9_0, Message="In iOS 9, use AudiovisualAsset property instead")] AVAsset AvAsset { get; } [iOS (9,0)] @@ -704,11 +681,6 @@ interface PHContentEditingInput { [iOS (10,0)] [NullAllowed, Export ("livePhoto", ArgumentSemantic.Strong)] PHLivePhoto LivePhoto { get; } - - [TV (11,0), iOS (11,0)] - [Mac (10,13, onlyOn64 : true)] - [Export ("playbackStyle", ArgumentSemantic.Assign)] - PHAssetPlaybackStyle PlaybackStyle { get; } } [iOS (8,0)] @@ -734,7 +706,7 @@ interface PHContentEditingOutput : NSCoding, NSSecureCoding { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [BaseType (typeof (NSObject))] interface PHFetchOptions : NSCopying { @@ -764,12 +736,12 @@ interface PHFetchOptions : NSCopying { nuint FetchLimit { get; set; } } - [Mac (10,13, onlyOn64 : true)] + [NoMac] delegate void PHFetchResultEnumerator (NSObject element, nuint elementIndex, out bool stop); [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // crash when calling 'description' and seems to be only returned from iOS (not user created) interface PHFetchResult : NSCopying { @@ -819,7 +791,7 @@ interface PHFetchResult : NSCopying { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [BaseType (typeof (NSObject))] interface PHImageRequestOptions : NSCopying { @@ -870,7 +842,7 @@ interface PHVideoRequestOptions { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [Static] interface PHImageKeys { @@ -890,9 +862,7 @@ interface PHImageKeys { NSString ResultRequestID { get; } } -#if MONOMAC - delegate void PHImageResultHandler (NSImage result, NSDictionary info); -#else +#if !MONOMAC delegate void PHImageResultHandler (UIImage result, NSDictionary info); #endif @@ -907,7 +877,7 @@ interface PHImageKeys { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [BaseType (typeof (NSObject))] interface PHImageManager { @@ -915,24 +885,25 @@ interface PHImageManager { [Export ("defaultManager")] PHImageManager DefaultManager { get; } +#if !MONOMAC [Export ("requestImageForAsset:targetSize:contentMode:options:resultHandler:")] int /* PHImageRequestID = int32_t */ RequestImageForAsset (PHAsset asset, CGSize targetSize, PHImageContentMode contentMode, [NullAllowed] PHImageRequestOptions options, PHImageResultHandler resultHandler); +#endif [Export ("cancelImageRequest:")] void CancelImageRequest (int /* PHImageRequestID = int32_t */ requestID); +#if !MONOMAC [Export ("requestImageDataForAsset:options:resultHandler:")] int /* PHImageRequestID = int32_t */ RequestImageData (PHAsset asset, [NullAllowed] PHImageRequestOptions options, PHImageDataHandler handler); +#endif - [NoMac] [Export ("requestPlayerItemForVideo:options:resultHandler:")] int /* PHImageRequestID = int32_t */ RequestPlayerItem (PHAsset asset, [NullAllowed] PHVideoRequestOptions options, PHImageManagerRequestPlayerHandler resultHandler); - [NoMac] [Export ("requestExportSessionForVideo:options:exportPreset:resultHandler:")] int /* PHImageRequestID = int32_t */ RequestExportSession (PHAsset asset, [NullAllowed] PHVideoRequestOptions options, string exportPreset, PHImageManagerRequestExportHandler resultHandler); - [NoMac] [Export ("requestAVAssetForVideo:options:resultHandler:")] #if XAMCORE_4_0 int /* PHImageRequestID = int32_t */ RequestAVAsset (PHAsset asset, [NullAllowed] PHVideoRequestOptions options, PHImageManagerRequestAVAssetHandler resultHandler); @@ -944,14 +915,11 @@ interface PHImageManager { CGSize MaximumSize { get; } [iOS (9,1)] - [NoMac] [Export ("requestLivePhotoForAsset:targetSize:contentMode:options:resultHandler:")] int /* PHImageRequestID = int32_t */ RequestLivePhoto (PHAsset asset, CGSize targetSize, PHImageContentMode contentMode, [NullAllowed] PHLivePhotoRequestOptions options, PHImageManagerRequestLivePhoto resultHandler); } -#if MONOMAC - delegate void PHImageDataHandler (NSData data, NSString dataUti, CGImagePropertyOrientation orientation, NSDictionary info); -#else +#if !MONOMAC delegate void PHImageDataHandler (NSData data, NSString dataUti, UIImageOrientation orientation, NSDictionary info); #endif @@ -976,7 +944,7 @@ interface PHCachingImageManager { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // doc -> "abstract base class" // throws "NSInternalInconsistencyException Reason: PHObject has no identifier" @@ -999,7 +967,7 @@ interface PHObjectPlaceholder { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [Protocol] [Model] [BaseType (typeof (NSObject))] @@ -1016,7 +984,7 @@ interface PHPhotoLibraryChangeObserver { [iOS (8,0)] [TV (10,0)] - [Mac (10,13, onlyOn64 : true)] + [NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSInternalInconsistencyException Reason: -[PHPhotoLibrary init] unsupported interface PHPhotoLibrary { @@ -1046,19 +1014,6 @@ interface PHPhotoLibrary { void UnregisterChangeObserver ([Protocolize] PHPhotoLibraryChangeObserver observer); } - [Mac (10,13, onlyOn64 : true)] - [NoTV][NoiOS] - [Category] - [BaseType (typeof (PHPhotoLibrary))] - interface PHPhotoLibrary_CloudIdentifiers { - - [Export ("localIdentifiersForCloudIdentifiers:")] - string[] GetLocalIdentifiers (PHCloudIdentifier[] cloudIdentifiers); - - [Export ("cloudIdentifiersForLocalIdentifiers:")] - PHCloudIdentifier[] GetCloudIdentifiers (string[] localIdentifiers); - } - [iOS (9,1)] [TV (10,0)] #if MONOMAC @@ -1149,46 +1104,14 @@ interface PHLivePhotoEditingContext { [Export ("orientation")] CGImagePropertyOrientation Orientation { get; } - [Internal] - [Export ("prepareLivePhotoForPlaybackWithTargetSize:options:completionHandler:")] - void _PrepareLivePhotoForPlayback (CGSize targetSize, [NullAllowed] NSDictionary options, Action handler); - - [Async] - [Wrap ("_PrepareLivePhotoForPlayback (targetSize, null, handler)")] - void PrepareLivePhotoForPlayback (CGSize targetSize, Action handler); - [Async] - [Wrap ("_PrepareLivePhotoForPlayback (targetSize, (NSDictionary)options, handler)", IsVirtual = true)] + [Export ("prepareLivePhotoForPlaybackWithTargetSize:options:completionHandler:")] void PrepareLivePhotoForPlayback (CGSize targetSize, [NullAllowed] NSDictionary options, Action handler); -#if XAMCORE_2_0 - // the API existed earlier but the key needed to create the strong dictionary did not work - [iOS (11,0)][TV (11,0)][Mac (10,12, onlyOn64 : true)] [Async] - [Wrap ("_PrepareLivePhotoForPlayback (targetSize, options?.Dictionary, handler)")] - void PrepareLivePhotoForPlayback (CGSize targetSize, [NullAllowed] PHLivePhotoEditingOption options, Action handler); -#endif - - [Internal] [Export ("saveLivePhotoToOutput:options:completionHandler:")] - void _SaveLivePhoto (PHContentEditingOutput output, [NullAllowed] NSDictionary options, Action handler); - - [Async] - [Wrap ("_SaveLivePhoto (output, null, handler)")] - void SaveLivePhoto (PHContentEditingOutput output, Action handler); - - [Async] - [Wrap ("_SaveLivePhoto (output, options, handler)", IsVirtual = true)] void SaveLivePhoto (PHContentEditingOutput output, [NullAllowed] NSDictionary options, Action handler); -#if XAMCORE_2_0 - // the API existed earlier but the key needed to create the strong dictionary did not work - [iOS (11,0)][TV (11,0)][Mac (10,12, onlyOn64 : true)] - [Async] - [Wrap ("_SaveLivePhoto (output, options?.Dictionary, handler)")] - void SaveLivePhoto (PHContentEditingOutput output, [NullAllowed] PHLivePhotoEditingOption options, Action handler); -#endif - [Export ("cancel")] void Cancel (); } @@ -1217,66 +1140,16 @@ interface PHLivePhotoFrame { nfloat RenderScale { get; } } -#if XAMCORE_2_0 // fails to build with mac/classic - [iOS (11,0)] - [TV (11,0)] - [Mac (10,12, onlyOn64 : true)] - [Static][Internal] - interface PHLivePhotoEditingOptionKeys { - [Field ("PHLivePhotoShouldRenderAtPlaybackTime")] - NSString ShouldRenderAtPlaybackTimeKey { get; } - } - - [iOS (11,0)] - [TV (11,0)] + // TODO returns null on Xcode 8 beta 1-6, rdar #28169810 https://trello.com/c/RwXK6YRX + // PHLivePhotoEditingContext.PrepareLivePhotoForPlayback and SaveLivePhoto could use a strong dictionary once it's available +#if false + [iOS (10,0)] + [TV (10,0)] [Mac (10,12, onlyOn64 : true)] - [StrongDictionary ("PHLivePhotoEditingOptionKeys")] + [Static] interface PHLivePhotoEditingOption { - bool ShouldRenderAtPlaybackTime { get; } + [Field ("PHLivePhotoShouldRenderAtPlaybackTime")] + NSString ShouldRenderAtPlaybackTime { get; } } #endif - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [BaseType (typeof (PHAssetCollection))] - interface PHProject { - - [Export ("projectExtensionData")] - NSData ProjectExtensionData { get; } - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [BaseType (typeof (NSObject))] - interface PHProjectChangeRequest { - - [Export ("initWithProject:")] - IntPtr Constructor (PHProject project); - - [Export ("title")] - string Title { get; set; } - - [Export ("projectExtensionData", ArgumentSemantic.Copy)] - NSData ProjectExtensionData { get; set; } - - [Export ("setKeyAsset:")] - void SetKeyAsset ([NullAllowed] PHAsset keyAsset); - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface PHCloudIdentifier : NSSecureCoding { - - [Static] - [Export ("notFoundIdentifier")] - PHCloudIdentifier NotFoundIdentifier { get; } - - [Export ("stringValue")] - string StringValue { get; } - - [Export ("initWithStringValue:")] - IntPtr Constructor (string stringValue); - } } diff --git a/src/photosui.cs b/src/photosui.cs index 827cbe838c3..4543c133ae1 100644 --- a/src/photosui.cs +++ b/src/photosui.cs @@ -1,21 +1,16 @@ using XamCore.CoreGraphics; using XamCore.ObjCRuntime; using XamCore.Foundation; -#if !MONOMAC using XamCore.UIKit; -#else -using XamCore.AppKit; -using UIImage = XamCore.AppKit.NSImage; -#endif using XamCore.Photos; using System; -namespace XamCore.PhotosUI { +namespace XamCore.PhotosUI +{ [NoTV] - [iOS (8, 0)] - [Mac (10, 13, onlyOn64: true)] + [iOS (8,0)] [Protocol] -#if !XAMCORE_4_0 && !TVOS && !MONOMAC +#if !XAMCORE_4_0 && !TVOS // According to documentation you're supposed to implement this protocol in a UIViewController subclass, // which means a model (which does not inherit from UIViewController) is not useful. [Model] @@ -44,7 +39,6 @@ interface PHContentEditingController { bool ShouldShowCancelConfirmation { get; } } -#if !MONOMAC [TV (10,0)] [iOS (9,1)] [BaseType (typeof (UIView))] @@ -83,7 +77,7 @@ interface PHLivePhotoView { } [TV (10,0)] - [iOS (9,1)][NoMac] + [iOS (9,1)] [Protocol, Model] [BaseType (typeof (NSObject))] interface PHLivePhotoViewDelegate { @@ -93,206 +87,4 @@ interface PHLivePhotoViewDelegate { [Export ("livePhotoView:didEndPlaybackWithStyle:")] void DidEndPlayback (PHLivePhotoView livePhotoView, PHLivePhotoViewPlaybackStyle playbackStyle); } -#endif - - [Mac (10,13, onlyOn64: true)][NoiOS][NoTV][NoWatch] - [Static] - interface PHProjectType { - [Field ("PHProjectTypeUndefined")] - NSString Undefined { get; } - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [DisableDefaultCtor] - [BaseType (typeof (NSExtensionContext))] - interface PHProjectExtensionContext : NSSecureCoding, NSCopying { - - [Export ("photoLibrary")] - PHPhotoLibrary PhotoLibrary { get; } - - [Export ("project")] - PHProject Project { get; } - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [DisableDefaultCtor] - [BaseType (typeof (PHProjectElement))] - interface PHProjectJournalEntryElement : NSSecureCoding { - - [Export ("date")] - NSDate Date { get; } - - [NullAllowed, Export ("assetElement")] - PHProjectAssetElement AssetElement { get; } - - [NullAllowed, Export ("textElement")] - PHProjectTextElement TextElement { get; } - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [DisableDefaultCtor] - [BaseType (typeof (PHProjectElement))] - interface PHProjectTextElement : NSSecureCoding { - - [Export ("text")] - string Text { get; } - - [NullAllowed, Export ("attributedText")] - NSAttributedString AttributedText { get; } - - [Export ("textElementType")] - PHProjectTextElementType TextElementType { get; } - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [Protocol] - interface PHProjectExtensionController { - - [Export ("supportedProjectTypes", ArgumentSemantic.Copy)] - PHProjectTypeDescription [] GetSupportedProjectTypes (); - - [Abstract] - [Export ("beginProjectWithExtensionContext:projectInfo:completion:")] - void BeginProject (PHProjectExtensionContext extensionContext, PHProjectInfo projectInfo, Action completion); - - [Abstract] - [Export ("resumeProjectWithExtensionContext:completion:")] - void ResumeProject (PHProjectExtensionContext extensionContext, Action completion); - - [Abstract] - [Export ("finishProjectWithCompletionHandler:")] - void FinishProject (Action completion); - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface PHProjectTypeDescription : NSSecureCoding { - - [Export ("projectType")] - NSString ProjectType { get; } - - [Export ("localizedTitle")] - string LocalizedTitle { get; } - - [NullAllowed, Export ("localizedDescription")] - string LocalizedDescription { get; } - - [NullAllowed, Export ("image", ArgumentSemantic.Copy)] - UIImage Image { get; } - - [Export ("subtypeDescriptions", ArgumentSemantic.Copy)] - PHProjectTypeDescription[] SubtypeDescriptions { get; } - - [Export ("initWithProjectType:title:description:image:subtypeDescriptions:")] - [DesignatedInitializer] - IntPtr Constructor (NSString projectType, string localizedTitle, [NullAllowed] string localizedDescription, [NullAllowed] UIImage image, PHProjectTypeDescription[] subtypeDescriptions); - - [Export ("initWithProjectType:title:description:image:")] - IntPtr Constructor (NSString projectType, string localizedTitle, [NullAllowed] string localizedDescription, [NullAllowed] UIImage image); - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface PHProjectRegionOfInterest : NSSecureCoding { - - [Export ("rect")] - CGRect Rect { get; } - - [Export ("weight")] - double Weight { get; } - - [Export ("identifier")] - string Identifier { get; } - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface PHProjectElement : NSSecureCoding { - - [Export ("weight")] - double Weight { get; } - - [Export ("placement")] - CGRect Placement { get; } - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [DisableDefaultCtor] - [BaseType (typeof (PHProjectElement))] - interface PHProjectAssetElement : NSSecureCoding { - - [Export ("cloudAssetIdentifier")] - PHCloudIdentifier CloudAssetIdentifier { get; } - - [Export ("annotation")] - string Annotation { get; } - - [Export ("cropRect")] - CGRect CropRect { get; } - - [Export ("regionsOfInterest")] - PHProjectRegionOfInterest[] RegionsOfInterest { get; } - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface PHProjectInfo : NSSecureCoding { - - [Export ("creationSource")] - PHProjectCreationSource CreationSource { get; } - - [Export ("projectType")] - NSString ProjectType { get; } - - [Export ("sections")] - PHProjectSection[] Sections { get; } - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface PHProjectSection : NSSecureCoding { - - [Export ("sectionContents")] - PHProjectSectionContent[] SectionContents { get; } - - [Export ("sectionType")] - PHProjectSectionType SectionType { get; } - - [Export ("title")] - string Title { get; } - } - - [Mac (10,13, onlyOn64 : true)] - [NoiOS][NoTV] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface PHProjectSectionContent : NSSecureCoding { - - [Export ("elements")] - PHProjectElement[] Elements { get; } - - [Export ("numberOfColumns")] - nint NumberOfColumns { get; } - - [Export ("aspectRatio")] - double AspectRatio { get; } - - [Export ("cloudAssetIdentifiers")] - PHCloudIdentifier[] CloudAssetIdentifiers { get; } - } } \ No newline at end of file diff --git a/src/pushkit.cs b/src/pushkit.cs index 137569d5c71..fd706022b89 100644 --- a/src/pushkit.cs +++ b/src/pushkit.cs @@ -59,10 +59,6 @@ interface PKPushType { [iOS (9,0)] [Field ("PKPushTypeComplication")] NSString Complication { get; } - - [iOS (11,0)] - [Field ("PKPushTypeFileProvider")] - NSString FileProvider { get; } } [iOS (8,0)] @@ -74,15 +70,10 @@ interface PKPushRegistryDelegate { [Export ("pushRegistry:didUpdatePushCredentials:forType:"), EventArgs ("PKPushRegistryUpdated"), EventName ("CredentialsUpdated")] void DidUpdatePushCredentials (PKPushRegistry registry, PKPushCredentials credentials, string type); - [Abstract] // now optional in iOS 11 - [Deprecated (PlatformName.iOS, 11,0, message: "Use the 'DidReceiveIncomingPushWithPayload' overload accepting an 'Action' argument instead.")] + [Abstract] [Export ("pushRegistry:didReceiveIncomingPushWithPayload:forType:"), EventArgs ("PKPushRegistryRecieved"), EventName ("IncomingPushReceived")] void DidReceiveIncomingPush (PKPushRegistry registry, PKPushPayload payload, string type); - [iOS (11,0)] - [Export ("pushRegistry:didReceiveIncomingPushWithPayload:forType:withCompletionHandler:")] - void DidReceiveIncomingPush (PKPushRegistry registry, PKPushPayload payload, string type, Action completion); - [Export ("pushRegistry:didInvalidatePushTokenForType:"), EventArgs ("PKPushRegistryRecieved"), EventName ("PushTokenInvalidated")] void DidInvalidatePushToken (PKPushRegistry registry, string type); } diff --git a/src/quicklook.cs b/src/quicklook.cs index 83855fed435..c0fdec95375 100644 --- a/src/quicklook.cs +++ b/src/quicklook.cs @@ -143,56 +143,6 @@ interface QLPreviewItem { [Export ("previewItemTitle")] string ItemTitle { get; } } - - [iOS (11,0)] - [Protocol] - interface QLPreviewingController { - [Export ("preparePreviewOfSearchableItemWithIdentifier:queryString:completionHandler:")] - void PreparePreviewOfSearchableItem (string identifier, [NullAllowed] string queryString, Action handler); - - [Export ("preparePreviewOfFileAtURL:completionHandler:")] - void PreparePreviewOfFile (NSUrl url, Action handler); - } - - [iOS (11,0)] - [BaseType (typeof (NSObject))] - interface QLThumbnailProvider { - [Export ("provideThumbnailForFileRequest:completionHandler:")] - void ProvideThumbnail (QLFileThumbnailRequest request, Action handler); - } - - [iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface QLThumbnailReply { - [Static] - [Export ("replyWithContextSize:drawingBlock:")] - QLThumbnailReply CreateReply (CGSize contextSize, Func drawingBlock); - - [Static] - [Export ("replyWithContextSize:currentContextDrawingBlock:")] - QLThumbnailReply CreateReply (CGSize contextSize, Func drawingBlock); - - [Static] - [Export ("replyWithImageFileURL:")] - QLThumbnailReply CreateReply (NSUrl fileUrl); - } - - [iOS (11,0)] - [BaseType (typeof (NSObject))] - interface QLFileThumbnailRequest { - [Export ("maximumSize")] - CGSize MaximumSize { get; } - - [Export ("minimumSize")] - CGSize MinimumSize { get; } - - [Export ("scale")] - nfloat Scale { get; } - - [Export ("fileURL", ArgumentSemantic.Copy)] - NSUrl FileUrl { get; } - } #else [Static] interface QLThumbnailImage { diff --git a/src/replaykit.cs b/src/replaykit.cs index de08e5e63bb..404351e6a04 100644 --- a/src/replaykit.cs +++ b/src/replaykit.cs @@ -61,7 +61,7 @@ interface RPScreenRecorder { [Export ("sharedRecorder")] RPScreenRecorder SharedRecorder { get; } - [Availability (Deprecated = Platform.iOS_10_0, Message = "Use 'StartRecording (Action)' instead.")] + [Availability (Deprecated = Platform.iOS_10_0, Message = "Use StartRecording(Action)")] [Async] [Export ("startRecordingWithMicrophoneEnabled:handler:")] void StartRecording (bool microphoneEnabled, [NullAllowed] Action handler); @@ -102,20 +102,6 @@ bool MicrophoneEnabled { [NoTV, iOS (10,0)] [NullAllowed, Export ("cameraPreviewView")] UIView CameraPreviewView { get; } - - [NoTV][iOS (11,0)] - [Export ("cameraPosition", ArgumentSemantic.Assign)] - RPCameraPosition CameraPosition { get; set; } - - [TV (11,0)][iOS (11,0)] - [Async] - [Export ("startCaptureWithHandler:completionHandler:")] - void StartCapture ([NullAllowed] Action captureHandler, [NullAllowed] Action completionHandler); - - [TV (11,0), iOS (11,0)] - [Async] - [Export ("stopCaptureWithHandler:")] - void StopCapture ([NullAllowed] Action handler); } interface IRPScreenRecorderDelegate { } @@ -126,15 +112,9 @@ interface IRPScreenRecorderDelegate { } [BaseType (typeof (NSObject))] interface RPScreenRecorderDelegate { - [Deprecated (PlatformName.TvOS, 11,0, message: "Use 'DidStopRecording(RPScreenRecorder,RPPreviewViewController,NSError)' instead.")] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'DidStopRecording(RPScreenRecorder,RPPreviewViewController,NSError)' instead.")] [Export ("screenRecorder:didStopRecordingWithError:previewViewController:")] void DidStopRecording (RPScreenRecorder screenRecorder, NSError error, [NullAllowed] RPPreviewViewController previewViewController); - [TV (11,0)][iOS (11,0)] - [Export ("screenRecorder:didStopRecordingWithPreviewViewController:error:")] - void DidStopRecording (RPScreenRecorder screenRecorder, [NullAllowed] RPPreviewViewController previewViewController, [NullAllowed] NSError error); - [Export ("screenRecorderDidChangeAvailability:")] void DidChangeAvailability (RPScreenRecorder screenRecorder); } @@ -155,13 +135,6 @@ interface RPBroadcastActivityViewController { [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] IRPBroadcastActivityViewControllerDelegate Delegate { get; set; } - - [iOS (11,0)] - [NoTV] - [Static] - [Async] - [Export ("loadBroadcastActivityViewControllerWithPreferredExtension:handler:")] - void LoadBroadcastActivityViewController ([NullAllowed] string preferredExtension, Action handler); } interface IRPBroadcastActivityViewControllerDelegate {} @@ -195,8 +168,6 @@ interface RPBroadcastController { [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] IRPBroadcastControllerDelegate Delegate { get; set; } - [Deprecated (PlatformName.TvOS, 11,0)] - [Deprecated (PlatformName.iOS, 11,0)] [Export ("broadcastExtensionBundleID")] string BroadcastExtensionBundleID { get; } @@ -227,16 +198,10 @@ interface RPBroadcastControllerDelegate { [Export ("broadcastController:didUpdateServiceInfo:")] void DidUpdateServiceInfo (RPBroadcastController broadcastController, NSDictionary serviceInfo); - - [TV (11,0), iOS (11,0)] - [Export ("broadcastController:didUpdateBroadcastURL:")] - void DidUpdateBroadcastUrl (RPBroadcastController broadcastController, NSUrl broadcastUrl); } [iOS (10,0)] [TV (10,0)] - [Deprecated (PlatformName.TvOS, 11,0)] - [Deprecated (PlatformName.iOS, 11,0)] [BaseType (typeof (NSObject))] interface RPBroadcastConfiguration : NSCoding, NSSecureCoding { [Export ("clipDuration")] @@ -256,14 +221,8 @@ interface NSExtensionContext_RPBroadcastExtension { [Export ("loadBroadcastingApplicationInfoWithCompletion:")] void LoadBroadcastingApplicationInfo (LoadBroadcastingHandler handler); - [Deprecated (PlatformName.TvOS, 11,0, message: "Use 'CompleteRequest(NSUrl,NSDictionary)' instead.")] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'CompleteRequest(NSUrl,NSDictionary)' instead.")] [Export ("completeRequestWithBroadcastURL:broadcastConfiguration:setupInfo:")] void CompleteRequest (NSUrl broadcastURL, RPBroadcastConfiguration broadcastConfiguration, [NullAllowed] NSDictionary setupInfo); - - [TV (11,0)][iOS (11,0)] - [Export ("completeRequestWithBroadcastURL:setupInfo:")] - void CompleteRequest (NSUrl broadcastURL, [NullAllowed] NSDictionary setupInfo); } [iOS (10,0)] @@ -272,18 +231,10 @@ interface NSExtensionContext_RPBroadcastExtension { interface RPBroadcastHandler : NSExtensionRequestHandling { [Export ("updateServiceInfo:")] void UpdateServiceInfo (NSDictionary serviceInfo); - - // NSInvalidArgumentException -[RPBroadcastHandler updateBroadcastURL:]: unrecognized selector sent to instance 0x608001a4b160 - // https://trello.com/c/eA440suj/91-33875315-rpbroadcasthandler-updatebroadcasturl-unrecognized-selector - //[TV (11,0)][iOS (11,0)] - //[Export ("updateBroadcastURL:")] - //void UpdateBroadcastUrl (NSUrl broadcastUrl); } [iOS (10,0)] [TV (10,0)] - [Deprecated (PlatformName.TvOS, 11,0, message: "Use 'RPBroadcastSampleHandler' instead.")] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'RPBroadcastSampleHandler' instead.")] [BaseType (typeof (RPBroadcastHandler))] interface RPBroadcastMP4ClipHandler { [Export ("processMP4ClipWithURL:setupInfo:finished:")] diff --git a/src/safariservices.cs b/src/safariservices.cs index 838e791d367..66cc5d49eae 100644 --- a/src/safariservices.cs +++ b/src/safariservices.cs @@ -59,10 +59,8 @@ partial interface SSReadingList { [Export ("addReadingListItemWithURL:title:previewText:error:")] bool Add (NSUrl url, [NullAllowed] string title, [NullAllowed] string previewText, out NSError error); -#if !XAMCORE_4_0 [Field ("SSReadingListErrorDomain")] NSString ErrorDomain { get; } -#endif } [iOS (9,0)] @@ -73,12 +71,6 @@ interface SFSafariViewController { [PostGet ("NibBundle")] IntPtr Constructor ([NullAllowed] string nibName, [NullAllowed] NSBundle bundle); - [iOS (11,0)] - [Export ("initWithURL:configuration:")] - [DesignatedInitializer] - IntPtr Constructor (NSUrl url, SFSafariViewControllerConfiguration configuration); - - [Deprecated (PlatformName.iOS, 11,0, message: "Use '.ctor (NSUrl, SFSafariViewControllerConfiguration)' instead.")] [DesignatedInitializer] [Export ("initWithURL:entersReaderIfAvailable:")] IntPtr Constructor (NSUrl url, bool entersReaderIfAvailable); @@ -95,22 +87,12 @@ interface SFSafariViewController { SFSafariViewControllerDelegate Delegate { get; set; } [iOS (10, 0)] - [NullAllowed] [Export ("preferredBarTintColor", ArgumentSemantic.Assign)] UIColor PreferredBarTintColor { get; set; } [iOS (10, 0)] - [NullAllowed] [Export ("preferredControlTintColor", ArgumentSemantic.Assign)] UIColor PreferredControlTintColor { get; set; } - - [iOS (11,0)] - [Export ("configuration", ArgumentSemantic.Copy)] - SFSafariViewControllerConfiguration Configuration { get; } - - [iOS (11,0)] - [Export ("dismissButtonStyle", ArgumentSemantic.Assign)] - SFSafariViewControllerDismissButtonStyle DismissButtonStyle { get; set; } } [iOS (9,0)] @@ -126,41 +108,6 @@ partial interface SFSafariViewControllerDelegate { [Export ("safariViewController:didCompleteInitialLoad:")] void DidCompleteInitialLoad (SFSafariViewController controller, bool didLoadSuccessfully); - - [iOS (11,0)] - [Export ("safariViewController:excludedActivityTypesForURL:title:")] - string[] GetExcludedActivityTypes (SFSafariViewController controller, NSUrl url, [NullAllowed] string title); - - [iOS (11,0)] - [Export ("safariViewController:initialLoadDidRedirectToURL:")] - void InitialLoadDidRedirectToUrl (SFSafariViewController controller, NSUrl url); - } - - [iOS (11,0)] - [BaseType (typeof (NSObject))] - interface SFSafariViewControllerConfiguration : NSCopying { - [Export ("entersReaderIfAvailable")] - bool EntersReaderIfAvailable { get; set; } - - [Export ("barCollapsingEnabled")] - bool BarCollapsingEnabled { get; set; } - } - - [iOS (11,0)] - delegate void SFAuthenticationCompletionHandler ([NullAllowed] NSUrl callbackUrl, [NullAllowed] NSError error); - - [iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface SFAuthenticationSession { - [Export ("initWithURL:callbackURLScheme:completionHandler:")] - IntPtr Constructor (NSUrl url, [NullAllowed] string callbackUrlScheme, SFAuthenticationCompletionHandler completionHandler); - - [Export ("start")] - bool Start (); - - [Export ("cancel")] - void Cancel (); } #else [Mac (10,12, onlyOn64: true)] @@ -184,17 +131,10 @@ interface SFSafariApplication [Export ("showPreferencesForExtensionWithIdentifier:completionHandler:")] void ShowPreferencesForExtension (string identifier, [NullAllowed] Action completionHandler); - [Mac (10,12,4, onlyOn64 : true)] - [Advice ("Unavailable to extensions")] + [Mac (10, 12, 4)] [Static][Async] [Export ("dispatchMessageWithName:toExtensionWithIdentifier:userInfo:completionHandler:")] void DispatchMessage (string messageName, string identifier, [NullAllowed] NSDictionary userInfo, [NullAllowed] Action completionHandler); - - [Mac (10,13, onlyOn64 : true)] - [Static] - [Async] - [Export ("getHostApplicationWithCompletionHandler:")] - void GetHostApplication (Action completionHandler); } [Mac (10,12, onlyOn64 : true)] @@ -288,25 +228,20 @@ interface SFSafariTab [DisableDefaultCtor] interface SFSafariToolbarItem { - [Deprecated (PlatformName.MacOSX, 10,13, message: "Use 'SetEnabled (bool)' or 'SetBadgeText' instead.")] [Export ("setEnabled:withBadgeText:")] void SetEnabled (bool enabled, [NullAllowed] string badgeText); - [Mac (10,12,4, onlyOn64: true)] + [Mac (10, 12, 4)] [Export ("setEnabled:")] void SetEnabled (bool enabled); - [Mac (10,12,4, onlyOn64: true)] + [Mac (10, 12, 4)] [Export ("setBadgeText:")] void SetBadgeText ([NullAllowed] string badgeText); - [Mac (10,12,4, onlyOn64: true)] + [Mac (10, 12, 4)] [Export ("setImage:")] void SetImage ([NullAllowed] NSImage image); - - [Mac (10,13, onlyOn64: true)] - [Export ("setLabel:")] - void SetLabel ([NullAllowed] string label); } [Mac (10,12, onlyOn64: true)] diff --git a/src/scenekit.cs b/src/scenekit.cs index 6fbf2efcc79..6d0c3d20e64 100644 --- a/src/scenekit.cs +++ b/src/scenekit.cs @@ -53,7 +53,6 @@ using GLContext = global::XamCore.OpenGL.CGLContext; #else -using XamCore.UIKit; #if WATCH using GLContext = global::XamCore.Foundation.NSObject; // won't be used -> [NoWatch] but must compile @@ -99,9 +98,6 @@ interface MTLRenderPassDescriptor {} [Mac (10,8), iOS (8,0)] delegate void SCNSceneSourceStatusHandler (float /* float, not CGFloat */ totalProgress, SCNSceneSourceStatus status, NSError error, ref bool stopLoading); - delegate void SCNAnimationDidStartHandler (SCNAnimation animation, SCNAnimatable receiver); - delegate void SCNAnimationDidStopHandler (SCNAnimation animation, SCNAnimatable receiver, bool completed); - [Watch (3,0)] [Mac (10,8), iOS (8,0)] [Model, Protocol] @@ -156,14 +152,7 @@ interface SCNAnimatable { #if XAMCORE_2_0 [Abstract] #endif - [Introduced (PlatformName.WatchOS, 3, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SCNAnimationPlayer.Paused' instead.")] - [Introduced (PlatformName.TvOS, 9, 0)] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'SCNAnimationPlayer.Paused' instead.")] - [Introduced (PlatformName.iOS, 8, 0)] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SCNAnimationPlayer.Paused' instead.")] - [Introduced (PlatformName.MacOSX, 10, 9)] - [Deprecated (PlatformName.MacOSX, 10, 13,message: "Use 'SCNAnimationPlayer.Paused' instead.")] + [Mac (10,9)] [Export ("isAnimationForKeyPaused:")] bool IsAnimationPaused (NSString key); @@ -318,17 +307,9 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod [Export ("name", ArgumentSemantic.Copy)] string Name { get; set; } - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'FieldOfView' or 'FocalLength' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FieldOfView' or 'FocalLength' instead.")] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'FieldOfView' or 'FocalLength' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'FieldOfView' or 'FocalLength' instead.")] [Export ("xFov")] double XFov { get; set; } - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'FieldOfView' or 'FocalLength' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FieldOfView' or 'FocalLength' instead.")] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'FieldOfView' or 'FocalLength' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'FieldOfView' or 'FocalLength' instead.")] [Export ("yFov")] double YFov { get; set; } @@ -356,34 +337,18 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod [Export ("orthographicScale")] double OrthographicScale { get; set; } - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'FocusDistance' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FocusDistance' instead.")] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'FocusDistance' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'FocusDistance' instead.")] [iOS (8,0)][Mac (10,9)] [Export ("focalDistance")] nfloat FocalDistance { get; set; } - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'FocusDistance' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FocusDistance' instead.")] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'FocusDistance' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'FocusDistance' instead.")] [iOS (8,0)][Mac (10,9)] [Export ("focalSize")] nfloat FocalSize { get; set; } - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'FStop' instead.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FStop' instead.")] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'FStop' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'FStop' instead.")] [iOS (8,0)][Mac (10,9)] [Export ("focalBlurRadius")] nfloat FocalBlurRadius { get; set; } - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'FStop' instead with FStop = SensorHeight / Aperture.")] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FStop' instead with FStop = SensorHeight / Aperture.")] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'FStop' instead with FStop = SensorHeight / Aperture.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'FStop' instead with FStop = SensorHeight / Aperture.")] [iOS (8,0)][Mac (10,9)] [Export ("aperture")] nfloat Aperture { get; set; } @@ -478,195 +443,9 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod [Static] [Export ("cameraWithMDLCamera:")] SCNCamera FromModelCamera (MDLCamera modelCamera); - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("fieldOfView")] - nfloat FieldOfView { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("projectionDirection", ArgumentSemantic.Assign)] - SCNCameraProjectionDirection ProjectionDirection { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("focalLength")] - nfloat FocalLength { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("sensorHeight")] - nfloat SensorHeight { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("wantsDepthOfField")] - bool WantsDepthOfField { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("focusDistance")] - nfloat FocusDistance { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("focalBlurSampleCount")] - nint FocalBlurSampleCount { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("fStop")] - nfloat FStop { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("apertureBladeCount")] - nint ApertureBladeCount { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("screenSpaceAmbientOcclusionIntensity")] - nfloat ScreenSpaceAmbientOcclusionIntensity { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("screenSpaceAmbientOcclusionRadius")] - nfloat ScreenSpaceAmbientOcclusionRadius { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("screenSpaceAmbientOcclusionBias")] - nfloat ScreenSpaceAmbientOcclusionBias { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("screenSpaceAmbientOcclusionDepthThreshold")] - nfloat ScreenSpaceAmbientOcclusionDepthThreshold { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("screenSpaceAmbientOcclusionNormalThreshold")] - nfloat ScreenSpaceAmbientOcclusionNormalThreshold { get; set; } - #endif } - interface ISCNCameraControlConfiguration {} - - [NoWatch] - [TV (11,0), Mac (10,13), iOS (11,0)] - [Protocol] - interface SCNCameraControlConfiguration - { - [Abstract] - [Export ("autoSwitchToFreeCamera")] - bool AutoSwitchToFreeCamera { get; set; } - - [Abstract] - [Export ("allowsTranslation")] - bool AllowsTranslation { get; set; } - - [Abstract] - [Export ("flyModeVelocity")] - nfloat FlyModeVelocity { get; set; } - - [Abstract] - [Export ("panSensitivity")] - nfloat PanSensitivity { get; set; } - - [Abstract] - [Export ("truckSensitivity")] - nfloat TruckSensitivity { get; set; } - - [Abstract] - [Export ("rotationSensitivity")] - nfloat RotationSensitivity { get; set; } - } - - interface ISCNCameraControllerDelegate {} - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Protocol] - [Model] // Figured I would keep the model for convenience, as all the methods here are optional - [BaseType (typeof(NSObject))] - interface SCNCameraControllerDelegate - { - [Export ("cameraInertiaWillStartForController:")] - void CameraInertiaWillStart (SCNCameraController cameraController); - - [Export ("cameraInertiaDidEndForController:")] - void CameraInertiaDidEnd (SCNCameraController cameraController); - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface SCNCameraController - { - [Export ("delegate", ArgumentSemantic.Assign)] - [NullAllowed] - [Protocolize] - SCNCameraControllerDelegate Delegate { get; set; } - - [NullAllowed, Export ("pointOfView", ArgumentSemantic.Retain)] - SCNNode PointOfView { get; set; } - - [Export ("interactionMode", ArgumentSemantic.Assign)] - SCNInteractionMode InteractionMode { get; set; } - - [Export ("target", ArgumentSemantic.Assign)] - SCNVector3 Target { get; set; } - - [Export ("automaticTarget")] - bool AutomaticTarget { get; set; } - - [Export ("worldUp", ArgumentSemantic.Assign)] - SCNVector3 WorldUp { get; set; } - - [Export ("inertiaEnabled")] - bool InertiaEnabled { get; set; } - - [Export ("inertiaFriction")] - float InertiaFriction { get; set; } - - [Export ("inertiaRunning")] - bool InertiaRunning { [Bind ("isInertiaRunning")] get; } - - [Export ("minimumVerticalAngle")] - float MinimumVerticalAngle { get; set; } - - [Export ("maximumVerticalAngle")] - float MaximumVerticalAngle { get; set; } - - [Export ("minimumHorizontalAngle")] - float MinimumHorizontalAngle { get; set; } - - [Export ("maximumHorizontalAngle")] - float MaximumHorizontalAngle { get; set; } - - [Export ("translateInCameraSpaceByX:Y:Z:")] - void TranslateInCameraSpace (float deltaX, float deltaY, float deltaZ); - - [Export ("frameNodes:")] - void FrameNodes (SCNNode[] nodes); - - [Export ("rotateByX:Y:")] - void Rotate (float deltaX, float deltaY); - - [Export ("rollBy:aroundScreenPoint:viewport:")] - void Roll (float delta, CGPoint screenPoint, CGSize viewport); - - [Export ("dollyBy:onScreenPoint:viewport:")] - void Dolly (float delta, CGPoint screenPoint, CGSize viewport); - - [Export ("rollAroundTarget:")] - void RollAroundTarget (float delta); - - [Export ("dollyToTarget:")] - void DollyToTarget (float delta); - - [Export ("clearRoll")] - void ClearRoll (); - - [Export ("stopInertia")] - void StopInertia (); - - [Export ("beginInteraction:withViewport:")] - void BeginInteraction (CGPoint location, CGSize viewport); - - [Export ("continueInteraction:withViewport:sensitivity:")] - void ContinueInteraction (CGPoint location, CGSize viewport, nfloat sensitivity); - - [Export ("endInteraction:withViewport:velocity:")] - void EndInteraction (CGPoint location, CGSize viewport, CGPoint velocity); - } - [Watch (3,0)] [Mac (10,8), iOS (8,0)] [BaseType (typeof (SCNGeometry))] @@ -965,38 +744,6 @@ interface SCNGeometryElement : NSSecureCoding { #endif } -#if XAMCORE_2_0 && !WATCH - [NoWatch, NoTV, Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface SCNGeometryTessellator : NSCopying, NSSecureCoding - { - [Export ("tessellationFactorScale")] - nfloat TessellationFactorScale { get; set; } - - [Export ("tessellationPartitionMode", ArgumentSemantic.Assign)] - MTLTessellationPartitionMode TessellationPartitionMode { get; set; } - - [Export ("adaptive")] - bool Adaptive { [Bind ("isAdaptive")] get; set; } - - [Export ("screenSpace")] - bool ScreenSpace { [Bind ("isScreenSpace")] get; set; } - - [Export ("edgeTessellationFactor")] - nfloat EdgeTessellationFactor { get; set; } - - [Export ("insideTessellationFactor")] - nfloat InsideTessellationFactor { get; set; } - - [Export ("maximumEdgeLength")] - nfloat MaximumEdgeLength { get; set; } - - [Export ("smoothingMode", ArgumentSemantic.Assign)] - SCNTessellationSmoothingMode SmoothingMode { get; set; } - } -#endif - [Watch (3,0)] [Mac (10,8), iOS (8,0)] [Static] @@ -1035,10 +782,6 @@ interface SCNHitTest { [TV (10, 0), Mac (10, 12), iOS (10, 0)] [Field ("SCNHitTestOptionCategoryBitMask")] NSString OptionCategoryBitMaskKey { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Field ("SCNHitTestOptionSearchMode")] - NSString OptionSearchModeKey { get; } } [Watch (3,0)] @@ -1136,7 +879,7 @@ interface SCNLight : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCodi #if XAMCORE_3_0 [Availability (Unavailable = Platform.iOS_Version)] #elif !MONOMAC - [Obsolete ("Do not use; this method only exist in macOS, not in iOS.")] + [Obsolete ("Do not use; this method only exist in OSX, not in iOS")] #endif [NoTV] [Availability (Deprecated = Platform.Mac_10_10)] @@ -1146,7 +889,7 @@ interface SCNLight : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCodi #if XAMCORE_3_0 [Availability (Unavailable = Platform.iOS_Version)] #elif !MONOMAC - [Obsolete ("Do not use; this method only exist in macOS, not in iOS.")] + [Obsolete ("Do not use; this method only exist in OSX, not in iOS")] #endif [NoTV] [Availability (Deprecated = Platform.Mac_10_10)] @@ -1387,19 +1130,6 @@ interface SCNMaterial : SCNAnimatable, SCNShadable, NSCopying, NSSecureCoding { [Static] [Export ("materialWithMDLMaterial:")] SCNMaterial FromMaterial (MDLMaterial material); - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("displacement")] - SCNMaterialProperty Displacement { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("fillMode", ArgumentSemantic.Assign)] - SCNFillMode FillMode { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("colorBufferWriteMask", ArgumentSemantic.Assign)] - SCNColorMask ColorBufferWriteMask { get; set; } - #endif } @@ -1426,8 +1156,8 @@ interface SCNMaterialProperty : SCNAnimatable, NSSecureCoding { [Export ("wrapT")] SCNWrapMode WrapT { get; set; } - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] + [Deprecated (PlatformName.iOS, 10, 0, message: "Deprecated")] + [Deprecated (PlatformName.MacOSX, 10, 12, message: "Deprecated")] [NoWatch, NoTV] [NullAllowed, Export ("borderColor", ArgumentSemantic.Retain)] NSObject BorderColor { get; set; } @@ -1496,7 +1226,6 @@ interface SCNHitTestOptions { bool IgnoreChildNodes { get; set; } bool IgnoreHiddenNodes { get; set; } SCNNode RootNode { get; set; } - SCNHitTestSearchMode OptionSearchMode { get; } } [Watch (3,0)] @@ -1537,11 +1266,7 @@ interface SCNSceneLoadingOptions { [Watch (3,0)] [Mac (10,8), iOS (8,0)] [BaseType (typeof (NSObject))] - interface SCNNode : SCNAnimatable, SCNBoundingVolume, SCNActionable, NSCopying, NSSecureCoding -#if IOS || TVOS - , UIFocusItem -#endif - { + interface SCNNode : SCNAnimatable, SCNBoundingVolume, SCNActionable, NSCopying, NSSecureCoding { [Export ("transform")] SCNMatrix4 Transform { get; set; } @@ -1904,7 +1629,7 @@ interface SCNProgramDelegate { [Availability (Unavailable = Platform.iOS_Version)] [NoTV, NoWatch] #endif - [Availability (Deprecated = Platform.Mac_10_10, Message = "Use the SCNProgram's Opaque property instead.")] + [Availability (Deprecated = Platform.Mac_10_10, Message = "Use the SCNProgram's Opaque property instead")] [Export ("programIsOpaque:")] bool IsProgramOpaque (SCNProgram program); #endif @@ -1985,19 +1710,10 @@ interface SCNRenderer : SCNSceneRenderer, SCNTechniqueSupport { [iOS (9,0)][Mac (10,11)] [Export ("renderAtTime:viewport:commandBuffer:passDescriptor:")] void Render (double timeInSeconds, CGRect viewport, IMTLCommandBuffer commandBuffer, MTLRenderPassDescriptor renderPassDescriptor); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("renderWithViewport:commandBuffer:passDescriptor:")] - void Render (CGRect viewport, IMTLCommandBuffer commandBuffer, MTLRenderPassDescriptor renderPassDescriptor); #endif [TV (10, 0), Mac (10, 12), iOS (10, 0)] [Export ("updateProbes:atTime:")] void Update (SCNNode [] lightProbes, double time); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("updateAtTime:")] - void Update (double time); - } [Watch (3,0)] @@ -2283,14 +1999,14 @@ interface SCNSceneSourceLoading { NSString UseSafeModeKey { get; } [Mac(10,10)] - [iOS (8,0)] // header said NA and docs says "Available in iOS 8.0 through iOS 8.2." but it's back on iOS11 - [TV (11,0), Watch (4,0)] + [Availability (Deprecated = Platform.iOS_8_3)] // header says NA and docs says "Available in iOS 8.0 through iOS 8.2." + [NoTV, NoWatch] [Field ("SCNSceneSourceConvertUnitsToMetersKey")] NSString ConvertUnitsToMetersKey { get; } [Mac(10,10)] - [iOS (8,0)] // header said NA and docs says "Available in iOS 8.0 through iOS 8.2." but it's back on iOS11 - [TV (11,0), Watch (4,0)] + [Availability (Deprecated = Platform.iOS_8_3)] // header says NA and docs says "Available in iOS 8.0 through iOS 8.2." + [NoTV, NoWatch] [Field ("SCNSceneSourceConvertToYUpKey")] NSString ConvertToYUpKey { get; } @@ -2368,8 +2084,6 @@ interface SCNSceneSourceProperties { NSString AssetUnitMeterKey { get; } } - interface ISCNSceneRenderer {} - [Watch (3,0)] [Mac (10,8), iOS (8,0)] [Protocol, Model] @@ -2631,11 +2345,6 @@ interface SCNSceneRendererDelegate { [Mac (10,10)] [Export ("renderer:didSimulatePhysicsAtTime:")] void DidSimulatePhysics ([Protocolize]SCNSceneRenderer renderer, double timeInSeconds); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Export ("renderer:didApplyConstraintsAtTime:")] - void DidApplyConstraints ([Protocolize] SCNSceneRenderer renderer, double atTime); - } [Watch (3,0)] @@ -2901,27 +2610,12 @@ interface SCNView : SCNSceneRenderer, SCNTechniqueSupport { [iOS (8,0)][Mac (10,10)] [Export ("antialiasingMode")] SCNAntialiasingMode AntialiasingMode { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("cameraControlConfiguration")] - ISCNCameraControlConfiguration CameraControlConfiguration { get; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("defaultCameraController")] - SCNCameraController DefaultCameraController { get; } - } -#if WATCH || XAMCORE_4_0 - [Watch (4,0)] - [Mac (10,9), iOS (8,0)] - delegate void SCNAnimationEventHandler (ISCNAnimationProtocol animation, NSObject animatedObject, bool playingBackward); -#else [Mac (10,9), iOS (8,0)] delegate void SCNAnimationEventHandler (CAAnimation animation, NSObject animatedObject, bool playingBackward); -#endif - [Watch (4,0)] + [NoWatch] [Mac (10,9), iOS (8,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -3019,16 +2713,6 @@ interface SCNConstraint : SCNAnimatable, NSCopying, NSSecureCoding { [Mac (10,10)] [Export ("influenceFactor")] nfloat InfluenceFactor { get; set; } - - [Mac (10, 10), iOS (8,0)] - [TV (11,0)][Watch (4,0)] - [Export ("enabled")] - bool Enabled { [Bind ("isEnabled")] get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("incremental")] - bool Incremental { [Bind ("isIncremental")] get; set; } - } [Watch (3,0)] @@ -3073,18 +2757,6 @@ interface SCNLookAtConstraint { [Static, Export ("lookAtConstraintWithTarget:")] SCNLookAtConstraint Create ([NullAllowed] SCNNode target); - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("targetOffset", ArgumentSemantic.Assign)] - SCNVector3 TargetOffset { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("localFront", ArgumentSemantic.Assign)] - SCNVector3 LocalFront { get; set; } - - [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] - [Export ("worldUp", ArgumentSemantic.Assign)] - SCNVector3 WorldUp { get; set; } } [Mac (10,9), iOS (8,0)] @@ -3097,17 +2769,6 @@ interface SCNLookAtConstraint { interface SCNTransformConstraint { [Static, Export ("transformConstraintInWorldSpace:withBlock:")] SCNTransformConstraint Create (bool inWorldSpace, SCNTransformConstraintHandler transformHandler); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("positionConstraintInWorldSpace:withBlock:")] - SCNTransformConstraint CreatePositionConstraint (bool inWorldSpace, Func transformHandler); - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [Static] - [Export ("orientationConstraintInWorldSpace:withBlock:")] - SCNTransformConstraint CreateOrientationConstraint (bool inWorldSpace, Func transformHandler); - } [Watch (3,0)] @@ -4361,128 +4022,4 @@ interface SCNBufferStream { [Export ("writeBytes:length:")] unsafe void Length (IntPtr bytes, nuint length); } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface SCNTimingFunction : NSSecureCoding - { - [Static] - [Export ("functionWithTimingMode:")] - SCNTimingFunction Create (SCNActionTimingMode timingMode); - - [Static, NoWatch] - [Export ("functionWithCAMediaTimingFunction:")] - SCNTimingFunction Create (CAMediaTimingFunction caTimingFunction); - } - - // Use the Swift name SCNAnimationProtocol since it conflicts with the type name - [Protocol (Name="SCNAnimation")] - interface SCNAnimationProtocol { - } - - interface ISCNAnimationProtocol {} - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface SCNAnimation : SCNAnimationProtocol, NSCopying, NSSecureCoding - { - [Static] - [Export ("animationWithContentsOfURL:")] - SCNAnimation FromUrl (NSUrl animationUrl); - - [Static] - [Export ("animationNamed:")] - SCNAnimation FromName (string animationName); - - [Static, NoWatch] - [Export ("animationWithCAAnimation:")] - SCNAnimation FromCAAnimation (CAAnimation caAnimation); - - [Export ("duration")] - double Duration { get; set; } - - [NullAllowed, Export ("keyPath")] - string KeyPath { get; set; } - - [Export ("timingFunction", ArgumentSemantic.Retain)] - SCNTimingFunction TimingFunction { get; set; } - - [Export ("blendInDuration")] - double BlendInDuration { get; set; } - - [Export ("blendOutDuration")] - double BlendOutDuration { get; set; } - - [Export ("removedOnCompletion")] - bool RemovedOnCompletion { [Bind ("isRemovedOnCompletion")] get; set; } - - [Export ("appliedOnCompletion")] - bool AppliedOnCompletion { [Bind ("isAppliedOnCompletion")] get; set; } - - [Export ("repeatCount")] - nfloat RepeatCount { get; set; } - - [Export ("autoreverses")] - bool Autoreverses { get; set; } - - [Export ("startDelay")] - double StartDelay { get; set; } - - [Export ("timeOffset")] - double TimeOffset { get; set; } - - [Export ("fillsForward")] - bool FillsForward { get; set; } - - [Export ("fillsBackward")] - bool FillsBackward { get; set; } - - [Export ("usesSceneTimeBase")] - bool UsesSceneTimeBase { get; set; } - - [NullAllowed, Export ("animationDidStart", ArgumentSemantic.Copy)] - SCNAnimationDidStartHandler AnimationDidStart { get; set; } - - [NullAllowed, Export ("animationDidStop", ArgumentSemantic.Copy)] - SCNAnimationDidStopHandler AnimationDidStop { get; set; } - - [NullAllowed, Export ("animationEvents", ArgumentSemantic.Copy)] - SCNAnimationEvent[] AnimationEvents { get; set; } - - [Export ("additive")] - bool Additive { [Bind ("isAdditive")] get; set; } - - [Export ("cumulative")] - bool Cumulative { [Bind ("isCumulative")] get; set; } - } - - [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface SCNAnimationPlayer : SCNAnimatable, NSCopying, NSSecureCoding - { - [Static] - [Export ("animationPlayerWithAnimation:")] - SCNAnimationPlayer FromAnimation (SCNAnimation animation); - - [Export ("animation")] - SCNAnimation Animation { get; } - - [Export ("speed")] - nfloat Speed { get; set; } - - [Export ("blendFactor")] - nfloat BlendFactor { get; set; } - - [Export ("paused")] - bool Paused { get; set; } - - [Export ("play")] - void Play (); - - [Export ("stop")] - void Stop (); - - [Export ("stopWithBlendOutDuration:")] - void StopWithBlendOutDuration (double seconds); - } } diff --git a/src/social.cs b/src/social.cs index 655a5492d84..5dc71cc4cde 100644 --- a/src/social.cs +++ b/src/social.cs @@ -24,33 +24,24 @@ namespace XamCore.Social { [Mac (10,8, onlyOn64 : true)] [Static] interface SLServiceType { - [Deprecated (PlatformName.iOS, 11, 0, message: "Use Facebook SDK instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use Facebook SDK instead.")] [Field ("SLServiceTypeFacebook")] [Mac (10,8)] NSString Facebook { get; } - [Deprecated (PlatformName.iOS, 11, 0, message: "Use Twitter SDK instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use Twitter SDK instead.")] [Field ("SLServiceTypeTwitter")] [Mac (10,8)] NSString Twitter { get; } - [Deprecated (PlatformName.iOS, 11, 0, message: "Use Sina Weibo SDK instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use Sina Weibo SDK instead.")] [Field ("SLServiceTypeSinaWeibo")] [Mac (10,8)] NSString SinaWeibo { get; } - [Deprecated (PlatformName.iOS, 11, 0, message: "Use Tencent Weibo SDK instead.")] - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use Tencent Weibo SDK instead.")] [Since (7,0)] [Field ("SLServiceTypeTencentWeibo")] [Mac (10,9)] NSString TencentWeibo { get; } #if MONOMAC - [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use LinkedIn SDK instead.")] [Field ("SLServiceTypeLinkedIn")] [Mac (10,9)] NSString LinkedIn { get; } diff --git a/src/spritekit.cs b/src/spritekit.cs index ff6516ca720..b91288a64d0 100644 --- a/src/spritekit.cs +++ b/src/spritekit.cs @@ -21,21 +21,13 @@ using XamCore.CoreGraphics; using XamCore.CoreVideo; using XamCore.SceneKit; -#if !WATCH -using XamCore.Metal; -#endif using Vector2 = global::OpenTK.Vector2; using Vector3 = global::OpenTK.Vector3; using Matrix2 = global::OpenTK.Matrix2; using Matrix3 = global::OpenTK.Matrix3; using Matrix4 = global::OpenTK.Matrix4; -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; -using VectorFloat3 = global::OpenTK.NVector3; using Vector4 = global::OpenTK.Vector4; -using Quaternion = global::OpenTK.Quaternion; #if MONOMAC using XamCore.AppKit; @@ -45,7 +37,6 @@ using pfloat = System.nfloat; #else using XamCore.UIKit; -using NSLineBreakMode = global::XamCore.UIKit.UILineBreakMode; using pfloat = System.Single; #if !WATCH using UIView = global::XamCore.UIKit.UIView; @@ -60,11 +51,6 @@ interface AVPlayer {} interface CIFilter {} interface GKPolygonObstacle {} interface UIView {} - interface IMTLCommandBuffer {} - interface IMTLCommandQueue {} - interface IMTLDevice {} - interface IMTLRenderCommandEncoder {} - interface MTLRenderPassDescriptor {} #endif delegate void SKNodeChildEnumeratorHandler (SKNode node, out bool stop); @@ -123,7 +109,6 @@ interface SK3DNode { } - [DisableDefaultCtor] // DesignatedInitializer below #if MONOMAC [Mac (10,9, onlyOn64 : true)] [BaseType (typeof (NSResponder))] @@ -137,10 +122,6 @@ partial interface SKNode : NSCoding, NSCopying, UIFocusItem { [BaseType (typeof (NSObject))] partial interface SKNode : NSCoding, NSCopying { #endif - [DesignatedInitializer] - [Export ("init")] - IntPtr Constructor (); - [Static, Export ("node")] SKNode Create (); @@ -185,12 +166,6 @@ partial interface SKNode : NSCoding, NSCopying { [Export ("userInteractionEnabled")] bool UserInteractionEnabled { [Bind ("isUserInteractionEnabled")] get; set; } - [NoWatch] - [NoMac] - [TV (11,0), iOS (11,0)] - [Export ("focusBehavior", ArgumentSemantic.Assign)] - SKNodeFocusBehavior FocusBehavior { get; set; } - [Export ("parent")] SKNode Parent { get; } @@ -284,7 +259,6 @@ partial interface SKNode : NSCoding, NSCopying { [Export ("intersectsNode:")] bool IntersectsNode (SKNode node); - [iOS (8,3)][TV (9,0)][Mac (10,11)] [Export ("isEqualToNode:")] bool IsEqual (SKNode node); @@ -330,13 +304,11 @@ partial interface SKNode : NSCoding, NSCopying { [Export ("obstaclesFromSpriteTextures:accuracy:")] GKPolygonObstacle[] ObstaclesFromSpriteTextures (SKNode[] sprites, float accuracy); -#if !XAMCORE_4_0 - [Deprecated (PlatformName.iOS, 10,0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] - [Deprecated (PlatformName.MacOSX, 10,12, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] [iOS (9,0),Mac(10,11)] [Export ("attributeValues", ArgumentSemantic.Copy)] NSDictionary AttributeValues { get; set; } +#if !XAMCORE_4_0 [Deprecated (PlatformName.iOS, 10,0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] [Deprecated (PlatformName.MacOSX, 10,12, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] [iOS (9,0),Mac(10,11)] @@ -420,10 +392,7 @@ partial interface SKEffectNode : SKWarpable { [Export ("shader", ArgumentSemantic.Retain)] SKShader Shader { get; set; } - [iOS (9,0),Mac(10,11)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } - +#if XAMCORE_4_0 [iOS (9,0), Mac(10,11)] [Export ("valueForAttributeNamed:")] [return: NullAllowed] @@ -432,6 +401,7 @@ partial interface SKEffectNode : SKWarpable { [iOS (9,0), Mac(10,11)] [Export ("setValue:forAttributeNamed:")] void SetValue (SKAttributeValue value, string key); +#endif } delegate Vector3 SKFieldForceEvaluator (/* vector_float3 */ Vector4 position, /* vector_float3 */ Vector4 velocity, float /* float, not CGFloat */ mass, float /* float, not CGFloat */ charge, double time); @@ -488,11 +458,9 @@ Vector4 Direction { SKFieldNode CreateRadialGravityField (); [Static, Export ("linearGravityFieldWithVector:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] SKFieldNode CreateLinearGravityField (/* vector_float3 */ Vector4 direction); [Static, Export ("velocityFieldWithVector:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] SKFieldNode CreateVelocityField (/* vector_float3 */ Vector4 direction); [Static, Export ("velocityFieldWithTexture:")] @@ -771,10 +739,7 @@ partial interface SKSpriteNode : SKWarpable { [Export ("scaleToSize:")] void ScaleTo (CGSize size); - [iOS (9,0),Mac(10,11)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } - +#if XAMCORE_4_0 [iOS (9,0), Mac(10,11)] [Export ("valueForAttributeNamed:")] [return: NullAllowed] @@ -783,6 +748,7 @@ partial interface SKSpriteNode : SKWarpable { [iOS (9,0), Mac(10,11)] [Export ("setValue:forAttributeNamed:")] void SetValue (SKAttributeValue value, string key); +#endif } [Watch (3,0)] @@ -1007,10 +973,7 @@ partial interface SKEmitterNode { [Export ("particleRenderOrder", ArgumentSemantic.Assign)] SKParticleRenderOrder ParticleRenderOrder { get; set; } - [iOS (9,0),Mac(10,11)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } - +#if XAMCORE_4_0 [iOS (9,0), Mac(10,11)] [Export ("valueForAttributeNamed:")] [return: NullAllowed] @@ -1019,6 +982,7 @@ partial interface SKEmitterNode { [iOS (9,0), Mac(10,11)] [Export ("setValue:forAttributeNamed:")] void SetValue (SKAttributeValue value, string key); +#endif } [Watch (3,0)] @@ -1218,29 +1182,12 @@ partial interface SKLabelNode { [Static, Export ("labelNodeWithText:")] SKLabelNode FromText ([NullAllowed] string text); - [TV (11,0), Watch (4,0), Mac (13,0), iOS (11,0)] - [Static] - [Export ("labelNodeWithAttributedText:")] - SKLabelNode FromText ([NullAllowed] NSAttributedString attributedText); - [Export ("verticalAlignmentMode")] SKLabelVerticalAlignmentMode VerticalAlignmentMode { get; set; } [Export ("horizontalAlignmentMode")] SKLabelHorizontalAlignmentMode HorizontalAlignmentMode { get; set; } - [TV (11,0), Watch (4,0), Mac (13,0), iOS (11,0)] - [Export ("numberOfLines")] - nint NumberOfLines { get; set; } - - [TV (11,0), Watch (4,0), Mac (13,0), iOS (11,0)] - [Export ("lineBreakMode", ArgumentSemantic.Assign)] - NSLineBreakMode LineBreakMode { get; set; } - - [TV (11,0), Watch (4,0), Mac (13,0), iOS (11,0)] - [Export ("preferredMaxLayoutWidth")] - nfloat PreferredMaxLayoutWidth { get; set; } - [Export ("fontName", ArgumentSemantic.Copy)] string FontName { get; set; } @@ -1248,10 +1195,6 @@ partial interface SKLabelNode { [NullAllowed] // nullable in Xcode7 headers and caught by introspection tests string Text { get; set; } - [TV (11,0), Watch (4,0), Mac (13,0), iOS (11,0)] - [NullAllowed, Export ("attributedText", ArgumentSemantic.Copy)] - NSAttributedString AttributedText { get; set; } - [Export ("fontSize")] nfloat FontSize { get; set; } @@ -1292,27 +1235,13 @@ interface SKLightNode { uint CategoryBitMask { get; set; } /* uint32_t */ } - [Watch (4,0)] + [NoWatch] [Mac (10,9, onlyOn64 : true)] [Since (7,0)] [BaseType (typeof (SKNode))] partial interface SKVideoNode { -#if WATCH - [Static, Export ("videoNodeWithFileNamed:")] - SKVideoNode VideoNodeWithFileNamed (string videoFile); - - [Static, Export ("videoNodeWithURL:")] - SKVideoNode VideoNodeWithURL (NSUrl videoURL); - - [DesignatedInitializer] - [Export ("initWithFileNamed:")] - IntPtr Constructor (string videoFile); - - [DesignatedInitializer] - [Export ("initWithURL:")] - IntPtr Constructor (NSUrl url); -#else + [NoWatch] [Static, Export ("videoNodeWithAVPlayer:")] SKVideoNode FromPlayer (AVPlayer player); @@ -1328,6 +1257,7 @@ partial interface SKVideoNode { [Static, Export ("videoNodeWithURL:"), Internal] SKVideoNode VideoNodeWithURL (NSUrl videoURL); + [NoWatch] [DesignatedInitializer] [Export ("initWithAVPlayer:")] IntPtr Constructor (AVPlayer player); @@ -1343,13 +1273,10 @@ partial interface SKVideoNode { [Export ("initWithURL:"), Internal] IntPtr InitWithURL (NSUrl url); -#endif - [NoWatch] [Export ("play")] void Play (); - [NoWatch] [Export ("pause")] void Pause (); @@ -1781,19 +1708,14 @@ interface SKUniform : NSCopying, NSCoding { IntPtr InitWithNameVectorFloat4 (string name, Vector4 value); #endif -#if !XAMCORE_4_0 [Internal] [NoWatch] [Availability (Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12)] [Export ("initWithName:floatMatrix2:")] IntPtr InitWithNameFloatMatrix2 (string name, Matrix2 value); -#endif -#if !XAMCORE_4_0 - [Obsolete ("Use the '(string, MatrixFloat2x2)' overload instead.")] [iOS (10,0)][Mac (10,12)] [TV (10,0)] - [Sealed] [Export ("initWithName:matrixFloat2x2:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] #if WATCH @@ -1802,25 +1724,15 @@ interface SKUniform : NSCopying, NSCoding { [Internal] IntPtr InitWithNameMatrixFloat2x2 (string name, Matrix2 value); #endif -#endif // !XAMCORE_4_0 - - [iOS (10,0)][Mac (10,12)] - [TV (10,0)] - [Export ("initWithName:matrixFloat2x2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - IntPtr Constructor (string name, MatrixFloat2x2 value); -#if !XAMCORE_4_0 [Internal] [NoWatch] [Availability (Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12)] [Export ("initWithName:floatMatrix3:")] IntPtr InitWithNameFloatMatrix3 (string name, Matrix3 value); - [Obsolete ("Use the '(string, MatrixFloat3x3)' overload instead.")] [iOS (10,0)][Mac (10,12)] [TV (10,0)] - [Sealed] [Export ("initWithName:matrixFloat3x3:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] #if WATCH @@ -1828,44 +1740,25 @@ interface SKUniform : NSCopying, NSCoding { #else [Internal] IntPtr InitWithNameMatrixFloat3x3 (string name, Matrix3 value); -#endif #endif - [iOS (10,0)][Mac (10,12)] - [TV (10,0)] - [Export ("initWithName:matrixFloat3x3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - IntPtr Constructor (string name, MatrixFloat3x3 value); - -#if !XAMCORE_4_0 [Internal] [NoWatch] [Availability (Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12)] [Export ("initWithName:floatMatrix4:")] IntPtr InitWithNameFloatMatrix4 (string name, Matrix4 value); -#endif -#if !XAMCORE_4_0 - [Obsolete ("Use the '(string, MatrixFloat4x4)' overload instead.")] [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Export ("initWithName:matrixFloat4x4:")] - [Sealed] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] #if WATCH IntPtr Constructor (string name, Matrix4 value); #else [Internal] IntPtr InitWithNameMatrixFloat4x4 (string name, Matrix4 value); -#endif #endif - [iOS (10,0)][Mac (10,12)] - [TV (10,0)] - [Export ("initWithName:matrixFloat4x4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - IntPtr Constructor (string name, MatrixFloat4x4 value); - [Export ("name")] string Name { get; } @@ -1935,92 +1828,59 @@ Vector4 _VectorFloat4Value { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; } -#if !XAMCORE_4_0 [Internal] [Availability (Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12)] [NoWatch] [Export ("floatMatrix2Value")] Matrix2 _FloatMatrix2Value { get; set; } -#endif -#if !XAMCORE_4_0 && WATCH - [Obsolete ("Use 'MatrixFloat2x2Value' instead.")] [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Export ("matrixFloat2x2Value", ArgumentSemantic.Assign)] +#if WATCH Matrix2 FloatMatrix2x2Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; - } -#endif - -#if !XAMCORE_4_0 && WATCH - [Sealed] // The selector is already used in the 'FloatMatrix2x2Value' property. +#else + [Internal] + Matrix2 _MatrixFloat2x2Value { #endif - [iOS (10,0)][Mac (10,12)] - [TV (10,0)] - [Export ("matrixFloat2x2Value", ArgumentSemantic.Assign)] - MatrixFloat2x2 MatrixFloat2x2Value { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; } -#if !XAMCORE_4_0 [Internal] [NoWatch] [Availability (Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12)] [Export ("floatMatrix3Value")] Matrix3 _FloatMatrix3Value { get; set; } -#endif -#if !XAMCORE_4_0 && WATCH - [Obsolete ("Use 'MatrixFloat3x3Value' instead.")] [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Export ("matrixFloat3x3Value", ArgumentSemantic.Assign)] +#if WATCH Matrix3 FloatMatrix3x3Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; - } -#endif - -#if !XAMCORE_4_0 && WATCH - [Sealed] // The selector is already used in the 'FloatMatrix3x3Value' property. +#else + [Internal] + Matrix3 _MatrixFloat3x3Value { #endif - [iOS (10,0)][Mac (10,12)] - [TV (10,0)] - [Export ("matrixFloat3x3Value", ArgumentSemantic.Assign)] - MatrixFloat3x3 MatrixFloat3x3Value { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; } -#if !XAMCORE_4_0 [Internal] [NoWatch] [Availability (Deprecated = Platform.iOS_10_0 | Platform.Mac_10_12)] [Export ("floatMatrix4Value")] Matrix4 _FloatMatrix4Value { get; set; } -#endif -#if !XAMCORE_4_0 && WATCH - [Obsolete ("Use 'FloatMatrix4x4Value' instead.")] [iOS (10,0)][Mac (10,12)] [TV (10,0)] [Export ("matrixFloat4x4Value", ArgumentSemantic.Assign)] +#if WATCH Matrix4 FloatMatrix4x4Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; - } -#endif - -#if !XAMCORE_4_0 && WATCH - [Sealed] // The selector is already used in the 'FloatMatrix4x4Value' property. +#else + [Internal] + Matrix4 _MatrixFloat4x4Value { #endif - [iOS (10,0)][Mac (10,12)] - [TV (10,0)] - [Export ("matrixFloat4x4Value", ArgumentSemantic.Assign)] - MatrixFloat4x4 MatrixFloat4x4Value { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; } @@ -2052,50 +1912,23 @@ MatrixFloat4x4 MatrixFloat4x4Value { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] SKUniform Create (string name, Vector4 value); -#if !XAMCORE_4_0 - [Obsolete ("Use the '(string, MatrixFloat2x2)' overload instead.")] [iOS (10,0)][Mac (10,12)] [Static] [Export ("uniformWithName:matrixFloat2x2:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] SKUniform Create (string name, Matrix2 value); -#endif - [iOS (10,0)][Mac (10,12)] - [Static] - [Export ("uniformWithName:matrixFloat2x2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, MatrixFloat2x2 value); - -#if !XAMCORE_4_0 - [Obsolete ("Use the '(string, MatrixFloat3x3)' overload instead.")] [iOS (10,0)][Mac (10,12)] [Static] [Export ("uniformWithName:matrixFloat3x3:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] SKUniform Create (string name, Matrix3 value); -#endif - [iOS (10,0)][Mac (10,12)] - [Static] - [Export ("uniformWithName:matrixFloat3x3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, MatrixFloat3x3 value); - -#if !XAMCORE_4_0 - [Obsolete ("Use 'the '(string, MatrixFloat4x4)' overload instead.")] [iOS (10,0)][Mac (10,12)] [Static] [Export ("uniformWithName:matrixFloat4x4:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] SKUniform Create (string name, Matrix4 value); -#endif - - [iOS (10,0)][Mac (10,12)] - [Static] - [Export ("uniformWithName:matrixFloat4x4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, MatrixFloat4x4 value); } delegate void SKActionDurationHandler (SKNode node, nfloat elapsedTime); @@ -2992,13 +2825,8 @@ interface SKAttribute : NSCoding [iOS (9,0)][Mac (10,11, onlyOn64 : true)] [BaseType (typeof(NSObject))] - [DisableDefaultCtor] // DesignatedInitializer below interface SKAttributeValue : NSCoding { - [DesignatedInitializer] - [Export ("init")] - IntPtr Constructor (); - [Static] [Export ("valueWithFloat:")] SKAttributeValue Create (float value); @@ -3395,77 +3223,5 @@ interface SKWarpGeometryGrid : NSCoding [Export ("gridByReplacingDestPositions:")] SKWarpGeometryGrid _GridByReplacingDestPositions (IntPtr destPositions); } - - // SKRenderer is not available for WatchKit apps and the iOS simulator - [NoWatch] - [TV (11,0), Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface SKRenderer { - [Static] - [Export ("rendererWithDevice:")] - SKRenderer FromDevice (IMTLDevice device); - - [Export ("renderWithViewport:commandBuffer:renderPassDescriptor:")] - void Render (CGRect viewport, IMTLCommandBuffer commandBuffer, MTLRenderPassDescriptor renderPassDescriptor); - - [Export ("renderWithViewport:renderCommandEncoder:renderPassDescriptor:commandQueue:")] - void Render (CGRect viewport, IMTLRenderCommandEncoder renderCommandEncoder, MTLRenderPassDescriptor renderPassDescriptor, IMTLCommandQueue commandQueue); - - [Export ("updateAtTime:")] - void Update (double currentTime); - - [NullAllowed, Export ("scene", ArgumentSemantic.Assign)] - SKScene Scene { get; set; } - - [Export ("ignoresSiblingOrder")] - bool IgnoresSiblingOrder { get; set; } - - [Export ("shouldCullNonVisibleNodes")] - bool ShouldCullNonVisibleNodes { get; set; } - - [Export ("showsDrawCount")] - bool ShowsDrawCount { get; set; } - - [Export ("showsNodeCount")] - bool ShowsNodeCount { get; set; } - - [Export ("showsQuadCount")] - bool ShowsQuadCount { get; set; } - - [Export ("showsPhysics")] - bool ShowsPhysics { get; set; } - - [Export ("showsFields")] - bool ShowsFields { get; set; } - } - - [TV (11,0), Watch (4,0), Mac (13,0), iOS (11,0)] - [BaseType (typeof(SKNode))] - interface SKTransformNode { - [Export ("xRotation")] - nfloat XRotation { get; set; } - - [Export ("yRotation")] - nfloat YRotation { get; set; } - - [Export ("eulerAngles")] - VectorFloat3 EulerAngles { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; - } - - [Export ("rotationMatrix")] - MatrixFloat3x3 RotationMatrix { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; - } - - [Export ("quaternion")] - Quaternion Quaternion { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; - } - } } #endif diff --git a/src/storekit.cs b/src/storekit.cs index 088939224ae..6455c93e771 100644 --- a/src/storekit.cs +++ b/src/storekit.cs @@ -80,7 +80,7 @@ partial interface SKPayment : NSMutableCopying { #if !MONOMAC [Static] [Export ("paymentWithProductIdentifier:")] - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_5_0, Message = "Use 'FromProduct (SKProduct)'' after fetching the list of available products from 'SKProductRequest' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_5_0, Message = "Use FromProduct(SKProduct) after fetching the list of available products from SKProductRequest instead")] SKPayment CreateFrom (string identifier); #endif @@ -112,7 +112,7 @@ interface SKMutablePayment { [Static] [Export ("paymentWithProductIdentifier:")] - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_5_0, Message = "Use 'PaymentWithProduct (SKProduct)' after fetching the list of available products from 'SKProductRequest' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_5_0, Message = "Use PaymentWithProduct(SKProduct) after fetching the list of available products from SKProductRequest instead")] SKMutablePayment PaymentWithProduct (string identifier); [NullAllowed] // by default this property is null @@ -256,10 +256,6 @@ interface SKPaymentTransactionObserver { [Since(6,0)] [Export ("paymentQueue:updatedDownloads:")] void UpdatedDownloads (SKPaymentQueue queue, SKDownload [] downloads); - - [iOS (11,0)][TV (11,0)][NoMac] - [Export ("paymentQueue:shouldAddStorePayment:forProduct:")] - bool ShouldAddStorePayment (SKPaymentQueue queue, SKPayment payment, SKProduct product); } [BaseType (typeof (NSObject))] @@ -280,7 +276,7 @@ interface SKPaymentTransaction { string TransactionIdentifier { get; } #if !MONOMAC - [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_7_0, Message = "Use 'NSBundle.AppStoreReceiptUrl' instead.")] + [Availability (Introduced = Platform.iOS_3_0, Deprecated = Platform.iOS_7_0, Message = "Use NSBundle.AppStoreReceiptUrl instead")] [Export ("transactionReceipt")] NSData TransactionReceipt { get; } #endif @@ -418,10 +414,6 @@ interface SKStoreProductParameterKey [Field ("SKStoreProductParameterITunesItemIdentifier")] NSString ITunesItemIdentifier { get; } - [iOS (11,0)][TV (11,0)] - [Field ("SKStoreProductParameterProductIdentifier")] - NSString ProductIdentifier { get; } - [iOS (8,0)] [Field ("SKStoreProductParameterAffiliateToken")] NSString AffiliateToken { get; } @@ -469,27 +461,15 @@ interface SKCloudServiceController { [Export ("requestStorefrontIdentifierWithCompletionHandler:")] void RequestStorefrontIdentifier (Action completionHandler); - [iOS (11,0)][TV (11,0)] - [Async] - [Export ("requestStorefrontCountryCodeWithCompletionHandler:")] - void RequestStorefrontCountryCode (Action completionHandler); - [Async] [Export ("requestCapabilitiesWithCompletionHandler:")] void RequestCapabilities (Action completionHandler); [iOS (10,3), TV (10,2)] - [Deprecated (PlatformName.iOS, 11,0, message: "Use 'RequestUserToken' instead.")] - [Deprecated (PlatformName.TvOS, 11,0, message: "Use 'RequestUserToken' instead.")] [Async] [Export ("requestPersonalizationTokenForClientToken:withCompletionHandler:")] void RequestPersonalizationToken (string clientToken, Action completionHandler); - [iOS (11,0)][TV (11,0)] - [Async] - [Export ("requestUserTokenForDeveloperToken:completionHandler:")] - void RequestUserToken (string developerToken, Action completionHandler); - [Notification] [Field ("SKStorefrontIdentifierDidChangeNotification")] NSString StorefrontIdentifierDidChangeNotification { get; } @@ -497,11 +477,6 @@ interface SKCloudServiceController { [Notification] [Field ("SKCloudServiceCapabilitiesDidChangeNotification")] NSString CloudServiceCapabilitiesDidChangeNotification { get; } - - [iOS (11,0)][TV (11,0)] - [Notification] - [Field ("SKStorefrontCountryCodeDidChangeNotification")] - NSString StorefrontCountryCodeDidChangeNotification { get; } } [iOS (10,1)] @@ -548,9 +523,6 @@ interface SKCloudServiceSetupOptions [iOS (10,3)] string CampaignToken { get; set; } - - [iOS (11,0)] - string MessageIdentifier { get; set; } } [NoTV, iOS (10,1)] @@ -570,10 +542,6 @@ interface SKCloudServiceSetupOptionsKeys [iOS (10,3)] [Field ("SKCloudServiceSetupOptionsCampaignTokenKey")] NSString CampaignTokenKey { get; } - - [iOS (11,0)] - [Field ("SKCloudServiceSetupOptionsMessageIdentifierKey")] - NSString MessageIdentifierKey { get; } } [NoTV, iOS (10,1)] @@ -583,18 +551,6 @@ enum SKCloudServiceSetupAction Subscribe, } - [iOS (11,0), TV (11,0)] - enum SKCloudServiceSetupMessageIdentifier { - [Field ("SKCloudServiceSetupMessageIdentifierJoin")] - Join, - [Field ("SKCloudServiceSetupMessageIdentifierConnect")] - Connect, - [Field ("SKCloudServiceSetupMessageIdentifierAddMusic")] - AddMusic, - [Field ("SKCloudServiceSetupMessageIdentifierPlayMusic")] - PlayMusic, - } - [iOS (10,3)] [NoTV] [BaseType (typeof (NSObject))] @@ -605,30 +561,5 @@ interface SKStoreReviewController { [Export ("requestReview")] void RequestReview (); } - - [iOS (11,0), TV (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // static Default property is the only documented way to get the controller - interface SKProductStorePromotionController { - [Static] - [Export ("defaultController")] - SKProductStorePromotionController Default { get; } - - [Async] - [Export ("fetchStorePromotionVisibilityForProduct:completionHandler:")] - void FetchStorePromotionVisibility (SKProduct product, [NullAllowed] Action completionHandler); - - [Async] - [Export ("updateStorePromotionVisibility:forProduct:completionHandler:")] - void Update (SKProductStorePromotionVisibility promotionVisibility, SKProduct product, [NullAllowed] Action completionHandler); - - [Async] - [Export ("fetchStorePromotionOrderWithCompletionHandler:")] - void FetchStorePromotionOrder ([NullAllowed] Action completionHandler); - - [Async] - [Export ("updateStorePromotionOrder:completionHandler:")] - void Update (SKProduct[] storePromotionOrder, [NullAllowed] Action completionHandler); - } #endif } diff --git a/src/tvmlkit.cs b/src/tvmlkit.cs index b0d540c7ab7..38022a2401a 100644 --- a/src/tvmlkit.cs +++ b/src/tvmlkit.cs @@ -23,11 +23,7 @@ public enum TVElementAlignment : nint { Undefined, Left, Center, - Right, - [TV (11,0)] - Leading, - [TV (11, 0)] - Trailing, + Right } [TV (9,0)] @@ -53,19 +49,7 @@ public enum TVElementPosition : nint { BottomLeft, BottomRight, Header, - Footer, - [TV (11, 0)] - Leading, - [TV (11, 0)] - Trailing, - [TV (11, 0)] - TopLeading, - [TV (11, 0)] - TopTrailing, - [TV (11, 0)] - BottomLeading, - [TV (11, 0)] - BottomTrailing, + Footer } [TV (9,0)] diff --git a/src/tvservices.cs b/src/tvservices.cs index 0a1313258b1..f66c71dbeb1 100644 --- a/src/tvservices.cs +++ b/src/tvservices.cs @@ -29,7 +29,6 @@ interface TVContentItem : NSCopying, NSSecureCoding { TVContentIdentifier ContentIdentifier { get; } [NullAllowed, Export ("imageURL", ArgumentSemantic.Copy)] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'SetImageUrl' instead.")] NSUrl ImageUrl { get; set; } [Export ("imageShape", ArgumentSemantic.Assign)] @@ -71,15 +70,6 @@ interface TVContentItem : NSCopying, NSSecureCoding { [Export ("initWithContentIdentifier:")] [DesignatedInitializer] IntPtr Constructor (TVContentIdentifier ident); - - [TV (11,0)] - [Export ("imageURLForTraits:")] - [return: NullAllowed] - NSUrl GetImageUrl (TVContentItemImageTrait traits); - - [TV (11,0)] - [Export ("setImageURL:forTraits:")] - void SetImageUrl ([NullAllowed] NSUrl aUrl, TVContentItemImageTrait traits); } [TV (9,0)] diff --git a/src/twitter.cs b/src/twitter.cs index be2ee1a2110..8473aa01a03 100644 --- a/src/twitter.cs +++ b/src/twitter.cs @@ -20,7 +20,7 @@ namespace XamCore.Twitter { delegate void TWTweetComposeHandler (TWTweetComposeViewControllerResult result); #endif - [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_6_0, Message = "Use the 'Social' framework.")] + [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_6_0, Message = "Use the Social framework")] [BaseType (typeof (NSObject))] interface TWRequest { [NullAllowed] // by default this property is null @@ -50,7 +50,7 @@ interface TWRequest { void PerformRequest (TWRequestHandler handler); } - [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_6_0, Message = "Use the 'Social' framework.")] + [Availability (Introduced = Platform.iOS_5_0, Deprecated = Platform.iOS_6_0, Message = "Use the Social framework")] [BaseType (typeof (UIViewController))] interface TWTweetComposeViewController { [Export ("initWithNibName:bundle:")] diff --git a/src/uikit.cs b/src/uikit.cs index 42ee0e8c8e6..98fb4dff5a7 100644 --- a/src/uikit.cs +++ b/src/uikit.cs @@ -24,15 +24,6 @@ #endif using XamCore.CoreData; -#if XAMCORE_2_0 -#if IOS -using XamCore.FileProvider; -#endif // IOS -#if !TVOS -using XamCore.Intents; -#endif // !TVOS -#endif // XAMCORE_2_0 - using System; using System.ComponentModel; @@ -53,8 +44,7 @@ public enum UIFocusHeading : nuint { } [Native] // NSInteger -> UIApplication.h - [NoWatch] - [TV (11,0)] + [NoTV][NoWatch] public enum UIBackgroundRefreshStatus : nint { Restricted, Denied, Available } @@ -287,27 +277,21 @@ interface NSDataAsset : NSCopying NSString TypeIdentifier { get; } } - delegate void NSFileProviderExtensionFetchThumbnailsHandler (NSString identifier, [NullAllowed] NSData imageData, [NullAllowed] NSError error); - [NoWatch] [NoTV] [iOS (8,0)] [ThreadSafe] [BaseType (typeof (NSObject))] partial interface NSFileProviderExtension { - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'NSFileProviderManager' instead.")] [Static, Export ("writePlaceholderAtURL:withMetadata:error:")] bool WritePlaceholder (NSUrl placeholderUrl, NSDictionary metadata, ref NSError error); - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FileProvider::NSFileProviderManager.GetPlaceholderUrl (NSUrl)' instead.")] [Static, Export ("placeholderURLForURL:")] NSUrl GetPlaceholderUrl (NSUrl url); - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FileProvider::NSFileProviderManager.ProviderIdentifier' instead.")] [Export ("providerIdentifier")] string ProviderIdentifier { get; } - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FileProvider::NSFileProviderManager.DocumentStorageUrl' instead.")] [Export ("documentStorageURL")] NSUrl DocumentStorageUrl { get; } @@ -330,91 +314,6 @@ partial interface NSFileProviderExtension { [Export ("stopProvidingItemAtURL:")] void StopProvidingItemAtUrl (NSUrl url); - -#if XAMCORE_2_0 && IOS - - [iOS (11,0)] - [Export ("itemForIdentifier:error:")] - [return: NullAllowed] - INSFileProviderItem GetItem (NSString identifier, out NSError error); - - // Inlining NSFileProviderExtension (NSFileProviderActions) so we get asyncs - - [iOS (11,0)] - [Async] - [Export ("importDocumentAtURL:toParentItemIdentifier:completionHandler:")] - void ImportDocument (NSUrl fileUrl, string parentItemIdentifier, Action completionHandler); - - [iOS (11,0)] - [Async] - [Export ("createDirectoryWithName:inParentItemIdentifier:completionHandler:")] - void CreateDirectory (string directoryName, string parentItemIdentifier, Action completionHandler); - - [iOS (11,0)] - [Async] - [Export ("renameItemWithIdentifier:toName:completionHandler:")] - void RenameItem (string itemIdentifier, string itemName, Action completionHandler); - - [iOS (11,0)] - [Async] - [Export ("reparentItemWithIdentifier:toParentItemWithIdentifier:newName:completionHandler:")] - void ReparentItem (string itemIdentifier, string parentItemIdentifier, [NullAllowed] string newName, Action completionHandler); - - [iOS (11,0)] - [Async] - [Export ("trashItemWithIdentifier:completionHandler:")] - void TrashItem (string itemIdentifier, Action completionHandler); - - [iOS (11,0)] - [Async] - [Export ("untrashItemWithIdentifier:toParentItemIdentifier:completionHandler:")] - void UntrashItem (string itemIdentifier, [NullAllowed] string parentItemIdentifier, Action completionHandler); - - [iOS (11,0)] - [Async] - [Export ("deleteItemWithIdentifier:completionHandler:")] - void DeleteItem (string itemIdentifier, Action completionHandler); - - [iOS (11,0)] - [Async] - [Export ("setLastUsedDate:forItemIdentifier:completionHandler:")] - void SetLastUsedDate ([NullAllowed] NSDate lastUsedDate, string itemIdentifier, Action completionHandler); - - [iOS (11,0)] - [Async] - [Export ("setTagData:forItemIdentifier:completionHandler:")] - void SetTagData ([NullAllowed] NSData tagData, string itemIdentifier, Action completionHandler); - - [iOS (11,0)] - [Async] - [Export ("setFavoriteRank:forItemIdentifier:completionHandler:")] - void SetFavoriteRank ([NullAllowed] NSNumber favoriteRank, string itemIdentifier, Action completionHandler); - - [iOS (11,0)] - [Export ("enumeratorForContainerItemIdentifier:error:")] - [return: NullAllowed] - XamCore.FileProvider.INSFileProviderEnumerator GetEnumerator (string containerItemIdentifier, out NSError error); - - // From NSFileProviderExtension (NSFileProviderThumbnailing) - - [iOS (11,0)] - [Export ("fetchThumbnailsForItemIdentifiers:requestedSize:perThumbnailCompletionHandler:completionHandler:")] - [Async] - NSProgress FetchThumbnails (NSString [] itemIdentifiers, CGSize size, NSFileProviderExtensionFetchThumbnailsHandler perThumbnailCompletionHandler, Action completionHandler); - - // From NSFileProviderExtension (NSFileProviderService) - - [iOS (11,0)] - [Export ("supportedServiceSourcesForItemIdentifier:error:")] - [return: NullAllowed] - INSFileProviderServiceSource [] GetSupportedServiceSources (string itemIdentifier, out NSError error); - - // From NSFileProviderExtension (NSFileProviderDomain) - - [iOS (11,0)] - [NullAllowed, Export ("domain")] - NSFileProviderDomain Domain { get; } -#endif } #endif // !WATCH @@ -454,50 +353,18 @@ interface NSLayoutAnchor [NoWatch] [iOS (9,0)] - [TV (10,0)] [BaseType (typeof(NSLayoutAnchor))] [DisableDefaultCtor] // Handle is nil interface NSLayoutXAxisAnchor { - [iOS (10,0)] - [Export ("anchorWithOffsetToAnchor:")] - NSLayoutDimension CreateAnchorWithOffset (NSLayoutXAxisAnchor otherAnchor); - - [TV (11,0), iOS (11,0)] - [Export ("constraintEqualToSystemSpacingAfterAnchor:multiplier:")] - NSLayoutConstraint ConstraintEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); - - [TV (11,0), iOS (11,0)] - [Export ("constraintGreaterThanOrEqualToSystemSpacingAfterAnchor:multiplier:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); - - [TV (11,0), iOS (11,0)] - [Export ("constraintLessThanOrEqualToSystemSpacingAfterAnchor:multiplier:")] - NSLayoutConstraint ConstraintLessThanOrEqualToSystemSpacingAfterAnchor (NSLayoutXAxisAnchor anchor, nfloat multiplier); } [NoWatch] [iOS (9,0)] - [TV (10,0)] [BaseType (typeof(NSLayoutAnchor))] [DisableDefaultCtor] // Handle is nil interface NSLayoutYAxisAnchor { - [iOS (10,0)] - [Export ("anchorWithOffsetToAnchor:")] - NSLayoutDimension CreateAnchorWithOffset (NSLayoutYAxisAnchor otherAnchor); - - [TV (11,0), iOS (11,0)] - [Export ("constraintEqualToSystemSpacingBelowAnchor:multiplier:")] - NSLayoutConstraint ConstraintEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); - - [TV (11,0), iOS (11,0)] - [Export ("constraintGreaterThanOrEqualToSystemSpacingBelowAnchor:multiplier:")] - NSLayoutConstraint ConstraintGreaterThanOrEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); - - [TV (11,0), iOS (11,0)] - [Export ("constraintLessThanOrEqualToSystemSpacingBelowAnchor:multiplier:")] - NSLayoutConstraint ConstraintLessThanOrEqualToSystemSpacingBelowAnchor (NSLayoutYAxisAnchor anchor, nfloat multiplier); } [NoWatch] @@ -553,7 +420,7 @@ interface NSLayoutConstraint { [Export ("shouldBeArchived")] bool ShouldBeArchived { get; set; } - [NullAllowed, Export ("firstItem", ArgumentSemantic.Assign)] + [Export ("firstItem", ArgumentSemantic.Assign)] NSObject FirstItem { get; } [Export ("firstAttribute")] @@ -818,11 +685,7 @@ partial interface NSTextAttachmentContainer { [Since (7,0)] [BaseType (typeof (NSObject))] - partial interface NSTextAttachment : NSTextAttachmentContainer, NSCoding -#if !WATCH - , UIAccessibilityContentSizeCategoryImageAdjusting -#endif // !WATCH - { + partial interface NSTextAttachment : NSTextAttachmentContainer, NSCoding { [DesignatedInitializer] [Export ("initWithData:ofType:")] [PostGet ("Contents")] @@ -1329,10 +1192,6 @@ interface NSCoder_UIGeometryKeyedCoding { [Export ("encodeUIEdgeInsets:forKey:")] void Encode (UIEdgeInsets edgeInsets, string forKey); - - [Watch (4,0), TV (11,0), iOS (11,0)] - [Export ("encodeDirectionalEdgeInsets:forKey:")] - void Encode (NSDirectionalEdgeInsets directionalEdgeInsets, string forKey); [Export ("encodeUIOffset:forKey:")] void Encode (UIOffset uiOffset, string forKey); @@ -1355,10 +1214,6 @@ interface NSCoder_UIGeometryKeyedCoding { [Export ("decodeUIEdgeInsetsForKey:")] UIEdgeInsets DecodeUIEdgeInsets (string key); - - [Watch (4,0), TV (11,0), iOS (11,0)] - [Export ("decodeDirectionalEdgeInsetsForKey:")] - NSDirectionalEdgeInsets DecodeDirectionalEdgeInsets (string key); [Export ("decodeUIOffsetForKey:")] UIOffset DecodeUIOffsetForKey (string key); @@ -1420,29 +1275,14 @@ interface UIAccessibility { [Export ("accessibilityLabel", ArgumentSemantic.Copy)] string AccessibilityLabel { get; set; } - [NoWatch] - [TV (11,0), iOS (11,0)] - [NullAllowed, Export ("accessibilityAttributedLabel", ArgumentSemantic.Copy)] - NSAttributedString AccessibilityAttributedLabel { get; set; } - [NullAllowed] // by default this property is null [Export ("accessibilityHint", ArgumentSemantic.Copy)] string AccessibilityHint { get; set; } - [NoWatch] - [TV (11,0), iOS (11,0)] - [NullAllowed, Export ("accessibilityAttributedHint", ArgumentSemantic.Copy)] - NSAttributedString AccessibilityAttributedHint { get; set; } - [NullAllowed] // by default this property is null [Export ("accessibilityValue", ArgumentSemantic.Copy)] string AccessibilityValue { get; set; } - [NoWatch] - [TV (11,0), iOS (11,0)] - [NullAllowed, Export ("accessibilityAttributedValue", ArgumentSemantic.Copy)] - NSAttributedString AccessibilityAttributedValue { get; set; } - [Export ("accessibilityTraits")] UIAccessibilityTrait AccessibilityTraits { get; set; } @@ -1538,17 +1378,9 @@ interface UIAccessibility { NSString AnnouncementDidFinishNotification { get; } [NoWatch] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'VoiceOverStatusDidChangeNotification' instead.")] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'VoiceOverStatusDidChangeNotification' instead.")] [Field ("UIAccessibilityVoiceOverStatusChanged")] NSString VoiceOverStatusChanged { get; } - [NoWatch] - [TV (11,0), iOS (11,0)] - [Field ("UIAccessibilityVoiceOverStatusDidChangeNotification")] - [Notification] - NSString VoiceOverStatusDidChangeNotification { get; } - [NoWatch] [Since (5,0)] [Field ("UIAccessibilityMonoAudioStatusDidChangeNotification")] @@ -1722,22 +1554,6 @@ interface UIAccessibility { [Notification] [Field ("UIAccessibilityAssistiveTouchStatusDidChangeNotification")] NSString AssistiveTouchStatusDidChangeNotification { get; } - - [iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("UIAccessibilitySpeechAttributeQueueAnnouncement")] - NSString SpeechAttributeQueueAnnouncement { get; } - - [iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("UIAccessibilitySpeechAttributeIPANotation")] - NSString SpeechAttributeIpaNotation { get; } - - [iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("UIAccessibilityTextAttributeHeadingLevel")] - NSString TextAttributeHeadingLevel { get; } - - [iOS (11,0), TV (11,0), Watch (4,0)] - [Field ("UIAccessibilityTextAttributeCustom")] - NSString TextAttributeCustom { get; } } interface UIAccessibilityAnnouncementFinishedEventArgs { @@ -1767,50 +1583,6 @@ interface UIAccessibilityContainer { [iOS (8,0)] [Export ("setAccessibilityElements:")] void SetAccessibilityElements ([NullAllowed] NSObject elements); - - [iOS (11,0), TV (11,0)] - [Export ("accessibilityContainerType", ArgumentSemantic.Assign)] - UIAccessibilityContainerType AccessibilityContainerType { get; set; } - } - - interface IUIAccessibilityContainerDataTableCell {} - - [iOS (11,0), TV (11,0)] - [Protocol] - interface UIAccessibilityContainerDataTableCell { - [Abstract] - [Export ("accessibilityRowRange")] - NSRange GetAccessibilityRowRange (); - - [Abstract] - [Export ("accessibilityColumnRange")] - NSRange GetAccessibilityColumnRange (); - } - - [iOS (11,0), TV (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface UIAccessibilityContainerDataTable { - [Abstract] - [Export ("accessibilityDataTableCellElementForRow:column:")] - [return: NullAllowed] - IUIAccessibilityContainerDataTableCell GetAccessibilityDataTableCellElement (nuint row, nuint column); - - [Abstract] - [Export ("accessibilityRowCount")] - nuint AccessibilityRowCount { get; } - - [Abstract] - [Export ("accessibilityColumnCount")] - nuint AccessibilityColumnCount { get; } - - [Export ("accessibilityHeaderElementsForRow:")] - [return: NullAllowed] - IUIAccessibilityContainerDataTableCell[] GetAccessibilityHeaderElementsForRow (nuint row); - - [Export ("accessibilityHeaderElementsForColumn:")] - [return: NullAllowed] - IUIAccessibilityContainerDataTableCell[] GetAccessibilityHeaderElementsForColumn (nuint column); } [iOS (8,0)] @@ -1820,18 +1592,10 @@ partial interface UIAccessibilityCustomAction { [Export ("initWithName:target:selector:")] IntPtr Constructor (string name, NSObject target, Selector selector); - [TV (11,0), iOS (11,0)] - [Export ("initWithAttributedName:target:selector:")] - IntPtr Constructor (NSAttributedString attributedName, [NullAllowed] NSObject target, Selector selector); - [NullAllowed] // by default this property is null [Export ("name")] string Name { get; set; } - [TV (11,0), iOS (11,0)] - [Export ("attributedName", ArgumentSemantic.Copy)] - NSAttributedString AttributedName { get; set; } - [NullAllowed] // by default this property is null [Export ("target", ArgumentSemantic.Weak)] NSObject Target { get; set; } @@ -1850,27 +1614,11 @@ interface UIAccessibilityCustomRotor { [Export ("initWithName:itemSearchBlock:")] IntPtr Constructor (string name, UIAccessibilityCustomRotorSearch itemSearchHandler); - [iOS (11,0), TV (11,0)] - [Export ("initWithAttributedName:itemSearchBlock:")] - IntPtr Constructor (NSAttributedString attributedName, UIAccessibilityCustomRotorSearch itemSearchBlock); - - [iOS (11,0), TV (11,0)] - [Export ("initWithSystemType:itemSearchBlock:")] - IntPtr Constructor (UIAccessibilityCustomSystemRotorType type, UIAccessibilityCustomRotorSearch itemSearchBlock); - [Export ("name")] string Name { get; set; } - [iOS (11,0), TV (11,0)] - [Export ("attributedName", ArgumentSemantic.Copy)] - NSAttributedString AttributedName { get; set; } - [Export ("itemSearchBlock", ArgumentSemantic.Copy)] UIAccessibilityCustomRotorSearch ItemSearchHandler { get; set; } - - [iOS (11,0), TV (11,0)] - [Export ("systemRotorType")] - UIAccessibilityCustomSystemRotorType SystemRotorType { get; } } [iOS (10,0), TV (10,0)] @@ -1998,54 +1746,6 @@ interface UIAccessibilityAction { UIAccessibilityCustomAction [] AccessibilityCustomActions { get; set; } } - [NoWatch, NoTV] - [iOS (11,0)] - // NSObject category inlined in UIResponder - interface UIAccessibilityDragging { - [NullAllowed, Export ("accessibilityDragSourceDescriptors", ArgumentSemantic.Copy)] - UIAccessibilityLocationDescriptor[] AccessibilityDragSourceDescriptors { get; set; } - - [NullAllowed, Export ("accessibilityDropPointDescriptors", ArgumentSemantic.Copy)] - UIAccessibilityLocationDescriptor[] AccessibilityDropPointDescriptors { get; set; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UIAccessibilityLocationDescriptor { - [Export ("initWithName:view:")] - IntPtr Constructor (string name, UIView view); - - [Export ("initWithName:point:inView:")] - IntPtr Constructor (string name, CGPoint point, UIView view); - - [Export ("initWithAttributedName:point:inView:")] - [DesignatedInitializer] - IntPtr Constructor (NSAttributedString attributedName, CGPoint point, UIView view); - - [NullAllowed, Export ("view", ArgumentSemantic.Weak)] - UIView View { get; } - - [Export ("point")] - CGPoint Point { get; } - - [Export ("name", ArgumentSemantic.Strong)] - string Name { get; } - - [Export ("attributedName", ArgumentSemantic.Strong)] - NSAttributedString AttributedName { get; } - } - - [NoWatch] - [TV (11,0), iOS (11,0)] - [Protocol] - interface UIAccessibilityContentSizeCategoryImageAdjusting { - [Abstract] - [Export ("adjustsImageSizeForAccessibilityContentSizeCategory")] - bool AdjustsImageSizeForAccessibilityContentSizeCategory { get; set; } - } - [NoTV] [BaseType (typeof (UIView), KeepRefUntil="Dismissed", Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UIActionSheetDelegate)})] interface UIActionSheet { @@ -2227,10 +1927,6 @@ interface UIActivityType [Since (9,0)] [Field ("UIActivityTypeOpenInIBooks")] NSString OpenInIBooks { get; } - - [iOS (11,0)] - [Field ("UIActivityTypeMarkupAsPDF")] - NSString MarkupAsPdf { get; } } // @@ -2280,19 +1976,19 @@ interface UIActivityItemSource { [Abstract] [Export ("activityViewController:itemForActivityType:")] - NSObject GetItemForActivity (UIActivityViewController activityViewController, [NullAllowed] NSString activityType); + NSObject GetItemForActivity (UIActivityViewController activityViewController, NSString activityType); [Since (7,0)] [Export ("activityViewController:dataTypeIdentifierForActivityType:")] - string GetDataTypeIdentifierForActivity (UIActivityViewController activityViewController, [NullAllowed] NSString activityType); + string GetDataTypeIdentifierForActivity (UIActivityViewController activityViewController, NSString activityType); [Since (7,0)] [Export ("activityViewController:subjectForActivityType:")] - string GetSubjectForActivity (UIActivityViewController activityViewController, [NullAllowed] NSString activityType); + string GetSubjectForActivity (UIActivityViewController activityViewController, NSString activityType); [Since (7,0)] [Export ("activityViewController:thumbnailImageForActivityType:suggestedSize:")] - UIImage GetThumbnailImageForActivity (UIActivityViewController activityViewController, [NullAllowed] NSString activityType, CGSize suggestedSize); + UIImage GetThumbnailImageForActivity (UIActivityViewController activityViewController, NSString activityType, CGSize suggestedSize); } [NoTV] @@ -2336,11 +2032,7 @@ partial interface UIAlertAction : NSCopying { [iOS (8,0)] [BaseType (typeof (UIViewController))] - partial interface UIAlertController -#if IOS - : UISpringLoadedInteractionSupporting -#endif - { + partial interface UIAlertController { [Export ("initWithNibName:bundle:")] [PostGet ("NibBundle")] IntPtr Constructor ([NullAllowed] string nibName, [NullAllowed] NSBundle bundle); @@ -2527,14 +2219,6 @@ interface UIStackView { [Export ("insertArrangedSubview:atIndex:")] void InsertArrangedSubview (UIView view, nuint stackIndex); - - [iOS (11,0), TV (11,0)] - [Export ("setCustomSpacing:afterView:")] - void SetCustomSpacing (nfloat spacing, UIView arrangedSubview); - - [iOS (11,0), TV (11,0)] - [Export ("customSpacingAfterView:")] - nfloat GetCustomSpacing (UIView arrangedSubview); } [Static] @@ -2662,14 +2346,6 @@ interface UIViewPropertyAnimator : UIViewImplicitlyAnimating, NSCopying [Export ("interruptible")] bool Interruptible { [Bind ("isInterruptible")] get; set; } - - [iOS (11,0), TV (11,0)] - [Export ("scrubsLinearly")] - bool ScrubsLinearly { get; set; } - - [iOS (11,0), TV (11,0)] - [Export ("pausesOnCompletion")] - bool PausesOnCompletion { get; set; } [Export ("initWithDuration:timingParameters:")] [DesignatedInitializer] @@ -2912,7 +2588,7 @@ interface UIApplication { // From @interface UIApplication (UIRemoteNotifications) [NoTV] - [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'RegisterUserNotifications', 'RegisterForNotifications' or 'UNUserNotificationCenter.RequestAuthorization' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'RegisterUserNotifications' and 'RegisterForNotifications' instead or if iOS 10+ 'UNUserNotificationCenter.RequestAuthorization'.")] [Export ("registerForRemoteNotificationTypes:")] void RegisterForRemoteNotificationTypes (UIRemoteNotificationType types); @@ -2922,7 +2598,7 @@ interface UIApplication { // From @interface UIApplication (UIRemoteNotifications) [NoTV] - [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'CurrentUserNotificationSettings' or 'UNUserNotificationCenter.GetNotificationSettings' instead.")] + [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'CurrentUserNotificationSettings' instead or if iOS 10+ 'UNUserNotificationCenter.GetNotificationSettings'.")] [Export ("enabledRemoteNotificationTypes")] UIRemoteNotificationType EnabledRemoteNotificationTypes { get; } @@ -3010,12 +2686,10 @@ interface UIApplication { [NoTV] [Since (4,0)] - [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'PushKit' instead.")] [Export ("setKeepAliveTimeout:handler:")] bool SetKeepAliveTimeout (double timeout, [NullAllowed] NSAction handler); [NoTV] - [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'PushKit' instead.")] [Export ("clearKeepAliveTimeout")] void ClearKeepAliveTimeout (); @@ -3182,17 +2856,17 @@ interface UIApplication { [Export ("beginBackgroundTaskWithName:expirationHandler:")] nint BeginBackgroundTask (string taskName, NSAction expirationHandler); - [TV (11,0)] + [NoTV] [Since (7,0)] [Field ("UIApplicationBackgroundFetchIntervalMinimum")] double BackgroundFetchIntervalMinimum { get; } - [TV (11,0)] + [NoTV] [Since (7,0)] [Field ("UIApplicationBackgroundFetchIntervalNever")] double BackgroundFetchIntervalNever { get; } - [TV (11,0)] + [NoTV] [Since (7,0)] [Export ("setMinimumBackgroundFetchInterval:")] void SetMinimumBackgroundFetchInterval (double minimumBackgroundFetchInterval); @@ -3220,12 +2894,12 @@ interface UIApplication { [Field ("UIApplicationStateRestorationSystemVersionKey")] NSString StateRestorationSystemVersionKey { get; } - [TV (11,0)] + [NoTV] [Since (7,0)] [Export ("backgroundRefreshStatus")] UIBackgroundRefreshStatus BackgroundRefreshStatus { get; } - [TV (11,0)] + [NoTV] [Since (7,0)] [Notification] [Field ("UIApplicationBackgroundRefreshStatusDidChangeNotification")] @@ -3246,7 +2920,6 @@ interface UIApplication { // from @interface UIApplication (UIUserNotificationSettings) [NoTV] [iOS (8,0)] - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UNUserNotificationCenter.GetNotificationSettings' and 'UNUserNotificationCenter.GetNotificationCategories' instead.")] [Export ("currentUserNotificationSettings")] UIUserNotificationSettings CurrentUserNotificationSettings { get; } @@ -3263,7 +2936,6 @@ interface UIApplication { // from @interface UIApplication (UIUserNotificationSettings) [NoTV] [iOS (8,0)] - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UNUserNotificationCenter.RequestAuthorization' and 'UNUserNotificationCenter.SetNotificationCategories' instead.")] [Export ("registerUserNotificationSettings:")] void RegisterUserNotificationSettings (UIUserNotificationSettings notificationSettings); @@ -3693,7 +3365,7 @@ interface UIApplicationDelegate { [Export ("application:handleEventsForBackgroundURLSession:completionHandler:")] void HandleEventsForBackgroundUrl (UIApplication application, string sessionIdentifier, NSAction completionHandler); - [TV (11,0)] + [NoTV] [Since (7,0)] [Export ("application:performFetchWithCompletionHandler:")] void PerformFetch (UIApplication application, Action completionHandler); @@ -3715,7 +3387,6 @@ interface UIApplicationDelegate { [NoTV] [iOS (8,0)] - [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UNUserNotificationCenter.RequestAuthorization' instead.")] [Export ("application:didRegisterUserNotificationSettings:")] void DidRegisterUserNotificationSettings (UIApplication application, UIUserNotificationSettings notificationSettings); @@ -3771,13 +3442,6 @@ interface UIApplicationDelegate { [iOS (10,0), TV (10,0), NoWatch] [Export ("application:userDidAcceptCloudKitShareWithMetadata:")] void UserDidAcceptCloudKitShare (UIApplication application, CKShareMetadata cloudKitShareMetadata); - -#if XAMCORE_2_0 && !TVOS - [NoTV] - [iOS (11,0), Watch (4,0)] - [Export ("application:handleIntent:completionHandler:")] - void HandleIntent (UIApplication application, INIntent intent, Action completionHandler); -#endif // XAMCORE_2_0 && !TVOS } [Static] @@ -3824,24 +3488,10 @@ interface UIBarItem : NSCoding, UIAppearance, UIAccessibility, UIAccessibilityId [Export ("titleTextAttributesForState:"), Internal] [Appearance] NSDictionary _GetTitleTextAttributes (UIControlState state); - - [NoWatch] - [iOS (11,0), TV (11,0)] - [NullAllowed, Export ("largeContentSizeImage", ArgumentSemantic.Strong)] - UIImage LargeContentSizeImage { get; set; } - - [NoWatch] - [iOS (11,0), TV (11,0)] - [Export ("largeContentSizeImageInsets", ArgumentSemantic.Assign)] - UIEdgeInsets LargeContentSizeImageInsets { get; set; } } [BaseType (typeof (UIBarItem))] - interface UIBarButtonItem : NSCoding -#if IOS - , UISpringLoadedInteractionSupporting -#endif - { + interface UIBarButtonItem : NSCoding { [Export ("initWithImage:style:target:action:")] [PostGet ("Image")] [PostGet ("Target")] @@ -4038,11 +3688,7 @@ interface UICollectionReusableView { [BaseType (typeof (UIScrollView))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: UICollectionView must be initialized with a non-nil layout parameter [DisableDefaultCtor] - interface UICollectionView : NSCoding, UIDataSourceTranslating -#if IOS - , UISpringLoadedInteractionSupporting -#endif - { + interface UICollectionView : NSCoding { [DesignatedInitializer] [Export ("initWithFrame:collectionViewLayout:"), PostGet ("CollectionViewLayout")] IntPtr Constructor (CGRect frame, UICollectionViewLayout layout); @@ -4237,41 +3883,6 @@ UICollectionViewTransitionLayout StartInteractiveTransition (UICollectionViewLay [iOS (10,0), TV (10,0)] [Export ("prefetchingEnabled")] bool PrefetchingEnabled { [Bind ("isPrefetchingEnabled")] get; set; } - - [NoWatch, NoTV] - [iOS (11,0)] - [NullAllowed, Export ("dragDelegate", ArgumentSemantic.Weak)] - IUICollectionViewDragDelegate DragDelegate { get; set; } - - [NoWatch, NoTV] - [iOS (11,0)] - [NullAllowed, Export ("dropDelegate", ArgumentSemantic.Weak)] - IUICollectionViewDropDelegate DropDelegate { get; set; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("dragInteractionEnabled")] - bool DragInteractionEnabled { get; set; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("reorderingCadence", ArgumentSemantic.Assign)] - UICollectionViewReorderingCadence ReorderingCadence { get; set; } - - [NoWatch] - [TV (11,0), iOS (11,0)] - [Export ("hasUncommittedUpdates")] - bool HasUncommittedUpdates { get; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("hasActiveDrag")] - bool HasActiveDrag { get; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("hasActiveDrop")] - bool HasActiveDrop { get; } } interface IUICollectionViewDataSourcePrefetching {} @@ -4420,11 +4031,6 @@ interface UICollectionViewDelegate : UIScrollViewDelegate { [Export ("indexPathForPreferredFocusedViewInCollectionView:")] [return: NullAllowed] NSIndexPath GetIndexPathForPreferredFocusedView (UICollectionView collectionView); - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("collectionView:shouldSpringLoadItemAtIndexPath:withContext:")] - bool ShouldSpringLoadItem (UICollectionView collectionView, NSIndexPath indexPath, IUISpringLoadedInteractionContext context); } [Since (6,0)] @@ -4449,11 +4055,6 @@ interface UICollectionViewCell { [NullAllowed] // by default this property is null [Export ("selectedBackgroundView", ArgumentSemantic.Retain)] UIView SelectedBackgroundView { get; set; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("dragStateDidChange:")] - void DragStateDidChange (UICollectionViewCellDragState dragState); } [Since (6,0)] @@ -4542,11 +4143,6 @@ interface UICollectionViewFlowLayout { [Export ("sectionInset")] UIEdgeInsets SectionInset { get; set; } - [NoWatch] - [iOS (11,0), TV (11,0)] - [Export ("sectionInsetReference", ArgumentSemantic.Assign)] - UICollectionViewFlowLayoutSectionInsetReference SectionInsetReference { get; set; } - [iOS (9,0)] [Export ("sectionHeadersPinToVisibleBounds")] bool SectionHeadersPinToVisibleBounds { get; set; } @@ -4708,15 +4304,6 @@ interface UICollectionViewLayout : NSCoding { [Export ("invalidationContextForEndingInteractiveMovementOfItemsToFinalIndexPaths:previousIndexPaths:movementCancelled:")] UICollectionViewLayoutInvalidationContext GetInvalidationContextForEndingInteractiveMovementOfItems (NSIndexPath[] finalIndexPaths, NSIndexPath[] previousIndexPaths, bool movementCancelled); - [NoWatch] - [iOS (11,0), TV (11,0)] - [Export ("developmentLayoutDirection")] - UIUserInterfaceLayoutDirection DevelopmentLayoutDirection { get; } - - [NoWatch] - [iOS (11,0), TV (11,0)] - [Export ("flipsHorizontallyInOppositeLayoutDirection")] - bool FlipsHorizontallyInOppositeLayoutDirection { get; } } [Since (6,0)] @@ -4896,11 +4483,7 @@ interface UICollectionElementKindSectionKey // returns NIL handle causing exceptions in further calls, e.g. ToString // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -CGColor not defined for the UIColor ; need to first convert colorspace. [DisableDefaultCtor] - interface UIColor : NSSecureCoding, NSCopying -#if !TVOS && !WATCH - , NSItemProviderWriting, NSItemProviderReading -#endif - { + interface UIColor : NSSecureCoding, NSCopying { [Export ("colorWithWhite:alpha:")][Static] UIColor FromWhiteAlpha (nfloat white, nfloat alpha); @@ -4913,20 +4496,6 @@ interface UIColor : NSSecureCoding, NSCopying [Export ("colorWithCGColor:")][Static] UIColor FromCGColor (CGColor color); - [iOS (11,0), TV (11,0)] - [Static] - [Export ("colorNamed:")] - [return: NullAllowed] - UIColor FromName (string name); - -#if !WATCH - [iOS (11,0), TV (11,0)] - [Static] - [Export ("colorNamed:inBundle:compatibleWithTraitCollection:")] - [return: NullAllowed] - UIColor FromName (string name, [NullAllowed] NSBundle inBundle, [NullAllowed] UITraitCollection compatibleWithTraitCollection); -#endif - [iOS (10,0), TV (10,0), Watch (3,0)] [Static] [Export ("colorWithDisplayP3Red:green:blue:alpha:")] @@ -5071,35 +4640,6 @@ [Static] [Export ("brownColor")] [Export ("getRed:green:blue:alpha:")] bool GetRGBA2 (out nfloat red, out nfloat green, out nfloat blue, out nfloat alpha); #endif - - // From the NSItemProviderReading protocol, a static method. - [Static] - [iOS (11,0), NoWatch, NoTV] - [Export ("readableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] -#if !WATCH && !TVOS - new -#endif - string[] ReadableTypeIdentifiers { get; } - - // From the NSItemProviderReading protocol, a static method. - [iOS (11,0), NoWatch, NoTV] - [Static] - [Export ("objectWithItemProviderData:typeIdentifier:error:")] - [return: NullAllowed] -#if !WATCH && !TVOS - new -#endif - UIColor GetObject (NSData data, string typeIdentifier, [NullAllowed] out NSError outError); - - // From the NSItemProviderWriting protocol, a static method. - // NSItemProviderWriting doesn't seem to be implemented for tvOS/watchOS, even though the headers say otherwise. - [NoWatch, NoTV, iOS (11,0)] - [Static] - [Export ("writableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] -#if !WATCH && !TVOS - new -#endif - string[] WritableTypeIdentifiers { get; } } #if !WATCH @@ -5764,11 +5304,6 @@ public enum UIFontTextStyle { [Since (9,0)] [Field ("UIFontTextStyleCallout")] Callout, - - [NoWatch, NoTV] - [iOS (11,0)] - [Field ("UIFontTextStyleLargeTitle")] - LargeTitle, } [Since (7,0)] @@ -5993,10 +5528,6 @@ [Internal] [Sealed] [Export ("requireGestureRecognizerToFail:")] void RequireGestureRecognizerToFail (UIGestureRecognizer otherGestureRecognizer); - [TV (11,0), iOS (11,0)] - [NullAllowed, Export ("name")] - string Name { get; set; } - // // These come from the UIGestureRecognizerProtected category, and you should only call // these methods from a subclass of UIGestureRecognizer, never externally @@ -6106,18 +5637,12 @@ interface UIGestureRecognizerDelegate { [BaseType (typeof(NSObject))] interface UIGraphicsRendererFormat : NSCopying { - [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'PreferredFormat' instead.")] [Static] [Export ("defaultFormat")] UIGraphicsRendererFormat DefaultFormat { get; } [Export ("bounds")] CGRect Bounds { get; } - - [TV (11,0), iOS (11,0)] - [Static] - [Export ("preferredFormat")] - UIGraphicsRendererFormat PreferredFormat { get; } } [iOS (10,0), TV (10,0)] @@ -6203,11 +5728,6 @@ interface UIGraphicsImageRendererFormat [Static] [Export ("defaultFormat")] UIGraphicsImageRendererFormat DefaultFormat { get; } - - [iOS (11,0), TV (11,0)] - [Static] - [Export ("formatForTraitCollection:")] - UIGraphicsImageRendererFormat GetFormat (UITraitCollection traitCollection); } [iOS (10,0), TV (10,0)] @@ -6373,18 +5893,6 @@ interface UITextInputTraits { [iOS (10, 0)] // Did not add abstract here breaking change, anyways this is optional in objc [Export ("textContentType")] NSString TextContentType { get; set; } - - [iOS (11,0), TV (11,0)] - [Export ("smartQuotesType", ArgumentSemantic.Assign)] - UITextSmartQuotesType SmartQuotesType { get; set; } - - [iOS (11,0), TV (11,0)] - [Export ("smartDashesType", ArgumentSemantic.Assign)] - UITextSmartDashesType SmartDashesType { get; set; } - - [iOS (11,0), TV (11,0)] - [Export ("smartInsertDeleteType", ArgumentSemantic.Assign)] - UITextSmartInsertDeleteType SmartInsertDeleteType { get; set; } } interface UIKeyboardEventArgs { @@ -6491,7 +5999,7 @@ interface UIKeyboard { [Since (7,0)] [BaseType (typeof (NSObject))] interface UIKeyCommand : NSCopying, NSSecureCoding { - [NullAllowed, Export ("input")] + [Export ("input")] NSString Input { get; } [Export ("modifierFlags")] @@ -7187,22 +6695,10 @@ interface UIActivityIndicatorView : NSCoding { } #endif // !WATCH - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UIItemProviderPresentationSizeProviding { - [Abstract] - [Export ("preferredPresentationSizeForItemProvider")] - CGSize PreferredPresentationSizeForItemProvider { get; } - } - [BaseType (typeof (NSObject))] interface UIImage : NSSecureCoding #if !WATCH , UIAccessibility, UIAccessibilityIdentification -#if !TVOS - , NSItemProviderWriting, NSItemProviderReading, UIItemProviderPresentationSizeProviding -#endif #endif // !WATCH { [ThreadSafe] @@ -7254,25 +6750,6 @@ [Static] [Export ("imageWithCGImage:")][Autorelease] UIImage FromImage (CIImage image); #endif // !WATCH - // From the NSItemProviderReading protocol, a static method. - [Static] - [iOS (11,0), NoWatch, NoTV] - [Export ("readableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] -#if !WATCH && !TVOS - new -#endif - string[] ReadableTypeIdentifiers { get; } - - // From the NSItemProviderReading protocol, a static method. - [Static] - [Export ("objectWithItemProviderData:typeIdentifier:error:")] - [iOS (11,0), NoWatch, NoTV] - [return: NullAllowed] -#if !WATCH && !TVOS - new -#endif - UIImage GetObject (NSData data, string typeIdentifier, [NullAllowed] out NSError outError); - [Export ("renderingMode")] [ThreadSafe] [Since (7,0)] @@ -7472,16 +6949,6 @@ [Static] [Export ("imageWithCGImage:")][Autorelease] [Export ("imageWithHorizontallyFlippedOrientation")] UIImage GetImageWithHorizontallyFlippedOrientation (); #endif - - // From the NSItemProviderWriting protocol, a static method. - // NSItemProviderWriting doesn't seem to be implemented for tvOS/watchOS, even though the headers say otherwise. - [NoWatch, NoTV, iOS (11,0)] - [Static] - [Export ("writableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] -#if !WATCH && !TVOS - new -#endif - string[] WritableTypeIdentifiers { get; } } #if !WATCH @@ -7631,11 +7098,6 @@ interface UIControl { [Export ("contentHorizontalAlignment")] UIControlContentHorizontalAlignment HorizontalAlignment { get; set; } - [NoWatch] - [iOS (11,0), TV (11,0)] - [Export ("effectiveContentHorizontalAlignment")] - UIControlContentHorizontalAlignment EffectiveContentHorizontalAlignment { get; } - [Export ("state")] UIControlState State { get; } @@ -7717,7 +7179,7 @@ interface UIBarPositioningDelegate { [Since (3,2)] [BaseType (typeof (NSObject))] [ThreadSafe] - interface UIBezierPath : NSSecureCoding, NSCopying { + interface UIBezierPath : NSCoding, NSCopying { // initWithFrame: --> unrecognized selector [Export ("bezierPath"), Static] @@ -7832,11 +7294,7 @@ interface UIBezierPath : NSSecureCoding, NSCopying { #if !WATCH [BaseType (typeof (UIControl))] - interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting -#if IOS - , UISpringLoadedInteractionSupporting -#endif - { + interface UIButton { [Export ("initWithFrame:")] IntPtr Constructor (CGRect frame); @@ -8064,11 +7522,7 @@ interface UILabel : UIContentSizeCategoryAdjusting { } [BaseType (typeof (UIView))] - interface UIImageView -#if !WATCH - : UIAccessibilityContentSizeCategoryImageAdjusting -#endif // !WATCH - { + interface UIImageView { [Export ("initWithFrame:")] IntPtr Constructor (CGRect frame); @@ -8120,14 +7574,6 @@ interface UIImageView [NoiOS] // UIKIT_AVAILABLE_TVOS_ONLY [Export ("focusedFrameGuide")] UILayoutGuide FocusedFrameGuide { get; } - - [TV (11, 0), NoWatch, NoiOS] - [Export ("overlayContentView", ArgumentSemantic.Strong)] - UIView OverlayContentView { get; } - - [TV (11,0), NoWatch, NoiOS] - [Export ("masksFocusEffectToContents")] - bool MasksFocusEffectToContents { get; set; } } [NoTV] @@ -8460,14 +7906,6 @@ interface UIImagePickerController { [Static, Export ("isFlashAvailableForCameraDevice:")] bool IsFlashAvailableForCameraDevice (UIImagePickerControllerCameraDevice cameraDevice); - [iOS (11,0)] - [Export ("imageExportPreset", ArgumentSemantic.Assign)] - UIImagePickerControllerImageUrlExportPreset ImageExportPreset { get; set; } - - [iOS (11,0)] - [Export ("videoExportPreset")] - string VideoExportPreset { get; set; } - #if XAMCORE_2_0 // manually bound (const fields) in monotouch.dll - unlike the newer fields (static properties) @@ -8487,7 +7925,6 @@ interface UIImagePickerController { NSString MediaURL { get; } #endif - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'UIImagePickerController.PHAsset' instead.")] [Field ("UIImagePickerControllerReferenceURL")] NSString ReferenceUrl { get; } @@ -8497,14 +7934,6 @@ interface UIImagePickerController { [iOS (9,1)] [Field ("UIImagePickerControllerLivePhoto")] NSString LivePhoto { get; } - - [iOS (11,0)] - [Field ("UIImagePickerControllerPHAsset")] - NSString PHAsset { get; } - - [iOS (11,0)] - [Field ("UIImagePickerControllerImageURL")] - NSString ImageUrl { get; } } // UINavigationControllerDelegate, UIImagePickerControllerDelegate @@ -8758,22 +8187,6 @@ interface UINavigationBar : UIBarPositioning, NSCoding { [Export ("backgroundImageForBarPosition:barMetrics:")] UIImage GetBackgroundImage (UIBarPosition barPosition, UIBarMetrics barMetrics); - [NoTV] - [iOS (11,0)] - [Export ("prefersLargeTitles")] - bool PrefersLargeTitles { get; set; } - - [NoTV] - [iOS (11,0)] - [Internal, NullAllowed, Export ("largeTitleTextAttributes", ArgumentSemantic.Copy)] - [Appearance] - NSDictionary _LargeTitleTextAttributes { get; set; } - - [NoTV] - [iOS (11,0)] - [Wrap ("_LargeTitleTextAttributes")] - [Appearance] - UIStringAttributes LargeTitleTextAttributes { get; set; } } [BaseType (typeof (UIBarPositioningDelegate))] @@ -8869,21 +8282,6 @@ UIBarButtonItem RightBarButtonItem { [Since (5,0)] [Export ("setRightBarButtonItems:animated:")][PostGet ("RightBarButtonItems")] void SetRightBarButtonItems (UIBarButtonItem [] items, bool animated); - - [NoTV] - [iOS (11,0)] - [Export ("largeTitleDisplayMode", ArgumentSemantic.Assign)] - UINavigationItemLargeTitleDisplayMode LargeTitleDisplayMode { get; set; } - - [NoTV] - [iOS (11,0)] - [NullAllowed, Export ("searchController", ArgumentSemantic.Retain)] - UISearchController SearchController { get; set; } - - [NoTV] - [iOS (11,0)] - [Export ("hidesSearchBarWhenScrolling")] - bool HidesSearchBarWhenScrolling { get; set; } } [BaseType (typeof (UIViewController))] @@ -9375,22 +8773,6 @@ interface UIPasteboard { [NoWatch, NoTV, iOS (10, 0)] [Export ("hasColors")] bool HasColors { get; } - - [NoWatch, NoTV, iOS (11,0)] - [Export ("itemProviders", ArgumentSemantic.Copy)] - NSItemProvider[] ItemProviders { get; set; } - - [NoWatch, NoTV, iOS (11,0)] - [Export ("setItemProviders:localOnly:expirationDate:")] - void SetItemProviders (NSItemProvider[] itemProviders, bool localOnly, [NullAllowed] NSDate expirationDate); - - [NoWatch, NoTV, iOS (11,0)] - [Export ("setObjects:")] - void SetObjects (INSItemProviderWriting[] objects); - - [NoWatch, NoTV, iOS (11,0)] - [Export ("setObjects:localOnly:expirationDate:")] - void SetObjects (INSItemProviderWriting[] objects, bool localOnly, [NullAllowed] NSDate expirationDate); } [NoTV] @@ -9519,16 +8901,6 @@ interface UIPickerViewAccessibilityDelegate { [Export ("pickerView:accessibilityHintForComponent:")] string GetAccessibilityHint (UIPickerView pickerView, nint component); - - [TV (11,0), iOS (11,0)] - [Export ("pickerView:accessibilityAttributedLabelForComponent:")] - [return: NullAllowed] - NSAttributedString GetAccessibilityAttributedLabel (UIPickerView pickerView, nint component); - - [TV (11,0), iOS (11,0)] - [Export ("pickerView:accessibilityAttributedHintForComponent:")] - [return: NullAllowed] - NSAttributedString GetAccessibilityAttributedHint (UIPickerView pickerView, nint component); } [NoTV] @@ -9817,14 +9189,7 @@ partial interface UIReferenceLibraryViewController : NSCoding { } [BaseType (typeof (NSObject))] - interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus -#if !TVOS - , UIAccessibilityDragging -#endif // !TVOS -#if IOS - , UIPasteConfigurationSupporting -#endif // IOS - { + interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus { [Export ("nextResponder")] UIResponder NextResponder { get; } @@ -10097,11 +9462,6 @@ UIScreenMode CurrentMode { [Notification] NSString DidConnectNotification { get; } - [iOS (11,0), TV (11,0)] - [Field ("UIScreenCapturedDidChangeNotification")] - [Notification] - NSString CapturedDidChangeNotification { get; } - [Since (7,0)] [return: NullAllowed] [Export ("snapshotViewAfterScreenUpdates:")] @@ -10138,10 +9498,6 @@ UIScreenMode CurrentMode { [iOS (10, 0)] [NullAllowed, Export ("focusedItem", ArgumentSemantic.Weak)] IUIFocusItem FocusedItem { get; } - - [iOS (11,0), TV (11,0)] - [Export ("captured")] - bool Captured { [Bind ("isCaptured")] get; } } [BaseType (typeof (UIView), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UIScrollViewDelegate)})] @@ -10158,27 +9514,6 @@ interface UIScrollView { [Export ("contentInset")] UIEdgeInsets ContentInset { get; set; } - [iOS (11,0), TV (11,0)] - [Export ("adjustedContentInset")] - UIEdgeInsets AdjustedContentInset { get; } - - [iOS (11,0), TV (11,0)] - [Export ("adjustedContentInsetDidChange")] - [Advice ("You must call the base method when overriding.")] // [RequiresSuper] - void AdjustedContentInsetDidChange (); - - [iOS (11,0), TV (11,0)] - [Export ("contentInsetAdjustmentBehavior", ArgumentSemantic.Assign)] - UIScrollViewContentInsetAdjustmentBehavior ContentInsetAdjustmentBehavior { get; set; } - - [iOS (11,0), TV (11,0)] - [Export ("contentLayoutGuide", ArgumentSemantic.Strong)] - UILayoutGuide ContentLayoutGuide { get; } - - [iOS (11,0), TV (11,0)] - [Export ("frameLayoutGuide", ArgumentSemantic.Strong)] - UILayoutGuide FrameLayoutGuide { get; } - [Export ("delegate", ArgumentSemantic.Assign)][NullAllowed] NSObject WeakDelegate { get; set; } @@ -10301,10 +9636,8 @@ interface UIScrollView { [Export ("keyboardDismissMode")] UIScrollViewKeyboardDismissMode KeyboardDismissMode { get; set; } - [NoWatch] - [iOS (11,0)] + [NoWatch, NoiOS] [TV (9,0)] - [Deprecated (PlatformName.TvOS, 11, 0, message: "Configuring the 'PanGestureRecognizer' for indirect scrolling automatically supports directional presses now, so this property is no longer useful.")] [Export ("directionalPressGestureRecognizer")] UIGestureRecognizer DirectionalPressGestureRecognizer { get; } @@ -10359,10 +9692,6 @@ interface UIScrollViewDelegate { [Since (5,0)] [Export ("scrollViewWillEndDragging:withVelocity:targetContentOffset:"), EventArgs ("WillEndDragging")] void WillEndDragging (UIScrollView scrollView, CGPoint velocity, ref CGPoint targetContentOffset); - - [iOS (11,0), TV (11,0)] - [Export ("scrollViewDidChangeAdjustedContentInset:")] - void DidChangeAdjustedContentInset (UIScrollView scrollView); } [Protocol, Model] @@ -10370,11 +9699,6 @@ interface UIScrollViewDelegate { interface UIScrollViewAccessibilityDelegate { [Export ("accessibilityScrollStatusForScrollView:")] string GetAccessibilityScrollStatus (UIScrollView scrollView); - - [TV (11,0), iOS (11,0)] - [Export ("accessibilityAttributedScrollStatusForScrollView:")] - [return: NullAllowed] - NSAttributedString GetAccessibilityAttributedScrollStatus (UIScrollView scrollView); } [BaseType (typeof (UIView), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UISearchBarDelegate)})] @@ -10821,11 +10145,7 @@ partial interface UISearchResultsUpdating { } [BaseType (typeof(UIControl))] - interface UISegmentedControl -#if IOS - : UISpringLoadedInteractionSupporting -#endif - { + interface UISegmentedControl { [Export ("initWithItems:")] IntPtr Constructor (NSArray items); @@ -11226,11 +10546,7 @@ interface UISwitch : NSCoding { } [BaseType (typeof (UIView), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UITabBarDelegate)})] - interface UITabBar -#if IOS - : UISpringLoadedInteractionSupporting -#endif - { + interface UITabBar { [Export ("initWithFrame:")] IntPtr Constructor (CGRect frame); @@ -11446,11 +10762,7 @@ IUIViewControllerAnimatedTransitioning GetAnimationControllerForTransition (UITa } [BaseType (typeof (UIBarItem))] - interface UITabBarItem : NSCoding -#if IOS - , UISpringLoadedInteractionSupporting -#endif - { + interface UITabBarItem : NSCoding { [Export ("enabled")][Override] bool Enabled { [Bind ("isEnabled")] get; set; } @@ -11534,11 +10846,7 @@ interface UITabBarItem : NSCoding } [BaseType (typeof(UIScrollView))] - interface UITableView : NSCoding, UIDataSourceTranslating -#if IOS - , UISpringLoadedInteractionSupporting -#endif - { + interface UITableView : NSCoding { [Export ("initWithFrame:")] IntPtr Constructor (CGRect frame); @@ -11827,52 +11135,7 @@ interface UITableView : NSCoding, UIDataSourceTranslating [iOS (10,0), TV (10,0)] [NullAllowed, Export ("prefetchDataSource", ArgumentSemantic.Weak)] IUITableViewDataSourcePrefetching PrefetchDataSource { get; set; } - - [NoWatch, NoTV] - [iOS (11,0)] - [NullAllowed, Export ("dragDelegate", ArgumentSemantic.Weak)] - IUITableViewDragDelegate DragDelegate { get; set; } - - [NoWatch, NoTV] - [iOS (11,0)] - [NullAllowed, Export ("dropDelegate", ArgumentSemantic.Weak)] - IUITableViewDropDelegate DropDelegate { get; set; } - - [NoWatch] - [TV (11,0), iOS (11,0)] - [Export ("separatorInsetReference", ArgumentSemantic.Assign)] - UITableViewSeparatorInsetReference SeparatorInsetReference { get; set; } - - [NoWatch] - [TV (11,0), iOS (11,0)] - [Async] - [Export ("performBatchUpdates:completion:")] - void PerformBatchUpdates ([NullAllowed] Action updates, [NullAllowed] Action completion); - [NoWatch] - [TV (11,0), iOS (11,0)] - [Export ("hasUncommittedUpdates")] - bool HasUncommittedUpdates { get; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("dragInteractionEnabled")] - bool DragInteractionEnabled { get; set; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("hasActiveDrag")] - bool HasActiveDrag { get; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("hasActiveDrop")] - bool HasActiveDrop { get; } - - [NoWatch] - [TV (11,0), iOS (11,0)] - [Export ("insetsContentViewsToSafeArea")] - bool InsetsContentViewsToSafeArea { get; set; } } interface IUITableViewDataSourcePrefetching {} @@ -12078,25 +11341,6 @@ interface UITableViewSource { [Export ("indexPathForPreferredFocusedViewInTableView:")] [return: NullAllowed] NSIndexPath GetIndexPathForPreferredFocusedView (UITableView tableView); - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:")] - [return: NullAllowed] - UISwipeActionsConfiguration GetLeadingSwipeActionsConfiguration (UITableView tableView, NSIndexPath indexPath); - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:")] - [return: NullAllowed] - UISwipeActionsConfiguration GetTrailingSwipeActionsConfiguration (UITableView tableView, NSIndexPath indexPath); - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("tableView:shouldSpringLoadRowAtIndexPath:withContext:")] - bool ShouldSpringLoadRow (UITableView tableView, NSIndexPath indexPath, IUISpringLoadedInteractionContext context); - - // WARNING: If you add more methods here, add them to UITableViewController as well. } [BaseType (typeof (UIView))] @@ -12205,16 +11449,6 @@ interface UITableViewCell : NSCoding, UIGestureRecognizerDelegate { [iOS (9,0)] // introduced in Xcode 7.1 SDK (iOS 9.1 but hidden in 9.0) [Export ("focusStyle", ArgumentSemantic.Assign)] UITableViewCellFocusStyle FocusStyle { get; set; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("dragStateDidChange:")] - void DragStateDidChange (UITableViewCellDragState dragState); - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("userInteractionEnabledWhileDragging")] - bool UserInteractionEnabledWhileDragging { get; set; } } [BaseType (typeof (UIViewController))] @@ -12429,23 +11663,6 @@ interface UITableViewDelegate { [Export ("indexPathForPreferredFocusedViewInTableView:")] [return: NullAllowed] NSIndexPath GetIndexPathForPreferredFocusedView (UITableView tableView); - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:")] - [return: NullAllowed] - UISwipeActionsConfiguration GetLeadingSwipeActionsConfiguration (UITableView tableView, NSIndexPath indexPath); - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:")] - [return: NullAllowed] - UISwipeActionsConfiguration GetTrailingSwipeActionsConfiguration (UITableView tableView, NSIndexPath indexPath); - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("tableView:shouldSpringLoadRowAtIndexPath:withContext:")] - bool ShouldSpringLoadRow (UITableView tableView, NSIndexPath indexPath, IUISpringLoadedInteractionContext context); } [Since (6,0)] @@ -12474,7 +11691,6 @@ interface UITableViewHeaderFooterView : UIAppearance, NSCoding { [Export ("initWithReuseIdentifier:")] IntPtr Constructor (NSString reuseIdentifier); - [Advice ("You must call the base method when overriding.")] // [RequiresSuper] [Export ("prepareForReuse")] void PrepareForReuse (); @@ -12505,11 +11721,7 @@ interface UITableViewRowAction : NSCopying { [BaseType (typeof (UIControl), Delegates=new string [] { "WeakDelegate" })] // , Events=new Type [] {typeof(UITextFieldDelegate)})] custom logic needed, see https://bugzilla.xamarin.com/show_bug.cgi?id=53174 - interface UITextField : UITextInput, UIContentSizeCategoryAdjusting -#if IOS - , UITextDraggable, UITextDroppable, UITextPasteConfigurationSupporting -#endif // IOS - { + interface UITextField : UITextInput, UIContentSizeCategoryAdjusting { [Export ("initWithFrame:")] IntPtr Constructor (CGRect frame); @@ -12689,11 +11901,7 @@ interface UITextFieldDelegate { } [BaseType (typeof (UIScrollView), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UITextViewDelegate)})] - interface UITextView : UITextInput, NSCoding, UIContentSizeCategoryAdjusting -#if IOS - , UITextDraggable, UITextDroppable, UITextPasteConfigurationSupporting -#endif // IOS - { + interface UITextView : UITextInput, NSCoding, UIContentSizeCategoryAdjusting { [Export ("initWithFrame:")] IntPtr Constructor (CGRect frame); @@ -13635,30 +12843,14 @@ [Static] [Export ("areAnimationsEnabled")] [Export ("layoutMargins")] UIEdgeInsets LayoutMargins { get; set; } - [iOS (11,0), TV (11,0)] - [Export ("directionalLayoutMargins", ArgumentSemantic.Assign)] - NSDirectionalEdgeInsets DirectionalLayoutMargins { get; set; } - [iOS(8,0)] [Export ("preservesSuperviewLayoutMargins")] bool PreservesSuperviewLayoutMargins { get; set; } - [iOS (11,0), TV (11,0)] - [Export ("insetsLayoutMarginsFromSafeArea")] - bool InsetsLayoutMarginsFromSafeArea { get; set; } - [iOS(8,0)] [Export ("layoutMarginsDidChange")] void LayoutMarginsDidChange (); - [iOS (11,0), TV (11,0)] - [Export ("safeAreaInsets")] - UIEdgeInsets SafeAreaInsets { get; } - - [iOS (11,0), TV (11,0)] - [Export ("safeAreaInsetsDidChange")] - void SafeAreaInsetsDidChange (); - [iOS (9,0)] [Static] [Export ("userInterfaceLayoutDirectionForSemanticContentAttribute:")] @@ -13685,10 +12877,6 @@ [Static] [Export ("areAnimationsEnabled")] [Export ("readableContentGuide", ArgumentSemantic.Strong)] UILayoutGuide ReadableContentGuide { get; } - [iOS (11,0), TV (11,0)] - [Export ("safeAreaLayoutGuide", ArgumentSemantic.Strong)] - UILayoutGuide SafeAreaLayoutGuide { get; } - [iOS (9,0)] [Export ("inheritedAnimationDuration")] [Static] @@ -13763,24 +12951,6 @@ [Static] [Export ("areAnimationsEnabled")] [iOS (9,0)] // added in Xcode 7.1 / iOS 9.1 SDK [Export ("canBecomeFocused")] new bool CanBecomeFocused { get; } - - [NoWatch, NoTV, iOS (11,0)] - [Export ("addInteraction:")] - void AddInteraction (IUIInteraction interaction); - - [NoWatch, NoTV, iOS (11,0)] - [Export ("removeInteraction:")] - void RemoveInteraction (IUIInteraction interaction); - - [NoWatch, NoTV, iOS (11, 0)] - [Export ("interactions", ArgumentSemantic.Copy)] - IUIInteraction[] Interactions { get; set; } - - // UIAccessibilityInvertColors category - [NoWatch] - [TV (11,0), iOS (11,0)] - [Export ("accessibilityIgnoresInvertColors")] - bool AccessibilityIgnoresInvertColors { get; set; } } [Category, BaseType (typeof (UIView))] @@ -13988,13 +13158,13 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer // 3.2 extensions from MoviePlayer [NoMac] [NoTV] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] + [Availability (Introduced = Platform.iOS_3_2, Deprecated = Platform.iOS_9_0)] [Export ("presentMoviePlayerViewControllerAnimated:")] void PresentMoviePlayerViewController (MPMoviePlayerViewController moviePlayerViewController); [NoMac] [NoTV] - [Availability (Deprecated = Platform.iOS_9_0, Message = "Use 'AVPlayerViewController' (AVKit) instead.")] + [Availability (Introduced = Platform.iOS_3_2, Deprecated = Platform.iOS_9_0)] [Export ("dismissMoviePlayerViewControllerAnimated")] void DismissMoviePlayerViewController (); @@ -14206,8 +13376,6 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer 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.")] [Export ("automaticallyAdjustsScrollViewInsets", ArgumentSemantic.Assign)] bool AutomaticallyAdjustsScrollViewInsets { get; set; } @@ -14254,14 +13422,10 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer 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.")] [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.")] [Export ("bottomLayoutGuide")] IUILayoutSupport BottomLayoutGuide { get; } @@ -14364,75 +13528,6 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer [iOS (10,0), TV (10,0)] [Export ("restoresFocusAfterTransition")] bool RestoresFocusAfterTransition { get; set; } - - [NoWatch, NoiOS] - [TV (11,0)] - [Export ("preferredUserInterfaceStyle")] - UIUserInterfaceStyle PreferredUserInterfaceStyle { get; } - - [NoWatch, NoiOS] - [TV (11,0)] - [Export ("setNeedsUserInterfaceAppearanceUpdate")] - void SetNeedsUserInterfaceAppearanceUpdate (); - - [NoWatch, NoiOS] - [TV (11, 0)] - [NullAllowed, Export ("childViewControllerForUserInterfaceStyle")] - UIViewController ChildViewControllerForUserInterfaceStyle { get; } - - [iOS (11,0), TV (11,0)] - [Export ("additionalSafeAreaInsets", ArgumentSemantic.Assign)] - UIEdgeInsets AdditionalSafeAreaInsets { get; set; } - - [iOS (11,0), TV (11,0)] - [Export ("systemMinimumLayoutMargins")] - NSDirectionalEdgeInsets SystemMinimumLayoutMargins { get; } - - [iOS (11,0), TV (11,0)] - [Export ("viewRespectsSystemMinimumLayoutMargins")] - bool ViewRespectsSystemMinimumLayoutMargins { get; set; } - - [iOS (11,0), TV (11,0)] - [Export ("viewLayoutMarginsDidChange")] - [Advice ("You must call the base method when overriding.")] // [RequiresSuper] - void ViewLayoutMarginsDidChange (); - - [iOS (11,0), TV (11,0)] - [Export ("viewSafeAreaInsetsDidChange")] - [Advice ("You must call the base method when overriding.")] // [RequiresSuper] - void ViewSafeAreaInsetsDidChange (); - - [NoWatch, NoTV] - [iOS (11,0)] - [NullAllowed, Export ("childViewControllerForScreenEdgesDeferringSystemGestures")] - UIViewController ChildViewControllerForScreenEdgesDeferringSystemGestures { get; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("preferredScreenEdgesDeferringSystemGestures")] - UIRectEdge PreferredScreenEdgesDeferringSystemGestures { get; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("setNeedsUpdateOfScreenEdgesDeferringSystemGestures")] - void SetNeedsUpdateOfScreenEdgesDeferringSystemGestures (); - - // UIHomeIndicatorAutoHidden (UIViewController) category - - [NoWatch, NoTV] - [iOS (11,0)] - [NullAllowed, Export ("childViewControllerForHomeIndicatorAutoHidden")] - UIViewController ChildViewControllerForHomeIndicatorAutoHidden { get; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("prefersHomeIndicatorAutoHidden")] - bool PrefersHomeIndicatorAutoHidden { get; } - - [NoWatch, NoTV] - [iOS (11,0)] - [Export ("setNeedsUpdateOfHomeIndicatorAutoHidden")] - void SetNeedsUpdateOfHomeIndicatorAutoHidden (); } [Since (7,0)] @@ -15076,14 +14171,6 @@ interface UITextContentType { [Field ("UITextContentTypeCreditCardNumber")] NSString CreditCardNumber { get; } - - [iOS (11,0), TV (11,0)] - [Field ("UITextContentTypeUsername")] - NSString Username { get; } - - [iOS (11,0), TV (11,0)] - [Field ("UITextContentTypePassword")] - NSString Password { get; } } [Since (3,2)] @@ -15154,10 +14241,6 @@ interface UISplitViewController { [iOS (8,0)] [Field ("UISplitViewControllerAutomaticDimension")] nfloat AutomaticDimension { get; } - - [iOS (11,0), TV (11,0)] - [Export ("primaryEdge", ArgumentSemantic.Assign)] - UISplitViewControllerPrimaryEdge PrimaryEdge { get; set; } } [Since (3,2)] @@ -16326,33 +15409,8 @@ partial interface UIInputViewController : UITextInputDelegate { [iOS (10,0), TV (10,0)] [Export ("handleInputModeListFromView:withEvent:")] void HandleInputModeList (UIView fromView, UIEvent withEvent); - - [iOS (11,0), TV (11,0)] - [Export ("hasFullAccess")] - bool HasFullAccess { get; } - - [iOS (11,0), TV (11,0)] - [Export ("needsInputModeSwitchKey")] - bool NeedsInputModeSwitchKey { get; } } - [NoWatch, NoTV, iOS (11,0)] - [Protocol] - interface UIInteraction - { - [Abstract] - [Export ("view", ArgumentSemantic.Weak)] - UIView View { get; } - - [Abstract] - [Export ("willMoveToView:")] - void WillMoveToView ([NullAllowed] UIView view); - - [Abstract] - [Export ("didMoveToView:")] - void DidMoveToView ([NullAllowed] UIView view); - } - [NoWatch] [iOS (8,0)] [Protocol, Model] @@ -16378,24 +15436,6 @@ partial interface UITextDocumentProxy : UIKeyInput { [iOS (10, 0)] [NullAllowed, Export ("documentInputMode")] UITextInputMode DocumentInputMode { get; } - - // New abstract, breaks ABI - // Radar: 33685383 -#if XAMCORE_4_0 - [Abstract] -#endif - [iOS (11,0)] - [NullAllowed, Export ("selectedText")] - string SelectedText { get; } - - // New abstract, breaks ABI - // Radar: 33685383 -#if XAMCORE_4_0 - [Abstract] -#endif - [iOS (11,0)] - [Export ("documentIdentifier", ArgumentSemantic.Copy)] - NSUuid DocumentIdentifier { get; } } [NoWatch] @@ -16634,7 +15674,6 @@ partial interface UIMutableUserNotificationAction { [NoWatch] [NoTV] [iOS (8,0)] - [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'UIDocumentPickerViewController' instead.")] [BaseType (typeof (UIViewController), Delegates=new string [] {"Delegate"}, Events=new Type [] {typeof (UIDocumentMenuDelegate)})] [DisableDefaultCtor] // NSInvalidArgumentException Reason: You cannot initialize a UIDocumentMenuViewController except by the initWithDocumentTypes:inMode: and initWithURL:inMode: initializers. partial interface UIDocumentMenuViewController : NSCoding { @@ -16687,16 +15726,10 @@ partial interface UIDocumentPickerViewController : NSCoding { [Export ("initWithDocumentTypes:inMode:")] IntPtr Constructor (string [] allowedUTIs, UIDocumentPickerMode mode); - [Advice ("This method will be deprecated in a future release and should be avoided. Instead, use 'UIDocumentPickerViewController (NSUrl[], UIDocumentPickerMode)'.")] [DesignatedInitializer] [Export ("initWithURL:inMode:")] IntPtr Constructor (NSUrl url, UIDocumentPickerMode mode); - [iOS (11,0)] - [Export ("initWithURLs:inMode:")] - [DesignatedInitializer] - IntPtr Constructor (NSUrl[] urls, UIDocumentPickerMode mode); - [Export ("delegate", ArgumentSemantic.Weak), NullAllowed] NSObject WeakDelegate { get; set; } @@ -16706,10 +15739,6 @@ partial interface UIDocumentPickerViewController : NSCoding { [Export ("documentPickerMode", ArgumentSemantic.Assign)] UIDocumentPickerMode DocumentPickerMode { get; } - - [iOS (11,0)] - [Export ("allowsMultipleSelection")] - bool AllowsMultipleSelection { get; set; } } [NoWatch] @@ -16718,17 +15747,10 @@ partial interface UIDocumentPickerViewController : NSCoding { [Protocol, Model] [BaseType (typeof (NSObject))] partial interface UIDocumentPickerDelegate { - [Deprecated (PlatformName.iOS, 11, 0, message: "Implement 'DidPickDocument (UIDocumentPickerViewController, NSUrl[])' instead.")] -#if !XAMCORE_4_0 [Abstract] -#endif [Export ("documentPicker:didPickDocumentAtURL:"), EventArgs ("UIDocumentPicked")] void DidPickDocument (UIDocumentPickerViewController controller, NSUrl url); - [iOS (11,0)] - [Export ("documentPicker:didPickDocumentsAtURLs:"), EventArgs ("UIDocumentPickedAtUrls"), EventName ("DidPickDocumentAtUrls")] - void DidPickDocument (UIDocumentPickerViewController controller, NSUrl[] urls); - [Export ("documentPickerWasCancelled:")] void WasCancelled (UIDocumentPickerViewController controller); } @@ -16800,15 +15822,6 @@ interface UIAccessibilityReadingContent { [Abstract] [Export ("accessibilityPageContent")] string GetAccessibilityPageContent (); - - [TV (11,0), iOS (11,0)] - [Export ("accessibilityAttributedContentForLineNumber:")] - [return: NullAllowed] - NSAttributedString GetAccessibilityAttributedContent (nint lineNumber); - - [TV (11,0), iOS (11,0)] - [NullAllowed, Export ("accessibilityAttributedPageContent")] - NSAttributedString GetAccessibilityAttributedPageContent (); } [NoWatch] @@ -16832,7 +15845,6 @@ interface UIGuidedAccessRestrictionDelegate { string GetDetailTextForGuidedAccessRestriction (string restrictionIdentifier); } - [DisableDefaultCtor] // [Assert] -init is not a useful initializer for this class. Use one of the designated initializers instead [NoWatch] [iOS (9,0)] // added in Xcode 7.1 / iOS 9.1 SDK [BaseType (typeof (UIFocusUpdateContext))] @@ -16866,16 +15878,6 @@ interface UICubicTimingParameters : UITimingCurveProvider [DesignatedInitializer] IntPtr Constructor (CGPoint point1, CGPoint point2); } - - interface IUIFocusAnimationContext {} - - [iOS (11,0)] - [Protocol] - interface UIFocusAnimationContext { - [Abstract] - [Export ("duration")] - double Duration { get; } - } [NoWatch] [iOS (9,0)] @@ -16884,16 +15886,6 @@ interface UIFocusAnimationCoordinator { [Export ("addCoordinatedAnimations:completion:")] [Async] void AddCoordinatedAnimations ([NullAllowed] Action animations, [NullAllowed] Action completion); - - [Async] - [TV (11,0), iOS (11,0)] - [Export ("addCoordinatedFocusingAnimations:completion:")] - void AddCoordinatedFocusingAnimations ([NullAllowed] Action animations, [NullAllowed] Action completion); - - [Async] - [TV (11,0), iOS (11,0)] - [Export ("addCoordinatedUnfocusingAnimations:completion:")] - void AddCoordinatedUnfocusingAnimations ([NullAllowed] Action animations, [NullAllowed] Action completion); } [NoWatch] @@ -16922,7 +15914,6 @@ interface UIFocusItem : UIFocusEnvironment bool CanBecomeFocused { get; } } - [DisableDefaultCtor] // [Assert] -init is not a useful initializer for this class. Use one of the designated initializers instead [NoWatch] [iOS (9,0)] [BaseType (typeof(NSObject))] @@ -16943,71 +15934,6 @@ interface UIFocusUpdateContext { [iOS (10,0), TV (10,0)] [NullAllowed, Export ("nextFocusedItem", ArgumentSemantic.Weak)] IUIFocusItem NextFocusedItem { get; } - - [iOS (11,0), TV (11,0)] - [Notification] - [Field ("UIFocusDidUpdateNotification")] - NSString DidUpdateNotification { get; } - - [iOS (11,0), TV (11,0)] - [Notification] - [Field ("UIFocusMovementDidFailNotification")] - NSString MovementDidFailNotification { get; } - - [iOS (11,0), TV (11,0)] - [Field ("UIFocusUpdateContextKey")] - NSString Key { get; } - - [iOS (11,0), TV (11,0)] - [Field ("UIFocusUpdateAnimationCoordinatorKey")] - NSString AnimationCoordinatorKey { get; } - } - - [NoWatch] - [iOS (11,0), TV (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UIFocusSystem { - [Static] - [Export ("environment:containsEnvironment:")] - bool Contains (IUIFocusEnvironment environment, IUIFocusEnvironment otherEnvironment); - - [NoiOS] - [Static] - [Export ("registerURL:forSoundIdentifier:")] - void RegisterUrl (NSUrl soundFileUrl, NSString identifier); - - // The 2 values associated with the 'UIFocusSoundIdentifier' smart enum cannot be used. - // See https://developer.apple.com/documentation/uikit/uifocussystem/2887479-register - // Do not specify one of the UIKit sound identifiers (such as default); doing so will cause an immediate assertion failure and crash your app. - } - - interface IUIFocusDebuggerOutput {} - - [NoWatch] - [iOS (11,0), TV (11,0)] - [Protocol] - interface UIFocusDebuggerOutput {} - - [NoWatch] - [iOS (11,0), TV (11,0)] - [BaseType (typeof(NSObject))] - interface UIFocusDebugger { - [Static] - [Export ("help")] - IUIFocusDebuggerOutput Help { get; } - - [Static] - [Export ("status")] - IUIFocusDebuggerOutput Status { get; } - - [Static] - [Export ("checkFocusabilityForItem:")] - IUIFocusDebuggerOutput CheckFocusability (IUIFocusItem item); - - [Static] - [Export ("simulateFocusUpdateRequestFromEnvironment:")] - IUIFocusDebuggerOutput SimulateFocusUpdateRequest (IUIFocusEnvironment environment); } [NoWatch] @@ -17106,17 +16032,6 @@ interface UITableViewFocusUpdateContext { NSIndexPath NextFocusedIndexPath { [return: NullAllowed] get; } } - [NoWatch, NoiOS] - [TV (11,0)] - public enum UIFocusSoundIdentifier { - - [Field ("UIFocusSoundIdentifierNone")] - None, - - [Field ("UIFocusSoundIdentifierDefault")] - Default, - } - interface IUIFocusEnvironment {} [NoWatch] [iOS (9,0)] @@ -17157,12 +16072,6 @@ interface UIFocusEnvironment { [iOS (10, 0)] [Export ("preferredFocusEnvironments", ArgumentSemantic.Copy)] IUIFocusEnvironment[] PreferredFocusEnvironments { get; } - - [NoiOS] - [TV (11,0)] - [Export ("soundIdentifierForFocusUpdateInContext:")] - [return: NullAllowed] - NSString GetSoundIdentifier (UIFocusUpdateContext context); } #endif // !WATCH @@ -17182,1329 +16091,4 @@ interface UITextAttributesConstants { [Field ("UITextAttributeTextShadowOffset")] NSString TextShadowOffset { get; } } - -#if !WATCH -#region Drag and Drop - interface IUIInteraction {} - interface IUIDropSession {} - interface IUIDragDropSession {} - interface IUIDragAnimating {} - interface IUIDragSession {} - interface IUIDragInteractionDelegate {} - interface IUIDropInteractionDelegate {} - interface IUICollectionViewDragDelegate {} - interface IUICollectionViewDropDelegate {} - interface IUICollectionViewDropCoordinator {} - interface IUICollectionViewDropItem {} - interface IUICollectionViewDropPlaceholderContext {} - interface IUITableViewDragDelegate {} - interface IUITableViewDropDelegate {} - interface IUITableViewDropCoordinator {} - interface IUITableViewDropItem {} - interface IUITableViewDropPlaceholderContext {} - interface IUITextDragDelegate {} - interface IUITextDraggable {} - interface IUITextDragRequest {} - interface IUITextDroppable {} - interface IUITextDropDelegate {} - interface IUITextDropRequest {} - - [NoWatch, NoTV, iOS (11,0)] - [Protocol] - interface UIDragAnimating - { - [Abstract] - [Export ("addAnimations:")] - void AddAnimations (Action animations); - - [Abstract] - [Export ("addCompletion:")] - void AddCompletion (Action completion); - } - - [NoWatch, NoTV, iOS (11,0)] - [Protocol] - interface UIDragDropSession - { - [Abstract] - [Export ("items")] - UIDragItem[] Items { get; } - - [Abstract] - [Export ("locationInView:")] - CGPoint LocationInView ([NullAllowed] UIView view); - - [Abstract] - [Export ("allowsMoveOperation")] - bool AllowsMoveOperation { get; } - - [Abstract] - [Export ("restrictedToDraggingApplication")] - bool RestrictedToDraggingApplication { [Bind ("isRestrictedToDraggingApplication")] get; } - - [Abstract] - [Export ("hasItemsConformingToTypeIdentifiers:")] - bool HasConformingItems (string[] typeIdentifiers); - - [Abstract] - [Export ("canLoadObjectsOfClass:")] - bool CanLoadObjects (Class itemProviderReadingClass); - } - - [NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UIDragItem - { - [Export ("initWithItemProvider:")] - [DesignatedInitializer] - IntPtr Constructor (NSItemProvider itemProvider); - - [Export ("itemProvider")] - NSItemProvider ItemProvider { get; } - - [NullAllowed, Export ("localObject", ArgumentSemantic.Strong)] - NSObject LocalObject { get; set; } - - [NullAllowed, Export ("previewProvider", ArgumentSemantic.Copy)] - Func PreviewProvider { get; set; } - } - - [NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UIDragPreview : NSCopying - { - [Export ("initWithView:parameters:")] - [DesignatedInitializer] - IntPtr Constructor (UIView view, UIDragPreviewParameters parameters); - - [Export ("initWithView:")] - IntPtr Constructor (UIView view); - - [Export ("view")] - UIView View { get; } - - [Export ("parameters", ArgumentSemantic.Copy)] - UIDragPreviewParameters Parameters { get; } - - // From URLPreviews (UIDragPreview) category - - [Static] - [Export ("previewForURL:")] - UIDragPreview GetPreview (NSUrl url); - - [Static] - [Export ("previewForURL:title:")] - UIDragPreview GetPreview (NSUrl url, [NullAllowed] string title); - } - - [NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(NSObject))] - interface UIDragPreviewParameters : NSCopying - { - [Export ("initWithTextLineRects:")] - IntPtr Constructor (NSValue[] textLineRects); - - [NullAllowed, Export ("visiblePath", ArgumentSemantic.Copy)] - UIBezierPath VisiblePath { get; set; } - - [Export ("backgroundColor", ArgumentSemantic.Copy)] - UIColor BackgroundColor { get; set; } - } - - [NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UIDragPreviewTarget : NSCopying - { - [Export ("initWithContainer:center:transform:")] - [DesignatedInitializer] - IntPtr Constructor (UIView container, CGPoint center, CGAffineTransform transform); - - [Export ("initWithContainer:center:")] - IntPtr Constructor (UIView container, CGPoint center); - - [Export ("container")] - UIView Container { get; } - - [Export ("center")] - CGPoint Center { get; } - - [Export ("transform")] - CGAffineTransform Transform { get; } - } - - [NoWatch, NoTV, iOS (11,0)] - [Protocol] - interface UIDragSession : UIDragDropSession - { - [Abstract] - [NullAllowed, Export ("localContext", ArgumentSemantic.Strong)] - NSObject LocalContext { get; set; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UIDragInteraction : UIInteraction { - [Export ("initWithDelegate:")] - [DesignatedInitializer] - IntPtr Constructor (IUIDragInteractionDelegate @delegate); - - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - IUIDragInteractionDelegate Delegate { get; } - - [Export ("allowsSimultaneousRecognitionDuringLift")] - bool AllowsSimultaneousRecognitionDuringLift { get; set; } - - [Export ("enabled")] - bool Enabled { [Bind ("isEnabled")] get; set; } - - [Static] - [Export ("enabledByDefault")] - bool EnabledByDefault { [Bind ("isEnabledByDefault")] get; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface UIDragInteractionDelegate { - [Abstract] - [Export ("dragInteraction:itemsForBeginningSession:")] - UIDragItem[] GetItemsForBeginningSession (UIDragInteraction interaction, IUIDragSession session); - - [Export ("dragInteraction:previewForLiftingItem:session:")] - [return: NullAllowed] - UITargetedDragPreview GetPreviewForLiftingItem (UIDragInteraction interaction, UIDragItem item, IUIDragSession session); - - [Export ("dragInteraction:willAnimateLiftWithAnimator:session:")] - void WillAnimateLift (UIDragInteraction interaction, IUIDragAnimating animator, IUIDragSession session); - - [Export ("dragInteraction:sessionWillBegin:")] - void SessionWillBegin (UIDragInteraction interaction, IUIDragSession session); - - [Export ("dragInteraction:sessionAllowsMoveOperation:")] - bool SessionAllowsMoveOperation (UIDragInteraction interaction, IUIDragSession session); - - [Export ("dragInteraction:sessionIsRestrictedToDraggingApplication:")] - bool SessionIsRestrictedToDraggingApplication (UIDragInteraction interaction, IUIDragSession session); - - [Export ("dragInteraction:prefersFullSizePreviewsForSession:")] - bool PrefersFullSizePreviews (UIDragInteraction interaction, IUIDragSession session); - - [Export ("dragInteraction:sessionDidMove:")] - void SessionDidMove (UIDragInteraction interaction, IUIDragSession session); - - [Export ("dragInteraction:session:willEndWithOperation:")] - void SessionWillEnd (UIDragInteraction interaction, IUIDragSession session, UIDropOperation operation); - - [Export ("dragInteraction:session:didEndWithOperation:")] - void SessionDidEnd (UIDragInteraction interaction, IUIDragSession session, UIDropOperation operation); - - [Export ("dragInteraction:sessionDidTransferItems:")] - void SessionDidTransferItems (UIDragInteraction interaction, IUIDragSession session); - - [Export ("dragInteraction:itemsForAddingToSession:withTouchAtPoint:")] - UIDragItem[] GetItemsForAddingToSession (UIDragInteraction interaction, IUIDragSession session, CGPoint point); - - [Export ("dragInteraction:sessionForAddingItems:withTouchAtPoint:")] - [return: NullAllowed] - IUIDragSession GetSessionForAddingItems (UIDragInteraction interaction, IUIDragSession[] sessions, CGPoint point); - - [Export ("dragInteraction:session:willAddItems:forInteraction:")] - void WillAddItems (UIDragInteraction interaction, IUIDragSession session, UIDragItem[] items, UIDragInteraction addingInteraction); - - [Export ("dragInteraction:previewForCancellingItem:withDefault:")] - [return: NullAllowed] - UITargetedDragPreview GetPreviewForCancellingItem (UIDragInteraction interaction, UIDragItem item, UITargetedDragPreview defaultPreview); - - [Export ("dragInteraction:item:willAnimateCancelWithAnimator:")] - void WillAnimateCancel (UIDragInteraction interaction, UIDragItem item, IUIDragAnimating animator); - } - - [NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(NSObject))] // If Apple adds a delegate setter: Delegates=new string [] {"Delegate"}, Events=new Type [] { typeof (UIDropInteractionDelegate)})] - [DisableDefaultCtor] - interface UIDropInteraction : UIInteraction - { - [Export ("initWithDelegate:")] - [DesignatedInitializer] - IntPtr Constructor (IUIDropInteractionDelegate @delegate); - - [Export ("delegate", ArgumentSemantic.Weak)] - [NullAllowed] - IUIDropInteractionDelegate Delegate { get; } - - [Export ("allowsSimultaneousDropSessions")] - bool AllowsSimultaneousDropSessions { get; set; } - } - - [NoWatch, NoTV, iOS (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface UIDropInteractionDelegate - { - [Export ("dropInteraction:canHandleSession:"), DelegateName ("Func"), NoDefaultValue] - bool CanHandleSession (UIDropInteraction interaction, IUIDropSession session); - - [Export ("dropInteraction:sessionDidEnter:"), EventArgs ("UIDropInteraction")] - void SessionDidEnter (UIDropInteraction interaction, IUIDropSession session); - - [Export ("dropInteraction:sessionDidUpdate:"), DelegateName ("Func"), NoDefaultValue] - UIDropProposal SessionDidUpdate (UIDropInteraction interaction, IUIDropSession session); - - [Export ("dropInteraction:sessionDidExit:"), EventArgs ("UIDropInteraction")] - void SessionDidExit (UIDropInteraction interaction, IUIDropSession session); - - [Export ("dropInteraction:performDrop:"), EventArgs ("UIDropInteraction")] - void PerformDrop (UIDropInteraction interaction, IUIDropSession session); - - [Export ("dropInteraction:concludeDrop:"), EventArgs ("UIDropInteraction")] - void ConcludeDrop (UIDropInteraction interaction, IUIDropSession session); - - [Export ("dropInteraction:sessionDidEnd:"), EventArgs ("UIDropInteraction")] - void SessionDidEnd (UIDropInteraction interaction, IUIDropSession session); - - [Export ("dropInteraction:previewForDroppingItem:withDefault:")] - [return: NullAllowed][DelegateName("UIDropInteractionPreviewForItem"), NoDefaultValue] - UITargetedDragPreview GetPreviewForDroppingItem (UIDropInteraction interaction, UIDragItem item, UITargetedDragPreview defaultPreview); - - [Export ("dropInteraction:item:willAnimateDropWithAnimator:"), EventArgs("UIDropInteractionAnimation")] - void WillAnimateDrop (UIDropInteraction interaction, UIDragItem item, IUIDragAnimating animator); - } - - [NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UIDropProposal : NSCopying - { - [Export ("initWithDropOperation:")] - [DesignatedInitializer] - IntPtr Constructor (UIDropOperation operation); - - [Export ("operation")] - UIDropOperation Operation { get; } - - [Export ("precise")] - bool Precise { [Bind ("isPrecise")] get; set; } - - [Export ("prefersFullSizePreview")] - bool PrefersFullSizePreview { get; set; } - } - - [NoWatch, NoTV, iOS (11,0)] - [Protocol] - interface UIDropSession : UIDragDropSession, NSProgressReporting - { - [Abstract] - [NullAllowed, Export ("localDragSession")] - IUIDragSession LocalDragSession { get; } - - [Abstract] - [Export ("progressIndicatorStyle", ArgumentSemantic.Assign)] - UIDropSessionProgressIndicatorStyle ProgressIndicatorStyle { get; set; } - - [Abstract] - [Export ("loadObjectsOfClass:completion:")] - NSProgress LoadObjects (Class itemProviderReadingClass, Action completion); - } - - [NoWatch, NoTV, iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UITargetedDragPreview : NSCopying - { - [Export ("initWithView:parameters:target:")] - [DesignatedInitializer] - IntPtr Constructor (UIView view, UIDragPreviewParameters parameters, UIDragPreviewTarget target); - - [Export ("initWithView:parameters:")] - IntPtr Constructor (UIView view, UIDragPreviewParameters parameters); - - [Export ("initWithView:")] - IntPtr Constructor (UIView view); - - [Export ("target")] - UIDragPreviewTarget Target { get; } - - [Export ("view")] - UIView View { get; } - - [Export ("parameters", ArgumentSemantic.Copy)] - UIDragPreviewParameters Parameters { get; } - - [Export ("size")] - CGSize Size { get; } - - [Export ("retargetedPreviewWithTarget:")] - UITargetedDragPreview GetRetargetedPreview (UIDragPreviewTarget newTarget); - - // From URLPreviews (UITargetedDragPreview) category - - [Static] - [Export ("previewForURL:target:")] - UITargetedDragPreview GetPreview (NSUrl url, UIDragPreviewTarget target); - - [Static] - [Export ("previewForURL:title:target:")] - UITargetedDragPreview GetPreview (NSUrl url, [NullAllowed] string title, UIDragPreviewTarget target); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface UICollectionViewDragDelegate { - [Abstract] - [Export ("collectionView:itemsForBeginningDragSession:atIndexPath:")] - UIDragItem[] GetItemsForBeginningDragSession (UICollectionView collectionView, IUIDragSession session, NSIndexPath indexPath); - - [Export ("collectionView:itemsForAddingToDragSession:atIndexPath:point:")] - UIDragItem[] GetItemsForAddingToDragSession (UICollectionView collectionView, IUIDragSession session, NSIndexPath indexPath, CGPoint point); - - [Export ("collectionView:dragPreviewParametersForItemAtIndexPath:")] - [return: NullAllowed] - UIDragPreviewParameters GetDragPreviewParameters (UICollectionView collectionView, NSIndexPath indexPath); - - [Export ("collectionView:dragSessionWillBegin:")] - void DragSessionWillBegin (UICollectionView collectionView, IUIDragSession session); - - [Export ("collectionView:dragSessionDidEnd:")] - void DragSessionDidEnd (UICollectionView collectionView, IUIDragSession session); - - [Export ("collectionView:dragSessionAllowsMoveOperation:")] - bool DragSessionAllowsMoveOperation (UICollectionView collectionView, IUIDragSession session); - - [Export ("collectionView:dragSessionIsRestrictedToDraggingApplication:")] - bool DragSessionIsRestrictedToDraggingApplication (UICollectionView collectionView, IUIDragSession session); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface UICollectionViewDropDelegate { - [Abstract] - [Export ("collectionView:performDropWithCoordinator:")] - void PerformDrop (UICollectionView collectionView, IUICollectionViewDropCoordinator coordinator); - - [Export ("collectionView:canHandleDropSession:")] - bool CanHandleDropSession (UICollectionView collectionView, IUIDropSession session); - - [Export ("collectionView:dropSessionDidEnter:")] - void DropSessionDidEnter (UICollectionView collectionView, IUIDropSession session); - - [Export ("collectionView:dropSessionDidUpdate:withDestinationIndexPath:")] - UICollectionViewDropProposal DropSessionDidUpdate (UICollectionView collectionView, IUIDropSession session, [NullAllowed] NSIndexPath destinationIndexPath); - - [Export ("collectionView:dropSessionDidExit:")] - void DropSessionDidExit (UICollectionView collectionView, IUIDropSession session); - - [Export ("collectionView:dropSessionDidEnd:")] - void DropSessionDidEnd (UICollectionView collectionView, IUIDropSession session); - - [Export ("collectionView:dropPreviewParametersForItemAtIndexPath:")] - [return: NullAllowed] - UIDragPreviewParameters GetDropPreviewParameters (UICollectionView collectionView, NSIndexPath indexPath); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(UIDropProposal))] - [DisableDefaultCtor] // NSInternalInconsistencyException Reason: Not implemented - interface UICollectionViewDropProposal { - - // inline from base type - [Export ("initWithDropOperation:")] - [DesignatedInitializer] - IntPtr Constructor (UIDropOperation operation); - - [Export ("initWithDropOperation:intent:")] - IntPtr Constructor (UIDropOperation operation, UICollectionViewDropIntent intent); - - [Export ("intent")] - UICollectionViewDropIntent Intent { get; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UICollectionViewDropCoordinator { - [Abstract] - [Export ("items")] - IUICollectionViewDropItem[] Items { get; } - - [Abstract] - [NullAllowed, Export ("destinationIndexPath")] - NSIndexPath DestinationIndexPath { get; } - - [Abstract] - [Export ("proposal")] - UICollectionViewDropProposal Proposal { get; } - - [Abstract] - [Export ("session")] - IUIDropSession Session { get; } - - [Abstract] - [Export ("dropItem:toPlaceholder:")] - IUICollectionViewDropPlaceholderContext DropItemToPlaceholder (UIDragItem dragItem, UICollectionViewDropPlaceholder placeholder); - - [Abstract] - [Export ("dropItem:toItemAtIndexPath:")] - IUIDragAnimating DropItemToItem (UIDragItem dragItem, NSIndexPath itemIndexPath); - - [Abstract] - [Export ("dropItem:intoItemAtIndexPath:rect:")] - IUIDragAnimating DropItemIntoItem (UIDragItem dragItem, NSIndexPath itemIndexPath, CGRect rect); - - [Abstract] - [Export ("dropItem:toTarget:")] - IUIDragAnimating DropItemToTarget (UIDragItem dragItem, UIDragPreviewTarget target); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UICollectionViewPlaceholder { - [Export ("initWithInsertionIndexPath:reuseIdentifier:")] - [DesignatedInitializer] - IntPtr Constructor (NSIndexPath insertionIndexPath, string reuseIdentifier); - - [NullAllowed, Export ("cellUpdateHandler", ArgumentSemantic.Copy)] - Action CellUpdateHandler { get; set; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(UICollectionViewPlaceholder))] - interface UICollectionViewDropPlaceholder { - // inlined - [Export ("initWithInsertionIndexPath:reuseIdentifier:")] - IntPtr Constructor (NSIndexPath insertionIndexPath, string reuseIdentifier); - - [NullAllowed, Export ("previewParametersProvider", ArgumentSemantic.Copy)] - Func PreviewParametersProvider { get; set; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UICollectionViewDropItem { - [Abstract] - [Export ("dragItem")] - UIDragItem DragItem { get; } - - [Abstract] - [NullAllowed, Export ("sourceIndexPath")] - NSIndexPath SourceIndexPath { get; } - - [Abstract] - [Export ("previewSize")] - CGSize PreviewSize { get; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UICollectionViewDropPlaceholderContext : UIDragAnimating { - [Abstract] - [Export ("dragItem")] - UIDragItem DragItem { get; } - - [Abstract] - [Export ("commitInsertionWithDataSourceUpdates:")] - bool CommitInsertion (Action dataSourceUpdates); - - [Abstract] - [Export ("deletePlaceholder")] - bool DeletePlaceholder (); - - [Abstract] - [Export ("setNeedsCellUpdate")] - void SetNeedsCellUpdate (); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface UITableViewDragDelegate { - [Abstract] - [Export ("tableView:itemsForBeginningDragSession:atIndexPath:")] - UIDragItem[] GetItemsForBeginningDragSession (UITableView tableView, IUIDragSession session, NSIndexPath indexPath); - - [Export ("tableView:itemsForAddingToDragSession:atIndexPath:point:")] - UIDragItem[] GetItemsForAddingToDragSession (UITableView tableView, IUIDragSession session, NSIndexPath indexPath, CGPoint point); - - [Export ("tableView:dragPreviewParametersForRowAtIndexPath:")] - [return: NullAllowed] - UIDragPreviewParameters GetDragPreviewParameters (UITableView tableView, NSIndexPath indexPath); - - [Export ("tableView:dragSessionWillBegin:")] - void DragSessionWillBegin (UITableView tableView, IUIDragSession session); - - [Export ("tableView:dragSessionDidEnd:")] - void DragSessionDidEnd (UITableView tableView, IUIDragSession session); - - [Export ("tableView:dragSessionAllowsMoveOperation:")] - bool DragSessionAllowsMoveOperation (UITableView tableView, IUIDragSession session); - - [Export ("tableView:dragSessionIsRestrictedToDraggingApplication:")] - bool DragSessionIsRestrictedToDraggingApplication (UITableView tableView, IUIDragSession session); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface UITableViewDropDelegate { - [Abstract] - [Export ("tableView:performDropWithCoordinator:")] - void PerformDrop (UITableView tableView, IUITableViewDropCoordinator coordinator); - - [Export ("tableView:canHandleDropSession:")] - bool CanHandleDropSession (UITableView tableView, IUIDropSession session); - - [Export ("tableView:dropSessionDidEnter:")] - void DropSessionDidEnter (UITableView tableView, IUIDropSession session); - - [Export ("tableView:dropSessionDidUpdate:withDestinationIndexPath:")] - UITableViewDropProposal DropSessionDidUpdate (UITableView tableView, IUIDropSession session, [NullAllowed] NSIndexPath destinationIndexPath); - - [Export ("tableView:dropSessionDidExit:")] - void DropSessionDidExit (UITableView tableView, IUIDropSession session); - - [Export ("tableView:dropSessionDidEnd:")] - void DropSessionDidEnd (UITableView tableView, IUIDropSession session); - - [Export ("tableView:dropPreviewParametersForRowAtIndexPath:")] - [return: NullAllowed] - UIDragPreviewParameters GetDropPreviewParameters (UITableView tableView, NSIndexPath indexPath); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(UIDropProposal))] - [DisableDefaultCtor] // NSInternalInconsistencyException Reason: Not implemented - interface UITableViewDropProposal { - - // inline from base type - [Export ("initWithDropOperation:")] - [DesignatedInitializer] - IntPtr Constructor (UIDropOperation operation); - - [Export ("initWithDropOperation:intent:")] - IntPtr Constructor (UIDropOperation operation, UITableViewDropIntent intent); - - [Export ("intent")] - UITableViewDropIntent Intent { get; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UITableViewDropCoordinator { - [Abstract] - [Export ("items")] - IUITableViewDropItem[] Items { get; } - - [Abstract] - [NullAllowed, Export ("destinationIndexPath")] - NSIndexPath DestinationIndexPath { get; } - - [Abstract] - [Export ("proposal")] - UITableViewDropProposal Proposal { get; } - - [Abstract] - [Export ("session")] - IUIDropSession Session { get; } - - [Abstract] - [Export ("dropItem:toPlaceholder:")] - IUITableViewDropPlaceholderContext DropItemToPlaceholder (UIDragItem dragItem, UITableViewDropPlaceholder placeholder); - - [Abstract] - [Export ("dropItem:toRowAtIndexPath:")] - IUIDragAnimating DropItemToRow (UIDragItem dragItem, NSIndexPath indexPath); - - [Abstract] - [Export ("dropItem:intoRowAtIndexPath:rect:")] - IUIDragAnimating DropItemIntoRow (UIDragItem dragItem, NSIndexPath indexPath, CGRect rect); - - [Abstract] - [Export ("dropItem:toTarget:")] - IUIDragAnimating DropItemToTarget (UIDragItem dragItem, UIDragPreviewTarget target); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UITableViewPlaceholder { - [Export ("initWithInsertionIndexPath:reuseIdentifier:rowHeight:")] - [DesignatedInitializer] - IntPtr Constructor (NSIndexPath insertionIndexPath, string reuseIdentifier, nfloat rowHeight); - - [NullAllowed, Export ("cellUpdateHandler", ArgumentSemantic.Copy)] - Action CellUpdateHandler { get; set; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(UITableViewPlaceholder))] - interface UITableViewDropPlaceholder { - // inlined - [Export ("initWithInsertionIndexPath:reuseIdentifier:rowHeight:")] - IntPtr Constructor (NSIndexPath insertionIndexPath, string reuseIdentifier, nfloat rowHeight); - - [NullAllowed, Export ("previewParametersProvider", ArgumentSemantic.Copy)] - Func PreviewParametersProvider { get; set; } - } - - [NoWatch, NoTV, iOS (11,0)] - [Protocol] - interface UITableViewDropItem { - [Abstract] - [Export ("dragItem")] - UIDragItem DragItem { get; } - - [Abstract] - [NullAllowed, Export ("sourceIndexPath")] - NSIndexPath SourceIndexPath { get; } - - [Abstract] - [Export ("previewSize")] - CGSize PreviewSize { get; } - } - - [NoWatch, NoTV, iOS (11,0)] - [Protocol] - interface UITableViewDropPlaceholderContext : UIDragAnimating { - [Abstract] - [Export ("dragItem")] - UIDragItem DragItem { get; } - - [Abstract] - [Export ("commitInsertionWithDataSourceUpdates:")] - bool CommitInsertion (Action dataSourceUpdates); - - [Abstract] - [Export ("deletePlaceholder")] - bool DeletePlaceholder (); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UITextDragPreviewRenderer { - [Export ("initWithLayoutManager:range:")] - IntPtr Constructor (NSLayoutManager layoutManager, NSRange range); - - [Export ("initWithLayoutManager:range:unifyRects:")] - [DesignatedInitializer] - IntPtr Constructor (NSLayoutManager layoutManager, NSRange range, bool unifyRects); - - [Export ("layoutManager")] - NSLayoutManager LayoutManager { get; } - - [Export ("image")] - UIImage Image { get; } - - [Export ("firstLineRect")] - CGRect FirstLineRect { get; } - - [Export ("bodyRect")] - CGRect BodyRect { get; } - - [Export ("lastLineRect")] - CGRect LastLineRect { get; } - - [Export ("adjustFirstLineRect:bodyRect:lastLineRect:textOrigin:")] - void Adjust (ref CGRect firstLineRect, ref CGRect bodyRect, ref CGRect lastLineRect, CGPoint origin); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UITextDraggable : UITextInput { - [Abstract] - [NullAllowed, Export ("textDragDelegate", ArgumentSemantic.Weak)] - IUITextDragDelegate TextDragDelegate { get; set; } - - [Abstract] - [NullAllowed, Export ("textDragInteraction")] - UIDragInteraction TextDragInteraction { get; } - - [Abstract] - [Export ("textDragActive")] - bool TextDragActive { [Bind ("isTextDragActive")] get; } - - [Abstract] - [Export ("textDragOptions", ArgumentSemantic.Assign)] - UITextDragOptions TextDragOptions { get; set; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface UITextDragDelegate { - [Export ("textDraggableView:itemsForDrag:")] - UIDragItem[] GetItemsForDrag (IUITextDraggable textDraggableView, IUITextDragRequest dragRequest); - - [Export ("textDraggableView:dragPreviewForLiftingItem:session:")] - [return: NullAllowed] - UITargetedDragPreview GetPreviewForLiftingItem (IUITextDraggable textDraggableView, UIDragItem item, IUIDragSession session); - - [Export ("textDraggableView:willAnimateLiftWithAnimator:session:")] - void WillAnimateLift (IUITextDraggable textDraggableView, IUIDragAnimating animator, IUIDragSession session); - - [Export ("textDraggableView:dragSessionWillBegin:")] - void DragSessionWillBegin (IUITextDraggable textDraggableView, IUIDragSession session); - - [Export ("textDraggableView:dragSessionDidEnd:withOperation:")] - void DragSessionDidEnd (IUITextDraggable textDraggableView, IUIDragSession session, UIDropOperation operation); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UITextDragRequest { - [Abstract] - [Export ("dragRange")] - UITextRange DragRange { get; } - - [Abstract] - [Export ("suggestedItems")] - UIDragItem[] SuggestedItems { get; } - - [Abstract] - [Export ("existingItems")] - UIDragItem[] ExistingItems { get; } - - [Abstract] - [Export ("selected")] - bool Selected { [Bind ("isSelected")] get; } - - [Abstract] - [Export ("dragSession")] - IUIDragSession DragSession { get; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(UIDropProposal))] - [DisableDefaultCtor] - interface UITextDropProposal : NSCopying { - // inlined - [Export ("initWithDropOperation:")] - IntPtr Constructor (UIDropOperation operation); - - [Export ("dropAction", ArgumentSemantic.Assign)] - UITextDropAction DropAction { get; set; } - - [Export ("dropProgressMode", ArgumentSemantic.Assign)] - UITextDropProgressMode DropProgressMode { get; set; } - - [Export ("useFastSameViewOperations")] - bool UseFastSameViewOperations { get; set; } - - [Export ("dropPerformer", ArgumentSemantic.Assign)] - UITextDropPerformer DropPerformer { get; set; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UITextDroppable : UITextInput, UITextPasteConfigurationSupporting { - [Abstract] - [NullAllowed, Export ("textDropDelegate", ArgumentSemantic.Weak)] - IUITextDropDelegate TextDropDelegate { get; set; } - - [Abstract] - [NullAllowed, Export ("textDropInteraction")] - UIDropInteraction TextDropInteraction { get; } - - [Abstract] - [Export ("textDropActive")] - bool TextDropActive { [Bind ("isTextDropActive")] get; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface UITextDropDelegate { - [Export ("textDroppableView:willBecomeEditableForDrop:")] - UITextDropEditability WillBecomeEditable (IUITextDroppable textDroppableView, IUITextDropRequest drop); - - [Export ("textDroppableView:proposalForDrop:")] - UITextDropProposal GetProposalForDrop (IUITextDroppable textDroppableView, IUITextDropRequest drop); - - [Export ("textDroppableView:willPerformDrop:")] - void WillPerformDrop (IUITextDroppable textDroppableView, IUITextDropRequest drop); - - [Export ("textDroppableView:previewForDroppingAllItemsWithDefault:")] - [return: NullAllowed] - UITargetedDragPreview GetPreviewForDroppingAllItems (IUITextDroppable textDroppableView, UITargetedDragPreview defaultPreview); - - [Export ("textDroppableView:dropSessionDidEnter:")] - void DropSessionDidEnter (IUITextDroppable textDroppableView, IUIDropSession session); - - [Export ("textDroppableView:dropSessionDidUpdate:")] - void DropSessionDidUpdate (IUITextDroppable textDroppableView, IUIDropSession session); - - [Export ("textDroppableView:dropSessionDidExit:")] - void DropSessionDidExit (IUITextDroppable textDroppableView, IUIDropSession session); - - [Export ("textDroppableView:dropSessionDidEnd:")] - void DropSessionDidEnd (IUITextDroppable textDroppableView, IUIDropSession session); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UITextDropRequest { - [Abstract] - [Export ("dropPosition")] - UITextPosition DropPosition { get; } - - [Abstract] - [Export ("suggestedProposal")] - UITextDropProposal SuggestedProposal { get; } - - [Abstract] - [Export ("sameView")] - bool SameView { [Bind ("isSameView")] get; } - - [Abstract] - [Export ("dropSession")] - IUIDropSession DropSession { get; } - } - -#endregion - - [TV (11,0), iOS (11,0)] - [Protocol] - interface UIDataSourceTranslating { - [Abstract] - [Export ("presentationSectionIndexForDataSourceSectionIndex:")] - nint GetPresentationSectionIndex (nint dataSourceSectionIndex); - - [Abstract] - [Export ("dataSourceSectionIndexForPresentationSectionIndex:")] - nint GetDataSourceSectionIndex (nint presentationSectionIndex); - - [Abstract] - [Export ("presentationIndexPathForDataSourceIndexPath:")] - [return: NullAllowed] - NSIndexPath GetPresentationIndexPath ([NullAllowed] NSIndexPath dataSourceIndexPath); - - [Abstract] - [Export ("dataSourceIndexPathForPresentationIndexPath:")] - [return: NullAllowed] - NSIndexPath GetDataSourceIndexPath ([NullAllowed] NSIndexPath presentationIndexPath); - - [Abstract] - [Export ("performUsingPresentationValues:")] - void PerformUsingPresentationValues (Action actionsToTranslate); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UISpringLoadedInteraction : UIInteraction { - [Export ("initWithInteractionBehavior:interactionEffect:activationHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] IUISpringLoadedInteractionBehavior interactionBehavior, [NullAllowed] IUISpringLoadedInteractionEffect interactionEffect, Action handler); - - [Export ("initWithActivationHandler:")] - IntPtr Constructor (Action handler); - - [Export ("interactionBehavior", ArgumentSemantic.Strong)] - IUISpringLoadedInteractionBehavior InteractionBehavior { get; } - - [Export ("interactionEffect", ArgumentSemantic.Strong)] - IUISpringLoadedInteractionEffect InteractionEffect { get; } - } - - interface IUISpringLoadedInteractionBehavior {} - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UISpringLoadedInteractionBehavior { - [Abstract] - [Export ("shouldAllowInteraction:withContext:")] - bool ShouldAllowInteraction (UISpringLoadedInteraction interaction, IUISpringLoadedInteractionContext context); - - [Export ("interactionDidFinish:")] - void InteractionDidFinish (UISpringLoadedInteraction interaction); - } - - interface IUISpringLoadedInteractionEffect {} - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UISpringLoadedInteractionEffect { - [Abstract] - [Export ("interaction:didChangeWithContext:")] - void DidChange (UISpringLoadedInteraction interaction, IUISpringLoadedInteractionContext context); - } - - interface IUISpringLoadedInteractionContext {} - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UISpringLoadedInteractionContext { - [Abstract] - [Export ("state")] - UISpringLoadedInteractionEffectState State { get; } - - [Abstract] - [NullAllowed, Export ("targetView", ArgumentSemantic.Strong)] - UIView TargetView { get; set; } - - [Abstract] - [NullAllowed, Export ("targetItem", ArgumentSemantic.Strong)] - NSObject TargetItem { get; set; } - - [Abstract] - [Export ("locationInView:")] - CGPoint LocationInView ([NullAllowed] UIView view); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UISpringLoadedInteractionSupporting { - [Abstract] - [Export ("springLoaded")] - bool SpringLoaded { [Bind ("isSpringLoaded")] get; set; } - } - - // https://bugzilla.xamarin.com/show_bug.cgi?id=58282, we should be able to write one delegate with a 'Action'. See original signature: - // typedef void (^UIContextualActionHandler)(UIContextualAction * _Nonnull, __kindof UIView * _Nonnull, void (^ _Nonnull)(BOOL)); - [NoWatch, NoTV] - [iOS (11,0)] - delegate void UIContextualActionHandler (UIContextualAction action, UIView sourceView, [BlockCallback] UIContextualActionCompletionHandler completionHandler); - - [NoWatch, NoTV] - [iOS (11,0)] - delegate void UIContextualActionCompletionHandler (bool finished); - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UIContextualAction { - [Static] - [Export ("contextualActionWithStyle:title:handler:")] - UIContextualAction FromContextualActionStyle (UIContextualActionStyle style, [NullAllowed] string title, UIContextualActionHandler handler); - - [Export ("style")] - UIContextualActionStyle Style { get; } - - [Export ("handler", ArgumentSemantic.Copy)] - UIContextualActionHandler Handler { get; } - - [NullAllowed, Export ("title")] - string Title { get; set; } - - [NullAllowed, Export ("backgroundColor", ArgumentSemantic.Copy)] - UIColor BackgroundColor { get; set; } - - [NullAllowed, Export ("image", ArgumentSemantic.Copy)] - UIImage Image { get; set; } - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UISwipeActionsConfiguration { - [Static] - [Export ("configurationWithActions:")] - UISwipeActionsConfiguration FromActions (UIContextualAction[] actions); - - [Export ("actions", ArgumentSemantic.Copy)] - UIContextualAction[] Actions { get; } - - [Export ("performsFirstActionWithFullSwipe")] - bool PerformsFirstActionWithFullSwipe { get; set; } - } - - interface IUITextPasteConfigurationSupporting {} - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UITextPasteConfigurationSupporting : UIPasteConfigurationSupporting { - [Abstract] - [NullAllowed, Export ("pasteDelegate", ArgumentSemantic.Weak)] - IUITextPasteDelegate PasteDelegate { get; set; } - } - - interface IUITextPasteDelegate {} - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface UITextPasteDelegate { - [Export ("textPasteConfigurationSupporting:transformPasteItem:")] - void TransformPasteItem (IUITextPasteConfigurationSupporting textPasteConfigurationSupporting, IUITextPasteItem item); - - [Export ("textPasteConfigurationSupporting:combineItemAttributedStrings:forRange:")] - NSAttributedString CombineItemAttributedStrings (IUITextPasteConfigurationSupporting textPasteConfigurationSupporting, NSAttributedString[] itemStrings, UITextRange textRange); - - [Export ("textPasteConfigurationSupporting:performPasteOfAttributedString:toRange:")] - UITextRange PerformPaste (IUITextPasteConfigurationSupporting textPasteConfigurationSupporting, NSAttributedString attributedString, UITextRange textRange); - - [Export ("textPasteConfigurationSupporting:shouldAnimatePasteOfAttributedString:toRange:")] - bool ShouldAnimatePaste (IUITextPasteConfigurationSupporting textPasteConfigurationSupporting, NSAttributedString attributedString, UITextRange textRange); - } - - interface IUITextPasteItem {} - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UITextPasteItem { - [Abstract] - [Export ("itemProvider")] - NSItemProvider ItemProvider { get; } - - [Abstract] - [NullAllowed, Export ("localObject")] - NSObject LocalObject { get; } - - [Abstract] - [Export ("defaultAttributes")] - NSDictionary DefaultAttributes { get; } - - [Abstract] - [Export ("setStringResult:")] - void SetStringResult (string @string); - - [Abstract] - [Export ("setAttributedStringResult:")] - void SetAttributedStringResult (NSAttributedString @string); - - [Abstract] - [Export ("setAttachmentResult:")] - void SetAttachmentResult (NSTextAttachment textAttachment); - - [Abstract] - [Export ("setNoResult")] - void SetNoResult (); - - [Abstract] - [Export ("setDefaultResult")] - void SetDefaultResult (); - } - - [NoWatch, NoTV] - [iOS (11,0)] - [BaseType (typeof(NSObject))] - interface UIPasteConfiguration : NSSecureCoding, NSCopying { - [Export ("acceptableTypeIdentifiers", ArgumentSemantic.Copy)] - string[] AcceptableTypeIdentifiers { get; set; } - - [Export ("initWithAcceptableTypeIdentifiers:")] - IntPtr Constructor (string[] acceptableTypeIdentifiers); - - [Export ("addAcceptableTypeIdentifiers:")] - void AddAcceptableTypeIdentifiers (string[] acceptableTypeIdentifiers); - - [Export ("initWithTypeIdentifiersForAcceptingClass:")] - IntPtr Constructor (Class itemProviderReadingClass); - - [Wrap ("this (new Class (itemProviderReadingType))")] - IntPtr Constructor (Type itemProviderReadingType); - - [Export ("addTypeIdentifiersForAcceptingClass:")] - void AddTypeIdentifiers (Class itemProviderReadingClass); - - [Wrap ("AddTypeIdentifiers (new Class (itemProviderReadingType))")] - void AddTypeIdentifiers (Type itemProviderReadingType); - } - - interface IUIPasteConfigurationSupporting {} - - [NoWatch, NoTV] - [iOS (11,0)] - [Protocol] - interface UIPasteConfigurationSupporting { - [Abstract] - [NullAllowed, Export ("pasteConfiguration", ArgumentSemantic.Copy)] - UIPasteConfiguration PasteConfiguration { get; set; } - - [Export ("pasteItemProviders:")] - void Paste (NSItemProvider[] itemProviders); - - [Export ("canPasteItemProviders:")] - bool CanPaste (NSItemProvider[] itemProviders); - } - - [NoTV, NoWatch] - [iOS (11,0)] - [BaseType (typeof(UIViewController))] - interface UIDocumentBrowserViewController : NSCoding { - [Export ("initForOpeningFilesWithContentTypes:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] string[] allowedContentTypes); - - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - IUIDocumentBrowserViewControllerDelegate Delegate { get; set; } - - [Export ("allowsDocumentCreation")] - bool AllowsDocumentCreation { get; set; } - - [Export ("allowsPickingMultipleItems")] - bool AllowsPickingMultipleItems { get; set; } - - [Export ("allowedContentTypes", ArgumentSemantic.Copy)] - string[] AllowedContentTypes { get; } - - [Export ("additionalLeadingNavigationBarButtonItems", ArgumentSemantic.Strong)] - UIBarButtonItem[] AdditionalLeadingNavigationBarButtonItems { get; set; } - - [Export ("additionalTrailingNavigationBarButtonItems", ArgumentSemantic.Strong)] - UIBarButtonItem[] AdditionalTrailingNavigationBarButtonItems { get; set; } - - [Async] - [Export ("revealDocumentAtURL:importIfNeeded:completion:")] - void RevealDocument (NSUrl url, bool importIfNeeded, [NullAllowed] Action completion); - - [Async] - [Export ("importDocumentAtURL:nextToDocumentAtURL:mode:completionHandler:")] - void ImportDocument (NSUrl documentUrl, NSUrl neighbourUrl, UIDocumentBrowserImportMode importMode, Action completion); - - [Export ("transitionControllerForDocumentURL:")] - UIDocumentBrowserTransitionController GetTransitionController (NSUrl documentUrl); - - [Export ("customActions", ArgumentSemantic.Strong)] - UIDocumentBrowserAction[] CustomActions { get; set; } - - [Export ("browserUserInterfaceStyle", ArgumentSemantic.Assign)] - UIDocumentBrowserUserInterfaceStyle BrowserUserInterfaceStyle { get; set; } - } - - interface IUIDocumentBrowserViewControllerDelegate {} - - [NoTV, NoWatch] - [iOS (11,0)] - [Protocol, Model] - [BaseType (typeof(NSObject))] - interface UIDocumentBrowserViewControllerDelegate { - [Export ("documentBrowser:didPickDocumentURLs:")] - void DidPickDocumentUrls (UIDocumentBrowserViewController controller, NSUrl[] documentUrls); - - [Export ("documentBrowser:didRequestDocumentCreationWithHandler:")] - void DidRequestDocumentCreation (UIDocumentBrowserViewController controller, Action importHandler); - - [Export ("documentBrowser:didImportDocumentAtURL:toDestinationURL:")] - void DidImportDocument (UIDocumentBrowserViewController controller, NSUrl sourceUrl, NSUrl destinationUrl); - - [Export ("documentBrowser:failedToImportDocumentAtURL:error:")] - void FailedToImportDocument (UIDocumentBrowserViewController controller, NSUrl documentUrl, [NullAllowed] NSError error); - - [Export ("documentBrowser:applicationActivitiesForDocumentURLs:")] - UIActivity[] GetApplicationActivities (UIDocumentBrowserViewController controller, NSUrl[] documentUrls); - - [Export ("documentBrowser:willPresentActivityViewController:")] - void WillPresent (UIDocumentBrowserViewController controller, UIActivityViewController activityViewController); - } - - [NoTV, NoWatch] - [iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UIDocumentBrowserTransitionController : UIViewControllerAnimatedTransitioning { - [NullAllowed, Export ("loadingProgress", ArgumentSemantic.Strong)] - NSProgress LoadingProgress { get; set; } - - [NullAllowed, Export ("targetView", ArgumentSemantic.Weak)] - UIView TargetView { get; set; } - } - - [NoTV, NoWatch] - [iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UIDocumentBrowserAction { - [Export ("initWithIdentifier:localizedTitle:availability:handler:")] - [DesignatedInitializer] - IntPtr Constructor (string identifier, string localizedTitle, UIDocumentBrowserActionAvailability availability, Action handler); - - [Export ("identifier")] - string Identifier { get; } - - [Export ("localizedTitle")] - string LocalizedTitle { get; } - - [Export ("availability")] - UIDocumentBrowserActionAvailability Availability { get; } - - [NullAllowed, Export ("image", ArgumentSemantic.Strong)] - UIImage Image { get; set; } - - [Export ("supportedContentTypes", ArgumentSemantic.Copy)] - string[] SupportedContentTypes { get; set; } - - [Export ("supportsMultipleItems")] - bool SupportsMultipleItems { get; set; } - } -#endif // !WATCH - - [Watch (4,0), TV (11,0), iOS (11,0)] - [BaseType (typeof(NSObject))] - [DisableDefaultCtor] - interface UIFontMetrics { - [Static] - [Export ("defaultMetrics", ArgumentSemantic.Strong)] - UIFontMetrics DefaultMetrics { get; } - - [Static] - [Export ("metricsForTextStyle:")] - UIFontMetrics GetMetrics (string textStyle); - - [Export ("initForTextStyle:")] - [DesignatedInitializer] - IntPtr Constructor (string textStyle); - - [Export ("scaledFontForFont:")] - UIFont GetScaledFont (UIFont font); - - [Export ("scaledFontForFont:maximumPointSize:")] - UIFont GetScaledFont (UIFont font, nfloat maximumPointSize); - - [Export ("scaledValueForValue:")] - nfloat GetScaledValue (nfloat value); - -#if !WATCH - [NoWatch] - [Export ("scaledFontForFont:compatibleWithTraitCollection:")] - UIFont GetScaledFont (UIFont font, [NullAllowed] UITraitCollection traitCollection); - - [NoWatch] - [Export ("scaledFontForFont:maximumPointSize:compatibleWithTraitCollection:")] - UIFont GetScaledFont (UIFont font, nfloat maximumPointSize, [NullAllowed] UITraitCollection traitCollection); - - [NoWatch] - [Export ("scaledValueForValue:compatibleWithTraitCollection:")] - nfloat GetScaledValue (nfloat value, [NullAllowed] UITraitCollection traitCollection); -#endif // !WATCH - } } diff --git a/src/usernotifications.cs b/src/usernotifications.cs index 74b5d8c8703..a79d4cd2b43 100644 --- a/src/usernotifications.cs +++ b/src/usernotifications.cs @@ -56,9 +56,7 @@ public enum UNNotificationActionOptions : nuint { public enum UNNotificationCategoryOptions : nuint { None = 0, CustomDismissAction = (1 << 0), - AllowInCarPlay = (2 << 0), - HiddenPreviewsShowTitle = (1 << 2), - HiddenPreviewsShowSubtitle = (1 << 3), + AllowInCarPlay = (2 << 0) } [Introduced (PlatformName.iOS, 10, 0)] @@ -116,15 +114,6 @@ public enum UNNotificationPresentationOptions : nuint { Alert = (1 << 2) } - [NoWatch, NoTV, iOS (11,0)] - [Native] - public enum UNShowPreviewsSetting : nint - { - Always, - WhenAuthenticated, - Never - } - [Introduced (PlatformName.iOS, 10, 0)] [Introduced (PlatformName.TvOS, 10, 0)] [Introduced (PlatformName.WatchOS, 3, 0)] @@ -268,19 +257,9 @@ interface UNNotificationCategory : NSCopying, NSSecureCoding { [Export ("options")] UNNotificationCategoryOptions Options { get; } - [NoWatch, iOS (11, 0)] - [Export ("hiddenPreviewsBodyPlaceholder")] - string HiddenPreviewsBodyPlaceholder { get; } - [Static] [Export ("categoryWithIdentifier:actions:intentIdentifiers:options:")] UNNotificationCategory FromIdentifier (string identifier, UNNotificationAction [] actions, string [] intentIdentifiers, UNNotificationCategoryOptions options); - - [NoWatch, iOS (11,0)] - [Static] - [Export ("categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:options:")] - UNNotificationCategory FromIdentifier (string identifier, UNNotificationAction[] actions, string[] intentIdentifiers, string hiddenPreviewsBodyPlaceholder, UNNotificationCategoryOptions options); - } [Introduced (PlatformName.iOS, 10, 0)] @@ -499,10 +478,6 @@ interface UNNotificationSettings : NSCopying, NSSecureCoding { [Unavailable (PlatformName.WatchOS)] [Export ("alertStyle")] UNAlertStyle AlertStyle { get; } - - [NoWatch, NoTV, iOS (11, 0)] - [Export ("showPreviewsSetting")] - UNShowPreviewsSetting ShowPreviewsSetting { get; } } [Introduced (PlatformName.iOS, 10, 0)] diff --git a/src/videosubscriberaccount.cs b/src/videosubscriberaccount.cs index acd07915dfc..ec6f425ed46 100644 --- a/src/videosubscriberaccount.cs +++ b/src/videosubscriberaccount.cs @@ -92,10 +92,6 @@ interface VSAccountManagerDelegate { [Abstract] [Export ("accountManager:dismissViewController:")] void DismissViewController (VSAccountManager accountManager, UIViewController viewController); - - [iOS (11,0)][TV (11,0)] - [Export ("accountManager:shouldAuthenticateAccountProviderWithIdentifier:")] - bool ShouldAuthenticateAccountProvider (VSAccountManager accountManager, string accountProviderIdentifier); } [Introduced (PlatformName.iOS, 10, 0)] @@ -183,10 +179,6 @@ interface VSAccountMetadataRequest { [Export ("supportedAccountProviderIdentifiers", ArgumentSemantic.Copy)] string [] SupportedAccountProviderIdentifiers { get; set; } - [TV (11,0)][iOS (11,0)] - [Export ("featuredAccountProviderIdentifiers", ArgumentSemantic.Copy)] - string[] FeaturedAccountProviderIdentifiers { get; set; } - [NullAllowed, Export ("verificationToken")] string VerificationToken { get; set; } @@ -240,37 +232,5 @@ enum VSAccountProviderAuthenticationScheme { Saml, } - [TV (11,0)][iOS (11,0)] - [Native] - public enum VSSubscriptionAccessLevel : nint { - Unknown, - FreeWithAccount, - Paid, - } - - [TV (11,0)][iOS (11,0)] - [BaseType (typeof (NSObject))] - interface VSSubscription { - [Export ("expirationDate", ArgumentSemantic.Copy)] - NSDate ExpirationDate { get; set; } - - [Export ("accessLevel", ArgumentSemantic.Assign)] - VSSubscriptionAccessLevel AccessLevel { get; set; } - - [Export ("tierIdentifiers", ArgumentSemantic.Copy)] - string[] TierIdentifiers { get; set; } - } - - [TV (11,0)][iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface VSSubscriptionRegistrationCenter { - [Static] - [Export ("defaultSubscriptionRegistrationCenter")] - VSSubscriptionRegistrationCenter Default { get; } - - [Export ("setCurrentSubscription:")] - void SetCurrentSubscription ([NullAllowed] VSSubscription currentSubscription); - } } diff --git a/src/vision.cs b/src/vision.cs deleted file mode 100644 index ece41f344b1..00000000000 --- a/src/vision.cs +++ /dev/null @@ -1,1251 +0,0 @@ -// -// Vision C# bindings -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using XamCore.CoreFoundation; -using XamCore.CoreGraphics; -using XamCore.CoreImage; -using XamCore.CoreML; -using XamCore.CoreVideo; -using XamCore.Foundation; -using XamCore.Metal; -using XamCore.ObjCRuntime; -using XamCore.ImageIO; - -using Matrix3 = global::OpenTK.NMatrix3; - -namespace XamCore.Vision { - - [ErrorDomain ("VNErrorDomain")] - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Native] - enum VNErrorCode : nint { - Ok = 0, - RequestCancelled, - InvalidFormat, - OperationFailed, - OutOfBoundsError, - InvalidOption, - IOError, - MissingOption, - NotImplemented, - InternalError, - OutOfMemory, - UnknownError, - InvalidOperation, - InvalidImage, - InvalidArgument, - InvalidModel, - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Native] - enum VNRequestTrackingLevel : nuint { - Accurate = 0, - Fast, - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Native] - enum VNImageCropAndScaleOption : nuint { - CenterCrop = 0, - ScaleFit = 1, - ScaleFill, - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - enum VNBarcodeSymbology { - [Field ("VNBarcodeSymbologyAztec")] - Aztec, - - [Field ("VNBarcodeSymbologyCode39")] - Code39, - - [Field ("VNBarcodeSymbologyCode39Checksum")] - Code39Checksum, - - [Field ("VNBarcodeSymbologyCode39FullASCII")] - Code39FullAscii, - - [Field ("VNBarcodeSymbologyCode39FullASCIIChecksum")] - Code39FullAsciiChecksum, - - [Field ("VNBarcodeSymbologyCode93")] - Code93, - - [Field ("VNBarcodeSymbologyCode93i")] - Code93i, - - [Field ("VNBarcodeSymbologyCode128")] - Code128, - - [Field ("VNBarcodeSymbologyDataMatrix")] - DataMatrix, - - [Field ("VNBarcodeSymbologyEAN8")] - Ean8, - - [Field ("VNBarcodeSymbologyEAN13")] - Ean13, - - [Field ("VNBarcodeSymbologyI2of5")] - I2OF5, - - [Field ("VNBarcodeSymbologyI2of5Checksum")] - I2OF5Checksum, - - [Field ("VNBarcodeSymbologyITF14")] - Itf14, - - [Field ("VNBarcodeSymbologyPDF417")] - Pdf417, - - [Field ("VNBarcodeSymbologyQR")] - QR, - - [Field ("VNBarcodeSymbologyUPCE")] - Upce, - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface VNCoreMLModel { - - [Static] - [Export ("modelForMLModel:error:")] - [return: NullAllowed] - VNCoreMLModel FromMLModel (MLModel model, out NSError error); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - delegate void VNRequestCompletionHandler (VNRequest request, NSError error); - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNImageBasedRequest))] - interface VNCoreMLRequest { - - [Export ("model")] - VNCoreMLModel Model { get; } - - [Export ("imageCropAndScaleOption", ArgumentSemantic.Assign)] - VNImageCropAndScaleOption ImageCropAndScaleOption { get; set; } - - [Export ("initWithModel:")] - IntPtr Constructor (VNCoreMLModel model); - - [Export ("initWithModel:completionHandler:")] - [DesignatedInitializer] - IntPtr Constructor (VNCoreMLModel model, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Export ("initWithCompletionHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Abstract] - [DisableDefaultCtor] - [BaseType (typeof (VNImageBasedRequest))] - interface VNDetectBarcodesRequest { - - [Export ("initWithCompletionHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); - - [Static] - [Protected] - [Export ("supportedSymbologies", ArgumentSemantic.Copy)] - NSString [] WeakSupportedSymbologies { get; } - - [Static] - [Wrap ("VNBarcodeSymbologyExtensions.GetValues (WeakSupportedSymbologies)")] - VNBarcodeSymbology [] SupportedSymbologies { get; } - - [Protected] - [Export ("symbologies", ArgumentSemantic.Copy)] - NSString [] WeakSymbologies { get; set; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNImageBasedRequest))] - interface VNDetectFaceLandmarksRequest : VNFaceObservationAccepting { - - [Export ("initWithCompletionHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNImageBasedRequest))] - interface VNDetectFaceRectanglesRequest { - - [Export ("initWithCompletionHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNImageBasedRequest))] - interface VNDetectHorizonRequest { - - [Export ("initWithCompletionHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNImageBasedRequest))] - interface VNDetectRectanglesRequest { - - [Export ("initWithCompletionHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); - - [Export ("minimumAspectRatio")] - float MinimumAspectRatio { get; set; } - - [Export ("maximumAspectRatio")] - float MaximumAspectRatio { get; set; } - - [Export ("quadratureTolerance")] - float QuadratureTolerance { get; set; } - - [Export ("minimumSize")] - float MinimumSize { get; set; } - - [Export ("minimumConfidence")] - float MinimumConfidence { get; set; } - - [Export ("maximumObservations")] - nuint MaximumObservations { get; set; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNImageBasedRequest))] - interface VNDetectTextRectanglesRequest { - - [Export ("initWithCompletionHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); - - [Export ("reportCharacterBoxes")] - bool ReportCharacterBoxes { get; set; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Abstract] - [DisableDefaultCtor] - [BaseType (typeof (NSObject))] - interface VNFaceLandmarkRegion { - - [Export ("pointCount")] - nuint PointCount { get; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNFaceLandmarkRegion))] - interface VNFaceLandmarkRegion2D { - - [Internal] - [Export ("normalizedPoints")] - IntPtr _GetNormalizedPoints (); - - [Internal] - [Export ("pointsInImageOfSize:")] - IntPtr _GetPointsInImage (CGSize imageSize); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Abstract] - [DisableDefaultCtor] - [BaseType (typeof (NSObject))] - interface VNFaceLandmarks { - - [Export ("confidence")] - float Confidence { get; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNFaceLandmarks))] - interface VNFaceLandmarks2D { - - [NullAllowed, Export ("allPoints")] - VNFaceLandmarkRegion2D AllPoints { get; } - - [NullAllowed, Export ("faceContour")] - VNFaceLandmarkRegion2D FaceContour { get; } - - [NullAllowed, Export ("leftEye")] - VNFaceLandmarkRegion2D LeftEye { get; } - - [NullAllowed, Export ("rightEye")] - VNFaceLandmarkRegion2D RightEye { get; } - - [NullAllowed, Export ("leftEyebrow")] - VNFaceLandmarkRegion2D LeftEyebrow { get; } - - [NullAllowed, Export ("rightEyebrow")] - VNFaceLandmarkRegion2D RightEyebrow { get; } - - [NullAllowed, Export ("nose")] - VNFaceLandmarkRegion2D Nose { get; } - - [NullAllowed, Export ("noseCrest")] - VNFaceLandmarkRegion2D NoseCrest { get; } - - [NullAllowed, Export ("medianLine")] - VNFaceLandmarkRegion2D MedianLine { get; } - - [NullAllowed, Export ("outerLips")] - VNFaceLandmarkRegion2D OuterLips { get; } - - [NullAllowed, Export ("innerLips")] - VNFaceLandmarkRegion2D InnerLips { get; } - - [NullAllowed, Export ("leftPupil")] - VNFaceLandmarkRegion2D LeftPupil { get; } - - [NullAllowed, Export ("rightPupil")] - VNFaceLandmarkRegion2D RightPupil { get; } - } - - interface IVNFaceObservationAccepting { } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Protocol] - interface VNFaceObservationAccepting { - - [Abstract] - [NullAllowed, Export ("inputFaceObservations", ArgumentSemantic.Copy)] - VNFaceObservation [] InputFaceObservations { get; set; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Abstract] - [DisableDefaultCtor] - [BaseType (typeof (VNTargetedImageRequest))] - interface VNImageRegistrationRequest { - - // Inlined from parent class - [Export ("initWithTargetedCVPixelBuffer:options:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, NSDictionary optionsDict); - - [Wrap ("this (pixelBuffer, options?.Dictionary)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, VNImageOptions options); - - [Export ("initWithTargetedCVPixelBuffer:options:completionHandler:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (pixelBuffer, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCVPixelBuffer:orientation:options:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (pixelBuffer, orientation, options?.Dictionary)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedCVPixelBuffer:orientation:options:completionHandler:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (pixelBuffer, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCGImage:options:")] - IntPtr Constructor (CGImage cgImage, NSDictionary optionsDict); - - [Wrap ("this (cgImage, options?.Dictionary)")] - IntPtr Constructor (CGImage cgImage, VNImageOptions options); - - [Export ("initWithTargetedCGImage:options:completionHandler:")] - IntPtr Constructor (CGImage cgImage, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (cgImage, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CGImage cgImage, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCGImage:orientation:options:")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (cgImage, orientation, options?.Dictionary)")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedCGImage:orientation:options:completionHandler:")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (cgImage, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCIImage:options:")] - IntPtr Constructor (CIImage ciImage, NSDictionary optionsDict); - - [Wrap ("this (ciImage, options?.Dictionary)")] - IntPtr Constructor (CIImage ciImage, VNImageOptions options); - - [Export ("initWithTargetedCIImage:options:completionHandler:")] - IntPtr Constructor (CIImage ciImage, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (ciImage, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CIImage ciImage, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCIImage:orientation:options:")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (ciImage, orientation, options?.Dictionary)")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedCIImage:orientation:options:completionHandler:")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (ciImage, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageURL:options:")] - IntPtr Constructor (NSUrl imageUrl, NSDictionary optionsDict); - - [Wrap ("this (imageUrl, options?.Dictionary)")] - IntPtr Constructor (NSUrl imageUrl, VNImageOptions options); - - [Export ("initWithTargetedImageURL:options:completionHandler:")] - IntPtr Constructor (NSUrl imageUrl, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageUrl, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSUrl imageUrl, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageURL:orientation:options:")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (imageUrl, orientation, options?.Dictionary)")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedImageURL:orientation:options:completionHandler:")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageUrl, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageData:options:")] - IntPtr Constructor (NSData imageData, NSDictionary optionsDict); - - [Wrap ("this (imageData, options?.Dictionary)")] - IntPtr Constructor (NSData imageData, VNImageOptions options); - - [Export ("initWithTargetedImageData:options:completionHandler:")] - IntPtr Constructor (NSData imageData, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageData, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSData imageData, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageData:orientation:options:")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (imageData, orientation, options?.Dictionary)")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedImageData:orientation:options:completionHandler:")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageData, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNImageRegistrationRequest))] - interface VNTranslationalImageRegistrationRequest { - - // Inlined from parent class - [Export ("initWithTargetedCVPixelBuffer:options:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, NSDictionary optionsDict); - - [Wrap ("this (pixelBuffer, options?.Dictionary)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, VNImageOptions options); - - [Export ("initWithTargetedCVPixelBuffer:options:completionHandler:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (pixelBuffer, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCVPixelBuffer:orientation:options:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (pixelBuffer, orientation, options?.Dictionary)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedCVPixelBuffer:orientation:options:completionHandler:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (pixelBuffer, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCGImage:options:")] - IntPtr Constructor (CGImage cgImage, NSDictionary optionsDict); - - [Wrap ("this (cgImage, options?.Dictionary)")] - IntPtr Constructor (CGImage cgImage, VNImageOptions options); - - [Export ("initWithTargetedCGImage:options:completionHandler:")] - IntPtr Constructor (CGImage cgImage, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (cgImage, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CGImage cgImage, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCGImage:orientation:options:")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (cgImage, orientation, options?.Dictionary)")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedCGImage:orientation:options:completionHandler:")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (cgImage, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCIImage:options:")] - IntPtr Constructor (CIImage ciImage, NSDictionary optionsDict); - - [Wrap ("this (ciImage, options?.Dictionary)")] - IntPtr Constructor (CIImage ciImage, VNImageOptions options); - - [Export ("initWithTargetedCIImage:options:completionHandler:")] - IntPtr Constructor (CIImage ciImage, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (ciImage, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CIImage ciImage, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCIImage:orientation:options:")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (ciImage, orientation, options?.Dictionary)")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedCIImage:orientation:options:completionHandler:")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (ciImage, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageURL:options:")] - IntPtr Constructor (NSUrl imageUrl, NSDictionary optionsDict); - - [Wrap ("this (imageUrl, options?.Dictionary)")] - IntPtr Constructor (NSUrl imageUrl, VNImageOptions options); - - [Export ("initWithTargetedImageURL:options:completionHandler:")] - IntPtr Constructor (NSUrl imageUrl, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageUrl, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSUrl imageUrl, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageURL:orientation:options:")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (imageUrl, orientation, options?.Dictionary)")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedImageURL:orientation:options:completionHandler:")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageUrl, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageData:options:")] - IntPtr Constructor (NSData imageData, NSDictionary optionsDict); - - [Wrap ("this (imageData, options?.Dictionary)")] - IntPtr Constructor (NSData imageData, VNImageOptions options); - - [Export ("initWithTargetedImageData:options:completionHandler:")] - IntPtr Constructor (NSData imageData, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageData, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSData imageData, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageData:orientation:options:")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (imageData, orientation, options?.Dictionary)")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedImageData:orientation:options:completionHandler:")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageData, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNImageRegistrationRequest))] - interface VNHomographicImageRegistrationRequest { - - // Inlined from parent class - [Export ("initWithTargetedCVPixelBuffer:options:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, NSDictionary optionsDict); - - [Wrap ("this (pixelBuffer, options?.Dictionary)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, VNImageOptions options); - - [Export ("initWithTargetedCVPixelBuffer:options:completionHandler:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (pixelBuffer, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCVPixelBuffer:orientation:options:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (pixelBuffer, orientation, options?.Dictionary)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedCVPixelBuffer:orientation:options:completionHandler:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (pixelBuffer, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCGImage:options:")] - IntPtr Constructor (CGImage cgImage, NSDictionary optionsDict); - - [Wrap ("this (cgImage, options?.Dictionary)")] - IntPtr Constructor (CGImage cgImage, VNImageOptions options); - - [Export ("initWithTargetedCGImage:options:completionHandler:")] - IntPtr Constructor (CGImage cgImage, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (cgImage, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CGImage cgImage, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCGImage:orientation:options:")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (cgImage, orientation, options?.Dictionary)")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedCGImage:orientation:options:completionHandler:")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (cgImage, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCIImage:options:")] - IntPtr Constructor (CIImage ciImage, NSDictionary optionsDict); - - [Wrap ("this (ciImage, options?.Dictionary)")] - IntPtr Constructor (CIImage ciImage, VNImageOptions options); - - [Export ("initWithTargetedCIImage:options:completionHandler:")] - IntPtr Constructor (CIImage ciImage, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (ciImage, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CIImage ciImage, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCIImage:orientation:options:")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (ciImage, orientation, options?.Dictionary)")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedCIImage:orientation:options:completionHandler:")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (ciImage, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageURL:options:")] - IntPtr Constructor (NSUrl imageUrl, NSDictionary optionsDict); - - [Wrap ("this (imageUrl, options?.Dictionary)")] - IntPtr Constructor (NSUrl imageUrl, VNImageOptions options); - - [Export ("initWithTargetedImageURL:options:completionHandler:")] - IntPtr Constructor (NSUrl imageUrl, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageUrl, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSUrl imageUrl, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageURL:orientation:options:")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (imageUrl, orientation, options?.Dictionary)")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedImageURL:orientation:options:completionHandler:")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageUrl, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageData:options:")] - IntPtr Constructor (NSData imageData, NSDictionary optionsDict); - - [Wrap ("this (imageData, options?.Dictionary)")] - IntPtr Constructor (NSData imageData, VNImageOptions options); - - [Export ("initWithTargetedImageData:options:completionHandler:")] - IntPtr Constructor (NSData imageData, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageData, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSData imageData, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageData:orientation:options:")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (imageData, orientation, options?.Dictionary)")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedImageData:orientation:options:completionHandler:")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageData, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Abstract] - [DisableDefaultCtor] - [BaseType (typeof (NSObject))] - interface VNObservation : NSCopying, NSSecureCoding { - - [Export ("uuid", ArgumentSemantic.Strong)] - NSUuid Uuid { get; } - - [Export ("confidence")] - float Confidence { get; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNObservation))] - interface VNDetectedObjectObservation { - - [Static] - [Export ("observationWithBoundingBox:")] - VNDetectedObjectObservation FromBoundingBox (CGRect boundingBox); - - [Export ("boundingBox", ArgumentSemantic.Assign)] - CGRect BoundingBox { get; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNDetectedObjectObservation))] - interface VNFaceObservation { - - [NullAllowed, Export ("landmarks", ArgumentSemantic.Strong)] - VNFaceLandmarks2D Landmarks { get; } - - [New] - [Static] - [Export ("observationWithBoundingBox:")] - VNFaceObservation FromBoundingBox (CGRect boundingBox); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNObservation))] - interface VNClassificationObservation { - - [Export ("identifier")] - string Identifier { get; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNObservation))] - interface VNCoreMLFeatureValueObservation { - - [Export ("featureValue", ArgumentSemantic.Copy)] - MLFeatureValue FeatureValue { get; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNObservation))] - interface VNPixelBufferObservation { - - [Export ("pixelBuffer")] - CVPixelBuffer PixelBuffer { get; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNDetectedObjectObservation))] - interface VNRectangleObservation { - - [Export ("topLeft", ArgumentSemantic.Assign)] - CGPoint TopLeft { get; } - - [Export ("topRight", ArgumentSemantic.Assign)] - CGPoint TopRight { get; } - - [Export ("bottomLeft", ArgumentSemantic.Assign)] - CGPoint BottomLeft { get; } - - [Export ("bottomRight", ArgumentSemantic.Assign)] - CGPoint BottomRight { get; } - - [New] - [Static] - [Export ("observationWithBoundingBox:")] - VNRectangleObservation FromBoundingBox (CGRect boundingBox); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNDetectedObjectObservation))] - interface VNTextObservation { - - [NullAllowed, Export ("characterBoxes", ArgumentSemantic.Copy)] - VNRectangleObservation [] CharacterBoxes { get; } - - [New] - [Static] - [Export ("observationWithBoundingBox:")] - VNTextObservation FromBoundingBox (CGRect boundingBox); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [BaseType (typeof (VNRectangleObservation))] - interface VNBarcodeObservation { - - [Protected] - [Export ("symbology")] - NSString WeakSymbology { get; } - - [Wrap ("VNBarcodeSymbologyExtensions.GetValue (WeakSymbology)")] - VNBarcodeSymbology Symbology { get; } - - [NullAllowed, Export ("barcodeDescriptor", ArgumentSemantic.Strong)] - CIBarcodeDescriptor BarcodeDescriptor { get; } - - [New] - [Static] - [Export ("observationWithBoundingBox:")] - VNBarcodeObservation FromBoundingBox (CGRect boundingBox); - - [NullAllowed, Export ("payloadStringValue")] - string PayloadStringValue { get; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNObservation))] - interface VNHorizonObservation { - - [Export ("transform", ArgumentSemantic.Assign)] - CGAffineTransform Transform { get; } - - [Export ("angle")] - nfloat Angle { get; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Abstract] - [DisableDefaultCtor] - [BaseType (typeof (VNObservation))] - interface VNImageAlignmentObservation { - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNImageAlignmentObservation))] - interface VNImageTranslationAlignmentObservation { - - [Export ("alignmentTransform", ArgumentSemantic.Assign)] - CGAffineTransform AlignmentTransform { get; set; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [DisableDefaultCtor] - [BaseType (typeof (VNImageAlignmentObservation))] - interface VNImageHomographicAlignmentObservation { - - [Export ("warpTransform", ArgumentSemantic.Assign)] - Matrix3 WarpTransform { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Abstract] - [DisableDefaultCtor] - [BaseType (typeof (NSObject))] - interface VNRequest : NSCopying { - - [Export ("initWithCompletionHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); - - [Export ("preferBackgroundProcessing")] - bool PreferBackgroundProcessing { get; set; } - - [NullAllowed, Export ("preferredMetalContext", ArgumentSemantic.Retain)] - IMTLDevice PreferredMetalContext { get; set; } - - // From docs: VNObservation subclasses specific to the VNRequest subclass - // Since downcasting is not easy we are exposing - // this property as a generic method 'GetResults'. - [Internal] - [NullAllowed, Export ("results", ArgumentSemantic.Copy)] - IntPtr _Results { get; } - - [NullAllowed, Export ("completionHandler", ArgumentSemantic.Copy)] - VNRequestCompletionHandler CompletionHandler { get; } - - [Export ("usesCPUOnly")] - bool UsesCpuOnly { get; set; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Abstract] - [DisableDefaultCtor] - [BaseType (typeof (VNRequest))] - interface VNImageBasedRequest { - - [Export ("initWithCompletionHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); - - [Export ("regionOfInterest", ArgumentSemantic.Assign)] - CGRect RegionOfInterest { get; set; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Internal] - [Static] - interface VNImageOptionKeys { - [Field ("VNImageOptionProperties")] - NSString PropertiesKey { get; } - - [Field ("VNImageOptionCameraIntrinsics")] - NSString CameraIntrinsicsKey { get; } - - [Field ("VNImageOptionCIContext")] - NSString CIContextKey { get; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [StrongDictionary ("VNImageOptionKeys")] - interface VNImageOptions { - [Export ("PropertiesKey")] // Have the option to set your own dict - NSDictionary WeakProperties { get; set; } - - [StrongDictionary] // Yep we need CoreGraphics to disambiguate - CoreGraphics.CGImageProperties Properties { get; set; } - - NSData CameraIntrinsics { get; set; } - CIContext CIContext { get; set; } - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface VNImageRequestHandler { - - [Export ("initWithCVPixelBuffer:options:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, NSDictionary options); - - [Wrap ("this (pixelBuffer, imageOptions?.Dictionary)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, VNImageOptions imageOptions); - - [Export ("initWithCVPixelBuffer:orientation:options:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, NSDictionary options); - - [Wrap ("this (pixelBuffer, orientation, imageOptions?.Dictionary)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, VNImageOptions imageOptions); - - [Export ("initWithCGImage:options:")] - IntPtr Constructor (CGImage image, NSDictionary options); - - [Wrap ("this (image, imageOptions?.Dictionary)")] - IntPtr Constructor (CGImage image, VNImageOptions imageOptions); - - [Export ("initWithCGImage:orientation:options:")] - IntPtr Constructor (CGImage image, CGImagePropertyOrientation orientation, NSDictionary options); - - [Wrap ("this (image, orientation, imageOptions?.Dictionary)")] - IntPtr Constructor (CGImage image, CGImagePropertyOrientation orientation, VNImageOptions imageOptions); - - [Export ("initWithCIImage:options:")] - IntPtr Constructor (CIImage image, NSDictionary options); - - [Wrap ("this (image, imageOptions?.Dictionary)")] - IntPtr Constructor (CIImage image, VNImageOptions imageOptions); - - [Export ("initWithCIImage:orientation:options:")] - IntPtr Constructor (CIImage image, CGImagePropertyOrientation orientation, NSDictionary options); - - [Wrap ("this (image, orientation, imageOptions?.Dictionary)")] - IntPtr Constructor (CIImage image, CGImagePropertyOrientation orientation, VNImageOptions imageOptions); - - [Export ("initWithURL:options:")] - IntPtr Constructor (NSUrl imageUrl, NSDictionary options); - - [Wrap ("this (imageUrl, imageOptions?.Dictionary)")] - IntPtr Constructor (NSUrl imageUrl, VNImageOptions imageOptions); - - [Export ("initWithURL:orientation:options:")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, NSDictionary options); - - [Wrap ("this (imageUrl, orientation, imageOptions?.Dictionary)")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, VNImageOptions imageOptions); - - [Export ("initWithData:options:")] - IntPtr Constructor (NSData imageData, NSDictionary options); - - [Wrap ("this (imageData, imageOptions?.Dictionary)")] - IntPtr Constructor (NSData imageData, VNImageOptions imageOptions); - - [Export ("initWithData:orientation:options:")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, NSDictionary options); - - [Wrap ("this (imageData, orientation, imageOptions?.Dictionary)")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions imageOptions); - - [Export ("performRequests:error:")] - bool Perform (VNRequest [] requests, out NSError error); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // it's a designated initializer - interface VNSequenceRequestHandler { - - [DesignatedInitializer] - [Export ("init")] - IntPtr Constructor (); - - [Export ("performRequests:onCVPixelBuffer:error:")] - bool Perform (VNRequest [] requests, CVPixelBuffer pixelBuffer, out NSError error); - - [Export ("performRequests:onCVPixelBuffer:orientation:error:")] - bool Perform (VNRequest [] requests, CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, out NSError error); - - [Export ("performRequests:onCGImage:error:")] - bool Perform (VNRequest [] requests, CGImage image, out NSError error); - - [Export ("performRequests:onCGImage:orientation:error:")] - bool Perform (VNRequest [] requests, CGImage image, CGImagePropertyOrientation orientation, out NSError error); - - [Export ("performRequests:onCIImage:error:")] - bool Perform (VNRequest [] requests, CIImage image, out NSError error); - - [Export ("performRequests:onCIImage:orientation:error:")] - bool Perform (VNRequest [] requests, CIImage image, CGImagePropertyOrientation orientation, out NSError error); - - [Export ("performRequests:onImageURL:error:")] - bool Perform (VNRequest [] requests, NSUrl imageUrl, out NSError error); - - [Export ("performRequests:onImageURL:orientation:error:")] - bool Perform (VNRequest [] requests, NSUrl imageUrl, CGImagePropertyOrientation orientation, out NSError error); - - [Export ("performRequests:onImageData:error:")] - bool Perform (VNRequest [] requests, NSData imageData, out NSError error); - - [Export ("performRequests:onImageData:orientation:error:")] - bool Perform (VNRequest [] requests, NSData imageData, CGImagePropertyOrientation orientation, out NSError error); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Abstract] - [BaseType (typeof (VNImageBasedRequest))] - [DisableDefaultCtor] - interface VNTargetedImageRequest { - - [Export ("initWithTargetedCVPixelBuffer:options:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, NSDictionary optionsDict); - - [Wrap ("this (pixelBuffer, options?.Dictionary)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, VNImageOptions options); - - [Export ("initWithTargetedCVPixelBuffer:options:completionHandler:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (pixelBuffer, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCVPixelBuffer:orientation:options:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (pixelBuffer, orientation, options?.Dictionary)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedCVPixelBuffer:orientation:options:completionHandler:")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (pixelBuffer, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CVPixelBuffer pixelBuffer, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCGImage:options:")] - IntPtr Constructor (CGImage cgImage, NSDictionary optionsDict); - - [Wrap ("this (cgImage, options?.Dictionary)")] - IntPtr Constructor (CGImage cgImage, VNImageOptions options); - - [Export ("initWithTargetedCGImage:options:completionHandler:")] - IntPtr Constructor (CGImage cgImage, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (cgImage, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CGImage cgImage, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCGImage:orientation:options:")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (cgImage, orientation, options?.Dictionary)")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedCGImage:orientation:options:completionHandler:")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (cgImage, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CGImage cgImage, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCIImage:options:")] - IntPtr Constructor (CIImage ciImage, NSDictionary optionsDict); - - [Wrap ("this (ciImage, options?.Dictionary)")] - IntPtr Constructor (CIImage ciImage, VNImageOptions options); - - [Export ("initWithTargetedCIImage:options:completionHandler:")] - IntPtr Constructor (CIImage ciImage, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (ciImage, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CIImage ciImage, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedCIImage:orientation:options:")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (ciImage, orientation, options?.Dictionary)")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedCIImage:orientation:options:completionHandler:")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (ciImage, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (CIImage ciImage, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageURL:options:")] - IntPtr Constructor (NSUrl imageUrl, NSDictionary optionsDict); - - [Wrap ("this (imageUrl, options?.Dictionary)")] - IntPtr Constructor (NSUrl imageUrl, VNImageOptions options); - - [Export ("initWithTargetedImageURL:options:completionHandler:")] - IntPtr Constructor (NSUrl imageUrl, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageUrl, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSUrl imageUrl, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageURL:orientation:options:")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (imageUrl, orientation, options?.Dictionary)")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedImageURL:orientation:options:completionHandler:")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageUrl, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSUrl imageUrl, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageData:options:")] - IntPtr Constructor (NSData imageData, NSDictionary optionsDict); - - [Wrap ("this (imageData, options?.Dictionary)")] - IntPtr Constructor (NSData imageData, VNImageOptions options); - - [Export ("initWithTargetedImageData:options:completionHandler:")] - IntPtr Constructor (NSData imageData, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageData, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSData imageData, VNImageOptions options, VNRequestCompletionHandler completionHandler); - - [Export ("initWithTargetedImageData:orientation:options:")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, NSDictionary optionsDict); - - [Wrap ("this (imageData, orientation, options?.Dictionary)")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions options); - - [Export ("initWithTargetedImageData:orientation:options:completionHandler:")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, NSDictionary optionsDict, [NullAllowed] VNRequestCompletionHandler completionHandler); - - [Wrap ("this (imageData, orientation, options?.Dictionary, completionHandler)")] - IntPtr Constructor (NSData imageData, CGImagePropertyOrientation orientation, VNImageOptions options, VNRequestCompletionHandler completionHandler); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [BaseType (typeof (VNTrackingRequest))] - [DisableDefaultCtor] - interface VNTrackObjectRequest { - - [Export ("initWithCompletionHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); - - [Export ("initWithDetectedObjectObservation:")] - IntPtr Constructor (VNDetectedObjectObservation observation); - - [Export ("initWithDetectedObjectObservation:completionHandler:")] - IntPtr Constructor (VNDetectedObjectObservation observation, [NullAllowed] VNRequestCompletionHandler completionHandler); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [BaseType (typeof (VNTrackingRequest))] - [DisableDefaultCtor] - interface VNTrackRectangleRequest { - - [Export ("initWithCompletionHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); - - [Export ("initWithRectangleObservation:")] - IntPtr Constructor (VNRectangleObservation observation); - - [Export ("initWithRectangleObservation:completionHandler:")] - [DesignatedInitializer] - IntPtr Constructor (VNRectangleObservation observation, [NullAllowed] VNRequestCompletionHandler completionHandler); - } - - [TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] - [Abstract] - [BaseType (typeof (VNImageBasedRequest))] - [DisableDefaultCtor] - interface VNTrackingRequest { - - [Export ("initWithCompletionHandler:")] - [DesignatedInitializer] - IntPtr Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler); - - [Export ("inputObservation", ArgumentSemantic.Strong)] - VNDetectedObjectObservation InputObservation { get; set; } - - [Export ("trackingLevel", ArgumentSemantic.Assign)] - VNRequestTrackingLevel TrackingLevel { get; set; } - - [Export ("lastFrame")] - bool LastFrame { [Bind ("isLastFrame")] get; set; } - } -} -#endif diff --git a/src/watchkit.cs b/src/watchkit.cs index 91ca0bbd168..b3e2ffa097e 100644 --- a/src/watchkit.cs +++ b/src/watchkit.cs @@ -26,12 +26,10 @@ namespace XamCore.WatchKit { [iOS (8,2)] [BaseType (typeof (NSObject))] [Abstract] // To use this class, subclass it - [DisableDefaultCtor] // DesignatedInitializer below + // FIXME: that's not 100% obvious - OTOH beta2 crash if we call `init` interface WKInterfaceController { - [DesignatedInitializer] - [Export ("init")] - IntPtr Constructor (); + // `init` is now (beta 2) the designated initializer [Export ("awakeWithContext:")] void Awake ([NullAllowed] NSObject context); @@ -58,13 +56,13 @@ interface WKInterfaceController { [Export ("table:didSelectRowAtIndex:")] void DidSelectRow (WKInterfaceTable table, nint rowIndex); - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'UNUserNotificationCenterDelegate' instead.")] - [Deprecated (PlatformName.WatchOS, 3,0, message: "Use 'UNUserNotificationCenterDelegate' instead.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use UNUserNotificationCenterDelegate")] + [Deprecated (PlatformName.WatchOS, 3,0, message: "Use UNUserNotificationCenterDelegate")] [Export ("handleActionWithIdentifier:forRemoteNotification:")] void HandleRemoteNotificationAction ([NullAllowed] string identifier, NSDictionary remoteNotification); - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'UNUserNotificationCenterDelegate' instead.")] - [Deprecated (PlatformName.WatchOS, 3,0, message: "Use 'UNUserNotificationCenterDelegate' instead.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use UNUserNotificationCenterDelegate")] + [Deprecated (PlatformName.WatchOS, 3,0, message: "Use UNUserNotificationCenterDelegate")] [Export ("handleActionWithIdentifier:forLocalNotification:")] void HandleLocalNotificationAction ([NullAllowed] string identifier, UILocalNotification localNotification); @@ -73,7 +71,6 @@ interface WKInterfaceController { [Export ("handleActionWithIdentifier:forNotification:")] void HandleAction ([NullAllowed] string identifier, UNNotification notification); - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'WKExtensionDelegate.HandleUserActivity' instead.")] [Export ("handleUserActivity:")] // This NSDictionary is OK, it is arbitrary and user specific void HandleUserActivity ([NullAllowed] NSDictionary userActivity); @@ -160,15 +157,9 @@ interface WKInterfaceController { [Static, Export ("openParentApplication:reply:")] bool OpenParentApplication (NSDictionary userInfo, [NullAllowed] Action reply); - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'ReloadRootPageControllers' instead.")] [Static, Export ("reloadRootControllersWithNames:contexts:")] void ReloadRootControllers (string [] names, [NullAllowed] NSObject [] contexts); - [Watch (4,0)][NoiOS] - [Static] - [Export ("reloadRootPageControllersWithNames:contexts:orientation:pageIndex:")] - void ReloadRootPageControllers (string[] names, [NullAllowed] NSObject[] contexts, WKPageOrientation orientation, nint pageIndex); - #if !XAMCORE_3_0 // now exposed with the corresponding WKErrorCode enum [Field ("WatchKitErrorDomain")] @@ -201,11 +192,9 @@ interface WKInterfaceController { [Export ("dismissAddPassesController")] void DismissAddPassesController (); - [Deprecated (PlatformName.WatchOS, 4,0, message: "Glances support was removed.")] [Export ("beginGlanceUpdates")] void BeginGlanceUpdates (); - [Deprecated (PlatformName.WatchOS, 4,0, message: "Glances support was removed.")] [Export ("endGlanceUpdates")] void EndGlanceUpdates (); @@ -226,40 +215,19 @@ interface WKInterfaceController { [Watch (3,0)][NoiOS] [Export ("crownSequencer", ArgumentSemantic.Strong)] WKCrownSequencer CrownSequencer { get; } - - [Watch (4,0)][NoiOS] - [Export ("scrollToObject:atScrollPosition:animated:")] - void ScrollTo (WKInterfaceObject @object, WKInterfaceScrollPosition scrollPosition, bool animated); - - [Watch (4,0)][NoiOS] - [Export ("interfaceDidScrollToTop")] - void InterfaceDidScrollToTop (); - - [Watch (4,0)][NoiOS] - [Export ("interfaceOffsetDidScrollToTop")] - void InterfaceOffsetDidScrollToTop (); - - [Watch (4,0)][NoiOS] - [Export ("interfaceOffsetDidScrollToBottom")] - void InterfaceOffsetDidScrollToBottom (); } [iOS (8,2)] [BaseType (typeof (WKInterfaceController))] - [DisableDefaultCtor] // DesignatedInitializer below interface WKUserNotificationInterfaceController { - [DesignatedInitializer] - [Export ("init")] - IntPtr Constructor (); - - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'DidReceiveNotification' instead.")] - [Deprecated (PlatformName.WatchOS, 3,0, message: "Use 'DidReceiveNotification' instead.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use DidReceiveNotification")] + [Deprecated (PlatformName.WatchOS, 3,0, message: "Use DidReceiveNotification:")] [Export ("didReceiveRemoteNotification:withCompletion:")] void DidReceiveRemoteNotification (NSDictionary remoteNotification, Action completionHandler); - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'DidReceiveNotification' instead.")] - [Deprecated (PlatformName.WatchOS, 3,0, message: "Use 'DidReceiveNotification' instead.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use DidReceiveNotification")] + [Deprecated (PlatformName.WatchOS, 3,0, message: "Use DidReceiveNotification:")] [Export ("didReceiveLocalNotification:withCompletion:")] void DidReceiveLocalNotification (UILocalNotification localNotification, Action completionHandler); @@ -268,12 +236,12 @@ interface WKUserNotificationInterfaceController { void DidReceiveNotification (UNNotification notification, Action completionHandler); [NoiOS] - [Deprecated (PlatformName.WatchOS, 3,0, message: "Use overload accepting an 'UNNotification' parameter.")] + [Deprecated (PlatformName.WatchOS, 3,0, message: "Use overload accepting an UNNotification parameter")] [Export ("suggestionsForResponseToActionWithIdentifier:forRemoteNotification:inputLanguage:")] string[] GetSuggestionsForResponseToAction (string identifier, NSDictionary remoteNotification, string inputLanguage); [NoiOS] - [Deprecated (PlatformName.WatchOS, 3,0, message: "Use overload accepting an 'UNNotification' parameter.")] + [Deprecated (PlatformName.WatchOS, 3,0, message: "Use overload accepting an UNNotification parameter")] [Export ("suggestionsForResponseToActionWithIdentifier:forLocalNotification:inputLanguage:")] string[] GetSuggestionsForResponseToAction (string identifier, UILocalNotification localNotification, string inputLanguage); @@ -362,11 +330,6 @@ interface WKAccessibility { [Notification] [Field ("WKAccessibilityVoiceOverStatusChanged")] NSString VoiceOverStatusChanged { get; } - - [Watch (4,0)][NoiOS] - [Notification] - [Field ("WKAccessibilityReduceMotionStatusDidChangeNotification")] - NSString ReduceMotionStatusDidChangeNotification { get; } } [iOS (8,2)] @@ -451,18 +414,6 @@ interface WKInterfaceDevice { [Watch (3,0)][NoiOS] [Export ("crownOrientation")] WKInterfaceDeviceCrownOrientation CrownOrientation { get; } - - [Watch (4,0)][NoiOS] - [Export ("batteryMonitoringEnabled")] - bool BatteryMonitoringEnabled { [Bind ("isBatteryMonitoringEnabled")] get; set; } - - [Watch (4,0)][NoiOS] - [Export ("batteryLevel")] - float BatteryLevel { get; } - - [Watch (4,0)][NoiOS] - [Export ("batteryState")] - WKInterfaceDeviceBatteryState BatteryState { get; } } [iOS (8,2)] @@ -879,26 +830,6 @@ interface WKExtension { [Watch (3,0)] [Export ("applicationState")] WKApplicationState ApplicationState { get; } - - [Watch (4,0)] - [NullAllowed, Export ("visibleInterfaceController")] - WKInterfaceController VisibleInterfaceController { get; } - - [Watch (4,0)] - [Export ("isApplicationRunningInDock")] - bool IsApplicationRunningInDock { get; } - - [Watch (4,0)] - [Export ("autorotating")] - bool Autorotating { [Bind ("isAutorotating")] get; set; } - - [Watch (4,0)] - [Export ("frontmostTimeoutExtended")] - bool FrontmostTimeoutExtended { [Bind ("isFrontmostTimeoutExtended")] get; set; } - - [Watch (4,0)] - [Export ("enableWaterLock")] - void EnableWaterLock (); } [NoiOS] @@ -961,10 +892,6 @@ interface WKExtensionDelegate { [Watch (3,0)] [Export ("handleWorkoutConfiguration:")] void HandleWorkoutConfiguration (HKWorkoutConfiguration workoutConfiguration); - - [Watch (4,0)] - [Export ("deviceOrientationDidChange")] - void DeviceOrientationDidChange (); } [Watch (2,2), NoiOS] @@ -1097,13 +1024,8 @@ interface WKRefreshBackgroundTask { [NullAllowed, Export ("userInfo")] INSSecureCoding UserInfo { get; } - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'SetTaskCompleted (false)' instead.")] [Export ("setTaskCompleted")] void SetTaskCompleted (); - - [Watch (4,0)] - [Export ("setTaskCompletedWithSnapshot:")] - void SetTaskCompleted (bool refreshSnapshot); } [Watch (3,0)][NoiOS] @@ -1115,14 +1037,9 @@ interface WKApplicationRefreshBackgroundTask { [BaseType (typeof (WKRefreshBackgroundTask))] interface WKSnapshotRefreshBackgroundTask { - [Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'ReasonForSnapshot' instead.")] [Export ("returnToDefaultState")] bool ReturnToDefaultState { get; } - [Watch (4,0)] - [Export ("reasonForSnapshot")] - WKSnapshotReason ReasonForSnapshot { get; } - [Export ("setTaskCompletedWithDefaultStateRestored:estimatedSnapshotExpiration:userInfo:")] void SetTaskCompleted (bool restoredDefaultState, [NullAllowed] NSDate estimatedSnapshotExpiration, [NullAllowed] INSSecureCoding userInfo); } diff --git a/src/webkit.cs b/src/webkit.cs index 2ff763ee624..fa53fa1a763 100644 --- a/src/webkit.cs +++ b/src/webkit.cs @@ -1090,7 +1090,7 @@ partial interface DomEvent { void PreventDefault (); #if !XAMCORE_3_0 - [Obsolete ("Use the constructor instead.")] + [Obsolete ("Use the constructor instead")] [Export ("initEvent:canBubbleArg:cancelableArg:")] void InitEvent (string eventTypeArg, bool canBubbleArg, bool cancelableArg); #endif @@ -1107,7 +1107,7 @@ partial interface DomEvent { [DisableDefaultCtor] partial interface DomOverflowEvent { #if !XAMCORE_3_0 - [Obsolete ("Use the constructor instead.")] + [Obsolete ("Use the constructor instead")] [Export ("initOverflowEvent:horizontalOverflow:verticalOverflow:")] void InitEvent (ushort orient, bool hasHorizontalOverflow, bool hasVerticalOverflow); #endif @@ -1142,7 +1142,7 @@ partial interface DomProgressEvent { [DisableDefaultCtor] partial interface DomUIEvent { #if !XAMCORE_3_0 - [Obsolete ("Use the constructor instead.")] + [Obsolete ("Use the constructor instead")] [Export ("initUIEvent:canBubble:cancelable:view:detail:")] void InitEvent (string eventType, bool canBubble, bool cancelable, DomAbstractView view, int /* int, not NSInteger */ detail); #endif @@ -1179,11 +1179,11 @@ partial interface DomUIEvent { [DisableDefaultCtor] partial interface DomKeyboardEvent { #if !XAMCORE_3_0 - [Obsolete ("Use the constructor instead.")] + [Obsolete ("Use the constructor instead")] [Export ("initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:")] void InitEvent (string eventType, bool canBubble, bool cancelable, DomAbstractView view, string keyIdentifier, DomKeyLocation keyLocation, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey); - [Obsolete ("Use the constructor instead.")] + [Obsolete ("Use the constructor instead")] [Export ("initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:")] void InitEvent (string eventType, bool canBubble, bool cancelable, DomAbstractView view, string keyIdentifier, DomKeyLocation keyLocation, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); #endif @@ -1231,7 +1231,7 @@ partial interface DomKeyboardEvent { [DisableDefaultCtor] partial interface DomMouseEvent { #if !XAMCORE_3_0 - [Obsolete ("Use the constructor instead.")] + [Obsolete ("Use the constructor instead")] [Export ("initMouseEvent:canBubble:cancelable:view:detail:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:button:relatedTarget:")] void InitEvent (string eventType, bool canBubble, bool cancelable, DomAbstractView view, int /* int, not NSInteger */ detail, int /* int, not NSInteger */ screenX, int /* int, not NSInteger */ screenY, int /* int, not NSInteger */ clientX, int /* int, not NSInteger */ clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, ushort button, [Protocolize] DomEventTarget relatedTarget); #endif @@ -1293,7 +1293,7 @@ partial interface DomMouseEvent { [DisableDefaultCtor] partial interface DomWheelEvent { #if !XAMCORE_3_0 - [Obsolete ("Use the constructor instead.")] + [Obsolete ("Use the constructor instead")] [Export ("initWheelEvent:wheelDeltaY:view:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:")] void InitEvent (int /* int, not NSInteger */ wheelDeltaX, int /* int, not NSInteger */ wheelDeltaY, DomAbstractView view, int /* int, not NSInteger */ screenX, int /* int, not NSInteger */ screnY, int /* int, not NSInteger */ clientX, int /* int, not NSInteger */ clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); #endif diff --git a/src/wkwebkit.cs b/src/wkwebkit.cs index b4e50a703d0..64196e64fe0 100644 --- a/src/wkwebkit.cs +++ b/src/wkwebkit.cs @@ -61,77 +61,6 @@ interface WKBackForwardList { WKBackForwardListItem ItemAtIndex (nint index); } - [Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface WKContentRuleList - { - [Export ("identifier")] - string Identifier { get; } - } - - [Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface WKContentRuleListStore - { - [Static] - [Export ("defaultStore")] - WKContentRuleListStore DefaultStore { get; } - - [Static] - [Export ("storeWithURL:")] - WKContentRuleListStore FromUrl (NSUrl url); - - [Export ("compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:")] - [Async] - void CompileContentRuleList (string identifier, string encodedContentRuleList, Action completionHandler); - - [Export ("lookUpContentRuleListForIdentifier:completionHandler:")] - [Async] - void LookUpContentRuleList (string identifier, Action completionHandler); - - [Export ("removeContentRuleListForIdentifier:completionHandler:")] - [Async] - void RemoveContentRuleList (string identifier, Action completionHandler); - - [Export ("getAvailableContentRuleListIdentifiers:")] - [Async] - void GetAvailableContentRuleListIdentifiers (Action callback); - } - - [Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject), Name = "WKHTTPCookieStore")] - [DisableDefaultCtor] - interface WKHttpCookieStore - { - [Export ("getAllCookies:")] - [Async] - void GetAllCookies (Action completionHandler); - - [Export ("setCookie:completionHandler:")] - [Async] - void SetCookie (NSHttpCookie cookie, [NullAllowed] Action completionHandler); - - [Export ("deleteCookie:completionHandler:")] - [Async] - void DeleteCookie (NSHttpCookie cookie, [NullAllowed] Action completionHandler); - - [Export ("addObserver:")] - void AddObserver (IWKHttpCookieStoreObserver observer); - - [Export ("removeObserver:")] - void RemoveObserver (IWKHttpCookieStoreObserver observer); - } - - interface IWKHttpCookieStoreObserver {} - - [Mac (10,13), iOS (11,0)] - [Protocol (Name = "WKHTTPCookieStoreObserver")] - interface WKHttpCookieStoreObserver - { - [Export ("cookiesDidChangeInCookieStore:")] - void CookiesDidChangeInCookieStore (WKHttpCookieStore cookieStore); - } - [iOS (8,0), Mac (10,10, onlyOn64 : true)] // Not defined in 32-bit [BaseType (typeof (NSObject))] interface WKFrameInfo : NSCopying { @@ -145,10 +74,6 @@ interface WKFrameInfo : NSCopying { [iOS (9,0)][Mac (10,11, onlyOn64 : true)] [Export ("securityOrigin")] WKSecurityOrigin SecurityOrigin { get; } - - [iOS (11,0)][Mac (10,13, onlyOn64 : true)] - [NullAllowed, Export ("webView", ArgumentSemantic.Weak)] - WKWebView WebView { get; } } [iOS (8,0), Mac (10,10, onlyOn64 : true)] // Not defined in 32-bit @@ -302,59 +227,6 @@ interface WKSecurityOrigin { nint Port { get; } } - - [Mac (10,13), iOS (11,0)] - [BaseType (typeof(NSObject))] - interface WKSnapshotConfiguration : NSCopying { - [Export ("rect")] - CGRect Rect { get; set; } - - [Export ("snapshotWidth")] - NSNumber SnapshotWidth { get; set; } - } - -#if XAMCORE_2_0 - interface IWKUrlSchemeHandler {} - [Mac (10,13), iOS (11,0)] - [Protocol (Name = "WKURLSchemeHandler")] - interface WKUrlSchemeHandler - { - [Abstract] - [Export ("webView:startURLSchemeTask:")] - void StartUrlSchemeTask (WKWebView webView, IWKUrlSchemeTask urlSchemeTask); - - [Abstract] - [Export ("webView:stopURLSchemeTask:")] - void StopUrlSchemeTask (WKWebView webView, IWKUrlSchemeTask urlSchemeTask); - } -#endif - interface IWKUrlSchemeTask {} - - [Mac (10,13), iOS (11,0)] - [Protocol (Name = "WKURLSchemeTask")] - interface WKUrlSchemeTask - { - [Abstract] - [Export ("request", ArgumentSemantic.Copy)] - NSUrlRequest Request { get; } - - [Abstract] - [Export ("didReceiveResponse:")] - void DidReceiveResponse (NSUrlResponse response); - - [Abstract] - [Export ("didReceiveData:")] - void DidReceiveData (NSData data); - - [Abstract] - [Export ("didFinish")] - void DidFinish (); - - [Abstract] - [Export ("didFailWithError:")] - void DidFailWithError (NSError error); - } - [iOS (9,0), Mac(10,11, onlyOn64 : true)] [BaseType (typeof(NSObject))] interface WKWebsiteDataRecord @@ -424,10 +296,6 @@ interface WKWebsiteDataStore : NSCoding { [Export ("removeDataOfTypes:modifiedSince:completionHandler:")] [Async] void RemoveDataOfTypes (NSSet websiteDataTypes, NSDate date, Action completionHandler); - - [Mac (10, 13), iOS (11, 0)] - [Export ("httpCookieStore")] - WKHttpCookieStore HttpCookieStore { get; } } [Mac (10,12, onlyOn64 : true)][NoiOS, NoWatch, NoTV] @@ -498,18 +366,6 @@ interface WKUserContentController : NSCoding { [Export ("removeScriptMessageHandlerForName:")] void RemoveScriptMessageHandler (string name); - - [Mac (10,13), iOS (11,0)] - [Export ("addContentRuleList:")] - void AddContentRuleList (WKContentRuleList contentRuleList); - - [Mac (10,13), iOS (11,0)] - [Export ("removeContentRuleList:")] - void RemoveContentRuleList (WKContentRuleList contentRuleList); - - [Mac (10,13), iOS (11,0)] - [Export ("removeAllContentRuleLists")] - void RemoveAllContentRuleLists (); } [iOS (8,0), Mac (10,10, onlyOn64 : true)] // Not defined in 32-bit @@ -662,8 +518,8 @@ interface WKWebView { string CustomUserAgent { get; set; } [iOS (9,0)][Mac (10,11, onlyOn64 : true)] - [Deprecated (PlatformName.iOS, 10,0, message: "Use 'ServerTrust' property.")] - [Deprecated (PlatformName.MacOSX, 10,12, message: "Use 'ServerTrust' property.")] + [Deprecated (PlatformName.iOS, 10,0, message: "Use ServerTrust property")] + [Deprecated (PlatformName.MacOSX, 10,12, message: "Use ServerTrust property")] [Export ("certificateChain", ArgumentSemantic.Copy)] SecCertificate[] CertificateChain { get; } @@ -674,23 +530,6 @@ interface WKWebView { [iOS (10,0)][Mac (10,12, onlyOn64 : true)] [NullAllowed, Export ("serverTrust")] SecTrust ServerTrust { get; } - -#if !MONOMAC - [iOS (11,0)] - [Async] - [Export ("takeSnapshotWithConfiguration:completionHandler:")] - void TakeSnapshot ([NullAllowed] WKSnapshotConfiguration snapshotConfiguration, Action completionHandler); -#else - [Mac (10,13)] - [Export ("takeSnapshotWithConfiguration:completionHandler:")] - [Async] - void TakeSnapshot ([NullAllowed] WKSnapshotConfiguration snapshotConfiguration, Action completionHandler); -#endif - [Mac (10,13), iOS (11,0)] - [Static] - [Export ("handlesURLScheme:")] - bool HandlesUrlScheme (string urlScheme); - } delegate void WKJavascriptEvaluationResult (NSObject result, NSError error); @@ -727,18 +566,18 @@ interface WKWebViewConfiguration : NSCopying, NSCoding { [Export ("allowsInlineMediaPlayback")] bool AllowsInlineMediaPlayback { get; set; } - [Availability (Introduced = Platform.iOS_8_0, Deprecated = Platform.iOS_9_0, Message = "Use 'RequiresUserActionForMediaPlayback' or 'MediaTypesRequiringUserActionForPlayback' instead.")] + [Availability (Introduced = Platform.iOS_8_0, Deprecated = Platform.iOS_9_0, Message = "Use RequiresUserActionForMediaPlayback or MediaTypesRequiringUserActionForPlayback")] [Export ("mediaPlaybackRequiresUserAction")] bool MediaPlaybackRequiresUserAction { get; set; } - [Availability (Introduced = Platform.iOS_8_0, Deprecated = Platform.iOS_9_0, Message = "Use 'AllowsAirPlayForMediaPlayback' instead.")] + [Availability (Introduced = Platform.iOS_8_0, Deprecated = Platform.iOS_9_0, Message = "Use AllowsAirPlayForMediaPlayback")] [Export ("mediaPlaybackAllowsAirPlay")] bool MediaPlaybackAllowsAirPlay { get; set; } [Export ("selectionGranularity")] WKSelectionGranularity SelectionGranularity { get; set; } - [Availability (Introduced = Platform.iOS_9_0, Deprecated = Platform.iOS_10_0, Message = "Use 'MediaTypesRequiringUserActionForPlayback' instead.")] + [Availability (Introduced = Platform.iOS_9_0, Deprecated = Platform.iOS_10_0, Message = "Use MediaTypesRequiringUserActionForPlayback")] [Export ("requiresUserActionForMediaPlayback")] bool RequiresUserActionForMediaPlayback { get; set; } @@ -758,17 +597,6 @@ interface WKWebViewConfiguration : NSCopying, NSCoding { [NoMac] [Export ("ignoresViewportScaleLimits")] bool IgnoresViewportScaleLimits { get; set; } - -#if XAMCORE_2_0 - [Mac (10,13), iOS (11,0)] - [Export ("setURLSchemeHandler:forURLScheme:")] - void SetUrlSchemeHandler ([NullAllowed] IWKUrlSchemeHandler urlSchemeHandler, string urlScheme); - - [Mac (10,13), iOS (11,0)] - [Export ("urlSchemeHandlerForURLScheme:")] - [return: NullAllowed] - IWKUrlSchemeHandler GetUrlSchemeHandler (string urlScheme); -#endif } [iOS (8,0), Mac (10,10, onlyOn64 : true)] // Not defined in 32-bit diff --git a/system-dependencies.sh b/system-dependencies.sh index 7056d574162..6ed6bc0a05f 100755 --- a/system-dependencies.sh +++ b/system-dependencies.sh @@ -273,8 +273,6 @@ function install_specific_xcode () { log "Executing '$SUDO xcode-select -s $XCODE_DEVELOPER_ROOT'" $SUDO xcode-select -s $XCODE_DEVELOPER_ROOT - log "Clearing xcrun cache..." - xcrun -k ok "Xcode $XCODE_VERSION provisioned" } @@ -322,8 +320,6 @@ function check_specific_xcode () { if ! test -z $PROVISION_XCODE; then log "Executing '$SUDO xcode-select -s $XCODE_DEVELOPER_ROOT'" $SUDO xcode-select -s $XCODE_DEVELOPER_ROOT - log "Clearing xcrun cache..." - xcrun -k else fail "'xcode-select -p' does not point to $XCODE_DEVELOPER_ROOT, it points to $XCODE_SELECT. Execute '$SUDO xcode-select -s $XCODE_DEVELOPER_ROOT' to fix." fi diff --git a/tests/apitest/apitest.csproj b/tests/apitest/apitest.csproj index c6271294d17..f1d29a8dadd 100644 --- a/tests/apitest/apitest.csproj +++ b/tests/apitest/apitest.csproj @@ -63,7 +63,6 @@ - diff --git a/tests/apitest/src/AppKit/NSFont.cs b/tests/apitest/src/AppKit/NSFont.cs deleted file mode 100644 index 51a35629e41..00000000000 --- a/tests/apitest/src/AppKit/NSFont.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using NUnit.Framework; - -#if !XAMCORE_2_0 -using MonoMac.AppKit; -using MonoMac.ObjCRuntime; -using MonoMac.Foundation; -using MonoMac.CoreGraphics; -using MonoMac.CoreText; -#else -using AppKit; -using ObjCRuntime; -using Foundation; -using CoreGraphics; -using CoreText; -#endif - -namespace Xamarin.Mac.Tests -{ - [TestFixture] - public class NSFontTests - { - [Test] - public void GetBoundingRect_SmokeTest () - { - CGFont cgFont = CGFont.CreateWithFontName ("Arial"); - ushort [] glyphs = new ushort [5]; - for (int i = 0 ; i < 5 ; ++i) - glyphs[i] = cgFont.GetGlyphWithGlyphName ("Hello"[i].ToString ()); - - CTFont ctFont = new CTFont (cgFont, 14, new CTFontDescriptor ("Arial", 14)); - NSFont nsFont = NSFont.FromCTFont (ctFont); - - var bounding = nsFont.GetBoundingRects (glyphs); - var advancement = nsFont.GetAdvancements (glyphs); - Assert.AreEqual (5, bounding.Length); - Assert.AreEqual (5, advancement.Length); - } - - [Test] - public void GetBoundingRect_WithEmptyGlyphs () - { - CGFont cgFont = CGFont.CreateWithFontName ("Arial"); - ushort [] glyphs = new ushort [] {}; - - CTFont ctFont = new CTFont (cgFont, 14, new CTFontDescriptor ("Arial", 14)); - NSFont nsFont = NSFont.FromCTFont (ctFont); - - Assert.Throws (() => nsFont.GetBoundingRects (glyphs)); - Assert.Throws (() => nsFont.GetAdvancements (glyphs)); - } - } -} - diff --git a/tests/apitest/src/AppKit/NSView.cs b/tests/apitest/src/AppKit/NSView.cs index b3e684c0dc1..595e20ce390 100644 --- a/tests/apitest/src/AppKit/NSView.cs +++ b/tests/apitest/src/AppKit/NSView.cs @@ -70,11 +70,8 @@ public void AllItemsWithNSMenuShouldAllowNull () // Can't test typeof (NSResponder) since it is abstract List types = new List { typeof (NSCell), typeof (NSMenuItem), typeof (NSPathControl), typeof (NSPopUpButton), typeof (NSPopUpButtonCell) }; - // objc[22864]: Cannot form weak reference to instance (0x4268d0) of class NSMenuView. It is possible that this object was over-released, or is in the process of deallocation. - // Error occurs in Xcode as well, so not a result of our code - // Radar #33966228: "Thanks for the info, I think it would be best to just exclude this case from testing. We might keep your bug around to cover the case of NSWindow having problems in general with non-weak-compatible classes, but I don’t think we’ll fix it just for NSMenuView." - //if (IntPtr.Size == 4) - //types.Add (typeof (NSMenuView)); // NSMenuView is 32-bit only + if (IntPtr.Size == 4) + types.Add (typeof (NSMenuView)); // NSMenuView is 32-bit only foreach (Type t in types) { object o = Activator.CreateInstance (t); diff --git a/tests/apitest/src/MonoMac/CBUUID.cs b/tests/apitest/src/MonoMac/CBUUID.cs index a92b144bffc..02a690e6f2e 100644 --- a/tests/apitest/src/MonoMac/CBUUID.cs +++ b/tests/apitest/src/MonoMac/CBUUID.cs @@ -30,6 +30,7 @@ public void Roundtrip_16bits () using (CBUUID uuid = CBUUID.FromString ("1234")) { Assert.That (uuid.Handle, Is.Not.EqualTo (IntPtr.Zero), "Handle"); Assert.IsNotNull (uuid.Data, "Data"); + Assert.That (uuid.Description, Is.EqualTo ("Unknown (<1234>)"), "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 ())) { @@ -44,6 +45,7 @@ public void Roundtrip_128bits () 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"); + Assert.That (uuid.Description, Is.EqualTo ("Unknown (<12345678 90abcdef cafec80c 20443d0b>)"), "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"); @@ -134,4 +136,4 @@ public void PartialsOfDifferentSizeNotEqual () CBUUID.FromString ("12345678-0000-1000-8000-00805f9b34fb"))); } } -} +} \ No newline at end of file diff --git a/tests/bindings-framework-test/XTest.framework.linkwith.cs b/tests/bindings-framework-test/XTest.framework.linkwith.cs index fb6f1c94210..8d0206b07de 100644 --- a/tests/bindings-framework-test/XTest.framework.linkwith.cs +++ b/tests/bindings-framework-test/XTest.framework.linkwith.cs @@ -7,16 +7,7 @@ using System.Runtime.InteropServices; #if __UNIFIED__ -[assembly: LinkWith ("XTest.framework", Frameworks = LinkWithConstants.Frameworks)] -[assembly: LinkWith ("XStaticObjectTest.framework", LinkerFlags = "-lz", Frameworks = LinkWithConstants.Frameworks)] -[assembly: LinkWith ("XStaticArTest.framework", Frameworks = LinkWithConstants.Frameworks)] +[assembly: LinkWith ("XTest.framework")] +[assembly: LinkWith ("XStaticObjectTest.framework", LinkerFlags = "-lz")] +[assembly: LinkWith ("XStaticArTest.framework")] #endif - -static class LinkWithConstants -{ -#if __WATCHOS__ - public const string Frameworks = ""; -#else - public const string Frameworks = "ModelIO"; -#endif -} diff --git a/tests/bindings-test/StructsAndEnums.cs b/tests/bindings-test/StructsAndEnums.cs index 9396fcf68a0..26e6b3c0730 100644 --- a/tests/bindings-test/StructsAndEnums.cs +++ b/tests/bindings-test/StructsAndEnums.cs @@ -3,118 +3,13 @@ #if !__UNIFIED__ using nint=System.Int32; -#else -using Foundation; -using ObjCRuntime; #endif -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x3 = global::OpenTK.NMatrix4x3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; - namespace Bindings.Test { public static class CFunctions { [DllImport ("__Internal")] public static extern int theUltimateAnswer (); - - [DllImport ("__Internal")] - public static extern void x_get_matrix_float2x2 (IntPtr self, string sel, out float r0c0, out float r0c1, out float r1c0, out float r1c1); - - [DllImport ("__Internal")] - public static extern void x_get_matrix_float3x3 (IntPtr self, string sel, out float r0c0, out float r0c1, out float r0c2, out float r1c0, out float r1c1, out float r1c2, out float r2c0, out float r2c1, out float r2c2); - - [DllImport ("__Internal")] - public static extern void x_get_matrix_float4x4 (IntPtr self, string sel, out float r0c0, out float r0c1, out float r0c2, out float r0c3, out float r1c0, out float r1c1, out float r1c2, out float r1c3, out float r2c0, out float r2c1, out float r2c2, out float r2c3, out float r3c0, out float r3c1, out float r3c2, out float r3c3); - - [DllImport ("__Internal")] - public static extern void x_get_matrix_float4x3 (IntPtr self, string sel, out float r0c0, out float r0c1, out float r0c2, out float r0c3, out float r1c0, out float r1c1, out float r1c2, out float r1c3, out float r2c0, out float r2c1, out float r2c2, out float r2c3); - - public static MatrixFloat2x2 GetMatrixFloat2x2 (NSObject obj, string selector) - { - float r0c0, r0c1, r1c0, r1c1; - x_get_matrix_float2x2 (obj.Handle, selector, out r0c0, out r0c1, out r1c0, out r1c1); - return new MatrixFloat2x2 ( - r0c0, r0c1, - r1c0, r1c1); - } - - public static MatrixFloat3x3 GetMatrixFloat3x3 (NSObject obj, string selector) - { - float r0c0, r0c1, r0c2, r1c0, r1c1, r1c2, r2c0, r2c1, r2c2; - x_get_matrix_float3x3 (obj.Handle, selector, out r0c0, out r0c1, out r0c2, out r1c0, out r1c1, out r1c2, out r2c0, out r2c1, out r2c2); - return new MatrixFloat3x3 ( - r0c0, r0c1, r0c2, - r1c0, r1c1, r1c2, - r2c0, r2c1, r2c2); - - } - - public static MatrixFloat4x4 GetMatrixFloat4x4 (NSObject obj, string selector) - { - float r0c0, r0c1, r0c2, r0c3, r1c0, r1c1, r1c2, r1c3, r2c0, r2c1, r2c2, r2c3, r3c0, r3c1, r3c2, r3c3; - x_get_matrix_float4x4 (obj.Handle, selector, out r0c0, out r0c1, out r0c2, out r0c3, out r1c0, out r1c1, out r1c2, out r1c3, out r2c0, out r2c1, out r2c2, out r2c3, out r3c0, out r3c1, out r3c2, out r3c3); - return new MatrixFloat4x4 ( - r0c0, r0c1, r0c2, r0c3, - r1c0, r1c1, r1c2, r1c3, - r2c0, r2c1, r2c2, r2c3, - r3c0, r3c1, r3c2, r3c3); - } - - public static MatrixFloat4x3 GetMatrixFloat4x3 (NSObject obj, string selector) - { - float r0c0, r0c1, r0c2, r0c3, r1c0, r1c1, r1c2, r1c3, r2c0, r2c1, r2c2, r2c3; - x_get_matrix_float4x3 (obj.Handle, selector, out r0c0, out r0c1, out r0c2, out r0c3, out r1c0, out r1c1, out r1c2, out r1c3, out r2c0, out r2c1, out r2c2, out r2c3); - return new MatrixFloat4x3 ( - r0c0, r0c1, r0c2, r0c3, - r1c0, r1c1, r1c2, r1c3, - r2c0, r2c1, r2c2, r2c3); - } - -#if !__WATCHOS__ - [DllImport ("__Internal")] - public static extern void x_mdltransformcomponent_get_local_transform (IntPtr self, double time, out float r0c0, out float r0c1, out float r0c2, out float r0c3, out float r1c0, out float r1c1, out float r1c2, out float r1c3, out float r2c0, out float r2c1, out float r2c2, out float r2c3, out float r3c0, out float r3c1, out float r3c2, out float r3c3); - - public static MatrixFloat4x4 MDLTransformComponent_GetLocalTransform (INativeObject obj, double time) - { - float r0c0, r0c1, r0c2, r0c3, r1c0, r1c1, r1c2, r1c3, r2c0, r2c1, r2c2, r2c3, r3c0, r3c1, r3c2, r3c3; - x_mdltransformcomponent_get_local_transform (obj.Handle, time, out r0c0, out r0c1, out r0c2, out r0c3, out r1c0, out r1c1, out r1c2, out r1c3, out r2c0, out r2c1, out r2c2, out r2c3, out r3c0, out r3c1, out r3c2, out r3c3); - return new MatrixFloat4x4 ( - r0c0, r0c1, r0c2, r0c3, - r1c0, r1c1, r1c2, r1c3, - r2c0, r2c1, r2c2, r2c3, - r3c0, r3c1, r3c2, r3c3); - } - - [DllImport ("__Internal")] - public static extern void x_mdltransform_create_global_transform (IntPtr obj, double time, out float r0c0, out float r0c1, out float r0c2, out float r0c3, out float r1c0, out float r1c1, out float r1c2, out float r1c3, out float r2c0, out float r2c1, out float r2c2, out float r2c3, out float r3c0, out float r3c1, out float r3c2, out float r3c3); - - public static MatrixFloat4x4 MDLTransform_CreateGlobalTransform (INativeObject obj, double time) - { - float r0c0, r0c1, r0c2, r0c3, r1c0, r1c1, r1c2, r1c3, r2c0, r2c1, r2c2, r2c3, r3c0, r3c1, r3c2, r3c3; - x_mdltransform_create_global_transform (obj.Handle, time, out r0c0, out r0c1, out r0c2, out r0c3, out r1c0, out r1c1, out r1c2, out r1c3, out r2c0, out r2c1, out r2c2, out r2c3, out r3c0, out r3c1, out r3c2, out r3c3); - return new MatrixFloat4x4 ( - r0c0, r0c1, r0c2, r0c3, - r1c0, r1c1, r1c2, r1c3, - r2c0, r2c1, r2c2, r2c3, - r3c0, r3c1, r3c2, r3c3); - } - - [DllImport ("__Internal")] - public static extern void x_mdltransform_get_rotation_matrix (IntPtr obj, double time, out float r0c0, out float r0c1, out float r0c2, out float r0c3, out float r1c0, out float r1c1, out float r1c2, out float r1c3, out float r2c0, out float r2c1, out float r2c2, out float r2c3, out float r3c0, out float r3c1, out float r3c2, out float r3c3); - - public static MatrixFloat4x4 MDLTransform_GetRotationMatrix (INativeObject obj, double time) - { - float r0c0, r0c1, r0c2, r0c3, r1c0, r1c1, r1c2, r1c3, r2c0, r2c1, r2c2, r2c3, r3c0, r3c1, r3c2, r3c3; - x_mdltransform_get_rotation_matrix (obj.Handle, time, out r0c0, out r0c1, out r0c2, out r0c3, out r1c0, out r1c1, out r1c2, out r1c3, out r2c0, out r2c1, out r2c2, out r2c3, out r3c0, out r3c1, out r3c2, out r3c3); - return new MatrixFloat4x4 ( - r0c0, r0c1, r0c2, r0c3, - r1c0, r1c1, r1c2, r1c3, - r2c0, r2c1, r2c2, r2c3, - r3c0, r3c1, r3c2, r3c3); - } -#endif } } diff --git a/tests/bindings-test/libtest.linkwith.cs b/tests/bindings-test/libtest.linkwith.cs index 15cef444123..df0c9c264c2 100644 --- a/tests/bindings-test/libtest.linkwith.cs +++ b/tests/bindings-test/libtest.linkwith.cs @@ -6,18 +6,9 @@ #endif using System.Runtime.InteropServices; -[assembly: LinkWith ("libtest.a", LinkTarget.Simulator | LinkTarget.ArmV6 | LinkTarget.ArmV7 | LinkTarget.ArmV7s | LinkTarget.Arm64 | LinkTarget.Simulator64, SmartLink = true, Frameworks = LinkWithConstants.Frameworks, LinkerFlags = "-lz")] +[assembly: LinkWith ("libtest.a", LinkTarget.Simulator | LinkTarget.ArmV6 | LinkTarget.ArmV7 | LinkTarget.ArmV7s | LinkTarget.Arm64 | LinkTarget.Simulator64, SmartLink = true, Frameworks = "Foundation" , LinkerFlags = "-lz")] public static class LibTest { [DllImport ("__Internal")] public static extern int theUltimateAnswer (); } - -static class LinkWithConstants -{ -#if __WATCHOS__ - public const string Frameworks = "Foundation"; -#else - public const string Frameworks = "Foundation ModelIO"; -#endif -} diff --git a/tests/common/Configuration.cs b/tests/common/Configuration.cs index 1c66bac2d2d..69ad7b4500a 100644 --- a/tests/common/Configuration.cs +++ b/tests/common/Configuration.cs @@ -19,7 +19,6 @@ class Configuration public static string sdk_version; public static string watchos_sdk_version; public static string tvos_sdk_version; - public static string macos_sdk_version; public static string xcode_root; public static string XcodeVersion; public static string xcode5_root; @@ -160,7 +159,6 @@ static Configuration () sdk_version = GetVariable ("IOS_SDK_VERSION", "8.0"); watchos_sdk_version = GetVariable ("WATCH_SDK_VERSION", "2.0"); tvos_sdk_version = GetVariable ("TVOS_SDK_VERSION", "9.0"); - macos_sdk_version = GetVariable ("OSX_SDK_VERSION", "10.12"); xcode_root = GetVariable ("XCODE_DEVELOPER_ROOT", "/Applications/Xcode.app/Contents/Developer"); xcode5_root = GetVariable ("XCODE5_DEVELOPER_ROOT", "/Applications/Xcode511.app/Contents/Developer"); xcode6_root = GetVariable ("XCODE6_DEVELOPER_ROOT", "/Applications/Xcode601.app/Contents/Developer"); diff --git a/tests/common/TestRuntime.cs b/tests/common/TestRuntime.cs index 3aab32c68ef..28489e67ebb 100644 --- a/tests/common/TestRuntime.cs +++ b/tests/common/TestRuntime.cs @@ -97,92 +97,9 @@ public static void AssertXcodeVersion (int major, int minor) NUnit.Framework.Assert.Ignore ("Requires the platform version shipped with Xcode {0}.{1}", major, minor); } -#if !MONOMAC - public static void AssertDevice () - { - if (ObjCRuntime.Runtime.Arch == Arch.SIMULATOR) - NUnit.Framework.Assert.Ignore ("This test only runs on device."); - } -#endif - - // This function checks if the current Xcode version is exactly (neither higher nor lower) the requested one. - public static bool CheckExactXcodeVersion (int major, int minor, int beta = 0) - { - // Add the Build number minus the one last character, sometimes Apple releases - // different builds from the same Beta, for example in Xcode 9 Beta 3 we have - // 15A5318g on device and 15A5318e on the simulator - var nineb1 = new { - Xcode = new { Major = 9, Minor = 0, Beta = 1 }, - iOS = new { Major = 11, Minor = 0, Build = "15A5278" }, - tvOS = new { Major = 11, Minor = 0, Build = "?" }, - macOS = new { Major = 10, Minor = 13, Build = "?" }, - watchOS = new { Major = 4, Minor = 0, Build = "?" }, - }; - var nineb2 = new { - Xcode = new { Major = 9, Minor = 0, Beta = 2 }, - iOS = new { Major = 11, Minor = 0, Build = "15A5304" }, - tvOS = new { Major = 11, Minor = 0, Build = "?" }, - macOS = new { Major = 10, Minor = 13, Build = "?" }, - watchOS = new { Major = 4, Minor = 0, Build = "?" }, - }; - var nineb3 = new { - Xcode = new { Major = 9, Minor = 0, Beta = 3 }, - iOS = new { Major = 11, Minor = 0, Build = "15A5318" }, - tvOS = new { Major = 11, Minor = 0, Build = "?" }, - macOS = new { Major = 10, Minor = 13, Build = "?" }, - watchOS = new { Major = 4, Minor = 0, Build = "?" }, - }; - - var versions = new [] { - nineb1, - nineb2, - nineb3, - }; - - foreach (var v in versions) { - if (v.Xcode.Major != major) - continue; - if (v.Xcode.Minor != minor) - continue; - if (v.Xcode.Beta != beta) - continue; - -#if __IOS__ - if (!CheckExactiOSSystemVersion (v.iOS.Major, v.iOS.Minor)) - return false; - if (v.iOS.Build == "?") - throw new NotImplementedException ($"Build number for iOS {v.iOS.Major}.{v.iOS.Minor} beta {beta} (candidate: {GetiOSBuildVersion ()})"); - var actual = GetiOSBuildVersion (); - Console.WriteLine (actual); - return actual.StartsWith (v.iOS.Build, StringComparison.Ordinal); -#else - throw new NotImplementedException (); -#endif - } - - throw new NotImplementedException ($"Build information for Xcode version {major}.{minor} beta {beta} not found"); - } - public static bool CheckXcodeVersion (int major, int minor, int build = 0) { switch (major) { - case 9: - switch (minor) { - case 0: -#if __WATCHOS__ - return CheckWatchOSSystemVersion (4, 0); -#elif __TVOS__ - return ChecktvOSSystemVersion (11, 0); -#elif __IOS__ - return CheckiOSSystemVersion (11, 0); -#elif MONOMAC - return CheckMacSystemVersion (10, 13, 0); -#else - throw new NotImplementedException (); -#endif - default: - throw new NotImplementedException (); - } case 8: switch (minor) { case 0: @@ -389,16 +306,6 @@ public static bool CheckiOSSystemVersion (int major, int minor, bool throwIfOthe #endif } - public static bool CheckExactiOSSystemVersion (int major, int minor) - { -#if __IOS__ - var version = Version.Parse (UIDevice.CurrentDevice.SystemVersion); - return version.Major == major && version.Minor == minor; -#else - throw new Exception ("Can't get iOS System version on other platforms."); -#endif - } - // This method returns true if: // system version >= specified version // AND diff --git a/tests/generator/Makefile b/tests/generator/Makefile index 951be32ef32..0c2af43086b 100644 --- a/tests/generator/Makefile +++ b/tests/generator/Makefile @@ -21,7 +21,7 @@ else IOS_GENERATOR = $(IOS_CURRENT_DIR)/bin/btouch-native /baselib:$(IOS_CURRENT_DIR)/lib/mono/Xamarin.iOS/Xamarin.iOS.dll /unsafe endif IOS_TESTS = bug15283 bug15307 bug15799 bug16036 sof20696157 bug23041 bug27430 bug27428 bug34042 btouch-with-hyphen-in-name property-redefination-ios arrayfromhandlebug bug36457 bug39614 bug40282 bug17232 bug24078-ignore-methods-events strong-dict-support-templated-dicts bug43579 bindastests -IOS_CUSTOM_TESTS = forum54078 desk63279 desk79124 multiple-api-definitions1 multiple-api-definitions2 bug29493 classNameCollision bi1036 bug37527 bug27986 bug35176 bi1046 bindas1048error bindas1049error bindas1050modelerror bindas1050protocolerror virtualwrap bug42855 bug52570classinternal bug52570methodinternal bug52570allowstaticmembers bug42742 warnaserror nowarn noasyncinternalwrapper noasyncwarningcs0219 bug53076 bug53076withmodel bug57070 fieldenumtests smartenumwithframework +IOS_CUSTOM_TESTS = forum54078 desk63279 desk79124 multiple-api-definitions1 multiple-api-definitions2 bug29493 classNameCollision bi1036 bug37527 bug27986 bug35176 bi1046 bindas1048error bindas1049error bindas1050modelerror bindas1050protocolerror virtualwrap bug42855 bug52570classinternal bug52570methodinternal bug52570allowstaticmembers bug42742 warnaserror nowarn noasyncinternalwrapper noasyncwarningcs0219 bug53076 bug53076withmodel bug57070 MAC_CURRENT_DIR=$(MAC_DESTDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current ifdef IKVM @@ -273,19 +273,6 @@ bug53076withmodel: echo "Error: Expected 10 'Async (this IMyFooProtocol' matches in generated code. If you modified code that generates extension FooRequiredMethodAsync (AsyncAttribute) please update the 'Async (this IMyFooProtocol' count."; exit 1; \ fi -fieldenumtests: - @rm -Rf $@.tmpdir - @mkdir -p $@.tmpdir - $(if $(V),,@echo "$@";) $(IOS_GENERATOR) --sourceonly:$@.source -tmpdir=$@.tmpdir $@.cs --process-enums - -smartenumwithframework: - @rm -Rf $@.tmpdir - @mkdir -p $@.tmpdir - $(if $(V),,@echo "$@";) $(IOS_GENERATOR) --sourceonly:$@.source -tmpdir=$@.tmpdir $@.cs --process-enums - @if [ `grep -r "Libraries.CoreImage.Handle" $@.tmpdir/SmartEnumWithFramework | wc -l` -ne 2 ]; then \ - echo "Error: Expected 2 'Libraries.CoreImage.Handle'."; exit 1; \ - fi - clean-local:: rm -f *.dll *.source rm -Rf *.tmpdir diff --git a/tests/generator/fieldenumtests.cs b/tests/generator/fieldenumtests.cs deleted file mode 100644 index 49b23e7053b..00000000000 --- a/tests/generator/fieldenumtests.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using Foundation; -using ObjCRuntime; - -namespace FieldEnumTests { - - [Native] - enum FooNIntEnum : long { - Zero, - One, - Two - } - - [Native] - enum FooNUIntEnum : ulong { - Zero, - One, - Two - } - - enum FooSmartEnum { - [Field ("ZeroSmartField", "__Internal")] - Zero, - [Field ("OneSmartField", "__Internal")] - One, - [Field ("TwoSmartField", "__Internal")] - Two - } - - enum FooIntEnum { - Zero, - One, - Two - } - - [BaseType (typeof (NSObject))] - interface MyFooClass { - - [Field ("UIntField", "__Internal")] - uint UIntField { get; set; } - - [Field ("ULongField", "__Internal")] - ulong ULongField { get; set; } - - [Field ("LongField", "__Internal")] - long LongField { get; set; } - - [Field ("NUIntField", "__Internal")] - nuint NUIntField { get; set; } - - [Field ("NIntField", "__Internal")] - nint NIntField { get; set; } - - [Field ("NIntField", "__Internal")] - FooNIntEnum FooNIntField { get; set; } - - [Field ("NUIntField", "__Internal")] - FooNUIntEnum FooNUIntField { get; set; } - - [Field ("FooSmartField", "__Internal")] - FooSmartEnum FooSmartField { get; set; } - - [Field ("FooIntEnumField", "__Internal")] - FooIntEnum FooIntEnumField { get; set; } - } -} \ No newline at end of file diff --git a/tests/generator/smartenumwithframework.cs b/tests/generator/smartenumwithframework.cs deleted file mode 100644 index 8b49a91cee3..00000000000 --- a/tests/generator/smartenumwithframework.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using ObjCRuntime; -using Foundation; - -namespace SmartEnumWithFramework { - - enum FooEnumTest { - [Field ("First", "+CoreImage")] - First, - - [Field ("Second", "+CoreImage")] - Second, - } -} \ No newline at end of file diff --git a/tests/introspection/ApiBaseTest.cs b/tests/introspection/ApiBaseTest.cs index b79c1d78487..183b8f2d753 100644 --- a/tests/introspection/ApiBaseTest.cs +++ b/tests/introspection/ApiBaseTest.cs @@ -66,8 +66,6 @@ protected ApiBaseTest () protected void AddErrorLine (string line) { error_output.AppendLine (line); - if (!line.StartsWith ("[FAIL] ", StringComparison.Ordinal)) - Console.Error.Write ("[FAIL] "); Console.Error.WriteLine (line); Errors++; } @@ -174,13 +172,14 @@ protected bool SkipDueToAttributeInProperty (MemberInfo member) var m = member as MethodInfo; if (m == null || // Skip anything that is not a method - !m.Attributes.HasFlag (MethodAttributes.SpecialName)) // We want properties with SpecialName Attribute + !m.Attributes.HasFlag (MethodAttributes.SpecialName) || + !m.Name.Contains ("get_")) // We want getters with SpecialName Attribute return false; // FIXME: In the future we could cache this to reduce memory requirements var property = m.DeclaringType .GetProperties () - .SingleOrDefault (p => p.GetGetMethod () == m || p.GetSetMethod () == m); + .SingleOrDefault (p => p.GetGetMethod () == m); return property != null && SkipDueToAttribute (property); } @@ -215,10 +214,6 @@ protected virtual string FindLibrary (string libname, bool requiresFullPath = fa case "AudioUnit": libname = "AudioToolbox"; break; - case "IOSurface": - if (!TestRuntime.CheckXcodeVersion (9, 0)) - prefix = Path.Combine (Path.GetDirectoryName (prefix), "PrivateFrameworks"); - break; #endif case "CoreAnimation": // generated code uses QuartzCore correctly - even if the [Field] property is wrong diff --git a/tests/introspection/ApiCoreImageFiltersTest.cs b/tests/introspection/ApiCoreImageFiltersTest.cs index f6fcdab7604..fd7678e30cf 100644 --- a/tests/introspection/ApiCoreImageFiltersTest.cs +++ b/tests/introspection/ApiCoreImageFiltersTest.cs @@ -67,24 +67,6 @@ protected virtual bool Skip (string nativeName) case "CIDepthOfField": // NSUnknownKeyException [ 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": diff --git a/tests/introspection/ApiCtorInitTest.cs b/tests/introspection/ApiCtorInitTest.cs index d13d5451c30..d0111c6823e 100644 --- a/tests/introspection/ApiCtorInitTest.cs +++ b/tests/introspection/ApiCtorInitTest.cs @@ -77,28 +77,6 @@ protected virtual bool Skip (Type type) return true; case "NEPacketTunnelProvider": return true; - case "NSUnitDispersion": // -init should never be called on NSUnit! - case "NSUnitVolume": // -init should never be called on NSUnit! - case "NSUnitDuration": // -init should never be called on NSUnit! - case "NSUnitElectricCharge": // -init should never be called on NSUnit! - case "NSUnitElectricCurrent": // -init should never be called on NSUnit! - case "NSUnitElectricPotentialDifference": // -init should never be called on NSUnit! - case "NSUnitElectricResistance": // -init should never be called on NSUnit! - case "NSUnit": // -init should never be called on NSUnit! - case "NSUnitEnergy": // -init should never be called on NSUnit! - case "NSUnitAcceleration": // -init should never be called on NSUnit! - case "NSUnitFrequency": // -init should never be called on NSUnit! - case "NSUnitAngle": // -init should never be called on NSUnit! - case "NSUnitFuelEfficiency": // -init should never be called on NSUnit! - case "NSUnitArea": // -init should never be called on NSUnit! - case "NSUnitIlluminance": // -init should never be called on NSUnit! - case "NSUnitConcentrationMass": // -init should never be called on NSUnit! - case "NSUnitLength": // -init should never be called on NSUnit! - case "NSUnitMass": // -init should never be called on NSUnit! - case "NSUnitPower": // -init should never be called on NSUnit! - case "NSUnitPressure": // -init should never be called on NSUnit! - case "NSUnitSpeed": // -init should never be called on NSUnit! - return true; } return SkipDueToAttribute (type); @@ -326,47 +304,11 @@ protected virtual bool Match (ConstructorInfo ctor, Type type) if (ctor.ToString () == "Void .ctor(String, NSBundle)") return true; break; - case "MKCompassButton": - case "MKScaleView": - case "MKUserTrackingButton": - // Xcode9 added types that are created only from static methods (no init) - return true; #if __TVOS__ case "UISearchBar": // - (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER __TVOS_PROHIBITED; return true; #endif - case "PdfAnnotationButtonWidget": - case "PdfAnnotationChoiceWidget": - case "PdfAnnotationCircle": - case "PdfAnnotationFreeText": - case "PdfAnnotationInk": - case "PdfAnnotationLine": - case "PdfAnnotationLink": - case "PdfAnnotationMarkup": - case "PdfAnnotationPopup": - case "PdfAnnotationSquare": - case "PdfAnnotationStamp": - case "PdfAnnotationText": - case "PdfAnnotationTextWidget": - // This ctor was introduced in 10,13 but all of the above objects are deprecated in 10,12 - // so it does not make much sense to expose this ctor in all the deprecated subclasses -#if XAMCORE_2_0 - if (ctor.ToString () == "Void .ctor(CGRect, NSString, NSDictionary)") -#else - if (ctor.ToString () == "Void .ctor(RectangleF, NSString, NSDictionary)") -#endif - return true; - break; - case "VNTargetedImageRequest": // Explicitly disabled - if (ctor.ToString () == "Void .ctor(VNRequestCompletionHandler)") - return true; - break; - case "PKPaymentRequestShippingContactUpdate": - // a more precise designated initializer is provided - if (ctor.ToString () == "Void .ctor(PKPaymentSummaryItem[])") - return true; - break; } var ep = ctor.GetParameters (); diff --git a/tests/introspection/ApiFieldTest.cs b/tests/introspection/ApiFieldTest.cs index ae0439cd2da..fb1d27cfdb5 100644 --- a/tests/introspection/ApiFieldTest.cs +++ b/tests/introspection/ApiFieldTest.cs @@ -71,7 +71,7 @@ protected virtual bool Skip (PropertyInfo property) /// Override if you want to skip testing the specified constant. /// /// Constant name to ignore. - protected virtual bool Skip (string constantName, string libraryName) + protected virtual bool Skip (string constantName) { return false; } @@ -227,7 +227,7 @@ public void FieldExists () continue; string name = f.SymbolName; - if (Skip (name, f.LibraryName)) + if (Skip (name)) continue; string path = FindLibrary (f.LibraryName); diff --git a/tests/introspection/ApiProtocolTest.cs b/tests/introspection/ApiProtocolTest.cs index 55a708edfdf..9c9c55dfdcb 100644 --- a/tests/introspection/ApiProtocolTest.cs +++ b/tests/introspection/ApiProtocolTest.cs @@ -71,7 +71,6 @@ protected virtual bool Skip (Type type, string protocolName) case "CAEmitterCell": case "GKAchievement": case "GKScore": - case "MPMediaItem": // new in iOS8 and 10.0 case "NSExtensionContext": case "NSLayoutAnchor`1": @@ -82,11 +81,6 @@ protected virtual bool Skip (Type type, string protocolName) case "GKCloudPlayer": // iOS 10 : test throw because of generic usage case "NSMeasurement`1": - // Xcode 9 - Conformance not in headers - case "MLDictionaryConstraint": - case "MLImageConstraint": - case "MLMultiArrayConstraint": - case "VSSubscription": return true; // skip } break; @@ -120,8 +114,6 @@ protected virtual bool Skip (Type type, string protocolName) case "GKGameSession": // iOS 10 : test throw because of generic usage case "NSMeasurement`1": - // iOS 11 / tvOS 11 - case "VSSubscription": return true; } break; @@ -148,10 +140,6 @@ protected virtual bool Skip (Type type, string protocolName) // iOS 10 : test throw because of generic usage case "NSMeasurement`1": return true; // skip - // xcode 9 - case "NSConstraintConflict": // Conformance not in headers - case "VSSubscription": - return true; } break; // conformance added in Xcode 8 (iOS 10 / macOS 10.12) @@ -168,10 +156,6 @@ protected virtual bool Skip (Type type, string protocolName) return true; } break; - case "NSProgressReporting": - if (!TestRuntime.CheckXcodeVersion (9, 0)) - return true; - break; } return false; } diff --git a/tests/introspection/ApiSelectorTest.cs b/tests/introspection/ApiSelectorTest.cs index 7f371696a16..8711feda9ef 100644 --- a/tests/introspection/ApiSelectorTest.cs +++ b/tests/introspection/ApiSelectorTest.cs @@ -66,18 +66,6 @@ protected virtual bool Skip (Type type, string selectorName) // These concrete (wrapper) subclasses do not implement all of those optional members, but we // still need to provide a binding for them, so that user subclasses can implement those members. switch (type.Name) { - case "AVAggregateAssetDownloadTask": - switch (selectorName) { - case "URLAsset": // added in Xcode 9 and it is present. - return true; - } - break; - case "AVAssetDownloadStorageManager": - switch (selectorName) { - case "sharedDownloadStorageManager": // added in Xcode 9 and it is present. - return true; - } - break; case "MKCircle": case "MKPolygon": case "MKPolyline": @@ -161,26 +149,6 @@ protected virtual bool Skip (Type type, string selectorName) return true; } break; - // Xcode 9 - case "CIQRCodeFeature": - switch (selectorName) { - case "copyWithZone:": - case "encodeWithCoder:": - return !TestRuntime.CheckXcodeVersion (9, 0); - } - break; - case "CKFetchRecordZoneChangesOptions": - switch (selectorName) { - case "copyWithZone:": - return !TestRuntime.CheckXcodeVersion (9, 0); - } - break; -#if !MONOMAC - case "MTLCaptureManager": - if (Runtime.Arch == Arch.SIMULATOR) - return true; - break; -#endif } #endif // This ctors needs to be manually bound @@ -361,115 +329,6 @@ protected virtual bool Skip (Type type, string selectorName) return true; } break; - case "MTLArgumentDescriptor": - switch (selectorName) { - case "access": - case "setAccess:": - case "arrayLength": - case "setArrayLength:": - case "constantBlockAlignment": - case "setConstantBlockAlignment:": - case "dataType": - case "setDataType:": - case "index": - case "setIndex:": - case "textureType": - case "setTextureType:": - return true; - } - break; - case "MTLHeapDescriptor": - switch (selectorName) { - case "cpuCacheMode": - case "setCpuCacheMode:": - case "size": - case "setSize:": - case "storageMode": - case "setStorageMode:": - return true; - } - break; - case "MTLPipelineBufferDescriptor": - switch (selectorName) { - case "mutability": - case "setMutability:": - return true; - } - break; - case "MTLPointerType": - switch (selectorName) { - case "access": - case "alignment": - case "dataSize": - case "elementIsArgumentBuffer": - case "elementType": - return true; - } - break; - case "MTLTextureReferenceType": - switch (selectorName) { - case "access": - case "isDepthTexture": - case "textureDataType": - case "textureType": - return true; - } - break; - case "MTLType": - switch (selectorName) { - case "dataType": - return true; - } - break; - case "MTLTileRenderPipelineColorAttachmentDescriptor": - switch (selectorName) { - case "pixelFormat": - case "setPixelFormat:": - return true; - } - break; - case "MTLTileRenderPipelineDescriptor": - switch (selectorName) { - case "colorAttachments": - case "label": - case "setLabel:": - case "rasterSampleCount": - case "setRasterSampleCount:": - case "threadgroupSizeMatchesTileSize": - case "setThreadgroupSizeMatchesTileSize:": - case "tileBuffers": - case "tileFunction": - case "setTileFunction:": - return true; - } - break; - case "AVPlayerLooper": // This API got introduced in Xcode 8.0 binding but is not currently present nor in Xcode 8.3 or Xcode 9.0 needs research - switch (selectorName) { - case "isLoopingEnabled": - return true; - } - break; - case "NSQueryGenerationToken": // A test was added in monotouch tests to ensure the selector works - switch (selectorName) { - case "encodeWithCoder:": - return true; - } - break; - case "INSpeakableString": - switch (selectorName) { - case "initWithVocabularyIdentifier:spokenPhrase:pronunciationHint:": - case "initWithIdentifier:spokenPhrase:pronunciationHint:": - return true; - } - break; - case "HMCharacteristicEvent": - switch (selectorName) { - case "copyWithZone:": - case "mutableCopyWithZone:": - // Added in Xcode9 (i.e. only 64 bits) so skip 32 bits - return !TestRuntime.CheckXcodeVersion (9,0); - } - break; } // old binding mistake diff --git a/tests/introspection/ApiSignatureTest.cs b/tests/introspection/ApiSignatureTest.cs index dfb92a15397..1fadf680794 100644 --- a/tests/introspection/ApiSignatureTest.cs +++ b/tests/introspection/ApiSignatureTest.cs @@ -233,10 +233,6 @@ void CheckMemberSignature (MethodBase m, Type t, IntPtr class_ptr, ref int n) if (methodinfo == null && constructorinfo == null) return; - // Don't check obsolete methods, it could be obsoleted because it was broken. - if (m.GetCustomAttributes () != null) - return; - if (m.DeclaringType != t) return; @@ -392,9 +388,9 @@ static bool IgnoreSimd (Type pt) case "Vector4": case "Vector4i": case "Vector4d": - case "MatrixFloat2x2": - case "MatrixFloat3x3": - case "MatrixFloat4x4": + case "Matrix2": + case "Matrix3": + case "Matrix4": case "MDLAxisAlignedBoundingBox": // struct { Vector3, Vector3 } return true; default: @@ -679,8 +675,6 @@ protected virtual bool Check (char encodedType, Type type) case "System.Byte": // GLKBaseEffect 'instance Boolean get_ColorMaterialEnabled()' selector: colorMaterialEnabled == C8@0:4 case "System.Boolean": - // CoreNFC.NFCTypeNameFormat enum is byte - case "CoreNFC.NFCTypeNameFormat": return true; default: return false; @@ -987,10 +981,6 @@ protected virtual bool IgnoreAsync (MethodInfo m) // It does not make sense for this API case "RequestData": return m.DeclaringType.Name == "PHAssetResourceManager"; - // It does not make sense for this API - case "Register": - case "SignalEnumerator": - return m.DeclaringType.Name == "NSFileProviderManager"; } return false; } diff --git a/tests/introspection/ApiTypoTest.cs b/tests/introspection/ApiTypoTest.cs index c38f9b6aef0..67de630e379 100644 --- a/tests/introspection/ApiTypoTest.cs +++ b/tests/introspection/ApiTypoTest.cs @@ -24,10 +24,8 @@ using System.Linq; using System.Reflection; using System.Text; -using System.Text.RegularExpressions; using NUnit.Framework; #if XAMCORE_2_0 -using ObjCRuntime; #if MONOMAC using AppKit; #else @@ -37,8 +35,6 @@ #else #if MONOMAC using MonoMac.AppKit; -using MonoMac.ObjCRuntime; -using MonoMac.Foundation; #else using MonoTouch.UIKit; #endif @@ -62,14 +58,6 @@ public virtual bool Skip (MemberInfo methodName, string typo) { return SkipAllowed (methodName.DeclaringType.Name, methodName.Name, typo); } - HashSet allowedMemberRule4 = new HashSet { - "Platform", - "PlatformHelper", - "AvailabilityAttribute", - "iOSAttribute", - "MacAttribute", - }; - HashSet allowed = new HashSet () { "Aac", "Accurracy", @@ -97,15 +85,11 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Automapping", "Automounted", "Autoredirect", - "Avci", // file type "Aliasable", - "Arcball", "Backface", - "Bancaire", // french - "Bancaires", // french + "Bancaire", "Bary", "Batc", - "Bgra", // acrnym for Blue, Green, Red, Alpha "Bim", "Biquad", "Bitangent", @@ -134,7 +118,6 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Conflictserror", "Connnect", "Counterclock", - "Copyback", "Craete", "Crosstraining", "Cubemap", @@ -175,7 +158,6 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Ecdh", // Elliptic Curve Diffie–Hellman "Ecdsa", // Elliptic Curve Digital Signature Algorithm "Ecies", // Elliptic Curve Integrated Encryption Scheme - "Editability", "Eof", // acronym End-Of-File "Emagic", "Emaili", @@ -199,31 +181,24 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Gpp", "Gpu", // acronym for Graphics Processing Unit "Grbg", // acronym for Green-Red-Blue-Green - "Greeking", "Hdmi", "Hdr", "Hectopascals", - "Heic", // file type - "Heif", // file type "Hevc", // CMVideoCodecType / High Efficiency Video Coding - "Heif", // High Efficiency Image File Format "Hfp", "Hipass", "Hls", - "Hoa", "Hrtf", // acronym used in AUSpatializationAlgorithm "Hvxc", // MPEG4ObjectID "Ies", "Icq", "Identd", - "Imageblock", "Imagefor", "Imap", "Imaps", "Img", "Indoorrun", "Indoorcycle", - "Inklist", "Indoorwalk", "Inser", "Interac", @@ -236,7 +211,6 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Ipp", "Iptc", "Ircs", - "Itf", "Itu", "Jcb", // Japanese credit card company "Jfif", @@ -283,7 +257,6 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Mtc", // acronym "Mul", "Mult", - "Multipath", "Multipeer", "Muxed", "Nanograms", @@ -294,10 +267,8 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Ntlm", "Ntsc", "nuint", - "Ndef", "Numbernumber", "Nyquist", - "Oaep", // Optimal asymmetric encryption padding "Objectfor", "Occlussion", "Ocurrences", @@ -330,10 +301,8 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Preseti", "Propogate", "Psec", - "Psm", // Protocol/Service Multiplexer "Pvrtc", // MTLBlitOption - PowerVR Texture Compression "Quaterniond", - "Quadding", "Qura", "Quic", "Reacquirer", @@ -352,7 +321,6 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Rsa", // Rivest, Shamir and Adleman "Rssi", "Rtp", - "Rtl", "Rtsp", "Saml", // acronym "Scn", @@ -391,9 +359,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Superentity", "Sym", "Synchronizable", - "Symbologies", "Tanh", - "Tessellator", "Texcoord", "Texel", "th", @@ -405,7 +371,6 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Tls", "Tlv", "Toi", - "Transceive", "Truncantion", "Tweening", "tx", @@ -416,18 +381,13 @@ public virtual bool Skip (MemberInfo methodName, string typo) { "Undecodable", "Underrun", "Unflagged", - "Unfocusing", "Unorm", - "Unpremultiplied", "Unpremultiplying", "Unprepare", "Unproject", - "Unpublish", "Uterance", "Unentitled", - "Untrash", "Utf", - "Upce", "Uti", "Varispeed", "Vergence", @@ -717,8 +677,6 @@ bool IsObsolete (MemberInfo mi) return false; if (mi.GetCustomAttributes (true).Any ()) return true; - if (mi.GetCustomAttributes (true).Any ()) - return true; return IsObsolete (mi.DeclaringType); } @@ -728,12 +686,7 @@ public void TypoTest () var types = Assembly.GetTypes (); int totalErrors = 0; foreach (Type t in types) { - if (t.IsPublic) { - AttributesMessageTypoRules (t, t.Name, ref totalErrors); - - if (IsObsolete (t)) - continue; - + if (t.IsPublic && !IsObsolete (t)) { string txt = NameCleaner (t.Name); var typo = GetTypo (txt); if (typo.Length > 0 ) { @@ -745,12 +698,7 @@ public void TypoTest () var fields = t.GetFields (); foreach (FieldInfo f in fields) { - if (!f.IsPublic && !f.IsFamily) - continue; - - AttributesMessageTypoRules (f, t.Name, ref totalErrors); - - if (IsObsolete (f)) + if (!f.IsPublic && !f.IsFamily && !IsObsolete (f)) continue; txt = NameCleaner (f.Name); @@ -765,12 +713,7 @@ public void TypoTest () var methods = t.GetMethods (); foreach (MethodInfo m in methods) { - if (!m.IsPublic && !m.IsFamily) - continue; - - AttributesMessageTypoRules (m, t.Name, ref totalErrors); - - if (IsObsolete (m)) + if (!m.IsPublic && !m.IsFamily && !IsObsolete (m)) continue; txt = NameCleaner (m.Name); @@ -804,73 +747,6 @@ public void TypoTest () Assert.IsTrue ((totalErrors == 0), "We have {0} typos!", totalErrors); } - string GetMessage (object attribute) - { - string message = null; - if (attribute is AdviceAttribute) - message = ((AdviceAttribute)attribute).Message; - if (attribute is ObsoleteAttribute) - message = ((ObsoleteAttribute)attribute).Message; - if (attribute is AvailabilityBaseAttribute) - message = ((AvailabilityBaseAttribute)attribute).Message; - - return message; - } - - void AttributesMessageTypoRules (MemberInfo mi, string typeName, ref int totalErrors) - { - if (mi == null) - return; - - foreach (object ca in mi.GetCustomAttributes ()) { - string message = GetMessage (ca); - if (message != null) { - var memberAndTypeFormat = mi.Name == typeName ? "Type: {0}" : "Member name: {1}, Type: {0}"; - var memberAndType = string.Format (memberAndTypeFormat, typeName, mi.Name); - - // Rule 1: https://github.com/xamarin/xamarin-macios/wiki/BINDINGS#rule-1 - // Note: we don't enforce that rule for the Obsolete (not Obsoleted) attribute since the attribute itself doesn't support versions. - if (!(ca is ObsoleteAttribute)) { - var forbiddenOSNames = new [] { "iOS", "watchOS", "tvOS", "macOS" }; - if (forbiddenOSNames.Any (s => Regex.IsMatch (message, $"({s} ?)[0-9]+"))) { - ReportError ("[Rule 1] Don't put OS information in attribute's message: \"{0}\" - {1}", message, memberAndType); - totalErrors++; - } - } - - // Rule 2: https://github.com/xamarin/xamarin-macios/wiki/BINDINGS#rule-2 - if (message.Contains ('`')) { - ReportError ("[Rule 2] Replace grave accent (`) by apostrophe (') in attribute's message: \"{0}\" - {1}", message, memberAndType); - totalErrors++; - } - - // Rule 3: https://github.com/xamarin/xamarin-macios/wiki/BINDINGS#rule-3 - if (!message.EndsWith (".", StringComparison.Ordinal)) { - ReportError ("[Rule 3] Missing '.' in attribute's message: \"{0}\" - {1}", message, memberAndType); - totalErrors++; - } - - // Rule 4: https://github.com/xamarin/xamarin-macios/wiki/BINDINGS#rule-4 - if (!allowedMemberRule4.Contains (mi.Name)) { - var forbiddenAvailabilityKeywords = new [] { "introduced", "deprecated", "obsolete", "obsoleted" }; - if (forbiddenAvailabilityKeywords.Any (s => Regex.IsMatch (message, $"({s})", RegexOptions.IgnoreCase))) { - ReportError ("[Rule 4] Don't use availability keywords in attribute's message: \"{0}\" - {1}", message, memberAndType); - totalErrors++; - } - } - - var forbiddensWords = new [] { "OSX", "OS X" }; - for (int i = 0; i < forbiddensWords.Length; i++) { - var word = forbiddensWords [i]; - if (Regex.IsMatch (message, $"({word})", RegexOptions.IgnoreCase)) { - ReportError ("Don't use {0} in attribute's message: \"{1}\" - {2}", word, message, memberAndType); - totalErrors++; - } - } - } - } - } - public abstract string GetTypo (string txt); static StringBuilder clean = new StringBuilder (); diff --git a/tests/introspection/Mac/MacApiCtorInitTest.cs b/tests/introspection/Mac/MacApiCtorInitTest.cs index fa293083c5b..9165cd462dd 100644 --- a/tests/introspection/Mac/MacApiCtorInitTest.cs +++ b/tests/introspection/Mac/MacApiCtorInitTest.cs @@ -43,29 +43,6 @@ protected override bool Skip (Type type) case "MonoMac.QuickLookUI.QLPreviewPanel": return true; // These should be DisableDefaultCtor but can't due to backward compat - case "MonoMac.AppKit.NSCollectionViewTransitionLayout": - case "AppKit.NSCollectionViewTransitionLayout": - case "Foundation.NSUnitDispersion": // -init should never be called on NSUnit! - case "Foundation.NSUnitVolume": // -init should never be called on NSUnit! - case "Foundation.NSUnitDuration": // -init should never be called on NSUnit! - case "Foundation.NSUnitElectricCharge": // -init should never be called on NSUnit! - case "Foundation.NSUnitElectricCurrent": // -init should never be called on NSUnit! - case "Foundation.NSUnitElectricPotentialDifference": // -init should never be called on NSUnit! - case "Foundation.NSUnitElectricResistance": // -init should never be called on NSUnit! - case "Foundation.NSUnit": // -init should never be called on NSUnit! - case "Foundation.NSUnitEnergy": // -init should never be called on NSUnit! - case "Foundation.NSUnitAcceleration": // -init should never be called on NSUnit! - case "Foundation.NSUnitFrequency": // -init should never be called on NSUnit! - case "Foundation.NSUnitAngle": // -init should never be called on NSUnit! - case "Foundation.NSUnitFuelEfficiency": // -init should never be called on NSUnit! - case "Foundation.NSUnitArea": // -init should never be called on NSUnit! - case "Foundation.NSUnitIlluminance": // -init should never be called on NSUnit! - case "Foundation.NSUnitConcentrationMass": // -init should never be called on NSUnit! - case "Foundation.NSUnitLength": // -init should never be called on NSUnit! - case "Foundation.NSUnitMass": // -init should never be called on NSUnit! - case "Foundation.NSUnitPower": // -init should never be called on NSUnit! - case "Foundation.NSUnitPressure": // -init should never be called on NSUnit! - case "Foundation.NSUnitSpeed": // -init should never be called on NSUnit! case "MonoMac.EventKit.EKParticipant": case "EventKit.EKParticipant": case "XamCore.CoreImage.CISampler": @@ -203,11 +180,6 @@ protected override void CheckNSObjectProtocol (NSObject obj) protected override void CheckToString (NSObject obj) { switch (obj.GetType ().FullName) { - // Crashes on 10.13 - case "MonoMac.AppKit.NSStoryboard": - case "AppKit.NSStoryboard": - case "MonoMac.AVFoundation.AVCaptureInputPort": // https://bugzilla.xamarin.com/show_bug.cgi?id=57668 - case "AVFoundation.AVCaptureInputPort": // https://bugzilla.xamarin.com/show_bug.cgi?id=57668 // Crashes on 10.12 case "Contacts.CNContainer": // native crash calling MonoMac.Foundation.NSObject.get_Description () @@ -270,8 +242,6 @@ protected override void Dispose (NSObject obj, Type type) case "CoreData.NSPersistentStoreCoordinator": case "AppKit.NSColorPanel": case "MonoMac.AppKit.NSColorPanel": - case "Foundation.NSFileProviderService": - case "MonoMac.Foundation.NSFileProviderService": do_not_dispose.Add (obj); break; // 10.11 diff --git a/tests/introspection/Mac/MacApiFieldTest.cs b/tests/introspection/Mac/MacApiFieldTest.cs index 9026a486d72..8b3e2a34525 100644 --- a/tests/introspection/Mac/MacApiFieldTest.cs +++ b/tests/introspection/Mac/MacApiFieldTest.cs @@ -79,8 +79,6 @@ protected override bool Skip (PropertyInfo p) } switch (p.Name) { - case "CharacteristicValidRangeString": - return Mac.CheckSystemVersion (10, 13); // radar 32858911 // NSTableView case "RowViewKey": return true; @@ -160,13 +158,9 @@ protected override bool Skip (PropertyInfo p) } } - protected override bool Skip (string constantName, string libraryName) + protected override bool Skip (string constantName) { switch (constantName) { - case "CBUUIDValidRangeString": - if (Mac.CheckSystemVersion (10, 13)); // radar 32858911 - return true; - break; // Only there for API compat case "kSecUseNoAuthenticationUI": case "kSecUseOperationPrompt": @@ -183,7 +177,7 @@ protected override bool Skip (string constantName, string libraryName) return true; goto default; default: - return base.Skip (constantName, libraryName); + return base.Skip (constantName); } } diff --git a/tests/introspection/Mac/MacApiProtocolTest.cs b/tests/introspection/Mac/MacApiProtocolTest.cs index 6f9b5b4596d..eaf2c295db9 100644 --- a/tests/introspection/Mac/MacApiProtocolTest.cs +++ b/tests/introspection/Mac/MacApiProtocolTest.cs @@ -52,21 +52,6 @@ protected override bool Skip (Type type, string protocolName) case "SFSafariWindow": // Not declared in header file case "SFContentBlockerState": // Not declared in header file case "NEFlowMetaData": // Not declared in header file - case "MKMapItem": // Not declared in header file - case "CAConstraintLayoutManager": // Not declared in header file - case "NSQueryGenerationToken": // Declared in header file but SupportsSecureCoding returns false - radar 32856944 - case "NSPersistentHistoryToken": // Conformance not in headers - case "NSPropertyDescription": // NSPropertyDescription and children does not declare in header file - case "NSAttributeDescription": - case "NSExpressionDescription": - case "NSFetchedPropertyDescription": - case "NSRelationshipDescription": - case "NSEntityDescription": // Not declared in header file - case "NSFetchIndexDescription": // Not declared in header file - case "NSFetchIndexElementDescription": // Not declared in header file - case "NSFetchRequest": // Not declared in header file - case "NSManagedObjectModel": // Not declared in header file - case "NSUserInterfaceCompressionOptions": // Not declared in header file return true; default: // CIFilter started implementing NSSecureCoding in 10.11 @@ -87,7 +72,6 @@ protected override bool Skip (Type type, string protocolName) case "EKReminder": // Not declared in header file case "ACAccount": // Not declared in header file case "NEFlowMetaData": // Not declared in header file - case "ACAccountCredential": // Not declared in header file return true; } break; @@ -103,7 +87,6 @@ protected override bool Skip (Type type, string protocolName) case "EKParticipant": // Not declared in header file case "EKRecurrenceRule": // Not declared in header file case "EKReminder": // Not declared in header file - case "INPerson": // Not declared in header file return true; } break; @@ -131,10 +114,6 @@ protected override bool Skip (Type type, string protocolName) case "SFSafariToolbarItem": // Not declared in header file case "SFSafariWindow": // Not declared in header file case "NEFlowMetaData": // Not declared in header file - case "MKMapItem": // Not declared in header file - case "NSConstraintConflict": // Not declared in header file - case "NSQueryGenerationToken": // Declared in header file but SupportsSecureCoding returns false - radar 32856944 - case "NSPersistentHistoryToken": // Conformance not in headers return true; } break; @@ -201,22 +180,6 @@ protected override bool Skip (Type type, string protocolName) break; case "NSExtensionRequestHandling": return IntPtr.Size == 4; - case "NSAppearanceCustomization": - switch (type.Name) { - case "NSPopover": - if (!Mac.CheckSystemVersion (10, 13)) // Was added in 10.13 - return true; - break; - } - break; - case "NSUserInterfaceValidations": - switch (type.Name) { - case "NSSplitViewController": - if (!Mac.CheckSystemVersion (10, 13)) // Was added in 10.13 - return true; - break; - } - break; } switch (type.Name) { diff --git a/tests/introspection/Mac/MacApiSelectorTest.cs b/tests/introspection/Mac/MacApiSelectorTest.cs index 528687b2b63..026d5a419bd 100644 --- a/tests/introspection/Mac/MacApiSelectorTest.cs +++ b/tests/introspection/Mac/MacApiSelectorTest.cs @@ -41,9 +41,6 @@ public MacApiSelectorTest () protected override bool Skip (Type type) { switch (type.FullName) { - case "MonoMac.AppKit.NSWindowTabGroup": - case "AppKit.NSWindowTabGroup": - return true; /// 32930276 case "MonoMac.CIFilter.CIMaskedVariableBlur": // Appears to be missing from 10.11, not documented case "CIFilter.CIMaskedVariableBlur": if (Mac.CheckSystemVersion (10, 11)) @@ -326,15 +323,6 @@ protected override bool Skip (Type type, string selectorName) if (Mac.CheckSystemVersion (10, 11)) return true; break; - case "earliestBeginDate": - case "setEarliestBeginDate:": - case "countOfBytesClientExpectsToSend": - case "setCountOfBytesClientExpectsToSend:": - case "countOfBytesClientExpectsToReceive": - case "setCountOfBytesClientExpectsToReceive:": - if (Mac.CheckSystemVersion (10, 13)) - return true; - break; } break; case "NSUrlSessionConfiguration": diff --git a/tests/introspection/Mac/MacApiSignatureTest.cs b/tests/introspection/Mac/MacApiSignatureTest.cs index 9ba5f6d77d2..b5a45bca57d 100644 --- a/tests/introspection/Mac/MacApiSignatureTest.cs +++ b/tests/introspection/Mac/MacApiSignatureTest.cs @@ -63,23 +63,6 @@ protected override bool Skip (Type type, MethodBase method, string selector) return true; switch (type.Name) { - case "PdfDocument": - switch (selector) { - case "majorVersion": // radar 32884659 - case "minorVersion": - return true; - } - break; - - case "NSPopover": - switch (selector) { - // Apple re-used these selectors for a new property of same size but different type - // We've obsoleteted the "old" one - case "appearance": - case "setAppearance:": - return true; - } - break; case "AVPlayerItemOutput": case "AVPlayerItemVideoOutput": case "NSSharingService": diff --git a/tests/introspection/Mac/MacCoreImageFiltersTest.cs b/tests/introspection/Mac/MacCoreImageFiltersTest.cs index 821c7eae116..0a7cdc77c70 100644 --- a/tests/introspection/Mac/MacCoreImageFiltersTest.cs +++ b/tests/introspection/Mac/MacCoreImageFiltersTest.cs @@ -33,7 +33,6 @@ public class MacCoreImageFiltersTest : ApiCoreImageFiltersTest protected override bool Skip (string nativeName) { switch (nativeName) { - case "CIEdgePreserveUpsampleFilter": // Appears in 10.13 but not documented case "CIMaskedVariableBlur": // Appears removed in 10.11 but not documented if (Mac.CheckSystemVersion (10, 11)) return true; diff --git a/tests/introspection/Mac/introspection-mac.csproj b/tests/introspection/Mac/introspection-mac.csproj index 438c406bd4f..6b8d613be26 100644 --- a/tests/introspection/Mac/introspection-mac.csproj +++ b/tests/introspection/Mac/introspection-mac.csproj @@ -3,7 +3,7 @@ Debug x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA} + {FD385098-B3FD-4331-92BF-CC1F918E3334} {42C0BBD9-55CE-4FC1-8D90-A7348ABAFB23};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Exe introspection diff --git a/tests/introspection/iOS/iOSApiCtorInitTest.cs b/tests/introspection/iOS/iOSApiCtorInitTest.cs index f32ba9b3a6a..acb751c033a 100644 --- a/tests/introspection/iOS/iOSApiCtorInitTest.cs +++ b/tests/introspection/iOS/iOSApiCtorInitTest.cs @@ -73,11 +73,6 @@ protected override bool Skip (Type type) return true; break; #endif // !__WATCHOS__ - case "CoreNFC": // Only available on device - case "DeviceCheck": // Only available on device - if (Runtime.Arch == Arch.SIMULATOR) - return true; - break; } switch (type.Name) { @@ -201,19 +196,6 @@ protected override bool Skip (Type type) case "INStartWorkoutIntent": return true; #endif - // iOS 11 Beta 1 - case "UICollectionViewFocusUpdateContext": // [Assert] -init is not a useful initializer for this class. Use one of the designated initializers instead - case "UIFocusUpdateContext": // [Assert] -init is not a useful initializer for this class. Use one of the designated initializers instead - case "EKCalendarItem": // Fails with NSInvalidArgumentException +[EKCalendarItem frozenClass]: unrecognized selector sent to class, will fill a radar - case "EKParticipant": // ctor disabled in XAMCORE_3_0 - case "UITableViewFocusUpdateContext": // Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Invalid parameter not satisfying: focusSystem, will fill a radar - return true; - case "INBookRestaurantReservationIntentResponse": // iOS 11 beta 2: stack overflow in description. radar:32945914 - return true; - case "MPVolumeView": // Started failing with Xcode 9 beta 3 - return true; - case "IOSurface": // Only works on device - return Runtime.Arch == Arch.SIMULATOR; default: return base.Skip (type); } @@ -340,11 +322,6 @@ protected override void CheckToString (NSObject obj) if (TestRuntime.CheckXcodeVersion (8, 0)) return; break; - // Xcode 9 Beta 1 to avoid crashes - case "CIImageAccumulator": - if (TestRuntime.CheckXcodeVersion (9, 0)) - return; - break; default: base.CheckToString (obj); break; diff --git a/tests/introspection/iOS/iOSApiFieldTest.cs b/tests/introspection/iOS/iOSApiFieldTest.cs index 0e964664fb7..e09f94045e8 100644 --- a/tests/introspection/iOS/iOSApiFieldTest.cs +++ b/tests/introspection/iOS/iOSApiFieldTest.cs @@ -53,15 +53,9 @@ protected override bool Skip (PropertyInfo p) case "MonoTouch.MetalKit": case "MetalPerformanceShaders": case "MonoTouch.MetalPerformanceShaders": - case "CoreNFC": // Only available on device - case "DeviceCheck": // Only available on device if (Runtime.Arch == Arch.SIMULATOR) return true; break; - case "IOSurface": - // Available in the simulator starting with iOS 11 - return Runtime.Arch == Arch.SIMULATOR && !TestRuntime.CheckXcodeVersion (9, 0); - } switch (p.Name) { @@ -110,13 +104,8 @@ protected override bool Skip (PropertyInfo p) } } - protected override bool Skip (string constantName, string libraryName) + protected override bool Skip (string constantName) { - switch (libraryName) { - case "IOSurface": - return Runtime.Arch == Arch.SIMULATOR && !TestRuntime.CheckXcodeVersion (9, 0); - } - switch (constantName) { // grep ImageIO binary shows those symbols are not part of the binary // that match older results (nil) when loading them (see above) @@ -145,7 +134,6 @@ protected override bool Skip (string constantName, string libraryName) case "MTKTextureLoaderOptionTextureCPUCacheMode": case "MTKModelErrorDomain": case "MTKModelErrorKey": - case "NFCISO15693TagResponseErrorKey": // Not in simulator since no NFC on it return Runtime.Arch == Arch.SIMULATOR; default: return false; diff --git a/tests/introspection/iOS/iOSApiProtocolTest.cs b/tests/introspection/iOS/iOSApiProtocolTest.cs index 03784e6d949..614c40e0a77 100644 --- a/tests/introspection/iOS/iOSApiProtocolTest.cs +++ b/tests/introspection/iOS/iOSApiProtocolTest.cs @@ -157,11 +157,6 @@ protected override bool Skip (Type type, string protocolName) case "PKPaymentRequest": case "PKPaymentToken": case "PKLabeledValue": - case "PKPaymentAuthorizationResult": - case "PKPaymentRequestShippingMethodUpdate": - case "PKPaymentRequestUpdate": - case "PKPaymentRequestPaymentMethodUpdate": - case "PKPaymentRequestShippingContactUpdate": // iOS9 case "UIFont": case "AVAssetTrackSegment": @@ -188,32 +183,6 @@ protected override bool Skip (Type type, string protocolName) case "MPMusicPlayerControllerMutableQueue": case "MPMusicPlayerControllerQueue": return true; - // iOS 11.0 - case "UICollectionViewUpdateItem": // Conformance not in headers - case "MKMapItem": // Conformance not in headers - case "NSConstraintConflict": // Conformance not in headers - case "NSQueryGenerationToken": // Conformance not in headers - case "NSPersistentHistoryToken": // Conformance not in headers - case "ARCamera": - case "HMPresenceEvent": - case "HMMutablePresenceEvent": - case "HMSignificantTimeEvent": - case "HMMutableSignificantTimeEvent": - case "HMCalendarEvent": - case "HMMutableCalendarEvent": - case "HMCharacteristicThresholdRangeEvent": - case "HMMutableCharacteristicThresholdRangeEvent": - case "HMDurationEvent": - case "HMMutableDurationEvent": - case "HMMutableCharacteristicEvent": - case "HMMutableLocationEvent": - case "HMTimeEvent": - case "ILMessageFilterExtensionContext": // Conformance not in headers - case "MSMessageLiveLayout": - case "NSFileProviderDomain": // Conformance not in headers - case "FPUIActionExtensionContext": // Conformance not in headers - case "UIDocumentBrowserAction": // Conformance not in headers - return true; #if __WATCHOS__ case "CLKComplicationTemplate": case "CLKComplicationTemplateCircularSmallRingImage": @@ -289,11 +258,6 @@ protected override bool Skip (Type type, string protocolName) case "PKPaymentRequest": case "PKPaymentToken": case "PKLabeledValue": - case "PKPaymentAuthorizationResult": - case "PKPaymentRequestShippingMethodUpdate": - case "PKPaymentRequestUpdate": - case "PKPaymentRequestPaymentMethodUpdate": - case "PKPaymentRequestShippingContactUpdate": // iOS9 case "UIFont": case "AVAssetTrackSegment": @@ -321,40 +285,6 @@ protected override bool Skip (Type type, string protocolName) case "MPMusicPlayerControllerMutableQueue": case "MPMusicPlayerControllerQueue": return true; - // iOS 11.0 - case "MKMapItem": // Conformance not in headers - case "NSQueryGenerationToken": // Conformance not in headers - case "NSPersistentHistoryToken": // Conformance not in headers - case "ARCamera": - case "HMPresenceEvent": - case "HMMutablePresenceEvent": - case "HMSignificantTimeEvent": - case "HMMutableSignificantTimeEvent": - case "HMCalendarEvent": - case "HMMutableCalendarEvent": - case "HMCharacteristicThresholdRangeEvent": - case "HMMutableCharacteristicThresholdRangeEvent": - case "HMDurationEvent": - case "HMMutableDurationEvent": - case "HMMutableCharacteristicEvent": - case "HMMutableLocationEvent": - case "HMTimeEvent": - case "ILMessageFilterExtensionContext": // Conformance not in headers - case "NSAttributeDescription": - case "NSEntityDescription": - case "NSExpressionDescription": - case "NSFetchedPropertyDescription": - case "NSFetchIndexDescription": - case "NSFetchIndexElementDescription": - case "NSFetchRequest": - case "NSManagedObjectModel": - case "NSPropertyDescription": - case "NSRelationshipDescription": - case "MSMessageLiveLayout": - case "NSFileProviderDomain": // Conformance not in headers - case "FPUIActionExtensionContext": // Conformance not in headers - case "UIDocumentBrowserAction": // Conformance not in headers - return true; #if __WATCHOS__ case "CLKComplicationTemplate": case "CLKComplicationTemplateCircularSmallRingImage": @@ -405,6 +335,7 @@ protected override bool Skip (Type type, string protocolName) switch (type.Name) { // undocumented conformance (up to 7.0) and conformity varies between iOS versions case "MKDirectionsRequest": + case "MPMediaItem": case "MPMediaPlaylist": case "MPMediaItemCollection": case "MPMediaEntity": @@ -432,17 +363,6 @@ protected override bool Skip (Type type, string protocolName) // iOS 10.2 case "VSAccountProviderResponse": return true; - // iOS 11.0 - case "UICollectionViewUpdateItem": // Conformance not in headers - case "ACAccountCredential": // b2: Conformance not in headers - case "ILMessageFilterExtensionContext": // b2: Conformance not in headers - case "HMCharacteristicEvent": // Selectors not available on 32 bit - case "NSFileProviderDomain": // Conformance not in headers - case "FPUIActionExtensionContext": // Conformance not in headers - case "CXCall": // Conformance not in headers - case "UIDocumentBrowserAction": // Conformance not in headers - return true; - #if __WATCHOS__ case "CLKComplicationTimelineEntry": return true; @@ -455,11 +375,6 @@ protected override bool Skip (Type type, string protocolName) // iOS 10.3 case "MPMusicPlayerControllerMutableQueue": case "MPMusicPlayerControllerQueue": - // iOS 11 - case "INRideDriver": - case "INRestaurantGuest": - case "INPerson": - case "HMCharacteristicEvent": // Selectors not available on 32 bit return true; } break; @@ -519,9 +434,6 @@ protected override bool Skip (Type type, string protocolName) case "SKVideoNode": case "SKSpriteNode": return !TestRuntime.CheckXcodeVersion (8,0); - case "SCNNode": - case "SCNReferenceNode": - return !TestRuntime.CheckXcodeVersion (9,0); } break; @@ -632,9 +544,6 @@ protected override bool Skip (Type type, string protocolName) case "UIVisualEffectView": case "UIWindow": return !TestRuntime.CheckXcodeVersion (8, 0); - case "SCNNode": - case "SCNReferenceNode": - return !TestRuntime.CheckXcodeVersion (9,0); } break; @@ -646,23 +555,6 @@ protected override bool Skip (Type type, string protocolName) return !TestRuntime.CheckXcodeVersion (8, 0); } break; - - case "UISpringLoadedInteractionSupporting": // types do not conform to protocol but protocol methods work on those types (see monotouch-test) - switch (type.Name) { - case "UIButton": - case "UICollectionView": - case "UISegmentedControl": - case "UITableView": - case "UITabBar": - case "UIAlertController": - case "PKPaymentButton": - case "PKAddPassButton": - return true; - } - break; - - case "UIPasteConfigurationSupporting": // types do not conform to protocol but protocol methods work on those types (base type tests in monotouch-test) - return true; // Skip everything because 'UIResponder' implements 'UIPasteConfigurationSupporting' and that's 130+ types } return base.Skip (type, protocolName); } diff --git a/tests/introspection/iOS/iOSApiSelectorTest.cs b/tests/introspection/iOS/iOSApiSelectorTest.cs index f16275b03dd..28113dadbdb 100644 --- a/tests/introspection/iOS/iOSApiSelectorTest.cs +++ b/tests/introspection/iOS/iOSApiSelectorTest.cs @@ -61,12 +61,6 @@ protected override bool Skip (Type type) if (Runtime.Arch == Arch.SIMULATOR) return true; break; - // Xcode 9 - case "CoreNFC": - case "DeviceCheck": - if (Runtime.Arch == Arch.SIMULATOR) - return true; - break; // Apple does not ship a PushKit for every arch on some devices :( // case "PushKit": @@ -92,9 +86,8 @@ protected override bool Skip (Type type) case "UILocalNotification": return true; - // Metal is not available on the simulator + // Metal is not available on the (iOS8) simulator case "CAMetalLayer": - case "SKRenderer": return (Runtime.Arch == Arch.SIMULATOR); // iOS 10 - this type can only be instantiated on devices, but the selectors are forwarded @@ -183,16 +176,6 @@ protected override bool CheckResponse (bool value, Type actualType, MethodBase m if (TestRuntime.CheckXcodeVersion (7, 0)) return true; break; - case "earliestBeginDate": - case "setEarliestBeginDate:": - case "countOfBytesClientExpectsToSend": - case "setCountOfBytesClientExpectsToSend:": - case "countOfBytesClientExpectsToReceive": - case "setCountOfBytesClientExpectsToReceive:": - case "progress": - if (TestRuntime.CheckXcodeVersion (9, 0)) - return true; - break; } break; case "NSUrlSessionConfiguration": @@ -224,20 +207,19 @@ protected override bool CheckResponse (bool value, Type actualType, MethodBase m break; } break; - case "SKNode": // iOS 10+ - case "SCNNode": // iOS 11+ + case "SKNode": switch (name) { - // UIFocus protocol conformance + // UIFocus protocol conformance on iOS10+ case "didUpdateFocusInContext:withAnimationCoordinator:": case "setNeedsFocusUpdate": case "shouldUpdateFocusInContext:": case "updateFocusIfNeeded": +#if __TVOS__ case "canBecomeFocused": -#if !__TVOS__ +#else case "preferredFocusedView": #endif - int major = declaredType.Name == "SKNode" ? 8 : 9; - if (!TestRuntime.CheckXcodeVersion (major, 0)) + if (!TestRuntime.CheckXcodeVersion (8, 0)) return true; break; #if __TVOS__ @@ -246,48 +228,6 @@ protected override bool CheckResponse (bool value, Type actualType, MethodBase m #endif } break; - case "CIContext": - switch (name) { - case "render:toIOSurface:bounds:colorSpace:": - if (Runtime.Arch == Arch.SIMULATOR) - return true; - if (!TestRuntime.CheckXcodeVersion (9, 0)) - return true; - break; - } - break; - case "CIImage": - switch (name) { - case "initWithIOSurface:": - case "initWithIOSurface:options:": - if (Runtime.Arch == Arch.SIMULATOR) - return true; - if (!TestRuntime.CheckXcodeVersion (9, 0)) - return true; - break; - } - break; - case "CIRenderDestination": - switch (name) { - case "initWithIOSurface:": - if (Runtime.Arch == Arch.SIMULATOR) - return true; - if (!TestRuntime.CheckXcodeVersion (9, 0)) - return true; - break; - } - break; - case "EAGLContext": - switch (name) { - // symbol only exists on devices (not in simulator libraries) - case "texImageIOSurface:target:internalFormat:width:height:format:type:plane:": - if (Runtime.Arch == Arch.SIMULATOR) - return true; - if (!TestRuntime.CheckXcodeVersion (9, 0)) - return true; - break; - } - break; } switch (name) { @@ -638,8 +578,6 @@ protected override bool CheckResponse (bool value, Type actualType, MethodBase m return !TestRuntime.CheckXcodeVersion (7, 0); case "HKWorkoutEvent": return !TestRuntime.CheckXcodeVersion (8, 0); - case "HMLocationEvent": - return !TestRuntime.CheckXcodeVersion (9, 0); } break; @@ -695,9 +633,6 @@ protected override bool CheckResponse (bool value, Type actualType, MethodBase m case "HKBiologicalSexObject": case "HKBloodTypeObject": return !TestRuntime.CheckXcodeVersion (7, 0); - case "MPSKernel": - case "MPSCnnConvolutionDescriptor": - return !TestRuntime.CheckXcodeVersion (9, 0); #if __TVOS__ case "SKAttribute": case "SKAttributeValue": @@ -714,12 +649,6 @@ protected override bool CheckResponse (bool value, Type actualType, MethodBase m return true; break; #endif - case "mutableCopyWithZone:": - switch (declaredType.Name) { - case "HMLocationEvent": - return !TestRuntime.CheckXcodeVersion (9, 0); - } - break; } return base.CheckResponse (value, actualType, method, ref name); @@ -735,17 +664,6 @@ protected override bool CheckStaticResponse (bool value, Type actualType, Type d return true; } break; - case "imageWithIOSurface:": - case "imageWithIOSurface:options:": - switch (declaredType.Name) { - case "CIImage": - if (Runtime.Arch == Arch.SIMULATOR) - return true; - if (!TestRuntime.CheckXcodeVersion (9, 0)) - return true; - break; - } - break; #if __WATCHOS__ case "fetchAllRecordZonesOperation": case "fetchCurrentUserRecordOperation": diff --git a/tests/introspection/iOS/iOSApiWeakPropertyTest.cs b/tests/introspection/iOS/iOSApiWeakPropertyTest.cs index a2b28b19448..2c2f3c84b84 100644 --- a/tests/introspection/iOS/iOSApiWeakPropertyTest.cs +++ b/tests/introspection/iOS/iOSApiWeakPropertyTest.cs @@ -39,9 +39,6 @@ protected override bool Skip (PropertyInfo property) // UIStringAttributes is a DictionaryContainer that expose a Weak* NSString case "UIStringAttributes": return property.Name == "WeakTextEffect"; - // VNImageOptions is a DictionaryContainer that exposes a Weak* NSDictionary - case "VNImageOptions": - return property.Name == "WeakProperties"; #if !XAMCORE_3_0 // #37451 - setter does not exists but we have to keep it for binary compatibility // OTOH we can't give it a selector (private API) even if we suspect Apple is mostly running `strings` on executable diff --git a/tests/linker-ios/link sdk/DllImportTest.cs b/tests/linker-ios/link sdk/DllImportTest.cs index cdc6a99053f..46053907b38 100644 --- a/tests/linker-ios/link sdk/DllImportTest.cs +++ b/tests/linker-ios/link sdk/DllImportTest.cs @@ -53,29 +53,20 @@ public void Sqlite3 () Assert.That (Dlfcn.dlsym (lib, "sqlite3_bind_int"), Is.Not.EqualTo (IntPtr.Zero), "sqlite3_bind_int"); // iOS does not have some symbols defined - if that change/fail in the future we'll need to update Mono.Data.Sqlite // note: Apple devices (at least iOS and AppleTV) running 10.x have a more recent version of libsqlite which includes _key and _rekey - // note 2: simulators also got the new libsqlite version with Xcode 9, and since Xcode 9 ships an ever newer sqlite version, - // we get even more API as well. - var hasNewerSqlite = TestRuntime.CheckXcodeVersion (9, 0); - var hasNewSqlite = hasNewerSqlite || TestRuntime.CheckXcodeVersion (8, 0) && Runtime.Arch == Arch.DEVICE; - - var new_symbols = new string [] { - "sqlite3_key", - "sqlite3_rekey", - }; - var newer_symbols = new string [] { - "sqlite3_column_database_name", - "sqlite3_column_database_name16", - "sqlite3_column_origin_name", - "sqlite3_column_origin_name16", - "sqlite3_column_table_name", - "sqlite3_column_table_name16", - }; - - foreach (var symbol in new_symbols) - Assert.That (Dlfcn.dlsym (lib, symbol), hasNewSqlite ? Is.Not.EqualTo (IntPtr.Zero) : Is.EqualTo (IntPtr.Zero), symbol); - - foreach (var symbol in newer_symbols) - Assert.That (Dlfcn.dlsym (lib, symbol), hasNewerSqlite ? Is.Not.EqualTo (IntPtr.Zero) : Is.EqualTo (IntPtr.Zero), symbol); + var version = TestRuntime.CheckXcodeVersion (8, 0); + if (version && (Runtime.Arch == Arch.DEVICE)) { + Assert.That (Dlfcn.dlsym (lib, "sqlite3_key"), Is.Not.EqualTo (IntPtr.Zero), "sqlite3_key"); + Assert.That (Dlfcn.dlsym (lib, "sqlite3_rekey"), Is.Not.EqualTo (IntPtr.Zero), "sqlite3_rekey"); + } else { + Assert.That (Dlfcn.dlsym (lib, "sqlite3_key"), Is.EqualTo (IntPtr.Zero), "sqlite3_key"); + Assert.That (Dlfcn.dlsym (lib, "sqlite3_rekey"), Is.EqualTo (IntPtr.Zero), "sqlite3_rekey"); + } + Assert.That (Dlfcn.dlsym (lib, "sqlite3_column_database_name"), Is.EqualTo (IntPtr.Zero), "sqlite3_column_database_name"); + Assert.That (Dlfcn.dlsym (lib, "sqlite3_column_database_name16"), Is.EqualTo (IntPtr.Zero), "sqlite3_column_database_name16"); + Assert.That (Dlfcn.dlsym (lib, "sqlite3_column_origin_name"), Is.EqualTo (IntPtr.Zero), "sqlite3_column_origin_name"); + Assert.That (Dlfcn.dlsym (lib, "sqlite3_column_origin_name16"), Is.EqualTo (IntPtr.Zero), "sqlite3_column_origin_name16"); + Assert.That (Dlfcn.dlsym (lib, "sqlite3_column_table_name"), Is.EqualTo (IntPtr.Zero), "sqlite3_column_table_name"); + Assert.That (Dlfcn.dlsym (lib, "sqlite3_column_table_name16"), Is.EqualTo (IntPtr.Zero), "sqlite3_column_table_name16"); } finally { Dlfcn.dlclose (lib); diff --git a/tests/mmptest/src/FrameworkLinksTests.cs b/tests/mmptest/src/FrameworkLinksTests.cs index c96e0a0dec5..30c4acb6315 100644 --- a/tests/mmptest/src/FrameworkLinksTests.cs +++ b/tests/mmptest/src/FrameworkLinksTests.cs @@ -1,6 +1,4 @@ -#define ENABLE_STATIC_REGISTRAR_TESTS - -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -72,11 +70,9 @@ public void UnifiedWithoutLinking_ShouldHaveManyFrameworkClangLines () string [] clangParts = GetUnifiedProjectClangInvocation (tmpDir); AssertUnlinkedFrameworkStatus (clangParts); -#if ENABLE_STATIC_REGISTRAR_TESTS // Even with static registrar clangParts = GetUnifiedProjectClangInvocation (tmpDir, StaticRegistrarConfig); AssertUnlinkedFrameworkStatus (clangParts); -#endif }); } @@ -100,11 +96,9 @@ public void UnifiedWithLinking_ShouldHaveFewFrameworkClangLines () string[] clangParts = GetUnifiedProjectClangInvocation (tmpDir, LinkerEnabledConfig); AssertLinkedFrameworkStatus (clangParts); -#if ENABLE_STATIC_REGISTRAR_TESTS // Even with static registrar clangParts = GetUnifiedProjectClangInvocation (tmpDir, LinkerEnabledConfig + StaticRegistrarConfig); AssertLinkedFrameworkStatus (clangParts); -#endif }); } diff --git a/tests/mmptest/src/MMPTest.cs b/tests/mmptest/src/MMPTest.cs index 8b09cc6ef9c..a760047f9b1 100644 --- a/tests/mmptest/src/MMPTest.cs +++ b/tests/mmptest/src/MMPTest.cs @@ -1,5 +1,3 @@ -#define ENABLE_STATIC_REGISTRAR_TESTS - using System; using System.Collections.Generic; using System.Diagnostics; @@ -69,9 +67,7 @@ public void CollisionBetweenEXEAndSDKAssembly_ShouldFailBuild () }); } -#if ENABLE_STATIC_REGISTRAR_TESTS [Test] -#endif public void Unified_Static_RegistrarTest () { if (!PlatformHelpers.CheckSystemVersion (10, 11)) @@ -611,9 +607,7 @@ public void Unified_SideBySideXamMac_ConsoleTest () }); } -#if ENABLE_STATIC_REGISTRAR_TESTS [Test] -#endif public void UnifiedDebugBuilds_ShouldLinkToPartialStatic_UnlessDisabled () { RunMMPTest (tmpDir => diff --git a/tests/mmptest/src/TargetFrameworkDetectionTests.cs b/tests/mmptest/src/TargetFrameworkDetectionTests.cs index 35de6abb24a..aaa0bf05249 100644 --- a/tests/mmptest/src/TargetFrameworkDetectionTests.cs +++ b/tests/mmptest/src/TargetFrameworkDetectionTests.cs @@ -23,7 +23,7 @@ string CreateTestExe (string tmpDir) string GetTestMMPInvocation (string tmpDir, string libPath, TargetFramework targetFramework, bool correctReference = true) { string xmReference = correctReference ? GetXMReference (targetFramework) : GetWrongXMReference (targetFramework); - return $"-v -v -v -v -v --output={tmpDir} --arch=x86_64 --sdkroot {Configuration.xcode_root} --minos 10.7 {libPath} --sdk {Configuration.macos_sdk_version} --nolink -p --profile:{targetFramework} -a:{xmReference}"; + return $"-v -v -v -v -v --output={tmpDir} --arch=x86_64 --sdkroot {Configuration.xcode_root} --minos 10.7 {libPath} --sdk 10.12 --nolink -p --profile:{targetFramework} -a:{xmReference}"; } string GetWrongXMReference (TargetFramework target) diff --git a/tests/monotouch-test/ARKit/ARPointCloudTest.cs b/tests/monotouch-test/ARKit/ARPointCloudTest.cs deleted file mode 100644 index 1d2ec5650a1..00000000000 --- a/tests/monotouch-test/ARKit/ARPointCloudTest.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -// Unit tests for ARPointCloud -// -// Authors: -// Vincent Dondain -// -// Copyright 2017 Microsoft. All rights reserved. -// - -#if XAMCORE_2_0 && __IOS__ - -using System; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using ARKit; -using AVFoundation; -using Foundation; -using NUnit.Framework; -using ObjCRuntime; - -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; -using VectorFloat3 = global::OpenTK.NVector3; - -namespace MonoTouchFixtures.ARKit { - - class ARPointCloudPoker : ARPointCloud { - - GCHandle vectorArrayHandle; - GCHandle identifiersHandle; - VectorFloat3 [] vectorArray; - ulong [] identifiers; - - public ARPointCloudPoker () : base (IntPtr.Zero) - { - } - - public override nuint Count { - get { - return 2; - } - } - - protected unsafe override IntPtr GetRawPoints () - { - vectorArray = new VectorFloat3 [] { new VectorFloat3 (1, 2, 3), new VectorFloat3 (4, 5, 6) }; - if (!vectorArrayHandle.IsAllocated) - vectorArrayHandle = GCHandle.Alloc (vectorArray, GCHandleType.Pinned); - return vectorArrayHandle.AddrOfPinnedObject (); - } - - protected unsafe override IntPtr GetRawIdentifiers () - { - identifiers = new ulong [] { 0, 1 }; - if (!identifiersHandle.IsAllocated) - identifiersHandle = GCHandle.Alloc (identifiers, GCHandleType.Pinned); - ulong* addr = (ulong*)identifiersHandle.AddrOfPinnedObject (); - return (IntPtr)addr; - } - - protected override void Dispose (bool disposing) - { - base.Dispose (disposing); - if (vectorArrayHandle.IsAllocated) - vectorArrayHandle.Free (); - if (identifiersHandle.IsAllocated) - identifiersHandle.Free (); - } - } - - [TestFixture] - [Preserve (AllMembers = true)] - public class ARPointCloudTest { - - [SetUp] - public void Setup () - { - TestRuntime.AssertXcodeVersion (9, 0); - } - - [Test] - public void PointsTest () - { - var cloud = new ARPointCloudPoker (); - - var points = cloud.Points; - Assert.AreEqual (new VectorFloat3 (1, 2, 3), cloud.Points [0]); - Assert.AreEqual (new VectorFloat3 (4, 5, 6), cloud.Points [1]); - } - - [Test] - public void IdentifiersTest () - { - var cloud = new ARPointCloudPoker (); - - var points = cloud.Identifiers; - Assert.AreEqual (0, cloud.Identifiers [0]); - Assert.AreEqual (1, cloud.Identifiers [1]); - } - } -} - -#endif // XAMCORE_2_0 && __IOS__ diff --git a/tests/monotouch-test/AVFoundation/AVDepthDataTests.cs b/tests/monotouch-test/AVFoundation/AVDepthDataTests.cs deleted file mode 100644 index 3ab42118425..00000000000 --- a/tests/monotouch-test/AVFoundation/AVDepthDataTests.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -// AVDepthDataTests.cs -// -// Authors: -// Alex Soto -// -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !__WATCHOS__ - -using System; -using NUnit.Framework; - -using AVFoundation; -using Foundation; -using ImageIO; - -namespace MonoTouchFixtures.AVFoundation { - - [TestFixture] - [Preserve (AllMembers = true)] - public class AVDepthDataTests { - - [Test] - public void AvailableDepthDataTypesTest () - { - TestRuntime.AssertDevice (); - TestRuntime.AssertXcodeVersion (9, 0); - - // xamarinmonkey.heic is the new photo format, also this one includes depth data - var imgdata = NSData.FromFile ("CoreImage/xamarinmonkey.heic"); - Assert.NotNull (imgdata, "imgdata"); - - var imageSource = CGImageSource.FromData (imgdata); - Assert.NotNull (imageSource, "imageSource"); - - var info = imageSource.CopyAuxiliaryDataInfo (0, CGImageAuxiliaryDataType.Disparity); - Assert.NotNull (info, "info"); - - NSError err; - var depthData = AVDepthData.Create (info, out err); - Assert.NotNull (depthData, "depthData"); - Assert.NotNull (depthData.AvailableDepthDataTypes, "AvailableDepthDataTypes"); - } - } -} -#endif diff --git a/tests/monotouch-test/AVFoundation/AVPlayerLooperTest.cs b/tests/monotouch-test/AVFoundation/AVPlayerLooperTest.cs deleted file mode 100644 index f8089aee70e..00000000000 --- a/tests/monotouch-test/AVFoundation/AVPlayerLooperTest.cs +++ /dev/null @@ -1,35 +0,0 @@ -#if !__WATCHOS__ -using System; -using System.IO; -#if XAMCORE_2_0 -using Foundation; -using AVFoundation; -#else -using MonoTouch.AVFoundation; -using MonoTouch.Foundation; -#endif -using NUnit.Framework; -namespace monotouchtest.AVFoundation -{ - [TestFixture] - [Preserve (AllMembers = true)] - public class AVPlayerLooperTest - { -#if !XAMCORE_4_0 - public void TestLoopingEnabled () - { - string file = Path.Combine (NSBundle.MainBundle.ResourcePath, "Hand.wav"); - Assert.True (File.Exists (file), file); - using (var url = new NSUrl (file)) - using (var playerItem = AVPlayerItem.FromUrl (url)) - using (AVQueuePlayer player = AVQueuePlayer.FromItems (new[] { playerItem })) - using (var playerLooper = AVPlayerLooper.FromPlayer (player, playerItem)) { - Assert.True (playerLooper.LoopingEnabled, "The default value should be true."); - playerLooper.DisableLooping (); - Assert.False (playerLooper.LoopingEnabled, "Looping enabled should return false after 'DisableLooping'"); - } - } -#endif - } -} -#endif \ No newline at end of file diff --git a/tests/monotouch-test/AddressBook/SourceTest.cs b/tests/monotouch-test/AddressBook/SourceTest.cs index f51f4eef236..b786a8b332f 100644 --- a/tests/monotouch-test/AddressBook/SourceTest.cs +++ b/tests/monotouch-test/AddressBook/SourceTest.cs @@ -43,11 +43,7 @@ public void Default () // 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"); - } + Assert.That (source.Type, Is.EqualTo (ABRecordType.Source), "Type"); } } } diff --git a/tests/monotouch-test/AddressBookUI/AddressFormattingTest.cs b/tests/monotouch-test/AddressBookUI/AddressFormattingTest.cs index e5502d045dd..bdc256d0a21 100644 --- a/tests/monotouch-test/AddressBookUI/AddressFormattingTest.cs +++ b/tests/monotouch-test/AddressBookUI/AddressFormattingTest.cs @@ -45,19 +45,12 @@ public void ChateauFrontenac () { new NSString ("SubThoroughfare"), new NSString ("1-3") }, { new NSString ("CountryCode"), new NSString ("CA") }, }) { - string expected1 = "1–3 Rue Des Carrières\nQuebec City‎ Quebec‎ G1R 5J5"; - string expected2 = "1–3 Rue Des Carrières\nQuebec City Quebec G1R 5J5"; // there's a "(char) 8206" character just after 'Quebec' - string expected; + string expected = "1–3 Rue Des Carrières\nQuebec City‎ Quebec‎ G1R 5J5"; string s = ABAddressFormatting.ToString (dict, false); - if (TestRuntime.CheckXcodeVersion (9, 0)) { - expected = expected2; - } else { - expected = expected1; - } Assert.That (s, Is.EqualTo (expected), "false"); // country names can be translated, e.g. chinese, so we can't compare it s = ABAddressFormatting.ToString (dict, true); - Assert.That (s, Is.StringStarting (expected), "prefix"); + Assert.True (s.StartsWith (expected, StringComparison.Ordinal), "prefix"); // Apple broke this again (8.0.x are hard to predict) - test will fail once it's corrected // iOS 8.1.2 device: working @@ -69,8 +62,8 @@ public void ChateauFrontenac () if (!UIDevice.CurrentDevice.CheckSystemVersion (8,2)) return; - // iOS 11.0 beta 1, 2, 3 and 4 are broken - // and I give up (this test was not meant to track Apple breakages) + Assert.That (s [expected.Length], Is.EqualTo ('\n'), "newline"); + Assert.That (s.Length > expected.Length + 1, "country"); } } } diff --git a/tests/monotouch-test/Asserts.cs b/tests/monotouch-test/Asserts.cs index 5d2b8e0d93c..8d468eb504c 100644 --- a/tests/monotouch-test/Asserts.cs +++ b/tests/monotouch-test/Asserts.cs @@ -2,25 +2,16 @@ #if XAMCORE_2_0 #if !__WATCHOS__ using ModelIO; -#if !MONOMAC -using MetalPerformanceShaders; -#endif #endif #else using MonoTouch.ModelIO; #endif using OpenTK; -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x3 = global::OpenTK.NMatrix4x3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; -using VectorFloat3 = global::OpenTK.NVector3; -using MatrixDouble4x4 = global::OpenTK.NMatrix4d; -using VectorDouble3 = global::OpenTK.NVector3d; using NUnit.Framework; public static class Asserts { +#if !__WATCHOS__ public static void AreEqual (bool expected, bool actual, string message) { Assert.AreEqual (expected, actual, message + " (M)"); @@ -31,11 +22,6 @@ public static void AreEqual (float expected, float actual, string message) Assert.AreEqual (expected, actual, message + " (M)"); } - public static void AreEqual (float expected, float actual, float delta, string message) - { - Assert.AreEqual (expected, actual, delta, message); - } - public static void AreEqual (Vector2 expected, Vector2 actual, string message) { Assert.AreEqual (expected.X, actual.X, message + " (X)"); @@ -49,41 +35,6 @@ public static void AreEqual (Vector3 expected, Vector3 actual, string message) Assert.AreEqual (expected.Z, actual.Z, 0.001, message + " (Z)"); } - public static void AreEqual (Vector3 expected, Vector3 actual, float delta, string message) - { - Assert.AreEqual (expected.X, actual.X, delta, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, delta, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, delta, message + " (Z)"); - } - - public static void AreEqual (Vector3 expected, VectorFloat3 actual, string message) - { - Assert.AreEqual (expected.X, actual.X, 0.001, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, 0.001, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, 0.001, message + " (Z)"); - } - - public static void AreEqual (VectorFloat3 expected, Vector3 actual, string message) - { - Assert.AreEqual (expected.X, actual.X, 0.001, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, 0.001, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, 0.001, message + " (Z)"); - } - - public static void AreEqual (VectorFloat3 expected, VectorFloat3 actual, string message) - { - Assert.AreEqual (expected.X, actual.X, 0.001, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, 0.001, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, 0.001, message + " (Z)"); - } - - public static void AreEqual (VectorFloat3 expected, VectorFloat3 actual, float delta, string message) - { - Assert.AreEqual (expected.X, actual.X, delta, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, delta, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, delta, message + " (Z)"); - } - public static void AreEqual (Vector4 expected, Vector4 actual, string message) { Assert.AreEqual (expected.X, actual.X, message + " (X)"); @@ -92,14 +43,6 @@ public static void AreEqual (Vector4 expected, Vector4 actual, string message) Assert.AreEqual (expected.W, actual.W, message + " (W)"); } - public static void AreEqual (Vector4 expected, Vector4 actual, float delta, string message) - { - Assert.AreEqual (expected.X, actual.X, delta, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, delta, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, delta, message + " (Z)"); - Assert.AreEqual (expected.W, actual.W, delta, message + " (W)"); - } - public static void AreEqual (Matrix2 expected, Matrix2 actual, string message) { AreEqual (expected.R0C0, actual.R0C0, message + " (R0C0)"); @@ -121,19 +64,6 @@ public static void AreEqual (Matrix3 expected, Matrix3 actual, string message) AreEqual (expected.R2C2, actual.R2C2, message + " (R2C2)"); } - public static void AreEqual (Matrix3 expected, Matrix3 actual, float delta, string message) - { - AreEqual (expected.R0C0, actual.R0C0, delta, message + " (R0C0)"); - AreEqual (expected.R0C1, actual.R0C1, delta, message + " (R0C1)"); - AreEqual (expected.R0C2, actual.R0C2, delta, message + " (R0C2)"); - AreEqual (expected.R1C0, actual.R1C0, delta, message + " (R1C0)"); - AreEqual (expected.R1C1, actual.R1C1, delta, message + " (R1C1)"); - AreEqual (expected.R1C2, actual.R1C2, delta, message + " (R1C2)"); - AreEqual (expected.R2C0, actual.R2C0, delta, message + " (R2C0)"); - AreEqual (expected.R2C1, actual.R2C1, delta, message + " (R2C1)"); - AreEqual (expected.R2C2, actual.R2C2, delta, message + " (R2C2)"); - } - public static void AreEqual (Matrix4 expected, Matrix4 actual, string message) { AreEqual (expected.Column0, actual.Column0, message + " (Col0)"); @@ -142,460 +72,17 @@ public static void AreEqual (Matrix4 expected, Matrix4 actual, string message) AreEqual (expected.Column3, actual.Column3, message + " (Col3)"); } - public static void AreEqual (Matrix4 expected, Matrix4 actual, float delta, string message) - { - AreEqual (expected.Column0, actual.Column0, delta, message + " (Col0)"); - AreEqual (expected.Column1, actual.Column1, delta, message + " (Col1)"); - AreEqual (expected.Column2, actual.Column2, delta, message + " (Col2)"); - AreEqual (expected.Column3, actual.Column3, delta, message + " (Col3)"); - } - public static void AreEqual (Vector2i expected, Vector2i actual, string message) { Assert.AreEqual (expected.X, actual.X, message + " (X)"); Assert.AreEqual (expected.Y, actual.Y, message + " (Y)"); } - public static void AreEqual (Vector4i expected, Vector4i actual, string message) - { - Assert.AreEqual (expected.X, actual.X, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, message + " (Z)"); - Assert.AreEqual (expected.W, actual.W, message + " (W)"); - } - -#if !__WATCHOS__ public static void AreEqual (MDLAxisAlignedBoundingBox expected, MDLAxisAlignedBoundingBox actual, string message) { AreEqual (expected.MaxBounds, actual.MaxBounds, message + " (MaxBounds)"); AreEqual (expected.MinBounds, actual.MinBounds, message + " (MinBounds)"); } #endif // !__WATCHOS__ - - public static void AreEqual (Quaternion expected, Quaternion actual, string message) - { - Assert.AreEqual (expected.X, actual.X, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, message + " (Z)"); - Assert.AreEqual (expected.W, actual.W, message + " (W)"); - } - -#if !MONOMAC && !__WATCHOS__ - public static void AreEqual (MPSImageHistogramInfo expected, MPSImageHistogramInfo actual, string message) - { - Assert.AreEqual (expected.HistogramForAlpha, actual.HistogramForAlpha, message + " HistogramForAlpha"); - Asserts.AreEqual (expected.MaxPixelValue, actual.MaxPixelValue, message + " MaxPixelValue"); - Asserts.AreEqual (expected.MinPixelValue, actual.MinPixelValue, message + " MinPixelValue"); - Assert.AreEqual (expected.NumberOfHistogramEntries, actual.NumberOfHistogramEntries, message + " NumberOfHistogramEntries"); - } -#endif // !MONOMAC && !__WATCHOS__ - - public static void AreEqual (MatrixFloat2x2 expected, MatrixFloat2x2 actual, string message) - { - AreEqual (expected.R0C0, actual.R0C0, message + " (R0C0)"); - AreEqual (expected.R1C0, actual.R1C0, message + " (R1C0)"); - AreEqual (expected.R0C1, actual.R0C1, message + " (R0C1)"); - AreEqual (expected.R1C1, actual.R1C1, message + " (R1C1)"); - } - - public static void AreEqual (MatrixFloat2x2 expected, MatrixFloat2x2 actual, float delta, string message) - { - AreEqual (expected.R0C0, actual.R0C0, delta, message + " (R0C0)"); - AreEqual (expected.R1C0, actual.R1C0, delta, message + " (R1C0)"); - AreEqual (expected.R0C1, actual.R0C1, delta, message + " (R0C1)"); - AreEqual (expected.R1C1, actual.R1C1, delta, message + " (R1C1)"); - } - - public static void AreEqual (Matrix2 expected, MatrixFloat2x2 actual, string message) - { - AreEqual (expected.R0C0, actual.R0C0, message + " (R0C0)"); - AreEqual (expected.R0C1, actual.R0C1, message + " (R0C1)"); - AreEqual (expected.R1C0, actual.R1C0, message + " (R1C0)"); - AreEqual (expected.R1C1, actual.R1C1, message + " (R1C1)"); - } - - public static void AreEqual (MatrixFloat2x2 expected, Matrix2 actual, string message) - { - AreEqual (expected.R0C0, actual.R0C0, message + " (R0C0)"); - AreEqual (expected.R0C1, actual.R0C1, message + " (R0C1)"); - AreEqual (expected.R1C0, actual.R1C0, message + " (R1C0)"); - AreEqual (expected.R1C1, actual.R1C1, message + " (R1C1)"); - } - - public static void AreEqual (MatrixFloat3x3 expected, MatrixFloat3x3 actual, string message) - { - AreEqual (expected.R0C0, actual.R0C0, message + " (R0C0)"); - AreEqual (expected.R1C0, actual.R1C0, message + " (R1C0)"); - AreEqual (expected.R2C0, actual.R2C0, message + " (R2C0)"); - AreEqual (expected.R0C1, actual.R0C1, message + " (R0C1)"); - AreEqual (expected.R1C1, actual.R1C1, message + " (R1C1)"); - AreEqual (expected.R2C1, actual.R2C1, message + " (R2C1)"); - AreEqual (expected.R0C2, actual.R0C2, message + " (R0C2)"); - AreEqual (expected.R1C2, actual.R1C2, message + " (R1C2)"); - AreEqual (expected.R2C2, actual.R2C2, message + " (R2C2)"); - } - - public static void AreEqual (MatrixFloat3x3 expected, MatrixFloat3x3 actual, float delta, string message) - { - AreEqual (expected.R0C0, actual.R0C0, delta, message + " (R0C0)"); - AreEqual (expected.R1C0, actual.R1C0, delta, message + " (R1C0)"); - AreEqual (expected.R2C0, actual.R2C0, delta, message + " (R2C0)"); - AreEqual (expected.R0C1, actual.R0C1, delta, message + " (R0C1)"); - AreEqual (expected.R1C1, actual.R1C1, delta, message + " (R1C1)"); - AreEqual (expected.R2C1, actual.R2C1, delta, message + " (R2C1)"); - AreEqual (expected.R0C2, actual.R0C2, delta, message + " (R0C2)"); - AreEqual (expected.R1C2, actual.R1C2, delta, message + " (R1C2)"); - AreEqual (expected.R2C2, actual.R2C2, delta, message + " (R2C2)"); - } - - public static void AreEqual (Matrix3 expected, MatrixFloat3x3 actual, string message) - { - AreEqual (expected.R0C0, actual.R0C0, message + " (R0C0)"); - AreEqual (expected.R0C1, actual.R0C1, message + " (R0C1)"); - AreEqual (expected.R0C2, actual.R0C2, message + " (R0C2)"); - AreEqual (expected.R1C0, actual.R1C0, message + " (R1C0)"); - AreEqual (expected.R1C1, actual.R1C1, message + " (R1C1)"); - AreEqual (expected.R1C2, actual.R1C2, message + " (R1C2)"); - AreEqual (expected.R2C0, actual.R2C0, message + " (R2C0)"); - AreEqual (expected.R2C1, actual.R2C1, message + " (R2C1)"); - AreEqual (expected.R2C2, actual.R2C2, message + " (R2C2)"); - } - - public static void AreEqual (MatrixFloat3x3 expected, Matrix3 actual, string message) - { - AreEqual (expected.R0C0, actual.R0C0, message + " (R0C0)"); - AreEqual (expected.R0C1, actual.R0C1, message + " (R0C1)"); - AreEqual (expected.R0C2, actual.R0C2, message + " (R0C2)"); - AreEqual (expected.R1C0, actual.R1C0, message + " (R1C0)"); - AreEqual (expected.R1C1, actual.R1C1, message + " (R1C1)"); - AreEqual (expected.R1C2, actual.R1C2, message + " (R1C2)"); - AreEqual (expected.R2C0, actual.R2C0, message + " (R2C0)"); - AreEqual (expected.R2C1, actual.R2C1, message + " (R2C1)"); - AreEqual (expected.R2C2, actual.R2C2, message + " (R2C2)"); - } - - public static void AreEqual (MatrixFloat4x4 expected, MatrixFloat4x4 actual, string message) - { - AreEqual (expected.M11, actual.M11, message + " (M11)"); - AreEqual (expected.M21, actual.M21, message + " (M21)"); - AreEqual (expected.M31, actual.M31, message + " (M31)"); - AreEqual (expected.M41, actual.M41, message + " (M41)"); - AreEqual (expected.M12, actual.M12, message + " (M12)"); - AreEqual (expected.M22, actual.M22, message + " (M22)"); - AreEqual (expected.M32, actual.M32, message + " (M32)"); - AreEqual (expected.M42, actual.M42, message + " (M42)"); - AreEqual (expected.M13, actual.M13, message + " (M13)"); - AreEqual (expected.M23, actual.M23, message + " (M23)"); - AreEqual (expected.M33, actual.M33, message + " (M33)"); - AreEqual (expected.M43, actual.M43, message + " (M43)"); - AreEqual (expected.M14, actual.M14, message + " (M14)"); - AreEqual (expected.M24, actual.M24, message + " (M24)"); - AreEqual (expected.M34, actual.M34, message + " (M34)"); - AreEqual (expected.M44, actual.M44, message + " (M44)"); - } - - public static void AreEqual (MatrixFloat4x4 expected, MatrixFloat4x4 actual, float delta, string message) - { - AreEqual (expected.M11, actual.M11, delta, message + " (M11)"); - AreEqual (expected.M21, actual.M21, delta, message + " (M21)"); - AreEqual (expected.M31, actual.M31, delta, message + " (M31)"); - AreEqual (expected.M41, actual.M41, delta, message + " (M41)"); - AreEqual (expected.M12, actual.M12, delta, message + " (M12)"); - AreEqual (expected.M22, actual.M22, delta, message + " (M22)"); - AreEqual (expected.M32, actual.M32, delta, message + " (M32)"); - AreEqual (expected.M42, actual.M42, delta, message + " (M42)"); - AreEqual (expected.M13, actual.M13, delta, message + " (M13)"); - AreEqual (expected.M23, actual.M23, delta, message + " (M23)"); - AreEqual (expected.M33, actual.M33, delta, message + " (M33)"); - AreEqual (expected.M43, actual.M43, delta, message + " (M43)"); - AreEqual (expected.M14, actual.M14, delta, message + " (M14)"); - AreEqual (expected.M24, actual.M24, delta, message + " (M24)"); - AreEqual (expected.M34, actual.M34, delta, message + " (M34)"); - AreEqual (expected.M44, actual.M44, delta, message + " (M44)"); - } - - public static void AreEqual (Matrix4 expected, MatrixFloat4x4 actual, string message) - { - AreEqual (expected.M11, actual.M11, message + " (M11)"); - AreEqual (expected.M21, actual.M21, message + " (M21)"); - AreEqual (expected.M31, actual.M31, message + " (M31)"); - AreEqual (expected.M41, actual.M41, message + " (M41)"); - AreEqual (expected.M12, actual.M12, message + " (M12)"); - AreEqual (expected.M22, actual.M22, message + " (M22)"); - AreEqual (expected.M32, actual.M32, message + " (M32)"); - AreEqual (expected.M42, actual.M42, message + " (M42)"); - AreEqual (expected.M13, actual.M13, message + " (M13)"); - AreEqual (expected.M23, actual.M23, message + " (M23)"); - AreEqual (expected.M33, actual.M33, message + " (M33)"); - AreEqual (expected.M43, actual.M43, message + " (M43)"); - AreEqual (expected.M14, actual.M14, message + " (M14)"); - AreEqual (expected.M24, actual.M24, message + " (M24)"); - AreEqual (expected.M34, actual.M34, message + " (M34)"); - AreEqual (expected.M44, actual.M44, message + " (M44)"); - } - - public static void AreEqual (Matrix4 expected, MatrixFloat4x4 actual, float delta, string message) - { - AreEqual (expected.M11, actual.M11, delta, message + " (M11)"); - AreEqual (expected.M21, actual.M21, delta, message + " (M21)"); - AreEqual (expected.M31, actual.M31, delta, message + " (M31)"); - AreEqual (expected.M41, actual.M41, delta, message + " (M41)"); - AreEqual (expected.M12, actual.M12, delta, message + " (M12)"); - AreEqual (expected.M22, actual.M22, delta, message + " (M22)"); - AreEqual (expected.M32, actual.M32, delta, message + " (M32)"); - AreEqual (expected.M42, actual.M42, delta, message + " (M42)"); - AreEqual (expected.M13, actual.M13, delta, message + " (M13)"); - AreEqual (expected.M23, actual.M23, delta, message + " (M23)"); - AreEqual (expected.M33, actual.M33, delta, message + " (M33)"); - AreEqual (expected.M43, actual.M43, delta, message + " (M43)"); - AreEqual (expected.M14, actual.M14, delta, message + " (M14)"); - AreEqual (expected.M24, actual.M24, delta, message + " (M24)"); - AreEqual (expected.M34, actual.M34, delta, message + " (M34)"); - AreEqual (expected.M44, actual.M44, delta, message + " (M44)"); - } - - public static void AreEqual (MatrixFloat4x4 expected, Matrix4 actual, string message) - { - AreEqual (expected.M11, actual.M11, message + " (M11)"); - AreEqual (expected.M21, actual.M21, message + " (M21)"); - AreEqual (expected.M31, actual.M31, message + " (M31)"); - AreEqual (expected.M41, actual.M41, message + " (M41)"); - AreEqual (expected.M12, actual.M12, message + " (M12)"); - AreEqual (expected.M22, actual.M22, message + " (M22)"); - AreEqual (expected.M32, actual.M32, message + " (M32)"); - AreEqual (expected.M42, actual.M42, message + " (M42)"); - AreEqual (expected.M13, actual.M13, message + " (M13)"); - AreEqual (expected.M23, actual.M23, message + " (M23)"); - AreEqual (expected.M33, actual.M33, message + " (M33)"); - AreEqual (expected.M43, actual.M43, message + " (M43)"); - AreEqual (expected.M14, actual.M14, message + " (M14)"); - AreEqual (expected.M24, actual.M24, message + " (M24)"); - AreEqual (expected.M34, actual.M34, message + " (M34)"); - AreEqual (expected.M44, actual.M44, message + " (M44)"); - } - -#region Double Based Types - public static void AreEqual (double expected, double actual, string message) - { - Assert.AreEqual (expected, actual, message + " (M)"); - } - - public static void AreEqual (double expected, double actual, double delta, string message) - { - Assert.AreEqual (expected, actual, delta, message); - } - - public static void AreEqual (Vector2d expected, Vector2d actual, string message) - { - Assert.AreEqual (expected.X, actual.X, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, message + " (Y)"); - } - - public static void AreEqual (Vector3d expected, Vector3d actual, string message) - { - Assert.AreEqual (expected.X, actual.X, 0.001, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, 0.001, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, 0.001, message + " (Z)"); - } - - public static void AreEqual (Vector3d expected, Vector3d actual, double delta, string message) - { - Assert.AreEqual (expected.X, actual.X, delta, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, delta, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, delta, message + " (Z)"); - } - - public static void AreEqual (Vector3d expected, VectorDouble3 actual, string message) - { - Assert.AreEqual (expected.X, actual.X, 0.001, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, 0.001, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, 0.001, message + " (Z)"); - } - - public static void AreEqual (VectorDouble3 expected, Vector3d actual, string message) - { - Assert.AreEqual (expected.X, actual.X, 0.001, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, 0.001, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, 0.001, message + " (Z)"); - } - - public static void AreEqual (VectorDouble3 expected, VectorDouble3 actual, string message) - { - Assert.AreEqual (expected.X, actual.X, 0.001, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, 0.001, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, 0.001, message + " (Z)"); - } - - public static void AreEqual (VectorDouble3 expected, VectorDouble3 actual, double delta, string message) - { - Assert.AreEqual (expected.X, actual.X, delta, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, delta, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, delta, message + " (Z)"); - } - - public static void AreEqual (Vector4d expected, Vector4d actual, string message) - { - Assert.AreEqual (expected.X, actual.X, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, message + " (Z)"); - Assert.AreEqual (expected.W, actual.W, message + " (W)"); - } - - public static void AreEqual (Vector4d expected, Vector4d actual, double delta, string message) - { - Assert.AreEqual (expected.X, actual.X, delta, message + " (X)"); - Assert.AreEqual (expected.Y, actual.Y, delta, message + " (Y)"); - Assert.AreEqual (expected.Z, actual.Z, delta, message + " (Z)"); - Assert.AreEqual (expected.W, actual.W, delta, message + " (W)"); - } - - public static void AreEqual (Matrix4d expected, Matrix4d actual, string message) - { - AreEqual (expected.Column0, actual.Column0, message + " (Col0)"); - AreEqual (expected.Column1, actual.Column1, message + " (Col1)"); - AreEqual (expected.Column2, actual.Column2, message + " (Col2)"); - AreEqual (expected.Column3, actual.Column3, message + " (Col3)"); - } - - public static void AreEqual (Matrix4d expected, Matrix4d actual, double delta, string message) - { - AreEqual (expected.Column0, actual.Column0, delta, message + " (Col0)"); - AreEqual (expected.Column1, actual.Column1, delta, message + " (Col1)"); - AreEqual (expected.Column2, actual.Column2, delta, message + " (Col2)"); - AreEqual (expected.Column3, actual.Column3, delta, message + " (Col3)"); - } - - public static void AreEqual (MatrixDouble4x4 expected, MatrixDouble4x4 actual, string message) - { - AreEqual (expected.M11, actual.M11, message + " (M11)"); - AreEqual (expected.M21, actual.M21, message + " (M21)"); - AreEqual (expected.M31, actual.M31, message + " (M31)"); - AreEqual (expected.M41, actual.M41, message + " (M41)"); - AreEqual (expected.M12, actual.M12, message + " (M12)"); - AreEqual (expected.M22, actual.M22, message + " (M22)"); - AreEqual (expected.M32, actual.M32, message + " (M32)"); - AreEqual (expected.M42, actual.M42, message + " (M42)"); - AreEqual (expected.M13, actual.M13, message + " (M13)"); - AreEqual (expected.M23, actual.M23, message + " (M23)"); - AreEqual (expected.M33, actual.M33, message + " (M33)"); - AreEqual (expected.M43, actual.M43, message + " (M43)"); - AreEqual (expected.M14, actual.M14, message + " (M14)"); - AreEqual (expected.M24, actual.M24, message + " (M24)"); - AreEqual (expected.M34, actual.M34, message + " (M34)"); - AreEqual (expected.M44, actual.M44, message + " (M44)"); - } - - public static void AreEqual (MatrixDouble4x4 expected, MatrixDouble4x4 actual, double delta, string message) - { - AreEqual (expected.M11, actual.M11, delta, message + " (M11)"); - AreEqual (expected.M21, actual.M21, delta, message + " (M21)"); - AreEqual (expected.M31, actual.M31, delta, message + " (M31)"); - AreEqual (expected.M41, actual.M41, delta, message + " (M41)"); - AreEqual (expected.M12, actual.M12, delta, message + " (M12)"); - AreEqual (expected.M22, actual.M22, delta, message + " (M22)"); - AreEqual (expected.M32, actual.M32, delta, message + " (M32)"); - AreEqual (expected.M42, actual.M42, delta, message + " (M42)"); - AreEqual (expected.M13, actual.M13, delta, message + " (M13)"); - AreEqual (expected.M23, actual.M23, delta, message + " (M23)"); - AreEqual (expected.M33, actual.M33, delta, message + " (M33)"); - AreEqual (expected.M43, actual.M43, delta, message + " (M43)"); - AreEqual (expected.M14, actual.M14, delta, message + " (M14)"); - AreEqual (expected.M24, actual.M24, delta, message + " (M24)"); - AreEqual (expected.M34, actual.M34, delta, message + " (M34)"); - AreEqual (expected.M44, actual.M44, delta, message + " (M44)"); - } - - public static void AreEqual (Matrix4d expected, MatrixDouble4x4 actual, string message) - { - AreEqual (expected.M11, actual.M11, message + " (M11)"); - AreEqual (expected.M21, actual.M21, message + " (M21)"); - AreEqual (expected.M31, actual.M31, message + " (M31)"); - AreEqual (expected.M41, actual.M41, message + " (M41)"); - AreEqual (expected.M12, actual.M12, message + " (M12)"); - AreEqual (expected.M22, actual.M22, message + " (M22)"); - AreEqual (expected.M32, actual.M32, message + " (M32)"); - AreEqual (expected.M42, actual.M42, message + " (M42)"); - AreEqual (expected.M13, actual.M13, message + " (M13)"); - AreEqual (expected.M23, actual.M23, message + " (M23)"); - AreEqual (expected.M33, actual.M33, message + " (M33)"); - AreEqual (expected.M43, actual.M43, message + " (M43)"); - AreEqual (expected.M14, actual.M14, message + " (M14)"); - AreEqual (expected.M24, actual.M24, message + " (M24)"); - AreEqual (expected.M34, actual.M34, message + " (M34)"); - AreEqual (expected.M44, actual.M44, message + " (M44)"); - } - - public static void AreEqual (Matrix4d expected, NMatrix4d actual, double delta, string message) - { - AreEqual (expected.M11, actual.M11, delta, message + " (M11)"); - AreEqual (expected.M21, actual.M21, delta, message + " (M21)"); - AreEqual (expected.M31, actual.M31, delta, message + " (M31)"); - AreEqual (expected.M41, actual.M41, delta, message + " (M41)"); - AreEqual (expected.M12, actual.M12, delta, message + " (M12)"); - AreEqual (expected.M22, actual.M22, delta, message + " (M22)"); - AreEqual (expected.M32, actual.M32, delta, message + " (M32)"); - AreEqual (expected.M42, actual.M42, delta, message + " (M42)"); - AreEqual (expected.M13, actual.M13, delta, message + " (M13)"); - AreEqual (expected.M23, actual.M23, delta, message + " (M23)"); - AreEqual (expected.M33, actual.M33, delta, message + " (M33)"); - AreEqual (expected.M43, actual.M43, delta, message + " (M43)"); - AreEqual (expected.M14, actual.M14, delta, message + " (M14)"); - AreEqual (expected.M24, actual.M24, delta, message + " (M24)"); - AreEqual (expected.M34, actual.M34, delta, message + " (M34)"); - AreEqual (expected.M44, actual.M44, delta, message + " (M44)"); - } - - public static void AreEqual (NMatrix4x3 expected, NMatrix4x3 actual, float delta, string message) - { - AreEqual (expected.M11, actual.M11, delta, message + " (M11)"); - AreEqual (expected.M21, actual.M21, delta, message + " (M21)"); - AreEqual (expected.M31, actual.M31, delta, message + " (M31)"); - AreEqual (expected.M12, actual.M12, delta, message + " (M12)"); - AreEqual (expected.M22, actual.M22, delta, message + " (M22)"); - AreEqual (expected.M32, actual.M32, delta, message + " (M32)"); - AreEqual (expected.M13, actual.M13, delta, message + " (M13)"); - AreEqual (expected.M23, actual.M23, delta, message + " (M23)"); - AreEqual (expected.M33, actual.M33, delta, message + " (M33)"); - AreEqual (expected.M14, actual.M14, delta, message + " (M14)"); - AreEqual (expected.M24, actual.M24, delta, message + " (M24)"); - AreEqual (expected.M34, actual.M34, delta, message + " (M34)"); - } - - public static void AreEqual (NMatrix4d expected, Matrix4d actual, string message) - { - AreEqual (expected.M11, actual.M11, message + " (M11)"); - AreEqual (expected.M21, actual.M21, message + " (M21)"); - AreEqual (expected.M31, actual.M31, message + " (M31)"); - AreEqual (expected.M41, actual.M41, message + " (M41)"); - AreEqual (expected.M12, actual.M12, message + " (M12)"); - AreEqual (expected.M22, actual.M22, message + " (M22)"); - AreEqual (expected.M32, actual.M32, message + " (M32)"); - AreEqual (expected.M42, actual.M42, message + " (M42)"); - AreEqual (expected.M13, actual.M13, message + " (M13)"); - AreEqual (expected.M23, actual.M23, message + " (M23)"); - AreEqual (expected.M33, actual.M33, message + " (M33)"); - AreEqual (expected.M43, actual.M43, message + " (M43)"); - AreEqual (expected.M14, actual.M14, message + " (M14)"); - AreEqual (expected.M24, actual.M24, message + " (M24)"); - AreEqual (expected.M34, actual.M34, message + " (M34)"); - AreEqual (expected.M44, actual.M44, message + " (M44)"); - } - - public static void AreEqual (NMatrix4x3 expected, NMatrix4x3 actual, string message) - { - AreEqual (expected.M11, actual.M11, message + " (M11)"); - AreEqual (expected.M21, actual.M21, message + " (M21)"); - AreEqual (expected.M31, actual.M31, message + " (M31)"); - AreEqual (expected.M12, actual.M12, message + " (M12)"); - AreEqual (expected.M22, actual.M22, message + " (M22)"); - AreEqual (expected.M32, actual.M32, message + " (M32)"); - AreEqual (expected.M13, actual.M13, message + " (M13)"); - AreEqual (expected.M23, actual.M23, message + " (M23)"); - AreEqual (expected.M33, actual.M33, message + " (M33)"); - AreEqual (expected.M14, actual.M14, message + " (M14)"); - AreEqual (expected.M24, actual.M24, message + " (M24)"); - AreEqual (expected.M34, actual.M34, message + " (M34)"); - } -#endregion } diff --git a/tests/monotouch-test/AudioToolbox/AudioComponentTest.cs b/tests/monotouch-test/AudioToolbox/AudioComponentTest.cs deleted file mode 100644 index 059151eabc5..00000000000 --- a/tests/monotouch-test/AudioToolbox/AudioComponentTest.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2011 Xamarin Inc. All rights reserved - -#if IOS || MONOMAC -using System; -using System.Drawing; -using System.IO; -using System.Collections.Generic; -#if XAMCORE_2_0 -using Foundation; -using AudioToolbox; -using AudioUnit; -using CoreFoundation; -#else -using MonoTouch.Foundation; -using MonoTouch.MediaPlayer; -using MonoTouch.AudioToolbox; -using MonoTouch.CoreFoundation; -#endif -using NUnit.Framework; - -namespace MonoTouchFixtures.AudioToolbox { - - [TestFixture] - [Preserve (AllMembers = true)] - public class AudioComponentTest { - - [Test] - public void GetSetComponentList () - { - TestRuntime.AssertXcodeVersion (9, 0); - var types = new List { AudioTypeOutput.Generic, AudioTypeOutput.Remote, AudioTypeOutput.VoiceProcessingIO }; - foreach (var t in types) { - var resources = new ResourceUsageInfo (); - resources.IOKitUserClient = new string[] { "CustomUserClient1" }; - resources.MachLookUpGlobalName = new string[] { "MachServiceName1" }; - resources.NetworkClient = false; - resources.TemporaryExceptionReadWrite = false; - - var componentInfo = new AudioComponentInfo (); - componentInfo.Type = t.ToString (); - componentInfo.Subtype = "XMPL"; - componentInfo.Name = "XMPL"; - componentInfo.Version = 1; - componentInfo.ResourceUsage = resources; - var component = AudioComponent.FindComponent (t); - if (component == null) - continue; - var l = component.ComponentList; - Assert.IsNull (l, "List is not null."); - l = new AudioComponentInfo[] { componentInfo }; - //monotouchtests does not have permissions to deal with the hwd. - Assert.Throws (() => component.ComponentList = l); - } - } - - [Test] - public void GetSetNullComponentList () - { - TestRuntime.AssertXcodeVersion (9, 0); - var types = new List { AudioTypeOutput.Generic, AudioTypeOutput.Remote, AudioTypeOutput.VoiceProcessingIO }; - foreach (var t in types) { - var resources = new ResourceUsageInfo (); - resources.IOKitUserClient = new string[] { "CustomUserClient1" }; - resources.MachLookUpGlobalName = new string[] { "MachServiceName1" }; - resources.NetworkClient = false; - resources.TemporaryExceptionReadWrite = false; - - var componentInfo = new AudioComponentInfo (); - componentInfo.Type = t.ToString (); - componentInfo.Subtype = "XMPL"; - componentInfo.Name = "XMPL"; - componentInfo.Version = 1; - componentInfo.ResourceUsage = resources; - var component = AudioComponent.FindComponent (t); - if (component == null) - continue; - //monotouchtests does not have permissions to deal with the hwd. - Assert.Throws (() => component.ComponentList = null); - } - } - - // test the diff properties of the ResourceUsageInfo since it was manually done - - [Test] - public void TestResourceUsageInfoIOKitUserClient () - { - TestRuntime.AssertXcodeVersion (9, 0); - var clientId = "CustomUserClient1"; - var resources = new ResourceUsageInfo (); - resources.IOKitUserClient = new string[] { clientId }; - var userClientList = resources.IOKitUserClient; - Assert.IsNotNull (userClientList); - Assert.AreEqual (1, userClientList.Length, "List does not have all client ids."); - Assert.AreEqual (clientId, userClientList [0], "Client ids are not the same."); - - // similar test but with null values. - - resources.IOKitUserClient = null; - Assert.IsNull (resources.IOKitUserClient, "Value was not set to null."); - } - - [Test] - public void TestResourceUsageInfoMachLookUpGlobalName () - { - TestRuntime.AssertXcodeVersion (9, 0); - var serviceName = "MachServiceName1"; - var resources = new ResourceUsageInfo (); - resources.MachLookUpGlobalName = new string[] { serviceName }; - var serviceNames = resources.MachLookUpGlobalName; - Assert.NotNull (serviceNames, "Returned list is null"); - Assert.AreEqual (1, serviceNames.Length, "List does not have all service names."); - Assert.AreEqual (serviceName, serviceNames [0], "Service names are not equal."); - - // similar test but with null values - - resources.MachLookUpGlobalName = null; - Assert.IsNull (resources.MachLookUpGlobalName, "Value was no set to null."); - } - } -} - -#endif \ No newline at end of file diff --git a/tests/monotouch-test/CoreData/NSQueryGenerationTokenTest.cs b/tests/monotouch-test/CoreData/NSQueryGenerationTokenTest.cs deleted file mode 100644 index 653a3acde0c..00000000000 --- a/tests/monotouch-test/CoreData/NSQueryGenerationTokenTest.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -#if XAMCORE_2_0 -using CoreData; -using Foundation; -#else -using MonoTouch.CoreData; -using MonoTouch.Foundation; -#endif -using NUnit.Framework; - -namespace MonoTouchFixtures.CoreData -{ - [TestFixture] - [Preserve (AllMembers = true)] - public class NSQueryGenerationTokenTest - { - [Test] - public void EncodeWithCoderTest () - { - // Added test to ensure we do support NSCoding even when introspection fails. - if (TestRuntime.CheckXcodeVersion (9, 0)) { - using (var data = new NSMutableData ()) - using (var archiver = new NSKeyedArchiver (data)) - using (var coder = new NSCoder ()) { - NSQueryGenerationToken.CurrentToken.EncodeTo (archiver); - } - } else { - Assert.Ignore ("NSCoding is not supported prior Xcode 9."); - } - } - } -} diff --git a/tests/monotouch-test/CoreImage/xamarinmonkey.heic b/tests/monotouch-test/CoreImage/xamarinmonkey.heic deleted file mode 100644 index 700986b6469..00000000000 Binary files a/tests/monotouch-test/CoreImage/xamarinmonkey.heic and /dev/null differ diff --git a/tests/monotouch-test/CoreML/MLMultiArrayTest.cs b/tests/monotouch-test/CoreML/MLMultiArrayTest.cs deleted file mode 100644 index 52c63a92bbc..00000000000 --- a/tests/monotouch-test/CoreML/MLMultiArrayTest.cs +++ /dev/null @@ -1,143 +0,0 @@ -// -// Unit tests for MLMultiArrayConstraint -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright 2017 Microsoft Inc. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using System.Runtime.InteropServices; - -using Foundation; -using CoreML; -using ObjCRuntime; - -using NUnit.Framework; - -namespace MonoTouchFixtures.CoreML -{ - - [TestFixture] - [Preserve (AllMembers = true)] - public class MLMultiArrayTest - { - [Test] - public void Ctors () - { - TestRuntime.AssertXcodeVersion (9, 0); - - NSError err; - var shape = new nint [] { 1 }; - var strides = new nint [] { 0 }; - var nsshape = new NSNumber [] { NSNumber.FromNInt (1) }; - var nsstrides = new NSNumber [] { NSNumber.FromNInt (0) }; - - using (var arr = new MLMultiArray (shape, MLMultiArrayDataType.Int32, out err)) { - Assert.AreEqual (shape, arr.Shape, "1 Shape"); - Assert.AreEqual (MLMultiArrayDataType.Int32, arr.DataType, "1 DataType"); - Assert.IsNull (err, "1 err"); - } - - using (var arr = new MLMultiArray (IntPtr.Zero, shape, MLMultiArrayDataType.Float32, strides, (v) => Marshal.FreeHGlobal (v), out err)) { - Assert.AreEqual (shape, arr.Shape, "2 Shape"); - Assert.AreEqual (MLMultiArrayDataType.Float32, arr.DataType, "2 DataType"); - Assert.AreEqual (strides, arr.Strides, "2 Strides"); - Assert.IsNull (err, "2 err"); - } - - using (var arr = new MLMultiArray (IntPtr.Zero, nsshape, MLMultiArrayDataType.Double, nsstrides, (v) => Marshal.FreeHGlobal (v), out err)) { - Assert.AreEqual (shape, arr.Shape, "3 Shape"); - Assert.AreEqual (MLMultiArrayDataType.Double, arr.DataType, "3 DataType"); - Assert.AreEqual (strides, arr.Strides, "3 Strides"); - Assert.AreEqual (IntPtr.Zero, arr.DataPointer, "3 DataPointer"); - Assert.IsNull (err, "3 err"); - } - - using (var arr = new MLMultiArray (nsshape, MLMultiArrayDataType.Int32, out err)) { - Assert.AreEqual (shape, arr.Shape, "4 Shape"); - Assert.AreEqual (MLMultiArrayDataType.Int32, arr.DataType, "4 DataType"); - Assert.IsNull (err, "4 err"); - } - } - - [Test] - public void Indexers () - { - TestRuntime.AssertXcodeVersion (9, 0); - - NSError err; - var shape = new nint [] { 10 }; - using (var arr = new MLMultiArray (shape, MLMultiArrayDataType.Int32, out err)) { - Assert.IsNull (err, "err"); - Assert.AreEqual (10, arr.Count, "Count"); - Assert.AreEqual (new nint [] { 10 }, arr.Shape, "Shape"); - Assert.AreEqual (new nint [] { 1 }, arr.Strides, "Strides"); - - arr [0] = 0; // MLMultiArray's elements aren't zero-initialized - Assert.AreEqual (0, arr [0].Int32Value, "a"); - Assert.AreEqual (0, arr [new nint [] { 0 }].Int32Value, "b"); - Assert.AreEqual (0, arr [new NSNumber [] { NSNumber.FromNInt (0) }].Int32Value, "c nint"); - Assert.AreEqual (0, arr [new NSNumber [] { NSNumber.FromInt32 (0) }].Int32Value, "c int32"); - Assert.AreEqual (0, arr [new NSNumber [] { NSNumber.FromByte (0) }].Int32Value, "c byte"); - Assert.AreEqual (0, arr [new NSNumber [] { NSNumber.FromFloat (0) }].Int32Value, "c float"); - - Assert.AreEqual (0, arr.GetObject (0).Int32Value, "GetObject a"); - Assert.AreEqual (0, arr.GetObject (new nint [] { 0 }).Int32Value, "GetObject b"); - Assert.AreEqual (0, arr.GetObject (new NSNumber [] { NSNumber.FromNInt (0) }).Int32Value, "GetObject c nint"); - Assert.AreEqual (0, arr.GetObject (new NSNumber [] { NSNumber.FromInt32 (0) }).Int32Value, "GetObject c int32"); - Assert.AreEqual (0, arr.GetObject (new NSNumber [] { NSNumber.FromByte (0) }).Int32Value, "GetObject c byte"); - Assert.AreEqual (0, arr.GetObject (new NSNumber [] { NSNumber.FromFloat (0) }).Int32Value, "GetObject c float"); - - arr [1] = NSNumber.FromInt32 (1); - arr [new nint [] { 2 }] = NSNumber.FromInt32 (2); - arr [new NSNumber [] { NSNumber.FromUInt16 (3) }] = NSNumber.FromInt32 (3); - arr.SetObject (NSNumber.FromInt32 (4), 4); - arr.SetObject (NSNumber.FromInt32 (5), new nint [] { 5 }); - arr.SetObject (NSNumber.FromInt32 (6), new NSNumber [] { NSNumber.FromSByte (6) }); - - Assert.AreEqual (1, arr [1].Int32Value, "1"); - Assert.AreEqual (2, arr [2].Int32Value, "2"); - Assert.AreEqual (3, arr [3].Int32Value, "3"); - Assert.AreEqual (4, arr [4].Int32Value, "4"); - Assert.AreEqual (5, arr [5].Int32Value, "5"); - Assert.AreEqual (6, arr [6].Int32Value, "6"); - } - - // multi-dimensional - shape = new nint [] { 7, 7, 7 }; - using (var arr = new MLMultiArray (shape, MLMultiArrayDataType.Int32, out err)) { - Assert.IsNull (err, "err"); - Assert.AreEqual (shape [0] * shape [1] * shape [2], arr.Count, "Count"); - - arr [0, 0, 0] = 0; // MLMultiArray's elements aren't zero-initialized - Assert.AreEqual (0, arr [0, 0, 0].Int32Value, "a"); - Assert.AreEqual (0, arr [new nint [] { 0, 0, 0 }].Int32Value, "b"); - Assert.AreEqual (0, arr [new NSNumber [] { NSNumber.FromNInt (0), NSNumber.FromNInt (0), NSNumber.FromNInt (0) }].Int32Value, "c nint"); - - Assert.AreEqual (0, arr.GetObject (0, 0, 0).Int32Value, "GetObject a"); - Assert.AreEqual (0, arr.GetObject (new nint [] { 0, 0, 0 }).Int32Value, "GetObject b"); - Assert.AreEqual (0, arr.GetObject (new NSNumber [] { NSNumber.FromNInt (0), NSNumber.FromNInt (0), NSNumber.FromNInt (0) }).Int32Value, "GetObject c nint"); - - arr [1, 1, 1] = NSNumber.FromInt32 (1); - arr [new nint [] { 2, 2, 2 }] = NSNumber.FromInt32 (2); - arr [new NSNumber [] { NSNumber.FromUInt16 (3), NSNumber.FromUInt16 (3), NSNumber.FromUInt16 (3) }] = NSNumber.FromInt32 (3); - arr.SetObject (NSNumber.FromInt32 (4), 4, 4, 4); - arr.SetObject (NSNumber.FromInt32 (5), new nint [] { 5, 5, 5 }); - arr.SetObject (NSNumber.FromInt32 (6), new NSNumber [] { NSNumber.FromSByte (6), NSNumber.FromSByte (6), NSNumber.FromSByte (6) }); - - Assert.AreEqual (1, arr [1, 1, 1].Int32Value, "1"); - Assert.AreEqual (2, arr [2, 2, 2].Int32Value, "2"); - Assert.AreEqual (3, arr [3, 3, 3].Int32Value, "3"); - Assert.AreEqual (4, arr [4, 4, 4].Int32Value, "4"); - Assert.AreEqual (5, arr [5, 5, 5].Int32Value, "5"); - Assert.AreEqual (6, arr [6, 6, 6].Int32Value, "6"); - } - } - } -} - -#endif // !XAMCORE_2_0 diff --git a/tests/monotouch-test/CoreText/FontDescriptorTest.cs b/tests/monotouch-test/CoreText/FontDescriptorTest.cs index 4b0bc7293f1..315aae54d43 100644 --- a/tests/monotouch-test/CoreText/FontDescriptorTest.cs +++ b/tests/monotouch-test/CoreText/FontDescriptorTest.cs @@ -62,7 +62,6 @@ public void FromAttributes () } } -#if !__TVOS__ // https://bugzilla.xamarin.com/show_bug.cgi?id=58929 [Test] public void WithFeature () { @@ -90,7 +89,6 @@ public void WithFeature () Assert.That (set_feature.FeatureWeak, Is.EqualTo ((int)CTFontFeatureLigatures.Selector.RareLigaturesOn), "#2"); } } -#endif // !__TVOS__ } } diff --git a/tests/monotouch-test/EventKit/AlarmTest.cs b/tests/monotouch-test/EventKit/AlarmTest.cs index 9ebbcc3b96b..79a8311418e 100644 --- a/tests/monotouch-test/EventKit/AlarmTest.cs +++ b/tests/monotouch-test/EventKit/AlarmTest.cs @@ -33,7 +33,7 @@ public class AlarmTest { [Test] public void NullAllowedTest () { - using (var alarm = EKAlarm.FromTimeInterval (1234)) { + using (var alarm = new EKAlarm ()) { alarm.AbsoluteDate = null; alarm.StructuredLocation = null; } diff --git a/tests/monotouch-test/EventKit/CalendarItemTest.cs b/tests/monotouch-test/EventKit/CalendarItemTest.cs new file mode 100644 index 00000000000..19cb09f09f1 --- /dev/null +++ b/tests/monotouch-test/EventKit/CalendarItemTest.cs @@ -0,0 +1,43 @@ +// +// Unit tests for EKCalendarItem +// +// Authors: +// Rolf Bjarne Kvinge +// +// Copyright 2013 Xamarin Inc. All rights reserved. +// + +#if !__TVOS__ + +using System; +#if XAMCORE_2_0 +using Foundation; +using CoreGraphics; +using EventKit; +using ObjCRuntime; +#else +using MonoTouch.CoreGraphics; +using MonoTouch.EventKit; +using MonoTouch.Foundation; +using MonoTouch.ObjCRuntime; +using MonoTouch.UIKit; +#endif +using NUnit.Framework; + +namespace MonoTouchFixtures.EventKit { + + [TestFixture] + [Preserve (AllMembers = true)] + public class CalendarItemTest { + + [Test] + public void NullAllowedTest () + { + using (var item = new EKCalendarItem ()) { + item.Notes = null; + } + } + } +} + +#endif // !__TVOS__ diff --git a/tests/monotouch-test/EventKit/EKUIBundleTest.cs b/tests/monotouch-test/EventKit/EKUIBundleTest.cs deleted file mode 100644 index 15dcadef57d..00000000000 --- a/tests/monotouch-test/EventKit/EKUIBundleTest.cs +++ /dev/null @@ -1,34 +0,0 @@ -// -// Unit tests for EKUIBundle -// -// Authors: -// Alex Soto -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && !__TVOS__ && !__WATCHOS__ - -using System; -using EventKitUI; -using Foundation; -using NUnit.Framework; - -namespace MonoTouchFixtures.EventKitUI { - [TestFixture] - [Preserve (AllMembers = true)] - public class EKUIBundleTest { - - [Test] - public void BundleTest () - { - if (!TestRuntime.CheckXcodeVersion (9, 0)) - Assert.Ignore ("Ignoring tests: Requires iOS11+"); - - var bundle = EKUIBundle.UIBundle; - Assert.NotNull (bundle, "Was Null"); - Assert.AreEqual ("com.apple.eventkitui", bundle.BundleIdentifier, "BundleIdentifier"); - } - } -} -#endif diff --git a/tests/monotouch-test/FileProvider/NSFileProviderPageTest.cs b/tests/monotouch-test/FileProvider/NSFileProviderPageTest.cs deleted file mode 100644 index 7e0af258048..00000000000 --- a/tests/monotouch-test/FileProvider/NSFileProviderPageTest.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -// Unit tests for NSFileProviderPage -// -// Authors: -// Alex Soto -// -// -// Copyright 2017 Xamarin Inc. All rights reserved. -// - -#if XAMCORE_2_0 && __IOS__ - -using System; -using FileProvider; -using Foundation; -using NUnit.Framework; - -namespace MonoTouchFixtures.FileProvider { - - [TestFixture] - [Preserve (AllMembers = true)] - public class NSFileProviderPageTests { - - [Test] - public void CompressionSessionCreateTest () - { - // The FileProvider's NSData constants are only available running on device. - TestRuntime.AssertDevice (); - TestRuntime.AssertXcodeVersion (9,0); - - Assert.IsNotNull (NSFileProviderPage.InitialPageSortedByDate, "InitialPageSortedByDate should not be null"); - Assert.IsNotNull (NSFileProviderPage.InitialPageSortedByName, "InitialPageSortedByName should not be null"); - } - } -} -#endif diff --git a/tests/monotouch-test/Foundation/BundleTest.cs b/tests/monotouch-test/Foundation/BundleTest.cs index 38efbfab9a5..5c377e1dc4c 100644 --- a/tests/monotouch-test/Foundation/BundleTest.cs +++ b/tests/monotouch-test/Foundation/BundleTest.cs @@ -82,7 +82,6 @@ public void LocalizedString4 () // http://developer.apple.com/library/ios/#documentation/uikit/reference/NSBundle_UIKitAdditions/Introduction/Introduction.html -#if false // Disabling for now due to Xcode 9 does not support nibs if deployment target == 6.0 #if !__WATCHOS__ [Test] public void LoadNibWithOptions () @@ -95,7 +94,6 @@ public void LoadNibWithOptions () #endif } #endif // !__WATCHOS__ -#endif #if false // some selectors are only in AppKit but we included them in MonoTouch (and this match Apple documentation) diff --git a/tests/monotouch-test/Foundation/CalendarTest.cs b/tests/monotouch-test/Foundation/CalendarTest.cs index 9426046ac29..108ffc54373 100644 --- a/tests/monotouch-test/Foundation/CalendarTest.cs +++ b/tests/monotouch-test/Foundation/CalendarTest.cs @@ -338,10 +338,9 @@ public void TestEnumerateDates () NSDateComponents nextYearComponent = NSCalendar.CurrentCalendar.Components (NSCalendarUnit.Day | NSCalendarUnit.Month | NSCalendarUnit.Year, NSDate.Now); nextYearComponent.Year++; bool delegateHit = false; - NSCalendar.CurrentCalendar.EnumerateDatesStartingAfterDate(NSDate.Now, nextYearComponent, NSCalendarOptions.MatchNextTime, (NSDate d, bool exactMatch, ref bool stop) => + NSCalendar.CurrentCalendar.EnumerateDatesStartingAfterDate(NSDate.Now, nextYearComponent, NSCalendarOptions.MatchNextTime, (NSDate d, bool exactMatch, ref bool s) => { delegateHit = true; - stop = true; }); Assert.IsTrue (delegateHit, "EnumerateDatesStartingAfterDate delegate called"); } diff --git a/tests/monotouch-test/Foundation/UrlSessionTaskTest.cs b/tests/monotouch-test/Foundation/UrlSessionTaskTest.cs index ca276c0c90b..bc0f145a261 100644 --- a/tests/monotouch-test/Foundation/UrlSessionTaskTest.cs +++ b/tests/monotouch-test/Foundation/UrlSessionTaskTest.cs @@ -52,13 +52,6 @@ public void Properties () task.TaskDescription = "descriptive label"; Assert.That ((string)task.TaskDescription, Is.EqualTo ("descriptive label"), "setTaskDescription:"); Assert.That (task.TaskIdentifier, Is.GreaterThanOrEqualTo (0), "taskIdentifier"); - - if (TestRuntime.CheckXcodeVersion (9, 0)) { - Assert.Null (task.EarliestBeginDate, "earliestBeginDate"); - Assert.That (task.CountOfBytesClientExpectsToSend, Is.EqualTo (-1), "countOfBytesClientExpectsToSend"); - Assert.That (task.CountOfBytesClientExpectsToReceive, Is.EqualTo (-1), "countOfBytesClientExpectsToReceive"); - Assert.NotNull (task.Progress, "progress"); - } } } diff --git a/tests/monotouch-test/GameplayKit/GKAgent3DTest.cs b/tests/monotouch-test/GameplayKit/GKAgent3DTest.cs deleted file mode 100644 index e20b39d8e22..00000000000 --- a/tests/monotouch-test/GameplayKit/GKAgent3DTest.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Unit tests for GKAgent3D -// -// Authors: -// Rolf Bjarne Kvinge -// -// -// Copyright 2017 Microsoft Inc. All rights reserved. -// - -#if !__WATCHOS__ - -using System; -using OpenTK; - -#if XAMCORE_2_0 -using Foundation; -using GameplayKit; -#else -using MonoTouch.Foundation; -using MonoTouch.GameplayKit; -#endif - -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; -using VectorFloat3 = global::OpenTK.NVector3; - -using Bindings.Test; -using NUnit.Framework; - -namespace MonoTouchFixtures.GamePlayKit -{ - [TestFixture] - [Preserve (AllMembers = true)] - public class GKAgent3DTest - { - [Test] - public void RotationTest () - { - using (var obj = new GKAgent3D ()) { - var initial = new Matrix3 (0, 0, 1, - 0, 1, 0, - 1, 0, 0); - Asserts.AreEqual (initial, obj.Rotation, "Rotation"); - Asserts.AreEqual ((MatrixFloat3x3) initial, obj.Rotation3x3, "Rotation3x3"); - - var mat = new Matrix3 (1, 2, 3, - 4, 5, 6, - 7, 8, 9); - var mat3x3 = (MatrixFloat3x3) mat; - - obj.Rotation = mat; - Asserts.AreEqual (mat, obj.Rotation, "Rotation after setter"); - var transposed3x3 = MatrixFloat3x3.Transpose ((MatrixFloat3x3) mat); - Asserts.AreEqual (transposed3x3, obj.Rotation3x3, "Rotation3x3 after setter"); - Asserts.AreEqual (transposed3x3, CFunctions.GetMatrixFloat3x3 (obj, "rotation"), "Rotation3x3 after setter native"); - - obj.Rotation3x3 = mat3x3; - Asserts.AreEqual (mat3x3, obj.Rotation3x3, "Rotation3x3 after setter 3x3"); - Asserts.AreEqual (mat3x3, CFunctions.GetMatrixFloat3x3 (obj, "rotation"), "Rotation3x3 after setter native 3x3"); - } - } - } -} - -#endif // __WATCHOS__ diff --git a/tests/monotouch-test/GameplayKit/GKPathTests.cs b/tests/monotouch-test/GameplayKit/GKPathTests.cs index 611fc7138ed..1b70d1a295e 100644 --- a/tests/monotouch-test/GameplayKit/GKPathTests.cs +++ b/tests/monotouch-test/GameplayKit/GKPathTests.cs @@ -33,19 +33,6 @@ public class GKPathTests { new Vector2 (1,3), new Vector2 (1,2), new Vector2 (1,1), new Vector2 (1,0) }; - static Vector3 [] test_vectors3 = new [] { - new Vector3 (0.1532144f, 0.5451511f, 0.2004739f), - new Vector3 (0.7717745f, 0.559364f, 0.00918373f), - new Vector3 (0.2023053f, 0.4701468f, 0.6618567f), - new Vector3 (0.4904693f, 0.841727f, 0.2294401f), - new Vector3 (0.1252193f, 0.08986127f, 0.3407605f), - new Vector3 (0.006755914f, 0.07464754f, 0.287938f), - new Vector3 (9.799572E+08f, 1.64794E+09f, 1.117296E+09f), - new Vector3 (1.102396E+09f, 3.082477E+08f, 1.126484E+09f), - new Vector3 (2.263112E+08f, 8.79644E+08f, 1.303282E+09f), - new Vector3 (8.176959E+08f, 1.386156E+09f, 5.956444E+08f), - }; - [Test] public void FromPointsTest () { @@ -65,32 +52,6 @@ public void InitWithPointsTest () var path = new GKPath (points, 1, false); Assert.NotNull (path, "GKPath.FromPoints should not be null"); } - - [Test] - public void FromPointsVector3Test () - { - if (!TestRuntime.CheckSystemAndSDKVersion (10, 0)) - Assert.Ignore ("Ignoring GameplayKit tests: Requires iOS10+"); - - var path = GKPath.FromPoints (test_vectors3, 1, false); - Assert.NotNull (path, "GKPath.FromPoints should not be null"); - - for (int i = 0; i < test_vectors3.Length; i++) - Asserts.AreEqual (path.GetVector3Point ((nuint) i), test_vectors3 [i], $"FromPointsVector3 iter {i}"); - } - - [Test] - public void InitWithPointsVector3Test () - { - if (!TestRuntime.CheckSystemAndSDKVersion (10, 0)) - Assert.Ignore ("Ignoring GameplayKit tests: Requires iOS10+"); - - var path = new GKPath (test_vectors3, 1, false); - Assert.NotNull (path, "GKPath.FromPoints should not be null"); - - for (int i = 0; i < test_vectors3.Length; i++) - Asserts.AreEqual (path.GetVector3Point ((nuint) i), test_vectors3[i], $"InitWithVector3 iter {i}"); - } } } diff --git a/tests/monotouch-test/HomeKit/HMMutableSignificantTimeEventTest.cs b/tests/monotouch-test/HomeKit/HMMutableSignificantTimeEventTest.cs deleted file mode 100644 index c12fbebaed0..00000000000 --- a/tests/monotouch-test/HomeKit/HMMutableSignificantTimeEventTest.cs +++ /dev/null @@ -1,43 +0,0 @@ -// -// Unit tests for HMMutableSignificantTimeEventTest -// -// Authors: -// Vincent Dondain -// -// -// Copyright 2017 Microsoft. All rights reserved. -// - -#if !MONOMAC - -using System; -using NUnit.Framework; - -using Foundation; -using HomeKit; - -namespace MonoTouchFixtures.HomeKit -{ - [TestFixture] - [Preserve (AllMembers = true)] - public class HMMutableSignificantTimeEventTest - { - [SetUp] - public void Setup () - { - TestRuntime.AssertXcodeVersion (9, 0); - } - - [Test] - public void SignificantEventPropertyTest () - { - using (var obj = new HMMutableSignificantTimeEvent (HMSignificantEvent.Sunrise, null)) { - Assert.AreEqual (HMSignificantEvent.Sunrise, obj.SignificantEvent, "1 SignificantEvent Getter"); - obj.SignificantEvent = HMSignificantEvent.Sunset; - Assert.AreEqual (HMSignificantEvent.Sunset, obj.SignificantEvent, "2 PresenceType Setter"); - } - } - } -} - -#endif \ No newline at end of file diff --git a/tests/monotouch-test/HomeKit/HMSignificantTimeEventTest.cs b/tests/monotouch-test/HomeKit/HMSignificantTimeEventTest.cs deleted file mode 100644 index c0f38185a44..00000000000 --- a/tests/monotouch-test/HomeKit/HMSignificantTimeEventTest.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// Unit tests for HMSignificantTimeEventTest -// -// Authors: -// Vincent Dondain -// -// -// Copyright 2017 Microsoft. All rights reserved. -// - -#if !MONOMAC - -using System; -using NUnit.Framework; - -using Foundation; -using HomeKit; - -namespace MonoTouchFixtures.HomeKit -{ - [TestFixture] - [Preserve (AllMembers = true)] - public class HMSignificantTimeEventTest - { - [SetUp] - public void Setup () - { - TestRuntime.AssertXcodeVersion (9, 0); - } - - [Test] - public void SignificantEventPropertyTest () - { - using (var obj = new HMSignificantTimeEvent (HMSignificantEvent.Sunrise, null)) { - Assert.AreEqual (HMSignificantEvent.Sunrise, obj.SignificantEvent, "1 SignificantEvent Getter"); - } - } - } -} - -#endif \ No newline at end of file diff --git a/tests/monotouch-test/MediaPlayer/VolumeViewTest.cs b/tests/monotouch-test/MediaPlayer/VolumeViewTest.cs index cdda8d65807..bb7c8ce15fb 100644 --- a/tests/monotouch-test/MediaPlayer/VolumeViewTest.cs +++ b/tests/monotouch-test/MediaPlayer/VolumeViewTest.cs @@ -28,10 +28,7 @@ namespace MonoTouchFixtures.MediaPlayer { [TestFixture] [Preserve (AllMembers = true)] public class VolumeViewTest { - - // TODO: Test temporarily ignored. - // Reason: MPVolumeView started failing with iOS 11 beta 3. - [Ignore] + [Test] public void InitWithFrame () { diff --git a/tests/monotouch-test/MediaToolbox/FormatNamesTest.cs b/tests/monotouch-test/MediaToolbox/FormatNamesTest.cs index adf8cf046ee..98bf5af058b 100644 --- a/tests/monotouch-test/MediaToolbox/FormatNamesTest.cs +++ b/tests/monotouch-test/MediaToolbox/FormatNamesTest.cs @@ -32,11 +32,7 @@ public void LocalizedNameForMediaType () Assert.That (CMMediaType.Audio.GetLocalizedName (), Is.EqualTo ("Sound"), "Audio"); Assert.That (CMMediaType.ClosedCaption.GetLocalizedName (), Is.EqualTo ("Closed Caption"), "ClosedCaption"); - if (TestRuntime.CheckXcodeVersion (9, 0)) { - Assert.That (CMMediaType.Metadata.GetLocalizedName (), Is.EqualTo ("Metadata"), "Metadata"); - } else { - Assert.That (CMMediaType.Metadata.GetLocalizedName (), Is.EqualTo ("meta"), "Metadata"); - } + Assert.That (CMMediaType.Metadata.GetLocalizedName (), Is.EqualTo ("meta"), "Metadata"); Assert.That (CMMediaType.Muxed.GetLocalizedName (), Is.EqualTo ("Muxed"), "Muxed"); Assert.That (CMMediaType.Subtitle.GetLocalizedName (), Is.EqualTo ("Subtitle"), "Subtitle"); Assert.That (CMMediaType.Text.GetLocalizedName (), Is.EqualTo ("Text"), "Text"); diff --git a/tests/monotouch-test/Metal/HeapDescriptorTest.cs b/tests/monotouch-test/Metal/HeapDescriptorTest.cs index 9b21930ac3e..40b583c4dce 100644 --- a/tests/monotouch-test/Metal/HeapDescriptorTest.cs +++ b/tests/monotouch-test/Metal/HeapDescriptorTest.cs @@ -16,76 +16,33 @@ namespace MonoTouchFixtures.Metal { [TestFixture] public class HeapDescriptorTest { - MTLHeapDescriptor hd = null; - [SetUp] - public void SetUp () + [Test] + public void Properties () { -#if !MONOMAC TestRuntime.AssertXcodeVersion (8, 0); if (Runtime.Arch == Arch.SIMULATOR) Assert.Ignore ("Type is missing on the simulator"); -#else - TestRuntime.AssertXcodeVersion (9, 0); -#endif - hd = new MTLHeapDescriptor (); - } - - [TearDown] - public void TearDown () - { - if (hd != null) - hd.Dispose (); - hd = null; - } - [Test] - public void Properties () - { - Assert.That (hd.CpuCacheMode, Is.EqualTo (MTLCpuCacheMode.DefaultCache), "CpuCacheMode"); - hd.CpuCacheMode = MTLCpuCacheMode.WriteCombined; - Assert.That (hd.StorageMode, Is.EqualTo (MTLStorageMode.Private), "StorageMode"); - hd.StorageMode = MTLStorageMode.Memoryless; - Assert.That (hd.Size, Is.EqualTo (0), "Size"); - hd.Size = 16; - - using (var hd2 = (MTLHeapDescriptor) hd.Copy ()) { - Assert.That (hd2.CpuCacheMode, Is.EqualTo (MTLCpuCacheMode.WriteCombined), "CpuCacheMode"); - Assert.That (hd2.StorageMode, Is.EqualTo (MTLStorageMode.Memoryless), "StorageMode"); - Assert.That (hd2.Size, Is.EqualTo (16), "Size"); - - // NSCopying - Assert.That (hd2.Handle, Is.Not.EqualTo (hd.Handle), "Handle"); + using (var hd = new MTLHeapDescriptor ()) { + Assert.That (hd.CpuCacheMode, Is.EqualTo (MTLCpuCacheMode.DefaultCache), "CpuCacheMode"); + hd.CpuCacheMode = MTLCpuCacheMode.WriteCombined; + Assert.That (hd.StorageMode, Is.EqualTo (MTLStorageMode.Private), "StorageMode"); + hd.StorageMode = MTLStorageMode.Memoryless; + Assert.That (hd.Size, Is.EqualTo (0), "Size"); + hd.Size = 16; + + using (var hd2 = (MTLHeapDescriptor) hd.Copy ()) { + Assert.That (hd2.CpuCacheMode, Is.EqualTo (MTLCpuCacheMode.WriteCombined), "CpuCacheMode"); + Assert.That (hd2.StorageMode, Is.EqualTo (MTLStorageMode.Memoryless), "StorageMode"); + Assert.That (hd2.Size, Is.EqualTo (16), "Size"); + + // NSCopying + Assert.That (hd2.Handle, Is.Not.EqualTo (hd.Handle), "Handle"); + } } } - - [Test] - public void GetSetCpuCacheModeTest () - { - TestRuntime.AssertXcodeVersion (9, 0); - - hd.CpuCacheMode = MTLCpuCacheMode.WriteCombined; - Assert.AreEqual (MTLCpuCacheMode.WriteCombined, hd.CpuCacheMode); - } - - [Test] - public void GetSetSizeTest () - { - TestRuntime.AssertXcodeVersion (9, 0); - - hd.Size = 2; - Assert.AreEqual (2, hd.Size); - } - - [Test] - public void GetSetStorageModeTest () - { - TestRuntime.AssertXcodeVersion (9, 0); - - hd.StorageMode = MTLStorageMode.Private; - Assert.AreEqual (MTLStorageMode.Private, hd.StorageMode); - } } } diff --git a/tests/monotouch-test/Metal/MTLArgumentDescriptorTest.cs b/tests/monotouch-test/Metal/MTLArgumentDescriptorTest.cs deleted file mode 100644 index 9b3e01c204f..00000000000 --- a/tests/monotouch-test/Metal/MTLArgumentDescriptorTest.cs +++ /dev/null @@ -1,78 +0,0 @@ -#if !__WATCHOS__ - -using System; - -#if XAMCORE_2_0 -using Metal; -#else -using MonoTouch.Metal; -#endif - -using NUnit.Framework; - -namespace MonoTouchFixtures.Metal { - - [TestFixture] - public class MTLArgumentDescriptorTest { - MTLArgumentDescriptor descriptor = null; - - [SetUp] - public void SetUp () - { - TestRuntime.AssertXcodeVersion (9, 0); - descriptor = new MTLArgumentDescriptor (); - } - - [TearDown] - public void TearDown () - { - if (descriptor != null) - descriptor.Dispose (); - descriptor = null; - } - - [Test] - public void GetSetAccessTest () - { - descriptor.Access = MTLArgumentAccess.ReadWrite; - Assert.AreEqual (MTLArgumentAccess.ReadWrite, descriptor.Access); - } - - [Test] - public void GetSetArrayLengthTest () - { - descriptor.ArrayLength = 1; - Assert.AreEqual (1, descriptor.ArrayLength); - } - - [Test] - public void GetSetConstantBlockAlignmentTest () - { - descriptor.ConstantBlockAlignment = 1; - Assert.AreEqual (1, descriptor.ConstantBlockAlignment); - } - - [Test] - public void GetSetDataTypeTest () - { - descriptor.DataType = MTLDataType.Half4; - Assert.AreEqual (MTLDataType.Half4, descriptor.DataType); - } - - [Test] - public void GetSetIndexTest () - { - descriptor.Index = 1; - Assert.AreEqual (1, descriptor.Index); - } - - [Test] - public void GetSetTextureTypeTest () - { - descriptor.TextureType = MTLTextureType.k2DArray; - Assert.AreEqual (MTLTextureType.k2DArray, descriptor.TextureType); - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/Metal/MTLDeviceTests.cs b/tests/monotouch-test/Metal/MTLDeviceTests.cs deleted file mode 100644 index 082b871781c..00000000000 --- a/tests/monotouch-test/Metal/MTLDeviceTests.cs +++ /dev/null @@ -1,36 +0,0 @@ -#if MONOMAC - -using System; -using Foundation; - -#if XAMCORE_2_0 -using Metal; -#else -using MonoTouch.Metal; -#endif - -using NUnit.Framework; - -namespace MonoTouchFixtures.Metal { - public class MTLDeviceTests { - [SetUp] - public void Setup () - { - TestRuntime.AssertXcodeVersion (9, 0); - } - - [Test] - public void GetAllDevicesTest () - { - NSObject refObj = new NSObject(); - var devices = MTLDevice.GetAllDevices(ref refObj, (IMTLDevice device, NSString notifyName) => { }); - - Assert.That (devices, Is.Not.Empty, "MTLDevice.GetAllDevices"); - - Assert.DoesNotThrow (() => { - MTLDevice.RemoveObserver (refObj); - }); - } - } -} -#endif diff --git a/tests/monotouch-test/Metal/MTLPipelineBufferDescriptorTests.cs b/tests/monotouch-test/Metal/MTLPipelineBufferDescriptorTests.cs deleted file mode 100644 index 6b5808b408d..00000000000 --- a/tests/monotouch-test/Metal/MTLPipelineBufferDescriptorTests.cs +++ /dev/null @@ -1,43 +0,0 @@ -#if !__WATCHOS__ - -using System; - -#if XAMCORE_2_0 -using Metal; -#else -using MonoTouch.Metal; -#endif - -using NUnit.Framework; - -namespace MonoTouchFixtures.Metal { - - [TestFixture] - public class MTLPipelineBufferDescriptorTest { - MTLPipelineBufferDescriptor descriptor = null; - - [SetUp] - public void SetUp () - { - TestRuntime.AssertXcodeVersion (9, 0); - descriptor = new MTLPipelineBufferDescriptor (); - } - - [TearDown] - public void TearDown () - { - if (descriptor != null) - descriptor.Dispose (); - descriptor = null; - } - - [Test] - public void GetSetMutabilityTest () - { - descriptor.Mutability = MTLMutability.Immutable; - Assert.AreEqual (MTLMutability.Immutable, descriptor.Mutability); - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/Metal/MTLPointerTypeTests.cs b/tests/monotouch-test/Metal/MTLPointerTypeTests.cs deleted file mode 100644 index 71286abcaa2..00000000000 --- a/tests/monotouch-test/Metal/MTLPointerTypeTests.cs +++ /dev/null @@ -1,66 +0,0 @@ -#if !__WATCHOS__ - -using System; - -#if XAMCORE_2_0 -using Metal; -#else -using MonoTouch.Metal; -#endif - -using NUnit.Framework; - -namespace MonoTouchFixtures.Metal { - - [TestFixture] - public class MTLPointerTypeTests { - MTLPointerType ptrType = null; - - [SetUp] - public void SetUp () - { - TestRuntime.AssertXcodeVersion (9, 0); - ptrType = new MTLPointerType (); - } - - [TearDown] - public void TearDown () - { - if (ptrType != null) - ptrType.Dispose (); - ptrType = null; - } - - [Test] - public void GetAccessTest () - { - Assert.AreEqual (MTLArgumentAccess.ReadOnly, ptrType.Access); - } - - [Test] - public void GetAlignmentTest () - { - Assert.AreEqual (0, ptrType.Alignment); - } - - [Test] - public void GetDataSizeTest () - { - Assert.AreEqual (0, ptrType.DataSize); - } - - [Test] - public void GetElementIsArgumentBufferTest () - { - Assert.False (ptrType.ElementIsArgumentBuffer); - } - - [Test] - public void GetElementTypeTest () - { - Assert.AreEqual (MTLDataType.None, ptrType.ElementType); - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/Metal/MTLTextureReferenceType.cs b/tests/monotouch-test/Metal/MTLTextureReferenceType.cs deleted file mode 100644 index c88f89a9afb..00000000000 --- a/tests/monotouch-test/Metal/MTLTextureReferenceType.cs +++ /dev/null @@ -1,60 +0,0 @@ -#if !__WATCHOS__ - -using System; - -#if XAMCORE_2_0 -using Metal; -#else -using MonoTouch.Metal; -#endif - -using NUnit.Framework; - -namespace MonoTouchFixtures.Metal { - - [TestFixture] - public class MTLTextureReferenceTypeTests { - MTLTextureReferenceType reference = null; - - [SetUp] - public void SetUp () - { - TestRuntime.AssertXcodeVersion (9, 0); - reference = new MTLTextureReferenceType (); - } - - [TearDown] - public void TearDown () - { - if (reference != null) - reference.Dispose (); - reference = null; - } - - [Test] - public void GetAccessTest () - { - Assert.AreEqual (MTLArgumentAccess.ReadOnly, reference.Access); - } - - [Test] - public void GetIsDepthTextureTest () - { - Assert.False (reference.IsDepthTexture); - } - - [Test] - public void GetTextureDataType () - { - Assert.AreEqual (MTLDataType.None, reference.TextureDataType); - } - - [Test] - public void GetTextureType () - { - Assert.AreEqual (MTLTextureType.k1D, reference.TextureType); - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/Metal/MTLTileRenderPipelineColorAttachmentDescriptorTests.cs b/tests/monotouch-test/Metal/MTLTileRenderPipelineColorAttachmentDescriptorTests.cs deleted file mode 100644 index db3fd3ebbdd..00000000000 --- a/tests/monotouch-test/Metal/MTLTileRenderPipelineColorAttachmentDescriptorTests.cs +++ /dev/null @@ -1,43 +0,0 @@ -#if __IOS__ - -using System; - -#if XAMCORE_2_0 -using Metal; -#else -using MonoTouch.Metal; -#endif - -using NUnit.Framework; - -namespace MonoTouchFixtures.Metal { - - [TestFixture] - public class MTLTileRenderPipelineColorAttachmentDescriptorTests { - MTLTileRenderPipelineColorAttachmentDescriptor descriptor = null; - - [SetUp] - public void SetUp () - { - TestRuntime.AssertXcodeVersion (9, 0); - descriptor = new MTLTileRenderPipelineColorAttachmentDescriptor (); - } - - [TearDown] - public void TearDown () - { - if (descriptor != null) - descriptor.Dispose (); - descriptor = null; - } - - [Test] - public void GetSetPixelFormat () - { - descriptor.PixelFormat = MTLPixelFormat.RGBA8Snorm; - Assert.AreEqual (MTLPixelFormat.RGBA8Snorm, descriptor.PixelFormat); - } - } -} - -#endif // !__WATCHOS__ \ No newline at end of file diff --git a/tests/monotouch-test/Metal/MTLTileRenderPipelineDescriptor.cs b/tests/monotouch-test/Metal/MTLTileRenderPipelineDescriptor.cs deleted file mode 100644 index 5e8d7f66ba3..00000000000 --- a/tests/monotouch-test/Metal/MTLTileRenderPipelineDescriptor.cs +++ /dev/null @@ -1,74 +0,0 @@ -#if __IOS__ - -using System; - -#if XAMCORE_2_0 -using Metal; -#else -using MonoTouch.Metal; -#endif - -using NUnit.Framework; - -namespace MonoTouchFixtures.Metal { - - [TestFixture] - public class MTLTileRenderPipelineDescriptorTests { - MTLTileRenderPipelineDescriptor descriptor = null; - - [SetUp] - public void SetUp () - { - TestRuntime.AssertXcodeVersion (9, 0); - descriptor = new MTLTileRenderPipelineDescriptor (); - } - - [TearDown] - public void TearDown () - { - if (descriptor != null) - descriptor.Dispose (); - descriptor = null; - } - - [Test] - public void ColorAttachmentsTest () - { - var attachments = descriptor.ColorAttachments; - Assert.NotNull (attachments); - } - - [Test] - public void GetSetLabelTest () - { - descriptor.Label = "Foo"; - Assert.AreEqual ("Foo", descriptor.Label); - } - - [Test] - public void GetSetRasterSampleCount () - { - descriptor.RasterSampleCount = 2; - Assert.AreEqual (2, descriptor.RasterSampleCount); - } - - [Test] - public void GetSetThreadgroupSizeMatchesTileSize () - { - descriptor.ThreadgroupSizeMatchesTileSize = true; - Assert.AreEqual (true, descriptor.ThreadgroupSizeMatchesTileSize); - - descriptor.ThreadgroupSizeMatchesTileSize = false; - Assert.AreEqual (false, descriptor.ThreadgroupSizeMatchesTileSize); - } - - [Test] - public void GetTileBuffers () - { - var buffers = descriptor.TileBuffers; - Assert.NotNull (buffers); - } - } -} - -#endif // !__WATCHOS__ \ No newline at end of file diff --git a/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramEqualizationTest.cs b/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramEqualizationTest.cs deleted file mode 100644 index e55242264ef..00000000000 --- a/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramEqualizationTest.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2017 Microsoft Inc. All rights reserved. - -#if !__WATCHOS__ - -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; - -namespace MonoTouchFixtures.MetalPerformanceShaders -{ - - [TestFixture] - public class MPSImageHistogramEqualizationTest - { - - [Test] - public void Constructors () - { - TestRuntime.AssertDevice (); - TestRuntime.AssertXcodeVersion (7, 0); - - MPSImageHistogramInfo info = new MPSImageHistogramInfo (); - info.NumberOfHistogramEntries = 256; - using (var obj = new MPSImageHistogramEqualization (MTLDevice.SystemDefault, ref info)) { - var rv = obj.HistogramInfo; - Asserts.AreEqual (info, rv, "HistogramForAlpha"); - } - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramSpecificationTest.cs b/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramSpecificationTest.cs deleted file mode 100644 index 06d489e2c18..00000000000 --- a/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramSpecificationTest.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2017 Microsoft Inc. All rights reserved. - -#if !__WATCHOS__ - -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; - -namespace MonoTouchFixtures.MetalPerformanceShaders -{ - - [TestFixture] - public class MPSImageHistogramSpecificationTest - { - - [Test] - public void Constructors () - { - TestRuntime.AssertDevice (); - TestRuntime.AssertXcodeVersion (7, 0); - - MPSImageHistogramInfo info = new MPSImageHistogramInfo (); - info.NumberOfHistogramEntries = 256; - using (var obj = new MPSImageHistogramSpecification (MTLDevice.SystemDefault, ref info)) { - var rv = obj.HistogramInfo; - Asserts.AreEqual (info, rv, "HistogramForAlpha"); - } - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramTest.cs b/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramTest.cs deleted file mode 100644 index d3938885067..00000000000 --- a/tests/monotouch-test/MetalPerformanceShaders/MPSImageHistogramTest.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2017 Microsoft Inc. All rights reserved. - -#if !__WATCHOS__ - -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; - -namespace MonoTouchFixtures.MetalPerformanceShaders -{ - - [TestFixture] - public class MPSImageHistogramTest - { - - [Test] - public void Constructors () - { - TestRuntime.AssertDevice (); - TestRuntime.AssertXcodeVersion (7, 0); - - MPSImageHistogramInfo info = new MPSImageHistogramInfo (); - info.NumberOfHistogramEntries = 256; - using (var obj = new MPSImageHistogram (MTLDevice.SystemDefault, ref info)) { - var rv = obj.HistogramInfo; - Asserts.AreEqual (info, rv, "HistogramForAlpha"); - - Assert.IsTrue (obj.ZeroHistogram, "ZeroHistogram"); - Assert.AreEqual (3072, obj.HistogramSizeForSourceFormat (MTLPixelFormat.RGBA16Sint), "HistogramSizeForSourceFormat"); - var crs = obj.ClipRectSource; - Assert.AreEqual (0, crs.Origin.X, "ClipRectSource.Origin.X"); - Assert.AreEqual (0, crs.Origin.Y, "ClipRectSource.Origin.Y"); - Assert.AreEqual (0, crs.Origin.Z, "ClipRectSource.Origin.Z"); - Assert.AreEqual (-1, crs.Size.Depth, "ClipRectSource.Size.Depth"); - Assert.AreEqual (-1, crs.Size.Height, "ClipRectSource.Size.Height"); - Assert.AreEqual (-1, crs.Size.Width, "ClipRectSource.Size.Width"); - } - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/ModelIO/MDLAssetTest.cs b/tests/monotouch-test/ModelIO/MDLAssetTest.cs deleted file mode 100644 index 2e61f016179..00000000000 --- a/tests/monotouch-test/ModelIO/MDLAssetTest.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// MDLAssert Unit Tests -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright 2017 Microsoft Inc. -// - -#if !__WATCHOS__ - -using System; -#if XAMCORE_2_0 -using CoreGraphics; -using Foundation; -#if !MONOMAC -using UIKit; -#endif -#if !__TVOS__ -using MultipeerConnectivity; -#endif -using ModelIO; -using ObjCRuntime; -#else -using MonoTouch.CoreGraphics; -using MonoTouch.Foundation; -#if !__TVOS__ -using MonoTouch.MultipeerConnectivity; -#endif -using MonoTouch.UIKit; -using MonoTouch.ModelIO; -using MonoTouch.ObjCRuntime; -#endif -using OpenTK; -using NUnit.Framework; - -namespace MonoTouchFixtures.ModelIO -{ - - [TestFixture] - // we want the test to be available if we use the linker - [Preserve (AllMembers = true)] - public class MDLAssetTest - { - [TestFixtureSetUp] - public void Setup () - { - TestRuntime.AssertXcodeVersion (7, 0); - } - - [Test] - public void BoundingBoxTest () - { - using (var obj = new MDLAsset ()) { - MDLAxisAlignedBoundingBox box = new MDLAxisAlignedBoundingBox ( - new Vector3 (-1, -1, -1), - new Vector3 (0, 0, 0) - ); - Asserts.AreEqual (box, obj.BoundingBox, "BoundingBox"); - } - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/ModelIO/MDLCameraTest.cs b/tests/monotouch-test/ModelIO/MDLCameraTest.cs deleted file mode 100644 index aaee43c75e3..00000000000 --- a/tests/monotouch-test/ModelIO/MDLCameraTest.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// MDLCamera Unit Tests -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright 2017 Microsoft Inc. -// - -#if !__WATCHOS__ - -using System; -#if XAMCORE_2_0 -using CoreGraphics; -using Foundation; -#if !MONOMAC -using UIKit; -#endif -#if !__TVOS__ -using MultipeerConnectivity; -#endif -using ModelIO; -using ObjCRuntime; -#else -using MonoTouch.CoreGraphics; -using MonoTouch.Foundation; -#if !__TVOS__ -using MonoTouch.MultipeerConnectivity; -#endif -using MonoTouch.UIKit; -using MonoTouch.ModelIO; -using MonoTouch.ObjCRuntime; -#endif -using OpenTK; - -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; -using VectorFloat3 = global::OpenTK.NVector3; - -using Bindings.Test; - -using NUnit.Framework; - -namespace MonoTouchFixtures.ModelIO -{ - - [TestFixture] - // we want the test to be available if we use the linker - [Preserve (AllMembers = true)] - public class MDCameraTest - { - [TestFixtureSetUp] - public void Setup () - { - TestRuntime.AssertXcodeVersion (7, 0); - } - - [Test] - public void ProjectionMatrix () - { - using (var obj = new MDLCamera ()) { - Assert.AreEqual (0.1f, obj.NearVisibilityDistance, 0.0001f, "NearVisibilityDistance"); - Assert.AreEqual (1000f, obj.FarVisibilityDistance, 0.0001f, "FarVisibilityDistance"); - Assert.AreEqual (54f, obj.FieldOfView, 0.0001f, "FieldOfView"); - var initialProjectionMatrix = new Matrix4 ( - 1.308407f, 0, 0, 0, - 0, 1.962611f, 0, 0, - 0, 0, -1.0002f, -1, - 0, 0, -0.20002f, 0 - ); - Asserts.AreEqual (initialProjectionMatrix, obj.ProjectionMatrix, 0.0001f, "Initial"); - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) initialProjectionMatrix), obj.ProjectionMatrix4x4, 0.0001f, "Initial 4x4"); - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) initialProjectionMatrix), CFunctions.GetMatrixFloat4x4 (obj, "projectionMatrix"), 0.0001f, "Initial native"); - - obj.NearVisibilityDistance = 1.0f; - var modifiedProjectionMatrix = new Matrix4 ( - 1.308407f, 0, 0, 0, - 0, 1.962611f, 0, 0, - 0, 0, -1.002002f, -1, - 0, 0, -2.002002f, 0 - ); - Asserts.AreEqual (modifiedProjectionMatrix, obj.ProjectionMatrix, 0.0001f, "Second"); - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) modifiedProjectionMatrix), obj.ProjectionMatrix4x4, 0.0001f, "Second 4x4"); - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) modifiedProjectionMatrix), CFunctions.GetMatrixFloat4x4 (obj, "projectionMatrix"), 0.0001f, "Second native"); - } - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/ModelIO/MDLMaterialProperty.cs b/tests/monotouch-test/ModelIO/MDLMaterialProperty.cs index ec750defc3e..daf8e85f506 100644 --- a/tests/monotouch-test/ModelIO/MDLMaterialProperty.cs +++ b/tests/monotouch-test/ModelIO/MDLMaterialProperty.cs @@ -33,13 +33,6 @@ using MonoTouch.ObjCRuntime; #endif using OpenTK; -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; -using VectorFloat3 = global::OpenTK.NVector3; -#if !TEST_BINDINGS_UNAVAILABLE -using Bindings.Test; -#endif using NUnit.Framework; namespace MonoTouchFixtures.ModelIO { @@ -108,7 +101,6 @@ public void Ctors () Vector3 V3; Vector4 V4; Matrix4 M4; - MatrixFloat4x4 M4x4; MDLTextureSampler tsv; NSUrl url; @@ -130,7 +122,6 @@ public void Ctors () V3 = new Vector3 (3, 4, 5); V4 = new Vector4 (6, 7, 8, 9); M4 = new Matrix4 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); - M4x4 = new MatrixFloat4x4 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); tsv = new MDLTextureSampler (); url = new NSUrl ("http://xamarin.com"); @@ -170,11 +161,7 @@ public void Ctors () // Looks like the URLValue can't change after construction obj.UrlValue = url; - if (TestRuntime.CheckXcodeVersion (9, 0)) { - Assert.AreSame (url, obj.UrlValue, "2 UrlValue"); - } else { - Assert.IsNull (obj.UrlValue, "2 UrlValue"); - } + Assert.IsNull (obj.UrlValue, "2 UrlValue"); } @@ -196,17 +183,6 @@ public void Ctors () using (var obj = new MDLMaterialProperty ("name", MDLMaterialSemantic.AmbientOcclusion, M4)) { Asserts.AreEqual (M4, obj.Matrix4x4, "7 Matrix4x4"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (CFunctions.GetMatrixFloat4x4 (obj, "matrix4x4"), obj.MatrixFloat4x4, "7b MatrixFloat4x4"); -#endif - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) M4), obj.MatrixFloat4x4, "7c MatrixFloat4x4"); - } - - using (var obj = new MDLMaterialProperty ("name", MDLMaterialSemantic.AmbientOcclusion, M4x4)) { -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (CFunctions.GetMatrixFloat4x4 (obj, "matrix4x4"), obj.MatrixFloat4x4, "7' MatrixFloat4x4"); -#endif - Asserts.AreEqual (M4x4, obj.MatrixFloat4x4, "7'b MatrixFloat4x4"); } using (var obj = new MDLMaterialProperty ("name", MDLMaterialSemantic.AmbientOcclusion, V4)) { diff --git a/tests/monotouch-test/ModelIO/MDLMesh.cs b/tests/monotouch-test/ModelIO/MDLMesh.cs index 4b438667596..c30257f6f90 100644 --- a/tests/monotouch-test/ModelIO/MDLMesh.cs +++ b/tests/monotouch-test/ModelIO/MDLMesh.cs @@ -135,7 +135,16 @@ public void CreatePlaneTest () Assert.IsNotNull (obj, "obj"); Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (1.5f, 0, 1.5f), MinBounds = new Vector3 (-1.5f, 0, -1.5f) }, obj.BoundingBox, "BoundingBox"); Assert.AreEqual (1, obj.Submeshes.Count, "Submeshes Count"); - Assert.That (obj.VertexBuffers.Length, Is.GreaterThanOrEqualTo (1), "VertexBuffers Count"); +#if MONOMAC + var vb = 31; +#else + int vb = 1; + if (TestRuntime.CheckXcodeVersion (8, 2)) + vb = 31; + else if (TestRuntime.CheckXcodeVersion (8, 0)) + vb = 1; +#endif + Assert.AreEqual (vb, obj.VertexBuffers.Length, "VertexBuffers Count"); Assert.AreEqual (16, obj.VertexCount, "VertexCount"); Assert.AreEqual (31, obj.VertexDescriptor.Attributes.Count, "VertexDescriptor Attributes Count"); Assert.AreEqual (31, obj.VertexDescriptor.Layouts.Count, "VertexDescriptor Layouts Count"); @@ -167,16 +176,19 @@ public void CreateCylindroidTest () Assert.IsNotNull (obj, "obj"); #if MONOMAC Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (0.866025448f, 0.5f, 1f), MinBounds = new Vector3 (-0.866025388f, -0.5f, -0.5f) }, obj.BoundingBox, "BoundingBox"); + Assert.AreEqual (31, obj.VertexBuffers.Length, "VertexBuffers Count"); #else if (TestRuntime.CheckXcodeVersion (8, 2)) { Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (0.866025448f, 0.5f, 1f), MinBounds = new Vector3 (-0.866025388f, -0.5f, -0.5f) }, obj.BoundingBox, "BoundingBox"); + Assert.AreEqual (31, obj.VertexBuffers.Length, "VertexBuffers Count"); } else if (TestRuntime.CheckXcodeVersion (8, 0)) { Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (0.866025448f, 1.0f, 1f), MinBounds = new Vector3 (-0.866025388f, -1.0f, -0.5f) }, obj.BoundingBox, "BoundingBox"); + Assert.AreEqual (3, obj.VertexBuffers.Length, "VertexBuffers Count"); } else { Asserts.AreEqual (new MDLAxisAlignedBoundingBox { MaxBounds = new Vector3 (1f, 0.5f, 1f), MinBounds = new Vector3 (-0.866025388f, -0.5f, -0.866025388f) }, obj.BoundingBox, "BoundingBox"); + Assert.AreEqual (1, obj.VertexBuffers.Length, "VertexBuffers Count"); } #endif - Assert.That (obj.VertexBuffers.Length, Is.GreaterThanOrEqualTo (1), "VertexBuffers Count"); Assert.AreEqual (1, obj.Submeshes.Count, "Submeshes Count"); Assert.AreEqual (18, obj.VertexCount, "VertexCount"); Assert.AreEqual (31, obj.VertexDescriptor.Attributes.Count, "VertexDescriptor Attributes Count"); @@ -267,7 +279,7 @@ public void CreateCapsuleTest () Assert.IsNotNull (obj, "obj"); Assert.That (obj.VertexCount, Is.GreaterThanOrEqualTo (122), "VertexCount"); Assert.AreEqual (1, obj.Submeshes.Count, "Submeshes Count"); - Assert.That (obj.VertexBuffers.Length, Is.GreaterThanOrEqualTo (1), "VertexBuffers Count"); + Assert.That (obj.VertexBuffers.Length, Is.GreaterThanOrEqualTo (3), "VertexBuffers Count"); Assert.AreEqual (31, obj.VertexDescriptor.Attributes.Count, "VertexDescriptor Attributes Count"); Assert.AreEqual (31, obj.VertexDescriptor.Layouts.Count, "VertexDescriptor Layouts Count"); } @@ -284,7 +296,7 @@ public void CreateConeTest () using (var obj = MDLMesh.CreateCone (V3, V2i, MDLGeometryType.Triangles, true, true, null)) { Assert.IsNotNull (obj, "obj"); Assert.AreEqual (1, obj.Submeshes.Count, "Submeshes Count"); - Assert.That (obj.VertexBuffers.Length, Is.GreaterThanOrEqualTo (1), "VertexBuffers Count"); + Assert.That (obj.VertexBuffers.Length, Is.GreaterThanOrEqualTo (3), "VertexBuffers Count"); Assert.AreEqual (36, obj.VertexCount, "VertexCount"); Assert.AreEqual (31, obj.VertexDescriptor.Attributes.Count, "VertexDescriptor Attributes Count"); Assert.AreEqual (31, obj.VertexDescriptor.Layouts.Count, "VertexDescriptor Layouts Count"); @@ -302,7 +314,7 @@ public void CreatePaneTest () using (var obj = MDLMesh.CreatePlane (V3, V2i, MDLGeometryType.Triangles, null)) { Assert.IsNotNull (obj, "obj"); Assert.AreEqual (1, obj.Submeshes.Count, "Submeshes Count"); - Assert.That (obj.VertexBuffers.Length, Is.GreaterThanOrEqualTo (1), "VertexBuffers Count"); + Assert.That (obj.VertexBuffers.Length, Is.GreaterThanOrEqualTo (3), "VertexBuffers Count"); Assert.AreEqual (30, obj.VertexCount, "VertexCount"); Assert.AreEqual (31, obj.VertexDescriptor.Attributes.Count, "VertexDescriptor Attributes Count"); Assert.AreEqual (31, obj.VertexDescriptor.Layouts.Count, "VertexDescriptor Layouts Count"); diff --git a/tests/monotouch-test/ModelIO/MDLStereoscopicCameraTest.cs b/tests/monotouch-test/ModelIO/MDLStereoscopicCameraTest.cs deleted file mode 100644 index cc4828c95da..00000000000 --- a/tests/monotouch-test/ModelIO/MDLStereoscopicCameraTest.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -// MDLStereoscopicCamera Unit Tests -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright 2017 Microsoft Inc. -// - -#if !__WATCHOS__ - -using System; -#if XAMCORE_2_0 -using CoreGraphics; -using Foundation; -#if !MONOMAC -using UIKit; -#endif -#if !__TVOS__ -using MultipeerConnectivity; -#endif -using ModelIO; -using ObjCRuntime; -#else -using MonoTouch.CoreGraphics; -using MonoTouch.Foundation; -#if !__TVOS__ -using MonoTouch.MultipeerConnectivity; -#endif -using MonoTouch.UIKit; -using MonoTouch.ModelIO; -using MonoTouch.ObjCRuntime; -#endif -using OpenTK; - -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; -using VectorFloat3 = global::OpenTK.NVector3; - -using Bindings.Test; -using NUnit.Framework; - -namespace MonoTouchFixtures.ModelIO -{ - [TestFixture] - // we want the test to be available if we use the linker - [Preserve (AllMembers = true)] - public class MDLStereoscopicCameraTest - { - [TestFixtureSetUp] - public void Setup () - { - TestRuntime.AssertXcodeVersion (7, 0); - } - - [Test] - public void Properties () - { - using (var obj = new MDLStereoscopicCamera ()) { - Assert.AreEqual (63f, obj.InterPupillaryDistance, "InterPupillaryDistance"); - Assert.AreEqual (0f, obj.LeftVergence, "LeftVergence"); - Assert.AreEqual (0f, obj.RightVergence, "RightVergence"); - Assert.AreEqual (0f, obj.Overlap, "Overlap"); - - var mat1 = new Matrix4 ( - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - -0.63f, 0, 0, 1); - Asserts.AreEqual (mat1, obj.LeftViewMatrix, "LeftViewMatrix"); - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) mat1), obj.LeftViewMatrix4x4, "LeftViewMatrix4x4"); - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) mat1), CFunctions.GetMatrixFloat4x4 (obj, "leftViewMatrix"), "LeftViewMatrix4x4 native"); - - var mat2 = new Matrix4 ( - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0.63f, 0, 0, 1); - Asserts.AreEqual (mat2, obj.RightViewMatrix, "RightViewMatrix"); - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) mat2), obj.RightViewMatrix4x4, "RightViewMatrix4x4"); - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) mat2), CFunctions.GetMatrixFloat4x4 (obj, "rightViewMatrix"), "RightViewMatrix4x4 native"); - - var mat3 = new Matrix4 ( - 1.308407f, 0, 0, 0, - 0, 1.962611f, 0, 0, - 0, 0, -1.0002f, -1, - 0, 0, -0.20002f, 0); - Asserts.AreEqual (mat3, obj.LeftProjectionMatrix, 0.0001f, "LeftProjectionMatrix"); - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) mat3), obj.LeftProjectionMatrix4x4, 0.0001f, "LeftProjectionMatrix4x4"); - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) mat3), CFunctions.GetMatrixFloat4x4 (obj, "leftProjectionMatrix"), 0.0001f, "LeftProjectionMatrix4x4 native"); - - Asserts.AreEqual (mat3, obj.RightProjectionMatrix, 0.0001f, "RightProjectionMatrix"); - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) mat3), obj.RightProjectionMatrix4x4, 0.0001f, "RightProjectionMatrix4x4"); - Asserts.AreEqual (MatrixFloat4x4.Transpose ((MatrixFloat4x4) mat3), CFunctions.GetMatrixFloat4x4 (obj, "rightProjectionMatrix"), 0.0001f, "RightProjectionMatrix4x4 native"); - } - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/ModelIO/MDLTransform.cs b/tests/monotouch-test/ModelIO/MDLTransform.cs index 6bb4ee25097..b169ecabac4 100644 --- a/tests/monotouch-test/ModelIO/MDLTransform.cs +++ b/tests/monotouch-test/ModelIO/MDLTransform.cs @@ -30,15 +30,6 @@ using MonoTouch.ObjCRuntime; #endif using OpenTK; - -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; -using VectorFloat3 = global::OpenTK.NVector3; - -#if !TEST_BINDINGS_UNAVAILABLE -using Bindings.Test; -#endif using NUnit.Framework; namespace MonoTouchFixtures.ModelIO { @@ -129,33 +120,6 @@ public void Ctors () obj.Rotation = V3; Asserts.AreEqual (V3, obj.Rotation, "Rotation 2"); } - - var m4 = new Matrix4 ( - 4, 0, 0, 0, - 0, 3, 0, 0, - 0, 0, 2, 0, - 2, 3, 4, 1); - using (var obj = new MDLTransform (m4)) { - Asserts.AreEqual (Vector3.Zero, obj.Rotation, "Rotation 3"); - Asserts.AreEqual (new Vector3 (4, 3, 2), obj.Scale, "Scale 3"); - Asserts.AreEqual (new Vector3 (2, 3, 4), obj.Translation, "Translation 3"); - Asserts.AreEqual (m4, obj.Matrix, 0.0001f, "Matrix 3"); - } - - var m4x4 = new MatrixFloat4x4 ( - 4, 0, 0, 2, - 0, 3, 0, 3, - 0, 0, 2, 4, - 0, 0, 0, 1); - using (var obj = new MDLTransform (m4x4)) { - Asserts.AreEqual (Vector3.Zero, obj.Rotation, "Rotation 4"); - Asserts.AreEqual (new Vector3 (4, 3, 2), obj.Scale, "Scale 4"); - Asserts.AreEqual (new Vector3 (2, 3, 4), obj.Translation, "Translation 4"); - Asserts.AreEqual (m4x4, obj.GetMatrix4x4 (), 0.0001f, "Matrix4x4 4"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (m4x4, CFunctions.GetMatrixFloat4x4 (obj, "matrix"), 0.0001f, "Matrix4x4-native 4"); -#endif - } } [Test] @@ -193,28 +157,6 @@ public void RotationAtTimeTest () Asserts.AreEqual (V3, obj.GetRotation (0), "RotationAtTime"); } } - - [Test] - public void GetRotationMatrixTest () - { - var matrix = Matrix4.Identity; - var V3 = new Vector3 (1, 0, 0); - - using (var obj = new MDLTransform (matrix)) { - obj.SetRotation (V3, 0); - var expected = new MatrixFloat4x4 ( - 1, 0, 0, 0, - 0, (float) Math.Cos (1.0f), (float) -Math.Sin(1.0f), 0, - 0, (float) Math.Sin (1.0f), (float) Math.Cos(1.0f), 0, - 0, 0, 0, 1 - ); - Asserts.AreEqual ((Matrix4) MatrixFloat4x4.Transpose (expected), obj.GetRotationMatrix (0), 0.00001f, "GetRotationMatrix"); - Asserts.AreEqual (expected, obj.GetRotationMatrix4x4 (0), 0.00001f, "GetRotationMatrix4x4"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (expected, CFunctions.MDLTransform_GetRotationMatrix (obj, 0), 0.00001f, "GetRotationMatrix4x4 native"); -#endif - } - } } } diff --git a/tests/monotouch-test/ModelIO/MDLTransformComponentTest.cs b/tests/monotouch-test/ModelIO/MDLTransformComponentTest.cs deleted file mode 100644 index 34c7d41facf..00000000000 --- a/tests/monotouch-test/ModelIO/MDLTransformComponentTest.cs +++ /dev/null @@ -1,212 +0,0 @@ -// -// MDLTransformComponent Unit Tests -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright 2017 Microsoft inc -// - -#if !__WATCHOS__ - -using System; -#if XAMCORE_2_0 -using Foundation; -#if !MONOMAC -using UIKit; -#endif -#if !__TVOS__ -using MultipeerConnectivity; -#endif -using ModelIO; -using ObjCRuntime; -#else -using MonoTouch.Foundation; -#if !__TVOS__ -using MonoTouch.MultipeerConnectivity; -#endif -using MonoTouch.UIKit; -using MonoTouch.ModelIO; -using MonoTouch.ObjCRuntime; -#endif -using OpenTK; - -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; -using VectorFloat3 = global::OpenTK.NVector3; - -using Bindings.Test; -using NUnit.Framework; - -namespace MonoTouchFixtures.ModelIO -{ - - [TestFixture] - // we want the test to be available if we use the linker - [Preserve (AllMembers = true)] - public class MDLTransformComponentTest - { - [TestFixtureSetUp] - public void Setup () - { - TestRuntime.AssertXcodeVersion (7, 0); - } - - [Test] - public void MatrixTest () - { - var m4 = new Matrix4 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); - var m4x4 = (MatrixFloat4x4) m4; - - using (var obj = new MDLTransform ()) { - // identity - Asserts.AreEqual (Matrix4.Identity, obj.Matrix, "Initial identity"); - Asserts.AreEqual (MatrixFloat4x4.Identity, obj.GetMatrix4x4 (), "Initial identity 4x4"); - Asserts.AreEqual (MatrixFloat4x4.Identity, CFunctions.GetMatrixFloat4x4 (obj, "matrix"), "Initial identity native"); - - // translate the transform somewhere - obj.SetTranslation (new Vector3 (2, 2, 2), 0); - - // the matrix should now be a translation matrix like this: - // 1 0 0 0 2 - // 0 1 0 0 2 - // 0 0 1 0 2 - // 0 0 0 1 0 - // but since Matrix4 is transposed when compared to MatrixFloat4x4, we get this: - - Asserts.AreEqual (new Matrix4 ( - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 2, 2, 2, 1 - ), obj.Matrix, "Translated"); - - // The 4x4 version is correct: - Asserts.AreEqual (new Matrix4 ( - 1, 0, 0, 2, - 0, 1, 0, 2, - 0, 0, 1, 2, - 0, 0, 0, 1 - ), obj.GetMatrix4x4 (), "Translated 4x4"); - - // Let's set the matrix to something (different from the identity matrix) - obj.Matrix = m4; - - // And the matrix resets to the identify matrix. - Asserts.AreEqual (Matrix4.Identity, obj.Matrix, "After set_Matrix"); - - // Translate again - obj.SetTranslation (new Vector3 (3, 3, 3), 0); - - // Set the matrix using a 4x4 matrix - obj.SetMatrix4x4 (m4x4); - - // And we still get the identity matrix back - Asserts.AreEqual (MatrixFloat4x4.Identity, obj.GetMatrix4x4 (), "After set_Matrix 2"); - } - } - - [Test] - public void LocalTransformTest () - { - var m4 = new Matrix4 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); - var m4x4 = (MatrixFloat4x4) m4; - - using (var obj = new MDLTransform ()) { - var component = (IMDLTransformComponent) obj; - // identity - Asserts.AreEqual (Matrix4.Identity, component.GetLocalTransform (0), "Initial identity"); - Asserts.AreEqual (MatrixFloat4x4.Identity, component.GetLocalTransform4x4 (0), "Initial identity 4x4"); - Asserts.AreEqual (MatrixFloat4x4.Identity, CFunctions.MDLTransformComponent_GetLocalTransform (component, 0), "Initial identity native"); - - // translate the transform somewhere - obj.SetTranslation (new Vector3 (2, 2, 2), 0); - - // the local transform should now be a translation matrix like this: - // 1 0 0 0 2 - // 0 1 0 0 2 - // 0 0 1 0 2 - // 0 0 0 1 0 - // but since Matrix4 is transposed when compared to MatrixFloat4x4, we get this: - - Asserts.AreEqual (new Matrix4 ( - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 2, 2, 2, 1 - ), component.GetLocalTransform (0), "Translated"); - - // The 4x4 version is correct: - Asserts.AreEqual (new Matrix4 ( - 1, 0, 0, 2, - 0, 1, 0, 2, - 0, 0, 1, 2, - 0, 0, 0, 1 - ), component.GetLocalTransform4x4 (0), "Translated 4x4"); - - // Let's set the local transform at time 1 to something (different from the identity matrix) - component.SetLocalTransform (m4, 1); - - // At time 1 the transform matrix is now the identity matrix - Asserts.AreEqual (Matrix4.Identity, component.GetLocalTransform (1), "After SetLocalTransform at 1"); - - // At time 0.5 we get a middle ground - Asserts.AreEqual (new Matrix4 ( - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 1, 1, 1, 1 - ), component.GetLocalTransform (0.5), 0.00001f, "AfterSetLocalTransform at 0.5"); - - // And at time 0 we still have the translated matrix. - Asserts.AreEqual (new Matrix4 ( - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 2, 2, 2, 1 - ), component.GetLocalTransform (0), 0.00001f, "AfterSetLocalTransform at 0"); - - // Let's set the local transform at all times - component.SetLocalTransform (m4); - - // And we get the identity matrix back at all times - Asserts.AreEqual (Matrix4.Identity, component.GetLocalTransform (0), "Second identity at 0"); - Asserts.AreEqual (Matrix4.Identity, component.GetLocalTransform (1), "Second identity at 1"); - - // Translate again - obj.SetTranslation (new Vector3 (3, 3, 3), 0); - - // Set the local transform using a 4x4 matrix - component.SetLocalTransform4x4 (m4x4, 1); - - // And at time 0.5 we still get a middle ground - // The numbers are different now because the translation matrix was different, - // and the matrix is correct because we're checking the 4x4 version. - Asserts.AreEqual (new MatrixFloat4x4 ( - 1, 0, 0, 1.5f, - 0, 1, 0, 1.5f, - 0, 0, 1, 1.5f, - 0, 0, 0, 1 - ), component.GetLocalTransform4x4 (0.5), 0.00001f, "AfterSetLocalTransform4x4 at 0.5"); - } - } - - [Test] - public void CreateGlobalTransformTest () - { - Matrix4 m4; - MatrixFloat4x4 m4x4; - - using (var obj = new MDLObject ()) { - m4 = MDLTransform.CreateGlobalTransform (obj, 0); - Asserts.AreEqual ((Matrix4) MatrixFloat4x4.Transpose (CFunctions.MDLTransform_CreateGlobalTransform (obj, 0)), m4, "CreateGlobalTransform"); - - m4x4 = MDLTransform.CreateGlobalTransform4x4 (obj, 0); - Asserts.AreEqual (CFunctions.MDLTransform_CreateGlobalTransform (obj, 0), m4, "CreateGlobalTransform4x4"); - } - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/ModelIO/MDLVoxelArrayTest.cs b/tests/monotouch-test/ModelIO/MDLVoxelArrayTest.cs deleted file mode 100644 index 0212a3a6827..00000000000 --- a/tests/monotouch-test/ModelIO/MDLVoxelArrayTest.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// MDLAssert Unit Tests -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright 2017 Microsoft Inc. -// - -#if !__WATCHOS__ - -using System; -#if XAMCORE_2_0 -using CoreGraphics; -using Foundation; -#if !MONOMAC -using UIKit; -#endif -#if !__TVOS__ -using MultipeerConnectivity; -#endif -using ModelIO; -using ObjCRuntime; -#else -using MonoTouch.CoreGraphics; -using MonoTouch.Foundation; -#if !__TVOS__ -using MonoTouch.MultipeerConnectivity; -#endif -using MonoTouch.UIKit; -using MonoTouch.ModelIO; -using MonoTouch.ObjCRuntime; -#endif -using OpenTK; -using NUnit.Framework; - -namespace MonoTouchFixtures.ModelIO -{ - - [TestFixture] - // we want the test to be available if we use the linker - [Preserve (AllMembers = true)] - public class MDLVoxelArrayTest - { - [TestFixtureSetUp] - public void Setup () - { - TestRuntime.AssertXcodeVersion (7, 0); - } - - [Test] - public void BoundingBoxTest () - { - MDLAxisAlignedBoundingBox box = new MDLAxisAlignedBoundingBox ( - new Vector3 (4, 5, 6), - new Vector3 (1, 2, 3) - ); - using (var data = new NSData ()) { - using (var obj = new MDLVoxelArray (data, box, 1.0f)) { - Asserts.AreEqual (box, obj.BoundingBox, "BoundingBox"); - - var extents = new MDLVoxelIndexExtent2 ( - new Vector4i (1, 2, 3, 4), - new Vector4i (5, 6, 7, 8)); - var voxels = obj.GetVoxels (extents); - Assert.IsNull (voxels, "GetVoxels"); - - extents = obj.VoxelIndexExtent2; - Asserts.AreEqual (-1, extents.MaximumExtent.X, "MaxX"); - Asserts.AreEqual (-1, extents.MaximumExtent.Y, "MaxY"); - Asserts.AreEqual (-1, extents.MaximumExtent.Z, "MaxZ"); - Asserts.AreEqual (0, extents.MaximumExtent.W, "MaxW"); - Asserts.AreEqual (0, extents.MinimumExtent.X, "MinX"); - Asserts.AreEqual (0, extents.MinimumExtent.Y, "MinY"); - Asserts.AreEqual (0, extents.MinimumExtent.Z, "MinZ"); - Asserts.AreEqual (0, extents.MinimumExtent.W, "MinW"); - } - } - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs b/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs index 7023661c148..7dfc0d8ae58 100644 --- a/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs +++ b/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs @@ -1427,12 +1427,10 @@ public void TestNativeObjectArray () } } - public class NativeObjectArrayType : NSObject + public class NativeObjectArrayType : MKMapView { public IMKAnnotation[] Annotations; - - [Export ("addAnnotations:")] - public void AddAnnotations (params IMKAnnotation[] annotations) + public override void AddAnnotations(params IMKAnnotation[] annotations) { this.Annotations = annotations; } @@ -2591,15 +2589,4 @@ public void WithUserDelegateTypeAttribute () block.CleanupBlock (); } } - - [Preserve] - class OverloadByStaticity : NSObject - { - // Two Objective-C methods can have the same selector if one is static and the other instance. - [Export ("method")] - public void InstanceMethod () { } - - [Export ("method")] - public static void StaticMethod () { } - } } diff --git a/tests/monotouch-test/PassKit/PKPaymentRequestTest.cs b/tests/monotouch-test/PassKit/PKPaymentRequestTest.cs deleted file mode 100644 index a535cca88ca..00000000000 --- a/tests/monotouch-test/PassKit/PKPaymentRequestTest.cs +++ /dev/null @@ -1,77 +0,0 @@ -#if !__TVOS__ - -using System; -#if XAMCORE_2_0 -using Foundation; -using UIKit; -using PassKit; -#else -using MonoTouch.Foundation; -using MonoTouch.PassKit; -using MonoTouch.UIKit; -#endif -using NUnit.Framework; - -namespace MonoTouchFixtures.PassKit { - - [TestFixture] - [Preserve (AllMembers = true)] - public class PKPaymentRequestTest { - - [Test] - public void RequiredBillingContactFields () - { - TestRuntime.AssertXcodeVersion (9,0); - - using (var pr = new PKPaymentRequest ()) { - Assert.That (pr.RequiredBillingContactFields, Is.EqualTo (PKContactFields.None), "None"); - - pr.RequiredBillingContactFields |= PKContactFields.PostalAddress; - Assert.That (pr.RequiredBillingContactFields, Is.EqualTo (PKContactFields.PostalAddress), "PostalAddress"); - - pr.RequiredBillingContactFields |= PKContactFields.EmailAddress; - pr.RequiredBillingContactFields |= PKContactFields.PhoneNumber; - pr.RequiredBillingContactFields |= PKContactFields.Name; - pr.RequiredBillingContactFields |= PKContactFields.PhoneticName; - Assert.That (pr.WeakRequiredBillingContactFields.Count, Is.EqualTo (5), "Count-5"); - - pr.RequiredBillingContactFields = PKContactFields.PhoneticName; - Assert.That (pr.RequiredBillingContactFields, Is.EqualTo (PKContactFields.PhoneticName), "PhoneticName"); - } - } - - [Test] - public void WeakRequiredBillingContactFields () - { - TestRuntime.AssertXcodeVersion (9,0); - - using (var pr = new PKPaymentRequest ()) { - Assert.That (pr.WeakRequiredBillingContactFields.Count, Is.EqualTo (0), "Count"); - - using (var set = new NSMutableSet ()) { - pr.WeakRequiredBillingContactFields = set; - Assert.That (pr.WeakRequiredBillingContactFields.Count, Is.EqualTo (0), "Count-0"); - set.Add (PKContactFields.PostalAddress.GetConstant ()); - Assert.That (pr.WeakRequiredBillingContactFields.Count, Is.EqualTo (1), "Count-1"); - set.Add (PKContactFields.EmailAddress.GetConstant ()); - Assert.That (pr.WeakRequiredBillingContactFields.Count, Is.EqualTo (2), "Count-2"); - set.Add (PKContactFields.PhoneNumber.GetConstant ()); - Assert.That (pr.WeakRequiredBillingContactFields.Count, Is.EqualTo (3), "Count-3"); - set.Add (PKContactFields.Name.GetConstant ()); - Assert.That (pr.WeakRequiredBillingContactFields.Count, Is.EqualTo (4), "Count-5"); - set.Add (PKContactFields.PhoneticName.GetConstant ()); - Assert.That (pr.WeakRequiredBillingContactFields.Count, Is.EqualTo (5), "Count-5"); - set.Add (PKContactFields.PhoneticName.GetConstant ()); - Assert.That (pr.WeakRequiredBillingContactFields.Count, Is.EqualTo (5), "Count-5b"); - set.Remove (PKContactFields.PhoneticName.GetConstant ()); - Assert.That (pr.WeakRequiredBillingContactFields.Count, Is.EqualTo (4), "Count-4b"); - set.RemoveAll (); - Assert.That (pr.WeakRequiredBillingContactFields.Count, Is.EqualTo (0), "Count-0b"); - } - } - } - } -} - -#endif - diff --git a/tests/monotouch-test/PdfKit/PdfAnnotationTest.cs b/tests/monotouch-test/PdfKit/PdfAnnotationTest.cs deleted file mode 100644 index 23fbb04c079..00000000000 --- a/tests/monotouch-test/PdfKit/PdfAnnotationTest.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// PdfAnnotation Unit Tests -// -// Authors: -// Rolf Bjarne Kvinge -// -// Copyright 2017 Microsoft Inc. -// - -#if (__IOS__ || MONOMAC) && XAMCORE_2_0 - -using System; - -using CoreGraphics; -using Foundation; -using ObjCRuntime; -using PdfKit; - -using NUnit.Framework; - -namespace MonoTouchFixtures.PdfKit -{ - - [TestFixture] - // we want the test to be available if we use the linker - [Preserve (AllMembers = true)] - public class PdfAnnotationTest - { - [TestFixtureSetUp] - public void Setup () - { - TestRuntime.AssertXcodeVersion (9, 0); - } - - [Test] - public void QuadrilateralPoints () - { - using (var obj = new PdfAnnotation ()) { - Assert.IsNotNull (obj.QuadrilateralPoints, "Q1"); - Assert.AreEqual (0, obj.QuadrilateralPoints.Length, "Q1b"); - - var points = new CGPoint [] - { - new CGPoint (0, 1), - new CGPoint (2, 3), - new CGPoint (4, 5), - new CGPoint (6, 7), - }; - - obj.QuadrilateralPoints = points; - Assert.AreEqual (points, obj.QuadrilateralPoints, "Q2"); - - obj.QuadrilateralPoints = null; - Assert.IsNotNull (obj.QuadrilateralPoints, "Q3"); - Assert.AreEqual (0, obj.QuadrilateralPoints.Length, "Q3b"); - } - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/ReplayKit/BroadcastHandlerTest.cs b/tests/monotouch-test/ReplayKit/BroadcastHandlerTest.cs deleted file mode 100644 index 78ec9909392..00000000000 --- a/tests/monotouch-test/ReplayKit/BroadcastHandlerTest.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -namespace monotouchtest.ReplayKit -{ - public class BroadcastHandlerTest - { - public BroadcastHandlerTest () - { - } - } -} diff --git a/tests/monotouch-test/Security/TrustTest.cs b/tests/monotouch-test/Security/TrustTest.cs index a8c0093075e..b75d09deb9d 100644 --- a/tests/monotouch-test/Security/TrustTest.cs +++ b/tests/monotouch-test/Security/TrustTest.cs @@ -63,10 +63,6 @@ static SecTrustResult Evaluate (SecTrust trust, bool expect_recoverable = false) return result; NSRunLoop.Main.RunUntil (NSDate.Now.AddSeconds (i)); } - // we have done our best (it has not failed, but did not confirm either) - // still it can't recover (we and expected it could) most likely due to external factors (e.g. network) - if (result == SecTrustResult.RecoverableTrustFailure && !expect_recoverable) - Assert.Inconclusive ("Cannot recover from RecoverableTrustFailure after 8 attempts"); return result; } @@ -118,12 +114,8 @@ public void HostName_Leaf_Only () Assert.That (policies.Length, Is.EqualTo (1), "Policies.Length"); Assert.That (policies [0].Handle, Is.EqualTo (policy.Handle), "Handle"); - var trust_result = SecTrustResult.Invalid; - if (TestRuntime.CheckXcodeVersion (9, 0)) - trust_result = SecTrustResult.RecoverableTrustFailure; // Result not invalidated starting with Xcode 9 beta 3. - // since we modified the `trust` instance it's result was invalidated - Assert.That (trust.GetTrustResult (), Is.EqualTo (trust_result), "GetTrustResult-2"); + Assert.That (trust.GetTrustResult (), Is.EqualTo (SecTrustResult.Invalid), "GetTrustResult-2"); } } } @@ -240,7 +232,6 @@ public void Trust_FullChain () SecTrustResult trust_result = SecTrustResult.Unspecified; var ios9 = TestRuntime.CheckXcodeVersion (7, 0); var ios10 = TestRuntime.CheckXcodeVersion (8, 0); - var ios11 = TestRuntime.CheckXcodeVersion (9, 0); if (ios10) trust_result = SecTrustResult.FatalTrustFailure; // iOS9 is not fully happy with the basic constraints: `SecTrustEvaluate [root AnchorTrusted BasicContraints]` @@ -272,13 +263,8 @@ public void Trust_FullChain () trust.SetAnchorCertificates (certs); Assert.That (trust.GetCustomAnchorCertificates ().Length, Is.EqualTo (certs.Count), "GetCustomAnchorCertificates"); - if (ios11) - trust_result = SecTrustResult.Unspecified; - else - trust_result = SecTrustResult.Invalid; - - // since we modified the `trust` instance it's result was invalidated (marked as unspecified on iOS 11) - Assert.That (trust.GetTrustResult (), Is.EqualTo (trust_result), "GetTrustResult-2"); + // since we modified the `trust` instance it's result was invalidated + Assert.That (trust.GetTrustResult (), Is.EqualTo (SecTrustResult.Invalid), "GetTrustResult"); } } } diff --git a/tests/monotouch-test/Simd/MatrixFloat2x2Test.cs b/tests/monotouch-test/Simd/MatrixFloat2x2Test.cs deleted file mode 100644 index d8eb9310bfe..00000000000 --- a/tests/monotouch-test/Simd/MatrixFloat2x2Test.cs +++ /dev/null @@ -1,304 +0,0 @@ - -using System; -using System.Diagnostics; - -using Foundation; -using ObjCRuntime; - -using OpenTK; -using MatrixFloat2x2 = global::OpenTK.NMatrix2; - -using NUnit.Framework; - -namespace MonoTouchFixtures.Simd -{ - [TestFixture] - [Preserve (AllMembers = true)] - public class MatrixFloat2x2Test - { - [Test] - public void Identity () - { - var identity = new MatrixFloat2x2 { - R0C0 = 1f, - R1C1 = 1f, - }; - Asserts.AreEqual (identity, MatrixFloat2x2.Identity, "identity"); - Asserts.AreEqual (Matrix2.Identity, MatrixFloat2x2.Identity, "opentk identity"); - } - - [Test] - public void ElementConstructor () - { - var expected = GetTestMatrix (); - var actual = new MatrixFloat2x2 (expected.R0C0, expected.R0C1, - expected.R1C0, expected.R1C1); - Asserts.AreEqual (expected, actual, "ctor 1"); - - } - - [Test] - public void Determinant () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat2x2) expected; - Assert.AreEqual (expected.Determinant, actual.Determinant, 0.000001f, "determinant\n" + actual); - } - - [Test] - public void Elements () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat2x2) expected; - - Assert.AreEqual (expected.R0C0, actual.R0C0, "R0C0 getter"); - Assert.AreEqual (expected.R0C1, actual.R0C1, "R0C1 getter"); - Assert.AreEqual (expected.R1C0, actual.R1C0, "R1C0 getter"); - Assert.AreEqual (expected.R1C1, actual.R1C1, "R1C1 getter"); - - var newExpected = GetTestMatrix (); - actual.R0C0 = newExpected.R0C0; - actual.R0C1 = newExpected.R0C1; - actual.R1C0 = newExpected.R1C0; - actual.R1C1 = newExpected.R1C1; - Assert.AreEqual (newExpected.R0C0, actual.R0C0, "R0C0 setter"); - Assert.AreEqual (newExpected.R0C1, actual.R0C1, "R0C1 setter"); - Assert.AreEqual (newExpected.R1C0, actual.R1C0, "R1C0 setter"); - Assert.AreEqual (newExpected.R1C1, actual.R1C1, "R1C1 setter"); - } - - [Test] - public void TransposeInstance () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat2x2) expected; - - expected.Transpose (); - actual.Transpose (); - - Asserts.AreEqual (expected, actual, "transpose"); - } - - [Test] - public void TransposeStatic () - { - var input = GetTestMatrix (); - var inputSimd = (MatrixFloat2x2) input; - - Matrix2 expected; - Matrix2.Transpose (ref input, out expected); - var actual = MatrixFloat2x2.Transpose (inputSimd); - - Asserts.AreEqual (expected, actual, "transpose"); - - input = GetTestMatrix (); - inputSimd = (MatrixFloat2x2) input; - Matrix2.Transpose (ref input, out expected); - MatrixFloat2x2.Transpose (ref inputSimd, out actual); - Asserts.AreEqual (expected, actual, "transpose out/ref"); - } - - [Test] - public void TransposeStatic_ByRef () - { - var input = GetTestMatrix (); - var inputSimd = (MatrixFloat2x2) input; - - Matrix2 expected; - MatrixFloat2x2 actual; - - Matrix2.Transpose (ref input, out expected); - MatrixFloat2x2.Transpose (ref inputSimd, out actual); - Asserts.AreEqual (expected, actual, "transpose out/ref"); - } - - [Test] - public void Multiply () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat2x2) inputL; - var inputSimdR = (MatrixFloat2x2) inputR; - Matrix2 expected; - Matrix2.Multiply (ref inputR, ref inputL, out expected); // OpenTK.Matrix2 got left/right mixed up... - var actual = MatrixFloat2x2.Multiply (inputSimdL, inputSimdR); - - Asserts.AreEqual (expected, actual, "multiply"); - } - - [Test] - public void Multiply_ByRef () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat2x2) inputL; - var inputSimdR = (MatrixFloat2x2) inputR; - Matrix2 expected; - MatrixFloat2x2 actual; - - Matrix2.Multiply (ref inputR, ref inputL, out expected); // OpenTK.Matrix2 got left/right mixed up... - MatrixFloat2x2.Multiply (ref inputSimdL, ref inputSimdR, out actual); - - Asserts.AreEqual (expected, actual, "multiply"); - } - - - [Test] - public void Multiply_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat2x2) inputL; - var inputSimdR = (MatrixFloat2x2) inputR; - Matrix2 expected; - Matrix2.Multiply (ref inputR, ref inputL, out expected); // OpenTK.Matrix2 got left/right mixed up... - var actual = inputSimdL * inputSimdR; - - Asserts.AreEqual (expected, actual, "multiply"); - } - - [Test] - public void Equality_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat2x2) inputL; - var inputSimdR = (MatrixFloat2x2) inputR; - - // matrices are different - Assert.AreEqual (inputL.Equals (inputR), inputSimdL == inputSimdR, "inequality"); - Assert.IsFalse (inputL.Equals (inputR), "inequality 2 expected"); - Assert.IsFalse (inputSimdL == inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (inputL.Equals (inputR), inputSimdL == inputSimdR, "equality"); - Assert.IsTrue (inputL.Equals (inputR), "equality 2 expected"); - Assert.IsTrue (inputSimdL == inputSimdR, "equality 2 actual"); - - Assert.IsTrue (MatrixFloat2x2.Identity == (MatrixFloat2x2) Matrix2.Identity, "identity equality"); - } - - [Test] - public void Inequality_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat2x2) inputL; - var inputSimdR = (MatrixFloat2x2) inputR; - - // matrices are different - Assert.AreEqual (!inputL.Equals (inputR), inputSimdL != inputSimdR, "inequality"); - Assert.IsTrue (!inputL.Equals (inputR), "inequality 2 expected"); - Assert.IsTrue (inputSimdL != inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (!inputL.Equals (inputR), inputSimdL != inputSimdR, "equality"); - Assert.IsFalse (!inputL.Equals (inputR), "equality 2 expected"); - Assert.IsFalse (inputSimdL != inputSimdR, "equality 2 actual"); - - Assert.IsFalse (MatrixFloat2x2.Identity != (MatrixFloat2x2) Matrix2.Identity, "identity equality"); - } - - [Test] - public void Explicit_Operator_ToMatrix2 () - { - var expected = (MatrixFloat2x2) GetTestMatrix (); - var actual = (Matrix2) expected; - - Asserts.AreEqual (expected, actual, "tomatrix2"); - - actual = (Matrix2) MatrixFloat2x2.Identity; - Asserts.AreEqual (MatrixFloat2x2.Identity, actual, "tomatrix2 identity"); - Asserts.AreEqual (Matrix2.Identity, actual, "tomatrix2 identity2"); - } - - [Test] - public void Explicit_Operator_FromMatrix2 () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat2x2) expected; - - Asserts.AreEqual (expected, actual, "frommatrix2"); - - actual = (MatrixFloat2x2) Matrix2.Identity; - Asserts.AreEqual (MatrixFloat2x2.Identity, actual, "tomatrix2 identity"); - Asserts.AreEqual (Matrix2.Identity, actual, "tomatrix2 identity2"); - } - - [Test] - public void ToStringTest () - { - var actual = new MatrixFloat2x2 (1, 2, 3, 4); - - Assert.AreEqual ("(1, 2)\n(3, 4)", actual.ToString (), "tostring"); - } - - // GetHashCode doesn't have to be identical, so no need to test - - [Test] - public void Equals_Object () - { - var expectedA = GetTestMatrix (); - var expectedB = GetTestMatrix (); - var actualA = (MatrixFloat2x2) expectedA; - var actualB = (MatrixFloat2x2) expectedB; - - Assert.IsTrue (actualA.Equals ((object) actualA), "self"); - Assert.IsFalse (actualA.Equals ((object) actualB), "other"); - Assert.IsFalse (actualA.Equals (null), "null"); - Assert.IsFalse (actualA.Equals (expectedA), "other type"); - } - - [Test] - public void Equals_Matrix () - { - var expectedA = GetTestMatrix (); - var expectedB = GetTestMatrix (); - var actualA = (MatrixFloat2x2) expectedA; - var actualB = (MatrixFloat2x2) expectedB; - - Assert.IsTrue (actualA.Equals (actualA), "self"); - Assert.IsFalse (actualA.Equals (actualB), "other"); - } - - // A collection of test matrices. - // - // I initially tried randomly generating test matrices, but it turns out - // there are accumulative computational differences in the different algorithms - // between Matrix2 and MatrixFloat2x2. Since the differences are accumulative, - // I couldn't find a minimal sensible delta values when comparing - // matrices. - // - // So I just serialized a few matrices that were randomly generated, and - // these have been tested to not produce accumulative computational differences. - // - static Matrix2 [] test_matrices = new [] { - new Matrix2 (3, 5, 7, 11), - new Matrix2 (5, 7, 11, 13), - new Matrix2 (7, 11, 13, 17), - new Matrix2 (0.1532144f, 0.5451511f, 0.2004739f, 0.8351463f), - new Matrix2 (0.7717745f, 0.559364f, 0.00918373f, 0.6579159f), - new Matrix2 (0.2023053f, 0.4701468f, 0.6618567f, 0.7685714f), - new Matrix2 (9.799572E+08f, 1.64794E+09f, 1.117296E+09f, 1.239858E+09f), - new Matrix2 (1.102396E+09f, 3.082477E+08f, 1.126484E+09f, 5.022931E+08f), - new Matrix2 (2.263112E+08f, 8.79644E+08f, 1.303282E+09f, 1.654159E+09f), - new Matrix2 (0.4904693f, 0.841727f, 0.2294401f, 0.5736054f), - new Matrix2 (0.1252193f, 0.08986127f, 0.3407605f, 0.9144857f), - new Matrix2 (8.176959E+08f, 1.386156E+09f, 5.956444E+08f, 4.210506E+08f), - new Matrix2 (0.006755914f, 0.07464754f, 0.287938f, 0.3724834f), - }; - - static int counter; - internal static Matrix2 GetTestMatrix () - { - counter++; - if (counter == test_matrices.Length) - counter = 0; - return test_matrices [counter]; - } - } -} diff --git a/tests/monotouch-test/Simd/MatrixFloat3x3Test.cs b/tests/monotouch-test/Simd/MatrixFloat3x3Test.cs deleted file mode 100644 index ad631ae6b6a..00000000000 --- a/tests/monotouch-test/Simd/MatrixFloat3x3Test.cs +++ /dev/null @@ -1,321 +0,0 @@ - -using System; -using System.Diagnostics; - -using Foundation; -using ObjCRuntime; - -using OpenTK; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; - -using NUnit.Framework; - -namespace MonoTouchFixtures.Simd -{ - [TestFixture] - [Preserve (AllMembers = true)] - public class MatrixFloat3x3Test - { - [Test] - public void Identity () - { - var identity = new MatrixFloat3x3 { - R0C0 = 1f, - R1C1 = 1f, - R2C2 = 1f, - }; - Asserts.AreEqual (identity, MatrixFloat3x3.Identity, "identity"); - Asserts.AreEqual (Matrix3.Identity, MatrixFloat3x3.Identity, "opentk identity"); - } - - [Test] - public void ElementConstructor () - { - var expected = GetTestMatrix (); - var actual = new MatrixFloat3x3 (expected.R0C0, expected.R0C1, expected.R0C2, - expected.R1C0, expected.R1C1, expected.R1C2, - expected.R2C0, expected.R2C1, expected.R2C2); - Asserts.AreEqual (expected, actual, "ctor 1"); - - } - - [Test] - public void Determinant () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat3x3) expected; - Assert.AreEqual (expected.Determinant, actual.Determinant, 0.000001f, "determinant\n" + actual); - } - - [Test] - public void Elements () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat3x3) expected; - - Assert.AreEqual (expected.R0C0, actual.R0C0, "R0C0 getter"); - Assert.AreEqual (expected.R0C1, actual.R0C1, "R0C1 getter"); - Assert.AreEqual (expected.R0C2, actual.R0C2, "R0C2 getter"); - Assert.AreEqual (expected.R1C0, actual.R1C0, "R1C0 getter"); - Assert.AreEqual (expected.R1C1, actual.R1C1, "R1C1 getter"); - Assert.AreEqual (expected.R1C2, actual.R1C2, "R1C2 getter"); - Assert.AreEqual (expected.R2C0, actual.R2C0, "R2C0 getter"); - Assert.AreEqual (expected.R2C1, actual.R2C1, "R2C1 getter"); - Assert.AreEqual (expected.R2C2, actual.R2C2, "R2C2 getter"); - - var newExpected = GetTestMatrix (); - actual.R0C0 = newExpected.R0C0; - actual.R0C1 = newExpected.R0C1; - actual.R0C2 = newExpected.R0C2; - actual.R1C0 = newExpected.R1C0; - actual.R1C1 = newExpected.R1C1; - actual.R1C2 = newExpected.R1C2; - actual.R2C0 = newExpected.R2C0; - actual.R2C1 = newExpected.R2C1; - actual.R2C2 = newExpected.R2C2; - Assert.AreEqual (newExpected.R0C0, actual.R0C0, "R0C0 setter"); - Assert.AreEqual (newExpected.R0C1, actual.R0C1, "R0C1 setter"); - Assert.AreEqual (newExpected.R0C2, actual.R0C2, "R0C2 setter"); - Assert.AreEqual (newExpected.R1C0, actual.R1C0, "R1C0 setter"); - Assert.AreEqual (newExpected.R1C1, actual.R1C1, "R1C1 setter"); - Assert.AreEqual (newExpected.R1C2, actual.R1C2, "R1C2 setter"); - Assert.AreEqual (newExpected.R2C0, actual.R2C0, "R2C0 setter"); - Assert.AreEqual (newExpected.R2C1, actual.R2C1, "R2C1 setter"); - Assert.AreEqual (newExpected.R2C2, actual.R2C2, "R2C2 setter"); - } - - [Test] - public void TransposeInstance () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat3x3) expected; - - expected.Transpose (); - actual.Transpose (); - - Asserts.AreEqual (expected, actual, "transpose"); - } - - [Test] - public void TransposeStatic () - { - var input = GetTestMatrix (); - var inputSimd = (MatrixFloat3x3) input; - - Matrix3 expected; - Matrix3.Transpose (ref input, out expected); - var actual = MatrixFloat3x3.Transpose (inputSimd); - - Asserts.AreEqual (expected, actual, "transpose"); - - input = GetTestMatrix (); - inputSimd = (MatrixFloat3x3) input; - Matrix3.Transpose (ref input, out expected); - MatrixFloat3x3.Transpose (ref inputSimd, out actual); - Asserts.AreEqual (expected, actual, "transpose out/ref"); - } - - [Test] - public void TransposeStatic_ByRef () - { - var input = GetTestMatrix (); - var inputSimd = (MatrixFloat3x3) input; - - Matrix3 expected; - MatrixFloat3x3 actual; - - Matrix3.Transpose (ref input, out expected); - MatrixFloat3x3.Transpose (ref inputSimd, out actual); - Asserts.AreEqual (expected, actual, "transpose out/ref"); - } - - [Test] - public void Multiply () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat3x3) inputL; - var inputSimdR = (MatrixFloat3x3) inputR; - Matrix3 expected; - Matrix3.Multiply (ref inputR, ref inputL, out expected); // OpenTK.Matrix3 got left/right mixed up... - var actual = MatrixFloat3x3.Multiply (inputSimdL, inputSimdR); - - Asserts.AreEqual (expected, actual, "multiply"); - } - - [Test] - public void Multiply_ByRef () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat3x3) inputL; - var inputSimdR = (MatrixFloat3x3) inputR; - Matrix3 expected; - MatrixFloat3x3 actual; - - Matrix3.Multiply (ref inputR, ref inputL, out expected); // OpenTK.Matrix3 got left/right mixed up... - MatrixFloat3x3.Multiply (ref inputSimdL, ref inputSimdR, out actual); - - Asserts.AreEqual (expected, actual, "multiply"); - } - - - [Test] - public void Multiply_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat3x3) inputL; - var inputSimdR = (MatrixFloat3x3) inputR; - Matrix3 expected; - Matrix3.Multiply (ref inputR, ref inputL, out expected); // OpenTK.Matrix3 got left/right mixed up... - var actual = inputSimdL * inputSimdR; - - Asserts.AreEqual (expected, actual, "multiply"); - } - - [Test] - public void Equality_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat3x3) inputL; - var inputSimdR = (MatrixFloat3x3) inputR; - - // matrices are different - Assert.AreEqual (inputL.Equals (inputR), inputSimdL == inputSimdR, "inequality"); - Assert.IsFalse (inputL.Equals (inputR), "inequality 2 expected"); - Assert.IsFalse (inputSimdL == inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (inputL.Equals (inputR), inputSimdL == inputSimdR, "equality"); - Assert.IsTrue (inputL.Equals (inputR), "equality 2 expected"); - Assert.IsTrue (inputSimdL == inputSimdR, "equality 2 actual"); - - Assert.IsTrue (MatrixFloat3x3.Identity == (MatrixFloat3x3) Matrix3.Identity, "identity equality"); - } - - [Test] - public void Inequality_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat3x3) inputL; - var inputSimdR = (MatrixFloat3x3) inputR; - - // matrices are different - Assert.AreEqual (!inputL.Equals (inputR), inputSimdL != inputSimdR, "inequality"); - Assert.IsTrue (!inputL.Equals (inputR), "inequality 2 expected"); - Assert.IsTrue (inputSimdL != inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (!inputL.Equals (inputR), inputSimdL != inputSimdR, "equality"); - Assert.IsFalse (!inputL.Equals (inputR), "equality 2 expected"); - Assert.IsFalse (inputSimdL != inputSimdR, "equality 2 actual"); - - Assert.IsFalse (MatrixFloat3x3.Identity != (MatrixFloat3x3) Matrix3.Identity, "identity equality"); - } - - [Test] - public void Explicit_Operator_ToMatrix3 () - { - var expected = (MatrixFloat3x3) GetTestMatrix (); - var actual = (Matrix3) expected; - - Asserts.AreEqual (expected, actual, "tomatrix4"); - - actual = (Matrix3) MatrixFloat3x3.Identity; - Asserts.AreEqual (MatrixFloat3x3.Identity, actual, "tomatrix4 identity"); - Asserts.AreEqual (Matrix3.Identity, actual, "tomatrix4 identity2"); - } - - [Test] - public void Explicit_Operator_FromMatrix3 () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat3x3) expected; - - Asserts.AreEqual (expected, actual, "frommatrix4"); - - actual = (MatrixFloat3x3) Matrix3.Identity; - Asserts.AreEqual (MatrixFloat3x3.Identity, actual, "tomatrix4 identity"); - Asserts.AreEqual (Matrix3.Identity, actual, "tomatrix4 identity2"); - } - - [Test] - public void ToStringTest () - { - var actual = new MatrixFloat3x3 (1, 2, 3, 4, 5, 6, 7, 8, 9); - - Assert.AreEqual ("(1, 2, 3)\n(4, 5, 6)\n(7, 8, 9)", actual.ToString (), "tostring"); - } - - // GetHashCode doesn't have to be identical, so no need to test - - [Test] - public void Equals_Object () - { - var expectedA = GetTestMatrix (); - var expectedB = GetTestMatrix (); - var actualA = (MatrixFloat3x3) expectedA; - var actualB = (MatrixFloat3x3) expectedB; - - Assert.IsTrue (actualA.Equals ((object) actualA), "self"); - Assert.IsFalse (actualA.Equals ((object) actualB), "other"); - Assert.IsFalse (actualA.Equals (null), "null"); - Assert.IsFalse (actualA.Equals (expectedA), "other type"); - } - - [Test] - public void Equals_Matrix () - { - var expectedA = GetTestMatrix (); - var expectedB = GetTestMatrix (); - var actualA = (MatrixFloat3x3) expectedA; - var actualB = (MatrixFloat3x3) expectedB; - - Assert.IsTrue (actualA.Equals (actualA), "self"); - Assert.IsFalse (actualA.Equals (actualB), "other"); - } - - // A collection of test matrices. - // - // I initially tried randomly generating test matrices, but it turns out - // there are accumulative computational differences in the different algorithms - // between Matrix3 and MatrixFloat3x3. Since the differences are accumulative, - // I couldn't find a minimal sensible delta values when comparing - // matrices. - // - // So I just serialized a few matrices that were randomly generated, and - // these have been tested to not produce accumulative computational differences. - // - static Matrix3 [] test_matrices = new [] { - new Matrix3 (3, 5, 7, 11, 13, 17, 19, 23, 29), - new Matrix3 (5, 7, 11, 13, 17, 19, 23, 29, 31), - new Matrix3 (7, 11, 13, 17, 19, 23, 29, 31, 37), - new Matrix3 (0.1532144f, 0.5451511f, 0.2004739f, 0.8351463f, 0.9884372f, 0.1313103f, 0.3327205f, 0.01164342f, 0.6563147f), - new Matrix3 (0.7717745f, 0.559364f, 0.00918373f, 0.6579159f, 0.123461f, 0.9993145f, 0.5487496f, 0.2823398f, 0.9710717f), - new Matrix3 (0.2023053f, 0.4701468f, 0.6618567f, 0.7685714f, 0.8561344f, 0.009231919f, 0.6150167f, 0.7542298f, 0.550727f), - new Matrix3 (9.799572E+08f, 1.64794E+09f, 1.117296E+09f, 1.239858E+09f, 6.389504E+07f, 1.172175E+09f, 1.399567E+09f, 1.187143E+09f, 3.729208E+07f), - new Matrix3 (1.102396E+09f, 3.082477E+08f, 1.126484E+09f, 5.022931E+08f, 1.966322E+09f, 1.1814E+09f, 8.464673E+08f, 1.940651E+09f, 1.229937E+09f), - new Matrix3 (2.263112E+08f, 8.79644E+08f, 1.303282E+09f, 1.654159E+09f, 3.705524E+08f, 1.984941E+09f, 2.175935E+07f, 4.633518E+08f, 1.801243E+09f), - new Matrix3 (0.4904693f, 0.841727f, 0.2294401f, 0.5736054f, 0.5406881f, 0.2172498f, 0.1261143f, 0.6736677f, 0.4570194f), - new Matrix3 (0.1252193f, 0.08986127f, 0.3407605f, 0.9144857f, 0.340791f, 0.2192288f, 0.5144276f, 0.01813344f, 0.07687104f), - new Matrix3 (8.176959E+08f, 1.386156E+09f, 5.956444E+08f, 4.210506E+08f, 1.212676E+09f, 4.131035E+08f, 1.032453E+09f, 2.074689E+08f, 1.536594E+09f), - new Matrix3 (0.006755914f, 0.07464754f, 0.287938f, 0.3724834f, 0.1496783f, 0.6224982f, 0.7150125f, 0.5554719f, 0.4638171f), - }; - - static int counter; - internal static Matrix3 GetTestMatrix () - { - counter++; - if (counter == test_matrices.Length) - counter = 0; - return test_matrices [counter]; - } - } -} diff --git a/tests/monotouch-test/Simd/MatrixFloat4x3Test.cs b/tests/monotouch-test/Simd/MatrixFloat4x3Test.cs deleted file mode 100644 index 8a55f288fca..00000000000 --- a/tests/monotouch-test/Simd/MatrixFloat4x3Test.cs +++ /dev/null @@ -1,188 +0,0 @@ - -using System; -using System.Diagnostics; - -using Foundation; -using ObjCRuntime; - -using OpenTK; - -using NUnit.Framework; - -namespace MonoTouchFixtures.Simd -{ - [TestFixture] - [Preserve (AllMembers = true)] - public class NMatrix4x3Test - { - [Test] - public void ElementConstructor () - { - var expected = GetTestMatrix (); - var actual = new NMatrix4x3 ( - expected.M11, expected.M12, expected.M13, expected.M14, - expected.M21, expected.M22, expected.M23, expected.M24, - expected.M31, expected.M32, expected.M33, expected.M34); - Asserts.AreEqual (expected, actual, "ctor 1"); - - } - - [Test] - public void Elements () - { - var expected = GetTestMatrix (); - var actual = (NMatrix4x3) expected; - - Assert.AreEqual (expected.M11, actual.M11, "m11 getter"); - Assert.AreEqual (expected.M12, actual.M12, "m12 getter"); - Assert.AreEqual (expected.M13, actual.M13, "m13 getter"); - Assert.AreEqual (expected.M14, actual.M14, "m14 getter"); - Assert.AreEqual (expected.M21, actual.M21, "m21 getter"); - Assert.AreEqual (expected.M22, actual.M22, "m22 getter"); - Assert.AreEqual (expected.M23, actual.M23, "m23 getter"); - Assert.AreEqual (expected.M24, actual.M24, "m24 getter"); - Assert.AreEqual (expected.M31, actual.M31, "m31 getter"); - Assert.AreEqual (expected.M32, actual.M32, "m32 getter"); - Assert.AreEqual (expected.M33, actual.M33, "m33 getter"); - Assert.AreEqual (expected.M34, actual.M34, "m34 getter"); - - var newExpected = GetTestMatrix (); - actual.M11 = newExpected.M11; - actual.M12 = newExpected.M12; - actual.M13 = newExpected.M13; - actual.M14 = newExpected.M14; - actual.M21 = newExpected.M21; - actual.M22 = newExpected.M22; - actual.M23 = newExpected.M23; - actual.M24 = newExpected.M24; - actual.M31 = newExpected.M31; - actual.M32 = newExpected.M32; - actual.M33 = newExpected.M33; - actual.M34 = newExpected.M34; - Assert.AreEqual (newExpected.M11, actual.M11, "m11 setter"); - Assert.AreEqual (newExpected.M12, actual.M12, "m12 setter"); - Assert.AreEqual (newExpected.M13, actual.M13, "m13 setter"); - Assert.AreEqual (newExpected.M14, actual.M14, "m14 setter"); - Assert.AreEqual (newExpected.M21, actual.M21, "m21 setter"); - Assert.AreEqual (newExpected.M22, actual.M22, "m22 setter"); - Assert.AreEqual (newExpected.M23, actual.M23, "m23 setter"); - Assert.AreEqual (newExpected.M24, actual.M24, "m24 setter"); - Assert.AreEqual (newExpected.M31, actual.M31, "m31 setter"); - Assert.AreEqual (newExpected.M32, actual.M32, "m32 setter"); - Assert.AreEqual (newExpected.M33, actual.M33, "m33 setter"); - Assert.AreEqual (newExpected.M34, actual.M34, "m34 setter"); - } - - [Test] - public void Equality_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (NMatrix4x3) inputL; - var inputSimdR = (NMatrix4x3) inputR; - - // matrices are different - Assert.AreEqual (inputL == inputR, inputSimdL == inputSimdR, "inequality"); - Assert.IsFalse (inputL == inputR, "inequality 2 expected"); - Assert.IsFalse (inputSimdL == inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (inputL == inputR, inputSimdL == inputSimdR, "equality"); - Assert.IsTrue (inputL == inputR, "equality 2 expected"); - Assert.IsTrue (inputSimdL == inputSimdR, "equality 2 actual"); - } - - [Test] - public void Inequality_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (NMatrix4x3) inputL; - var inputSimdR = (NMatrix4x3) inputR; - - // matrices are different - Assert.AreEqual (inputL != inputR, inputSimdL != inputSimdR, "inequality"); - Assert.IsTrue (inputL != inputR, "inequality 2 expected"); - Assert.IsTrue (inputSimdL != inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (inputL != inputR, inputSimdL != inputSimdR, "equality"); - Assert.IsFalse (inputL != inputR, "equality 2 expected"); - Assert.IsFalse (inputSimdL != inputSimdR, "equality 2 actual"); - } - - [Test] - public void ToStringTest () - { - var expected = GetTestMatrix (); - var actual = (NMatrix4x3) expected; - - Assert.AreEqual (expected.ToString (), actual.ToString (), "tostring"); - } - - // GetHashCode doesn't have to be identical, so no need to test - - [Test] - public void Equals_Object () - { - var expectedA = GetTestMatrix (); - var expectedB = GetTestMatrix (); - var actualA = (NMatrix4x3) expectedA; - var actualB = (NMatrix4x3) expectedB; - - Assert.IsTrue (actualA.Equals ((object) actualA), "self"); - Assert.IsFalse (actualA.Equals ((object) actualB), "other"); - Assert.IsFalse (actualA.Equals (null), "null"); - Assert.IsTrue (actualA.Equals (expectedA), "other type"); - } - - [Test] - public void Equals_Matrix () - { - var expectedA = GetTestMatrix (); - var expectedB = GetTestMatrix (); - var actualA = (NMatrix4x3) expectedA; - var actualB = (NMatrix4x3) expectedB; - - Assert.IsTrue (actualA.Equals (actualA), "self"); - Assert.IsFalse (actualA.Equals (actualB), "other"); - } - - // A collection of test matrices. - // - // I initially tried randomly generating test matrices, but it turns out - // there are accumulative computational differences in the different algorithms - // between Matrix4 and NMatrix4x3. Since the differences are accumulative, - // I couldn't find a minimal sensible delta values when comparing - // matrices. - // - // So I just serialized a few matrices that were randomly generated, and - // these have been tested to not produce accumulative computational differences. - // - static NMatrix4x3 [] test_matrices = new [] { - new NMatrix4x3 (0.1532144f, 0.5451511f, 0.2004739f, 0.8351463f, 0.9884372f, 0.1313103f, 0.3327205f, 0.01164342f, 0.6563147f, 0.7923161f, 0.6764754f, 0.07481737f), - new NMatrix4x3 (0.7717745f, 0.559364f, 0.00918373f, 0.6579159f, 0.123461f, 0.9993145f, 0.5487496f, 0.2823398f, 0.9710717f, 0.8750508f, 0.472472f, 0.2608089f), - new NMatrix4x3 (0.2023053f, 0.4701468f, 0.6618567f, 0.7685714f, 0.8561344f, 0.009231919f, 0.6150167f, 0.7542298f, 0.550727f, 0.3625788f, 0.6639862f, 0.5763468f), - new NMatrix4x3 (9.799572E+08f, 1.64794E+09f, 1.117296E+09f, 1.239858E+09f, 6.389504E+07f, 1.172175E+09f, 1.399567E+09f, 1.187143E+09f, 3.729208E+07f, 5.50313E+08f, 1.847369E+09f, 1.612405E+09f), - new NMatrix4x3 (1.102396E+09f, 3.082477E+08f, 1.126484E+09f, 5.022931E+08f, 1.966322E+09f, 1.1814E+09f, 8.464673E+08f, 1.940651E+09f, 1.229937E+09f, 1.367379E+09f, 1.900015E+09f, 1.516109E+09f), - new NMatrix4x3 (2.263112E+08f, 8.79644E+08f, 1.303282E+09f, 1.654159E+09f, 3.705524E+08f, 1.984941E+09f, 2.175935E+07f, 4.633518E+08f, 1.801243E+09f, 1.616996E+09f, 1.620852E+09f, 7291498f), - new NMatrix4x3 (0.4904693f, 0.841727f, 0.2294401f, 0.5736054f, 0.5406881f, 0.2172498f, 0.1261143f, 0.6736677f, 0.4570194f, 0.9091009f, 0.7669608f, 0.8468134f), - new NMatrix4x3 (0.1252193f, 0.08986127f, 0.3407605f, 0.9144857f, 0.340791f, 0.2192288f, 0.5144276f, 0.01813344f, 0.07687104f, 0.7971596f, 0.6393988f, 0.9002907f), - new NMatrix4x3 (8.176959E+08f, 1.386156E+09f, 5.956444E+08f, 4.210506E+08f, 1.212676E+09f, 4.131035E+08f, 1.032453E+09f, 2.074689E+08f, 1.536594E+09f, 3.266183E+07f, 5.222072E+08f, 7.923175E+08f), - new NMatrix4x3 (0.006755914f, 0.07464754f, 0.287938f, 0.3724834f, 0.1496783f, 0.6224982f, 0.7150125f, 0.5554719f, 0.4638171f, 0.4200902f, 0.4867154f, 0.773377f), - }; - - static int counter; - internal static NMatrix4x3 GetTestMatrix () - { - counter++; - if (counter == test_matrices.Length) - counter = 0; - return test_matrices [counter]; - } - } -} diff --git a/tests/monotouch-test/Simd/MatrixFloat4x4Test.cs b/tests/monotouch-test/Simd/MatrixFloat4x4Test.cs deleted file mode 100644 index f1e66f55403..00000000000 --- a/tests/monotouch-test/Simd/MatrixFloat4x4Test.cs +++ /dev/null @@ -1,348 +0,0 @@ - -using System; -using System.Diagnostics; - -using Foundation; -using ObjCRuntime; - -using OpenTK; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; - -using NUnit.Framework; - -namespace MonoTouchFixtures.Simd -{ - [TestFixture] - [Preserve (AllMembers = true)] - public class MatrixFloat4x4Test - { - [Test] - public void Identity () - { - var identity = new MatrixFloat4x4 { - M11 = 1f, - M22 = 1f, - M33 = 1f, - M44 = 1f, - }; - Asserts.AreEqual (identity, MatrixFloat4x4.Identity, "identity"); - Asserts.AreEqual (Matrix4.Identity, MatrixFloat4x4.Identity, "opentk identity"); - } - - [Test] - public void RowConstructor () - { - var expected = GetTestMatrix (); - var actual = new MatrixFloat4x4 (expected.Row0, expected.Row1, expected.Row2, expected.Row3); - Asserts.AreEqual (expected, actual, "ctor 1"); - } - - [Test] - public void ElementConstructor () - { - var expected = GetTestMatrix (); - var actual = new MatrixFloat4x4 (expected.M11, expected.M12, expected.M13, expected.M14, - expected.M21, expected.M22, expected.M23, expected.M24, - expected.M31, expected.M32, expected.M33, expected.M34, - expected.M41, expected.M42, expected.M43, expected.M44); - Asserts.AreEqual (expected, actual, "ctor 1"); - - } - - [Test] - public void Determinant () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat4x4) expected; - Assert.AreEqual (expected.Determinant, actual.Determinant, 0.000001f, "determinant\n" + actual); - - } - - [Test] - public void Elements () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat4x4) expected; - - Assert.AreEqual (expected.M11, actual.M11, "m11 getter"); - Assert.AreEqual (expected.M12, actual.M12, "m12 getter"); - Assert.AreEqual (expected.M13, actual.M13, "m13 getter"); - Assert.AreEqual (expected.M14, actual.M14, "m14 getter"); - Assert.AreEqual (expected.M21, actual.M21, "m21 getter"); - Assert.AreEqual (expected.M22, actual.M22, "m22 getter"); - Assert.AreEqual (expected.M23, actual.M23, "m23 getter"); - Assert.AreEqual (expected.M24, actual.M24, "m24 getter"); - Assert.AreEqual (expected.M31, actual.M31, "m31 getter"); - Assert.AreEqual (expected.M32, actual.M32, "m32 getter"); - Assert.AreEqual (expected.M33, actual.M33, "m33 getter"); - Assert.AreEqual (expected.M34, actual.M34, "m34 getter"); - Assert.AreEqual (expected.M41, actual.M41, "m41 getter"); - Assert.AreEqual (expected.M42, actual.M42, "m42 getter"); - Assert.AreEqual (expected.M43, actual.M43, "m43 getter"); - Assert.AreEqual (expected.M44, actual.M44, "m44 getter"); - - var newExpected = GetTestMatrix (); - actual.M11 = newExpected.M11; - actual.M12 = newExpected.M12; - actual.M13 = newExpected.M13; - actual.M14 = newExpected.M14; - actual.M21 = newExpected.M21; - actual.M22 = newExpected.M22; - actual.M23 = newExpected.M23; - actual.M24 = newExpected.M24; - actual.M31 = newExpected.M31; - actual.M32 = newExpected.M32; - actual.M33 = newExpected.M33; - actual.M34 = newExpected.M34; - actual.M41 = newExpected.M41; - actual.M42 = newExpected.M42; - actual.M43 = newExpected.M43; - actual.M44 = newExpected.M44; - Assert.AreEqual (newExpected.M11, actual.M11, "m11 setter"); - Assert.AreEqual (newExpected.M12, actual.M12, "m12 setter"); - Assert.AreEqual (newExpected.M13, actual.M13, "m13 setter"); - Assert.AreEqual (newExpected.M14, actual.M14, "m14 setter"); - Assert.AreEqual (newExpected.M21, actual.M21, "m21 setter"); - Assert.AreEqual (newExpected.M22, actual.M22, "m22 setter"); - Assert.AreEqual (newExpected.M23, actual.M23, "m23 setter"); - Assert.AreEqual (newExpected.M24, actual.M24, "m24 setter"); - Assert.AreEqual (newExpected.M31, actual.M31, "m31 setter"); - Assert.AreEqual (newExpected.M32, actual.M32, "m32 setter"); - Assert.AreEqual (newExpected.M33, actual.M33, "m33 setter"); - Assert.AreEqual (newExpected.M34, actual.M34, "m34 setter"); - Assert.AreEqual (newExpected.M41, actual.M41, "m41 setter"); - Assert.AreEqual (newExpected.M42, actual.M42, "m42 setter"); - Assert.AreEqual (newExpected.M43, actual.M43, "m43 setter"); - Assert.AreEqual (newExpected.M44, actual.M44, "m44 setter"); - } - - [Test] - public void TransposeInstance () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat4x4) expected; - - expected.Transpose (); - actual.Transpose (); - - Asserts.AreEqual (expected, actual, "transpose"); - } - - [Test] - public void TransposeStatic () - { - var input = GetTestMatrix (); - var inputSimd = (MatrixFloat4x4) input; - - var expected = Matrix4.Transpose (input); - var actual = MatrixFloat4x4.Transpose (inputSimd); - - Asserts.AreEqual (expected, actual, "transpose"); - - input = GetTestMatrix (); - inputSimd = (MatrixFloat4x4) input; - Matrix4.Transpose (ref input, out expected); - MatrixFloat4x4.Transpose (ref inputSimd, out actual); - Asserts.AreEqual (expected, actual, "transpose out/ref"); - } - - [Test] - public void TransposeStatic_ByRef () - { - var input = GetTestMatrix (); - var inputSimd = (MatrixFloat4x4) input; - - Matrix4 expected; - MatrixFloat4x4 actual; - - Matrix4.Transpose (ref input, out expected); - MatrixFloat4x4.Transpose (ref inputSimd, out actual); - Asserts.AreEqual (expected, actual, "transpose out/ref"); - } - - [Test] - public void Multiply () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat4x4) inputL; - var inputSimdR = (MatrixFloat4x4) inputR; - var expected = Matrix4.Mult (inputL, inputR); - var actual = MatrixFloat4x4.Multiply (inputSimdL, inputSimdR); - - Asserts.AreEqual (expected, actual, "multiply"); - } - - [Test] - public void Multiply_ByRef () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat4x4) inputL; - var inputSimdR = (MatrixFloat4x4) inputR; - Matrix4 expected; - MatrixFloat4x4 actual; - - Matrix4.Mult (ref inputL, ref inputR, out expected); - MatrixFloat4x4.Multiply (ref inputSimdL, ref inputSimdR, out actual); - - Asserts.AreEqual (expected, actual, "multiply"); - } - - - [Test] - public void Multiply_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat4x4) inputL; - var inputSimdR = (MatrixFloat4x4) inputR; - var expected = inputL * inputR; - var actual = inputSimdL * inputSimdR; - - Asserts.AreEqual (expected, actual, "multiply"); - } - - [Test] - public void Equality_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat4x4) inputL; - var inputSimdR = (MatrixFloat4x4) inputR; - - // matrices are different - Assert.AreEqual (inputL == inputR, inputSimdL == inputSimdR, "inequality"); - Assert.IsFalse (inputL == inputR, "inequality 2 expected"); - Assert.IsFalse (inputSimdL == inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (inputL == inputR, inputSimdL == inputSimdR, "equality"); - Assert.IsTrue (inputL == inputR, "equality 2 expected"); - Assert.IsTrue (inputSimdL == inputSimdR, "equality 2 actual"); - - Assert.IsTrue (MatrixFloat4x4.Identity == (MatrixFloat4x4) Matrix4.Identity, "identity equality"); - } - - [Test] - public void Inequality_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (MatrixFloat4x4) inputL; - var inputSimdR = (MatrixFloat4x4) inputR; - - // matrices are different - Assert.AreEqual (inputL != inputR, inputSimdL != inputSimdR, "inequality"); - Assert.IsTrue (inputL != inputR, "inequality 2 expected"); - Assert.IsTrue (inputSimdL != inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (inputL != inputR, inputSimdL != inputSimdR, "equality"); - Assert.IsFalse (inputL != inputR, "equality 2 expected"); - Assert.IsFalse (inputSimdL != inputSimdR, "equality 2 actual"); - - Assert.IsFalse (MatrixFloat4x4.Identity != (MatrixFloat4x4) Matrix4.Identity, "identity equality"); - } - - [Test] - public void Explicit_Operator_ToMatrix4 () - { - var expected = (MatrixFloat4x4) GetTestMatrix (); - var actual = (Matrix4) expected; - - Asserts.AreEqual (expected, actual, "tomatrix4"); - - actual = (Matrix4) MatrixFloat4x4.Identity; - Asserts.AreEqual (MatrixFloat4x4.Identity, actual, "tomatrix4 identity"); - Asserts.AreEqual (Matrix4.Identity, actual, "tomatrix4 identity2"); - } - - [Test] - public void Explicit_Operator_FromMatrix4 () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat4x4) expected; - - Asserts.AreEqual (expected, actual, "frommatrix4"); - - actual = (MatrixFloat4x4) Matrix4.Identity; - Asserts.AreEqual (MatrixFloat4x4.Identity, actual, "tomatrix4 identity"); - Asserts.AreEqual (Matrix4.Identity, actual, "tomatrix4 identity2"); - } - - [Test] - public void ToStringTest () - { - var expected = GetTestMatrix (); - var actual = (MatrixFloat4x4) expected; - - Assert.AreEqual (expected.ToString (), actual.ToString (), "tostring"); - } - - // GetHashCode doesn't have to be identical, so no need to test - - [Test] - public void Equals_Object () - { - var expectedA = GetTestMatrix (); - var expectedB = GetTestMatrix (); - var actualA = (MatrixFloat4x4) expectedA; - var actualB = (MatrixFloat4x4) expectedB; - - Assert.IsTrue (actualA.Equals ((object) actualA), "self"); - Assert.IsFalse (actualA.Equals ((object) actualB), "other"); - Assert.IsFalse (actualA.Equals (null), "null"); - Assert.IsFalse (actualA.Equals (expectedA), "other type"); - } - - [Test] - public void Equals_Matrix () - { - var expectedA = GetTestMatrix (); - var expectedB = GetTestMatrix (); - var actualA = (MatrixFloat4x4) expectedA; - var actualB = (MatrixFloat4x4) expectedB; - - Assert.IsTrue (actualA.Equals (actualA), "self"); - Assert.IsFalse (actualA.Equals (actualB), "other"); - } - - // A collection of test matrices. - // - // I initially tried randomly generating test matrices, but it turns out - // there are accumulative computational differences in the different algorithms - // between Matrix4 and MatrixFloat4x4. Since the differences are accumulative, - // I couldn't find a minimal sensible delta values when comparing - // matrices. - // - // So I just serialized a few matrices that were randomly generated, and - // these have been tested to not produce accumulative computational differences. - // - static Matrix4 [] test_matrices = new [] { - new Matrix4 (0.1532144f, 0.5451511f, 0.2004739f, 0.8351463f, 0.9884372f, 0.1313103f, 0.3327205f, 0.01164342f, 0.6563147f, 0.7923161f, 0.6764754f, 0.07481737f, 0.03239552f, 0.7156482f, 0.6136858f, 0.1864168f), - new Matrix4 (0.7717745f, 0.559364f, 0.00918373f, 0.6579159f, 0.123461f, 0.9993145f, 0.5487496f, 0.2823398f, 0.9710717f, 0.8750508f, 0.472472f, 0.2608089f, 0.5771761f, 0.5617125f, 0.176998f, 0.1271691f), - new Matrix4 (0.2023053f, 0.4701468f, 0.6618567f, 0.7685714f, 0.8561344f, 0.009231919f, 0.6150167f, 0.7542298f, 0.550727f, 0.3625788f, 0.6639862f, 0.5763468f, 0.9717328f, 0.003812184f, 0.985266f, 0.7540002f), - new Matrix4 (9.799572E+08f, 1.64794E+09f, 1.117296E+09f, 1.239858E+09f, 6.389504E+07f, 1.172175E+09f, 1.399567E+09f, 1.187143E+09f, 3.729208E+07f, 5.50313E+08f, 1.847369E+09f, 1.612405E+09f, 1.699488E+08f, 4.952176E+08f, 1.07262E+09f, 2.035059E+09f), - new Matrix4 (1.102396E+09f, 3.082477E+08f, 1.126484E+09f, 5.022931E+08f, 1.966322E+09f, 1.1814E+09f, 8.464673E+08f, 1.940651E+09f, 1.229937E+09f, 1.367379E+09f, 1.900015E+09f, 1.516109E+09f, 2.146064E+09f, 1.870971E+09f, 1.046267E+09f, 1.088363E+09f), - new Matrix4 (2.263112E+08f, 8.79644E+08f, 1.303282E+09f, 1.654159E+09f, 3.705524E+08f, 1.984941E+09f, 2.175935E+07f, 4.633518E+08f, 1.801243E+09f, 1.616996E+09f, 1.620852E+09f, 7291498f, 1.012728E+09f, 2.834145E+08f, 3.5328E+08f, 1.35012E+09f), - new Matrix4 (0.4904693f, 0.841727f, 0.2294401f, 0.5736054f, 0.5406881f, 0.2172498f, 0.1261143f, 0.6736677f, 0.4570194f, 0.9091009f, 0.7669608f, 0.8468134f, 0.01802658f, 0.3850208f, 0.3730424f, 0.2440258f), - new Matrix4 (0.1252193f, 0.08986127f, 0.3407605f, 0.9144857f, 0.340791f, 0.2192288f, 0.5144276f, 0.01813344f, 0.07687104f, 0.7971596f, 0.6393988f, 0.9002907f, 0.1011457f, 0.5047605f, 0.7202546f, 0.07729452f), - new Matrix4 (8.176959E+08f, 1.386156E+09f, 5.956444E+08f, 4.210506E+08f, 1.212676E+09f, 4.131035E+08f, 1.032453E+09f, 2.074689E+08f, 1.536594E+09f, 3.266183E+07f, 5.222072E+08f, 7.923175E+08f, 1.762531E+09f, 7.901702E+08f, 8.1975E+08f, 1.630734E+09f), - new Matrix4 (0.006755914f, 0.07464754f, 0.287938f, 0.3724834f, 0.1496783f, 0.6224982f, 0.7150125f, 0.5554719f, 0.4638171f, 0.4200902f, 0.4867154f, 0.773377f, 0.3558737f, 0.4043404f, 0.04670618f, 0.7695189f), - }; - - static int counter; - internal static Matrix4 GetTestMatrix () - { - counter++; - if (counter == test_matrices.Length) - counter = 0; - return test_matrices [counter]; - } - } -} diff --git a/tests/monotouch-test/Simd/NMatrix4dTest.cs b/tests/monotouch-test/Simd/NMatrix4dTest.cs deleted file mode 100644 index 58b5aec51d9..00000000000 --- a/tests/monotouch-test/Simd/NMatrix4dTest.cs +++ /dev/null @@ -1,346 +0,0 @@ - -using System; -using System.Diagnostics; - -using Foundation; -using ObjCRuntime; - -using OpenTK; - -using NUnit.Framework; - -namespace MonoTouchFixtures.Simd { - [TestFixture] - [Preserve (AllMembers = true)] - public class NMatrix4dTest { - - [Test] - public void Identity () - { - var identity = new NMatrix4d { - M11 = 1d, - M22 = 1d, - M33 = 1d, - M44 = 1d, - }; - Asserts.AreEqual (identity, NMatrix4d.Identity, "identity"); - Asserts.AreEqual (Matrix4d.Identity, NMatrix4d.Identity, "opentk identity"); - } - - [Test] - public void RowConstructor () - { - var expected = GetTestMatrix (); - var actual = new NMatrix4d (expected.Row0, expected.Row1, expected.Row2, expected.Row3); - Asserts.AreEqual (expected, actual, "ctor 1"); - } - - [Test] - public void ElementConstructor () - { - var expected = GetTestMatrix (); - var actual = new NMatrix4d (expected.M11, expected.M12, expected.M13, expected.M14, - expected.M21, expected.M22, expected.M23, expected.M24, - expected.M31, expected.M32, expected.M33, expected.M34, - expected.M41, expected.M42, expected.M43, expected.M44); - Asserts.AreEqual (expected, actual, "ctor 1"); - - } - - [Test] - public void Determinant () - { - var expected = GetTestMatrix (); - var actual = (NMatrix4d) expected; - Assert.AreEqual (expected.Determinant, actual.Determinant, 0.000001d, "determinant\n" + actual); - - } - - [Test] - public void Elements () - { - var expected = GetTestMatrix (); - var actual = (NMatrix4d) expected; - - Assert.AreEqual (expected.M11, actual.M11, "m11 getter"); - Assert.AreEqual (expected.M12, actual.M12, "m12 getter"); - Assert.AreEqual (expected.M13, actual.M13, "m13 getter"); - Assert.AreEqual (expected.M14, actual.M14, "m14 getter"); - Assert.AreEqual (expected.M21, actual.M21, "m21 getter"); - Assert.AreEqual (expected.M22, actual.M22, "m22 getter"); - Assert.AreEqual (expected.M23, actual.M23, "m23 getter"); - Assert.AreEqual (expected.M24, actual.M24, "m24 getter"); - Assert.AreEqual (expected.M31, actual.M31, "m31 getter"); - Assert.AreEqual (expected.M32, actual.M32, "m32 getter"); - Assert.AreEqual (expected.M33, actual.M33, "m33 getter"); - Assert.AreEqual (expected.M34, actual.M34, "m34 getter"); - Assert.AreEqual (expected.M41, actual.M41, "m41 getter"); - Assert.AreEqual (expected.M42, actual.M42, "m42 getter"); - Assert.AreEqual (expected.M43, actual.M43, "m43 getter"); - Assert.AreEqual (expected.M44, actual.M44, "m44 getter"); - - var newExpected = GetTestMatrix (); - actual.M11 = newExpected.M11; - actual.M12 = newExpected.M12; - actual.M13 = newExpected.M13; - actual.M14 = newExpected.M14; - actual.M21 = newExpected.M21; - actual.M22 = newExpected.M22; - actual.M23 = newExpected.M23; - actual.M24 = newExpected.M24; - actual.M31 = newExpected.M31; - actual.M32 = newExpected.M32; - actual.M33 = newExpected.M33; - actual.M34 = newExpected.M34; - actual.M41 = newExpected.M41; - actual.M42 = newExpected.M42; - actual.M43 = newExpected.M43; - actual.M44 = newExpected.M44; - Assert.AreEqual (newExpected.M11, actual.M11, "m11 setter"); - Assert.AreEqual (newExpected.M12, actual.M12, "m12 setter"); - Assert.AreEqual (newExpected.M13, actual.M13, "m13 setter"); - Assert.AreEqual (newExpected.M14, actual.M14, "m14 setter"); - Assert.AreEqual (newExpected.M21, actual.M21, "m21 setter"); - Assert.AreEqual (newExpected.M22, actual.M22, "m22 setter"); - Assert.AreEqual (newExpected.M23, actual.M23, "m23 setter"); - Assert.AreEqual (newExpected.M24, actual.M24, "m24 setter"); - Assert.AreEqual (newExpected.M31, actual.M31, "m31 setter"); - Assert.AreEqual (newExpected.M32, actual.M32, "m32 setter"); - Assert.AreEqual (newExpected.M33, actual.M33, "m33 setter"); - Assert.AreEqual (newExpected.M34, actual.M34, "m34 setter"); - Assert.AreEqual (newExpected.M41, actual.M41, "m41 setter"); - Assert.AreEqual (newExpected.M42, actual.M42, "m42 setter"); - Assert.AreEqual (newExpected.M43, actual.M43, "m43 setter"); - Assert.AreEqual (newExpected.M44, actual.M44, "m44 setter"); - } - - [Test] - public void TransposeInstance () - { - var expected = GetTestMatrix (); - var actual = (NMatrix4d) expected; - - expected.Transpose (); - actual.Transpose (); - - Asserts.AreEqual (expected, actual, "transpose"); - } - - [Test] - public void TransposeStatic () - { - var input = GetTestMatrix (); - var inputSimd = (NMatrix4d) input; - - var expected = Matrix4d.Transpose (input); - var actual = NMatrix4d.Transpose (inputSimd); - - Asserts.AreEqual (expected, actual, "transpose"); - - input = GetTestMatrix (); - inputSimd = (NMatrix4d) input; - Matrix4d.Transpose (ref input, out expected); - NMatrix4d.Transpose (ref inputSimd, out actual); - Asserts.AreEqual (expected, actual, "transpose out/ref"); - } - - [Test] - public void TransposeStatic_ByRef () - { - var input = GetTestMatrix (); - var inputSimd = (NMatrix4d) input; - - Matrix4d expected; - NMatrix4d actual; - - Matrix4d.Transpose (ref input, out expected); - NMatrix4d.Transpose (ref inputSimd, out actual); - Asserts.AreEqual (expected, actual, "transpose out/ref"); - } - - [Test] - public void Multiply () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (NMatrix4d) inputL; - var inputSimdR = (NMatrix4d) inputR; - var expected = Matrix4d.Mult (inputL, inputR); - var actual = NMatrix4d.Multiply (inputSimdL, inputSimdR); - - Asserts.AreEqual (expected, actual, "multiply"); - } - - [Test] - public void Multiply_ByRef () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (NMatrix4d) inputL; - var inputSimdR = (NMatrix4d) inputR; - Matrix4d expected; - NMatrix4d actual; - - Matrix4d.Mult (ref inputL, ref inputR, out expected); - NMatrix4d.Multiply (ref inputSimdL, ref inputSimdR, out actual); - - Asserts.AreEqual (expected, actual, "multiply"); - } - - - [Test] - public void Multiply_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (NMatrix4d) inputL; - var inputSimdR = (NMatrix4d) inputR; - var expected = inputL * inputR; - var actual = inputSimdL * inputSimdR; - - Asserts.AreEqual (expected, actual, "multiply"); - } - - [Test] - public void Equality_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (NMatrix4d) inputL; - var inputSimdR = (NMatrix4d) inputR; - - // matrices are different - Assert.AreEqual (inputL == inputR, inputSimdL == inputSimdR, "inequality"); - Assert.IsFalse (inputL == inputR, "inequality 2 expected"); - Assert.IsFalse (inputSimdL == inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (inputL == inputR, inputSimdL == inputSimdR, "equality"); - Assert.IsTrue (inputL == inputR, "equality 2 expected"); - Assert.IsTrue (inputSimdL == inputSimdR, "equality 2 actual"); - - Assert.IsTrue (NMatrix4d.Identity == (NMatrix4d) Matrix4d.Identity, "identity equality"); - } - - [Test] - public void Inequality_Operator () - { - var inputL = GetTestMatrix (); - var inputR = GetTestMatrix (); - var inputSimdL = (NMatrix4d) inputL; - var inputSimdR = (NMatrix4d) inputR; - - // matrices are different - Assert.AreEqual (inputL != inputR, inputSimdL != inputSimdR, "inequality"); - Assert.IsTrue (inputL != inputR, "inequality 2 expected"); - Assert.IsTrue (inputSimdL != inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (inputL != inputR, inputSimdL != inputSimdR, "equality"); - Assert.IsFalse (inputL != inputR, "equality 2 expected"); - Assert.IsFalse (inputSimdL != inputSimdR, "equality 2 actual"); - - Assert.IsFalse (NMatrix4d.Identity != (NMatrix4d) Matrix4d.Identity, "identity equality"); - } - - [Test] - public void Explicit_Operator_ToMatrix4d () - { - var expected = (NMatrix4d) GetTestMatrix (); - var actual = (Matrix4d) expected; - - Asserts.AreEqual (expected, actual, "tomatrix4"); - - actual = (Matrix4d) NMatrix4d.Identity; - Asserts.AreEqual (NMatrix4d.Identity, actual, "tomatrix4 identity"); - Asserts.AreEqual (Matrix4d.Identity, actual, "tomatrix4 identity2"); - } - - [Test] - public void Explicit_Operator_FromMatrix4d () - { - var expected = GetTestMatrix (); - var actual = (NMatrix4d) expected; - - Asserts.AreEqual (expected, actual, "frommatrix4"); - - actual = (NMatrix4d) Matrix4d.Identity; - Asserts.AreEqual (NMatrix4d.Identity, actual, "tomatrix4 identity"); - Asserts.AreEqual (Matrix4d.Identity, actual, "tomatrix4 identity2"); - } - - [Test] - public void ToStringTest () - { - var expected = GetTestMatrix (); - var actual = (NMatrix4d) expected; - - Assert.AreEqual (expected.ToString (), actual.ToString (), "tostring"); - } - - // GetHashCode doesn't have to be identical, so no need to test - - [Test] - public void Equals_Object () - { - var expectedA = GetTestMatrix (); - var expectedB = GetTestMatrix (); - var actualA = (NMatrix4d) expectedA; - var actualB = (NMatrix4d) expectedB; - - Assert.IsTrue (actualA.Equals ((object) actualA), "self"); - Assert.IsFalse (actualA.Equals ((object) actualB), "other"); - Assert.IsFalse (actualA.Equals (null), "null"); - Assert.IsFalse (actualA.Equals (expectedA), "other type"); - } - - [Test] - public void Equals_Matrix () - { - var expectedA = GetTestMatrix (); - var expectedB = GetTestMatrix (); - var actualA = (NMatrix4d) expectedA; - var actualB = (NMatrix4d) expectedB; - - Assert.IsTrue (actualA.Equals (actualA), "self"); - Assert.IsFalse (actualA.Equals (actualB), "other"); - } - - // A collection of test matrices. - // - // I initially tried randomly generating test matrices, but it turns out - // there are accumulative computational differences in the different algorithms - // between Matrix4d and NMatrix4d. Since the differences are accumulative, - // I couldn't find a minimal sensible delta values when comparing - // matrices. - // - // So I just serialized a few matrices that were randomly generated, and - // these have been tested to not produce accumulative computational differences. - // - static Matrix4d [] test_matrices = new [] { - new Matrix4d (0.1532144d, 0.5451511d, 0.2004739d, 0.8351463d, 0.9884372d, 0.1313103d, 0.3327205d, 0.01164342d, 0.6563147d, 0.7923161d, 0.6764754d, 0.07481737d, 0.03239552d, 0.7156482d, 0.6136858d, 0.1864168f), - new Matrix4d (0.7717745d, 0.559364d, 0.00918373d, 0.6579159d, 0.123461d, 0.9993145d, 0.5487496d, 0.2823398d, 0.9710717d, 0.8750508d, 0.472472d, 0.2608089d, 0.5771761d, 0.5617125d, 0.176998d, 0.1271691f), - new Matrix4d (0.2023053d, 0.4701468d, 0.6618567d, 0.7685714d, 0.8561344d, 0.009231919d, 0.6150167d, 0.7542298d, 0.550727d, 0.3625788d, 0.6639862d, 0.5763468d, 0.9717328d, 0.003812184d, 0.985266d, 0.7540002f), - new Matrix4d (9.799572E+08d, 1.64794E+09d, 1.117296E+09d, 1.239858E+09d, 6.389504E+07d, 1.172175E+09d, 1.399567E+09d, 1.187143E+09d, 3.729208E+07d, 5.50313E+08d, 1.847369E+09d, 1.612405E+09d, 1.699488E+08d, 4.952176E+08d, 1.07262E+09d, 2.035059E+09f), - new Matrix4d (1.102396E+09d, 3.082477E+08d, 1.126484E+09d, 5.022931E+08d, 1.966322E+09d, 1.1814E+09d, 8.464673E+08d, 1.940651E+09d, 1.229937E+09d, 1.367379E+09d, 1.900015E+09d, 1.516109E+09d, 2.146064E+09d, 1.870971E+09d, 1.046267E+09d, 1.088363E+09f), - new Matrix4d (2.263112E+08d, 8.79644E+08d, 1.303282E+09d, 1.654159E+09d, 3.705524E+08d, 1.984941E+09d, 2.175935E+07d, 4.633518E+08d, 1.801243E+09d, 1.616996E+09d, 1.620852E+09d, 7291498d, 1.012728E+09d, 2.834145E+08d, 3.5328E+08d, 1.35012E+09f), - new Matrix4d (0.4904693d, 0.841727d, 0.2294401d, 0.5736054d, 0.5406881d, 0.2172498d, 0.1261143d, 0.6736677d, 0.4570194d, 0.9091009d, 0.7669608d, 0.8468134d, 0.01802658d, 0.3850208d, 0.3730424d, 0.2440258f), - new Matrix4d (0.1252193d, 0.08986127d, 0.3407605d, 0.9144857d, 0.340791d, 0.2192288d, 0.5144276d, 0.01813344d, 0.07687104d, 0.7971596d, 0.6393988d, 0.9002907d, 0.1011457d, 0.5047605d, 0.7202546d, 0.07729452f), - new Matrix4d (8.176959E+08d, 1.386156E+09d, 5.956444E+08d, 4.210506E+08d, 1.212676E+09d, 4.131035E+08d, 1.032453E+09d, 2.074689E+08d, 1.536594E+09d, 3.266183E+07d, 5.222072E+08d, 7.923175E+08d, 1.762531E+09d, 7.901702E+08d, 8.1975E+08d, 1.630734E+09f), - new Matrix4d (0.006755914d, 0.07464754d, 0.287938d, 0.3724834d, 0.1496783d, 0.6224982d, 0.7150125d, 0.5554719d, 0.4638171d, 0.4200902d, 0.4867154d, 0.773377d, 0.3558737d, 0.4043404d, 0.04670618d, 0.7695189d), - }; - - static int counter; - internal static Matrix4d GetTestMatrix () - { - counter++; - if (counter == test_matrices.Length) - counter = 0; - return test_matrices [counter]; - } - } -} diff --git a/tests/monotouch-test/Simd/NVector3dTest.cs b/tests/monotouch-test/Simd/NVector3dTest.cs deleted file mode 100644 index 3f36a2e85c0..00000000000 --- a/tests/monotouch-test/Simd/NVector3dTest.cs +++ /dev/null @@ -1,143 +0,0 @@ - -using System; -using System.Diagnostics; - -using Foundation; -using ObjCRuntime; - -using OpenTK; - -using NUnit.Framework; - -namespace MonoTouchFixtures.Simd { - [TestFixture] - [Preserve (AllMembers = true)] - public class NVector3dTest { - - [Test] - public void ElementConstructor () - { - var expected = GetTestVector (); - var actual = new NVector3d (expected.X, expected.Y, expected.Z); - Asserts.AreEqual (expected, actual, "ctor 1"); - } - - [Test] - public void Equality_Operator () - { - var inputL = GetTestVector (); - var inputR = GetTestVector (); - var inputSimdL = (NVector3d) inputL; - var inputSimdR = (NVector3d) inputR; - - // matrices are different - Assert.AreEqual (inputL == inputR, inputSimdL == inputSimdR, "inequality"); - Assert.IsFalse (inputL == inputR, "inequality 2 expected"); - Assert.IsFalse (inputSimdL == inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (inputL == inputR, inputSimdL == inputSimdR, "equality"); - Assert.IsTrue (inputL == inputR, "equality 2 expected"); - Assert.IsTrue (inputSimdL == inputSimdR, "equality 2 actual"); - } - - [Test] - public void Inequality_Operator () - { - var inputL = GetTestVector (); - var inputR = GetTestVector (); - var inputSimdL = (NVector3d) inputL; - var inputSimdR = (NVector3d) inputR; - - // matrices are different - Assert.AreEqual (inputL != inputR, inputSimdL != inputSimdR, "inequality"); - Assert.IsTrue (inputL != inputR, "inequality 2 expected"); - Assert.IsTrue (inputSimdL != inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (inputL != inputR, inputSimdL != inputSimdR, "equality"); - Assert.IsFalse (inputL != inputR, "equality 2 expected"); - Assert.IsFalse (inputSimdL != inputSimdR, "equality 2 actual"); - } - - [Test] - public void Explicit_Operator_ToVector3 () - { - var expected = GetTestVector (); - var actual = (Vector3d) expected; - - Asserts.AreEqual (expected, actual, "ToVector3d"); - } - - [Test] - public void Explicit_Operator_FromVector3 () - { - var expected = new Vector3d (2, 3, 7.7d); - var actual = (NVector3d) expected; - - Asserts.AreEqual (expected, actual, "FromVector3d"); - } - - [Test] - public void ToStringTest () - { - var vector = new NVector3d (1, 2, 3); - - Assert.AreEqual ("(1, 2, 3)", vector.ToString (), "tostring"); - } - - // GetHashCode doesn't have to be identical, so no need to test - - [Test] - public void Equals_Object () - { - var expectedA = GetTestVector (); - var expectedB = GetTestVector (); - var actualA = (NVector3d) expectedA; - var actualB = (NVector3d) expectedB; - - Assert.IsTrue (actualA.Equals ((object) actualA), "self"); - Assert.IsFalse (actualA.Equals ((object) actualB), "other"); - Assert.IsFalse (actualA.Equals (null), "null"); - Assert.IsTrue (actualA.Equals (expectedA), "same type"); - } - - [Test] - public void Equals_Vector () - { - var expectedA = GetTestVector (); - var expectedB = GetTestVector (); - var actualA = (NVector3d) expectedA; - var actualB = (NVector3d) expectedB; - - Assert.IsTrue (actualA.Equals (actualA), "self"); - Assert.IsFalse (actualA.Equals (actualB), "other"); - } - - static NVector3d [] test_vectors = new [] { - new NVector3d (0.1532144d, 0.5451511d, 0.2004739d), - new NVector3d (0.7717745d, 0.559364d, 0.00918373d), - new NVector3d (0.2023053d, 0.4701468d, 0.6618567d), - new NVector3d (0.4904693d, 0.841727d, 0.2294401d), - new NVector3d (0.1252193d, 0.08986127d, 0.3407605d), - new NVector3d (0.006755914d, 0.07464754d, 0.287938d), - new NVector3d (9.799572E+08d, 1.64794E+09d, 1.117296E+09d), - new NVector3d (1.102396E+09d, 3.082477E+08d, 1.126484E+09d), - new NVector3d (2.263112E+08d, 8.79644E+08d, 1.303282E+09d), - new NVector3d (8.176959E+08d, 1.386156E+09d, 5.956444E+08d), - }; - - static int counter; - internal static NVector3d GetTestVector () - { - counter++; - if (counter == test_vectors.Length) - counter = 0; - return test_vectors [counter]; - } - } -} diff --git a/tests/monotouch-test/Simd/VectorFloat3Test.cs b/tests/monotouch-test/Simd/VectorFloat3Test.cs deleted file mode 100644 index 9b1b99cbcb3..00000000000 --- a/tests/monotouch-test/Simd/VectorFloat3Test.cs +++ /dev/null @@ -1,145 +0,0 @@ - -using System; -using System.Diagnostics; - -using Foundation; -using ObjCRuntime; - -using OpenTK; -using VectorFloat3 = global::OpenTK.NVector3; - -using NUnit.Framework; - -namespace MonoTouchFixtures.Simd -{ - [TestFixture] - [Preserve (AllMembers = true)] - public class VectorFloat3Test - { - [Test] - public void ElementConstructor () - { - var expected = GetTestVector (); - var actual = new VectorFloat3 (expected.X, expected.Y, expected.Z); - Asserts.AreEqual (expected, actual, "ctor 1"); - } - - [Test] - public void Equality_Operator () - { - var inputL = GetTestVector (); - var inputR = GetTestVector (); - var inputSimdL = (VectorFloat3) inputL; - var inputSimdR = (VectorFloat3) inputR; - - // matrices are different - Assert.AreEqual (inputL == inputR, inputSimdL == inputSimdR, "inequality"); - Assert.IsFalse (inputL == inputR, "inequality 2 expected"); - Assert.IsFalse (inputSimdL == inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (inputL == inputR, inputSimdL == inputSimdR, "equality"); - Assert.IsTrue (inputL == inputR, "equality 2 expected"); - Assert.IsTrue (inputSimdL == inputSimdR, "equality 2 actual"); - } - - [Test] - public void Inequality_Operator () - { - var inputL = GetTestVector (); - var inputR = GetTestVector (); - var inputSimdL = (VectorFloat3) inputL; - var inputSimdR = (VectorFloat3) inputR; - - // matrices are different - Assert.AreEqual (inputL != inputR, inputSimdL != inputSimdR, "inequality"); - Assert.IsTrue (inputL != inputR, "inequality 2 expected"); - Assert.IsTrue (inputSimdL != inputSimdR, "inequality 2 actual"); - - inputL = inputR; - inputSimdL = inputSimdR; - // matrices are identical - Assert.AreEqual (inputL != inputR, inputSimdL != inputSimdR, "equality"); - Assert.IsFalse (inputL != inputR, "equality 2 expected"); - Assert.IsFalse (inputSimdL != inputSimdR, "equality 2 actual"); - } - - [Test] - public void Explicit_Operator_ToVector3 () - { - var expected = GetTestVector (); - var actual = (Vector3) expected; - - Asserts.AreEqual (expected, actual, "ToVector3"); - } - - [Test] - public void Explicit_Operator_FromVector3 () - { - var expected = new Vector3 (2, 3, 7.7f); - var actual = (VectorFloat3) expected; - - Asserts.AreEqual (expected, actual, "FromVector3"); - } - - [Test] - public void ToStringTest () - { - var vector = new VectorFloat3 (1, 2, 3); - - Assert.AreEqual ("(1, 2, 3)", vector.ToString (), "tostring"); - } - - // GetHashCode doesn't have to be identical, so no need to test - - [Test] - public void Equals_Object () - { - var expectedA = GetTestVector (); - var expectedB = GetTestVector (); - var actualA = (VectorFloat3) expectedA; - var actualB = (VectorFloat3) expectedB; - - Assert.IsTrue (actualA.Equals ((object) actualA), "self"); - Assert.IsFalse (actualA.Equals ((object) actualB), "other"); - Assert.IsFalse (actualA.Equals (null), "null"); - Assert.IsTrue (actualA.Equals (expectedA), "same type"); - } - - [Test] - public void Equals_Vector () - { - var expectedA = GetTestVector (); - var expectedB = GetTestVector (); - var actualA = (VectorFloat3) expectedA; - var actualB = (VectorFloat3) expectedB; - - Assert.IsTrue (actualA.Equals (actualA), "self"); - Assert.IsFalse (actualA.Equals (actualB), "other"); - } - - static VectorFloat3 [] test_vectors = new [] { - new VectorFloat3 (0.1532144f, 0.5451511f, 0.2004739f), - new VectorFloat3 (0.7717745f, 0.559364f, 0.00918373f), - new VectorFloat3 (0.2023053f, 0.4701468f, 0.6618567f), - new VectorFloat3 (0.4904693f, 0.841727f, 0.2294401f), - new VectorFloat3 (0.1252193f, 0.08986127f, 0.3407605f), - new VectorFloat3 (0.006755914f, 0.07464754f, 0.287938f), - new VectorFloat3 (9.799572E+08f, 1.64794E+09f, 1.117296E+09f), - new VectorFloat3 (1.102396E+09f, 3.082477E+08f, 1.126484E+09f), - new VectorFloat3 (2.263112E+08f, 8.79644E+08f, 1.303282E+09f), - new VectorFloat3 (8.176959E+08f, 1.386156E+09f, 5.956444E+08f), - }; - - static int counter; - internal static VectorFloat3 GetTestVector () - { - counter++; - if (counter == test_vectors.Length) - counter = 0; - return test_vectors [counter]; - } - } -} diff --git a/tests/monotouch-test/SpriteKit/SKTransformNodeTest.cs b/tests/monotouch-test/SpriteKit/SKTransformNodeTest.cs deleted file mode 100644 index 8b69dc8f8b2..00000000000 --- a/tests/monotouch-test/SpriteKit/SKTransformNodeTest.cs +++ /dev/null @@ -1,100 +0,0 @@ -#if !__WATCHOS__ - -using System; -#if XAMCORE_2_0 -using Foundation; -#if !MONOMAC -using UIKit; -#endif -using SpriteKit; -using ObjCRuntime; -#else -using MonoTouch.Foundation; -using MonoTouch.SpriteKit; -using MonoTouch.UIKit; -using MonoTouch.ObjCRuntime; -#endif -using OpenTK; - -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; -using VectorFloat3 = global::OpenTK.NVector3; - -using Bindings.Test; -using NUnit.Framework; - -namespace MonoTouchFixtures.SpriteKit { - - [TestFixture] - [Preserve (AllMembers = true)] - public class SKTransformNodeTest { - [SetUp] - public void VersionCheck () - { - TestRuntime.AssertXcodeVersion (9, 0); - } - - [Test] - public void EulerAngles () - { - VectorFloat3 V3 = new VectorFloat3 (); - - using (var obj = new SKTransformNode ()) { - Asserts.AreEqual (V3, obj.EulerAngles, "1 EulerAngles"); - V3 = new VectorFloat3 (1, 2, 3); - obj.EulerAngles = V3; - // The values bellow match what the same code in Swift returns. - Assert.AreEqual (-2.14159298f, obj.EulerAngles.X, "#x1"); - Assert.AreEqual (1.14159274f, obj.EulerAngles.Y, "#y1"); - Assert.AreEqual (-0.141592711f, obj.EulerAngles.Z, "#z1"); - } - } - - [Test] - public void RotationMatrix () - { - using (var obj = new SKTransformNode ()) { - var zero = new MatrixFloat3x3 (); - obj.RotationMatrix = zero; - // In Swift, a rotated zero matrice also becomes the identity matrice. - Asserts.AreEqual (MatrixFloat3x3.Identity, obj.RotationMatrix, "RotationMatrix"); - // Changing XRotation (or YRotation for that matter), makes the RotationMatrix change too - obj.XRotation = (nfloat) (Math.PI / 2); - var rotatedMatrix = new MatrixFloat3x3 ( - 1, 0, 0, - 0, 0, -1, - 0, 1, 0 - ); - Asserts.AreEqual (rotatedMatrix, obj.RotationMatrix, 0.000001f, "RotationMatrix a"); - Asserts.AreEqual (rotatedMatrix, CFunctions.GetMatrixFloat3x3 (obj, "rotationMatrix"), 0.000001f, "RotationMatrix native a"); - - // Got this matrix after setting both XRotation and YRotation to Pi/2 - rotatedMatrix = new MatrixFloat3x3 ( - 0, 1, 0, - 0, 0, -1, - -1, 0, 0 - ); - obj.RotationMatrix = rotatedMatrix; - Asserts.AreEqual (rotatedMatrix, obj.RotationMatrix, 0.000001f, "RotationMatrix b"); - Assert.AreEqual ((nfloat) (Math.PI / 2), obj.XRotation, 0.000001f, "XRotation b"); - Assert.AreEqual (0, obj.YRotation, 0.000001f, "YRotation b"); // Setting YRotation changes RotationMatrix, but setting RotationMatrix doesn't change YRotation. - } - } - - [Test] - public void QuaternionTest () - { - Quaternion Q; - - using (var obj = new SKTransformNode ()) { - Asserts.AreEqual (Quaternion.Identity, obj.Quaternion, "1 Quaternion"); - Q = new Quaternion (new Vector3 (1, 2, 3), 4); - obj.Quaternion = Q; - Asserts.AreEqual (Q, obj.Quaternion, "2 Quaternion"); - } - } - } -} - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/SpriteKit/UniformTest.cs b/tests/monotouch-test/SpriteKit/UniformTest.cs index b82ac1d4173..8918e56a276 100644 --- a/tests/monotouch-test/SpriteKit/UniformTest.cs +++ b/tests/monotouch-test/SpriteKit/UniformTest.cs @@ -15,16 +15,7 @@ using MonoTouch.ObjCRuntime; #endif using OpenTK; - -using MatrixFloat2x2 = global::OpenTK.NMatrix2; -using MatrixFloat3x3 = global::OpenTK.NMatrix3; -using MatrixFloat4x4 = global::OpenTK.NMatrix4; -using VectorFloat3 = global::OpenTK.NVector3; - using NUnit.Framework; -#if !TEST_BINDINGS_UNAVAILABLE -using Bindings.Test; -#endif namespace MonoTouchFixtures.SpriteKit { @@ -85,9 +76,6 @@ public void Ctors () Matrix2 M2; Matrix3 M3; Matrix4 M4; - MatrixFloat2x2 M2x2; - MatrixFloat3x3 M3x3; - MatrixFloat4x4 M4x4; using (var obj = new SKUniform ("name")) { var M4Zero = new Matrix4 (Vector4.Zero, Vector4.Zero, Vector4.Zero, Vector4.Zero); @@ -109,9 +97,6 @@ public void Ctors () M2 = new Matrix2 (1, 2, 3, 4); M3 = new Matrix3 (1, 2, 3, 4, 5, 6, 7, 8, 9); M4 = new Matrix4 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); - M2x2 = (MatrixFloat2x2) M2; - M3x3 = (MatrixFloat3x3) M3; - M4x4 = (MatrixFloat4x4) M4; obj.TextureValue = texture; Assert.AreEqual (texture, obj.TextureValue, "2 TextureValue"); @@ -138,7 +123,6 @@ public void Ctors () Asserts.AreEqual (M4, obj.FloatMatrix4Value, "2 FloatMatrix4Value"); } - bool hasSimdConstructors = TestRuntime.CheckXcodeVersion (8, 0); using (var obj = new SKUniform ("name", texture)) { Assert.AreEqual (texture, obj.TextureValue, "3 TextureValue"); } @@ -161,109 +145,14 @@ public void Ctors () using (var obj = new SKUniform ("name", M2)) { Asserts.AreEqual (M2, obj.FloatMatrix2Value, "8 FloatMatrix2Value"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (M2, MatrixFloat2x2.Transpose (CFunctions.GetMatrixFloat2x2 (obj, "matrixFloat2x2Value")), "8b FloatMatrix2Value"); -#endif } using (var obj = new SKUniform ("name", M3)) { Asserts.AreEqual (M3, obj.FloatMatrix3Value, "9 FloatMatrix3Value"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (M3, MatrixFloat3x3.Transpose (CFunctions.GetMatrixFloat3x3 (obj, "matrixFloat3x3Value")), "9b FloatMatrix3Value"); -#endif } using (var obj = new SKUniform ("name", M4)) { Asserts.AreEqual (M4, obj.FloatMatrix4Value, "10 FloatMatrix4Value"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (M4, MatrixFloat4x4.Transpose (CFunctions.GetMatrixFloat4x4 (obj, "matrixFloat4x4Value")), "10b FloatMatrix4Value"); -#endif - } - - using (var obj = new SKUniform ("name", M2x2)) { - Asserts.AreEqual (M2x2, obj.MatrixFloat2x2Value, "11 MatrixFloat2x2Value"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (M2x2, CFunctions.GetMatrixFloat2x2 (obj, "matrixFloat2x2Value"), "11b MatrixFloat2x2Value"); -#endif - var tmp2 = new MatrixFloat2x2 (9, 8, 7, 6); - obj.MatrixFloat2x2Value = tmp2; - Asserts.AreEqual (tmp2, obj.MatrixFloat2x2Value, "11 MatrixFloat2x2Value second"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (tmp2, CFunctions.GetMatrixFloat2x2 (obj, "matrixFloat2x2Value"), "11b MatrixFloat2x2Value second"); -#endif - } - - using (var obj = new SKUniform ("name", M3x3)) { - Asserts.AreEqual (M3x3, obj.MatrixFloat3x3Value, "12 MatrixFloat3x3Value"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (M3x3, CFunctions.GetMatrixFloat3x3 (obj, "matrixFloat3x3Value"), "12b MatrixFloat3x3Value"); -#endif - var tmp3 = new MatrixFloat3x3 (9, 8, 7, 6, 5, 4, 3, 2, 1); - obj.MatrixFloat3x3Value = tmp3; - Asserts.AreEqual (tmp3, obj.MatrixFloat3x3Value, "12 MatrixFloat3x3Value second"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (tmp3, CFunctions.GetMatrixFloat3x3 (obj, "matrixFloat3x3Value"), "12b MatrixFloat3x3Value second"); -#endif - } - - using (var obj = new SKUniform ("name", M4x4)) { - Asserts.AreEqual (M4x4, obj.MatrixFloat4x4Value, "13 MatrixFloat4x4Value"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (M4x4, CFunctions.GetMatrixFloat4x4 (obj, "matrixFloat4x4Value"), "13b FloatMatrix4Value"); -#endif - var tmp4 = new MatrixFloat4x4 (9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6); - obj.MatrixFloat4x4Value = tmp4; - Asserts.AreEqual (tmp4, obj.MatrixFloat4x4Value, "13 MatrixFloat4x4Value second"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (tmp4, CFunctions.GetMatrixFloat4x4 (obj, "matrixFloat4x4Value"), "13b MatrixFloat4x4Value second"); -#endif - } - } - - [Test] - public void Create () - { - var M2x2 = new MatrixFloat2x2 (1, 2, 3, 4); - var M3x3 = new MatrixFloat3x3 (1, 2, 3, 4, 5, 6, 7, 8, 9); - var M4x4 = new MatrixFloat4x4 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); - - using (var obj = SKUniform.Create ("name", M2x2)) { - Asserts.AreEqual (M2x2, obj.MatrixFloat2x2Value, "11 MatrixFloat2x2Value"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (M2x2, CFunctions.GetMatrixFloat2x2 (obj, "matrixFloat2x2Value"), "11b MatrixFloat2x2Value"); -#endif - var tmp2 = new MatrixFloat2x2 (9, 8, 7, 6); - obj.MatrixFloat2x2Value = tmp2; - Asserts.AreEqual (tmp2, obj.MatrixFloat2x2Value, "11 MatrixFloat2x2Value second"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (tmp2, CFunctions.GetMatrixFloat2x2 (obj, "matrixFloat2x2Value"), "11b MatrixFloat2x2Value second"); -#endif - } - - using (var obj = SKUniform.Create ("name", M3x3)) { - Asserts.AreEqual (M3x3, obj.MatrixFloat3x3Value, "12 MatrixFloat3x3Value"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (M3x3, CFunctions.GetMatrixFloat3x3 (obj, "matrixFloat3x3Value"), "12b MatrixFloat3x3Value"); -#endif - var tmp3 = new MatrixFloat3x3 (9, 8, 7, 6, 5, 4, 3, 2, 1); - obj.MatrixFloat3x3Value = tmp3; - Asserts.AreEqual (tmp3, obj.MatrixFloat3x3Value, "12 MatrixFloat3x3Value second"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (tmp3, CFunctions.GetMatrixFloat3x3 (obj, "matrixFloat3x3Value"), "12b MatrixFloat3x3Value second"); -#endif - } - - using (var obj = SKUniform.Create ("name", M4x4)) { - Asserts.AreEqual (M4x4, obj.MatrixFloat4x4Value, "13 MatrixFloat4x4Value"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (M4x4, CFunctions.GetMatrixFloat4x4 (obj, "matrixFloat4x4Value"), "13b FloatMatrix4Value"); -#endif - var tmp4 = new MatrixFloat4x4 (9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6); - obj.MatrixFloat4x4Value = tmp4; - Asserts.AreEqual (tmp4, obj.MatrixFloat4x4Value, "13 MatrixFloat4x4Value second"); -#if !TEST_BINDINGS_UNAVAILABLE - Asserts.AreEqual (tmp4, CFunctions.GetMatrixFloat4x4 (obj, "matrixFloat4x4Value"), "13b MatrixFloat4x4Value second"); -#endif } } } diff --git a/tests/monotouch-test/System.Net.Http/MessageHandlers.cs b/tests/monotouch-test/System.Net.Http/MessageHandlers.cs index 23bf9b8b934..4984379176d 100644 --- a/tests/monotouch-test/System.Net.Http/MessageHandlers.cs +++ b/tests/monotouch-test/System.Net.Http/MessageHandlers.cs @@ -22,15 +22,6 @@ namespace MonoTests.System.Net.Http [TestFixture] public class MessageHandlerTest { - void PrintHandlerToTest () - { -#if !__WATCHOS__ - Console.WriteLine (new HttpClientHandler ()); - Console.WriteLine (new CFNetworkHandler ()); -#endif - Console.WriteLine (new NSUrlSessionHandler ()); - } - HttpMessageHandler GetHandler (Type handler_type) { return (HttpMessageHandler) Activator.CreateInstance (handler_type); @@ -44,8 +35,6 @@ HttpMessageHandler GetHandler (Type handler_type) [TestCase (typeof (NSUrlSessionHandler))] public void DnsFailure (Type handlerType) { - PrintHandlerToTest (); - bool done = false; Exception ex = null; @@ -62,7 +51,6 @@ public void DnsFailure (Type handlerType) }, () => done); Assert.IsNotNull (ex, "Exception"); - // The handlers throw different types of exceptions, so we can't assert much more than that something went wrong. + // The handlers throw different types of exceptions, so we can't assert much more than that something went wrong. } - }} diff --git a/tests/monotouch-test/UIKit/DirectionalEdgeInsetsTest.cs b/tests/monotouch-test/UIKit/DirectionalEdgeInsetsTest.cs deleted file mode 100644 index 07ba7e38d9e..00000000000 --- a/tests/monotouch-test/UIKit/DirectionalEdgeInsetsTest.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Unit tests for NSDirectionalEdgeInsets -// -// Authors: -// Vincent Dondain -// -// Copyright 2017 Microsoft. All rights reserved. -// - -#if XAMCORE_2_0 - -using System; -using System.Drawing; -using Foundation; -using UIKit; -using NUnit.Framework; - -namespace MonoTouchFixtures.UIKit { - - [TestFixture] - [Preserve (AllMembers = true)] - public class DirectionalEdgeInsetsTest { - - [SetUp] - public void SetUp () - { - TestRuntime.AssertXcodeVersion (9, 0); - } - - [Test] - public void FromString_Null () - { - var e = NSDirectionalEdgeInsets.FromString (null); - Assert.That (e, Is.EqualTo (NSDirectionalEdgeInsets.Zero), "roundtrip"); - } - - [Test] - public void ToFromString_Zero () - { - string s = NSDirectionalEdgeInsets.Zero.ToString (); - var e = NSDirectionalEdgeInsets.FromString (s); - Assert.That (e, Is.EqualTo (NSDirectionalEdgeInsets.Zero), "roundtrip"); - } - - [Test] - public void Operators () - { - var i1 = new NSDirectionalEdgeInsets (10, 20, 30, 40); - var i2 = new NSDirectionalEdgeInsets (10, 10, 10, 10); - - Assert.True (i1 == i1, "i1 == i1"); - Assert.True (i2 == i2, "i1 == i1"); - Assert.True (i1 != i2, "i1 != i2"); - Assert.True (i2 != i1, "i2 != i1"); - } - } -} - -#endif // XAMCORE_2_0 \ No newline at end of file diff --git a/tests/monotouch-test/UIKit/NibTest.cs b/tests/monotouch-test/UIKit/NibTest.cs index 7126cf7bf3e..69ed5b58061 100644 --- a/tests/monotouch-test/UIKit/NibTest.cs +++ b/tests/monotouch-test/UIKit/NibTest.cs @@ -39,7 +39,6 @@ public void FromName_DoesNotExists () } } -#if false // Disabling for now due to Xcode 9 does not support nibs if deployment target == 6.0 [Test] public void FromName () { @@ -72,7 +71,6 @@ public void FromData () Assert.That (result2.Length, Is.EqualTo (0), "Instantiate"); } } -#endif } } diff --git a/tests/monotouch-test/UIKit/TabBarControllerTest.cs b/tests/monotouch-test/UIKit/TabBarControllerTest.cs index 83bb573ffd0..ac2fea9d538 100644 --- a/tests/monotouch-test/UIKit/TabBarControllerTest.cs +++ b/tests/monotouch-test/UIKit/TabBarControllerTest.cs @@ -57,7 +57,6 @@ public void Ctor_Defaults () } } -#if false // Disabling for now due to Xcode 9 does not support nibs if deployment target == 6.0 [Test] public void Ctor_Nib () { @@ -67,7 +66,6 @@ public void Ctor_Nib () CheckDefault (c); } } -#endif } } diff --git a/tests/monotouch-test/UIKit/TextFieldTest.cs b/tests/monotouch-test/UIKit/TextFieldTest.cs index 03e5bc8941f..d363bd01516 100644 --- a/tests/monotouch-test/UIKit/TextFieldTest.cs +++ b/tests/monotouch-test/UIKit/TextFieldTest.cs @@ -7,11 +7,9 @@ #if XAMCORE_2_0 using Foundation; using UIKit; -using CoreGraphics; #else using MonoTouch.Foundation; using MonoTouch.UIKit; -using MonoTouch.CoreGraphics; #endif using NUnit.Framework; @@ -56,11 +54,7 @@ public void InputAccessoryViewTest () public void EmptySelection () { using (var tf = new UITextField ()) { - if (TestRuntime.CheckXcodeVersion (9, 0)) { - Assert.IsNotNull (tf.SelectedTextRange, "SelectedTextRange 1"); - } else { - Assert.IsNull (tf.SelectedTextRange, "SelectedTextRange"); - } + Assert.IsNull (tf.SelectedTextRange, "SelectedTextRange"); if (TestRuntime.CheckSystemAndSDKVersion (6,0)) { Assert.IsNull (tf.TypingAttributes, "default"); // ^ calling TypingAttributes does not crash like UITextView does, it simply returns null @@ -89,15 +83,7 @@ public void GetCaretRectForPositiont_Null () // 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"); - } + Assert.True (rect.IsEmpty, "IsEmpty"); } } diff --git a/tests/monotouch-test/UIKit/UIDragDropSessionExtensionsTest.cs b/tests/monotouch-test/UIKit/UIDragDropSessionExtensionsTest.cs deleted file mode 100644 index 226c21c0dbe..00000000000 --- a/tests/monotouch-test/UIKit/UIDragDropSessionExtensionsTest.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// Unit tests for UIDragDropSessionExtensionsTest -// -// Authors: -// Vincent Dondain -// -// -// Copyright 2017 Microsoft. -// - -#if !__TVOS__ && !__WATCHOS__ - -using System; -#if XAMCORE_2_0 -using CoreGraphics; -using Foundation; -using ObjCRuntime; -using UIKit; -#else -using MonoTouch.CoreGraphics; -using MonoTouch.Foundation; -using MonoTouch.ObjCRuntime; -using MonoTouch.UIKit; -#endif -using NUnit.Framework; - -namespace MonoTouchFixtures.UIKit { - [TestFixture] - [Preserve (AllMembers = true)] - public class UIDragDropSessionExtensionsTest { - - [Test] - public void LoadObjectsTest () - { - if (!TestRuntime.CheckXcodeVersion (9,0)) - Assert.Ignore ("Ignoring tests: Requires iOS11+"); - - var test = new DropSession (); - test.CanLoadObjects (typeof (UIImage)); - test.LoadObjects (null); - } - } - - class DropSession : NSObject, IUIDropSession { - public IUIDragSession LocalDragSession => throw new NotImplementedException (); - - public UIDropSessionProgressIndicatorStyle ProgressIndicatorStyle { get => throw new NotImplementedException (); set => throw new NotImplementedException (); } - - public UIDragItem [] Items => throw new NotImplementedException (); - - public bool AllowsMoveOperation => throw new NotImplementedException (); - - public bool RestrictedToDraggingApplication => throw new NotImplementedException (); - - public bool CanLoadObjects (Class itemProviderReadingClass) - { - Assert.That (itemProviderReadingClass.Handle, Is.EqualTo (new Class (typeof (UIImage)).Handle), "UIDragDropSessionExtensionsTest did not convert the type properly for 'CanLoadObjects'."); - return true; - } - - public bool HasConformingItems (string [] typeIdentifiers) - { - throw new NotImplementedException (); - } - - public NSProgress LoadObjects (Class itemProviderReadingClass, Action completion) - { - Assert.That (itemProviderReadingClass.Handle, Is.EqualTo (new Class (typeof (UIImage)).Handle), "UIDragDropSessionExtensionsTest did not convert the type properly for 'LoadObjects'."); - return new NSProgress (); - } - - public CGPoint LocationInView (UIView view) - { - throw new NotImplementedException (); - } - } -} - -#endif // !__TVOS__ && !__WATCHOS__ \ No newline at end of file diff --git a/tests/monotouch-test/UIKit/UIPasteConfigurationSupportingTest.cs b/tests/monotouch-test/UIKit/UIPasteConfigurationSupportingTest.cs deleted file mode 100644 index 0e8260b04a4..00000000000 --- a/tests/monotouch-test/UIKit/UIPasteConfigurationSupportingTest.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// Unit tests for UIPasteConfigurationSupportingTest -// -// Authors: -// Vincent Dondain -// -// -// Copyright 2017 Microsoft. -// - -#if !__TVOS__ && !__WATCHOS__ - -using System; -#if XAMCORE_2_0 -using CoreGraphics; -using Foundation; -using SpriteKit; -using ObjCRuntime; -using UIKit; -#else -using MonoTouch.CoreGraphics; -using MonoTouch.Foundation; -using MonoTouch.SpriteKit; -using MonoTouch.ObjCRuntime; -using MonoTouch.UIKit; -#endif -using NUnit.Framework; - -namespace MonoTouchFixtures.UIKit { - [TestFixture] - [Preserve (AllMembers = true)] - public class UIPasteConfigurationSupportingTest { - - [SetUp] - public void Setup () - { - TestRuntime.AssertXcodeVersion (9, 0); - } - - [Test] - public void UIViewControllerPasteTest () - { - var viewController = new ViewControllerPoker (); - viewController.PasteConfiguration = new UIPasteConfiguration (typeof (UIImage)); - viewController.Paste (new NSItemProvider [] { new NSItemProvider (new UIImage ()) }); - } - - [Test] - public void UIViewPasteTest () - { - var view = new ViewPoker (); - view.PasteConfiguration = new UIPasteConfiguration (typeof (UIImage)); - view.Paste (new NSItemProvider [] { new NSItemProvider (new UIImage ()) }); - } - - [Test] - public void SKNodeTest () - { - var node = new NodePoker (); - node.PasteConfiguration = new UIPasteConfiguration (typeof (UIImage)); - node.Paste (new NSItemProvider [] { new NSItemProvider (new UIImage ()) }); - } - - class ViewControllerPoker : UIViewController { - - public override void Paste (NSItemProvider [] itemProviders) - { - Assert.IsTrue (itemProviders [0].CanLoadObject (typeof (UIImage))); - } - } - - class ViewPoker : UIView { - - public override void Paste (NSItemProvider [] itemProviders) - { - Assert.IsTrue (itemProviders [0].CanLoadObject (typeof (UIImage))); - } - } - - class NodePoker : SKNode { - - public override void Paste (NSItemProvider [] itemProviders) - { - Assert.IsTrue (itemProviders [0].CanLoadObject (typeof (UIImage))); - } - } - } -} - -#endif // !__TVOS__ && !__WATCHOS__ \ No newline at end of file diff --git a/tests/monotouch-test/UIKit/UISpringLoadedInteractionSupportingTest.cs b/tests/monotouch-test/UIKit/UISpringLoadedInteractionSupportingTest.cs deleted file mode 100644 index ab5f44f803d..00000000000 --- a/tests/monotouch-test/UIKit/UISpringLoadedInteractionSupportingTest.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -// Unit tests for UISpringLoadedInteractionSupportingTest -// -// Authors: -// Vincent Dondain -// -// -// Copyright 2017 Microsoft. -// - -#if !__TVOS__ && !__WATCHOS__ - -using System; -#if XAMCORE_2_0 -using CoreGraphics; -using Foundation; -using ObjCRuntime; -using UIKit; -#else -using MonoTouch.CoreGraphics; -using MonoTouch.Foundation; -using MonoTouch.ObjCRuntime; -using MonoTouch.UIKit; -#endif -using NUnit.Framework; - -namespace MonoTouchFixtures.UIKit { - [TestFixture] - [Preserve (AllMembers = true)] - public class UISpringLoadedInteractionSupportingTest { - - [SetUp] - public void Setup () - { - TestRuntime.AssertXcodeVersion (9, 0); - } - - [Test] - public void UIAlertControllerSpringLoadTest () - { - var alertController = new UIAlertController (); - alertController.SpringLoaded = true; - Assert.IsTrue (alertController.SpringLoaded); - } - - [Test] - public void UIBarButtonItemSpringLoadTest () - { - var barButtonItem = new UIBarButtonItem (); - barButtonItem.SpringLoaded = true; - Assert.IsTrue (barButtonItem.SpringLoaded); - } - - [Test] - public void UIButtonSpringLoadTest () - { - var button = new UIButton (); - button.SpringLoaded = true; - Assert.IsTrue (button.SpringLoaded); - } - - [Test] - public void UICollectionViewSpringLoadTest () - { - var collectionView = new UICollectionView (new CGRect (0, 0, 100, 100), new UICollectionViewLayout ()); - collectionView.SpringLoaded = true; - Assert.IsTrue (collectionView.SpringLoaded); - } - - [Test] - public void UISegmentedControlSpringLoadTest () - { - var segmentedControl = new UISegmentedControl (); - segmentedControl.SpringLoaded = true; - Assert.IsTrue (segmentedControl.SpringLoaded); - } - - [Test] - public void UITabBarItemSpringLoadTest () - { - var tabBarItem = new UITabBarItem (); - tabBarItem.SpringLoaded = true; - Assert.IsTrue (tabBarItem.SpringLoaded); - } - - [Test] - public void UITabBarSpringLoadTest () - { - var tabBar = new UITabBar (); - tabBar.SpringLoaded = true; - Assert.IsTrue (tabBar.SpringLoaded); - } - - [Test] - public void UITableViewSpringLoadTest () - { - var tableView = new UITableView (); - tableView.SpringLoaded = true; - Assert.IsTrue (tableView.SpringLoaded); - } - } -} - -#endif // !__TVOS__ && !__WATCHOS__ \ No newline at end of file diff --git a/tests/monotouch-test/monotouch-test.csproj b/tests/monotouch-test/monotouch-test.csproj index f591dc8718f..748b2df7769 100644 --- a/tests/monotouch-test/monotouch-test.csproj +++ b/tests/monotouch-test/monotouch-test.csproj @@ -1,4 +1,4 @@ - + Debug @@ -163,7 +163,6 @@ - @@ -356,6 +355,7 @@ + @@ -645,7 +645,6 @@ - @@ -658,48 +657,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -753,7 +714,6 @@ - @@ -767,11 +727,6 @@ - - - - - @@ -784,6 +739,7 @@ + @@ -806,7 +762,6 @@ - @@ -839,4 +794,4 @@ - + \ No newline at end of file diff --git a/tests/mtouch/MTouch.cs b/tests/mtouch/MTouch.cs index 91ddb88723b..20b2322a522 100644 --- a/tests/mtouch/MTouch.cs +++ b/tests/mtouch/MTouch.cs @@ -181,7 +181,6 @@ public void FatAppFiles () mtouch.CreateTemporaryApp (); mtouch.CreateTemporaryCacheDirectory (); mtouch.Abi = "armv7,arm64"; - mtouch.TargetVer = "10.3"; // otherwise 32-bit build isn't possible mtouch.DSym = false; // speeds up the test mtouch.MSym = false; // speeds up the test mtouch.AssertExecute (MTouchAction.BuildDev, "build"); @@ -246,7 +245,6 @@ public void CodeSharingLLVM (string name, string abi, string[] assembly_build_ta mtouch.NoStrip = true; // faster test mtouch.NoSymbolStrip = string.Empty; // faster test mtouch.Verbosity = 4; // This is needed to get mtouch to print the output we're verifying - mtouch.TargetVer = "10.3"; // otherwise 32-bit builds aren't possible mtouch.AssertExecute (MTouchAction.BuildDev, "build"); // Check that --llvm is passed to the AOT compiler for every assembly we AOT. var assemblies_checked = 0; @@ -376,7 +374,6 @@ public void RebuildTest_WithExtensions (string name, string abi, bool debug, str extension.CreateTemporaryServiceExtension (extraCode: codeA); extension.CreateTemporaryCacheDirectory (); extension.Abi = abi; - extension.TargetVer = "10.3"; // otherwise 32-bit builds aren't possible extension.Debug = debug; extension.AssemblyBuildTargets.AddRange (assembly_build_targets); extension.DSym = false; // faster test @@ -389,7 +386,6 @@ public void RebuildTest_WithExtensions (string name, string abi, bool debug, str mtouch.CreateTemporaryApp (extraCode: codeA); mtouch.CreateTemporaryCacheDirectory (); mtouch.Abi = abi; - mtouch.TargetVer = "10.3"; // otherwise 32-bit builds aren't possible mtouch.Debug = debug; mtouch.AssemblyBuildTargets.AddRange (assembly_build_targets); mtouch.DSym = false; // faster test @@ -907,7 +903,6 @@ public void MT0075 () using (var mtouch = new MTouchTool ()) { mtouch.CreateTemporaryApp (); mtouch.Abi = "armv7k"; - mtouch.TargetVer = "10.3"; mtouch.AssertExecuteFailure (MTouchAction.BuildDev, "build"); mtouch.AssertError (75, "Invalid architecture 'ARMv7k' for iOS projects. Valid architectures are: ARMv7, ARMv7+Thumb, ARMv7+LLVM, ARMv7+LLVM+Thumb, ARMv7s, ARMv7s+Thumb, ARMv7s+LLVM, ARMv7s+LLVM+Thumb, ARM64, ARM64+LLVM"); } @@ -1007,10 +1002,7 @@ public void MT0091 (Profile profile, string name) mtouch.Linker = MTouchLinker.DontLink; mtouch.Sdk = sdk_version; Assert.AreEqual (1, mtouch.Execute (MTouchAction.BuildSim)); - var xcodeVersionString = Configuration.XcodeVersion; - if (xcodeVersionString.EndsWith (".0", StringComparison.Ordinal)) - xcodeVersionString = xcodeVersionString.Substring (0, xcodeVersionString.Length - 2); - mtouch.AssertError (91, String.Format ("This version of Xamarin.iOS requires the {0} {1} SDK (shipped with Xcode {2}). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only (to try to avoid the new APIs).", name, GetSdkVersion (profile), xcodeVersionString)); + mtouch.AssertError (91, String.Format ("This version of Xamarin.iOS requires the {0} {1} SDK (shipped with Xcode {2}). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only (to try to avoid the new APIs).", name, GetSdkVersion (profile), Configuration.XcodeVersion)); } } @@ -1365,7 +1357,6 @@ public void MT0113_abi (string app_abi, string extension_abi, string error_abi) extension.CreateTemporaryServiceExtension (); extension.CreateTemporaryCacheDirectory (); extension.Abi = extension_abi; - extension.TargetVer = "10.3"; // otherwise 32-bit builds aren't possible extension.AssertExecute (MTouchAction.BuildDev, "build extension"); using (var app = new MTouchTool ()) { app.AppExtensions.Add (extension); @@ -1373,7 +1364,6 @@ public void MT0113_abi (string app_abi, string extension_abi, string error_abi) app.CreateTemporaryCacheDirectory (); app.WarnAsError = new int [] { 113 }; app.Abi = app_abi; - app.TargetVer = "10.3"; // otherwise 32-bit builds aren't possible app.AssertExecuteFailure (MTouchAction.BuildDev, "build app"); app.AssertError (113, $"Native code sharing has been disabled for the extension 'testServiceExtension' because the container app does not build for the ABI {error_abi} (while the extension is building for this ABI)."); } @@ -1388,7 +1378,6 @@ public void MT0113_incompatible_abi (string app_abi, string extension_abi, strin extension.CreateTemporaryServiceExtension (); extension.CreateTemporaryCacheDirectory (); extension.Abi = extension_abi; - extension.TargetVer = "10.3"; // otherwise 32-bit builds aren't possible extension.AssertExecute (MTouchAction.BuildDev, "build extension"); using (var app = new MTouchTool ()) { app.AppExtensions.Add (extension); @@ -1396,7 +1385,6 @@ public void MT0113_incompatible_abi (string app_abi, string extension_abi, strin app.CreateTemporaryCacheDirectory (); app.WarnAsError = new int [] { 113 }; app.Abi = app_abi; - app.TargetVer = "10.3"; // otherwise 32-bit builds aren't possible app.AssertExecuteFailure (MTouchAction.BuildDev, "build app"); app.AssertError (113, $"Native code sharing has been disabled for the extension 'testServiceExtension' because the container app is building for the ABI {container_error_abi}, which is not compatible with the extension's ABI ({extension_error_abi})."); } @@ -1458,23 +1446,6 @@ public void CodeSharingExactContentsDifferentPaths () } } - [Test] - [TestCase ("armv7", "ARMv7")] - [TestCase ("armv7s", "ARMv7s")] - [TestCase ("armv7,armv7s", "ARMv7")] - [TestCase ("i386", "i386")] - public void MT0116 (string abi, string messageAbi) - { - using (var mtouch = new MTouchTool ()) { - mtouch.CreateTemporaryApp (); - mtouch.CreateTemporaryCacheDirectory (); - mtouch.TargetVer = "11.0"; - mtouch.Abi = abi; - mtouch.AssertExecuteFailure (abi == "i386" ? MTouchAction.BuildSim : MTouchAction.BuildDev, "build"); - mtouch.AssertError (116, $"Invalid architecture: {messageAbi}. 32-bit architectures are not supported when deployment target is 11 or later."); - } - } - [Test] public void MT0125 () { @@ -1533,8 +1504,8 @@ public class BindingAppB { } "; - var bindingLibA = CreateBindingLibrary (tmpdir, nativeCodeA, null, null, extraCodeA, name: "bindingA", arch: "arm64"); - var bindingLibB = CreateBindingLibrary (tmpdir, nativeCodeB, null, null, extraCodeB, name: "bindingB", references: new string [] { bindingLibA }, arch: "arm64"); + var bindingLibA = CreateBindingLibrary (tmpdir, nativeCodeA, null, null, extraCodeA, name: "bindingA"); + var bindingLibB = CreateBindingLibrary (tmpdir, nativeCodeB, null, null, extraCodeB, name: "bindingB", references: new string [] { bindingLibA }); var exe = CompileTestAppExecutable (tmpdir, @" public class TestApp { static void Main () { @@ -1720,7 +1691,6 @@ public static string GetSimulatorArchitecture (Profile profile) { switch (profile) { case Profile.iOS: - return "x86_64"; case Profile.watchOS: return "i386"; case Profile.tvOS: @@ -2008,12 +1978,11 @@ public void FastDev_Dual () { Profile = Profile.iOS, FastDev = true, - TargetVer = "10.3", // otherwise 32-bit build isn't possible Abi = "armv7,arm64", }) { mtouch.CreateTemporaryApp (); - mtouch.AssertExecute (MTouchAction.BuildDev); + Assert.AreEqual (0, mtouch.Execute (MTouchAction.BuildDev)); var bin = mtouch.NativeExecutablePath; VerifyArchitectures (bin, "arm7s/64", "armv7", "arm64"); foreach (var dylib in Directory.GetFileSystemEntries (mtouch.AppPath, "*.dylib")) { @@ -2068,28 +2037,27 @@ public void FastSim (Profile profile) } [Test] - [TestCase (Target.Dev, "armv7", "10.3")] - [TestCase (Target.Dev, "armv7s", "10.3")] - [TestCase (Target.Dev, "armv7,armv7s", "10.3")] - [TestCase (Target.Dev, "arm64", null)] - [TestCase (Target.Dev, "arm64+llvm", null)] - [TestCase (Target.Dev, "armv7,arm64", "10.3")] - [TestCase (Target.Dev, "armv7s,arm64", "10.3")] - [TestCase (Target.Dev, "armv7,armv7s,arm64", "10.3")] - [TestCase (Target.Sim, "i386", "10.3")] - [TestCase (Target.Sim, "x86_64", null)] - public void Architectures_Unified (Target target, string abi, string deployment_target) + [TestCase (Target.Dev, "armv7")] + [TestCase (Target.Dev, "armv7s")] + [TestCase (Target.Dev, "armv7,armv7s")] + [TestCase (Target.Dev, "arm64")] + [TestCase (Target.Dev, "arm64+llvm")] + [TestCase (Target.Dev, "armv7,arm64")] + [TestCase (Target.Dev, "armv7s,arm64")] + [TestCase (Target.Dev, "armv7,armv7s,arm64")] + [TestCase (Target.Sim, "i386")] + [TestCase (Target.Sim, "x86_64")] + public void Architectures_Unified (Target target, string abi) { using (var mtouch = new MTouchTool ()) { mtouch.Profile = Profile.iOS; mtouch.CreateTemporaryApp (); mtouch.Abi = abi; - mtouch.TargetVer = deployment_target; var bin = Path.Combine (mtouch.AppPath, Path.GetFileNameWithoutExtension (mtouch.RootAssembly)); - mtouch.AssertExecute (target == Target.Dev ? MTouchAction.BuildDev : MTouchAction.BuildSim); + Assert.AreEqual (0, mtouch.Execute (target == Target.Dev ? MTouchAction.BuildDev : MTouchAction.BuildSim)); VerifyArchitectures (bin, abi, abi.Replace ("+llvm", string.Empty).Split (',')); } @@ -2103,7 +2071,6 @@ public void Architectures_Unified_FatSimulator () mtouch.CreateTemporaryApp (); mtouch.Abi = "i386,x86_64"; - mtouch.TargetVer = "10.3"; var bin = Path.Combine (mtouch.AppPath, Path.GetFileNameWithoutExtension (mtouch.RootAssembly)); var bin32 = Path.Combine (mtouch.AppPath, ".monotouch-32", Path.GetFileNameWithoutExtension (mtouch.RootAssembly)); @@ -2124,7 +2091,6 @@ public void Architectures_Unified_Invalid () mtouch.Profile = Profile.iOS; mtouch.CreateTemporaryApp (); - mtouch.TargetVer = "10.3"; mtouch.Abi = "armv6"; Assert.AreEqual (1, mtouch.Execute (MTouchAction.BuildDev)); mtouch.AssertError ("MT", 15, "Invalid ABI: armv6. Supported ABIs are: i386, x86_64, armv7, armv7+llvm, armv7+llvm+thumb2, armv7s, armv7s+llvm, armv7s+llvm+thumb2, armv7k, armv7k+llvm, arm64 and arm64+llvm."); @@ -2177,7 +2143,6 @@ public void MonoFrameworkArchitectures () extension.CreateTemporaryServiceExtension (); extension.CreateTemporaryCacheDirectory (); extension.Abi = "armv7,arm64"; - extension.TargetVer = "10.3"; extension.Linker = MTouchLinker.LinkAll; // faster test extension.NoStrip = true; // faster test extension.AssertExecute (MTouchAction.BuildDev, "build extension"); @@ -2286,7 +2251,6 @@ public void Registrar (Target target, MTouchLinker linker, MTouchRegistrar regis mtouch.Linker = linker; mtouch.Registrar = registrar; mtouch.Abi = abi; - mtouch.TargetVer = "10.3"; // otherwise 32-bit builds aren't possible mtouch.Timeout = TimeSpan.FromMinutes (5); mtouch.AssertExecute (target == Target.Dev ? MTouchAction.BuildDev : MTouchAction.BuildSim, "build"); var fi = new FileInfo (mtouch.NativeExecutablePath); @@ -2328,7 +2292,7 @@ public class BindingApp { public static extern void DummyMethod (); } "; - var bindingLib = CreateBindingLibrary (tmpdir, nativeCode, null, null, extraCode, arch: "arm64"); + var bindingLib = CreateBindingLibrary (tmpdir, nativeCode, null, null, extraCode); var exe = CompileTestAppExecutable (tmpdir, @" public class TestApp { static void Main () { @@ -2443,7 +2407,6 @@ public void LinkerWarnings () mtouch.NoFastSim = true; mtouch.Abi = "i386"; mtouch.GccFlags = StringUtils.Quote (lib); - mtouch.TargetVer = "10.3"; // otherwise 32-bit build isn't possible mtouch.AssertExecute (MTouchAction.BuildSim, "build a"); mtouch.AssertWarning (5203, $"Native linking warning: warning: ignoring file {lib}, file was built for archive which is not the architecture being linked (i386): {lib}"); } @@ -2660,7 +2623,6 @@ static void Main () } "; mtouch.Abi = "armv7,arm64"; - mtouch.TargetVer = "10.3"; // otherwise 32-bit builds aren't possible mtouch.CreateTemporaryApp (code: code); mtouch.CreateTemporaryCacheDirectory (); @@ -2748,7 +2710,6 @@ static void Main () mtouch.RootAssembly = exe; mtouch.References = new [] { DLL }; mtouch.Timeout = TimeSpan.FromMinutes (5); - mtouch.TargetVer = "10.3"; // otherwise 32-bit builds aren't possible foreach (var test in tests) { mtouch.Abi = test.Abi; @@ -2768,7 +2729,6 @@ public void TestDuplicatedFatApp () mtouch.CreateTemporaryApp (); mtouch.CreateTemporaryCacheDirectory (); mtouch.Abi = "armv7,arm64"; - mtouch.TargetVer = "10.3"; // otherwise 32-bit builds aren't possible mtouch.AssertExecute (MTouchAction.BuildDev, "build"); FileAssert.Exists (Path.Combine (mtouch.AppPath, "testApp.exe")); // Don't check for mscorlib.dll, there might be two versions of it (since Xamarin.iOS.dll depends on it), or there might not. @@ -2783,7 +2743,6 @@ public void TestAllLoad () mtouch.CreateTemporaryApp (); mtouch.GccFlags = "-all_load"; mtouch.Abi = "armv7,arm64"; - mtouch.TargetVer = "10.3"; // otherwise 32-bit builds aren't possible mtouch.AssertExecute (MTouchAction.BuildDev, "build"); } } @@ -3476,7 +3435,7 @@ public void DummyTest () {} True -v -v -v -v True - x86_64 + i386, x86_64 None @@ -3488,7 +3447,7 @@ public void DummyTest () {} True iPhone Developer -v -v -v -v - ARM64 + ARMv7, ARM64 Full @@ -3561,9 +3520,9 @@ public static string CompileTestAppCode (string target, string targetDirectory, return assembly; } - static string CreateBindingLibrary (string targetDirectory, string nativeCode, string bindingCode, string linkWith = null, string extraCode = "", string name = "binding", string[] references = null, string arch = "armv7") + static string CreateBindingLibrary (string targetDirectory, string nativeCode, string bindingCode, string linkWith = null, string extraCode = "", string name = "binding", string[] references = null) { - var o = CompileNativeLibrary (targetDirectory, nativeCode, name: name, arch: arch); + var o = CompileNativeLibrary (targetDirectory, nativeCode, name: name); var cs = Path.Combine (targetDirectory, $"{name}Code.cs"); var dll = Path.Combine (targetDirectory, $"{name}Library.dll"); diff --git a/tests/mtouch/MTouchTool.cs b/tests/mtouch/MTouchTool.cs index 024cd9fea7b..765a8771f76 100644 --- a/tests/mtouch/MTouchTool.cs +++ b/tests/mtouch/MTouchTool.cs @@ -163,12 +163,7 @@ public int Execute (MTouchAction action) public void AssertExecute (MTouchAction action, string message = null) { - var rv = Execute (action); - if (rv == 0) - return; - var errors = Messages.Where ((v) => v.IsError).ToList (); - Assert.Fail ($"Expected execution to succeed, but exit code was {rv}, and there were {errors.Count} error(s): {message}\n\t" + - string.Join ("\n\t", errors.Select ((v) => v.ToString ()))); + NUnit.Framework.Assert.AreEqual (0, Execute (action), message); } public void AssertExecuteFailure (MTouchAction action, string message = null) diff --git a/tests/mtouch/RegistrarTest.cs b/tests/mtouch/RegistrarTest.cs index 8f7ede292ad..b3bbe9520a6 100644 --- a/tests/mtouch/RegistrarTest.cs +++ b/tests/mtouch/RegistrarTest.cs @@ -731,11 +731,8 @@ public void NoWarnings () mtouch.Verbosity = 9; // Increase verbosity, otherwise linker warnings aren't shown mtouch.AssertExecute (MTouchAction.BuildSim, "build"); mtouch.AssertNoWarnings (); - foreach (var line in mtouch.OutputLines) { - if (line.Contains ("warning: method 'paymentAuthorizationViewController:didAuthorizePayment:handler:' in protocol 'PKPaymentAuthorizationViewControllerDelegate' not implemented [-Wprotocol]")) - continue; // Xcode 9 beta 1: this method changed from optional to required. + foreach (var line in mtouch.OutputLines) Assert.That (line, Does.Not.Match ("warning:"), "no warnings"); - } } } diff --git a/tests/scripted/Makefile b/tests/scripted/Makefile index 7e53132b24c..3066445c83c 100644 --- a/tests/scripted/Makefile +++ b/tests/scripted/Makefile @@ -6,11 +6,11 @@ ALL_TESTS=select-native-compiler bug-13945 bug-35786 all-local tests run-tests:: $(ALL_TESTS) select-native-compiler: - $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -miphoneos-version-min=$(IOS_SDK_VERSION) -isysroot $(XCODE_DEVELOPER_ROOT)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(IOS_SDK_VERSION).sdk -Wall -g -c select-native-compiler/native.cpp -o select-native-compiler/libNative.a + $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -mno-thumb -miphoneos-version-min=$(IOS_SDK_VERSION) -isysroot $(XCODE_DEVELOPER_ROOT)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(IOS_SDK_VERSION).sdk -Wall -g -c select-native-compiler/native.cpp -o select-native-compiler/libNative.a mkdir -p select-native-compiler/SelectNativeCompiler.app $(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/btouch-native select-native-compiler/binding.cs --link-with=select-native-compiler/libNative.a,Native -s:select-native-compiler/managed.cs -o:select-native-compiler/binding.dll $(SYSTEM_MCS) select-native-compiler/app.cs -r:$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/Xamarin.iOS.dll -r:select-native-compiler/binding.dll -out:select-native-compiler/app.exe - $(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/mtouch -r:select-native-compiler/binding.dll select-native-compiler/app.exe --abi=arm64 -sdk "$(IOS_SDK_VERSION)" -dev:select-native-compiler/SelectNativeCompiler.app -sdkroot $(XCODE_DEVELOPER_ROOT) -r:$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/Xamarin.iOS.dll + $(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/mtouch -r:select-native-compiler/binding.dll select-native-compiler/app.exe --abi=armv7 -sdk "$(IOS_SDK_VERSION)" -dev:select-native-compiler/SelectNativeCompiler.app -sdkroot $(XCODE_DEVELOPER_ROOT) -r:$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/Xamarin.iOS.dll bug-13945 bug-35786: $(MAKE) -C $@ diff --git a/tests/scripted/bug-13945/Makefile b/tests/scripted/bug-13945/Makefile index 7b7d4023a4a..8585d24605b 100644 --- a/tests/scripted/bug-13945/Makefile +++ b/tests/scripted/bug-13945/Makefile @@ -8,26 +8,26 @@ bug-13945: @echo "void foo () {}" > nativeA.m @echo "void bar () {}" > nativeB.m @mkdir -p .libs - @$(MAKE) .libs/ios/nativeA.arm64.o - @$(MAKE) .libs/ios/nativeB.arm64.o + @$(MAKE) .libs/ios/nativeA.armv7.o + @$(MAKE) .libs/ios/nativeB.armv7.o @rm -Rf TheApp.app cache cache-first @mkdir -p TheApp.app @mkdir -p cache - @cp .libs/ios/nativeA.arm64.o libNative.a + @cp .libs/ios/nativeA.armv7.o libNative.a @$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/btouch-native binding.cs --link-with=libNative.a,Native -s:managed.cs -o:binding.dll @$(SYSTEM_MCS) app.cs -r:$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/Xamarin.iOS.dll -r:binding.dll -out:app.exe - @$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/mtouch -r:binding.dll app.exe --abi=arm64 -sdk "$(IOS_SDK_VERSION)" -dev:TheApp.app -sdkroot $(XCODE_DEVELOPER_ROOT) --cache=$(shell pwd)/cache -r:$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/Xamarin.iOS.dll + @$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/mtouch -r:binding.dll app.exe --abi=armv7 -sdk "$(IOS_SDK_VERSION)" -dev:TheApp.app -sdkroot $(XCODE_DEVELOPER_ROOT) --cache=$(shell pwd)/cache -r:$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/Xamarin.iOS.dll @cp -Rp cache cache-first - @cp .libs/ios/nativeB.arm64.o libNative.a + @cp .libs/ios/nativeB.armv7.o libNative.a @$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/btouch-native binding.cs --link-with=libNative.a,Native -s:managed.cs -o:binding.dll # do not rebuild the .exe - @$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/mtouch -r:binding.dll app.exe --abi=arm64 -sdk "$(IOS_SDK_VERSION)" -dev:TheApp.app -sdkroot $(XCODE_DEVELOPER_ROOT) --cache=$(shell pwd)/cache -r:$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/Xamarin.iOS.dll + @$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/mtouch -r:binding.dll app.exe --abi=armv7 -sdk "$(IOS_SDK_VERSION)" -dev:TheApp.app -sdkroot $(XCODE_DEVELOPER_ROOT) --cache=$(shell pwd)/cache -r:$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/Xamarin.iOS.dll - # this will verify that binding.dll wasn't AOT'ed again - if binding.dll.arm64.s differ then the AOT compiler executed. - @diff -u cache-first/arm64/binding.dll.s cache/arm64/binding.dll.s + # this will verify that binding.dll wasn't AOT'ed again - if binding.dll.armv7.s differ then the AOT compiler executed. + @diff -u cache-first/armv7/binding.dll.s cache/armv7/binding.dll.s @echo "$@: Success" include $(TOP)/mk/rules.mk diff --git a/tests/scripted/bug-35786/Makefile b/tests/scripted/bug-35786/Makefile index f00605f3210..b3b80c7e7ae 100644 --- a/tests/scripted/bug-35786/Makefile +++ b/tests/scripted/bug-35786/Makefile @@ -38,7 +38,7 @@ bug-35786: @# we lower the ulimit here so that we don't have to create that many assemblies to test with @# the ulimit default on Yosemite is ulimit=256, which requires 300 assemblies to break the stripper, and 400 assemblies to break the AOT compiler. @# with 96 here, we only need 20 assemblies to break the stripper, and 35 to break the AOT compiler, so running the test with 100 assemblies should be more than enough. - ulimit -n 96 && $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/bin/mtouch --dev libs/bug-35786.app --targetver=10.3 --abi armv7,arm64 libs/bug-35786.exe --sdkroot $(XCODE_DEVELOPER_ROOT) --sdk $(IOS_SDK_VERSION) -r:$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/Xamarin.iOS.dll + ulimit -n 96 && $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/bin/mtouch --dev libs/bug-35786.app --abi armv7,arm64 libs/bug-35786.exe --sdkroot $(XCODE_DEVELOPER_ROOT) --sdk $(IOS_SDK_VERSION) -r:$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/Xamarin.iOS.dll include $(TOP)/mk/rules.mk diff --git a/tests/templates/WatchContainer/Container.csproj b/tests/templates/WatchContainer/Container.csproj index 4dd2a4c4e7e..912f11337e9 100644 --- a/tests/templates/WatchContainer/Container.csproj +++ b/tests/templates/WatchContainer/Container.csproj @@ -20,7 +20,7 @@ bin\iPhoneSimulator\$(Configuration)-watchos prompt 4 - x86_64 + i386 None true iPhone Developer @@ -32,7 +32,7 @@ true prompt 4 - ARM64 + ARMv7 %CONTAINER_PATH%Entitlements.plist true iPhone Developer @@ -44,7 +44,7 @@ true prompt 4 - x86_64 + i386 None iPhone Developer @@ -56,7 +56,7 @@ DEBUG;$(DefineConstants) prompt 4 - ARM64 + ARMv7 Full %CONTAINER_PATH%Entitlements.plist true diff --git a/tests/test-libraries/libtest.h b/tests/test-libraries/libtest.h index 5f1918d86b2..33218d15d94 100644 --- a/tests/test-libraries/libtest.h +++ b/tests/test-libraries/libtest.h @@ -1,12 +1,7 @@ #import -#include #include "rename.h" -#if !TARGET_OS_WATCH -#import -#endif - #ifdef __cplusplus extern "C" { #endif @@ -14,17 +9,6 @@ extern "C" { int theUltimateAnswer (); void useZLib (); -void x_get_matrix_float2x2 (id self, const char *sel, float* r0c0, float* r0c1, float* r1c0, float* r1c1); -void x_get_matrix_float3x3 (id self, const char *sel, float* r0c0, float* r0c1, float* r0c2, float* r1c0, float* r1c1, float* r1c2, float* r2c0, float* r2c1, float* r2c2); -void x_get_matrix_float4x4 (id self, const char *sel, float* r0c0, float* r0c1, float* r0c2, float* r0c3, float* r1c0, float* r1c1, float* r1c2, float* r1c3, float* r2c0, float* r2c1, float* r2c2, float* r2c3, float* r3c0, float* r3c1, float* r3c2, float* r3c3); -void x_get_matrix_float4x3 (id self, const char *sel, float* r0c0, float* r0c1, float* r0c2, float* r0c3, float* r1c0, float* r1c1, float* r1c2, float* r1c3, float* r2c0, float* r2c1, float* r2c2, float* r2c3); - -#if !TARGET_OS_WATCH -void x_mdltransformcomponent_get_local_transform (id self, NSTimeInterval time, float* r0c0, float* r0c1, float* r0c2, float* r0c3, float* r1c0, float* r1c1, float* r1c2, float* r1c3, float* r2c0, float* r2c1, float* r2c2, float* r2c3, float* r3c0, float* r3c1, float* r3c2, float* r3c3); -void x_mdltransform_create_global_transform (MDLObject *object, NSTimeInterval time, float* r0c0, float* r0c1, float* r0c2, float* r0c3, float* r1c0, float* r1c1, float* r1c2, float* r1c3, float* r2c0, float* r2c1, float* r2c2, float* r2c3, float* r3c0, float* r3c1, float* r3c2, float* r3c3); -void x_mdltransform_get_rotation_matrix (MDLTransform *self, NSTimeInterval time, float* r0c0, float* r0c1, float* r0c2, float* r0c3, float* r1c0, float* r1c1, float* r1c2, float* r1c3, float* r2c0, float* r2c1, float* r2c2, float* r2c3, float* r3c0, float* r3c1, float* r3c2, float* r3c3); -#endif - /* * Various structs used in ObjCRegistrarTest */ diff --git a/tests/test-libraries/libtest.m b/tests/test-libraries/libtest.m index cc6eab828c3..921afc9cbf5 100644 --- a/tests/test-libraries/libtest.m +++ b/tests/test-libraries/libtest.m @@ -1,8 +1,6 @@ #import -#include #include -#include #include #include "libtest.h" @@ -17,233 +15,6 @@ void useZLib () printf ("ZLib version: %s\n", zlibVersion ()); } -typedef matrix_float2x2 (*func_x_get_matrix_float2x2_msgSend) (id self, SEL sel); -void -x_get_matrix_float2x2 (id self, const char *sel, - float* r0c0, float* r0c1, - float* r1c0, float* r1c1) -{ - matrix_float2x2 rv; -#if __i386__ - IMP msgSend = (IMP) objc_msgSend_stret; -#elif __x86_64__ - IMP msgSend = (IMP) objc_msgSend; -#elif __arm64__ - IMP msgSend = (IMP) objc_msgSend; -#elif __arm__ - IMP msgSend = (IMP) objc_msgSend_stret; -#else -#error unknown architecture -#endif - rv = ((func_x_get_matrix_float2x2_msgSend) msgSend) (self, sel_registerName (sel)); - *r0c0 = rv.columns[0][0]; - *r0c1 = rv.columns[1][0]; - *r1c0 = rv.columns[0][1]; - *r1c1 = rv.columns[1][1]; -} - -typedef matrix_float3x3 (*func_x_get_matrix_float3x3_msgSend) (id self, SEL sel); -void -x_get_matrix_float3x3 (id self, const char *sel, - float* r0c0, float* r0c1, float* r0c2, - float* r1c0, float* r1c1, float* r1c2, - float* r2c0, float* r2c1, float* r2c2) -{ - matrix_float3x3 rv; -#if __i386__ - IMP msgSend = (IMP) objc_msgSend_stret; -#elif __x86_64__ - IMP msgSend = (IMP) objc_msgSend_stret; -#elif __arm64__ - IMP msgSend = (IMP) objc_msgSend; -#elif __arm__ - IMP msgSend = (IMP) objc_msgSend_stret; -#else -#error unknown architecture -#endif - rv = ((func_x_get_matrix_float3x3_msgSend) msgSend) (self, sel_registerName (sel)); - *r0c0 = rv.columns[0][0]; - *r0c1 = rv.columns[1][0]; - *r0c2 = rv.columns[2][0]; - - *r1c0 = rv.columns[0][1]; - *r1c1 = rv.columns[1][1]; - *r1c2 = rv.columns[2][1]; - - *r2c0 = rv.columns[0][2]; - *r2c1 = rv.columns[1][2]; - *r2c2 = rv.columns[2][2]; -} - -typedef matrix_float4x4 (*func_x_get_matrix_float4x4_msgSend) (id self, SEL sel); -void -x_get_matrix_float4x4 (id self, const char *sel, - float* r0c0, float* r0c1, float* r0c2, float* r0c3, - float* r1c0, float* r1c1, float* r1c2, float* r1c3, - float* r2c0, float* r2c1, float* r2c2, float* r2c3, - float* r3c0, float* r3c1, float* r3c2, float* r3c3) -{ - matrix_float4x4 rv; -#if __i386__ - IMP msgSend = (IMP) objc_msgSend_stret; -#elif __x86_64__ - IMP msgSend = (IMP) objc_msgSend_stret; -#elif __arm64__ - IMP msgSend = (IMP) objc_msgSend; -#elif __arm__ - IMP msgSend = (IMP) objc_msgSend_stret; -#else -#error unknown architecture -#endif - rv = ((func_x_get_matrix_float4x4_msgSend) msgSend) (self, sel_registerName (sel)); - *r0c0 = rv.columns[0][0]; - *r0c1 = rv.columns[1][0]; - *r0c2 = rv.columns[2][0]; - *r0c3 = rv.columns[3][0]; - - *r1c0 = rv.columns[0][1]; - *r1c1 = rv.columns[1][1]; - *r1c2 = rv.columns[2][1]; - *r1c3 = rv.columns[3][1]; - - *r2c0 = rv.columns[0][2]; - *r2c1 = rv.columns[1][2]; - *r2c2 = rv.columns[2][2]; - *r2c3 = rv.columns[3][2]; - - *r3c0 = rv.columns[0][3]; - *r3c1 = rv.columns[1][3]; - *r3c2 = rv.columns[2][3]; - *r3c3 = rv.columns[3][3]; -} - -typedef matrix_float4x3 (*func_x_get_matrix_float4x3_msgSend) (id self, SEL sel); -void -x_get_matrix_float4x3 (id self, const char *sel, - float* r0c0, float* r0c1, float* r0c2, float* r0c3, - float* r1c0, float* r1c1, float* r1c2, float* r1c3, - float* r2c0, float* r2c1, float* r2c2, float* r2c3) -{ - matrix_float4x3 rv; -#if __i386__ - IMP msgSend = (IMP) objc_msgSend_stret; -#elif __x86_64__ - IMP msgSend = (IMP) objc_msgSend_stret; -#elif __arm64__ - IMP msgSend = (IMP) objc_msgSend; -#elif __arm__ - IMP msgSend = (IMP) objc_msgSend_stret; -#else -#error unknown architecture -#endif - rv = ((func_x_get_matrix_float4x3_msgSend) msgSend) (self, sel_registerName (sel)); - *r0c0 = rv.columns[0][0]; - *r0c1 = rv.columns[1][0]; - *r0c2 = rv.columns[2][0]; - *r0c3 = rv.columns[3][0]; - - *r1c0 = rv.columns[0][1]; - *r1c1 = rv.columns[1][1]; - *r1c2 = rv.columns[2][1]; - *r1c3 = rv.columns[3][1]; - - *r2c0 = rv.columns[0][2]; - *r2c1 = rv.columns[1][2]; - *r2c2 = rv.columns[2][2]; - *r2c3 = rv.columns[3][2]; -} -#if !TARGET_OS_WATCH -void -x_mdltransformcomponent_get_local_transform (id self, NSTimeInterval time, - float* r0c0, float* r0c1, float* r0c2, float* r0c3, - float* r1c0, float* r1c1, float* r1c2, float* r1c3, - float* r2c0, float* r2c1, float* r2c2, float* r2c3, - float* r3c0, float* r3c1, float* r3c2, float* r3c3) -{ - matrix_float4x4 rv; - rv = [self localTransformAtTime: time]; - *r0c0 = rv.columns[0][0]; - *r0c1 = rv.columns[1][0]; - *r0c2 = rv.columns[2][0]; - *r0c3 = rv.columns[3][0]; - - *r1c0 = rv.columns[0][1]; - *r1c1 = rv.columns[1][1]; - *r1c2 = rv.columns[2][1]; - *r1c3 = rv.columns[3][1]; - - *r2c0 = rv.columns[0][2]; - *r2c1 = rv.columns[1][2]; - *r2c2 = rv.columns[2][2]; - *r2c3 = rv.columns[3][2]; - - *r3c0 = rv.columns[0][3]; - *r3c1 = rv.columns[1][3]; - *r3c2 = rv.columns[2][3]; - *r3c3 = rv.columns[3][3]; -} - -void -x_mdltransform_create_global_transform (MDLObject *object, NSTimeInterval time, - float* r0c0, float* r0c1, float* r0c2, float* r0c3, - float* r1c0, float* r1c1, float* r1c2, float* r1c3, - float* r2c0, float* r2c1, float* r2c2, float* r2c3, - float* r3c0, float* r3c1, float* r3c2, float* r3c3) -{ - matrix_float4x4 rv; - rv = [MDLTransform globalTransformWithObject: object atTime: time]; - *r0c0 = rv.columns[0][0]; - *r0c1 = rv.columns[1][0]; - *r0c2 = rv.columns[2][0]; - *r0c3 = rv.columns[3][0]; - - *r1c0 = rv.columns[0][1]; - *r1c1 = rv.columns[1][1]; - *r1c2 = rv.columns[2][1]; - *r1c3 = rv.columns[3][1]; - - *r2c0 = rv.columns[0][2]; - *r2c1 = rv.columns[1][2]; - *r2c2 = rv.columns[2][2]; - *r2c3 = rv.columns[3][2]; - - *r3c0 = rv.columns[0][3]; - *r3c1 = rv.columns[1][3]; - *r3c2 = rv.columns[2][3]; - *r3c3 = rv.columns[3][3]; -} - -void -x_mdltransform_get_rotation_matrix (MDLTransform *self, NSTimeInterval time, - float* r0c0, float* r0c1, float* r0c2, float* r0c3, - float* r1c0, float* r1c1, float* r1c2, float* r1c3, - float* r2c0, float* r2c1, float* r2c2, float* r2c3, - float* r3c0, float* r3c1, float* r3c2, float* r3c3) -{ - matrix_float4x4 rv; - rv = [self rotationMatrixAtTime: time]; - *r0c0 = rv.columns[0][0]; - *r0c1 = rv.columns[1][0]; - *r0c2 = rv.columns[2][0]; - *r0c3 = rv.columns[3][0]; - - *r1c0 = rv.columns[0][1]; - *r1c1 = rv.columns[1][1]; - *r1c2 = rv.columns[2][1]; - *r1c3 = rv.columns[3][1]; - - *r2c0 = rv.columns[0][2]; - *r2c1 = rv.columns[1][2]; - *r2c2 = rv.columns[2][2]; - *r2c3 = rv.columns[3][2]; - - *r3c0 = rv.columns[0][3]; - *r3c1 = rv.columns[1][3]; - *r3c2 = rv.columns[2][3]; - *r3c3 = rv.columns[3][3]; -} -#endif // !TARGET_OS_WATCH - @interface UltimateMachine : NSObject { } diff --git a/tests/test-libraries/rename.h b/tests/test-libraries/rename.h index 621dcc96666..5d51469e478 100644 --- a/tests/test-libraries/rename.h +++ b/tests/test-libraries/rename.h @@ -53,13 +53,6 @@ #define CtorChaining1 object_CtorChaining1 #define ObjCExceptionTest object_ObjCExceptionTest #define ObjCProtocolClassTest object_ObjCProtocolClassTest - #define x_mdltransform_get_rotation_matrix object_x_mdltransform_get_rotation_matrix - #define x_mdltransformcomponent_get_local_transform object_x_mdltransformcomponent_get_local_transform - #define x_mdltransform_create_global_transform object_x_mdltransform_create_global_transform - #define x_get_matrix_float4x4 object_x_get_matrix_float4x4 - #define x_get_matrix_float4x3 object_x_get_matrix_float4x3 - #define x_get_matrix_float3x3 object_x_get_matrix_float3x3 - #define x_get_matrix_float2x2 object_x_get_matrix_float2x2 #elif PREFIX == 2 #define theUltimateAnswer ar_theUltimateAnswer #define useZLib ar_useZLib @@ -114,13 +107,6 @@ #define CtorChaining1 ar_CtorChaining1 #define ObjCExceptionTest ar_ObjCExceptionTest #define ObjCProtocolClassTest ar_ObjCProtocolClassTest - #define x_mdltransform_get_rotation_matrix ar_x_mdltransform_get_rotation_matrix - #define x_mdltransformcomponent_get_local_transform ar_x_mdltransformcomponent_get_local_transform - #define x_mdltransform_create_global_transform ar_x_mdltransform_create_global_transform - #define x_get_matrix_float4x4 ar_x_get_matrix_float4x4 - #define x_get_matrix_float4x3 ar_x_get_matrix_float4x3 - #define x_get_matrix_float3x3 ar_x_get_matrix_float3x3 - #define x_get_matrix_float2x2 ar_x_get_matrix_float2x2 #else // keep original names #endif diff --git a/tests/tests-mac.sln b/tests/tests-mac.sln index 5c65a62077a..6dad0de6f8c 100644 --- a/tests/tests-mac.sln +++ b/tests/tests-mac.sln @@ -1,41 +1,17 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dontlink-mac-unified", "dontlink-mac\dontlink-mac-unified.csproj", "{FD385098-B3FD-4331-92BF-CC1F918E3334}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mmptest", "mmptest\mmptest.csproj", "{6E5405EC-1F68-4CD8-AD4B-E4CCFBE47977}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "msbuild-mac", "msbuild-mac\msbuild-mac.csproj", "{F8500DCE-2119-4DF9-8360-0F46DDB6930C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuiUnit_xammac_mobile", "..\external\guiunit\src\framework\GuiUnit_xammac_mobile.csproj", "{EACFD119-769E-4E6C-89B7-A6CE3757C431}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xammac_tests", "xammac_tests\xammac_tests.csproj", "{22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuiUnit_NET_4_5", "..\external\guiunit\src\framework\GuiUnit_NET_4_5.csproj", "{D12F0F7B-8DE3-43EC-BA49-41052D065A9B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dontlink-mac-unified", "dontlink-mac\dontlink-mac-unified.csproj", "{78831857-A261-8EE0-A5F6-33D2628DE5D0}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "apitest-unified", "apitest\apitest-unified.csproj", "{EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "introspection-mac", "introspection\Mac\introspection-mac.csproj", "{EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "introspection-mac-unified", "introspection\Mac\introspection-mac-unified.csproj", "{4D0F03E2-FD85-D330-562F-C7421BDF3F3C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "introspection-mac-unified-32", "introspection\Mac\introspection-mac-unified-32.csproj", "{E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "apitest-unified", "apitest\apitest-unified.csproj", "{7A0EDA95-30A6-43E1-AD43-368AD95AC48B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "apitest", "apitest\apitest.csproj", "{7A0EDA95-30A6-43E1-AD43-368AD95AC48B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "apitest-unified-32", "apitest\apitest-unified-32.csproj", "{4863B19A-06DC-90CB-0A14-5C5F0023A237}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "apitest-unifiedXM45", "apitest\apitest-unifiedXM45.csproj", "{3E867194-BFE6-E5EC-F39F-63AF6A5304FF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "apitest-unifiedXM45-32", "apitest\apitest-unifiedXM45-32.csproj", "{C74FC111-C78B-3723-456C-FBCA7CDA5147}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dontlink-mac", "dontlink-mac\dontlink-mac.csproj", "{FD385098-B3FD-4331-92BF-CC1F918E3334}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dontlink-mac-unified-32", "dontlink-mac\dontlink-mac-unified-32.csproj", "{E70715C3-299F-6FD5-E1C1-21949351D4B8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dontlink-mac-unifiedXM45", "dontlink-mac\dontlink-mac-unifiedXM45.csproj", "{A99E2CFD-3D03-D274-8E2C-036F0B00132F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dontlink-mac-unifiedXM45-32", "dontlink-mac\dontlink-mac-unifiedXM45-32.csproj", "{50CD2B87-A83C-1A43-A4B0-EA349E7082A5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xammac_tests", "xammac_tests\xammac_tests.csproj", "{22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -47,6 +23,18 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FD385098-B3FD-4331-92BF-CC1F918E3334}.Debug|Any CPU.ActiveCfg = Debug|x86 + {FD385098-B3FD-4331-92BF-CC1F918E3334}.Debug|Any CPU.Build.0 = Debug|x86 + {FD385098-B3FD-4331-92BF-CC1F918E3334}.Release|Any CPU.ActiveCfg = Release|x86 + {FD385098-B3FD-4331-92BF-CC1F918E3334}.Release|Any CPU.Build.0 = Release|x86 + {FD385098-B3FD-4331-92BF-CC1F918E3334}.Default|Any CPU.ActiveCfg = Debug|x86 + {FD385098-B3FD-4331-92BF-CC1F918E3334}.Default|Any CPU.Build.0 = Debug|x86 + {FD385098-B3FD-4331-92BF-CC1F918E3334}.AppStore|Any CPU.ActiveCfg = Debug|x86 + {FD385098-B3FD-4331-92BF-CC1F918E3334}.AppStore|Any CPU.Build.0 = Debug|x86 + {FD385098-B3FD-4331-92BF-CC1F918E3334}.Debug|x86.ActiveCfg = Debug|x86 + {FD385098-B3FD-4331-92BF-CC1F918E3334}.Debug|x86.Build.0 = Debug|x86 + {FD385098-B3FD-4331-92BF-CC1F918E3334}.Release|x86.ActiveCfg = Release|x86 + {FD385098-B3FD-4331-92BF-CC1F918E3334}.Release|x86.Build.0 = Release|x86 {6E5405EC-1F68-4CD8-AD4B-E4CCFBE47977}.Debug|Any CPU.ActiveCfg = Debug|x86 {6E5405EC-1F68-4CD8-AD4B-E4CCFBE47977}.Debug|Any CPU.Build.0 = Debug|x86 {6E5405EC-1F68-4CD8-AD4B-E4CCFBE47977}.Release|Any CPU.ActiveCfg = Release|x86 @@ -83,90 +71,6 @@ Global {EACFD119-769E-4E6C-89B7-A6CE3757C431}.Debug|x86.Build.0 = Debug|Any CPU {EACFD119-769E-4E6C-89B7-A6CE3757C431}.Release|x86.ActiveCfg = Release|Any CPU {EACFD119-769E-4E6C-89B7-A6CE3757C431}.Release|x86.Build.0 = Release|Any CPU - {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Debug|Any CPU.Build.0 = Debug|Any CPU - {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Release|Any CPU.ActiveCfg = Release|Any CPU - {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Release|Any CPU.Build.0 = Release|Any CPU - {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Default|Any CPU.ActiveCfg = Debug|Any CPU - {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Default|Any CPU.Build.0 = Debug|Any CPU - {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Debug|x86.ActiveCfg = Debug|Any CPU - {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Debug|x86.Build.0 = Debug|Any CPU - {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Release|x86.ActiveCfg = Release|Any CPU - {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Release|x86.Build.0 = Release|Any CPU - {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Release|Any CPU.Build.0 = Release|Any CPU - {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Default|Any CPU.ActiveCfg = Debug|Any CPU - {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Default|Any CPU.Build.0 = Debug|Any CPU - {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Debug|x86.ActiveCfg = Debug|Any CPU - {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Debug|x86.Build.0 = Debug|Any CPU - {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Release|x86.ActiveCfg = Release|Any CPU - {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Release|x86.Build.0 = Release|Any CPU - {78831857-A261-8EE0-A5F6-33D2628DE5D0}.Debug|Any CPU.ActiveCfg = Debug|x86 - {78831857-A261-8EE0-A5F6-33D2628DE5D0}.Debug|Any CPU.Build.0 = Debug|x86 - {78831857-A261-8EE0-A5F6-33D2628DE5D0}.Release|Any CPU.ActiveCfg = Release|x86 - {78831857-A261-8EE0-A5F6-33D2628DE5D0}.Release|Any CPU.Build.0 = Release|x86 - {78831857-A261-8EE0-A5F6-33D2628DE5D0}.Default|Any CPU.ActiveCfg = Debug|x86 - {78831857-A261-8EE0-A5F6-33D2628DE5D0}.Default|Any CPU.Build.0 = Debug|x86 - {78831857-A261-8EE0-A5F6-33D2628DE5D0}.AppStore|Any CPU.ActiveCfg = Debug|x86 - {78831857-A261-8EE0-A5F6-33D2628DE5D0}.AppStore|Any CPU.Build.0 = Debug|x86 - {78831857-A261-8EE0-A5F6-33D2628DE5D0}.Debug|x86.ActiveCfg = Debug|x86 - {78831857-A261-8EE0-A5F6-33D2628DE5D0}.Debug|x86.Build.0 = Debug|x86 - {78831857-A261-8EE0-A5F6-33D2628DE5D0}.Release|x86.ActiveCfg = Release|x86 - {78831857-A261-8EE0-A5F6-33D2628DE5D0}.Release|x86.Build.0 = Release|x86 - {EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}.Debug|Any CPU.ActiveCfg = Debug|x86 - {EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}.Debug|Any CPU.Build.0 = Debug|x86 - {EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}.Release|Any CPU.ActiveCfg = Release|x86 - {EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}.Release|Any CPU.Build.0 = Release|x86 - {EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}.Default|Any CPU.ActiveCfg = Debug|x86 - {EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}.Default|Any CPU.Build.0 = Debug|x86 - {EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}.AppStore|Any CPU.ActiveCfg = Debug|x86 - {EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}.AppStore|Any CPU.Build.0 = Debug|x86 - {EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}.Debug|x86.ActiveCfg = Debug|x86 - {EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}.Debug|x86.Build.0 = Debug|x86 - {EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}.Release|x86.ActiveCfg = Release|x86 - {EF5231F6-E06A-BC8A-9B5C-181E2AC5EBBC}.Release|x86.Build.0 = Release|x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}.Debug|Any CPU.ActiveCfg = Debug|x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}.Debug|Any CPU.Build.0 = Debug|x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}.Release|Any CPU.ActiveCfg = Release|x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}.Release|Any CPU.Build.0 = Release|x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}.Default|Any CPU.ActiveCfg = Debug|x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}.Default|Any CPU.Build.0 = Debug|x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}.AppStore|Any CPU.ActiveCfg = Debug|x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}.AppStore|Any CPU.Build.0 = Debug|x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}.Debug|x86.ActiveCfg = Debug|x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}.Debug|x86.Build.0 = Debug|x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}.Release|x86.ActiveCfg = Release|x86 - {EA3E6B50-AE2B-4A63-BBFC-9888B93331CA}.Release|x86.Build.0 = Release|x86 - {4D0F03E2-FD85-D330-562F-C7421BDF3F3C}.Debug|Any CPU.ActiveCfg = Debug|x86 - {4D0F03E2-FD85-D330-562F-C7421BDF3F3C}.Debug|Any CPU.Build.0 = Debug|x86 - {4D0F03E2-FD85-D330-562F-C7421BDF3F3C}.Release|Any CPU.ActiveCfg = Release|x86 - {4D0F03E2-FD85-D330-562F-C7421BDF3F3C}.Release|Any CPU.Build.0 = Release|x86 - {4D0F03E2-FD85-D330-562F-C7421BDF3F3C}.Default|Any CPU.ActiveCfg = Debug|x86 - {4D0F03E2-FD85-D330-562F-C7421BDF3F3C}.Default|Any CPU.Build.0 = Debug|x86 - {4D0F03E2-FD85-D330-562F-C7421BDF3F3C}.AppStore|Any CPU.ActiveCfg = Debug|x86 - {4D0F03E2-FD85-D330-562F-C7421BDF3F3C}.AppStore|Any CPU.Build.0 = Debug|x86 - {4D0F03E2-FD85-D330-562F-C7421BDF3F3C}.Debug|x86.ActiveCfg = Debug|x86 - {4D0F03E2-FD85-D330-562F-C7421BDF3F3C}.Debug|x86.Build.0 = Debug|x86 - {4D0F03E2-FD85-D330-562F-C7421BDF3F3C}.Release|x86.ActiveCfg = Release|x86 - {4D0F03E2-FD85-D330-562F-C7421BDF3F3C}.Release|x86.Build.0 = Release|x86 - {E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}.Debug|Any CPU.ActiveCfg = Debug|x86 - {E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}.Debug|Any CPU.Build.0 = Debug|x86 - {E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}.Release|Any CPU.ActiveCfg = Release|x86 - {E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}.Release|Any CPU.Build.0 = Release|x86 - {E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}.Default|Any CPU.ActiveCfg = Debug|x86 - {E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}.Default|Any CPU.Build.0 = Debug|x86 - {E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}.AppStore|Any CPU.ActiveCfg = Debug|x86 - {E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}.AppStore|Any CPU.Build.0 = Debug|x86 - {E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}.Debug|x86.ActiveCfg = Debug|x86 - {E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}.Debug|x86.Build.0 = Debug|x86 - {E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}.Release|x86.ActiveCfg = Release|x86 - {E0E84B58-C333-1BF3-D1EC-42EE3EA0D071}.Release|x86.Build.0 = Release|x86 {7A0EDA95-30A6-43E1-AD43-368AD95AC48B}.Debug|Any CPU.ActiveCfg = Debug|x86 {7A0EDA95-30A6-43E1-AD43-368AD95AC48B}.Debug|Any CPU.Build.0 = Debug|x86 {7A0EDA95-30A6-43E1-AD43-368AD95AC48B}.Release|Any CPU.ActiveCfg = Release|x86 @@ -179,89 +83,17 @@ Global {7A0EDA95-30A6-43E1-AD43-368AD95AC48B}.Debug|x86.Build.0 = Debug|x86 {7A0EDA95-30A6-43E1-AD43-368AD95AC48B}.Release|x86.ActiveCfg = Release|x86 {7A0EDA95-30A6-43E1-AD43-368AD95AC48B}.Release|x86.Build.0 = Release|x86 - {4863B19A-06DC-90CB-0A14-5C5F0023A237}.Debug|Any CPU.ActiveCfg = Debug|x86 - {4863B19A-06DC-90CB-0A14-5C5F0023A237}.Debug|Any CPU.Build.0 = Debug|x86 - {4863B19A-06DC-90CB-0A14-5C5F0023A237}.Release|Any CPU.ActiveCfg = Release|x86 - {4863B19A-06DC-90CB-0A14-5C5F0023A237}.Release|Any CPU.Build.0 = Release|x86 - {4863B19A-06DC-90CB-0A14-5C5F0023A237}.Default|Any CPU.ActiveCfg = Debug|x86 - {4863B19A-06DC-90CB-0A14-5C5F0023A237}.Default|Any CPU.Build.0 = Debug|x86 - {4863B19A-06DC-90CB-0A14-5C5F0023A237}.AppStore|Any CPU.ActiveCfg = Debug|x86 - {4863B19A-06DC-90CB-0A14-5C5F0023A237}.AppStore|Any CPU.Build.0 = Debug|x86 - {4863B19A-06DC-90CB-0A14-5C5F0023A237}.Debug|x86.ActiveCfg = Debug|x86 - {4863B19A-06DC-90CB-0A14-5C5F0023A237}.Debug|x86.Build.0 = Debug|x86 - {4863B19A-06DC-90CB-0A14-5C5F0023A237}.Release|x86.ActiveCfg = Release|x86 - {4863B19A-06DC-90CB-0A14-5C5F0023A237}.Release|x86.Build.0 = Release|x86 - {3E867194-BFE6-E5EC-F39F-63AF6A5304FF}.Debug|Any CPU.ActiveCfg = Debug|x86 - {3E867194-BFE6-E5EC-F39F-63AF6A5304FF}.Debug|Any CPU.Build.0 = Debug|x86 - {3E867194-BFE6-E5EC-F39F-63AF6A5304FF}.Release|Any CPU.ActiveCfg = Release|x86 - {3E867194-BFE6-E5EC-F39F-63AF6A5304FF}.Release|Any CPU.Build.0 = Release|x86 - {3E867194-BFE6-E5EC-F39F-63AF6A5304FF}.Default|Any CPU.ActiveCfg = Debug|x86 - {3E867194-BFE6-E5EC-F39F-63AF6A5304FF}.Default|Any CPU.Build.0 = Debug|x86 - {3E867194-BFE6-E5EC-F39F-63AF6A5304FF}.AppStore|Any CPU.ActiveCfg = Debug|x86 - {3E867194-BFE6-E5EC-F39F-63AF6A5304FF}.AppStore|Any CPU.Build.0 = Debug|x86 - {3E867194-BFE6-E5EC-F39F-63AF6A5304FF}.Debug|x86.ActiveCfg = Debug|x86 - {3E867194-BFE6-E5EC-F39F-63AF6A5304FF}.Debug|x86.Build.0 = Debug|x86 - {3E867194-BFE6-E5EC-F39F-63AF6A5304FF}.Release|x86.ActiveCfg = Release|x86 - {3E867194-BFE6-E5EC-F39F-63AF6A5304FF}.Release|x86.Build.0 = Release|x86 - {C74FC111-C78B-3723-456C-FBCA7CDA5147}.Debug|Any CPU.ActiveCfg = Debug|x86 - {C74FC111-C78B-3723-456C-FBCA7CDA5147}.Debug|Any CPU.Build.0 = Debug|x86 - {C74FC111-C78B-3723-456C-FBCA7CDA5147}.Release|Any CPU.ActiveCfg = Release|x86 - {C74FC111-C78B-3723-456C-FBCA7CDA5147}.Release|Any CPU.Build.0 = Release|x86 - {C74FC111-C78B-3723-456C-FBCA7CDA5147}.Default|Any CPU.ActiveCfg = Debug|x86 - {C74FC111-C78B-3723-456C-FBCA7CDA5147}.Default|Any CPU.Build.0 = Debug|x86 - {C74FC111-C78B-3723-456C-FBCA7CDA5147}.AppStore|Any CPU.ActiveCfg = Debug|x86 - {C74FC111-C78B-3723-456C-FBCA7CDA5147}.AppStore|Any CPU.Build.0 = Debug|x86 - {C74FC111-C78B-3723-456C-FBCA7CDA5147}.Debug|x86.ActiveCfg = Debug|x86 - {C74FC111-C78B-3723-456C-FBCA7CDA5147}.Debug|x86.Build.0 = Debug|x86 - {C74FC111-C78B-3723-456C-FBCA7CDA5147}.Release|x86.ActiveCfg = Release|x86 - {C74FC111-C78B-3723-456C-FBCA7CDA5147}.Release|x86.Build.0 = Release|x86 - {FD385098-B3FD-4331-92BF-CC1F918E3334}.Debug|Any CPU.ActiveCfg = Debug|x86 - {FD385098-B3FD-4331-92BF-CC1F918E3334}.Debug|Any CPU.Build.0 = Debug|x86 - {FD385098-B3FD-4331-92BF-CC1F918E3334}.Release|Any CPU.ActiveCfg = Release|x86 - {FD385098-B3FD-4331-92BF-CC1F918E3334}.Release|Any CPU.Build.0 = Release|x86 - {FD385098-B3FD-4331-92BF-CC1F918E3334}.Default|Any CPU.ActiveCfg = Debug|x86 - {FD385098-B3FD-4331-92BF-CC1F918E3334}.Default|Any CPU.Build.0 = Debug|x86 - {FD385098-B3FD-4331-92BF-CC1F918E3334}.AppStore|Any CPU.ActiveCfg = Debug|x86 - {FD385098-B3FD-4331-92BF-CC1F918E3334}.AppStore|Any CPU.Build.0 = Debug|x86 - {FD385098-B3FD-4331-92BF-CC1F918E3334}.Debug|x86.ActiveCfg = Debug|x86 - {FD385098-B3FD-4331-92BF-CC1F918E3334}.Debug|x86.Build.0 = Debug|x86 - {FD385098-B3FD-4331-92BF-CC1F918E3334}.Release|x86.ActiveCfg = Release|x86 - {FD385098-B3FD-4331-92BF-CC1F918E3334}.Release|x86.Build.0 = Release|x86 - {E70715C3-299F-6FD5-E1C1-21949351D4B8}.Debug|Any CPU.ActiveCfg = Debug|x86 - {E70715C3-299F-6FD5-E1C1-21949351D4B8}.Debug|Any CPU.Build.0 = Debug|x86 - {E70715C3-299F-6FD5-E1C1-21949351D4B8}.Release|Any CPU.ActiveCfg = Release|x86 - {E70715C3-299F-6FD5-E1C1-21949351D4B8}.Release|Any CPU.Build.0 = Release|x86 - {E70715C3-299F-6FD5-E1C1-21949351D4B8}.Default|Any CPU.ActiveCfg = Debug|x86 - {E70715C3-299F-6FD5-E1C1-21949351D4B8}.Default|Any CPU.Build.0 = Debug|x86 - {E70715C3-299F-6FD5-E1C1-21949351D4B8}.AppStore|Any CPU.ActiveCfg = Debug|x86 - {E70715C3-299F-6FD5-E1C1-21949351D4B8}.AppStore|Any CPU.Build.0 = Debug|x86 - {E70715C3-299F-6FD5-E1C1-21949351D4B8}.Debug|x86.ActiveCfg = Debug|x86 - {E70715C3-299F-6FD5-E1C1-21949351D4B8}.Debug|x86.Build.0 = Debug|x86 - {E70715C3-299F-6FD5-E1C1-21949351D4B8}.Release|x86.ActiveCfg = Release|x86 - {E70715C3-299F-6FD5-E1C1-21949351D4B8}.Release|x86.Build.0 = Release|x86 - {A99E2CFD-3D03-D274-8E2C-036F0B00132F}.Debug|Any CPU.ActiveCfg = Debug|x86 - {A99E2CFD-3D03-D274-8E2C-036F0B00132F}.Debug|Any CPU.Build.0 = Debug|x86 - {A99E2CFD-3D03-D274-8E2C-036F0B00132F}.Release|Any CPU.ActiveCfg = Release|x86 - {A99E2CFD-3D03-D274-8E2C-036F0B00132F}.Release|Any CPU.Build.0 = Release|x86 - {A99E2CFD-3D03-D274-8E2C-036F0B00132F}.Default|Any CPU.ActiveCfg = Debug|x86 - {A99E2CFD-3D03-D274-8E2C-036F0B00132F}.Default|Any CPU.Build.0 = Debug|x86 - {A99E2CFD-3D03-D274-8E2C-036F0B00132F}.AppStore|Any CPU.ActiveCfg = Debug|x86 - {A99E2CFD-3D03-D274-8E2C-036F0B00132F}.AppStore|Any CPU.Build.0 = Debug|x86 - {A99E2CFD-3D03-D274-8E2C-036F0B00132F}.Debug|x86.ActiveCfg = Debug|x86 - {A99E2CFD-3D03-D274-8E2C-036F0B00132F}.Debug|x86.Build.0 = Debug|x86 - {A99E2CFD-3D03-D274-8E2C-036F0B00132F}.Release|x86.ActiveCfg = Release|x86 - {A99E2CFD-3D03-D274-8E2C-036F0B00132F}.Release|x86.Build.0 = Release|x86 - {50CD2B87-A83C-1A43-A4B0-EA349E7082A5}.Debug|Any CPU.ActiveCfg = Debug|x86 - {50CD2B87-A83C-1A43-A4B0-EA349E7082A5}.Debug|Any CPU.Build.0 = Debug|x86 - {50CD2B87-A83C-1A43-A4B0-EA349E7082A5}.Release|Any CPU.ActiveCfg = Release|x86 - {50CD2B87-A83C-1A43-A4B0-EA349E7082A5}.Release|Any CPU.Build.0 = Release|x86 - {50CD2B87-A83C-1A43-A4B0-EA349E7082A5}.Default|Any CPU.ActiveCfg = Debug|x86 - {50CD2B87-A83C-1A43-A4B0-EA349E7082A5}.Default|Any CPU.Build.0 = Debug|x86 - {50CD2B87-A83C-1A43-A4B0-EA349E7082A5}.AppStore|Any CPU.ActiveCfg = Debug|x86 - {50CD2B87-A83C-1A43-A4B0-EA349E7082A5}.AppStore|Any CPU.Build.0 = Debug|x86 - {50CD2B87-A83C-1A43-A4B0-EA349E7082A5}.Debug|x86.ActiveCfg = Debug|x86 - {50CD2B87-A83C-1A43-A4B0-EA349E7082A5}.Debug|x86.Build.0 = Debug|x86 - {50CD2B87-A83C-1A43-A4B0-EA349E7082A5}.Release|x86.ActiveCfg = Release|x86 - {50CD2B87-A83C-1A43-A4B0-EA349E7082A5}.Release|x86.Build.0 = Release|x86 + {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Debug|Any CPU.Build.0 = Debug|Any CPU + {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Release|Any CPU.ActiveCfg = Release|Any CPU + {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Release|Any CPU.Build.0 = Release|Any CPU + {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Default|Any CPU.ActiveCfg = Debug|Any CPU + {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Default|Any CPU.Build.0 = Debug|Any CPU + {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Debug|x86.ActiveCfg = Debug|Any CPU + {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Debug|x86.Build.0 = Debug|Any CPU + {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Release|x86.ActiveCfg = Release|Any CPU + {22BF080C-AFAD-445B-8BB5-42B9E7FDBC68}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/tests/xammac_tests/xammac_tests.csproj b/tests/xammac_tests/xammac_tests.csproj index ce1a8d036c0..84785e75c18 100644 --- a/tests/xammac_tests/xammac_tests.csproj +++ b/tests/xammac_tests/xammac_tests.csproj @@ -17,7 +17,7 @@ full false bin\x86\Debug - __UNIFIED__;DEBUG;MONOMAC;XAMCORE_2_0;TEST_BINDINGS_UNAVAILABLE + __UNIFIED__;DEBUG;MONOMAC;XAMCORE_2_0 prompt 4 false @@ -38,7 +38,7 @@ true bin\x86\Release - __UNIFIED__;MONOMAC;XAMCORE_2_0;TEST_BINDINGS_UNAVAILABLE + __UNIFIED__;MONOMAC;XAMCORE_2_0 prompt 4 false @@ -584,6 +584,9 @@ EventKit\AlarmTest.cs + + EventKit\CalendarItemTest.cs + EventKit\CalendarTest.cs @@ -1051,24 +1054,6 @@ StringUtils.cs - - Metal\HeapDescriptorTest.cs - - - Metal\MTLArgumentDescriptorTest.cs - - - Metal\MTLPipelineBufferDescriptorTests.cs - - - Metal\MTLPointerTypeTests.cs - - - Metal\MTLTextureReferenceType.cs - - - Metal\MTLDeviceTests.cs - diff --git a/tests/xharness/AppRunner.cs b/tests/xharness/AppRunner.cs index 65ff89621b4..32c2c9bbcb4 100644 --- a/tests/xharness/AppRunner.cs +++ b/tests/xharness/AppRunner.cs @@ -318,94 +318,123 @@ public bool EnsureCleanSimulatorState { ensure_clean_simulator_state = value; } } + + void GenerateHumanReadableLogs (string finalPath, string logHeader, XmlDocument doc) + { + // load the resource that contains the xslt and apply it to the doc and write the logs + if (File.Exists (finalPath)) { + // if the file does exist, remove it + File.Delete (finalPath); + } + + using (var strm = Assembly.GetExecutingAssembly ().GetManifestResourceStream ("xharness.nunit-summary.xslt")) + using (var xsltReader = XmlReader.Create (strm)) + using (var xmlReader = new XmlNodeReader (doc)) + using (var writer = new StreamWriter (finalPath)) { + writer.Write (logHeader); + var xslt = new XslCompiledTransform (); + xslt.Load (xsltReader); + xslt.Transform (xmlReader, null, writer); + writer.Flush (); + } + } + public bool TestsSucceeded (LogStream listener_log, bool timed_out, bool crashed) { string log; using (var reader = listener_log.GetReader ()) log = reader.ReadToEnd (); - // parsing the result is different if we are in jenkins or not. - // When in Jenkins, Touch.Unit produces an xml file instead of a console log (so that we can get better test reporting). - // However, for our own reporting, we still want the console-based log. This log is embedded inside the xml produced - // by Touch.Unit, so we need to extract it and write it to disk. We also need to re-save the xml output, since Touch.Unit - // wraps the NUnit xml output with additional information, which we need to unwrap so that Jenkins understands it. + // parsing the result is different if we are in jenkins or nor. if (Harness.InJenkins) { // we have to parse the xml result crashed = false; - var xmldoc = new XmlDocument (); - try { - xmldoc.LoadXml (log); - - var nunit_output = xmldoc.SelectSingleNode ("/TouchUnitTestRun/NUnitOutput"); - var xmllog = nunit_output.InnerXml; - var extra_output = xmldoc.SelectSingleNode ("/TouchUnitTestRun/TouchUnitExtraData"); - log = extra_output.InnerText; - - File.WriteAllText (listener_log.FullPath, log); - + if (log.Contains ("test-results")) { + // remove any possible extra info + var index = log.IndexOf ("{mode} timed out
"); + // update the information of the main node to add information about the mode and the test that is excuted. This will later create + // nicer reports in jenkins + mainResultNode.Attributes["name"].Value = Target.AsString (); + // store a clean version of the logs, later this will be used by the bots to show results in github/web + var path = listener_log.FullPath; + path = path.Replace (".log", ".xml"); + testsResults.Save (path); + Logs.Add (new LogFile ("Test xml", path)); + // we want to keep the old TestResult page, + GenerateHumanReadableLogs (listener_log.FullPath, header, testsResults); + + int ignored = Convert.ToInt16(mainResultNode.Attributes["ignored"].Value); + int invalid = Convert.ToInt16(mainResultNode.Attributes["invalid"].Value); + int inconclusive = Convert.ToInt16(mainResultNode.Attributes["inconclusive"].Value); + int errors = Convert.ToInt16(mainResultNode.Attributes["errors"].Value); + int failures = Convert.ToInt16(mainResultNode.Attributes["failures"].Value); + int totalTests = Convert.ToInt16(mainResultNode.Attributes["total"].Value); + + // generate human readable logs + var failed = errors != 0 || failures != 0; + if (failed) { + Harness.LogWrench ($"@MonkeyWrench: AddSummary: {mode} failed: Test run: {totalTests} Passed: {totalTests - invalid - inconclusive - ignored} Inconclusive: {inconclusive} Failed: {errors + failures} Ignored: {ignored}
"); + main_log.WriteLine ("Test run failed"); return false; } else { - Harness.LogWrench ($"@MonkeyWrench: AddSummary: {mode} crashed
"); - main_log.WriteLine ("Test run crashed"); - crashed = true; - return false; + Harness.LogWrench ($"@MonkeyWrench: AddSummary: {mode} succeeded: Test run: {totalTests} Passed: {totalTests - invalid - inconclusive - ignored} Inconclusive: {inconclusive} Failed: 0 Ignored: {ignored}
"); + main_log.WriteLine ("Test run succeeded"); + return true; } + } else if (timed_out) { + Harness.LogWrench ($"@MonkeyWrench: AddSummary: {mode} timed out
"); + return false; + } else { + Harness.LogWrench ($"@MonkeyWrench: AddSummary: {mode} crashed
"); + main_log.WriteLine ("Test run crashed"); + crashed = true; + return false; } - } - - // parsing the human readable results - if (log.Contains ("Tests run")) { - var tests_run = string.Empty; - var log_lines = log.Split ('\n'); - var failed = false; - foreach (var line in log_lines) { - if (line.Contains ("Tests run:")) { - Console.WriteLine (line); - tests_run = line.Replace ("Tests run: ", ""); - break; - } else if (line.Contains ("FAIL")) { - Console.WriteLine (line); - failed = true; + } else { + // parsing the human readable results + if (log.Contains ("Tests run")) { + var tests_run = string.Empty; + var log_lines = log.Split ('\n'); + var failed = false; + foreach (var line in log_lines) { + if (line.Contains ("Tests run:")) { + Console.WriteLine (line); + tests_run = line.Replace ("Tests run: ", ""); + break; + } else if (line.Contains ("FAIL")) { + Console.WriteLine (line); + failed = true; + } } - } - if (failed) { - Harness.LogWrench ("@MonkeyWrench: AddSummary: {0} failed: {1}
", mode, tests_run); - main_log.WriteLine ("Test run failed"); + if (failed) { + Harness.LogWrench ("@MonkeyWrench: AddSummary: {0} failed: {1}
", mode, tests_run); + main_log.WriteLine ("Test run failed"); + return false; + } else { + Harness.LogWrench ("@MonkeyWrench: AddSummary: {0} succeeded: {1}
", mode, tests_run); + main_log.WriteLine ("Test run succeeded"); + return true; + } + } else if (timed_out) { + Harness.LogWrench ("@MonkeyWrench: AddSummary: {0} timed out
", mode); return false; } else { - Harness.LogWrench ("@MonkeyWrench: AddSummary: {0} succeeded: {1}
", mode, tests_run); - main_log.WriteLine ("Test run succeeded"); - return true; + Harness.LogWrench ("@MonkeyWrench: AddSummary: {0} crashed
", mode); + main_log.WriteLine ("Test run crashed"); + crashed = true; + return false; } - } else if (timed_out) { - Harness.LogWrench ("@MonkeyWrench: AddSummary: {0} timed out
", mode); - return false; - } else { - Harness.LogWrench ("@MonkeyWrench: AddSummary: {0} crashed
", mode); - main_log.WriteLine ("Test run crashed"); - crashed = true; - return false; } } @@ -447,11 +476,8 @@ public async Task RunAsync () args.Append (" -argument=-app-arg:-enablenetwork"); args.Append (" -setenv=NUNIT_ENABLE_NETWORK=true"); // detect if we are using a jenkins bot. - var useXmlOutput = Harness.InJenkins; - if (useXmlOutput) { + if (Harness.InJenkins) args.Append (" -setenv=NUNIT_ENABLE_XML_OUTPUT=true"); - args.Append (" -setenv=NUNIT_ENABLE_XML_MODE=wrapped"); - } if (!IncludeSystemPermissionTests) args.Append (" -setenv=DISABLE_SYSTEM_PERMISSION_TESTS=1"); @@ -471,24 +497,12 @@ public async Task RunAsync () args.AppendFormat (" -argument=-app-arg:-hostname:{0}", ips.ToString ()); args.AppendFormat (" -setenv=NUNIT_HOSTNAME={0}", ips.ToString ()); } - string transport; - if (mode == "watchos") { - transport = isSimulator ? "FILE" : "HTTP"; - } else { - transport = "TCP"; - } + var transport = mode == "watchos" ? "HTTP" : "TCP"; args.AppendFormat (" -argument=-app-arg:-transport:{0}", transport); args.AppendFormat (" -setenv=NUNIT_TRANSPORT={0}", transport); - listener_log = Logs.CreateStream (LogDirectory, string.Format ("test-{0}-{1:yyyyMMdd_HHmmss}.log", mode, DateTime.Now), "Test log"); - SimpleListener listener; switch (transport) { - case "FILE": - var fn = listener_log.FullPath + ".tmp"; - listener = new SimpleFileListener (fn); - args.Append (" -setenv=NUNIT_LOG_FILE=").Append (StringUtils.Quote (fn)); - break; case "HTTP": listener = new SimpleHttpListener (); break; @@ -498,11 +512,11 @@ public async Task RunAsync () default: throw new NotImplementedException (); } + listener_log = Logs.CreateStream (LogDirectory, string.Format ("test-{0}-{1:yyyyMMdd_HHmmss}.log", mode, DateTime.Now), "Test log"); listener.TestLog = listener_log; listener.Log = main_log; listener.AutoExit = true; listener.Address = System.Net.IPAddress.Any; - listener.XmlOutput = useXmlOutput; listener.Initialize (); args.AppendFormat (" -argument=-app-arg:-hostport:{0}", listener.Port); diff --git a/tests/xharness/DeviceLogCapturer.cs b/tests/xharness/DeviceLogCapturer.cs index b881a01e67d..d028ecc65f5 100644 --- a/tests/xharness/DeviceLogCapturer.cs +++ b/tests/xharness/DeviceLogCapturer.cs @@ -59,7 +59,7 @@ public void StopCapture () if (process.HasExited) return; - process.KillTreeAsync (Harness.HarnessLog, diagnostics: false).Wait (); + process.KillTreeAsync (Harness.HarnessLog).Wait (); process.Dispose (); } } diff --git a/tests/xharness/Harness.cs b/tests/xharness/Harness.cs index 7ef270839f8..3138c1ec6dc 100644 --- a/tests/xharness/Harness.cs +++ b/tests/xharness/Harness.cs @@ -147,23 +147,11 @@ public string XcodeRoot { } } - Version xcode_version; - public Version XcodeVersion { - get { - if (xcode_version == null) { - var doc = new XmlDocument (); - doc.Load (Path.Combine (XcodeRoot, "Contents", "version.plist")); - xcode_version = Version.Parse (doc.SelectSingleNode ("//key[text() = 'CFBundleShortVersionString']/following-sibling::string").InnerText); - } - return xcode_version; - } - } - object mlaunch_lock = new object (); string DownloadMlaunch () { // NOTE: the filename part in the url must be unique so that the caching logic works properly. - var mlaunch_url = "https://dl.xamarin.com/uploads/3euiqmcoizk/mlaunch-18deb964b64886af65fb1760b19adeee58dd8bea.zip"; + var mlaunch_url = "http://bosstoragemirror.blob.core.windows.net/public-builder/mlaunch/mlaunch-af02fb1c25d31ff3c5b4a3753fdb4b1783294294.zip"; var extraction_dir = Path.Combine (Path.GetTempPath (), Path.GetFileNameWithoutExtension (mlaunch_url)); var mlaunch_path = Path.Combine (extraction_dir, "bin", "mlaunch"); diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index 68b34c30baf..59aaf34169e 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -469,7 +469,6 @@ async Task PopulateTasksAsync () foreach (var taskGroup in runSimulatorTasks.GroupBy ((RunSimulatorTask task) => task.Platform)) { Tasks.Add (new AggregatedRunSimulatorTask (taskGroup) { Jenkins = this, - TestName = $"Tests for {taskGroup.Key}", }); } @@ -1623,8 +1622,7 @@ function oninitialload () writer.Write ($"
"); writer.Write ($"{defaultExpander}"); writer.Write ($"{modeGroup.Key}{RenderTextStates (modeGroup)}"); - if (IsServerMode) - writer.Write ($" Run all"); + writer.Write ($" Run all"); writer.WriteLine ("
"); writer.WriteLine ($"
"); @@ -1825,7 +1823,7 @@ abstract class TestTask public Jenkins Jenkins; public Harness Harness { get { return Jenkins.Harness; } } public TestProject TestProject; - public string ProjectFile { get { return TestProject?.Path; } } + public string ProjectFile { get { return TestProject.Path; } } public string ProjectConfiguration; public string ProjectPlatform; public Dictionary Environment = new Dictionary (); @@ -1908,8 +1906,6 @@ public virtual string TestName { return test_name; var rv = Path.GetFileNameWithoutExtension (ProjectFile); - if (rv == null) - return $"unknown test name ({GetType ().Name}"; switch (Platform) { case TestPlatform.Mac: case TestPlatform.Mac_Classic: @@ -2953,7 +2949,7 @@ public Task SelectSimulatorAsync () if (Platform == TestPlatform.watchOS) CompanionDevice = Jenkins.Simulators.FindCompanionDevice (Jenkins.SimulatorLoadLog, Device); - var clean_state = false;//Platform == TestPlatform.watchOS; + var clean_state = false;//Platform == TestPlatform.tvOS; runner = new AppRunner () { Harness = Harness, diff --git a/tests/xharness/Log.cs b/tests/xharness/Log.cs index ecfc99f1873..191d266f2be 100644 --- a/tests/xharness/Log.cs +++ b/tests/xharness/Log.cs @@ -244,11 +244,6 @@ public void StartCapture () public void StopCapture () { - if (!File.Exists (CapturePath)) { - File.WriteAllText (Path, $"Could not capture the file '{CapturePath}' because it doesn't exist."); - return; - } - if (entire_file) { File.Copy (CapturePath, Path, true); return; diff --git a/tests/xharness/MakefileGenerator.cs b/tests/xharness/MakefileGenerator.cs index d28f8abdca0..bad7f0a1b50 100644 --- a/tests/xharness/MakefileGenerator.cs +++ b/tests/xharness/MakefileGenerator.cs @@ -267,7 +267,6 @@ static string GetMakeName (this Target target, bool escape = true) public static void CreateMakefile (Harness harness, IEnumerable unified_targets, IEnumerable tvos_targets, IEnumerable watchos_targets, IEnumerable today_targets) { - var executeSim32 = !harness.InWrench; // Waiting for iOS 10.3 simulator to be installed on wrench var makefile = Path.Combine (harness.RootDirectory, "Makefile.inc"); using (var writer = new StreamWriter (makefile, false, new UTF8Encoding (false))) { writer.WriteLine (".stamp-configure-projects: Makefile xharness/xharness.exe"); @@ -369,11 +368,7 @@ public static void CreateMakefile (Harness harness, IEnumerable u writer.WriteLine (); writer.WriteTarget ("exec{0}-sim32-{1}", "$(UNIT_SERVER)", make_escaped_suffix, make_escaped_name); - if (executeSim32) { - writer.WriteLine ("\t$(Q) $(SYSTEM_MONO) --debug xharness/xharness.exe $(XHARNESS_VERBOSITY) --run \"{0}\" --target {1}-simulator-32 --sdkroot $(XCODE_DEVELOPER_ROOT) --logdirectory \"$(abspath $(CURDIR))/logs/$@\" --configuration $(CONFIG)", target.ProjectPath, target.Platform); - } else { - writer.WriteLine ("\t$(Q) echo 'Execution of sim32 has been disabled.'"); - } + writer.WriteLine ("\t$(Q) $(SYSTEM_MONO) --debug xharness/xharness.exe $(XHARNESS_VERBOSITY) --run \"{0}\" --target {1}-simulator-32 --sdkroot $(XCODE_DEVELOPER_ROOT) --logdirectory \"$(abspath $(CURDIR))/logs/$@\" --configuration $(CONFIG)", target.ProjectPath, target.Platform); writer.WriteLine (); } else { writer.WriteTarget ("exec{0}-sim{2}-{1}", "$(UNIT_SERVER)", make_escaped_suffix, make_escaped_name, target.MakefileWhereSuffix); diff --git a/tests/xharness/Process_Extensions.cs b/tests/xharness/Process_Extensions.cs index 9538393e247..66b9fcd88d5 100644 --- a/tests/xharness/Process_Extensions.cs +++ b/tests/xharness/Process_Extensions.cs @@ -157,8 +157,8 @@ public static async Task KillTreeAsync (int pid, Log log, bool diagnostics = tru { var pids = new List (); GetChildrenPS (log, pids, pid); + log.WriteLine ($"Pids to kill: {string.Join (", ", pids.Select ((v) => v.ToString ()).ToArray ())}"); if (diagnostics) { - log.WriteLine ($"Pids to kill: {string.Join (", ", pids.Select ((v) => v.ToString ()).ToArray ())}"); using (var ps = new Process ()) { log.WriteLine ("Writing process list:"); ps.StartInfo.FileName = "ps"; diff --git a/tests/xharness/SimpleFileListener.cs b/tests/xharness/SimpleFileListener.cs deleted file mode 100644 index 602a89fea63..00000000000 --- a/tests/xharness/SimpleFileListener.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.IO; -using System.Net; -using System.Net.Sockets; -using System.Text; -using System.Threading; - -namespace xharness -{ - public class SimpleFileListener : SimpleListener - { - Thread processor_thread; - bool cancel; - public string Path { get; private set; } - - public SimpleFileListener (string path) - { - Path = path; - } - - protected override void Stop () - { - cancel = true; - processor_thread.Join (); - processor_thread = null; - Finished (true); - } - - public override void Initialize () - { - processor_thread = new Thread (Processing); - } - - protected override void Start () - { - processor_thread.Start (); - } - - void Processing () - { - Connected ("N/A"); - using (var fs = new BlockingFileStream (Path) { Listener = this }) { - using (var reader = new StreamReader (fs)) { - string line; - while ((line = reader.ReadLine ()) != null) { - OutputWriter.WriteLine (line); - if (line.StartsWith ("[Runner executing:", StringComparison.Ordinal)) { - Log.WriteLine ("Tests have started executing"); - } else if (!XmlOutput && line.StartsWith ("Tests run: ", StringComparison.Ordinal)) { - Log.WriteLine ("Tests have finished executing"); - Finished (); - return; - } else if (XmlOutput && line == "") { - Log.WriteLine ("Tests have finished executing"); - Finished (); - return; - } - } - } - } - } - - class BlockingFileStream : FileStream - { - public SimpleFileListener Listener; - - long last_position; - - public BlockingFileStream (string path) - : base (path, FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite) - { - } - - public override int Read (byte [] array, int offset, int count) - { - while (last_position == base.Length && !Listener.cancel) - Thread.Sleep (25); - var rv = base.Read (array, offset, count); - last_position += rv; - return rv; - } - } - } -} - diff --git a/tests/xharness/SimpleHttpListener.cs b/tests/xharness/SimpleHttpListener.cs index 29c9f42da90..9ed0b6fd459 100644 --- a/tests/xharness/SimpleHttpListener.cs +++ b/tests/xharness/SimpleHttpListener.cs @@ -58,7 +58,7 @@ protected override void Start () try { server.Stop (); } finally { - Finished (); + stopped.Set (); } } } diff --git a/tests/xharness/SimpleListener.cs b/tests/xharness/SimpleListener.cs index d55b4943d2f..c39d77550a7 100644 --- a/tests/xharness/SimpleListener.cs +++ b/tests/xharness/SimpleListener.cs @@ -3,16 +3,14 @@ using System.IO; using System.Text; using System.Threading; -using System.Threading.Tasks; namespace xharness { public abstract class SimpleListener : IDisposable { StreamWriter output_writer; - string xml_data; - TaskCompletionSource stopped = new TaskCompletionSource (); + protected ManualResetEvent stopped = new ManualResetEvent (false); protected ManualResetEvent connected = new ManualResetEvent (false); public IPAddress Address { get; set; } @@ -20,7 +18,6 @@ public abstract class SimpleListener : IDisposable public Log Log { get; set; } public LogStream TestLog { get; set; } public bool AutoExit { get; set; } - public bool XmlOutput { get; set; } public abstract void Initialize (); protected abstract void Start (); @@ -39,44 +36,17 @@ protected void Connected (string remote) if (output_writer == null) { output_writer = TestLog.GetWriter (); - // a few extra bits of data only available from this side - var local_data = -$@"[Local Date/Time: {DateTime.Now}] -[Remote Address: {remote}]"; - if (XmlOutput) { - xml_data = local_data; - } else { - output_writer.WriteLine (local_data); - } - } - } - protected void Finished (bool early_termination = false) - { - if (stopped.TrySetResult (early_termination)) { - if (early_termination) { - Log.WriteLine ("Tests were terminated before completion"); - } else { - Log.WriteLine ("Tests have finished executing"); - } - if (xml_data != null) { - output_writer.WriteLine ($""); - output_writer.Flush (); - xml_data = null; - } + // a few extra bits of data only available from this side + output_writer.WriteLine ($"[Local Date/Time:\t{DateTime.Now}]"); + output_writer.WriteLine ($"[Remote Address:\t{remote}]"); } } public void StartAsync () { - var t = new Thread (() => { - try { - Start (); - } catch (Exception e) { - Console.WriteLine ($"{GetType ().Name}: an exception occurred in processing thread: {e}"); - } - }) + var t = new Thread (Start) { IsBackground = true, }; @@ -90,14 +60,14 @@ public bool WaitForConnection (TimeSpan ts) public bool WaitForCompletion (TimeSpan ts) { - return stopped.Task.Wait (ts); + return stopped.WaitOne (ts); } public void Cancel () { try { // wait a second just in case more data arrives. - if (!stopped.Task.Wait (TimeSpan.FromSeconds (1))) + if (!stopped.WaitOne (TimeSpan.FromSeconds (1))) Stop (); } catch { // We might have stopped already, so just ignore any exceptions. diff --git a/tests/xharness/SimpleTcpListener.cs b/tests/xharness/SimpleTcpListener.cs index 4b8802b56fd..c768d4ddc7e 100644 --- a/tests/xharness/SimpleTcpListener.cs +++ b/tests/xharness/SimpleTcpListener.cs @@ -45,7 +45,7 @@ protected override void Start () try { server.Stop (); } finally { - Finished (); + stopped.Set (); } } } diff --git a/tests/xharness/Simulators.cs b/tests/xharness/Simulators.cs index 3996cbd1b06..b32b724ec16 100644 --- a/tests/xharness/Simulators.cs +++ b/tests/xharness/Simulators.cs @@ -113,7 +113,7 @@ public async Task FindAsync (AppRunnerTarget target, Log log) switch (target) { case AppRunnerTarget.Simulator_iOS32: simulator_devicetypes = new string [] { "com.apple.CoreSimulator.SimDeviceType.iPhone-5" }; - simulator_runtime = "com.apple.CoreSimulator.SimRuntime.iOS-10-3"; + simulator_runtime = "com.apple.CoreSimulator.SimRuntime.iOS-" + Xamarin.SdkVersions.iOS.Replace ('.', '-'); break; case AppRunnerTarget.Simulator_iOS64: simulator_devicetypes = new string [] { "com.apple.CoreSimulator.SimDeviceType.iPhone-6" }; @@ -286,7 +286,7 @@ public bool MoveNext () if (devices == null) devices = Enumerable.Simulators.FindAsync (Enumerable.Target, Enumerable.Log).Result; moved = true; - return devices?.Length > 0; + return moved && devices?.Length > 0; } public void Reset () @@ -350,7 +350,7 @@ public static async Task KillEverythingAsync (Log log) { await ProcessHelper.ExecuteCommandAsync ("launchctl", "remove com.apple.CoreSimulator.CoreSimulatorService", log, TimeSpan.FromSeconds (10)); - var to_kill = new string [] { "iPhone Simulator", "iOS Simulator", "Simulator", "Simulator (Watch)", "com.apple.CoreSimulator.CoreSimulatorService", "ibtoold" }; + var to_kill = new string [] { "iPhone Simulator", "iOS Simulator", "Simulator", "Simulator (Watch)", "com.apple.CoreSimulator.CoreSimulatorService" }; await ProcessHelper.ExecuteCommandAsync ("killall", "-9 " + string.Join (" ", to_kill.Select ((v) => StringUtils.Quote (v)).ToArray ()), log, TimeSpan.FromSeconds (10)); @@ -422,7 +422,7 @@ async Task OpenSimulator (Log log) { string simulator_app; - if (IsWatchSimulator && Harness.XcodeVersion.Major < 9) { + if (IsWatchSimulator) { simulator_app = Path.Combine (Harness.XcodeRoot, "Contents", "Developer", "Applications", "Simulator (Watch).app"); } else { simulator_app = Path.Combine (Harness.XcodeRoot, "Contents", "Developer", "Applications", "Simulator.app"); diff --git a/tests/xharness/Target.cs b/tests/xharness/Target.cs index 43d67edda11..4fa5215b8bf 100644 --- a/tests/xharness/Target.cs +++ b/tests/xharness/Target.cs @@ -107,10 +107,7 @@ protected virtual void ProcessProject () protected void CreateExecutableProject () { ProcessProject (); - if (Harness.Mac) { - ProjectGuid = "{" + Harness.NewStableGuid ().ToString ().ToUpper () + "}"; - inputProject.SetProjectGuid (ProjectGuid); - } else { + if (!Harness.Mac) { inputProject.FixArchitectures (SimulatorArchitectures, DeviceArchitectures); inputProject.FixInfoPListInclude (Suffix); inputProject.SetExtraLinkerDefs ("extra-linker-defs" + Suffix + ".xml"); diff --git a/tests/xharness/xharness.csproj b/tests/xharness/xharness.csproj index 7d18da0e98f..294a69255f9 100644 --- a/tests/xharness/xharness.csproj +++ b/tests/xharness/xharness.csproj @@ -82,7 +82,11 @@ StringUtils.cs - + + + + nunit-summary.xslt + diff --git a/tests/xtro-sharpie/EnumCheck.cs b/tests/xtro-sharpie/EnumCheck.cs index fe0e05e92e6..388f514a0ae 100644 --- a/tests/xtro-sharpie/EnumCheck.cs +++ b/tests/xtro-sharpie/EnumCheck.cs @@ -22,9 +22,7 @@ public override void VisitManagedType (TypeDefinition type) // e.g. WatchKit.WKErrorCode and WebKit.WKErrorCode :-( if (!enums.TryGetValue (name, out td)) enums.Add (name, type); - else if (td.Namespace.StartsWith ("OpenTK.", StringComparison.Ordinal)) { - // OpenTK duplicate a lots of enums between it's versions - } else { + else { Console.WriteLine ("!duplicate-type-name! {0} enum exists as both {1} and {2}", name, type.FullName, td.FullName); } } @@ -76,7 +74,6 @@ public override void VisitEnumDecl (EnumDecl decl, VisitKind visitKind) case "OptionBits": // UInt32 case "long": case "FourCharCode": - case "OSStatus": break; case "int64_t": case "uint64_t": diff --git a/tests/xtro-sharpie/Helpers.cs b/tests/xtro-sharpie/Helpers.cs index dad43bd7f97..aa5a89eafad 100644 --- a/tests/xtro-sharpie/Helpers.cs +++ b/tests/xtro-sharpie/Helpers.cs @@ -13,7 +13,6 @@ public static class Helpers { // the original name can be lost and, if not registered (e.g. enums), might not be available static Dictionary map = new Dictionary () { { "CFURLPathStyle", "CFUrlPathStyle" }, - { "CIDataMatrixCodeECCVersion", "CIDataMatrixCodeEccVersion" }, { "CXPlayDTMFCallActionType", "CXPlayDtmfCallActionType" }, { "EABluetoothAccessoryPickerErrorCode", "EABluetoothAccessoryPickerError" }, { "EKCalendarEventAvailabilityMask", "EKCalendarEventAvailability" }, @@ -40,7 +39,6 @@ public static class Helpers { { "NEVPNIKEv2IntegrityAlgorithm", "NEVpnIke2IntegrityAlgorithm" }, { "NEVPNStatus", "NEVpnStatus" }, { "NSAttributedStringEnumerationOptions", "NSAttributedStringEnumeration" }, - { "NSFileProviderErrorCode", "NSFileProviderError" }, { "NSHTTPCookieAcceptPolicy", "NSHttpCookieAcceptPolicy" }, { "NSISO8601DateFormatOptions", "NSIso8601DateFormatOptions" }, { "NSJSONReadingOptions", "NSJsonReadingOptions" }, @@ -54,16 +52,11 @@ public static class Helpers { { "NSURLRequestCachePolicy", "NSUrlRequestCachePolicy" }, { "NSURLRequestNetworkServiceType", "NSUrlRequestNetworkServiceType" }, { "NSURLSessionAuthChallengeDisposition", "NSUrlSessionAuthChallengeDisposition" }, - { "NSURLSessionMultipathServiceType", "NSUrlSessionMultipathServiceType" }, { "NSURLSessionResponseDisposition", "NSUrlSessionResponseDisposition" }, { "NSURLSessionTaskMetricsResourceFetchType", "NSUrlSessionTaskMetricsResourceFetchType" }, { "NSURLSessionTaskState", "NSUrlSessionTaskState" }, { "NWTCPConnectionState", "NWTcpConnectionState" }, { "NWUDPSessionState", "NWUdpSessionState" }, - { "PDFDisplayDirection", "PdfDisplayDirection" }, - { "PDFInterpolationQuality", "PdfInterpolationQuality" }, - { "PDFThumbnailLayoutMode", "PdfThumbnailLayoutMode" }, - { "PDFWidgetCellState", "PdfWidgetCellState" }, { "RPRecordingErrorCode", "RPRecordingError" }, { "SecTrustResultType", "SecTrustResult" }, { "SKErrorCode", "SKError" }, @@ -76,7 +69,6 @@ public static class Helpers { { "WatchKitErrorCode", "WKErrorCode" }, // WebKit already had that name // not enums { "NSMutableURLRequest", "NSMutableUrlRequest" }, - { "UIImagePickerControllerImageURLExportPreset", "UIImagePickerControllerImageUrlExportPreset" }, }; public static string GetManagedName (string nativeName) @@ -92,15 +84,7 @@ public static string ReplaceFirstInstance (this string source, string find, stri return index < 0 ? source : source.Substring (0, index) + replace + source.Substring (index + find.Length); } - public enum Platforms - { - macOS, - iOS, - watchOS, - tvOS, - } - - public static Platforms Platform { get; set; } + public static string Platform { get; set; } public static bool IsAvailable (this Decl decl) { @@ -109,29 +93,20 @@ public static bool IsAvailable (this Decl decl) // some categories are not decorated (as not available) but they extend types that are if (!result.HasValue) { - // first check if we're checking the category itself - var category = decl as ObjCCategoryDecl; + var category = (decl.DeclContext as ObjCCategoryDecl); if (category != null) result = category.ClassInterface.IsAvailable (Platform); - - if (!result.HasValue) { - // then check if we're a method inside a category - category = (decl.DeclContext as ObjCCategoryDecl); - if (category != null) - result = category.ClassInterface.IsAvailable (Platform); - } } // but right now most frameworks consider tvOS and watchOS like iOS unless // decorated otherwise so we must check again if we do not get a definitve answer - if ((result == null) && ((Platform == Platforms.tvOS) || (Platform == Platforms.watchOS))) - result = decl.IsAvailable (Platforms.iOS); + if ((result == null) && ((Platform == "tvos") || (Platform == "watchos"))) + result = decl.IsAvailable ("ios"); return !result.HasValue ? true : result.Value; } - static bool? IsAvailable (this Decl decl, Platforms platform_value) + static bool? IsAvailable (this Decl decl, string platform) { - var platform = platform_value.ToString ().ToLowerInvariant (); bool? result = null; foreach (var attr in decl.Attrs) { // NS_UNAVAILABLE @@ -190,8 +165,7 @@ public static string GetName (this ObjCMethodDecl self) sb.Append ('+'); sb.Append ((self.DeclContext as NamedDecl).Name); sb.Append ("::"); - var sel = self.Selector.ToString (); - sb.Append (string.IsNullOrEmpty (sel) ? self.Name : sel); + sb.Append (self.Selector); return sb.ToString (); } @@ -215,10 +189,6 @@ public static string GetName (this TypeDefinition self) if (ca.HasConstructorArguments) return (ca.ConstructorArguments [0].Value as string); return self.Name; - } else if (ca.Constructor.DeclaringType.Name == "ProtocolAttribute") { - if (ca.HasConstructorArguments) - return (ca.ConstructorArguments [0].Value as string); - return self.Name; } } } @@ -272,47 +242,5 @@ public static string GetSelector (this ObjCMethodDecl self) { return self.Selector.ToString () ?? (self.IsPropertyAccessor ? self.Name : null); } - - public static bool IsObsolete (this ICustomAttributeProvider provider) - { - if (provider.HasCustomAttributes) { - foreach (var attrib in provider.CustomAttributes) { - var attribType = attrib.Constructor.DeclaringType; - if (attribType.Namespace == "System" && attribType.Name == "ObsoleteAttribute") - return true; - } - } - - // If we're a property accessor, check the property as well. - var prop = FindProperty (provider as MethodReference); - if (prop != null) - return IsObsolete (prop); - - return false; - } - - public static PropertyDefinition FindProperty (this MethodReference method) - { - var def = method?.Resolve (); - if (def == null) - return null; - - if (!def.IsSpecialName) - return null; - - if (!def.DeclaringType.HasProperties) - return null; - - if (!method.Name.StartsWith ("get_", StringComparison.Ordinal) && !method.Name.StartsWith ("set_", StringComparison.Ordinal)) - return null; - - var propName = method.Name.Substring (4); - foreach (var prop in def.DeclaringType.Properties) { - if (prop.Name == propName) - return prop; - } - - return null; - } } } \ No newline at end of file diff --git a/tests/xtro-sharpie/Makefile b/tests/xtro-sharpie/Makefile index 496afe19d1a..6c1658333af 100644 --- a/tests/xtro-sharpie/Makefile +++ b/tests/xtro-sharpie/Makefile @@ -6,22 +6,28 @@ include $(TOP)/Make.config MONO ?= mono64 --debug all-local:: run-ios run-osx run-watchos run-tvos classify + +sharpie: sharpie-ios sharpie-osx sharpie-watchos sharpie-tvos classify clean-local:: rm -f ios.results osx.results watchos.results tvos.results *.tmp rm -rf *os*.pch* + +bin/Debug/xtro-sharpie.exe ./bin/Debug/xtro-plugin.dll build: + xbuild -bin/Debug/xtro-sharpie.exe build: - $(Q_BUILD) msbuild $(XBUILD_VERBOSITY) xtro-sharpie.sln - + XIOS ?= $(TOP)/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/64bits/Xamarin.iOS.dll XIOS_GL ?= $(TOP)/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/OpenTK-1.0.dll XIOS_ARCH = arm64 XIOS_PCH = iphoneos$(IOS_SDK_VERSION)-$(XIOS_ARCH).pch -ios.results run-ios: build $(XIOS_PCH) +run-ios: build $(XIOS_PCH) $(MONO) bin/Debug/xtro-sharpie.exe $(XIOS_PCH) $(XIOS) $(XIOS_GL) | sort > ios.results +sharpie-ios: build $(XIOS_PCH) + sharpie ./bin/Debug/xtro-plugin.dll extro $(XIOS_PCH) $(XIOS) $(XIOS_GL) | sort > ios.results + $(XIOS_PCH): sharpie sdk-db -s iphoneos$(IOS_SDK_VERSION) -a $(XIOS_ARCH) @@ -30,9 +36,12 @@ XWATCHOS ?= $(TOP)/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/ XWATCHOS_ARCH = armv7 XWATCHOS_PCH = watchos$(WATCH_SDK_VERSION)-$(XWATCHOS_ARCH).pch -watchos.results run-watchos: build $(XWATCHOS_PCH) +run-watchos: build $(XWATCHOS_PCH) $(MONO) bin/Debug/xtro-sharpie.exe $(XWATCHOS_PCH) $(XWATCHOS) | sort > watchos.results +sharpie-watchos: build $(XWATCHOS_PCH) + sharpie ./bin/Debug/xtro-plugin.dll extro $(XWATCHOS_PCH) $(XWATCHOS) | sort > watchos.results + $(XWATCHOS_PCH): sharpie sdk-db -s watchos$(WATCH_SDK_VERSION) -a $(XWATCHOS_ARCH) @@ -42,9 +51,12 @@ XTVOS_GL ?= $(TOP)/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/ XTVOS_ARCH = arm64 XTVOS_PCH = appletvos$(TVOS_SDK_VERSION)-$(XTVOS_ARCH).pch -tvos.results run-tvos: build $(XTVOS_PCH) +run-tvos: build $(XTVOS_PCH) $(MONO) bin/Debug/xtro-sharpie.exe $(XTVOS_PCH) $(XTVOS) $(XTVOS_GL) | sort > tvos.results +sharpie-tvos: build $(XTVOS_PCH) + sharpie ./bin/Debug/xtro-plugin.dll extro $(XTVOS_PCH) $(XTVOS) $(XTVOS_GL) | sort > tvos.results + $(XTVOS_PCH): sharpie sdk-db -s appletvos$(TVOS_SDK_VERSION) -a $(XTVOS_ARCH) @@ -53,31 +65,34 @@ XMAC ?= $(TOP)/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/ XMAC_ARCH = x86_64 XMAC_PCH = macosx$(OSX_SDK_VERSION)-$(XMAC_ARCH).pch -osx.results run-osx: build $(XMAC_PCH) +run-osx: build $(XMAC_PCH) $(MONO) bin/Debug/xtro-sharpie.exe $(XMAC_PCH) $(XMAC) | sort > osx.results +sharpie-osx: build $(XMAC_PCH) + sharpie ./bin/Debug/xtro-plugin.dll extro $(XMAC_PCH) $(XMAC) | sort > osx.results + $(XMAC_PCH): - 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 -classify-ios: preclassify ios.results +classify-ios: preclassify @sort ios.ignore ios.pending common.ignore common.pending > ios.skip.tmp @comm -23 ios.results common.unclassified.tmp > ios.unclassified.tmp @comm -23 ios.unclassified.tmp ios.skip.tmp > ios.unclassified -classify-tvos: preclassify tvos.results +classify-tvos: preclassify @sort tvos.ignore tvos.pending ios.ignore ios.pending common.ignore common.pending > tvos.skip.tmp @comm -23 tvos.results common.unclassified.tmp > tvos.unclassified.tmp @comm -23 tvos.unclassified.tmp tvos.skip.tmp > tvos.unclassified -classify-watchos: preclassify watchos.results +classify-watchos: preclassify @sort watchos.ignore watchos.pending common.ignore common.pending > watchos.skip.tmp @comm -23 watchos.results common.unclassified.tmp > watchos.unclassified.tmp @comm -23 watchos.unclassified.tmp watchos.skip.tmp > watchos.unclassified -classify-osx: preclassify osx.results +classify-osx: preclassify @sort osx.ignore osx.pending common.ignore common.pending > osx.skip.tmp @comm -23 osx.results common.unclassified.tmp > osx.unclassified.tmp @comm -23 osx.unclassified.tmp osx.skip.tmp > osx.unclassified diff --git a/tests/xtro-sharpie/ObjCProtocolCheck.cs b/tests/xtro-sharpie/ObjCProtocolCheck.cs index 18f6f90ef92..56e957d2971 100644 --- a/tests/xtro-sharpie/ObjCProtocolCheck.cs +++ b/tests/xtro-sharpie/ObjCProtocolCheck.cs @@ -93,7 +93,6 @@ public override void VisitObjCProtocolDecl (ObjCProtocolDecl decl, VisitKind vis string s_export = null; bool is_required = false; bool is_property = false; - bool is_static = false; switch (ca.Constructor.DeclaringType.Name) { case "ProtocolMemberAttribute": foreach (var p in ca.Properties) { @@ -113,28 +112,18 @@ public override void VisitObjCProtocolDecl (ObjCProtocolDecl decl, VisitKind vis case "IsProperty": is_property = (bool)p.Argument.Value; break; - case "IsStatic": - is_static = (bool)p.Argument.Value; - break; } } break; } if (is_property) { - if (g_export != null) { - if (is_static) - g_export = "+" + g_export; + if (g_export != null) map.Add (g_export, is_required); - } - if (s_export != null) { - if (is_static) - s_export = "+" + s_export; + if (s_export != null) map.Add (s_export, is_required); - } - } else if (export != null) { - if (is_static) - export = "+" + export; - map.Add (export, is_required); + } else { + if (export != null) + map.Add (export, is_required); } } @@ -154,9 +143,6 @@ public override void VisitObjCProtocolDecl (ObjCProtocolDecl decl, VisitKind vis if (IsInit (selector)) continue; - if (method.IsClassMethod) - selector = "+" + selector; - bool is_abstract; if (map.TryGetValue (selector, out is_abstract)) { bool required = method.ImplementationControl == ObjCImplementationControl.Required; diff --git a/tests/xtro-sharpie/Runner.cs b/tests/xtro-sharpie/Runner.cs index c25634fb3a0..2f93f4906bc 100644 --- a/tests/xtro-sharpie/Runner.cs +++ b/tests/xtro-sharpie/Runner.cs @@ -25,19 +25,18 @@ public void Execute (string pchFile, IEnumerable assemblyNames) new ObjCInterfaceCheck (), new ObjCProtocolCheck (), new SelectorCheck (), - new SimdCheck (), // new ListNative (), // for debug }; foreach (var assemblyName in assemblyNames) { var name = Path.GetFileNameWithoutExtension (assemblyName); if (name.EndsWith (".iOS", StringComparison.Ordinal)) - Helpers.Platform = Helpers.Platforms.iOS; + Helpers.Platform = "ios"; else if (name.EndsWith (".Mac", StringComparison.Ordinal)) - Helpers.Platform = Helpers.Platforms.macOS; + Helpers.Platform = "osx"; else if (name.EndsWith (".WatchOS", StringComparison.Ordinal)) - Helpers.Platform = Helpers.Platforms.watchOS; + Helpers.Platform = "watchos"; else if (name.EndsWith (".TVOS", StringComparison.Ordinal)) - Helpers.Platform = Helpers.Platforms.tvOS; + Helpers.Platform = "tvos"; managed_reader.Load (assemblyName); } @@ -61,7 +60,7 @@ class ModuleExclusionList { "IOBluetooth", "IOBluetoothUI", "PubSub", "CryptoTokenKit", "DiscRecording", "DiscRecordingUI", "ImageCaptureCore", "OSAKit", "AudioVideoBridging", "Automator", "ImageCapture", // Maybe? - "ICADevices", "OpenDirectory", "IMServicePlugIn", "PreferencePanes", "ScreenSaver", "CoreMediaIO", "SecurityInterface", + "ICADevices", "OpenDirectory", "IMServicePlugIn", "PreferencePanes", "ScreenSaver", // Nope "InstallerPlugins", "JavaVM", "ExceptionHandling", "JavaFrameEmbedding", @@ -75,7 +74,7 @@ static IEnumerable ExclusionList { get { if (_exclusionList == null) { switch (Helpers.Platform) { - case Helpers.Platforms.macOS: + case "osx": _exclusionList = macOSXExclusionList; break; default: @@ -194,19 +193,18 @@ class ListNative : BaseVisitor { public override void VisitDecl (Decl decl) { - if (decl is FunctionDecl) { + if (decl is FunctionDecl) ; - } else if (decl is VarDecl) { + else if (decl is VarDecl) ; - } else if (decl is ObjCProtocolDecl) { + else if (decl is ObjCProtocolDecl) ; - } else if (decl is ObjCInterfaceDecl) { + else if (decl is ObjCInterfaceDecl) ; - } else if (decl is EnumDecl) { + else if (decl is EnumDecl) ; - } else { + else Console.WriteLine ("{0}\t{1}", decl, decl.GetType ().Name); - } } } } diff --git a/tests/xtro-sharpie/SharpieEntryPoint.cs b/tests/xtro-sharpie/SharpieEntryPoint.cs new file mode 100644 index 00000000000..8216c3ea79c --- /dev/null +++ b/tests/xtro-sharpie/SharpieEntryPoint.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.IO; + +using Sharpie; +using Sharpie.Tooling; + +namespace Extrospection { + + [Tool ("extro", "Run extrospection tests", 500)] + public class SharpieEntryPoint : CommonTool { + + protected override void Run () + { + // ensure Mono.Cecil.dll will be in the directory where this is built + typeof (Mono.Cecil.AssemblyDefinition).ToString (); + + base.Run (); + + var pch = PositionalArguments.DequeueOrDefault (); + if (pch == null || !File.Exists (pch)) + throw new ExitException ("Precompiled header file (pch) must be specified"); + + var assemblies = new List (); + while (PositionalArguments.Count > 0) { + var dll = PositionalArguments.DequeueOrDefault (); + if (dll == null || !File.Exists (dll)) + throw new ExitException ("Assembly file (dll) must be specified"); + + assemblies.Add (dll); + } + new Runner ().Execute (pch, assemblies); + } + } +} \ No newline at end of file diff --git a/tests/xtro-sharpie/SimdCheck.cs b/tests/xtro-sharpie/SimdCheck.cs deleted file mode 100644 index be487ca6419..00000000000 --- a/tests/xtro-sharpie/SimdCheck.cs +++ /dev/null @@ -1,385 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -using Mono.Cecil; - -using Clang.Ast; - -namespace Extrospection -{ - - class SimdCheck : BaseVisitor - { - bool very_strict = false; - bool strict = false; - - // A dictionary of native type -> managed type mapping. - class NativeSimdInfo - { - public string Managed; - public string InvalidManaged; - } - - static Dictionary type_mapping = new Dictionary () { - { "matrix_double2x2", new NativeSimdInfo { Managed ="MatrixDouble2x2", InvalidManaged = "Matrix2d" }}, - { "matrix_double3x3", new NativeSimdInfo { Managed = "MatrixDouble3x3", InvalidManaged = "Matrix3d" }}, - { "matrix_double4x4", new NativeSimdInfo { Managed = "MatrixDouble4x4", InvalidManaged = "Matrix4d" }}, - { "matrix_float2x2", new NativeSimdInfo { Managed = "MatrixFloat2x2", InvalidManaged = "Matrix2", }}, - { "matrix_float3x3", new NativeSimdInfo { Managed = "MatrixFloat3x3", InvalidManaged = "Matrix3", }}, - { "matrix_float4x3", new NativeSimdInfo { Managed = "MatrixFloat4x3", }}, - { "matrix_float4x4", new NativeSimdInfo { Managed = "MatrixFloat4x4", InvalidManaged = "Matrix4", }}, - { "simd_quatd", new NativeSimdInfo { Managed = "Quaternion4d", }}, - { "simd_quatf", new NativeSimdInfo { Managed = "Quaternion4", }}, - { "vector_double2", new NativeSimdInfo { Managed = "Vector2d", }}, - { "vector_double3", new NativeSimdInfo { Managed = "Vector3d", }}, - { "vector_double4", new NativeSimdInfo { Managed = "Vector4d", }}, - { "vector_float2", new NativeSimdInfo { Managed = "Vector2", }}, - { "vector_float3", new NativeSimdInfo { Managed = "Vector3", }}, - { "vector_float4", new NativeSimdInfo { Managed = "Vector4", }}, - { "vector_int2", new NativeSimdInfo { Managed = "Vector2i", }}, - { "vector_int3", new NativeSimdInfo { Managed = "Vector3i", }}, - { "vector_int4", new NativeSimdInfo { Managed = "Vector4i", }}, - { "vector_uint2", new NativeSimdInfo { Managed = "Vector2i", }}, - { "vector_uint3", new NativeSimdInfo { Managed = "Vector3i", }}, - { "vector_uint4", new NativeSimdInfo { Managed = "Vector4i", }}, - // simd_floatX is typedefed to vector_floatX - { "simd_float2", new NativeSimdInfo { Managed = "Vector2" }}, - { "simd_float3", new NativeSimdInfo { Managed = "Vector3" }}, - { "simd_float4", new NativeSimdInfo { Managed = "Vector4" }}, - { "simd_float4x4", new NativeSimdInfo { Managed = "MatrixFloat4x4", InvalidManaged = "Matrix4" }}, - // The native definition is two 'vector_float2' fields. - // The managed definition matches this (two 'Vector2' fields), and should work fine. - { "GKQuad", new NativeSimdInfo { Managed = "GKQuad" }}, - // The native definition is two 'vector_float3' fields. - // In this case each element uses 16 bytes (4 floats) due to padding. - // The managed definition is two Vector3 fields, and does *not* - // match the native definition (missing the padding). - // It still works because we're marshalling this struct manually ([MarshalDirective]). - { "GKBox", new NativeSimdInfo { Managed = "GKBox", }}, - // The native definition is 'vector_float3 points[3]' - an array of three vector_float3. - // In this case each element uses 16 bytes (4 floats) due to padding. - // The managed definition is just an array of Vector3, but luckily - // it's a private field, so we might be able to improve this later. Right now we're marshalling - // this struct manually ([MarshalDirective]), so managed code should get correct - // results. - { "GKTriangle", new NativeSimdInfo { Managed = "GKTriangle", }}, - // This is a 'vector_int4, represented by a Vector4i in managed code, - // which means it's matching the native definition. - { "MDLVoxelIndex", new NativeSimdInfo { Managed = "MDLVoxelIndex" }}, - // In managed code this is struct of two Vector4, so it's matching the native definition. - { "MDLVoxelIndexExtent", new NativeSimdInfo { Managed = "MDLVoxelIndexExtent" }}, - // In managed code this is a struct of two Vector3, so it's *not* matching - // the native definition. However, since we're manually marshalling this type - // (using [MarshalDirective]), managed code doesn't get incorrect results. - { "MDLAxisAlignedBoundingBox", new NativeSimdInfo { Managed = "MDLAxisAlignedBoundingBox", }}, - // The managed definition is identical to the native definition - { "MPSImageHistogramInfo", new NativeSimdInfo { Managed = "MPSImageHistogramInfo" }}, - }; - - static Dictionary managed_simd_types; // bool: invalid_for_simd - - static SimdCheck () - { - managed_simd_types = new Dictionary (); - foreach (var kvp in type_mapping) { - managed_simd_types [kvp.Value.Managed] = false; - if (!string.IsNullOrEmpty (kvp.Value.InvalidManaged)) - managed_simd_types [kvp.Value.InvalidManaged] = true; - } - } - - class ManagedSimdInfo - { - public MethodDefinition Method; - public bool ContainsInvalidMappingForSimd; - } - Dictionary managed_methods = new Dictionary (); - - public override void VisitManagedMethod (MethodDefinition method) - { - var type = method.DeclaringType; - - if (!type.IsNested && type.IsNotPublic) - return; - - if (type.IsNested && (type.IsNestedPrivate || type.IsNestedAssembly || type.IsNestedFamilyAndAssembly)) - return; - - if (method.IsPrivate || method.IsAssembly || method.IsFamilyAndAssembly) - return; // Don't care about non-visible types - - if (type.Namespace == "Simd" || type.Namespace.StartsWith ("OpenTK", StringComparison.Ordinal)) - return; // We're assuming everything in the Simd and OpenTK namespaces can be ignored (the former because it's correctly written, the latter because it doesn't map to native simd types). - - if (method.HasCustomAttributes && method.CustomAttributes.Where ((v) => v.Constructor.DeclaringType.Name == "ExtensionAttribute").Any ()) - return; // Extension methods can't be mapped. - - var invalid_simd_type = false; - var contains_simd_types = ContainsSimdTypes (method, ref invalid_simd_type); - - var key = method.GetName (); - if (key == null) { - if (method.IsObsolete ()) - return; // Don't care about obsolete API. - - if (contains_simd_types && very_strict) { - // We can't map this method to a native function. - Console.WriteLine ($"!missing-simd-native-signature! {method}"); - } - return; - } - - ManagedSimdInfo existing; - if (managed_methods.TryGetValue (key, out existing)) { - if (very_strict) - Console.WriteLine ($"!duplicate-type-mapping! same key '{key}' for both '{existing.Method}' and '{method}'"); - } else { - managed_methods [key] = new ManagedSimdInfo { - Method = method, ContainsInvalidMappingForSimd = invalid_simd_type - }; - } - } - - bool ContainsSimdTypes (MethodDefinition method, ref bool invalid_for_simd) - { - if (IsSimdType (method.ReturnType, ref invalid_for_simd)) - return true; - - if (method.HasParameters) { - foreach (var param in method.Parameters) - if (IsSimdType (param.ParameterType, ref invalid_for_simd)) - return true; - } - - return false; - } - - bool IsSimdType (TypeReference td, ref bool invalid_for_simd) - { - return managed_simd_types.TryGetValue (td.Name, out invalid_for_simd); - } - - bool ContainsSimdTypes (ObjCMethodDecl decl, ref string simd_type, ref bool requires_marshal_directive) - { - if (IsSimdType (decl.ReturnQualType, ref simd_type, ref requires_marshal_directive)) - return true; - - var is_simd_type = false; - foreach (var param in decl.Parameters) - is_simd_type |= IsSimdType (param.QualType, ref simd_type, ref requires_marshal_directive); - - return is_simd_type; - } - - bool IsExtVector (QualType type, ref string simd_type) - { - var rv = false; - var t = type.CanonicalQualType.Type; - - // Unpoint the type - var pointerType = t as Clang.Ast.PointerType; - if (pointerType != null) - t = pointerType.PointeeQualType.Type; - - if (t.Kind == TypeKind.ExtVector) { - rv = true; - } else { - var r = (t as RecordType)?.Decl; - if (r != null) { - foreach (var f in r.Fields) { - var qt = f.QualType.CanonicalQualType.Type; - if (qt.Kind == TypeKind.ExtVector) { - rv = true; - break; - } - var at = qt as ConstantArrayType; - if (at != null) { - if (at.ElementType.Type.Kind == TypeKind.ExtVector) { - rv = true; - break; - } - } - } - } - } - - var typeName = type.ToString (); - - if (!rv && typeName.Contains ("simd")) - Console.WriteLine ($"!unknown-simd-type! Could not detect that {typeName} is a Simd type, but its name contains 'simd'. Something needs fixing in SimdCheck.cs"); - - if (rv) - simd_type = typeName; - - return rv; - } - - bool IsSimdType (QualType type, ref string simd_type, ref bool requires_marshal_directive) - { - var str = Undecorate (type.ToString ()); - - if (type_mapping.TryGetValue (str, out var info)) { - requires_marshal_directive = true; - simd_type = str; - return true; - } - - if (IsExtVector (type, ref simd_type)) - Console.WriteLine ($"!unknown-simd-type-mapping! The Simd type {simd_type} does not have a mapping to a managed type. Please add one in SimdCheck.cs"); - - return false; - } - - string Undecorate (string native_name) - { - if (native_name.StartsWith ("const ", StringComparison.Ordinal)) - return Undecorate (native_name.Substring ("const ".Length)); - - if (native_name.StartsWith ("struct ", StringComparison.Ordinal)) - return Undecorate (native_name.Substring ("struct ".Length)); - - const string _Nonnull = " _Nonnull"; - if (native_name.EndsWith (_Nonnull, StringComparison.Ordinal)) - return Undecorate (native_name.Substring (0, native_name.Length - _Nonnull.Length)); - - const string _Nullable = " _Nullable"; - if (native_name.EndsWith (_Nullable, StringComparison.Ordinal)) - return Undecorate (native_name.Substring (0, native_name.Length - _Nullable.Length)); - - const string _star = " *"; - if (native_name.EndsWith (_star, StringComparison.Ordinal)) - return Undecorate (native_name.Substring (0, native_name.Length - _star.Length)); - - return native_name; - } - - bool HasMarshalDirective (ICustomAttributeProvider provider) - { - if (provider?.HasCustomAttributes != true) - return false; - - foreach (var ca in provider.CustomAttributes) - if (ca.Constructor.DeclaringType.Name == "MarshalDirective") - return true; - - return false; - } - - void CheckMarshalDirective (MethodDefinition method, string simd_type) - { - if (!method.HasBody) - return; - - if (method.IsObsolete ()) - return; - - // The [MarshalDirective] attribute isn't copied to the generated code, - // so instead apply some heuristics and detect calls to the xamarin_simd__ P/Invoke, - // and if there are any, then assume the method binding has a [MarshalDirective]. - var body = method.Body; - var anyCalls = false; - foreach (var i in body.Instructions) { - switch (i.OpCode.Code) { - case Mono.Cecil.Cil.Code.Call: - case Mono.Cecil.Cil.Code.Calli: - case Mono.Cecil.Cil.Code.Callvirt: - var mr = i.Operand as MethodReference; - if (mr != null) { - if (mr.Name.StartsWith ("xamarin_simd__", StringComparison.Ordinal)) - return; - if (mr.Name.StartsWith ("xamarin_vector_float3__", StringComparison.Ordinal)) - return; - } - anyCalls = true; - break; - default: - break; - } - } - - // If the method doesn't call anywhere, it can't be broken. - // For instance if the method just throws an exception. - if (!anyCalls) - return; - - Console.WriteLine ($"!wrong-simd-missing-marshaldirective! {method}: simd type: {simd_type}"); - } - - public override void VisitObjCMethodDecl (ObjCMethodDecl decl, VisitKind visitKind) - { - if (visitKind != VisitKind.Enter) - return; - - // don't process methods (or types) that are unavailable for the current platform - if (!decl.IsAvailable () || !(decl.DeclContext as Decl).IsAvailable ()) - return; - - var simd_type = string.Empty; - var requires_marshal_directive = false; - var native_simd = ContainsSimdTypes (decl, ref simd_type, ref requires_marshal_directive); - - ManagedSimdInfo info; - managed_methods.TryGetValue (decl.GetName (), out info); - var method = info?.Method; - - if (!native_simd) { - if (method != null) { - // The managed method uses types that were incorrectly used in place of the correct Simd types, - // but the native method doesn't use the native Simd types. This means the binding is correct. - } else { - // Neither the managed nor the native method have anything to do with Simd types. - } - return; - } - - if (method == null) { - // Could not map the native method to a managed method. - // This needs investigation, to see why the native method couldn't be mapped. - - // Check if this is new API, in which case it probably couldn't be mapped because we haven't bound it. - var is_new = false; - var attrs = decl.Attrs.ToList (); - var parentClass = decl.DeclContext as Decl; - if (parentClass != null) - attrs.AddRange (parentClass.Attrs); - - foreach (var attr in attrs) { - var av_attr = attr as AvailabilityAttr; - if (av_attr == null) - continue; - if (av_attr.Platform.Name != "ios") - continue; - if (av_attr.Introduced.Major >= 11) { - is_new = true; - break; - } - } - if (is_new && !very_strict) - return; - if (!strict) - return; - Console.WriteLine ($"!missing-simd-managed-method! {decl}: could not find a managed method for the native method {decl.GetName ()} (selector: {decl.Selector}). Found the simd type '{simd_type}' in the native signature."); - return; - } - - if (!info.ContainsInvalidMappingForSimd) { - // The managed method does not have any types that are incorrect for Simd. - if (requires_marshal_directive) - CheckMarshalDirective (method, simd_type); - return; - } - - if (method.IsObsolete ()) { - // We have a potentially broken managed method, but it's obsolete. That's fine. - return; - } - - if (requires_marshal_directive) - CheckMarshalDirective (method, simd_type); - - // We have a potentially broken managed method. This needs fixing/investigation. - Console.WriteLine ($"!unknown-simd-type-in-signature! {method}: the native signature has a simd type ({simd_type}), while the corresponding managed method is using an incorrect (non-simd) type."); - } - } -} \ No newline at end of file diff --git a/tests/xtro-sharpie/common.ignore b/tests/xtro-sharpie/common.ignore index 9f6b3d9dfe4..1ef081070ad 100644 --- a/tests/xtro-sharpie/common.ignore +++ b/tests/xtro-sharpie/common.ignore @@ -1,8 +1,3 @@ -# ARKit - -## This method is manually bound. -!wrong-simd-missing-marshaldirective! System.IntPtr ARKit.ARPointCloud::GetRawPoints(): simd type: vector_float3 - # AVFoundation ## We only bind "finished" as we cannot use [Bind] here as it would break compatibility with iOS 6.x @@ -35,16 +30,6 @@ !unknown-native-enum! AVAudioSessionInterruptionFlags bound -# CoreFoundation - -## we already expose the NSURLFileProtection* constants -!missing-field! kCFURLFileProtectionComplete not bound -!missing-field! kCFURLFileProtectionCompleteUnlessOpen not bound -!missing-field! kCFURLFileProtectionCompleteUntilFirstUserAuthentication not bound -!missing-field! kCFURLFileProtectionKey not bound -!missing-field! kCFURLFileProtectionNone not bound - - # CoreGraphics ## deprecated (as the name indicates) and not exposed @@ -83,38 +68,13 @@ ## part of category GKScore_Deprecated !missing-selector! GKScore::playerID not bound + # Intents ## not exposed by our API (better use the OS version) !missing-field! IntentsVersionNumber not bound !missing-field! IntentsVersionString not bound -## new (Xcode9) @required members of an older type cannot be made abstract -!incorrect-protocol-member! INSpeakable::alternativeSpeakableMatches is REQUIRED and should be abstract -!incorrect-protocol-member! INSpeakable::vocabularyIdentifier is REQUIRED and should be abstract - -## new types that has deprecated members (likely to be removed from headers at some point) -!missing-selector! +INCallDestinationTypeResolutionResult::confirmationRequiredWithValueToConfirm: not bound -!missing-selector! +INCallDestinationTypeResolutionResult::successWithResolvedValue: not bound -!missing-selector! +INCallRecordTypeOptionsResolutionResult::confirmationRequiredWithValueToConfirm: not bound -!missing-selector! +INCallRecordTypeOptionsResolutionResult::successWithResolvedValue: not bound -!missing-selector! +INAccountTypeResolutionResult::confirmationRequiredWithValueToConfirm: not bound -!missing-selector! +INAccountTypeResolutionResult::successWithResolvedValue: not bound -!missing-selector! +INBalanceTypeResolutionResult::confirmationRequiredWithValueToConfirm: not bound -!missing-selector! +INBalanceTypeResolutionResult::successWithResolvedValue: not bound -!missing-selector! +INDateSearchTypeResolutionResult::confirmationRequiredWithValueToConfirm: not bound -!missing-selector! +INDateSearchTypeResolutionResult::successWithResolvedValue: not bound -!missing-selector! +INLocationSearchTypeResolutionResult::confirmationRequiredWithValueToConfirm: not bound -!missing-selector! +INLocationSearchTypeResolutionResult::successWithResolvedValue: not bound -!missing-selector! +INNoteContentTypeResolutionResult::confirmationRequiredWithValueToConfirm: not bound -!missing-selector! +INNoteContentTypeResolutionResult::successWithResolvedValue: not bound -!missing-selector! +INNotebookItemTypeResolutionResult::confirmationRequiredWithValueToConfirm: not bound -!missing-selector! +INNotebookItemTypeResolutionResult::successWithResolvedValue: not bound -!missing-selector! +INTaskStatusResolutionResult::confirmationRequiredWithValueToConfirm: not bound -!missing-selector! +INTaskStatusResolutionResult::successWithResolvedValue: not bound -!missing-selector! +INVisualCodeTypeResolutionResult::confirmationRequiredWithValueToConfirm: not bound -!missing-selector! +INVisualCodeTypeResolutionResult::successWithResolvedValue: not bound - # CloudKit @@ -125,13 +85,6 @@ !missing-selector! CKRecord::setObject:forKeyedSubscript: not bound -# PassKit - -## made optional in xcode9 beta 3 since they were replaced with newer API -!incorrect-protocol-member! PKPaymentAuthorizationControllerDelegate::paymentAuthorizationController:didAuthorizePayment:completion: is OPTIONAL and should NOT be abstract -!incorrect-protocol-member! PKPaymentAuthorizationViewControllerDelegate::paymentAuthorizationViewController:didAuthorizePayment:completion: is OPTIONAL and should NOT be abstract - - # Metal ## New @required (abstract) methods in existing types (breaking changes) @@ -215,6 +168,7 @@ !incorrect-protocol-member! MDLMeshBufferZone::allocator is REQUIRED and should be abstract !incorrect-protocol-member! MDLMeshBufferZone::capacity is REQUIRED and should be abstract + # Security ## part of mscorlib.dll -> mcs/class/corlib/CommonCrypto/CommonCrypto.cs to implement RNGCryptoServiceProvider @@ -244,16 +198,6 @@ !missing-selector! +UIView::layerClass not bound -# Vision - -## we do not expose internal framework versions -!missing-field! VNVisionVersionNumber not bound - -## called indirectly (there's a required native layer for them) -!missing-pinvoke! VNImagePointForFaceLandmarkPoint is not bound -!missing-pinvoke! VNNormalizedFaceBoundingBoxPointForLandmarkPoint is not bound - - # non-imported headers ## objc runtime @@ -262,19 +206,3 @@ ## CoreLocation # We have our own managed ctor !missing-pinvoke! CLLocationCoordinate2DMake is not bound - -## PDFKit -# The following enums are bound as PdfFoo, lowercase Pdf prefix -!missing-enum! PDFActionNamedName not bound -!missing-enum! PDFAreaOfInterest not bound -!missing-enum! PDFBorderStyle not bound -!missing-enum! PDFDisplayBox not bound -!missing-enum! PDFDisplayDirection not bound -!missing-enum! PDFDisplayMode not bound -!missing-enum! PDFDocumentPermissions not bound -!missing-enum! PDFInterpolationQuality not bound -!missing-enum! PDFLineStyle not bound -!missing-enum! PDFMarkupType not bound -!missing-enum! PDFTextAnnotationIconType not bound -!missing-enum! PDFWidgetCellState not bound -!missing-enum! PDFWidgetControlType not bound diff --git a/tests/xtro-sharpie/common.pending b/tests/xtro-sharpie/common.pending index ed528daa7ff..ca4145edfd7 100644 --- a/tests/xtro-sharpie/common.pending +++ b/tests/xtro-sharpie/common.pending @@ -4,21 +4,6 @@ !missing-field! AVAudioSessionInterruptionWasSuspendedKey not bound -# CoreAnimation - -## header file removed in xcode9 -!unknown-type! CAEmitterBehavior bound -!unknown-field! kCAEmitterBehaviorAlignToMotion bound -!unknown-field! kCAEmitterBehaviorAttractor bound -!unknown-field! kCAEmitterBehaviorColorOverLife bound -!unknown-field! kCAEmitterBehaviorDrag bound -!unknown-field! kCAEmitterBehaviorLight bound -!unknown-field! kCAEmitterBehaviorSimpleAttractor bound -!unknown-field! kCAEmitterBehaviorValueOverLife bound -!unknown-field! kCAEmitterBehaviorWave bound - - - # CoreData ## https://bugzilla.xamarin.com/show_bug.cgi?id=34968 @@ -40,10 +25,6 @@ !missing-selector! +NSPersistentStoreCoordinator::setMetadata:forPersistentStoreOfType:URL:options:error: not bound !missing-selector! +NSMappingModel::inferredMappingModelForSourceModel:destinationModel:error: not bound -## https://trello.com/c/dlSRYPFx/92-33878590-missing-nsbinarystoresecuredecodingclasses-and-nsbinarystoreinsecuredecodingcompatibilityoption-constants-in-binaries -!missing-field! NSBinaryStoreSecureDecodingClasses not bound -!missing-field! NSBinaryStoreInsecureDecodingCompatibilityOption not bound - # CoreGraphics @@ -54,26 +35,6 @@ !missing-pinvoke! CGColorConverterGetTypeID is not bound -# CoreImage - -## new @required on existing protocols are breaking changes -!incorrect-protocol-member! CIImageProcessorInput::surface is REQUIRED and should be abstract -!incorrect-protocol-member! CIImageProcessorOutput::surface is REQUIRED and should be abstract - -## requires varargs support -!missing-selector! +CIFilter::filterWithName:keysAndValues: not bound -!missing-selector! CISampler::initWithImage:keysAndValues: not bound -!missing-selector! +CISampler::samplerWithImage:keysAndValues: not bound - -## https://bugzilla.xamarin.com/show_bug.cgi?id=59296 -!missing-field! kCIImageApplyOrientationProperty not bound -!missing-field! kCIImageAuxiliaryDepth not bound -!missing-field! kCIImageAuxiliaryDisparity not bound -!missing-field! kCIImageNearestSampling not bound -!missing-field! kCIInputDepthImageKey not bound -!missing-field! kCIInputDisparityImageKey not bound - - # Foundation ## https://bugzilla.xamarin.com/show_bug.cgi?id=35009 @@ -94,34 +55,12 @@ !missing-selector! NSURLSession::getTasksWithCompletionHandler: not bound -# HomeKit - -## unrecognized selector - rdar 33883958: https://trello.com/c/TIlzWzrL -!missing-selector! HMMutablePresenceEvent::setPresenceEventType: not bound -!missing-selector! HMMutablePresenceEvent::setPresenceUserType: not bound - - -# MetalPerformanceShaders - -## new type not yet bound -!wrong-base-type! MPSImageLanczosScale expected MPSImageScale actual MPSUnaryImageKernel - -## autogenerated, likely due to the addition (xcode9) of `initWithCoder:device:` -!extra-designated-initializer! MPSKernel::initWithCoder: is incorrectly decorated with an [DesignatedInitializer] attribute - - # Photos ## xcode 8 beta 1-6 defines it but it does not exists in the binaries - rdar #28169810 https://trello.com/c/RwXK6YRX !missing-field! PHLivePhotoShouldRenderAtPlaybackTime not bound -# ReplayKit - -## https://trello.com/c/eA440suj/91-33875315-rpbroadcasthandler-updatebroadcasturl-unrecognized-selector -!missing-selector! RPBroadcastHandler::updateBroadcastURL: not bound - - # SpriteKit ## Deprecated in iOS 10 @@ -354,7 +293,6 @@ # Protocols we decided not to expose !missing-protocol! NSFastEnumeration not bound -!missing-protocol-conformance! AVCaptureSynchronizedDataCollection should conform to NSFastEnumeration !missing-protocol-conformance! NSArray should conform to NSFastEnumeration !missing-protocol-conformance! NSDictionary should conform to NSFastEnumeration !missing-protocol-conformance! NSEntityDescription should conform to NSFastEnumeration @@ -698,9 +636,6 @@ !missing-selector! INPerson::initWithHandle:nameComponents:contactIdentifier: not bound !missing-selector! INPerson::initWithHandle:nameComponents:displayName:image:contactIdentifier: not bound -## Apple made this @optional in iOS 11 but this is a breaking change -!incorrect-protocol-member! INSpeakable::identifier is OPTIONAL and should NOT be abstract - # GameplayKit ## Fixed in XAMCORE_4_0 @@ -713,52 +648,4 @@ !incorrect-protocol-member! MDLObjectContainerComponent::objectAtIndexedSubscript: is REQUIRED and should be abstract !incorrect-protocol-member! MDLTransformComponent::keyTimes is REQUIRED and should be abstract !incorrect-protocol-member! MDLTransformComponent::resetsTransform is REQUIRED and should be abstract -!incorrect-protocol-member! MDLTransformComponent::setResetsTransform: is REQUIRED and should be abstract - -# CoreML -## we do not have NSFastEnumeration and decided to not bind objectForKeyedSubscript using a local method instead -!missing-protocol-conformance! MLDictionaryFeatureProvider should conform to NSFastEnumeration -!missing-selector! MLDictionaryFeatureProvider::objectForKeyedSubscript: not bound - -## radar://33643011 -> https://trello.com/c/ZN712GOi -## [FAIL] Selector not found for CoreML.MLFeatureDescription : setMultiArrayConstraint: -## [FAIL] Selector not found for CoreML.MLFeatureDescription : setImageConstraint: -## [FAIL] Selector not found for CoreML.MLFeatureDescription : setDictionaryConstraint: -!missing-selector! MLFeatureDescription::setDictionaryConstraint: not bound -!missing-selector! MLFeatureDescription::setImageConstraint: not bound -!missing-selector! MLFeatureDescription::setMultiArrayConstraint: not bound - - -# WekKit - -## 34185961 The header WKSnapshotConfiguration.h is not included inside the umbrella WebKit.h -!unknown-type! WKSnapshotConfiguration bound - - -# recent xtro changes - -## init -!missing-designated-initializer! CXAction::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! MPSBinaryImageKernel::initWithDevice: is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! MPSCNNKernel::initWithDevice: is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! MPSImageLanczosScale::initWithDevice: is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! MPSUnaryImageKernel::initWithDevice: is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! MSMessage::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! PKAddPaymentPassRequest::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! SLComposeSheetConfigurationItem::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UIBarButtonItem::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UIBarItem::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UIBezierPath::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UICollectionViewLayout::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UICubicTimingParameters::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UIDragPreviewParameters::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UIImageAsset::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UIKeyCommand::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UILocalNotification::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UIMotionEffect::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UIPasteConfiguration::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UISpringTimingParameters::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UITabBarItem::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UITraitCollection::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UIUserNotificationAction::init is missing an [DesignatedInitializer] attribute -!missing-designated-initializer! UIUserNotificationCategory::init is missing an [DesignatedInitializer] attribute +!incorrect-protocol-member! MDLTransformComponent::setResetsTransform: is REQUIRED and should be abstract \ No newline at end of file diff --git a/tests/xtro-sharpie/ios.ignore b/tests/xtro-sharpie/ios.ignore index 617094fbf1e..1ebb8053dee 100644 --- a/tests/xtro-sharpie/ios.ignore +++ b/tests/xtro-sharpie/ios.ignore @@ -5,10 +5,6 @@ ## untyped enum, we took the prefix from values in ABPerson.h !unknown-native-enum! ABAddressBookError bound -# ARKit - -## NS_SWIFT_UNAVAILABLE("Use run(_:options:) instead") -!missing-selector! ARSession::runWithConfiguration: not bound # AssetLibrary @@ -68,33 +64,12 @@ !missing-selector! CIKernel::setROISelector: not bound -# CoreTelephony - -## deprecated in iOS 10 (in favor of CallKit) -!missing-field! CTCallStateConnected not bound -!missing-field! CTCallStateDialing not bound -!missing-field! CTCallStateDisconnected not bound -!missing-field! CTCallStateIncoming not bound - - # GameKit ## typedef is used + untyped enum in GKPeerPickerController.h: typedef NSUInteger GKPeerPickerConnectionType !unknown-native-enum! GKPeerPickerConnectionType bound -# Intents - -## added and deprecated in Xcode9 (but not removed from headers) -!missing-selector! +INNotebookItemTypeResolutionResult::disambiguationWithValuesToDisambiguate: not bound - -## The following were deprecated in ios(10.0, 10.0) -!missing-selector! INRideDriver::initWithHandle:displayName:image:rating:phoneNumber: not bound -!missing-selector! INRideDriver::initWithHandle:nameComponents:image:rating:phoneNumber: not bound -!missing-selector! INRideOption::identifier not bound -!missing-selector! INRideOption::setIdentifier: not bound - - # IntentsUI ## not exposed by our API (better use the OS version) @@ -102,32 +77,12 @@ !missing-field! IntentsUIVersionString not bound -# MediaPlayer - -## incorrect macro/parsing - decorated with `MP_API(macos(10.12.2))` -!missing-enum! MPNowPlayingPlaybackState not bound -!missing-selector! MPNowPlayingInfoCenter::playbackState not bound -!missing-selector! MPNowPlayingInfoCenter::setPlaybackState: not bound - - -# PushKit - -## was @required but now @optional (a replacement was added in Xcode9) - still a breaking change to remove the abstract -!incorrect-protocol-member! PKPushRegistryDelegate::pushRegistry:didReceiveIncomingPushWithPayload:forType: is OPTIONAL and should NOT be abstract - - # ReplayKit ## only used on tvOS but exposed in iOS 10 SDK !missing-enum! RPPreviewViewControllerMode not bound -# Social - -## deprecated (was not available on iOS before Xcode9) -!missing-field! SLServiceTypeLinkedIn not bound - - # UIKit ## typedef is used (no value) in UITextInput.h: typedef NSInteger UITextDirection @@ -171,49 +126,6 @@ !missing-selector! NSObject::indexOfAccessibilityElement: not bound !missing-selector! NSObject::setAccessibilityElements: not bound -## UIAccessibility -## We can't expose them as categories of NSObject so we have custom types instead -!missing-selector! NSObject::accessibilityActivationPoint not bound -!missing-selector! NSObject::accessibilityAttributedHint not bound -!missing-selector! NSObject::accessibilityAttributedLabel not bound -!missing-selector! NSObject::accessibilityAttributedValue not bound -!missing-selector! NSObject::accessibilityContainerType not bound -!missing-selector! NSObject::accessibilityCustomActions not bound -!missing-selector! NSObject::accessibilityDragSourceDescriptors not bound -!missing-selector! NSObject::accessibilityDropPointDescriptors not bound -!missing-selector! NSObject::accessibilityElementsHidden not bound -!missing-selector! NSObject::accessibilityFrame not bound -!missing-selector! NSObject::accessibilityHint not bound -!missing-selector! NSObject::accessibilityLabel not bound -!missing-selector! NSObject::accessibilityLanguage not bound -!missing-selector! NSObject::accessibilityNavigationStyle not bound -!missing-selector! NSObject::accessibilityPath not bound -!missing-selector! NSObject::accessibilityScroll: not bound -!missing-selector! NSObject::accessibilityTraits not bound -!missing-selector! NSObject::accessibilityValue not bound -!missing-selector! NSObject::accessibilityViewIsModal not bound -!missing-selector! NSObject::isAccessibilityElement not bound -!missing-selector! NSObject::setAccessibilityActivationPoint: not bound -!missing-selector! NSObject::setAccessibilityAttributedHint: not bound -!missing-selector! NSObject::setAccessibilityAttributedLabel: not bound -!missing-selector! NSObject::setAccessibilityAttributedValue: not bound -!missing-selector! NSObject::setAccessibilityContainerType: not bound -!missing-selector! NSObject::setAccessibilityCustomActions: not bound -!missing-selector! NSObject::setAccessibilityDragSourceDescriptors: not bound -!missing-selector! NSObject::setAccessibilityDropPointDescriptors: not bound -!missing-selector! NSObject::setAccessibilityElementsHidden: not bound -!missing-selector! NSObject::setAccessibilityFrame: not bound -!missing-selector! NSObject::setAccessibilityHint: not bound -!missing-selector! NSObject::setAccessibilityLabel: not bound -!missing-selector! NSObject::setAccessibilityLanguage: not bound -!missing-selector! NSObject::setAccessibilityNavigationStyle: not bound -!missing-selector! NSObject::setAccessibilityPath: not bound -!missing-selector! NSObject::setAccessibilityTraits: not bound -!missing-selector! NSObject::setAccessibilityValue: not bound -!missing-selector! NSObject::setAccessibilityViewIsModal: not bound -!missing-selector! NSObject::setIsAccessibilityElement: not bound -!missing-selector! NSObject::setShouldGroupAccessibilityChildren: not bound -!missing-selector! NSObject::shouldGroupAccessibilityChildren not bound # WatchConnectivity @@ -472,7 +384,3 @@ !unknown-field! CBUUIDPeripheralPrivacyFlagString bound !unknown-field! CBUUIDReconnectionAddressString bound !unknown-field! CBUUIDServiceChangedString bound - -## PDFKit -# The following enums are bound as PdfFoo, lowercase Pdf prefix -!missing-enum! PDFThumbnailLayoutMode not bound diff --git a/tests/xtro-sharpie/ios.pending b/tests/xtro-sharpie/ios.pending index 9735cb8e530..77b1486341b 100644 --- a/tests/xtro-sharpie/ios.pending +++ b/tests/xtro-sharpie/ios.pending @@ -150,12 +150,6 @@ !wrong-enum-size! MessageComposeResult managed 4 vs native 8 -# Metal - -## only on macOS (but removing would be a vreaking change) -!unknown-native-enum! MTLSamplerBorderColor bound - - # Speech ## iOS 10 beta 1 - use a non-public type in the signature https://trello.com/c/s6s6YKua !missing-selector! SFSpeechRecognizer::prepareWithRequest: not bound @@ -262,13 +256,17 @@ # Intents API iOS 10 +## Deprecated in Xcode 8 beta NS_DEPRECATED(10_12, 10_12, 10_0, 10_0) / pragma mark - Deprecated +!missing-selector! INRideDriver::initWithHandle:displayName:image:rating:phoneNumber: not bound +!missing-selector! INRideDriver::initWithHandle:nameComponents:image:rating:phoneNumber: not bound +!missing-selector! INRideOption::identifier not bound +!missing-selector! INRideOption::setIdentifier: not bound + ## INPayBillIntentHandling && INSearchForBillsIntentHandling are new protocols added in iOS 10.3. This two protocols ## were added to the existing Protocol INPaymentsDomainHandling so making this two required would be a breaking change !incorrect-protocol-member! INPayBillIntentHandling::handlePayBill:completion: is REQUIRED and should be abstract !incorrect-protocol-member! INSearchForBillsIntentHandling::handleSearchForBills:completion: is REQUIRED and should be abstract -## Apple made this protocol member optional in iOS 11 but it is a breaking change for us. Added to XAMCORE_4_0. -!incorrect-protocol-member! INUIHostedViewControlling::configureWithInteraction:context:completion: is OPTIONAL and should NOT be abstract # UIKit @@ -307,8 +305,6 @@ !incorrect-protocol-member! UIViewControllerTransitionCoordinatorContext::isInterruptible is REQUIRED and should be abstract !incorrect-protocol-member! UIFocusEnvironment::preferredFocusEnvironments is REQUIRED and should be abstract !incorrect-protocol-member! UITextDocumentProxy::documentInputMode is REQUIRED and should be abstract -!incorrect-protocol-member! UITextDocumentProxy::documentIdentifier is REQUIRED and should be abstract -!incorrect-protocol-member! UITextDocumentProxy::selectedText is REQUIRED and should be abstract !incorrect-protocol-member! UILayoutSupport::bottomAnchor is REQUIRED and should be abstract !incorrect-protocol-member! UILayoutSupport::heightAnchor is REQUIRED and should be abstract !incorrect-protocol-member! UILayoutSupport::topAnchor is REQUIRED and should be abstract @@ -322,20 +318,9 @@ ## exception name, not clear if useful !missing-field! UIApplicationInvalidInterfaceOrientationException not bound -## fixed for XAMCORE_4_0 -!incorrect-protocol-member! UIDocumentPickerDelegate::documentPicker:didPickDocumentAtURL: is OPTIONAL and should NOT be abstract - -## https://bugzilla.xamarin.com/show_bug.cgi?id=59422 -!missing-pinvoke! UIContentSizeCategoryCompareToCategory is not bound -!missing-pinvoke! UIContentSizeCategoryIsAccessibilityCategory is not bound # WatchKit ## unfortunate duplicated name !duplicate-type-name! WKErrorCode enum exists as both WatchKit.WKErrorCode and WebKit.WKErrorCode !duplicate-type-name! WKErrorCode enum exists as both WebKit.WKErrorCode and WatchKit.WKErrorCode - -#PDFKit -# PDFAnnotationPopup is not available on iOS also deprecated in macOS 10,12 -!missing-selector! PDFAnnotation::popup not bound -!missing-selector! PDFAnnotation::setPopup: not bound diff --git a/tests/xtro-sharpie/osx.ignore b/tests/xtro-sharpie/osx.ignore index 580c8f28ef8..ff1e7a7ebd0 100644 --- a/tests/xtro-sharpie/osx.ignore +++ b/tests/xtro-sharpie/osx.ignore @@ -1,11 +1,5 @@ # A large number of assemblies are black listed in xtro-sharpie/Runner.cs -# CoreBluetooth - -## old and different name for CBUUIDCharacteristicValidRangeString, removed in Xcode9 headers (27160443) -!unknown-field! CBUUIDValidRangeString bound - - # GameController ## other CGMicroGamepad API are not available on OSX (looks like a mistake) @@ -13,12 +7,6 @@ !missing-pinvoke! NSDataFromGCMicroGamepadSnapShotDataV100 is not bound -# SpriteKit - -## This enum is not used in macOS API so it makes not sense to expose it -!missing-enum! SKNodeFocusBehavior not bound - - # fixed in XAMCORE_3_0 ## 8a6099b8027fa8e1ad1e032c731c7f750619303e @@ -440,8 +428,4 @@ # Deprecated in the same version of OS X that CBCentral becomes available. The alternative (Identifier property) is bound and available. !missing-selector! CBCentral::UUID not bound -!missing-selector! CBPeripheral::UUID not bound - -## PDFKit -# The following enums are bound as PdfFoo, lowercase Pdf prefix -!missing-enum! PDFPrintScalingMode not bound +!missing-selector! CBPeripheral::UUID not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/osx.pending b/tests/xtro-sharpie/osx.pending index 0409da99d94..c57a82a88a4 100644 --- a/tests/xtro-sharpie/osx.pending +++ b/tests/xtro-sharpie/osx.pending @@ -298,9 +298,6 @@ !unknown-native-enum! INRelativeSetting bound !unknown-type! INRelativeSettingResolutionResult bound -## The signature uses INBooleanResolutionResult which is not available on mac -!missing-protocol-member! INSearchCallHistoryIntentHandling::resolveUnseenForSearchCallHistory:withCompletion: not found - # Used in sandbox for NSOpen/Save panel but never should have been bound. #if !XAMCORE_3_0'ed !unknown-type! NSRemoteOpenPanel bound !unknown-type! NSRemoteSavePanel bound @@ -406,11 +403,9 @@ # MediaPlayer API macOS 10.12.2 -## MPMediaItem only exposed for fields, it's not really available in macOS -!wrong-base-type! MPMediaItem expected MPMediaEntity actual NSObject - # These are not available on macOS even if xtro says so. !missing-type! MPMediaEntity not bound +!missing-type! MPMediaItem not bound !missing-enum! MPErrorCode not bound !missing-enum! MPMediaType not bound @@ -418,39 +413,46 @@ !missing-field! MPErrorDomain not bound !missing-field! MPMediaEntityPropertyPersistentID not bound -## type not available on macOS +!missing-field! MPMediaItemPropertyAlbumArtist not bound +!missing-field! MPMediaItemPropertyAlbumArtistPersistentID not bound +!missing-field! MPMediaItemPropertyAlbumPersistentID not bound +!missing-field! MPMediaItemPropertyAlbumTitle not bound +!missing-field! MPMediaItemPropertyAlbumTrackCount not bound +!missing-field! MPMediaItemPropertyAlbumTrackNumber not bound +!missing-field! MPMediaItemPropertyArtist not bound +!missing-field! MPMediaItemPropertyArtistPersistentID not bound +!missing-field! MPMediaItemPropertyArtwork not bound +!missing-field! MPMediaItemPropertyAssetURL not bound +!missing-field! MPMediaItemPropertyBeatsPerMinute not bound +!missing-field! MPMediaItemPropertyBookmarkTime not bound +!missing-field! MPMediaItemPropertyComments not bound +!missing-field! MPMediaItemPropertyComposer not bound +!missing-field! MPMediaItemPropertyComposerPersistentID not bound +!missing-field! MPMediaItemPropertyDateAdded not bound +!missing-field! MPMediaItemPropertyDiscCount not bound +!missing-field! MPMediaItemPropertyDiscNumber not bound +!missing-field! MPMediaItemPropertyGenre not bound +!missing-field! MPMediaItemPropertyGenrePersistentID not bound +!missing-field! MPMediaItemPropertyHasProtectedAsset not bound +!missing-field! MPMediaItemPropertyIsCloudItem not bound +!missing-field! MPMediaItemPropertyIsCompilation not bound +!missing-field! MPMediaItemPropertyIsExplicit not bound +!missing-field! MPMediaItemPropertyLastPlayedDate not bound +!missing-field! MPMediaItemPropertyLyrics not bound +!missing-field! MPMediaItemPropertyMediaType not bound +!missing-field! MPMediaItemPropertyPersistentID not bound +!missing-field! MPMediaItemPropertyPlayCount not bound +!missing-field! MPMediaItemPropertyPlaybackDuration not bound +!missing-field! MPMediaItemPropertyPodcastPersistentID not bound +!missing-field! MPMediaItemPropertyPodcastTitle not bound +!missing-field! MPMediaItemPropertyRating not bound +!missing-field! MPMediaItemPropertyReleaseDate not bound +!missing-field! MPMediaItemPropertySkipCount not bound +!missing-field! MPMediaItemPropertyTitle not bound +!missing-field! MPMediaItemPropertyUserGrouping not bound + !missing-selector! +MPMediaEntity::canFilterByProperty: not bound !missing-selector! MPMediaEntity::enumerateValuesForProperties:usingBlock: not bound !missing-selector! MPMediaEntity::objectForKeyedSubscript: not bound !missing-selector! MPMediaEntity::valueForProperty: not bound - -## deprecaed in iOS 10, not on macOS !missing-selector! MPMediaItemArtwork::imageCropRect not bound - - -# Metal - -## [Notification] in protocol - https://bugzilla.xamarin.com/show_bug.cgi?id=59342 -!missing-field! MTLDeviceRemovalRequestedNotification not bound -!missing-field! MTLDeviceWasAddedNotification not bound -!missing-field! MTLDeviceWasRemovedNotification not bound - - -# Not available in OS X -!missing-selector! ACAccount::userFullName not bound - -## These are not available on macOS even if xtro says so. -!missing-selector! EKCalendarItem::UUID not bound -!missing-selector! EKEvent::birthdayPersonID not bound -!missing-selector! EKEventStore::calendars not bound -!missing-selector! EKEventStore::removeEvent:span:error: not bound -!missing-selector! EKEventStore::saveEvent:span:error: not bound -!missing-selector! EKSource::calendars not bound - -### This is not bound and it is already deprecated -!missing-selector! EKParticipant::ABPersonInAddressBook: not bound - -#PDFKit -## Deprecated -!missing-selector! PDFAnnotation::initWithDictionary:forPage: not bound - diff --git a/tests/xtro-sharpie/tvos.ignore b/tests/xtro-sharpie/tvos.ignore index 4bef259169c..fa85dfaad9a 100644 --- a/tests/xtro-sharpie/tvos.ignore +++ b/tests/xtro-sharpie/tvos.ignore @@ -101,9 +101,6 @@ !missing-selector! CKContainer::fetchAllLongLivedOperationIDsWithCompletionHandler: not bound !missing-selector! CKContainer::fetchLongLivedOperationWithID:completionHandler: not bound -## deprecated API -!missing-selector! CKContainer::discoverAllContactUserInfosWithCompletionHandler: not bound - # CoreImage @@ -285,30 +282,6 @@ !missing-selector! +MPMediaItem::persistentIDPropertyForGroupingType: not bound !missing-selector! +MPMediaItem::titlePropertyForGroupingType: not bound -## unused in public API for tvOS -!missing-enum! MPMediaType not bound - - These are not available on macOS even if xtro says so. -!missing-type! MPMediaEntity not bound - -## MPMediaItem only exposed for fields, it's not really available in macOS -!unknown-type! MPMediaItem bound -#!wrong-base-type! MPMediaItem expected MPMediaEntity actual NSObject - -## incorrect macro/parsing - decorated with `MP_API(macos(10.12.2))` -!missing-enum! MPNowPlayingPlaybackState not bound -!missing-selector! MPNowPlayingInfoCenter::playbackState not bound -!missing-selector! MPNowPlayingInfoCenter::setPlaybackState: not bound - -## marked as available in tvOS 11 but the member is not and using a type, MPMusicPlayerQueueDescriptor, that's not available -!missing-protocol! MPSystemMusicPlayerController not bound - - -# ReplayKit - -## Not used on tvOS (no camera) -!missing-enum! RPCameraPosition not bound - # StoreKit @@ -323,7 +296,6 @@ !missing-field! SKCloudServiceSetupOptionsITunesItemIdentifierKey not bound !missing-field! SKCloudServiceSetupOptionsAffiliateTokenKey not bound !missing-field! SKCloudServiceSetupOptionsCampaignTokenKey not bound -!missing-field! SKCloudServiceSetupOptionsMessageIdentifierKey not bound !missing-protocol! SKCloudServiceSetupViewControllerDelegate not bound @@ -382,16 +354,6 @@ !missing-selector! UITableViewHeaderFooterView::setTintColor: not bound !missing-selector! UITableViewHeaderFooterView::tintColor not bound -## lack of availabilty macros on NSItemProvder.PreferredPresentationStyle - intro says they are not available -!missing-selector! NSItemProvider::preferredPresentationStyle not bound -!missing-selector! NSItemProvider::setPreferredPresentationStyle: not bound -## and that also means the (enum/returned) type is unused -!missing-enum! UIPreferredPresentationStyle not bound - -## Added on UIAccessibility -!missing-selector! NSObject::accessibilityHeaderElements not bound -!missing-selector! NSObject::setAccessibilityHeaderElements: not bound - # OpenTK @@ -399,6 +361,103 @@ !missing-pinvoke! CVOpenGLESTextureCacheGetTypeID is not bound !missing-pinvoke! CVOpenGLESTextureGetTypeID is not bound +## duplicates by design +!duplicate-type-name! ActiveAttribType enum exists as both OpenTK.Graphics.ES30.ActiveAttribType and OpenTK.Graphics.ES20.ActiveAttribType +!duplicate-type-name! ActiveUniformType enum exists as both OpenTK.Graphics.ES30.ActiveUniformType and OpenTK.Graphics.ES20.ActiveUniformType +!duplicate-type-name! All enum exists as both OpenTK.Graphics.ES20.All and OpenTK.Graphics.ES11.All +!duplicate-type-name! All enum exists as both OpenTK.Graphics.ES30.All and OpenTK.Graphics.ES11.All +!duplicate-type-name! BeginMode enum exists as both OpenTK.Graphics.ES20.BeginMode and OpenTK.Graphics.ES11.BeginMode +!duplicate-type-name! BeginMode enum exists as both OpenTK.Graphics.ES30.BeginMode and OpenTK.Graphics.ES11.BeginMode +!duplicate-type-name! BlendEquationMode enum exists as both OpenTK.Graphics.ES30.BlendEquationMode and OpenTK.Graphics.ES20.BlendEquationMode +!duplicate-type-name! BlendEquationSeparate enum exists as both OpenTK.Graphics.ES30.BlendEquationSeparate and OpenTK.Graphics.ES20.BlendEquationSeparate +!duplicate-type-name! BlendSubtract enum exists as both OpenTK.Graphics.ES30.BlendSubtract and OpenTK.Graphics.ES20.BlendSubtract +!duplicate-type-name! BlendingFactorDest enum exists as both OpenTK.Graphics.ES20.BlendingFactorDest and OpenTK.Graphics.ES11.BlendingFactorDest +!duplicate-type-name! BlendingFactorDest enum exists as both OpenTK.Graphics.ES30.BlendingFactorDest and OpenTK.Graphics.ES11.BlendingFactorDest +!duplicate-type-name! BlendingFactorSrc enum exists as both OpenTK.Graphics.ES20.BlendingFactorSrc and OpenTK.Graphics.ES11.BlendingFactorSrc +!duplicate-type-name! BlendingFactorSrc enum exists as both OpenTK.Graphics.ES30.BlendingFactorSrc and OpenTK.Graphics.ES11.BlendingFactorSrc +!duplicate-type-name! Boolean enum exists as both OpenTK.Graphics.ES20.Boolean and OpenTK.Graphics.ES11.Boolean +!duplicate-type-name! Boolean enum exists as both OpenTK.Graphics.ES30.Boolean and OpenTK.Graphics.ES11.Boolean +!duplicate-type-name! BufferObjects enum exists as both OpenTK.Graphics.ES20.BufferObjects and OpenTK.Graphics.ES11.BufferObjects +!duplicate-type-name! BufferObjects enum exists as both OpenTK.Graphics.ES30.BufferObjects and OpenTK.Graphics.ES11.BufferObjects +!duplicate-type-name! BufferParameterName enum exists as both OpenTK.Graphics.ES30.BufferParameterName and OpenTK.Graphics.ES20.BufferParameterName +!duplicate-type-name! BufferTarget enum exists as both OpenTK.Graphics.ES30.BufferTarget and OpenTK.Graphics.ES20.BufferTarget +!duplicate-type-name! BufferUsage enum exists as both OpenTK.Graphics.ES30.BufferUsage and OpenTK.Graphics.ES20.BufferUsage +!duplicate-type-name! ClearBufferMask enum exists as both OpenTK.Graphics.ES20.ClearBufferMask and OpenTK.Graphics.ES11.ClearBufferMask +!duplicate-type-name! ClearBufferMask enum exists as both OpenTK.Graphics.ES30.ClearBufferMask and OpenTK.Graphics.ES11.ClearBufferMask +!duplicate-type-name! CullFaceMode enum exists as both OpenTK.Graphics.ES20.CullFaceMode and OpenTK.Graphics.ES11.CullFaceMode +!duplicate-type-name! CullFaceMode enum exists as both OpenTK.Graphics.ES30.CullFaceMode and OpenTK.Graphics.ES11.CullFaceMode +!duplicate-type-name! DataType enum exists as both OpenTK.Graphics.ES20.DataType and OpenTK.Graphics.ES11.DataType +!duplicate-type-name! DataType enum exists as both OpenTK.Graphics.ES30.DataType and OpenTK.Graphics.ES11.DataType +!duplicate-type-name! DepthFunction enum exists as both OpenTK.Graphics.ES30.DepthFunction and OpenTK.Graphics.ES20.DepthFunction +!duplicate-type-name! DrawElementsType enum exists as both OpenTK.Graphics.ES30.DrawElementsType and OpenTK.Graphics.ES20.DrawElementsType +!duplicate-type-name! EnableCap enum exists as both OpenTK.Graphics.ES20.EnableCap and OpenTK.Graphics.ES11.EnableCap +!duplicate-type-name! EnableCap enum exists as both OpenTK.Graphics.ES30.EnableCap and OpenTK.Graphics.ES11.EnableCap +!duplicate-type-name! ErrorCode enum exists as both OpenTK.Graphics.ES20.ErrorCode and OpenTK.Graphics.ES11.ErrorCode +!duplicate-type-name! ErrorCode enum exists as both OpenTK.Graphics.ES30.ErrorCode and OpenTK.Graphics.ES11.ErrorCode +!duplicate-type-name! FramebufferErrorCode enum exists as both OpenTK.Graphics.ES30.FramebufferErrorCode and OpenTK.Graphics.ES20.FramebufferErrorCode +!duplicate-type-name! FramebufferObject enum exists as both OpenTK.Graphics.ES30.FramebufferObject and OpenTK.Graphics.ES20.FramebufferObject +!duplicate-type-name! FramebufferParameterName enum exists as both OpenTK.Graphics.ES30.FramebufferParameterName and OpenTK.Graphics.ES20.FramebufferParameterName +!duplicate-type-name! FramebufferSlot enum exists as both OpenTK.Graphics.ES30.FramebufferSlot and OpenTK.Graphics.ES20.FramebufferSlot +!duplicate-type-name! FramebufferTarget enum exists as both OpenTK.Graphics.ES30.FramebufferTarget and OpenTK.Graphics.ES20.FramebufferTarget +!duplicate-type-name! FrontFaceDirection enum exists as both OpenTK.Graphics.ES20.FrontFaceDirection and OpenTK.Graphics.ES11.FrontFaceDirection +!duplicate-type-name! FrontFaceDirection enum exists as both OpenTK.Graphics.ES30.FrontFaceDirection and OpenTK.Graphics.ES11.FrontFaceDirection +!duplicate-type-name! GetPName enum exists as both OpenTK.Graphics.ES20.GetPName and OpenTK.Graphics.ES11.GetPName +!duplicate-type-name! GetPName enum exists as both OpenTK.Graphics.ES30.GetPName and OpenTK.Graphics.ES11.GetPName +!duplicate-type-name! GetTextureParameter enum exists as both OpenTK.Graphics.ES20.GetTextureParameter and OpenTK.Graphics.ES11.GetTextureParameter +!duplicate-type-name! GetTextureParameter enum exists as both OpenTK.Graphics.ES30.GetTextureParameter and OpenTK.Graphics.ES11.GetTextureParameter +!duplicate-type-name! HintMode enum exists as both OpenTK.Graphics.ES20.HintMode and OpenTK.Graphics.ES11.HintMode +!duplicate-type-name! HintMode enum exists as both OpenTK.Graphics.ES30.HintMode and OpenTK.Graphics.ES11.HintMode +!duplicate-type-name! HintTarget enum exists as both OpenTK.Graphics.ES20.HintTarget and OpenTK.Graphics.ES11.HintTarget +!duplicate-type-name! HintTarget enum exists as both OpenTK.Graphics.ES30.HintTarget and OpenTK.Graphics.ES11.HintTarget +!duplicate-type-name! OpenGlEsCoreVersions enum exists as both OpenTK.Graphics.ES20.OpenGlEsCoreVersions and OpenTK.Graphics.ES11.OpenGlEsCoreVersions +!duplicate-type-name! OpenGlEsCoreVersions enum exists as both OpenTK.Graphics.ES30.OpenGlEsCoreVersions and OpenTK.Graphics.ES11.OpenGlEsCoreVersions +!duplicate-type-name! OpenGlescoreVersions enum exists as both OpenTK.Graphics.ES20.OpenGlescoreVersions and OpenTK.Graphics.ES11.OpenGlescoreVersions +!duplicate-type-name! PixelFormat enum exists as both OpenTK.Graphics.ES20.PixelFormat and OpenTK.Graphics.ES11.PixelFormat +!duplicate-type-name! PixelFormat enum exists as both OpenTK.Graphics.ES30.PixelFormat and OpenTK.Graphics.ES11.PixelFormat +!duplicate-type-name! PixelInternalFormat enum exists as both OpenTK.Graphics.ES20.PixelInternalFormat and OpenTK.Graphics.ES11.PixelInternalFormat +!duplicate-type-name! PixelInternalFormat enum exists as both OpenTK.Graphics.ES30.PixelInternalFormat and OpenTK.Graphics.ES11.PixelInternalFormat +!duplicate-type-name! PixelStoreParameter enum exists as both OpenTK.Graphics.ES20.PixelStoreParameter and OpenTK.Graphics.ES11.PixelStoreParameter +!duplicate-type-name! PixelStoreParameter enum exists as both OpenTK.Graphics.ES30.PixelStoreParameter and OpenTK.Graphics.ES11.PixelStoreParameter +!duplicate-type-name! PixelType enum exists as both OpenTK.Graphics.ES20.PixelType and OpenTK.Graphics.ES11.PixelType +!duplicate-type-name! PixelType enum exists as both OpenTK.Graphics.ES30.PixelType and OpenTK.Graphics.ES11.PixelType +!duplicate-type-name! ProgramParameter enum exists as both OpenTK.Graphics.ES30.ProgramParameter and OpenTK.Graphics.ES20.ProgramParameter +!duplicate-type-name! ReadFormat enum exists as both OpenTK.Graphics.ES30.ReadFormat and OpenTK.Graphics.ES20.ReadFormat +!duplicate-type-name! RenderbufferInternalFormat enum exists as both OpenTK.Graphics.ES30.RenderbufferInternalFormat and OpenTK.Graphics.ES20.RenderbufferInternalFormat +!duplicate-type-name! RenderbufferParameterName enum exists as both OpenTK.Graphics.ES30.RenderbufferParameterName and OpenTK.Graphics.ES20.RenderbufferParameterName +!duplicate-type-name! RenderbufferTarget enum exists as both OpenTK.Graphics.ES30.RenderbufferTarget and OpenTK.Graphics.ES20.RenderbufferTarget +!duplicate-type-name! SeparateBlendFunctions enum exists as both OpenTK.Graphics.ES30.SeparateBlendFunctions and OpenTK.Graphics.ES20.SeparateBlendFunctions +!duplicate-type-name! ShaderBinary enum exists as both OpenTK.Graphics.ES30.ShaderBinary and OpenTK.Graphics.ES20.ShaderBinary +!duplicate-type-name! ShaderBinaryFormat enum exists as both OpenTK.Graphics.ES30.ShaderBinaryFormat and OpenTK.Graphics.ES20.ShaderBinaryFormat +!duplicate-type-name! ShaderParameter enum exists as both OpenTK.Graphics.ES30.ShaderParameter and OpenTK.Graphics.ES20.ShaderParameter +!duplicate-type-name! ShaderPrecision enum exists as both OpenTK.Graphics.ES30.ShaderPrecision and OpenTK.Graphics.ES20.ShaderPrecision +!duplicate-type-name! ShaderPrecisionSpecifiedTypes enum exists as both OpenTK.Graphics.ES30.ShaderPrecisionSpecifiedTypes and OpenTK.Graphics.ES20.ShaderPrecisionSpecifiedTypes +!duplicate-type-name! ShaderSource enum exists as both OpenTK.Graphics.ES30.ShaderSource and OpenTK.Graphics.ES20.ShaderSource +!duplicate-type-name! ShaderType enum exists as both OpenTK.Graphics.ES30.ShaderType and OpenTK.Graphics.ES20.ShaderType +!duplicate-type-name! Shaders enum exists as both OpenTK.Graphics.ES30.Shaders and OpenTK.Graphics.ES20.Shaders +!duplicate-type-name! StencilFunction enum exists as both OpenTK.Graphics.ES30.StencilFunction and OpenTK.Graphics.ES20.StencilFunction +!duplicate-type-name! StencilOp enum exists as both OpenTK.Graphics.ES20.StencilOp and OpenTK.Graphics.ES11.StencilOp +!duplicate-type-name! StencilOp enum exists as both OpenTK.Graphics.ES30.StencilOp and OpenTK.Graphics.ES11.StencilOp +!duplicate-type-name! StringName enum exists as both OpenTK.Graphics.ES20.StringName and OpenTK.Graphics.ES11.StringName +!duplicate-type-name! StringName enum exists as both OpenTK.Graphics.ES30.StringName and OpenTK.Graphics.ES11.StringName +!duplicate-type-name! TextureMagFilter enum exists as both OpenTK.Graphics.ES20.TextureMagFilter and OpenTK.Graphics.ES11.TextureMagFilter +!duplicate-type-name! TextureMagFilter enum exists as both OpenTK.Graphics.ES30.TextureMagFilter and OpenTK.Graphics.ES11.TextureMagFilter +!duplicate-type-name! TextureMinFilter enum exists as both OpenTK.Graphics.ES20.TextureMinFilter and OpenTK.Graphics.ES11.TextureMinFilter +!duplicate-type-name! TextureMinFilter enum exists as both OpenTK.Graphics.ES30.TextureMinFilter and OpenTK.Graphics.ES11.TextureMinFilter +!duplicate-type-name! TextureParameterName enum exists as both OpenTK.Graphics.ES20.TextureParameterName and OpenTK.Graphics.ES11.TextureParameterName +!duplicate-type-name! TextureParameterName enum exists as both OpenTK.Graphics.ES30.TextureParameterName and OpenTK.Graphics.ES11.TextureParameterName +!duplicate-type-name! TextureTarget enum exists as both OpenTK.Graphics.ES30.TextureTarget and OpenTK.Graphics.ES20.TextureTarget +!duplicate-type-name! TextureUnit enum exists as both OpenTK.Graphics.ES20.TextureUnit and OpenTK.Graphics.ES11.TextureUnit +!duplicate-type-name! TextureUnit enum exists as both OpenTK.Graphics.ES30.TextureUnit and OpenTK.Graphics.ES11.TextureUnit +!duplicate-type-name! TextureWrapMode enum exists as both OpenTK.Graphics.ES20.TextureWrapMode and OpenTK.Graphics.ES11.TextureWrapMode +!duplicate-type-name! TextureWrapMode enum exists as both OpenTK.Graphics.ES30.TextureWrapMode and OpenTK.Graphics.ES11.TextureWrapMode +!duplicate-type-name! UniformTypes enum exists as both OpenTK.Graphics.ES30.UniformTypes and OpenTK.Graphics.ES20.UniformTypes +!duplicate-type-name! Unknown enum exists as both OpenTK.Graphics.ES20.Unknown and OpenTK.Graphics.ES11.Unknown +!duplicate-type-name! Unknown enum exists as both OpenTK.Graphics.ES30.Unknown and OpenTK.Graphics.ES11.Unknown +!duplicate-type-name! VertexArrays enum exists as both OpenTK.Graphics.ES30.VertexArrays and OpenTK.Graphics.ES20.VertexArrays +!duplicate-type-name! VertexAttribParameter enum exists as both OpenTK.Graphics.ES30.VertexAttribParameter and OpenTK.Graphics.ES20.VertexAttribParameter +!duplicate-type-name! VertexAttribPointerParameter enum exists as both OpenTK.Graphics.ES30.VertexAttribPointerParameter and OpenTK.Graphics.ES20.VertexAttribPointerParameter +!duplicate-type-name! VertexAttribPointerType enum exists as both OpenTK.Graphics.ES30.VertexAttribPointerType and OpenTK.Graphics.ES20.VertexAttribPointerType + # Non-Apple diff --git a/tests/xtro-sharpie/tvos.pending b/tests/xtro-sharpie/tvos.pending index 33368970b73..bf176c3b9af 100644 --- a/tests/xtro-sharpie/tvos.pending +++ b/tests/xtro-sharpie/tvos.pending @@ -14,10 +14,6 @@ !missing-selector! AVPlayerItem::setExternalSubtitleOptionLanguages: not bound !missing-selector! AVPlayerItem::setSelectedExternalSubtitleOptionLanguage: not bound -## this was tvos 10.2 in Xcode 8.3 and changed to iOS-only in Xcode9 betas -## it's still exposed by AVContentKeySessionDelegate which is available in tvos 10.2 -!unknown-type! AVPersistableContentKeyRequest bound - # CloudKit @@ -54,9 +50,6 @@ ## new Apple abstract member (breaking change) fixed in XAMCORE_4_0 !incorrect-protocol-member! MTLRenderCommandEncoder::setDepthClipMode: is REQUIRED and should be abstract -## only on macOS (but removing would be a vreaking change) -!unknown-native-enum! MTLSamplerBorderColor bound - # UserNotifications @@ -175,11 +168,3 @@ ## Marked as not in tvOS in Xcode 8.2 beta 1 but it's a breaking change and it's fixed only in XAMCORE_4_0 !unknown-native-enum! UICloudSharingPermissionOptions bound - -## Intent not yet available on tvOS -!missing-protocol-member! UIApplicationDelegate::application:handleIntent:completionHandler: not found - -## CoreNFC has just enums available in Xcode 9 Beta 1 -!missing-enum! NFCReaderError not bound -!missing-enum! NFCTagType not bound -!missing-enum! NFCTypeNameFormat not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/watchos.ignore b/tests/xtro-sharpie/watchos.ignore index ddb1b25231b..5bf9cd3ee4f 100644 --- a/tests/xtro-sharpie/watchos.ignore +++ b/tests/xtro-sharpie/watchos.ignore @@ -8,18 +8,6 @@ ## types/members marked as deprecated in watchOS 2.0 (even if the framework was not available before 3.0) AVAudioPlayerDelegate::audioPlayerEndInterruption:withOptions: -## it's not exposed in the API offered by watchOS -!missing-enum! AVAudioSessionRecordPermission not bound - - -# CoreBluetooth - -## present in headers but already deprecated (we're not exposing them) -!missing-enum! CBCentralManagerState not bound -!missing-enum! CBPeripheralManagerState not bound -!missing-selector! CBPeripheral::RSSI not bound -!missing-selector! +CBUUID::UUIDWithCFUUID: not bound - # Foundation @@ -122,12 +110,6 @@ AVAudioPlayerDelegate::audioPlayerEndInterruption:withOptions: !missing-selector! GKVoiceChatService::setRemoteParticipantVolume: not bound !missing-selector! GKVoiceChatService::startVoiceChatWithParticipantID:error: not bound !missing-selector! GKVoiceChatService::stopVoiceChatWithParticipantID: not bound -!missing-enum! GKSessionError not bound - -# HealthKit - -## type was marked as available in 3.0 - but it's now iOS 11 only (even if members are marked with 10.0) -!unknown-type! HKCDADocument bound #PassKit @@ -137,20 +119,6 @@ AVAudioPlayerDelegate::audioPlayerEndInterruption:withOptions: !missing-enum! PKPaymentButtonType not bound -# SpriteKit - -## AVPlayer is not available on watchOS -!missing-selector! +SKVideoNode::videoNodeWithAVPlayer: not bound -!missing-selector! SKVideoNode::initWithAVPlayer: not bound - -## Those API are already deprecated - so we're not adding them -## from a managed point-of-view that's invisible (same .ctor) -!missing-selector! SKVideoNode::initWithVideoFileNamed: not bound -!missing-selector! SKVideoNode::initWithVideoURL: not bound -!missing-selector! +SKVideoNode::videoNodeWithVideoFileNamed: not bound -!missing-selector! +SKVideoNode::videoNodeWithVideoURL: not bound - - # UIKit ## Implemented in managed code @@ -167,15 +135,6 @@ AVAudioPlayerDelegate::audioPlayerEndInterruption:withOptions: !missing-selector! UIImageDeprecated::stretchableImageWithLeftCapWidth:topCapHeight: not bound !missing-selector! UIImageDeprecated::topCapHeight not bound -## lack of availabilty macros on NSItemProvder.PreferredPresentationStyle - intro says they are not available -!missing-selector! NSItemProvider::preferredPresentationStyle not bound -!missing-selector! NSItemProvider::setPreferredPresentationStyle: not bound -## and that also means the (enum/returned) type is unused -!missing-enum! UIPreferredPresentationStyle not bound - -## UITraitCollection is not available on watchOS -!missing-selector! +UIColor::colorNamed:inBundle:compatibleWithTraitCollection: not bound - # WatchConnectivity diff --git a/tests/xtro-sharpie/watchos.pending b/tests/xtro-sharpie/watchos.pending index 33a075b960a..73885ae38ef 100644 --- a/tests/xtro-sharpie/watchos.pending +++ b/tests/xtro-sharpie/watchos.pending @@ -69,12 +69,6 @@ !missing-protocol-conformance! CMSensorDataList should conform to NSFastEnumeration -# Foundation - -## type was not marked as unavailable before Xcode9 -!unknown-type! NSUbiquitousKeyValueStore bound - - # HealthKit ## deprecated API (removed in same version it was added) @@ -117,21 +111,6 @@ ## Waiting on a radar https://trello.com/c/h8xBlKTt !missing-selector! +INPreferences::requestSiriAuthorization: not bound -## Bound with no availability information, removing them is a breaking change -## but I am not sure if they should be in WatchOS since they are from last year -## and seems that intro did not complain, also there are others INCar* that are -## explicitly available in WatchOS -!unknown-type! INCarAirCirculationModeResolutionResult bound -!unknown-type! INCarAudioSourceResolutionResult bound -!unknown-type! INCarDefrosterResolutionResult bound -!unknown-type! INCarSeatResolutionResult bound -!unknown-type! INRadioTypeResolutionResult bound -!unknown-type! INRelativeReferenceResolutionResult bound -!unknown-type! INRelativeSettingResolutionResult bound - -## Added and removed in watchOS 4 -!missing-selector! +INNotebookItemTypeResolutionResult::disambiguationWithValuesToDisambiguate: not bound - #PassKit ## No availability macro is provided for PKLabeledValue on watchOS / radar: https://trello.com/c/MvaHEZlc diff --git a/tests/xtro-sharpie/xtro-plugin.csproj b/tests/xtro-sharpie/xtro-plugin.csproj new file mode 100644 index 00000000000..013b7e03512 --- /dev/null +++ b/tests/xtro-sharpie/xtro-plugin.csproj @@ -0,0 +1,51 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {6CBA2C3C-2EC7-42A0-8AA7-85FC62252A18} + Library + xtroplugin + xtro-plugin + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + \Library\Frameworks\ObjectiveSharpie.framework\Versions\Current\Sharpie.Core.dll + + + ..\..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.dll + + + + + + + + + {D890A042-93C2-4B4B-ABF8-7ECBCBF059D8} + xtro-sharpie + + + \ No newline at end of file diff --git a/tests/xtro-sharpie/xtro-sharpie.csproj b/tests/xtro-sharpie/xtro-sharpie.csproj index e5846bbeafa..4d534ee4f76 100644 --- a/tests/xtro-sharpie/xtro-sharpie.csproj +++ b/tests/xtro-sharpie/xtro-sharpie.csproj @@ -21,7 +21,6 @@ 4 false ../../iphoneos9.2-arm64.pch /Library/Frameworks/Xamarin.iOS.framework/Versions/Current//lib/64bits/Xamarin.iOS.dll - x64 full @@ -31,26 +30,6 @@ 4 true - - Project - watchos4.0-armv7.pch ../../_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/32bits/Xamarin.WatchOS.dll - . - - - Project - iphoneos11.0-arm64.pch ../../_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/64bits/Xamarin.iOS.dll ../../_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/OpenTK-1.0.dll - . - - - Project - appletvos11.0-arm64.pch ../../_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.TVOS/Xamarin.TVOS.dll ../../_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.TVOS/OpenTK-1.0.dll - . - - - Project - macosx10.13-x86_64.pch ../../_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/x86_64/mobile/Xamarin.Mac.dll - . - @@ -71,7 +50,6 @@ - diff --git a/tests/xtro-sharpie/xtro-sharpie.sln b/tests/xtro-sharpie/xtro-sharpie.sln index 10710c66b7e..9f73655d58c 100644 --- a/tests/xtro-sharpie/xtro-sharpie.sln +++ b/tests/xtro-sharpie/xtro-sharpie.sln @@ -3,12 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xtro-sharpie", "xtro-sharpie.csproj", "{D890A042-93C2-4B4B-ABF8-7ECBCBF059D8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xtro-plugin", "xtro-plugin.csproj", "{6CBA2C3C-2EC7-42A0-8AA7-85FC62252A18}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6CBA2C3C-2EC7-42A0-8AA7-85FC62252A18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CBA2C3C-2EC7-42A0-8AA7-85FC62252A18}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CBA2C3C-2EC7-42A0-8AA7-85FC62252A18}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CBA2C3C-2EC7-42A0-8AA7-85FC62252A18}.Release|Any CPU.Build.0 = Release|Any CPU {D890A042-93C2-4B4B-ABF8-7ECBCBF059D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D890A042-93C2-4B4B-ABF8-7ECBCBF059D8}.Debug|Any CPU.Build.0 = Debug|Any CPU {D890A042-93C2-4B4B-ABF8-7ECBCBF059D8}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/tools/common/Assembly.cs b/tools/common/Assembly.cs index 7991eba472c..bf952546a5f 100644 --- a/tools/common/Assembly.cs +++ b/tools/common/Assembly.cs @@ -376,8 +376,6 @@ public void ComputeLinkerFlags () case "Metal": case "MetalKit": case "MetalPerformanceShaders": - case "CoreNFC": - case "DeviceCheck": // some frameworks do not exists on simulators and will result in linker errors if we include them #if MTOUCH if (!App.IsSimulatorBuild) { diff --git a/tools/common/Frameworks.cs b/tools/common/Frameworks.cs index a4c2cfc76c6..c69d7ecaa21 100644 --- a/tools/common/Frameworks.cs +++ b/tools/common/Frameworks.cs @@ -136,12 +136,8 @@ public static Frameworks MacFrameworks { { "ModelIO", 10, 11 }, { "Intents", 10, 12 }, - { "IOSurface", "IOSurface", 10, 12 }, { "SafariServices", "SafariServices", 10, 12 }, { "MediaPlayer", "MediaPlayer", 10, 12, 1 }, - - { "CoreML", "CoreML", 10, 13 }, - { "Vision", "Vision", 10, 13 }, }; } return mac_frameworks; @@ -245,17 +241,6 @@ public static Frameworks GetiOSFrameworks (Application app) { "UserNotificationsUI", "UserNotificationsUI", 10 }, { "Intents", "Intents", 10 }, { "IntentsUI", "IntentsUI", 10 }, - - { "ARKit", "ARKit", 11 }, - { "CoreNFC", "CoreNFC", 11 }, - { "DeviceCheck", "DeviceCheck", 11 }, - { "IdentityLookup", "IdentityLookup", 11 }, - { "IOSurface", "IOSurface", 11 }, - { "CoreML", "CoreML", 11 }, - { "Vision", "Vision", 11 }, - { "FileProvider", "FileProvider", 11 }, - { "FileProviderUI", "FileProviderUI", 11 }, - { "PdfKit", "PDFKit", 11 }, }; } return ios_frameworks; @@ -296,8 +281,6 @@ public static Frameworks GetwatchOSFrameworks (Application app) { "SpriteKit", "SpriteKit", 3 }, { "UserNotifications", "UserNotifications", 3 }, { "Intents", "Intents", 3,2 }, - - { "CoreML", "CoreML", 4 }, }; } return watch_frameworks; @@ -361,11 +344,6 @@ public static Frameworks TVOSFrameworks { { "UserNotifications", "UserNotifications", 10 }, { "VideoSubscriberAccount", "VideoSubscriberAccount", 10 }, { "VideoToolbox", "VideoToolbox", 10,2 }, - - { "DeviceCheck", "DeviceCheck", 11 }, - { "CoreML", "CoreML", 11 }, - { "IOSurface", "IOSurface", 11 }, - { "Vision", "Vision", 11 }, }; } return tvos_frameworks; diff --git a/tools/common/MachO.cs b/tools/common/MachO.cs index 3f6e9316a90..3ecbd0d7f0e 100644 --- a/tools/common/MachO.cs +++ b/tools/common/MachO.cs @@ -3,11 +3,7 @@ using System.IO; using System.Net; -#if MLAUNCH -using Xamarin.Launcher; -#else using Xamarin.Bundler; -#endif namespace Xamarin { diff --git a/tools/common/StaticRegistrar.cs b/tools/common/StaticRegistrar.cs index c39fd7ffec9..ef828404ee1 100644 --- a/tools/common/StaticRegistrar.cs +++ b/tools/common/StaticRegistrar.cs @@ -1756,13 +1756,8 @@ void CheckNamespace (string ns, List exceptions) case "CoreAnimation": header.WriteLine ("#import "); #if MTOUCH - switch (App.Platform) { - case Xamarin.Utils.ApplePlatform.iOS: - case Xamarin.Utils.ApplePlatform.TVOS: - if (App.SdkVersion.Major > 7 && App.SdkVersion.Major < 11) - header.WriteLine ("#import "); - break; - } + if (App.SdkVersion.Major > 7) + header.WriteLine ("#import "); #endif return; case "CoreMidi": @@ -1824,26 +1819,12 @@ void CheckNamespace (string ns, List exceptions) header.WriteLine ("#import "); namespaces.Add ("UIKit"); return; - case "CoreNFC": - case "DeviceCheck": -#if !MONOMAC - if (IsSimulator) - return; // No headers provided for simulator, which makes sense since there is no NFC on it. -#endif - goto default; case "QTKit": #if MONOMAC if (App.SdkVersion >= MacOSTenTwelveVersion) return; // 10.12 removed the header files for QTKit #endif goto default; - case "IOSurface": // There is no IOSurface.h -#if !MONOMAC - if (IsSimulator) - return; // Not available in the simulator (the header is there, but broken). -#endif - h = ""; - break; default: h = string.Format ("<{0}/{0}.h>", ns); break; diff --git a/tools/common/Target.cs b/tools/common/Target.cs index 39cc4d00f44..fb56de22e51 100644 --- a/tools/common/Target.cs +++ b/tools/common/Target.cs @@ -150,8 +150,6 @@ public void GatherFrameworks () case "Metal": case "MetalKit": case "MetalPerformanceShaders": - case "CoreNFC": - case "DeviceCheck": // some frameworks do not exists on simulators and will result in linker errors if we include them if (App.IsSimulatorBuild) continue; diff --git a/tools/linker/ObjCExtensions.cs b/tools/linker/ObjCExtensions.cs index 1fb5bd23400..05ca8540c5f 100644 --- a/tools/linker/ObjCExtensions.cs +++ b/tools/linker/ObjCExtensions.cs @@ -57,10 +57,6 @@ internal static void Initialize () ModelIO = profile.GetNamespace ("ModelIO"); Intents = profile.GetNamespace ("Intents"); Photos = profile.GetNamespace ("Photos"); - CoreML = profile.GetNamespace ("CoreML"); - Vision = profile.GetNamespace ("Vision"); - IOSurface = profile.GetNamespace ("IOSurface"); - PdfKit = profile.GetNamespace ("PdfKit"); #if MONOMAC IOBluetooth = profile.GetNamespace ("IOBluetooth"); IOBluetoothUI = profile.GetNamespace ("IOBluetoothUI"); @@ -69,6 +65,7 @@ internal static void Initialize () AppKit = profile.GetNamespace ("AppKit"); CoreWlan = profile.GetNamespace ("CoreWlan"); ImageKit = profile.GetNamespace ("ImageKit"); + PdfKit = profile.GetNamespace ("PdfKit"); QTKit = profile.GetNamespace ("QTKit"); QuartzComposer = profile.GetNamespace ("QuartzComposer"); SceneKit = profile.GetNamespace ("SceneKit"); @@ -76,7 +73,6 @@ internal static void Initialize () WebKit = profile.GetNamespace ("WebKit"); MediaPlayer = profile.GetNamespace ("MediaPlayer"); PrintCore = profile.GetNamespace ("PrintCore"); - ExternalAccessory = profile.GetNamespace ("ExternalAccessory"); #else Registrar = profile.GetNamespace ("Registrar"); UIKit = profile.GetNamespace ("UIKit"); @@ -138,14 +134,6 @@ internal static void Initialize () public static string Photos { get; private set; } - public static string CoreML { get; private set; } - - public static string Vision { get; private set; } - - public static string IOSurface { get; private set; } - - public static string PdfKit { get; private set; } - #if MONOMAC public static string IOBluetooth { get; private set; } public static string IOBluetoothUI { get; private set; } @@ -158,6 +146,8 @@ internal static void Initialize () public static string ImageKit { get; private set; } + public static string PdfKit { get; private set; } + public static string QTKit { get; private set; } public static string QuartzComposer { get; private set; } @@ -169,7 +159,6 @@ internal static void Initialize () public static string WebKit { get; private set; } public static string MediaPlayer { get; private set; } public static string PrintCore { get; private set; } - public static string ExternalAccessory { get; private set; } #else public static string Registrar { get; private set; } diff --git a/tools/mmp/Makefile b/tools/mmp/Makefile index ffe6ac80935..8f93a71bc1a 100644 --- a/tools/mmp/Makefile +++ b/tools/mmp/Makefile @@ -202,10 +202,10 @@ Xamarin.Mac.registrar.full.x86_64.m: $(TOP)/src/build/mac/full-64/Xamarin.Mac. $(Q) touch Xamarin.Mac.registrar.full.x86_64.m Xamarin.Mac.registrar.full.x86_64.h Xamarin.Mac.registrar.%.i386.a: Xamarin.Mac.registrar.%.i386.m - $(Q_CC) xcrun -sdk macosx clang -DDEBUG -g -gdwarf-2 -x objective-c++ -o $@ -c -arch i386 $< -Wall -Wno-unguarded-availability-new -I$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/include -mmacosx-version-min=$(MIN_OSX_SDK_VERSION) + $(Q_CC) xcrun -sdk macosx clang -DDEBUG -g -gdwarf-2 -x objective-c++ -o $@ -c -arch i386 $< -Wall -I$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/include -mmacosx-version-min=$(MIN_OSX_SDK_VERSION) Xamarin.Mac.registrar.%.x86_64.a: Xamarin.Mac.registrar.%.x86_64.m - $(Q_CC) xcrun -sdk macosx clang -DDEBUG -g -gdwarf-2 -x objective-c++ -o $@ -c -arch x86_64 $< -Wall -Wno-unguarded-availability-new -I$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/include -mmacosx-version-min=$(MIN_OSX_SDK_VERSION) -fobjc-runtime=macosx + $(Q_CC) xcrun -sdk macosx clang -DDEBUG -g -gdwarf-2 -x objective-c++ -o $@ -c -arch x86_64 $< -Wall -I$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/include -mmacosx-version-min=$(MIN_OSX_SDK_VERSION) -fobjc-runtime=macosx Xamarin.Mac.registrar.%.a: Xamarin.Mac.registrar.%.i386.a Xamarin.Mac.registrar.%.x86_64.a $(Q_LIPO) $(DEVICE_BIN_PATH)/lipo -create -output $@ $^ diff --git a/tools/mmp/driver.cs b/tools/mmp/driver.cs index 98e4f58d75a..fdf5bcfe9ba 100644 --- a/tools/mmp/driver.cs +++ b/tools/mmp/driver.cs @@ -693,11 +693,10 @@ static void Pack (IList unprocessed) { if (!App.EnableDebug) registrar = RegistrarMode.Static; - else if (IsUnified && App.LinkMode == LinkMode.None && embed_mono && App.IsDefaultMarshalManagedExceptionMode && File.Exists (PartialStaticLibrary)) + else if (IsUnified && App.LinkMode == LinkMode.None && embed_mono && App.IsDefaultMarshalManagedExceptionMode) registrar = RegistrarMode.PartialStatic; else registrar = RegistrarMode.Dynamic; - Log (1, $"Defaulting registrar to '{registrar}'"); } if (no_executable) { @@ -1058,12 +1057,6 @@ public static string MonoMacBinDirectory { } } - static string PartialStaticLibrary { - get { - return Path.Combine (GetXamMacPrefix (), "lib", string.Format ("mmp/Xamarin.Mac.registrar.{0}.a", IsUnifiedMobile ? "mobile" : "full")); - } - } - public static bool IsUptodate (string source, string target) { return Application.IsUptodate (source, target); @@ -1237,10 +1230,6 @@ static int Compile () args.Append ("-fobjc-runtime=macosx "); if (!embed_mono) args.Append ("-DDYNAMIC_MONO_RUNTIME "); - - if (XcodeVersion >= new Version (9, 0)) - args.Append ("-Wno-unguarded-availability-new "); - bool appendedObjc = false; foreach (var assembly in BuildTarget.Assemblies) { if (assembly.LinkWith != null) { @@ -1342,8 +1331,8 @@ static int Compile () } if (registrar == RegistrarMode.PartialStatic) { - args.Append (PartialStaticLibrary); - args.Append (" -framework Quartz "); + args.Append (Path.Combine (GetXamMacPrefix (), "lib", string.Format ("mmp/Xamarin.Mac.registrar.{0}.a ", IsUnifiedMobile ? "mobile" : "full"))); + args.Append ("-framework Quartz "); } args.Append ("-liconv -x objective-c++ "); diff --git a/tools/mmp/linker/MonoMac.Tuner/MonoMacNamespaces.cs b/tools/mmp/linker/MonoMac.Tuner/MonoMacNamespaces.cs index 80a88f7f410..9a87c908e13 100644 --- a/tools/mmp/linker/MonoMac.Tuner/MonoMacNamespaces.cs +++ b/tools/mmp/linker/MonoMac.Tuner/MonoMacNamespaces.cs @@ -68,12 +68,7 @@ public class MonoMacNamespaces : IStep { { Constants.MediaPlayerLibrary, Namespaces.MediaPlayer }, { Constants.IntentsLibrary, Namespaces.Intents }, { Constants.PhotosLibrary, Namespaces.Photos }, - { Constants.PrintCoreLibrary, Namespaces.PrintCore }, - { Constants.CoreMLLibrary, Namespaces.CoreML }, - { Constants.VisionLibrary, Namespaces.Vision }, - { Constants.IOSurfaceLibrary, Namespaces.IOSurface }, - { Constants.ExternalAccessoryLibrary, Namespaces.ExternalAccessory }, - }; + { Constants.PrintCoreLibrary, Namespaces.PrintCore} }; public void Process (LinkContext context) { diff --git a/tools/mtouch/Application.cs b/tools/mtouch/Application.cs index ec1bcd0d973..c7b4b9f4ee3 100644 --- a/tools/mtouch/Application.cs +++ b/tools/mtouch/Application.cs @@ -595,11 +595,7 @@ public void SetDefaultAbi () switch (Platform) { case ApplePlatform.iOS: if (abis.Count == 0) { - if (DeploymentTarget == null || DeploymentTarget.Major >= 11) { - abis.Add (IsDeviceBuild ? Abi.ARM64 : Abi.x86_64); - } else { - abis.Add (IsDeviceBuild ? Abi.ARMv7 : Abi.i386); - } + abis.Add (IsDeviceBuild ? Abi.ARMv7 : Abi.i386); } break; case ApplePlatform.WatchOS: @@ -1344,13 +1340,6 @@ void Initialize () RootAssemblies.Add (Path.Combine (Driver.GetPlatformFrameworkDirectory (this), Driver.GetProductAssembly (this) + ".dll")); } - if (Platform == ApplePlatform.iOS) { - if (DeploymentTarget.Major >= 11 && Is32Build) { - var invalidArches = abis.Where ((v) => (v & Abi.Arch32Mask) != 0); - throw ErrorHelper.CreateError (116, $"Invalid architecture: {invalidArches.First ()}. 32-bit architectures are not supported when deployment target is 11 or later."); - } - } - InitializeCommon (); Driver.Watch ("Resolve References", 1); @@ -2007,7 +1996,7 @@ public void BuildMSymDirectory () GenerateMSymManifest (target, target_directory); var msymdir = Path.Combine (target.BuildDirectory, "Msym"); if (!Directory.Exists (msymdir)) { - ErrorHelper.Warning (118, $"The directory {msymdir} containing the mono symbols could not be found."); + ErrorHelper.Warning (116, $"The directory {msymdir} containing the mono symbols could not be found."); continue; } // copy aot data must be done BEFORE we do copy the msym one diff --git a/tools/mtouch/BuildTasks.mtouch.cs b/tools/mtouch/BuildTasks.mtouch.cs index 2b95c4d54e2..2b6578d7802 100644 --- a/tools/mtouch/BuildTasks.mtouch.cs +++ b/tools/mtouch/BuildTasks.mtouch.cs @@ -336,7 +336,7 @@ protected override async Task ExecuteAsync () // /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore instead of // /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore // more details in https://bugzilla.xamarin.com/show_bug.cgi?id=31036 - if (CompilerFlags.WeakFrameworks.Count > 0) + if (Target.WeakFrameworks.Count > 0) Target.AdjustDylibs (); Driver.Watch ("Native Link", 1); } diff --git a/tools/mtouch/Makefile b/tools/mtouch/Makefile index 5f7565d54b2..3236aefd368 100644 --- a/tools/mtouch/Makefile +++ b/tools/mtouch/Makefile @@ -272,11 +272,7 @@ SIMLAUNCHER_FRAMEWORKS = \ -weak_framework UserNotifications \ -weak_framework UserNotificationsUI \ -weak_framework Intents \ - -weak_framework IntentsUI \ - \ - -weak_framework ARKit \ - -weak_framework FileProvider \ - -weak_framework FileProviderUI + -weak_framework IntentsUI # note: there _was_ no CoreAudioKit.framework or Metal.framework for the simulator (before recent iOS9 betas) # note 2: there's no GameKit, in iOS 9 (beta 3 at least), you're supposed to reference GameCenter instead (looks fixed in beta 4) @@ -364,16 +360,16 @@ bin/Makefile/Mono.Cecil.Mdb.dll: $(MONO_CECIL_MDB_DLL) | bin/Makefile $(Q_LIPO) $(DEVICE_BIN_PATH)/lipo -create -output $@ $^ %.registrar.ios.i386.a: %.registrar.ios.i386.m %.registrar.ios.i386.h - $(Q_CC) $(IOS_CC) -DDEBUG -g -gdwarf-2 $(SIMULATOR86_CFLAGS) -x objective-c++ -o $@ -c $< -Wall -Wno-unguarded-availability-new -I$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/SDKs/MonoTouch.iphonesimulator.sdk/usr/include + $(Q_CC) $(IOS_CC) -DDEBUG -g -gdwarf-2 $(SIMULATOR86_CFLAGS) -x objective-c++ -o $@ -c $< -Wall -I$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/SDKs/MonoTouch.iphonesimulator.sdk/usr/include %.registrar.ios.x86_64.a: %.registrar.ios.x86_64.m %.registrar.ios.x86_64.h - $(Q_CC) $(IOS_CC) -DDEBUG -g -gdwarf-2 $(SIMULATOR64_CFLAGS) -x objective-c++ -o $@ -c $< -Wall -Wno-unguarded-availability-new -I$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/SDKs/MonoTouch.iphonesimulator.sdk/usr/include + $(Q_CC) $(IOS_CC) -DDEBUG -g -gdwarf-2 $(SIMULATOR64_CFLAGS) -x objective-c++ -o $@ -c $< -Wall -I$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/SDKs/MonoTouch.iphonesimulator.sdk/usr/include %.registrar.watchos.a: %.registrar.watchos.m %.registrar.watchos.h - $(Q_CC) $(IOS_CC) -DDEBUG -g -gdwarf-2 $(SIMULATORWATCH_CFLAGS) -x objective-c++ -o $@ -c $< -Wall -Wno-unguarded-availability-new -I$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/include + $(Q_CC) $(IOS_CC) -DDEBUG -g -gdwarf-2 $(SIMULATORWATCH_CFLAGS) -x objective-c++ -o $@ -c $< -Wall -I$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/usr/include %.registrar.tvos.a: %.registrar.tvos.m %.registrar.tvos.h - $(Q_CC) $(IOS_CC) -DDEBUG -g -gdwarf-2 $(SIMULATORTV_CFLAGS) -x objective-c++ -o $@ -c $< -Wall -Wno-unguarded-availability-new -I$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/include + $(Q_CC) $(IOS_CC) -DDEBUG -g -gdwarf-2 $(SIMULATORTV_CFLAGS) -x objective-c++ -o $@ -c $< -Wall -I$(IOS_DESTDIR)$(XAMARIN_TVSIMULATOR_SDK)/usr/include TARGETS = \ $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/bin/mtouch \ diff --git a/tools/mtouch/Target.cs b/tools/mtouch/Target.cs index 003e9e25a1c..ef2e78b0f20 100644 --- a/tools/mtouch/Target.cs +++ b/tools/mtouch/Target.cs @@ -1208,10 +1208,6 @@ public void Compile () // This is because iOS has a forward declaration of NSPortMessage, but no actual declaration. // They still use NSPortMessage in other API though, so it can't just be removed from our bindings. registrar_task.CompilerFlags.AddOtherFlag ("-Wno-receiver-forward-class"); - - if (Driver.XcodeVersion >= new Version (9, 0)) - registrar_task.CompilerFlags.AddOtherFlag ("-Wno-unguarded-availability-new"); - LinkWithTaskOutput (registrar_task); } @@ -1238,11 +1234,8 @@ public void Compile () throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.", App.Platform); } - var lib = Path.Combine (Driver.GetProductSdkDirectory (App), "usr", "lib", library); - if (File.Exists (lib)) { - registration_methods.Add (method); - LinkWithStaticLibrary (lib); - } + registration_methods.Add (method); + LinkWithStaticLibrary (Path.Combine (Driver.GetProductSdkDirectory (App), "usr", "lib", library)); } // The main method.