diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-02-01 12:41:23 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-02-01 12:41:23 +0000 |
commit | 8bb0e87b1a8fc9872762f5caa856f64c4e9f1cdd (patch) | |
tree | d7f69b4d1aaf196513103004c0afb4d110d7be9f /gtk/selection.c | |
parent | 1f62b5a980020b0e5df0e68cb476083ba2dc1fe5 (diff) | |
download | netsurf-8bb0e87b1a8fc9872762f5caa856f64c4e9f1cdd.tar.gz netsurf-8bb0e87b1a8fc9872762f5caa856f64c4e9f1cdd.tar.bz2 |
make clipboard table operations static and remove unecessary includes
Diffstat (limited to 'gtk/selection.c')
-rw-r--r-- | gtk/selection.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/selection.c b/gtk/selection.c index 8bdc0f8c8..22b4bfe5a 100644 --- a/gtk/selection.c +++ b/gtk/selection.c @@ -23,7 +23,6 @@ #include "desktop/gui.h" #include "desktop/browser.h" -#include "gtk/selection.h" #include "gtk/window.h" static GString *current_selection = NULL; @@ -36,7 +35,7 @@ static GtkClipboard *clipboard; * \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) +static void gui_get_clipboard(char **buffer, size_t *length) { gchar *gtext; @@ -72,7 +71,7 @@ void gui_get_clipboard(char **buffer, size_t *length) * \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) { clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); @@ -88,3 +87,9 @@ void gui_set_clipboard(const char *buffer, size_t length, gtk_clipboard_set_text(clipboard, current_selection->str, -1); } +static struct gui_clipboard_table clipboard_table = { + .get = gui_get_clipboard, + .set = gui_set_clipboard, +}; + +struct gui_clipboard_table *nsgtk_clipboard_table = &clipboard_table; |