apprt: convert selection info to a single struct and C API

This commit is contained in:
Mitchell Hashimoto
2024-06-29 11:23:14 -05:00
parent 80700d524d
commit 26735f0e05
5 changed files with 102 additions and 95 deletions

View File

@@ -373,6 +373,13 @@ typedef struct {
const char* message;
} ghostty_error_s;
typedef struct {
double tl_px_x;
double tl_px_y;
uint32_t offset_start;
uint32_t offset_len;
} ghostty_selection_s;
typedef struct {
void* nsview;
} ghostty_platform_macos_s;
@@ -557,8 +564,7 @@ uintptr_t ghostty_surface_selection(ghostty_surface_t, char*, uintptr_t);
#ifdef __APPLE__
void ghostty_surface_set_display_id(ghostty_surface_t, uint32_t);
void* ghostty_surface_quicklook_font(ghostty_surface_t);
void ghostty_surface_selection_range(ghostty_surface_t, uint32_t*, uint32_t*);
void ghostty_surface_selection_point(ghostty_surface_t, double*, double*);
bool ghostty_surface_selection_info(ghostty_surface_t, ghostty_selection_s*);
#endif
ghostty_inspector_t ghostty_surface_inspector(ghostty_surface_t);