From b8e75dc7c4b928ee621dbcbe920c79c03e8d5285 Mon Sep 17 00:00:00 2001 From: Kyle Date: Tue, 24 Nov 2026 02:43:18 +0800 Subject: [PATCH] feat(CoreUI): expose macOS widget rendering and style effects --- .../CoreUI.framework/Headers/CUICatalog.h | 11 ++++ .../CoreUI.framework/Headers/CUIRenderer.h | 44 ++++++++++++- .../Headers/CUIStyleEffectConfiguration.h | 66 +++++++++++++++++++ .../CoreUI.framework/Headers/CUICatalog.h | 11 ++++ .../CoreUI.framework/Headers/CUIRenderer.h | 44 ++++++++++++- .../Headers/CUIStyleEffectConfiguration.h | 66 +++++++++++++++++++ .../Versions/A/Headers/CUICatalog.h | 11 ++++ .../Versions/A/Headers/CUIRenderer.h | 44 ++++++++++++- .../A/Headers/CUIStyleEffectConfiguration.h | 66 +++++++++++++++++++ .../CoreUI.framework/Headers/CUICatalog.h | 11 ++++ .../CoreUI.framework/Headers/CUIRenderer.h | 44 ++++++++++++- .../Headers/CUIStyleEffectConfiguration.h | 66 +++++++++++++++++++ .../CoreUI.framework/Headers/CUICatalog.h | 11 ++++ .../CoreUI.framework/Headers/CUIRenderer.h | 44 ++++++++++++- .../Headers/CUIStyleEffectConfiguration.h | 66 +++++++++++++++++++ CoreUI/2024/Sources/Headers/CUICatalog.h | 11 ++++ CoreUI/2024/Sources/Headers/CUIRenderer.h | 44 ++++++++++++- .../Headers/CUIStyleEffectConfiguration.h | 66 +++++++++++++++++++ 18 files changed, 720 insertions(+), 6 deletions(-) create mode 100644 CoreUI/2024/CoreUI.xcframework/ios-arm64-arm64e/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h create mode 100644 CoreUI/2024/CoreUI.xcframework/ios-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h create mode 100644 CoreUI/2024/CoreUI.xcframework/macos-arm64e-arm64-x86_64/CoreUI.framework/Versions/A/Headers/CUIStyleEffectConfiguration.h create mode 100644 CoreUI/2024/CoreUI.xcframework/xros-arm64-arm64e/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h create mode 100644 CoreUI/2024/CoreUI.xcframework/xros-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h create mode 100644 CoreUI/2024/Sources/Headers/CUIStyleEffectConfiguration.h diff --git a/CoreUI/2024/CoreUI.xcframework/ios-arm64-arm64e/CoreUI.framework/Headers/CUICatalog.h b/CoreUI/2024/CoreUI.xcframework/ios-arm64-arm64e/CoreUI.framework/Headers/CUICatalog.h index 25c966e..6de8dd0 100644 --- a/CoreUI/2024/CoreUI.xcframework/ios-arm64-arm64e/CoreUI.framework/Headers/CUICatalog.h +++ b/CoreUI/2024/CoreUI.xcframework/ios-arm64-arm64e/CoreUI.framework/Headers/CUICatalog.h @@ -13,8 +13,10 @@ #import #import #import +#import #import #import +#import CUI_ASSUME_NONNULL_BEGIN @@ -118,6 +120,15 @@ CUI_ASSUME_NONNULL_BEGIN // MARK: - Utility - (BOOL)containsLookupForName:(NSString *)name; +#if TARGET_OS_OSX +- (BOOL)hasCustomizedAppearanceForWidget:(NSString *)widget; +- (nullable CGColorRef)equivalentForegroundColorForStylePresetWithName:(nullable NSString *)name + styleConfiguration:(CUIStyleEffectConfiguration *)configuration + baseForegroundColor:(nullable CGColorRef)color CF_RETURNS_NOT_RETAINED; +- (nullable id)compositingFilterForStylePresetWithName:(nullable NSString *)name + styleConfiguration:(CUIStyleEffectConfiguration *)configuration + foregroundColor:(nullable CGColorRef)color; +#endif - (NSArray *)appearanceNames; - (nullable NSArray *)allImageNames; - (void)clearCachedImageResources; diff --git a/CoreUI/2024/CoreUI.xcframework/ios-arm64-arm64e/CoreUI.framework/Headers/CUIRenderer.h b/CoreUI/2024/CoreUI.xcframework/ios-arm64-arm64e/CoreUI.framework/Headers/CUIRenderer.h index c045a6a..04b7afa 100644 --- a/CoreUI/2024/CoreUI.xcframework/ios-arm64-arm64e/CoreUI.framework/Headers/CUIRenderer.h +++ b/CoreUI/2024/CoreUI.xcframework/ios-arm64-arm64e/CoreUI.framework/Headers/CUIRenderer.h @@ -17,10 +17,34 @@ CUI_EXTERN_C_BEGIN CUI_ASSUME_NONNULL_BEGIN -typedef struct CUIRenderer *CUIRendererRef; +typedef struct OpaqueCUIRendererRef *CUIRendererRef; CUI_EXPORT const CFStringRef kCUIRendererThemeFileBundleIdentifierKey; CUI_EXPORT const CFStringRef kCUIRendererThemeFileNameKey; +CUI_EXPORT const CFStringRef kCUIRendererDefaultBlendModeKey; + +CUI_EXPORT const CFStringRef kCUIWidgetKey; +CUI_EXPORT const CFStringRef kCUIWidgetTitleBarCloseBox; +CUI_EXPORT const CFStringRef kCUIWidgetDisclosureTriangle; +CUI_EXPORT const CFStringRef kCUIWidgetOverlayScrollBar; +CUI_EXPORT const CFStringRef kCUIForegroundTintColor; +CUI_EXPORT const CFStringRef kCUIBezelTintColor; +CUI_EXPORT const CFStringRef kCUIColorTemperatureAdjustment; +CUI_EXPORT const CFStringRef kCUIBezelBrightnessMultiplier; +CUI_EXPORT const CFStringRef kCUITextGlyphBrightnessMultiplier; +CUI_EXPORT const CFStringRef kCUIScaleKey; +CUI_EXPORT const CFStringRef kCUIIsFlippedKey; +CUI_EXPORT const CFStringRef kCUIStateActive; +CUI_EXPORT const CFStringRef kCUIStateInactive; +CUI_EXPORT const CFStringRef kCUIStatePressed; +CUI_EXPORT const CFStringRef kCUIMeasureWidth; +CUI_EXPORT const CFStringRef kCUIMeasureHeight; +CUI_EXPORT const CFStringRef kCUIMeasureContentInsetTopRight; +CUI_EXPORT const CFStringRef kCUIMeasureContentInsetBottomLeft; +CUI_EXPORT const CFStringRef kCUIMeasureEdgeInsetTopRight; +CUI_EXPORT const CFStringRef kCUIMeasureEdgeInsetBottomLeft; +CUI_EXPORT const CFStringRef kCUIMeasureBaseline; +CUI_EXPORT const CFStringRef kCUIMeasureBlendMode; CUI_EXPORT CUIRendererRef _Nullable CUICreateRenderer(CFDictionaryRef options); CUI_EXPORT void CUIRendererCopyProperties(CUIRendererRef renderer, @@ -30,6 +54,24 @@ CUI_EXPORT CGColorRef _Nullable CUICopyCustomColorWithOptions(CUIRendererRef ren CFStringRef name, CFDictionaryRef options) CF_RETURNS_RETAINED; +CUI_EXPORT int32_t CUIDraw(CUIRendererRef _Nullable renderer, + CGRect bounds, + CGContextRef context, + CFDictionaryRef options, + CFDictionaryRef _Nullable * _Nullable result); +CUI_EXPORT int32_t CUICreateLayerContents(CUIRendererRef renderer, + CFDictionaryRef options, + CGImageRef _Nullable * _Nonnull image, + CGRect *contentsCenter); +CUI_EXPORT int32_t CUICopyMeasurements(CUIRendererRef renderer, + CGRect bounds, + CGContextRef _Nullable context, + CFDictionaryRef options, + CFArrayRef keys, + CFDictionaryRef _Nullable * _Nonnull measurements); +CUI_EXPORT uint32_t CUICurrentPlatform(void); +CUI_EXPORT uint32_t CUIMaxScaleForTargetPlatform(uint32_t platform); + CUI_ASSUME_NONNULL_END CUI_EXTERN_C_END diff --git a/CoreUI/2024/CoreUI.xcframework/ios-arm64-arm64e/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h b/CoreUI/2024/CoreUI.xcframework/ios-arm64-arm64e/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h new file mode 100644 index 0000000..95653b2 --- /dev/null +++ b/CoreUI/2024/CoreUI.xcframework/ios-arm64-arm64e/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h @@ -0,0 +1,66 @@ +// +// CUIStyleEffectConfiguration.h +// CoreUI +// +// Audited for 918.3 +// Status: WIP + +#ifndef CUIStyleEffectConfiguration_h +#define CUIStyleEffectConfiguration_h + +#import +#import +#import + +#if TARGET_OS_OSX + +CUI_ASSUME_NONNULL_BEGIN + +CUI_EXPORT const CFStringRef kCUIBackgroundTypeLight; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeDark; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeBorderless; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeSourceList; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeSelection; + +typedef CUI_ENUM(NSInteger, CoreThemeState) { + kCoreThemeStateNormal = 0, + kCoreThemeStateRollover = 1, + kCoreThemeStatePressed = 2, + obsolete_kCoreThemeStateInactive CUI_SWIFT_NAME(CoreThemeState.obsoleteInactive) = 3, + kCoreThemeStateDisabled = 4, + kCoreThemeStateDeeplyPressed = 5, +}; + +typedef CUI_ENUM(NSInteger, CoreThemePresentationState) { + kCoreThemePresentationStateActive = 0, + kCoreThemePresentationStateInactive = 1, + kCoreThemePresentationStateActiveMain = 2, +}; + +typedef CUI_ENUM(NSInteger, CoreThemeValue) { + kCoreThemeValueOff = 0, + kCoreThemeValueOn = 1, + kCoreThemeValueMixed = 2, +}; + +@interface CUIStyleEffectConfiguration : NSObject +@property (nonatomic) CoreThemeState state; +@property (nonatomic) CoreThemePresentationState presentationState; +@property (nonatomic) CoreThemeValue value; +@property (nonatomic) CGFloat effectScale; +@property (nonatomic) BOOL useSimplifiedEffect; +@property (nonatomic) BOOL foregroundColorShouldTintEffects; +@property (nonatomic) double brightnessMultiplier; +@property (nonatomic) NSUInteger colorTemperature; +@end + +@interface CUIBackgroundStyleEffectConfiguration : CUIStyleEffectConfiguration +@property (nonatomic, copy) NSString *backgroundType; +@property (nonatomic) BOOL shouldRespectOutputBlending; +- (void)setSelectionType:(NSInteger)selectionType; +@end + +CUI_ASSUME_NONNULL_END + +#endif /* TARGET_OS_OSX */ +#endif /* CUIStyleEffectConfiguration_h */ diff --git a/CoreUI/2024/CoreUI.xcframework/ios-arm64-x86_64-simulator/CoreUI.framework/Headers/CUICatalog.h b/CoreUI/2024/CoreUI.xcframework/ios-arm64-x86_64-simulator/CoreUI.framework/Headers/CUICatalog.h index 25c966e..6de8dd0 100644 --- a/CoreUI/2024/CoreUI.xcframework/ios-arm64-x86_64-simulator/CoreUI.framework/Headers/CUICatalog.h +++ b/CoreUI/2024/CoreUI.xcframework/ios-arm64-x86_64-simulator/CoreUI.framework/Headers/CUICatalog.h @@ -13,8 +13,10 @@ #import #import #import +#import #import #import +#import CUI_ASSUME_NONNULL_BEGIN @@ -118,6 +120,15 @@ CUI_ASSUME_NONNULL_BEGIN // MARK: - Utility - (BOOL)containsLookupForName:(NSString *)name; +#if TARGET_OS_OSX +- (BOOL)hasCustomizedAppearanceForWidget:(NSString *)widget; +- (nullable CGColorRef)equivalentForegroundColorForStylePresetWithName:(nullable NSString *)name + styleConfiguration:(CUIStyleEffectConfiguration *)configuration + baseForegroundColor:(nullable CGColorRef)color CF_RETURNS_NOT_RETAINED; +- (nullable id)compositingFilterForStylePresetWithName:(nullable NSString *)name + styleConfiguration:(CUIStyleEffectConfiguration *)configuration + foregroundColor:(nullable CGColorRef)color; +#endif - (NSArray *)appearanceNames; - (nullable NSArray *)allImageNames; - (void)clearCachedImageResources; diff --git a/CoreUI/2024/CoreUI.xcframework/ios-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIRenderer.h b/CoreUI/2024/CoreUI.xcframework/ios-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIRenderer.h index c045a6a..04b7afa 100644 --- a/CoreUI/2024/CoreUI.xcframework/ios-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIRenderer.h +++ b/CoreUI/2024/CoreUI.xcframework/ios-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIRenderer.h @@ -17,10 +17,34 @@ CUI_EXTERN_C_BEGIN CUI_ASSUME_NONNULL_BEGIN -typedef struct CUIRenderer *CUIRendererRef; +typedef struct OpaqueCUIRendererRef *CUIRendererRef; CUI_EXPORT const CFStringRef kCUIRendererThemeFileBundleIdentifierKey; CUI_EXPORT const CFStringRef kCUIRendererThemeFileNameKey; +CUI_EXPORT const CFStringRef kCUIRendererDefaultBlendModeKey; + +CUI_EXPORT const CFStringRef kCUIWidgetKey; +CUI_EXPORT const CFStringRef kCUIWidgetTitleBarCloseBox; +CUI_EXPORT const CFStringRef kCUIWidgetDisclosureTriangle; +CUI_EXPORT const CFStringRef kCUIWidgetOverlayScrollBar; +CUI_EXPORT const CFStringRef kCUIForegroundTintColor; +CUI_EXPORT const CFStringRef kCUIBezelTintColor; +CUI_EXPORT const CFStringRef kCUIColorTemperatureAdjustment; +CUI_EXPORT const CFStringRef kCUIBezelBrightnessMultiplier; +CUI_EXPORT const CFStringRef kCUITextGlyphBrightnessMultiplier; +CUI_EXPORT const CFStringRef kCUIScaleKey; +CUI_EXPORT const CFStringRef kCUIIsFlippedKey; +CUI_EXPORT const CFStringRef kCUIStateActive; +CUI_EXPORT const CFStringRef kCUIStateInactive; +CUI_EXPORT const CFStringRef kCUIStatePressed; +CUI_EXPORT const CFStringRef kCUIMeasureWidth; +CUI_EXPORT const CFStringRef kCUIMeasureHeight; +CUI_EXPORT const CFStringRef kCUIMeasureContentInsetTopRight; +CUI_EXPORT const CFStringRef kCUIMeasureContentInsetBottomLeft; +CUI_EXPORT const CFStringRef kCUIMeasureEdgeInsetTopRight; +CUI_EXPORT const CFStringRef kCUIMeasureEdgeInsetBottomLeft; +CUI_EXPORT const CFStringRef kCUIMeasureBaseline; +CUI_EXPORT const CFStringRef kCUIMeasureBlendMode; CUI_EXPORT CUIRendererRef _Nullable CUICreateRenderer(CFDictionaryRef options); CUI_EXPORT void CUIRendererCopyProperties(CUIRendererRef renderer, @@ -30,6 +54,24 @@ CUI_EXPORT CGColorRef _Nullable CUICopyCustomColorWithOptions(CUIRendererRef ren CFStringRef name, CFDictionaryRef options) CF_RETURNS_RETAINED; +CUI_EXPORT int32_t CUIDraw(CUIRendererRef _Nullable renderer, + CGRect bounds, + CGContextRef context, + CFDictionaryRef options, + CFDictionaryRef _Nullable * _Nullable result); +CUI_EXPORT int32_t CUICreateLayerContents(CUIRendererRef renderer, + CFDictionaryRef options, + CGImageRef _Nullable * _Nonnull image, + CGRect *contentsCenter); +CUI_EXPORT int32_t CUICopyMeasurements(CUIRendererRef renderer, + CGRect bounds, + CGContextRef _Nullable context, + CFDictionaryRef options, + CFArrayRef keys, + CFDictionaryRef _Nullable * _Nonnull measurements); +CUI_EXPORT uint32_t CUICurrentPlatform(void); +CUI_EXPORT uint32_t CUIMaxScaleForTargetPlatform(uint32_t platform); + CUI_ASSUME_NONNULL_END CUI_EXTERN_C_END diff --git a/CoreUI/2024/CoreUI.xcframework/ios-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h b/CoreUI/2024/CoreUI.xcframework/ios-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h new file mode 100644 index 0000000..95653b2 --- /dev/null +++ b/CoreUI/2024/CoreUI.xcframework/ios-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h @@ -0,0 +1,66 @@ +// +// CUIStyleEffectConfiguration.h +// CoreUI +// +// Audited for 918.3 +// Status: WIP + +#ifndef CUIStyleEffectConfiguration_h +#define CUIStyleEffectConfiguration_h + +#import +#import +#import + +#if TARGET_OS_OSX + +CUI_ASSUME_NONNULL_BEGIN + +CUI_EXPORT const CFStringRef kCUIBackgroundTypeLight; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeDark; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeBorderless; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeSourceList; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeSelection; + +typedef CUI_ENUM(NSInteger, CoreThemeState) { + kCoreThemeStateNormal = 0, + kCoreThemeStateRollover = 1, + kCoreThemeStatePressed = 2, + obsolete_kCoreThemeStateInactive CUI_SWIFT_NAME(CoreThemeState.obsoleteInactive) = 3, + kCoreThemeStateDisabled = 4, + kCoreThemeStateDeeplyPressed = 5, +}; + +typedef CUI_ENUM(NSInteger, CoreThemePresentationState) { + kCoreThemePresentationStateActive = 0, + kCoreThemePresentationStateInactive = 1, + kCoreThemePresentationStateActiveMain = 2, +}; + +typedef CUI_ENUM(NSInteger, CoreThemeValue) { + kCoreThemeValueOff = 0, + kCoreThemeValueOn = 1, + kCoreThemeValueMixed = 2, +}; + +@interface CUIStyleEffectConfiguration : NSObject +@property (nonatomic) CoreThemeState state; +@property (nonatomic) CoreThemePresentationState presentationState; +@property (nonatomic) CoreThemeValue value; +@property (nonatomic) CGFloat effectScale; +@property (nonatomic) BOOL useSimplifiedEffect; +@property (nonatomic) BOOL foregroundColorShouldTintEffects; +@property (nonatomic) double brightnessMultiplier; +@property (nonatomic) NSUInteger colorTemperature; +@end + +@interface CUIBackgroundStyleEffectConfiguration : CUIStyleEffectConfiguration +@property (nonatomic, copy) NSString *backgroundType; +@property (nonatomic) BOOL shouldRespectOutputBlending; +- (void)setSelectionType:(NSInteger)selectionType; +@end + +CUI_ASSUME_NONNULL_END + +#endif /* TARGET_OS_OSX */ +#endif /* CUIStyleEffectConfiguration_h */ diff --git a/CoreUI/2024/CoreUI.xcframework/macos-arm64e-arm64-x86_64/CoreUI.framework/Versions/A/Headers/CUICatalog.h b/CoreUI/2024/CoreUI.xcframework/macos-arm64e-arm64-x86_64/CoreUI.framework/Versions/A/Headers/CUICatalog.h index 25c966e..6de8dd0 100644 --- a/CoreUI/2024/CoreUI.xcframework/macos-arm64e-arm64-x86_64/CoreUI.framework/Versions/A/Headers/CUICatalog.h +++ b/CoreUI/2024/CoreUI.xcframework/macos-arm64e-arm64-x86_64/CoreUI.framework/Versions/A/Headers/CUICatalog.h @@ -13,8 +13,10 @@ #import #import #import +#import #import #import +#import CUI_ASSUME_NONNULL_BEGIN @@ -118,6 +120,15 @@ CUI_ASSUME_NONNULL_BEGIN // MARK: - Utility - (BOOL)containsLookupForName:(NSString *)name; +#if TARGET_OS_OSX +- (BOOL)hasCustomizedAppearanceForWidget:(NSString *)widget; +- (nullable CGColorRef)equivalentForegroundColorForStylePresetWithName:(nullable NSString *)name + styleConfiguration:(CUIStyleEffectConfiguration *)configuration + baseForegroundColor:(nullable CGColorRef)color CF_RETURNS_NOT_RETAINED; +- (nullable id)compositingFilterForStylePresetWithName:(nullable NSString *)name + styleConfiguration:(CUIStyleEffectConfiguration *)configuration + foregroundColor:(nullable CGColorRef)color; +#endif - (NSArray *)appearanceNames; - (nullable NSArray *)allImageNames; - (void)clearCachedImageResources; diff --git a/CoreUI/2024/CoreUI.xcframework/macos-arm64e-arm64-x86_64/CoreUI.framework/Versions/A/Headers/CUIRenderer.h b/CoreUI/2024/CoreUI.xcframework/macos-arm64e-arm64-x86_64/CoreUI.framework/Versions/A/Headers/CUIRenderer.h index c045a6a..04b7afa 100644 --- a/CoreUI/2024/CoreUI.xcframework/macos-arm64e-arm64-x86_64/CoreUI.framework/Versions/A/Headers/CUIRenderer.h +++ b/CoreUI/2024/CoreUI.xcframework/macos-arm64e-arm64-x86_64/CoreUI.framework/Versions/A/Headers/CUIRenderer.h @@ -17,10 +17,34 @@ CUI_EXTERN_C_BEGIN CUI_ASSUME_NONNULL_BEGIN -typedef struct CUIRenderer *CUIRendererRef; +typedef struct OpaqueCUIRendererRef *CUIRendererRef; CUI_EXPORT const CFStringRef kCUIRendererThemeFileBundleIdentifierKey; CUI_EXPORT const CFStringRef kCUIRendererThemeFileNameKey; +CUI_EXPORT const CFStringRef kCUIRendererDefaultBlendModeKey; + +CUI_EXPORT const CFStringRef kCUIWidgetKey; +CUI_EXPORT const CFStringRef kCUIWidgetTitleBarCloseBox; +CUI_EXPORT const CFStringRef kCUIWidgetDisclosureTriangle; +CUI_EXPORT const CFStringRef kCUIWidgetOverlayScrollBar; +CUI_EXPORT const CFStringRef kCUIForegroundTintColor; +CUI_EXPORT const CFStringRef kCUIBezelTintColor; +CUI_EXPORT const CFStringRef kCUIColorTemperatureAdjustment; +CUI_EXPORT const CFStringRef kCUIBezelBrightnessMultiplier; +CUI_EXPORT const CFStringRef kCUITextGlyphBrightnessMultiplier; +CUI_EXPORT const CFStringRef kCUIScaleKey; +CUI_EXPORT const CFStringRef kCUIIsFlippedKey; +CUI_EXPORT const CFStringRef kCUIStateActive; +CUI_EXPORT const CFStringRef kCUIStateInactive; +CUI_EXPORT const CFStringRef kCUIStatePressed; +CUI_EXPORT const CFStringRef kCUIMeasureWidth; +CUI_EXPORT const CFStringRef kCUIMeasureHeight; +CUI_EXPORT const CFStringRef kCUIMeasureContentInsetTopRight; +CUI_EXPORT const CFStringRef kCUIMeasureContentInsetBottomLeft; +CUI_EXPORT const CFStringRef kCUIMeasureEdgeInsetTopRight; +CUI_EXPORT const CFStringRef kCUIMeasureEdgeInsetBottomLeft; +CUI_EXPORT const CFStringRef kCUIMeasureBaseline; +CUI_EXPORT const CFStringRef kCUIMeasureBlendMode; CUI_EXPORT CUIRendererRef _Nullable CUICreateRenderer(CFDictionaryRef options); CUI_EXPORT void CUIRendererCopyProperties(CUIRendererRef renderer, @@ -30,6 +54,24 @@ CUI_EXPORT CGColorRef _Nullable CUICopyCustomColorWithOptions(CUIRendererRef ren CFStringRef name, CFDictionaryRef options) CF_RETURNS_RETAINED; +CUI_EXPORT int32_t CUIDraw(CUIRendererRef _Nullable renderer, + CGRect bounds, + CGContextRef context, + CFDictionaryRef options, + CFDictionaryRef _Nullable * _Nullable result); +CUI_EXPORT int32_t CUICreateLayerContents(CUIRendererRef renderer, + CFDictionaryRef options, + CGImageRef _Nullable * _Nonnull image, + CGRect *contentsCenter); +CUI_EXPORT int32_t CUICopyMeasurements(CUIRendererRef renderer, + CGRect bounds, + CGContextRef _Nullable context, + CFDictionaryRef options, + CFArrayRef keys, + CFDictionaryRef _Nullable * _Nonnull measurements); +CUI_EXPORT uint32_t CUICurrentPlatform(void); +CUI_EXPORT uint32_t CUIMaxScaleForTargetPlatform(uint32_t platform); + CUI_ASSUME_NONNULL_END CUI_EXTERN_C_END diff --git a/CoreUI/2024/CoreUI.xcframework/macos-arm64e-arm64-x86_64/CoreUI.framework/Versions/A/Headers/CUIStyleEffectConfiguration.h b/CoreUI/2024/CoreUI.xcframework/macos-arm64e-arm64-x86_64/CoreUI.framework/Versions/A/Headers/CUIStyleEffectConfiguration.h new file mode 100644 index 0000000..95653b2 --- /dev/null +++ b/CoreUI/2024/CoreUI.xcframework/macos-arm64e-arm64-x86_64/CoreUI.framework/Versions/A/Headers/CUIStyleEffectConfiguration.h @@ -0,0 +1,66 @@ +// +// CUIStyleEffectConfiguration.h +// CoreUI +// +// Audited for 918.3 +// Status: WIP + +#ifndef CUIStyleEffectConfiguration_h +#define CUIStyleEffectConfiguration_h + +#import +#import +#import + +#if TARGET_OS_OSX + +CUI_ASSUME_NONNULL_BEGIN + +CUI_EXPORT const CFStringRef kCUIBackgroundTypeLight; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeDark; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeBorderless; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeSourceList; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeSelection; + +typedef CUI_ENUM(NSInteger, CoreThemeState) { + kCoreThemeStateNormal = 0, + kCoreThemeStateRollover = 1, + kCoreThemeStatePressed = 2, + obsolete_kCoreThemeStateInactive CUI_SWIFT_NAME(CoreThemeState.obsoleteInactive) = 3, + kCoreThemeStateDisabled = 4, + kCoreThemeStateDeeplyPressed = 5, +}; + +typedef CUI_ENUM(NSInteger, CoreThemePresentationState) { + kCoreThemePresentationStateActive = 0, + kCoreThemePresentationStateInactive = 1, + kCoreThemePresentationStateActiveMain = 2, +}; + +typedef CUI_ENUM(NSInteger, CoreThemeValue) { + kCoreThemeValueOff = 0, + kCoreThemeValueOn = 1, + kCoreThemeValueMixed = 2, +}; + +@interface CUIStyleEffectConfiguration : NSObject +@property (nonatomic) CoreThemeState state; +@property (nonatomic) CoreThemePresentationState presentationState; +@property (nonatomic) CoreThemeValue value; +@property (nonatomic) CGFloat effectScale; +@property (nonatomic) BOOL useSimplifiedEffect; +@property (nonatomic) BOOL foregroundColorShouldTintEffects; +@property (nonatomic) double brightnessMultiplier; +@property (nonatomic) NSUInteger colorTemperature; +@end + +@interface CUIBackgroundStyleEffectConfiguration : CUIStyleEffectConfiguration +@property (nonatomic, copy) NSString *backgroundType; +@property (nonatomic) BOOL shouldRespectOutputBlending; +- (void)setSelectionType:(NSInteger)selectionType; +@end + +CUI_ASSUME_NONNULL_END + +#endif /* TARGET_OS_OSX */ +#endif /* CUIStyleEffectConfiguration_h */ diff --git a/CoreUI/2024/CoreUI.xcframework/xros-arm64-arm64e/CoreUI.framework/Headers/CUICatalog.h b/CoreUI/2024/CoreUI.xcframework/xros-arm64-arm64e/CoreUI.framework/Headers/CUICatalog.h index 25c966e..6de8dd0 100644 --- a/CoreUI/2024/CoreUI.xcframework/xros-arm64-arm64e/CoreUI.framework/Headers/CUICatalog.h +++ b/CoreUI/2024/CoreUI.xcframework/xros-arm64-arm64e/CoreUI.framework/Headers/CUICatalog.h @@ -13,8 +13,10 @@ #import #import #import +#import #import #import +#import CUI_ASSUME_NONNULL_BEGIN @@ -118,6 +120,15 @@ CUI_ASSUME_NONNULL_BEGIN // MARK: - Utility - (BOOL)containsLookupForName:(NSString *)name; +#if TARGET_OS_OSX +- (BOOL)hasCustomizedAppearanceForWidget:(NSString *)widget; +- (nullable CGColorRef)equivalentForegroundColorForStylePresetWithName:(nullable NSString *)name + styleConfiguration:(CUIStyleEffectConfiguration *)configuration + baseForegroundColor:(nullable CGColorRef)color CF_RETURNS_NOT_RETAINED; +- (nullable id)compositingFilterForStylePresetWithName:(nullable NSString *)name + styleConfiguration:(CUIStyleEffectConfiguration *)configuration + foregroundColor:(nullable CGColorRef)color; +#endif - (NSArray *)appearanceNames; - (nullable NSArray *)allImageNames; - (void)clearCachedImageResources; diff --git a/CoreUI/2024/CoreUI.xcframework/xros-arm64-arm64e/CoreUI.framework/Headers/CUIRenderer.h b/CoreUI/2024/CoreUI.xcframework/xros-arm64-arm64e/CoreUI.framework/Headers/CUIRenderer.h index c045a6a..04b7afa 100644 --- a/CoreUI/2024/CoreUI.xcframework/xros-arm64-arm64e/CoreUI.framework/Headers/CUIRenderer.h +++ b/CoreUI/2024/CoreUI.xcframework/xros-arm64-arm64e/CoreUI.framework/Headers/CUIRenderer.h @@ -17,10 +17,34 @@ CUI_EXTERN_C_BEGIN CUI_ASSUME_NONNULL_BEGIN -typedef struct CUIRenderer *CUIRendererRef; +typedef struct OpaqueCUIRendererRef *CUIRendererRef; CUI_EXPORT const CFStringRef kCUIRendererThemeFileBundleIdentifierKey; CUI_EXPORT const CFStringRef kCUIRendererThemeFileNameKey; +CUI_EXPORT const CFStringRef kCUIRendererDefaultBlendModeKey; + +CUI_EXPORT const CFStringRef kCUIWidgetKey; +CUI_EXPORT const CFStringRef kCUIWidgetTitleBarCloseBox; +CUI_EXPORT const CFStringRef kCUIWidgetDisclosureTriangle; +CUI_EXPORT const CFStringRef kCUIWidgetOverlayScrollBar; +CUI_EXPORT const CFStringRef kCUIForegroundTintColor; +CUI_EXPORT const CFStringRef kCUIBezelTintColor; +CUI_EXPORT const CFStringRef kCUIColorTemperatureAdjustment; +CUI_EXPORT const CFStringRef kCUIBezelBrightnessMultiplier; +CUI_EXPORT const CFStringRef kCUITextGlyphBrightnessMultiplier; +CUI_EXPORT const CFStringRef kCUIScaleKey; +CUI_EXPORT const CFStringRef kCUIIsFlippedKey; +CUI_EXPORT const CFStringRef kCUIStateActive; +CUI_EXPORT const CFStringRef kCUIStateInactive; +CUI_EXPORT const CFStringRef kCUIStatePressed; +CUI_EXPORT const CFStringRef kCUIMeasureWidth; +CUI_EXPORT const CFStringRef kCUIMeasureHeight; +CUI_EXPORT const CFStringRef kCUIMeasureContentInsetTopRight; +CUI_EXPORT const CFStringRef kCUIMeasureContentInsetBottomLeft; +CUI_EXPORT const CFStringRef kCUIMeasureEdgeInsetTopRight; +CUI_EXPORT const CFStringRef kCUIMeasureEdgeInsetBottomLeft; +CUI_EXPORT const CFStringRef kCUIMeasureBaseline; +CUI_EXPORT const CFStringRef kCUIMeasureBlendMode; CUI_EXPORT CUIRendererRef _Nullable CUICreateRenderer(CFDictionaryRef options); CUI_EXPORT void CUIRendererCopyProperties(CUIRendererRef renderer, @@ -30,6 +54,24 @@ CUI_EXPORT CGColorRef _Nullable CUICopyCustomColorWithOptions(CUIRendererRef ren CFStringRef name, CFDictionaryRef options) CF_RETURNS_RETAINED; +CUI_EXPORT int32_t CUIDraw(CUIRendererRef _Nullable renderer, + CGRect bounds, + CGContextRef context, + CFDictionaryRef options, + CFDictionaryRef _Nullable * _Nullable result); +CUI_EXPORT int32_t CUICreateLayerContents(CUIRendererRef renderer, + CFDictionaryRef options, + CGImageRef _Nullable * _Nonnull image, + CGRect *contentsCenter); +CUI_EXPORT int32_t CUICopyMeasurements(CUIRendererRef renderer, + CGRect bounds, + CGContextRef _Nullable context, + CFDictionaryRef options, + CFArrayRef keys, + CFDictionaryRef _Nullable * _Nonnull measurements); +CUI_EXPORT uint32_t CUICurrentPlatform(void); +CUI_EXPORT uint32_t CUIMaxScaleForTargetPlatform(uint32_t platform); + CUI_ASSUME_NONNULL_END CUI_EXTERN_C_END diff --git a/CoreUI/2024/CoreUI.xcframework/xros-arm64-arm64e/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h b/CoreUI/2024/CoreUI.xcframework/xros-arm64-arm64e/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h new file mode 100644 index 0000000..95653b2 --- /dev/null +++ b/CoreUI/2024/CoreUI.xcframework/xros-arm64-arm64e/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h @@ -0,0 +1,66 @@ +// +// CUIStyleEffectConfiguration.h +// CoreUI +// +// Audited for 918.3 +// Status: WIP + +#ifndef CUIStyleEffectConfiguration_h +#define CUIStyleEffectConfiguration_h + +#import +#import +#import + +#if TARGET_OS_OSX + +CUI_ASSUME_NONNULL_BEGIN + +CUI_EXPORT const CFStringRef kCUIBackgroundTypeLight; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeDark; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeBorderless; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeSourceList; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeSelection; + +typedef CUI_ENUM(NSInteger, CoreThemeState) { + kCoreThemeStateNormal = 0, + kCoreThemeStateRollover = 1, + kCoreThemeStatePressed = 2, + obsolete_kCoreThemeStateInactive CUI_SWIFT_NAME(CoreThemeState.obsoleteInactive) = 3, + kCoreThemeStateDisabled = 4, + kCoreThemeStateDeeplyPressed = 5, +}; + +typedef CUI_ENUM(NSInteger, CoreThemePresentationState) { + kCoreThemePresentationStateActive = 0, + kCoreThemePresentationStateInactive = 1, + kCoreThemePresentationStateActiveMain = 2, +}; + +typedef CUI_ENUM(NSInteger, CoreThemeValue) { + kCoreThemeValueOff = 0, + kCoreThemeValueOn = 1, + kCoreThemeValueMixed = 2, +}; + +@interface CUIStyleEffectConfiguration : NSObject +@property (nonatomic) CoreThemeState state; +@property (nonatomic) CoreThemePresentationState presentationState; +@property (nonatomic) CoreThemeValue value; +@property (nonatomic) CGFloat effectScale; +@property (nonatomic) BOOL useSimplifiedEffect; +@property (nonatomic) BOOL foregroundColorShouldTintEffects; +@property (nonatomic) double brightnessMultiplier; +@property (nonatomic) NSUInteger colorTemperature; +@end + +@interface CUIBackgroundStyleEffectConfiguration : CUIStyleEffectConfiguration +@property (nonatomic, copy) NSString *backgroundType; +@property (nonatomic) BOOL shouldRespectOutputBlending; +- (void)setSelectionType:(NSInteger)selectionType; +@end + +CUI_ASSUME_NONNULL_END + +#endif /* TARGET_OS_OSX */ +#endif /* CUIStyleEffectConfiguration_h */ diff --git a/CoreUI/2024/CoreUI.xcframework/xros-arm64-x86_64-simulator/CoreUI.framework/Headers/CUICatalog.h b/CoreUI/2024/CoreUI.xcframework/xros-arm64-x86_64-simulator/CoreUI.framework/Headers/CUICatalog.h index 25c966e..6de8dd0 100644 --- a/CoreUI/2024/CoreUI.xcframework/xros-arm64-x86_64-simulator/CoreUI.framework/Headers/CUICatalog.h +++ b/CoreUI/2024/CoreUI.xcframework/xros-arm64-x86_64-simulator/CoreUI.framework/Headers/CUICatalog.h @@ -13,8 +13,10 @@ #import #import #import +#import #import #import +#import CUI_ASSUME_NONNULL_BEGIN @@ -118,6 +120,15 @@ CUI_ASSUME_NONNULL_BEGIN // MARK: - Utility - (BOOL)containsLookupForName:(NSString *)name; +#if TARGET_OS_OSX +- (BOOL)hasCustomizedAppearanceForWidget:(NSString *)widget; +- (nullable CGColorRef)equivalentForegroundColorForStylePresetWithName:(nullable NSString *)name + styleConfiguration:(CUIStyleEffectConfiguration *)configuration + baseForegroundColor:(nullable CGColorRef)color CF_RETURNS_NOT_RETAINED; +- (nullable id)compositingFilterForStylePresetWithName:(nullable NSString *)name + styleConfiguration:(CUIStyleEffectConfiguration *)configuration + foregroundColor:(nullable CGColorRef)color; +#endif - (NSArray *)appearanceNames; - (nullable NSArray *)allImageNames; - (void)clearCachedImageResources; diff --git a/CoreUI/2024/CoreUI.xcframework/xros-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIRenderer.h b/CoreUI/2024/CoreUI.xcframework/xros-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIRenderer.h index c045a6a..04b7afa 100644 --- a/CoreUI/2024/CoreUI.xcframework/xros-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIRenderer.h +++ b/CoreUI/2024/CoreUI.xcframework/xros-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIRenderer.h @@ -17,10 +17,34 @@ CUI_EXTERN_C_BEGIN CUI_ASSUME_NONNULL_BEGIN -typedef struct CUIRenderer *CUIRendererRef; +typedef struct OpaqueCUIRendererRef *CUIRendererRef; CUI_EXPORT const CFStringRef kCUIRendererThemeFileBundleIdentifierKey; CUI_EXPORT const CFStringRef kCUIRendererThemeFileNameKey; +CUI_EXPORT const CFStringRef kCUIRendererDefaultBlendModeKey; + +CUI_EXPORT const CFStringRef kCUIWidgetKey; +CUI_EXPORT const CFStringRef kCUIWidgetTitleBarCloseBox; +CUI_EXPORT const CFStringRef kCUIWidgetDisclosureTriangle; +CUI_EXPORT const CFStringRef kCUIWidgetOverlayScrollBar; +CUI_EXPORT const CFStringRef kCUIForegroundTintColor; +CUI_EXPORT const CFStringRef kCUIBezelTintColor; +CUI_EXPORT const CFStringRef kCUIColorTemperatureAdjustment; +CUI_EXPORT const CFStringRef kCUIBezelBrightnessMultiplier; +CUI_EXPORT const CFStringRef kCUITextGlyphBrightnessMultiplier; +CUI_EXPORT const CFStringRef kCUIScaleKey; +CUI_EXPORT const CFStringRef kCUIIsFlippedKey; +CUI_EXPORT const CFStringRef kCUIStateActive; +CUI_EXPORT const CFStringRef kCUIStateInactive; +CUI_EXPORT const CFStringRef kCUIStatePressed; +CUI_EXPORT const CFStringRef kCUIMeasureWidth; +CUI_EXPORT const CFStringRef kCUIMeasureHeight; +CUI_EXPORT const CFStringRef kCUIMeasureContentInsetTopRight; +CUI_EXPORT const CFStringRef kCUIMeasureContentInsetBottomLeft; +CUI_EXPORT const CFStringRef kCUIMeasureEdgeInsetTopRight; +CUI_EXPORT const CFStringRef kCUIMeasureEdgeInsetBottomLeft; +CUI_EXPORT const CFStringRef kCUIMeasureBaseline; +CUI_EXPORT const CFStringRef kCUIMeasureBlendMode; CUI_EXPORT CUIRendererRef _Nullable CUICreateRenderer(CFDictionaryRef options); CUI_EXPORT void CUIRendererCopyProperties(CUIRendererRef renderer, @@ -30,6 +54,24 @@ CUI_EXPORT CGColorRef _Nullable CUICopyCustomColorWithOptions(CUIRendererRef ren CFStringRef name, CFDictionaryRef options) CF_RETURNS_RETAINED; +CUI_EXPORT int32_t CUIDraw(CUIRendererRef _Nullable renderer, + CGRect bounds, + CGContextRef context, + CFDictionaryRef options, + CFDictionaryRef _Nullable * _Nullable result); +CUI_EXPORT int32_t CUICreateLayerContents(CUIRendererRef renderer, + CFDictionaryRef options, + CGImageRef _Nullable * _Nonnull image, + CGRect *contentsCenter); +CUI_EXPORT int32_t CUICopyMeasurements(CUIRendererRef renderer, + CGRect bounds, + CGContextRef _Nullable context, + CFDictionaryRef options, + CFArrayRef keys, + CFDictionaryRef _Nullable * _Nonnull measurements); +CUI_EXPORT uint32_t CUICurrentPlatform(void); +CUI_EXPORT uint32_t CUIMaxScaleForTargetPlatform(uint32_t platform); + CUI_ASSUME_NONNULL_END CUI_EXTERN_C_END diff --git a/CoreUI/2024/CoreUI.xcframework/xros-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h b/CoreUI/2024/CoreUI.xcframework/xros-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h new file mode 100644 index 0000000..95653b2 --- /dev/null +++ b/CoreUI/2024/CoreUI.xcframework/xros-arm64-x86_64-simulator/CoreUI.framework/Headers/CUIStyleEffectConfiguration.h @@ -0,0 +1,66 @@ +// +// CUIStyleEffectConfiguration.h +// CoreUI +// +// Audited for 918.3 +// Status: WIP + +#ifndef CUIStyleEffectConfiguration_h +#define CUIStyleEffectConfiguration_h + +#import +#import +#import + +#if TARGET_OS_OSX + +CUI_ASSUME_NONNULL_BEGIN + +CUI_EXPORT const CFStringRef kCUIBackgroundTypeLight; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeDark; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeBorderless; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeSourceList; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeSelection; + +typedef CUI_ENUM(NSInteger, CoreThemeState) { + kCoreThemeStateNormal = 0, + kCoreThemeStateRollover = 1, + kCoreThemeStatePressed = 2, + obsolete_kCoreThemeStateInactive CUI_SWIFT_NAME(CoreThemeState.obsoleteInactive) = 3, + kCoreThemeStateDisabled = 4, + kCoreThemeStateDeeplyPressed = 5, +}; + +typedef CUI_ENUM(NSInteger, CoreThemePresentationState) { + kCoreThemePresentationStateActive = 0, + kCoreThemePresentationStateInactive = 1, + kCoreThemePresentationStateActiveMain = 2, +}; + +typedef CUI_ENUM(NSInteger, CoreThemeValue) { + kCoreThemeValueOff = 0, + kCoreThemeValueOn = 1, + kCoreThemeValueMixed = 2, +}; + +@interface CUIStyleEffectConfiguration : NSObject +@property (nonatomic) CoreThemeState state; +@property (nonatomic) CoreThemePresentationState presentationState; +@property (nonatomic) CoreThemeValue value; +@property (nonatomic) CGFloat effectScale; +@property (nonatomic) BOOL useSimplifiedEffect; +@property (nonatomic) BOOL foregroundColorShouldTintEffects; +@property (nonatomic) double brightnessMultiplier; +@property (nonatomic) NSUInteger colorTemperature; +@end + +@interface CUIBackgroundStyleEffectConfiguration : CUIStyleEffectConfiguration +@property (nonatomic, copy) NSString *backgroundType; +@property (nonatomic) BOOL shouldRespectOutputBlending; +- (void)setSelectionType:(NSInteger)selectionType; +@end + +CUI_ASSUME_NONNULL_END + +#endif /* TARGET_OS_OSX */ +#endif /* CUIStyleEffectConfiguration_h */ diff --git a/CoreUI/2024/Sources/Headers/CUICatalog.h b/CoreUI/2024/Sources/Headers/CUICatalog.h index 25c966e..6de8dd0 100644 --- a/CoreUI/2024/Sources/Headers/CUICatalog.h +++ b/CoreUI/2024/Sources/Headers/CUICatalog.h @@ -13,8 +13,10 @@ #import #import #import +#import #import #import +#import CUI_ASSUME_NONNULL_BEGIN @@ -118,6 +120,15 @@ CUI_ASSUME_NONNULL_BEGIN // MARK: - Utility - (BOOL)containsLookupForName:(NSString *)name; +#if TARGET_OS_OSX +- (BOOL)hasCustomizedAppearanceForWidget:(NSString *)widget; +- (nullable CGColorRef)equivalentForegroundColorForStylePresetWithName:(nullable NSString *)name + styleConfiguration:(CUIStyleEffectConfiguration *)configuration + baseForegroundColor:(nullable CGColorRef)color CF_RETURNS_NOT_RETAINED; +- (nullable id)compositingFilterForStylePresetWithName:(nullable NSString *)name + styleConfiguration:(CUIStyleEffectConfiguration *)configuration + foregroundColor:(nullable CGColorRef)color; +#endif - (NSArray *)appearanceNames; - (nullable NSArray *)allImageNames; - (void)clearCachedImageResources; diff --git a/CoreUI/2024/Sources/Headers/CUIRenderer.h b/CoreUI/2024/Sources/Headers/CUIRenderer.h index c045a6a..04b7afa 100644 --- a/CoreUI/2024/Sources/Headers/CUIRenderer.h +++ b/CoreUI/2024/Sources/Headers/CUIRenderer.h @@ -17,10 +17,34 @@ CUI_EXTERN_C_BEGIN CUI_ASSUME_NONNULL_BEGIN -typedef struct CUIRenderer *CUIRendererRef; +typedef struct OpaqueCUIRendererRef *CUIRendererRef; CUI_EXPORT const CFStringRef kCUIRendererThemeFileBundleIdentifierKey; CUI_EXPORT const CFStringRef kCUIRendererThemeFileNameKey; +CUI_EXPORT const CFStringRef kCUIRendererDefaultBlendModeKey; + +CUI_EXPORT const CFStringRef kCUIWidgetKey; +CUI_EXPORT const CFStringRef kCUIWidgetTitleBarCloseBox; +CUI_EXPORT const CFStringRef kCUIWidgetDisclosureTriangle; +CUI_EXPORT const CFStringRef kCUIWidgetOverlayScrollBar; +CUI_EXPORT const CFStringRef kCUIForegroundTintColor; +CUI_EXPORT const CFStringRef kCUIBezelTintColor; +CUI_EXPORT const CFStringRef kCUIColorTemperatureAdjustment; +CUI_EXPORT const CFStringRef kCUIBezelBrightnessMultiplier; +CUI_EXPORT const CFStringRef kCUITextGlyphBrightnessMultiplier; +CUI_EXPORT const CFStringRef kCUIScaleKey; +CUI_EXPORT const CFStringRef kCUIIsFlippedKey; +CUI_EXPORT const CFStringRef kCUIStateActive; +CUI_EXPORT const CFStringRef kCUIStateInactive; +CUI_EXPORT const CFStringRef kCUIStatePressed; +CUI_EXPORT const CFStringRef kCUIMeasureWidth; +CUI_EXPORT const CFStringRef kCUIMeasureHeight; +CUI_EXPORT const CFStringRef kCUIMeasureContentInsetTopRight; +CUI_EXPORT const CFStringRef kCUIMeasureContentInsetBottomLeft; +CUI_EXPORT const CFStringRef kCUIMeasureEdgeInsetTopRight; +CUI_EXPORT const CFStringRef kCUIMeasureEdgeInsetBottomLeft; +CUI_EXPORT const CFStringRef kCUIMeasureBaseline; +CUI_EXPORT const CFStringRef kCUIMeasureBlendMode; CUI_EXPORT CUIRendererRef _Nullable CUICreateRenderer(CFDictionaryRef options); CUI_EXPORT void CUIRendererCopyProperties(CUIRendererRef renderer, @@ -30,6 +54,24 @@ CUI_EXPORT CGColorRef _Nullable CUICopyCustomColorWithOptions(CUIRendererRef ren CFStringRef name, CFDictionaryRef options) CF_RETURNS_RETAINED; +CUI_EXPORT int32_t CUIDraw(CUIRendererRef _Nullable renderer, + CGRect bounds, + CGContextRef context, + CFDictionaryRef options, + CFDictionaryRef _Nullable * _Nullable result); +CUI_EXPORT int32_t CUICreateLayerContents(CUIRendererRef renderer, + CFDictionaryRef options, + CGImageRef _Nullable * _Nonnull image, + CGRect *contentsCenter); +CUI_EXPORT int32_t CUICopyMeasurements(CUIRendererRef renderer, + CGRect bounds, + CGContextRef _Nullable context, + CFDictionaryRef options, + CFArrayRef keys, + CFDictionaryRef _Nullable * _Nonnull measurements); +CUI_EXPORT uint32_t CUICurrentPlatform(void); +CUI_EXPORT uint32_t CUIMaxScaleForTargetPlatform(uint32_t platform); + CUI_ASSUME_NONNULL_END CUI_EXTERN_C_END diff --git a/CoreUI/2024/Sources/Headers/CUIStyleEffectConfiguration.h b/CoreUI/2024/Sources/Headers/CUIStyleEffectConfiguration.h new file mode 100644 index 0000000..95653b2 --- /dev/null +++ b/CoreUI/2024/Sources/Headers/CUIStyleEffectConfiguration.h @@ -0,0 +1,66 @@ +// +// CUIStyleEffectConfiguration.h +// CoreUI +// +// Audited for 918.3 +// Status: WIP + +#ifndef CUIStyleEffectConfiguration_h +#define CUIStyleEffectConfiguration_h + +#import +#import +#import + +#if TARGET_OS_OSX + +CUI_ASSUME_NONNULL_BEGIN + +CUI_EXPORT const CFStringRef kCUIBackgroundTypeLight; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeDark; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeBorderless; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeSourceList; +CUI_EXPORT const CFStringRef kCUIBackgroundTypeSelection; + +typedef CUI_ENUM(NSInteger, CoreThemeState) { + kCoreThemeStateNormal = 0, + kCoreThemeStateRollover = 1, + kCoreThemeStatePressed = 2, + obsolete_kCoreThemeStateInactive CUI_SWIFT_NAME(CoreThemeState.obsoleteInactive) = 3, + kCoreThemeStateDisabled = 4, + kCoreThemeStateDeeplyPressed = 5, +}; + +typedef CUI_ENUM(NSInteger, CoreThemePresentationState) { + kCoreThemePresentationStateActive = 0, + kCoreThemePresentationStateInactive = 1, + kCoreThemePresentationStateActiveMain = 2, +}; + +typedef CUI_ENUM(NSInteger, CoreThemeValue) { + kCoreThemeValueOff = 0, + kCoreThemeValueOn = 1, + kCoreThemeValueMixed = 2, +}; + +@interface CUIStyleEffectConfiguration : NSObject +@property (nonatomic) CoreThemeState state; +@property (nonatomic) CoreThemePresentationState presentationState; +@property (nonatomic) CoreThemeValue value; +@property (nonatomic) CGFloat effectScale; +@property (nonatomic) BOOL useSimplifiedEffect; +@property (nonatomic) BOOL foregroundColorShouldTintEffects; +@property (nonatomic) double brightnessMultiplier; +@property (nonatomic) NSUInteger colorTemperature; +@end + +@interface CUIBackgroundStyleEffectConfiguration : CUIStyleEffectConfiguration +@property (nonatomic, copy) NSString *backgroundType; +@property (nonatomic) BOOL shouldRespectOutputBlending; +- (void)setSelectionType:(NSInteger)selectionType; +@end + +CUI_ASSUME_NONNULL_END + +#endif /* TARGET_OS_OSX */ +#endif /* CUIStyleEffectConfiguration_h */