TICKIT_RENDERBUFFER_TEXTN(3)
π TICKIT_RENDERBUFFER_TEXT(3) π
okay bestie, so this is a page from the Library Functions Manual and it's all about tickit_renderbuffer_text, tickit_renderbuffer_text_at β aka the girls who create text regions β¨ (yes that's the whole NAME section, we're not skipping a crumb of it)
β¨ SYNOPSIS β¨
#include <tickit.h>
int tickit_renderbuffer_text(TickitRenderBuffer *rb,
const char *text);
int tickit_renderbuffer_textn(TickitRenderBuffer *rb,
const char *text, size_t len);
int tickit_renderbuffer_textf(TickitRenderBuffer *rb,
const char *fmt, ...);
int tickit_renderbuffer_vtextf(TickitRenderBuffer *rb,
const char *fmt, va_list args);
int tickit_renderbuffer_text_at(TickitRenderBuffer *rb,
int line, int col, const char *text);
int tickit_renderbuffer_textn_at(TickitRenderBuffer *rb,
int line, int col, const char *text, size_t len);
int tickit_renderbuffer_textf_at(TickitRenderBuffer *rb,
int line, int col, const char *fmt, ...);
int tickit_renderbuffer_vtextf_at(TickitRenderBuffer *rb,
int line, int col, const char *fmt, va_list args);
Link with -ltickit.
ngl the Link with -ltickit. line is lowkey the most important line here, don't forget it or the linker will simply Not π
π¦ DESCRIPTION π¦
tickit_renderbuffer_text() creates a text region that starts at the current virtual cursor position, holding the text string you handed it and set to the current pen. it's giving "just drop this text right here where I'm standing" π
tickit_renderbuffer_textn() creates a text region of at most len bytes. it returns the number of columns that the text string occupies. slay, measured and everything πβ¨
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. no cursor drama, they just show up exactly where you told them to π―
π§Ί storage tea (the part nobody warns you about)
Calls to any of these functions allocate storage owned by the TickitRenderBuffer instance itself to store the strings. that storage gets 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 π
heads up fr fr: that memory belongs to the render buffer, not to you. don't go freeing it yourself, that's not the vibe π
β RETURN VALUE β
These functions return an integer giving the number of columns the new region occupies. cute, concise, informative. periodt π
π SEE ALSO π
tickit_renderbuffer_new(3)tickit_renderbuffer_blit(3)tickit_renderbuffer_flush_to_term(3)tickit_renderbuffer(7)tickit(7)
and that's the whole page bestie, no crumbs left behind π«Ά
signing off from the Library Functions Manual β this was TICKIT_RENDERBUFFER_TEXT(3), mwah π
π¦ where this page comes from
- alpine 3.24: libtickit-doc 0.4.6-r0 Β· MIT
- debian bookworm: libtickit-dev 0.4.3-1 Β· MIT
- debian trixie: libtickit-dev 0.4.3-2 Β· MIT
- fedora 43: libtickit-devel 0.4.5-2.fc43 Β· MIT
- fedora 43: libtickit-devel 0.4.5-2.fc43 Β· MIT
- fedora 44: libtickit-devel 0.4.5-3.fc44 Β· MIT
- fedora 44: libtickit-devel 0.4.5-3.fc44 Β· MIT
- nixos 26.05: libtickit 0.4.5
- nixpkgs unstable: libtickit 0.4.6
- ubuntu jammy: libtickit-dev 0.4.1-1 Β· MIT
- ubuntu noble: libtickit-dev 0.4.3-1.1build1 Β· MIT
- ubuntu questing: libtickit-dev 0.4.3-2
- ubuntu resolute: libtickit-dev 0.4.3-2build1 Β· MIT
- ubuntu stonking: libtickit-dev 0.4.3-2build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms