source: trunk/src/opengl/glut/glut_modifier.c

Last change on this file was 2689, checked in by jeroen, 26 years ago

* empty log message *

File size: 829 bytes
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 */
11int APIENTRY
12glutGetModifiers(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.