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.General

Description

Synopsis

- init :: [InitFlag] -> IO ()
- withInit :: [InitFlag] -> IO a -> IO a
- initSubSystem :: [InitFlag] -> IO ()
- quitSubSystem :: [InitFlag] -> IO ()
- quit :: IO ()
- wasInit :: [InitFlag] -> IO [InitFlag]
- getError :: IO (Maybe String)
- failWithError :: String -> IO a
- unwrapBool :: String -> IO Bool -> IO ()
- unwrapMaybe :: String -> IO (Maybe a) -> IO a
- unwrapInt :: (Int -> Bool) -> String -> IO Int -> IO Int
- data InitFlag
  - = InitTimer
  - | InitAudio
  - | InitVideo
  - | InitCDROM
  - | InitJoystick
  - | InitNoParachute
  - | InitEventthread
  - | InitEverything

# Documentation

init :: [InitFlag] -> IO () Source #

Initializes SDL. This should be called before all other SDL functions.

withInit :: [InitFlag] -> IO a -> IO a Source #

initSubSystem :: [InitFlag] -> IO () Source #

After SDL has been initialized with SDL_Init you may initialize uninitialized subsystems with SDL_InitSubSystem.

quitSubSystem :: [InitFlag] -> IO () Source #

quit :: IO () Source #

wasInit :: [InitFlag] -> IO [InitFlag] Source #

wasInit allows you to see which SDL subsytems have been initialized

getError :: IO (Maybe String) Source #

Returns a string containing the last error. Nothing if no error.

failWithError :: String -> IO a Source #

unwrapBool :: String -> IO Bool -> IO () Source #

unwrapMaybe :: String -> IO (Maybe a) -> IO a Source #

unwrapInt :: (Int -> Bool) -> String -> IO Int -> IO Int Source #

data InitFlag Source #

Constructors

InitTimer |
InitAudio |
InitVideo |
InitCDROM |
InitJoystick |
InitNoParachute |
InitEventthread |
InitEverything |

Instances

Bounded InitFlag Source # |
Instance details Defined in Graphics.UI.SDL.General Methods minBound :: InitFlag Source # maxBound :: InitFlag Source #
Eq InitFlag Source # |
Instance details Defined in Graphics.UI.SDL.General Methods (==) :: InitFlag -> InitFlag -> Bool Source # (/=) :: InitFlag -> InitFlag -> Bool Source #
Ord InitFlag Source # |
Instance details Defined in Graphics.UI.SDL.General Methods compare :: InitFlag -> InitFlag -> Ordering Source # (<) :: InitFlag -> InitFlag -> Bool Source # (<=) :: InitFlag -> InitFlag -> Bool Source # (>) :: InitFlag -> InitFlag -> Bool Source # (>=) :: InitFlag -> InitFlag -> Bool Source # max :: InitFlag -> InitFlag -> InitFlag Source # min :: InitFlag -> InitFlag -> InitFlag Source #
Read InitFlag Source # |
Instance details Defined in Graphics.UI.SDL.General Methods readsPrec :: Int -> ReadS InitFlag Source # readList :: ReadS [InitFlag] Source # readPrec :: ReadPrec InitFlag Source # readListPrec :: ReadPrec [InitFlag] Source #
Show InitFlag Source # |
Instance details Defined in Graphics.UI.SDL.General Methods showsPrec :: Int -> InitFlag -> ShowS Source # show :: InitFlag -> String Source # showList :: [InitFlag] -> ShowS 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 #