Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// CATransactionCompletionItem.h
// COpenSwiftUI

#ifndef CATransactionCompletionItem_h
#define CATransactionCompletionItem_h

#include "OpenSwiftUIBase.h"

#if __has_include(<QuartzCore/QuartzCore.h>)

#import <QuartzCore/QuartzCore.h>
#import "Shims/QuartzCore/QuartzCore_Private.h"

OPENSWIFTUI_ASSUME_NONNULL_BEGIN

OPENSWIFTUI_EXPORT
CATransactionCompletionItem * _Nullable _CATransactionCompletionItem(void);

OPENSWIFTUI_ASSUME_NONNULL_END

#endif /* __has_include(<QuartzCore/QuartzCore.h>) */

#endif /* CATransactionCompletionItem_h */

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// CATransactionCompletionItem.m
// COpenSwiftUI

#import "CATransactionCompletionItem.h"

#if __has_include(<QuartzCore/QuartzCore.h>)

CATransactionCompletionItem *_CATransactionCompletionItem(void) {
return [CATransactionCompletionItem completionItem];
}

#endif /* __has_include(<QuartzCore/QuartzCore.h>) */

26 changes: 26 additions & 0 deletions Sources/COpenSwiftUI/Shims/QuartzCore/QuartzCore_Private.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// QuartzCore_Private.h
// COpenSwiftUI

#ifndef QuartzCore_Private_h
#define QuartzCore_Private_h

#include "OpenSwiftUIBase.h"

#if __has_include(<QuartzCore/QuartzCore.h>)

#import <QuartzCore/QuartzCore.h>

OPENSWIFTUI_ASSUME_NONNULL_BEGIN

@interface CATransactionCompletionItem : NSObject
+ (nullable CATransactionCompletionItem *)completionItem;
- (void)invalidate;
@end

OPENSWIFTUI_ASSUME_NONNULL_END

#endif /* __has_include(<QuartzCore/QuartzCore.h>) */

#endif /* QuartzCore_Private_h */

4 changes: 4 additions & 0 deletions Sources/COpenSwiftUI/Shims/UIKit/UIKit_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ OPENSWIFTUI_ASSUME_NONNULL_BEGIN
- (BOOL)_shouldAnimatePropertyWithKey_openswiftui_safe_wrapper:(NSString *)key OPENSWIFTUI_SWIFT_NAME(_shouldAnimateProperty(withKey:));
- (void)_setFocusInteractionEnabled_openswiftui_safe_wrapper:(BOOL)enabled OPENSWIFTUI_SWIFT_NAME(_setFocusInteractionEnabled(_:));
@property(nonatomic, readonly, nullable) UIViewController *_viewControllerForAncestor_openswiftui_safe_wrapper OPENSWIFTUI_SWIFT_NAME(_viewControllerForAncestor);

@property(class, nonatomic, readonly) BOOL _isInAnimationBlockWithAnimationsEnabled_openswiftui_safe_wrapper OPENSWIFTUI_SWIFT_NAME(_isInAnimationBlockWithAnimationsEnabled);
@property(class, nonatomic, readonly) NSTimeInterval _currentAnimationDuration_openswiftui_safe_wrapper OPENSWIFTUI_SWIFT_NAME(_currentAnimationDuration);
@property(class, nonatomic, readonly) NSInteger _currentAnimationCurve_openswiftui_safe_wrapper OPENSWIFTUI_SWIFT_NAME(_currentAnimationCurve);
@end

#if OPENSWIFTUI_LINK_BACKLIGHTSERVICES
Expand Down
15 changes: 15 additions & 0 deletions Sources/COpenSwiftUI/Shims/UIKit/UIKit_Private.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ - (UIViewController *)_viewControllerForAncestor_openswiftui_safe_wrapper {
OPENSWIFTUI_SAFE_WRAPPER_IMP(UIViewController *, @"_viewControllerForAncestor", nil);
return func(self, selector);
}

+ (BOOL)_isInAnimationBlockWithAnimationsEnabled_openswiftui_safe_wrapper {
OPENSWIFTUI_SAFE_WRAPPER_IMP(BOOL, @"_isInAnimationBlockWithAnimationsEnabled", NO);
return func(self, selector);
}

+ (NSTimeInterval)_currentAnimationDuration_openswiftui_safe_wrapper {
OPENSWIFTUI_SAFE_WRAPPER_IMP(NSTimeInterval, @"_currentAnimationDuration", 0.0);
return func(self, selector);
}

+ (NSInteger)_currentAnimationCurve_openswiftui_safe_wrapper {
OPENSWIFTUI_SAFE_WRAPPER_IMP(NSInteger, @"_currentAnimationCurve", 0);
return func(self, selector);
}
@end

@implementation UIViewController (OpenSwiftUI_SPI)
Expand Down
Loading
Loading