Add an enum type for the C API

This commit is contained in:
Peter Guy
2025-10-12 22:05:21 -07:00
parent 0af2a3f693
commit c035fb5385
2 changed files with 22 additions and 8 deletions

View File

@@ -416,6 +416,12 @@ typedef union {
ghostty_platform_ios_s ios;
} ghostty_platform_u;
typedef enum {
GHOSTTY_SURFACE_CONTEXT_WINDOW = 0,
GHOSTTY_SURFACE_CONTEXT_TAB = 1,
GHOSTTY_SURFACE_CONTEXT_SPLIT = 2,
} ghostty_surface_context_e;
typedef struct {
ghostty_platform_e platform_tag;
ghostty_platform_u platform;
@@ -428,7 +434,7 @@ typedef struct {
size_t env_var_count;
const char* initial_input;
bool wait_after_command;
int context; // 0=window, 1=tab, 2=split
ghostty_surface_context_e context;
} ghostty_surface_config_s;
typedef struct {