-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Both high- and low-level bindings to the SDL library (version 2.0.4+).
--   
--   This package contains bindings to the SDL 2 library, in both high- and
--   low-level forms:
--   
--   The <a>SDL</a> namespace contains high-level bindings, where
--   enumerations are split into sum types, and we perform automatic
--   error-checking.
--   
--   The <a>SDL.Raw</a> namespace contains an almost 1-1 translation of the
--   C API into Haskell FFI calls. As such, this does not contain sum types
--   nor error checking. Thus this namespace is suitable for building your
--   own abstraction over SDL, but is not recommended for day-to-day
--   programming.
--   
--   Read <a>SDL</a> for a getting started guide.
@package sdl2
@version 2.4.1.0

module SDL.Exception

-- | Error details about a failure to call an SDL routine. Almost all
--   functions in this library have the ability to produce exceptions of
--   this type. Inspection should help you learn more about what has gone
--   wrong.
data SDLException

-- | A call to a low-level SDL C function failed unexpectedly.
SDLCallFailed :: !Text -> !Text -> !Text -> SDLException

-- | The Haskell routine that was trying to call a C function
[sdlExceptionCaller] :: SDLException -> !Text

-- | The C function that was called and produced an error
[sdlFunction] :: SDLException -> !Text

-- | SDL's understanding of what has gone wrong
[sdlExceptionError] :: SDLException -> !Text

-- | An SDL C function was called with an unexpected argument.
SDLUnexpectedArgument :: !Text -> !Text -> !String -> SDLException

-- | The Haskell routine that was trying to call a C function
[sdlExceptionCaller] :: SDLException -> !Text

-- | The C function that was called and produced an error
[sdlFunction] :: SDLException -> !Text

-- | The argument that SDL failed to understand
[sdlUnknownValue] :: SDLException -> !String

-- | A hint was attempted to be set, but SDL does not know about this hint.
SDLUnknownHintValue :: !String -> !String -> SDLException

-- | The hint that could not be set
[sdlHint] :: SDLException -> !String

-- | The argument that SDL failed to understand
[sdlUnknownValue] :: SDLException -> !String
instance GHC.Show.Show SDL.Exception.SDLException
instance GHC.Read.Read SDL.Exception.SDLException
instance GHC.Classes.Ord SDL.Exception.SDLException
instance GHC.Generics.Generic SDL.Exception.SDLException
instance GHC.Classes.Eq SDL.Exception.SDLException
instance Data.Data.Data SDL.Exception.SDLException
instance GHC.Exception.Exception SDL.Exception.SDLException

module SDL.Internal.Numbered
class (Integral b) => FromNumber a b | a -> b
fromNumber :: FromNumber a b => b -> a
class (Integral b) => ToNumber a b | a -> b
toNumber :: ToNumber a b => a -> b


module SDL.Internal.Vect

-- | A handy wrapper to help distinguish points from vectors at the type
--   level
newtype Point f a
P :: (f a) -> Point f a

-- | A 2-dimensional vector
--   
--   <pre>
--   &gt;&gt;&gt; pure 1 :: V2 Int
--   V2 1 1
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; V2 1 2 + V2 3 4
--   V2 4 6
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; V2 1 2 * V2 3 4
--   V2 3 8
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; sum (V2 1 2)
--   3
--   </pre>
data V2 a
V2 :: !a -> !a -> V2 a

-- | A 3-dimensional vector
data V3 a
V3 :: !a -> !a -> !a -> V3 a

-- | A 4-dimensional vector.
data V4 a
V4 :: !a -> !a -> !a -> !a -> V4 a
instance GHC.Generics.Generic1 SDL.Internal.Vect.V4
instance GHC.Generics.Generic (SDL.Internal.Vect.V4 a)
instance Data.Data.Data a => Data.Data.Data (SDL.Internal.Vect.V4 a)
instance GHC.Read.Read a => GHC.Read.Read (SDL.Internal.Vect.V4 a)
instance GHC.Show.Show a => GHC.Show.Show (SDL.Internal.Vect.V4 a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (SDL.Internal.Vect.V4 a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (SDL.Internal.Vect.V4 a)
instance GHC.Generics.Generic1 SDL.Internal.Vect.V3
instance GHC.Generics.Generic (SDL.Internal.Vect.V3 a)
instance Data.Data.Data a => Data.Data.Data (SDL.Internal.Vect.V3 a)
instance GHC.Read.Read a => GHC.Read.Read (SDL.Internal.Vect.V3 a)
instance GHC.Show.Show a => GHC.Show.Show (SDL.Internal.Vect.V3 a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (SDL.Internal.Vect.V3 a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (SDL.Internal.Vect.V3 a)
instance GHC.Generics.Generic1 SDL.Internal.Vect.V2
instance GHC.Generics.Generic (SDL.Internal.Vect.V2 a)
instance Data.Data.Data a => Data.Data.Data (SDL.Internal.Vect.V2 a)
instance GHC.Read.Read a => GHC.Read.Read (SDL.Internal.Vect.V2 a)
instance GHC.Show.Show a => GHC.Show.Show (SDL.Internal.Vect.V2 a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (SDL.Internal.Vect.V2 a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (SDL.Internal.Vect.V2 a)
instance (Data.Typeable.Internal.Typeable f, Data.Typeable.Internal.Typeable a, Data.Data.Data (f a)) => Data.Data.Data (SDL.Internal.Vect.Point f a)
instance GHC.Generics.Generic1 (SDL.Internal.Vect.Point f)
instance GHC.Generics.Generic (SDL.Internal.Vect.Point f a)
instance Foreign.Storable.Storable (f a) => Foreign.Storable.Storable (SDL.Internal.Vect.Point f a)
instance GHC.Arr.Ix (f a) => GHC.Arr.Ix (SDL.Internal.Vect.Point f a)
instance GHC.Num.Num (f a) => GHC.Num.Num (SDL.Internal.Vect.Point f a)
instance GHC.Real.Fractional (f a) => GHC.Real.Fractional (SDL.Internal.Vect.Point f a)
instance Data.Traversable.Traversable f => Data.Traversable.Traversable (SDL.Internal.Vect.Point f)
instance Data.Foldable.Foldable f => Data.Foldable.Foldable (SDL.Internal.Vect.Point f)
instance GHC.Base.Applicative f => GHC.Base.Applicative (SDL.Internal.Vect.Point f)
instance GHC.Base.Functor f => GHC.Base.Functor (SDL.Internal.Vect.Point f)
instance GHC.Base.Monad f => GHC.Base.Monad (SDL.Internal.Vect.Point f)
instance GHC.Read.Read (f a) => GHC.Read.Read (SDL.Internal.Vect.Point f a)
instance GHC.Show.Show (f a) => GHC.Show.Show (SDL.Internal.Vect.Point f a)
instance GHC.Classes.Ord (f a) => GHC.Classes.Ord (SDL.Internal.Vect.Point f a)
instance GHC.Classes.Eq (f a) => GHC.Classes.Eq (SDL.Internal.Vect.Point f a)
instance GHC.Base.Functor SDL.Internal.Vect.V4
instance Data.Foldable.Foldable SDL.Internal.Vect.V4
instance Data.Traversable.Traversable SDL.Internal.Vect.V4
instance GHC.Base.Applicative SDL.Internal.Vect.V4
instance GHC.Base.Monad SDL.Internal.Vect.V4
instance GHC.Num.Num a => GHC.Num.Num (SDL.Internal.Vect.V4 a)
instance GHC.Real.Fractional a => GHC.Real.Fractional (SDL.Internal.Vect.V4 a)
instance GHC.Float.Floating a => GHC.Float.Floating (SDL.Internal.Vect.V4 a)
instance Foreign.Storable.Storable a => Foreign.Storable.Storable (SDL.Internal.Vect.V4 a)
instance GHC.Arr.Ix a => GHC.Arr.Ix (SDL.Internal.Vect.V4 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Unboxed.Base.Unbox (SDL.Internal.Vect.V4 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (SDL.Internal.Vect.V4 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (SDL.Internal.Vect.V4 a)
instance Control.Monad.Zip.MonadZip SDL.Internal.Vect.V4
instance Control.Monad.Fix.MonadFix SDL.Internal.Vect.V4
instance GHC.Enum.Bounded a => GHC.Enum.Bounded (SDL.Internal.Vect.V4 a)
instance GHC.Base.Functor SDL.Internal.Vect.V3
instance Data.Foldable.Foldable SDL.Internal.Vect.V3
instance Data.Traversable.Traversable SDL.Internal.Vect.V3
instance GHC.Base.Applicative SDL.Internal.Vect.V3
instance GHC.Base.Monad SDL.Internal.Vect.V3
instance GHC.Num.Num a => GHC.Num.Num (SDL.Internal.Vect.V3 a)
instance GHC.Real.Fractional a => GHC.Real.Fractional (SDL.Internal.Vect.V3 a)
instance GHC.Float.Floating a => GHC.Float.Floating (SDL.Internal.Vect.V3 a)
instance Foreign.Storable.Storable a => Foreign.Storable.Storable (SDL.Internal.Vect.V3 a)
instance GHC.Arr.Ix a => GHC.Arr.Ix (SDL.Internal.Vect.V3 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Unboxed.Base.Unbox (SDL.Internal.Vect.V3 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (SDL.Internal.Vect.V3 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (SDL.Internal.Vect.V3 a)
instance Control.Monad.Zip.MonadZip SDL.Internal.Vect.V3
instance Control.Monad.Fix.MonadFix SDL.Internal.Vect.V3
instance GHC.Enum.Bounded a => GHC.Enum.Bounded (SDL.Internal.Vect.V3 a)
instance GHC.Base.Functor SDL.Internal.Vect.V2
instance Data.Foldable.Foldable SDL.Internal.Vect.V2
instance Data.Traversable.Traversable SDL.Internal.Vect.V2
instance GHC.Base.Applicative SDL.Internal.Vect.V2
instance GHC.Base.Monad SDL.Internal.Vect.V2
instance GHC.Num.Num a => GHC.Num.Num (SDL.Internal.Vect.V2 a)
instance GHC.Real.Fractional a => GHC.Real.Fractional (SDL.Internal.Vect.V2 a)
instance GHC.Float.Floating a => GHC.Float.Floating (SDL.Internal.Vect.V2 a)
instance Foreign.Storable.Storable a => Foreign.Storable.Storable (SDL.Internal.Vect.V2 a)
instance GHC.Arr.Ix a => GHC.Arr.Ix (SDL.Internal.Vect.V2 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Unboxed.Base.Unbox (SDL.Internal.Vect.V2 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (SDL.Internal.Vect.V2 a)
instance Data.Vector.Unboxed.Base.Unbox a => Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (SDL.Internal.Vect.V2 a)
instance Control.Monad.Zip.MonadZip SDL.Internal.Vect.V2
instance Control.Monad.Fix.MonadFix SDL.Internal.Vect.V2
instance GHC.Enum.Bounded a => GHC.Enum.Bounded (SDL.Internal.Vect.V2 a)
instance Data.Vector.Unboxed.Base.Unbox (f a) => Data.Vector.Unboxed.Base.Unbox (SDL.Internal.Vect.Point f a)
instance Data.Vector.Unboxed.Base.Unbox (f a) => Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (SDL.Internal.Vect.Point f a)
instance Data.Vector.Unboxed.Base.Unbox (f a) => Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (SDL.Internal.Vect.Point f a)

module SDL.Raw.Enum
type AudioFormat = (Word16)
type AudioStatus = (Word32)
type BlendMode = (Word32)
type EventAction = (Word32)
type GameControllerAxis = (Int32)
type GameControllerButton = (Int32)
type GLattr = (Word32)
type HintPriority = (Word32)
type InitFlag = Word32
type JoystickPowerLevel = (Int32)
type Keycode = (Int32)
type Keymod = (Word32)
type LogPriority = (Word32)
type PowerState = (Word32)
type RendererFlip = (Word32)
type Scancode = (Word32)
type SystemCursor = (Word32)
type ThreadPriority = (Word32)


-- | An enumeration of scancodes and keycodes, allowing you to pattern
--   match on keyboard keys.
--   
--   This module uses a relatively new GHC feature called
--   <tt>PatternSynonyms</tt> in order to provide pattern matches over the
--   underlying <a>Scancode</a> or <a>Keycode</a>. We do this so that you
--   are also able to work with vendor-specific or otherwise unknown codes.
module SDL.Input.Keyboard.Codes
newtype Scancode
Scancode :: Word32 -> Scancode
[unwrapScancode] :: Scancode -> Word32
newtype Keycode
Keycode :: Int32 -> Keycode
[unwrapKeycode] :: Keycode -> Int32
instance GHC.Show.Show SDL.Input.Keyboard.Codes.Keycode
instance GHC.Generics.Generic SDL.Input.Keyboard.Codes.Keycode
instance GHC.Read.Read SDL.Input.Keyboard.Codes.Keycode
instance GHC.Classes.Ord SDL.Input.Keyboard.Codes.Keycode
instance GHC.Classes.Eq SDL.Input.Keyboard.Codes.Keycode
instance Data.Data.Data SDL.Input.Keyboard.Codes.Keycode
instance GHC.Enum.Bounded SDL.Input.Keyboard.Codes.Keycode
instance GHC.Show.Show SDL.Input.Keyboard.Codes.Scancode
instance GHC.Generics.Generic SDL.Input.Keyboard.Codes.Scancode
instance GHC.Read.Read SDL.Input.Keyboard.Codes.Scancode
instance GHC.Classes.Ord SDL.Input.Keyboard.Codes.Scancode
instance GHC.Classes.Eq SDL.Input.Keyboard.Codes.Scancode
instance Data.Data.Data SDL.Input.Keyboard.Codes.Scancode
instance GHC.Enum.Bounded SDL.Input.Keyboard.Codes.Scancode
instance SDL.Internal.Numbered.FromNumber SDL.Input.Keyboard.Codes.Keycode GHC.Int.Int32
instance SDL.Internal.Numbered.ToNumber SDL.Input.Keyboard.Codes.Keycode GHC.Int.Int32
instance SDL.Internal.Numbered.FromNumber SDL.Input.Keyboard.Codes.Scancode GHC.Word.Word32
instance SDL.Internal.Numbered.ToNumber SDL.Input.Keyboard.Codes.Scancode GHC.Word.Word32

module SDL.Raw.Error

-- | Note: the <a>CString</a> is only valid until the next SDL function
--   call. If you need to preserve the error message, make a copy of it.
newtype SDLError
SDLError :: CString -> SDLError
throwError :: (MonadThrow m, MonadIO m) => m ()
clearError :: MonadIO m => m ()
getError :: MonadIO m => m CString
setError :: MonadIO m => CString -> m CInt
instance GHC.Show.Show SDL.Raw.Error.SDLError
instance GHC.Classes.Eq SDL.Raw.Error.SDLError
instance GHC.Exception.Exception SDL.Raw.Error.SDLError

module SDL.Raw.Platform
getPlatform :: MonadIO m => m CString

module SDL.Raw.Power
getPowerInfo :: MonadIO m => Ptr CInt -> Ptr CInt -> m PowerState

module SDL.Raw.Types
type AudioCallback = FunPtr (Ptr () -> Ptr Word8 -> CInt -> IO ())
type EventFilter = FunPtr (Ptr () -> Ptr Event -> IO CInt)
type HintCallback = FunPtr (Ptr () -> CString -> CString -> CString -> IO ())
type LogOutputFunction = FunPtr (Ptr () -> CInt -> LogPriority -> CString -> IO ())
type ThreadFunction = FunPtr (Ptr () -> IO CInt)
type TimerCallback = FunPtr (Word32 -> Ptr () -> IO Word32)

-- | The storage associated with the resulting <a>FunPtr</a> has to be
--   released with <a>freeHaskellFunPtr</a> when it is no longer required.
mkAudioCallback :: (Ptr () -> Ptr Word8 -> CInt -> IO ()) -> IO AudioCallback

-- | The storage associated with the resulting <a>FunPtr</a> has to be
--   released with <a>freeHaskellFunPtr</a> when it is no longer required.
mkEventFilter :: (Ptr () -> Ptr Event -> IO CInt) -> IO EventFilter

-- | The storage associated with the resulting <a>FunPtr</a> has to be
--   released with <a>freeHaskellFunPtr</a> when it is no longer required.
mkHintCallback :: (Ptr () -> CString -> CString -> CString -> IO ()) -> IO HintCallback

-- | The storage associated with the resulting <a>FunPtr</a> has to be
--   released with <a>freeHaskellFunPtr</a> when it is no longer required.
mkLogOutputFunction :: (Ptr () -> CInt -> LogPriority -> CString -> IO ()) -> IO LogOutputFunction

-- | The storage associated with the resulting <a>FunPtr</a> has to be
--   released with <a>freeHaskellFunPtr</a> when it is no longer required.
mkThreadFunction :: (Ptr () -> IO CInt) -> IO ThreadFunction

-- | The storage associated with the resulting <a>FunPtr</a> has to be
--   released with <a>freeHaskellFunPtr</a> when it is no longer required.
mkTimerCallback :: (Word32 -> Ptr () -> IO Word32) -> IO TimerCallback
type AudioDeviceID = Word32
type AudioFormat = (Word16)
type Cond = Ptr ()
type Cursor = Ptr ()
type FingerID = Int64
type GameController = Ptr ()
type GestureID = Int64
type GLContext = Ptr ()
type Haptic = Ptr ()
type Joystick = Ptr ()
type JoystickID = Int32
type Mutex = Ptr ()
type Renderer = Ptr ()
type Sem = Ptr ()
type SpinLock = CInt
type SysWMinfo = Ptr ()
type SysWMmsg = Ptr ()
type Texture = Ptr ()
type Thread = Ptr ()
type ThreadID = CULong
type TimerID = CInt
type TLSID = CUInt
type TouchID = Int64
type Window = Ptr ()
data Atomic
Atomic :: !CInt -> Atomic
[atomicValue] :: Atomic -> !CInt
data AudioCVT
AudioCVT :: !CInt -> !AudioFormat -> !AudioFormat -> !CDouble -> !(Ptr Word8) -> !CInt -> !CInt -> !CInt -> !CDouble -> AudioCVT
[audioCVTNeeded] :: AudioCVT -> !CInt
[audioCVTSrcFormat] :: AudioCVT -> !AudioFormat
[audioCVTDstFormat] :: AudioCVT -> !AudioFormat
[audioCVTRateIncr] :: AudioCVT -> !CDouble
[audioCVTBuf] :: AudioCVT -> !(Ptr Word8)
[audioCVTLen] :: AudioCVT -> !CInt
[audioCVTLenCvt] :: AudioCVT -> !CInt
[audioCVTLenMult] :: AudioCVT -> !CInt
[audioCVTLenRatio] :: AudioCVT -> !CDouble
data AudioSpec
AudioSpec :: !CInt -> !AudioFormat -> !Word8 -> !Word8 -> !Word16 -> !Word32 -> !AudioCallback -> !(Ptr ()) -> AudioSpec
[audioSpecFreq] :: AudioSpec -> !CInt
[audioSpecFormat] :: AudioSpec -> !AudioFormat
[audioSpecChannels] :: AudioSpec -> !Word8
[audioSpecSilence] :: AudioSpec -> !Word8
[audioSpecSamples] :: AudioSpec -> !Word16
[audioSpecSize] :: AudioSpec -> !Word32
[audioSpecCallback] :: AudioSpec -> !AudioCallback
[audioSpecUserdata] :: AudioSpec -> !(Ptr ())
data Color
Color :: !Word8 -> !Word8 -> !Word8 -> !Word8 -> Color
[colorR] :: Color -> !Word8
[colorG] :: Color -> !Word8
[colorB] :: Color -> !Word8
[colorA] :: Color -> !Word8
data DisplayMode
DisplayMode :: !Word32 -> !CInt -> !CInt -> !CInt -> !(Ptr ()) -> DisplayMode
[displayModeFormat] :: DisplayMode -> !Word32
[displayModeW] :: DisplayMode -> !CInt
[displayModeH] :: DisplayMode -> !CInt
[displayModeRefreshRate] :: DisplayMode -> !CInt
[displayModeDriverData] :: DisplayMode -> !(Ptr ())
data Event
WindowEvent :: !Word32 -> !Word32 -> !Word32 -> !Word8 -> !Int32 -> !Int32 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[windowEventWindowID] :: Event -> !Word32
[windowEventEvent] :: Event -> !Word8
[windowEventData1] :: Event -> !Int32
[windowEventData2] :: Event -> !Int32
KeyboardEvent :: !Word32 -> !Word32 -> !Word32 -> !Word8 -> !Word8 -> !Keysym -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[keyboardEventWindowID] :: Event -> !Word32
[keyboardEventState] :: Event -> !Word8
[keyboardEventRepeat] :: Event -> !Word8
[keyboardEventKeysym] :: Event -> !Keysym
TextEditingEvent :: !Word32 -> !Word32 -> !Word32 -> ![CChar] -> !Int32 -> !Int32 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[textEditingEventWindowID] :: Event -> !Word32
[textEditingEventText] :: Event -> ![CChar]
[textEditingEventStart] :: Event -> !Int32
[textEditingEventLength] :: Event -> !Int32
TextInputEvent :: !Word32 -> !Word32 -> !Word32 -> ![CChar] -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[textInputEventWindowID] :: Event -> !Word32
[textInputEventText] :: Event -> ![CChar]
KeymapChangedEvent :: !Word32 -> !Word32 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
MouseMotionEvent :: !Word32 -> !Word32 -> !Word32 -> !Word32 -> !Word32 -> !Int32 -> !Int32 -> !Int32 -> !Int32 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[mouseMotionEventWindowID] :: Event -> !Word32
[mouseMotionEventWhich] :: Event -> !Word32
[mouseMotionEventState] :: Event -> !Word32
[mouseMotionEventX] :: Event -> !Int32
[mouseMotionEventY] :: Event -> !Int32
[mouseMotionEventXRel] :: Event -> !Int32
[mouseMotionEventYRel] :: Event -> !Int32
MouseButtonEvent :: !Word32 -> !Word32 -> !Word32 -> !Word32 -> !Word8 -> !Word8 -> !Word8 -> !Int32 -> !Int32 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[mouseButtonEventWindowID] :: Event -> !Word32
[mouseButtonEventWhich] :: Event -> !Word32
[mouseButtonEventButton] :: Event -> !Word8
[mouseButtonEventState] :: Event -> !Word8
[mouseButtonEventClicks] :: Event -> !Word8
[mouseButtonEventX] :: Event -> !Int32
[mouseButtonEventY] :: Event -> !Int32
MouseWheelEvent :: !Word32 -> !Word32 -> !Word32 -> !Word32 -> !Int32 -> !Int32 -> !Word32 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[mouseWheelEventWindowID] :: Event -> !Word32
[mouseWheelEventWhich] :: Event -> !Word32
[mouseWheelEventX] :: Event -> !Int32
[mouseWheelEventY] :: Event -> !Int32
[mouseWheelEventDirection] :: Event -> !Word32
JoyAxisEvent :: !Word32 -> !Word32 -> !JoystickID -> !Word8 -> !Int16 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[joyAxisEventWhich] :: Event -> !JoystickID
[joyAxisEventAxis] :: Event -> !Word8
[joyAxisEventValue] :: Event -> !Int16
JoyBallEvent :: !Word32 -> !Word32 -> !JoystickID -> !Word8 -> !Int16 -> !Int16 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[joyBallEventWhich] :: Event -> !JoystickID
[joyBallEventBall] :: Event -> !Word8
[joyBallEventXRel] :: Event -> !Int16
[joyBallEventYRel] :: Event -> !Int16
JoyHatEvent :: !Word32 -> !Word32 -> !JoystickID -> !Word8 -> !Word8 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[joyHatEventWhich] :: Event -> !JoystickID
[joyHatEventHat] :: Event -> !Word8
[joyHatEventValue] :: Event -> !Word8
JoyButtonEvent :: !Word32 -> !Word32 -> !JoystickID -> !Word8 -> !Word8 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[joyButtonEventWhich] :: Event -> !JoystickID
[joyButtonEventButton] :: Event -> !Word8
[joyButtonEventState] :: Event -> !Word8
JoyDeviceEvent :: !Word32 -> !Word32 -> !Int32 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[joyDeviceEventWhich] :: Event -> !Int32
ControllerAxisEvent :: !Word32 -> !Word32 -> !JoystickID -> !Word8 -> !Int16 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[controllerAxisEventWhich] :: Event -> !JoystickID
[controllerAxisEventAxis] :: Event -> !Word8
[controllerAxisEventValue] :: Event -> !Int16
ControllerButtonEvent :: !Word32 -> !Word32 -> !JoystickID -> !Word8 -> !Word8 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[controllerButtonEventWhich] :: Event -> !JoystickID
[controllerButtonEventButton] :: Event -> !Word8
[controllerButtonEventState] :: Event -> !Word8
ControllerDeviceEvent :: !Word32 -> !Word32 -> !Int32 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[controllerDeviceEventWhich] :: Event -> !Int32
AudioDeviceEvent :: !Word32 -> !Word32 -> !Word32 -> !Word8 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[audioDeviceEventWhich] :: Event -> !Word32
[audioDeviceEventIsCapture] :: Event -> !Word8
QuitEvent :: !Word32 -> !Word32 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
UserEvent :: !Word32 -> !Word32 -> !Word32 -> !Int32 -> !(Ptr ()) -> !(Ptr ()) -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[userEventWindowID] :: Event -> !Word32
[userEventCode] :: Event -> !Int32
[userEventData1] :: Event -> !(Ptr ())
[userEventData2] :: Event -> !(Ptr ())
SysWMEvent :: !Word32 -> !Word32 -> !SysWMmsg -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[sysWMEventMsg] :: Event -> !SysWMmsg
TouchFingerEvent :: !Word32 -> !Word32 -> !TouchID -> !FingerID -> !CFloat -> !CFloat -> !CFloat -> !CFloat -> !CFloat -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[touchFingerEventTouchID] :: Event -> !TouchID
[touchFingerEventFingerID] :: Event -> !FingerID
[touchFingerEventX] :: Event -> !CFloat
[touchFingerEventY] :: Event -> !CFloat
[touchFingerEventDX] :: Event -> !CFloat
[touchFingerEventDY] :: Event -> !CFloat
[touchFingerEventPressure] :: Event -> !CFloat
MultiGestureEvent :: !Word32 -> !Word32 -> !TouchID -> !CFloat -> !CFloat -> !CFloat -> !CFloat -> !Word16 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[multiGestureEventTouchID] :: Event -> !TouchID
[multiGestureEventDTheta] :: Event -> !CFloat
[multiGestureEventDDist] :: Event -> !CFloat
[multiGestureEventX] :: Event -> !CFloat
[multiGestureEventY] :: Event -> !CFloat
[multiGestureEventNumFingers] :: Event -> !Word16
DollarGestureEvent :: !Word32 -> !Word32 -> !TouchID -> !GestureID -> !Word32 -> !CFloat -> !CFloat -> !CFloat -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[dollarGestureEventTouchID] :: Event -> !TouchID
[dollarGestureEventGestureID] :: Event -> !GestureID
[dollarGestureEventNumFingers] :: Event -> !Word32
[dollarGestureEventError] :: Event -> !CFloat
[dollarGestureEventX] :: Event -> !CFloat
[dollarGestureEventY] :: Event -> !CFloat
DropEvent :: !Word32 -> !Word32 -> !CString -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
[dropEventFile] :: Event -> !CString
ClipboardUpdateEvent :: !Word32 -> !Word32 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
UnknownEvent :: !Word32 -> !Word32 -> Event
[eventType] :: Event -> !Word32
[eventTimestamp] :: Event -> !Word32
data Finger
Finger :: !FingerID -> !CFloat -> !CFloat -> !CFloat -> Finger
[fingerID] :: Finger -> !FingerID
[fingerX] :: Finger -> !CFloat
[fingerY] :: Finger -> !CFloat
[fingerPressure] :: Finger -> !CFloat
data GameControllerButtonBind
GameControllerButtonBindNone :: GameControllerButtonBind
GameControllerButtonBindButton :: !CInt -> GameControllerButtonBind
[gameControllerButtonBindButton] :: GameControllerButtonBind -> !CInt
GameControllerButtonBindAxis :: !CInt -> GameControllerButtonBind
[gameControllerButtonBindAxis] :: GameControllerButtonBind -> !CInt
GameControllerButtonBindHat :: !CInt -> !CInt -> GameControllerButtonBind
[gameControllerButtonBindHat] :: GameControllerButtonBind -> !CInt
[gameControllerButtonBindHatMask] :: GameControllerButtonBind -> !CInt
data HapticDirection
HapticDirection :: !Word8 -> !Int32 -> !Int32 -> !Int32 -> HapticDirection
[hapticDirectionType] :: HapticDirection -> !Word8
[hapticDirectionX] :: HapticDirection -> !Int32
[hapticDirectionY] :: HapticDirection -> !Int32
[hapticDirectionZ] :: HapticDirection -> !Int32
data HapticEffect
HapticConstant :: !Word16 -> !HapticDirection -> !Word32 -> !Word16 -> !Word16 -> !Word16 -> !Int16 -> !Word16 -> !Word16 -> !Word16 -> !Word16 -> HapticEffect
[hapticEffectType] :: HapticEffect -> !Word16
[hapticConstantDirection] :: HapticEffect -> !HapticDirection
[hapticConstantLength] :: HapticEffect -> !Word32
[hapticConstantDelay] :: HapticEffect -> !Word16
[hapticConstantButton] :: HapticEffect -> !Word16
[hapticConstantInterval] :: HapticEffect -> !Word16
[hapticConstantLevel] :: HapticEffect -> !Int16
[hapticConstantAttackLength] :: HapticEffect -> !Word16
[hapticConstantAttackLevel] :: HapticEffect -> !Word16
[hapticConstantFadeLength] :: HapticEffect -> !Word16
[hapticConstantFadeLevel] :: HapticEffect -> !Word16
HapticPeriodic :: !Word16 -> !HapticDirection -> !Word32 -> !Word16 -> !Word16 -> !Word16 -> !Word16 -> !Int16 -> !Int16 -> !Word16 -> !Word16 -> !Word16 -> !Word16 -> !Word16 -> HapticEffect
[hapticEffectType] :: HapticEffect -> !Word16
[hapticPeriodicDirection] :: HapticEffect -> !HapticDirection
[hapticPeriodicLength] :: HapticEffect -> !Word32
[hapticPeriodicDelay] :: HapticEffect -> !Word16
[hapticPeriodicButton] :: HapticEffect -> !Word16
[hapticPeriodicInterval] :: HapticEffect -> !Word16
[hapticPeriodicPeriod] :: HapticEffect -> !Word16
[hapticPeriodicMagnitude] :: HapticEffect -> !Int16
[hapticPeriodicOffset] :: HapticEffect -> !Int16
[hapticPeriodicPhase] :: HapticEffect -> !Word16
[hapticPeriodicAttackLength] :: HapticEffect -> !Word16
[hapticPeriodicAttackLevel] :: HapticEffect -> !Word16
[hapticPeriodicFadeLength] :: HapticEffect -> !Word16
[hapticPeriodicFadeLevel] :: HapticEffect -> !Word16
HapticCondition :: !Word16 -> !Word32 -> !Word16 -> !Word16 -> !Word16 -> ![Word16] -> ![Word16] -> ![Int16] -> ![Int16] -> ![Word16] -> ![Int16] -> HapticEffect
[hapticEffectType] :: HapticEffect -> !Word16
[hapticConditionLength] :: HapticEffect -> !Word32
[hapticConditionDelay] :: HapticEffect -> !Word16
[hapticConditionButton] :: HapticEffect -> !Word16
[hapticConditionInterval] :: HapticEffect -> !Word16
[hapticConditionRightSat] :: HapticEffect -> ![Word16]
[hapticConditionLeftSat] :: HapticEffect -> ![Word16]
[hapticConditionRightCoeff] :: HapticEffect -> ![Int16]
[hapticConditionLeftCoeff] :: HapticEffect -> ![Int16]
[hapticConditionDeadband] :: HapticEffect -> ![Word16]
[hapticConditionCenter] :: HapticEffect -> ![Int16]
HapticRamp :: !Word16 -> !HapticDirection -> !Word32 -> !Word16 -> !Word16 -> !Word16 -> !Int16 -> !Int16 -> !Word16 -> !Word16 -> !Word16 -> !Word16 -> HapticEffect
[hapticEffectType] :: HapticEffect -> !Word16
[hapticRampDirection] :: HapticEffect -> !HapticDirection
[hapticRampLength] :: HapticEffect -> !Word32
[hapticRampDelay] :: HapticEffect -> !Word16
[hapticRampButton] :: HapticEffect -> !Word16
[hapticRampInterval] :: HapticEffect -> !Word16
[hapticRampStart] :: HapticEffect -> !Int16
[hapticRampEnd] :: HapticEffect -> !Int16
[hapticRampAttackLength] :: HapticEffect -> !Word16
[hapticRampAttackLevel] :: HapticEffect -> !Word16
[hapticRampFadeLength] :: HapticEffect -> !Word16
[hapticRampFadeLevel] :: HapticEffect -> !Word16
HapticLeftRight :: !Word16 -> !Word32 -> !Word16 -> !Word16 -> HapticEffect
[hapticEffectType] :: HapticEffect -> !Word16
[hapticLeftRightLength] :: HapticEffect -> !Word32
[hapticLeftRightLargeMagnitude] :: HapticEffect -> !Word16
[hapticLeftRightSmallMagnitude] :: HapticEffect -> !Word16
HapticCustom :: !Word16 -> !HapticDirection -> !Word32 -> !Word16 -> !Word16 -> !Word16 -> !Word8 -> !Word16 -> !Word16 -> !(Ptr Word16) -> !Word16 -> !Word16 -> !Word16 -> !Word16 -> HapticEffect
[hapticEffectType] :: HapticEffect -> !Word16
[hapticCustomDirection] :: HapticEffect -> !HapticDirection
[hapticCustomLength] :: HapticEffect -> !Word32
[hapticCustomDelay] :: HapticEffect -> !Word16
[hapticCustomButton] :: HapticEffect -> !Word16
[hapticCustomInterval] :: HapticEffect -> !Word16
[hapticCustomChannels] :: HapticEffect -> !Word8
[hapticCustomPeriod] :: HapticEffect -> !Word16
[hapticCustomSamples] :: HapticEffect -> !Word16
[hapticCustomData] :: HapticEffect -> !(Ptr Word16)
[hapticCustomAttackLength] :: HapticEffect -> !Word16
[hapticCustomAttackLevel] :: HapticEffect -> !Word16
[hapticCustomFadeLength] :: HapticEffect -> !Word16
[hapticCustomFadeLevel] :: HapticEffect -> !Word16
data JoystickGUID
JoystickGUID :: ![Word8] -> JoystickGUID
[joystickGUID] :: JoystickGUID -> ![Word8]
data Keysym
Keysym :: !Scancode -> !Keycode -> !Word16 -> Keysym
[keysymScancode] :: Keysym -> !Scancode
[keysymKeycode] :: Keysym -> !Keycode
[keysymMod] :: Keysym -> !Word16
data MessageBoxButtonData
MessageBoxButtonData :: !Word32 -> !CInt -> !CString -> MessageBoxButtonData
[messageBoxButtonDataFlags] :: MessageBoxButtonData -> !Word32
[messageBoxButtonButtonID] :: MessageBoxButtonData -> !CInt
[messageBoxButtonText] :: MessageBoxButtonData -> !CString
data MessageBoxColor
MessageBoxColor :: !Word8 -> !Word8 -> !Word8 -> MessageBoxColor
[messageBoxColorR] :: MessageBoxColor -> !Word8
[messageBoxColorG] :: MessageBoxColor -> !Word8
[messageBoxColorB] :: MessageBoxColor -> !Word8
data MessageBoxColorScheme
MessageBoxColorScheme :: !MessageBoxColor -> !MessageBoxColor -> !MessageBoxColor -> !MessageBoxColor -> !MessageBoxColor -> MessageBoxColorScheme
[messageBoxColorSchemeColorBackground] :: MessageBoxColorScheme -> !MessageBoxColor
[messageBoxColorSchemeColorText] :: MessageBoxColorScheme -> !MessageBoxColor
[messageBoxColorSchemeColorButtonBorder] :: MessageBoxColorScheme -> !MessageBoxColor
[messageBoxColorSchemeColorButtonBackground] :: MessageBoxColorScheme -> !MessageBoxColor
[messageBoxColorSchemeColorButtonSelected] :: MessageBoxColorScheme -> !MessageBoxColor
data MessageBoxData
MessageBoxData :: !Word32 -> !Window -> !CString -> !CString -> !CInt -> !(Ptr MessageBoxButtonData) -> !(Ptr MessageBoxColorScheme) -> MessageBoxData
[messageBoxDataFlags] :: MessageBoxData -> !Word32
[messageBoxDataWindow] :: MessageBoxData -> !Window
[messageBoxDataTitle] :: MessageBoxData -> !CString
[messageBoxDataMessage] :: MessageBoxData -> !CString
[messageBoxDataNumButtons] :: MessageBoxData -> !CInt
[messageBoxDataButtons] :: MessageBoxData -> !(Ptr MessageBoxButtonData)
[messageBoxDataColorScheme] :: MessageBoxData -> !(Ptr MessageBoxColorScheme)
data Palette
Palette :: !CInt -> !(Ptr Color) -> Palette
[paletteNColors] :: Palette -> !CInt
[paletteColors] :: Palette -> !(Ptr Color)
data PixelFormat
PixelFormat :: !Word32 -> !(Ptr Palette) -> !Word8 -> !Word8 -> !Word32 -> !Word32 -> !Word32 -> !Word32 -> PixelFormat
[pixelFormatFormat] :: PixelFormat -> !Word32
[pixelFormatPalette] :: PixelFormat -> !(Ptr Palette)
[pixelFormatBitsPerPixel] :: PixelFormat -> !Word8
[pixelFormatBytesPerPixel] :: PixelFormat -> !Word8
[pixelFormatRMask] :: PixelFormat -> !Word32
[pixelFormatGMask] :: PixelFormat -> !Word32
[pixelFormatBMask] :: PixelFormat -> !Word32
[pixelFormatAMask] :: PixelFormat -> !Word32
data Point
Point :: !CInt -> !CInt -> Point
[pointX] :: Point -> !CInt
[pointY] :: Point -> !CInt
data Rect
Rect :: !CInt -> !CInt -> !CInt -> !CInt -> Rect
[rectX] :: Rect -> !CInt
[rectY] :: Rect -> !CInt
[rectW] :: Rect -> !CInt
[rectH] :: Rect -> !CInt
data RendererInfo
RendererInfo :: !CString -> !Word32 -> !Word32 -> ![Word32] -> !CInt -> !CInt -> RendererInfo
[rendererInfoName] :: RendererInfo -> !CString
[rendererInfoFlags] :: RendererInfo -> !Word32
[rendererInfoNumTextureFormats] :: RendererInfo -> !Word32
[rendererInfoTextureFormats] :: RendererInfo -> ![Word32]
[rendererInfoMaxTextureWidth] :: RendererInfo -> !CInt
[rendererInfoMaxTextureHeight] :: RendererInfo -> !CInt
data RWops
RWops :: !(FunPtr (Ptr RWops -> IO Int64)) -> !(FunPtr (Ptr RWops -> Int64 -> CInt -> IO Int64)) -> !(FunPtr (Ptr RWops -> Ptr () -> CSize -> CSize -> IO CSize)) -> !(FunPtr (Ptr RWops -> Ptr () -> CSize -> CSize -> IO CSize)) -> !(FunPtr (Ptr RWops -> IO CInt)) -> !Word32 -> RWops
[rwopsSize] :: RWops -> !(FunPtr (Ptr RWops -> IO Int64))
[rwopsSeek] :: RWops -> !(FunPtr (Ptr RWops -> Int64 -> CInt -> IO Int64))
[rwopsRead] :: RWops -> !(FunPtr (Ptr RWops -> Ptr () -> CSize -> CSize -> IO CSize))
[rwopsWrite] :: RWops -> !(FunPtr (Ptr RWops -> Ptr () -> CSize -> CSize -> IO CSize))
[rwopsClose] :: RWops -> !(FunPtr (Ptr RWops -> IO CInt))
[rwopsType] :: RWops -> !Word32
data Surface
Surface :: !(Ptr PixelFormat) -> !CInt -> !CInt -> !(Ptr ()) -> !(Ptr ()) -> !Rect -> !CInt -> Surface
[surfaceFormat] :: Surface -> !(Ptr PixelFormat)
[surfaceW] :: Surface -> !CInt
[surfaceH] :: Surface -> !CInt
[surfacePixels] :: Surface -> !(Ptr ())
[surfaceUserdata] :: Surface -> !(Ptr ())
[surfaceClipRect] :: Surface -> !Rect
[surfaceRefcount] :: Surface -> !CInt
data Version
Version :: !Word8 -> !Word8 -> !Word8 -> Version
[versionMajor] :: Version -> !Word8
[versionMinor] :: Version -> !Word8
[versionPatch] :: Version -> !Word8
instance GHC.Show.Show SDL.Raw.Types.Version
instance GHC.Classes.Eq SDL.Raw.Types.Version
instance GHC.Show.Show SDL.Raw.Types.Surface
instance GHC.Classes.Eq SDL.Raw.Types.Surface
instance GHC.Show.Show SDL.Raw.Types.RWops
instance GHC.Classes.Eq SDL.Raw.Types.RWops
instance GHC.Show.Show SDL.Raw.Types.RendererInfo
instance GHC.Classes.Eq SDL.Raw.Types.RendererInfo
instance GHC.Show.Show SDL.Raw.Types.Rect
instance GHC.Classes.Eq SDL.Raw.Types.Rect
instance GHC.Show.Show SDL.Raw.Types.Point
instance GHC.Classes.Eq SDL.Raw.Types.Point
instance GHC.Show.Show SDL.Raw.Types.PixelFormat
instance GHC.Classes.Eq SDL.Raw.Types.PixelFormat
instance GHC.Show.Show SDL.Raw.Types.Palette
instance GHC.Classes.Eq SDL.Raw.Types.Palette
instance GHC.Show.Show SDL.Raw.Types.MessageBoxData
instance GHC.Classes.Eq SDL.Raw.Types.MessageBoxData
instance GHC.Show.Show SDL.Raw.Types.MessageBoxColorScheme
instance GHC.Classes.Eq SDL.Raw.Types.MessageBoxColorScheme
instance GHC.Show.Show SDL.Raw.Types.MessageBoxColor
instance GHC.Classes.Eq SDL.Raw.Types.MessageBoxColor
instance GHC.Show.Show SDL.Raw.Types.MessageBoxButtonData
instance GHC.Classes.Eq SDL.Raw.Types.MessageBoxButtonData
instance GHC.Show.Show SDL.Raw.Types.Event
instance GHC.Classes.Eq SDL.Raw.Types.Event
instance GHC.Show.Show SDL.Raw.Types.Keysym
instance GHC.Classes.Eq SDL.Raw.Types.Keysym
instance GHC.Show.Show SDL.Raw.Types.JoystickGUID
instance GHC.Classes.Eq SDL.Raw.Types.JoystickGUID
instance GHC.Show.Show SDL.Raw.Types.HapticEffect
instance GHC.Classes.Eq SDL.Raw.Types.HapticEffect
instance GHC.Show.Show SDL.Raw.Types.HapticDirection
instance GHC.Classes.Eq SDL.Raw.Types.HapticDirection
instance GHC.Show.Show SDL.Raw.Types.GameControllerButtonBind
instance GHC.Classes.Eq SDL.Raw.Types.GameControllerButtonBind
instance GHC.Show.Show SDL.Raw.Types.Finger
instance GHC.Classes.Eq SDL.Raw.Types.Finger
instance GHC.Show.Show SDL.Raw.Types.DisplayMode
instance GHC.Classes.Eq SDL.Raw.Types.DisplayMode
instance GHC.Show.Show SDL.Raw.Types.Color
instance GHC.Classes.Eq SDL.Raw.Types.Color
instance GHC.Show.Show SDL.Raw.Types.AudioSpec
instance GHC.Classes.Eq SDL.Raw.Types.AudioSpec
instance GHC.Show.Show SDL.Raw.Types.AudioCVT
instance GHC.Classes.Eq SDL.Raw.Types.AudioCVT
instance GHC.Show.Show SDL.Raw.Types.Atomic
instance GHC.Classes.Eq SDL.Raw.Types.Atomic
instance Foreign.Storable.Storable SDL.Raw.Types.Version
instance Foreign.Storable.Storable SDL.Raw.Types.Surface
instance Foreign.Storable.Storable SDL.Raw.Types.RWops
instance Foreign.Storable.Storable SDL.Raw.Types.RendererInfo
instance Foreign.Storable.Storable SDL.Raw.Types.Rect
instance Foreign.Storable.Storable SDL.Raw.Types.Point
instance Foreign.Storable.Storable SDL.Raw.Types.PixelFormat
instance Foreign.Storable.Storable SDL.Raw.Types.Palette
instance Foreign.Storable.Storable SDL.Raw.Types.MessageBoxData
instance Foreign.Storable.Storable SDL.Raw.Types.MessageBoxColorScheme
instance Foreign.Storable.Storable SDL.Raw.Types.MessageBoxColor
instance Foreign.Storable.Storable SDL.Raw.Types.MessageBoxButtonData
instance Foreign.Storable.Storable SDL.Raw.Types.Event
instance Foreign.Storable.Storable SDL.Raw.Types.Keysym
instance Foreign.Storable.Storable SDL.Raw.Types.JoystickGUID
instance Foreign.Storable.Storable SDL.Raw.Types.HapticEffect
instance Foreign.Storable.Storable SDL.Raw.Types.HapticDirection
instance Foreign.Storable.Storable SDL.Raw.Types.GameControllerButtonBind
instance Foreign.Storable.Storable SDL.Raw.Types.Finger
instance Foreign.Storable.Storable SDL.Raw.Types.DisplayMode
instance Foreign.Storable.Storable SDL.Raw.Types.Color
instance Foreign.Storable.Storable SDL.Raw.Types.AudioSpec
instance Foreign.Storable.Storable SDL.Raw.Types.AudioCVT
instance Foreign.Storable.Storable SDL.Raw.Types.Atomic

module SDL.Raw.Timer
addTimer :: MonadIO m => Word32 -> TimerCallback -> Ptr () -> m TimerID
delay :: MonadIO m => Word32 -> m ()
getPerformanceCounter :: MonadIO m => m Word64
getPerformanceFrequency :: MonadIO m => m Word64
getTicks :: MonadIO m => m Word32
removeTimer :: MonadIO m => TimerID -> m Bool

module SDL.Raw.Thread
createThread :: MonadIO m => ThreadFunction -> CString -> m (Ptr ())
detachThread :: MonadIO m => Ptr Thread -> m ()
getThreadID :: MonadIO m => Ptr Thread -> m ThreadID
getThreadName :: MonadIO m => Ptr Thread -> m CString
setThreadPriority :: MonadIO m => ThreadPriority -> m CInt
tlsCreate :: MonadIO m => m TLSID
tlsGet :: MonadIO m => TLSID -> m (Ptr ())
tlsSet :: MonadIO m => TLSID -> Ptr () -> FunPtr (Ptr () -> IO ()) -> m CInt
threadID :: MonadIO m => m ThreadID
waitThread :: MonadIO m => Ptr Thread -> Ptr CInt -> m ()
condBroadcast :: MonadIO m => Ptr Cond -> m CInt
condSignal :: MonadIO m => Ptr Cond -> m CInt
condWait :: MonadIO m => Ptr Cond -> Ptr Mutex -> m CInt
condWaitTimeout :: MonadIO m => Ptr Cond -> Ptr Mutex -> Word32 -> m CInt
createCond :: MonadIO m => m (Ptr Cond)
createMutex :: MonadIO m => m (Ptr Mutex)
createSemaphore :: MonadIO m => Word32 -> m (Ptr Sem)
destroyCond :: MonadIO m => Ptr Cond -> m ()
destroyMutex :: MonadIO m => Ptr Mutex -> m ()
destroySemaphore :: MonadIO m => Ptr Sem -> m ()
lockMutex :: MonadIO m => Ptr Mutex -> m CInt
semPost :: MonadIO m => Ptr Sem -> m CInt
semTryWait :: MonadIO m => Ptr Sem -> m CInt
semValue :: MonadIO m => Ptr Sem -> m Word32
semWait :: MonadIO m => Ptr Sem -> m CInt
semWaitTimeout :: MonadIO m => Ptr Sem -> Word32 -> m CInt
tryLockMutex :: MonadIO m => Ptr Mutex -> m CInt
unlockMutex :: MonadIO m => Ptr Mutex -> m CInt
atomicAdd :: MonadIO m => Ptr Atomic -> CInt -> m CInt
atomicCAS :: MonadIO m => Ptr Atomic -> CInt -> CInt -> m Bool
atomicCASPtr :: MonadIO m => Ptr (Ptr ()) -> Ptr () -> Ptr () -> m Bool
atomicDecRef :: Ptr Atomic -> IO Bool
atomicGet :: MonadIO m => Ptr Atomic -> m CInt
atomicGetPtr :: MonadIO m => Ptr (Ptr ()) -> m (Ptr ())
atomicIncRef :: Ptr Atomic -> IO CInt
atomicLock :: MonadIO m => Ptr SpinLock -> m ()
atomicSet :: MonadIO m => Ptr Atomic -> CInt -> m CInt
atomicSetPtr :: MonadIO m => Ptr (Ptr ()) -> Ptr () -> m (Ptr ())
atomicTryLock :: MonadIO m => Ptr SpinLock -> m Bool
atomicUnlock :: MonadIO m => Ptr SpinLock -> m ()

module SDL.Raw.Haptic
hapticClose :: MonadIO m => Haptic -> m ()
hapticDestroyEffect :: MonadIO m => Haptic -> CInt -> m ()
hapticEffectSupported :: MonadIO m => Haptic -> Ptr HapticEffect -> m CInt
hapticGetEffectStatus :: MonadIO m => Haptic -> CInt -> m CInt
hapticIndex :: MonadIO m => Haptic -> m CInt
hapticName :: MonadIO m => CInt -> m CString
hapticNewEffect :: MonadIO m => Haptic -> Ptr HapticEffect -> m CInt
hapticNumAxes :: MonadIO m => Haptic -> m CInt
hapticNumEffects :: MonadIO m => Haptic -> m CInt
hapticNumEffectsPlaying :: MonadIO m => Haptic -> m CInt
hapticOpen :: MonadIO m => CInt -> m Haptic
hapticOpenFromJoystick :: MonadIO m => Joystick -> m Haptic
hapticOpenFromMouse :: MonadIO m => m Haptic
hapticOpened :: MonadIO m => CInt -> m CInt
hapticPause :: MonadIO m => Haptic -> m CInt
hapticQuery :: MonadIO m => Haptic -> m CUInt
hapticRumbleInit :: MonadIO m => Haptic -> m CInt
hapticRumblePlay :: MonadIO m => Haptic -> CFloat -> Word32 -> m CInt
hapticRumbleStop :: MonadIO m => Haptic -> m CInt
hapticRumbleSupported :: MonadIO m => Haptic -> m CInt
hapticRunEffect :: MonadIO m => Haptic -> CInt -> Word32 -> m CInt
hapticSetAutocenter :: MonadIO m => Haptic -> CInt -> m CInt
hapticSetGain :: MonadIO m => Haptic -> CInt -> m CInt
hapticStopAll :: MonadIO m => Haptic -> m CInt
hapticStopEffect :: MonadIO m => Haptic -> CInt -> m CInt
hapticUnpause :: MonadIO m => Haptic -> m CInt
hapticUpdateEffect :: MonadIO m => Haptic -> CInt -> Ptr HapticEffect -> m CInt
joystickIsHaptic :: MonadIO m => Joystick -> m CInt
mouseIsHaptic :: MonadIO m => m CInt
numHaptics :: MonadIO m => m CInt

module SDL.Raw.Filesystem
getBasePath :: MonadIO m => m CString
getPrefPath :: MonadIO m => CString -> CString -> m CString
allocRW :: MonadIO m => m (Ptr RWops)
freeRW :: MonadIO m => Ptr RWops -> m ()
rwFromConstMem :: MonadIO m => Ptr () -> CInt -> m (Ptr RWops)
rwFromFP :: MonadIO m => Ptr () -> Bool -> m (Ptr RWops)
rwFromFile :: MonadIO m => CString -> CString -> m (Ptr RWops)
rwFromMem :: MonadIO m => Ptr () -> CInt -> m (Ptr RWops)
rwClose :: MonadIO m => Ptr RWops -> m CInt
rwRead :: MonadIO m => Ptr RWops -> Ptr () -> CSize -> CSize -> m CSize
rwSeek :: MonadIO m => Ptr RWops -> Int64 -> CInt -> m Int64
rwTell :: MonadIO m => Ptr RWops -> m Int64
rwWrite :: MonadIO m => Ptr RWops -> Ptr () -> CSize -> CSize -> m CSize
readBE16 :: MonadIO m => Ptr RWops -> m Word16
readBE32 :: MonadIO m => Ptr RWops -> m Word32
readBE64 :: MonadIO m => Ptr RWops -> m Word64
readLE16 :: MonadIO m => Ptr RWops -> m Word16
readLE32 :: MonadIO m => Ptr RWops -> m Word32
readLE64 :: MonadIO m => Ptr RWops -> m Word64
writeBE16 :: MonadIO m => Ptr RWops -> Word16 -> m CSize
writeBE32 :: MonadIO m => Ptr RWops -> Word32 -> m CSize
writeBE64 :: MonadIO m => Ptr RWops -> Word64 -> m CSize
writeLE16 :: MonadIO m => Ptr RWops -> Word16 -> m CSize
writeLE32 :: MonadIO m => Ptr RWops -> Word32 -> m CSize
writeLE64 :: MonadIO m => Ptr RWops -> Word64 -> m CSize

module SDL.Raw.Event
addEventWatch :: MonadIO m => EventFilter -> Ptr () -> m ()
delEventWatch :: MonadIO m => EventFilter -> Ptr () -> m ()
eventState :: MonadIO m => Word32 -> CInt -> m Word8
filterEvents :: MonadIO m => EventFilter -> Ptr () -> m ()
flushEvent :: MonadIO m => Word32 -> m ()
flushEvents :: MonadIO m => Word32 -> Word32 -> m ()
getEventFilter :: MonadIO m => Ptr EventFilter -> Ptr (Ptr ()) -> m Bool
getNumTouchDevices :: MonadIO m => m CInt
getNumTouchFingers :: MonadIO m => TouchID -> m CInt
getTouchDevice :: MonadIO m => CInt -> m TouchID
getTouchFinger :: MonadIO m => TouchID -> CInt -> m (Ptr Finger)
hasEvent :: MonadIO m => Word32 -> m Bool
hasEvents :: MonadIO m => Word32 -> Word32 -> m Bool
loadDollarTemplates :: MonadIO m => TouchID -> Ptr RWops -> m CInt
peepEvents :: MonadIO m => Ptr Event -> CInt -> EventAction -> Word32 -> Word32 -> m CInt
pollEvent :: MonadIO m => Ptr Event -> m CInt
pumpEvents :: MonadIO m => m ()
pushEvent :: MonadIO m => Ptr Event -> m CInt
quitRequested :: MonadIO m => m Bool
recordGesture :: MonadIO m => TouchID -> m CInt
registerEvents :: MonadIO m => CInt -> m Word32
saveAllDollarTemplates :: MonadIO m => Ptr RWops -> m CInt
saveDollarTemplate :: MonadIO m => GestureID -> Ptr RWops -> m CInt
setEventFilter :: MonadIO m => EventFilter -> Ptr () -> m ()
waitEvent :: MonadIO m => Ptr Event -> m CInt
waitEventTimeout :: MonadIO m => Ptr Event -> CInt -> m CInt
getKeyFromName :: MonadIO m => CString -> m Keycode
getKeyFromScancode :: MonadIO m => Scancode -> m Keycode
getKeyName :: MonadIO m => Keycode -> m CString
getKeyboardFocus :: MonadIO m => m Window
getKeyboardState :: MonadIO m => Ptr CInt -> m (Ptr Word8)
getModState :: MonadIO m => m Keymod
getScancodeFromKey :: MonadIO m => Keycode -> m Scancode
getScancodeFromName :: MonadIO m => CString -> m Scancode
getScancodeName :: MonadIO m => Scancode -> m CString
hasScreenKeyboardSupport :: MonadIO m => m Bool
isScreenKeyboardShown :: MonadIO m => Window -> m Bool
isTextInputActive :: MonadIO m => m Bool
setModState :: MonadIO m => Keymod -> m ()
setTextInputRect :: MonadIO m => Ptr Rect -> m ()
startTextInput :: MonadIO m => m ()
stopTextInput :: MonadIO m => m ()
captureMouse :: MonadIO m => Bool -> m CInt
createColorCursor :: MonadIO m => Ptr Surface -> CInt -> CInt -> m Cursor
createCursor :: MonadIO m => Ptr Word8 -> Ptr Word8 -> CInt -> CInt -> CInt -> CInt -> m Cursor
createSystemCursor :: MonadIO m => SystemCursor -> m Cursor
freeCursor :: MonadIO m => Cursor -> m ()
getCursor :: MonadIO m => m Cursor
getDefaultCursor :: MonadIO m => m Cursor
getGlobalMouseState :: MonadIO m => Ptr CInt -> Ptr CInt -> m Word32
getMouseFocus :: MonadIO m => m Window
getMouseState :: MonadIO m => Ptr CInt -> Ptr CInt -> m Word32
getRelativeMouseMode :: MonadIO m => m Bool
getRelativeMouseState :: MonadIO m => Ptr CInt -> Ptr CInt -> m Word32
setCursor :: MonadIO m => Cursor -> m ()
setRelativeMouseMode :: MonadIO m => Bool -> m CInt
showCursor :: MonadIO m => CInt -> m CInt
warpMouseGlobal :: MonadIO m => CInt -> CInt -> m CInt
warpMouseInWindow :: MonadIO m => Window -> CInt -> CInt -> m ()
joystickClose :: MonadIO m => Joystick -> m ()
joystickCurrentPowerLevel :: MonadIO m => Joystick -> m JoystickPowerLevel
joystickEventState :: MonadIO m => CInt -> m CInt
joystickFromInstanceID :: MonadIO m => JoystickID -> m Joystick
joystickGetAttached :: MonadIO m => Joystick -> m Bool
joystickGetAxis :: MonadIO m => Joystick -> CInt -> m Int16
joystickGetBall :: MonadIO m => Joystick -> CInt -> Ptr CInt -> Ptr CInt -> m CInt
joystickGetButton :: MonadIO m => Joystick -> CInt -> m Word8
joystickGetDeviceGUID :: MonadIO m => CInt -> m JoystickGUID
joystickGetGUID :: MonadIO m => Joystick -> m JoystickGUID
joystickGetGUIDFromString :: MonadIO m => CString -> m JoystickGUID
joystickGetGUIDString :: MonadIO m => JoystickGUID -> CString -> CInt -> m ()
joystickGetHat :: MonadIO m => Joystick -> CInt -> m Word8
joystickInstanceID :: MonadIO m => Joystick -> m JoystickID
joystickName :: MonadIO m => Joystick -> m CString
joystickNameForIndex :: MonadIO m => CInt -> m CString
joystickNumAxes :: MonadIO m => Joystick -> m CInt
joystickNumBalls :: MonadIO m => Joystick -> m CInt
joystickNumButtons :: MonadIO m => Joystick -> m CInt
joystickNumHats :: MonadIO m => Joystick -> m CInt
joystickOpen :: MonadIO m => CInt -> m Joystick
joystickUpdate :: MonadIO m => m ()
numJoysticks :: MonadIO m => m CInt
gameControllerAddMapping :: MonadIO m => CString -> m CInt
gameControllerAddMappingsFromFile :: MonadIO m => CString -> m CInt
gameControllerAddMappingsFromRW :: MonadIO m => Ptr RWops -> CInt -> m CInt
gameControllerClose :: MonadIO m => GameController -> m ()
gameControllerEventState :: MonadIO m => CInt -> m CInt
gameControllerFromInstanceID :: MonadIO m => JoystickID -> m GameController
gameControllerGetAttached :: MonadIO m => GameController -> m Bool
gameControllerGetAxis :: MonadIO m => GameController -> GameControllerAxis -> m Int16
gameControllerGetAxisFromString :: MonadIO m => CString -> m GameControllerAxis
gameControllerGetBindForAxis :: MonadIO m => GameController -> GameControllerAxis -> m GameControllerButtonBind
gameControllerGetBindForButton :: MonadIO m => GameController -> GameControllerButton -> m GameControllerButtonBind
gameControllerGetButton :: MonadIO m => GameController -> GameControllerButton -> m Word8
gameControllerGetButtonFromString :: MonadIO m => CString -> m GameControllerButton
gameControllerGetJoystick :: MonadIO m => GameController -> m Joystick
gameControllerGetStringForAxis :: MonadIO m => GameControllerAxis -> m CString
gameControllerGetStringForButton :: MonadIO m => GameControllerButton -> m CString
gameControllerMapping :: MonadIO m => GameController -> m CString
gameControllerMappingForGUID :: MonadIO m => JoystickGUID -> m CString
gameControllerName :: MonadIO m => GameController -> m CString
gameControllerNameForIndex :: MonadIO m => CInt -> m CString
gameControllerOpen :: MonadIO m => CInt -> m GameController
gameControllerUpdate :: MonadIO m => m ()
isGameController :: MonadIO m => CInt -> m Bool

module SDL.Raw.Basic
init :: MonadIO m => InitFlag -> m CInt
initSubSystem :: MonadIO m => InitFlag -> m CInt
quit :: MonadIO m => m ()
quitSubSystem :: MonadIO m => InitFlag -> m ()
setMainReady :: MonadIO m => m ()
wasInit :: MonadIO m => InitFlag -> m InitFlag
free :: MonadIO m => Ptr () -> m ()
addHintCallback :: MonadIO m => CString -> HintCallback -> Ptr () -> m ()
clearHints :: MonadIO m => m ()
delHintCallback :: MonadIO m => CString -> HintCallback -> Ptr () -> m ()
getHint :: MonadIO m => CString -> m CString
setHint :: MonadIO m => CString -> CString -> m Bool
setHintWithPriority :: MonadIO m => CString -> CString -> HintPriority -> m Bool
log :: CString -> IO ()
logCritical :: CInt -> CString -> IO ()
logDebug :: CInt -> CString -> IO ()
logError :: CInt -> CString -> IO ()
logGetOutputFunction :: MonadIO m => Ptr LogOutputFunction -> Ptr (Ptr ()) -> m ()
logGetPriority :: MonadIO m => CInt -> m LogPriority
logInfo :: CInt -> CString -> IO ()
logMessage :: MonadIO m => CInt -> LogPriority -> CString -> m ()
logResetPriorities :: MonadIO m => m ()
logSetAllPriority :: MonadIO m => LogPriority -> m ()
logSetOutputFunction :: MonadIO m => LogOutputFunction -> Ptr () -> m ()
logSetPriority :: MonadIO m => CInt -> LogPriority -> m ()
logVerbose :: CInt -> CString -> IO ()
logWarn :: CInt -> CString -> IO ()
getRevision :: MonadIO m => m CString
getRevisionNumber :: MonadIO m => m CInt
getVersion :: MonadIO m => Ptr Version -> m ()

module SDL.Raw.Audio
audioInit :: MonadIO m => CString -> m CInt
audioQuit :: MonadIO m => m ()
buildAudioCVT :: MonadIO m => Ptr AudioCVT -> AudioFormat -> Word8 -> CInt -> AudioFormat -> Word8 -> CInt -> m CInt
clearQueuedAudio :: MonadIO m => AudioDeviceID -> m ()
closeAudio :: MonadIO m => m ()
closeAudioDevice :: MonadIO m => AudioDeviceID -> m ()
convertAudio :: MonadIO m => Ptr AudioCVT -> m CInt
freeWAV :: MonadIO m => Ptr Word8 -> m ()
getAudioDeviceName :: MonadIO m => CInt -> CInt -> m CString
getAudioDeviceStatus :: MonadIO m => AudioDeviceID -> m AudioStatus
getAudioDriver :: MonadIO m => CInt -> m CString
getAudioStatus :: MonadIO m => m AudioStatus
getCurrentAudioDriver :: MonadIO m => m CString
getNumAudioDevices :: MonadIO m => CInt -> m CInt
getNumAudioDrivers :: MonadIO m => m CInt
getQueuedAudioSize :: MonadIO m => AudioDeviceID -> m Word32
loadWAV :: MonadIO m => CString -> Ptr AudioSpec -> Ptr (Ptr Word8) -> Ptr Word32 -> m (Ptr AudioSpec)
loadWAV_RW :: MonadIO m => Ptr RWops -> CInt -> Ptr AudioSpec -> Ptr (Ptr Word8) -> Ptr Word32 -> m (Ptr AudioSpec)
lockAudio :: MonadIO m => m ()
lockAudioDevice :: MonadIO m => AudioDeviceID -> m ()
mixAudio :: MonadIO m => Ptr Word8 -> Ptr Word8 -> Word32 -> CInt -> m ()
mixAudioFormat :: MonadIO m => Ptr Word8 -> Ptr Word8 -> AudioFormat -> Word32 -> CInt -> m ()
openAudio :: MonadIO m => Ptr AudioSpec -> Ptr AudioSpec -> m CInt
openAudioDevice :: MonadIO m => CString -> CInt -> Ptr AudioSpec -> Ptr AudioSpec -> CInt -> m AudioDeviceID
pauseAudio :: MonadIO m => CInt -> m ()
pauseAudioDevice :: MonadIO m => AudioDeviceID -> CInt -> m ()
queueAudio :: MonadIO m => AudioDeviceID -> Ptr () -> Word32 -> m CInt
unlockAudio :: MonadIO m => m ()
unlockAudioDevice :: MonadIO m => AudioDeviceID -> m ()

module SDL.Raw.Video
createWindow :: MonadIO m => CString -> CInt -> CInt -> CInt -> CInt -> Word32 -> m Window
createWindowAndRenderer :: MonadIO m => CInt -> CInt -> Word32 -> Ptr Window -> Ptr Renderer -> m CInt
createWindowFrom :: MonadIO m => Ptr () -> m Window
destroyWindow :: MonadIO m => Window -> m ()
disableScreenSaver :: MonadIO m => m ()
enableScreenSaver :: MonadIO m => m ()
glBindTexture :: MonadIO m => Texture -> Ptr CFloat -> Ptr CFloat -> m CInt
glCreateContext :: MonadIO m => Window -> m GLContext
glDeleteContext :: MonadIO m => GLContext -> m ()
glExtensionSupported :: MonadIO m => CString -> m Bool
glGetAttribute :: MonadIO m => GLattr -> Ptr CInt -> m CInt
glGetCurrentContext :: MonadIO m => m GLContext
glGetCurrentWindow :: MonadIO m => m Window
glGetDrawableSize :: MonadIO m => Window -> Ptr CInt -> Ptr CInt -> m ()
glGetProcAddress :: MonadIO m => CString -> m (Ptr ())
glGetSwapInterval :: MonadIO m => m CInt
glLoadLibrary :: MonadIO m => CString -> m CInt
glMakeCurrent :: MonadIO m => Window -> GLContext -> m CInt
glResetAttributes :: MonadIO m => m ()
glSetAttribute :: MonadIO m => GLattr -> CInt -> m CInt
glSetSwapInterval :: MonadIO m => CInt -> m CInt
glSwapWindow :: MonadIO m => Window -> m ()
glUnbindTexture :: MonadIO m => Texture -> m CInt
glUnloadLibrary :: MonadIO m => m ()
getClosestDisplayMode :: MonadIO m => CInt -> Ptr DisplayMode -> Ptr DisplayMode -> m (Ptr DisplayMode)
getCurrentDisplayMode :: MonadIO m => CInt -> Ptr DisplayMode -> m CInt
getCurrentVideoDriver :: MonadIO m => m CString
getDesktopDisplayMode :: MonadIO m => CInt -> Ptr DisplayMode -> m CInt
getDisplayBounds :: MonadIO m => CInt -> Ptr Rect -> m CInt
getDisplayDPI :: MonadIO m => CInt -> Ptr CFloat -> Ptr CFloat -> Ptr CFloat -> m CInt
getDisplayMode :: MonadIO m => CInt -> CInt -> Ptr DisplayMode -> m CInt
getDisplayName :: MonadIO m => CInt -> m CString
getGrabbedWindow :: MonadIO m => m Window
getNumDisplayModes :: MonadIO m => CInt -> m CInt
getNumVideoDisplays :: MonadIO m => m CInt
getNumVideoDrivers :: MonadIO m => m CInt
getVideoDriver :: MonadIO m => CInt -> m CString
getWindowBrightness :: MonadIO m => Window -> m CFloat
getWindowData :: MonadIO m => Window -> CString -> m (Ptr ())
getWindowDisplayIndex :: MonadIO m => Window -> m CInt
getWindowDisplayMode :: MonadIO m => Window -> Ptr DisplayMode -> m CInt
getWindowFlags :: MonadIO m => Window -> m Word32
getWindowFromID :: MonadIO m => Word32 -> m Window
getWindowGammaRamp :: MonadIO m => Window -> Ptr Word16 -> Ptr Word16 -> Ptr Word16 -> m CInt
getWindowGrab :: MonadIO m => Window -> m Bool
getWindowID :: MonadIO m => Window -> m Word32
getWindowMaximumSize :: MonadIO m => Window -> Ptr CInt -> Ptr CInt -> m ()
getWindowMinimumSize :: MonadIO m => Window -> Ptr CInt -> Ptr CInt -> m ()
getWindowPixelFormat :: MonadIO m => Window -> m Word32
getWindowPosition :: MonadIO m => Window -> Ptr CInt -> Ptr CInt -> m ()
getWindowSize :: MonadIO m => Window -> Ptr CInt -> Ptr CInt -> m ()
getWindowSurface :: MonadIO m => Window -> m (Ptr Surface)
getWindowTitle :: MonadIO m => Window -> m CString
hideWindow :: MonadIO m => Window -> m ()
isScreenSaverEnabled :: MonadIO m => m Bool
maximizeWindow :: MonadIO m => Window -> m ()
minimizeWindow :: MonadIO m => Window -> m ()
raiseWindow :: MonadIO m => Window -> m ()
restoreWindow :: MonadIO m => Window -> m ()
setWindowBordered :: MonadIO m => Window -> Bool -> m ()
setWindowBrightness :: MonadIO m => Window -> CFloat -> m CInt
setWindowData :: MonadIO m => Window -> CString -> Ptr () -> m (Ptr ())
setWindowDisplayMode :: MonadIO m => Window -> Ptr DisplayMode -> m CInt
setWindowFullscreen :: MonadIO m => Window -> Word32 -> m CInt
setWindowGammaRamp :: MonadIO m => Window -> Ptr Word16 -> Ptr Word16 -> Ptr Word16 -> m CInt
setWindowGrab :: MonadIO m => Window -> Bool -> m ()
setWindowIcon :: MonadIO m => Window -> Ptr Surface -> m ()
setWindowMaximumSize :: MonadIO m => Window -> CInt -> CInt -> m ()
setWindowMinimumSize :: MonadIO m => Window -> CInt -> CInt -> m ()
setWindowPosition :: MonadIO m => Window -> CInt -> CInt -> m ()
setWindowSize :: MonadIO m => Window -> CInt -> CInt -> m ()
setWindowTitle :: MonadIO m => Window -> CString -> m ()
showMessageBox :: MonadIO m => Ptr MessageBoxData -> Ptr CInt -> m CInt
showSimpleMessageBox :: MonadIO m => Word32 -> CString -> CString -> Window -> m CInt
showWindow :: MonadIO m => Window -> m ()
updateWindowSurface :: MonadIO m => Window -> m CInt
updateWindowSurfaceRects :: MonadIO m => Window -> Ptr Rect -> CInt -> m CInt
videoInit :: MonadIO m => CString -> m CInt
videoQuit :: MonadIO m => m ()
createRenderer :: MonadIO m => Window -> CInt -> Word32 -> m Renderer
createSoftwareRenderer :: MonadIO m => Ptr Surface -> m Renderer
createTexture :: MonadIO m => Renderer -> Word32 -> CInt -> CInt -> CInt -> m Texture
createTextureFromSurface :: MonadIO m => Renderer -> Ptr Surface -> m Texture
destroyRenderer :: MonadIO m => Renderer -> m ()
destroyTexture :: MonadIO m => Texture -> m ()
getNumRenderDrivers :: MonadIO m => m CInt
getRenderDrawBlendMode :: MonadIO m => Renderer -> Ptr BlendMode -> m Int
getRenderDrawColor :: MonadIO m => Renderer -> Ptr Word8 -> Ptr Word8 -> Ptr Word8 -> Ptr Word8 -> m CInt
getRenderDriverInfo :: MonadIO m => CInt -> Ptr RendererInfo -> m CInt
getRenderTarget :: MonadIO m => Renderer -> m Texture
getRenderer :: MonadIO m => Window -> m Renderer
getRendererInfo :: MonadIO m => Renderer -> Ptr RendererInfo -> m CInt
getRendererOutputSize :: MonadIO m => Renderer -> Ptr CInt -> Ptr CInt -> m CInt
getTextureAlphaMod :: MonadIO m => Texture -> Ptr Word8 -> m CInt
getTextureBlendMode :: MonadIO m => Texture -> Ptr BlendMode -> m CInt
getTextureColorMod :: MonadIO m => Texture -> Ptr Word8 -> Ptr Word8 -> Ptr Word8 -> m CInt
lockTexture :: MonadIO m => Texture -> Ptr Rect -> Ptr (Ptr ()) -> Ptr CInt -> m CInt
queryTexture :: MonadIO m => Texture -> Ptr Word32 -> Ptr CInt -> Ptr CInt -> Ptr CInt -> m CInt
renderClear :: MonadIO m => Renderer -> m CInt
renderCopy :: MonadIO m => Renderer -> Texture -> Ptr Rect -> Ptr Rect -> m CInt
renderCopyEx :: MonadIO m => Renderer -> Texture -> Ptr Rect -> Ptr Rect -> CDouble -> Ptr Point -> RendererFlip -> m CInt
renderDrawLine :: MonadIO m => Renderer -> CInt -> CInt -> CInt -> CInt -> m CInt
renderDrawLines :: MonadIO m => Renderer -> Ptr Point -> CInt -> m CInt
renderDrawPoint :: MonadIO m => Renderer -> CInt -> CInt -> m CInt
renderDrawPoints :: MonadIO m => Renderer -> Ptr Point -> CInt -> m CInt
renderDrawRect :: MonadIO m => Renderer -> Ptr Rect -> m CInt
renderDrawRects :: MonadIO m => Renderer -> Ptr Rect -> CInt -> m CInt
renderFillRect :: MonadIO m => Renderer -> Ptr Rect -> m CInt
renderFillRectEx :: MonadIO m => Renderer -> CInt -> CInt -> CInt -> CInt -> m CInt
renderFillRects :: MonadIO m => Renderer -> Ptr Rect -> CInt -> m CInt
renderGetClipRect :: MonadIO m => Renderer -> Ptr Rect -> m ()
renderGetLogicalSize :: MonadIO m => Renderer -> Ptr CInt -> Ptr CInt -> m ()
renderGetScale :: MonadIO m => Renderer -> Ptr CFloat -> Ptr CFloat -> m ()
renderGetViewport :: MonadIO m => Renderer -> Ptr Rect -> m ()
renderIsClipEnabled :: MonadIO m => Renderer -> m Bool
renderPresent :: MonadIO m => Renderer -> m ()
renderReadPixels :: MonadIO m => Renderer -> Ptr Rect -> Word32 -> Ptr () -> CInt -> m CInt
renderSetClipRect :: MonadIO m => Renderer -> Ptr Rect -> m CInt
renderSetLogicalSize :: MonadIO m => Renderer -> CInt -> CInt -> m CInt
renderSetScale :: MonadIO m => Renderer -> CFloat -> CFloat -> m CInt
renderSetViewport :: MonadIO m => Renderer -> Ptr Rect -> m CInt
renderTargetSupported :: MonadIO m => Renderer -> m Bool
setRenderDrawBlendMode :: MonadIO m => Renderer -> BlendMode -> m CInt
setRenderDrawColor :: MonadIO m => Renderer -> Word8 -> Word8 -> Word8 -> Word8 -> m CInt
setRenderTarget :: MonadIO m => Renderer -> Texture -> m CInt
setTextureAlphaMod :: MonadIO m => Texture -> Word8 -> m CInt
setTextureBlendMode :: MonadIO m => Texture -> BlendMode -> m CInt
setTextureColorMod :: MonadIO m => Texture -> Word8 -> Word8 -> Word8 -> m CInt
unlockTexture :: MonadIO m => Texture -> m ()
updateTexture :: MonadIO m => Texture -> Ptr Rect -> Ptr () -> CInt -> m CInt
updateYUVTexture :: MonadIO m => Texture -> Ptr Rect -> Ptr Word8 -> CInt -> Ptr Word8 -> CInt -> Ptr Word8 -> CInt -> m CInt
allocFormat :: MonadIO m => Word32 -> m (Ptr PixelFormat)
allocPalette :: MonadIO m => CInt -> m (Ptr Palette)
calculateGammaRamp :: MonadIO m => CFloat -> Ptr Word16 -> m ()
freeFormat :: MonadIO m => Ptr PixelFormat -> m ()
freePalette :: MonadIO m => Ptr Palette -> m ()
getPixelFormatName :: MonadIO m => Word32 -> m CString
getRGB :: MonadIO m => Word32 -> Ptr PixelFormat -> Ptr Word8 -> Ptr Word8 -> Ptr Word8 -> m ()
getRGBA :: MonadIO m => Word32 -> Ptr PixelFormat -> Ptr Word8 -> Ptr Word8 -> Ptr Word8 -> Ptr Word8 -> m ()
mapRGB :: MonadIO m => Ptr PixelFormat -> Word8 -> Word8 -> Word8 -> m Word32
mapRGBA :: MonadIO m => Ptr PixelFormat -> Word8 -> Word8 -> Word8 -> Word8 -> m Word32
masksToPixelFormatEnum :: MonadIO m => CInt -> Word32 -> Word32 -> Word32 -> Word32 -> m Word32
pixelFormatEnumToMasks :: MonadIO m => Word32 -> Ptr CInt -> Ptr Word32 -> Ptr Word32 -> Ptr Word32 -> Ptr Word32 -> m Bool
setPaletteColors :: MonadIO m => Ptr Palette -> Ptr Color -> CInt -> CInt -> m CInt
setPixelFormatPalette :: MonadIO m => Ptr PixelFormat -> Ptr Palette -> m CInt
enclosePoints :: MonadIO m => Ptr Point -> CInt -> Ptr Rect -> Ptr Rect -> m Bool
hasIntersection :: MonadIO m => Ptr Rect -> Ptr Rect -> m Bool
intersectRect :: MonadIO m => Ptr Rect -> Ptr Rect -> Ptr Rect -> m Bool
intersectRectAndLine :: MonadIO m => Ptr Rect -> Ptr CInt -> Ptr CInt -> Ptr CInt -> Ptr CInt -> m Bool
unionRect :: MonadIO m => Ptr Rect -> Ptr Rect -> Ptr Rect -> m ()
blitScaled :: MonadIO m => Ptr Surface -> Ptr Rect -> Ptr Surface -> Ptr Rect -> m CInt
blitSurface :: MonadIO m => Ptr Surface -> Ptr Rect -> Ptr Surface -> Ptr Rect -> m CInt
convertPixels :: MonadIO m => CInt -> CInt -> Word32 -> Ptr () -> CInt -> Word32 -> Ptr () -> CInt -> m CInt
convertSurface :: MonadIO m => Ptr Surface -> Ptr PixelFormat -> Word32 -> m (Ptr Surface)
convertSurfaceFormat :: MonadIO m => Ptr Surface -> Word32 -> Word32 -> m (Ptr Surface)
createRGBSurface :: MonadIO m => Word32 -> CInt -> CInt -> CInt -> Word32 -> Word32 -> Word32 -> Word32 -> m (Ptr Surface)
createRGBSurfaceFrom :: MonadIO m => Ptr () -> CInt -> CInt -> CInt -> CInt -> Word32 -> Word32 -> Word32 -> Word32 -> m (Ptr Surface)
fillRect :: MonadIO m => Ptr Surface -> Ptr Rect -> Word32 -> m CInt
fillRects :: MonadIO m => Ptr Surface -> Ptr Rect -> CInt -> Word32 -> m CInt
freeSurface :: MonadIO m => Ptr Surface -> m ()
getClipRect :: MonadIO m => Ptr Surface -> Ptr Rect -> m ()
getColorKey :: MonadIO m => Ptr Surface -> Ptr Word32 -> m CInt
getSurfaceAlphaMod :: MonadIO m => Ptr Surface -> Ptr Word8 -> m CInt
getSurfaceBlendMode :: MonadIO m => Ptr Surface -> Ptr BlendMode -> m CInt
getSurfaceColorMod :: MonadIO m => Ptr Surface -> Ptr Word8 -> Ptr Word8 -> Ptr Word8 -> m CInt
loadBMP :: MonadIO m => CString -> m (Ptr Surface)
loadBMP_RW :: MonadIO m => Ptr RWops -> CInt -> m (Ptr Surface)
lockSurface :: MonadIO m => Ptr Surface -> m CInt
lowerBlit :: MonadIO m => Ptr Surface -> Ptr Rect -> Ptr Surface -> Ptr Rect -> m CInt
lowerBlitScaled :: MonadIO m => Ptr Surface -> Ptr Rect -> Ptr Surface -> Ptr Rect -> m CInt
saveBMP :: MonadIO m => Ptr Surface -> CString -> m CInt
saveBMP_RW :: MonadIO m => Ptr Surface -> Ptr RWops -> CInt -> m CInt
setClipRect :: MonadIO m => Ptr Surface -> Ptr Rect -> m Bool
setColorKey :: MonadIO m => Ptr Surface -> CInt -> Word32 -> m CInt
setSurfaceAlphaMod :: MonadIO m => Ptr Surface -> Word8 -> m CInt
setSurfaceBlendMode :: MonadIO m => Ptr Surface -> BlendMode -> m CInt
setSurfaceColorMod :: MonadIO m => Ptr Surface -> Word8 -> Word8 -> Word8 -> m CInt
setSurfacePalette :: MonadIO m => Ptr Surface -> Ptr Palette -> m CInt
setSurfaceRLE :: MonadIO m => Ptr Surface -> CInt -> m CInt
unlockSurface :: MonadIO m => Ptr Surface -> m ()
getWindowWMInfo :: MonadIO m => Window -> SysWMinfo -> m Bool
getClipboardText :: MonadIO m => m CString
hasClipboardText :: MonadIO m => m Bool
setClipboardText :: MonadIO m => CString -> m CInt


-- | Raw low-level FFI bindings to the sdl2 C library. Ease of use is not a
--   design factor, use <a>SDL</a> instead if you can.
module SDL.Raw

module SDL.Power

-- | Current power supply details.
--   
--   Throws <tt>SDLException</tt> if the current power state can not be
--   determined.
--   
--   See <tt><a>SDL_GetPowerInfo</a></tt> for C documentation.
getPowerInfo :: (Functor m, MonadIO m) => m PowerState

-- | Information about the power supply for the user's environment
data PowerState

-- | The user is on a battery powered device. See <a>BatteryState</a> for
--   charge information, and <a>Charge</a> for charge information
Battery :: BatteryState -> Charge -> PowerState

-- | The user is on a device connected to the mains.
Mains :: PowerState

-- | SDL could not determine the power for the device.
UnknownPowerState :: PowerState

-- | Information on battery consumption for battery powered devices
data BatteryState

-- | The battery is currently being drained.
Draining :: BatteryState

-- | The battery is fully charged.
Charged :: BatteryState

-- | The device is plugged in and the battery is charging.
Charging :: BatteryState

-- | Information about how much charge a battery has.
data Charge
Charge :: Maybe CInt -> Maybe CInt -> Charge

-- | How many seconds of battery life is left
[chargeSecondsLeft] :: Charge -> Maybe CInt

-- | The percentage of battery charged
[chargePercent] :: Charge -> Maybe CInt
instance GHC.Show.Show SDL.Power.PowerState
instance GHC.Read.Read SDL.Power.PowerState
instance GHC.Classes.Ord SDL.Power.PowerState
instance GHC.Generics.Generic SDL.Power.PowerState
instance GHC.Classes.Eq SDL.Power.PowerState
instance GHC.Show.Show SDL.Power.Charge
instance GHC.Read.Read SDL.Power.Charge
instance GHC.Classes.Ord SDL.Power.Charge
instance GHC.Generics.Generic SDL.Power.Charge
instance GHC.Classes.Eq SDL.Power.Charge
instance GHC.Show.Show SDL.Power.BatteryState
instance GHC.Read.Read SDL.Power.BatteryState
instance GHC.Classes.Ord SDL.Power.BatteryState
instance GHC.Generics.Generic SDL.Power.BatteryState
instance GHC.Classes.Eq SDL.Power.BatteryState
instance GHC.Enum.Enum SDL.Power.BatteryState
instance Data.Data.Data SDL.Power.BatteryState
instance GHC.Enum.Bounded SDL.Power.BatteryState

module SDL.Internal.Types
newtype Joystick
Joystick :: Joystick -> Joystick
[joystickPtr] :: Joystick -> Joystick
newtype Window
Window :: (Window) -> Window

-- | An SDL rendering device. This can be created with
--   <a>createRenderer</a>.
newtype Renderer
Renderer :: Renderer -> Renderer
instance GHC.Show.Show SDL.Internal.Types.Renderer
instance GHC.Classes.Ord SDL.Internal.Types.Renderer
instance GHC.Generics.Generic SDL.Internal.Types.Renderer
instance GHC.Classes.Eq SDL.Internal.Types.Renderer
instance Data.Data.Data SDL.Internal.Types.Renderer
instance GHC.Show.Show SDL.Internal.Types.Window
instance GHC.Classes.Ord SDL.Internal.Types.Window
instance GHC.Generics.Generic SDL.Internal.Types.Window
instance GHC.Classes.Eq SDL.Internal.Types.Window
instance Data.Data.Data SDL.Internal.Types.Window
instance GHC.Show.Show SDL.Internal.Types.Joystick
instance GHC.Classes.Ord SDL.Internal.Types.Joystick
instance GHC.Generics.Generic SDL.Internal.Types.Joystick
instance GHC.Classes.Eq SDL.Internal.Types.Joystick
instance Data.Data.Data SDL.Internal.Types.Joystick

module SDL.Input.Keyboard

-- | Get the current key modifier state for the keyboard. The key modifier
--   state is a mask special keys that are held down.
--   
--   See <tt><a>SDL_GetModState</a></tt> for C documentation.
getModState :: (Functor m, MonadIO m) => m KeyModifier

-- | Information about which keys are currently held down. Use
--   <a>getModState</a> to generate this information.
data KeyModifier
KeyModifier :: Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> KeyModifier
[keyModifierLeftShift] :: KeyModifier -> Bool
[keyModifierRightShift] :: KeyModifier -> Bool
[keyModifierLeftCtrl] :: KeyModifier -> Bool
[keyModifierRightCtrl] :: KeyModifier -> Bool
[keyModifierLeftAlt] :: KeyModifier -> Bool
[keyModifierRightAlt] :: KeyModifier -> Bool
[keyModifierLeftGUI] :: KeyModifier -> Bool
[keyModifierRightGUI] :: KeyModifier -> Bool
[keyModifierNumLock] :: KeyModifier -> Bool
[keyModifierCapsLock] :: KeyModifier -> Bool
[keyModifierAltGr] :: KeyModifier -> Bool

-- | Get a snapshot of the current state of the keyboard.
--   
--   This computation generates a mapping from <a>Scancode</a> to
--   <a>Bool</a> - evaluating the function at specific <a>Scancode</a>s
--   will inform you as to whether or not that key was held down when
--   <a>getKeyboardState</a> was called.
--   
--   See <tt><a>SDL_GetKeyboardState</a></tt> for C documentation.
getKeyboardState :: MonadIO m => m (Scancode -> Bool)

-- | Set the rectangle used to type text inputs and start accepting text
--   input events.
--   
--   See <tt><a>SDL_StartTextInput</a></tt> for C documentation.
startTextInput :: MonadIO m => Rect -> m ()

-- | Stop receiving any text input events.
--   
--   See <tt><a>SDL_StopTextInput</a></tt> for C documentation.
stopTextInput :: MonadIO m => m ()

-- | Check whether the platform has screen keyboard support.
--   
--   See <tt><a>SDL_HasScreenKeyboardSupport</a></tt> for C documentation.
hasScreenKeyboardSupport :: MonadIO m => m Bool

-- | Check whether the screen keyboard is shown for the given window.
--   
--   See <tt><a>SDL_IsScreenKeyboardShown</a></tt> for C documentation.
isScreenKeyboardShown :: MonadIO m => Window -> m Bool

-- | Get a human-readable name for a scancode. If the scancode doesn't have
--   a name this function returns the empty string.
--   
--   See <tt><a>SDL_GetScancodeName</a></tt> for C documentation.
getScancodeName :: MonadIO m => Scancode -> m String
newtype Scancode
Scancode :: Word32 -> Scancode
[unwrapScancode] :: Scancode -> Word32
newtype Keycode
Keycode :: Int32 -> Keycode
[unwrapKeycode] :: Keycode -> Int32

-- | Information about a key press or key release event.
data Keysym
Keysym :: Scancode -> Keycode -> KeyModifier -> Keysym

-- | The keyboard <a>Scancode</a>
[keysymScancode] :: Keysym -> Scancode

-- | SDL's virtual key representation for this key
[keysymKeycode] :: Keysym -> Keycode

-- | A set of modifiers that were held at the time this data was generated
[keysymModifier] :: Keysym -> KeyModifier
instance GHC.Show.Show SDL.Input.Keyboard.Keysym
instance GHC.Read.Read SDL.Input.Keyboard.Keysym
instance GHC.Classes.Ord SDL.Input.Keyboard.Keysym
instance GHC.Generics.Generic SDL.Input.Keyboard.Keysym
instance GHC.Classes.Eq SDL.Input.Keyboard.Keysym
instance Data.Data.Data SDL.Input.Keyboard.Keysym
instance GHC.Show.Show SDL.Input.Keyboard.KeyModifier
instance GHC.Generics.Generic SDL.Input.Keyboard.KeyModifier
instance GHC.Read.Read SDL.Input.Keyboard.KeyModifier
instance GHC.Classes.Ord SDL.Input.Keyboard.KeyModifier
instance GHC.Classes.Eq SDL.Input.Keyboard.KeyModifier
instance Data.Data.Data SDL.Input.Keyboard.KeyModifier
instance SDL.Internal.Numbered.FromNumber SDL.Input.Keyboard.KeyModifier GHC.Word.Word32
instance SDL.Internal.Numbered.ToNumber SDL.Input.Keyboard.KeyModifier GHC.Word.Word32

module SDL.Internal.Exception
fromC :: Show a => Text -> Text -> (a -> Maybe b) -> a -> b
getError :: MonadIO m => m Text
throwIf :: MonadIO m => (a -> Bool) -> Text -> Text -> m a -> m a
throwIf_ :: MonadIO m => (a -> Bool) -> Text -> Text -> m a -> m ()
throwIf0 :: (Eq a, MonadIO m, Num a) => Text -> Text -> m a -> m a
throwIfNeg :: (MonadIO m, Num a, Ord a) => Text -> Text -> m a -> m a
throwIfNeg_ :: (MonadIO m, Num a, Ord a) => Text -> Text -> m a -> m ()
throwIfNot0 :: (Eq a, MonadIO m, Num a) => Text -> Text -> m a -> m a
throwIfNot0_ :: (Eq a, MonadIO m, Num a) => Text -> Text -> m a -> m ()
throwIfNull :: (MonadIO m) => Text -> Text -> m (Ptr a) -> m (Ptr a)

module SDL.Filesystem

-- | An absolute path to the application data directory.
--   
--   The path is guaranteed to end with a path separator.
--   
--   Throws <tt>SDLException</tt> on failure, or if the platform does not
--   implement this functionality.
getBasePath :: MonadIO m => m Text

-- | A path to a unique per user and per application directory for the
--   given organization and application name, intended for writing
--   preferences and other personal files.
--   
--   The path is guaranteed to end with a path separator.
--   
--   You should assume the path returned by this function is the only safe
--   place to write files to.
--   
--   Throws <tt>SDLException</tt> on failure.
getPrefPath :: MonadIO m => Text -> Text -> m Text


-- | <a>SDL.Audio</a> provides a high-level API to SDL's audio device
--   capabilities.
module SDL.Audio

-- | An open audio device. These can be created via <a>openAudioDevice</a>
--   and should be closed with <a>closeAudioDevice</a>
data AudioDevice

-- | Attempt to open the closest matching <a>AudioDevice</a>, as specified
--   by the given <a>OpenDeviceSpec</a>.
--   
--   See <tt><a>SDL_OpenAudioDevice</a></tt> for C documentation.
openAudioDevice :: MonadIO m => OpenDeviceSpec -> m (AudioDevice, AudioSpec)

-- | See <tt><a>SDL_CloseAudioDevice</a></tt> for C documentation.
closeAudioDevice :: MonadIO m => AudioDevice -> m ()

-- | A specification to <a>openAudioDevice</a>, indicating the desired
--   output format. Note that many of these properties are
--   <a>Changeable</a>, meaning that you can choose whether or not SDL
--   should interpret your specification as an unbreakable request
--   (<a>Mandate</a>), or as an approximation <a>Desire</a>.
data OpenDeviceSpec
OpenDeviceSpec :: !(Changeable CInt) -> !(Changeable (AudioFormat sampleType)) -> !(Changeable Channels) -> !Word16 -> forall actualSampleType. AudioFormat actualSampleType -> IOVector actualSampleType -> IO () -> !AudioDeviceUsage -> !(Maybe Text) -> OpenDeviceSpec

-- | The output audio frequency in herts.
[openDeviceFreq] :: OpenDeviceSpec -> !(Changeable CInt)

-- | The format of audio that will be sampled from the output buffer.
[openDeviceFormat] :: OpenDeviceSpec -> !(Changeable (AudioFormat sampleType))

-- | The amount of audio channels.
[openDeviceChannels] :: OpenDeviceSpec -> !(Changeable Channels)

-- | Output audio buffer size in samples. This should be a power of 2.
[openDeviceSamples] :: OpenDeviceSpec -> !Word16

-- | A callback to invoke whenever new sample data is required. The
--   callback will be passed a single <a>MVector</a> that must be filled
--   with audio data.
[openDeviceCallback] :: OpenDeviceSpec -> forall actualSampleType. AudioFormat actualSampleType -> IOVector actualSampleType -> IO ()

-- | How you intend to use the opened <a>AudioDevice</a> - either for
--   outputting or capturing audio.
[openDeviceUsage] :: OpenDeviceSpec -> !AudioDeviceUsage

-- | The name of the <a>AudioDevice</a> that should be opened. If
--   <a>Nothing</a>, any suitable <a>AudioDevice</a> will be used.
[openDeviceName] :: OpenDeviceSpec -> !(Maybe Text)

-- | How you intend to use an <a>AudioDevice</a>
data AudioDeviceUsage

-- | The device will be used for sample playback.
ForPlayback :: AudioDeviceUsage

-- | The device will be used for sample capture.
ForCapture :: AudioDeviceUsage

-- | How many channels audio should be played on
data Channels

-- | A single speaker configuration
Mono :: Channels

-- | A traditional left/right stereo system
Stereo :: Channels
Quad :: Channels

-- | <ol>
--   <li>1 surround sound</li>
--   </ol>
FivePointOne :: Channels

-- | Used to indicate to SDL whether it is allowed to open other audio
--   devices (if a property is marked as a <a>Desire</a>) or if it should
--   fail if the device is unavailable (<a>Mandate</a>).
data Changeable a

-- | <a>Mandate</a> this exact property value, and fail if a matching audio
--   device cannot be found.
Mandate :: !a -> Changeable a

-- | <a>Desire</a> this property value, but allow other audio devices to be
--   opened.
Desire :: !a -> Changeable a

-- | Lock an <a>AudioDevice</a> such that its associated callback will not
--   be called until the device is unlocked.
setAudioDeviceLocked :: MonadIO m => AudioDevice -> LockState -> m ()

-- | Whether a device should be locked or unlocked.
data LockState

-- | Lock the device, preventing the callback from producing data.
Locked :: LockState

-- | Unlock the device, resuming calls to the callback.
Unlocked :: LockState

-- | Whether to allow an <a>AudioDevice</a> to play sound or remain paused.
data PlaybackState

-- | Pause the <a>AudioDevice</a>, which will stop producing/capturing
--   audio.
Pause :: PlaybackState

-- | Resume the <a>AudioDevice</a>.
Play :: PlaybackState

-- | Change the playback state of an <a>AudioDevice</a>.
setAudioDevicePlaybackState :: MonadIO m => AudioDevice -> PlaybackState -> m ()

-- | Opened devices are always <a>Playing</a> or <a>Paused</a> in normal
--   circumstances. A failing device may change its status to
--   <a>Stopped</a> at any time, and closing a device will progress to
--   <a>Stopped</a> too.
data AudioDeviceStatus

-- | The <a>AudioDevice</a> is playing.
Playing :: AudioDeviceStatus

-- | The <a>AudioDevice</a> is paused.
Paused :: AudioDeviceStatus

-- | The <a>AudioDevice</a> is stopped.
Stopped :: AudioDeviceStatus

-- | Query the state of an <a>AudioDevice</a>.
audioDeviceStatus :: MonadIO m => AudioDevice -> m AudioDeviceStatus

-- | Information about what format an audio bytestream is. The type
--   variable <tt>t</tt> indicates the type used for audio buffer samples.
--   It is determined by the choice of the provided <tt>SampleBitSize</tt>.
--   For example:
--   
--   <pre>
--   AudioFormat UnsignedInteger Sample8Bit Native :: AudioFormat Word8
--   </pre>
--   
--   Indicating that an 8-bit audio format in the platforms native
--   endianness uses a buffer of <a>Word8</a> values.
data AudioFormat sampleType
[Signed8BitAudio] :: AudioFormat Int8
[Unsigned8BitAudio] :: AudioFormat Word8
[Signed16BitLEAudio] :: AudioFormat Int16
[Signed16BitBEAudio] :: AudioFormat Int16
[Signed16BitNativeAudio] :: AudioFormat Int16
[Unsigned16BitLEAudio] :: AudioFormat Word16
[Unsigned16BitBEAudio] :: AudioFormat Word16
[Unsigned16BitNativeAudio] :: AudioFormat Word16
[Signed32BitLEAudio] :: AudioFormat Int32
[Signed32BitBEAudio] :: AudioFormat Int32
[Signed32BitNativeAudio] :: AudioFormat Int32
[FloatingLEAudio] :: AudioFormat Float
[FloatingBEAudio] :: AudioFormat Float
[FloatingNativeAudio] :: AudioFormat Float

-- | Enumerate all <a>AudioDevice</a>s attached to this system, that can be
--   used as specified by the given <a>AudioDeviceUsage</a>. SDL cannot
--   always guarantee that this list can be produced, in which case
--   <a>Nothing</a> will be returned.
getAudioDeviceNames :: MonadIO m => AudioDeviceUsage -> m (Maybe (Vector Text))

-- | <a>AudioSpec</a> is the concrete specification of how an
--   <a>AudioDevice</a> was sucessfully opened. Unlike
--   <a>OpenDeviceSpec</a>, which specifies what you <i>want</i>,
--   <a>AudioSpec</a> specifies what you <i>have</i>.
data AudioSpec

-- | DSP frequency (samples per second)
audioSpecFreq :: AudioSpec -> CInt

-- | Audio data format
audioSpecFormat :: AudioSpec -> (AudioFormat sampleType)

-- | Number of separate sound channels
audioSpecChannels :: AudioSpec -> Channels

-- | Calculated udio buffer silence value
audioSpecSilence :: AudioSpec -> Word8

-- | Calculated audio buffer size in bytes
audioSpecSize :: AudioSpec -> Word32

-- | The function to call when the audio device needs more data
audioSpecCallback :: AudioSpec -> AudioFormat sampleType -> IOVector sampleType -> IO ()

-- | Obtain a list of all possible audio drivers for this system. These
--   drivers can be used to specificially initialize the audio system.
getAudioDrivers :: MonadIO m => m (Vector AudioDriver)

-- | Query SDL for the name of the currently initialized audio driver, if
--   possible. This will return <a>Nothing</a> if no driver has been
--   initialized.
currentAudioDriver :: MonadIO m => m (Maybe Text)

-- | An abstract description of an audio driver on the host machine.
data AudioDriver

-- | Get the human readable name of an <a>AudioDriver</a>
audioDriverName :: AudioDriver -> Text

-- | Explicitly initialize the audio system against a specific
--   <a>AudioDriver</a>. Note that most users will not need to do this, as
--   the normal initialization routines will already take care of this for
--   you.
audioInit :: MonadIO m => AudioDriver -> m ()
instance GHC.Show.Show SDL.Audio.AudioDriver
instance GHC.Classes.Eq SDL.Audio.AudioDriver
instance GHC.Show.Show SDL.Audio.AudioDeviceStatus
instance GHC.Generics.Generic SDL.Audio.AudioDeviceStatus
instance Data.Data.Data SDL.Audio.AudioDeviceStatus
instance GHC.Read.Read SDL.Audio.AudioDeviceStatus
instance GHC.Classes.Ord SDL.Audio.AudioDeviceStatus
instance GHC.Classes.Eq SDL.Audio.AudioDeviceStatus
instance GHC.Enum.Enum SDL.Audio.AudioDeviceStatus
instance GHC.Enum.Bounded SDL.Audio.AudioDeviceStatus
instance GHC.Show.Show SDL.Audio.PlaybackState
instance GHC.Generics.Generic SDL.Audio.PlaybackState
instance Data.Data.Data SDL.Audio.PlaybackState
instance GHC.Read.Read SDL.Audio.PlaybackState
instance GHC.Classes.Ord SDL.Audio.PlaybackState
instance GHC.Classes.Eq SDL.Audio.PlaybackState
instance GHC.Enum.Enum SDL.Audio.PlaybackState
instance GHC.Enum.Bounded SDL.Audio.PlaybackState
instance GHC.Show.Show SDL.Audio.LockState
instance GHC.Read.Read SDL.Audio.LockState
instance GHC.Classes.Ord SDL.Audio.LockState
instance GHC.Generics.Generic SDL.Audio.LockState
instance GHC.Classes.Eq SDL.Audio.LockState
instance GHC.Enum.Enum SDL.Audio.LockState
instance Data.Data.Data SDL.Audio.LockState
instance GHC.Enum.Bounded SDL.Audio.LockState
instance Data.Traversable.Traversable SDL.Audio.Changeable
instance GHC.Show.Show a => GHC.Show.Show (SDL.Audio.Changeable a)
instance GHC.Read.Read a => GHC.Read.Read (SDL.Audio.Changeable a)
instance GHC.Generics.Generic (SDL.Audio.Changeable a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (SDL.Audio.Changeable a)
instance GHC.Base.Functor SDL.Audio.Changeable
instance Data.Foldable.Foldable SDL.Audio.Changeable
instance Data.Data.Data a => Data.Data.Data (SDL.Audio.Changeable a)
instance GHC.Show.Show SDL.Audio.AudioDeviceUsage
instance GHC.Read.Read SDL.Audio.AudioDeviceUsage
instance GHC.Classes.Ord SDL.Audio.AudioDeviceUsage
instance GHC.Generics.Generic SDL.Audio.AudioDeviceUsage
instance GHC.Classes.Eq SDL.Audio.AudioDeviceUsage
instance GHC.Enum.Enum SDL.Audio.AudioDeviceUsage
instance Data.Data.Data SDL.Audio.AudioDeviceUsage
instance GHC.Enum.Bounded SDL.Audio.AudioDeviceUsage
instance GHC.Show.Show SDL.Audio.Channels
instance GHC.Read.Read SDL.Audio.Channels
instance GHC.Classes.Ord SDL.Audio.Channels
instance GHC.Generics.Generic SDL.Audio.Channels
instance GHC.Classes.Eq SDL.Audio.Channels
instance GHC.Enum.Enum SDL.Audio.Channels
instance Data.Data.Data SDL.Audio.Channels
instance GHC.Enum.Bounded SDL.Audio.Channels
instance GHC.Classes.Eq SDL.Audio.AudioDevice
instance GHC.Classes.Eq (SDL.Audio.AudioFormat sampleType)
instance GHC.Classes.Ord (SDL.Audio.AudioFormat sampleType)
instance GHC.Show.Show (SDL.Audio.AudioFormat sampleType)

module SDL.Input.GameController

-- | Identifies a gamepad button.
data ControllerButton
ControllerButtonInvalid :: ControllerButton
ControllerButtonA :: ControllerButton
ControllerButtonB :: ControllerButton
ControllerButtonX :: ControllerButton
ControllerButtonY :: ControllerButton
ControllerButtonBack :: ControllerButton
ControllerButtonGuide :: ControllerButton
ControllerButtonStart :: ControllerButton
ControllerButtonLeftStick :: ControllerButton
ControllerButtonRightStick :: ControllerButton
ControllerButtonLeftShoulder :: ControllerButton
ControllerButtonRightShoulder :: ControllerButton
ControllerButtonDpadUp :: ControllerButton
ControllerButtonDpadDown :: ControllerButton
ControllerButtonDpadLeft :: ControllerButton
ControllerButtonDpadRight :: ControllerButton

-- | Identifies the state of a controller button.
data ControllerButtonState
ControllerButtonPressed :: ControllerButtonState
ControllerButtonReleased :: ControllerButtonState
ControllerButtonInvalidState :: ControllerButtonState

-- | Identified whether the game controller was added, removed, or
--   remapped.
data ControllerDeviceConnection
ControllerDeviceAdded :: ControllerDeviceConnection
ControllerDeviceRemoved :: ControllerDeviceConnection
ControllerDeviceRemapped :: ControllerDeviceConnection
instance GHC.Show.Show SDL.Input.GameController.ControllerDeviceConnection
instance GHC.Read.Read SDL.Input.GameController.ControllerDeviceConnection
instance GHC.Classes.Ord SDL.Input.GameController.ControllerDeviceConnection
instance GHC.Generics.Generic SDL.Input.GameController.ControllerDeviceConnection
instance GHC.Classes.Eq SDL.Input.GameController.ControllerDeviceConnection
instance Data.Data.Data SDL.Input.GameController.ControllerDeviceConnection
instance GHC.Show.Show SDL.Input.GameController.ControllerButtonState
instance GHC.Read.Read SDL.Input.GameController.ControllerButtonState
instance GHC.Classes.Ord SDL.Input.GameController.ControllerButtonState
instance GHC.Generics.Generic SDL.Input.GameController.ControllerButtonState
instance GHC.Classes.Eq SDL.Input.GameController.ControllerButtonState
instance Data.Data.Data SDL.Input.GameController.ControllerButtonState
instance GHC.Show.Show SDL.Input.GameController.ControllerButton
instance GHC.Read.Read SDL.Input.GameController.ControllerButton
instance GHC.Classes.Ord SDL.Input.GameController.ControllerButton
instance GHC.Generics.Generic SDL.Input.GameController.ControllerButton
instance GHC.Classes.Eq SDL.Input.GameController.ControllerButton
instance Data.Data.Data SDL.Input.GameController.ControllerButton
instance SDL.Internal.Numbered.FromNumber SDL.Input.GameController.ControllerDeviceConnection GHC.Word.Word32
instance SDL.Internal.Numbered.FromNumber SDL.Input.GameController.ControllerButtonState GHC.Word.Word32
instance SDL.Internal.Numbered.FromNumber SDL.Input.GameController.ControllerButton GHC.Int.Int32

module SDL.Init

-- | Initializes SDL and the given subsystems. Do not call any SDL
--   functions prior to this one, unless otherwise documented that you may
--   do so.
--   
--   You may call this function again with additional subsystems to
--   initialize.
--   
--   Throws <a>SDLException</a> if initialization fails.
initialize :: (Foldable f, Functor m, MonadIO m) => f InitFlag -> m ()

-- | Equivalent to <tt><a>initialize</a> [<a>minBound</a> ..
--   <a>maxBound</a>]</tt>.
initializeAll :: (Functor m, MonadIO m) => m ()
data InitFlag
InitTimer :: InitFlag
InitAudio :: InitFlag
InitVideo :: InitFlag
InitJoystick :: InitFlag
InitHaptic :: InitFlag
InitGameController :: InitFlag
InitEvents :: InitFlag

-- | Quit and shutdown SDL, freeing any resources that may have been in
--   use. Do not call any SDL functions after you've called this function,
--   unless otherwise documented that you may do so.
quit :: MonadIO m => m ()

-- | The major, minor, and patch versions of the SDL library linked with.
--   Does not require initialization.
version :: (Integral a, MonadIO m) => m (a, a, a)
instance GHC.Show.Show SDL.Init.InitFlag
instance GHC.Read.Read SDL.Init.InitFlag
instance GHC.Classes.Ord SDL.Init.InitFlag
instance GHC.Generics.Generic SDL.Init.InitFlag
instance GHC.Classes.Eq SDL.Init.InitFlag
instance GHC.Enum.Enum SDL.Init.InitFlag
instance Data.Data.Data SDL.Init.InitFlag
instance GHC.Enum.Bounded SDL.Init.InitFlag
instance SDL.Internal.Numbered.ToNumber SDL.Init.InitFlag GHC.Word.Word32

module SDL.Hint

-- | The <a>Hint</a> type exports a well-typed interface to SDL's concept
--   of <a>hints</a>. This type has instances for both <a>HasGetter</a> and
--   <a>HasSetter</a>, allowing you to get and set hints. Note that the
--   <a>HasSetter</a> interface is fairly relaxed - if a hint cannot be
--   set, the failure will be silently discarded. For more feedback and
--   control when setting hints, see <a>setHintWithPriority</a>.
data Hint :: * -> *
[HintAccelerometerAsJoystick] :: Hint AccelerometerJoystickOptions
[HintFramebufferAcceleration] :: Hint FramebufferAccelerationOptions
[HintMacCTRLClick] :: Hint MacCTRLClickOptions
[HintMouseRelativeModeWarp] :: Hint MouseModeWarpOptions
[HintRenderDriver] :: Hint RenderDrivers
[HintRenderOpenGLShaders] :: Hint RenderOpenGLShaderOptions
[HintRenderScaleQuality] :: Hint RenderScaleQuality
[HintRenderVSync] :: Hint RenderVSyncOptions
[HintVideoWinD3DCompiler] :: Hint VideoWinD3DCompilerOptions

-- | Set the value of a hint, applying priority rules for when there is a
--   conflict. Ordinarily, a hint will not be set if there is an existing
--   override hint or environment variable that takes precedence.
setHintWithPriority :: MonadIO m => HintPriority -> Hint v -> v -> m Bool

-- | How to deal with setting hints when an existing override or
--   environment variable is present.
data HintPriority

-- | Low priority, used for default values
DefaultPriority :: HintPriority

-- | Medium priority
NormalPriority :: HintPriority

-- | High priority
OverridePriority :: HintPriority
clearHints :: MonadIO m => m ()

-- | A hint that specifies whether the Android/iOS built-in accelerometer
--   should be listed as a joystick device, rather than listing actual
--   joysticks only. By default SDL will list real joysticks along with the
--   accelerometer as if it were a 3 axis joystick.
data AccelerometerJoystickOptions

-- | List only real joysticks and accept input from them
AccelerometerNotJoystick :: AccelerometerJoystickOptions

-- | List real joysticks along with the accelerometer as if it were a 3
--   axis joystick (the default)
AccelerometerIsJoystick :: AccelerometerJoystickOptions

-- | A hint that specifies how 3D acceleration is used to accelerate the
--   SDL screen surface. By default SDL tries to make a best guess whether
--   to use acceleration or not on each platform.
data FramebufferAccelerationOptions

-- | Disable 3D acceleration
Disable3D :: FramebufferAccelerationOptions

-- | Enable 3D acceleration, using the default renderer
Enable3DDefault :: FramebufferAccelerationOptions

-- | Enable 3D acceleration using Direct3D
Enable3DDirect3D :: FramebufferAccelerationOptions

-- | Enable 3D acceleration using OpenGL
Enable3DOpenGL :: FramebufferAccelerationOptions

-- | Enable 3D acceleration using OpenGLES
Enable3DOpenGLES :: FramebufferAccelerationOptions

-- | Enable 3D acceleration using OpenGLES2
Enable3DOpenGLES2 :: FramebufferAccelerationOptions

-- | Enable 3D acceleration using software rendering
Enable3DSoftware :: FramebufferAccelerationOptions

-- | A hint that specifies whether ctrl+click should generate a right-click
--   event on Mac. By default holding ctrl while left clicking will not
--   generate a right click event when on Mac.
data MacCTRLClickOptions

-- | Disable emulating right click
NoRightClick :: MacCTRLClickOptions

-- | Enable emulating right click
EmulateRightClick :: MacCTRLClickOptions

-- | A hint that specifies whether relative mouse mode is implemented using
--   mouse warping. By default SDL will use raw input for relative mouse
--   mode
data MouseModeWarpOptions

-- | Relative mouse mode uses the raw input
MouseRawInput :: MouseModeWarpOptions

-- | Relative mouse mode uses mouse warping
MouseWarping :: MouseModeWarpOptions

-- | A hint that specifies which render driver to use. By default the first
--   one in the list that is available on the current platform is chosen.
data RenderDrivers
Direct3D :: RenderDrivers
OpenGL :: RenderDrivers
OpenGLES :: RenderDrivers
OpenGLES2 :: RenderDrivers
Software :: RenderDrivers

-- | A hint that specifies whether the OpenGL render driver uses shaders.
--   By default shaders are used if OpenGL supports them.
data RenderOpenGLShaderOptions

-- | Disable shaders
DisableShaders :: RenderOpenGLShaderOptions

-- | Enable shaders, if they are available
EnableShaders :: RenderOpenGLShaderOptions

-- | A hint that specifies scaling quality. By default nearest pixel
--   sampling is used.
data RenderScaleQuality

-- | Nearest pixel sampling
ScaleNearest :: RenderScaleQuality

-- | linear filtering (supported by OpenGL and Direct3D)
ScaleLinear :: RenderScaleQuality

-- | Anisotropic filtering (supported by Direct3D)
ScaleBest :: RenderScaleQuality

-- | A hint that specifies whether sync to vertical refresh is enabled or
--   disabled to avoid tearing. By default SDL uses the flag passed into
--   calls to create renderers.
data RenderVSyncOptions
DisableVSync :: RenderVSyncOptions
EnableVSync :: RenderVSyncOptions

-- | A hint that specifies which shader compiler to preload when using the
--   Chrome ANGLE binaries. By default <tt>d3dcompiler_46.dll</tt> will be
--   used.
data VideoWinD3DCompilerOptions

-- | Use <tt>d3dcompiler_46.dll</tt>, best for Vista or later
D3DVistaOrLater :: VideoWinD3DCompilerOptions

-- | Use <tt>d3dcompiler_43.dll</tt> for XP support
D3DXPSupport :: VideoWinD3DCompilerOptions

-- | Do not load any library, useful if you compiled ANGLE from source and
--   included the compiler in your binaries
D3DNone :: VideoWinD3DCompilerOptions
instance GHC.Show.Show SDL.Hint.HintPriority
instance GHC.Read.Read SDL.Hint.HintPriority
instance GHC.Classes.Ord SDL.Hint.HintPriority
instance GHC.Generics.Generic SDL.Hint.HintPriority
instance GHC.Classes.Eq SDL.Hint.HintPriority
instance GHC.Enum.Enum SDL.Hint.HintPriority
instance Data.Data.Data SDL.Hint.HintPriority
instance GHC.Enum.Bounded SDL.Hint.HintPriority
instance GHC.Show.Show SDL.Hint.VideoWinD3DCompilerOptions
instance GHC.Read.Read SDL.Hint.VideoWinD3DCompilerOptions
instance GHC.Classes.Ord SDL.Hint.VideoWinD3DCompilerOptions
instance GHC.Generics.Generic SDL.Hint.VideoWinD3DCompilerOptions
instance GHC.Classes.Eq SDL.Hint.VideoWinD3DCompilerOptions
instance GHC.Enum.Enum SDL.Hint.VideoWinD3DCompilerOptions
instance Data.Data.Data SDL.Hint.VideoWinD3DCompilerOptions
instance GHC.Enum.Bounded SDL.Hint.VideoWinD3DCompilerOptions
instance GHC.Show.Show SDL.Hint.RenderVSyncOptions
instance GHC.Read.Read SDL.Hint.RenderVSyncOptions
instance GHC.Classes.Ord SDL.Hint.RenderVSyncOptions
instance GHC.Generics.Generic SDL.Hint.RenderVSyncOptions
instance GHC.Classes.Eq SDL.Hint.RenderVSyncOptions
instance GHC.Enum.Enum SDL.Hint.RenderVSyncOptions
instance Data.Data.Data SDL.Hint.RenderVSyncOptions
instance GHC.Enum.Bounded SDL.Hint.RenderVSyncOptions
instance GHC.Show.Show SDL.Hint.RenderScaleQuality
instance GHC.Read.Read SDL.Hint.RenderScaleQuality
instance GHC.Classes.Ord SDL.Hint.RenderScaleQuality
instance GHC.Generics.Generic SDL.Hint.RenderScaleQuality
instance GHC.Classes.Eq SDL.Hint.RenderScaleQuality
instance GHC.Enum.Enum SDL.Hint.RenderScaleQuality
instance Data.Data.Data SDL.Hint.RenderScaleQuality
instance GHC.Enum.Bounded SDL.Hint.RenderScaleQuality
instance GHC.Show.Show SDL.Hint.RenderOpenGLShaderOptions
instance GHC.Read.Read SDL.Hint.RenderOpenGLShaderOptions
instance GHC.Classes.Ord SDL.Hint.RenderOpenGLShaderOptions
instance GHC.Generics.Generic SDL.Hint.RenderOpenGLShaderOptions
instance GHC.Classes.Eq SDL.Hint.RenderOpenGLShaderOptions
instance GHC.Enum.Enum SDL.Hint.RenderOpenGLShaderOptions
instance Data.Data.Data SDL.Hint.RenderOpenGLShaderOptions
instance GHC.Enum.Bounded SDL.Hint.RenderOpenGLShaderOptions
instance GHC.Show.Show SDL.Hint.RenderDrivers
instance GHC.Read.Read SDL.Hint.RenderDrivers
instance GHC.Classes.Ord SDL.Hint.RenderDrivers
instance GHC.Generics.Generic SDL.Hint.RenderDrivers
instance GHC.Classes.Eq SDL.Hint.RenderDrivers
instance GHC.Enum.Enum SDL.Hint.RenderDrivers
instance Data.Data.Data SDL.Hint.RenderDrivers
instance GHC.Enum.Bounded SDL.Hint.RenderDrivers
instance GHC.Show.Show SDL.Hint.MouseModeWarpOptions
instance GHC.Read.Read SDL.Hint.MouseModeWarpOptions
instance GHC.Classes.Ord SDL.Hint.MouseModeWarpOptions
instance GHC.Generics.Generic SDL.Hint.MouseModeWarpOptions
instance GHC.Classes.Eq SDL.Hint.MouseModeWarpOptions
instance GHC.Enum.Enum SDL.Hint.MouseModeWarpOptions
instance Data.Data.Data SDL.Hint.MouseModeWarpOptions
instance GHC.Enum.Bounded SDL.Hint.MouseModeWarpOptions
instance GHC.Show.Show SDL.Hint.MacCTRLClickOptions
instance GHC.Read.Read SDL.Hint.MacCTRLClickOptions
instance GHC.Classes.Ord SDL.Hint.MacCTRLClickOptions
instance GHC.Generics.Generic SDL.Hint.MacCTRLClickOptions
instance GHC.Classes.Eq SDL.Hint.MacCTRLClickOptions
instance GHC.Enum.Enum SDL.Hint.MacCTRLClickOptions
instance Data.Data.Data SDL.Hint.MacCTRLClickOptions
instance GHC.Enum.Bounded SDL.Hint.MacCTRLClickOptions
instance GHC.Show.Show SDL.Hint.FramebufferAccelerationOptions
instance GHC.Read.Read SDL.Hint.FramebufferAccelerationOptions
instance GHC.Classes.Ord SDL.Hint.FramebufferAccelerationOptions
instance GHC.Generics.Generic SDL.Hint.FramebufferAccelerationOptions
instance GHC.Classes.Eq SDL.Hint.FramebufferAccelerationOptions
instance GHC.Enum.Enum SDL.Hint.FramebufferAccelerationOptions
instance Data.Data.Data SDL.Hint.FramebufferAccelerationOptions
instance GHC.Enum.Bounded SDL.Hint.FramebufferAccelerationOptions
instance GHC.Show.Show SDL.Hint.AccelerometerJoystickOptions
instance GHC.Read.Read SDL.Hint.AccelerometerJoystickOptions
instance GHC.Classes.Ord SDL.Hint.AccelerometerJoystickOptions
instance GHC.Generics.Generic SDL.Hint.AccelerometerJoystickOptions
instance GHC.Classes.Eq SDL.Hint.AccelerometerJoystickOptions
instance GHC.Enum.Enum SDL.Hint.AccelerometerJoystickOptions
instance Data.Data.Data SDL.Hint.AccelerometerJoystickOptions
instance GHC.Enum.Bounded SDL.Hint.AccelerometerJoystickOptions
instance Data.StateVar.HasSetter (SDL.Hint.Hint v) v
instance Data.StateVar.HasGetter (SDL.Hint.Hint v) v

module SDL.Time

-- | Number of milliseconds since library initialization.
--   
--   See <tt><a>SDL_GetTicks</a></tt> for C documentation.
ticks :: MonadIO m => m Word32

-- | The current time in seconds since some arbitrary starting point
--   (consist over the life of the application).
--   
--   This time is derived from the system's performance counter - see
--   <tt><a>SDL_GetPerformanceFrequency</a></tt> and
--   <tt><a>SDL_GetPerformanceCounter</a></tt> for C documentation about
--   the implementation.
time :: (Fractional a, MonadIO m) => m a

-- | Wait a specified number of milliseconds before returning.
--   
--   Users are generally recommended to use <tt>threadDelay</tt> instead,
--   to take advantage of the abilities of the Haskell runtime.
--   
--   See <tt><a>SDL_Delay</a></tt> for C documentation.
delay :: MonadIO m => Word32 -> m ()

-- | A <a>TimerCallback</a> is called with the interval size of the
--   callback. It can return information as to whether or not the timer
--   should continue to exist.
type TimerCallback = Word32 -> IO RetriggerTimer

-- | A timer created by <a>addTimer</a>. This <a>Timer</a> can be removed
--   with <a>removeTimer</a>.
data Timer

-- | <a>RetriggerTimer</a> allows a callback to inform SDL if the timer
--   should be retriggered or cancelled
data RetriggerTimer

-- | Retrigger the timer again in a given number of milliseconds.
Reschedule :: Word32 -> RetriggerTimer

-- | Cancel future invocations of this timer.
Cancel :: RetriggerTimer

-- | Set up a callback function to be run on a separate thread after the
--   specified number of milliseconds has elapsed.
--   
--   See <tt><a>SDL_AddTimer</a></tt> for C documentation.
addTimer :: MonadIO m => Word32 -> TimerCallback -> m Timer

-- | Remove a <a>Timer</a>.
--   
--   See <tt><a>SDL_RemoveTimer</a></tt> for C documentation.
removeTimer :: MonadIO m => Timer -> m Bool
instance GHC.Show.Show SDL.Time.RetriggerTimer
instance GHC.Read.Read SDL.Time.RetriggerTimer
instance GHC.Classes.Ord SDL.Time.RetriggerTimer
instance GHC.Generics.Generic SDL.Time.RetriggerTimer
instance GHC.Classes.Eq SDL.Time.RetriggerTimer
instance Data.Data.Data SDL.Time.RetriggerTimer


-- | SDL's vector representation.
--   
--   By default, re-exports the <a>Linear</a> and <a>Linear.Affine</a>
--   modules from the <tt>linear</tt> package. With the <tt>no-linear</tt>
--   Cabal flag, instead exports a duplicate implementation of the
--   <a>V2</a>, <a>V3</a>, <a>V4</a> and <a>Point</a> types from
--   <a>SDL.Internal.Vect</a>, which provides as many instances as possible
--   for those types while avoiding any additional dependencies.
module SDL.Vect

-- | A handy wrapper to help distinguish points from vectors at the type
--   level
newtype Point (f :: * -> *) a
P :: f a -> Point a

-- | A 2-dimensional vector
--   
--   <pre>
--   &gt;&gt;&gt; pure 1 :: V2 Int
--   V2 1 1
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; V2 1 2 + V2 3 4
--   V2 4 6
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; V2 1 2 * V2 3 4
--   V2 3 8
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; sum (V2 1 2)
--   3
--   </pre>
data V2 a
V2 :: !a -> !a -> V2 a

-- | A 3-dimensional vector
data V3 a
V3 :: !a -> !a -> !a -> V3 a

-- | A 4-dimensional vector.
data V4 a
V4 :: !a -> !a -> !a -> !a -> V4 a

module SDL.Input.Joystick

-- | Count the number of joysticks attached to the system.
--   
--   See <tt><a>SDL_NumJoysticks</a></tt> for C documentation.
numJoysticks :: MonadIO m => m (CInt)

-- | Enumerate all connected joysticks, retrieving a description of each.
availableJoysticks :: MonadIO m => m (Vector JoystickDevice)

-- | A description of joystick that can be opened using
--   <a>openJoystick</a>. To retrieve a list of connected joysticks, use
--   <a>availableJoysticks</a>.
data JoystickDevice
JoystickDevice :: Text -> CInt -> JoystickDevice
[joystickDeviceName] :: JoystickDevice -> Text
[joystickDeviceId] :: JoystickDevice -> CInt

-- | Open a joystick so that you can start receiving events from
--   interaction with this joystick.
--   
--   See <tt><a>SDL_JoystickOpen</a></tt> for C documentation.
openJoystick :: (Functor m, MonadIO m) => JoystickDevice -> m Joystick

-- | Close a joystick previously opened with <a>openJoystick</a>.
--   
--   See <tt><a>SDL_JoystickClose</a></tt> for C documentation.
closeJoystick :: MonadIO m => Joystick -> m ()

-- | Get the instance ID of an opened joystick. The instance ID is used to
--   identify the joystick in future SDL events.
--   
--   See <tt><a>SDL_JoystickInstanceID</a></tt> for C documentation.
getJoystickID :: MonadIO m => Joystick -> m (Int32)
data Joystick

-- | Identifies the state of a joystick button.
data JoyButtonState
JoyButtonPressed :: JoyButtonState
JoyButtonReleased :: JoyButtonState

-- | Determine if a given button is currently held.
--   
--   See <tt><a>SDL_JoystickGetButton</a></tt> for C documentation.
buttonPressed :: (Functor m, MonadIO m) => Joystick -> CInt -> m Bool

-- | Get the ball axis change since the last poll.
--   
--   See <tt><a>SDL_JoystickGetBall</a></tt> for C documentation.
ballDelta :: MonadIO m => Joystick -> CInt -> m (V2 CInt)

-- | Get the current state of an axis control on a joystick.
--   
--   Returns a 16-bit signed integer representing the current position of
--   the axis. The state is a value ranging from -32768 to 32767.
--   
--   On most modern joysticks the x-axis is usually represented by axis 0
--   and the y-axis by axis 1. The value returned by <a>axisPosition</a> is
--   a signed integer (-32768 to 32767) representing the current position
--   of the axis. It may be necessary to impose certain tolerances on these
--   values to account for jitter.
--   
--   Some joysticks use axes 2 and 3 for extra buttons.
--   
--   See <tt><a>SDL_JoystickGetAxis</a></tt> for C documentation.
axisPosition :: MonadIO m => Joystick -> CInt -> m Int16

-- | Get the number of general axis controls on a joystick.
--   
--   See <tt><a>SDL_JoystickNumAxes</a></tt> for C documentation.
numAxes :: (MonadIO m) => Joystick -> m CInt

-- | Get the number of buttons on a joystick.
--   
--   See <tt><a>SDL_JoystickNumButtons</a></tt> for C documentation.
numButtons :: (MonadIO m) => Joystick -> m CInt

-- | Get the number of trackballs on a joystick.
--   
--   See <tt><a>SDL_JoystickNumBalls</a></tt> for C documentation.
numBalls :: (MonadIO m) => Joystick -> m CInt

-- | Identifies the state of the POV hat on a joystick.
data JoyHatPosition

-- | Centered position
HatCentered :: JoyHatPosition

-- | Up position
HatUp :: JoyHatPosition

-- | Right position
HatRight :: JoyHatPosition

-- | Down position
HatDown :: JoyHatPosition

-- | Left position
HatLeft :: JoyHatPosition

-- | Right-up position
HatRightUp :: JoyHatPosition

-- | Right-down position
HatRightDown :: JoyHatPosition

-- | Left-up position
HatLeftUp :: JoyHatPosition

-- | Left-down position
HatLeftDown :: JoyHatPosition

-- | Get current position of a POV hat on a joystick.
--   
--   See <tt><a>SDL_JoystickGetHat</a></tt> for C documentation.
getHat :: (Functor m, MonadIO m) => Joystick -> CInt -> m JoyHatPosition

-- | Get the number of POV hats on a joystick.
--   
--   See <tt><a>SDL_JoystickNumHats</a></tt> for C documentation.
numHats :: (MonadIO m) => Joystick -> m CInt

-- | Identifies whether a joystick has been connected or disconnected.
data JoyDeviceConnection
JoyDeviceAdded :: JoyDeviceConnection
JoyDeviceRemoved :: JoyDeviceConnection
instance GHC.Show.Show SDL.Input.Joystick.JoyDeviceConnection
instance GHC.Read.Read SDL.Input.Joystick.JoyDeviceConnection
instance GHC.Classes.Ord SDL.Input.Joystick.JoyDeviceConnection
instance GHC.Generics.Generic SDL.Input.Joystick.JoyDeviceConnection
instance GHC.Classes.Eq SDL.Input.Joystick.JoyDeviceConnection
instance Data.Data.Data SDL.Input.Joystick.JoyDeviceConnection
instance GHC.Show.Show SDL.Input.Joystick.JoyHatPosition
instance GHC.Read.Read SDL.Input.Joystick.JoyHatPosition
instance GHC.Classes.Ord SDL.Input.Joystick.JoyHatPosition
instance GHC.Generics.Generic SDL.Input.Joystick.JoyHatPosition
instance GHC.Classes.Eq SDL.Input.Joystick.JoyHatPosition
instance Data.Data.Data SDL.Input.Joystick.JoyHatPosition
instance GHC.Show.Show SDL.Input.Joystick.JoyButtonState
instance GHC.Read.Read SDL.Input.Joystick.JoyButtonState
instance GHC.Classes.Ord SDL.Input.Joystick.JoyButtonState
instance GHC.Generics.Generic SDL.Input.Joystick.JoyButtonState
instance GHC.Classes.Eq SDL.Input.Joystick.JoyButtonState
instance Data.Data.Data SDL.Input.Joystick.JoyButtonState
instance GHC.Show.Show SDL.Input.Joystick.JoystickDevice
instance GHC.Classes.Ord SDL.Input.Joystick.JoystickDevice
instance GHC.Read.Read SDL.Input.Joystick.JoystickDevice
instance GHC.Generics.Generic SDL.Input.Joystick.JoystickDevice
instance GHC.Classes.Eq SDL.Input.Joystick.JoystickDevice
instance SDL.Internal.Numbered.FromNumber SDL.Input.Joystick.JoyDeviceConnection GHC.Word.Word32
instance SDL.Internal.Numbered.FromNumber SDL.Input.Joystick.JoyHatPosition GHC.Word.Word8
instance SDL.Internal.Numbered.FromNumber SDL.Input.Joystick.JoyButtonState GHC.Word.Word8

module SDL.Video.OpenGL

-- | A set of default options for <a>OpenGLConfig</a>
--   
--   <pre>
--   <a>defaultOpenGL</a> = <a>OpenGLConfig</a>
--     { <a>glColorPrecision</a> = V4 8 8 8 0
--     , <a>glDepthPrecision</a> = 24
--     , <a>glStencilPrecision</a> = 8
--     , <a>glMultisampleSamples</a> = 1
--     , <a>glProfile</a> = <a>Compatibility</a> <a>Normal</a> 2 1
--     }
--   </pre>
defaultOpenGL :: OpenGLConfig

-- | Configuration used when creating an OpenGL rendering context.
data OpenGLConfig
OpenGLConfig :: V4 CInt -> CInt -> CInt -> CInt -> Profile -> OpenGLConfig

-- | Defaults to <a>V4</a> <tt>8 8 8 0</tt>.
[glColorPrecision] :: OpenGLConfig -> V4 CInt

-- | Defaults to <tt>24</tt>.
[glDepthPrecision] :: OpenGLConfig -> CInt

-- | Defaults to <tt>8</tt>.
[glStencilPrecision] :: OpenGLConfig -> CInt

-- | Defaults to <tt>1</tt>.
[glMultisampleSamples] :: OpenGLConfig -> CInt

-- | Defaults to <a>Compatibility</a> <a>Normal</a> <tt>2 1</tt>.
[glProfile] :: OpenGLConfig -> Profile

-- | A created OpenGL context.
data GLContext

-- | Create a new OpenGL context and makes it the current context for the
--   window.
--   
--   Throws <tt>SDLException</tt> if the window wasn't configured with
--   OpenGL support, or if context creation fails.
--   
--   See <tt><a>SDL_GL_CreateContext</a></tt> for C documentation.
glCreateContext :: (Functor m, MonadIO m) => Window -> m GLContext

-- | The profile a driver should use when creating an OpenGL context.
data Profile

-- | Use the OpenGL core profile, with a given major and minor version
Core :: Mode -> CInt -> CInt -> Profile

-- | Use the compatibilty profile with a given major and minor version. The
--   compatibility profile allows you to use deprecated functions such as
--   immediate mode
Compatibility :: Mode -> CInt -> CInt -> Profile

-- | Use an OpenGL profile for embedded systems
ES :: Mode -> CInt -> CInt -> Profile

-- | The mode a driver should use when creating an OpenGL context.
data Mode

-- | A normal profile with no special debugging support
Normal :: Mode

-- | Use a debug context, allowing the usage of extensions such as
--   <tt>GL_ARB_debug_output</tt>
Debug :: Mode

-- | Set up an OpenGL context for rendering into an OpenGL window.
--   
--   Throws <tt>SDLException</tt> on failure.
--   
--   See <tt><a>SDL_GL_MakeCurrent</a></tt> for C documentation.
glMakeCurrent :: (Functor m, MonadIO m) => Window -> GLContext -> m ()

-- | Delete the given OpenGL context.
--   
--   You <i>must</i> make sure that there are no pending commands in the
--   OpenGL command queue, the driver may still be processing commands even
--   if you have stopped issuing them!
--   
--   The <tt>glFinish</tt> command will block until the command queue has
--   been fully processed. You should call that function before deleting a
--   context.
--   
--   See <tt><a>SDL_GL_DeleteContext</a></tt> for C documentation.
glDeleteContext :: MonadIO m => GLContext -> m ()

-- | Get the size of a window's underlying drawable area in pixels (for use
--   with glViewport).
--   
--   It may differ from <a>windowSize</a> if window was created with
--   <a>windowHighDPI</a> flag.
glGetDrawableSize :: MonadIO m => Window -> m (V2 CInt)

-- | Replace the contents of the front buffer with the back buffer's. The
--   contents of the back buffer are undefined, clear them with
--   <tt>glClear</tt> or equivalent before drawing to them again.
--   
--   See <tt><a>SDL_GL_SwapWindow</a></tt> for C documentation.
glSwapWindow :: MonadIO m => Window -> m ()

-- | The swap interval for the current OpenGL context.
data SwapInterval

-- | No vertical retrace synchronization
ImmediateUpdates :: SwapInterval

-- | The buffer swap is synchronized with the vertical retrace
SynchronizedUpdates :: SwapInterval
LateSwapTearing :: SwapInterval

-- | Get or set the swap interval for the current OpenGL context.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_GL_SetSwapInterval</a></tt> and
--   <tt><a>SDL_GL_GetSwapInterval</a></tt> for C documentation.
swapInterval :: StateVar SwapInterval
glGetProcAddress :: MonadIO m => CString -> m (Ptr ())
instance GHC.Show.Show SDL.Video.OpenGL.SwapInterval
instance GHC.Read.Read SDL.Video.OpenGL.SwapInterval
instance GHC.Classes.Ord SDL.Video.OpenGL.SwapInterval
instance GHC.Generics.Generic SDL.Video.OpenGL.SwapInterval
instance GHC.Classes.Eq SDL.Video.OpenGL.SwapInterval
instance GHC.Enum.Enum SDL.Video.OpenGL.SwapInterval
instance Data.Data.Data SDL.Video.OpenGL.SwapInterval
instance GHC.Enum.Bounded SDL.Video.OpenGL.SwapInterval
instance GHC.Classes.Eq SDL.Video.OpenGL.GLContext
instance GHC.Show.Show SDL.Video.OpenGL.OpenGLConfig
instance GHC.Read.Read SDL.Video.OpenGL.OpenGLConfig
instance GHC.Classes.Ord SDL.Video.OpenGL.OpenGLConfig
instance GHC.Generics.Generic SDL.Video.OpenGL.OpenGLConfig
instance GHC.Classes.Eq SDL.Video.OpenGL.OpenGLConfig
instance GHC.Show.Show SDL.Video.OpenGL.Profile
instance GHC.Read.Read SDL.Video.OpenGL.Profile
instance GHC.Classes.Ord SDL.Video.OpenGL.Profile
instance GHC.Generics.Generic SDL.Video.OpenGL.Profile
instance GHC.Classes.Eq SDL.Video.OpenGL.Profile
instance GHC.Show.Show SDL.Video.OpenGL.Mode
instance GHC.Read.Read SDL.Video.OpenGL.Mode
instance GHC.Classes.Ord SDL.Video.OpenGL.Mode
instance GHC.Generics.Generic SDL.Video.OpenGL.Mode
instance GHC.Classes.Eq SDL.Video.OpenGL.Mode
instance GHC.Enum.Enum SDL.Video.OpenGL.Mode
instance Data.Data.Data SDL.Video.OpenGL.Mode
instance GHC.Enum.Bounded SDL.Video.OpenGL.Mode
instance SDL.Internal.Numbered.ToNumber SDL.Video.OpenGL.SwapInterval Foreign.C.Types.CInt
instance SDL.Internal.Numbered.FromNumber SDL.Video.OpenGL.SwapInterval Foreign.C.Types.CInt


-- | <a>SDL.Video.Renderer</a> provides a high-level interface to SDL's
--   accelerated 2D rendering library.
module SDL.Video.Renderer

-- | An SDL rendering device. This can be created with
--   <a>createRenderer</a>.
data Renderer

-- | The configuration data used when creating windows.
data RendererConfig
RendererConfig :: RendererType -> Bool -> RendererConfig

-- | The renderer's acceleration mode
[rendererType] :: RendererConfig -> RendererType

-- | The renderer supports rendering to texture
[rendererTargetTexture] :: RendererConfig -> Bool

-- | Default options for <a>RendererConfig</a>.
--   
--   <pre>
--   <a>defaultRenderer</a> = <a>RendererConfig</a>
--     { <a>rendererType</a>          = <a>AcceleratedRenderer</a>
--     , <a>rendererTargetTexture</a> = False
--     }
--   </pre>
defaultRenderer :: RendererConfig

-- | Renderer acceleration mode
data RendererType

-- | The renderer does not use hardware acceleration
UnacceleratedRenderer :: RendererType

-- | The renderer uses hardware acceleration and refresh rate is ignored
AcceleratedRenderer :: RendererType

-- | The renderer uses hardware acceleration and present is synchronized
--   with the refresh rate
AcceleratedVSyncRenderer :: RendererType

-- | The renderer is a software fallback
SoftwareRenderer :: RendererType

-- | Clear the current rendering target with the drawing color.
--   
--   See <tt><a>SDL_RenderClear</a></tt> for C documentation.
clear :: (Functor m, MonadIO m) => Renderer -> m ()

-- | Copy a portion of the texture to the current rendering target.
--   
--   See <tt><a>SDL_RenderCopy</a></tt> for C documentation.
copy :: MonadIO m => Renderer -> Texture -> Maybe (Rectangle CInt) -> Maybe (Rectangle CInt) -> m ()

-- | Copy a portion of the texture to the current rendering target,
--   optionally rotating it by angle around the given center and also
--   flipping it top-bottom and/or left-right.
--   
--   See <tt><a>SDL_RenderCopyEx</a></tt> for C documentation.
copyEx :: MonadIO m => Renderer -> Texture -> Maybe (Rectangle CInt) -> Maybe (Rectangle CInt) -> CDouble -> Maybe (Point V2 CInt) -> V2 Bool -> m ()

-- | Draw a line on the current rendering target.
--   
--   See <tt><a>SDL_RenderDrawLine</a></tt> for C documentation.
drawLine :: (Functor m, MonadIO m) => Renderer -> Point V2 CInt -> Point V2 CInt -> m ()

-- | Draw a series of connected lines on the current rendering target.
--   
--   See <tt><a>SDL_RenderDrawLines</a></tt> for C documentation.
drawLines :: MonadIO m => Renderer -> Vector (Point V2 CInt) -> m ()

-- | Draw a point on the current rendering target.
--   
--   See <tt><a>SDL_RenderDrawPoint</a></tt> for C documentation.
drawPoint :: (Functor m, MonadIO m) => Renderer -> Point V2 CInt -> m ()

-- | Draw multiple points on the current rendering target.
--   
--   See <tt><a>SDL_RenderDrawPoints</a></tt> for C documentation.
drawPoints :: MonadIO m => Renderer -> Vector (Point V2 CInt) -> m ()

-- | Draw a rectangle outline on the current rendering target.
--   
--   See <tt><a>SDL_RenderDrawRect</a></tt> for C documentation.
drawRect :: MonadIO m => Renderer -> Maybe (Rectangle CInt) -> m ()

-- | Draw some number of rectangles on the current rendering target.
--   
--   See <tt><a>SDL_RenderDrawRects</a></tt> for C documentation.
drawRects :: MonadIO m => Renderer -> Vector (Rectangle CInt) -> m ()

-- | Fill a rectangle on the current rendering target with the drawing
--   color.
--   
--   See <tt><a>SDL_RenderFillRect</a></tt> for C documentation.
fillRect :: MonadIO m => Renderer -> Maybe (Rectangle CInt) -> m ()

-- | Fill some number of rectangles on the current rendering target with
--   the drawing color.
--   
--   See <tt><a>SDL_RenderFillRects</a></tt> for C documentation.
fillRects :: MonadIO m => Renderer -> Vector (Rectangle CInt) -> m ()

-- | Update the screen with any rendering performed since the previous
--   call.
--   
--   SDL's rendering functions operate on a backbuffer; that is, calling a
--   rendering function such as <a>drawLine</a> does not directly put a
--   line on the screen, but rather updates the backbuffer. As such, you
--   compose your entire scene and present the composed backbuffer to the
--   screen as a complete picture.
--   
--   Therefore, when using SDL's rendering API, one does all drawing
--   intended for the frame, and then calls this function once per frame to
--   present the final drawing to the user.
--   
--   The backbuffer should be considered invalidated after each present; do
--   not assume that previous contents will exist between frames. You are
--   strongly encouraged to call <a>clear</a> to initialize the backbuffer
--   before starting each new frame's drawing, even if you plan to
--   overwrite every pixel.
--   
--   See <tt><a>SDL_RenderPresent</a></tt> for C documentation.
present :: MonadIO m => Renderer -> m ()

-- | Get or set the blend mode used for drawing operations (fill and line).
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetRenderDrawBlendMode</a></tt> and
--   <tt><a>SDL_GetRenderDrawBlendMode</a></tt> for C documentation.
rendererDrawBlendMode :: Renderer -> StateVar BlendMode

-- | Get or set the color used for drawing operations (rect, line and
--   clear).
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetRenderDrawColor</a></tt> and
--   <tt><a>SDL_GetRenderDrawColor</a></tt> for C documentation.
rendererDrawColor :: Renderer -> StateVar (V4 Word8)

-- | Get or set the current render target. <a>Nothing</a> corresponds to
--   the default render target.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetRenderTarget</a></tt> and
--   <tt><a>SDL_GetRenderTarget</a></tt> for C documentation.
rendererRenderTarget :: Renderer -> StateVar (Maybe Texture)

-- | Get or set the clip rectangle for rendering on the specified target.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_RenderSetClipRect</a></tt> and
--   <tt><a>SDL_RenderGetClipRect</a></tt> for C documentation.
rendererClipRect :: Renderer -> StateVar (Maybe (Rectangle CInt))

-- | Get or set the device independent resolution for rendering.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_RenderSetLogicalSize</a></tt> and
--   <tt><a>SDL_RenderGetLogicalSize</a></tt> for C documentation.
rendererLogicalSize :: Renderer -> StateVar (Maybe (V2 CInt))

-- | Get or set the drawing scale for rendering on the current target.
--   
--   The drawing coordinates are scaled by the x/y scaling factors before
--   they are used by the renderer. This allows resolution independent
--   drawing with a single coordinate system.
--   
--   If this results in scaling or subpixel drawing by the rendering
--   backend, it will be handled using the appropriate quality hints. For
--   best results use integer scaling factors.
--   
--   See <tt><a>SDL_RenderSetScale</a></tt> and
--   <tt><a>SDL_RenderGetScale</a></tt> for C documentation.
rendererScale :: Renderer -> StateVar (V2 CFloat)

-- | Get or set the drawing area for rendering on the current target.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_RenderSetViewport</a></tt> and
--   <tt><a>SDL_RenderGetViewport</a></tt> for C documentation.
rendererViewport :: Renderer -> StateVar (Maybe (Rectangle CInt))

-- | Determine whether a window supports the use of render targets.
--   
--   See <tt><a>SDL_RenderTargetSupported</a></tt> for C documentation.
renderTargetSupported :: (MonadIO m) => Renderer -> m Bool
data Surface
Surface :: (Ptr Surface) -> (Maybe (IOVector Word8)) -> Surface

-- | Copy the window surface to the screen.
--   
--   This is the function you use to reflect any changes to the surface on
--   the screen.
--   
--   See <tt><a>SDL_UpdateWindowSurface</a></tt> for C documentation.
updateWindowSurface :: (Functor m, MonadIO m) => Window -> m ()

-- | Perform a fast surface copy to a destination surface.
--   
--   See <tt><a>SDL_BlitSurface</a></tt> for C documentation.
surfaceBlit :: MonadIO m => Surface -> Maybe (Rectangle CInt) -> Surface -> Maybe (Point V2 CInt) -> m (Maybe (Rectangle CInt))

-- | Perform a scaled surface copy to a destination surface.
--   
--   See <tt><a>SDL_BlitScaled</a></tt> for C documentation.
surfaceBlitScaled :: MonadIO m => Surface -> Maybe (Rectangle CInt) -> Surface -> Maybe (Rectangle CInt) -> m ()

-- | Perform a fast fill of a rectangle with a specific color.
--   
--   If there is a clip rectangle set on the destination (set via
--   <tt>clipRect</tt>), then this function will fill based on the
--   intersection of the clip rectangle and the given <a>Rectangle</a>.
--   
--   See <tt><a>SDL_FillRect</a></tt> for C documentation.
surfaceFillRect :: MonadIO m => Surface -> Maybe (Rectangle CInt) -> V4 Word8 -> m ()

-- | Perform a fast fill of a set of rectangles with a specific color.
--   
--   If there is a clip rectangle set on any of the destinations (set via
--   <tt>clipRect</tt>), then this function will fill based on the
--   intersection of the clip rectangle and the given <a>Rectangle</a>s.
--   
--   See <tt><a>SDL_FillRects</a></tt> for C documentation.
surfaceFillRects :: MonadIO m => Surface -> Vector (Rectangle CInt) -> V4 Word8 -> m ()

-- | Copy an existing surface into a new one that is optimized for blitting
--   to a surface of a specified pixel format.
--   
--   This function is used to optimize images for faster repeat blitting.
--   This is accomplished by converting the original and storing the result
--   as a new surface. The new, optimized surface can then be used as the
--   source for future blits, making them faster.
--   
--   See <tt><a>SDL_ConvertSurface</a></tt> for C documentation.
convertSurface :: (Functor m, MonadIO m) => Surface -> SurfacePixelFormat -> m Surface

-- | Allocate a new RGB surface.
--   
--   See <tt><a>SDL_CreateRGBSurface</a></tt> for C documentation.
createRGBSurface :: (Functor m, MonadIO m) => V2 CInt -> PixelFormat -> m Surface

-- | Allocate a new RGB surface with existing pixel data.
--   
--   See <tt><a>SDL_CreateRGBSurfaceFrom</a></tt> for C documentation.
createRGBSurfaceFrom :: (Functor m, MonadIO m) => IOVector Word8 -> V2 CInt -> CInt -> PixelFormat -> m Surface

-- | Free an RGB surface.
--   
--   If the surface was created using <a>createRGBSurfaceFrom</a> then the
--   pixel data is not freed.
--   
--   See <tt><a>SDL_FreeSurface</a></tt> for the C documentation.
freeSurface :: MonadIO m => Surface -> m ()

-- | Get the SDL surface associated with the window.
--   
--   See <tt><a>SDL_GetWindowSurface</a></tt> for C documentation.
getWindowSurface :: (Functor m, MonadIO m) => Window -> m Surface

-- | Load a surface from a BMP file.
--   
--   See <tt><a>SDL_LoadBMP</a></tt> for C documentation.
loadBMP :: MonadIO m => FilePath -> m Surface

-- | Get or set the color key (transparent pixel color) for a surface.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetColorKey</a></tt> and
--   <tt><a>SDL_GetColorKey</a></tt> for C documentation.
surfaceColorKey :: Surface -> StateVar (Maybe (V4 Word8))

-- | Get or set the blend mode used for blit operations.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetSurfaceBlendMode</a></tt> and
--   <tt><a>SDL_GetSurfaceBlendMode</a></tt> for C documentation.
surfaceBlendMode :: Surface -> StateVar BlendMode

-- | Retrive the width and height of a <a>Surface</a>.
surfaceDimensions :: MonadIO m => Surface -> m (V2 CInt)

-- | Inspect the pixel format under a surface.
surfaceFormat :: MonadIO m => Surface -> m SurfacePixelFormat

-- | Obtain the pointer to the underlying pixels in a surface. You should
--   bracket this call with <a>lockSurface</a> and <a>unlockSurface</a>,
--   respectively.
surfacePixels :: MonadIO m => Surface -> m (Ptr ())

-- | Set up a surface for directly accessing the pixels.
--   
--   See <tt><a>SDL_LockSurface</a></tt> for C documentation.
lockSurface :: MonadIO m => Surface -> m ()

-- | Release a surface after directly accessing the pixels.
--   
--   See <tt><a>SDL_UnlockSurface</a></tt> for C documentation.
unlockSurface :: MonadIO m => Surface -> m ()
data Palette
paletteNColors :: MonadIO m => Palette -> m CInt
paletteColors :: MonadIO m => Palette -> m (Maybe (Vector (V4 Word8)))
paletteColor :: MonadIO m => Palette -> CInt -> m (Maybe (V4 Word8))
data PixelFormat
Unknown :: PixelFormat
Index1LSB :: PixelFormat
Index1MSB :: PixelFormat
Index4LSB :: PixelFormat
Index4MSB :: PixelFormat
Index8 :: PixelFormat
RGB332 :: PixelFormat
RGB444 :: PixelFormat
RGB555 :: PixelFormat
BGR555 :: PixelFormat
ARGB4444 :: PixelFormat
RGBA4444 :: PixelFormat
ABGR4444 :: PixelFormat
BGRA4444 :: PixelFormat
ARGB1555 :: PixelFormat
RGBA5551 :: PixelFormat
ABGR1555 :: PixelFormat
BGRA5551 :: PixelFormat
RGB565 :: PixelFormat
BGR565 :: PixelFormat
RGB24 :: PixelFormat
BGR24 :: PixelFormat
RGB888 :: PixelFormat
RGBX8888 :: PixelFormat
BGR888 :: PixelFormat
BGRX8888 :: PixelFormat
ARGB8888 :: PixelFormat
RGBA8888 :: PixelFormat
ABGR8888 :: PixelFormat
BGRA8888 :: PixelFormat
ARGB2101010 :: PixelFormat
YV12 :: PixelFormat
IYUV :: PixelFormat
YUY2 :: PixelFormat
UYVY :: PixelFormat
YVYU :: PixelFormat
data SurfacePixelFormat
formatPalette :: MonadIO m => SurfacePixelFormat -> m (Maybe Palette)

-- | Set a range of colors in a palette.
--   
--   See <tt><a>SDL_SetPaletteColors</a></tt> for C documentation.
setPaletteColors :: MonadIO m => Palette -> (Vector (V4 Word8)) -> CInt -> m ()

-- | Convert the given the enumerated pixel format to a bpp value and RGBA
--   masks.
--   
--   See <tt><a>SDL_PixelFormatEnumToMasks</a></tt> for C documentation.
pixelFormatToMasks :: (MonadIO m) => PixelFormat -> m (CInt, V4 Word32)

-- | Convert a bpp value and RGBA masks to an enumerated pixel format.
--   
--   See <tt><a>SDL_MasksToPixelFormatEnum</a></tt> for C documentation.
masksToPixelFormat :: (MonadIO m) => CInt -> V4 Word32 -> m PixelFormat
data Texture

-- | Create a texture for a rendering context.
--   
--   See <tt><a>SDL_CreateTexture</a></tt> for C documentation.
createTexture :: (Functor m, MonadIO m) => Renderer -> PixelFormat -> TextureAccess -> V2 CInt -> m Texture

-- | Information to the GPU about how you will use a texture.
data TextureAccess

-- | Changes rarely, cannot be locked
TextureAccessStatic :: TextureAccess

-- | changes frequently, can be locked
TextureAccessStreaming :: TextureAccess

-- | Can be used as a render target
TextureAccessTarget :: TextureAccess

-- | Create a texture from an existing surface.
--   
--   See <tt><a>SDL_CreateTextureFromSurface</a></tt> for C documentation.
createTextureFromSurface :: (Functor m, MonadIO m) => Renderer -> Surface -> m Texture

-- | Updates texture rectangle with new pixel data.
--   
--   See <tt><a>SDL_UpdateTexture</a></tt> for C documentation.
updateTexture :: (Functor m, MonadIO m) => Texture -> Maybe (Rectangle CInt) -> ByteString -> CInt -> m Texture

-- | Destroy the specified texture.
--   
--   See <tt><a>SDL_DestroyTexture</a></tt> for the C documentation.
destroyTexture :: MonadIO m => Texture -> m ()

-- | Bind an OpenGL/ES/ES2 texture to the current context for use with when
--   rendering OpenGL primitives directly.
--   
--   See <tt><a>SDL_GL_BindTexture</a></tt> for C documentation.
glBindTexture :: (Functor m, MonadIO m) => Texture -> m ()

-- | Unbind an OpenGL/ES/ES2 texture from the current context.
--   
--   See <tt><a>SDL_GL_UnbindTexture</a></tt> for C documentation.
glUnbindTexture :: (Functor m, MonadIO m) => Texture -> m ()

-- | Get or set the additional alpha value multiplied into render copy
--   operations.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetTextureAlphaMod</a></tt> and
--   <tt><a>SDL_GetTextureAlphaMod</a></tt> for C documentation.
textureAlphaMod :: Texture -> StateVar Word8

-- | Get or set the blend mode used for texture copy operations.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetTextureBlendMode</a></tt> and
--   <tt><a>SDL_GetTextureBlendMode</a></tt> for C documentation.
textureBlendMode :: Texture -> StateVar BlendMode

-- | Blend modes used in <a>copy</a> and drawing operations.
data BlendMode

-- | No blending
BlendNone :: BlendMode

-- | Alpha blending.
--   
--   <pre>
--   dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
--   dstA = srcA + (dstA * (1-srcA))
--   </pre>
BlendAlphaBlend :: BlendMode

-- | Additive blending
--   
--   <pre>
--   dstRGB = (srcRGB * srcA) + dstRGB
--   dstA = dstA
--   </pre>
BlendAdditive :: BlendMode

-- | Color modulate
--   
--   @ dstRGB = srcRGB * dstRGB dstA = dstA
BlendMod :: BlendMode

-- | Get or set the additional color value multiplied into render copy
--   operations.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetTextureColorMod</a></tt> and
--   <tt><a>SDL_GetTextureColorMod</a></tt> for C documentation.
textureColorMod :: Texture -> StateVar (V3 Word8)

-- | Lock a portion of the texture for *write-only* pixel access.
--   
--   See <tt><a>SDL_LockTexture</a></tt> for C documentation.
lockTexture :: MonadIO m => Texture -> Maybe (Rectangle CInt) -> m (Ptr (), CInt)

-- | Unlock a texture, uploading the changes to video memory, if needed.
--   
--   <i>Warning</i>: See <a>Bug No. 1586</a> before using this function!
--   
--   See <tt><a>SDL_UnlockTexture</a></tt> for C documentation.
unlockTexture :: MonadIO m => Texture -> m ()

-- | Query the attributes of a texture.
--   
--   See <tt><a>SDL_QueryTexture</a></tt> for C documentation.
queryTexture :: MonadIO m => Texture -> m TextureInfo
data TextureInfo
TextureInfo :: PixelFormat -> TextureAccess -> CInt -> CInt -> TextureInfo

-- | Raw format of the texture; the actual format may differ, but pixel
--   transfers will use this format
[texturePixelFormat] :: TextureInfo -> PixelFormat

-- | The access available to the texture
[textureAccess] :: TextureInfo -> TextureAccess

-- | The width of the texture
[textureWidth] :: TextureInfo -> CInt

-- | The height of the texture
[textureHeight] :: TextureInfo -> CInt
data Rectangle a
Rectangle :: (Point V2 a) -> (V2 a) -> Rectangle a

-- | Get information about a rendering context.
--   
--   See <tt><a>SDL_GetRendererInfo</a></tt> for C documentation.
getRendererInfo :: MonadIO m => Renderer -> m RendererInfo

-- | Information about an instantiated <a>Renderer</a>.
data RendererInfo
RendererInfo :: Text -> RendererConfig -> Word32 -> [PixelFormat] -> CInt -> CInt -> RendererInfo

-- | The name of the renderer
[rendererInfoName] :: RendererInfo -> Text

-- | Supported renderer features
[rendererInfoFlags] :: RendererInfo -> RendererConfig

-- | The number of available texture formats
[rendererInfoNumTextureFormats] :: RendererInfo -> Word32

-- | The available texture formats
[rendererInfoTextureFormats] :: RendererInfo -> [PixelFormat]

-- | The maximum texture width
[rendererInfoMaxTextureWidth] :: RendererInfo -> CInt

-- | The maximum texture height
[rendererInfoMaxTextureHeight] :: RendererInfo -> CInt

-- | Enumerate all known render drivers on the system, and determine their
--   supported features.
--   
--   See <tt><a>SDL_GetRenderDriverInfo</a></tt> for C documentation.
getRenderDriverInfo :: MonadIO m => m [RendererInfo]
instance GHC.Show.Show SDL.Video.Renderer.RendererInfo
instance GHC.Read.Read SDL.Video.Renderer.RendererInfo
instance GHC.Classes.Ord SDL.Video.Renderer.RendererInfo
instance GHC.Generics.Generic SDL.Video.Renderer.RendererInfo
instance GHC.Classes.Eq SDL.Video.Renderer.RendererInfo
instance GHC.Show.Show SDL.Video.Renderer.RendererConfig
instance GHC.Read.Read SDL.Video.Renderer.RendererConfig
instance GHC.Classes.Ord SDL.Video.Renderer.RendererConfig
instance GHC.Generics.Generic SDL.Video.Renderer.RendererConfig
instance GHC.Classes.Eq SDL.Video.Renderer.RendererConfig
instance Data.Data.Data SDL.Video.Renderer.RendererConfig
instance GHC.Show.Show SDL.Video.Renderer.RendererType
instance GHC.Read.Read SDL.Video.Renderer.RendererType
instance GHC.Classes.Ord SDL.Video.Renderer.RendererType
instance GHC.Generics.Generic SDL.Video.Renderer.RendererType
instance GHC.Classes.Eq SDL.Video.Renderer.RendererType
instance GHC.Enum.Enum SDL.Video.Renderer.RendererType
instance Data.Data.Data SDL.Video.Renderer.RendererType
instance GHC.Enum.Bounded SDL.Video.Renderer.RendererType
instance GHC.Show.Show SDL.Video.Renderer.TextureInfo
instance GHC.Read.Read SDL.Video.Renderer.TextureInfo
instance GHC.Classes.Ord SDL.Video.Renderer.TextureInfo
instance GHC.Generics.Generic SDL.Video.Renderer.TextureInfo
instance GHC.Classes.Eq SDL.Video.Renderer.TextureInfo
instance GHC.Show.Show SDL.Video.Renderer.PixelFormat
instance GHC.Read.Read SDL.Video.Renderer.PixelFormat
instance GHC.Classes.Ord SDL.Video.Renderer.PixelFormat
instance GHC.Generics.Generic SDL.Video.Renderer.PixelFormat
instance GHC.Classes.Eq SDL.Video.Renderer.PixelFormat
instance GHC.Enum.Enum SDL.Video.Renderer.PixelFormat
instance Data.Data.Data SDL.Video.Renderer.PixelFormat
instance GHC.Enum.Bounded SDL.Video.Renderer.PixelFormat
instance GHC.Classes.Eq SDL.Video.Renderer.Texture
instance GHC.Show.Show a => GHC.Show.Show (SDL.Video.Renderer.Rectangle a)
instance GHC.Read.Read a => GHC.Read.Read (SDL.Video.Renderer.Rectangle a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (SDL.Video.Renderer.Rectangle a)
instance GHC.Generics.Generic (SDL.Video.Renderer.Rectangle a)
instance GHC.Base.Functor SDL.Video.Renderer.Rectangle
instance GHC.Classes.Eq a => GHC.Classes.Eq (SDL.Video.Renderer.Rectangle a)
instance GHC.Show.Show SDL.Video.Renderer.BlendMode
instance GHC.Read.Read SDL.Video.Renderer.BlendMode
instance GHC.Classes.Ord SDL.Video.Renderer.BlendMode
instance GHC.Generics.Generic SDL.Video.Renderer.BlendMode
instance GHC.Classes.Eq SDL.Video.Renderer.BlendMode
instance GHC.Enum.Enum SDL.Video.Renderer.BlendMode
instance Data.Data.Data SDL.Video.Renderer.BlendMode
instance GHC.Enum.Bounded SDL.Video.Renderer.BlendMode
instance GHC.Classes.Eq SDL.Video.Renderer.Palette
instance GHC.Classes.Eq SDL.Video.Renderer.SurfacePixelFormat
instance GHC.Show.Show SDL.Video.Renderer.TextureAccess
instance GHC.Read.Read SDL.Video.Renderer.TextureAccess
instance GHC.Classes.Ord SDL.Video.Renderer.TextureAccess
instance GHC.Generics.Generic SDL.Video.Renderer.TextureAccess
instance GHC.Classes.Eq SDL.Video.Renderer.TextureAccess
instance GHC.Enum.Enum SDL.Video.Renderer.TextureAccess
instance Data.Data.Data SDL.Video.Renderer.TextureAccess
instance GHC.Enum.Bounded SDL.Video.Renderer.TextureAccess
instance SDL.Internal.Numbered.FromNumber SDL.Video.Renderer.RendererConfig GHC.Word.Word32
instance SDL.Internal.Numbered.ToNumber SDL.Video.Renderer.RendererConfig GHC.Word.Word32
instance SDL.Internal.Numbered.FromNumber SDL.Video.Renderer.PixelFormat GHC.Word.Word32
instance SDL.Internal.Numbered.ToNumber SDL.Video.Renderer.PixelFormat GHC.Word.Word32
instance Foreign.Storable.Storable a => Foreign.Storable.Storable (SDL.Video.Renderer.Rectangle a)
instance SDL.Internal.Numbered.FromNumber SDL.Video.Renderer.BlendMode GHC.Word.Word32
instance SDL.Internal.Numbered.ToNumber SDL.Video.Renderer.BlendMode GHC.Word.Word32
instance SDL.Internal.Numbered.FromNumber SDL.Video.Renderer.TextureAccess Foreign.C.Types.CInt
instance SDL.Internal.Numbered.ToNumber SDL.Video.Renderer.TextureAccess Foreign.C.Types.CInt

module SDL.Video
data Window

-- | Create a window with the given title and configuration.
--   
--   Throws <tt>SDLException</tt> on failure.
createWindow :: MonadIO m => Text -> WindowConfig -> m Window

-- | Default configuration for windows. Use the record update syntax to
--   override any of the defaults.
--   
--   <pre>
--   <a>defaultWindow</a> = <a>WindowConfig</a>
--     { <a>windowBorder</a>       = True
--     , <a>windowHighDPI</a>      = False
--     , <a>windowInputGrabbed</a> = False
--     , <a>windowMode</a>         = <a>Windowed</a>
--     , <a>windowOpenGL</a>       = Nothing
--     , <a>windowPosition</a>     = <a>Wherever</a>
--     , <a>windowResizable</a>    = False
--     , <a>windowInitialSize</a>  = V2 800 600
--     , <a>windowVisible</a>      = True
--     }
--   </pre>
defaultWindow :: WindowConfig
data WindowConfig
WindowConfig :: Bool -> Bool -> Bool -> WindowMode -> Maybe OpenGLConfig -> WindowPosition -> Bool -> V2 CInt -> Bool -> WindowConfig

-- | Defaults to <a>True</a>.
[windowBorder] :: WindowConfig -> Bool

-- | Defaults to <a>False</a>. Can not be changed after window creation.
[windowHighDPI] :: WindowConfig -> Bool

-- | Defaults to <a>False</a>. Whether the mouse shall be confined to the
--   window.
[windowInputGrabbed] :: WindowConfig -> Bool

-- | Defaults to <a>Windowed</a>.
[windowMode] :: WindowConfig -> WindowMode

-- | Defaults to <a>Nothing</a>. Can not be changed after window creation.
[windowOpenGL] :: WindowConfig -> Maybe OpenGLConfig

-- | Defaults to <a>Wherever</a>.
[windowPosition] :: WindowConfig -> WindowPosition

-- | Defaults to <a>False</a>. Whether the window can be resized by the
--   user. It is still possible to programatically change the size by
--   changing <a>windowSize</a>.
[windowResizable] :: WindowConfig -> Bool

-- | Defaults to <tt>(800, 600)</tt>. If you set <a>windowHighDPI</a> flag,
--   window size in screen coordinates may differ from the size in pixels.
--   Use <a>glGetDrawableSize</a> to get size in pixels.
[windowInitialSize] :: WindowConfig -> V2 CInt

-- | Defaults to <a>True</a>.
[windowVisible] :: WindowConfig -> Bool
data WindowMode

-- | Real fullscreen with a video mode change
Fullscreen :: WindowMode

-- | Fake fullscreen that takes the size of the desktop
FullscreenDesktop :: WindowMode
Maximized :: WindowMode
Minimized :: WindowMode
Windowed :: WindowMode
data WindowPosition
Centered :: WindowPosition

-- | Let the window mananger decide where it's best to place the window.
Wherever :: WindowPosition
Absolute :: (Point V2 CInt) -> WindowPosition

-- | Destroy the given window. The <a>Window</a> handler may not be used
--   afterwards.
destroyWindow :: MonadIO m => Window -> m ()

-- | Hide a window.
--   
--   See <tt><a>SDL_HideWindow</a></tt> for C documentation.
hideWindow :: MonadIO m => Window -> m ()

-- | Raise the window above other windows and set the input focus.
--   
--   See <tt><a>SDL_RaiseWindow</a></tt> for C documentation.
raiseWindow :: MonadIO m => Window -> m ()

-- | Show a window.
--   
--   See <tt><a>SDL_ShowWindow</a></tt> for C documentation.
showWindow :: MonadIO m => Window -> m ()

-- | Get or set the minimum size of a window's client area.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetWindowMinimumSize</a></tt> and
--   <tt><a>SDL_GetWindowMinimumSize</a></tt> for C documentation.
windowMinimumSize :: Window -> StateVar (V2 CInt)

-- | Get or set the maximum size of a window's client area.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetWindowMaximumSize</a></tt> and
--   <tt><a>SDL_GetWindowMaximumSize</a></tt> for C documentation.
windowMaximumSize :: Window -> StateVar (V2 CInt)

-- | Get or set the size of a window's client area. Values beyond the
--   maximum supported size are clamped.
--   
--   If window was created with <a>windowHighDPI</a> flag, this size may
--   differ from the size in pixels. Use <a>glGetDrawableSize</a> to get
--   size in pixels.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetWindowSize</a></tt> and
--   <tt><a>SDL_GetWindowSize</a></tt> for C documentation.
windowSize :: Window -> StateVar (V2 CInt)

-- | Get or set if the window should have a border.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
windowBordered :: Window -> StateVar Bool

-- | Get or set the window's brightness, where 0.0 is completely dark and
--   1.0 is normal brightness.
--   
--   Throws <tt>SDLException</tt> if the hardware does not support gamma
--   correction, or if the system has run out of memory.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
windowBrightness :: Window -> StateVar Float

-- | Gets or sets the gamma ramp for the display that owns a given window.
--   
--   Note that the data for the gamma ramp - the <a>V3</a> (<a>Vector</a>
--   <a>Word16</a>) - must contain 256 element arrays. This triple is a set
--   of translation vectors for each of the 16-bit red, green and blue
--   channels.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   Despite the name and signature, this method retrieves the gamma ramp
--   of the entire display, not an individual window. A window is
--   considered to be owned by the display that contains the window's
--   center pixel.
windowGammaRamp :: Window -> StateVar (V3 (Vector Word16))

-- | Get or set whether the mouse shall be confined to the window.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
windowGrab :: Window -> StateVar Bool

-- | Change between window modes.
--   
--   Throws <tt>SDLException</tt> on failure.
setWindowMode :: MonadIO m => Window -> WindowMode -> m ()

-- | Get the position of the window.
getWindowAbsolutePosition :: MonadIO m => Window -> m (V2 CInt)

-- | Set the position of the window.
setWindowPosition :: MonadIO m => Window -> WindowPosition -> m ()

-- | Get or set the title of the window. If the window has no title, then
--   an empty string is returned.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetWindowTitle</a></tt> and
--   <tt><a>SDL_GetWindowTitle</a></tt> for C documentation.
windowTitle :: Window -> StateVar Text

-- | Get or set the pointer to arbitrary user data associated with the
--   given window and name.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
windowData :: Window -> CString -> StateVar (Ptr ())

-- | Retrieve the configuration of the given window.
--   
--   Note that <a>Nothing</a> will be returned instead of potential OpenGL
--   parameters used during the creation of the window.
getWindowConfig :: MonadIO m => Window -> m WindowConfig

-- | Get the pixel format that is used for the given window.
getWindowPixelFormat :: MonadIO m => Window -> m PixelFormat
data PixelFormat
Unknown :: PixelFormat
Index1LSB :: PixelFormat
Index1MSB :: PixelFormat
Index4LSB :: PixelFormat
Index4MSB :: PixelFormat
Index8 :: PixelFormat
RGB332 :: PixelFormat
RGB444 :: PixelFormat
RGB555 :: PixelFormat
BGR555 :: PixelFormat
ARGB4444 :: PixelFormat
RGBA4444 :: PixelFormat
ABGR4444 :: PixelFormat
BGRA4444 :: PixelFormat
ARGB1555 :: PixelFormat
RGBA5551 :: PixelFormat
ABGR1555 :: PixelFormat
BGRA5551 :: PixelFormat
RGB565 :: PixelFormat
BGR565 :: PixelFormat
RGB24 :: PixelFormat
BGR24 :: PixelFormat
RGB888 :: PixelFormat
RGBX8888 :: PixelFormat
BGR888 :: PixelFormat
BGRX8888 :: PixelFormat
ARGB8888 :: PixelFormat
RGBA8888 :: PixelFormat
ABGR8888 :: PixelFormat
BGRA8888 :: PixelFormat
ARGB2101010 :: PixelFormat
YV12 :: PixelFormat
IYUV :: PixelFormat
YUY2 :: PixelFormat
UYVY :: PixelFormat
YVYU :: PixelFormat
createRenderer :: MonadIO m => Window -> CInt -> RendererConfig -> m Renderer

-- | Create a 2D software rendering context for the given surface.
--   
--   See <tt><a>https://wiki.libsdl.org/SDL_CreateSoftwareRenderer</a></tt>
createSoftwareRenderer :: MonadIO m => Surface -> m Renderer
destroyRenderer :: MonadIO m => Renderer -> m ()

-- | Get the text from the clipboard.
--   
--   Throws <tt>SDLException</tt> on failure.
getClipboardText :: MonadIO m => m Text

-- | Checks if the clipboard exists, and has some text in it.
hasClipboardText :: MonadIO m => m Bool

-- | Replace the contents of the clipboard with the given text.
--   
--   Throws <tt>SDLException</tt> on failure.
setClipboardText :: MonadIO m => Text -> m ()

-- | Throws <tt>SDLException</tt> on failure.
getDisplays :: MonadIO m => m [Display]
data Display
Display :: String -> Point V2 CInt -> V2 CInt -> [DisplayMode] -> Display
[displayName] :: Display -> String

-- | Position of the desktop area represented by the display, with the
--   primary display located at <tt>(0, 0)</tt>.
[displayBoundsPosition] :: Display -> Point V2 CInt

-- | Size of the desktop area represented by the display.
[displayBoundsSize] :: Display -> V2 CInt
[displayModes] :: Display -> [DisplayMode]
data DisplayMode
DisplayMode :: PixelFormat -> V2 CInt -> CInt -> DisplayMode
[displayModeFormat] :: DisplayMode -> PixelFormat
[displayModeSize] :: DisplayMode -> V2 CInt

-- | Display's refresh rate in hertz, or <tt>0</tt> if unspecified.
[displayModeRefreshRate] :: DisplayMode -> CInt
data VideoDriver
VideoDriver :: String -> VideoDriver
[videoDriverName] :: VideoDriver -> String

-- | Get or set whether to allow the screen to be blanked by a screen
--   saver.
--   
--   Screen savers are re-enabled, if needed, when SDL quits.
screenSaverEnabled :: StateVar Bool

-- | Show a simple message box with the given title and a message. Consider
--   writing your messages to <tt>stderr</tt> too.
--   
--   Throws <tt>SDLException</tt> if there are no available video targets.
showSimpleMessageBox :: MonadIO m => Maybe Window -> MessageKind -> Text -> Text -> m ()
data MessageKind
Error :: MessageKind
Warning :: MessageKind
Information :: MessageKind
instance GHC.Show.Show SDL.Video.MessageKind
instance GHC.Read.Read SDL.Video.MessageKind
instance GHC.Classes.Ord SDL.Video.MessageKind
instance GHC.Generics.Generic SDL.Video.MessageKind
instance GHC.Classes.Eq SDL.Video.MessageKind
instance GHC.Enum.Enum SDL.Video.MessageKind
instance Data.Data.Data SDL.Video.MessageKind
instance GHC.Enum.Bounded SDL.Video.MessageKind
instance GHC.Show.Show SDL.Video.VideoDriver
instance GHC.Read.Read SDL.Video.VideoDriver
instance GHC.Classes.Ord SDL.Video.VideoDriver
instance GHC.Generics.Generic SDL.Video.VideoDriver
instance GHC.Classes.Eq SDL.Video.VideoDriver
instance Data.Data.Data SDL.Video.VideoDriver
instance GHC.Show.Show SDL.Video.Display
instance GHC.Read.Read SDL.Video.Display
instance GHC.Classes.Ord SDL.Video.Display
instance GHC.Generics.Generic SDL.Video.Display
instance GHC.Classes.Eq SDL.Video.Display
instance GHC.Show.Show SDL.Video.DisplayMode
instance GHC.Read.Read SDL.Video.DisplayMode
instance GHC.Classes.Ord SDL.Video.DisplayMode
instance GHC.Generics.Generic SDL.Video.DisplayMode
instance GHC.Classes.Eq SDL.Video.DisplayMode
instance GHC.Show.Show SDL.Video.WindowConfig
instance GHC.Read.Read SDL.Video.WindowConfig
instance GHC.Classes.Ord SDL.Video.WindowConfig
instance GHC.Generics.Generic SDL.Video.WindowConfig
instance GHC.Classes.Eq SDL.Video.WindowConfig
instance GHC.Show.Show SDL.Video.WindowPosition
instance GHC.Read.Read SDL.Video.WindowPosition
instance GHC.Classes.Ord SDL.Video.WindowPosition
instance GHC.Generics.Generic SDL.Video.WindowPosition
instance GHC.Classes.Eq SDL.Video.WindowPosition
instance GHC.Show.Show SDL.Video.WindowMode
instance GHC.Read.Read SDL.Video.WindowMode
instance GHC.Classes.Ord SDL.Video.WindowMode
instance GHC.Generics.Generic SDL.Video.WindowMode
instance GHC.Classes.Eq SDL.Video.WindowMode
instance GHC.Enum.Enum SDL.Video.WindowMode
instance Data.Data.Data SDL.Video.WindowMode
instance GHC.Enum.Bounded SDL.Video.WindowMode
instance SDL.Internal.Numbered.ToNumber SDL.Video.MessageKind GHC.Word.Word32
instance SDL.Internal.Numbered.ToNumber SDL.Video.WindowMode GHC.Word.Word32
instance SDL.Internal.Numbered.FromNumber SDL.Video.WindowMode GHC.Word.Word32

module SDL.Input.Mouse
data LocationMode
AbsoluteLocation :: LocationMode
RelativeLocation :: LocationMode

-- | Sets the current relative mouse mode.
--   
--   When relative mouse mode is enabled, cursor is hidden and mouse
--   position will not change. However, you will be delivered relative
--   mouse position change events.
setMouseLocationMode :: (Functor m, MonadIO m) => LocationMode -> m LocationMode

-- | Check which mouse location mode is currently active.
getMouseLocationMode :: MonadIO m => m LocationMode
data MouseButton
ButtonLeft :: MouseButton
ButtonMiddle :: MouseButton
ButtonRight :: MouseButton
ButtonX1 :: MouseButton
ButtonX2 :: MouseButton

-- | An unknown mouse button.
ButtonExtra :: !Int -> MouseButton

-- | Identifies what kind of mouse-like device this is.
data MouseDevice

-- | An actual mouse. The number identifies which mouse.
Mouse :: !Int -> MouseDevice

-- | Some sort of touch device.
Touch :: MouseDevice

-- | Identifies mouse scroll direction.
data MouseScrollDirection
ScrollNormal :: MouseScrollDirection
ScrollFlipped :: MouseScrollDirection

-- | Return proper mouse location depending on mouse mode
getModalMouseLocation :: MonadIO m => m ModalLocation

-- | Retrieve the current location of the mouse, relative to the currently
--   focused window.
getAbsoluteMouseLocation :: MonadIO m => m (Point V2 CInt)

-- | Retrieve mouse motion
getRelativeMouseLocation :: MonadIO m => m (V2 CInt)

-- | Retrieve a mapping of which buttons are currently held down.
getMouseButtons :: MonadIO m => m (MouseButton -> Bool)
data WarpMouseOrigin

-- | Move the mouse pointer within a given <a>Window</a>.
WarpInWindow :: Window -> WarpMouseOrigin

-- | Move the mouse pointer within whichever <a>Window</a> currently has
--   focus.
WarpCurrentFocus :: WarpMouseOrigin

-- | Move the mouse pointer in global screen space.
WarpGlobal :: WarpMouseOrigin

-- | Move the current location of a mouse pointer. The
--   <a>WarpMouseOrigin</a> specifies the origin for the given warp
--   coordinates.
warpMouse :: MonadIO m => WarpMouseOrigin -> Point V2 CInt -> m ()

-- | Get or set whether the cursor is currently visible.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_ShowCursor</a></tt> and <tt><a>SDL_HideCursor</a></tt>
--   for C documentation.
cursorVisible :: StateVar Bool
data Cursor

-- | Get or set the currently active cursor. You can create new
--   <a>Cursor</a>s with <a>createCursor</a>.
--   
--   This <a>StateVar</a> can be modified using <a>$=</a> and the current
--   value retrieved with <a>get</a>.
--   
--   See <tt><a>SDL_SetCursor</a></tt> and <tt><a>SDL_GetCursor</a></tt>
--   for C documentation.
activeCursor :: StateVar Cursor

-- | Create a cursor using the specified bitmap data and mask (in MSB
--   format).
createCursor :: MonadIO m => Vector Bool -> Vector Bool -> V2 CInt -> Point V2 CInt -> m Cursor

-- | Free a cursor created with <a>createCursor</a> and
--   <tt>createColorCusor</tt>.
--   
--   See <tt><a>SDL_FreeCursor</a></tt> for C documentation.
freeCursor :: MonadIO m => Cursor -> m ()

-- | Create a color cursor.
--   
--   See <tt><a>SDL_CreateColorCursor</a></tt> for C documentation.
createColorCursor :: MonadIO m => Surface -> Point V2 CInt -> m Cursor
instance GHC.Classes.Eq SDL.Input.Mouse.Cursor
instance GHC.Show.Show SDL.Input.Mouse.WarpMouseOrigin
instance GHC.Classes.Ord SDL.Input.Mouse.WarpMouseOrigin
instance GHC.Generics.Generic SDL.Input.Mouse.WarpMouseOrigin
instance GHC.Classes.Eq SDL.Input.Mouse.WarpMouseOrigin
instance Data.Data.Data SDL.Input.Mouse.WarpMouseOrigin
instance GHC.Show.Show SDL.Input.Mouse.MouseScrollDirection
instance GHC.Read.Read SDL.Input.Mouse.MouseScrollDirection
instance GHC.Classes.Ord SDL.Input.Mouse.MouseScrollDirection
instance GHC.Generics.Generic SDL.Input.Mouse.MouseScrollDirection
instance GHC.Enum.Enum SDL.Input.Mouse.MouseScrollDirection
instance GHC.Classes.Eq SDL.Input.Mouse.MouseScrollDirection
instance Data.Data.Data SDL.Input.Mouse.MouseScrollDirection
instance GHC.Enum.Bounded SDL.Input.Mouse.MouseScrollDirection
instance GHC.Show.Show SDL.Input.Mouse.MouseDevice
instance GHC.Read.Read SDL.Input.Mouse.MouseDevice
instance GHC.Classes.Ord SDL.Input.Mouse.MouseDevice
instance GHC.Generics.Generic SDL.Input.Mouse.MouseDevice
instance GHC.Classes.Eq SDL.Input.Mouse.MouseDevice
instance Data.Data.Data SDL.Input.Mouse.MouseDevice
instance GHC.Show.Show SDL.Input.Mouse.MouseButton
instance GHC.Read.Read SDL.Input.Mouse.MouseButton
instance GHC.Classes.Ord SDL.Input.Mouse.MouseButton
instance GHC.Generics.Generic SDL.Input.Mouse.MouseButton
instance GHC.Classes.Eq SDL.Input.Mouse.MouseButton
instance Data.Data.Data SDL.Input.Mouse.MouseButton
instance GHC.Show.Show SDL.Input.Mouse.ModalLocation
instance GHC.Read.Read SDL.Input.Mouse.ModalLocation
instance GHC.Classes.Ord SDL.Input.Mouse.ModalLocation
instance GHC.Generics.Generic SDL.Input.Mouse.ModalLocation
instance GHC.Classes.Eq SDL.Input.Mouse.ModalLocation
instance GHC.Show.Show SDL.Input.Mouse.LocationMode
instance GHC.Read.Read SDL.Input.Mouse.LocationMode
instance GHC.Classes.Ord SDL.Input.Mouse.LocationMode
instance GHC.Generics.Generic SDL.Input.Mouse.LocationMode
instance GHC.Enum.Enum SDL.Input.Mouse.LocationMode
instance GHC.Classes.Eq SDL.Input.Mouse.LocationMode
instance Data.Data.Data SDL.Input.Mouse.LocationMode
instance GHC.Enum.Bounded SDL.Input.Mouse.LocationMode
instance SDL.Internal.Numbered.FromNumber SDL.Input.Mouse.MouseScrollDirection GHC.Word.Word32
instance SDL.Internal.Numbered.FromNumber SDL.Input.Mouse.MouseDevice GHC.Word.Word32
instance SDL.Internal.Numbered.FromNumber SDL.Input.Mouse.MouseButton GHC.Word.Word8
instance SDL.Internal.Numbered.ToNumber SDL.Input.Mouse.MouseButton GHC.Word.Word8

module SDL.Input


-- | <a>SDL.Event</a> exports an interface for working with the SDL event
--   model. Event handling allows your application to receive input from
--   the user. Internally, SDL stores all the events waiting to be handled
--   in an event queue. Using functions like <a>pollEvent</a> and
--   <a>waitEvent</a> you can observe and handle waiting input events.
--   
--   The event queue itself is composed of a series of <a>Event</a> values,
--   one for each waiting event. <a>Event</a> values are read from the
--   queue with the <a>pollEvent</a> function and it is then up to the
--   application to process the information stored with them.
module SDL.Event

-- | Poll for currently pending events. You can only call this function in
--   the thread that set the video mode.
pollEvent :: MonadIO m => m (Maybe Event)

-- | Clear the event queue by polling for all pending events.
pollEvents :: (Functor m, MonadIO m) => m [Event]

-- | Run a monadic computation, accumulating over all known <a>Event</a>s.
--   
--   This can be useful when used with a state monad, allowing you to fold
--   all events together.
mapEvents :: MonadIO m => (Event -> m ()) -> m ()

-- | Pump the event loop, gathering events from the input devices.
--   
--   This function updates the event queue and internal input device state.
--   
--   This should only be run in the thread that initialized the video
--   subsystem, and for extra safety, you should consider only doing those
--   things on the main thread in any case.
--   
--   <a>pumpEvents</a> gathers all the pending input information from
--   devices and places it in the event queue. Without calls to
--   <a>pumpEvents</a> no events would ever be placed on the queue. Often
--   the need for calls to <a>pumpEvents</a> is hidden from the user since
--   <a>pollEvent</a> and <a>waitEvent</a> implicitly call
--   <a>pumpEvents</a>. However, if you are not polling or waiting for
--   events (e.g. you are filtering them), then you must call
--   <a>pumpEvents</a> to force an event queue update.
--   
--   See <tt><a>SDL_PumpEvents</a></tt> for C documentation.
pumpEvents :: MonadIO m => m ()

-- | Wait indefinitely for the next available event.
waitEvent :: MonadIO m => m Event

-- | Wait until the specified timeout for the next available amount.
waitEventTimeout :: MonadIO m => CInt -> m (Maybe Event)

-- | A user defined event structure that has been registered with SDL.
--   
--   Use <a>registerEvent</a>, below, to obtain an instance.
data RegisteredEventType a
RegisteredEventType :: a -> IO EventPushResult -> Event -> IO (Maybe a) -> RegisteredEventType a
[pushRegisteredEvent] :: RegisteredEventType a -> a -> IO EventPushResult
[getRegisteredEvent] :: RegisteredEventType a -> Event -> IO (Maybe a)

-- | A record used to convert between SDL Events and user-defined data
--   structures.
--   
--   Used for <a>registerEvent</a>, below.
data RegisteredEventData
RegisteredEventData :: !(Maybe Window) -> !Int32 -> !(Ptr ()) -> !(Ptr ()) -> RegisteredEventData

-- | The associated <a>Window</a>.
[registeredEventWindow] :: RegisteredEventData -> !(Maybe Window)

-- | User defined event code.
[registeredEventCode] :: RegisteredEventData -> !Int32

-- | User defined data pointer.
[registeredEventData1] :: RegisteredEventData -> !(Ptr ())

-- | User defined data pointer.
[registeredEventData2] :: RegisteredEventData -> !(Ptr ())

-- | Possible results of an attempted push of an event to the queue.
data EventPushResult
EventPushSuccess :: EventPushResult
EventPushFiltered :: EventPushResult
EventPushFailure :: Text -> EventPushResult

-- | A registered event with no associated data.
--   
--   This is a resonable baseline to modify for converting to
--   <a>RegisteredEventData</a>.
emptyRegisteredEvent :: RegisteredEventData

-- | Register a new event type with SDL.
--   
--   Provide functions that convert between <a>UserEventData</a> and your
--   structure. You can then use <a>pushRegisteredEvent</a> to add a custom
--   event of the registered type to the queue, and
--   <a>getRegisteredEvent</a> to test for such events in the main loop.
registerEvent :: MonadIO m => (RegisteredEventData -> Timestamp -> IO (Maybe a)) -> (a -> IO RegisteredEventData) -> m (Maybe (RegisteredEventType a))

-- | An <a>EventWatchCallback</a> can process and respond to an event when
--   it is added to the event queue.
type EventWatchCallback = Event -> IO ()
data EventWatch

-- | Trigger an <a>EventWatchCallback</a> when an event is added to the SDL
--   event queue.
--   
--   See <tt><a>https://wiki.libsdl.org/SDL_AddEventWatch</a></tt> for C
--   documentation.
addEventWatch :: MonadIO m => EventWatchCallback -> m EventWatch

-- | Remove an <a>EventWatch</a>.
--   
--   See <tt><a>https://wiki.libsdl.org/SDL_DelEventWatch</a></tt> for C
--   documentation.
delEventWatch :: MonadIO m => EventWatch -> m ()

-- | A single SDL event. This event occured at <a>eventTimestamp</a> and
--   carries data under <a>eventPayload</a>.
data Event
Event :: Timestamp -> EventPayload -> Event

-- | The time the event occured.
[eventTimestamp] :: Event -> Timestamp

-- | Data pertaining to this event.
[eventPayload] :: Event -> EventPayload
type Timestamp = Word32

-- | An enumeration of all possible SDL event types. This data type pairs
--   up event types with their payload, where possible.
data EventPayload
WindowShownEvent :: !WindowShownEventData -> EventPayload
WindowHiddenEvent :: !WindowHiddenEventData -> EventPayload
WindowExposedEvent :: !WindowExposedEventData -> EventPayload
WindowMovedEvent :: !WindowMovedEventData -> EventPayload
WindowResizedEvent :: !WindowResizedEventData -> EventPayload
WindowSizeChangedEvent :: !WindowSizeChangedEventData -> EventPayload
WindowMinimizedEvent :: !WindowMinimizedEventData -> EventPayload
WindowMaximizedEvent :: !WindowMaximizedEventData -> EventPayload
WindowRestoredEvent :: !WindowRestoredEventData -> EventPayload
WindowGainedMouseFocusEvent :: !WindowGainedMouseFocusEventData -> EventPayload
WindowLostMouseFocusEvent :: !WindowLostMouseFocusEventData -> EventPayload
WindowGainedKeyboardFocusEvent :: !WindowGainedKeyboardFocusEventData -> EventPayload
WindowLostKeyboardFocusEvent :: !WindowLostKeyboardFocusEventData -> EventPayload
WindowClosedEvent :: !WindowClosedEventData -> EventPayload
KeyboardEvent :: !KeyboardEventData -> EventPayload
TextEditingEvent :: !TextEditingEventData -> EventPayload
TextInputEvent :: !TextInputEventData -> EventPayload
KeymapChangedEvent :: EventPayload
MouseMotionEvent :: !MouseMotionEventData -> EventPayload
MouseButtonEvent :: !MouseButtonEventData -> EventPayload
MouseWheelEvent :: !MouseWheelEventData -> EventPayload
JoyAxisEvent :: !JoyAxisEventData -> EventPayload
JoyBallEvent :: !JoyBallEventData -> EventPayload
JoyHatEvent :: !JoyHatEventData -> EventPayload
JoyButtonEvent :: !JoyButtonEventData -> EventPayload
JoyDeviceEvent :: !JoyDeviceEventData -> EventPayload
ControllerAxisEvent :: !ControllerAxisEventData -> EventPayload
ControllerButtonEvent :: !ControllerButtonEventData -> EventPayload
ControllerDeviceEvent :: !ControllerDeviceEventData -> EventPayload
AudioDeviceEvent :: !AudioDeviceEventData -> EventPayload
QuitEvent :: EventPayload
UserEvent :: !UserEventData -> EventPayload
SysWMEvent :: !SysWMEventData -> EventPayload
TouchFingerEvent :: !TouchFingerEventData -> EventPayload
TouchFingerMotionEvent :: !TouchFingerMotionEventData -> EventPayload
MultiGestureEvent :: !MultiGestureEventData -> EventPayload
DollarGestureEvent :: !DollarGestureEventData -> EventPayload
DropEvent :: !DropEventData -> EventPayload
ClipboardUpdateEvent :: EventPayload
UnknownEvent :: !UnknownEventData -> EventPayload

-- | A window has been shown.
newtype WindowShownEventData
WindowShownEventData :: Window -> WindowShownEventData

-- | The associated <a>Window</a>.
[windowShownEventWindow] :: WindowShownEventData -> Window

-- | A window has been hidden.
newtype WindowHiddenEventData
WindowHiddenEventData :: Window -> WindowHiddenEventData

-- | The associated <a>Window</a>.
[windowHiddenEventWindow] :: WindowHiddenEventData -> Window

-- | A part of a window has been exposed - where exposure means to become
--   visible (for example, an overlapping window no longer overlaps with
--   the window).
newtype WindowExposedEventData
WindowExposedEventData :: Window -> WindowExposedEventData

-- | The associated <a>Window</a>.
[windowExposedEventWindow] :: WindowExposedEventData -> Window

-- | A <a>Window</a> has been moved.
data WindowMovedEventData
WindowMovedEventData :: !Window -> !(Point V2 Int32) -> WindowMovedEventData

-- | The associated <a>Window</a>.
[windowMovedEventWindow] :: WindowMovedEventData -> !Window

-- | The new position of the <a>Window</a>.
[windowMovedEventPosition] :: WindowMovedEventData -> !(Point V2 Int32)

-- | Window has been resized. This is event is always preceded by
--   <a>WindowSizeChangedEvent</a>.
data WindowResizedEventData
WindowResizedEventData :: !Window -> !(V2 Int32) -> WindowResizedEventData

-- | The associated <a>Window</a>.
[windowResizedEventWindow] :: WindowResizedEventData -> !Window

-- | The new size of the <a>Window</a>.
[windowResizedEventSize] :: WindowResizedEventData -> !(V2 Int32)

-- | The window size has changed, either as a result of an API call or
--   through the system or user changing the window size; this event is
--   followed by <a>WindowResizedEvent</a> if the size was changed by an
--   external event, i.e. the user or the window manager.
data WindowSizeChangedEventData
WindowSizeChangedEventData :: !Window -> !(V2 Int32) -> WindowSizeChangedEventData

-- | The associated <a>Window</a>.
[windowSizeChangedEventWindow] :: WindowSizeChangedEventData -> !Window

-- | The new size of the <a>Window</a>.
[windowSizeChangedEventSize] :: WindowSizeChangedEventData -> !(V2 Int32)

-- | The window has been minimized.
newtype WindowMinimizedEventData
WindowMinimizedEventData :: Window -> WindowMinimizedEventData

-- | The associated <a>Window</a>.
[windowMinimizedEventWindow] :: WindowMinimizedEventData -> Window

-- | The window has been maximized.
newtype WindowMaximizedEventData
WindowMaximizedEventData :: Window -> WindowMaximizedEventData

-- | The associated <a>Window</a>.
[windowMaximizedEventWindow] :: WindowMaximizedEventData -> Window

-- | The window has been restored to normal size and position.
newtype WindowRestoredEventData
WindowRestoredEventData :: Window -> WindowRestoredEventData

-- | The associated <a>Window</a>.
[windowRestoredEventWindow] :: WindowRestoredEventData -> Window

-- | The window has gained mouse focus.
newtype WindowGainedMouseFocusEventData
WindowGainedMouseFocusEventData :: Window -> WindowGainedMouseFocusEventData

-- | The associated <a>Window</a>.
[windowGainedMouseFocusEventWindow] :: WindowGainedMouseFocusEventData -> Window

-- | The window has lost mouse focus.
newtype WindowLostMouseFocusEventData
WindowLostMouseFocusEventData :: Window -> WindowLostMouseFocusEventData

-- | The associated <a>Window</a>.
[windowLostMouseFocusEventWindow] :: WindowLostMouseFocusEventData -> Window

-- | The window has gained keyboard focus.
newtype WindowGainedKeyboardFocusEventData
WindowGainedKeyboardFocusEventData :: Window -> WindowGainedKeyboardFocusEventData

-- | The associated <a>Window</a>.
[windowGainedKeyboardFocusEventWindow] :: WindowGainedKeyboardFocusEventData -> Window

-- | The window has lost keyboard focus.
newtype WindowLostKeyboardFocusEventData
WindowLostKeyboardFocusEventData :: Window -> WindowLostKeyboardFocusEventData

-- | The associated <a>Window</a>.
[windowLostKeyboardFocusEventWindow] :: WindowLostKeyboardFocusEventData -> Window

-- | The window manager requests that the window be closed.
newtype WindowClosedEventData
WindowClosedEventData :: Window -> WindowClosedEventData

-- | The associated <a>Window</a>.
[windowClosedEventWindow] :: WindowClosedEventData -> Window

-- | A video driver dependent system event
newtype SysWMEventData
SysWMEventData :: SysWMmsg -> SysWMEventData
[sysWMEventMsg] :: SysWMEventData -> SysWMmsg

-- | A keyboard key has been pressed or released.
data KeyboardEventData
KeyboardEventData :: !(Maybe Window) -> !InputMotion -> !Bool -> !Keysym -> KeyboardEventData

-- | The <a>Window</a> with keyboard focus, if any.
[keyboardEventWindow] :: KeyboardEventData -> !(Maybe Window)

-- | Whether the key was pressed or released.
[keyboardEventKeyMotion] :: KeyboardEventData -> !InputMotion

-- | <a>True</a> if this is a repeating key press from the user holding the
--   key down.
[keyboardEventRepeat] :: KeyboardEventData -> !Bool

-- | A description of the key that this event pertains to.
[keyboardEventKeysym] :: KeyboardEventData -> !Keysym

-- | Keyboard text editing event information.
data TextEditingEventData
TextEditingEventData :: !(Maybe Window) -> !Text -> !Int32 -> !Int32 -> TextEditingEventData

-- | The <a>Window</a> with keyboard focus, if any.
[textEditingEventWindow] :: TextEditingEventData -> !(Maybe Window)

-- | The editing text.
[textEditingEventText] :: TextEditingEventData -> !Text

-- | The location to begin editing from.
[textEditingEventStart] :: TextEditingEventData -> !Int32

-- | The number of characters to edit from the start point.
[textEditingEventLength] :: TextEditingEventData -> !Int32

-- | Keyboard text input event information.
data TextInputEventData
TextInputEventData :: !(Maybe Window) -> !Text -> TextInputEventData

-- | The <a>Window</a> with keyboard focus, if any.
[textInputEventWindow] :: TextInputEventData -> !(Maybe Window)

-- | The input text.
[textInputEventText] :: TextInputEventData -> !Text

-- | A mouse or pointer device was moved.
data MouseMotionEventData
MouseMotionEventData :: !(Maybe Window) -> !MouseDevice -> ![MouseButton] -> !(Point V2 Int32) -> !(V2 Int32) -> MouseMotionEventData

-- | The <a>Window</a> with mouse focus, if any.
[mouseMotionEventWindow] :: MouseMotionEventData -> !(Maybe Window)

-- | The <a>MouseDevice</a> that was moved.
[mouseMotionEventWhich] :: MouseMotionEventData -> !MouseDevice

-- | A collection of <a>MouseButton</a>s that are currently held down.
[mouseMotionEventState] :: MouseMotionEventData -> ![MouseButton]

-- | The new position of the mouse.
[mouseMotionEventPos] :: MouseMotionEventData -> !(Point V2 Int32)

-- | The relative mouse motion of the mouse.
[mouseMotionEventRelMotion] :: MouseMotionEventData -> !(V2 Int32)

-- | A mouse or pointer device button was pressed or released.
data MouseButtonEventData
MouseButtonEventData :: !(Maybe Window) -> !InputMotion -> !MouseDevice -> !MouseButton -> !Word8 -> !(Point V2 Int32) -> MouseButtonEventData

-- | The <a>Window</a> with mouse focus, if any.
[mouseButtonEventWindow] :: MouseButtonEventData -> !(Maybe Window)

-- | Whether the button was pressed or released.
[mouseButtonEventMotion] :: MouseButtonEventData -> !InputMotion

-- | The <a>MouseDevice</a> whose button was pressed or released.
[mouseButtonEventWhich] :: MouseButtonEventData -> !MouseDevice

-- | The button that was pressed or released.
[mouseButtonEventButton] :: MouseButtonEventData -> !MouseButton

-- | The amount of clicks. 1 for a single-click, 2 for a double-click, etc.
[mouseButtonEventClicks] :: MouseButtonEventData -> !Word8

-- | The coordinates of the mouse click.
[mouseButtonEventPos] :: MouseButtonEventData -> !(Point V2 Int32)

-- | Mouse wheel event information.
data MouseWheelEventData
MouseWheelEventData :: !(Maybe Window) -> !MouseDevice -> !(V2 Int32) -> !MouseScrollDirection -> MouseWheelEventData

-- | The <a>Window</a> with mouse focus, if any.
[mouseWheelEventWindow] :: MouseWheelEventData -> !(Maybe Window)

-- | The <a>MouseDevice</a> whose wheel was scrolled.
[mouseWheelEventWhich] :: MouseWheelEventData -> !MouseDevice

-- | The amount scrolled.
[mouseWheelEventPos] :: MouseWheelEventData -> !(V2 Int32)

-- | The scroll direction mode.
[mouseWheelEventDirection] :: MouseWheelEventData -> !MouseScrollDirection

-- | Joystick axis motion event information
data JoyAxisEventData
JoyAxisEventData :: !JoystickID -> !Word8 -> !Int16 -> JoyAxisEventData

-- | The instance id of the joystick that reported the event.
[joyAxisEventWhich] :: JoyAxisEventData -> !JoystickID

-- | The index of the axis that changed.
[joyAxisEventAxis] :: JoyAxisEventData -> !Word8

-- | The current position of the axis, ranging between -32768 and 32767.
[joyAxisEventValue] :: JoyAxisEventData -> !Int16

-- | Joystick trackball motion event information.
data JoyBallEventData
JoyBallEventData :: !JoystickID -> !Word8 -> !(V2 Int16) -> JoyBallEventData

-- | The instance id of the joystick that reported the event.
[joyBallEventWhich] :: JoyBallEventData -> !JoystickID

-- | The index of the trackball that changed.
[joyBallEventBall] :: JoyBallEventData -> !Word8

-- | The relative motion of the trackball.
[joyBallEventRelMotion] :: JoyBallEventData -> !(V2 Int16)

-- | Joystick hat position change event information
data JoyHatEventData
JoyHatEventData :: !JoystickID -> !Word8 -> !JoyHatPosition -> JoyHatEventData

-- | The instance id of the joystick that reported the event.
[joyHatEventWhich] :: JoyHatEventData -> !JoystickID

-- | The index of the hat that changed.
[joyHatEventHat] :: JoyHatEventData -> !Word8

-- | The new position of the hat.
[joyHatEventValue] :: JoyHatEventData -> !JoyHatPosition

-- | Joystick button event information.
data JoyButtonEventData
JoyButtonEventData :: !JoystickID -> !Word8 -> !JoyButtonState -> JoyButtonEventData

-- | The instance id of the joystick that reported the event.
[joyButtonEventWhich] :: JoyButtonEventData -> !JoystickID

-- | The index of the button that changed.
[joyButtonEventButton] :: JoyButtonEventData -> !Word8

-- | The state of the button.
[joyButtonEventState] :: JoyButtonEventData -> !JoyButtonState

-- | Joystick device event information.
data JoyDeviceEventData
JoyDeviceEventData :: !JoyDeviceConnection -> !Int32 -> JoyDeviceEventData

-- | Was the device added or removed?
[joyDeviceEventConnection] :: JoyDeviceEventData -> !JoyDeviceConnection

-- | The instance id of the joystick that reported the event.
[joyDeviceEventWhich] :: JoyDeviceEventData -> !Int32

-- | Game controller axis motion event information.
data ControllerAxisEventData
ControllerAxisEventData :: !JoystickID -> !Word8 -> !Int16 -> ControllerAxisEventData

-- | The joystick instance ID that reported the event.
[controllerAxisEventWhich] :: ControllerAxisEventData -> !JoystickID

-- | The index of the axis.
[controllerAxisEventAxis] :: ControllerAxisEventData -> !Word8

-- | The axis value ranging between -32768 and 32767.
[controllerAxisEventValue] :: ControllerAxisEventData -> !Int16

-- | Game controller button event information
data ControllerButtonEventData
ControllerButtonEventData :: !JoystickID -> !ControllerButton -> !ControllerButtonState -> ControllerButtonEventData

-- | The joystick instance ID that reported the event.
[controllerButtonEventWhich] :: ControllerButtonEventData -> !JoystickID

-- | The controller button.
[controllerButtonEventButton] :: ControllerButtonEventData -> !ControllerButton

-- | The state of the button.
[controllerButtonEventState] :: ControllerButtonEventData -> !ControllerButtonState

-- | Controller device event information
data ControllerDeviceEventData
ControllerDeviceEventData :: !ControllerDeviceConnection -> !Int32 -> ControllerDeviceEventData

-- | Was the device added, removed, or remapped?
[controllerDeviceEventConnection] :: ControllerDeviceEventData -> !ControllerDeviceConnection

-- | The joystick instance ID that reported the event.
[controllerDeviceEventWhich] :: ControllerDeviceEventData -> !Int32
data AudioDeviceEventData
AudioDeviceEventData :: !Bool -> !Word32 -> !Bool -> AudioDeviceEventData

-- | If the audio device is an addition, or a removal.
[audioDeviceEventIsAddition] :: AudioDeviceEventData -> !Bool

-- | The audio device ID that reported the event.
[audioDeviceEventWhich] :: AudioDeviceEventData -> !Word32

-- | If the audio device is a capture device.
[audioDeviceEventIsCapture] :: AudioDeviceEventData -> !Bool

-- | Event data for application-defined events.
data UserEventData
UserEventData :: !Word32 -> !(Maybe Window) -> !Int32 -> !(Ptr ()) -> !(Ptr ()) -> UserEventData

-- | User defined event type.
[userEventType] :: UserEventData -> !Word32

-- | The associated <a>Window</a>.
[userEventWindow] :: UserEventData -> !(Maybe Window)

-- | User defined event code.
[userEventCode] :: UserEventData -> !Int32

-- | User defined data pointer.
[userEventData1] :: UserEventData -> !(Ptr ())

-- | User defined data pointer.
[userEventData2] :: UserEventData -> !(Ptr ())

-- | Finger touch event information.
data TouchFingerEventData
TouchFingerEventData :: !TouchID -> !FingerID -> !InputMotion -> !(Point V2 CFloat) -> !CFloat -> TouchFingerEventData

-- | The touch device index.
[touchFingerEventTouchID] :: TouchFingerEventData -> !TouchID

-- | The finger index.
[touchFingerEventFingerID] :: TouchFingerEventData -> !FingerID

-- | Whether the finger was pressed or released.
[touchFingerEventMotion] :: TouchFingerEventData -> !InputMotion

-- | The location of the touch event, normalized between 0 and 1.
[touchFingerEventPos] :: TouchFingerEventData -> !(Point V2 CFloat)

-- | The quantity of the pressure applied, normalized between 0 and 1.
[touchFingerEventPressure] :: TouchFingerEventData -> !CFloat

-- | Finger motion event information.
data TouchFingerMotionEventData
TouchFingerMotionEventData :: !TouchID -> !FingerID -> !(Point V2 CFloat) -> !(V2 CFloat) -> !CFloat -> TouchFingerMotionEventData

-- | The touch device index.
[touchFingerMotionEventTouchID] :: TouchFingerMotionEventData -> !TouchID

-- | The finger index.
[touchFingerMotionEventFingerID] :: TouchFingerMotionEventData -> !FingerID

-- | The location of the touch event, normalized between 0 and 1.
[touchFingerMotionEventPos] :: TouchFingerMotionEventData -> !(Point V2 CFloat)

-- | The distance moved, normalized between -1 and 1.
[touchFingerMotionEventRelMotion] :: TouchFingerMotionEventData -> !(V2 CFloat)

-- | The quantity of the pressure applied, normalized between 0 and 1.
[touchFingerMotionEventPressure] :: TouchFingerMotionEventData -> !CFloat

-- | Multiple finger gesture event information
data MultiGestureEventData
MultiGestureEventData :: !TouchID -> !CFloat -> !CFloat -> !(Point V2 CFloat) -> !Word16 -> MultiGestureEventData

-- | The touch device index.
[multiGestureEventTouchID] :: MultiGestureEventData -> !TouchID

-- | The amount that the fingers rotated during this motion.
[multiGestureEventDTheta] :: MultiGestureEventData -> !CFloat

-- | The amount that the fingers pinched during this motion.
[multiGestureEventDDist] :: MultiGestureEventData -> !CFloat

-- | The normalized center of the gesture.
[multiGestureEventPos] :: MultiGestureEventData -> !(Point V2 CFloat)

-- | The number of fingers used in this gesture.
[multiGestureEventNumFingers] :: MultiGestureEventData -> !Word16

-- | Complex gesture event information.
data DollarGestureEventData
DollarGestureEventData :: !TouchID -> !GestureID -> !Word32 -> !CFloat -> !(Point V2 CFloat) -> DollarGestureEventData

-- | The touch device index.
[dollarGestureEventTouchID] :: DollarGestureEventData -> !TouchID

-- | The unique id of the closest gesture to the performed stroke.
[dollarGestureEventGestureID] :: DollarGestureEventData -> !GestureID

-- | The number of fingers used to draw the stroke.
[dollarGestureEventNumFingers] :: DollarGestureEventData -> !Word32

-- | The difference between the gesture template and the actual performed
--   gesture (lower errors correspond to closer matches).
[dollarGestureEventError] :: DollarGestureEventData -> !CFloat

-- | The normalized center of the gesture.
[dollarGestureEventPos] :: DollarGestureEventData -> !(Point V2 CFloat)

-- | An event used to request a file open by the system
newtype DropEventData
DropEventData :: CString -> DropEventData

-- | The file name.
[dropEventFile] :: DropEventData -> CString

-- | SDL reported an unknown event type.
newtype UnknownEventData
UnknownEventData :: Word32 -> UnknownEventData

-- | The unknown event code.
[unknownEventType] :: UnknownEventData -> Word32
data InputMotion
Released :: InputMotion
Pressed :: InputMotion
data MouseButton
ButtonLeft :: MouseButton
ButtonMiddle :: MouseButton
ButtonRight :: MouseButton
ButtonX1 :: MouseButton
ButtonX2 :: MouseButton

-- | An unknown mouse button.
ButtonExtra :: !Int -> MouseButton
instance GHC.Show.Show SDL.Event.EventPushResult
instance GHC.Read.Read SDL.Event.EventPushResult
instance GHC.Classes.Ord SDL.Event.EventPushResult
instance GHC.Generics.Generic SDL.Event.EventPushResult
instance GHC.Classes.Eq SDL.Event.EventPushResult
instance Data.Data.Data SDL.Event.EventPushResult
instance GHC.Show.Show SDL.Event.RegisteredEventData
instance GHC.Generics.Generic SDL.Event.RegisteredEventData
instance GHC.Classes.Ord SDL.Event.RegisteredEventData
instance GHC.Classes.Eq SDL.Event.RegisteredEventData
instance GHC.Show.Show SDL.Event.Event
instance GHC.Generics.Generic SDL.Event.Event
instance GHC.Classes.Ord SDL.Event.Event
instance GHC.Classes.Eq SDL.Event.Event
instance GHC.Show.Show SDL.Event.EventPayload
instance GHC.Generics.Generic SDL.Event.EventPayload
instance GHC.Classes.Ord SDL.Event.EventPayload
instance GHC.Classes.Eq SDL.Event.EventPayload
instance GHC.Show.Show SDL.Event.KeyboardEventData
instance GHC.Generics.Generic SDL.Event.KeyboardEventData
instance GHC.Classes.Ord SDL.Event.KeyboardEventData
instance GHC.Classes.Eq SDL.Event.KeyboardEventData
instance GHC.Show.Show SDL.Event.MouseButtonEventData
instance GHC.Generics.Generic SDL.Event.MouseButtonEventData
instance GHC.Classes.Ord SDL.Event.MouseButtonEventData
instance GHC.Classes.Eq SDL.Event.MouseButtonEventData
instance GHC.Show.Show SDL.Event.TouchFingerEventData
instance GHC.Generics.Generic SDL.Event.TouchFingerEventData
instance GHC.Classes.Ord SDL.Event.TouchFingerEventData
instance GHC.Classes.Eq SDL.Event.TouchFingerEventData
instance GHC.Show.Show SDL.Event.InputMotion
instance GHC.Generics.Generic SDL.Event.InputMotion
instance Data.Data.Data SDL.Event.InputMotion
instance GHC.Read.Read SDL.Event.InputMotion
instance GHC.Classes.Ord SDL.Event.InputMotion
instance GHC.Classes.Eq SDL.Event.InputMotion
instance GHC.Enum.Enum SDL.Event.InputMotion
instance GHC.Enum.Bounded SDL.Event.InputMotion
instance GHC.Show.Show SDL.Event.UnknownEventData
instance GHC.Generics.Generic SDL.Event.UnknownEventData
instance GHC.Classes.Ord SDL.Event.UnknownEventData
instance GHC.Classes.Eq SDL.Event.UnknownEventData
instance GHC.Show.Show SDL.Event.DropEventData
instance GHC.Generics.Generic SDL.Event.DropEventData
instance GHC.Classes.Ord SDL.Event.DropEventData
instance GHC.Classes.Eq SDL.Event.DropEventData
instance GHC.Show.Show SDL.Event.DollarGestureEventData
instance GHC.Generics.Generic SDL.Event.DollarGestureEventData
instance GHC.Classes.Ord SDL.Event.DollarGestureEventData
instance GHC.Classes.Eq SDL.Event.DollarGestureEventData
instance GHC.Show.Show SDL.Event.MultiGestureEventData
instance GHC.Generics.Generic SDL.Event.MultiGestureEventData
instance GHC.Classes.Ord SDL.Event.MultiGestureEventData
instance GHC.Classes.Eq SDL.Event.MultiGestureEventData
instance GHC.Show.Show SDL.Event.TouchFingerMotionEventData
instance GHC.Generics.Generic SDL.Event.TouchFingerMotionEventData
instance GHC.Classes.Ord SDL.Event.TouchFingerMotionEventData
instance GHC.Classes.Eq SDL.Event.TouchFingerMotionEventData
instance GHC.Show.Show SDL.Event.SysWMEventData
instance GHC.Generics.Generic SDL.Event.SysWMEventData
instance GHC.Classes.Ord SDL.Event.SysWMEventData
instance GHC.Classes.Eq SDL.Event.SysWMEventData
instance GHC.Show.Show SDL.Event.UserEventData
instance GHC.Generics.Generic SDL.Event.UserEventData
instance GHC.Classes.Ord SDL.Event.UserEventData
instance GHC.Classes.Eq SDL.Event.UserEventData
instance GHC.Show.Show SDL.Event.AudioDeviceEventData
instance GHC.Generics.Generic SDL.Event.AudioDeviceEventData
instance GHC.Classes.Ord SDL.Event.AudioDeviceEventData
instance GHC.Classes.Eq SDL.Event.AudioDeviceEventData
instance GHC.Show.Show SDL.Event.ControllerDeviceEventData
instance GHC.Generics.Generic SDL.Event.ControllerDeviceEventData
instance GHC.Classes.Ord SDL.Event.ControllerDeviceEventData
instance GHC.Classes.Eq SDL.Event.ControllerDeviceEventData
instance GHC.Show.Show SDL.Event.ControllerButtonEventData
instance GHC.Generics.Generic SDL.Event.ControllerButtonEventData
instance GHC.Classes.Ord SDL.Event.ControllerButtonEventData
instance GHC.Classes.Eq SDL.Event.ControllerButtonEventData
instance GHC.Show.Show SDL.Event.ControllerAxisEventData
instance GHC.Generics.Generic SDL.Event.ControllerAxisEventData
instance GHC.Classes.Ord SDL.Event.ControllerAxisEventData
instance GHC.Classes.Eq SDL.Event.ControllerAxisEventData
instance GHC.Show.Show SDL.Event.JoyDeviceEventData
instance GHC.Generics.Generic SDL.Event.JoyDeviceEventData
instance GHC.Classes.Ord SDL.Event.JoyDeviceEventData
instance GHC.Classes.Eq SDL.Event.JoyDeviceEventData
instance GHC.Show.Show SDL.Event.JoyButtonEventData
instance GHC.Generics.Generic SDL.Event.JoyButtonEventData
instance GHC.Classes.Ord SDL.Event.JoyButtonEventData
instance GHC.Classes.Eq SDL.Event.JoyButtonEventData
instance GHC.Show.Show SDL.Event.JoyHatEventData
instance GHC.Generics.Generic SDL.Event.JoyHatEventData
instance GHC.Classes.Ord SDL.Event.JoyHatEventData
instance GHC.Classes.Eq SDL.Event.JoyHatEventData
instance GHC.Show.Show SDL.Event.JoyBallEventData
instance GHC.Generics.Generic SDL.Event.JoyBallEventData
instance GHC.Classes.Ord SDL.Event.JoyBallEventData
instance GHC.Classes.Eq SDL.Event.JoyBallEventData
instance GHC.Show.Show SDL.Event.JoyAxisEventData
instance GHC.Generics.Generic SDL.Event.JoyAxisEventData
instance GHC.Classes.Ord SDL.Event.JoyAxisEventData
instance GHC.Classes.Eq SDL.Event.JoyAxisEventData
instance GHC.Show.Show SDL.Event.MouseWheelEventData
instance GHC.Generics.Generic SDL.Event.MouseWheelEventData
instance GHC.Classes.Ord SDL.Event.MouseWheelEventData
instance GHC.Classes.Eq SDL.Event.MouseWheelEventData
instance GHC.Show.Show SDL.Event.MouseMotionEventData
instance GHC.Generics.Generic SDL.Event.MouseMotionEventData
instance GHC.Classes.Ord SDL.Event.MouseMotionEventData
instance GHC.Classes.Eq SDL.Event.MouseMotionEventData
instance GHC.Show.Show SDL.Event.TextInputEventData
instance GHC.Generics.Generic SDL.Event.TextInputEventData
instance GHC.Classes.Ord SDL.Event.TextInputEventData
instance GHC.Classes.Eq SDL.Event.TextInputEventData
instance GHC.Show.Show SDL.Event.TextEditingEventData
instance GHC.Generics.Generic SDL.Event.TextEditingEventData
instance GHC.Classes.Ord SDL.Event.TextEditingEventData
instance GHC.Classes.Eq SDL.Event.TextEditingEventData
instance GHC.Show.Show SDL.Event.WindowClosedEventData
instance GHC.Generics.Generic SDL.Event.WindowClosedEventData
instance GHC.Classes.Ord SDL.Event.WindowClosedEventData
instance GHC.Classes.Eq SDL.Event.WindowClosedEventData
instance GHC.Show.Show SDL.Event.WindowLostKeyboardFocusEventData
instance GHC.Generics.Generic SDL.Event.WindowLostKeyboardFocusEventData
instance GHC.Classes.Ord SDL.Event.WindowLostKeyboardFocusEventData
instance GHC.Classes.Eq SDL.Event.WindowLostKeyboardFocusEventData
instance GHC.Show.Show SDL.Event.WindowGainedKeyboardFocusEventData
instance GHC.Generics.Generic SDL.Event.WindowGainedKeyboardFocusEventData
instance GHC.Classes.Ord SDL.Event.WindowGainedKeyboardFocusEventData
instance GHC.Classes.Eq SDL.Event.WindowGainedKeyboardFocusEventData
instance GHC.Show.Show SDL.Event.WindowLostMouseFocusEventData
instance GHC.Generics.Generic SDL.Event.WindowLostMouseFocusEventData
instance GHC.Classes.Ord SDL.Event.WindowLostMouseFocusEventData
instance GHC.Classes.Eq SDL.Event.WindowLostMouseFocusEventData
instance GHC.Show.Show SDL.Event.WindowGainedMouseFocusEventData
instance GHC.Generics.Generic SDL.Event.WindowGainedMouseFocusEventData
instance GHC.Classes.Ord SDL.Event.WindowGainedMouseFocusEventData
instance GHC.Classes.Eq SDL.Event.WindowGainedMouseFocusEventData
instance GHC.Show.Show SDL.Event.WindowRestoredEventData
instance GHC.Generics.Generic SDL.Event.WindowRestoredEventData
instance GHC.Classes.Ord SDL.Event.WindowRestoredEventData
instance GHC.Classes.Eq SDL.Event.WindowRestoredEventData
instance GHC.Show.Show SDL.Event.WindowMaximizedEventData
instance GHC.Generics.Generic SDL.Event.WindowMaximizedEventData
instance GHC.Classes.Ord SDL.Event.WindowMaximizedEventData
instance GHC.Classes.Eq SDL.Event.WindowMaximizedEventData
instance GHC.Show.Show SDL.Event.WindowMinimizedEventData
instance GHC.Generics.Generic SDL.Event.WindowMinimizedEventData
instance GHC.Classes.Ord SDL.Event.WindowMinimizedEventData
instance GHC.Classes.Eq SDL.Event.WindowMinimizedEventData
instance GHC.Show.Show SDL.Event.WindowSizeChangedEventData
instance GHC.Generics.Generic SDL.Event.WindowSizeChangedEventData
instance GHC.Classes.Ord SDL.Event.WindowSizeChangedEventData
instance GHC.Classes.Eq SDL.Event.WindowSizeChangedEventData
instance GHC.Show.Show SDL.Event.WindowResizedEventData
instance GHC.Generics.Generic SDL.Event.WindowResizedEventData
instance GHC.Classes.Ord SDL.Event.WindowResizedEventData
instance GHC.Classes.Eq SDL.Event.WindowResizedEventData
instance GHC.Show.Show SDL.Event.WindowMovedEventData
instance GHC.Generics.Generic SDL.Event.WindowMovedEventData
instance GHC.Classes.Ord SDL.Event.WindowMovedEventData
instance GHC.Classes.Eq SDL.Event.WindowMovedEventData
instance GHC.Show.Show SDL.Event.WindowExposedEventData
instance GHC.Generics.Generic SDL.Event.WindowExposedEventData
instance GHC.Classes.Ord SDL.Event.WindowExposedEventData
instance GHC.Classes.Eq SDL.Event.WindowExposedEventData
instance GHC.Show.Show SDL.Event.WindowHiddenEventData
instance GHC.Generics.Generic SDL.Event.WindowHiddenEventData
instance GHC.Classes.Ord SDL.Event.WindowHiddenEventData
instance GHC.Classes.Eq SDL.Event.WindowHiddenEventData
instance GHC.Show.Show SDL.Event.WindowShownEventData
instance GHC.Generics.Generic SDL.Event.WindowShownEventData
instance GHC.Classes.Ord SDL.Event.WindowShownEventData
instance GHC.Classes.Eq SDL.Event.WindowShownEventData


-- | SDL (Simple DirectMedia Layer) is a library for cross-platform
--   development of interactive applications. SDL provides routines for
--   managing windows, rendering graphics, processing sound, collecting
--   input data, and much more. The Haskell <tt>sdl2</tt> library provides
--   both a high- and low-level API to interface with SDL. This module
--   exports the high-level API, whereas <a>SDL.Raw</a> provides the
--   lower-level bindings.
module SDL
get :: (HasGetter t a, MonadIO m) => t -> m a

-- | Write a new value into a state variable.
($=) :: (HasSetter t a, MonadIO m) => t -> a -> m ()
infixr 2 $=

-- | Transform the contents of a state variable with a given funtion.
($~) :: (HasUpdate t a b, MonadIO m) => t -> a -> b -> m ()
infixr 2 $~

-- | This is a variant of <a>$=</a> which is strict in the value to be set.
($=!) :: (HasSetter t a, MonadIO m) => t -> a -> m ()
infixr 2 $=!

-- | This is a variant of <a>$~</a> which is strict in the transformed
--   value.
($~!) :: (HasUpdate t a b, MonadIO m) => t -> a -> b -> m ()
infixr 2 $~!
