cli/gtk: replace @hasDecl for performAction-style API

Instead of using @hasDecl, use a performAction-stype API. The C
interface for interfacing with macOS (or any other apprt where Ghostty
is embedded) is unfinished.
This commit is contained in:
Jeffrey C. Ollie
2025-07-13 21:59:13 -05:00
parent 72e47cf8bc
commit 81358c8dca
9 changed files with 291 additions and 48 deletions

View File

@@ -803,6 +803,21 @@ typedef struct {
ghostty_runtime_close_surface_cb close_surface_cb;
} ghostty_runtime_config_s;
// apprt.ipc.Action.NewWindow
typedef struct {
// This should be a null terminated list of strings.
const char **arguments;
} ghostty_ipc_action_new_window_s;
typedef union {
ghostty_ipc_action_new_window_s new_window;
} ghostty_ipc_action_u;
// apprt.ipc.Action.Key
typedef enum {
GHOSTTY_IPC_ACTION_NEW_WINDOW,
} ghostty_ipc_action_tag_e;
//-------------------------------------------------------------------
// Published API