TICKIT_TERM_SET_OUTPUT_FD(3)

NAME
tickit_term_set_output_fd, tickit_term_get_output_fd - manage terminal output

SYNOPSIS
    #include <tickit.h>

    void tickit_term_set_output_fd(TickitTerm *tt, int fd);
    int tickit_term_get_output_fd(TickitTerm *tt);

Link with -ltickit.

DESCRIPTION
tickit_term_set_output_fd() associates an output file descriptor with the terminal instance. If no output function has been set by tickit_term_set_output_func(3) then this file descriptor will be used to send bytes to the user's terminal. This file descriptor will also be used by tickit_term_refresh_size(3) to query the size of the terminal by issuing the TIOCGWINSZ ioctl(2). The value -1 may be set to indicate an absence of a file descriptor.

tickit_term_get_output_fd() returns the currently associated output file descriptor, or -1 if none has been set.

After both an input and output method have been defined, it is recommended to call tickit_term_await_started(3) to wait for the terminal to be set up.

RETURN VALUE
tickit_term_set_output_fd() returns no value. tickit_term_get_output_fd() returns a file descriptor or -1.

SEE ALSO
tickit_term_new(3), tickit_term_set_output_func(3), tickit_term_await_started(3), tickit_term_print(3), tickit_term(7), tickit(7)