@nativescript/canvas 2.0.0-rc.21 → 2.0.0-rc.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +10 -27
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +1 -1
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +27 -1
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +12474 -11317
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +9 -7
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +9 -7
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +965 -954
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +20 -54
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +1 -1
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +27 -1
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +12474 -11317
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +9 -7
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +9 -7
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +12474 -11317
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +9 -7
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +9 -7
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +31 -31
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +962 -955
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +832 -824
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +1 -1
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#if 0
|
|
2
2
|
#elif defined(__arm64__) && __arm64__
|
|
3
|
-
// Generated by Apple Swift version 6.
|
|
3
|
+
// Generated by Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
|
|
4
4
|
#ifndef CANVASNATIVE_SWIFT_H
|
|
5
5
|
#define CANVASNATIVE_SWIFT_H
|
|
6
6
|
#pragma clang diagnostic push
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
# if __has_include(<uchar.h>)
|
|
66
66
|
# include <uchar.h>
|
|
67
67
|
# elif !defined(__cplusplus)
|
|
68
|
+
typedef unsigned char char8_t;
|
|
68
69
|
typedef uint_least16_t char16_t;
|
|
69
70
|
typedef uint_least32_t char32_t;
|
|
70
71
|
# endif
|
|
@@ -287,7 +288,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
287
288
|
@import Foundation;
|
|
288
289
|
@import GLKit;
|
|
289
290
|
@import ObjectiveC;
|
|
290
|
-
@import OpenGLES;
|
|
291
291
|
@import UIKit;
|
|
292
292
|
#endif
|
|
293
293
|
|
|
@@ -310,9 +310,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
310
310
|
#endif
|
|
311
311
|
|
|
312
312
|
#if defined(__OBJC__)
|
|
313
|
+
|
|
313
314
|
@class NSMutableData;
|
|
314
315
|
@class NSCoder;
|
|
315
|
-
|
|
316
316
|
SWIFT_CLASS_NAMED("CanvasCPUView")
|
|
317
317
|
@interface CanvasCPUView : UIView
|
|
318
318
|
@property (nonatomic) BOOL ignorePixelScaling;
|
|
@@ -324,7 +324,6 @@ SWIFT_CLASS_NAMED("CanvasCPUView")
|
|
|
324
324
|
|
|
325
325
|
@class NSCCanvas;
|
|
326
326
|
@class EAGLContext;
|
|
327
|
-
|
|
328
327
|
SWIFT_CLASS_NAMED("CanvasGLKView")
|
|
329
328
|
@interface CanvasGLKView : GLKView <GLKViewDelegate>
|
|
330
329
|
@property (nonatomic, readonly, weak) NSCCanvas * _Nullable canvas;
|
|
@@ -341,7 +340,6 @@ SWIFT_CLASS_NAMED("CanvasGLKView")
|
|
|
341
340
|
@class NSString;
|
|
342
341
|
@class NSData;
|
|
343
342
|
@class NSError;
|
|
344
|
-
|
|
345
343
|
SWIFT_CLASS_NAMED("CanvasHelpers")
|
|
346
344
|
@interface NSSCanvasHelpers : NSObject
|
|
347
345
|
+ (NSMutableData * _Nonnull)getBytesFromUIImage:(UIImage * _Nonnull)image SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -373,7 +371,6 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
|
|
|
373
371
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
374
372
|
@end
|
|
375
373
|
|
|
376
|
-
|
|
377
374
|
@interface GLKView (SWIFT_EXTENSION(CanvasNative))
|
|
378
375
|
- (void)snapshotWithData:(NSData * _Nonnull)data;
|
|
379
376
|
@end
|
|
@@ -382,7 +379,6 @@ enum CanvasFit : NSInteger;
|
|
|
382
379
|
@class NSMutableDictionary;
|
|
383
380
|
@class UIGestureRecognizer;
|
|
384
381
|
@protocol NSCCanvasListener;
|
|
385
|
-
|
|
386
382
|
SWIFT_CLASS_NAMED("NSCCanvas")
|
|
387
383
|
@interface NSCCanvas : UIView
|
|
388
384
|
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL forceGL;)
|
|
@@ -433,19 +429,16 @@ typedef SWIFT_ENUM_NAMED(NSInteger, CanvasFit, "CanvasFit", open) {
|
|
|
433
429
|
CanvasFitScaleDown = 4,
|
|
434
430
|
};
|
|
435
431
|
|
|
436
|
-
|
|
437
432
|
SWIFT_PROTOCOL_NAMED("NSCCanvasListener")
|
|
438
433
|
@protocol NSCCanvasListener
|
|
439
434
|
- (void)contextReady;
|
|
440
435
|
@end
|
|
441
436
|
|
|
442
|
-
|
|
443
437
|
SWIFT_CLASS_NAMED("NSCCanvasRenderingContext")
|
|
444
438
|
@interface NSCCanvasRenderingContext : NSObject
|
|
445
439
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
446
440
|
@end
|
|
447
441
|
|
|
448
|
-
|
|
449
442
|
SWIFT_CLASS_NAMED("NSCCanvasRenderingContext2D")
|
|
450
443
|
@interface NSCCanvasRenderingContext2D : NSCCanvasRenderingContext
|
|
451
444
|
+ (int64_t)createPattern:(int64_t)context :(UIImage * _Nonnull)src :(NSString * _Nonnull)repetition SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -455,21 +448,12 @@ SWIFT_CLASS_NAMED("NSCCanvasRenderingContext2D")
|
|
|
455
448
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
456
449
|
@end
|
|
457
450
|
|
|
458
|
-
@class NSCRender;
|
|
459
|
-
@class AVPlayer;
|
|
460
|
-
@class AVPlayerItemVideoOutput;
|
|
461
|
-
|
|
462
451
|
SWIFT_CLASS_NAMED("NSCCanvasUtils")
|
|
463
452
|
@interface NSCCanvasUtils : NSObject
|
|
464
|
-
+ (CVOpenGLESTextureCacheRef _Nullable)createTextureCache SWIFT_WARN_UNUSED_RESULT;
|
|
465
|
-
+ (CVOpenGLESTextureRef _Nullable)createImage:(CVOpenGLESTextureCacheRef _Nonnull)texturecache :(CVImageBufferRef _Nonnull)buffer :(CFDictionaryRef _Nullable)textureAttributes :(GLenum)target :(GLint)internalFormat :(GLsizei)width :(GLsizei)height :(GLenum)format :(GLenum)type :(NSInteger)planeIndex SWIFT_WARN_UNUSED_RESULT;
|
|
466
|
-
+ (NSCRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT;
|
|
467
|
-
+ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL;
|
|
468
453
|
+ (BOOL)writeToFile:(NSData * _Nonnull)data :(NSString * _Nonnull)path error:(NSError * _Nullable * _Nullable)error;
|
|
469
454
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
470
455
|
@end
|
|
471
456
|
|
|
472
|
-
|
|
473
457
|
SWIFT_CLASS_NAMED("NSCFontDescriptors")
|
|
474
458
|
@interface NSCFontDescriptors : NSObject
|
|
475
459
|
- (nonnull instancetype)initWithFamily:(NSString * _Nonnull)family OBJC_DESIGNATED_INITIALIZER;
|
|
@@ -490,7 +474,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, NSCFontDisplay, "NSCFontDisplay", open) {
|
|
|
490
474
|
|
|
491
475
|
enum NSCFontFaceStatus : NSInteger;
|
|
492
476
|
enum NSCFontWeight : NSInteger;
|
|
493
|
-
|
|
494
477
|
SWIFT_CLASS_NAMED("NSCFontFace")
|
|
495
478
|
@interface NSCFontFace : NSObject
|
|
496
479
|
@property (nonatomic, readonly) CGFontRef _Nullable font;
|
|
@@ -520,7 +503,6 @@ SWIFT_CLASS_NAMED("NSCFontFace")
|
|
|
520
503
|
|
|
521
504
|
enum NSCFontFaceSetStatus : NSInteger;
|
|
522
505
|
@class NSEnumerator;
|
|
523
|
-
|
|
524
506
|
SWIFT_CLASS_NAMED("NSCFontFaceSet")
|
|
525
507
|
@interface NSCFontFaceSet : NSObject
|
|
526
508
|
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSCFontFaceSet * _Nonnull instance;)
|
|
@@ -562,9 +544,11 @@ typedef SWIFT_ENUM_NAMED(NSInteger, NSCFontWeight, "NSCFontWeight", open) {
|
|
|
562
544
|
NSCFontWeightBlack = 8,
|
|
563
545
|
};
|
|
564
546
|
|
|
565
|
-
|
|
547
|
+
@class AVPlayer;
|
|
548
|
+
@class AVPlayerItemVideoOutput;
|
|
566
549
|
SWIFT_CLASS_NAMED("NSCImageAsset")
|
|
567
550
|
@interface NSCImageAsset : NSObject
|
|
551
|
+
+ (void)getImageFromPlayer:(int64_t)context :(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(BOOL)flipX :(BOOL)flipY :(void (^ _Nonnull)(BOOL))callback;
|
|
568
552
|
+ (BOOL)loadImageFromImageSync:(int64_t)context :(UIImage * _Nonnull)image SWIFT_WARN_UNUSED_RESULT;
|
|
569
553
|
+ (void)loadImageFromImage:(int64_t)context :(UIImage * _Nonnull)image :(void (^ _Nonnull)(BOOL))callback;
|
|
570
554
|
+ (BOOL)loadImageFromPathSync:(int64_t)asset :(NSString * _Nonnull)path SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -572,7 +556,6 @@ SWIFT_CLASS_NAMED("NSCImageAsset")
|
|
|
572
556
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
573
557
|
@end
|
|
574
558
|
|
|
575
|
-
|
|
576
559
|
SWIFT_CLASS_NAMED("NSCImageBitmap")
|
|
577
560
|
@interface NSCImageBitmap : NSObject
|
|
578
561
|
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_queue_t _Nonnull queue;)
|
|
@@ -580,13 +563,15 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_que
|
|
|
580
563
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
581
564
|
@end
|
|
582
565
|
|
|
583
|
-
|
|
566
|
+
@protocol MTLDevice;
|
|
584
567
|
SWIFT_CLASS_NAMED("NSCRender")
|
|
585
568
|
@interface NSCRender : NSObject
|
|
586
569
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
570
|
+
- (nonnull instancetype)initWithDevice:(id <MTLDevice> _Nonnull)device OBJC_DESIGNATED_INITIALIZER;
|
|
571
|
+
- (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL;
|
|
572
|
+
- (void)drawFrameWithBuffer:(CVPixelBufferRef _Nonnull)buffer width:(NSInteger)width height:(NSInteger)height internalFormat:(int32_t)internalFormat format:(int32_t)format flipYWebGL:(BOOL)flipYWebGL;
|
|
587
573
|
@end
|
|
588
574
|
|
|
589
|
-
|
|
590
575
|
SWIFT_CLASS_NAMED("NSCVideoFrame")
|
|
591
576
|
@interface NSCVideoFrame : NSObject
|
|
592
577
|
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
@@ -605,7 +590,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, NSCVideoFrameFormat, "NSCVideoFrameFormat",
|
|
|
605
590
|
NSCVideoFrameFormatBGRX = 8,
|
|
606
591
|
};
|
|
607
592
|
|
|
608
|
-
|
|
609
593
|
SWIFT_CLASS_NAMED("NSCWebGLRenderingContext")
|
|
610
594
|
@interface NSCWebGLRenderingContext : NSObject
|
|
611
595
|
+ (void)texImage2D:(int64_t)context :(int32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)format :(int32_t)type :(uint8_t * _Nonnull)data :(NSUInteger)size :(CGSize)dimensions :(BOOL)flipY;
|
|
@@ -613,7 +597,6 @@ SWIFT_CLASS_NAMED("NSCWebGLRenderingContext")
|
|
|
613
597
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
614
598
|
@end
|
|
615
599
|
|
|
616
|
-
|
|
617
600
|
@interface UIView (SWIFT_EXTENSION(CanvasNative))
|
|
618
601
|
- (void)getBoundingClientRect:(void * _Nonnull)buffer;
|
|
619
602
|
@end
|
|
@@ -628,7 +611,7 @@ SWIFT_CLASS_NAMED("NSCWebGLRenderingContext")
|
|
|
628
611
|
#endif
|
|
629
612
|
|
|
630
613
|
#elif defined(__x86_64__) && __x86_64__
|
|
631
|
-
// Generated by Apple Swift version 6.
|
|
614
|
+
// Generated by Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
|
|
632
615
|
#ifndef CANVASNATIVE_SWIFT_H
|
|
633
616
|
#define CANVASNATIVE_SWIFT_H
|
|
634
617
|
#pragma clang diagnostic push
|
|
@@ -693,6 +676,7 @@ SWIFT_CLASS_NAMED("NSCWebGLRenderingContext")
|
|
|
693
676
|
# if __has_include(<uchar.h>)
|
|
694
677
|
# include <uchar.h>
|
|
695
678
|
# elif !defined(__cplusplus)
|
|
679
|
+
typedef unsigned char char8_t;
|
|
696
680
|
typedef uint_least16_t char16_t;
|
|
697
681
|
typedef uint_least32_t char32_t;
|
|
698
682
|
# endif
|
|
@@ -915,7 +899,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
915
899
|
@import Foundation;
|
|
916
900
|
@import GLKit;
|
|
917
901
|
@import ObjectiveC;
|
|
918
|
-
@import OpenGLES;
|
|
919
902
|
@import UIKit;
|
|
920
903
|
#endif
|
|
921
904
|
|
|
@@ -938,9 +921,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
938
921
|
#endif
|
|
939
922
|
|
|
940
923
|
#if defined(__OBJC__)
|
|
924
|
+
|
|
941
925
|
@class NSMutableData;
|
|
942
926
|
@class NSCoder;
|
|
943
|
-
|
|
944
927
|
SWIFT_CLASS_NAMED("CanvasCPUView")
|
|
945
928
|
@interface CanvasCPUView : UIView
|
|
946
929
|
@property (nonatomic) BOOL ignorePixelScaling;
|
|
@@ -952,7 +935,6 @@ SWIFT_CLASS_NAMED("CanvasCPUView")
|
|
|
952
935
|
|
|
953
936
|
@class NSCCanvas;
|
|
954
937
|
@class EAGLContext;
|
|
955
|
-
|
|
956
938
|
SWIFT_CLASS_NAMED("CanvasGLKView")
|
|
957
939
|
@interface CanvasGLKView : GLKView <GLKViewDelegate>
|
|
958
940
|
@property (nonatomic, readonly, weak) NSCCanvas * _Nullable canvas;
|
|
@@ -969,7 +951,6 @@ SWIFT_CLASS_NAMED("CanvasGLKView")
|
|
|
969
951
|
@class NSString;
|
|
970
952
|
@class NSData;
|
|
971
953
|
@class NSError;
|
|
972
|
-
|
|
973
954
|
SWIFT_CLASS_NAMED("CanvasHelpers")
|
|
974
955
|
@interface NSSCanvasHelpers : NSObject
|
|
975
956
|
+ (NSMutableData * _Nonnull)getBytesFromUIImage:(UIImage * _Nonnull)image SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -1001,7 +982,6 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
|
|
|
1001
982
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1002
983
|
@end
|
|
1003
984
|
|
|
1004
|
-
|
|
1005
985
|
@interface GLKView (SWIFT_EXTENSION(CanvasNative))
|
|
1006
986
|
- (void)snapshotWithData:(NSData * _Nonnull)data;
|
|
1007
987
|
@end
|
|
@@ -1010,7 +990,6 @@ enum CanvasFit : NSInteger;
|
|
|
1010
990
|
@class NSMutableDictionary;
|
|
1011
991
|
@class UIGestureRecognizer;
|
|
1012
992
|
@protocol NSCCanvasListener;
|
|
1013
|
-
|
|
1014
993
|
SWIFT_CLASS_NAMED("NSCCanvas")
|
|
1015
994
|
@interface NSCCanvas : UIView
|
|
1016
995
|
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL forceGL;)
|
|
@@ -1061,19 +1040,16 @@ typedef SWIFT_ENUM_NAMED(NSInteger, CanvasFit, "CanvasFit", open) {
|
|
|
1061
1040
|
CanvasFitScaleDown = 4,
|
|
1062
1041
|
};
|
|
1063
1042
|
|
|
1064
|
-
|
|
1065
1043
|
SWIFT_PROTOCOL_NAMED("NSCCanvasListener")
|
|
1066
1044
|
@protocol NSCCanvasListener
|
|
1067
1045
|
- (void)contextReady;
|
|
1068
1046
|
@end
|
|
1069
1047
|
|
|
1070
|
-
|
|
1071
1048
|
SWIFT_CLASS_NAMED("NSCCanvasRenderingContext")
|
|
1072
1049
|
@interface NSCCanvasRenderingContext : NSObject
|
|
1073
1050
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1074
1051
|
@end
|
|
1075
1052
|
|
|
1076
|
-
|
|
1077
1053
|
SWIFT_CLASS_NAMED("NSCCanvasRenderingContext2D")
|
|
1078
1054
|
@interface NSCCanvasRenderingContext2D : NSCCanvasRenderingContext
|
|
1079
1055
|
+ (int64_t)createPattern:(int64_t)context :(UIImage * _Nonnull)src :(NSString * _Nonnull)repetition SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -1083,21 +1059,12 @@ SWIFT_CLASS_NAMED("NSCCanvasRenderingContext2D")
|
|
|
1083
1059
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1084
1060
|
@end
|
|
1085
1061
|
|
|
1086
|
-
@class NSCRender;
|
|
1087
|
-
@class AVPlayer;
|
|
1088
|
-
@class AVPlayerItemVideoOutput;
|
|
1089
|
-
|
|
1090
1062
|
SWIFT_CLASS_NAMED("NSCCanvasUtils")
|
|
1091
1063
|
@interface NSCCanvasUtils : NSObject
|
|
1092
|
-
+ (CVOpenGLESTextureCacheRef _Nullable)createTextureCache SWIFT_WARN_UNUSED_RESULT;
|
|
1093
|
-
+ (CVOpenGLESTextureRef _Nullable)createImage:(CVOpenGLESTextureCacheRef _Nonnull)texturecache :(CVImageBufferRef _Nonnull)buffer :(CFDictionaryRef _Nullable)textureAttributes :(GLenum)target :(GLint)internalFormat :(GLsizei)width :(GLsizei)height :(GLenum)format :(GLenum)type :(NSInteger)planeIndex SWIFT_WARN_UNUSED_RESULT;
|
|
1094
|
-
+ (NSCRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT;
|
|
1095
|
-
+ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL;
|
|
1096
1064
|
+ (BOOL)writeToFile:(NSData * _Nonnull)data :(NSString * _Nonnull)path error:(NSError * _Nullable * _Nullable)error;
|
|
1097
1065
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1098
1066
|
@end
|
|
1099
1067
|
|
|
1100
|
-
|
|
1101
1068
|
SWIFT_CLASS_NAMED("NSCFontDescriptors")
|
|
1102
1069
|
@interface NSCFontDescriptors : NSObject
|
|
1103
1070
|
- (nonnull instancetype)initWithFamily:(NSString * _Nonnull)family OBJC_DESIGNATED_INITIALIZER;
|
|
@@ -1118,7 +1085,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, NSCFontDisplay, "NSCFontDisplay", open) {
|
|
|
1118
1085
|
|
|
1119
1086
|
enum NSCFontFaceStatus : NSInteger;
|
|
1120
1087
|
enum NSCFontWeight : NSInteger;
|
|
1121
|
-
|
|
1122
1088
|
SWIFT_CLASS_NAMED("NSCFontFace")
|
|
1123
1089
|
@interface NSCFontFace : NSObject
|
|
1124
1090
|
@property (nonatomic, readonly) CGFontRef _Nullable font;
|
|
@@ -1148,7 +1114,6 @@ SWIFT_CLASS_NAMED("NSCFontFace")
|
|
|
1148
1114
|
|
|
1149
1115
|
enum NSCFontFaceSetStatus : NSInteger;
|
|
1150
1116
|
@class NSEnumerator;
|
|
1151
|
-
|
|
1152
1117
|
SWIFT_CLASS_NAMED("NSCFontFaceSet")
|
|
1153
1118
|
@interface NSCFontFaceSet : NSObject
|
|
1154
1119
|
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSCFontFaceSet * _Nonnull instance;)
|
|
@@ -1190,9 +1155,11 @@ typedef SWIFT_ENUM_NAMED(NSInteger, NSCFontWeight, "NSCFontWeight", open) {
|
|
|
1190
1155
|
NSCFontWeightBlack = 8,
|
|
1191
1156
|
};
|
|
1192
1157
|
|
|
1193
|
-
|
|
1158
|
+
@class AVPlayer;
|
|
1159
|
+
@class AVPlayerItemVideoOutput;
|
|
1194
1160
|
SWIFT_CLASS_NAMED("NSCImageAsset")
|
|
1195
1161
|
@interface NSCImageAsset : NSObject
|
|
1162
|
+
+ (void)getImageFromPlayer:(int64_t)context :(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(BOOL)flipX :(BOOL)flipY :(void (^ _Nonnull)(BOOL))callback;
|
|
1196
1163
|
+ (BOOL)loadImageFromImageSync:(int64_t)context :(UIImage * _Nonnull)image SWIFT_WARN_UNUSED_RESULT;
|
|
1197
1164
|
+ (void)loadImageFromImage:(int64_t)context :(UIImage * _Nonnull)image :(void (^ _Nonnull)(BOOL))callback;
|
|
1198
1165
|
+ (BOOL)loadImageFromPathSync:(int64_t)asset :(NSString * _Nonnull)path SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -1200,7 +1167,6 @@ SWIFT_CLASS_NAMED("NSCImageAsset")
|
|
|
1200
1167
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1201
1168
|
@end
|
|
1202
1169
|
|
|
1203
|
-
|
|
1204
1170
|
SWIFT_CLASS_NAMED("NSCImageBitmap")
|
|
1205
1171
|
@interface NSCImageBitmap : NSObject
|
|
1206
1172
|
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_queue_t _Nonnull queue;)
|
|
@@ -1208,13 +1174,15 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_que
|
|
|
1208
1174
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1209
1175
|
@end
|
|
1210
1176
|
|
|
1211
|
-
|
|
1177
|
+
@protocol MTLDevice;
|
|
1212
1178
|
SWIFT_CLASS_NAMED("NSCRender")
|
|
1213
1179
|
@interface NSCRender : NSObject
|
|
1214
1180
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1181
|
+
- (nonnull instancetype)initWithDevice:(id <MTLDevice> _Nonnull)device OBJC_DESIGNATED_INITIALIZER;
|
|
1182
|
+
- (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL;
|
|
1183
|
+
- (void)drawFrameWithBuffer:(CVPixelBufferRef _Nonnull)buffer width:(NSInteger)width height:(NSInteger)height internalFormat:(int32_t)internalFormat format:(int32_t)format flipYWebGL:(BOOL)flipYWebGL;
|
|
1215
1184
|
@end
|
|
1216
1185
|
|
|
1217
|
-
|
|
1218
1186
|
SWIFT_CLASS_NAMED("NSCVideoFrame")
|
|
1219
1187
|
@interface NSCVideoFrame : NSObject
|
|
1220
1188
|
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
@@ -1233,7 +1201,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, NSCVideoFrameFormat, "NSCVideoFrameFormat",
|
|
|
1233
1201
|
NSCVideoFrameFormatBGRX = 8,
|
|
1234
1202
|
};
|
|
1235
1203
|
|
|
1236
|
-
|
|
1237
1204
|
SWIFT_CLASS_NAMED("NSCWebGLRenderingContext")
|
|
1238
1205
|
@interface NSCWebGLRenderingContext : NSObject
|
|
1239
1206
|
+ (void)texImage2D:(int64_t)context :(int32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)format :(int32_t)type :(uint8_t * _Nonnull)data :(NSUInteger)size :(CGSize)dimensions :(BOOL)flipY;
|
|
@@ -1241,7 +1208,6 @@ SWIFT_CLASS_NAMED("NSCWebGLRenderingContext")
|
|
|
1241
1208
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1242
1209
|
@end
|
|
1243
1210
|
|
|
1244
|
-
|
|
1245
1211
|
@interface UIView (SWIFT_EXTENSION(CanvasNative))
|
|
1246
1212
|
- (void)getBoundingClientRect:(void * _Nonnull)buffer;
|
|
1247
1213
|
@end
|
|
@@ -1082,6 +1082,24 @@ typedef enum CanvasGPUTextureFormat_Tag {
|
|
|
1082
1082
|
* [`Features::TEXTURE_FORMAT_NV12`] must be enabled to use this texture format.
|
|
1083
1083
|
*/
|
|
1084
1084
|
CanvasGPUTextureFormatNV12,
|
|
1085
|
+
/**
|
|
1086
|
+
* YUV 4:2:0 chroma subsampled format.
|
|
1087
|
+
*
|
|
1088
|
+
* Contains two planes:
|
|
1089
|
+
* - 0: Single 16 bit channel luminance, of which only the high 10 bits
|
|
1090
|
+
* are used.
|
|
1091
|
+
* - 1: Dual 16 bit channel chrominance at half width and half height, of
|
|
1092
|
+
* which only the high 10 bits are used.
|
|
1093
|
+
*
|
|
1094
|
+
* Valid view formats for luminance are [`TextureFormat::R16Unorm`].
|
|
1095
|
+
*
|
|
1096
|
+
* Valid view formats for chrominance are [`TextureFormat::Rg16Unorm`].
|
|
1097
|
+
*
|
|
1098
|
+
* Width and height must be even.
|
|
1099
|
+
*
|
|
1100
|
+
* [`Features::TEXTURE_FORMAT_P010`] must be enabled to use this texture format.
|
|
1101
|
+
*/
|
|
1102
|
+
CanvasGPUTextureFormatP010,
|
|
1085
1103
|
/**
|
|
1086
1104
|
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). 4 color + alpha pallet. 5 bit R + 6 bit G + 5 bit B + 1 bit alpha.
|
|
1087
1105
|
* [0, 63] ([0, 1] for alpha) converted to/from float [0, 1] in shader.
|
|
@@ -1362,6 +1380,14 @@ typedef struct CanvasGPUSupportedLimits {
|
|
|
1362
1380
|
uint32_t max_subgroup_size;
|
|
1363
1381
|
uint32_t max_push_constant_size;
|
|
1364
1382
|
uint32_t max_non_sampler_bindings;
|
|
1383
|
+
uint32_t max_task_workgroup_total_count;
|
|
1384
|
+
uint32_t max_task_workgroups_per_dimension;
|
|
1385
|
+
uint32_t max_mesh_output_layers;
|
|
1386
|
+
uint32_t max_mesh_multiview_count;
|
|
1387
|
+
uint32_t max_blas_primitive_count;
|
|
1388
|
+
uint32_t max_blas_geometry_count;
|
|
1389
|
+
uint32_t max_tlas_instance_count;
|
|
1390
|
+
uint32_t max_acceleration_structures_per_shader_stage;
|
|
1365
1391
|
} CanvasGPUSupportedLimits;
|
|
1366
1392
|
|
|
1367
1393
|
typedef struct CanvasExtent3d {
|
|
@@ -5620,4 +5646,4 @@ void canvas_native_webgl2_tex_image2d_image_data(int32_t target,
|
|
|
5620
5646
|
const struct ImageData *image_data,
|
|
5621
5647
|
struct WebGLState *state);
|
|
5622
5648
|
|
|
5623
|
-
#endif
|
|
5649
|
+
#endif /* CANVAS_C_H */
|
|
Binary file
|
|
Binary file
|