SDL-0.6.7.0: Binding to libSDL

Copyright | (c) David Himmelstrup 2005
License | BSD-like
Maintainer | lemmih@gmail.com
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Graphics.UI.SDL.Utilities

Description

Various small functions which makes the binding process easier.

# Documentation

class Enum a b | a -> b where Source #

Methods

succ :: a -> a Source #

pred :: a -> a Source #

toEnum :: b -> a Source #

fromEnum :: a -> b Source #

enumFromTo :: a -> a -> [a] Source #

#### Instances

Instances details

Enum SurfaceFlag Word32 Source # |
Instance details Defined in Graphics.UI.SDL.Types Methods succ :: SurfaceFlag -> SurfaceFlag Source # pred :: SurfaceFlag -> SurfaceFlag Source # toEnum :: Word32 -> SurfaceFlag Source # fromEnum :: SurfaceFlag -> Word32 Source # enumFromTo :: SurfaceFlag -> SurfaceFlag -> [SurfaceFlag] Source #
Enum Hat Word8 Source # |
Instance details Defined in Graphics.UI.SDL.Types Methods succ :: Hat -> Hat Source # pred :: Hat -> Hat Source # toEnum :: Word8 -> Hat Source # fromEnum :: Hat -> Word8 Source # enumFromTo :: Hat -> Hat -> [Hat] Source #
Enum SDLKey Word32 Source # |
Instance details Defined in Graphics.UI.SDL.Keysym Methods succ :: SDLKey -> SDLKey Source # pred :: SDLKey -> SDLKey Source # toEnum :: Word32 -> SDLKey Source # fromEnum :: SDLKey -> Word32 Source # enumFromTo :: SDLKey -> SDLKey -> [SDLKey] Source #
Enum Modifier Word32 Source # |
Instance details Defined in Graphics.UI.SDL.Keysym Methods succ :: Modifier -> Modifier Source # pred :: Modifier -> Modifier Source # toEnum :: Word32 -> Modifier Source # fromEnum :: Modifier -> Word32 Source # enumFromTo :: Modifier -> Modifier -> [Modifier] Source #
Enum InitFlag Word32 Source # |
Instance details Defined in Graphics.UI.SDL.General Methods succ :: InitFlag -> InitFlag Source # pred :: InitFlag -> InitFlag Source # toEnum :: Word32 -> InitFlag Source # fromEnum :: InitFlag -> Word32 Source # enumFromTo :: InitFlag -> InitFlag -> [InitFlag] Source #
Enum Palette Int Source # |
Instance details Defined in Graphics.UI.SDL.Video Methods succ :: Palette -> Palette Source # pred :: Palette -> Palette Source # toEnum :: Int -> Palette Source # fromEnum :: Palette -> Int Source # enumFromTo :: Palette -> Palette -> [Palette] Source #
Enum Focus Word8 Source # |
Instance details Defined in Graphics.UI.SDL.Events Methods succ :: Focus -> Focus Source # pred :: Focus -> Focus Source # toEnum :: Word8 -> Focus Source # fromEnum :: Focus -> Word8 Source # enumFromTo :: Focus -> Focus -> [Focus] Source #
Enum MouseButton Word8 Source # |
Instance details Defined in Graphics.UI.SDL.Events Methods succ :: MouseButton -> MouseButton Source # pred :: MouseButton -> MouseButton Source # toEnum :: Word8 -> MouseButton Source # fromEnum :: MouseButton -> Word8 Source # enumFromTo :: MouseButton -> MouseButton -> [MouseButton] Source #

intToBool :: Int -> IO Int -> IO Bool Source #

toBitmask :: (Enum a b, Bits b, Num b) => [a] -> b Source #

fromBitmask :: (Bounded a, Enum a b, Bits b, Num b) => b -> [a] Source #

fromCInt :: Num a => CInt -> a Source #

toCInt :: Int -> CInt Source #