summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/term.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-10-02 19:31:43 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-10-03 15:57:00 +0200
commitbe5022138495d2e509735dec7486a040d3e2eb2d (patch)
tree15627c29994b8e0c85e863d9ea332552f22e77ce /src/libsystemd-terminal/term.h
parent1bfa594cf26a9880c489cdcb5911bfb3440aa566 (diff)
terminal: add screen renderer
We don't want to expose the term_screen internals for rendering. Therefore, provide an iterator that allows external renderers to draw terminals.
Diffstat (limited to 'src/libsystemd-terminal/term.h')
-rw-r--r--src/libsystemd-terminal/term.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libsystemd-terminal/term.h b/src/libsystemd-terminal/term.h
index d5b934fc59..a3ca252e31 100644
--- a/src/libsystemd-terminal/term.h
+++ b/src/libsystemd-terminal/term.h
@@ -147,3 +147,15 @@ void term_screen_soft_reset(term_screen *screen);
void term_screen_hard_reset(term_screen *screen);
int term_screen_set_answerback(term_screen *screen, const char *answerback);
+
+int term_screen_draw(term_screen *screen,
+ int (*draw_fn) (term_screen *screen,
+ void *userdata,
+ unsigned int x,
+ unsigned int y,
+ const term_attr *attr,
+ const uint32_t *ch,
+ size_t n_ch,
+ unsigned int ch_width),
+ void *userdata,
+ uint64_t *fb_age);