GLUTVISIBILITYFUNC(3)

πŸ“¦
version 3.8.0 Β· 2 versions
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0

πŸ’– GLUTVISIBILITYFUNC(3) πŸ’–

okay bestie, so this one lives in OpenGLUT, and heads up β€” it's deprecated 🫠. It's the manual page for glutVisibilityFunc, and it does exactly one job: it sets the Visibility callback for whatever window is current right now. No cap.


✨ SYNOPSIS ✨

#include <openglut.h>

void
glutVisibilityFunc(void( *callback )( int status ));

🌸 PARAMETERS 🌸

  • callback β€” your lil client hook πŸͺ that gets pinged whenever the visibility status changes. That's the whole vibe.

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: OpenGLUT may call this function when your window's visibility status has changed. Not will, may β€” read the caveats, bestie, they matter 😭

That status thing? It can take on exactly two values, no more, no less:

  • GLUT_NOT_VISIBLE
  • GLUT_VISIBLE

And here's the rule: if any pixel of your window β€” including all its descendants πŸ‘‘ β€” is visible, then your window is GLUT_VISIBLE. Even one lil pixel. That's it, that's the bar.

The callback gets bound to the current window. So whichever window is current when you call this, that's the one it's riding for. πŸ’…


πŸ™ˆ CAVEATS πŸ™ˆ (read these fr fr)

This is not a polling mechanism. You do not get to ask "hey is it visible?" on demand. You only get told about the transitions that OpenGLUT actually observes while your callback is in place. If your callback wasn't set up yet, you simply weren't there for it. Missed the group chat, missed the message πŸ“΅
This function appears to be superceded by glutWindowStatusFunc(). So like... it's giving legacy energy.
This callback is mutually exclusive of glutWindowStatusFunc(). Pick one. You cannot have both. It's not a both-can-win situation, it's a situationship with rules πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


stay slay, stay visible (in the GLUT_VISIBLE sense, obviously) ✨ β€” this page is UNDATED and honestly came from UNTITLED() energy, like the source didn't even give itself a name, iconic behavior πŸŽ€πŸ’œ