Cross Reference: glut_modifier.c
xref: /xsrc/external/mit/MesaGLUT/dist/src/glut/glx/glut_modifier.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 "glutint.h"
9c041511dScube
10c041511dScube/* CENTRY */
11c041511dScubeint GLUTAPIENTRY
12c041511dScubeglutGetModifiers(void)
13c041511dScube{
14c041511dScube  int modifiers;
15c041511dScube
16c041511dScube  if(__glutModifierMask == (unsigned int) ~0) {
17c041511dScube    __glutWarning(
18c041511dScube      "glutCurrentModifiers: do not call outside core input callback.");
19c041511dScube    return 0;
20c041511dScube  }
21c041511dScube  modifiers = 0;
22c041511dScube  if(__glutModifierMask & (ShiftMask|LockMask))
23c041511dScube    modifiers |= GLUT_ACTIVE_SHIFT;
24c041511dScube  if(__glutModifierMask & ControlMask)
25c041511dScube    modifiers |= GLUT_ACTIVE_CTRL;
26c041511dScube  if(__glutModifierMask & Mod1Mask)
27c041511dScube    modifiers |= GLUT_ACTIVE_ALT;
28c041511dScube  return modifiers;
29c041511dScube}
30c041511dScube
31c041511dScube/* ENDCENTRY */
32

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