aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-15 09:33:37 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-15 09:33:37 +0000
commit4d17423ed184ad0f0343ca62d0b101a7a042941b (patch)
tree1877e93c7facac4ed7a6e8278077a2bbdde5588d /terminal.h
parentextract: extract_one() sets a fail flag that extract_finish() reads (diff)
term: add term_scrollback_to_text() and term_view_to_text()
These functions extract the current view, or the entire scrollback as an UTF-8 encoded byte buffer.
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/terminal.h b/terminal.h
index fece4b50..40f64387 100644
--- a/terminal.h
+++ b/terminal.h
@@ -543,5 +543,7 @@ void term_disable_app_sync_updates(struct terminal *term);
enum term_surface term_surface_kind(
const struct terminal *term, const struct wl_surface *surface);
-bool term_scrollback_to_text(const struct terminal *term, wchar_t **text);
-bool term_view_to_text(const struct terminal *term, wchar_t **text);
+bool term_scrollback_to_text(
+ const struct terminal *term, char **text, size_t *len);
+bool term_view_to_text(
+ const struct terminal *term, char **text, size_t *len);