TICKIT_RENDERBUFFER_HAS_CURSORPOS(3)

✨ TICKIT_REN...T_CURSORPOS(3) ✨

okay so bestie, welcome to the Library Functions Manual πŸ’– this is page 3, it's giving tickit, and it's literally just two little functions that ask your render buffer where its pretend cursor is. no cap. let's get into it 🫢


πŸŽ€ NAME πŸŽ€

tickit_renderbuffer_has_cursorpos, tickit_renderbuffer_get_cursorpos β€” query the virtual cursor position πŸ‘€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <tickit.h>

bool tickit_renderbuffer_has_cursorpos(const TickitRenderBuffer *rb);
void tickit_renderbuffer_get_cursorpos(const TickitRenderBuffer *rb, int lines, int cols);

Link with -ltickit. πŸ”—


🌸 DESCRIPTION 🌸

so. tickit_renderbuffer_has_cursorpos() is the vibe check πŸ‘‘ it returns a true value if the buffer's virtual cursor position has actually been set, by tickit_renderbuffer_goto(3). and it returns false if that position has never been set, or if it got cleared by tickit_renderbuffer_ungoto(3) or by tickit_renderbuffer_reset(3). that's it, that's the whole function, she's simple and I love her πŸ’…

then there's tickit_renderbuffer_get_cursorpos(), which is the one that actually hands you the tea β˜• she retrieves the current position of the virtual cursor by setting the integers pointed to by line and col, as long as they're not NULL. lowkey important: if the virtual cursor position is not set, then this function does nothing. like, absolutely nothing. no error, no drama, no note. she just sits there 🧚


πŸ’œ RETURN VALUE πŸ’œ

  • tickit_renderbuffer_has_cursorpos() returns a boolean ✨ (true or false, bestie, that's the whole spectrum)
  • tickit_renderbuffer_get_cursorpos() returns no value. it's giving void. it's giving "I do my work in silence" πŸŽ€

🌈 SEE ALSO 🌈

go read those, iykyk πŸ“š


ok and for the record: tickit_renderbuffer_get_cursorpos() writing through pointers it was handed is exactly the kind of thing where you gotta make sure those ints are real, bestie. that's not a warning from the page, that's just me looking out for you 🫢

and that's the whole page, periodt πŸ’… this lil writeup came straight outta the tickit Library Functions Manual, section 3, and it signs off exactly the way the original footer does: TICKIT_REN...T_CURSORPOS(3) πŸ’– stay slay, keep your cursors virtual, mwah πŸŽ€βœ¨