mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-23 07:45:20 +00:00
macos: change focus callback to use an enum so we can get other dirs
This commit is contained in:
@@ -32,8 +32,7 @@ typedef const char* (*ghostty_runtime_read_clipboard_cb)(void *);
|
||||
typedef void (*ghostty_runtime_write_clipboard_cb)(void *, const char *);
|
||||
typedef void (*ghostty_runtime_new_split_cb)(void *, ghostty_split_direction_e);
|
||||
typedef void (*ghostty_runtime_close_surface_cb)(void *);
|
||||
typedef void (*ghostty_runtime_focus_next_split_cb)(void *);
|
||||
typedef void (*ghostty_runtime_focus_previous_split_cb)(void *);
|
||||
typedef void (*ghostty_runtime_focus_split_cb)(void *, ghostty_split_focus_direction_e);
|
||||
|
||||
typedef struct {
|
||||
void *userdata;
|
||||
@@ -43,8 +42,7 @@ typedef struct {
|
||||
ghostty_runtime_write_clipboard_cb write_clipboard_cb;
|
||||
ghostty_runtime_new_split_cb new_split_cb;
|
||||
ghostty_runtime_close_surface_cb close_surface_cb;
|
||||
ghostty_runtime_focus_next_split_cb focus_next_split_cb;
|
||||
ghostty_runtime_focus_previous_split_cb focus_previous_split_cb;
|
||||
ghostty_runtime_focus_split_cb focus_split_cb;
|
||||
} ghostty_runtime_config_s;
|
||||
|
||||
typedef struct {
|
||||
@@ -58,6 +56,15 @@ typedef enum {
|
||||
GHOSTTY_SPLIT_DOWN
|
||||
} ghostty_split_direction_e;
|
||||
|
||||
typedef enum {
|
||||
GHOSTTY_SPLIT_FOCUS_PREVIOUS,
|
||||
GHOSTTY_SPLIT_FOCUS_NEXT,
|
||||
GHOSTTY_SPLIT_FOCUS_TOP,
|
||||
GHOSTTY_SPLIT_FOCUS_LEFT,
|
||||
GHOSTTY_SPLIT_FOCUS_BOTTOM,
|
||||
GHOSTTY_SPLIT_FOCUS_RIGHT,
|
||||
} ghostty_split_focus_direction_e;
|
||||
|
||||
typedef enum {
|
||||
GHOSTTY_MOUSE_RELEASE,
|
||||
GHOSTTY_MOUSE_PRESS,
|
||||
@@ -258,8 +265,7 @@ void ghostty_surface_mouse_scroll(ghostty_surface_t, double, double);
|
||||
void ghostty_surface_ime_point(ghostty_surface_t, double *, double *);
|
||||
void ghostty_surface_request_close(ghostty_surface_t);
|
||||
void ghostty_surface_split(ghostty_surface_t, ghostty_split_direction_e);
|
||||
void ghostty_surface_split_focus_previous(ghostty_surface_t);
|
||||
void ghostty_surface_split_focus_next(ghostty_surface_t);
|
||||
void ghostty_surface_split_focus(ghostty_surface_t, ghostty_split_focus_direction_e);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user