OpenGL-2.2.3.1: A binding for the OpenGL graphics system

Portability | portable
Stability | stable
Maintainer | sven.panne@aedion.de
Safe Haskell | Safe-Infered

Graphics.Rendering.OpenGL.GL.StateVar

Description

Synopsis

- class HasGetter g where
  - get :: g a -> IO a
- data GettableStateVar a
- makeGettableStateVar :: IO a -> GettableStateVar a
- class HasSetter s where
  - ($=) :: s a -> a -> IO ()
- set :: [IO ()] -> IO ()
- data SettableStateVar a
- makeSettableStateVar :: (a -> IO ()) -> SettableStateVar a
- data StateVar a
- makeStateVar :: IO a -> (a -> IO ()) -> StateVar a
- ($~) :: (HasGetter v, HasSetter v) => v a -> (a -> a) -> IO ()
- ($=!) :: HasSetter s => s a -> a -> IO ()
- ($~!) :: (HasGetter v, HasSetter v) => v a -> (a -> a) -> IO ()

# Documentation

class HasGetter g where

Methods

get :: g a -> IO a

Instances

HasGetter IORef |
HasGetter StateVar |
HasGetter GettableStateVar |

data GettableStateVar a

Instances

HasGetter GettableStateVar |

makeGettableStateVar :: IO a -> GettableStateVar a

class HasSetter s where

Methods

($=) :: s a -> a -> IO ()

Instances

HasSetter IORef |
HasSetter StateVar |
HasSetter SettableStateVar |

set :: [IO ()] -> IO ()

Deprecated: use `sequence_' instead

data SettableStateVar a

Instances

HasSetter SettableStateVar |

makeSettableStateVar :: (a -> IO ()) -> SettableStateVar a

data StateVar a

Instances

HasSetter StateVar |
HasGetter StateVar |

makeStateVar :: IO a -> (a -> IO ()) -> StateVar a

($~) :: (HasGetter v, HasSetter v) => v a -> (a -> a) -> IO ()

A modificator convenience function.

($=!) :: HasSetter s => s a -> a -> IO ()

A strict variant of `$=`.

($~!) :: (HasGetter v, HasSetter v) => v a -> (a -> a) -> IO ()

A strict variant of `$~`.