macos: rendering basic imgui

This commit is contained in:
Mitchell Hashimoto
2023-10-19 11:52:49 -07:00
parent 775a734892
commit 2c40183c3c
4 changed files with 289 additions and 11 deletions

View File

@@ -233,7 +233,7 @@ extension Ghostty {
return config
}
}
/// The NSView implementation for a terminal surface.
class SurfaceView: NSView, NSTextInputClient, ObservableObject {
// The current title of the surface as defined by the pty. This can be
@@ -245,6 +245,13 @@ extension Ghostty {
// then the view is moved to a new window.
var initialSize: NSSize? = nil
// Returns the inspector instance for this surface, or nil if the
// surface has been closed.
var inspector: ghostty_inspector_t? {
guard let surface = self.surface else { return nil }
return ghostty_surface_inspector(surface)
}
private(set) var surface: ghostty_surface_t?
var error: Error? = nil