macos: support initial window size

This commit is contained in:
Mitchell Hashimoto
2023-09-30 20:47:31 -07:00
parent 8cb96a28c1
commit cc8e1cd936
6 changed files with 88 additions and 3 deletions

View File

@@ -291,6 +291,15 @@ typedef enum {
GHOSTTY_BUILD_MODE_RELEASE_SMALL,
} ghostty_build_mode_e;
typedef struct {
bool origin;
bool size;
uint32_t x;
uint32_t y;
uint32_t w;
uint32_t h;
} ghostty_rect_s;
// Fully defined types. This MUST be kept in sync with equivalent Zig
// structs. To find the Zig struct, grep for this type name. The documentation
// for all of these types is available in the Zig source.
@@ -380,6 +389,7 @@ ghostty_surface_t ghostty_surface_new(ghostty_app_t, ghostty_surface_config_s*);
void ghostty_surface_free(ghostty_surface_t);
ghostty_app_t ghostty_surface_app(ghostty_surface_t);
bool ghostty_surface_transparent(ghostty_surface_t);
ghostty_rect_s ghostty_surface_window_frame(ghostty_surface_t);
void ghostty_surface_refresh(ghostty_surface_t);
void ghostty_surface_set_content_scale(ghostty_surface_t, double, double);
void ghostty_surface_set_focus(ghostty_surface_t, bool);