Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add _UIGraphicsView #49

Merged
merged 4 commits into from
Mar 11, 2024
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
Expand Up @@ -9,8 +9,9 @@
#import <Foundation/Foundation.h>
#import "_LSOpenConfiguration.h"

NS_ASSUME_NONNULL_BEGIN
@interface LSApplicationWorkspace : NSObject
+(nullable instancetype)defaultWorkspace;
-(void)openURL:(nonnull NSURL *)url configuration:(nonnull _LSOpenConfiguration *)config completionHandler:(void (^ _Nonnull)(BOOL))completion;

-(void)openURL:(NSURL *)url configuration:(_LSOpenConfiguration *)config completionHandler:(void (^)(BOOL))completion;
@end
NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
@interface _LSOpenConfiguration : NSObject
@property(assign, getter=isSensitive,nonatomic) BOOL sensitive;
@property(nonatomic, retain, nullable) id targetConnectionEndpoint;
-(nonnull instancetype)init;
-(instancetype)init;
-(BOOL)isSensitive;
-(void)setSensitive:(BOOL)sensitive;
-(void)setTargetConnectionEndpoint:(id)endpoint ;
-(id)targetConnectionEndpoint;
-(void)setTargetConnectionEndpoint:(nullable id)endpoint ;
-(nullable id)targetConnectionEndpoint;
@end
NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
#import <Foundation/Foundation.h>
#import "_LSOpenConfiguration.h"

NS_ASSUME_NONNULL_BEGIN
@interface LSApplicationWorkspace : NSObject
+(nullable instancetype)defaultWorkspace;
-(void)openURL:(nonnull NSURL *)url configuration:(nonnull _LSOpenConfiguration *)config completionHandler:(void (^ _Nonnull)(BOOL))completion;

-(void)openURL:(NSURL *)url configuration:(_LSOpenConfiguration *)config completionHandler:(void (^)(BOOL))completion;
@end
NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
@interface _LSOpenConfiguration : NSObject
@property(assign, getter=isSensitive,nonatomic) BOOL sensitive;
@property(nonatomic, retain, nullable) id targetConnectionEndpoint;
-(nonnull instancetype)init;
-(instancetype)init;
-(BOOL)isSensitive;
-(void)setSensitive:(BOOL)sensitive;
-(void)setTargetConnectionEndpoint:(id)endpoint ;
-(id)targetConnectionEndpoint;
-(void)setTargetConnectionEndpoint:(nullable id)endpoint ;
-(nullable id)targetConnectionEndpoint;
@end
NS_ASSUME_NONNULL_END
5 changes: 3 additions & 2 deletions Sources/COpenSwiftUI/include/LockedPointer.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//
// LockedPointer.h
//
//
// OpenSwiftUI
//
// Audited for RELEASE_2021
// Status: Complete

#ifndef LockedPointer_h
#define LockedPointer_h
Expand Down
5 changes: 3 additions & 2 deletions Sources/COpenSwiftUI/include/OpenSwiftUIBase.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//
// OpenSwiftUIBase.h
//
//
// OpenSwiftUI
//
// Audited for RELEASE_2021
// Status: Complete

#ifndef OpenSwiftUIBase_h
#define OpenSwiftUIBase_h
Expand Down
41 changes: 38 additions & 3 deletions Sources/COpenSwiftUI/include/OpenSwiftUI_SPI.h
Original file line number Diff line number Diff line change
@@ -1,27 +1,62 @@
//
// OpenSwiftUI_SPI.h
// OpenSwiftUI
//
//
//
// Audited for RELEASE_2021
// Status: WIP

#ifndef OpenSwiftUI_SPI_h
#define OpenSwiftUI_SPI_h

#include "OpenSwiftUIBase.h"

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

#import <QuartzCore/CoreAnimation.h>

OPENSWIFTUI_ASSUME_NONNULL_BEGIN

@interface CALayer (OpenSwiftUI_SPI)
- (BOOL)hasBeenCommitted;
@end

OPENSWIFTUI_ASSUME_NONNULL_END

#endif /* CoreAnimation.h */

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

#import <UIKit/UIKit.h>

OPENSWIFTUI_ASSUME_NONNULL_BEGIN

@interface UIApplication (OpenSwiftUI_SPI)
- (void)startedTest:(nullable NSString *)name;
- (void)finishedTest:(nullable NSString *)name;
- (void)failedTest:(nullable NSString *)name withFailure:(nullable NSError*)failure;
- (nullable NSString *)_launchTestName;
@end

@interface UIView (OpenSwiftUI_SPI)
- (BOOL)_shouldAnimatePropertyWithKey:(NSString *)key;
@end

OPENSWIFTUI_ASSUME_NONNULL_END

#elif __has_include(<AppKit/AppKit.h>)

#import <AppKit/AppKit.h>

OPENSWIFTUI_ASSUME_NONNULL_BEGIN

@interface NSApplication (OpenSwiftUI_SPI)
- (void)startedTest:(nullable NSString *)name;
- (void)finishedTest:(nullable NSString *)name;
- (void)failedTest:(nullable NSString *)name withFailure:(nullable NSError*)failure;
@end
#endif

OPENSWIFTUI_ASSUME_NONNULL_END

#endif /* UIKit.h / AppKit.h */

#endif /* OpenSwiftUI_SPI_h */
5 changes: 3 additions & 2 deletions Sources/COpenSwiftUI/include/ProtocolDescriptor.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//
// ProtocolDescriptor_h
// OpenSwiftUI
//
//
//
// Audited for RELEASE_2021
// Status: WIP

#ifndef ProtocolDescriptor_h
#define ProtocolDescriptor_h
Expand Down
5 changes: 3 additions & 2 deletions Sources/COpenSwiftUI/include/TLS.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//
// TLS.h
//
//
// OpenSwiftUI
//
// Audited for RELEASE_2021
// Status: Complete

#ifndef TLS_h
#define TLS_h
Expand Down
5 changes: 3 additions & 2 deletions Sources/COpenSwiftUI/include/dyld_Private.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//
// dyld_Private.h
// OpenSwiftUI
//
//
//
// Audited for RELEASE_2021
// Status: Complete

#ifndef dyld_Private_h
#define dyld_Private_h
Expand Down
21 changes: 21 additions & 0 deletions Sources/OpenSwiftUI/Integration/UIKit/_UIGraphicsView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// _UIGraphicsView.swift
// OpenSwiftUI
//
// Audited for RELEASE_2021
// Status: Complete

#if os(iOS)
internal import COpenSwiftUI
import UIKit

class _UIGraphicsView: UIView {
override func _shouldAnimateProperty(withKey key: String) -> Bool {
if layer.hasBeenCommitted() {
super._shouldAnimateProperty(withKey: key)
} else {
false
}
}
}
#endif
Loading