|
Graphics.UI.GLUT.State | Portability | portable | Stability | experimental | Maintainer | sven_panne@yahoo.com |
|
|
|
|
|
Description |
GLUT maintains a considerable amount of programmer visible state. Some (but
not all) of this state may be directly retrieved.
|
|
Synopsis |
|
|
|
|
Type synonyms |
|
type NumChildren = CInt |
Number of children of a window |
|
type NumSamples = CInt |
Number of samples for multisampling |
|
type NumBits = CInt |
Bit depth of a buffer |
|
type NumButtons = CInt |
Number of buttons of an input device |
|
type NumDials = CInt |
Number of dials of a dial and button box |
|
type NumAxes = CInt |
Number of axes of a joystick |
|
type PollRate = CInt |
The a rate at which a joystick is polled (in milliseconds) |
|
Initial window parameters |
|
getInitWindowPosition :: IO WindowPosition |
Return the initial window position. |
|
getInitWindowSize :: IO WindowSize |
Return the initial window size. |
|
getInitDisplayMode :: IO [DisplayMode] |
Return the initial display mode. |
|
isDisplayModePossible :: IO Bool |
Test whether the current display mode is supported or not. |
|
State of the current window |
|
getWindowPosition :: IO WindowPosition |
Return the location of the current window, measured in pixels relative to
the screen origin. |
|
getWindowSize :: IO WindowSize |
Return the size of the current window, measured in pixels. |
|
getParent :: IO (Maybe Window) |
Return Just the current window's parent or Nothing if the current
window is a top-level window. |
|
getNumChildren :: IO NumChildren |
Return the number of subwindows the current window has, not counting
children of children. |
|
getCursor :: IO Cursor |
Return the current cursor for the current window. |
|
isRGBA :: IO Bool |
Test whether the current layer of the current window is in RGBA mode.
False means color index mode. |
|
getNumColorBits :: IO (NumBits, NumBits, NumBits, NumBits) |
Return the number of red, green, blue, and alpha bits in the color buffer
of the current window's current layer (0 in color index mode). |
|
getNumBufferBits :: IO NumBits |
Return the total number of bits in the color buffer of the current
window's current layer. For an RGBA layer, this is the sum of the red,
green, blue, and alpha bits. For an color index layer, this is the number
of bits of the color indexes. |
|
getNumColormapEntries :: IO (ColorIndex CInt) |
Return the number of entries in the colormap of the current window's
current layer (0 in RGBA mode). |
|
isDoubleBuffered :: IO Bool |
Test whether the current layer of the current window is double buffered. |
|
isStereo :: IO Bool |
Test whether the current layer of the current window is stereo. |
|
getNumAccumBits :: IO (NumBits, NumBits, NumBits, NumBits) |
Return the number of red, green, blue, and alpha bits in the accumulation
buffer of the current window's current layer (0 in color index mode). |
|
getNumDepthBits :: IO NumBits |
Return the number of bits in the depth buffer of the current window's
current layer. |
|
getNumStencilBits :: IO NumBits |
Return the number of bits in the stencil buffer of the current window's
current layer. |
|
getNumSamples :: IO NumSamples |
Return the number of samples for multisampling for the current window. |
|
getFormatID :: IO CInt |
Return the window system dependent format ID for the current layer of the
current window. On X11 GLUT implementations, this is the X visual ID. On
Win32 GLUT implementations, this is the Win32 Pixel Format Descriptor number.
This value is returned for debugging, benchmarking, and testing ease. |
|
Miscellaneous |
|
getElapsedTime :: IO CInt |
Return the number of milliseconds since
init was called (or first call to
getElapsedTime). |
|
getNumMenuItems :: IO CInt |
Return the number of menu items in the current menu. |
|
GLUT state pertaining to the layers of the current window |
|
isOverlayPossible :: IO Bool |
Test whether an overlay could be established for the current window given
the current initial display mode. If False,
establishOverlay will fail with a fatal error if
called. |
|
getLayerInUse :: IO Layer |
Return the layer in use of the current window (normal plane or
overlay). |
|
isOverlayEstablished :: IO Bool |
Test if the current window has an overlay established. |
|
getTransparentIndex :: IO (Maybe (ColorIndex CInt)) |
Return Just the transparent color index of the overlay of the current
window; Nothing is returned if no overlay is in use. |
|
isNormalDamaged :: IO Bool |
Test if the normal plane of the current window has been damaged (by
window system activity) since the last display callback was triggered.
Calling postRedisplay will not set this True. |
|
isOverlayDamaged :: IO (Maybe Bool) |
Test if the overlay plane of the current window has been damaged (by
window system activity) since the last display callback was triggered.
Calling postRedisplay or
postOverlayRedisplay will not set this True.
Return Nothing if no overlay is in use. |
|
Device information |
|
If a device is not available, the following routines return Nothing,
otherwise they return Just the specific device information. |
|
Screen information |
|
data ScreenInfo |
The size of the screen in pixels and millimeters | Constructors | |
|
|
getScreenInfo :: IO ScreenInfo |
Note: A screen is always assumed, so there is no Maybe here. |
|
Keyboard information |
|
data GlobalKeyRepeat |
Constructors | GlobalKeyRepeatOff | | GlobalKeyRepeatOn | | GlobalKeyRepeatDefault | |
| Instances | |
|
|
marshalGlobalKeyRepeat :: GlobalKeyRepeat -> CInt |
|
data PerWindowKeyRepeat |
Constructors | PerWindowKeyRepeatOff | | PerWindowKeyRepeatOn | |
| Instances | |
|
|
marshalPerWindowKeyRepeat :: PerWindowKeyRepeat -> CInt |
|
data KeyboardInfo |
|
|
getKeyboardInfo :: IO (Maybe KeyboardInfo) |
|
Mouse information |
|
newtype MouseInfo |
|
|
getMouseInfo :: IO (Maybe MouseInfo) |
|
Spaceball information |
|
newtype SpaceballInfo |
|
|
getSpaceballInfo :: IO (Maybe SpaceballInfo) |
|
Dial and button box information |
|
data DialAndButtonBoxInfo |
|
|
getDialAndButtonBoxInfo :: IO (Maybe DialAndButtonBoxInfo) |
|
Tablet information |
|
newtype TabletInfo |
|
|
getTabletInfo :: IO (Maybe TabletInfo) |
|
Joystick information |
|
data JoystickInfo |
|
|
getJoystickInfo :: IO (Maybe JoystickInfo) |
|
Produced by Haddock version 0.5 |