simdriver 0.1.2

Native iOS simulator frames, input, device controls, and accessibility for macOS
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

#import <Foundation/Foundation.h>

#import <CoreSimulator/FoundationXPCProtocolProxyable-Protocol.h>

NS_ASSUME_NONNULL_BEGIN

/**
 The underlying implementation is `ROCKRemoteProxy` and requesting the objects actually
 performs call to some service. The selector object may and may not exists,
 so checks like `[surface respondsToSelector: @selector(ioSurface)]` may return true, because
 this selector exists in proxy implementation, but underlying object may still not implement that selector
 and we will receive nil result.

 To be 100% sure we calling both methods (with plural underlying implementation and not) and one of the implementation
 will succeed.
 */
/**
 As of Xcode 27 (CoreSimulator 1155.4) this protocol is vended by CoreSimDeviceIO
 (re-exported by CoreSimulator), not SimulatorKit, which is now almost entirely
 Swift. Declaration retained here; the IO-port descriptor still conforms to it at
 runtime and Framebuffer resolves it via -conformsToProtocol: / -respondsToSelector:,
 so the move is transparent. This header now lives in the CoreSimDeviceIO module.
 */
@protocol SimDisplayIOSurfaceRenderable <FoundationXPCProtocolProxyable>

/**
 In Xcode 8, this is an xpc_object_t
 In Xcode 9, this is an IOSurfaceRef.

 If the host is running macOS 10.12 or greater an IOSurfaceRef is toll-free-bridged to an IOSurface *object*.
 This is an Objective-C wrapper to the CoreFoundation IOSurfaceRef.

 Consumers should take this into account.
 */
@property (nullable, nonatomic, readonly) id ioSurface;

/**
 In Xcode 13.2 ioSurface was split into two surfaces. Use `framebufferSurface` as primary implementation.
 */
@property (nullable, nonatomic, readonly) id framebufferSurface;

/**
 We do not actually use this, but still worth to know that is exists.
 This clips image for devices with face id so image is not square, but in the shape of iPhone with notch
 */
@property (nullable, nonatomic, readonly) id maskedFramebufferSurface;

// Added in Xcode 9 as -[SimDeviceIOClient attachConsumer:] methods have been removed.
- (void)unregisterIOSurfaceChangeCallbackWithUUID:(NSUUID *)arg1;
/**
 The callback delivers the new surface: an `IOSurface *` (toll-free bridged from IOSurfaceRef on
 macOS 10.12+; an xpc_object_t on older hosts — see the `ioSurface` property above). The proxy may
 vend nil when no surface is available, so the argument is explicitly nullable and consumers cast
 defensively.
 */
- (void)registerCallbackWithUUID:(NSUUID *)arg1 ioSurfaceChangeCallback:(void (^)(id _Nullable))arg2;

// Callbacks was slightly renamed in Xcode 13.2 to address two surfaces instead of one.
- (void)unregisterIOSurfacesChangeCallbackWithUUID:(NSUUID *)arg1;
- (void)registerCallbackWithUUID:(NSUUID *)arg1 ioSurfacesChangeCallback:(void (^)(id _Nullable))arg2;

@end

NS_ASSUME_NONNULL_END