TICKIT_WINDOW_NEW(3)
π TICKIT_WINDOW_NEW(3) π
okay bestie, so this is a page from the Library Functions Manual β it's all about tickit_window_new, and honestly? it's giving window-factory energy. let's get into it π«Ά
β¨ NAME β¨
tickit_window_new β create a new sub-window πͺπΈ
β¨ SYNOPSIS β¨
#include <tickit.h>
TickitWindow *tickit_window_new(TickitWindow *parent, TickitRect rect,
TickitWindowFlags flags);
Link with -ltickit.
β¨ DESCRIPTION β¨
so tickit_window_new() literally makes you a brand new sub-window, and it becomes a child of the parent you hand it. the rect you pass in is its initial geometry, measured relative to its parent. and then flags? that's a bitmask of flags that vibe-check how the child window behaves at the start. no cap π
here's the flag lore, one by one:
TICKIT_WINDOW_HIDDENβ the new child gets created in the hidden state from the jump. no pending expose event happens because of it. whenever you're ready to show it off, calltickit_window_show(3). it's giving mysterious main character who hasn't entered the room yet πTICKIT_WINDOW_LOWESTβ normally the most recently-added child window gets ordered at the top of the list in its parent, which makes it appear front-most on screen. this flag says nope, add it at the bottom of the list instead, so it appears lowest-most. humble. understated. iconic in its own way.TICKIT_WINDOW_ROOT_PARENTβ the new child window's parent will be the root window of the window tree instead of the window you gave it. and the position gets automatically adjusted so the new window still shows up at the geometry position you gave, relative to the window passed as theparentargument. so it looks like it's where you asked, but the family tree said sike πTICKIT_WINDOW_STEAL_INPUTβ the new child gets initially set to steal input events; peeptickit_window_set_steal_input(3)for the deets. π
heads up bestie: this flag is not useful when you combine it with TICKIT_WINDOW_LOWEST, because the input-stealing behaviour only applies while the window is front-most within its parent. so that combo? yeah, it just doesn't hit the same π
TICKIT_WINDOW_POPUPβ a convenient shortcut that specifies bothTICKIT_WINDOW_ROOT_PARENTandTICKIT_WINDOW_STEAL_INPUTat once. super useful for implementing popup dialog windows, menus, and other such UI behaviours. the popup serve, fr fr π₯
also, important: the reference count of a newly-constructed window instance will be one. you can bump it up or down with tickit_window_ref(3) and tickit_window_unref(3). the moment its reference count hits zero, it's destroyed. gone. periodt πβ¨
β¨ RETURN VALUE β¨
if everything goes well, tickit_window_new() returns a pointer to the new instance. slay π
β¨ SEE ALSO β¨
tickit_window_new_root(3)tickit_window_bind_event(3)tickit_window_expose(3)tickit_window_close(3)tickit_window(7)tickit(7)
and that's the whole page, bestie!! this came from the Library Functions Manual and the page itself is TICKIT_WINDOW_NEW(3) β go build something gorgeous with it ππ¦β¨
π¦ 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