GLUTTABLETBUTTONFUNC(3)

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

πŸ’– glutTabletButtonFunc(3) πŸ’–

okay bestie, welcome to the glutTabletButtonFunc page β€” it lives in the OpenGLUT manual, section 3, and it's filed under input. sit down, hydrate, let's go ✨


πŸ“š LIBRARY

OpenGLUT β€” the input corner of it 🫢


✨ SYNOPSIS ✨

#include <openglut.h>

void
glutTabletButtonFunc(void( *callback )( int button, int state, int x,
    int y ));

like, that's the whole vibe. one function, four ints, zero drama (well, mostly) πŸ’…


πŸŽ€ PARAMETERS πŸŽ€

  • callback β€” your client tablet button hook. this is the lil function you hand over so it can yell at you when a tablet button does a thing πŸ¦‹

🌸 DESCRIPTION 🌸

okay so here's the tea: this function registers a callback β€” and through that callback you get reports about a tablet button status feature. it's giving "tell me when buttons happen" energy πŸ’–

so when the reports come in:

  • button comes through in the range 1 to glutDeviceGet( GLUT_NUM_TABLET_BUTTONS ). yes, that's a real call, go look it up, iykyk πŸ”₯
  • state is either GLUT_UP or GLUT_DOWN β€” it's binary bestie, no in-between πŸ’€
  • x and y are the tablet coordinate. and if you wanna know the bounds of x and y, that's a whole other page β€” go read glutTabletMotionFunc(), it's got you 🫢

and the plot twist: the callback is bound to the current window. periodt. πŸ’…


πŸ’€ CAVEATS πŸ’€

bestie. sit down. i need you to hear this.

OpenGLUT does not implement tablet support. at all. zero. none. this is a whole lot of function for a whole lot of nothing 😭

also, and this one's important: buttons are not pressure-sensitive. if you were hoping for "how hard did they press" data, nope, not happening πŸ™ˆ


🧚 TODO 🧚

ngl the maintainers were like "we might want to add support for this sooner or later" 🌈

and then they got philosophical: a tablet could also be generalized as a mouse. lowkey true.

they also mentioned there are relatively cheap AipTek HyperPen tablets out there, plus slightly less cheap Wacom tablets sitting on many store shelves. so like, the hardware exists, it's just... vibes only, no implementation πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, they're iconic in their own right πŸŽ€


and that's the page!! πŸ¦‹ sign-off time: this one's stamped UNDATED and the footer's just sitting there saying UNTITLED() like the mysterious main character it is πŸ˜­πŸ’– slay, bye!! ✨🌸