    {-# LINE 1 "src/SDL/Raw/Types.hsc" #-}
    {-# LANGUAGE DeriveDataTypeable #-}
    module SDL.Raw.Types (
      -- * Type Aliases
      -- ** Function Types
      VkGetInstanceProcAddrFunc,

      AudioCallback,
      EventFilter,
      HintCallback,
      LogOutputFunction,
      ThreadFunction,
      TimerCallback,

      mkAudioCallback,
      mkEventFilter,
      mkHintCallback,
      mkLogOutputFunction,
      mkThreadFunction,
      mkTimerCallback,

      -- ** Common Types
      AudioDeviceID,
      AudioFormat,
      Cond,
      Cursor,
      FingerID,
      GameController,
      GestureID,
      GLContext,
      Haptic,
      Joystick,
      JoystickID,
      Mutex,
      Renderer,
      Sem,
      SpinLock,
      SysWMinfo,
      SysWMmsg,
      Texture,
      Thread,
      ThreadID,
      TimerID,
      TLSID,
      TouchID,
      VkInstance,
      VkSurfaceKHR,
      Window,

      -- * Data Structures
      Atomic(..),
      AudioCVT(..),
      AudioSpec(..),
      Color(..),
      DisplayMode(..),
      Event(..),
      Finger(..),
      GameControllerButtonBind(..),
      HapticDirection(..),
      HapticEffect(..),
      JoystickGUID(..),
      Keysym(..),
      MessageBoxButtonData(..),
      MessageBoxColor(..),
      MessageBoxColorScheme(..),
      MessageBoxData(..),
      Palette(..),
      PixelFormat(..),
      Point(..),
      Rect(..),
      RendererInfo(..),
      RWops(..),
      Surface(..),
      Version(..)
    ) where

    import Data.Int
    import Data.Typeable
    import Data.Word
    import Foreign.C.String
    import Foreign.C.Types
    import Foreign.Marshal.Array
    import Foreign.Ptr
    import Foreign.Storable
    import SDL.Raw.Enum

    type VkGetInstanceProcAddrFunc = VkInstance -> CString -> IO (FunPtr ())

    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 'FunPtr' has to be released with
    -- 'freeHaskellFunPtr' when it is no longer required.
    foreign import ccall "wrapper"
      mkAudioCallback :: (Ptr () -> Ptr Word8 -> CInt -> IO ()) -> IO AudioCallback

    -- | The storage associated with the resulting 'FunPtr' has to be released with
    -- 'freeHaskellFunPtr' when it is no longer required.
    foreign import ccall "wrapper"
      mkEventFilter :: (Ptr () -> Ptr Event -> IO CInt) -> IO EventFilter

    -- | The storage associated with the resulting 'FunPtr' has to be released with
    -- 'freeHaskellFunPtr' when it is no longer required.
    foreign import ccall "wrapper"
      mkHintCallback :: (Ptr () -> CString -> CString -> CString -> IO ()) -> IO HintCallback

    -- | The storage associated with the resulting 'FunPtr' has to be released with
    -- 'freeHaskellFunPtr' when it is no longer required.
    foreign import ccall "wrapper"
      mkLogOutputFunction :: (Ptr () -> CInt -> LogPriority -> CString -> IO ()) -> IO LogOutputFunction

    -- | The storage associated with the resulting 'FunPtr' has to be released with
    -- 'freeHaskellFunPtr' when it is no longer required.
    foreign import ccall "wrapper"
      mkThreadFunction :: (Ptr () -> IO CInt) -> IO ThreadFunction

    -- | The storage associated with the resulting 'FunPtr' has to be released with
    -- 'freeHaskellFunPtr' when it is no longer required.
    foreign import ccall "wrapper"
      mkTimerCallback :: (Word32 -> Ptr () -> IO Word32) -> IO TimerCallback

    type AudioDeviceID = Word32
    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 VkInstance = Ptr ()
    type VkSurfaceKHR = Word64
    type Window = Ptr ()

    data Atomic = Atomic
      { Atomic -> CInt
    atomicValue :: !CInt
      } deriving (Atomic -> Atomic -> Bool
    (Atomic -> Atomic -> Bool)
    -> (Atomic -> Atomic -> Bool) -> Eq Atomic
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: Atomic -> Atomic -> Bool
    $c/= :: Atomic -> Atomic -> Bool
    == :: Atomic -> Atomic -> Bool
    $c== :: Atomic -> Atomic -> Bool
    Eq, Int -> Atomic -> ShowS
    [Atomic] -> ShowS
    Atomic -> String
    (Int -> Atomic -> ShowS)
    -> (Atomic -> String) -> ([Atomic] -> ShowS) -> Show Atomic
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [Atomic] -> ShowS
    $cshowList :: [Atomic] -> ShowS
    show :: Atomic -> String
    $cshow :: Atomic -> String
    showsPrec :: Int -> Atomic -> ShowS
    $cshowsPrec :: Int -> Atomic -> ShowS
    Show, Typeable)

    instance Storable Atomic where
      sizeOf :: Atomic -> Int
    sizeOf _ = ((4))
    {-# LINE 159 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr Atomic -> IO Atomic
    peek ptr :: Ptr Atomic
    ptr = do
        CInt
    value <- ((\hsc_ptr :: Ptr Atomic
    hsc_ptr -> Ptr Atomic -> Int -> IO CInt
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Atomic
    hsc_ptr 0)) Ptr Atomic
    ptr
    {-# LINE 162 "src/SDL/Raw/Types.hsc" #-}
        return $! Atomic value
      poke :: Ptr Atomic -> Atomic -> IO ()
    poke ptr :: Ptr Atomic
    ptr (Atomic value :: CInt
    value) = do
        ((\hsc_ptr :: Ptr Atomic
    hsc_ptr -> Ptr Atomic -> Int -> CInt -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr Atomic
    hsc_ptr 0)) Ptr Atomic
    ptr CInt
    value
    {-# LINE 165 "src/SDL/Raw/Types.hsc" #-}

    data AudioCVT = AudioCVT
      { AudioCVT -> CInt
    audioCVTNeeded :: !CInt
      , AudioCVT -> AudioFormat
    audioCVTSrcFormat :: !AudioFormat
      , AudioCVT -> AudioFormat
    audioCVTDstFormat :: !AudioFormat
      , AudioCVT -> CDouble
    audioCVTRateIncr :: !CDouble
      , AudioCVT -> Ptr Word8
    audioCVTBuf :: !(Ptr Word8)
      , AudioCVT -> CInt
    audioCVTLen :: !CInt
      , AudioCVT -> CInt
    audioCVTLenCvt :: !CInt
      , AudioCVT -> CInt
    audioCVTLenMult :: !CInt
      , AudioCVT -> CDouble
    audioCVTLenRatio :: !CDouble
      } deriving (AudioCVT -> AudioCVT -> Bool
    (AudioCVT -> AudioCVT -> Bool)
    -> (AudioCVT -> AudioCVT -> Bool) -> Eq AudioCVT
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: AudioCVT -> AudioCVT -> Bool
    $c/= :: AudioCVT -> AudioCVT -> Bool
    == :: AudioCVT -> AudioCVT -> Bool
    $c== :: AudioCVT -> AudioCVT -> Bool
    Eq, Int -> AudioCVT -> ShowS
    [AudioCVT] -> ShowS
    AudioCVT -> String
    (Int -> AudioCVT -> ShowS)
    -> (AudioCVT -> String) -> ([AudioCVT] -> ShowS) -> Show AudioCVT
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [AudioCVT] -> ShowS
    $cshowList :: [AudioCVT] -> ShowS
    show :: AudioCVT -> String
    $cshow :: AudioCVT -> String
    showsPrec :: Int -> AudioCVT -> ShowS
    $cshowsPrec :: Int -> AudioCVT -> ShowS
    Show, Typeable)

    instance Storable AudioCVT where
      sizeOf :: AudioCVT -> Int
    sizeOf _ = ((128))
    {-# LINE 180 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr AudioCVT -> IO AudioCVT
    peek ptr :: Ptr AudioCVT
    ptr = do
        CInt
    needed <- ((\hsc_ptr :: Ptr AudioCVT
    hsc_ptr -> Ptr AudioCVT -> Int -> IO CInt
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr AudioCVT
    hsc_ptr 0)) Ptr AudioCVT
    ptr
    {-# LINE 183 "src/SDL/Raw/Types.hsc" #-}
        src_format <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 184 "src/SDL/Raw/Types.hsc" #-}
        dst_format <- ((\hsc_ptr -> peekByteOff hsc_ptr 6)) ptr
    {-# LINE 185 "src/SDL/Raw/Types.hsc" #-}
        rate_incr <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 186 "src/SDL/Raw/Types.hsc" #-}
        buf <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 187 "src/SDL/Raw/Types.hsc" #-}
        len <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 188 "src/SDL/Raw/Types.hsc" #-}
        len_cvt <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
    {-# LINE 189 "src/SDL/Raw/Types.hsc" #-}
        len_mult <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 190 "src/SDL/Raw/Types.hsc" #-}
        len_ratio <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
    {-# LINE 191 "src/SDL/Raw/Types.hsc" #-}
        return $! AudioCVT needed src_format dst_format rate_incr buf len len_cvt len_mult len_ratio
      poke :: Ptr AudioCVT -> AudioCVT -> IO ()
    poke ptr :: Ptr AudioCVT
    ptr (AudioCVT needed :: CInt
    needed src_format :: AudioFormat
    src_format dst_format :: AudioFormat
    dst_format rate_incr :: CDouble
    rate_incr buf :: Ptr Word8
    buf len :: CInt
    len len_cvt :: CInt
    len_cvt len_mult :: CInt
    len_mult len_ratio :: CDouble
    len_ratio) = do
        ((\hsc_ptr :: Ptr AudioCVT
    hsc_ptr -> Ptr AudioCVT -> Int -> CInt -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr AudioCVT
    hsc_ptr 0)) Ptr AudioCVT
    ptr CInt
    needed
    {-# LINE 194 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr src_format
    {-# LINE 195 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 6)) ptr dst_format
    {-# LINE 196 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr rate_incr
    {-# LINE 197 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr buf
    {-# LINE 198 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr len
    {-# LINE 199 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr len_cvt
    {-# LINE 200 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr len_mult
    {-# LINE 201 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr len_ratio
    {-# LINE 202 "src/SDL/Raw/Types.hsc" #-}

    data AudioSpec = AudioSpec
      { AudioSpec -> CInt
    audioSpecFreq :: !CInt
      , AudioSpec -> AudioFormat
    audioSpecFormat :: !AudioFormat
      , AudioSpec -> Word8
    audioSpecChannels :: !Word8
      , AudioSpec -> Word8
    audioSpecSilence :: !Word8
      , AudioSpec -> AudioFormat
    audioSpecSamples :: !Word16
      , AudioSpec -> Word32
    audioSpecSize :: !Word32
      , AudioSpec -> AudioCallback
    audioSpecCallback :: !AudioCallback
      , AudioSpec -> Ptr ()
    audioSpecUserdata :: !(Ptr ())
      } deriving (AudioSpec -> AudioSpec -> Bool
    (AudioSpec -> AudioSpec -> Bool)
    -> (AudioSpec -> AudioSpec -> Bool) -> Eq AudioSpec
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: AudioSpec -> AudioSpec -> Bool
    $c/= :: AudioSpec -> AudioSpec -> Bool
    == :: AudioSpec -> AudioSpec -> Bool
    $c== :: AudioSpec -> AudioSpec -> Bool
    Eq, Int -> AudioSpec -> ShowS
    [AudioSpec] -> ShowS
    AudioSpec -> String
    (Int -> AudioSpec -> ShowS)
    -> (AudioSpec -> String)
    -> ([AudioSpec] -> ShowS)
    -> Show AudioSpec
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [AudioSpec] -> ShowS
    $cshowList :: [AudioSpec] -> ShowS
    show :: AudioSpec -> String
    $cshow :: AudioSpec -> String
    showsPrec :: Int -> AudioSpec -> ShowS
    $cshowsPrec :: Int -> AudioSpec -> ShowS
    Show, Typeable)

    instance Storable AudioSpec where
      sizeOf :: AudioSpec -> Int
    sizeOf _ = ((32))
    {-# LINE 216 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr AudioSpec -> IO AudioSpec
    peek ptr :: Ptr AudioSpec
    ptr = do
        CInt
    freq <- ((\hsc_ptr :: Ptr AudioSpec
    hsc_ptr -> Ptr AudioSpec -> Int -> IO CInt
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr AudioSpec
    hsc_ptr 0)) Ptr AudioSpec
    ptr
    {-# LINE 219 "src/SDL/Raw/Types.hsc" #-}
        format <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 220 "src/SDL/Raw/Types.hsc" #-}
        channels <- ((\hsc_ptr -> peekByteOff hsc_ptr 6)) ptr
    {-# LINE 221 "src/SDL/Raw/Types.hsc" #-}
        silence <- ((\hsc_ptr -> peekByteOff hsc_ptr 7)) ptr
    {-# LINE 222 "src/SDL/Raw/Types.hsc" #-}
        samples <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 223 "src/SDL/Raw/Types.hsc" #-}
        size <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 224 "src/SDL/Raw/Types.hsc" #-}
        callback <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 225 "src/SDL/Raw/Types.hsc" #-}
        userdata <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 226 "src/SDL/Raw/Types.hsc" #-}
        return $! AudioSpec freq format channels silence samples size callback userdata
      poke :: Ptr AudioSpec -> AudioSpec -> IO ()
    poke ptr :: Ptr AudioSpec
    ptr (AudioSpec freq :: CInt
    freq format :: AudioFormat
    format channels :: Word8
    channels silence :: Word8
    silence samples :: AudioFormat
    samples size :: Word32
    size callback :: AudioCallback
    callback userdata :: Ptr ()
    userdata) = do
        ((\hsc_ptr :: Ptr AudioSpec
    hsc_ptr -> Ptr AudioSpec -> Int -> CInt -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr AudioSpec
    hsc_ptr 0)) Ptr AudioSpec
    ptr CInt
    freq
    {-# LINE 229 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr format
    {-# LINE 230 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 6)) ptr channels
    {-# LINE 231 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 7)) ptr silence
    {-# LINE 232 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr samples
    {-# LINE 233 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr size
    {-# LINE 234 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr callback
    {-# LINE 235 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr userdata
    {-# LINE 236 "src/SDL/Raw/Types.hsc" #-}

    data Color = Color
      { Color -> Word8
    colorR :: !Word8
      , Color -> Word8
    colorG :: !Word8
      , Color -> Word8
    colorB :: !Word8
      , Color -> Word8
    colorA :: !Word8
      } deriving (Color -> Color -> Bool
    (Color -> Color -> Bool) -> (Color -> Color -> Bool) -> Eq Color
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: Color -> Color -> Bool
    $c/= :: Color -> Color -> Bool
    == :: Color -> Color -> Bool
    $c== :: Color -> Color -> Bool
    Eq, Int -> Color -> ShowS
    [Color] -> ShowS
    Color -> String
    (Int -> Color -> ShowS)
    -> (Color -> String) -> ([Color] -> ShowS) -> Show Color
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [Color] -> ShowS
    $cshowList :: [Color] -> ShowS
    show :: Color -> String
    $cshow :: Color -> String
    showsPrec :: Int -> Color -> ShowS
    $cshowsPrec :: Int -> Color -> ShowS
    Show, Typeable)

    instance Storable Color where
      sizeOf :: Color -> Int
    sizeOf _ = ((4))
    {-# LINE 246 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr Color -> IO Color
    peek ptr :: Ptr Color
    ptr = do
        Word8
    r <- ((\hsc_ptr :: Ptr Color
    hsc_ptr -> Ptr Color -> Int -> IO Word8
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Color
    hsc_ptr 0)) Ptr Color
    ptr
    {-# LINE 249 "src/SDL/Raw/Types.hsc" #-}
        g <- ((\hsc_ptr -> peekByteOff hsc_ptr 1)) ptr
    {-# LINE 250 "src/SDL/Raw/Types.hsc" #-}
        b <- ((\hsc_ptr -> peekByteOff hsc_ptr 2)) ptr
    {-# LINE 251 "src/SDL/Raw/Types.hsc" #-}
        a <- ((\hsc_ptr -> peekByteOff hsc_ptr 3)) ptr
    {-# LINE 252 "src/SDL/Raw/Types.hsc" #-}
        return $! Color r g b a
      poke :: Ptr Color -> Color -> IO ()
    poke ptr :: Ptr Color
    ptr (Color r :: Word8
    r g :: Word8
    g b :: Word8
    b a :: Word8
    a) = do
        ((\hsc_ptr :: Ptr Color
    hsc_ptr -> Ptr Color -> Int -> Word8 -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr Color
    hsc_ptr 0)) Ptr Color
    ptr Word8
    r
    {-# LINE 255 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 1)) ptr g
    {-# LINE 256 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 2)) ptr b
    {-# LINE 257 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 3)) ptr a
    {-# LINE 258 "src/SDL/Raw/Types.hsc" #-}

    data DisplayMode = DisplayMode
      { DisplayMode -> Word32
    displayModeFormat :: !Word32
      , DisplayMode -> CInt
    displayModeW :: !CInt
      , DisplayMode -> CInt
    displayModeH :: !CInt
      , DisplayMode -> CInt
    displayModeRefreshRate :: !CInt
      , DisplayMode -> Ptr ()
    displayModeDriverData :: !(Ptr ())
      } deriving (DisplayMode -> DisplayMode -> Bool
    (DisplayMode -> DisplayMode -> Bool)
    -> (DisplayMode -> DisplayMode -> Bool) -> Eq DisplayMode
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: DisplayMode -> DisplayMode -> Bool
    $c/= :: DisplayMode -> DisplayMode -> Bool
    == :: DisplayMode -> DisplayMode -> Bool
    $c== :: DisplayMode -> DisplayMode -> Bool
    Eq, Int -> DisplayMode -> ShowS
    [DisplayMode] -> ShowS
    DisplayMode -> String
    (Int -> DisplayMode -> ShowS)
    -> (DisplayMode -> String)
    -> ([DisplayMode] -> ShowS)
    -> Show DisplayMode
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [DisplayMode] -> ShowS
    $cshowList :: [DisplayMode] -> ShowS
    show :: DisplayMode -> String
    $cshow :: DisplayMode -> String
    showsPrec :: Int -> DisplayMode -> ShowS
    $cshowsPrec :: Int -> DisplayMode -> ShowS
    Show, Typeable)

    instance Storable DisplayMode where
      sizeOf :: DisplayMode -> Int
    sizeOf _ = ((24))
    {-# LINE 269 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr DisplayMode -> IO DisplayMode
    peek ptr :: Ptr DisplayMode
    ptr = do
        Word32
    format <- ((\hsc_ptr :: Ptr DisplayMode
    hsc_ptr -> Ptr DisplayMode -> Int -> IO Word32
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr DisplayMode
    hsc_ptr 0)) Ptr DisplayMode
    ptr
    {-# LINE 272 "src/SDL/Raw/Types.hsc" #-}
        w <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 273 "src/SDL/Raw/Types.hsc" #-}
        h <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 274 "src/SDL/Raw/Types.hsc" #-}
        refresh_rate <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 275 "src/SDL/Raw/Types.hsc" #-}
        driverdata <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 276 "src/SDL/Raw/Types.hsc" #-}
        return $! DisplayMode format w h refresh_rate driverdata
      poke :: Ptr DisplayMode -> DisplayMode -> IO ()
    poke ptr :: Ptr DisplayMode
    ptr (DisplayMode format :: Word32
    format w :: CInt
    w h :: CInt
    h refresh_rate :: CInt
    refresh_rate driverdata :: Ptr ()
    driverdata) = do
        ((\hsc_ptr :: Ptr DisplayMode
    hsc_ptr -> Ptr DisplayMode -> Int -> Word32 -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr DisplayMode
    hsc_ptr 0)) Ptr DisplayMode
    ptr Word32
    format
    {-# LINE 279 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr w
    {-# LINE 280 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr h
    {-# LINE 281 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr refresh_rate
    {-# LINE 282 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr driverdata
    {-# LINE 283 "src/SDL/Raw/Types.hsc" #-}

    data Event
      = WindowEvent
        { Event -> Word32
    eventType :: !Word32
        , Event -> Word32
    eventTimestamp :: !Word32
        , Event -> Word32
    windowEventWindowID :: !Word32
        , Event -> Word8
    windowEventEvent :: !Word8
        , Event -> Int32
    windowEventData1 :: !Int32
        , Event -> Int32
    windowEventData2 :: !Int32
        }
      | KeyboardEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Word32
    keyboardEventWindowID :: !Word32
        , Event -> Word8
    keyboardEventState :: !Word8
        , Event -> Word8
    keyboardEventRepeat :: !Word8
        , Event -> Keysym
    keyboardEventKeysym :: !Keysym
        }
      | TextEditingEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Word32
    textEditingEventWindowID :: !Word32
        , Event -> [CChar]
    textEditingEventText :: ![CChar]
        , Event -> Int32
    textEditingEventStart :: !Int32
        , Event -> Int32
    textEditingEventLength :: !Int32
        }
      | TextInputEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Word32
    textInputEventWindowID :: !Word32
        , Event -> [CChar]
    textInputEventText :: ![CChar]
        }
      | KeymapChangedEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        }
      | MouseMotionEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Word32
    mouseMotionEventWindowID :: !Word32
        , Event -> Word32
    mouseMotionEventWhich :: !Word32
        , Event -> Word32
    mouseMotionEventState :: !Word32
        , Event -> Int32
    mouseMotionEventX :: !Int32
        , Event -> Int32
    mouseMotionEventY :: !Int32
        , Event -> Int32
    mouseMotionEventXRel :: !Int32
        , Event -> Int32
    mouseMotionEventYRel :: !Int32
        }
      | MouseButtonEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Word32
    mouseButtonEventWindowID :: !Word32
        , Event -> Word32
    mouseButtonEventWhich :: !Word32
        , Event -> Word8
    mouseButtonEventButton :: !Word8
        , Event -> Word8
    mouseButtonEventState :: !Word8
        , Event -> Word8
    mouseButtonEventClicks :: !Word8
        , Event -> Int32
    mouseButtonEventX :: !Int32
        , Event -> Int32
    mouseButtonEventY :: !Int32
        }
      | MouseWheelEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Word32
    mouseWheelEventWindowID :: !Word32
        , Event -> Word32
    mouseWheelEventWhich :: !Word32
        , Event -> Int32
    mouseWheelEventX :: !Int32
        , Event -> Int32
    mouseWheelEventY :: !Int32
        , Event -> Word32
    mouseWheelEventDirection :: !Word32
        }
      | JoyAxisEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Int32
    joyAxisEventWhich :: !JoystickID
        , Event -> Word8
    joyAxisEventAxis :: !Word8
        , Event -> Int16
    joyAxisEventValue :: !Int16
        }
      | JoyBallEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Int32
    joyBallEventWhich :: !JoystickID
        , Event -> Word8
    joyBallEventBall :: !Word8
        , Event -> Int16
    joyBallEventXRel :: !Int16
        , Event -> Int16
    joyBallEventYRel :: !Int16
        }
      | JoyHatEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Int32
    joyHatEventWhich :: !JoystickID
        , Event -> Word8
    joyHatEventHat :: !Word8
        , Event -> Word8
    joyHatEventValue :: !Word8
        }
      | JoyButtonEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Int32
    joyButtonEventWhich :: !JoystickID
        , Event -> Word8
    joyButtonEventButton :: !Word8
        , Event -> Word8
    joyButtonEventState :: !Word8
        }
      | JoyDeviceEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Int32
    joyDeviceEventWhich :: !Int32
        }
      | ControllerAxisEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Int32
    controllerAxisEventWhich :: !JoystickID
        , Event -> Word8
    controllerAxisEventAxis :: !Word8
        , Event -> Int16
    controllerAxisEventValue :: !Int16
        }
      | ControllerButtonEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Int32
    controllerButtonEventWhich :: !JoystickID
        , Event -> Word8
    controllerButtonEventButton :: !Word8
        , Event -> Word8
    controllerButtonEventState :: !Word8
        }
      | ControllerDeviceEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Int32
    controllerDeviceEventWhich :: !Int32
        }
      | AudioDeviceEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Word32
    audioDeviceEventWhich :: !Word32
        , Event -> Word8
    audioDeviceEventIsCapture :: !Word8
        }
      | QuitEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        }
      | UserEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Word32
    userEventWindowID :: !Word32
        , Event -> Int32
    userEventCode :: !Int32
        , Event -> Ptr ()
    userEventData1 :: !(Ptr ())
        , Event -> Ptr ()
    userEventData2 :: !(Ptr ())
        }
      | SysWMEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> Ptr ()
    sysWMEventMsg :: !SysWMmsg
        }
      | TouchFingerEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> TouchID
    touchFingerEventTouchID :: !TouchID
        , Event -> TouchID
    touchFingerEventFingerID :: !FingerID
        , Event -> CFloat
    touchFingerEventX :: !CFloat
        , Event -> CFloat
    touchFingerEventY :: !CFloat
        , Event -> CFloat
    touchFingerEventDX :: !CFloat
        , Event -> CFloat
    touchFingerEventDY :: !CFloat
        , Event -> CFloat
    touchFingerEventPressure :: !CFloat
        }
      | MultiGestureEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> TouchID
    multiGestureEventTouchID :: !TouchID
        , Event -> CFloat
    multiGestureEventDTheta :: !CFloat
        , Event -> CFloat
    multiGestureEventDDist :: !CFloat
        , Event -> CFloat
    multiGestureEventX :: !CFloat
        , Event -> CFloat
    multiGestureEventY :: !CFloat
        , Event -> AudioFormat
    multiGestureEventNumFingers :: !Word16
        }
      | DollarGestureEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> TouchID
    dollarGestureEventTouchID :: !TouchID
        , Event -> TouchID
    dollarGestureEventGestureID :: !GestureID
        , Event -> Word32
    dollarGestureEventNumFingers :: !Word32
        , Event -> CFloat
    dollarGestureEventError :: !CFloat
        , Event -> CFloat
    dollarGestureEventX :: !CFloat
        , Event -> CFloat
    dollarGestureEventY :: !CFloat
        }
      | DropEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        , Event -> CString
    dropEventFile :: !CString
        }
      | ClipboardUpdateEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        }
      | UnknownEvent
        { eventType :: !Word32
        , eventTimestamp :: !Word32
        }
      deriving (Event -> Event -> Bool
    (Event -> Event -> Bool) -> (Event -> Event -> Bool) -> Eq Event
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: Event -> Event -> Bool
    $c/= :: Event -> Event -> Bool
    == :: Event -> Event -> Bool
    $c== :: Event -> Event -> Bool
    Eq, Int -> Event -> ShowS
    [Event] -> ShowS
    Event -> String
    (Int -> Event -> ShowS)
    -> (Event -> String) -> ([Event] -> ShowS) -> Show Event
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [Event] -> ShowS
    $cshowList :: [Event] -> ShowS
    show :: Event -> String
    $cshow :: Event -> String
    showsPrec :: Int -> Event -> ShowS
    $cshowsPrec :: Int -> Event -> ShowS
    Show, Typeable)

    instance Storable Event where
      sizeOf :: Event -> Int
    sizeOf _ = ((56))
    {-# LINE 474 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr Event -> IO Event
    peek ptr :: Ptr Event
    ptr = do
        Word32
    typ <- ((\hsc_ptr :: Ptr Event
    hsc_ptr -> Ptr Event -> Int -> IO Word32
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Event
    hsc_ptr 0)) Ptr Event
    ptr
    {-# LINE 477 "src/SDL/Raw/Types.hsc" #-}
        timestamp <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 478 "src/SDL/Raw/Types.hsc" #-}
        case typ of
          (256) ->
    {-# LINE 480 "src/SDL/Raw/Types.hsc" #-}
            return $! QuitEvent typ timestamp
          (512) -> do
    {-# LINE 482 "src/SDL/Raw/Types.hsc" #-}
            wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 483 "src/SDL/Raw/Types.hsc" #-}
            event <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 484 "src/SDL/Raw/Types.hsc" #-}
            data1 <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 485 "src/SDL/Raw/Types.hsc" #-}
            data2 <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
    {-# LINE 486 "src/SDL/Raw/Types.hsc" #-}
            return $! WindowEvent typ timestamp wid event data1 data2
          (513) -> do
    {-# LINE 488 "src/SDL/Raw/Types.hsc" #-}
            msg <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 489 "src/SDL/Raw/Types.hsc" #-}
            return $! SysWMEvent typ timestamp msg
          (768) -> key $ KeyboardEvent typ timestamp
    {-# LINE 491 "src/SDL/Raw/Types.hsc" #-}
          (769) -> key $ KeyboardEvent typ timestamp
    {-# LINE 492 "src/SDL/Raw/Types.hsc" #-}
          (770) -> do
    {-# LINE 493 "src/SDL/Raw/Types.hsc" #-}
            wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 494 "src/SDL/Raw/Types.hsc" #-}
            text <- peekArray (32) $ ((\hsc_ptr -> hsc_ptr `plusPtr` 12)) ptr
    {-# LINE 495 "src/SDL/Raw/Types.hsc" #-}
            start <- ((\hsc_ptr -> peekByteOff hsc_ptr 44)) ptr
    {-# LINE 496 "src/SDL/Raw/Types.hsc" #-}
            len <- ((\hsc_ptr -> peekByteOff hsc_ptr 48)) ptr
    {-# LINE 497 "src/SDL/Raw/Types.hsc" #-}
            let upToNull = takeWhile (/= 0) text
            return $! TextEditingEvent typ timestamp wid upToNull start len
          (771) -> do
    {-# LINE 500 "src/SDL/Raw/Types.hsc" #-}
            wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 501 "src/SDL/Raw/Types.hsc" #-}
            text <- peekArray (32) $ ((\hsc_ptr -> hsc_ptr `plusPtr` 12)) ptr
    {-# LINE 502 "src/SDL/Raw/Types.hsc" #-}
            let upToNull = takeWhile (/= 0) text
            return $! TextInputEvent typ timestamp wid upToNull
          (772) ->
    {-# LINE 505 "src/SDL/Raw/Types.hsc" #-}
            return $! KeymapChangedEvent typ timestamp
          (1024) -> do
    {-# LINE 507 "src/SDL/Raw/Types.hsc" #-}
            wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 508 "src/SDL/Raw/Types.hsc" #-}
            which <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 509 "src/SDL/Raw/Types.hsc" #-}
            state <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 510 "src/SDL/Raw/Types.hsc" #-}
            x <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
    {-# LINE 511 "src/SDL/Raw/Types.hsc" #-}
            y <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 512 "src/SDL/Raw/Types.hsc" #-}
            xrel <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
    {-# LINE 513 "src/SDL/Raw/Types.hsc" #-}
            yrel <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 514 "src/SDL/Raw/Types.hsc" #-}
            return $! MouseMotionEvent typ timestamp wid which state x y xrel yrel
          (1025) -> mouse $ MouseButtonEvent typ timestamp
    {-# LINE 516 "src/SDL/Raw/Types.hsc" #-}
          (1026) -> mouse $ MouseButtonEvent typ timestamp
    {-# LINE 517 "src/SDL/Raw/Types.hsc" #-}
          (1027) -> do
    {-# LINE 518 "src/SDL/Raw/Types.hsc" #-}
            wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 519 "src/SDL/Raw/Types.hsc" #-}
            which <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 520 "src/SDL/Raw/Types.hsc" #-}
            x <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 521 "src/SDL/Raw/Types.hsc" #-}
            y <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
    {-# LINE 522 "src/SDL/Raw/Types.hsc" #-}
            direction <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 523 "src/SDL/Raw/Types.hsc" #-}
            return $! MouseWheelEvent typ timestamp wid which x y direction
          (1536) -> do
    {-# LINE 525 "src/SDL/Raw/Types.hsc" #-}
            which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 526 "src/SDL/Raw/Types.hsc" #-}
            axis <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 527 "src/SDL/Raw/Types.hsc" #-}
            value <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 528 "src/SDL/Raw/Types.hsc" #-}
            return $! JoyAxisEvent typ timestamp which axis value
          (1537) -> do
    {-# LINE 530 "src/SDL/Raw/Types.hsc" #-}
            which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 531 "src/SDL/Raw/Types.hsc" #-}
            ball <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 532 "src/SDL/Raw/Types.hsc" #-}
            xrel <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 533 "src/SDL/Raw/Types.hsc" #-}
            yrel <- ((\hsc_ptr -> peekByteOff hsc_ptr 18)) ptr
    {-# LINE 534 "src/SDL/Raw/Types.hsc" #-}
            return $! JoyBallEvent typ timestamp which ball xrel yrel
          (1538) -> do
    {-# LINE 536 "src/SDL/Raw/Types.hsc" #-}
            which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 537 "src/SDL/Raw/Types.hsc" #-}
            hat <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 538 "src/SDL/Raw/Types.hsc" #-}
            value <- ((\hsc_ptr -> peekByteOff hsc_ptr 13)) ptr
    {-# LINE 539 "src/SDL/Raw/Types.hsc" #-}
            return $! JoyHatEvent typ timestamp which hat value
          (1539) -> joybutton $ JoyButtonEvent typ timestamp
    {-# LINE 541 "src/SDL/Raw/Types.hsc" #-}
          (1540) -> joybutton $ JoyButtonEvent typ timestamp
    {-# LINE 542 "src/SDL/Raw/Types.hsc" #-}
          (1541) -> joydevice $ JoyDeviceEvent typ timestamp
    {-# LINE 543 "src/SDL/Raw/Types.hsc" #-}
          (1542) -> joydevice $ JoyDeviceEvent typ timestamp
    {-# LINE 544 "src/SDL/Raw/Types.hsc" #-}
          (1616) -> do
    {-# LINE 545 "src/SDL/Raw/Types.hsc" #-}
            which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 546 "src/SDL/Raw/Types.hsc" #-}
            axis <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 547 "src/SDL/Raw/Types.hsc" #-}
            value <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 548 "src/SDL/Raw/Types.hsc" #-}
            return $! ControllerButtonEvent typ timestamp which axis value
          (1617) -> controllerbutton $ ControllerButtonEvent typ timestamp
    {-# LINE 550 "src/SDL/Raw/Types.hsc" #-}
          (1618) -> controllerbutton $ ControllerButtonEvent typ timestamp
    {-# LINE 551 "src/SDL/Raw/Types.hsc" #-}
          (1619) -> controllerdevice $ ControllerDeviceEvent typ timestamp
    {-# LINE 552 "src/SDL/Raw/Types.hsc" #-}
          (1620) -> controllerdevice $ ControllerDeviceEvent typ timestamp
    {-# LINE 553 "src/SDL/Raw/Types.hsc" #-}
          (1621) -> controllerdevice $ ControllerDeviceEvent typ timestamp
    {-# LINE 554 "src/SDL/Raw/Types.hsc" #-}
          (4352) -> audiodevice $ AudioDeviceEvent typ timestamp
    {-# LINE 555 "src/SDL/Raw/Types.hsc" #-}
          (4353) -> audiodevice $ AudioDeviceEvent typ timestamp
    {-# LINE 556 "src/SDL/Raw/Types.hsc" #-}
          (1792) -> finger $ TouchFingerEvent typ timestamp
    {-# LINE 557 "src/SDL/Raw/Types.hsc" #-}
          (1793) -> finger $ TouchFingerEvent typ timestamp
    {-# LINE 558 "src/SDL/Raw/Types.hsc" #-}
          (1794) -> finger $ TouchFingerEvent typ timestamp
    {-# LINE 559 "src/SDL/Raw/Types.hsc" #-}
          (2048) -> dollargesture $ DollarGestureEvent typ timestamp
    {-# LINE 560 "src/SDL/Raw/Types.hsc" #-}
          (2049) -> dollargesture $ DollarGestureEvent typ timestamp
    {-# LINE 561 "src/SDL/Raw/Types.hsc" #-}
          (2050) -> do
    {-# LINE 562 "src/SDL/Raw/Types.hsc" #-}
            touchId <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 563 "src/SDL/Raw/Types.hsc" #-}
            dTheta <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 564 "src/SDL/Raw/Types.hsc" #-}
            dDist <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
    {-# LINE 565 "src/SDL/Raw/Types.hsc" #-}
            x <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 566 "src/SDL/Raw/Types.hsc" #-}
            y <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
    {-# LINE 567 "src/SDL/Raw/Types.hsc" #-}
            numFingers <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 568 "src/SDL/Raw/Types.hsc" #-}
            return $! MultiGestureEvent typ timestamp touchId dTheta dDist x y numFingers
          (2304) ->
    {-# LINE 570 "src/SDL/Raw/Types.hsc" #-}
            return $! ClipboardUpdateEvent typ timestamp
          (4096) -> do
    {-# LINE 572 "src/SDL/Raw/Types.hsc" #-}
            file <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 573 "src/SDL/Raw/Types.hsc" #-}
            return $! DropEvent typ timestamp file
          x | x >= (32768) -> do
    {-# LINE 575 "src/SDL/Raw/Types.hsc" #-}
            wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 576 "src/SDL/Raw/Types.hsc" #-}
            code <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 577 "src/SDL/Raw/Types.hsc" #-}
            data1 <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 578 "src/SDL/Raw/Types.hsc" #-}
            data2 <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 579 "src/SDL/Raw/Types.hsc" #-}
            return $! UserEvent typ timestamp wid code data1 data2
          _ -> return $! UnknownEvent typ timestamp
        where
        key :: (t -> t -> t -> t -> b) -> IO b
    key f :: t -> t -> t -> t -> b
    f = do
          t
    wid <- ((\hsc_ptr :: Ptr Event
    hsc_ptr -> Ptr Event -> Int -> IO t
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Event
    hsc_ptr 8)) Ptr Event
    ptr
    {-# LINE 584 "src/SDL/Raw/Types.hsc" #-}
          state <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 585 "src/SDL/Raw/Types.hsc" #-}
          repeat' <- ((\hsc_ptr -> peekByteOff hsc_ptr 13)) ptr
    {-# LINE 586 "src/SDL/Raw/Types.hsc" #-}
          keysym <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 587 "src/SDL/Raw/Types.hsc" #-}
          return $! f wid state repeat' keysym

        mouse :: (t -> t -> t -> t -> t -> t -> t -> b) -> IO b
    mouse f :: t -> t -> t -> t -> t -> t -> t -> b
    f = do
          t
    wid <- ((\hsc_ptr :: Ptr Event
    hsc_ptr -> Ptr Event -> Int -> IO t
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Event
    hsc_ptr 8)) Ptr Event
    ptr
    {-# LINE 591 "src/SDL/Raw/Types.hsc" #-}
          which <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 592 "src/SDL/Raw/Types.hsc" #-}
          button <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 593 "src/SDL/Raw/Types.hsc" #-}
          state <- ((\hsc_ptr -> peekByteOff hsc_ptr 17)) ptr
    {-# LINE 594 "src/SDL/Raw/Types.hsc" #-}
          clicks <- ((\hsc_ptr -> peekByteOff hsc_ptr 18)) ptr
    {-# LINE 595 "src/SDL/Raw/Types.hsc" #-}
          x <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
    {-# LINE 596 "src/SDL/Raw/Types.hsc" #-}
          y <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 597 "src/SDL/Raw/Types.hsc" #-}
          return $! f wid which button state clicks x y

        joybutton :: (t -> t -> t -> b) -> IO b
    joybutton f :: t -> t -> t -> b
    f = do
          t
    which <- ((\hsc_ptr :: Ptr Event
    hsc_ptr -> Ptr Event -> Int -> IO t
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Event
    hsc_ptr 8)) Ptr Event
    ptr
    {-# LINE 601 "src/SDL/Raw/Types.hsc" #-}
          button <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 602 "src/SDL/Raw/Types.hsc" #-}
          state <- ((\hsc_ptr -> peekByteOff hsc_ptr 13)) ptr
    {-# LINE 603 "src/SDL/Raw/Types.hsc" #-}
          return $! f which button state

        joydevice :: (t -> b) -> IO b
    joydevice f :: t -> b
    f = do
          t
    which <- ((\hsc_ptr :: Ptr Event
    hsc_ptr -> Ptr Event -> Int -> IO t
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Event
    hsc_ptr 8)) Ptr Event
    ptr
    {-# LINE 607 "src/SDL/Raw/Types.hsc" #-}
          return $! f which

        controllerbutton :: (t -> t -> t -> b) -> IO b
    controllerbutton f :: t -> t -> t -> b
    f = do
          t
    which <- ((\hsc_ptr :: Ptr Event
    hsc_ptr -> Ptr Event -> Int -> IO t
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Event
    hsc_ptr 8)) Ptr Event
    ptr
    {-# LINE 611 "src/SDL/Raw/Types.hsc" #-}
          button <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 612 "src/SDL/Raw/Types.hsc" #-}
          state <- ((\hsc_ptr -> peekByteOff hsc_ptr 13)) ptr
    {-# LINE 613 "src/SDL/Raw/Types.hsc" #-}
          return $! f which button state

        controllerdevice :: (t -> b) -> IO b
    controllerdevice f :: t -> b
    f = do
          t
    which <- ((\hsc_ptr :: Ptr Event
    hsc_ptr -> Ptr Event -> Int -> IO t
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Event
    hsc_ptr 8)) Ptr Event
    ptr
    {-# LINE 617 "src/SDL/Raw/Types.hsc" #-}
          return $! f which

        audiodevice :: (t -> t -> b) -> IO b
    audiodevice f :: t -> t -> b
    f = do
          t
    which <- ((\hsc_ptr :: Ptr Event
    hsc_ptr -> Ptr Event -> Int -> IO t
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Event
    hsc_ptr 8)) Ptr Event
    ptr
    {-# LINE 621 "src/SDL/Raw/Types.hsc" #-}
          iscapture <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 622 "src/SDL/Raw/Types.hsc" #-}
          return $! f which iscapture

        finger :: (t -> t -> t -> t -> t -> t -> t -> b) -> IO b
    finger f :: t -> t -> t -> t -> t -> t -> t -> b
    f = do
          t
    touchId <- ((\hsc_ptr :: Ptr Event
    hsc_ptr -> Ptr Event -> Int -> IO t
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Event
    hsc_ptr 8)) Ptr Event
    ptr
    {-# LINE 626 "src/SDL/Raw/Types.hsc" #-}
          fingerId <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 627 "src/SDL/Raw/Types.hsc" #-}
          x <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 628 "src/SDL/Raw/Types.hsc" #-}
          y <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
    {-# LINE 629 "src/SDL/Raw/Types.hsc" #-}
          dx <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 630 "src/SDL/Raw/Types.hsc" #-}
          dy <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
    {-# LINE 631 "src/SDL/Raw/Types.hsc" #-}
          pressure <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
    {-# LINE 632 "src/SDL/Raw/Types.hsc" #-}
          return $! f touchId fingerId x y dx dy pressure

        dollargesture :: (t -> t -> t -> t -> t -> t -> b) -> IO b
    dollargesture f :: t -> t -> t -> t -> t -> t -> b
    f = do
          t
    touchId <- ((\hsc_ptr :: Ptr Event
    hsc_ptr -> Ptr Event -> Int -> IO t
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Event
    hsc_ptr 8)) Ptr Event
    ptr
    {-# LINE 636 "src/SDL/Raw/Types.hsc" #-}
          gestureId <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 637 "src/SDL/Raw/Types.hsc" #-}
          numFingers <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 638 "src/SDL/Raw/Types.hsc" #-}
          err <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
    {-# LINE 639 "src/SDL/Raw/Types.hsc" #-}
          x <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 640 "src/SDL/Raw/Types.hsc" #-}
          y <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
    {-# LINE 641 "src/SDL/Raw/Types.hsc" #-}
          return $! f touchId gestureId numFingers err x y
      poke :: Ptr Event -> Event -> IO ()
    poke ptr :: Ptr Event
    ptr ev :: Event
    ev = case Event
    ev of
        WindowEvent typ :: Word32
    typ timestamp :: Word32
    timestamp wid :: Word32
    wid event :: Word8
    event data1 :: Int32
    data1 data2 :: Int32
    data2 -> do
          ((\hsc_ptr :: Ptr Event
    hsc_ptr -> Ptr Event -> Int -> Word32 -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr Event
    hsc_ptr 0)) Ptr Event
    ptr Word32
    typ
    {-# LINE 645 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 646 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr wid
    {-# LINE 647 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr event
    {-# LINE 648 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr data1
    {-# LINE 649 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr data2
    {-# LINE 650 "src/SDL/Raw/Types.hsc" #-}
        KeyboardEvent typ timestamp wid state repeat' keysym -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 652 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 653 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr wid
    {-# LINE 654 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr state
    {-# LINE 655 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 13)) ptr repeat'
    {-# LINE 656 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr keysym
    {-# LINE 657 "src/SDL/Raw/Types.hsc" #-}
        TextEditingEvent typ timestamp wid text start len -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 659 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 660 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr wid
    {-# LINE 661 "src/SDL/Raw/Types.hsc" #-}
          pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 12)) ptr) text
    {-# LINE 662 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 44)) ptr start
    {-# LINE 663 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 48)) ptr len
    {-# LINE 664 "src/SDL/Raw/Types.hsc" #-}
        TextInputEvent typ timestamp wid text -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 666 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 667 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr wid
    {-# LINE 668 "src/SDL/Raw/Types.hsc" #-}
          pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 12)) ptr) text
    {-# LINE 669 "src/SDL/Raw/Types.hsc" #-}
        KeymapChangedEvent typ timestamp -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 671 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 672 "src/SDL/Raw/Types.hsc" #-}
        MouseMotionEvent typ timestamp wid which state x y xrel yrel -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 674 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 675 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr wid
    {-# LINE 676 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr which
    {-# LINE 677 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr state
    {-# LINE 678 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr x
    {-# LINE 679 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr y
    {-# LINE 680 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr xrel
    {-# LINE 681 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr yrel
    {-# LINE 682 "src/SDL/Raw/Types.hsc" #-}
        MouseButtonEvent typ timestamp wid which button state clicks x y -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 684 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 685 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr wid
    {-# LINE 686 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr which
    {-# LINE 687 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr button
    {-# LINE 688 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 17)) ptr state
    {-# LINE 689 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 18)) ptr clicks
    {-# LINE 690 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr x
    {-# LINE 691 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr y
    {-# LINE 692 "src/SDL/Raw/Types.hsc" #-}
        MouseWheelEvent typ timestamp wid which x y direction -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 694 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 695 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr wid
    {-# LINE 696 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr which
    {-# LINE 697 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr x
    {-# LINE 698 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr y
    {-# LINE 699 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr direction
    {-# LINE 700 "src/SDL/Raw/Types.hsc" #-}
        JoyAxisEvent typ timestamp which axis value -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 702 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 703 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
    {-# LINE 704 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr axis
    {-# LINE 705 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr value
    {-# LINE 706 "src/SDL/Raw/Types.hsc" #-}
        JoyBallEvent typ timestamp which ball xrel yrel -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 708 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 709 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
    {-# LINE 710 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr ball
    {-# LINE 711 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr xrel
    {-# LINE 712 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 18)) ptr yrel
    {-# LINE 713 "src/SDL/Raw/Types.hsc" #-}
        JoyHatEvent typ timestamp which hat value -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 715 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 716 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
    {-# LINE 717 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr hat
    {-# LINE 718 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 13)) ptr value
    {-# LINE 719 "src/SDL/Raw/Types.hsc" #-}
        JoyButtonEvent typ timestamp which button state -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 721 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 722 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
    {-# LINE 723 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr button
    {-# LINE 724 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 13)) ptr state
    {-# LINE 725 "src/SDL/Raw/Types.hsc" #-}
        JoyDeviceEvent typ timestamp which -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 727 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 728 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
    {-# LINE 729 "src/SDL/Raw/Types.hsc" #-}
        ControllerAxisEvent typ timestamp which axis value -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 731 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 732 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
    {-# LINE 733 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr axis
    {-# LINE 734 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr value
    {-# LINE 735 "src/SDL/Raw/Types.hsc" #-}
        ControllerButtonEvent typ timestamp which button state -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 737 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 738 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
    {-# LINE 739 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr button
    {-# LINE 740 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 13)) ptr state
    {-# LINE 741 "src/SDL/Raw/Types.hsc" #-}
        ControllerDeviceEvent typ timestamp which -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 743 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 744 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
    {-# LINE 745 "src/SDL/Raw/Types.hsc" #-}
        AudioDeviceEvent typ timestamp which iscapture -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 747 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 748 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
    {-# LINE 749 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr iscapture
    {-# LINE 750 "src/SDL/Raw/Types.hsc" #-}
        QuitEvent typ timestamp -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 752 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 753 "src/SDL/Raw/Types.hsc" #-}
        UserEvent typ timestamp wid code data1 data2 -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 755 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 756 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr wid
    {-# LINE 757 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr code
    {-# LINE 758 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr data1
    {-# LINE 759 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr data2
    {-# LINE 760 "src/SDL/Raw/Types.hsc" #-}
        SysWMEvent typ timestamp msg -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 762 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 763 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr msg
    {-# LINE 764 "src/SDL/Raw/Types.hsc" #-}
        TouchFingerEvent typ timestamp touchid fingerid x y dx dy pressure -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 766 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 767 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr touchid
    {-# LINE 768 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr fingerid
    {-# LINE 769 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr x
    {-# LINE 770 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr y
    {-# LINE 771 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr dx
    {-# LINE 772 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr dy
    {-# LINE 773 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr pressure
    {-# LINE 774 "src/SDL/Raw/Types.hsc" #-}
        MultiGestureEvent typ timestamp touchid dtheta ddist x y numfingers -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 776 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 777 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr touchid
    {-# LINE 778 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr dtheta
    {-# LINE 779 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr ddist
    {-# LINE 780 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr x
    {-# LINE 781 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr y
    {-# LINE 782 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr numfingers
    {-# LINE 783 "src/SDL/Raw/Types.hsc" #-}
        DollarGestureEvent typ timestamp touchid gestureid numfingers err x y -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 785 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 786 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr touchid
    {-# LINE 787 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr gestureid
    {-# LINE 788 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr numfingers
    {-# LINE 789 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr err
    {-# LINE 790 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr x
    {-# LINE 791 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr y
    {-# LINE 792 "src/SDL/Raw/Types.hsc" #-}
        ClipboardUpdateEvent typ timestamp -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 794 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 795 "src/SDL/Raw/Types.hsc" #-}
        DropEvent typ timestamp file -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 797 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 798 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr file
    {-# LINE 799 "src/SDL/Raw/Types.hsc" #-}
        UnknownEvent typ timestamp -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 801 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
    {-# LINE 802 "src/SDL/Raw/Types.hsc" #-}

    data Finger = Finger
      { Finger -> TouchID
    fingerID :: !FingerID
      , Finger -> CFloat
    fingerX :: !CFloat
      , Finger -> CFloat
    fingerY :: !CFloat
      , Finger -> CFloat
    fingerPressure :: !CFloat
      } deriving (Finger -> Finger -> Bool
    (Finger -> Finger -> Bool)
    -> (Finger -> Finger -> Bool) -> Eq Finger
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: Finger -> Finger -> Bool
    $c/= :: Finger -> Finger -> Bool
    == :: Finger -> Finger -> Bool
    $c== :: Finger -> Finger -> Bool
    Eq, Int -> Finger -> ShowS
    [Finger] -> ShowS
    Finger -> String
    (Int -> Finger -> ShowS)
    -> (Finger -> String) -> ([Finger] -> ShowS) -> Show Finger
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [Finger] -> ShowS
    $cshowList :: [Finger] -> ShowS
    show :: Finger -> String
    $cshow :: Finger -> String
    showsPrec :: Int -> Finger -> ShowS
    $cshowsPrec :: Int -> Finger -> ShowS
    Show, Typeable)

    instance Storable Finger where
      sizeOf :: Finger -> Int
    sizeOf _ = ((24))
    {-# LINE 812 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr Finger -> IO Finger
    peek ptr :: Ptr Finger
    ptr = do
        TouchID
    fingerId <- ((\hsc_ptr :: Ptr Finger
    hsc_ptr -> Ptr Finger -> Int -> IO TouchID
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Finger
    hsc_ptr 0)) Ptr Finger
    ptr
    {-# LINE 815 "src/SDL/Raw/Types.hsc" #-}
        x <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 816 "src/SDL/Raw/Types.hsc" #-}
        y <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 817 "src/SDL/Raw/Types.hsc" #-}
        pressure <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 818 "src/SDL/Raw/Types.hsc" #-}
        return $! Finger fingerId x y pressure
      poke :: Ptr Finger -> Finger -> IO ()
    poke ptr :: Ptr Finger
    ptr (Finger fingerId :: TouchID
    fingerId x :: CFloat
    x y :: CFloat
    y pressure :: CFloat
    pressure) = do
        ((\hsc_ptr :: Ptr Finger
    hsc_ptr -> Ptr Finger -> Int -> TouchID -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr Finger
    hsc_ptr 0)) Ptr Finger
    ptr TouchID
    fingerId
    {-# LINE 821 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr x
    {-# LINE 822 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr y
    {-# LINE 823 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr pressure
    {-# LINE 824 "src/SDL/Raw/Types.hsc" #-}

    data GameControllerButtonBind
      = GameControllerButtonBindNone
      | GameControllerButtonBindButton
        { GameControllerButtonBind -> CInt
    gameControllerButtonBindButton :: !CInt
        }
      | GameControllerButtonBindAxis
        { GameControllerButtonBind -> CInt
    gameControllerButtonBindAxis :: !CInt
        }
      | GameControllerButtonBindHat
        { GameControllerButtonBind -> CInt
    gameControllerButtonBindHat :: !CInt
        , GameControllerButtonBind -> CInt
    gameControllerButtonBindHatMask :: !CInt
        }
      deriving (GameControllerButtonBind -> GameControllerButtonBind -> Bool
    (GameControllerButtonBind -> GameControllerButtonBind -> Bool)
    -> (GameControllerButtonBind -> GameControllerButtonBind -> Bool)
    -> Eq GameControllerButtonBind
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: GameControllerButtonBind -> GameControllerButtonBind -> Bool
    $c/= :: GameControllerButtonBind -> GameControllerButtonBind -> Bool
    == :: GameControllerButtonBind -> GameControllerButtonBind -> Bool
    $c== :: GameControllerButtonBind -> GameControllerButtonBind -> Bool
    Eq, Int -> GameControllerButtonBind -> ShowS
    [GameControllerButtonBind] -> ShowS
    GameControllerButtonBind -> String
    (Int -> GameControllerButtonBind -> ShowS)
    -> (GameControllerButtonBind -> String)
    -> ([GameControllerButtonBind] -> ShowS)
    -> Show GameControllerButtonBind
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [GameControllerButtonBind] -> ShowS
    $cshowList :: [GameControllerButtonBind] -> ShowS
    show :: GameControllerButtonBind -> String
    $cshow :: GameControllerButtonBind -> String
    showsPrec :: Int -> GameControllerButtonBind -> ShowS
    $cshowsPrec :: Int -> GameControllerButtonBind -> ShowS
    Show, Typeable)

    instance Storable GameControllerButtonBind where
      sizeOf :: GameControllerButtonBind -> Int
    sizeOf _ = ((12))
    {-# LINE 841 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr GameControllerButtonBind -> IO GameControllerButtonBind
    peek ptr :: Ptr GameControllerButtonBind
    ptr = do
        Word32
    bind_type <- ((\hsc_ptr :: Ptr GameControllerButtonBind
    hsc_ptr -> Ptr GameControllerButtonBind -> Int -> IO Word32
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr GameControllerButtonBind
    hsc_ptr 0)) Ptr GameControllerButtonBind
    ptr
    {-# LINE 844 "src/SDL/Raw/Types.hsc" #-}
        case bind_type :: (Word32) of
    {-# LINE 845 "src/SDL/Raw/Types.hsc" #-}
          (0) -> do
    {-# LINE 846 "src/SDL/Raw/Types.hsc" #-}
            return $! GameControllerButtonBindNone
          (1) -> do
    {-# LINE 848 "src/SDL/Raw/Types.hsc" #-}
            button <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 849 "src/SDL/Raw/Types.hsc" #-}
            return $! GameControllerButtonBindButton button
          (2) -> do
    {-# LINE 851 "src/SDL/Raw/Types.hsc" #-}
            axis <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 852 "src/SDL/Raw/Types.hsc" #-}
            return $! GameControllerButtonBindAxis axis
          (3) -> do
    {-# LINE 854 "src/SDL/Raw/Types.hsc" #-}
            hat <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 855 "src/SDL/Raw/Types.hsc" #-}
            hat_mask <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 856 "src/SDL/Raw/Types.hsc" #-}
            return $! GameControllerButtonBindHat hat hat_mask
          _ -> error $ "Unknown type " ++ show bind_type ++ " for SDL_GameControllerButtonBind"
      poke :: Ptr GameControllerButtonBind -> GameControllerButtonBind -> IO ()
    poke ptr :: Ptr GameControllerButtonBind
    ptr bind :: GameControllerButtonBind
    bind = case GameControllerButtonBind
    bind of
        GameControllerButtonBindNone -> do
          ((\hsc_ptr :: Ptr GameControllerButtonBind
    hsc_ptr -> Ptr GameControllerButtonBind -> Int -> Word32 -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr GameControllerButtonBind
    hsc_ptr 0)) Ptr GameControllerButtonBind
    ptr ((0) :: (Word32))
    {-# LINE 861 "src/SDL/Raw/Types.hsc" #-}
        GameControllerButtonBindButton button -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr ((1) :: (Word32))
    {-# LINE 863 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr button
    {-# LINE 864 "src/SDL/Raw/Types.hsc" #-}
        GameControllerButtonBindAxis axis -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr ((2) :: (Word32))
    {-# LINE 866 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr axis
    {-# LINE 867 "src/SDL/Raw/Types.hsc" #-}
        GameControllerButtonBindHat hat hat_mask -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr ((3) :: (Word32))
    {-# LINE 869 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr hat
    {-# LINE 870 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr hat_mask
    {-# LINE 871 "src/SDL/Raw/Types.hsc" #-}

    data HapticDirection = HapticDirection
      { HapticDirection -> Word8
    hapticDirectionType :: !Word8
      , HapticDirection -> Int32
    hapticDirectionX :: !Int32
      , HapticDirection -> Int32
    hapticDirectionY :: !Int32
      , HapticDirection -> Int32
    hapticDirectionZ :: !Int32
      } deriving (HapticDirection -> HapticDirection -> Bool
    (HapticDirection -> HapticDirection -> Bool)
    -> (HapticDirection -> HapticDirection -> Bool)
    -> Eq HapticDirection
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: HapticDirection -> HapticDirection -> Bool
    $c/= :: HapticDirection -> HapticDirection -> Bool
    == :: HapticDirection -> HapticDirection -> Bool
    $c== :: HapticDirection -> HapticDirection -> Bool
    Eq, Int -> HapticDirection -> ShowS
    [HapticDirection] -> ShowS
    HapticDirection -> String
    (Int -> HapticDirection -> ShowS)
    -> (HapticDirection -> String)
    -> ([HapticDirection] -> ShowS)
    -> Show HapticDirection
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [HapticDirection] -> ShowS
    $cshowList :: [HapticDirection] -> ShowS
    show :: HapticDirection -> String
    $cshow :: HapticDirection -> String
    showsPrec :: Int -> HapticDirection -> ShowS
    $cshowsPrec :: Int -> HapticDirection -> ShowS
    Show, Typeable)

    instance Storable HapticDirection where
      sizeOf :: HapticDirection -> Int
    sizeOf _ = ((16))
    {-# LINE 881 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr HapticDirection -> IO HapticDirection
    peek ptr :: Ptr HapticDirection
    ptr = do
        Word8
    typ <- ((\hsc_ptr :: Ptr HapticDirection
    hsc_ptr -> Ptr HapticDirection -> Int -> IO Word8
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr HapticDirection
    hsc_ptr 0)) Ptr HapticDirection
    ptr
    {-# LINE 884 "src/SDL/Raw/Types.hsc" #-}
        x <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 885 "src/SDL/Raw/Types.hsc" #-}
        y <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 886 "src/SDL/Raw/Types.hsc" #-}
        z <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 887 "src/SDL/Raw/Types.hsc" #-}
        return $! HapticDirection typ x y z
      poke :: Ptr HapticDirection -> HapticDirection -> IO ()
    poke ptr :: Ptr HapticDirection
    ptr (HapticDirection typ :: Word8
    typ x :: Int32
    x y :: Int32
    y z :: Int32
    z) = do
        ((\hsc_ptr :: Ptr HapticDirection
    hsc_ptr -> Ptr HapticDirection -> Int -> Word8 -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr HapticDirection
    hsc_ptr 0)) Ptr HapticDirection
    ptr Word8
    typ
    {-# LINE 890 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr x
    {-# LINE 891 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr y
    {-# LINE 892 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr z
    {-# LINE 893 "src/SDL/Raw/Types.hsc" #-}

    data HapticEffect
      = HapticConstant
        { HapticEffect -> AudioFormat
    hapticEffectType :: !Word16
        , HapticEffect -> HapticDirection
    hapticConstantDirection :: !HapticDirection
        , HapticEffect -> Word32
    hapticConstantLength :: !Word32
        , HapticEffect -> AudioFormat
    hapticConstantDelay :: !Word16
        , HapticEffect -> AudioFormat
    hapticConstantButton :: !Word16
        , HapticEffect -> AudioFormat
    hapticConstantInterval :: !Word16
        , HapticEffect -> Int16
    hapticConstantLevel :: !Int16
        , HapticEffect -> AudioFormat
    hapticConstantAttackLength :: !Word16
        , HapticEffect -> AudioFormat
    hapticConstantAttackLevel :: !Word16
        , HapticEffect -> AudioFormat
    hapticConstantFadeLength :: !Word16
        , HapticEffect -> AudioFormat
    hapticConstantFadeLevel :: !Word16
        }
      | HapticPeriodic
        { hapticEffectType :: !Word16
        , HapticEffect -> HapticDirection
    hapticPeriodicDirection :: !HapticDirection
        , HapticEffect -> Word32
    hapticPeriodicLength :: !Word32
        , HapticEffect -> AudioFormat
    hapticPeriodicDelay :: !Word16
        , HapticEffect -> AudioFormat
    hapticPeriodicButton :: !Word16
        , HapticEffect -> AudioFormat
    hapticPeriodicInterval :: !Word16
        , HapticEffect -> AudioFormat
    hapticPeriodicPeriod :: !Word16
        , HapticEffect -> Int16
    hapticPeriodicMagnitude :: !Int16
        , HapticEffect -> Int16
    hapticPeriodicOffset :: !Int16
        , HapticEffect -> AudioFormat
    hapticPeriodicPhase :: !Word16
        , HapticEffect -> AudioFormat
    hapticPeriodicAttackLength :: !Word16
        , HapticEffect -> AudioFormat
    hapticPeriodicAttackLevel :: !Word16
        , HapticEffect -> AudioFormat
    hapticPeriodicFadeLength :: !Word16
        , HapticEffect -> AudioFormat
    hapticPeriodicFadeLevel :: !Word16
        }
      | HapticCondition
        { hapticEffectType :: !Word16
        , HapticEffect -> Word32
    hapticConditionLength :: !Word32
        , HapticEffect -> AudioFormat
    hapticConditionDelay :: !Word16
        , HapticEffect -> AudioFormat
    hapticConditionButton :: !Word16
        , HapticEffect -> AudioFormat
    hapticConditionInterval :: !Word16
        , HapticEffect -> [AudioFormat]
    hapticConditionRightSat :: ![Word16]
        , HapticEffect -> [AudioFormat]
    hapticConditionLeftSat :: ![Word16]
        , HapticEffect -> [Int16]
    hapticConditionRightCoeff :: ![Int16]
        , HapticEffect -> [Int16]
    hapticConditionLeftCoeff :: ![Int16]
        , HapticEffect -> [AudioFormat]
    hapticConditionDeadband :: ![Word16]
        , HapticEffect -> [Int16]
    hapticConditionCenter :: ![Int16]
        }
      | HapticRamp
        { hapticEffectType :: !Word16
        , HapticEffect -> HapticDirection
    hapticRampDirection :: !HapticDirection
        , HapticEffect -> Word32
    hapticRampLength :: !Word32
        , HapticEffect -> AudioFormat
    hapticRampDelay :: !Word16
        , HapticEffect -> AudioFormat
    hapticRampButton :: !Word16
        , HapticEffect -> AudioFormat
    hapticRampInterval :: !Word16
        , HapticEffect -> Int16
    hapticRampStart :: !Int16
        , HapticEffect -> Int16
    hapticRampEnd :: !Int16
        , HapticEffect -> AudioFormat
    hapticRampAttackLength :: !Word16
        , HapticEffect -> AudioFormat
    hapticRampAttackLevel :: !Word16
        , HapticEffect -> AudioFormat
    hapticRampFadeLength :: !Word16
        , HapticEffect -> AudioFormat
    hapticRampFadeLevel :: !Word16
        }
      | HapticLeftRight
        { hapticEffectType :: !Word16
        , HapticEffect -> Word32
    hapticLeftRightLength :: !Word32
        , HapticEffect -> AudioFormat
    hapticLeftRightLargeMagnitude :: !Word16
        , HapticEffect -> AudioFormat
    hapticLeftRightSmallMagnitude :: !Word16
        }
      | HapticCustom
        { hapticEffectType :: !Word16
        , HapticEffect -> HapticDirection
    hapticCustomDirection :: !HapticDirection
        , HapticEffect -> Word32
    hapticCustomLength :: !Word32
        , HapticEffect -> AudioFormat
    hapticCustomDelay :: !Word16
        , HapticEffect -> AudioFormat
    hapticCustomButton :: !Word16
        , HapticEffect -> AudioFormat
    hapticCustomInterval :: !Word16
        , HapticEffect -> Word8
    hapticCustomChannels :: !Word8
        , HapticEffect -> AudioFormat
    hapticCustomPeriod :: !Word16
        , HapticEffect -> AudioFormat
    hapticCustomSamples :: !Word16
        , HapticEffect -> Ptr AudioFormat
    hapticCustomData :: !(Ptr Word16)
        , HapticEffect -> AudioFormat
    hapticCustomAttackLength :: !Word16
        , HapticEffect -> AudioFormat
    hapticCustomAttackLevel :: !Word16
        , HapticEffect -> AudioFormat
    hapticCustomFadeLength :: !Word16
        , HapticEffect -> AudioFormat
    hapticCustomFadeLevel :: !Word16
        }
      deriving (HapticEffect -> HapticEffect -> Bool
    (HapticEffect -> HapticEffect -> Bool)
    -> (HapticEffect -> HapticEffect -> Bool) -> Eq HapticEffect
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: HapticEffect -> HapticEffect -> Bool
    $c/= :: HapticEffect -> HapticEffect -> Bool
    == :: HapticEffect -> HapticEffect -> Bool
    $c== :: HapticEffect -> HapticEffect -> Bool
    Eq, Int -> HapticEffect -> ShowS
    [HapticEffect] -> ShowS
    HapticEffect -> String
    (Int -> HapticEffect -> ShowS)
    -> (HapticEffect -> String)
    -> ([HapticEffect] -> ShowS)
    -> Show HapticEffect
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [HapticEffect] -> ShowS
    $cshowList :: [HapticEffect] -> ShowS
    show :: HapticEffect -> String
    $cshow :: HapticEffect -> String
    showsPrec :: Int -> HapticEffect -> ShowS
    $cshowsPrec :: Int -> HapticEffect -> ShowS
    Show, Typeable)

    instance Storable HapticEffect where
      sizeOf :: HapticEffect -> Int
    sizeOf _ = ((72))
    {-# LINE 977 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr HapticEffect -> IO HapticEffect
    peek ptr :: Ptr HapticEffect
    ptr = do
        AudioFormat
    typ <- ((\hsc_ptr :: Ptr HapticEffect
    hsc_ptr -> Ptr HapticEffect -> Int -> IO AudioFormat
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr HapticEffect
    hsc_ptr 0)) Ptr HapticEffect
    ptr
    {-# LINE 980 "src/SDL/Raw/Types.hsc" #-}
        case typ of
          (1) -> do
    {-# LINE 982 "src/SDL/Raw/Types.hsc" #-}
            direction <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 983 "src/SDL/Raw/Types.hsc" #-}
            len <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
    {-# LINE 984 "src/SDL/Raw/Types.hsc" #-}
            delay <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 985 "src/SDL/Raw/Types.hsc" #-}
            button <- ((\hsc_ptr -> peekByteOff hsc_ptr 26)) ptr
    {-# LINE 986 "src/SDL/Raw/Types.hsc" #-}
            interval <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
    {-# LINE 987 "src/SDL/Raw/Types.hsc" #-}
            level <- ((\hsc_ptr -> peekByteOff hsc_ptr 30)) ptr
    {-# LINE 988 "src/SDL/Raw/Types.hsc" #-}
            attack_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 989 "src/SDL/Raw/Types.hsc" #-}
            attack_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 34)) ptr
    {-# LINE 990 "src/SDL/Raw/Types.hsc" #-}
            fade_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
    {-# LINE 991 "src/SDL/Raw/Types.hsc" #-}
            fade_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 38)) ptr
    {-# LINE 992 "src/SDL/Raw/Types.hsc" #-}
            return $! HapticConstant typ direction len delay button interval level attack_length attack_level fade_length fade_level

          (2) -> hapticperiodic $ HapticPeriodic typ
    {-# LINE 995 "src/SDL/Raw/Types.hsc" #-}
          (8) -> hapticperiodic $ HapticPeriodic typ
    {-# LINE 996 "src/SDL/Raw/Types.hsc" #-}
          (16) -> hapticperiodic $ HapticPeriodic typ
    {-# LINE 997 "src/SDL/Raw/Types.hsc" #-}
          (32) -> hapticperiodic $ HapticPeriodic typ
    {-# LINE 998 "src/SDL/Raw/Types.hsc" #-}

          (64) -> do
    {-# LINE 1000 "src/SDL/Raw/Types.hsc" #-}
            direction <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 1001 "src/SDL/Raw/Types.hsc" #-}
            len <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
    {-# LINE 1002 "src/SDL/Raw/Types.hsc" #-}
            delay <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 1003 "src/SDL/Raw/Types.hsc" #-}
            button <- ((\hsc_ptr -> peekByteOff hsc_ptr 26)) ptr
    {-# LINE 1004 "src/SDL/Raw/Types.hsc" #-}
            interval <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
    {-# LINE 1005 "src/SDL/Raw/Types.hsc" #-}
            start <- ((\hsc_ptr -> peekByteOff hsc_ptr 30)) ptr
    {-# LINE 1006 "src/SDL/Raw/Types.hsc" #-}
            end <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 1007 "src/SDL/Raw/Types.hsc" #-}
            attack_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 34)) ptr
    {-# LINE 1008 "src/SDL/Raw/Types.hsc" #-}
            attack_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
    {-# LINE 1009 "src/SDL/Raw/Types.hsc" #-}
            fade_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 38)) ptr
    {-# LINE 1010 "src/SDL/Raw/Types.hsc" #-}
            fade_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
    {-# LINE 1011 "src/SDL/Raw/Types.hsc" #-}
            return $! HapticRamp typ direction len delay button interval start end attack_length attack_level fade_length fade_level

          (128) -> hapticcondition $ HapticCondition typ
    {-# LINE 1014 "src/SDL/Raw/Types.hsc" #-}
          (256) -> hapticcondition $ HapticCondition typ
    {-# LINE 1015 "src/SDL/Raw/Types.hsc" #-}
          (512) -> hapticcondition $ HapticCondition typ
    {-# LINE 1016 "src/SDL/Raw/Types.hsc" #-}
          (1024) -> hapticcondition $ HapticCondition typ
    {-# LINE 1017 "src/SDL/Raw/Types.hsc" #-}

          (4) -> do
    {-# LINE 1019 "src/SDL/Raw/Types.hsc" #-}
            len <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 1020 "src/SDL/Raw/Types.hsc" #-}
            large_magnitude <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 1021 "src/SDL/Raw/Types.hsc" #-}
            small_magnitude <- ((\hsc_ptr -> peekByteOff hsc_ptr 10)) ptr
    {-# LINE 1022 "src/SDL/Raw/Types.hsc" #-}
            return $! HapticLeftRight typ len large_magnitude small_magnitude

          (2048) -> do
    {-# LINE 1025 "src/SDL/Raw/Types.hsc" #-}
            direction <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 1026 "src/SDL/Raw/Types.hsc" #-}
            len <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
    {-# LINE 1027 "src/SDL/Raw/Types.hsc" #-}
            delay <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 1028 "src/SDL/Raw/Types.hsc" #-}
            button <- ((\hsc_ptr -> peekByteOff hsc_ptr 26)) ptr
    {-# LINE 1029 "src/SDL/Raw/Types.hsc" #-}
            interval <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
    {-# LINE 1030 "src/SDL/Raw/Types.hsc" #-}
            channels <- ((\hsc_ptr -> peekByteOff hsc_ptr 30)) ptr
    {-# LINE 1031 "src/SDL/Raw/Types.hsc" #-}
            period <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 1032 "src/SDL/Raw/Types.hsc" #-}
            samples <- ((\hsc_ptr -> peekByteOff hsc_ptr 34)) ptr
    {-# LINE 1033 "src/SDL/Raw/Types.hsc" #-}
            datum <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
    {-# LINE 1034 "src/SDL/Raw/Types.hsc" #-}
            attack_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 48)) ptr
    {-# LINE 1035 "src/SDL/Raw/Types.hsc" #-}
            attack_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 50)) ptr
    {-# LINE 1036 "src/SDL/Raw/Types.hsc" #-}
            fade_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 52)) ptr
    {-# LINE 1037 "src/SDL/Raw/Types.hsc" #-}
            fade_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 54)) ptr
    {-# LINE 1038 "src/SDL/Raw/Types.hsc" #-}
            return $! HapticCustom typ direction len delay button interval channels period samples datum attack_length attack_level fade_length fade_level
          _ -> error $ "Unknown type " ++ show typ ++ " for SDL_HapticEffect"
        where
        hapticperiodic :: (t
     -> t -> t -> t -> t -> t -> t -> t -> t -> t -> t -> t -> t -> b)
    -> IO b
    hapticperiodic f :: t -> t -> t -> t -> t -> t -> t -> t -> t -> t -> t -> t -> t -> b
    f = do
          t
    direction <- ((\hsc_ptr :: Ptr HapticEffect
    hsc_ptr -> Ptr HapticEffect -> Int -> IO t
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr HapticEffect
    hsc_ptr 4)) Ptr HapticEffect
    ptr
    {-# LINE 1043 "src/SDL/Raw/Types.hsc" #-}
          len <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
    {-# LINE 1044 "src/SDL/Raw/Types.hsc" #-}
          delay <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 1045 "src/SDL/Raw/Types.hsc" #-}
          button <- ((\hsc_ptr -> peekByteOff hsc_ptr 26)) ptr
    {-# LINE 1046 "src/SDL/Raw/Types.hsc" #-}
          interval <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
    {-# LINE 1047 "src/SDL/Raw/Types.hsc" #-}
          period <- ((\hsc_ptr -> peekByteOff hsc_ptr 30)) ptr
    {-# LINE 1048 "src/SDL/Raw/Types.hsc" #-}
          magnitude <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 1049 "src/SDL/Raw/Types.hsc" #-}
          offset <- ((\hsc_ptr -> peekByteOff hsc_ptr 34)) ptr
    {-# LINE 1050 "src/SDL/Raw/Types.hsc" #-}
          phase <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
    {-# LINE 1051 "src/SDL/Raw/Types.hsc" #-}
          attack_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 38)) ptr
    {-# LINE 1052 "src/SDL/Raw/Types.hsc" #-}
          attack_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
    {-# LINE 1053 "src/SDL/Raw/Types.hsc" #-}
          fade_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 42)) ptr
    {-# LINE 1054 "src/SDL/Raw/Types.hsc" #-}
          fade_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 44)) ptr
    {-# LINE 1055 "src/SDL/Raw/Types.hsc" #-}
          return $! f direction len delay button interval period magnitude offset phase attack_length attack_level fade_length fade_level

        hapticcondition :: (t -> t -> t -> t -> [a] -> [a] -> [a] -> [a] -> [a] -> [a] -> b)
    -> IO b
    hapticcondition f :: t -> t -> t -> t -> [a] -> [a] -> [a] -> [a] -> [a] -> [a] -> b
    f = do
          t
    len <- ((\hsc_ptr :: Ptr HapticEffect
    hsc_ptr -> Ptr HapticEffect -> Int -> IO t
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr HapticEffect
    hsc_ptr 20)) Ptr HapticEffect
    ptr
    {-# LINE 1059 "src/SDL/Raw/Types.hsc" #-}
          delay <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 1060 "src/SDL/Raw/Types.hsc" #-}
          button <- ((\hsc_ptr -> peekByteOff hsc_ptr 26)) ptr
    {-# LINE 1061 "src/SDL/Raw/Types.hsc" #-}
          interval <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
    {-# LINE 1062 "src/SDL/Raw/Types.hsc" #-}
          right_sat <- peekArray 3 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 30)) ptr
    {-# LINE 1063 "src/SDL/Raw/Types.hsc" #-}
          left_sat <- peekArray 3 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 36)) ptr
    {-# LINE 1064 "src/SDL/Raw/Types.hsc" #-}
          right_coeff <- peekArray 3 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 42)) ptr
    {-# LINE 1065 "src/SDL/Raw/Types.hsc" #-}
          left_coeff <- peekArray 3 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 48)) ptr
    {-# LINE 1066 "src/SDL/Raw/Types.hsc" #-}
          deadband <- peekArray 3 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 54)) ptr
    {-# LINE 1067 "src/SDL/Raw/Types.hsc" #-}
          center <- peekArray 3 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 60)) ptr
    {-# LINE 1068 "src/SDL/Raw/Types.hsc" #-}
          return $! f len delay button interval right_sat left_sat right_coeff left_coeff deadband center
      poke :: Ptr HapticEffect -> HapticEffect -> IO ()
    poke ptr :: Ptr HapticEffect
    ptr event :: HapticEffect
    event = case HapticEffect
    event of
        HapticConstant typ :: AudioFormat
    typ direction :: HapticDirection
    direction len :: Word32
    len delay :: AudioFormat
    delay button :: AudioFormat
    button interval :: AudioFormat
    interval level :: Int16
    level attack_length :: AudioFormat
    attack_length attack_level :: AudioFormat
    attack_level fade_length :: AudioFormat
    fade_length fade_level :: AudioFormat
    fade_level -> do
          ((\hsc_ptr :: Ptr HapticEffect
    hsc_ptr -> Ptr HapticEffect -> Int -> AudioFormat -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr HapticEffect
    hsc_ptr 0)) Ptr HapticEffect
    ptr AudioFormat
    typ
    {-# LINE 1072 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr direction
    {-# LINE 1073 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr len
    {-# LINE 1074 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr delay
    {-# LINE 1075 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 26)) ptr button
    {-# LINE 1076 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr interval
    {-# LINE 1077 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 30)) ptr level
    {-# LINE 1078 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr attack_length
    {-# LINE 1079 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 34)) ptr attack_level
    {-# LINE 1080 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr fade_length
    {-# LINE 1081 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 38)) ptr fade_level
    {-# LINE 1082 "src/SDL/Raw/Types.hsc" #-}
        HapticPeriodic typ direction len delay button interval period magnitude offset phase attack_length attack_level fade_length fade_level -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 1084 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr direction
    {-# LINE 1085 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr len
    {-# LINE 1086 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr delay
    {-# LINE 1087 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 26)) ptr button
    {-# LINE 1088 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr interval
    {-# LINE 1089 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 30)) ptr period
    {-# LINE 1090 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr magnitude
    {-# LINE 1091 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 34)) ptr offset
    {-# LINE 1092 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr phase
    {-# LINE 1093 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 38)) ptr attack_length
    {-# LINE 1094 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr attack_level
    {-# LINE 1095 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 42)) ptr fade_length
    {-# LINE 1096 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 44)) ptr fade_level
    {-# LINE 1097 "src/SDL/Raw/Types.hsc" #-}
        HapticCondition typ len delay button interval right_sat left_sat right_coeff left_coeff deadband center -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 1099 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr len
    {-# LINE 1100 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr delay
    {-# LINE 1101 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 26)) ptr button
    {-# LINE 1102 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr interval
    {-# LINE 1103 "src/SDL/Raw/Types.hsc" #-}
          pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 30)) ptr) right_sat
    {-# LINE 1104 "src/SDL/Raw/Types.hsc" #-}
          pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 36)) ptr) left_sat
    {-# LINE 1105 "src/SDL/Raw/Types.hsc" #-}
          pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 42)) ptr) right_coeff
    {-# LINE 1106 "src/SDL/Raw/Types.hsc" #-}
          pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 48)) ptr) left_coeff
    {-# LINE 1107 "src/SDL/Raw/Types.hsc" #-}
          pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 54)) ptr) deadband
    {-# LINE 1108 "src/SDL/Raw/Types.hsc" #-}
          pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 60)) ptr) center
    {-# LINE 1109 "src/SDL/Raw/Types.hsc" #-}
        HapticRamp typ direction len delay button interval start end attack_length attack_level fade_length fade_level -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 1111 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr direction
    {-# LINE 1112 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr len
    {-# LINE 1113 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr delay
    {-# LINE 1114 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 26)) ptr button
    {-# LINE 1115 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr interval
    {-# LINE 1116 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 30)) ptr start
    {-# LINE 1117 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr end
    {-# LINE 1118 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 34)) ptr attack_length
    {-# LINE 1119 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr attack_level
    {-# LINE 1120 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 38)) ptr fade_length
    {-# LINE 1121 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr fade_level
    {-# LINE 1122 "src/SDL/Raw/Types.hsc" #-}
        HapticLeftRight typ len large_magnitude small_magnitude -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 1124 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr len
    {-# LINE 1125 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr large_magnitude
    {-# LINE 1126 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 10)) ptr small_magnitude
    {-# LINE 1127 "src/SDL/Raw/Types.hsc" #-}
        HapticCustom typ direction len delay button interval channels period samples datum attack_length attack_level fade_length fade_level -> do
          ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
    {-# LINE 1129 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr direction
    {-# LINE 1130 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr len
    {-# LINE 1131 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr delay
    {-# LINE 1132 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 26)) ptr button
    {-# LINE 1133 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr interval
    {-# LINE 1134 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 30)) ptr channels
    {-# LINE 1135 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr period
    {-# LINE 1136 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 34)) ptr samples
    {-# LINE 1137 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr datum
    {-# LINE 1138 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 48)) ptr attack_length
    {-# LINE 1139 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 50)) ptr attack_level
    {-# LINE 1140 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 52)) ptr fade_length
    {-# LINE 1141 "src/SDL/Raw/Types.hsc" #-}
          ((\hsc_ptr -> pokeByteOff hsc_ptr 54)) ptr fade_level
    {-# LINE 1142 "src/SDL/Raw/Types.hsc" #-}

    data JoystickGUID = JoystickGUID
      { JoystickGUID -> [Word8]
    joystickGUID :: ![Word8]
      } deriving (JoystickGUID -> JoystickGUID -> Bool
    (JoystickGUID -> JoystickGUID -> Bool)
    -> (JoystickGUID -> JoystickGUID -> Bool) -> Eq JoystickGUID
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: JoystickGUID -> JoystickGUID -> Bool
    $c/= :: JoystickGUID -> JoystickGUID -> Bool
    == :: JoystickGUID -> JoystickGUID -> Bool
    $c== :: JoystickGUID -> JoystickGUID -> Bool
    Eq, Int -> JoystickGUID -> ShowS
    [JoystickGUID] -> ShowS
    JoystickGUID -> String
    (Int -> JoystickGUID -> ShowS)
    -> (JoystickGUID -> String)
    -> ([JoystickGUID] -> ShowS)
    -> Show JoystickGUID
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [JoystickGUID] -> ShowS
    $cshowList :: [JoystickGUID] -> ShowS
    show :: JoystickGUID -> String
    $cshow :: JoystickGUID -> String
    showsPrec :: Int -> JoystickGUID -> ShowS
    $cshowsPrec :: Int -> JoystickGUID -> ShowS
    Show, Typeable)

    instance Storable JoystickGUID where
      sizeOf :: JoystickGUID -> Int
    sizeOf _ = ((16))
    {-# LINE 1149 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr JoystickGUID -> IO JoystickGUID
    peek ptr :: Ptr JoystickGUID
    ptr = do
        [Word8]
    guid <- Int -> Ptr Word8 -> IO [Word8]
    forall a. Storable a => Int -> Ptr a -> IO [a]
    peekArray 16 (Ptr Word8 -> IO [Word8]) -> Ptr Word8 -> IO [Word8]
    forall a b. (a -> b) -> a -> b
    $ ((\hsc_ptr :: Ptr JoystickGUID
    hsc_ptr -> Ptr JoystickGUID
    hsc_ptr Ptr JoystickGUID -> Int -> Ptr Word8
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` 0)) Ptr JoystickGUID
    ptr
    {-# LINE 1152 "src/SDL/Raw/Types.hsc" #-}
        return $! JoystickGUID guid
      poke :: Ptr JoystickGUID -> JoystickGUID -> IO ()
    poke ptr :: Ptr JoystickGUID
    ptr (JoystickGUID guid :: [Word8]
    guid) =
        Ptr Word8 -> [Word8] -> IO ()
    forall a. Storable a => Ptr a -> [a] -> IO ()
    pokeArray (((\hsc_ptr :: Ptr JoystickGUID
    hsc_ptr -> Ptr JoystickGUID
    hsc_ptr Ptr JoystickGUID -> Int -> Ptr Word8
    forall a b. Ptr a -> Int -> Ptr b
    `plusPtr` 0)) Ptr JoystickGUID
    ptr) [Word8]
    guid
    {-# LINE 1155 "src/SDL/Raw/Types.hsc" #-}

    data Keysym = Keysym
      { Keysym -> Word32
    keysymScancode :: !Scancode
      , Keysym -> Int32
    keysymKeycode :: !Keycode
      , Keysym -> AudioFormat
    keysymMod :: !Word16
      } deriving (Keysym -> Keysym -> Bool
    (Keysym -> Keysym -> Bool)
    -> (Keysym -> Keysym -> Bool) -> Eq Keysym
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: Keysym -> Keysym -> Bool
    $c/= :: Keysym -> Keysym -> Bool
    == :: Keysym -> Keysym -> Bool
    $c== :: Keysym -> Keysym -> Bool
    Eq, Int -> Keysym -> ShowS
    [Keysym] -> ShowS
    Keysym -> String
    (Int -> Keysym -> ShowS)
    -> (Keysym -> String) -> ([Keysym] -> ShowS) -> Show Keysym
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [Keysym] -> ShowS
    $cshowList :: [Keysym] -> ShowS
    show :: Keysym -> String
    $cshow :: Keysym -> String
    showsPrec :: Int -> Keysym -> ShowS
    $cshowsPrec :: Int -> Keysym -> ShowS
    Show, Typeable)

    instance Storable Keysym where
      sizeOf :: Keysym -> Int
    sizeOf _ = ((16))
    {-# LINE 1164 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr Keysym -> IO Keysym
    peek ptr :: Ptr Keysym
    ptr = do
        Word32
    scancode <- ((\hsc_ptr :: Ptr Keysym
    hsc_ptr -> Ptr Keysym -> Int -> IO Word32
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Keysym
    hsc_ptr 0)) Ptr Keysym
    ptr
    {-# LINE 1167 "src/SDL/Raw/Types.hsc" #-}
        sym <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 1168 "src/SDL/Raw/Types.hsc" #-}
        mod' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 1169 "src/SDL/Raw/Types.hsc" #-}
        return $! Keysym scancode sym mod'
      poke :: Ptr Keysym -> Keysym -> IO ()
    poke ptr :: Ptr Keysym
    ptr (Keysym scancode :: Word32
    scancode sym :: Int32
    sym mod' :: AudioFormat
    mod') = do
        ((\hsc_ptr :: Ptr Keysym
    hsc_ptr -> Ptr Keysym -> Int -> Word32 -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr Keysym
    hsc_ptr 0)) Ptr Keysym
    ptr Word32
    scancode
    {-# LINE 1172 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr sym
    {-# LINE 1173 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr mod'
    {-# LINE 1174 "src/SDL/Raw/Types.hsc" #-}

    data MessageBoxButtonData = MessageBoxButtonData
      { MessageBoxButtonData -> Word32
    messageBoxButtonDataFlags :: !Word32
      , MessageBoxButtonData -> CInt
    messageBoxButtonButtonID :: !CInt
      , MessageBoxButtonData -> CString
    messageBoxButtonText :: !CString
      } deriving (MessageBoxButtonData -> MessageBoxButtonData -> Bool
    (MessageBoxButtonData -> MessageBoxButtonData -> Bool)
    -> (MessageBoxButtonData -> MessageBoxButtonData -> Bool)
    -> Eq MessageBoxButtonData
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: MessageBoxButtonData -> MessageBoxButtonData -> Bool
    $c/= :: MessageBoxButtonData -> MessageBoxButtonData -> Bool
    == :: MessageBoxButtonData -> MessageBoxButtonData -> Bool
    $c== :: MessageBoxButtonData -> MessageBoxButtonData -> Bool
    Eq, Int -> MessageBoxButtonData -> ShowS
    [MessageBoxButtonData] -> ShowS
    MessageBoxButtonData -> String
    (Int -> MessageBoxButtonData -> ShowS)
    -> (MessageBoxButtonData -> String)
    -> ([MessageBoxButtonData] -> ShowS)
    -> Show MessageBoxButtonData
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [MessageBoxButtonData] -> ShowS
    $cshowList :: [MessageBoxButtonData] -> ShowS
    show :: MessageBoxButtonData -> String
    $cshow :: MessageBoxButtonData -> String
    showsPrec :: Int -> MessageBoxButtonData -> ShowS
    $cshowsPrec :: Int -> MessageBoxButtonData -> ShowS
    Show, Typeable)

    instance Storable MessageBoxButtonData where
      sizeOf :: MessageBoxButtonData -> Int
    sizeOf _ = ((16))
    {-# LINE 1183 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr MessageBoxButtonData -> IO MessageBoxButtonData
    peek ptr :: Ptr MessageBoxButtonData
    ptr = do
        Word32
    flags <- ((\hsc_ptr :: Ptr MessageBoxButtonData
    hsc_ptr -> Ptr MessageBoxButtonData -> Int -> IO Word32
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr MessageBoxButtonData
    hsc_ptr 0)) Ptr MessageBoxButtonData
    ptr
    {-# LINE 1186 "src/SDL/Raw/Types.hsc" #-}
        buttonid <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 1187 "src/SDL/Raw/Types.hsc" #-}
        text <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 1188 "src/SDL/Raw/Types.hsc" #-}
        return $! MessageBoxButtonData flags buttonid text
      poke :: Ptr MessageBoxButtonData -> MessageBoxButtonData -> IO ()
    poke ptr :: Ptr MessageBoxButtonData
    ptr (MessageBoxButtonData flags :: Word32
    flags buttonid :: CInt
    buttonid text :: CString
    text) = do
        ((\hsc_ptr :: Ptr MessageBoxButtonData
    hsc_ptr -> Ptr MessageBoxButtonData -> Int -> Word32 -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr MessageBoxButtonData
    hsc_ptr 0)) Ptr MessageBoxButtonData
    ptr Word32
    flags
    {-# LINE 1191 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr buttonid
    {-# LINE 1192 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr text
    {-# LINE 1193 "src/SDL/Raw/Types.hsc" #-}

    data MessageBoxColor = MessageBoxColor
      { MessageBoxColor -> Word8
    messageBoxColorR :: !Word8
      , MessageBoxColor -> Word8
    messageBoxColorG :: !Word8
      , MessageBoxColor -> Word8
    messageBoxColorB :: !Word8
      } deriving (MessageBoxColor -> MessageBoxColor -> Bool
    (MessageBoxColor -> MessageBoxColor -> Bool)
    -> (MessageBoxColor -> MessageBoxColor -> Bool)
    -> Eq MessageBoxColor
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: MessageBoxColor -> MessageBoxColor -> Bool
    $c/= :: MessageBoxColor -> MessageBoxColor -> Bool
    == :: MessageBoxColor -> MessageBoxColor -> Bool
    $c== :: MessageBoxColor -> MessageBoxColor -> Bool
    Eq, Int -> MessageBoxColor -> ShowS
    [MessageBoxColor] -> ShowS
    MessageBoxColor -> String
    (Int -> MessageBoxColor -> ShowS)
    -> (MessageBoxColor -> String)
    -> ([MessageBoxColor] -> ShowS)
    -> Show MessageBoxColor
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [MessageBoxColor] -> ShowS
    $cshowList :: [MessageBoxColor] -> ShowS
    show :: MessageBoxColor -> String
    $cshow :: MessageBoxColor -> String
    showsPrec :: Int -> MessageBoxColor -> ShowS
    $cshowsPrec :: Int -> MessageBoxColor -> ShowS
    Show, Typeable)

    instance Storable MessageBoxColor where
      sizeOf :: MessageBoxColor -> Int
    sizeOf _ = ((3))
    {-# LINE 1202 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr MessageBoxColor -> IO MessageBoxColor
    peek ptr :: Ptr MessageBoxColor
    ptr = do
        Word8
    r <- ((\hsc_ptr :: Ptr MessageBoxColor
    hsc_ptr -> Ptr MessageBoxColor -> Int -> IO Word8
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr MessageBoxColor
    hsc_ptr 0)) Ptr MessageBoxColor
    ptr
    {-# LINE 1205 "src/SDL/Raw/Types.hsc" #-}
        g <- ((\hsc_ptr -> peekByteOff hsc_ptr 1)) ptr
    {-# LINE 1206 "src/SDL/Raw/Types.hsc" #-}
        b <- ((\hsc_ptr -> peekByteOff hsc_ptr 2)) ptr
    {-# LINE 1207 "src/SDL/Raw/Types.hsc" #-}
        return $! MessageBoxColor r g b
      poke :: Ptr MessageBoxColor -> MessageBoxColor -> IO ()
    poke ptr :: Ptr MessageBoxColor
    ptr (MessageBoxColor r :: Word8
    r g :: Word8
    g b :: Word8
    b) = do
        ((\hsc_ptr :: Ptr MessageBoxColor
    hsc_ptr -> Ptr MessageBoxColor -> Int -> Word8 -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr MessageBoxColor
    hsc_ptr 0)) Ptr MessageBoxColor
    ptr Word8
    r
    {-# LINE 1210 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 1)) ptr g
    {-# LINE 1211 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 2)) ptr b
    {-# LINE 1212 "src/SDL/Raw/Types.hsc" #-}

    data MessageBoxColorScheme = MessageBoxColorScheme
      { MessageBoxColorScheme -> MessageBoxColor
    messageBoxColorSchemeColorBackground :: !MessageBoxColor
      , MessageBoxColorScheme -> MessageBoxColor
    messageBoxColorSchemeColorText :: !MessageBoxColor
      , MessageBoxColorScheme -> MessageBoxColor
    messageBoxColorSchemeColorButtonBorder :: !MessageBoxColor
      , MessageBoxColorScheme -> MessageBoxColor
    messageBoxColorSchemeColorButtonBackground :: !MessageBoxColor
      , MessageBoxColorScheme -> MessageBoxColor
    messageBoxColorSchemeColorButtonSelected :: !MessageBoxColor
      } deriving (MessageBoxColorScheme -> MessageBoxColorScheme -> Bool
    (MessageBoxColorScheme -> MessageBoxColorScheme -> Bool)
    -> (MessageBoxColorScheme -> MessageBoxColorScheme -> Bool)
    -> Eq MessageBoxColorScheme
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: MessageBoxColorScheme -> MessageBoxColorScheme -> Bool
    $c/= :: MessageBoxColorScheme -> MessageBoxColorScheme -> Bool
    == :: MessageBoxColorScheme -> MessageBoxColorScheme -> Bool
    $c== :: MessageBoxColorScheme -> MessageBoxColorScheme -> Bool
    Eq, Int -> MessageBoxColorScheme -> ShowS
    [MessageBoxColorScheme] -> ShowS
    MessageBoxColorScheme -> String
    (Int -> MessageBoxColorScheme -> ShowS)
    -> (MessageBoxColorScheme -> String)
    -> ([MessageBoxColorScheme] -> ShowS)
    -> Show MessageBoxColorScheme
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [MessageBoxColorScheme] -> ShowS
    $cshowList :: [MessageBoxColorScheme] -> ShowS
    show :: MessageBoxColorScheme -> String
    $cshow :: MessageBoxColorScheme -> String
    showsPrec :: Int -> MessageBoxColorScheme -> ShowS
    $cshowsPrec :: Int -> MessageBoxColorScheme -> ShowS
    Show, Typeable)

    instance Storable MessageBoxColorScheme where
      sizeOf :: MessageBoxColorScheme -> Int
    sizeOf _ = ((15))
    {-# LINE 1223 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr MessageBoxColorScheme -> IO MessageBoxColorScheme
    peek ptr :: Ptr MessageBoxColorScheme
    ptr = do
        MessageBoxColor
    background <- ((\hsc_ptr :: Ptr MessageBoxColorScheme
    hsc_ptr -> Ptr MessageBoxColorScheme -> Int -> IO MessageBoxColor
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr MessageBoxColorScheme
    hsc_ptr 0)) Ptr MessageBoxColorScheme
    ptr
    {-# LINE 1226 "src/SDL/Raw/Types.hsc" #-}
        text <- ((\hsc_ptr -> peekByteOff hsc_ptr 3)) ptr
    {-# LINE 1227 "src/SDL/Raw/Types.hsc" #-}
        button_border <- ((\hsc_ptr -> peekByteOff hsc_ptr 6)) ptr
    {-# LINE 1228 "src/SDL/Raw/Types.hsc" #-}
        button_background <- ((\hsc_ptr -> peekByteOff hsc_ptr 9)) ptr
    {-# LINE 1229 "src/SDL/Raw/Types.hsc" #-}
        button_selected <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 1230 "src/SDL/Raw/Types.hsc" #-}
        return $! MessageBoxColorScheme background text button_border button_background button_selected
      poke :: Ptr MessageBoxColorScheme -> MessageBoxColorScheme -> IO ()
    poke ptr :: Ptr MessageBoxColorScheme
    ptr (MessageBoxColorScheme background :: MessageBoxColor
    background text :: MessageBoxColor
    text button_border :: MessageBoxColor
    button_border button_background :: MessageBoxColor
    button_background button_selected :: MessageBoxColor
    button_selected) = do
        ((\hsc_ptr :: Ptr MessageBoxColorScheme
    hsc_ptr -> Ptr MessageBoxColorScheme -> Int -> MessageBoxColor -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr MessageBoxColorScheme
    hsc_ptr 0)) Ptr MessageBoxColorScheme
    ptr MessageBoxColor
    background
    {-# LINE 1233 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 3)) ptr text
    {-# LINE 1234 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 6)) ptr button_border
    {-# LINE 1235 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 9)) ptr button_background
    {-# LINE 1236 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr button_selected
    {-# LINE 1237 "src/SDL/Raw/Types.hsc" #-}

    data MessageBoxData = MessageBoxData
      { MessageBoxData -> Word32
    messageBoxDataFlags :: !Word32
      , MessageBoxData -> Ptr ()
    messageBoxDataWindow :: !Window
      , MessageBoxData -> CString
    messageBoxDataTitle :: !CString
      , MessageBoxData -> CString
    messageBoxDataMessage :: !CString
      , MessageBoxData -> CInt
    messageBoxDataNumButtons :: !CInt
      , MessageBoxData -> Ptr MessageBoxButtonData
    messageBoxDataButtons :: !(Ptr MessageBoxButtonData)
      , MessageBoxData -> Ptr MessageBoxColorScheme
    messageBoxDataColorScheme :: !(Ptr MessageBoxColorScheme)
      } deriving (MessageBoxData -> MessageBoxData -> Bool
    (MessageBoxData -> MessageBoxData -> Bool)
    -> (MessageBoxData -> MessageBoxData -> Bool) -> Eq MessageBoxData
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: MessageBoxData -> MessageBoxData -> Bool
    $c/= :: MessageBoxData -> MessageBoxData -> Bool
    == :: MessageBoxData -> MessageBoxData -> Bool
    $c== :: MessageBoxData -> MessageBoxData -> Bool
    Eq, Int -> MessageBoxData -> ShowS
    [MessageBoxData] -> ShowS
    MessageBoxData -> String
    (Int -> MessageBoxData -> ShowS)
    -> (MessageBoxData -> String)
    -> ([MessageBoxData] -> ShowS)
    -> Show MessageBoxData
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [MessageBoxData] -> ShowS
    $cshowList :: [MessageBoxData] -> ShowS
    show :: MessageBoxData -> String
    $cshow :: MessageBoxData -> String
    showsPrec :: Int -> MessageBoxData -> ShowS
    $cshowsPrec :: Int -> MessageBoxData -> ShowS
    Show, Typeable)

    instance Storable MessageBoxData where
      sizeOf :: MessageBoxData -> Int
    sizeOf _ = ((56))
    {-# LINE 1250 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr MessageBoxData -> IO MessageBoxData
    peek ptr :: Ptr MessageBoxData
    ptr = do
        Word32
    flags <- ((\hsc_ptr :: Ptr MessageBoxData
    hsc_ptr -> Ptr MessageBoxData -> Int -> IO Word32
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr MessageBoxData
    hsc_ptr 0)) Ptr MessageBoxData
    ptr
    {-# LINE 1253 "src/SDL/Raw/Types.hsc" #-}
        window <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 1254 "src/SDL/Raw/Types.hsc" #-}
        title <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 1255 "src/SDL/Raw/Types.hsc" #-}
        message <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 1256 "src/SDL/Raw/Types.hsc" #-}
        numbuttons <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 1257 "src/SDL/Raw/Types.hsc" #-}
        buttons <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
    {-# LINE 1258 "src/SDL/Raw/Types.hsc" #-}
        color_scheme <- ((\hsc_ptr -> peekByteOff hsc_ptr 48)) ptr
    {-# LINE 1259 "src/SDL/Raw/Types.hsc" #-}
        return $! MessageBoxData flags window title message numbuttons buttons color_scheme
      poke :: Ptr MessageBoxData -> MessageBoxData -> IO ()
    poke ptr :: Ptr MessageBoxData
    ptr (MessageBoxData flags :: Word32
    flags window :: Ptr ()
    window title :: CString
    title message :: CString
    message numbuttons :: CInt
    numbuttons buttons :: Ptr MessageBoxButtonData
    buttons color_scheme :: Ptr MessageBoxColorScheme
    color_scheme) = do
        ((\hsc_ptr :: Ptr MessageBoxData
    hsc_ptr -> Ptr MessageBoxData -> Int -> Word32 -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr MessageBoxData
    hsc_ptr 0)) Ptr MessageBoxData
    ptr Word32
    flags
    {-# LINE 1262 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr window
    {-# LINE 1263 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr title
    {-# LINE 1264 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr message
    {-# LINE 1265 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr numbuttons
    {-# LINE 1266 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr buttons
    {-# LINE 1267 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 48)) ptr color_scheme
    {-# LINE 1268 "src/SDL/Raw/Types.hsc" #-}

    data Palette = Palette
      { Palette -> CInt
    paletteNColors :: !CInt
      , Palette -> Ptr Color
    paletteColors :: !(Ptr Color)
      } deriving (Palette -> Palette -> Bool
    (Palette -> Palette -> Bool)
    -> (Palette -> Palette -> Bool) -> Eq Palette
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: Palette -> Palette -> Bool
    $c/= :: Palette -> Palette -> Bool
    == :: Palette -> Palette -> Bool
    $c== :: Palette -> Palette -> Bool
    Eq, Int -> Palette -> ShowS
    [Palette] -> ShowS
    Palette -> String
    (Int -> Palette -> ShowS)
    -> (Palette -> String) -> ([Palette] -> ShowS) -> Show Palette
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [Palette] -> ShowS
    $cshowList :: [Palette] -> ShowS
    show :: Palette -> String
    $cshow :: Palette -> String
    showsPrec :: Int -> Palette -> ShowS
    $cshowsPrec :: Int -> Palette -> ShowS
    Show, Typeable)

    instance Storable Palette where
      sizeOf :: Palette -> Int
    sizeOf _ = ((24))
    {-# LINE 1276 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr Palette -> IO Palette
    peek ptr :: Ptr Palette
    ptr = do
        CInt
    ncolors <- ((\hsc_ptr :: Ptr Palette
    hsc_ptr -> Ptr Palette -> Int -> IO CInt
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Palette
    hsc_ptr 0)) Ptr Palette
    ptr
    {-# LINE 1279 "src/SDL/Raw/Types.hsc" #-}
        colors <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 1280 "src/SDL/Raw/Types.hsc" #-}
        return $! Palette ncolors colors
      poke :: Ptr Palette -> Palette -> IO ()
    poke ptr :: Ptr Palette
    ptr (Palette ncolors :: CInt
    ncolors colors :: Ptr Color
    colors) = do
        ((\hsc_ptr :: Ptr Palette
    hsc_ptr -> Ptr Palette -> Int -> CInt -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr Palette
    hsc_ptr 0)) Ptr Palette
    ptr CInt
    ncolors
    {-# LINE 1283 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr colors
    {-# LINE 1284 "src/SDL/Raw/Types.hsc" #-}

    data PixelFormat = PixelFormat
      { PixelFormat -> Word32
    pixelFormatFormat :: !Word32
      , PixelFormat -> Ptr Palette
    pixelFormatPalette :: !(Ptr Palette)
      , PixelFormat -> Word8
    pixelFormatBitsPerPixel :: !Word8
      , PixelFormat -> Word8
    pixelFormatBytesPerPixel :: !Word8
      , PixelFormat -> Word32
    pixelFormatRMask :: !Word32
      , PixelFormat -> Word32
    pixelFormatGMask :: !Word32
      , PixelFormat -> Word32
    pixelFormatBMask :: !Word32
      , PixelFormat -> Word32
    pixelFormatAMask :: !Word32
      } deriving (PixelFormat -> PixelFormat -> Bool
    (PixelFormat -> PixelFormat -> Bool)
    -> (PixelFormat -> PixelFormat -> Bool) -> Eq PixelFormat
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: PixelFormat -> PixelFormat -> Bool
    $c/= :: PixelFormat -> PixelFormat -> Bool
    == :: PixelFormat -> PixelFormat -> Bool
    $c== :: PixelFormat -> PixelFormat -> Bool
    Eq, Int -> PixelFormat -> ShowS
    [PixelFormat] -> ShowS
    PixelFormat -> String
    (Int -> PixelFormat -> ShowS)
    -> (PixelFormat -> String)
    -> ([PixelFormat] -> ShowS)
    -> Show PixelFormat
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [PixelFormat] -> ShowS
    $cshowList :: [PixelFormat] -> ShowS
    show :: PixelFormat -> String
    $cshow :: PixelFormat -> String
    showsPrec :: Int -> PixelFormat -> ShowS
    $cshowsPrec :: Int -> PixelFormat -> ShowS
    Show, Typeable)

    instance Storable PixelFormat where
      sizeOf :: PixelFormat -> Int
    sizeOf _ = ((56))
    {-# LINE 1298 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr PixelFormat -> IO PixelFormat
    peek ptr :: Ptr PixelFormat
    ptr = do
        Word32
    format <- ((\hsc_ptr :: Ptr PixelFormat
    hsc_ptr -> Ptr PixelFormat -> Int -> IO Word32
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr PixelFormat
    hsc_ptr 0)) Ptr PixelFormat
    ptr
    {-# LINE 1301 "src/SDL/Raw/Types.hsc" #-}
        palette <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 1302 "src/SDL/Raw/Types.hsc" #-}
        bits_per_pixel <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 1303 "src/SDL/Raw/Types.hsc" #-}
        bytes_per_pixel <- ((\hsc_ptr -> peekByteOff hsc_ptr 17)) ptr
    {-# LINE 1304 "src/SDL/Raw/Types.hsc" #-}
        rmask <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
    {-# LINE 1305 "src/SDL/Raw/Types.hsc" #-}
        gmask <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 1306 "src/SDL/Raw/Types.hsc" #-}
        bmask <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
    {-# LINE 1307 "src/SDL/Raw/Types.hsc" #-}
        amask <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 1308 "src/SDL/Raw/Types.hsc" #-}
        return $! PixelFormat format palette bits_per_pixel bytes_per_pixel rmask gmask bmask amask
      poke :: Ptr PixelFormat -> PixelFormat -> IO ()
    poke ptr :: Ptr PixelFormat
    ptr (PixelFormat format :: Word32
    format palette :: Ptr Palette
    palette bits_per_pixel :: Word8
    bits_per_pixel bytes_per_pixel :: Word8
    bytes_per_pixel rmask :: Word32
    rmask gmask :: Word32
    gmask bmask :: Word32
    bmask amask :: Word32
    amask) = do
        ((\hsc_ptr :: Ptr PixelFormat
    hsc_ptr -> Ptr PixelFormat -> Int -> Word32 -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr PixelFormat
    hsc_ptr 0)) Ptr PixelFormat
    ptr Word32
    format
    {-# LINE 1311 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr palette
    {-# LINE 1312 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr bits_per_pixel
    {-# LINE 1313 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 17)) ptr bytes_per_pixel
    {-# LINE 1314 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr rmask
    {-# LINE 1315 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr gmask
    {-# LINE 1316 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr bmask
    {-# LINE 1317 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr amask
    {-# LINE 1318 "src/SDL/Raw/Types.hsc" #-}

    data Point = Point
      { Point -> CInt
    pointX :: !CInt
      , Point -> CInt
    pointY :: !CInt
      } deriving (Point -> Point -> Bool
    (Point -> Point -> Bool) -> (Point -> Point -> Bool) -> Eq Point
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: Point -> Point -> Bool
    $c/= :: Point -> Point -> Bool
    == :: Point -> Point -> Bool
    $c== :: Point -> Point -> Bool
    Eq, Int -> Point -> ShowS
    [Point] -> ShowS
    Point -> String
    (Int -> Point -> ShowS)
    -> (Point -> String) -> ([Point] -> ShowS) -> Show Point
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [Point] -> ShowS
    $cshowList :: [Point] -> ShowS
    show :: Point -> String
    $cshow :: Point -> String
    showsPrec :: Int -> Point -> ShowS
    $cshowsPrec :: Int -> Point -> ShowS
    Show, Typeable)

    instance Storable Point where
      sizeOf :: Point -> Int
    sizeOf _ = ((8))
    {-# LINE 1326 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr Point -> IO Point
    peek ptr :: Ptr Point
    ptr = do
        CInt
    x <- ((\hsc_ptr :: Ptr Point
    hsc_ptr -> Ptr Point -> Int -> IO CInt
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Point
    hsc_ptr 0)) Ptr Point
    ptr
    {-# LINE 1329 "src/SDL/Raw/Types.hsc" #-}
        y <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 1330 "src/SDL/Raw/Types.hsc" #-}
        return $! Point x y
      poke :: Ptr Point -> Point -> IO ()
    poke ptr :: Ptr Point
    ptr (Point x :: CInt
    x y :: CInt
    y) = do
        ((\hsc_ptr :: Ptr Point
    hsc_ptr -> Ptr Point -> Int -> CInt -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr Point
    hsc_ptr 0)) Ptr Point
    ptr CInt
    x
    {-# LINE 1333 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr y
    {-# LINE 1334 "src/SDL/Raw/Types.hsc" #-}

    data Rect = Rect
      { Rect -> CInt
    rectX :: !CInt
      , Rect -> CInt
    rectY :: !CInt
      , Rect -> CInt
    rectW :: !CInt
      , Rect -> CInt
    rectH :: !CInt
      } deriving (Rect -> Rect -> Bool
    (Rect -> Rect -> Bool) -> (Rect -> Rect -> Bool) -> Eq Rect
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: Rect -> Rect -> Bool
    $c/= :: Rect -> Rect -> Bool
    == :: Rect -> Rect -> Bool
    $c== :: Rect -> Rect -> Bool
    Eq, Int -> Rect -> ShowS
    [Rect] -> ShowS
    Rect -> String
    (Int -> Rect -> ShowS)
    -> (Rect -> String) -> ([Rect] -> ShowS) -> Show Rect
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [Rect] -> ShowS
    $cshowList :: [Rect] -> ShowS
    show :: Rect -> String
    $cshow :: Rect -> String
    showsPrec :: Int -> Rect -> ShowS
    $cshowsPrec :: Int -> Rect -> ShowS
    Show, Typeable)

    instance Storable Rect where
      sizeOf :: Rect -> Int
    sizeOf _ = ((16))
    {-# LINE 1344 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr Rect -> IO Rect
    peek ptr :: Ptr Rect
    ptr = do
        CInt
    x <- ((\hsc_ptr :: Ptr Rect
    hsc_ptr -> Ptr Rect -> Int -> IO CInt
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Rect
    hsc_ptr 0)) Ptr Rect
    ptr
    {-# LINE 1347 "src/SDL/Raw/Types.hsc" #-}
        y <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
    {-# LINE 1348 "src/SDL/Raw/Types.hsc" #-}
        w <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 1349 "src/SDL/Raw/Types.hsc" #-}
        h <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 1350 "src/SDL/Raw/Types.hsc" #-}
        return $! Rect x y w h
      poke :: Ptr Rect -> Rect -> IO ()
    poke ptr :: Ptr Rect
    ptr (Rect x :: CInt
    x y :: CInt
    y w :: CInt
    w h :: CInt
    h) = do
        ((\hsc_ptr :: Ptr Rect
    hsc_ptr -> Ptr Rect -> Int -> CInt -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr Rect
    hsc_ptr 0)) Ptr Rect
    ptr CInt
    x
    {-# LINE 1353 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr y
    {-# LINE 1354 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr w
    {-# LINE 1355 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr h
    {-# LINE 1356 "src/SDL/Raw/Types.hsc" #-}

    data RendererInfo = RendererInfo
      { RendererInfo -> CString
    rendererInfoName :: !CString
      , RendererInfo -> Word32
    rendererInfoFlags :: !Word32
      , RendererInfo -> Word32
    rendererInfoNumTextureFormats :: !Word32
      , RendererInfo -> [Word32]
    rendererInfoTextureFormats :: ![Word32]
      , RendererInfo -> CInt
    rendererInfoMaxTextureWidth :: !CInt
      , RendererInfo -> CInt
    rendererInfoMaxTextureHeight :: !CInt
      } deriving (RendererInfo -> RendererInfo -> Bool
    (RendererInfo -> RendererInfo -> Bool)
    -> (RendererInfo -> RendererInfo -> Bool) -> Eq RendererInfo
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: RendererInfo -> RendererInfo -> Bool
    $c/= :: RendererInfo -> RendererInfo -> Bool
    == :: RendererInfo -> RendererInfo -> Bool
    $c== :: RendererInfo -> RendererInfo -> Bool
    Eq, Int -> RendererInfo -> ShowS
    [RendererInfo] -> ShowS
    RendererInfo -> String
    (Int -> RendererInfo -> ShowS)
    -> (RendererInfo -> String)
    -> ([RendererInfo] -> ShowS)
    -> Show RendererInfo
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [RendererInfo] -> ShowS
    $cshowList :: [RendererInfo] -> ShowS
    show :: RendererInfo -> String
    $cshow :: RendererInfo -> String
    showsPrec :: Int -> RendererInfo -> ShowS
    $cshowsPrec :: Int -> RendererInfo -> ShowS
    Show, Typeable)

    instance Storable RendererInfo where
      sizeOf :: RendererInfo -> Int
    sizeOf _ = ((88))
    {-# LINE 1368 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr RendererInfo -> IO RendererInfo
    peek ptr :: Ptr RendererInfo
    ptr = do
        CString
    name <- ((\hsc_ptr :: Ptr RendererInfo
    hsc_ptr -> Ptr RendererInfo -> Int -> IO CString
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr RendererInfo
    hsc_ptr 0)) Ptr RendererInfo
    ptr
    {-# LINE 1371 "src/SDL/Raw/Types.hsc" #-}
        flags <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 1372 "src/SDL/Raw/Types.hsc" #-}
        num_texture_formats <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
    {-# LINE 1373 "src/SDL/Raw/Types.hsc" #-}
        texture_formats <- peekArray 16 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 16)) ptr
    {-# LINE 1374 "src/SDL/Raw/Types.hsc" #-}
        max_texture_width <- ((\hsc_ptr -> peekByteOff hsc_ptr 80)) ptr
    {-# LINE 1375 "src/SDL/Raw/Types.hsc" #-}
        max_texture_height <- ((\hsc_ptr -> peekByteOff hsc_ptr 84)) ptr
    {-# LINE 1376 "src/SDL/Raw/Types.hsc" #-}
        return $! RendererInfo name flags num_texture_formats texture_formats max_texture_width max_texture_height
      poke :: Ptr RendererInfo -> RendererInfo -> IO ()
    poke ptr :: Ptr RendererInfo
    ptr (RendererInfo name :: CString
    name flags :: Word32
    flags num_texture_formats :: Word32
    num_texture_formats texture_formats :: [Word32]
    texture_formats max_texture_width :: CInt
    max_texture_width max_texture_height :: CInt
    max_texture_height) = do
        ((\hsc_ptr :: Ptr RendererInfo
    hsc_ptr -> Ptr RendererInfo -> Int -> CString -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr RendererInfo
    hsc_ptr 0)) Ptr RendererInfo
    ptr CString
    name
    {-# LINE 1379 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr flags
    {-# LINE 1380 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr num_texture_formats
    {-# LINE 1381 "src/SDL/Raw/Types.hsc" #-}
        pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 16)) ptr) texture_formats
    {-# LINE 1382 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 80)) ptr max_texture_width
    {-# LINE 1383 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 84)) ptr max_texture_height
    {-# LINE 1384 "src/SDL/Raw/Types.hsc" #-}

    data RWops = RWops
      { RWops -> FunPtr (Ptr RWops -> IO TouchID)
    rwopsSize :: !(FunPtr (Ptr RWops -> IO Int64))
      , RWops -> FunPtr (Ptr RWops -> TouchID -> CInt -> IO TouchID)
    rwopsSeek :: !(FunPtr (Ptr RWops -> Int64 -> CInt -> IO Int64))
      , RWops -> FunPtr (Ptr RWops -> Ptr () -> CSize -> CSize -> IO CSize)
    rwopsRead :: !(FunPtr (Ptr RWops -> Ptr () -> CSize -> CSize -> IO CSize))
      , RWops -> FunPtr (Ptr RWops -> Ptr () -> CSize -> CSize -> IO CSize)
    rwopsWrite :: !(FunPtr (Ptr RWops -> Ptr () -> CSize -> CSize -> IO CSize))
      , RWops -> FunPtr (Ptr RWops -> IO CInt)
    rwopsClose :: !(FunPtr (Ptr RWops -> IO CInt))
      , RWops -> Word32
    rwopsType :: !Word32
      } deriving (RWops -> RWops -> Bool
    (RWops -> RWops -> Bool) -> (RWops -> RWops -> Bool) -> Eq RWops
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: RWops -> RWops -> Bool
    $c/= :: RWops -> RWops -> Bool
    == :: RWops -> RWops -> Bool
    $c== :: RWops -> RWops -> Bool
    Eq, Int -> RWops -> ShowS
    [RWops] -> ShowS
    RWops -> String
    (Int -> RWops -> ShowS)
    -> (RWops -> String) -> ([RWops] -> ShowS) -> Show RWops
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [RWops] -> ShowS
    $cshowList :: [RWops] -> ShowS
    show :: RWops -> String
    $cshow :: RWops -> String
    showsPrec :: Int -> RWops -> ShowS
    $cshowsPrec :: Int -> RWops -> ShowS
    Show, Typeable)

    instance Storable RWops where
      sizeOf :: RWops -> Int
    sizeOf _ = ((72))
    {-# LINE 1396 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr RWops -> IO RWops
    peek ptr :: Ptr RWops
    ptr = do
        FunPtr (Ptr RWops -> IO TouchID)
    size <- ((\hsc_ptr :: Ptr RWops
    hsc_ptr -> Ptr RWops -> Int -> IO (FunPtr (Ptr RWops -> IO TouchID))
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr RWops
    hsc_ptr 0)) Ptr RWops
    ptr
    {-# LINE 1399 "src/SDL/Raw/Types.hsc" #-}
        seek <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
    {-# LINE 1400 "src/SDL/Raw/Types.hsc" #-}
        read' <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 1401 "src/SDL/Raw/Types.hsc" #-}
        write <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
    {-# LINE 1402 "src/SDL/Raw/Types.hsc" #-}
        close <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 1403 "src/SDL/Raw/Types.hsc" #-}
        typ <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
    {-# LINE 1404 "src/SDL/Raw/Types.hsc" #-}
        return $! RWops size seek read' write close typ
      poke :: Ptr RWops -> RWops -> IO ()
    poke ptr :: Ptr RWops
    ptr (RWops size :: FunPtr (Ptr RWops -> IO TouchID)
    size seek :: FunPtr (Ptr RWops -> TouchID -> CInt -> IO TouchID)
    seek read' :: FunPtr (Ptr RWops -> Ptr () -> CSize -> CSize -> IO CSize)
    read' write :: FunPtr (Ptr RWops -> Ptr () -> CSize -> CSize -> IO CSize)
    write close :: FunPtr (Ptr RWops -> IO CInt)
    close typ :: Word32
    typ) = do
        ((\hsc_ptr :: Ptr RWops
    hsc_ptr -> Ptr RWops -> Int -> FunPtr (Ptr RWops -> IO TouchID) -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr RWops
    hsc_ptr 0)) Ptr RWops
    ptr FunPtr (Ptr RWops -> IO TouchID)
    size
    {-# LINE 1407 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr seek
    {-# LINE 1408 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr read'
    {-# LINE 1409 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr write
    {-# LINE 1410 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr close
    {-# LINE 1411 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr typ
    {-# LINE 1412 "src/SDL/Raw/Types.hsc" #-}

    data Surface = Surface
      { Surface -> Ptr PixelFormat
    surfaceFormat :: !(Ptr PixelFormat)
      , Surface -> CInt
    surfaceW :: !CInt
      , Surface -> CInt
    surfaceH :: !CInt
      , Surface -> Ptr ()
    surfacePixels :: !(Ptr ())
      , Surface -> Ptr ()
    surfaceUserdata :: !(Ptr ())
      , Surface -> Rect
    surfaceClipRect :: !Rect
      , Surface -> CInt
    surfaceRefcount :: !CInt
      } deriving (Surface -> Surface -> Bool
    (Surface -> Surface -> Bool)
    -> (Surface -> Surface -> Bool) -> Eq Surface
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: Surface -> Surface -> Bool
    $c/= :: Surface -> Surface -> Bool
    == :: Surface -> Surface -> Bool
    $c== :: Surface -> Surface -> Bool
    Eq, Int -> Surface -> ShowS
    [Surface] -> ShowS
    Surface -> String
    (Int -> Surface -> ShowS)
    -> (Surface -> String) -> ([Surface] -> ShowS) -> Show Surface
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [Surface] -> ShowS
    $cshowList :: [Surface] -> ShowS
    show :: Surface -> String
    $cshow :: Surface -> String
    showsPrec :: Int -> Surface -> ShowS
    $cshowsPrec :: Int -> Surface -> ShowS
    Show, Typeable)

    instance Storable Surface where
      sizeOf :: Surface -> Int
    sizeOf _ = ((96))
    {-# LINE 1425 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr Surface -> IO Surface
    peek ptr :: Ptr Surface
    ptr = do
        Ptr PixelFormat
    format <- ((\hsc_ptr :: Ptr Surface
    hsc_ptr -> Ptr Surface -> Int -> IO (Ptr PixelFormat)
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Surface
    hsc_ptr 8)) Ptr Surface
    ptr
    {-# LINE 1428 "src/SDL/Raw/Types.hsc" #-}
        w <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
    {-# LINE 1429 "src/SDL/Raw/Types.hsc" #-}
        h <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
    {-# LINE 1430 "src/SDL/Raw/Types.hsc" #-}
        pixels <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
    {-# LINE 1431 "src/SDL/Raw/Types.hsc" #-}
        userdata <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
    {-# LINE 1432 "src/SDL/Raw/Types.hsc" #-}
        cliprect <- ((\hsc_ptr -> peekByteOff hsc_ptr 64)) ptr
    {-# LINE 1433 "src/SDL/Raw/Types.hsc" #-}
        refcount <- ((\hsc_ptr -> peekByteOff hsc_ptr 88)) ptr
    {-# LINE 1434 "src/SDL/Raw/Types.hsc" #-}
        return $! Surface format w h pixels userdata cliprect refcount
      poke :: Ptr Surface -> Surface -> IO ()
    poke ptr :: Ptr Surface
    ptr (Surface format :: Ptr PixelFormat
    format w :: CInt
    w h :: CInt
    h pixels :: Ptr ()
    pixels userdata :: Ptr ()
    userdata cliprect :: Rect
    cliprect refcount :: CInt
    refcount) = do
        ((\hsc_ptr :: Ptr Surface
    hsc_ptr -> Ptr Surface -> Int -> Ptr PixelFormat -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr Surface
    hsc_ptr 8)) Ptr Surface
    ptr Ptr PixelFormat
    format
    {-# LINE 1437 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr w
    {-# LINE 1438 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr h
    {-# LINE 1439 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr pixels
    {-# LINE 1440 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr userdata
    {-# LINE 1441 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 64)) ptr cliprect
    {-# LINE 1442 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 88)) ptr refcount
    {-# LINE 1443 "src/SDL/Raw/Types.hsc" #-}

    data Version = Version
      { Version -> Word8
    versionMajor :: !Word8
      , Version -> Word8
    versionMinor :: !Word8
      , Version -> Word8
    versionPatch :: !Word8
      } deriving (Version -> Version -> Bool
    (Version -> Version -> Bool)
    -> (Version -> Version -> Bool) -> Eq Version
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: Version -> Version -> Bool
    $c/= :: Version -> Version -> Bool
    == :: Version -> Version -> Bool
    $c== :: Version -> Version -> Bool
    Eq, Int -> Version -> ShowS
    [Version] -> ShowS
    Version -> String
    (Int -> Version -> ShowS)
    -> (Version -> String) -> ([Version] -> ShowS) -> Show Version
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [Version] -> ShowS
    $cshowList :: [Version] -> ShowS
    show :: Version -> String
    $cshow :: Version -> String
    showsPrec :: Int -> Version -> ShowS
    $cshowsPrec :: Int -> Version -> ShowS
    Show, Typeable)

    instance Storable Version where
      sizeOf :: Version -> Int
    sizeOf _ = ((3))
    {-# LINE 1452 "src/SDL/Raw/Types.hsc" #-}
      alignment = sizeOf
      peek :: Ptr Version -> IO Version
    peek ptr :: Ptr Version
    ptr = do
        Word8
    major <- ((\hsc_ptr :: Ptr Version
    hsc_ptr -> Ptr Version -> Int -> IO Word8
    forall a b. Storable a => Ptr b -> Int -> IO a
    peekByteOff Ptr Version
    hsc_ptr 0)) Ptr Version
    ptr
    {-# LINE 1455 "src/SDL/Raw/Types.hsc" #-}
        minor <- ((\hsc_ptr -> peekByteOff hsc_ptr 1)) ptr
    {-# LINE 1456 "src/SDL/Raw/Types.hsc" #-}
        patch <- ((\hsc_ptr -> peekByteOff hsc_ptr 2)) ptr
    {-# LINE 1457 "src/SDL/Raw/Types.hsc" #-}
        return $! Version major minor patch
      poke :: Ptr Version -> Version -> IO ()
    poke ptr :: Ptr Version
    ptr (Version major :: Word8
    major minor :: Word8
    minor patch :: Word8
    patch) = do
        ((\hsc_ptr :: Ptr Version
    hsc_ptr -> Ptr Version -> Int -> Word8 -> IO ()
    forall a b. Storable a => Ptr b -> Int -> a -> IO ()
    pokeByteOff Ptr Version
    hsc_ptr 0)) Ptr Version
    ptr Word8
    major
    {-# LINE 1460 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 1)) ptr minor
    {-# LINE 1461 "src/SDL/Raw/Types.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 2)) ptr patch
    {-# LINE 1462 "src/SDL/Raw/Types.hsc" #-}