diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-02-01 10:45:20 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-02-01 10:45:20 +0000 |
commit | 1f62b5a980020b0e5df0e68cb476083ba2dc1fe5 (patch) | |
tree | e74b757de8b64f2ea53f1916840e58ae105c2d7a /riscos/textselection.c | |
parent | 356461244e9a31d9c22fab358cdf95cb3f22364f (diff) | |
download | netsurf-1f62b5a980020b0e5df0e68cb476083ba2dc1fe5.tar.gz netsurf-1f62b5a980020b0e5df0e68cb476083ba2dc1fe5.tar.bz2 |
make the clipboard operation table and members static to textselection module and cleanup unnecessary includes
Diffstat (limited to 'riscos/textselection.c')
-rw-r--r-- | riscos/textselection.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/riscos/textselection.c b/riscos/textselection.c index c07075475..68e71a9f5 100644 --- a/riscos/textselection.c +++ b/riscos/textselection.c @@ -25,25 +25,27 @@ #include <string.h> #include "oslib/osfile.h" #include "oslib/wimp.h" + +#include "utils/log.h" +#include "utils/utf8.h" +#include "utils/utils.h" #include "content/hlcache.h" #include "desktop/gui.h" #include "desktop/textinput.h" + #include "riscos/gui.h" #include "riscos/menus.h" #include "riscos/message.h" #include "riscos/mouse.h" #include "riscos/save.h" #include "riscos/textselection.h" -#include "utils/log.h" -#include "utils/utf8.h" -#include "utils/utils.h" + #ifndef wimp_DRAG_CLAIM_SUPPRESS_DRAGBOX #define wimp_DRAG_CLAIM_SUPPRESS_DRAGBOX ((wimp_drag_claim_flags) 0x2u) #endif - /** Receive of Dragging message has claimed it */ static bool dragging_claimed = false; static wimp_t dragging_claimant; @@ -194,7 +196,7 @@ static void ro_gui_selection_drag_end(wimp_dragged *drag, void *data) * \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, +static void gui_set_clipboard(const char *buffer, size_t length, nsclipboard_styles styles[], int n_styles) { char *new_cb; @@ -245,7 +247,7 @@ void gui_set_clipboard(const char *buffer, size_t length, * \param buffer UTF-8 text, allocated by front end, ownership yielded to core * \param length Byte length of UTF-8 text in buffer */ -void gui_get_clipboard(char **buffer, size_t *length) +static void gui_get_clipboard(char **buffer, size_t *length) { *buffer = NULL; *length = 0; @@ -652,3 +654,10 @@ void ro_gui_dragging_bounced(wimp_message *message) { dragging_claimed = false; } + +static struct gui_clipboard_table clipboard_table = { + .get = gui_get_clipboard, + .set = gui_set_clipboard, +}; + +struct gui_clipboard_table *riscos_clipboard_table = &clipboard_table; |