| Line | |
|---|
| 1 | /* $Id: glut_modifier.c,v 1.2 2000-02-09 08:46:14 jeroen Exp $ */
|
|---|
| 2 | /* Copyright (c) Mark J. Kilgard, 1994. */
|
|---|
| 3 |
|
|---|
| 4 | /* This program is freely distributable without licensing fees
|
|---|
| 5 | and is provided without guarantee or warrantee expressed or
|
|---|
| 6 | implied. This program is -not- in the public domain. */
|
|---|
| 7 |
|
|---|
| 8 | #include "glutint.h"
|
|---|
| 9 |
|
|---|
| 10 | /* CENTRY */
|
|---|
| 11 | int APIENTRY
|
|---|
| 12 | glutGetModifiers(void)
|
|---|
| 13 | {
|
|---|
| 14 | int modifiers;
|
|---|
| 15 |
|
|---|
| 16 | if(__glutModifierMask == (unsigned int) ~0) {
|
|---|
| 17 | __glutWarning(
|
|---|
| 18 | "glutCurrentModifiers: do not call outside core input callback.");
|
|---|
| 19 | return 0;
|
|---|
| 20 | }
|
|---|
| 21 | modifiers = 0;
|
|---|
| 22 | if(__glutModifierMask & (ShiftMask|LockMask))
|
|---|
| 23 | modifiers |= GLUT_ACTIVE_SHIFT;
|
|---|
| 24 | if(__glutModifierMask & ControlMask)
|
|---|
| 25 | modifiers |= GLUT_ACTIVE_CTRL;
|
|---|
| 26 | if(__glutModifierMask & Mod1Mask)
|
|---|
| 27 | modifiers |= GLUT_ACTIVE_ALT;
|
|---|
| 28 | return modifiers;
|
|---|
| 29 | }
|
|---|
| 30 |
|
|---|
| 31 | /* ENDCENTRY */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.