{-# LINE 1 "src/SDL/Raw/Types.hsc" #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
module SDL.Raw.Types (
VkGetInstanceProcAddrFunc,
AudioCallback,
EventFilter,
HintCallback,
LogOutputFunction,
ThreadFunction,
TimerCallback,
mkAudioCallback,
mkEventFilter,
mkHintCallback,
mkLogOutputFunction,
mkThreadFunction,
mkTimerCallback,
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,
Atomic(..),
AudioCVT(..),
AudioSpec(..),
Color(..),
DisplayMode(..),
Event(..),
Finger(..),
GameControllerButtonBind(..),
HapticDirection(..),
HapticEffect(..),
JoystickGUID(..),
Keysym(..),
MessageBoxButtonData(..),
MessageBoxColor(..),
MessageBoxColorScheme(..),
MessageBoxData(..),
Palette(..),
PixelFormat(..),
Point(..),
Rect(..),
{-# LINE 73 "src/SDL/Raw/Types.hsc" #-}
FPoint(..),
FRect(..),
Vertex(..),
{-# LINE 77 "src/SDL/Raw/Types.hsc" #-}
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)
foreign import ccall "wrapper"
mkAudioCallback :: (Ptr () -> Ptr Word8 -> CInt -> IO ()) -> IO AudioCallback
foreign import ccall "wrapper"
mkEventFilter :: (Ptr () -> Ptr Event -> IO CInt) -> IO EventFilter
foreign import ccall "wrapper"
mkHintCallback :: (Ptr () -> CString -> CString -> CString -> IO ()) -> IO HintCallback
foreign import ccall "wrapper"
mkLogOutputFunction :: (Ptr () -> CInt -> LogPriority -> CString -> IO ()) -> IO LogOutputFunction
foreign import ccall "wrapper"
mkThreadFunction :: (Ptr () -> IO CInt) -> IO ThreadFunction
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
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
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 Atomic
_ = ((Int
4))
{-# LINE 166 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (4)
{-# LINE 167 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
value <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 169 "src/SDL/Raw/Types.hsc" #-}
return $! Atomic value
poke :: Ptr Atomic -> Atomic -> IO ()
poke Ptr Atomic
ptr (Atomic CInt
value) = do
((\Ptr Atomic
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr Atomic
hsc_ptr Int
0)) Ptr Atomic
ptr CInt
value
{-# LINE 172 "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
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
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 AudioCVT
_ = ((Int
128))
{-# LINE 187 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (1)
{-# LINE 188 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
needed <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 190 "src/SDL/Raw/Types.hsc" #-}
src_format <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 191 "src/SDL/Raw/Types.hsc" #-}
dst_format <- ((\hsc_ptr -> peekByteOff hsc_ptr 6)) ptr
{-# LINE 192 "src/SDL/Raw/Types.hsc" #-}
rate_incr <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 193 "src/SDL/Raw/Types.hsc" #-}
buf <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 194 "src/SDL/Raw/Types.hsc" #-}
len <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 195 "src/SDL/Raw/Types.hsc" #-}
len_cvt <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 196 "src/SDL/Raw/Types.hsc" #-}
len_mult <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 197 "src/SDL/Raw/Types.hsc" #-}
len_ratio <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
{-# LINE 198 "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 AudioCVT
ptr (AudioCVT CInt
needed AudioFormat
src_format AudioFormat
dst_format CDouble
rate_incr Ptr Word8
buf CInt
len CInt
len_cvt CInt
len_mult CDouble
len_ratio) = do
((\Ptr AudioCVT
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr AudioCVT
hsc_ptr Int
0)) Ptr AudioCVT
ptr CInt
needed
{-# LINE 201 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr src_format
{-# LINE 202 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 6)) ptr dst_format
{-# LINE 203 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr rate_incr
{-# LINE 204 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr buf
{-# LINE 205 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr len
{-# LINE 206 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr len_cvt
{-# LINE 207 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr len_mult
{-# LINE 208 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr len_ratio
{-# LINE 209 "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
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
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 AudioSpec
_ = ((Int
32))
{-# LINE 223 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (8)
{-# LINE 224 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
freq <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 226 "src/SDL/Raw/Types.hsc" #-}
format <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 227 "src/SDL/Raw/Types.hsc" #-}
channels <- ((\hsc_ptr -> peekByteOff hsc_ptr 6)) ptr
{-# LINE 228 "src/SDL/Raw/Types.hsc" #-}
silence <- ((\hsc_ptr -> peekByteOff hsc_ptr 7)) ptr
{-# LINE 229 "src/SDL/Raw/Types.hsc" #-}
samples <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 230 "src/SDL/Raw/Types.hsc" #-}
size <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 231 "src/SDL/Raw/Types.hsc" #-}
callback <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 232 "src/SDL/Raw/Types.hsc" #-}
userdata <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 233 "src/SDL/Raw/Types.hsc" #-}
return $! AudioSpec freq format channels silence samples size callback userdata
poke :: Ptr AudioSpec -> AudioSpec -> IO ()
poke Ptr AudioSpec
ptr (AudioSpec CInt
freq AudioFormat
format Word8
channels Word8
silence AudioFormat
samples Word32
size AudioCallback
callback Ptr ()
userdata) = do
((\Ptr AudioSpec
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr AudioSpec
hsc_ptr Int
0)) Ptr AudioSpec
ptr CInt
freq
{-# LINE 236 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr format
{-# LINE 237 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 6)) ptr channels
{-# LINE 238 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 7)) ptr silence
{-# LINE 239 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr samples
{-# LINE 240 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr size
{-# LINE 241 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr callback
{-# LINE 242 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr userdata
{-# LINE 243 "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
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
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 Color
_ = ((Int
4))
{-# LINE 253 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (1)
{-# LINE 254 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
r <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 256 "src/SDL/Raw/Types.hsc" #-}
g <- ((\hsc_ptr -> peekByteOff hsc_ptr 1)) ptr
{-# LINE 257 "src/SDL/Raw/Types.hsc" #-}
b <- ((\hsc_ptr -> peekByteOff hsc_ptr 2)) ptr
{-# LINE 258 "src/SDL/Raw/Types.hsc" #-}
a <- ((\hsc_ptr -> peekByteOff hsc_ptr 3)) ptr
{-# LINE 259 "src/SDL/Raw/Types.hsc" #-}
return $! Color r g b a
poke :: Ptr Color -> Color -> IO ()
poke Ptr Color
ptr (Color Word8
r Word8
g Word8
b Word8
a) = do
((\Ptr Color
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr Color
hsc_ptr Int
0)) Ptr Color
ptr Word8
r
{-# LINE 262 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 1)) ptr g
{-# LINE 263 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 2)) ptr b
{-# LINE 264 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 3)) ptr a
{-# LINE 265 "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
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
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 DisplayMode
_ = ((Int
24))
{-# LINE 276 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (8)
{-# LINE 277 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
format <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 279 "src/SDL/Raw/Types.hsc" #-}
w <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 280 "src/SDL/Raw/Types.hsc" #-}
h <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 281 "src/SDL/Raw/Types.hsc" #-}
refresh_rate <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 282 "src/SDL/Raw/Types.hsc" #-}
driverdata <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 283 "src/SDL/Raw/Types.hsc" #-}
return $! DisplayMode format w h refresh_rate driverdata
poke :: Ptr DisplayMode -> DisplayMode -> IO ()
poke Ptr DisplayMode
ptr (DisplayMode Word32
format CInt
w CInt
h CInt
refresh_rate Ptr ()
driverdata) = do
((\Ptr DisplayMode
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr DisplayMode
hsc_ptr Int
0)) Ptr DisplayMode
ptr Word32
format
{-# LINE 286 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr w
{-# LINE 287 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr h
{-# LINE 288 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr refresh_rate
{-# LINE 289 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr driverdata
{-# LINE 290 "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
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
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 Event
_ = ((Int
56))
{-# LINE 481 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (8)
{-# LINE 482 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
typ <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 484 "src/SDL/Raw/Types.hsc" #-}
timestamp <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 485 "src/SDL/Raw/Types.hsc" #-}
case typ of
(256) ->
{-# LINE 487 "src/SDL/Raw/Types.hsc" #-}
return $! QuitEvent typ timestamp
(512) -> do
{-# LINE 489 "src/SDL/Raw/Types.hsc" #-}
wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 490 "src/SDL/Raw/Types.hsc" #-}
event <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 491 "src/SDL/Raw/Types.hsc" #-}
data1 <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 492 "src/SDL/Raw/Types.hsc" #-}
data2 <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 493 "src/SDL/Raw/Types.hsc" #-}
return $! WindowEvent typ timestamp wid event data1 data2
(513) -> do
{-# LINE 495 "src/SDL/Raw/Types.hsc" #-}
msg <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 496 "src/SDL/Raw/Types.hsc" #-}
return $! SysWMEvent typ timestamp msg
(768) -> key $ KeyboardEvent typ timestamp
{-# LINE 498 "src/SDL/Raw/Types.hsc" #-}
(769) -> key $ KeyboardEvent typ timestamp
{-# LINE 499 "src/SDL/Raw/Types.hsc" #-}
(770) -> 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" #-}
start <- ((\hsc_ptr -> peekByteOff hsc_ptr 44)) ptr
{-# LINE 503 "src/SDL/Raw/Types.hsc" #-}
len <- ((\hsc_ptr -> peekByteOff hsc_ptr 48)) ptr
{-# LINE 504 "src/SDL/Raw/Types.hsc" #-}
let upToNull = takeWhile (/= 0) text
return $! TextEditingEvent typ timestamp wid upToNull start len
(771) -> do
{-# LINE 507 "src/SDL/Raw/Types.hsc" #-}
wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 508 "src/SDL/Raw/Types.hsc" #-}
text <- peekArray (32) $ ((\hsc_ptr -> hsc_ptr `plusPtr` 12)) ptr
{-# LINE 509 "src/SDL/Raw/Types.hsc" #-}
let upToNull = takeWhile (/= 0) text
return $! TextInputEvent typ timestamp wid upToNull
(772) ->
{-# LINE 512 "src/SDL/Raw/Types.hsc" #-}
return $! KeymapChangedEvent typ timestamp
(1024) -> do
{-# LINE 514 "src/SDL/Raw/Types.hsc" #-}
wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 515 "src/SDL/Raw/Types.hsc" #-}
which <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 516 "src/SDL/Raw/Types.hsc" #-}
state <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 517 "src/SDL/Raw/Types.hsc" #-}
x <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 518 "src/SDL/Raw/Types.hsc" #-}
y <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 519 "src/SDL/Raw/Types.hsc" #-}
xrel <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 520 "src/SDL/Raw/Types.hsc" #-}
yrel <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 521 "src/SDL/Raw/Types.hsc" #-}
return $! MouseMotionEvent typ timestamp wid which state x y xrel yrel
(1025) -> mouse $ MouseButtonEvent typ timestamp
{-# LINE 523 "src/SDL/Raw/Types.hsc" #-}
(1026) -> mouse $ MouseButtonEvent typ timestamp
{-# LINE 524 "src/SDL/Raw/Types.hsc" #-}
(1027) -> do
{-# LINE 525 "src/SDL/Raw/Types.hsc" #-}
wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 526 "src/SDL/Raw/Types.hsc" #-}
which <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 527 "src/SDL/Raw/Types.hsc" #-}
x <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 528 "src/SDL/Raw/Types.hsc" #-}
y <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 529 "src/SDL/Raw/Types.hsc" #-}
direction <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 530 "src/SDL/Raw/Types.hsc" #-}
return $! MouseWheelEvent typ timestamp wid which x y direction
(1536) -> do
{-# LINE 532 "src/SDL/Raw/Types.hsc" #-}
which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 533 "src/SDL/Raw/Types.hsc" #-}
axis <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 534 "src/SDL/Raw/Types.hsc" #-}
value <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 535 "src/SDL/Raw/Types.hsc" #-}
return $! JoyAxisEvent typ timestamp which axis value
(1537) -> do
{-# LINE 537 "src/SDL/Raw/Types.hsc" #-}
which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 538 "src/SDL/Raw/Types.hsc" #-}
ball <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 539 "src/SDL/Raw/Types.hsc" #-}
xrel <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 540 "src/SDL/Raw/Types.hsc" #-}
yrel <- ((\hsc_ptr -> peekByteOff hsc_ptr 18)) ptr
{-# LINE 541 "src/SDL/Raw/Types.hsc" #-}
return $! JoyBallEvent typ timestamp which ball xrel yrel
(1538) -> do
{-# LINE 543 "src/SDL/Raw/Types.hsc" #-}
which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 544 "src/SDL/Raw/Types.hsc" #-}
hat <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 545 "src/SDL/Raw/Types.hsc" #-}
value <- ((\hsc_ptr -> peekByteOff hsc_ptr 13)) ptr
{-# LINE 546 "src/SDL/Raw/Types.hsc" #-}
return $! JoyHatEvent typ timestamp which hat value
(1539) -> joybutton $ JoyButtonEvent typ timestamp
{-# LINE 548 "src/SDL/Raw/Types.hsc" #-}
(1540) -> joybutton $ JoyButtonEvent typ timestamp
{-# LINE 549 "src/SDL/Raw/Types.hsc" #-}
(1541) -> joydevice $ JoyDeviceEvent typ timestamp
{-# LINE 550 "src/SDL/Raw/Types.hsc" #-}
(1542) -> joydevice $ JoyDeviceEvent typ timestamp
{-# LINE 551 "src/SDL/Raw/Types.hsc" #-}
(1616) -> do
{-# LINE 552 "src/SDL/Raw/Types.hsc" #-}
which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 553 "src/SDL/Raw/Types.hsc" #-}
axis <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 554 "src/SDL/Raw/Types.hsc" #-}
value <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 555 "src/SDL/Raw/Types.hsc" #-}
return $! ControllerAxisEvent typ timestamp which axis value
(1617) -> controllerbutton $ ControllerButtonEvent typ timestamp
{-# LINE 557 "src/SDL/Raw/Types.hsc" #-}
(1618) -> controllerbutton $ ControllerButtonEvent typ timestamp
{-# LINE 558 "src/SDL/Raw/Types.hsc" #-}
(1619) -> controllerdevice $ ControllerDeviceEvent typ timestamp
{-# LINE 559 "src/SDL/Raw/Types.hsc" #-}
(1620) -> controllerdevice $ ControllerDeviceEvent typ timestamp
{-# LINE 560 "src/SDL/Raw/Types.hsc" #-}
(1621) -> controllerdevice $ ControllerDeviceEvent typ timestamp
{-# LINE 561 "src/SDL/Raw/Types.hsc" #-}
(4352) -> audiodevice $ AudioDeviceEvent typ timestamp
{-# LINE 562 "src/SDL/Raw/Types.hsc" #-}
(4353) -> audiodevice $ AudioDeviceEvent typ timestamp
{-# LINE 563 "src/SDL/Raw/Types.hsc" #-}
(1792) -> finger $ TouchFingerEvent typ timestamp
{-# LINE 564 "src/SDL/Raw/Types.hsc" #-}
(1793) -> finger $ TouchFingerEvent typ timestamp
{-# LINE 565 "src/SDL/Raw/Types.hsc" #-}
(1794) -> finger $ TouchFingerEvent typ timestamp
{-# LINE 566 "src/SDL/Raw/Types.hsc" #-}
(2048) -> dollargesture $ DollarGestureEvent typ timestamp
{-# LINE 567 "src/SDL/Raw/Types.hsc" #-}
(2049) -> dollargesture $ DollarGestureEvent typ timestamp
{-# LINE 568 "src/SDL/Raw/Types.hsc" #-}
(2050) -> do
{-# LINE 569 "src/SDL/Raw/Types.hsc" #-}
touchId <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 570 "src/SDL/Raw/Types.hsc" #-}
dTheta <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 571 "src/SDL/Raw/Types.hsc" #-}
dDist <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 572 "src/SDL/Raw/Types.hsc" #-}
x <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 573 "src/SDL/Raw/Types.hsc" #-}
y <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 574 "src/SDL/Raw/Types.hsc" #-}
numFingers <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 575 "src/SDL/Raw/Types.hsc" #-}
return $! MultiGestureEvent typ timestamp touchId dTheta dDist x y numFingers
(2304) ->
{-# LINE 577 "src/SDL/Raw/Types.hsc" #-}
return $! ClipboardUpdateEvent typ timestamp
(4096) -> do
{-# LINE 579 "src/SDL/Raw/Types.hsc" #-}
file <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 580 "src/SDL/Raw/Types.hsc" #-}
return $! DropEvent typ timestamp file
x | x >= (32768) -> do
{-# LINE 582 "src/SDL/Raw/Types.hsc" #-}
wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 583 "src/SDL/Raw/Types.hsc" #-}
code <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 584 "src/SDL/Raw/Types.hsc" #-}
data1 <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 585 "src/SDL/Raw/Types.hsc" #-}
data2 <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 586 "src/SDL/Raw/Types.hsc" #-}
return $! UserEvent typ timestamp wid code data1 data2
_ -> return $! UnknownEvent typ timestamp
where
key f = do
wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 591 "src/SDL/Raw/Types.hsc" #-}
state <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 592 "src/SDL/Raw/Types.hsc" #-}
repeat' <- ((\hsc_ptr -> peekByteOff hsc_ptr 13)) ptr
{-# LINE 593 "src/SDL/Raw/Types.hsc" #-}
keysym <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 594 "src/SDL/Raw/Types.hsc" #-}
return $! f wid state repeat' keysym
mouse f = do
wid <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 598 "src/SDL/Raw/Types.hsc" #-}
which <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 599 "src/SDL/Raw/Types.hsc" #-}
button <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 600 "src/SDL/Raw/Types.hsc" #-}
state <- ((\hsc_ptr -> peekByteOff hsc_ptr 17)) ptr
{-# LINE 601 "src/SDL/Raw/Types.hsc" #-}
clicks <- ((\hsc_ptr -> peekByteOff hsc_ptr 18)) ptr
{-# LINE 602 "src/SDL/Raw/Types.hsc" #-}
x <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 603 "src/SDL/Raw/Types.hsc" #-}
y <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 604 "src/SDL/Raw/Types.hsc" #-}
return $! f wid which button state clicks x y
joybutton f = do
which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 608 "src/SDL/Raw/Types.hsc" #-}
button <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 609 "src/SDL/Raw/Types.hsc" #-}
state <- ((\hsc_ptr -> peekByteOff hsc_ptr 13)) ptr
{-# LINE 610 "src/SDL/Raw/Types.hsc" #-}
return $! f which button state
joydevice f = do
which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 614 "src/SDL/Raw/Types.hsc" #-}
return $! f which
controllerbutton f = do
which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 618 "src/SDL/Raw/Types.hsc" #-}
button <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 619 "src/SDL/Raw/Types.hsc" #-}
state <- ((\hsc_ptr -> peekByteOff hsc_ptr 13)) ptr
{-# LINE 620 "src/SDL/Raw/Types.hsc" #-}
return $! f which button state
controllerdevice f = do
which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 624 "src/SDL/Raw/Types.hsc" #-}
return $! f which
audiodevice f = do
which <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 628 "src/SDL/Raw/Types.hsc" #-}
iscapture <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 629 "src/SDL/Raw/Types.hsc" #-}
return $! f which iscapture
finger f = do
touchId <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 633 "src/SDL/Raw/Types.hsc" #-}
fingerId <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 634 "src/SDL/Raw/Types.hsc" #-}
x <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 635 "src/SDL/Raw/Types.hsc" #-}
y <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 636 "src/SDL/Raw/Types.hsc" #-}
dx <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 637 "src/SDL/Raw/Types.hsc" #-}
dy <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
{-# LINE 638 "src/SDL/Raw/Types.hsc" #-}
pressure <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
{-# LINE 639 "src/SDL/Raw/Types.hsc" #-}
return $! f touchId fingerId x y dx dy pressure
dollargesture f = do
touchId <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 643 "src/SDL/Raw/Types.hsc" #-}
gestureId <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 644 "src/SDL/Raw/Types.hsc" #-}
numFingers <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 645 "src/SDL/Raw/Types.hsc" #-}
err <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 646 "src/SDL/Raw/Types.hsc" #-}
x <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 647 "src/SDL/Raw/Types.hsc" #-}
y <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
{-# LINE 648 "src/SDL/Raw/Types.hsc" #-}
return $! f touchId gestureId numFingers err x y
poke :: Ptr Event -> Event -> IO ()
poke Ptr Event
ptr Event
ev = case Event
ev of
WindowEvent Word32
typ Word32
timestamp Word32
wid Word8
event Int32
data1 Int32
data2 -> do
((\Ptr Event
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr Event
hsc_ptr Int
0)) Ptr Event
ptr Word32
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 event
{-# LINE 655 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr data1
{-# LINE 656 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr data2
{-# LINE 657 "src/SDL/Raw/Types.hsc" #-}
KeyboardEvent typ timestamp wid state repeat' keysym -> 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" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr state
{-# LINE 662 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 13)) ptr repeat'
{-# LINE 663 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr keysym
{-# LINE 664 "src/SDL/Raw/Types.hsc" #-}
TextEditingEvent typ timestamp wid text start len -> 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" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 44)) ptr start
{-# LINE 670 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 48)) ptr len
{-# LINE 671 "src/SDL/Raw/Types.hsc" #-}
TextInputEvent typ timestamp wid text -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 673 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 674 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr wid
{-# LINE 675 "src/SDL/Raw/Types.hsc" #-}
pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 12)) ptr) text
{-# LINE 676 "src/SDL/Raw/Types.hsc" #-}
KeymapChangedEvent typ timestamp -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 678 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 679 "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 681 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 682 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr wid
{-# LINE 683 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr which
{-# LINE 684 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr state
{-# LINE 685 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr x
{-# LINE 686 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr y
{-# LINE 687 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr xrel
{-# LINE 688 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr yrel
{-# LINE 689 "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 691 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 692 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr wid
{-# LINE 693 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr which
{-# LINE 694 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr button
{-# LINE 695 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 17)) ptr state
{-# LINE 696 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 18)) ptr clicks
{-# LINE 697 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr x
{-# LINE 698 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr y
{-# LINE 699 "src/SDL/Raw/Types.hsc" #-}
MouseWheelEvent typ timestamp wid which x y direction -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 701 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 702 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr wid
{-# LINE 703 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr which
{-# LINE 704 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr x
{-# LINE 705 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr y
{-# LINE 706 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr direction
{-# LINE 707 "src/SDL/Raw/Types.hsc" #-}
JoyAxisEvent typ timestamp which axis value -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 709 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 710 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
{-# LINE 711 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr axis
{-# LINE 712 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr value
{-# LINE 713 "src/SDL/Raw/Types.hsc" #-}
JoyBallEvent typ timestamp which ball xrel yrel -> 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 ball
{-# LINE 718 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr xrel
{-# LINE 719 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 18)) ptr yrel
{-# LINE 720 "src/SDL/Raw/Types.hsc" #-}
JoyHatEvent typ timestamp which hat value -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 722 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 723 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
{-# LINE 724 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr hat
{-# LINE 725 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 13)) ptr value
{-# LINE 726 "src/SDL/Raw/Types.hsc" #-}
JoyButtonEvent typ timestamp which button state -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 728 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 729 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
{-# LINE 730 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr button
{-# LINE 731 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 13)) ptr state
{-# LINE 732 "src/SDL/Raw/Types.hsc" #-}
JoyDeviceEvent typ timestamp which -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 734 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 735 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
{-# LINE 736 "src/SDL/Raw/Types.hsc" #-}
ControllerAxisEvent typ timestamp which axis value -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 738 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 739 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
{-# LINE 740 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr axis
{-# LINE 741 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr value
{-# LINE 742 "src/SDL/Raw/Types.hsc" #-}
ControllerButtonEvent typ timestamp which button state -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 744 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 745 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
{-# LINE 746 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr button
{-# LINE 747 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 13)) ptr state
{-# LINE 748 "src/SDL/Raw/Types.hsc" #-}
ControllerDeviceEvent typ timestamp which -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 750 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 751 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
{-# LINE 752 "src/SDL/Raw/Types.hsc" #-}
AudioDeviceEvent typ timestamp which iscapture -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 754 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 755 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr which
{-# LINE 756 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr iscapture
{-# LINE 757 "src/SDL/Raw/Types.hsc" #-}
QuitEvent typ timestamp -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 759 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 760 "src/SDL/Raw/Types.hsc" #-}
UserEvent typ timestamp wid code data1 data2 -> 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 wid
{-# LINE 764 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr code
{-# LINE 765 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr data1
{-# LINE 766 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr data2
{-# LINE 767 "src/SDL/Raw/Types.hsc" #-}
SysWMEvent typ timestamp msg -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 769 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 770 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr msg
{-# LINE 771 "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 773 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 774 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr touchid
{-# LINE 775 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr fingerid
{-# LINE 776 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr x
{-# LINE 777 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr y
{-# LINE 778 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr dx
{-# LINE 779 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr dy
{-# LINE 780 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr pressure
{-# LINE 781 "src/SDL/Raw/Types.hsc" #-}
MultiGestureEvent typ timestamp touchid dtheta ddist x y numfingers -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 783 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 784 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr touchid
{-# LINE 785 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr dtheta
{-# LINE 786 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr ddist
{-# LINE 787 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr x
{-# LINE 788 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr y
{-# LINE 789 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr numfingers
{-# LINE 790 "src/SDL/Raw/Types.hsc" #-}
DollarGestureEvent typ timestamp touchid gestureid numfingers err x y -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 792 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 793 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr touchid
{-# LINE 794 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr gestureid
{-# LINE 795 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr numfingers
{-# LINE 796 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr err
{-# LINE 797 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr x
{-# LINE 798 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr y
{-# LINE 799 "src/SDL/Raw/Types.hsc" #-}
ClipboardUpdateEvent 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" #-}
DropEvent typ timestamp file -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 804 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 805 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr file
{-# LINE 806 "src/SDL/Raw/Types.hsc" #-}
UnknownEvent typ timestamp -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 808 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr timestamp
{-# LINE 809 "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
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
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 Finger
_ = ((Int
24))
{-# LINE 819 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (8)
{-# LINE 820 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
fingerId <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 822 "src/SDL/Raw/Types.hsc" #-}
x <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 823 "src/SDL/Raw/Types.hsc" #-}
y <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 824 "src/SDL/Raw/Types.hsc" #-}
pressure <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 825 "src/SDL/Raw/Types.hsc" #-}
return $! Finger fingerId x y pressure
poke :: Ptr Finger -> Finger -> IO ()
poke Ptr Finger
ptr (Finger TouchID
fingerId CFloat
x CFloat
y CFloat
pressure) = do
((\Ptr Finger
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr Finger
hsc_ptr Int
0)) Ptr Finger
ptr TouchID
fingerId
{-# LINE 828 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr x
{-# LINE 829 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr y
{-# LINE 830 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr pressure
{-# LINE 831 "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
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
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 GameControllerButtonBind
_ = ((Int
12))
{-# LINE 848 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (4)
{-# LINE 849 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
bind_type <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 851 "src/SDL/Raw/Types.hsc" #-}
case bind_type :: (Word32) of
{-# LINE 852 "src/SDL/Raw/Types.hsc" #-}
(0) -> do
{-# LINE 853 "src/SDL/Raw/Types.hsc" #-}
return $! GameControllerButtonBindNone
(1) -> do
{-# LINE 855 "src/SDL/Raw/Types.hsc" #-}
button <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 856 "src/SDL/Raw/Types.hsc" #-}
return $! GameControllerButtonBindButton button
(2) -> do
{-# LINE 858 "src/SDL/Raw/Types.hsc" #-}
axis <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 859 "src/SDL/Raw/Types.hsc" #-}
return $! GameControllerButtonBindAxis axis
(3) -> do
{-# LINE 861 "src/SDL/Raw/Types.hsc" #-}
hat <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 862 "src/SDL/Raw/Types.hsc" #-}
hat_mask <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 863 "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 GameControllerButtonBind
ptr GameControllerButtonBind
bind = case GameControllerButtonBind
bind of
GameControllerButtonBind
GameControllerButtonBindNone -> do
((\Ptr GameControllerButtonBind
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr GameControllerButtonBind
hsc_ptr Int
0)) Ptr GameControllerButtonBind
ptr ((Word32
0) :: (Word32))
{-# LINE 868 "src/SDL/Raw/Types.hsc" #-}
GameControllerButtonBindButton button -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr ((1) :: (Word32))
{-# LINE 870 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr button
{-# LINE 871 "src/SDL/Raw/Types.hsc" #-}
GameControllerButtonBindAxis axis -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr ((2) :: (Word32))
{-# LINE 873 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr axis
{-# LINE 874 "src/SDL/Raw/Types.hsc" #-}
GameControllerButtonBindHat hat hat_mask -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr ((3) :: (Word32))
{-# LINE 876 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr hat
{-# LINE 877 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr hat_mask
{-# LINE 878 "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
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
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 HapticDirection
_ = ((Int
16))
{-# LINE 888 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (4)
{-# LINE 889 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
typ <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 891 "src/SDL/Raw/Types.hsc" #-}
x <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 892 "src/SDL/Raw/Types.hsc" #-}
y <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 893 "src/SDL/Raw/Types.hsc" #-}
z <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 894 "src/SDL/Raw/Types.hsc" #-}
return $! HapticDirection typ x y z
poke :: Ptr HapticDirection -> HapticDirection -> IO ()
poke Ptr HapticDirection
ptr (HapticDirection Word8
typ Int32
x Int32
y Int32
z) = do
((\Ptr HapticDirection
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr HapticDirection
hsc_ptr Int
0)) Ptr HapticDirection
ptr Word8
typ
{-# LINE 897 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr x
{-# LINE 898 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr y
{-# LINE 899 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr z
{-# LINE 900 "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
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
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 HapticEffect
_ = ((Int
72))
{-# LINE 984 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (8)
{-# LINE 985 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
typ <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 987 "src/SDL/Raw/Types.hsc" #-}
case typ of
(1) -> do
{-# LINE 989 "src/SDL/Raw/Types.hsc" #-}
direction <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 990 "src/SDL/Raw/Types.hsc" #-}
len <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 991 "src/SDL/Raw/Types.hsc" #-}
delay <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 992 "src/SDL/Raw/Types.hsc" #-}
button <- ((\hsc_ptr -> peekByteOff hsc_ptr 26)) ptr
{-# LINE 993 "src/SDL/Raw/Types.hsc" #-}
interval <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 994 "src/SDL/Raw/Types.hsc" #-}
level <- ((\hsc_ptr -> peekByteOff hsc_ptr 30)) ptr
{-# LINE 995 "src/SDL/Raw/Types.hsc" #-}
attack_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 996 "src/SDL/Raw/Types.hsc" #-}
attack_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 34)) ptr
{-# LINE 997 "src/SDL/Raw/Types.hsc" #-}
fade_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
{-# LINE 998 "src/SDL/Raw/Types.hsc" #-}
fade_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 38)) ptr
{-# LINE 999 "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 1002 "src/SDL/Raw/Types.hsc" #-}
(8) -> hapticperiodic $ HapticPeriodic typ
{-# LINE 1003 "src/SDL/Raw/Types.hsc" #-}
(16) -> hapticperiodic $ HapticPeriodic typ
{-# LINE 1004 "src/SDL/Raw/Types.hsc" #-}
(32) -> hapticperiodic $ HapticPeriodic typ
{-# LINE 1005 "src/SDL/Raw/Types.hsc" #-}
(64) -> do
{-# LINE 1007 "src/SDL/Raw/Types.hsc" #-}
direction <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 1008 "src/SDL/Raw/Types.hsc" #-}
len <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 1009 "src/SDL/Raw/Types.hsc" #-}
delay <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 1010 "src/SDL/Raw/Types.hsc" #-}
button <- ((\hsc_ptr -> peekByteOff hsc_ptr 26)) ptr
{-# LINE 1011 "src/SDL/Raw/Types.hsc" #-}
interval <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 1012 "src/SDL/Raw/Types.hsc" #-}
start <- ((\hsc_ptr -> peekByteOff hsc_ptr 30)) ptr
{-# LINE 1013 "src/SDL/Raw/Types.hsc" #-}
end <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 1014 "src/SDL/Raw/Types.hsc" #-}
attack_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 34)) ptr
{-# LINE 1015 "src/SDL/Raw/Types.hsc" #-}
attack_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
{-# LINE 1016 "src/SDL/Raw/Types.hsc" #-}
fade_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 38)) ptr
{-# LINE 1017 "src/SDL/Raw/Types.hsc" #-}
fade_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
{-# LINE 1018 "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 1021 "src/SDL/Raw/Types.hsc" #-}
(256) -> hapticcondition $ HapticCondition typ
{-# LINE 1022 "src/SDL/Raw/Types.hsc" #-}
(512) -> hapticcondition $ HapticCondition typ
{-# LINE 1023 "src/SDL/Raw/Types.hsc" #-}
(1024) -> hapticcondition $ HapticCondition typ
{-# LINE 1024 "src/SDL/Raw/Types.hsc" #-}
(4) -> do
{-# LINE 1026 "src/SDL/Raw/Types.hsc" #-}
len <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 1027 "src/SDL/Raw/Types.hsc" #-}
large_magnitude <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 1028 "src/SDL/Raw/Types.hsc" #-}
small_magnitude <- ((\hsc_ptr -> peekByteOff hsc_ptr 10)) ptr
{-# LINE 1029 "src/SDL/Raw/Types.hsc" #-}
return $! HapticLeftRight typ len large_magnitude small_magnitude
(2048) -> do
{-# LINE 1032 "src/SDL/Raw/Types.hsc" #-}
direction <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 1033 "src/SDL/Raw/Types.hsc" #-}
len <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 1034 "src/SDL/Raw/Types.hsc" #-}
delay <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 1035 "src/SDL/Raw/Types.hsc" #-}
button <- ((\hsc_ptr -> peekByteOff hsc_ptr 26)) ptr
{-# LINE 1036 "src/SDL/Raw/Types.hsc" #-}
interval <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 1037 "src/SDL/Raw/Types.hsc" #-}
channels <- ((\hsc_ptr -> peekByteOff hsc_ptr 30)) ptr
{-# LINE 1038 "src/SDL/Raw/Types.hsc" #-}
period <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 1039 "src/SDL/Raw/Types.hsc" #-}
samples <- ((\hsc_ptr -> peekByteOff hsc_ptr 34)) ptr
{-# LINE 1040 "src/SDL/Raw/Types.hsc" #-}
datum <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
{-# LINE 1041 "src/SDL/Raw/Types.hsc" #-}
attack_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 48)) ptr
{-# LINE 1042 "src/SDL/Raw/Types.hsc" #-}
attack_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 50)) ptr
{-# LINE 1043 "src/SDL/Raw/Types.hsc" #-}
fade_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 52)) ptr
{-# LINE 1044 "src/SDL/Raw/Types.hsc" #-}
fade_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 54)) ptr
{-# LINE 1045 "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 f = do
direction <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 1050 "src/SDL/Raw/Types.hsc" #-}
len <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 1051 "src/SDL/Raw/Types.hsc" #-}
delay <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 1052 "src/SDL/Raw/Types.hsc" #-}
button <- ((\hsc_ptr -> peekByteOff hsc_ptr 26)) ptr
{-# LINE 1053 "src/SDL/Raw/Types.hsc" #-}
interval <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 1054 "src/SDL/Raw/Types.hsc" #-}
period <- ((\hsc_ptr -> peekByteOff hsc_ptr 30)) ptr
{-# LINE 1055 "src/SDL/Raw/Types.hsc" #-}
magnitude <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 1056 "src/SDL/Raw/Types.hsc" #-}
offset <- ((\hsc_ptr -> peekByteOff hsc_ptr 34)) ptr
{-# LINE 1057 "src/SDL/Raw/Types.hsc" #-}
phase <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) ptr
{-# LINE 1058 "src/SDL/Raw/Types.hsc" #-}
attack_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 38)) ptr
{-# LINE 1059 "src/SDL/Raw/Types.hsc" #-}
attack_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
{-# LINE 1060 "src/SDL/Raw/Types.hsc" #-}
fade_length <- ((\hsc_ptr -> peekByteOff hsc_ptr 42)) ptr
{-# LINE 1061 "src/SDL/Raw/Types.hsc" #-}
fade_level <- ((\hsc_ptr -> peekByteOff hsc_ptr 44)) ptr
{-# LINE 1062 "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 f = do
len <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 1066 "src/SDL/Raw/Types.hsc" #-}
delay <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 1067 "src/SDL/Raw/Types.hsc" #-}
button <- ((\hsc_ptr -> peekByteOff hsc_ptr 26)) ptr
{-# LINE 1068 "src/SDL/Raw/Types.hsc" #-}
interval <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 1069 "src/SDL/Raw/Types.hsc" #-}
right_sat <- peekArray 3 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 30)) ptr
{-# LINE 1070 "src/SDL/Raw/Types.hsc" #-}
left_sat <- peekArray 3 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 36)) ptr
{-# LINE 1071 "src/SDL/Raw/Types.hsc" #-}
right_coeff <- peekArray 3 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 42)) ptr
{-# LINE 1072 "src/SDL/Raw/Types.hsc" #-}
left_coeff <- peekArray 3 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 48)) ptr
{-# LINE 1073 "src/SDL/Raw/Types.hsc" #-}
deadband <- peekArray 3 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 54)) ptr
{-# LINE 1074 "src/SDL/Raw/Types.hsc" #-}
center <- peekArray 3 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 60)) ptr
{-# LINE 1075 "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 HapticEffect
ptr HapticEffect
event = case HapticEffect
event of
HapticConstant AudioFormat
typ HapticDirection
direction Word32
len AudioFormat
delay AudioFormat
button AudioFormat
interval Int16
level AudioFormat
attack_length AudioFormat
attack_level AudioFormat
fade_length AudioFormat
fade_level -> do
((\Ptr HapticEffect
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr HapticEffect
hsc_ptr Int
0)) Ptr HapticEffect
ptr AudioFormat
typ
{-# LINE 1079 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr direction
{-# LINE 1080 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr len
{-# LINE 1081 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr delay
{-# LINE 1082 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 26)) ptr button
{-# LINE 1083 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr interval
{-# LINE 1084 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 30)) ptr level
{-# LINE 1085 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr attack_length
{-# LINE 1086 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 34)) ptr attack_level
{-# LINE 1087 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr fade_length
{-# LINE 1088 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 38)) ptr fade_level
{-# LINE 1089 "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 1091 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr direction
{-# LINE 1092 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr len
{-# LINE 1093 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr delay
{-# LINE 1094 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 26)) ptr button
{-# LINE 1095 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr interval
{-# LINE 1096 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 30)) ptr period
{-# LINE 1097 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr magnitude
{-# LINE 1098 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 34)) ptr offset
{-# LINE 1099 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr phase
{-# LINE 1100 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 38)) ptr attack_length
{-# LINE 1101 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr attack_level
{-# LINE 1102 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 42)) ptr fade_length
{-# LINE 1103 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 44)) ptr fade_level
{-# LINE 1104 "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 1106 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr len
{-# LINE 1107 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr delay
{-# LINE 1108 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 26)) ptr button
{-# LINE 1109 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr interval
{-# LINE 1110 "src/SDL/Raw/Types.hsc" #-}
pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 30)) ptr) right_sat
{-# LINE 1111 "src/SDL/Raw/Types.hsc" #-}
pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 36)) ptr) left_sat
{-# LINE 1112 "src/SDL/Raw/Types.hsc" #-}
pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 42)) ptr) right_coeff
{-# LINE 1113 "src/SDL/Raw/Types.hsc" #-}
pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 48)) ptr) left_coeff
{-# LINE 1114 "src/SDL/Raw/Types.hsc" #-}
pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 54)) ptr) deadband
{-# LINE 1115 "src/SDL/Raw/Types.hsc" #-}
pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 60)) ptr) center
{-# LINE 1116 "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 1118 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr direction
{-# LINE 1119 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr len
{-# LINE 1120 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr delay
{-# LINE 1121 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 26)) ptr button
{-# LINE 1122 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr interval
{-# LINE 1123 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 30)) ptr start
{-# LINE 1124 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr end
{-# LINE 1125 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 34)) ptr attack_length
{-# LINE 1126 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 36)) ptr attack_level
{-# LINE 1127 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 38)) ptr fade_length
{-# LINE 1128 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr fade_level
{-# LINE 1129 "src/SDL/Raw/Types.hsc" #-}
HapticLeftRight typ len large_magnitude small_magnitude -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr typ
{-# LINE 1131 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr len
{-# LINE 1132 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr large_magnitude
{-# LINE 1133 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 10)) ptr small_magnitude
{-# LINE 1134 "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 1136 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr direction
{-# LINE 1137 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr len
{-# LINE 1138 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr delay
{-# LINE 1139 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 26)) ptr button
{-# LINE 1140 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr interval
{-# LINE 1141 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 30)) ptr channels
{-# LINE 1142 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr period
{-# LINE 1143 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 34)) ptr samples
{-# LINE 1144 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr datum
{-# LINE 1145 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 48)) ptr attack_length
{-# LINE 1146 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 50)) ptr attack_level
{-# LINE 1147 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 52)) ptr fade_length
{-# LINE 1148 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 54)) ptr fade_level
{-# LINE 1149 "src/SDL/Raw/Types.hsc" #-}
data JoystickGUID = JoystickGUID
{ JoystickGUID -> [Word8]
joystickGUID :: ![Word8]
} deriving (JoystickGUID -> JoystickGUID -> Bool
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
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 JoystickGUID
_ = ((Int
16))
{-# LINE 1156 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (1)
{-# LINE 1157 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
guid <- peekArray 16 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 0)) ptr
{-# LINE 1159 "src/SDL/Raw/Types.hsc" #-}
return $! JoystickGUID guid
poke :: Ptr JoystickGUID -> JoystickGUID -> IO ()
poke Ptr JoystickGUID
ptr (JoystickGUID [Word8]
guid) =
forall a. Storable a => Ptr a -> [a] -> IO ()
pokeArray (((\Ptr JoystickGUID
hsc_ptr -> Ptr JoystickGUID
hsc_ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0)) Ptr JoystickGUID
ptr) [Word8]
guid
{-# LINE 1162 "src/SDL/Raw/Types.hsc" #-}
data Keysym = Keysym
{ Keysym -> Word32
keysymScancode :: !Scancode
, Keysym -> Int32
keysymKeycode :: !Keycode
, Keysym -> AudioFormat
keysymMod :: !Word16
} deriving (Keysym -> Keysym -> Bool
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
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 Keysym
_ = ((Int
16))
{-# LINE 1171 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (4)
{-# LINE 1172 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
scancode <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1174 "src/SDL/Raw/Types.hsc" #-}
sym <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 1175 "src/SDL/Raw/Types.hsc" #-}
mod' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 1176 "src/SDL/Raw/Types.hsc" #-}
return $! Keysym scancode sym mod'
poke :: Ptr Keysym -> Keysym -> IO ()
poke Ptr Keysym
ptr (Keysym Word32
scancode Int32
sym AudioFormat
mod') = do
((\Ptr Keysym
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr Keysym
hsc_ptr Int
0)) Ptr Keysym
ptr Word32
scancode
{-# LINE 1179 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr sym
{-# LINE 1180 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr mod'
{-# LINE 1181 "src/SDL/Raw/Types.hsc" #-}
data MessageBoxButtonData = MessageBoxButtonData
{ MessageBoxButtonData -> Word32
messageBoxButtonDataFlags :: !Word32
, MessageBoxButtonData -> CInt
messageBoxButtonButtonID :: !CInt
, MessageBoxButtonData -> CString
messageBoxButtonText :: !CString
} deriving (MessageBoxButtonData -> MessageBoxButtonData -> Bool
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
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 MessageBoxButtonData
_ = ((Int
16))
{-# LINE 1190 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (8)
{-# LINE 1191 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
flags <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1193 "src/SDL/Raw/Types.hsc" #-}
buttonid <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 1194 "src/SDL/Raw/Types.hsc" #-}
text <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 1195 "src/SDL/Raw/Types.hsc" #-}
return $! MessageBoxButtonData flags buttonid text
poke :: Ptr MessageBoxButtonData -> MessageBoxButtonData -> IO ()
poke Ptr MessageBoxButtonData
ptr (MessageBoxButtonData Word32
flags CInt
buttonid CString
text) = do
((\Ptr MessageBoxButtonData
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr MessageBoxButtonData
hsc_ptr Int
0)) Ptr MessageBoxButtonData
ptr Word32
flags
{-# LINE 1198 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr buttonid
{-# LINE 1199 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr text
{-# LINE 1200 "src/SDL/Raw/Types.hsc" #-}
data MessageBoxColor = MessageBoxColor
{ MessageBoxColor -> Word8
messageBoxColorR :: !Word8
, MessageBoxColor -> Word8
messageBoxColorG :: !Word8
, MessageBoxColor -> Word8
messageBoxColorB :: !Word8
} deriving (MessageBoxColor -> MessageBoxColor -> Bool
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
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 MessageBoxColor
_ = ((Int
3))
{-# LINE 1209 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (1)
{-# LINE 1210 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
r <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1212 "src/SDL/Raw/Types.hsc" #-}
g <- ((\hsc_ptr -> peekByteOff hsc_ptr 1)) ptr
{-# LINE 1213 "src/SDL/Raw/Types.hsc" #-}
b <- ((\hsc_ptr -> peekByteOff hsc_ptr 2)) ptr
{-# LINE 1214 "src/SDL/Raw/Types.hsc" #-}
return $! MessageBoxColor r g b
poke :: Ptr MessageBoxColor -> MessageBoxColor -> IO ()
poke Ptr MessageBoxColor
ptr (MessageBoxColor Word8
r Word8
g Word8
b) = do
((\Ptr MessageBoxColor
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr MessageBoxColor
hsc_ptr Int
0)) Ptr MessageBoxColor
ptr Word8
r
{-# LINE 1217 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 1)) ptr g
{-# LINE 1218 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 2)) ptr b
{-# LINE 1219 "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
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
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 MessageBoxColorScheme
_ = ((Int
15))
{-# LINE 1230 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (1)
{-# LINE 1231 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
background <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1233 "src/SDL/Raw/Types.hsc" #-}
text <- ((\hsc_ptr -> peekByteOff hsc_ptr 3)) ptr
{-# LINE 1234 "src/SDL/Raw/Types.hsc" #-}
button_border <- ((\hsc_ptr -> peekByteOff hsc_ptr 6)) ptr
{-# LINE 1235 "src/SDL/Raw/Types.hsc" #-}
button_background <- ((\hsc_ptr -> peekByteOff hsc_ptr 9)) ptr
{-# LINE 1236 "src/SDL/Raw/Types.hsc" #-}
button_selected <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 1237 "src/SDL/Raw/Types.hsc" #-}
return $! MessageBoxColorScheme background text button_border button_background button_selected
poke :: Ptr MessageBoxColorScheme -> MessageBoxColorScheme -> IO ()
poke Ptr MessageBoxColorScheme
ptr (MessageBoxColorScheme MessageBoxColor
background MessageBoxColor
text MessageBoxColor
button_border MessageBoxColor
button_background MessageBoxColor
button_selected) = do
((\Ptr MessageBoxColorScheme
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr MessageBoxColorScheme
hsc_ptr Int
0)) Ptr MessageBoxColorScheme
ptr MessageBoxColor
background
{-# LINE 1240 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 3)) ptr text
{-# LINE 1241 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 6)) ptr button_border
{-# LINE 1242 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 9)) ptr button_background
{-# LINE 1243 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr button_selected
{-# LINE 1244 "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
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
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 MessageBoxData
_ = ((Int
56))
{-# LINE 1257 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (8)
{-# LINE 1258 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
flags <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1260 "src/SDL/Raw/Types.hsc" #-}
window <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 1261 "src/SDL/Raw/Types.hsc" #-}
title <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 1262 "src/SDL/Raw/Types.hsc" #-}
message <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 1263 "src/SDL/Raw/Types.hsc" #-}
numbuttons <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 1264 "src/SDL/Raw/Types.hsc" #-}
buttons <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
{-# LINE 1265 "src/SDL/Raw/Types.hsc" #-}
color_scheme <- ((\hsc_ptr -> peekByteOff hsc_ptr 48)) ptr
{-# LINE 1266 "src/SDL/Raw/Types.hsc" #-}
return $! MessageBoxData flags window title message numbuttons buttons color_scheme
poke :: Ptr MessageBoxData -> MessageBoxData -> IO ()
poke Ptr MessageBoxData
ptr (MessageBoxData Word32
flags Ptr ()
window CString
title CString
message CInt
numbuttons Ptr MessageBoxButtonData
buttons Ptr MessageBoxColorScheme
color_scheme) = do
((\Ptr MessageBoxData
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr MessageBoxData
hsc_ptr Int
0)) Ptr MessageBoxData
ptr Word32
flags
{-# LINE 1269 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr window
{-# LINE 1270 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr title
{-# LINE 1271 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr message
{-# LINE 1272 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr numbuttons
{-# LINE 1273 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr buttons
{-# LINE 1274 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 48)) ptr color_scheme
{-# LINE 1275 "src/SDL/Raw/Types.hsc" #-}
data Palette = Palette
{ Palette -> CInt
paletteNColors :: !CInt
, Palette -> Ptr Color
paletteColors :: !(Ptr Color)
} deriving (Palette -> Palette -> Bool
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
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 Palette
_ = ((Int
24))
{-# LINE 1283 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (8)
{-# LINE 1284 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
ncolors <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1286 "src/SDL/Raw/Types.hsc" #-}
colors <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 1287 "src/SDL/Raw/Types.hsc" #-}
return $! Palette ncolors colors
poke :: Ptr Palette -> Palette -> IO ()
poke Ptr Palette
ptr (Palette CInt
ncolors Ptr Color
colors) = do
((\Ptr Palette
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr Palette
hsc_ptr Int
0)) Ptr Palette
ptr CInt
ncolors
{-# LINE 1290 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr colors
{-# LINE 1291 "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
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
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 PixelFormat
_ = ((Int
56))
{-# LINE 1305 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (8)
{-# LINE 1306 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
format <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1308 "src/SDL/Raw/Types.hsc" #-}
palette <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 1309 "src/SDL/Raw/Types.hsc" #-}
bits_per_pixel <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 1310 "src/SDL/Raw/Types.hsc" #-}
bytes_per_pixel <- ((\hsc_ptr -> peekByteOff hsc_ptr 17)) ptr
{-# LINE 1311 "src/SDL/Raw/Types.hsc" #-}
rmask <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 1312 "src/SDL/Raw/Types.hsc" #-}
gmask <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 1313 "src/SDL/Raw/Types.hsc" #-}
bmask <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 1314 "src/SDL/Raw/Types.hsc" #-}
amask <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 1315 "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 PixelFormat
ptr (PixelFormat Word32
format Ptr Palette
palette Word8
bits_per_pixel Word8
bytes_per_pixel Word32
rmask Word32
gmask Word32
bmask Word32
amask) = do
((\Ptr PixelFormat
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr PixelFormat
hsc_ptr Int
0)) Ptr PixelFormat
ptr Word32
format
{-# LINE 1318 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr palette
{-# LINE 1319 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr bits_per_pixel
{-# LINE 1320 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 17)) ptr bytes_per_pixel
{-# LINE 1321 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr rmask
{-# LINE 1322 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr gmask
{-# LINE 1323 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 28)) ptr bmask
{-# LINE 1324 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr amask
{-# LINE 1325 "src/SDL/Raw/Types.hsc" #-}
data Point = Point
{ Point -> CInt
pointX :: !CInt
, Point -> CInt
pointY :: !CInt
} deriving (Point -> Point -> Bool
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
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 Point
_ = ((Int
8))
{-# LINE 1333 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (4)
{-# LINE 1334 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
x <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1336 "src/SDL/Raw/Types.hsc" #-}
y <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 1337 "src/SDL/Raw/Types.hsc" #-}
return $! Point x y
poke :: Ptr Point -> Point -> IO ()
poke Ptr Point
ptr (Point CInt
x CInt
y) = do
((\Ptr Point
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr Point
hsc_ptr Int
0)) Ptr Point
ptr CInt
x
{-# LINE 1340 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr y
{-# LINE 1341 "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
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
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 Rect
_ = ((Int
16))
{-# LINE 1351 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (4)
{-# LINE 1352 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
x <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1354 "src/SDL/Raw/Types.hsc" #-}
y <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 1355 "src/SDL/Raw/Types.hsc" #-}
w <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 1356 "src/SDL/Raw/Types.hsc" #-}
h <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 1357 "src/SDL/Raw/Types.hsc" #-}
return $! Rect x y w h
poke :: Ptr Rect -> Rect -> IO ()
poke Ptr Rect
ptr (Rect CInt
x CInt
y CInt
w CInt
h) = do
((\Ptr Rect
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr Rect
hsc_ptr Int
0)) Ptr Rect
ptr CInt
x
{-# LINE 1360 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr y
{-# LINE 1361 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr w
{-# LINE 1362 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr h
{-# LINE 1363 "src/SDL/Raw/Types.hsc" #-}
{-# LINE 1365 "src/SDL/Raw/Types.hsc" #-}
data FPoint = FPoint
{ FPoint -> CFloat
fPointX :: !CFloat
, FPoint -> CFloat
fPointY :: !CFloat
} deriving (FPoint -> FPoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FPoint -> FPoint -> Bool
$c/= :: FPoint -> FPoint -> Bool
== :: FPoint -> FPoint -> Bool
$c== :: FPoint -> FPoint -> Bool
Eq, Int -> FPoint -> ShowS
[FPoint] -> ShowS
FPoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FPoint] -> ShowS
$cshowList :: [FPoint] -> ShowS
show :: FPoint -> String
$cshow :: FPoint -> String
showsPrec :: Int -> FPoint -> ShowS
$cshowsPrec :: Int -> FPoint -> ShowS
Show, Typeable)
instance Storable FPoint where
sizeOf :: FPoint -> Int
sizeOf FPoint
_ = ((Int
8))
{-# LINE 1373 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (4)
{-# LINE 1374 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
x <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1376 "src/SDL/Raw/Types.hsc" #-}
y <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 1377 "src/SDL/Raw/Types.hsc" #-}
return $! FPoint x y
poke :: Ptr FPoint -> FPoint -> IO ()
poke Ptr FPoint
ptr (FPoint CFloat
x CFloat
y) = do
((\Ptr FPoint
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr FPoint
hsc_ptr Int
0)) Ptr FPoint
ptr CFloat
x
{-# LINE 1380 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr y
{-# LINE 1381 "src/SDL/Raw/Types.hsc" #-}
data FRect = FRect
{ FRect -> CFloat
fRectX :: !CFloat
, FRect -> CFloat
fRectY :: !CFloat
, FRect -> CFloat
fRectW :: !CFloat
, FRect -> CFloat
fRectH :: !CFloat
} deriving (FRect -> FRect -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FRect -> FRect -> Bool
$c/= :: FRect -> FRect -> Bool
== :: FRect -> FRect -> Bool
$c== :: FRect -> FRect -> Bool
Eq, Int -> FRect -> ShowS
[FRect] -> ShowS
FRect -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FRect] -> ShowS
$cshowList :: [FRect] -> ShowS
show :: FRect -> String
$cshow :: FRect -> String
showsPrec :: Int -> FRect -> ShowS
$cshowsPrec :: Int -> FRect -> ShowS
Show, Typeable)
instance Storable FRect where
sizeOf :: FRect -> Int
sizeOf FRect
_ = ((Int
16))
{-# LINE 1391 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (4)
{-# LINE 1392 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
x <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1394 "src/SDL/Raw/Types.hsc" #-}
y <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 1395 "src/SDL/Raw/Types.hsc" #-}
w <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 1396 "src/SDL/Raw/Types.hsc" #-}
h <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 1397 "src/SDL/Raw/Types.hsc" #-}
return $! FRect x y w h
poke :: Ptr FRect -> FRect -> IO ()
poke Ptr FRect
ptr (FRect CFloat
x CFloat
y CFloat
w CFloat
h) = do
((\Ptr FRect
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr FRect
hsc_ptr Int
0)) Ptr FRect
ptr CFloat
x
{-# LINE 1400 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr y
{-# LINE 1401 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr w
{-# LINE 1402 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr h
{-# LINE 1403 "src/SDL/Raw/Types.hsc" #-}
data Vertex = Vertex
{ Vertex -> FPoint
vertexPosition :: !FPoint
, Vertex -> Color
vertexColor :: !Color
, Vertex -> FPoint
vertexTexCoord :: !FPoint
} deriving (Vertex -> Vertex -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Vertex -> Vertex -> Bool
$c/= :: Vertex -> Vertex -> Bool
== :: Vertex -> Vertex -> Bool
$c== :: Vertex -> Vertex -> Bool
Eq, Int -> Vertex -> ShowS
[Vertex] -> ShowS
Vertex -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Vertex] -> ShowS
$cshowList :: [Vertex] -> ShowS
show :: Vertex -> String
$cshow :: Vertex -> String
showsPrec :: Int -> Vertex -> ShowS
$cshowsPrec :: Int -> Vertex -> ShowS
Show, Typeable)
instance Storable Vertex where
sizeOf :: Vertex -> Int
sizeOf Vertex
_ = ((Int
20))
{-# LINE 1412 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (4)
{-# LINE 1413 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
position <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1415 "src/SDL/Raw/Types.hsc" #-}
color <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 1416 "src/SDL/Raw/Types.hsc" #-}
tex_coord <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 1417 "src/SDL/Raw/Types.hsc" #-}
return $! Vertex position color tex_coord
poke :: Ptr Vertex -> Vertex -> IO ()
poke Ptr Vertex
ptr (Vertex FPoint
position Color
color FPoint
tex_coord) = do
((\Ptr Vertex
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr Vertex
hsc_ptr Int
0)) Ptr Vertex
ptr FPoint
position
{-# LINE 1420 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr color
{-# LINE 1421 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr tex_coord
{-# LINE 1422 "src/SDL/Raw/Types.hsc" #-}
{-# LINE 1423 "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
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
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 RendererInfo
_ = ((Int
88))
{-# LINE 1435 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (8)
{-# LINE 1436 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
name <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1438 "src/SDL/Raw/Types.hsc" #-}
flags <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 1439 "src/SDL/Raw/Types.hsc" #-}
num_texture_formats <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 1440 "src/SDL/Raw/Types.hsc" #-}
texture_formats <- peekArray 16 $ ((\hsc_ptr -> hsc_ptr `plusPtr` 16)) ptr
{-# LINE 1441 "src/SDL/Raw/Types.hsc" #-}
max_texture_width <- ((\hsc_ptr -> peekByteOff hsc_ptr 80)) ptr
{-# LINE 1442 "src/SDL/Raw/Types.hsc" #-}
max_texture_height <- ((\hsc_ptr -> peekByteOff hsc_ptr 84)) ptr
{-# LINE 1443 "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 RendererInfo
ptr (RendererInfo CString
name Word32
flags Word32
num_texture_formats [Word32]
texture_formats CInt
max_texture_width CInt
max_texture_height) = do
((\Ptr RendererInfo
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr RendererInfo
hsc_ptr Int
0)) Ptr RendererInfo
ptr CString
name
{-# LINE 1446 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr flags
{-# LINE 1447 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr num_texture_formats
{-# LINE 1448 "src/SDL/Raw/Types.hsc" #-}
pokeArray (((\hsc_ptr -> hsc_ptr `plusPtr` 16)) ptr) texture_formats
{-# LINE 1449 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 80)) ptr max_texture_width
{-# LINE 1450 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 84)) ptr max_texture_height
{-# LINE 1451 "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
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
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 RWops
_ = ((Int
72))
{-# LINE 1463 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (8)
{-# LINE 1464 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
size <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1466 "src/SDL/Raw/Types.hsc" #-}
seek <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 1467 "src/SDL/Raw/Types.hsc" #-}
read' <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 1468 "src/SDL/Raw/Types.hsc" #-}
write <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 1469 "src/SDL/Raw/Types.hsc" #-}
close <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 1470 "src/SDL/Raw/Types.hsc" #-}
typ <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
{-# LINE 1471 "src/SDL/Raw/Types.hsc" #-}
return $! RWops size seek read' write close typ
poke :: Ptr RWops -> RWops -> IO ()
poke Ptr RWops
ptr (RWops FunPtr (Ptr RWops -> IO TouchID)
size FunPtr (Ptr RWops -> TouchID -> CInt -> IO TouchID)
seek FunPtr (Ptr RWops -> Ptr () -> CSize -> CSize -> IO CSize)
read' FunPtr (Ptr RWops -> Ptr () -> CSize -> CSize -> IO CSize)
write FunPtr (Ptr RWops -> IO CInt)
close Word32
typ) = do
((\Ptr RWops
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr RWops
hsc_ptr Int
0)) Ptr RWops
ptr FunPtr (Ptr RWops -> IO TouchID)
size
{-# LINE 1474 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr seek
{-# LINE 1475 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr read'
{-# LINE 1476 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr write
{-# LINE 1477 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr close
{-# LINE 1478 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr typ
{-# LINE 1479 "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
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
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 Surface
_ = ((Int
96))
{-# LINE 1492 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (8)
{-# LINE 1493 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
format <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 1495 "src/SDL/Raw/Types.hsc" #-}
w <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 1496 "src/SDL/Raw/Types.hsc" #-}
h <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 1497 "src/SDL/Raw/Types.hsc" #-}
pixels <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 1498 "src/SDL/Raw/Types.hsc" #-}
userdata <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
{-# LINE 1499 "src/SDL/Raw/Types.hsc" #-}
cliprect <- ((\hsc_ptr -> peekByteOff hsc_ptr 64)) ptr
{-# LINE 1500 "src/SDL/Raw/Types.hsc" #-}
refcount <- ((\hsc_ptr -> peekByteOff hsc_ptr 88)) ptr
{-# LINE 1501 "src/SDL/Raw/Types.hsc" #-}
return $! Surface format w h pixels userdata cliprect refcount
poke :: Ptr Surface -> Surface -> IO ()
poke Ptr Surface
ptr (Surface Ptr PixelFormat
format CInt
w CInt
h Ptr ()
pixels Ptr ()
userdata Rect
cliprect CInt
refcount) = do
((\Ptr Surface
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr Surface
hsc_ptr Int
8)) Ptr Surface
ptr Ptr PixelFormat
format
{-# LINE 1504 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr w
{-# LINE 1505 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 20)) ptr h
{-# LINE 1506 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr pixels
{-# LINE 1507 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr userdata
{-# LINE 1508 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 64)) ptr cliprect
{-# LINE 1509 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 88)) ptr refcount
{-# LINE 1510 "src/SDL/Raw/Types.hsc" #-}
data Version = Version
{ Version -> Word8
versionMajor :: !Word8
, Version -> Word8
versionMinor :: !Word8
, Version -> Word8
versionPatch :: !Word8
} deriving (Version -> Version -> Bool
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
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 Version
_ = ((Int
3))
{-# LINE 1519 "src/SDL/Raw/Types.hsc" #-}
alignment _ = (1)
{-# LINE 1520 "src/SDL/Raw/Types.hsc" #-}
peek ptr = do
major <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 1522 "src/SDL/Raw/Types.hsc" #-}
minor <- ((\hsc_ptr -> peekByteOff hsc_ptr 1)) ptr
{-# LINE 1523 "src/SDL/Raw/Types.hsc" #-}
patch <- ((\hsc_ptr -> peekByteOff hsc_ptr 2)) ptr
{-# LINE 1524 "src/SDL/Raw/Types.hsc" #-}
return $! Version major minor patch
poke :: Ptr Version -> Version -> IO ()
poke Ptr Version
ptr (Version Word8
major Word8
minor Word8
patch) = do
((\Ptr Version
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr Version
hsc_ptr Int
0)) Ptr Version
ptr Word8
major
{-# LINE 1527 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 1)) ptr minor
{-# LINE 1528 "src/SDL/Raw/Types.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 2)) ptr patch
{-# LINE 1529 "src/SDL/Raw/Types.hsc" #-}