logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

tickit_renderbuffer_text, tickit_renderbuffer_text_at - create text regions

Description

tickit_renderbuffer_text()  creates  a  text  region  that starts at the current virtual cursor position,
       containing the given text string and set to the current pen. tickit_renderbuffer_textn() creates  a  text
       region  of  at  most  len  bytes.  It  returns  the  number  of  columns  that  the text string occupies.
       tickit_renderbuffer_textf() and tickit_renderbuffer_vtextf()  take  a  format  string  in  the  style  of
       sprintf(3)  to  create  formatted text from either a list of arguments or a va_list. These functions will
       update the virtual cursor position.

       tickit_renderbuffer_text_at(),   tickit_renderbuffer_textn_at(),    tickit_renderbuffer_textf_at()    and
       tickit_renderbuffer_vtextf_at()  create  a  text  region  at  the  given  position, and otherwise operate
       analogously to their non-_at counterpart. These functions  do  not  use  or  update  the  virtual  cursor
       position.

       Calls to any of these functions allocate storage owned by the TickitRenderBuffer instance itself to store
       the  strings.  This  storage  is  released again by tickit_renderbuffer_reset(3), the implicit reset that
       happens at the end of tickit_renderbuffer_flush_to_term(3), or when every cell that was  originally  part
       of the region has been overwritten with other content.

Name

       tickit_renderbuffer_text, tickit_renderbuffer_text_at - create text regions

Return Value

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

See Also

tickit_renderbuffer_new(3),       tickit_renderbuffer_blit(3),      tickit_renderbuffer_flush_to_term(3),
       tickit_renderbuffer(7), tickit(7)

                                                                                     TICKIT_RENDERBUFFER_TEXT(3)

Synopsis

#include<tickit.h>inttickit_renderbuffer_text(TickitRenderBuffer*rb,constchar*text);inttickit_renderbuffer_textn(TickitRenderBuffer*rb,constchar*text,size_tlen);inttickit_renderbuffer_textf(TickitRenderBuffer*rb,constchar*fmt,...);inttickit_renderbuffer_vtextf(TickitRenderBuffer*rb,constchar*fmt,va_listargs);inttickit_renderbuffer_text_at(TickitRenderBuffer*rb,intline,intcol,constchar*text);inttickit_renderbuffer_textn_at(TickitRenderBuffer*rb,intline,intcol,constchar*text,size_tlen);inttickit_renderbuffer_textf_at(TickitRenderBuffer*rb,intline,intcol,constchar*fmt,...);inttickit_renderbuffer_vtextf_at(TickitRenderBuffer*rb,intline,intcol,constchar*fmt,va_listargs);

       Link with -ltickit.

See Also