Doxygen Source Code Documentation
        
Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search   
glut_modifier.c
Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 #include <X11/Xlib.h>
00009 
00010 #include "glutint.h"
00011 
00012 int
00013 glutGetModifiers(void)
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 }
00031