Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210// Ghostty embedding API. The documentation for the embedding API is// only within the Zig source files that define the implementations. This// isn't meant to be a general purpose embedding API (yet) so there hasn't// been documentation or example work beyond that.//// The only consumer of this API is the macOS app, but the API is built to// be more general purpose.#ifndef GHOSTTY_H#define GHOSTTY_H
#ifdef __cplusplusextern "C" {#endif
#include <stdbool.h>#include <stddef.h>#include <stdint.h>
#ifdef _MSC_VER#include <BaseTsd.h>typedef SSIZE_T ssize_t;#else#include <sys/types.h>#endif
//-------------------------------------------------------------------// Macros
#define GHOSTTY_SUCCESS 0
// Symbol visibility for shared library builds. On Windows, functions// are exported from the DLL when building and imported when consuming.// On other platforms with GCC/Clang, functions are marked with default// visibility so they remain accessible when the library is built with// -fvisibility=hidden. For static library builds, define GHOSTTY_STATIC// before including this header to make this a no-op.#ifndef GHOSTTY_API#if defined(GHOSTTY_STATIC) #define GHOSTTY_API#elif defined(_WIN32) || defined(_WIN64) #ifdef GHOSTTY_BUILD_SHARED #define GHOSTTY_API __declspec(dllexport) #else #define GHOSTTY_API __declspec(dllimport) #endif#elif defined(__GNUC__) && __GNUC__ >= 4 #define GHOSTTY_API __attribute__((visibility("default")))#else #define GHOSTTY_API#endif#endif
//-------------------------------------------------------------------// Types
// Opaque typestypedef void* ghostty_app_t;typedef void* ghostty_config_t;typedef void* ghostty_surface_t;typedef void* ghostty_inspector_t;
// All the types below are fully defined and must be kept in sync with// their Zig counterparts. Any changes to these types MUST have an associated// Zig change.typedef enum { GHOSTTY_PLATFORM_INVALID, GHOSTTY_PLATFORM_MACOS, GHOSTTY_PLATFORM_IOS,} ghostty_platform_e;
typedef enum { GHOSTTY_CLIPBOARD_STANDARD, GHOSTTY_CLIPBOARD_SELECTION,} ghostty_clipboard_e;
typedef struct { const char *mime; const char *data;} ghostty_clipboard_content_s;
typedef enum { GHOSTTY_CLIPBOARD_REQUEST_PASTE, GHOSTTY_CLIPBOARD_REQUEST_OSC_52_READ, GHOSTTY_CLIPBOARD_REQUEST_OSC_52_WRITE,} ghostty_clipboard_request_e;
typedef enum { GHOSTTY_MOUSE_RELEASE, GHOSTTY_MOUSE_PRESS,} ghostty_input_mouse_state_e;
typedef enum { GHOSTTY_MOUSE_UNKNOWN, GHOSTTY_MOUSE_LEFT, GHOSTTY_MOUSE_RIGHT, GHOSTTY_MOUSE_MIDDLE, GHOSTTY_MOUSE_FOUR, GHOSTTY_MOUSE_FIVE, GHOSTTY_MOUSE_SIX, GHOSTTY_MOUSE_SEVEN, GHOSTTY_MOUSE_EIGHT, GHOSTTY_MOUSE_NINE, GHOSTTY_MOUSE_TEN, GHOSTTY_MOUSE_ELEVEN,} ghostty_input_mouse_button_e;
typedef enum { GHOSTTY_MOUSE_MOMENTUM_NONE, GHOSTTY_MOUSE_MOMENTUM_BEGAN, GHOSTTY_MOUSE_MOMENTUM_STATIONARY, GHOSTTY_MOUSE_MOMENTUM_CHANGED, GHOSTTY_MOUSE_MOMENTUM_ENDED, GHOSTTY_MOUSE_MOMENTUM_CANCELLED, GHOSTTY_MOUSE_MOMENTUM_MAY_BEGIN,} ghostty_input_mouse_momentum_e;
typedef enum { GHOSTTY_COLOR_SCHEME_LIGHT = 0, GHOSTTY_COLOR_SCHEME_DARK = 1,} ghostty_color_scheme_e;
// This is a packed struct (see src/input/mouse.zig) but the C standard// afaik doesn't let us reliably define packed structs so we build it up// from scratch.typedef int ghostty_input_scroll_mods_t;
typedef enum { GHOSTTY_MODS_NONE = 0, GHOSTTY_MODS_SHIFT = 1 << 0, GHOSTTY_MODS_CTRL = 1 << 1, GHOSTTY_MODS_ALT = 1 << 2, GHOSTTY_MODS_SUPER = 1 << 3, GHOSTTY_MODS_CAPS = 1 << 4, GHOSTTY_MODS_NUM = 1 << 5, GHOSTTY_MODS_SHIFT_RIGHT = 1 << 6, GHOSTTY_MODS_CTRL_RIGHT = 1 << 7, GHOSTTY_MODS_ALT_RIGHT = 1 << 8, GHOSTTY_MODS_SUPER_RIGHT = 1 << 9,} ghostty_input_mods_e;
typedef enum { GHOSTTY_BINDING_FLAGS_CONSUMED = 1 << 0, GHOSTTY_BINDING_FLAGS_ALL = 1 << 1, GHOSTTY_BINDING_FLAGS_GLOBAL = 1 << 2, GHOSTTY_BINDING_FLAGS_PERFORMABLE = 1 << 3,} ghostty_binding_flags_e;
typedef enum { GHOSTTY_ACTION_RELEASE, GHOSTTY_ACTION_PRESS, GHOSTTY_ACTION_REPEAT,} ghostty_input_action_e;
// Based on: https://www.w3.org/TR/uievents-code/typedef enum { GHOSTTY_KEY_UNIDENTIFIED,
// "Writing System Keys" § 3.1.1 GHOSTTY_KEY_BACKQUOTE, GHOSTTY_KEY_BACKSLASH, GHOSTTY_KEY_BRACKET_LEFT, GHOSTTY_KEY_BRACKET_RIGHT, GHOSTTY_KEY_COMMA, GHOSTTY_KEY_DIGIT_0, GHOSTTY_KEY_DIGIT_1, GHOSTTY_KEY_DIGIT_2, GHOSTTY_KEY_DIGIT_3, GHOSTTY_KEY_DIGIT_4, GHOSTTY_KEY_DIGIT_5, GHOSTTY_KEY_DIGIT_6, GHOSTTY_KEY_DIGIT_7, GHOSTTY_KEY_DIGIT_8, GHOSTTY_KEY_DIGIT_9, GHOSTTY_KEY_EQUAL, GHOSTTY_KEY_INTL_BACKSLASH, GHOSTTY_KEY_INTL_RO, GHOSTTY_KEY_INTL_YEN, GHOSTTY_KEY_A, GHOSTTY_KEY_B, GHOSTTY_KEY_C, GHOSTTY_KEY_D, GHOSTTY_KEY_E, GHOSTTY_KEY_F, GHOSTTY_KEY_G, GHOSTTY_KEY_H, GHOSTTY_KEY_I, GHOSTTY_KEY_J, GHOSTTY_KEY_K, GHOSTTY_KEY_L, GHOSTTY_KEY_M, GHOSTTY_KEY_N, GHOSTTY_KEY_O, GHOSTTY_KEY_P, GHOSTTY_KEY_Q, GHOSTTY_KEY_R, GHOSTTY_KEY_S, GHOSTTY_KEY_T, GHOSTTY_KEY_U, GHOSTTY_KEY_V, GHOSTTY_KEY_W, GHOSTTY_KEY_X, GHOSTTY_KEY_Y, GHOSTTY_KEY_Z, GHOSTTY_KEY_MINUS, GHOSTTY_KEY_PERIOD, GHOSTTY_KEY_QUOTE, GHOSTTY_KEY_SEMICOLON, GHOSTTY_KEY_SLASH,
// "Functional Keys" § 3.1.2 GHOSTTY_KEY_ALT_LEFT, GHOSTTY_KEY_ALT_RIGHT, GHOSTTY_KEY_BACKSPACE, GHOSTTY_KEY_CAPS_LOCK, GHOSTTY_KEY_CONTEXT_MENU, GHOSTTY_KEY_CONTROL_LEFT, GHOSTTY_KEY_CONTROL_RIGHT, GHOSTTY_KEY_ENTER, GHOSTTY_KEY_META_LEFT, GHOSTTY_KEY_META_RIGHT, GHOSTTY_KEY_SHIFT_LEFT, GHOSTTY_KEY_SHIFT_RIGHT, GHOSTTY_KEY_SPACE, GHOSTTY_KEY_TAB, GHOSTTY_KEY_CONVERT, GHOSTTY_KEY_KANA_MODE, GHOSTTY_KEY_NON_CONVERT,
// "Control Pad Section" § 3.2 GHOSTTY_KEY_DELETE, GHOSTTY_KEY_END, GHOSTTY_KEY_HELP, GHOSTTY_KEY_HOME, GHOSTTY_KEY_INSERT, GHOSTTY_KEY_PAGE_DOWN, GHOSTTY_KEY_PAGE_UP,
// "Arrow Pad Section" § 3.3 GHOSTTY_KEY_ARROW_DOWN, GHOSTTY_KEY_ARROW_LEFT, GHOSTTY_KEY_ARROW_RIGHT, GHOSTTY_KEY_ARROW_UP,
// "Numpad Section" § 3.4 GHOSTTY_KEY_NUM_LOCK, GHOSTTY_KEY_NUMPAD_0, GHOSTTY_KEY_NUMPAD_1, GHOSTTY_KEY_NUMPAD_2, GHOSTTY_KEY_NUMPAD_3, GHOSTTY_KEY_NUMPAD_4, GHOSTTY_KEY_NUMPAD_5, GHOSTTY_KEY_NUMPAD_6, GHOSTTY_KEY_NUMPAD_7, GHOSTTY_KEY_NUMPAD_8, GHOSTTY_KEY_NUMPAD_9, GHOSTTY_KEY_NUMPAD_ADD, GHOSTTY_KEY_NUMPAD_BACKSPACE, GHOSTTY_KEY_NUMPAD_CLEAR, GHOSTTY_KEY_NUMPAD_CLEAR_ENTRY, GHOSTTY_KEY_NUMPAD_COMMA, GHOSTTY_KEY_NUMPAD_DECIMAL, GHOSTTY_KEY_NUMPAD_DIVIDE, GHOSTTY_KEY_NUMPAD_ENTER, GHOSTTY_KEY_NUMPAD_EQUAL, GHOSTTY_KEY_NUMPAD_MEMORY_ADD, GHOSTTY_KEY_NUMPAD_MEMORY_CLEAR, GHOSTTY_KEY_NUMPAD_MEMORY_RECALL, GHOSTTY_KEY_NUMPAD_MEMORY_STORE, GHOSTTY_KEY_NUMPAD_MEMORY_SUBTRACT, GHOSTTY_KEY_NUMPAD_MULTIPLY, GHOSTTY_KEY_NUMPAD_PAREN_LEFT, GHOSTTY_KEY_NUMPAD_PAREN_RIGHT, GHOSTTY_KEY_NUMPAD_SUBTRACT, GHOSTTY_KEY_NUMPAD_SEPARATOR, GHOSTTY_KEY_NUMPAD_UP, GHOSTTY_KEY_NUMPAD_DOWN, GHOSTTY_KEY_NUMPAD_RIGHT, GHOSTTY_KEY_NUMPAD_LEFT, GHOSTTY_KEY_NUMPAD_BEGIN, GHOSTTY_KEY_NUMPAD_HOME, GHOSTTY_KEY_NUMPAD_END, GHOSTTY_KEY_NUMPAD_INSERT, GHOSTTY_KEY_NUMPAD_DELETE, GHOSTTY_KEY_NUMPAD_PAGE_UP, GHOSTTY_KEY_NUMPAD_PAGE_DOWN,
// "Function Section" § 3.5 GHOSTTY_KEY_ESCAPE, GHOSTTY_KEY_F1, GHOSTTY_KEY_F2, GHOSTTY_KEY_F3, GHOSTTY_KEY_F4, GHOSTTY_KEY_F5, GHOSTTY_KEY_F6, GHOSTTY_KEY_F7, GHOSTTY_KEY_F8, GHOSTTY_KEY_F9, GHOSTTY_KEY_F10, GHOSTTY_KEY_F11, GHOSTTY_KEY_F12, GHOSTTY_KEY_F13, GHOSTTY_KEY_F14, GHOSTTY_KEY_F15, GHOSTTY_KEY_F16, GHOSTTY_KEY_F17, GHOSTTY_KEY_F18, GHOSTTY_KEY_F19, GHOSTTY_KEY_F20, GHOSTTY_KEY_F21, GHOSTTY_KEY_F22, GHOSTTY_KEY_F23, GHOSTTY_KEY_F24, GHOSTTY_KEY_F25, GHOSTTY_KEY_FN, GHOSTTY_KEY_FN_LOCK, GHOSTTY_KEY_PRINT_SCREEN, GHOSTTY_KEY_SCROLL_LOCK, GHOSTTY_KEY_PAUSE,
// "Media Keys" § 3.6 GHOSTTY_KEY_BROWSER_BACK, GHOSTTY_KEY_BROWSER_FAVORITES, GHOSTTY_KEY_BROWSER_FORWARD, GHOSTTY_KEY_BROWSER_HOME, GHOSTTY_KEY_BROWSER_REFRESH, GHOSTTY_KEY_BROWSER_SEARCH, GHOSTTY_KEY_BROWSER_STOP, GHOSTTY_KEY_EJECT, GHOSTTY_KEY_LAUNCH_APP_1, GHOSTTY_KEY_LAUNCH_APP_2, GHOSTTY_KEY_LAUNCH_MAIL, GHOSTTY_KEY_MEDIA_PLAY_PAUSE, GHOSTTY_KEY_MEDIA_SELECT, GHOSTTY_KEY_MEDIA_STOP, GHOSTTY_KEY_MEDIA_TRACK_NEXT, GHOSTTY_KEY_MEDIA_TRACK_PREVIOUS, GHOSTTY_KEY_POWER, GHOSTTY_KEY_SLEEP, GHOSTTY_KEY_AUDIO_VOLUME_DOWN, GHOSTTY_KEY_AUDIO_VOLUME_MUTE, GHOSTTY_KEY_AUDIO_VOLUME_UP, GHOSTTY_KEY_WAKE_UP,
// "Legacy, Non-standard, and Special Keys" § 3.7 GHOSTTY_KEY_COPY, GHOSTTY_KEY_CUT, GHOSTTY_KEY_PASTE,} ghostty_input_key_e;
typedef struct { ghostty_input_action_e action; ghostty_input_mods_e mods; ghostty_input_mods_e consumed_mods; uint32_t keycode; const char* text; uint32_t unshifted_codepoint; bool composing;} ghostty_input_key_s;
typedef enum { GHOSTTY_TRIGGER_PHYSICAL, GHOSTTY_TRIGGER_UNICODE, GHOSTTY_TRIGGER_CATCH_ALL,} ghostty_input_trigger_tag_e;
typedef union { ghostty_input_key_e physical; uint32_t unicode; // catch_all has no payload} ghostty_input_trigger_key_u;
typedef struct { ghostty_input_trigger_tag_e tag; ghostty_input_trigger_key_u key; ghostty_input_mods_e mods;} ghostty_input_trigger_s;
typedef struct { const char* action_key; const char* action; const char* title; const char* description;} ghostty_command_s;
typedef enum { GHOSTTY_BUILD_MODE_DEBUG, GHOSTTY_BUILD_MODE_RELEASE_SAFE, GHOSTTY_BUILD_MODE_RELEASE_FAST, GHOSTTY_BUILD_MODE_RELEASE_SMALL,} ghostty_build_mode_e;
typedef struct { ghostty_build_mode_e build_mode; const char* version; uintptr_t version_len;} ghostty_info_s;
typedef struct { const char* message;} ghostty_diagnostic_s;
typedef struct { const char* ptr; uintptr_t len; bool sentinel;} ghostty_string_s;
typedef struct { double tl_px_x; double tl_px_y; uint32_t offset_start; uint32_t offset_len; const char* text; uintptr_t text_len;} ghostty_text_s;
typedef enum { GHOSTTY_POINT_ACTIVE, GHOSTTY_POINT_VIEWPORT, GHOSTTY_POINT_SCREEN, GHOSTTY_POINT_SURFACE,} ghostty_point_tag_e;
typedef enum { GHOSTTY_POINT_COORD_EXACT, GHOSTTY_POINT_COORD_TOP_LEFT, GHOSTTY_POINT_COORD_BOTTOM_RIGHT,} ghostty_point_coord_e;
typedef struct { ghostty_point_tag_e tag; ghostty_point_coord_e coord; uint32_t x; uint32_t y;} ghostty_point_s;
typedef struct { ghostty_point_s top_left; ghostty_point_s bottom_right; bool rectangle;} ghostty_selection_s;
typedef struct { const char* key; const char* value;} ghostty_env_var_s;
typedef struct { void* nsview;} ghostty_platform_macos_s;
typedef struct { void* uiview;} ghostty_platform_ios_s;
typedef union { ghostty_platform_macos_s macos; 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; void* userdata; double scale_factor; float font_size; const char* working_directory; const char* command; ghostty_env_var_s* env_vars; size_t env_var_count; const char* initial_input; bool wait_after_command; ghostty_surface_context_e context;} ghostty_surface_config_s;
typedef struct { uint16_t columns; uint16_t rows; uint32_t width_px; uint32_t height_px; uint32_t cell_width_px; uint32_t cell_height_px;} ghostty_surface_size_s;
// Config types
// config.Pathtypedef struct { const char* path; bool optional;} ghostty_config_path_s;
// config.Colortypedef struct { uint8_t r; uint8_t g; uint8_t b;} ghostty_config_color_s;
// config.ColorListtypedef struct { const ghostty_config_color_s* colors; size_t len;} ghostty_config_color_list_s;
// config.RepeatableCommandtypedef struct { const ghostty_command_s* commands; size_t len;} ghostty_config_command_list_s;
// config.Palettetypedef struct { ghostty_config_color_s colors[256];} ghostty_config_palette_s;
// config.QuickTerminalSizetypedef enum { GHOSTTY_QUICK_TERMINAL_SIZE_NONE, GHOSTTY_QUICK_TERMINAL_SIZE_PERCENTAGE, GHOSTTY_QUICK_TERMINAL_SIZE_PIXELS,} ghostty_quick_terminal_size_tag_e;
typedef union { float percentage; uint32_t pixels;} ghostty_quick_terminal_size_value_u;
typedef struct { ghostty_quick_terminal_size_tag_e tag; ghostty_quick_terminal_size_value_u value;} ghostty_quick_terminal_size_s;
typedef struct { ghostty_quick_terminal_size_s primary; ghostty_quick_terminal_size_s secondary;} ghostty_config_quick_terminal_size_s;
// config.Fullscreentypedef enum { GHOSTTY_CONFIG_FULLSCREEN_FALSE, GHOSTTY_CONFIG_FULLSCREEN_TRUE, GHOSTTY_CONFIG_FULLSCREEN_NON_NATIVE, GHOSTTY_CONFIG_FULLSCREEN_NON_NATIVE_VISIBLE_MENU, GHOSTTY_CONFIG_FULLSCREEN_NON_NATIVE_PADDED_NOTCH,} ghostty_config_fullscreen_e;
// apprt.Target.Keytypedef enum { GHOSTTY_TARGET_APP, GHOSTTY_TARGET_SURFACE,} ghostty_target_tag_e;
typedef union { ghostty_surface_t surface;} ghostty_target_u;
typedef struct { ghostty_target_tag_e tag; ghostty_target_u target;} ghostty_target_s;
// apprt.action.SplitDirectiontypedef enum { GHOSTTY_SPLIT_DIRECTION_RIGHT, GHOSTTY_SPLIT_DIRECTION_DOWN, GHOSTTY_SPLIT_DIRECTION_LEFT, GHOSTTY_SPLIT_DIRECTION_UP,} ghostty_action_split_direction_e;
// apprt.action.GotoSplittypedef enum { GHOSTTY_GOTO_SPLIT_PREVIOUS, GHOSTTY_GOTO_SPLIT_NEXT, GHOSTTY_GOTO_SPLIT_UP, GHOSTTY_GOTO_SPLIT_LEFT, GHOSTTY_GOTO_SPLIT_DOWN, GHOSTTY_GOTO_SPLIT_RIGHT,} ghostty_action_goto_split_e;
// apprt.action.GotoWindowtypedef enum { GHOSTTY_GOTO_WINDOW_PREVIOUS, GHOSTTY_GOTO_WINDOW_NEXT,} ghostty_action_goto_window_e;
// apprt.action.ResizeSplit.Directiontypedef enum { GHOSTTY_RESIZE_SPLIT_UP, GHOSTTY_RESIZE_SPLIT_DOWN, GHOSTTY_RESIZE_SPLIT_LEFT, GHOSTTY_RESIZE_SPLIT_RIGHT,} ghostty_action_resize_split_direction_e;
// apprt.action.ResizeSplittypedef struct { uint16_t amount; ghostty_action_resize_split_direction_e direction;} ghostty_action_resize_split_s;
// apprt.action.MoveTabtypedef struct { ssize_t amount;} ghostty_action_move_tab_s;
// apprt.action.GotoTabtypedef enum { GHOSTTY_GOTO_TAB_PREVIOUS = -1, GHOSTTY_GOTO_TAB_NEXT = -2, GHOSTTY_GOTO_TAB_LAST = -3,} ghostty_action_goto_tab_e;
// apprt.action.Fullscreentypedef enum { GHOSTTY_FULLSCREEN_NATIVE, GHOSTTY_FULLSCREEN_MACOS_NON_NATIVE, GHOSTTY_FULLSCREEN_MACOS_NON_NATIVE_VISIBLE_MENU, GHOSTTY_FULLSCREEN_MACOS_NON_NATIVE_PADDED_NOTCH,} ghostty_action_fullscreen_e;
// apprt.action.FloatWindowtypedef enum { GHOSTTY_FLOAT_WINDOW_ON, GHOSTTY_FLOAT_WINDOW_OFF, GHOSTTY_FLOAT_WINDOW_TOGGLE,} ghostty_action_float_window_e;
// apprt.action.SecureInputtypedef enum { GHOSTTY_SECURE_INPUT_ON, GHOSTTY_SECURE_INPUT_OFF, GHOSTTY_SECURE_INPUT_TOGGLE,} ghostty_action_secure_input_e;
// apprt.action.Inspectortypedef enum { GHOSTTY_INSPECTOR_TOGGLE, GHOSTTY_INSPECTOR_SHOW, GHOSTTY_INSPECTOR_HIDE,} ghostty_action_inspector_e;
// apprt.action.QuitTimertypedef enum { GHOSTTY_QUIT_TIMER_START, GHOSTTY_QUIT_TIMER_STOP,} ghostty_action_quit_timer_e;
// apprt.action.Readonlytypedef enum { GHOSTTY_READONLY_OFF, GHOSTTY_READONLY_ON,} ghostty_action_readonly_e;
// apprt.action.DesktopNotification.Ctypedef struct { const char* title; const char* body;} ghostty_action_desktop_notification_s;
// apprt.action.SetTitle.Ctypedef struct { const char* title;} ghostty_action_set_title_s;
// apprt.action.PromptTitletypedef enum { GHOSTTY_PROMPT_TITLE_SURFACE, GHOSTTY_PROMPT_TITLE_TAB,} ghostty_action_prompt_title_e;
// apprt.action.Pwd.Ctypedef struct { const char* pwd;} ghostty_action_pwd_s;
// terminal.MouseShapetypedef enum { GHOSTTY_MOUSE_SHAPE_DEFAULT, GHOSTTY_MOUSE_SHAPE_CONTEXT_MENU, GHOSTTY_MOUSE_SHAPE_HELP, GHOSTTY_MOUSE_SHAPE_POINTER, GHOSTTY_MOUSE_SHAPE_PROGRESS, GHOSTTY_MOUSE_SHAPE_WAIT, GHOSTTY_MOUSE_SHAPE_CELL, GHOSTTY_MOUSE_SHAPE_CROSSHAIR, GHOSTTY_MOUSE_SHAPE_TEXT, GHOSTTY_MOUSE_SHAPE_VERTICAL_TEXT, GHOSTTY_MOUSE_SHAPE_ALIAS, GHOSTTY_MOUSE_SHAPE_COPY, GHOSTTY_MOUSE_SHAPE_MOVE, GHOSTTY_MOUSE_SHAPE_NO_DROP, GHOSTTY_MOUSE_SHAPE_NOT_ALLOWED, GHOSTTY_MOUSE_SHAPE_GRAB, GHOSTTY_MOUSE_SHAPE_GRABBING, GHOSTTY_MOUSE_SHAPE_ALL_SCROLL, GHOSTTY_MOUSE_SHAPE_COL_RESIZE, GHOSTTY_MOUSE_SHAPE_ROW_RESIZE, GHOSTTY_MOUSE_SHAPE_N_RESIZE, GHOSTTY_MOUSE_SHAPE_E_RESIZE, GHOSTTY_MOUSE_SHAPE_S_RESIZE, GHOSTTY_MOUSE_SHAPE_W_RESIZE, GHOSTTY_MOUSE_SHAPE_NE_RESIZE, GHOSTTY_MOUSE_SHAPE_NW_RESIZE, GHOSTTY_MOUSE_SHAPE_SE_RESIZE, GHOSTTY_MOUSE_SHAPE_SW_RESIZE, GHOSTTY_MOUSE_SHAPE_EW_RESIZE, GHOSTTY_MOUSE_SHAPE_NS_RESIZE, GHOSTTY_MOUSE_SHAPE_NESW_RESIZE, GHOSTTY_MOUSE_SHAPE_NWSE_RESIZE, GHOSTTY_MOUSE_SHAPE_ZOOM_IN, GHOSTTY_MOUSE_SHAPE_ZOOM_OUT,} ghostty_action_mouse_shape_e;
// apprt.action.MouseVisibilitytypedef enum { GHOSTTY_MOUSE_VISIBLE, GHOSTTY_MOUSE_HIDDEN,} ghostty_action_mouse_visibility_e;
// apprt.action.MouseOverLinktypedef struct { const char* url; size_t len;} ghostty_action_mouse_over_link_s;
// apprt.action.SizeLimittypedef struct { uint32_t min_width; uint32_t min_height; uint32_t max_width; uint32_t max_height;} ghostty_action_size_limit_s;
// apprt.action.InitialSizetypedef struct { uint32_t width; uint32_t height;} ghostty_action_initial_size_s;
// apprt.action.CellSizetypedef struct { uint32_t width; uint32_t height;} ghostty_action_cell_size_s;
// renderer.Healthtypedef enum { GHOSTTY_RENDERER_HEALTH_HEALTHY, GHOSTTY_RENDERER_HEALTH_UNHEALTHY,} ghostty_action_renderer_health_e;
// apprt.action.KeySequencetypedef struct { bool active; ghostty_input_trigger_s trigger;} ghostty_action_key_sequence_s;
// apprt.action.KeyTable.Tagtypedef enum { GHOSTTY_KEY_TABLE_ACTIVATE, GHOSTTY_KEY_TABLE_DEACTIVATE, GHOSTTY_KEY_TABLE_DEACTIVATE_ALL,} ghostty_action_key_table_tag_e;
// apprt.action.KeyTable.CValuetypedef union { struct { const char *name; size_t len; } activate;} ghostty_action_key_table_u;
// apprt.action.KeyTable.Ctypedef struct { ghostty_action_key_table_tag_e tag; ghostty_action_key_table_u value;} ghostty_action_key_table_s;
// apprt.action.ColorKindtypedef enum { GHOSTTY_ACTION_COLOR_KIND_FOREGROUND = -1, GHOSTTY_ACTION_COLOR_KIND_BACKGROUND = -2, GHOSTTY_ACTION_COLOR_KIND_CURSOR = -3,} ghostty_action_color_kind_e;
// apprt.action.ColorChangetypedef struct { ghostty_action_color_kind_e kind; uint8_t r; uint8_t g; uint8_t b;} ghostty_action_color_change_s;
// apprt.action.ConfigChangetypedef struct { ghostty_config_t config;} ghostty_action_config_change_s;
// apprt.action.ReloadConfigtypedef struct { bool soft;} ghostty_action_reload_config_s;
// apprt.action.OpenUrlKindtypedef enum { GHOSTTY_ACTION_OPEN_URL_KIND_UNKNOWN, GHOSTTY_ACTION_OPEN_URL_KIND_TEXT, GHOSTTY_ACTION_OPEN_URL_KIND_HTML,} ghostty_action_open_url_kind_e;
// apprt.action.OpenUrl.Ctypedef struct { ghostty_action_open_url_kind_e kind; const char* url; uintptr_t len;} ghostty_action_open_url_s;
// apprt.action.CloseTabModetypedef enum { GHOSTTY_ACTION_CLOSE_TAB_MODE_THIS, GHOSTTY_ACTION_CLOSE_TAB_MODE_OTHER, GHOSTTY_ACTION_CLOSE_TAB_MODE_RIGHT,} ghostty_action_close_tab_mode_e;
// apprt.surface.Message.ChildExitedtypedef struct { uint32_t exit_code; uint64_t timetime_ms;} ghostty_surface_message_childexited_s;
// terminal.osc.Command.ProgressReport.Statetypedef enum { GHOSTTY_PROGRESS_STATE_REMOVE, GHOSTTY_PROGRESS_STATE_SET, GHOSTTY_PROGRESS_STATE_ERROR, GHOSTTY_PROGRESS_STATE_INDETERMINATE, GHOSTTY_PROGRESS_STATE_PAUSE,} ghostty_action_progress_report_state_e;
// terminal.osc.Command.ProgressReport.Ctypedef struct { ghostty_action_progress_report_state_e state; // -1 if no progress was reported, otherwise 0-100 indicating percent // completeness. int8_t progress;} ghostty_action_progress_report_s;
// apprt.action.CommandFinished.Ctypedef struct { // -1 if no exit code was reported, otherwise 0-255 int16_t exit_code; // number of nanoseconds that command was running for uint64_t duration;} ghostty_action_command_finished_s;
// apprt.action.StartSearch.Ctypedef struct { const char* needle;} ghostty_action_start_search_s;
// apprt.action.SearchTotaltypedef struct { ssize_t total;} ghostty_action_search_total_s;
// apprt.action.SearchSelectedtypedef struct { ssize_t selected;} ghostty_action_search_selected_s;
// terminal.Scrollbartypedef struct { uint64_t total; uint64_t offset; uint64_t len;} ghostty_action_scrollbar_s;
// apprt.Action.Keytypedef enum { GHOSTTY_ACTION_QUIT, GHOSTTY_ACTION_NEW_WINDOW, GHOSTTY_ACTION_NEW_TAB, GHOSTTY_ACTION_CLOSE_TAB, GHOSTTY_ACTION_NEW_SPLIT, GHOSTTY_ACTION_CLOSE_ALL_WINDOWS, GHOSTTY_ACTION_TOGGLE_MAXIMIZE, GHOSTTY_ACTION_TOGGLE_FULLSCREEN, GHOSTTY_ACTION_TOGGLE_TAB_OVERVIEW, GHOSTTY_ACTION_TOGGLE_WINDOW_DECORATIONS, GHOSTTY_ACTION_TOGGLE_QUICK_TERMINAL, GHOSTTY_ACTION_TOGGLE_COMMAND_PALETTE, GHOSTTY_ACTION_TOGGLE_VISIBILITY, GHOSTTY_ACTION_TOGGLE_BACKGROUND_OPACITY, GHOSTTY_ACTION_MOVE_TAB, GHOSTTY_ACTION_GOTO_TAB, GHOSTTY_ACTION_GOTO_SPLIT, GHOSTTY_ACTION_GOTO_WINDOW, GHOSTTY_ACTION_RESIZE_SPLIT, GHOSTTY_ACTION_EQUALIZE_SPLITS, GHOSTTY_ACTION_TOGGLE_SPLIT_ZOOM, GHOSTTY_ACTION_PRESENT_TERMINAL, GHOSTTY_ACTION_SIZE_LIMIT, GHOSTTY_ACTION_RESET_WINDOW_SIZE, GHOSTTY_ACTION_INITIAL_SIZE, GHOSTTY_ACTION_CELL_SIZE, GHOSTTY_ACTION_SCROLLBAR, GHOSTTY_ACTION_RENDER, GHOSTTY_ACTION_INSPECTOR, GHOSTTY_ACTION_SHOW_GTK_INSPECTOR, GHOSTTY_ACTION_RENDER_INSPECTOR, GHOSTTY_ACTION_DESKTOP_NOTIFICATION, GHOSTTY_ACTION_SET_TITLE, GHOSTTY_ACTION_SET_TAB_TITLE, GHOSTTY_ACTION_PROMPT_TITLE, GHOSTTY_ACTION_PWD, GHOSTTY_ACTION_MOUSE_SHAPE, GHOSTTY_ACTION_MOUSE_VISIBILITY, GHOSTTY_ACTION_MOUSE_OVER_LINK, GHOSTTY_ACTION_RENDERER_HEALTH, GHOSTTY_ACTION_OPEN_CONFIG, GHOSTTY_ACTION_QUIT_TIMER, GHOSTTY_ACTION_FLOAT_WINDOW, GHOSTTY_ACTION_SECURE_INPUT, GHOSTTY_ACTION_KEY_SEQUENCE, GHOSTTY_ACTION_KEY_TABLE, GHOSTTY_ACTION_COLOR_CHANGE, GHOSTTY_ACTION_RELOAD_CONFIG, GHOSTTY_ACTION_CONFIG_CHANGE, GHOSTTY_ACTION_CLOSE_WINDOW, GHOSTTY_ACTION_RING_BELL, GHOSTTY_ACTION_SELECTION_CHANGED, GHOSTTY_ACTION_UNDO, GHOSTTY_ACTION_REDO, GHOSTTY_ACTION_CHECK_FOR_UPDATES, GHOSTTY_ACTION_OPEN_URL, GHOSTTY_ACTION_SHOW_CHILD_EXITED, GHOSTTY_ACTION_PROGRESS_REPORT, GHOSTTY_ACTION_SHOW_ON_SCREEN_KEYBOARD, GHOSTTY_ACTION_COMMAND_FINISHED, GHOSTTY_ACTION_START_SEARCH, GHOSTTY_ACTION_END_SEARCH, GHOSTTY_ACTION_SEARCH_TOTAL, GHOSTTY_ACTION_SEARCH_SELECTED, GHOSTTY_ACTION_READONLY, GHOSTTY_ACTION_COPY_TITLE_TO_CLIPBOARD,} ghostty_action_tag_e;
typedef union { ghostty_action_split_direction_e new_split; ghostty_action_fullscreen_e toggle_fullscreen; ghostty_action_move_tab_s move_tab; ghostty_action_goto_tab_e goto_tab; ghostty_action_goto_split_e goto_split; ghostty_action_goto_window_e goto_window; ghostty_action_resize_split_s resize_split; ghostty_action_size_limit_s size_limit; ghostty_action_initial_size_s initial_size; ghostty_action_cell_size_s cell_size; ghostty_action_scrollbar_s scrollbar; ghostty_action_inspector_e inspector; ghostty_action_desktop_notification_s desktop_notification; ghostty_action_set_title_s set_title; ghostty_action_set_title_s set_tab_title; ghostty_action_prompt_title_e prompt_title; ghostty_action_pwd_s pwd; ghostty_action_mouse_shape_e mouse_shape; ghostty_action_mouse_visibility_e mouse_visibility; ghostty_action_mouse_over_link_s mouse_over_link; ghostty_action_renderer_health_e renderer_health; ghostty_action_quit_timer_e quit_timer; ghostty_action_float_window_e float_window; ghostty_action_secure_input_e secure_input; ghostty_action_key_sequence_s key_sequence; ghostty_action_key_table_s key_table; ghostty_action_color_change_s color_change; ghostty_action_reload_config_s reload_config; ghostty_action_config_change_s config_change; ghostty_action_open_url_s open_url; ghostty_action_close_tab_mode_e close_tab_mode; ghostty_surface_message_childexited_s child_exited; ghostty_action_progress_report_s progress_report; ghostty_action_command_finished_s command_finished; ghostty_action_start_search_s start_search; ghostty_action_search_total_s search_total; ghostty_action_search_selected_s search_selected; ghostty_action_readonly_e readonly;} ghostty_action_u;
typedef struct { ghostty_action_tag_e tag; ghostty_action_u action;} ghostty_action_s;
typedef void (*ghostty_runtime_wakeup_cb)(void*);typedef bool (*ghostty_runtime_read_clipboard_cb)(void*, ghostty_clipboard_e, void*);typedef void (*ghostty_runtime_confirm_read_clipboard_cb)( void*, const char*, void*, ghostty_clipboard_request_e);typedef void (*ghostty_runtime_write_clipboard_cb)(void*, ghostty_clipboard_e, const ghostty_clipboard_content_s*, size_t, bool);typedef void (*ghostty_runtime_close_surface_cb)(void*, bool);typedef bool (*ghostty_runtime_action_cb)(ghostty_app_t, ghostty_target_s, ghostty_action_s);
typedef struct { void* userdata; bool supports_selection_clipboard; ghostty_runtime_wakeup_cb wakeup_cb; ghostty_runtime_action_cb action_cb; ghostty_runtime_read_clipboard_cb read_clipboard_cb; ghostty_runtime_confirm_read_clipboard_cb confirm_read_clipboard_cb; ghostty_runtime_write_clipboard_cb write_clipboard_cb; ghostty_runtime_close_surface_cb close_surface_cb;} ghostty_runtime_config_s;
// apprt.ipc.Target.Keytypedef enum { GHOSTTY_IPC_TARGET_CLASS, GHOSTTY_IPC_TARGET_DETECT,} ghostty_ipc_target_tag_e;
typedef union { char *klass;} ghostty_ipc_target_u;
typedef struct { ghostty_ipc_target_tag_e tag; ghostty_ipc_target_u target;} chostty_ipc_target_s;
// apprt.ipc.Action.NewWindowtypedef 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.Keytypedef enum { GHOSTTY_IPC_ACTION_NEW_WINDOW, GHOSTTY_IPC_ACTION_TOGGLE_QUICK_TERMINAL,} ghostty_ipc_action_tag_e;
//-------------------------------------------------------------------// Published API
GHOSTTY_API int ghostty_init(uintptr_t, char**);GHOSTTY_API void ghostty_cli_try_action(void);GHOSTTY_API ghostty_info_s ghostty_info(void);GHOSTTY_API const char* ghostty_translate(const char*);GHOSTTY_API void ghostty_string_free(ghostty_string_s);
GHOSTTY_API ghostty_config_t ghostty_config_new();GHOSTTY_API void ghostty_config_free(ghostty_config_t);GHOSTTY_API ghostty_config_t ghostty_config_clone(ghostty_config_t);GHOSTTY_API void ghostty_config_load_cli_args(ghostty_config_t);GHOSTTY_API void ghostty_config_load_file(ghostty_config_t, const char*);GHOSTTY_API void ghostty_config_load_default_files(ghostty_config_t);GHOSTTY_API void ghostty_config_load_recursive_files(ghostty_config_t);GHOSTTY_API void ghostty_config_finalize(ghostty_config_t);GHOSTTY_API bool ghostty_config_get(ghostty_config_t, void*, const char*, uintptr_t);GHOSTTY_API ghostty_input_trigger_s ghostty_config_trigger(ghostty_config_t, const char*, uintptr_t);GHOSTTY_API bool ghostty_config_key_is_binding(ghostty_config_t, ghostty_input_key_s);GHOSTTY_API uint32_t ghostty_config_diagnostics_count(ghostty_config_t);GHOSTTY_API ghostty_diagnostic_s ghostty_config_get_diagnostic(ghostty_config_t, uint32_t);GHOSTTY_API ghostty_string_s ghostty_config_open_path(void);
GHOSTTY_API ghostty_app_t ghostty_app_new(const ghostty_runtime_config_s*, ghostty_config_t);GHOSTTY_API void ghostty_app_free(ghostty_app_t);GHOSTTY_API void ghostty_app_tick(ghostty_app_t);GHOSTTY_API void* ghostty_app_userdata(ghostty_app_t);GHOSTTY_API void ghostty_app_set_focus(ghostty_app_t, bool);GHOSTTY_API bool ghostty_app_key(ghostty_app_t, ghostty_input_key_s);GHOSTTY_API void ghostty_app_keyboard_changed(ghostty_app_t);GHOSTTY_API void ghostty_app_open_config(ghostty_app_t);GHOSTTY_API void ghostty_app_update_config(ghostty_app_t, ghostty_config_t);GHOSTTY_API bool ghostty_app_needs_confirm_quit(ghostty_app_t);GHOSTTY_API bool ghostty_app_has_global_keybinds(ghostty_app_t);GHOSTTY_API void ghostty_app_set_color_scheme(ghostty_app_t, ghostty_color_scheme_e);
GHOSTTY_API ghostty_surface_config_s ghostty_surface_config_new();
GHOSTTY_API ghostty_surface_t ghostty_surface_new(ghostty_app_t, const ghostty_surface_config_s*);GHOSTTY_API void ghostty_surface_free(ghostty_surface_t);GHOSTTY_API void* ghostty_surface_userdata(ghostty_surface_t);GHOSTTY_API ghostty_app_t ghostty_surface_app(ghostty_surface_t);GHOSTTY_API ghostty_surface_config_s ghostty_surface_inherited_config(ghostty_surface_t, ghostty_surface_context_e);GHOSTTY_API void ghostty_surface_update_config(ghostty_surface_t, ghostty_config_t);GHOSTTY_API bool ghostty_surface_needs_confirm_quit(ghostty_surface_t);GHOSTTY_API bool ghostty_surface_process_exited(ghostty_surface_t);GHOSTTY_API void ghostty_surface_refresh(ghostty_surface_t);GHOSTTY_API void ghostty_surface_draw(ghostty_surface_t);GHOSTTY_API void ghostty_surface_set_content_scale(ghostty_surface_t, double, double);GHOSTTY_API void ghostty_surface_set_focus(ghostty_surface_t, bool);GHOSTTY_API void ghostty_surface_set_occlusion(ghostty_surface_t, bool);GHOSTTY_API void ghostty_surface_set_size(ghostty_surface_t, uint32_t, uint32_t);GHOSTTY_API ghostty_surface_size_s ghostty_surface_size(ghostty_surface_t);GHOSTTY_API uint64_t ghostty_surface_foreground_pid(ghostty_surface_t);GHOSTTY_API ghostty_string_s ghostty_surface_tty_name(ghostty_surface_t);GHOSTTY_API void ghostty_surface_set_color_scheme(ghostty_surface_t, ghostty_color_scheme_e);GHOSTTY_API ghostty_input_mods_e ghostty_surface_key_translation_mods(ghostty_surface_t, ghostty_input_mods_e);GHOSTTY_API bool ghostty_surface_key(ghostty_surface_t, ghostty_input_key_s);GHOSTTY_API bool ghostty_surface_key_is_binding(ghostty_surface_t, ghostty_input_key_s, ghostty_binding_flags_e*);GHOSTTY_API void ghostty_surface_text(ghostty_surface_t, const char*, uintptr_t);GHOSTTY_API void ghostty_surface_preedit(ghostty_surface_t, const char*, uintptr_t);GHOSTTY_API bool ghostty_surface_mouse_captured(ghostty_surface_t);GHOSTTY_API bool ghostty_surface_mouse_button(ghostty_surface_t, ghostty_input_mouse_state_e, ghostty_input_mouse_button_e, ghostty_input_mods_e);GHOSTTY_API void ghostty_surface_mouse_pos(ghostty_surface_t, double, double, ghostty_input_mods_e);GHOSTTY_API void ghostty_surface_mouse_scroll(ghostty_surface_t, double, double, ghostty_input_scroll_mods_t);GHOSTTY_API void ghostty_surface_mouse_pressure(ghostty_surface_t, uint32_t, double);GHOSTTY_API void ghostty_surface_ime_point(ghostty_surface_t, double*, double*, double*, double*);GHOSTTY_API void ghostty_surface_request_close(ghostty_surface_t);GHOSTTY_API void ghostty_surface_split(ghostty_surface_t, ghostty_action_split_direction_e);GHOSTTY_API void ghostty_surface_split_focus(ghostty_surface_t, ghostty_action_goto_split_e);GHOSTTY_API void ghostty_surface_split_resize(ghostty_surface_t, ghostty_action_resize_split_direction_e, uint16_t);GHOSTTY_API void ghostty_surface_split_equalize(ghostty_surface_t);GHOSTTY_API bool ghostty_surface_binding_action(ghostty_surface_t, const char*, uintptr_t);GHOSTTY_API void ghostty_surface_complete_clipboard_request(ghostty_surface_t, const char*, void*, bool);GHOSTTY_API bool ghostty_surface_has_selection(ghostty_surface_t);GHOSTTY_API bool ghostty_surface_read_selection(ghostty_surface_t, ghostty_text_s*);GHOSTTY_API bool ghostty_surface_read_text(ghostty_surface_t, ghostty_selection_s, ghostty_text_s*);GHOSTTY_API void ghostty_surface_free_text(ghostty_surface_t, ghostty_text_s*);
#ifdef __APPLE__GHOSTTY_API void ghostty_surface_set_display_id(ghostty_surface_t, uint32_t);GHOSTTY_API void* ghostty_surface_quicklook_font(ghostty_surface_t);GHOSTTY_API bool ghostty_surface_quicklook_word(ghostty_surface_t, ghostty_text_s*);#endif
GHOSTTY_API ghostty_inspector_t ghostty_surface_inspector(ghostty_surface_t);GHOSTTY_API void ghostty_inspector_free(ghostty_surface_t);GHOSTTY_API void ghostty_inspector_set_focus(ghostty_inspector_t, bool);GHOSTTY_API void ghostty_inspector_set_content_scale(ghostty_inspector_t, double, double);GHOSTTY_API void ghostty_inspector_set_size(ghostty_inspector_t, uint32_t, uint32_t);GHOSTTY_API void ghostty_inspector_mouse_button(ghostty_inspector_t, ghostty_input_mouse_state_e, ghostty_input_mouse_button_e, ghostty_input_mods_e);GHOSTTY_API void ghostty_inspector_mouse_pos(ghostty_inspector_t, double, double);GHOSTTY_API void ghostty_inspector_mouse_scroll(ghostty_inspector_t, double, double, ghostty_input_scroll_mods_t);GHOSTTY_API void ghostty_inspector_key(ghostty_inspector_t, ghostty_input_action_e, ghostty_input_key_e, ghostty_input_mods_e);GHOSTTY_API void ghostty_inspector_text(ghostty_inspector_t, const char*);
#ifdef __APPLE__GHOSTTY_API bool ghostty_inspector_metal_init(ghostty_inspector_t, void*);GHOSTTY_API void ghostty_inspector_metal_render(ghostty_inspector_t, void*, void*);GHOSTTY_API bool ghostty_inspector_metal_shutdown(ghostty_inspector_t);#endif
// APIs I'd like to get rid of eventually but are still needed for now.// Don't use these unless you know what you're doing.GHOSTTY_API void ghostty_set_window_background_blur(ghostty_app_t, void*);
// Benchmark API, if available.GHOSTTY_API bool ghostty_benchmark_cli(const char*, const char*);
#ifdef __cplusplus}#endif
#endif /* GHOSTTY_H */