[vte] widget: Move some public API to its own file



commit 868dbdf6d938c05c51c994c454a73ffd999d430d
Author: Christian Persch <chpe gnome org>
Date:   Wed Nov 18 21:15:44 2015 +0100

    widget: Move some public API to its own file

 src/vte.cc    |   80 ---------------------------------------------------------
 src/vtegtk.cc |   80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+), 80 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 9cd0ec2..21ca9b4 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -11019,69 +11019,6 @@ vte_terminal_get_rewrap_on_resize(VteTerminal *terminal)
        return terminal->pvt->rewrap_on_resize;
 }
 
-/**
- * vte_terminal_copy_clipboard:
- * @terminal: a #VteTerminal
- *
- * Places the selected text in the terminal in the #GDK_SELECTION_CLIPBOARD
- * selection.
- */
-void
-vte_terminal_copy_clipboard(VteTerminal *terminal)
-{
-       g_return_if_fail(VTE_IS_TERMINAL(terminal));
-       g_signal_emit (terminal, signals[COPY_CLIPBOARD], 0);
-}
-
-/**
- * vte_terminal_paste_clipboard:
- * @terminal: a #VteTerminal
- *
- * Sends the contents of the #GDK_SELECTION_CLIPBOARD selection to the
- * terminal's child.  If necessary, the data is converted from UTF-8 to the
- * terminal's current encoding. It's called on paste menu item, or when
- * user presses Shift+Insert.
- */
-void
-vte_terminal_paste_clipboard(VteTerminal *terminal)
-{
-       g_return_if_fail(VTE_IS_TERMINAL(terminal));
-       g_signal_emit (terminal, signals[PASTE_CLIPBOARD], 0);
-}
-
-/**
- * vte_terminal_copy_primary:
- * @terminal: a #VteTerminal
- *
- * Places the selected text in the terminal in the #GDK_SELECTION_PRIMARY
- * selection.
- */
-void
-vte_terminal_copy_primary(VteTerminal *terminal)
-{
-       g_return_if_fail(VTE_IS_TERMINAL(terminal));
-       _vte_debug_print(VTE_DEBUG_SELECTION, "Copying to PRIMARY.\n");
-       terminal->pvt->widget_copy(VTE_SELECTION_PRIMARY);
-}
-
-/**
- * vte_terminal_paste_primary:
- * @terminal: a #VteTerminal
- *
- * Sends the contents of the #GDK_SELECTION_PRIMARY selection to the terminal's
- * child.  If necessary, the data is converted from UTF-8 to the terminal's
- * current encoding.  The terminal will call also paste the
- * #GDK_SELECTION_PRIMARY selection when the user clicks with the the second
- * mouse button.
- */
-void
-vte_terminal_paste_primary(VteTerminal *terminal)
-{
-       g_return_if_fail(VTE_IS_TERMINAL(terminal));
-       _vte_debug_print(VTE_DEBUG_SELECTION, "Pasting PRIMARY.\n");
-       terminal->pvt->widget_paste(GDK_SELECTION_PRIMARY);
-}
-
 /* Set up whatever background we wanted. */
 static void
 vte_terminal_background_update(VteTerminal *terminal)
@@ -11115,23 +11052,6 @@ vte_terminal_background_update(VteTerminal *terminal)
        _vte_invalidate_all (terminal);
 }
 
-/**
- * vte_terminal_get_has_selection:
- * @terminal: a #VteTerminal
- *
- * Checks if the terminal currently contains selected text.  Note that this
- * is different from determining if the terminal is the owner of any
- * #GtkClipboard items.
- *
- * Returns: %TRUE if part of the text in the terminal is selected.
- */
-gboolean
-vte_terminal_get_has_selection(VteTerminal *terminal)
-{
-       g_return_val_if_fail(VTE_IS_TERMINAL(terminal), FALSE);
-       return terminal->pvt->has_selection;
-}
-
 static void
 vte_terminal_update_cursor_blinks_internal(VteTerminal *terminal)
 {
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 351886d..2d13bd0 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -1513,6 +1513,69 @@ vte_get_user_shell (void)
 /* VteTerminal public API */
 
 /**
+ * vte_terminal_copy_clipboard:
+ * @terminal: a #VteTerminal
+ *
+ * Places the selected text in the terminal in the #GDK_SELECTION_CLIPBOARD
+ * selection.
+ */
+void
+vte_terminal_copy_clipboard(VteTerminal *terminal)
+{
+       g_return_if_fail(VTE_IS_TERMINAL(terminal));
+       g_signal_emit (terminal, signals[COPY_CLIPBOARD], 0);
+}
+
+/**
+ * vte_terminal_copy_primary:
+ * @terminal: a #VteTerminal
+ *
+ * Places the selected text in the terminal in the #GDK_SELECTION_PRIMARY
+ * selection.
+ */
+void
+vte_terminal_copy_primary(VteTerminal *terminal)
+{
+       g_return_if_fail(VTE_IS_TERMINAL(terminal));
+       _vte_debug_print(VTE_DEBUG_SELECTION, "Copying to PRIMARY.\n");
+       terminal->pvt->widget_copy(VTE_SELECTION_PRIMARY);
+}
+
+/**
+ * vte_terminal_paste_clipboard:
+ * @terminal: a #VteTerminal
+ *
+ * Sends the contents of the #GDK_SELECTION_CLIPBOARD selection to the
+ * terminal's child.  If necessary, the data is converted from UTF-8 to the
+ * terminal's current encoding. It's called on paste menu item, or when
+ * user presses Shift+Insert.
+ */
+void
+vte_terminal_paste_clipboard(VteTerminal *terminal)
+{
+       g_return_if_fail(VTE_IS_TERMINAL(terminal));
+       g_signal_emit (terminal, signals[PASTE_CLIPBOARD], 0);
+}
+
+/**
+ * vte_terminal_paste_primary:
+ * @terminal: a #VteTerminal
+ *
+ * Sends the contents of the #GDK_SELECTION_PRIMARY selection to the terminal's
+ * child.  If necessary, the data is converted from UTF-8 to the terminal's
+ * current encoding.  The terminal will call also paste the
+ * #GDK_SELECTION_PRIMARY selection when the user clicks with the the second
+ * mouse button.
+ */
+void
+vte_terminal_paste_primary(VteTerminal *terminal)
+{
+       g_return_if_fail(VTE_IS_TERMINAL(terminal));
+       _vte_debug_print(VTE_DEBUG_SELECTION, "Pasting PRIMARY.\n");
+       terminal->pvt->widget_paste(GDK_SELECTION_PRIMARY);
+}
+
+/**
  * vte_terminal_search_find_previous:
  * @terminal: a #VteTerminal
  *
@@ -1908,6 +1971,23 @@ vte_terminal_set_geometry_hints_for_window(VteTerminal *terminal,
 }
 
 /**
+ * vte_terminal_get_has_selection:
+ * @terminal: a #VteTerminal
+ *
+ * Checks if the terminal currently contains selected text.  Note that this
+ * is different from determining if the terminal is the owner of any
+ * #GtkClipboard items.
+ *
+ * Returns: %TRUE if part of the text in the terminal is selected.
+ */
+gboolean
+vte_terminal_get_has_selection(VteTerminal *terminal)
+{
+       g_return_val_if_fail(VTE_IS_TERMINAL(terminal), FALSE);
+       return terminal->pvt->has_selection;
+}
+
+/**
  * vte_terminal_get_icon_title:
  * @terminal: a #VteTerminal
  *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]