S3DW_ANI_MATE(3)
π S3DW_ANI_MATE π
okay bestie, so this is a page from the s3d Manual, section 3 β and it's about s3dw_ani_mate, the lil function that does the whole animation thing. yes, that's literally what the NAME says. we love a self-aware icon.
β¨ NAME β¨
s3dw_ani_mate β doing the whole animation thing π¦
πΈ SYNOPSIS πΈ
#include <s3dw.h>
void s3dw_ani_mate(void);
π DESCRIPTION π
okay so here's the tea: just call this bad boy in your mainloop if you want some nice window sliding animations. that's it. that's the whole job. π
it's somewhat bloating, ngl β but you don't want to miss it ;) fr fr, it's giving "worth it".
here's how it looks in the wild:
#include <time.h> // nanosleep()
static struct timespec t={0.33*1000*1000}; // 33 mili seconds
void mainloop()
{
// keep this in your mainloop. this will do smooth animations for you ...
s3dw_ani_mate();
nanosleep(&t,NULL);
}
....
s3d_mainloop(mainloop);
so yeah β you keep s3dw_ani_mate(); sitting right there in your mainloop, and it will do smooth animations for you. no cap. β¨ the nanosleep with that t is your lil 33 mili seconds breather so everything stays buttery instead of absolutely unhinged. π§
lowkey important: thatstatic struct timespec t={0.33*1000*1000};is the 33 mili seconds, and thenanosleep(&t,NULL);goes inside the mainloop. keep the whole vibe together or the smoothness simply does not happen. π
and then you hand it off to s3d_mainloop(mainloop); and let it cook. π₯
π AUTHOR π
Simon Wunderlich Author of s3d
mwah π that's the whole page, bestie β straight outta the s3d manual, section 3, S3DW_ANI_MATE(3). go make those windows slide. periodt. πβ¨
π¦ where this page comes from
- debian bookworm: s3d-doc 0.2.2.1-5 Β· GPL-2.0-or-later
- debian trixie: s3d-doc 0.2.2.1-7 Β· GPL-2.0-or-later
- ubuntu jammy: s3d-doc 0.2.2.1-3build1 Β· GPL-2.0-or-later
- ubuntu noble: s3d-doc 0.2.2.1-6build3 Β· GPL-2.0-or-later
- ubuntu questing: s3d-doc 0.2.2.1-7build1
- ubuntu resolute: s3d-doc 0.2.2.1-7build3 Β· GPL-2.0-or-later
- ubuntu stonking: s3d-doc 0.2.3-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms