1TICKIT_TERM_SET_OUTPUT_FUNC(L3i)brary Functions ManuTaIlCKIT_TERM_SET_OUTPUT_FUNC(3)
2
3
4

NAME

6       tickit_term_set_output_func  -  manage  terminal  output via a callback
7       function
8

SYNOPSIS

10       #include <tickit.h>
11
12       typedef void TickitTermOutputFunc(TickitTerm *tt, const char *bytes,
13           size_t len, void *user);
14
15       void tickit_term_set_output_func(TickitTerm *tt,
16           TickitTermOutputFunc *fn, void *user);
17
18       Link with -ltickit.
19

DESCRIPTION

21       tickit_term_set_output_func() associates an output  function  with  the
22       terminal  instance. If set, this function will be used to send bytes to
23       the user's terminal even if an output file descriptor is also set. When
24       the  function  is  invoked,  it will be passed the terminal instance, a
25       byte buffer and size, and the user data pointer it was installed with.
26
27       When an output function is replaced  by  another  or  the  terminal  is
28       destroyed, an existing function is invoked one final time to inform it.
29       In this case, the len argument will be 0 and bytes will be NULL.
30
31       After both an input and output method have been defined, it  is  recom‐
32       mended to call tickit_term_await_started(3) to wait for the terminal to
33       be set up.
34

RETURN VALUE

36       tickit_term_set_output_func() returns no value.
37

SEE ALSO

39       tickit_term_new(3),                       tickit_term_set_output_fd(3),
40       tickit_term_await_started(3),   tickit_term_print(3),   tickit_term(7),
41       tickit(7)
42
43
44
45                                                TICKIT_TERM_SET_OUTPUT_FUNC(3)
Impressum