1TICKIT_RENDERBUFFER_TEXT(3)Library Functions ManualTICKIT_RENDERBUFFER_TEXT(3)
2
3
4

NAME

6       tickit_renderbuffer_text,  tickit_renderbuffer_text_at  -  create  text
7       regions
8

SYNOPSIS

10       #include <tickit.h>
11
12       int tickit_renderbuffer_text(TickitRenderBuffer *rb,
13               const char *text);
14       int tickit_renderbuffer_textn(TickitRenderBuffer *rb,
15               const char *text, size_t len);
16       int tickit_renderbuffer_textf(TickitRenderBuffer *rb,
17               const char *fmt, ...);
18       int tickit_renderbuffer_vtextf(TickitRenderBuffer *rb,
19               const char *fmt, va_list args);
20
21       int tickit_renderbuffer_text_at(TickitRenderBuffer *rb,
22               int line, int col, const char *text);
23       int tickit_renderbuffer_textn_at(TickitRenderBuffer *rb,
24               int line, int col, const char *text, size_t len);
25       int tickit_renderbuffer_textf_at(TickitRenderBuffer *rb,
26               int line, int col, const char *fmt, ...);
27       int tickit_renderbuffer_vtextf_at(TickitRenderBuffer *rb,
28               int line, int col, const char *fmt, va_list args);
29
30       Link with -ltickit.
31

DESCRIPTION

33       tickit_renderbuffer_text() creates a text region  that  starts  at  the
34       current  virtual  cursor position, containing the given text string and
35       set to the current  pen.  tickit_renderbuffer_textn()  creates  a  text
36       region  of at most len bytes. It returns the number of columns that the
37       text string occupies.  tickit_renderbuffer_textf()  and  tickit_render‐
38       buffer_vtextf() take a format string in the style of sprintf(3) to cre‐
39       ate formatted text from either a list of arguments or a va_list.  These
40       functions will update the virtual cursor position.
41
42       tickit_renderbuffer_text_at(),          tickit_renderbuffer_textn_at(),
43       tickit_renderbuffer_textf_at() and tickit_renderbuffer_vtextf_at() cre‐
44       ate  a  text region at the given position, and otherwise operate analo‐
45       gously to their non-_at counterpart. These  functions  do  not  use  or
46       update the virtual cursor position.
47
48       Calls  to  any  of  these functions allocate storage owned by the Tick‐
49       itRenderBuffer instance itself to store the strings.  This  storage  is
50       released again by tickit_renderbuffer_reset(3), the implicit reset that
51       happens at the end  of  tickit_renderbuffer_flush_to_term(3),  or  when
52       every  cell that was originally part of the region has been overwritten
53       with other content.
54

RETURN VALUE

56       These functions return an integer giving the number of columns the  new
57       region occupies.
58

SEE ALSO

60       tickit_renderbuffer_new(3), tickit_renderbuffer_blit(3), tickit_render‐
61       buffer_flush_to_term(3), tickit_renderbuffer(7), tickit(7)
62
63
64
65                                                   TICKIT_RENDERBUFFER_TEXT(3)
Impressum