macOS: new window can inherit font size

This is the second part of #281 and adds the same mechanism that was
added for tabs in #296 for windows.

It works exactly the same way.
This commit is contained in:
Thorsten Ball
2023-08-19 09:29:56 +02:00
parent 0b6de6928c
commit 2e9b787668
8 changed files with 99 additions and 20 deletions

View File

@@ -234,6 +234,7 @@ typedef enum {
GHOSTTY_BINDING_COPY_TO_CLIPBOARD,
GHOSTTY_BINDING_PASTE_FROM_CLIPBOARD,
GHOSTTY_BINDING_NEW_TAB,
GHOSTTY_BINDING_NEW_WINDOW,
} ghostty_binding_action_e;
// Fully defined types. This MUST be kept in sync with equivalent Zig
@@ -253,6 +254,7 @@ typedef const char* (*ghostty_runtime_read_clipboard_cb)(void *, ghostty_clipboa
typedef void (*ghostty_runtime_write_clipboard_cb)(void *, const char *, ghostty_clipboard_e);
typedef void (*ghostty_runtime_new_split_cb)(void *, ghostty_split_direction_e);
typedef void (*ghostty_runtime_new_tab_cb)(void *, ghostty_surface_config_s);
typedef void (*ghostty_runtime_new_window_cb)(void *, ghostty_surface_config_s);
typedef void (*ghostty_runtime_close_surface_cb)(void *, bool);
typedef void (*ghostty_runtime_focus_split_cb)(void *, ghostty_split_focus_direction_e);
typedef void (*ghostty_runtime_goto_tab_cb)(void *, int32_t);
@@ -268,6 +270,7 @@ typedef struct {
ghostty_runtime_write_clipboard_cb write_clipboard_cb;
ghostty_runtime_new_split_cb new_split_cb;
ghostty_runtime_new_tab_cb new_tab_cb;
ghostty_runtime_new_window_cb new_window_cb;
ghostty_runtime_close_surface_cb close_surface_cb;
ghostty_runtime_focus_split_cb focus_split_cb;
ghostty_runtime_goto_tab_cb goto_tab_cb;