TICKIT_WINDOW_GET_PEN(3)

πŸ“¦
version 0.4.3 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… TICKIT_WINDOW_GET_PEN(3) πŸ’…

okay bestie, so this is a page from the Library Functions Manual and it's all about pens β€” specifically the pen your window uses to render stuff. yes, pens. no cap, it's a whole thing. let's get into it πŸ–ŠοΈβœ¨


🌸 NAME 🌸

tickit_window_get_pen, tickit_window_set_pen β€” the two functions that let you manipulate the window's rendering pen. that's literally the whole job. get it, set it, slay πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <tickit.h>

TickitPen *tickit_window_get_pen(const TickitWindow *win);
void tickit_window_set_pen(TickitWindow *win, TickitPen pen);

and don't forget the link step, bestie β€” link with -ltickit or nothing works. periodt. πŸ”—


πŸŽ€ DESCRIPTION πŸŽ€

πŸ’– tickit_window_get_pen() β€” the getter

tickit_window_get_pen() returns a pointer to the given window's pen instance. and here's the tea: this pen instance is directly stored by the window itself, like it lives there. 🏠

you, the application, are permitted to modify this pen instance. iconic. but β€” and this is the important part β€” any modifications will not be observed until the window is next exposed for rendering. so don't be out here editing the pen and expecting the screen to update instantly. it's giving "changes pending", not "changes live". 😭

πŸ’œ tickit_window_set_pen() β€” the setter

tickit_window_set_pen() stores a new pointer for a pen instance into the given window. the window retains a reference to that pen and increments the reference count on it. responsible queen behavior, honestly. πŸ‘‘

any previous pen is unreferenced first β€” out with the old, in with the new, no leaks left behind. 🧚

⚠️ okay so this is the caveat that matters: because the window stores what may be one of many references to the pen instance, if you're an application that does modify the pen, be careful. your modifications must not adversely affect other users of that same pen. shared pen = shared consequences, bestie. don't be the roommate who finishes the milk. πŸ₯›πŸ’€

⭐ RETURN VALUE ⭐

  • tickit_window_get_pen() returns a pointer to a pen instance. πŸ–ŠοΈ
  • tickit_window_set_pen() returns no value. it just does the thing and dips. πŸ’¨

🌈 SEE ALSO 🌈

go read those if you want the full lore, iykyk πŸ“šβœ¨


and that's the page, bestie! 🫢 this lil' beauty signs off as TICKIT_WINDOW_GET_PEN(3), from the Library Functions Manual β€” the source/version and date live down there in the footer of the original, so consider this your cute lil' curtain call. mwah πŸ’‹πŸŽ€πŸŒΈ