mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 19:45:49 +00:00
macOS: move surface to OSSurfaceView
This commit is contained in:
@@ -48,6 +48,10 @@ extension Ghostty {
|
||||
/// True when the surface should show a highlight effect (e.g., when presented via goto_split).
|
||||
@Published private(set) var highlighted: Bool = false
|
||||
|
||||
var surface: ghostty_surface_t? {
|
||||
nil
|
||||
}
|
||||
|
||||
init(id: UUID?, frame: CGRect) {
|
||||
self.id = id ?? UUID()
|
||||
super.init(frame: frame)
|
||||
|
||||
@@ -164,7 +164,7 @@ extension Ghostty {
|
||||
private(set) var surfaceModel: Ghostty.Surface?
|
||||
|
||||
/// Returns the underlying C value for the surface. See "note" on surfaceModel.
|
||||
var surface: ghostty_surface_t? {
|
||||
override var surface: ghostty_surface_t? {
|
||||
surfaceModel?.unsafeCValue
|
||||
}
|
||||
/// Current scrollbar state, cached here for persistence across rebuilds
|
||||
|
||||
@@ -14,7 +14,11 @@ extension Ghostty {
|
||||
// The current search state. When non-nil, the search overlay should be shown.
|
||||
@Published var searchState: SearchState?
|
||||
|
||||
private(set) var surface: ghostty_surface_t?
|
||||
private(set) var _surface: ghostty_surface_t?
|
||||
|
||||
override var surface: ghostty_surface_t? {
|
||||
_surface
|
||||
}
|
||||
|
||||
init(_ app: ghostty_app_t, baseConfig: SurfaceConfiguration? = nil, uuid: UUID? = nil) {
|
||||
|
||||
@@ -32,7 +36,7 @@ extension Ghostty {
|
||||
// TODO
|
||||
return
|
||||
}
|
||||
self.surface = surface
|
||||
self._surface = surface
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
|
||||
Reference in New Issue
Block a user