summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-05-30 11:04:32 +0100
committerVincent Sanders <vince@kyllikki.org>2016-05-30 11:04:32 +0100
commitd240bec03627f5a26cd70e83a58483c69834f7c2 (patch)
treec8e4d87c45cf00bebd78d2fcfbcc77bd1154b4d3 /desktop
parent1eb86d9df2d6897d11b712f21d4ac23390fbdc70 (diff)
downloadnetsurf-d240bec03627f5a26cd70e83a58483c69834f7c2.tar.gz
netsurf-d240bec03627f5a26cd70e83a58483c69834f7c2.tar.bz2
move clipboard header into public API
Diffstat (limited to 'desktop')
-rw-r--r--desktop/gui_clipboard.h62
-rw-r--r--desktop/gui_factory.c2
-rw-r--r--desktop/selection.c2
-rw-r--r--desktop/textarea.c2
-rw-r--r--desktop/treeview.c2
5 files changed, 4 insertions, 66 deletions
diff --git a/desktop/gui_clipboard.h b/desktop/gui_clipboard.h
deleted file mode 100644
index 6feea2404..000000000
--- a/desktop/gui_clipboard.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2014 Vincent Sanders <vince@netsurf-browser.org>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
- * \file
- *
- * Interface to platform-specific clipboard operations.
- */
-
-#ifndef _NETSURF_DESKTOP_GUI_CLIPBOARD_H_
-#define _NETSURF_DESKTOP_GUI_CLIPBOARD_H_
-
-#include <stddef.h>
-
-#include "utils/errors.h"
-#include "desktop/plot_style.h"
-
-typedef struct nsnsclipboard_styles {
- size_t start; /**< Start of run */
-
- plot_font_style_t style; /**< Style to give text run */
-} nsclipboard_styles;
-
-/**
- * function table for clipboard operations.
- */
-struct gui_clipboard_table {
- /**
- * 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 (*get)(char **buffer, size_t *length);
-
- /**
- * 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 (*set)(const char *buffer, size_t length, nsclipboard_styles styles[], int n_styles);
-};
-
-#endif
diff --git a/desktop/gui_factory.c b/desktop/gui_factory.c
index 5ee6326ed..65a3c584a 100644
--- a/desktop/gui_factory.c
+++ b/desktop/gui_factory.c
@@ -35,7 +35,7 @@
#include "desktop/gui_misc.h"
#include "netsurf/window.h"
#include "netsurf/search.h"
-#include "desktop/gui_clipboard.h"
+#include "netsurf/clipboard.h"
#include "desktop/gui_utf8.h"
#include "desktop/gui_layout.h"
#include "desktop/netsurf.h"
diff --git a/desktop/selection.c b/desktop/selection.c
index 8f064d4a6..d2e326af3 100644
--- a/desktop/selection.c
+++ b/desktop/selection.c
@@ -42,7 +42,7 @@
#include "desktop/plotters.h"
#include "desktop/save_text.h"
#include "desktop/selection.h"
-#include "desktop/gui_clipboard.h"
+#include "netsurf/clipboard.h"
#include "netsurf/window.h"
#include "desktop/gui_internal.h"
diff --git a/desktop/textarea.c b/desktop/textarea.c
index 96a1713ef..833815eba 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -37,7 +37,7 @@
#include "desktop/textinput.h"
#include "desktop/plotters.h"
#include "desktop/scrollbar.h"
-#include "desktop/gui_clipboard.h"
+#include "netsurf/clipboard.h"
#include "desktop/gui_layout.h"
#include "desktop/gui_internal.h"
diff --git a/desktop/treeview.c b/desktop/treeview.c
index ec2a513ca..d72bf2f8d 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -32,7 +32,7 @@
#include "desktop/plotters.h"
#include "desktop/textarea.h"
#include "desktop/treeview.h"
-#include "desktop/gui_clipboard.h"
+#include "netsurf/clipboard.h"
#include "desktop/gui_layout.h"
#include "desktop/gui_internal.h"