From 8bb0e87b1a8fc9872762f5caa856f64c4e9f1cdd Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 1 Feb 2014 12:41:23 +0000 Subject: make clipboard table operations static and remove unecessary includes --- gtk/selection.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gtk/selection.c') 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; -- cgit v1.2.3