From 4d17423ed184ad0f0343ca62d0b101a7a042941b Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 15 Jul 2020 11:33:37 +0200 Subject: 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. --- terminal.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'terminal.h') 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); -- cgit v1.3