GLUTDEVICEGET

Section: C Library Functions (3)
Updated: LOCAL
Page Index

BSD mandoc
 

NAME

glutDeviceGet - Allows you to get some device state/option variables.  

LIBRARY

OpenGLUT - inputstate  

SYNOPSIS

In openglut.h Ft int Fn glutDeviceGet GLenum eWhat  

PARAMETERS

Bf Em
 eWhat Ef
    Enumerated parameter ID.  

DESCRIPTION

Retrieves some system-specific information about attached devices. Supported device queries are:


 -  Bf Sy
 GLUT_HAS_JOYSTICK Ef
 
Return non-zero if there is a joystick.


 -  Bf Sy
 GLUT_HAS_KEYBOARD Ef
 
Return non-zero if there is a keyboard.


 -  Bf Sy
 GLUT_HAS_MOUSE Ef
 
Return non-zero if there is a mouse.


 -  Bf Sy
 GLUT_HAS_SPACEBALL Ef
 
Return non-zero if there is a spaceball.


 -  Bf Sy
 GLUT_JOYSTICK_AXES Ef
 
Return the number of axes for the joystick.


 -  Bf Sy
 GLUT_JOYSTICK_POLL_RATE Ef
 
Return the rate (in GLUT timer ticks?) at which the joystick is polled.


 -  Bf Sy
 GLUT_NUM_MOUSE_BUTTONS Ef
 
Return the number of buttons that the user's mouse has.


 -  Bf Sy
 GLUT_OWNS_JOYSTICK Ef
 
Return non-zero if OpenGLUT believes that it has successfully acquired access to the joystick.


 -  Bf Sy
 GLUT_DEVICE_IGNORE_KEY_REPEAT Ef
 
Return non-zero if the Bf Li
 current window Ef
  is set to disable key repeating.


 -  Bf Sy
 GLUT_DEVICE_KEY_REPEAT Ef
 
Described as returning the key repeat rate in one place, but actually returns a key repeat mode.


 -  Bf Sy
 GLUT_HAS_DIAL_AND_BUTTON_BOX Ef
 
Return non-zero if a dials-and-buttons box is present.


 -  Bf Sy
 GLUT_HAS_TABLET Ef
 
Return non-zero if a tablet is present.


 -  Bf Sy
 GLUT_NUM_BUTTON_BOX_BUTTONS Ef
 
Return the number of buttons on a dials-and-buttons box, if any.


 -  Bf Sy
 GLUT_NUM_DIALS Ef
 
Return the number of dials on a dials-and-buttons box, if any.


 -  Bf Sy
 GLUT_NUM_SPACEBALL_BUTTONS Ef
 
Return the number of buttons on a spaceball, if any.


 -  Bf Sy
 GLUT_NUM_TABLET_BUTTONS Ef
 
Return the number of buttons on a tablet, if any.

 

TODO

Only supports querying for one joystick.

Consider moving to a table-based approach rather than a switch(), letting us move to modular functions.

 

BUGS

Keyboards are optional, but OpenGLUT doesn't detect their absence.

Mice are optional, but OpenGLUT is only able to check for them under WIN32.

Mice can have a varying number of buttons, but OpenGLUT assumes exactly 3 on UNIX_X11.

Not all joystick queries are implemented yet.

Bf Sy
 GLUT_DEVICE_KEY_REPEAT Ef
 returns the key repeat mode, but the comment says it returns the  Bf Li
 rate Ef
 .

Some things, like joystick poll rates, seem to have insufficient context. Which joystick? Which window? Maybe we assume the Bf Li
 current window Ef
  and the current joystick (or the first one)?

Bf Sy
 GLUT_DEVICE_KEY_REPEAT Ef
 should probably return  Bf Sy
 ogState.KeyRepeat. Ef
 

 

SEE ALSO

glutSetOption(3) glutGet(3) glutGetModifiers(3) glutLayerGet(3)


 

Index

NAME
LIBRARY
SYNOPSIS
PARAMETERS
DESCRIPTION
TODO
BUGS
SEE ALSO