From 0bfc40618a7c9d40cacc5de3c34306c19ebaef1e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 8 Jan 2013 17:06:01 +0000 Subject: Make Monkey front end build with new clipboard API. --- monkey/browser.c | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) (limited to 'monkey/browser.c') diff --git a/monkey/browser.c b/monkey/browser.c index ddea08675..e6a57d00b 100644 --- a/monkey/browser.c +++ b/monkey/browser.c @@ -327,34 +327,28 @@ gui_clear_selection(struct gui_window *g) { } -void -gui_paste_from_clipboard(struct gui_window *g, int x, int y) -{ -} - -bool -gui_empty_clipboard(void) -{ - return true; -} - -bool -gui_add_to_clipboard(const char *text, size_t length, bool space, - const plot_font_style_t *fstyle) +/** + * Core asks front end for clipboard contents. + * + * \param buffer UTF-8 text, allocated by front end, ownership yeilded to core + * \param length Byte length of UTF-8 text in buffer + */ +void gui_get_clipboard(char **buffer, size_t *length) { - return true; } -bool -gui_commit_clipboard(void) -{ - return true; -} -bool -gui_copy_to_clipboard(struct selection *s) +/** + * Core tells front end to put given text in clipboard + * + * \param buffer UTF-8 text, owned by core + * \param length Byte length of UTF-8 text in buffer + * \param styles Array of styles given to text runs, owned by core, or NULL + * \param n_styles Number of text run styles in array + */ +void gui_set_clipboard(const char *buffer, size_t length, + nsclipboard_styles styles[], int n_styles) { - return true; } void -- cgit v1.2.3