Doxygen Source Code Documentation
glut_modifier.c File Reference
#include <X11/Xlib.h>#include "glutint.h"Go to the source code of this file.
Functions | |
| int | glutGetModifiers (void) |
Function Documentation
|
|
Definition at line 13 of file glut_modifier.c. References __glutWarning(), GLUT_ACTIVE_ALT, GLUT_ACTIVE_CTRL, and GLUT_ACTIVE_SHIFT.
00014 {
00015 int modifiers;
00016
00017 if(__glutModifierMask == (unsigned int) ~0) {
00018 __glutWarning(
00019 "glutCurrentModifiers: do not call outside core input callback.");
00020 return 0;
00021 }
00022 modifiers = 0;
00023 if(__glutModifierMask & (ShiftMask|LockMask))
00024 modifiers |= GLUT_ACTIVE_SHIFT;
00025 if(__glutModifierMask & ControlMask)
00026 modifiers |= GLUT_ACTIVE_CTRL;
00027 if(__glutModifierMask & Mod1Mask)
00028 modifiers |= GLUT_ACTIVE_ALT;
00029 return modifiers;
00030 }
|