From 448382b49d452a3178f00aef2e7bbd17a3af60bc Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 10 Aug 2024 21:08:59 -0700 Subject: [PATCH] macos: add iOS field necessary --- macos/Sources/Ghostty/SurfaceView_UIKit.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/macos/Sources/Ghostty/SurfaceView_UIKit.swift b/macos/Sources/Ghostty/SurfaceView_UIKit.swift index 87a9afa53..a9739d7d4 100644 --- a/macos/Sources/Ghostty/SurfaceView_UIKit.swift +++ b/macos/Sources/Ghostty/SurfaceView_UIKit.swift @@ -28,6 +28,13 @@ extension Ghostty { // The hovered URL @Published var hoverUrl: String? = nil + // Returns sizing information for the surface. This is the raw C + // structure because I'm lazy. + var surfaceSize: ghostty_surface_size_s? { + guard let surface = self.surface else { return nil } + return ghostty_surface_size(surface) + } + private(set) var surface: ghostty_surface_t? init(_ app: ghostty_app_t, baseConfig: SurfaceConfiguration? = nil, uuid: UUID? = nil) {