From e8ea0715e42019ce7a440974b009ee98dc6a12db Mon Sep 17 00:00:00 2001 From: Kyle Date: Mon, 30 Nov 2026 00:04:00 +0800 Subject: [PATCH] feat(RB): expose shader and image APIs --- .../RenderBox.framework/Headers/RBDevice.h | 5 +- .../RenderBox.framework/Headers/RBImage.h | 46 ++++++++++++++ .../RenderBox.framework/Headers/RBShader.h | 63 +++++++++++++++++++ .../Headers/RBShaderLibrary.h | 42 +++++++++++++ .../RenderBox.framework/Headers/RBSurface.h | 16 +++++ .../RenderBox.framework/Headers/RenderBox.h | 4 ++ .../RenderBox.framework/Headers/RBDevice.h | 5 +- .../RenderBox.framework/Headers/RBImage.h | 46 ++++++++++++++ .../RenderBox.framework/Headers/RBShader.h | 63 +++++++++++++++++++ .../Headers/RBShaderLibrary.h | 42 +++++++++++++ .../RenderBox.framework/Headers/RBSurface.h | 16 +++++ .../RenderBox.framework/Headers/RenderBox.h | 4 ++ .../Versions/A/Headers/RBDevice.h | 5 +- .../Versions/A/Headers/RBImage.h | 46 ++++++++++++++ .../Versions/A/Headers/RBShader.h | 63 +++++++++++++++++++ .../Versions/A/Headers/RBShaderLibrary.h | 42 +++++++++++++ .../Versions/A/Headers/RBSurface.h | 16 +++++ .../Versions/A/Headers/RenderBox.h | 4 ++ .../RenderBox.framework/Headers/RBDevice.h | 5 +- .../RenderBox.framework/Headers/RBImage.h | 46 ++++++++++++++ .../RenderBox.framework/Headers/RBShader.h | 63 +++++++++++++++++++ .../Headers/RBShaderLibrary.h | 42 +++++++++++++ .../RenderBox.framework/Headers/RBSurface.h | 16 +++++ .../RenderBox.framework/Headers/RenderBox.h | 4 ++ .../RenderBox.framework/Headers/RBDevice.h | 5 +- .../RenderBox.framework/Headers/RBImage.h | 46 ++++++++++++++ .../RenderBox.framework/Headers/RBShader.h | 63 +++++++++++++++++++ .../Headers/RBShaderLibrary.h | 42 +++++++++++++ .../RenderBox.framework/Headers/RBSurface.h | 16 +++++ .../RenderBox.framework/Headers/RenderBox.h | 4 ++ RB/2024/Sources/Headers/RBDevice.h | 5 +- RB/2024/Sources/Headers/RBImage.h | 46 ++++++++++++++ RB/2024/Sources/Headers/RBShader.h | 63 +++++++++++++++++++ RB/2024/Sources/Headers/RBShaderLibrary.h | 42 +++++++++++++ RB/2024/Sources/Headers/RBSurface.h | 16 +++++ RB/2024/Sources/Headers/RenderBox.h | 4 ++ 36 files changed, 1050 insertions(+), 6 deletions(-) create mode 100644 RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBImage.h create mode 100644 RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBShader.h create mode 100644 RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBShaderLibrary.h create mode 100644 RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBSurface.h create mode 100644 RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBImage.h create mode 100644 RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShader.h create mode 100644 RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShaderLibrary.h create mode 100644 RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBSurface.h create mode 100644 RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBImage.h create mode 100644 RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBShader.h create mode 100644 RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBShaderLibrary.h create mode 100644 RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBSurface.h create mode 100644 RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBImage.h create mode 100644 RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBShader.h create mode 100644 RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBShaderLibrary.h create mode 100644 RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBSurface.h create mode 100644 RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBImage.h create mode 100644 RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShader.h create mode 100644 RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShaderLibrary.h create mode 100644 RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBSurface.h create mode 100644 RB/2024/Sources/Headers/RBImage.h create mode 100644 RB/2024/Sources/Headers/RBShader.h create mode 100644 RB/2024/Sources/Headers/RBShaderLibrary.h create mode 100644 RB/2024/Sources/Headers/RBSurface.h diff --git a/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBDevice.h b/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBDevice.h index 44d0dce..67962e6 100644 --- a/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBDevice.h +++ b/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBDevice.h @@ -13,6 +13,7 @@ #include #include +@class RBShader; @protocol MTLCaptureScope, MTLDevice, OS_dispatch_queue; RB_ASSUME_NONNULL_BEGIN @@ -44,7 +45,9 @@ RB_ASSUME_NONNULL_BEGIN - (instancetype)initWithDevice:(id)device; - (nullable CGImageRef)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer; - (void)collectResources; -- (void)compileShader:(id)shader completionQueue:(nullable id)queue handler:(nullable id /* block */)handler; +- (void)compileShader:(RBShader *)shader + completionQueue:(nullable dispatch_queue_t)queue + handler:(void (^ _Nullable)(NSError *_Nullable error))handler; - (BOOL)compileShader:(id)shader error:(id _Nullable * _Nullable)error; - (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats; - (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler; diff --git a/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBImage.h b/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBImage.h new file mode 100644 index 0000000..1270bfb --- /dev/null +++ b/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBImage.h @@ -0,0 +1,46 @@ +// +// RBImage.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include +#include +#include + +RB_ASSUME_NONNULL_BEGIN +RB_IMPLICIT_BRIDGING_ENABLED +RB_EXTERN_C_BEGIN + +typedef struct { + int32_t type; + void *_Nullable data; +} RBImage; + +typedef struct { + CGFloat top, left, bottom, right; +} RBImageCapInsets; + +RB_EXPORT CGAffineTransform RBImageTransform(CGSize pixelSize, CGRect destination, CGRect source) RB_SWIFT_NAME(RBImage.transform(pixelSize:destination:source:)); +RB_EXPORT CGAffineTransform RBImageSimpleTransform(CGRect destination) RB_SWIFT_NAME(RBImage.transform(for:)); +RB_EXPORT CGAffineTransform RBTiledImageTransform(CGSize pixelSize, CGFloat scale, CGPoint origin, CGRect source) RB_SWIFT_NAME(RBImage.tiledTransform(pixelSize:scale:origin:source:)); + +// These factories borrow their input. Keep the source alive while using the image. +RB_EXPORT RBImage RBImageMakeCGImage(CGImageRef image) RB_SWIFT_NAME(RBImage.init(_:)); +RB_EXPORT RBImage RBImageMakeIOSurface(IOSurfaceRef surface) RB_SWIFT_NAME(RBImage.init(surface:)); +RB_EXPORT RBImage RBImageMakeRBSurface(RBSurface *surface) RB_SWIFT_NAME(RBImage.init(renderBoxSurface:)); +RB_EXPORT RBImage RBImageMakeMTLTexture(id texture) RB_SWIFT_NAME(RBImage.init(texture:)); + +// Returns a retained image when the source is a CGImage. +RB_EXPORT CGImageRef _Nullable RBImageCopyCGImage(RBImage image) CF_RETURNS_RETAINED RB_SWIFT_NAME(RBImage.copyCGImage(self:)); + +RB_EXTERN_C_END +RB_IMPLICIT_BRIDGING_DISABLED +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBShader.h b/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBShader.h new file mode 100644 index 0000000..062e2f8 --- /dev/null +++ b/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBShader.h @@ -0,0 +1,63 @@ +// +// RBShader.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include +#include +#include +#include +#include +#include +#include + +RB_ASSUME_NONNULL_BEGIN + +@class RBShader; + +typedef struct { + uint32_t type; + uint32_t flags; + NSUInteger count; + void *_Nullable bytes; + int32_t colorSpace; +} RBShaderArgument; + +typedef CIFilter *_Nullable (^RBShaderCIFilterProvider)(RBShader *shader, CGRect bounds); + +@interface RBShader : NSObject + +@property (nonatomic, readonly, nullable) RBShaderLibrary *library; +@property (nonatomic) int32_t type; +@property (nonatomic, copy, readonly, nullable) NSString *function; +@property (nonatomic, readonly) NSUInteger numberOfArguments; +@property (nonatomic, copy, nullable) RBShaderCIFilterProvider CIFilterProvider API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +@property (nonatomic) CGAffineTransform CIFilterCTM API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +- (instancetype)initWithLibrary:(RBShaderLibrary *)library function:(NSString *)function; +- (instancetype)initWithSystemShader:(NSString *)function API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +- (void)removeAllArguments; +// The shader owns the argument bytes. Read them before modifying the arguments. +- (RBShaderArgument)argumentAtIndex:(NSUInteger)index; +- (float)argumentHeadroomAtIndex:(NSUInteger)index API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +- (void)setArgumentHeadroom:(float)headroom atIndex:(NSUInteger)index API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +- (void)setArgumentBytes:(const void *_Nullable)bytes atIndex:(NSUInteger)index type:(uint32_t)type count:(NSUInteger)count flags:(uint32_t)flags RB_SWIFT_NAME(setBytes(_:at:type:count:flags:)); +- (void)setArgumentData:(NSData *)data atIndex:(NSUInteger)index type:(uint32_t)type flags:(uint32_t)flags RB_SWIFT_NAME(setData(_:at:type:flags:)); +- (void)setArgumentColorSpace:(RBColorSpace)space atIndex:(NSUInteger)index RB_SWIFT_NAME(setColorSpace(_:at:)); + +@end + +RB_EXTERN_C_BEGIN +RB_EXPORT id RBArchiveDelegate(uint32_t flags); +RB_EXTERN_C_END + +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBShaderLibrary.h b/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBShaderLibrary.h new file mode 100644 index 0000000..706678b --- /dev/null +++ b/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBShaderLibrary.h @@ -0,0 +1,42 @@ +// +// RBShaderLibrary.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include + +RB_ASSUME_NONNULL_BEGIN + +@interface RBShaderLibrary : NSObject + +@property (class, nonatomic, readonly) RBShaderLibrary *defaultLibrary RB_SWIFT_NAME(standard); +@property (class, nonatomic, readonly) RBShaderLibrary *systemLibrary RB_SWIFT_NAME(system) API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +@property (nonatomic, readonly, nullable) NSBundle *bundle; +@property (nonatomic, copy, readonly, nullable) NSData *data; +@property (nonatomic, copy, readonly, nullable) NSURL *URL; +@property (nonatomic, readonly, nullable) id metalLibrary; +@property (nonatomic, copy, readonly, nullable) NSString *source; +@property (nonatomic) int32_t ABIVersion API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +@property (nonatomic, copy, nullable) NSURL *binaryArchiveURL API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + ++ (RBShaderLibrary *)defaultLibraryWithBundle:(NSBundle *)bundle RB_SWIFT_NAME(inBundle(_:)); ++ (RBShaderLibrary *)libraryWithData:(NSData *)data RB_SWIFT_NAME(from(data:)); ++ (RBShaderLibrary *)libraryWithContentsOfURL:(NSURL *)url RB_SWIFT_NAME(from(url:)); ++ (RBShaderLibrary *)libraryWithMetalLibrary:(id)library RB_SWIFT_NAME(from(metalLibrary:)); ++ (RBShaderLibrary *)libraryWithSource:(NSString *)source RB_SWIFT_NAME(from(source:)); + +- (uint32_t)addErrorHandler:(void (^)(NSError *error))handler; +- (void)removeErrorHandler:(uint32_t)token; + +@end + +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBSurface.h b/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBSurface.h new file mode 100644 index 0000000..87eba46 --- /dev/null +++ b/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RBSurface.h @@ -0,0 +1,16 @@ +// +// RBSurface.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include + +@interface RBSurface : NSObject +@end + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RenderBox.h b/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RenderBox.h index f23aa58..eac1d00 100644 --- a/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RenderBox.h +++ b/RB/2024/RenderBox.xcframework/ios-arm64-arm64e/RenderBox.framework/Headers/RenderBox.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +25,9 @@ #include #include #include +#include +#include +#include #include #include #include diff --git a/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBDevice.h b/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBDevice.h index 44d0dce..67962e6 100644 --- a/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBDevice.h +++ b/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBDevice.h @@ -13,6 +13,7 @@ #include #include +@class RBShader; @protocol MTLCaptureScope, MTLDevice, OS_dispatch_queue; RB_ASSUME_NONNULL_BEGIN @@ -44,7 +45,9 @@ RB_ASSUME_NONNULL_BEGIN - (instancetype)initWithDevice:(id)device; - (nullable CGImageRef)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer; - (void)collectResources; -- (void)compileShader:(id)shader completionQueue:(nullable id)queue handler:(nullable id /* block */)handler; +- (void)compileShader:(RBShader *)shader + completionQueue:(nullable dispatch_queue_t)queue + handler:(void (^ _Nullable)(NSError *_Nullable error))handler; - (BOOL)compileShader:(id)shader error:(id _Nullable * _Nullable)error; - (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats; - (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler; diff --git a/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBImage.h b/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBImage.h new file mode 100644 index 0000000..1270bfb --- /dev/null +++ b/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBImage.h @@ -0,0 +1,46 @@ +// +// RBImage.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include +#include +#include + +RB_ASSUME_NONNULL_BEGIN +RB_IMPLICIT_BRIDGING_ENABLED +RB_EXTERN_C_BEGIN + +typedef struct { + int32_t type; + void *_Nullable data; +} RBImage; + +typedef struct { + CGFloat top, left, bottom, right; +} RBImageCapInsets; + +RB_EXPORT CGAffineTransform RBImageTransform(CGSize pixelSize, CGRect destination, CGRect source) RB_SWIFT_NAME(RBImage.transform(pixelSize:destination:source:)); +RB_EXPORT CGAffineTransform RBImageSimpleTransform(CGRect destination) RB_SWIFT_NAME(RBImage.transform(for:)); +RB_EXPORT CGAffineTransform RBTiledImageTransform(CGSize pixelSize, CGFloat scale, CGPoint origin, CGRect source) RB_SWIFT_NAME(RBImage.tiledTransform(pixelSize:scale:origin:source:)); + +// These factories borrow their input. Keep the source alive while using the image. +RB_EXPORT RBImage RBImageMakeCGImage(CGImageRef image) RB_SWIFT_NAME(RBImage.init(_:)); +RB_EXPORT RBImage RBImageMakeIOSurface(IOSurfaceRef surface) RB_SWIFT_NAME(RBImage.init(surface:)); +RB_EXPORT RBImage RBImageMakeRBSurface(RBSurface *surface) RB_SWIFT_NAME(RBImage.init(renderBoxSurface:)); +RB_EXPORT RBImage RBImageMakeMTLTexture(id texture) RB_SWIFT_NAME(RBImage.init(texture:)); + +// Returns a retained image when the source is a CGImage. +RB_EXPORT CGImageRef _Nullable RBImageCopyCGImage(RBImage image) CF_RETURNS_RETAINED RB_SWIFT_NAME(RBImage.copyCGImage(self:)); + +RB_EXTERN_C_END +RB_IMPLICIT_BRIDGING_DISABLED +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShader.h b/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShader.h new file mode 100644 index 0000000..062e2f8 --- /dev/null +++ b/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShader.h @@ -0,0 +1,63 @@ +// +// RBShader.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include +#include +#include +#include +#include +#include +#include + +RB_ASSUME_NONNULL_BEGIN + +@class RBShader; + +typedef struct { + uint32_t type; + uint32_t flags; + NSUInteger count; + void *_Nullable bytes; + int32_t colorSpace; +} RBShaderArgument; + +typedef CIFilter *_Nullable (^RBShaderCIFilterProvider)(RBShader *shader, CGRect bounds); + +@interface RBShader : NSObject + +@property (nonatomic, readonly, nullable) RBShaderLibrary *library; +@property (nonatomic) int32_t type; +@property (nonatomic, copy, readonly, nullable) NSString *function; +@property (nonatomic, readonly) NSUInteger numberOfArguments; +@property (nonatomic, copy, nullable) RBShaderCIFilterProvider CIFilterProvider API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +@property (nonatomic) CGAffineTransform CIFilterCTM API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +- (instancetype)initWithLibrary:(RBShaderLibrary *)library function:(NSString *)function; +- (instancetype)initWithSystemShader:(NSString *)function API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +- (void)removeAllArguments; +// The shader owns the argument bytes. Read them before modifying the arguments. +- (RBShaderArgument)argumentAtIndex:(NSUInteger)index; +- (float)argumentHeadroomAtIndex:(NSUInteger)index API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +- (void)setArgumentHeadroom:(float)headroom atIndex:(NSUInteger)index API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +- (void)setArgumentBytes:(const void *_Nullable)bytes atIndex:(NSUInteger)index type:(uint32_t)type count:(NSUInteger)count flags:(uint32_t)flags RB_SWIFT_NAME(setBytes(_:at:type:count:flags:)); +- (void)setArgumentData:(NSData *)data atIndex:(NSUInteger)index type:(uint32_t)type flags:(uint32_t)flags RB_SWIFT_NAME(setData(_:at:type:flags:)); +- (void)setArgumentColorSpace:(RBColorSpace)space atIndex:(NSUInteger)index RB_SWIFT_NAME(setColorSpace(_:at:)); + +@end + +RB_EXTERN_C_BEGIN +RB_EXPORT id RBArchiveDelegate(uint32_t flags); +RB_EXTERN_C_END + +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShaderLibrary.h b/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShaderLibrary.h new file mode 100644 index 0000000..706678b --- /dev/null +++ b/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShaderLibrary.h @@ -0,0 +1,42 @@ +// +// RBShaderLibrary.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include + +RB_ASSUME_NONNULL_BEGIN + +@interface RBShaderLibrary : NSObject + +@property (class, nonatomic, readonly) RBShaderLibrary *defaultLibrary RB_SWIFT_NAME(standard); +@property (class, nonatomic, readonly) RBShaderLibrary *systemLibrary RB_SWIFT_NAME(system) API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +@property (nonatomic, readonly, nullable) NSBundle *bundle; +@property (nonatomic, copy, readonly, nullable) NSData *data; +@property (nonatomic, copy, readonly, nullable) NSURL *URL; +@property (nonatomic, readonly, nullable) id metalLibrary; +@property (nonatomic, copy, readonly, nullable) NSString *source; +@property (nonatomic) int32_t ABIVersion API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +@property (nonatomic, copy, nullable) NSURL *binaryArchiveURL API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + ++ (RBShaderLibrary *)defaultLibraryWithBundle:(NSBundle *)bundle RB_SWIFT_NAME(inBundle(_:)); ++ (RBShaderLibrary *)libraryWithData:(NSData *)data RB_SWIFT_NAME(from(data:)); ++ (RBShaderLibrary *)libraryWithContentsOfURL:(NSURL *)url RB_SWIFT_NAME(from(url:)); ++ (RBShaderLibrary *)libraryWithMetalLibrary:(id)library RB_SWIFT_NAME(from(metalLibrary:)); ++ (RBShaderLibrary *)libraryWithSource:(NSString *)source RB_SWIFT_NAME(from(source:)); + +- (uint32_t)addErrorHandler:(void (^)(NSError *error))handler; +- (void)removeErrorHandler:(uint32_t)token; + +@end + +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBSurface.h b/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBSurface.h new file mode 100644 index 0000000..87eba46 --- /dev/null +++ b/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RBSurface.h @@ -0,0 +1,16 @@ +// +// RBSurface.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include + +@interface RBSurface : NSObject +@end + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RenderBox.h b/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RenderBox.h index f23aa58..eac1d00 100644 --- a/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RenderBox.h +++ b/RB/2024/RenderBox.xcframework/ios-arm64-x86_64-simulator/RenderBox.framework/Headers/RenderBox.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +25,9 @@ #include #include #include +#include +#include +#include #include #include #include diff --git a/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBDevice.h b/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBDevice.h index 44d0dce..67962e6 100644 --- a/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBDevice.h +++ b/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBDevice.h @@ -13,6 +13,7 @@ #include #include +@class RBShader; @protocol MTLCaptureScope, MTLDevice, OS_dispatch_queue; RB_ASSUME_NONNULL_BEGIN @@ -44,7 +45,9 @@ RB_ASSUME_NONNULL_BEGIN - (instancetype)initWithDevice:(id)device; - (nullable CGImageRef)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer; - (void)collectResources; -- (void)compileShader:(id)shader completionQueue:(nullable id)queue handler:(nullable id /* block */)handler; +- (void)compileShader:(RBShader *)shader + completionQueue:(nullable dispatch_queue_t)queue + handler:(void (^ _Nullable)(NSError *_Nullable error))handler; - (BOOL)compileShader:(id)shader error:(id _Nullable * _Nullable)error; - (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats; - (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler; diff --git a/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBImage.h b/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBImage.h new file mode 100644 index 0000000..1270bfb --- /dev/null +++ b/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBImage.h @@ -0,0 +1,46 @@ +// +// RBImage.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include +#include +#include + +RB_ASSUME_NONNULL_BEGIN +RB_IMPLICIT_BRIDGING_ENABLED +RB_EXTERN_C_BEGIN + +typedef struct { + int32_t type; + void *_Nullable data; +} RBImage; + +typedef struct { + CGFloat top, left, bottom, right; +} RBImageCapInsets; + +RB_EXPORT CGAffineTransform RBImageTransform(CGSize pixelSize, CGRect destination, CGRect source) RB_SWIFT_NAME(RBImage.transform(pixelSize:destination:source:)); +RB_EXPORT CGAffineTransform RBImageSimpleTransform(CGRect destination) RB_SWIFT_NAME(RBImage.transform(for:)); +RB_EXPORT CGAffineTransform RBTiledImageTransform(CGSize pixelSize, CGFloat scale, CGPoint origin, CGRect source) RB_SWIFT_NAME(RBImage.tiledTransform(pixelSize:scale:origin:source:)); + +// These factories borrow their input. Keep the source alive while using the image. +RB_EXPORT RBImage RBImageMakeCGImage(CGImageRef image) RB_SWIFT_NAME(RBImage.init(_:)); +RB_EXPORT RBImage RBImageMakeIOSurface(IOSurfaceRef surface) RB_SWIFT_NAME(RBImage.init(surface:)); +RB_EXPORT RBImage RBImageMakeRBSurface(RBSurface *surface) RB_SWIFT_NAME(RBImage.init(renderBoxSurface:)); +RB_EXPORT RBImage RBImageMakeMTLTexture(id texture) RB_SWIFT_NAME(RBImage.init(texture:)); + +// Returns a retained image when the source is a CGImage. +RB_EXPORT CGImageRef _Nullable RBImageCopyCGImage(RBImage image) CF_RETURNS_RETAINED RB_SWIFT_NAME(RBImage.copyCGImage(self:)); + +RB_EXTERN_C_END +RB_IMPLICIT_BRIDGING_DISABLED +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBShader.h b/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBShader.h new file mode 100644 index 0000000..062e2f8 --- /dev/null +++ b/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBShader.h @@ -0,0 +1,63 @@ +// +// RBShader.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include +#include +#include +#include +#include +#include +#include + +RB_ASSUME_NONNULL_BEGIN + +@class RBShader; + +typedef struct { + uint32_t type; + uint32_t flags; + NSUInteger count; + void *_Nullable bytes; + int32_t colorSpace; +} RBShaderArgument; + +typedef CIFilter *_Nullable (^RBShaderCIFilterProvider)(RBShader *shader, CGRect bounds); + +@interface RBShader : NSObject + +@property (nonatomic, readonly, nullable) RBShaderLibrary *library; +@property (nonatomic) int32_t type; +@property (nonatomic, copy, readonly, nullable) NSString *function; +@property (nonatomic, readonly) NSUInteger numberOfArguments; +@property (nonatomic, copy, nullable) RBShaderCIFilterProvider CIFilterProvider API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +@property (nonatomic) CGAffineTransform CIFilterCTM API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +- (instancetype)initWithLibrary:(RBShaderLibrary *)library function:(NSString *)function; +- (instancetype)initWithSystemShader:(NSString *)function API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +- (void)removeAllArguments; +// The shader owns the argument bytes. Read them before modifying the arguments. +- (RBShaderArgument)argumentAtIndex:(NSUInteger)index; +- (float)argumentHeadroomAtIndex:(NSUInteger)index API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +- (void)setArgumentHeadroom:(float)headroom atIndex:(NSUInteger)index API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +- (void)setArgumentBytes:(const void *_Nullable)bytes atIndex:(NSUInteger)index type:(uint32_t)type count:(NSUInteger)count flags:(uint32_t)flags RB_SWIFT_NAME(setBytes(_:at:type:count:flags:)); +- (void)setArgumentData:(NSData *)data atIndex:(NSUInteger)index type:(uint32_t)type flags:(uint32_t)flags RB_SWIFT_NAME(setData(_:at:type:flags:)); +- (void)setArgumentColorSpace:(RBColorSpace)space atIndex:(NSUInteger)index RB_SWIFT_NAME(setColorSpace(_:at:)); + +@end + +RB_EXTERN_C_BEGIN +RB_EXPORT id RBArchiveDelegate(uint32_t flags); +RB_EXTERN_C_END + +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBShaderLibrary.h b/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBShaderLibrary.h new file mode 100644 index 0000000..706678b --- /dev/null +++ b/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBShaderLibrary.h @@ -0,0 +1,42 @@ +// +// RBShaderLibrary.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include + +RB_ASSUME_NONNULL_BEGIN + +@interface RBShaderLibrary : NSObject + +@property (class, nonatomic, readonly) RBShaderLibrary *defaultLibrary RB_SWIFT_NAME(standard); +@property (class, nonatomic, readonly) RBShaderLibrary *systemLibrary RB_SWIFT_NAME(system) API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +@property (nonatomic, readonly, nullable) NSBundle *bundle; +@property (nonatomic, copy, readonly, nullable) NSData *data; +@property (nonatomic, copy, readonly, nullable) NSURL *URL; +@property (nonatomic, readonly, nullable) id metalLibrary; +@property (nonatomic, copy, readonly, nullable) NSString *source; +@property (nonatomic) int32_t ABIVersion API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +@property (nonatomic, copy, nullable) NSURL *binaryArchiveURL API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + ++ (RBShaderLibrary *)defaultLibraryWithBundle:(NSBundle *)bundle RB_SWIFT_NAME(inBundle(_:)); ++ (RBShaderLibrary *)libraryWithData:(NSData *)data RB_SWIFT_NAME(from(data:)); ++ (RBShaderLibrary *)libraryWithContentsOfURL:(NSURL *)url RB_SWIFT_NAME(from(url:)); ++ (RBShaderLibrary *)libraryWithMetalLibrary:(id)library RB_SWIFT_NAME(from(metalLibrary:)); ++ (RBShaderLibrary *)libraryWithSource:(NSString *)source RB_SWIFT_NAME(from(source:)); + +- (uint32_t)addErrorHandler:(void (^)(NSError *error))handler; +- (void)removeErrorHandler:(uint32_t)token; + +@end + +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBSurface.h b/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBSurface.h new file mode 100644 index 0000000..87eba46 --- /dev/null +++ b/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RBSurface.h @@ -0,0 +1,16 @@ +// +// RBSurface.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include + +@interface RBSurface : NSObject +@end + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RenderBox.h b/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RenderBox.h index f23aa58..eac1d00 100644 --- a/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RenderBox.h +++ b/RB/2024/RenderBox.xcframework/macos-arm64e-arm64-x86_64/RenderBox.framework/Versions/A/Headers/RenderBox.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +25,9 @@ #include #include #include +#include +#include +#include #include #include #include diff --git a/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBDevice.h b/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBDevice.h index 44d0dce..67962e6 100644 --- a/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBDevice.h +++ b/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBDevice.h @@ -13,6 +13,7 @@ #include #include +@class RBShader; @protocol MTLCaptureScope, MTLDevice, OS_dispatch_queue; RB_ASSUME_NONNULL_BEGIN @@ -44,7 +45,9 @@ RB_ASSUME_NONNULL_BEGIN - (instancetype)initWithDevice:(id)device; - (nullable CGImageRef)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer; - (void)collectResources; -- (void)compileShader:(id)shader completionQueue:(nullable id)queue handler:(nullable id /* block */)handler; +- (void)compileShader:(RBShader *)shader + completionQueue:(nullable dispatch_queue_t)queue + handler:(void (^ _Nullable)(NSError *_Nullable error))handler; - (BOOL)compileShader:(id)shader error:(id _Nullable * _Nullable)error; - (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats; - (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler; diff --git a/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBImage.h b/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBImage.h new file mode 100644 index 0000000..1270bfb --- /dev/null +++ b/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBImage.h @@ -0,0 +1,46 @@ +// +// RBImage.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include +#include +#include + +RB_ASSUME_NONNULL_BEGIN +RB_IMPLICIT_BRIDGING_ENABLED +RB_EXTERN_C_BEGIN + +typedef struct { + int32_t type; + void *_Nullable data; +} RBImage; + +typedef struct { + CGFloat top, left, bottom, right; +} RBImageCapInsets; + +RB_EXPORT CGAffineTransform RBImageTransform(CGSize pixelSize, CGRect destination, CGRect source) RB_SWIFT_NAME(RBImage.transform(pixelSize:destination:source:)); +RB_EXPORT CGAffineTransform RBImageSimpleTransform(CGRect destination) RB_SWIFT_NAME(RBImage.transform(for:)); +RB_EXPORT CGAffineTransform RBTiledImageTransform(CGSize pixelSize, CGFloat scale, CGPoint origin, CGRect source) RB_SWIFT_NAME(RBImage.tiledTransform(pixelSize:scale:origin:source:)); + +// These factories borrow their input. Keep the source alive while using the image. +RB_EXPORT RBImage RBImageMakeCGImage(CGImageRef image) RB_SWIFT_NAME(RBImage.init(_:)); +RB_EXPORT RBImage RBImageMakeIOSurface(IOSurfaceRef surface) RB_SWIFT_NAME(RBImage.init(surface:)); +RB_EXPORT RBImage RBImageMakeRBSurface(RBSurface *surface) RB_SWIFT_NAME(RBImage.init(renderBoxSurface:)); +RB_EXPORT RBImage RBImageMakeMTLTexture(id texture) RB_SWIFT_NAME(RBImage.init(texture:)); + +// Returns a retained image when the source is a CGImage. +RB_EXPORT CGImageRef _Nullable RBImageCopyCGImage(RBImage image) CF_RETURNS_RETAINED RB_SWIFT_NAME(RBImage.copyCGImage(self:)); + +RB_EXTERN_C_END +RB_IMPLICIT_BRIDGING_DISABLED +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBShader.h b/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBShader.h new file mode 100644 index 0000000..062e2f8 --- /dev/null +++ b/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBShader.h @@ -0,0 +1,63 @@ +// +// RBShader.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include +#include +#include +#include +#include +#include +#include + +RB_ASSUME_NONNULL_BEGIN + +@class RBShader; + +typedef struct { + uint32_t type; + uint32_t flags; + NSUInteger count; + void *_Nullable bytes; + int32_t colorSpace; +} RBShaderArgument; + +typedef CIFilter *_Nullable (^RBShaderCIFilterProvider)(RBShader *shader, CGRect bounds); + +@interface RBShader : NSObject + +@property (nonatomic, readonly, nullable) RBShaderLibrary *library; +@property (nonatomic) int32_t type; +@property (nonatomic, copy, readonly, nullable) NSString *function; +@property (nonatomic, readonly) NSUInteger numberOfArguments; +@property (nonatomic, copy, nullable) RBShaderCIFilterProvider CIFilterProvider API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +@property (nonatomic) CGAffineTransform CIFilterCTM API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +- (instancetype)initWithLibrary:(RBShaderLibrary *)library function:(NSString *)function; +- (instancetype)initWithSystemShader:(NSString *)function API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +- (void)removeAllArguments; +// The shader owns the argument bytes. Read them before modifying the arguments. +- (RBShaderArgument)argumentAtIndex:(NSUInteger)index; +- (float)argumentHeadroomAtIndex:(NSUInteger)index API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +- (void)setArgumentHeadroom:(float)headroom atIndex:(NSUInteger)index API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +- (void)setArgumentBytes:(const void *_Nullable)bytes atIndex:(NSUInteger)index type:(uint32_t)type count:(NSUInteger)count flags:(uint32_t)flags RB_SWIFT_NAME(setBytes(_:at:type:count:flags:)); +- (void)setArgumentData:(NSData *)data atIndex:(NSUInteger)index type:(uint32_t)type flags:(uint32_t)flags RB_SWIFT_NAME(setData(_:at:type:flags:)); +- (void)setArgumentColorSpace:(RBColorSpace)space atIndex:(NSUInteger)index RB_SWIFT_NAME(setColorSpace(_:at:)); + +@end + +RB_EXTERN_C_BEGIN +RB_EXPORT id RBArchiveDelegate(uint32_t flags); +RB_EXTERN_C_END + +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBShaderLibrary.h b/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBShaderLibrary.h new file mode 100644 index 0000000..706678b --- /dev/null +++ b/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBShaderLibrary.h @@ -0,0 +1,42 @@ +// +// RBShaderLibrary.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include + +RB_ASSUME_NONNULL_BEGIN + +@interface RBShaderLibrary : NSObject + +@property (class, nonatomic, readonly) RBShaderLibrary *defaultLibrary RB_SWIFT_NAME(standard); +@property (class, nonatomic, readonly) RBShaderLibrary *systemLibrary RB_SWIFT_NAME(system) API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +@property (nonatomic, readonly, nullable) NSBundle *bundle; +@property (nonatomic, copy, readonly, nullable) NSData *data; +@property (nonatomic, copy, readonly, nullable) NSURL *URL; +@property (nonatomic, readonly, nullable) id metalLibrary; +@property (nonatomic, copy, readonly, nullable) NSString *source; +@property (nonatomic) int32_t ABIVersion API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +@property (nonatomic, copy, nullable) NSURL *binaryArchiveURL API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + ++ (RBShaderLibrary *)defaultLibraryWithBundle:(NSBundle *)bundle RB_SWIFT_NAME(inBundle(_:)); ++ (RBShaderLibrary *)libraryWithData:(NSData *)data RB_SWIFT_NAME(from(data:)); ++ (RBShaderLibrary *)libraryWithContentsOfURL:(NSURL *)url RB_SWIFT_NAME(from(url:)); ++ (RBShaderLibrary *)libraryWithMetalLibrary:(id)library RB_SWIFT_NAME(from(metalLibrary:)); ++ (RBShaderLibrary *)libraryWithSource:(NSString *)source RB_SWIFT_NAME(from(source:)); + +- (uint32_t)addErrorHandler:(void (^)(NSError *error))handler; +- (void)removeErrorHandler:(uint32_t)token; + +@end + +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBSurface.h b/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBSurface.h new file mode 100644 index 0000000..87eba46 --- /dev/null +++ b/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RBSurface.h @@ -0,0 +1,16 @@ +// +// RBSurface.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include + +@interface RBSurface : NSObject +@end + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RenderBox.h b/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RenderBox.h index f23aa58..eac1d00 100644 --- a/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RenderBox.h +++ b/RB/2024/RenderBox.xcframework/xros-arm64-arm64e/RenderBox.framework/Headers/RenderBox.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +25,9 @@ #include #include #include +#include +#include +#include #include #include #include diff --git a/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBDevice.h b/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBDevice.h index 44d0dce..67962e6 100644 --- a/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBDevice.h +++ b/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBDevice.h @@ -13,6 +13,7 @@ #include #include +@class RBShader; @protocol MTLCaptureScope, MTLDevice, OS_dispatch_queue; RB_ASSUME_NONNULL_BEGIN @@ -44,7 +45,9 @@ RB_ASSUME_NONNULL_BEGIN - (instancetype)initWithDevice:(id)device; - (nullable CGImageRef)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer; - (void)collectResources; -- (void)compileShader:(id)shader completionQueue:(nullable id)queue handler:(nullable id /* block */)handler; +- (void)compileShader:(RBShader *)shader + completionQueue:(nullable dispatch_queue_t)queue + handler:(void (^ _Nullable)(NSError *_Nullable error))handler; - (BOOL)compileShader:(id)shader error:(id _Nullable * _Nullable)error; - (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats; - (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler; diff --git a/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBImage.h b/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBImage.h new file mode 100644 index 0000000..1270bfb --- /dev/null +++ b/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBImage.h @@ -0,0 +1,46 @@ +// +// RBImage.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include +#include +#include + +RB_ASSUME_NONNULL_BEGIN +RB_IMPLICIT_BRIDGING_ENABLED +RB_EXTERN_C_BEGIN + +typedef struct { + int32_t type; + void *_Nullable data; +} RBImage; + +typedef struct { + CGFloat top, left, bottom, right; +} RBImageCapInsets; + +RB_EXPORT CGAffineTransform RBImageTransform(CGSize pixelSize, CGRect destination, CGRect source) RB_SWIFT_NAME(RBImage.transform(pixelSize:destination:source:)); +RB_EXPORT CGAffineTransform RBImageSimpleTransform(CGRect destination) RB_SWIFT_NAME(RBImage.transform(for:)); +RB_EXPORT CGAffineTransform RBTiledImageTransform(CGSize pixelSize, CGFloat scale, CGPoint origin, CGRect source) RB_SWIFT_NAME(RBImage.tiledTransform(pixelSize:scale:origin:source:)); + +// These factories borrow their input. Keep the source alive while using the image. +RB_EXPORT RBImage RBImageMakeCGImage(CGImageRef image) RB_SWIFT_NAME(RBImage.init(_:)); +RB_EXPORT RBImage RBImageMakeIOSurface(IOSurfaceRef surface) RB_SWIFT_NAME(RBImage.init(surface:)); +RB_EXPORT RBImage RBImageMakeRBSurface(RBSurface *surface) RB_SWIFT_NAME(RBImage.init(renderBoxSurface:)); +RB_EXPORT RBImage RBImageMakeMTLTexture(id texture) RB_SWIFT_NAME(RBImage.init(texture:)); + +// Returns a retained image when the source is a CGImage. +RB_EXPORT CGImageRef _Nullable RBImageCopyCGImage(RBImage image) CF_RETURNS_RETAINED RB_SWIFT_NAME(RBImage.copyCGImage(self:)); + +RB_EXTERN_C_END +RB_IMPLICIT_BRIDGING_DISABLED +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShader.h b/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShader.h new file mode 100644 index 0000000..062e2f8 --- /dev/null +++ b/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShader.h @@ -0,0 +1,63 @@ +// +// RBShader.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include +#include +#include +#include +#include +#include +#include + +RB_ASSUME_NONNULL_BEGIN + +@class RBShader; + +typedef struct { + uint32_t type; + uint32_t flags; + NSUInteger count; + void *_Nullable bytes; + int32_t colorSpace; +} RBShaderArgument; + +typedef CIFilter *_Nullable (^RBShaderCIFilterProvider)(RBShader *shader, CGRect bounds); + +@interface RBShader : NSObject + +@property (nonatomic, readonly, nullable) RBShaderLibrary *library; +@property (nonatomic) int32_t type; +@property (nonatomic, copy, readonly, nullable) NSString *function; +@property (nonatomic, readonly) NSUInteger numberOfArguments; +@property (nonatomic, copy, nullable) RBShaderCIFilterProvider CIFilterProvider API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +@property (nonatomic) CGAffineTransform CIFilterCTM API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +- (instancetype)initWithLibrary:(RBShaderLibrary *)library function:(NSString *)function; +- (instancetype)initWithSystemShader:(NSString *)function API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +- (void)removeAllArguments; +// The shader owns the argument bytes. Read them before modifying the arguments. +- (RBShaderArgument)argumentAtIndex:(NSUInteger)index; +- (float)argumentHeadroomAtIndex:(NSUInteger)index API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +- (void)setArgumentHeadroom:(float)headroom atIndex:(NSUInteger)index API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +- (void)setArgumentBytes:(const void *_Nullable)bytes atIndex:(NSUInteger)index type:(uint32_t)type count:(NSUInteger)count flags:(uint32_t)flags RB_SWIFT_NAME(setBytes(_:at:type:count:flags:)); +- (void)setArgumentData:(NSData *)data atIndex:(NSUInteger)index type:(uint32_t)type flags:(uint32_t)flags RB_SWIFT_NAME(setData(_:at:type:flags:)); +- (void)setArgumentColorSpace:(RBColorSpace)space atIndex:(NSUInteger)index RB_SWIFT_NAME(setColorSpace(_:at:)); + +@end + +RB_EXTERN_C_BEGIN +RB_EXPORT id RBArchiveDelegate(uint32_t flags); +RB_EXTERN_C_END + +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShaderLibrary.h b/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShaderLibrary.h new file mode 100644 index 0000000..706678b --- /dev/null +++ b/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBShaderLibrary.h @@ -0,0 +1,42 @@ +// +// RBShaderLibrary.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include + +RB_ASSUME_NONNULL_BEGIN + +@interface RBShaderLibrary : NSObject + +@property (class, nonatomic, readonly) RBShaderLibrary *defaultLibrary RB_SWIFT_NAME(standard); +@property (class, nonatomic, readonly) RBShaderLibrary *systemLibrary RB_SWIFT_NAME(system) API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +@property (nonatomic, readonly, nullable) NSBundle *bundle; +@property (nonatomic, copy, readonly, nullable) NSData *data; +@property (nonatomic, copy, readonly, nullable) NSURL *URL; +@property (nonatomic, readonly, nullable) id metalLibrary; +@property (nonatomic, copy, readonly, nullable) NSString *source; +@property (nonatomic) int32_t ABIVersion API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +@property (nonatomic, copy, nullable) NSURL *binaryArchiveURL API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + ++ (RBShaderLibrary *)defaultLibraryWithBundle:(NSBundle *)bundle RB_SWIFT_NAME(inBundle(_:)); ++ (RBShaderLibrary *)libraryWithData:(NSData *)data RB_SWIFT_NAME(from(data:)); ++ (RBShaderLibrary *)libraryWithContentsOfURL:(NSURL *)url RB_SWIFT_NAME(from(url:)); ++ (RBShaderLibrary *)libraryWithMetalLibrary:(id)library RB_SWIFT_NAME(from(metalLibrary:)); ++ (RBShaderLibrary *)libraryWithSource:(NSString *)source RB_SWIFT_NAME(from(source:)); + +- (uint32_t)addErrorHandler:(void (^)(NSError *error))handler; +- (void)removeErrorHandler:(uint32_t)token; + +@end + +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBSurface.h b/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBSurface.h new file mode 100644 index 0000000..87eba46 --- /dev/null +++ b/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RBSurface.h @@ -0,0 +1,16 @@ +// +// RBSurface.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include + +@interface RBSurface : NSObject +@end + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RenderBox.h b/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RenderBox.h index f23aa58..eac1d00 100644 --- a/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RenderBox.h +++ b/RB/2024/RenderBox.xcframework/xros-arm64-x86_64-simulator/RenderBox.framework/Headers/RenderBox.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +25,9 @@ #include #include #include +#include +#include +#include #include #include #include diff --git a/RB/2024/Sources/Headers/RBDevice.h b/RB/2024/Sources/Headers/RBDevice.h index 44d0dce..67962e6 100644 --- a/RB/2024/Sources/Headers/RBDevice.h +++ b/RB/2024/Sources/Headers/RBDevice.h @@ -13,6 +13,7 @@ #include #include +@class RBShader; @protocol MTLCaptureScope, MTLDevice, OS_dispatch_queue; RB_ASSUME_NONNULL_BEGIN @@ -44,7 +45,9 @@ RB_ASSUME_NONNULL_BEGIN - (instancetype)initWithDevice:(id)device; - (nullable CGImageRef)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer; - (void)collectResources; -- (void)compileShader:(id)shader completionQueue:(nullable id)queue handler:(nullable id /* block */)handler; +- (void)compileShader:(RBShader *)shader + completionQueue:(nullable dispatch_queue_t)queue + handler:(void (^ _Nullable)(NSError *_Nullable error))handler; - (BOOL)compileShader:(id)shader error:(id _Nullable * _Nullable)error; - (nullable id)pipelineDescriptions:(nullable id)descriptions extraColorFormats:(nullable id)formats; - (void)renderImageInRect:(CGRect)rect options:(nullable id)options renderer:(nullable id /* block */)renderer completionQueue:(nullable id)queue handler:(nullable id /* block */)handler; diff --git a/RB/2024/Sources/Headers/RBImage.h b/RB/2024/Sources/Headers/RBImage.h new file mode 100644 index 0000000..1270bfb --- /dev/null +++ b/RB/2024/Sources/Headers/RBImage.h @@ -0,0 +1,46 @@ +// +// RBImage.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include +#include +#include + +RB_ASSUME_NONNULL_BEGIN +RB_IMPLICIT_BRIDGING_ENABLED +RB_EXTERN_C_BEGIN + +typedef struct { + int32_t type; + void *_Nullable data; +} RBImage; + +typedef struct { + CGFloat top, left, bottom, right; +} RBImageCapInsets; + +RB_EXPORT CGAffineTransform RBImageTransform(CGSize pixelSize, CGRect destination, CGRect source) RB_SWIFT_NAME(RBImage.transform(pixelSize:destination:source:)); +RB_EXPORT CGAffineTransform RBImageSimpleTransform(CGRect destination) RB_SWIFT_NAME(RBImage.transform(for:)); +RB_EXPORT CGAffineTransform RBTiledImageTransform(CGSize pixelSize, CGFloat scale, CGPoint origin, CGRect source) RB_SWIFT_NAME(RBImage.tiledTransform(pixelSize:scale:origin:source:)); + +// These factories borrow their input. Keep the source alive while using the image. +RB_EXPORT RBImage RBImageMakeCGImage(CGImageRef image) RB_SWIFT_NAME(RBImage.init(_:)); +RB_EXPORT RBImage RBImageMakeIOSurface(IOSurfaceRef surface) RB_SWIFT_NAME(RBImage.init(surface:)); +RB_EXPORT RBImage RBImageMakeRBSurface(RBSurface *surface) RB_SWIFT_NAME(RBImage.init(renderBoxSurface:)); +RB_EXPORT RBImage RBImageMakeMTLTexture(id texture) RB_SWIFT_NAME(RBImage.init(texture:)); + +// Returns a retained image when the source is a CGImage. +RB_EXPORT CGImageRef _Nullable RBImageCopyCGImage(RBImage image) CF_RETURNS_RETAINED RB_SWIFT_NAME(RBImage.copyCGImage(self:)); + +RB_EXTERN_C_END +RB_IMPLICIT_BRIDGING_DISABLED +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/Sources/Headers/RBShader.h b/RB/2024/Sources/Headers/RBShader.h new file mode 100644 index 0000000..062e2f8 --- /dev/null +++ b/RB/2024/Sources/Headers/RBShader.h @@ -0,0 +1,63 @@ +// +// RBShader.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include +#include +#include +#include +#include +#include +#include + +RB_ASSUME_NONNULL_BEGIN + +@class RBShader; + +typedef struct { + uint32_t type; + uint32_t flags; + NSUInteger count; + void *_Nullable bytes; + int32_t colorSpace; +} RBShaderArgument; + +typedef CIFilter *_Nullable (^RBShaderCIFilterProvider)(RBShader *shader, CGRect bounds); + +@interface RBShader : NSObject + +@property (nonatomic, readonly, nullable) RBShaderLibrary *library; +@property (nonatomic) int32_t type; +@property (nonatomic, copy, readonly, nullable) NSString *function; +@property (nonatomic, readonly) NSUInteger numberOfArguments; +@property (nonatomic, copy, nullable) RBShaderCIFilterProvider CIFilterProvider API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +@property (nonatomic) CGAffineTransform CIFilterCTM API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +- (instancetype)initWithLibrary:(RBShaderLibrary *)library function:(NSString *)function; +- (instancetype)initWithSystemShader:(NSString *)function API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +- (void)removeAllArguments; +// The shader owns the argument bytes. Read them before modifying the arguments. +- (RBShaderArgument)argumentAtIndex:(NSUInteger)index; +- (float)argumentHeadroomAtIndex:(NSUInteger)index API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +- (void)setArgumentHeadroom:(float)headroom atIndex:(NSUInteger)index API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +- (void)setArgumentBytes:(const void *_Nullable)bytes atIndex:(NSUInteger)index type:(uint32_t)type count:(NSUInteger)count flags:(uint32_t)flags RB_SWIFT_NAME(setBytes(_:at:type:count:flags:)); +- (void)setArgumentData:(NSData *)data atIndex:(NSUInteger)index type:(uint32_t)type flags:(uint32_t)flags RB_SWIFT_NAME(setData(_:at:type:flags:)); +- (void)setArgumentColorSpace:(RBColorSpace)space atIndex:(NSUInteger)index RB_SWIFT_NAME(setColorSpace(_:at:)); + +@end + +RB_EXTERN_C_BEGIN +RB_EXPORT id RBArchiveDelegate(uint32_t flags); +RB_EXTERN_C_END + +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/Sources/Headers/RBShaderLibrary.h b/RB/2024/Sources/Headers/RBShaderLibrary.h new file mode 100644 index 0000000..706678b --- /dev/null +++ b/RB/2024/Sources/Headers/RBShaderLibrary.h @@ -0,0 +1,42 @@ +// +// RBShaderLibrary.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include +#include + +RB_ASSUME_NONNULL_BEGIN + +@interface RBShaderLibrary : NSObject + +@property (class, nonatomic, readonly) RBShaderLibrary *defaultLibrary RB_SWIFT_NAME(standard); +@property (class, nonatomic, readonly) RBShaderLibrary *systemLibrary RB_SWIFT_NAME(system) API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + +@property (nonatomic, readonly, nullable) NSBundle *bundle; +@property (nonatomic, copy, readonly, nullable) NSData *data; +@property (nonatomic, copy, readonly, nullable) NSURL *URL; +@property (nonatomic, readonly, nullable) id metalLibrary; +@property (nonatomic, copy, readonly, nullable) NSString *source; +@property (nonatomic) int32_t ABIVersion API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); +@property (nonatomic, copy, nullable) NSURL *binaryArchiveURL API_AVAILABLE(macos(26.0), ios(26.0), visionos(26.0)); + ++ (RBShaderLibrary *)defaultLibraryWithBundle:(NSBundle *)bundle RB_SWIFT_NAME(inBundle(_:)); ++ (RBShaderLibrary *)libraryWithData:(NSData *)data RB_SWIFT_NAME(from(data:)); ++ (RBShaderLibrary *)libraryWithContentsOfURL:(NSURL *)url RB_SWIFT_NAME(from(url:)); ++ (RBShaderLibrary *)libraryWithMetalLibrary:(id)library RB_SWIFT_NAME(from(metalLibrary:)); ++ (RBShaderLibrary *)libraryWithSource:(NSString *)source RB_SWIFT_NAME(from(source:)); + +- (uint32_t)addErrorHandler:(void (^)(NSError *error))handler; +- (void)removeErrorHandler:(uint32_t)token; + +@end + +RB_ASSUME_NONNULL_END + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/Sources/Headers/RBSurface.h b/RB/2024/Sources/Headers/RBSurface.h new file mode 100644 index 0000000..87eba46 --- /dev/null +++ b/RB/2024/Sources/Headers/RBSurface.h @@ -0,0 +1,16 @@ +// +// RBSurface.h +// RenderBox + +#pragma once + +#include + +#if RB_OBJC_FOUNDATION + +#include + +@interface RBSurface : NSObject +@end + +#endif /* RB_OBJC_FOUNDATION */ diff --git a/RB/2024/Sources/Headers/RenderBox.h b/RB/2024/Sources/Headers/RenderBox.h index f23aa58..eac1d00 100644 --- a/RB/2024/Sources/Headers/RenderBox.h +++ b/RB/2024/Sources/Headers/RenderBox.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +25,9 @@ #include #include #include +#include +#include +#include #include #include #include