[vte] widget: Move some public API to its own file
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] widget: Move some public API to its own file
- Date: Wed, 18 Nov 2015 20:20:06 +0000 (UTC)
commit 2386a71dfd5c04c11c6b41110cf6b157745a230e
Author: Christian Persch <chpe gnome org>
Date: Wed Nov 18 21:15:43 2015 +0100
widget: Move some public API to its own file
src/vte.cc | 37 ++++++-------------------------------
src/vtegtk.cc | 34 ++++++++++++++++++++++++++++++++++
src/vteinternal.hh | 5 +++++
3 files changed, 45 insertions(+), 31 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index f95487e..fe09b3a 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -12500,42 +12500,17 @@ update_timeout (gpointer data)
return FALSE;
}
-/**
- * vte_terminal_write_contents_sync:
- * @terminal: a #VteTerminal
- * @stream: a #GOutputStream to write to
- * @flags: a set of #VteWriteFlags
- * @cancellable: (allow-none): a #GCancellable object, or %NULL
- * @error: (allow-none): a #GError location to store the error occuring, or %NULL
- *
- * Write contents of the current contents of @terminal (including any
- * scrollback history) to @stream according to @flags.
- *
- * If @cancellable is not %NULL, then the operation can be cancelled by triggering
- * the cancellable object from another thread. If the operation was cancelled,
- * the error %G_IO_ERROR_CANCELLED will be returned in @error.
- *
- * This is a synchronous operation and will make the widget (and input
- * processing) during the write operation, which may take a long time
- * depending on scrollback history and @stream availability for writing.
- *
- * Returns: %TRUE on success, %FALSE if there was an error
- */
-gboolean
-vte_terminal_write_contents_sync (VteTerminal *terminal,
- GOutputStream *stream,
- VteWriteFlags flags,
- GCancellable *cancellable,
- GError **error)
+bool
+VteTerminalPrivate::write_contents_sync (GOutputStream *stream,
+ VteWriteFlags flags,
+ GCancellable *cancellable,
+ GError **error)
{
- g_return_val_if_fail(VTE_IS_TERMINAL(terminal), FALSE);
- g_return_val_if_fail(G_IS_OUTPUT_STREAM(stream), FALSE);
- return _vte_ring_write_contents (terminal->pvt->screen->row_data,
+ return _vte_ring_write_contents (m_screen->row_data,
stream, flags,
cancellable, error);
}
-
/*
* Buffer search
*/
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 75cdef6..c096cd4 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -1811,3 +1811,37 @@ vte_terminal_set_word_char_exceptions(VteTerminal *terminal,
if (terminal->pvt->set_word_char_exceptions(exceptions))
g_object_notify_by_pspec(G_OBJECT(terminal), pspecs[PROP_WORD_CHAR_EXCEPTIONS]);
}
+
+/**
+ * vte_terminal_write_contents_sync:
+ * @terminal: a #VteTerminal
+ * @stream: a #GOutputStream to write to
+ * @flags: a set of #VteWriteFlags
+ * @cancellable: (allow-none): a #GCancellable object, or %NULL
+ * @error: (allow-none): a #GError location to store the error occuring, or %NULL
+ *
+ * Write contents of the current contents of @terminal (including any
+ * scrollback history) to @stream according to @flags.
+ *
+ * If @cancellable is not %NULL, then the operation can be cancelled by triggering
+ * the cancellable object from another thread. If the operation was cancelled,
+ * the error %G_IO_ERROR_CANCELLED will be returned in @error.
+ *
+ * This is a synchronous operation and will make the widget (and input
+ * processing) during the write operation, which may take a long time
+ * depending on scrollback history and @stream availability for writing.
+ *
+ * Returns: %TRUE on success, %FALSE if there was an error
+ */
+gboolean
+vte_terminal_write_contents_sync (VteTerminal *terminal,
+ GOutputStream *stream,
+ VteWriteFlags flags,
+ GCancellable *cancellable,
+ GError **error)
+{
+ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), FALSE);
+ g_return_val_if_fail(G_IS_OUTPUT_STREAM(stream), FALSE);
+
+ return terminal->pvt->write_contents_sync(stream, flags, cancellable, error);
+}
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 7ba6b75..1804a54 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -605,6 +605,11 @@ public:
bool set_input_enabled(bool enabled);
bool set_word_char_exceptions(char const* exceptions);
+
+ bool write_contents_sync (GOutputStream *stream,
+ VteWriteFlags flags,
+ GCancellable *cancellable,
+ GError **error);
};
#define m_invalidated_all invalidated_all
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]