[metalkit] Add 'MTKTextureLoader' missing bindings (fix xtro) (#3561)

This commit is contained in:
Vincent Dondain 2018-02-21 17:45:05 -05:00 коммит произвёл GitHub
Родитель 3f16223deb
Коммит afd33cb33a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 51 добавлений и 3 удалений

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

@ -9,8 +9,17 @@ using ObjCRuntime;
using OpenTK; using OpenTK;
#if MONOMAC
using AppKit;
#endif
namespace MetalKit { namespace MetalKit {
#if !MONOMAC
// stubs to ease compilation using [NoiOS], [NoTV]
interface NSDisplayGamut {}
#endif
[iOS (9,0)][Mac (10,11, onlyOn64 : true)] [iOS (9,0)][Mac (10,11, onlyOn64 : true)]
[Static] [Static]
interface MTKModel { interface MTKModel {
@ -288,6 +297,20 @@ namespace MetalKit {
[Async] [Async]
void FromName (string name, nfloat scaleFactor, [NullAllowed] NSBundle bundle, [NullAllowed] MTKTextureLoaderOptions options, MTKTextureLoaderCallback completionHandler); void FromName (string name, nfloat scaleFactor, [NullAllowed] NSBundle bundle, [NullAllowed] MTKTextureLoaderOptions options, MTKTextureLoaderCallback completionHandler);
[NoiOS]
[NoTV]
[Mac (10,12, onlyOn64 : true)]
[Export ("newTextureWithName:scaleFactor:displayGamut:bundle:options:completionHandler:")]
[Async]
void FromName (string name, nfloat scaleFactor, NSDisplayGamut displayGamut, [NullAllowed] NSBundle bundle, [NullAllowed] NSDictionary options, MTKTextureLoaderCallback completionHandler);
[NoiOS]
[NoTV]
[Mac (10,12, onlyOn64 : true)]
[Wrap ("FromName (name, scaleFactor, displayGamut, bundle, options == null ? null : options.Dictionary, completionHandler)")]
[Async]
void FromName (string name, nfloat scaleFactor, NSDisplayGamut displayGamut, [NullAllowed] NSBundle bundle, [NullAllowed] MTKTextureLoaderOptions options, MTKTextureLoaderCallback completionHandler);
[iOS (10,0)][Mac (10,12, onlyOn64 : true)] [iOS (10,0)][Mac (10,12, onlyOn64 : true)]
[Export ("newTexturesWithNames:scaleFactor:bundle:options:completionHandler:")] [Export ("newTexturesWithNames:scaleFactor:bundle:options:completionHandler:")]
[Async] [Async]
@ -298,6 +321,20 @@ namespace MetalKit {
[Async] [Async]
void FromNames (string[] names, nfloat scaleFactor, [NullAllowed] NSBundle bundle, [NullAllowed] MTKTextureLoaderOptions options, MTKTextureLoaderArrayCallback completionHandler); void FromNames (string[] names, nfloat scaleFactor, [NullAllowed] NSBundle bundle, [NullAllowed] MTKTextureLoaderOptions options, MTKTextureLoaderArrayCallback completionHandler);
[NoiOS]
[NoTV]
[Mac (10,12, onlyOn64 : true)]
[Async]
[Export ("newTexturesWithNames:scaleFactor:displayGamut:bundle:options:completionHandler:")]
void FromNames (string[] names, nfloat scaleFactor, NSDisplayGamut displayGamut, [NullAllowed] NSBundle bundle, [NullAllowed] NSDictionary options, MTKTextureLoaderArrayCallback completionHandler);
[NoiOS]
[NoTV]
[Mac (10,12, onlyOn64 : true)]
[Wrap ("FromNames (names, scaleFactor, displayGamut, bundle, options == null ? null : options.Dictionary, completionHandler)")]
[Async]
void FromNames (string[] names, nfloat scaleFactor, NSDisplayGamut displayGamut, [NullAllowed] NSBundle bundle, [NullAllowed] MTKTextureLoaderOptions options, MTKTextureLoaderArrayCallback completionHandler);
[iOS (10,0)][Mac (10,12, onlyOn64 : true)] [iOS (10,0)][Mac (10,12, onlyOn64 : true)]
[Export ("newTextureWithMDLTexture:options:completionHandler:")] [Export ("newTextureWithMDLTexture:options:completionHandler:")]
[Async] [Async]
@ -327,6 +364,20 @@ namespace MetalKit {
[Wrap ("FromName (name, scaleFactor, bundle, options == null ? null : options.Dictionary, out error)")] [Wrap ("FromName (name, scaleFactor, bundle, options == null ? null : options.Dictionary, out error)")]
[return: NullAllowed] [return: NullAllowed]
IMTLTexture FromName (string name, nfloat scaleFactor, [NullAllowed] NSBundle bundle, [NullAllowed] MTKTextureLoaderOptions options, out NSError error); IMTLTexture FromName (string name, nfloat scaleFactor, [NullAllowed] NSBundle bundle, [NullAllowed] MTKTextureLoaderOptions options, out NSError error);
[NoiOS]
[NoTV]
[Mac (10,12, onlyOn64 : true)]
[Export ("newTextureWithName:scaleFactor:displayGamut:bundle:options:error:")]
[return: NullAllowed]
IMTLTexture FromName (string name, nfloat scaleFactor, NSDisplayGamut displayGamut, [NullAllowed] NSBundle bundle, [NullAllowed] NSDictionary options, [NullAllowed] out NSError error);
[NoiOS]
[NoTV]
[Mac (10,12, onlyOn64 : true)]
[Wrap ("FromName (name, scaleFactor, displayGamut, bundle, options == null ? null : options.Dictionary, out error)")]
[return: NullAllowed]
IMTLTexture FromName (string name, nfloat scaleFactor, NSDisplayGamut displayGamut, [NullAllowed] NSBundle bundle, [NullAllowed] MTKTextureLoaderOptions options, [NullAllowed] out NSError error);
} }
[iOS (9,0)][Mac (10,11, onlyOn64 : true)] [iOS (9,0)][Mac (10,11, onlyOn64 : true)]

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

@ -1,3 +0,0 @@
!missing-selector! MTKTextureLoader::newTexturesWithNames:scaleFactor:displayGamut:bundle:options:completionHandler: not bound
!missing-selector! MTKTextureLoader::newTextureWithName:scaleFactor:displayGamut:bundle:options:completionHandler: not bound
!missing-selector! MTKTextureLoader::newTextureWithName:scaleFactor:displayGamut:bundle:options:error: not bound