Cross Reference: glut_tablet.c
xref: /xsrc/external/mit/MesaGLUT/dist/src/glut/glx/glut_tablet.c
  • Home
  • History
  • AnnotateAnnotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /xsrc/external/mit/MesaGLUT/dist/src/glut/glx/
1c041511dScube
2c041511dScube/* Copyright (c) Mark J. Kilgard, 1994. */
3c041511dScube
4c041511dScube/* This program is freely distributable without licensing fees
5c041511dScube   and is provided without guarantee or warrantee expressed or
6c041511dScube   implied. This program is -not- in the public domain. */
7c041511dScube
8c041511dScube#include <stdlib.h>
9c041511dScube
10c041511dScube#include "glutint.h"
11c041511dScube
12c041511dScubevoid GLUTAPIENTRY
13c041511dScubeglutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc)
14c041511dScube{
15c041511dScube  __glutCurrentWindow->tabletMotion = tabletMotionFunc;
16c041511dScube  __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask;
17c041511dScube  __glutPutOnWorkList(__glutCurrentWindow,
18c041511dScube    GLUT_DEVICE_MASK_WORK);
19c041511dScube  /* If deinstalling callback, invalidate tablet position. */
20c041511dScube  if (tabletMotionFunc == NULL) {
21c041511dScube    __glutCurrentWindow->tabletPos[0] = -1;
22c041511dScube    __glutCurrentWindow->tabletPos[1] = -1;
23c041511dScube  }
24c041511dScube}
25c041511dScube
26c041511dScubevoid GLUTAPIENTRY
27c041511dScubeglutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc)
28c041511dScube{
29c041511dScube  __glutCurrentWindow->tabletButton = tabletButtonFunc;
30c041511dScube  __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask;
31c041511dScube  __glutPutOnWorkList(__glutCurrentWindow,
32c041511dScube    GLUT_DEVICE_MASK_WORK);
33c041511dScube}
34

Indexes created Sun Nov 30 02:09:33 GMT 2025