GLUTBUTTONBOXFUNC(3)

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

πŸ’– NAME πŸ’–

okay so this page is all about glutButtonBoxFunc β€” it sets a button-box button callback. And the manual name is GLUTBUTTONBOXFUNC(3), so you know exactly what you opened, bestie. πŸ’…


πŸ“š LIBRARY πŸ“š

OpenGLUT - input. That's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

Here's the exact spell, no cap:

#include <openglut.h>

void
glutButtonBoxFunc(void( *callback )( int button, int state ));

🫢 PARAMETERS 🫢

  • callback β€” Client buttonbox button hook. 🫢

✨ DESCRIPTION ✨

A dials-and-buttons box has buttons numbered from 1 to this value, inclusive:

glutDeviceGet(
       GLUT_NUM_BUTTON_BOX_BUTTONS)

The callback parameters are the button and its state, and that state is either GLUT_UP or GLUT_DOWN. πŸŽ€

The callback is bound to the current window. πŸ‘‘


⚠️ CAVEATS ⚠️

OpenGLUT does not implement button-box support. periodt.

Also, in contrast, mouse buttons are numbered from 0 in the GLUT API. This is a wrinkle. 😭


πŸ‘€ SEE ALSO πŸ‘€


xoxo, your Unix bestie πŸ’– β€” this page is from OpenGLUT, dated UNDATED, and the footer title is UNTITLED(). mwah πŸ’‹