macos: support setting multiple clipboard content types

This commit is contained in:
Mitchell Hashimoto
2025-10-30 13:49:14 -07:00
parent df037d75a6
commit 0f1c46e4a4
7 changed files with 141 additions and 12 deletions

View File

@@ -45,6 +45,11 @@ typedef enum {
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,
@@ -855,8 +860,9 @@ typedef void (*ghostty_runtime_confirm_read_clipboard_cb)(
void*,
ghostty_clipboard_request_e);
typedef void (*ghostty_runtime_write_clipboard_cb)(void*,
const char*,
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,