GLUTENTRYFUNC(3)

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

πŸ’– GLUTENTRYFUNC(3) πŸ’–

okay bestie, we're doing glutEntryFunc today β€” it's the Window mouse entry/leave callback situation, and honestly? it's giving "the mouse walked in and everyone noticed." 🐭✨

Library: OpenGLUT - input πŸŽ€


✨ SYNOPSIS ✨

#include <openglut.h>

void
glutEntryFunc(void( *callback )( int state ));

🌸 PARAMETERS 🌸

  • callback β€” your client window-entry hook. yes, that's the whole vibe. that's the function that gets pinged when the mouse does its little entrance or exit. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜•: when the mouse enters or exits a window (or a sub-window, because apparently windows can have windows, very main character of them), OpenGLUT can report that transition through the Entry callback. 🫢

and state is one of two things:

  • GLUT_LEFT β€” the mouse dipped out, it left the window 😭
  • GLUT_ENTERED β€” the mouse pulled up, it entered the window ✨

respectively, obviously. one for leaving, one for arriving. the duality of mouse. 🌈

lowkey important: this callback is bound to the current window. not some other window. the current one. iykyk. πŸ‘‘

πŸ’œ SEE ALSO πŸ’œ

  • glutPassiveMotionFunc(3) β€” for when you want the mouse's motion but make it passive, no buttons required πŸŽ€

that's the whole page, bestie, you ate that πŸ”₯ β€” this was GLUTENTRYFUNC from the OpenGLUT era, and the official page footer was serving UNDATED and UNTITLED(), which is honestly the most mysterious, no-context, gatekeep-the-date energy imaginable. slay, mysterious undated legend. πŸ’€πŸŒΈ no cap.