pluginbridge / Source /Shared /PrivateCA.h
Sitar118
fix: replace CARemoteLayerServer with CAContext+CALayerHost for cross-process GUI
0548359
Raw
History Blame Contribute Delete
856 Bytes
#pragma once
// Private QuartzCore + CoreGraphics APIs for cross-process layer hosting.
// CAContext/CALayerHost have been stable from macOS 10.10 through Sequoia (15.x).
// No entitlements needed — works for same-user processes.
#import <Foundation/Foundation.h>
#import <QuartzCore/QuartzCore.h>
// WindowServer connection ID for the current process
extern "C" uint32_t CGSMainConnectionID(void);
// CAContext — server side: wraps a CALayer and exposes it to other processes via contextId
@interface CAContext : NSObject
+ (instancetype)contextWithCGSConnection:(uint32_t)cid options:(NSDictionary *)opts;
@property (readonly) uint32_t contextId;
@property (retain) CALayer *layer;
@end
// CALayerHost — client side: a CALayer subclass that renders a remote CAContext by ID
@interface CALayerHost : CALayer
@property uint32_t contextId;
@end