{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
module SDL3.Sys.Bindgen.Gamepad (
SDL3.Sys.Bindgen.Gamepad.SDL_Gamepad,
SDL3.Sys.Bindgen.Gamepad.SDL_GamepadType (..),
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_UNKNOWN,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_STANDARD,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_XBOX360,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_XBOXONE,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_PS3,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_PS4,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_PS5,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_GAMECUBE,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_STEAM,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_TYPE_COUNT,
SDL3.Sys.Bindgen.Gamepad.SDL_GamepadButton (..),
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_INVALID,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_SOUTH,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_EAST,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_WEST,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_NORTH,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_BACK,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_GUIDE,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_START,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LEFT_STICK,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_RIGHT_STICK,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LEFT_SHOULDER,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_DPAD_UP,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_DPAD_DOWN,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_DPAD_LEFT,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_DPAD_RIGHT,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_MISC1,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LEFT_PADDLE1,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LEFT_PADDLE2,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_TOUCHPAD,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_MISC2,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_MISC3,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_MISC4,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_MISC5,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_MISC6,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_COUNT,
SDL3.Sys.Bindgen.Gamepad.SDL_GamepadButtonLabel (..),
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LABEL_A,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LABEL_B,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LABEL_X,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LABEL_Y,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LABEL_CROSS,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LABEL_CIRCLE,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LABEL_SQUARE,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE,
SDL3.Sys.Bindgen.Gamepad.SDL_GamepadAxis (..),
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_AXIS_INVALID,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_AXIS_LEFTX,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_AXIS_LEFTY,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_AXIS_RIGHTX,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_AXIS_RIGHTY,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_AXIS_LEFT_TRIGGER,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_AXIS_RIGHT_TRIGGER,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_AXIS_COUNT,
SDL3.Sys.Bindgen.Gamepad.SDL_GamepadBindingType (..),
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BINDTYPE_NONE,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BINDTYPE_BUTTON,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BINDTYPE_AXIS,
pattern SDL3.Sys.Bindgen.Gamepad.SDL_GAMEPAD_BINDTYPE_HAT,
SDL3.Sys.Bindgen.Gamepad.SDL_GamepadBinding_input_axis (..),
SDL3.Sys.Bindgen.Gamepad.SDL_GamepadBinding_input_hat (..),
SDL3.Sys.Bindgen.Gamepad.SDL_GamepadBinding_input (..),
SDL3.Sys.Bindgen.Gamepad.SDL_GamepadBinding_output_axis (..),
SDL3.Sys.Bindgen.Gamepad.SDL_GamepadBinding_output (..),
SDL3.Sys.Bindgen.Gamepad.SDL_GamepadBinding (..),
)
where
import Prelude (Eq, Int, Ord, Read, Show, pure, (<*>), (>>), type (~))
import HsBindgen.Runtime.CEnum qualified as CEnum
import HsBindgen.Runtime.HasCField qualified as HasCField
import HsBindgen.Runtime.Marshal qualified as Marshal
import HsBindgen.Runtime.Struct qualified as Struct
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CompatHasField qualified as BG.CompatHasField
import HsBindgen.Runtime.Union qualified as Union
data SDL_Gamepad
newtype SDL_GamepadType = SDL_GamepadType
{ SDL_GamepadType -> CUInt
unwrap :: BG.CUInt
}
deriving stock ((forall x. SDL_GamepadType -> Rep SDL_GamepadType x)
-> (forall x. Rep SDL_GamepadType x -> SDL_GamepadType)
-> Generic SDL_GamepadType
forall x. Rep SDL_GamepadType x -> SDL_GamepadType
forall x. SDL_GamepadType -> Rep SDL_GamepadType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SDL_GamepadType -> Rep SDL_GamepadType x
from :: forall x. SDL_GamepadType -> Rep SDL_GamepadType x
$cto :: forall x. Rep SDL_GamepadType x -> SDL_GamepadType
to :: forall x. Rep SDL_GamepadType x -> SDL_GamepadType
BG.Generic, SDL_GamepadType -> SDL_GamepadType -> Bool
(SDL_GamepadType -> SDL_GamepadType -> Bool)
-> (SDL_GamepadType -> SDL_GamepadType -> Bool)
-> Eq SDL_GamepadType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_GamepadType -> SDL_GamepadType -> Bool
== :: SDL_GamepadType -> SDL_GamepadType -> Bool
$c/= :: SDL_GamepadType -> SDL_GamepadType -> Bool
/= :: SDL_GamepadType -> SDL_GamepadType -> Bool
Eq, Eq SDL_GamepadType
Eq SDL_GamepadType =>
(SDL_GamepadType -> SDL_GamepadType -> Ordering)
-> (SDL_GamepadType -> SDL_GamepadType -> Bool)
-> (SDL_GamepadType -> SDL_GamepadType -> Bool)
-> (SDL_GamepadType -> SDL_GamepadType -> Bool)
-> (SDL_GamepadType -> SDL_GamepadType -> Bool)
-> (SDL_GamepadType -> SDL_GamepadType -> SDL_GamepadType)
-> (SDL_GamepadType -> SDL_GamepadType -> SDL_GamepadType)
-> Ord SDL_GamepadType
SDL_GamepadType -> SDL_GamepadType -> Bool
SDL_GamepadType -> SDL_GamepadType -> Ordering
SDL_GamepadType -> SDL_GamepadType -> SDL_GamepadType
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SDL_GamepadType -> SDL_GamepadType -> Ordering
compare :: SDL_GamepadType -> SDL_GamepadType -> Ordering
$c< :: SDL_GamepadType -> SDL_GamepadType -> Bool
< :: SDL_GamepadType -> SDL_GamepadType -> Bool
$c<= :: SDL_GamepadType -> SDL_GamepadType -> Bool
<= :: SDL_GamepadType -> SDL_GamepadType -> Bool
$c> :: SDL_GamepadType -> SDL_GamepadType -> Bool
> :: SDL_GamepadType -> SDL_GamepadType -> Bool
$c>= :: SDL_GamepadType -> SDL_GamepadType -> Bool
>= :: SDL_GamepadType -> SDL_GamepadType -> Bool
$cmax :: SDL_GamepadType -> SDL_GamepadType -> SDL_GamepadType
max :: SDL_GamepadType -> SDL_GamepadType -> SDL_GamepadType
$cmin :: SDL_GamepadType -> SDL_GamepadType -> SDL_GamepadType
min :: SDL_GamepadType -> SDL_GamepadType -> SDL_GamepadType
Ord)
deriving newtype (FFIType SDL_GamepadType -> SDL_GamepadType
SDL_GamepadType -> FFIType SDL_GamepadType
(SDL_GamepadType -> FFIType SDL_GamepadType)
-> (FFIType SDL_GamepadType -> SDL_GamepadType)
-> HasFFIType SDL_GamepadType
forall a. (a -> FFIType a) -> (FFIType a -> a) -> HasFFIType a
$ctoFFIType :: SDL_GamepadType -> FFIType SDL_GamepadType
toFFIType :: SDL_GamepadType -> FFIType SDL_GamepadType
$cfromFFIType :: FFIType SDL_GamepadType -> SDL_GamepadType
fromFFIType :: FFIType SDL_GamepadType -> SDL_GamepadType
BG.HasFFIType)
instance Marshal.StaticSize SDL_GamepadType where
staticSizeOf :: Proxy SDL_GamepadType -> Int
staticSizeOf = \Proxy SDL_GamepadType
_ -> (Int
4 :: Int)
staticAlignment :: Proxy SDL_GamepadType -> Int
staticAlignment = \Proxy SDL_GamepadType
_ -> (Int
4 :: Int)
instance Marshal.ReadRaw SDL_GamepadType where
readRaw :: Ptr SDL_GamepadType -> IO SDL_GamepadType
readRaw =
\Ptr SDL_GamepadType
ptr0 ->
(CUInt -> SDL_GamepadType) -> IO (CUInt -> SDL_GamepadType)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CUInt -> SDL_GamepadType
SDL_GamepadType
IO (CUInt -> SDL_GamepadType) -> IO CUInt -> IO SDL_GamepadType
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Ptr SDL_GamepadType -> Int -> IO CUInt
forall a b. ReadRaw a => Ptr b -> Int -> IO a
Marshal.readRawByteOff Ptr SDL_GamepadType
ptr0 (Int
0 :: Int)
instance Marshal.WriteRaw SDL_GamepadType where
writeRaw :: Ptr SDL_GamepadType -> SDL_GamepadType -> IO ()
writeRaw =
\Ptr SDL_GamepadType
ptr0 ->
\SDL_GamepadType
s1 ->
case SDL_GamepadType
s1 of
SDL_GamepadType CUInt
unwrap2 ->
Ptr SDL_GamepadType -> Int -> CUInt -> IO ()
forall a b. WriteRaw a => Ptr b -> Int -> a -> IO ()
Marshal.writeRawByteOff Ptr SDL_GamepadType
ptr0 (Int
0 :: Int) CUInt
unwrap2
deriving via Marshal.EquivStorable SDL_GamepadType instance BG.Storable SDL_GamepadType
deriving via BG.CUInt instance BG.Prim SDL_GamepadType
instance CEnum.CEnum SDL_GamepadType where
type CEnumZ SDL_GamepadType = BG.CUInt
toCEnum :: CEnumZ SDL_GamepadType -> SDL_GamepadType
toCEnum = CUInt -> SDL_GamepadType
CEnumZ SDL_GamepadType -> SDL_GamepadType
SDL_GamepadType
fromCEnum :: SDL_GamepadType -> CEnumZ SDL_GamepadType
fromCEnum = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"unwrap"
declaredValues :: forall (proxy :: * -> *).
proxy SDL_GamepadType -> DeclaredValues SDL_GamepadType
declaredValues =
\proxy SDL_GamepadType
_ ->
[(CEnumZ SDL_GamepadType, NonEmpty String)]
-> DeclaredValues SDL_GamepadType
forall a.
Ord (CEnumZ a) =>
[(CEnumZ a, NonEmpty String)] -> DeclaredValues a
CEnum.declaredValuesFromList
[ (CUInt
CEnumZ SDL_GamepadType
0, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_UNKNOWN")
, (CUInt
CEnumZ SDL_GamepadType
1, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_STANDARD")
, (CUInt
CEnumZ SDL_GamepadType
2, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_XBOX360")
, (CUInt
CEnumZ SDL_GamepadType
3, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_XBOXONE")
, (CUInt
CEnumZ SDL_GamepadType
4, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_PS3")
, (CUInt
CEnumZ SDL_GamepadType
5, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_PS4")
, (CUInt
CEnumZ SDL_GamepadType
6, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_PS5")
, (CUInt
CEnumZ SDL_GamepadType
7, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO")
, (CUInt
CEnumZ SDL_GamepadType
8, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT")
, (CUInt
CEnumZ SDL_GamepadType
9, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT")
, (CUInt
CEnumZ SDL_GamepadType
10, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR")
, (CUInt
CEnumZ SDL_GamepadType
11, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_GAMECUBE")
, (CUInt
CEnumZ SDL_GamepadType
12, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_STEAM")
, (CUInt
CEnumZ SDL_GamepadType
13, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_TYPE_COUNT")
]
showsUndeclared :: forall (proxy :: * -> *).
proxy SDL_GamepadType -> Int -> CEnumZ SDL_GamepadType -> ShowS
showsUndeclared =
String
-> proxy SDL_GamepadType -> Int -> CEnumZ SDL_GamepadType -> ShowS
forall a (proxy :: * -> *).
Show (CEnumZ a) =>
String -> proxy a -> Int -> CEnumZ a -> ShowS
CEnum.showsWrappedUndeclared String
"SDL_GamepadType"
readPrecUndeclared :: ReadPrec SDL_GamepadType
readPrecUndeclared =
String -> ReadPrec SDL_GamepadType
forall a. (CEnum a, Read (CEnumZ a)) => String -> ReadPrec a
CEnum.readPrecWrappedUndeclared String
"SDL_GamepadType"
isDeclared :: SDL_GamepadType -> Bool
isDeclared = SDL_GamepadType -> Bool
forall a. SequentialCEnum a => a -> Bool
CEnum.seqIsDeclared
mkDeclared :: CEnumZ SDL_GamepadType -> Maybe SDL_GamepadType
mkDeclared = CEnumZ SDL_GamepadType -> Maybe SDL_GamepadType
forall a. SequentialCEnum a => CEnumZ a -> Maybe a
CEnum.seqMkDeclared
instance CEnum.SequentialCEnum SDL_GamepadType where
minDeclaredValue :: SDL_GamepadType
minDeclaredValue = SDL_GamepadType
SDL_GAMEPAD_TYPE_UNKNOWN
maxDeclaredValue :: SDL_GamepadType
maxDeclaredValue = SDL_GamepadType
SDL_GAMEPAD_TYPE_COUNT
instance Show SDL_GamepadType where
showsPrec :: Int -> SDL_GamepadType -> ShowS
showsPrec = Int -> SDL_GamepadType -> ShowS
forall a. CEnum a => Int -> a -> ShowS
CEnum.shows
instance Read SDL_GamepadType where
readPrec :: ReadPrec SDL_GamepadType
readPrec = ReadPrec SDL_GamepadType
forall a. CEnum a => ReadPrec a
CEnum.readPrec
readList :: ReadS [SDL_GamepadType]
readList = ReadS [SDL_GamepadType]
forall a. Read a => ReadS [a]
BG.readListDefault
readListPrec :: ReadPrec [SDL_GamepadType]
readListPrec = ReadPrec [SDL_GamepadType]
forall a. Read a => ReadPrec [a]
BG.readListPrecDefault
instance
(ty ~ BG.CUInt)
=> BG.CompatHasField.HasField "unwrap" SDL_GamepadType ty
where
hasField :: SDL_GamepadType -> (ty -> SDL_GamepadType, ty)
hasField =
\SDL_GamepadType
x0 ->
( \ty
y1 ->
SDL_GamepadType{unwrap :: CUInt
unwrap = ty
CUInt
y1}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"unwrap" SDL_GamepadType
x0
)
instance
(ty ~ BG.CUInt)
=> BG.HasField "unwrap" (BG.Ptr SDL_GamepadType) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadType -> Ptr ty
getField = Proxy "unwrap"
-> Ptr SDL_GamepadType -> Ptr (CFieldType SDL_GamepadType "unwrap")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"unwrap")
instance HasCField.HasCField SDL_GamepadType "unwrap" where
type CFieldType SDL_GamepadType "unwrap" = BG.CUInt
offset# :: Proxy# SDL_GamepadType -> Proxy# "unwrap" -> Int
offset# = \Proxy# SDL_GamepadType
_ -> \Proxy# "unwrap"
_ -> Int
0
pattern SDL_GAMEPAD_TYPE_UNKNOWN :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_UNKNOWN :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_UNKNOWN :: SDL_GamepadType
SDL_GAMEPAD_TYPE_UNKNOWN = SDL_GamepadType 0
pattern SDL_GAMEPAD_TYPE_STANDARD :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_STANDARD :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_STANDARD :: SDL_GamepadType
SDL_GAMEPAD_TYPE_STANDARD = SDL_GamepadType 1
pattern SDL_GAMEPAD_TYPE_XBOX360 :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_XBOX360 :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_XBOX360 :: SDL_GamepadType
SDL_GAMEPAD_TYPE_XBOX360 = SDL_GamepadType 2
pattern SDL_GAMEPAD_TYPE_XBOXONE :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_XBOXONE :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_XBOXONE :: SDL_GamepadType
SDL_GAMEPAD_TYPE_XBOXONE = SDL_GamepadType 3
pattern SDL_GAMEPAD_TYPE_PS3 :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_PS3 :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_PS3 :: SDL_GamepadType
SDL_GAMEPAD_TYPE_PS3 = SDL_GamepadType 4
pattern SDL_GAMEPAD_TYPE_PS4 :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_PS4 :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_PS4 :: SDL_GamepadType
SDL_GAMEPAD_TYPE_PS4 = SDL_GamepadType 5
pattern SDL_GAMEPAD_TYPE_PS5 :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_PS5 :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_PS5 :: SDL_GamepadType
SDL_GAMEPAD_TYPE_PS5 = SDL_GamepadType 6
pattern SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO :: SDL_GamepadType
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO = SDL_GamepadType 7
pattern SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT :: SDL_GamepadType
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT = SDL_GamepadType 8
pattern SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT :: SDL_GamepadType
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT = SDL_GamepadType 9
pattern SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR :: SDL_GamepadType
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR = SDL_GamepadType 10
pattern SDL_GAMEPAD_TYPE_GAMECUBE :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_GAMECUBE :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_GAMECUBE :: SDL_GamepadType
SDL_GAMEPAD_TYPE_GAMECUBE = SDL_GamepadType 11
pattern SDL_GAMEPAD_TYPE_STEAM :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_STEAM :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_STEAM :: SDL_GamepadType
SDL_GAMEPAD_TYPE_STEAM = SDL_GamepadType 12
pattern SDL_GAMEPAD_TYPE_COUNT :: SDL_GamepadType
pattern $mSDL_GAMEPAD_TYPE_COUNT :: forall {r}. SDL_GamepadType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_TYPE_COUNT :: SDL_GamepadType
SDL_GAMEPAD_TYPE_COUNT = SDL_GamepadType 13
newtype SDL_GamepadButton = SDL_GamepadButton
{ SDL_GamepadButton -> CInt
unwrap :: BG.CInt
}
deriving stock ((forall x. SDL_GamepadButton -> Rep SDL_GamepadButton x)
-> (forall x. Rep SDL_GamepadButton x -> SDL_GamepadButton)
-> Generic SDL_GamepadButton
forall x. Rep SDL_GamepadButton x -> SDL_GamepadButton
forall x. SDL_GamepadButton -> Rep SDL_GamepadButton x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SDL_GamepadButton -> Rep SDL_GamepadButton x
from :: forall x. SDL_GamepadButton -> Rep SDL_GamepadButton x
$cto :: forall x. Rep SDL_GamepadButton x -> SDL_GamepadButton
to :: forall x. Rep SDL_GamepadButton x -> SDL_GamepadButton
BG.Generic, SDL_GamepadButton -> SDL_GamepadButton -> Bool
(SDL_GamepadButton -> SDL_GamepadButton -> Bool)
-> (SDL_GamepadButton -> SDL_GamepadButton -> Bool)
-> Eq SDL_GamepadButton
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_GamepadButton -> SDL_GamepadButton -> Bool
== :: SDL_GamepadButton -> SDL_GamepadButton -> Bool
$c/= :: SDL_GamepadButton -> SDL_GamepadButton -> Bool
/= :: SDL_GamepadButton -> SDL_GamepadButton -> Bool
Eq, Eq SDL_GamepadButton
Eq SDL_GamepadButton =>
(SDL_GamepadButton -> SDL_GamepadButton -> Ordering)
-> (SDL_GamepadButton -> SDL_GamepadButton -> Bool)
-> (SDL_GamepadButton -> SDL_GamepadButton -> Bool)
-> (SDL_GamepadButton -> SDL_GamepadButton -> Bool)
-> (SDL_GamepadButton -> SDL_GamepadButton -> Bool)
-> (SDL_GamepadButton -> SDL_GamepadButton -> SDL_GamepadButton)
-> (SDL_GamepadButton -> SDL_GamepadButton -> SDL_GamepadButton)
-> Ord SDL_GamepadButton
SDL_GamepadButton -> SDL_GamepadButton -> Bool
SDL_GamepadButton -> SDL_GamepadButton -> Ordering
SDL_GamepadButton -> SDL_GamepadButton -> SDL_GamepadButton
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SDL_GamepadButton -> SDL_GamepadButton -> Ordering
compare :: SDL_GamepadButton -> SDL_GamepadButton -> Ordering
$c< :: SDL_GamepadButton -> SDL_GamepadButton -> Bool
< :: SDL_GamepadButton -> SDL_GamepadButton -> Bool
$c<= :: SDL_GamepadButton -> SDL_GamepadButton -> Bool
<= :: SDL_GamepadButton -> SDL_GamepadButton -> Bool
$c> :: SDL_GamepadButton -> SDL_GamepadButton -> Bool
> :: SDL_GamepadButton -> SDL_GamepadButton -> Bool
$c>= :: SDL_GamepadButton -> SDL_GamepadButton -> Bool
>= :: SDL_GamepadButton -> SDL_GamepadButton -> Bool
$cmax :: SDL_GamepadButton -> SDL_GamepadButton -> SDL_GamepadButton
max :: SDL_GamepadButton -> SDL_GamepadButton -> SDL_GamepadButton
$cmin :: SDL_GamepadButton -> SDL_GamepadButton -> SDL_GamepadButton
min :: SDL_GamepadButton -> SDL_GamepadButton -> SDL_GamepadButton
Ord)
deriving newtype (FFIType SDL_GamepadButton -> SDL_GamepadButton
SDL_GamepadButton -> FFIType SDL_GamepadButton
(SDL_GamepadButton -> FFIType SDL_GamepadButton)
-> (FFIType SDL_GamepadButton -> SDL_GamepadButton)
-> HasFFIType SDL_GamepadButton
forall a. (a -> FFIType a) -> (FFIType a -> a) -> HasFFIType a
$ctoFFIType :: SDL_GamepadButton -> FFIType SDL_GamepadButton
toFFIType :: SDL_GamepadButton -> FFIType SDL_GamepadButton
$cfromFFIType :: FFIType SDL_GamepadButton -> SDL_GamepadButton
fromFFIType :: FFIType SDL_GamepadButton -> SDL_GamepadButton
BG.HasFFIType)
instance Marshal.StaticSize SDL_GamepadButton where
staticSizeOf :: Proxy SDL_GamepadButton -> Int
staticSizeOf = \Proxy SDL_GamepadButton
_ -> (Int
4 :: Int)
staticAlignment :: Proxy SDL_GamepadButton -> Int
staticAlignment = \Proxy SDL_GamepadButton
_ -> (Int
4 :: Int)
instance Marshal.ReadRaw SDL_GamepadButton where
readRaw :: Ptr SDL_GamepadButton -> IO SDL_GamepadButton
readRaw =
\Ptr SDL_GamepadButton
ptr0 ->
(CInt -> SDL_GamepadButton) -> IO (CInt -> SDL_GamepadButton)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CInt -> SDL_GamepadButton
SDL_GamepadButton
IO (CInt -> SDL_GamepadButton) -> IO CInt -> IO SDL_GamepadButton
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Ptr SDL_GamepadButton -> Int -> IO CInt
forall a b. ReadRaw a => Ptr b -> Int -> IO a
Marshal.readRawByteOff Ptr SDL_GamepadButton
ptr0 (Int
0 :: Int)
instance Marshal.WriteRaw SDL_GamepadButton where
writeRaw :: Ptr SDL_GamepadButton -> SDL_GamepadButton -> IO ()
writeRaw =
\Ptr SDL_GamepadButton
ptr0 ->
\SDL_GamepadButton
s1 ->
case SDL_GamepadButton
s1 of
SDL_GamepadButton CInt
unwrap2 ->
Ptr SDL_GamepadButton -> Int -> CInt -> IO ()
forall a b. WriteRaw a => Ptr b -> Int -> a -> IO ()
Marshal.writeRawByteOff Ptr SDL_GamepadButton
ptr0 (Int
0 :: Int) CInt
unwrap2
deriving via Marshal.EquivStorable SDL_GamepadButton instance BG.Storable SDL_GamepadButton
deriving via BG.CInt instance BG.Prim SDL_GamepadButton
instance CEnum.CEnum SDL_GamepadButton where
type CEnumZ SDL_GamepadButton = BG.CInt
toCEnum :: CEnumZ SDL_GamepadButton -> SDL_GamepadButton
toCEnum = CInt -> SDL_GamepadButton
CEnumZ SDL_GamepadButton -> SDL_GamepadButton
SDL_GamepadButton
fromCEnum :: SDL_GamepadButton -> CEnumZ SDL_GamepadButton
fromCEnum = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"unwrap"
declaredValues :: forall (proxy :: * -> *).
proxy SDL_GamepadButton -> DeclaredValues SDL_GamepadButton
declaredValues =
\proxy SDL_GamepadButton
_ ->
[(CEnumZ SDL_GamepadButton, NonEmpty String)]
-> DeclaredValues SDL_GamepadButton
forall a.
Ord (CEnumZ a) =>
[(CEnumZ a, NonEmpty String)] -> DeclaredValues a
CEnum.declaredValuesFromList
[ (-CInt
1, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_INVALID")
, (CInt
CEnumZ SDL_GamepadButton
0, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_SOUTH")
, (CInt
CEnumZ SDL_GamepadButton
1, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_EAST")
, (CInt
CEnumZ SDL_GamepadButton
2, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_WEST")
, (CInt
CEnumZ SDL_GamepadButton
3, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_NORTH")
, (CInt
CEnumZ SDL_GamepadButton
4, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_BACK")
, (CInt
CEnumZ SDL_GamepadButton
5, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_GUIDE")
, (CInt
CEnumZ SDL_GamepadButton
6, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_START")
, (CInt
CEnumZ SDL_GamepadButton
7, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LEFT_STICK")
, (CInt
CEnumZ SDL_GamepadButton
8, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_RIGHT_STICK")
, (CInt
CEnumZ SDL_GamepadButton
9, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LEFT_SHOULDER")
, (CInt
CEnumZ SDL_GamepadButton
10, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER")
, (CInt
CEnumZ SDL_GamepadButton
11, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_DPAD_UP")
, (CInt
CEnumZ SDL_GamepadButton
12, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_DPAD_DOWN")
, (CInt
CEnumZ SDL_GamepadButton
13, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_DPAD_LEFT")
, (CInt
CEnumZ SDL_GamepadButton
14, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_DPAD_RIGHT")
, (CInt
CEnumZ SDL_GamepadButton
15, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_MISC1")
, (CInt
CEnumZ SDL_GamepadButton
16, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1")
, (CInt
CEnumZ SDL_GamepadButton
17, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LEFT_PADDLE1")
, (CInt
CEnumZ SDL_GamepadButton
18, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2")
, (CInt
CEnumZ SDL_GamepadButton
19, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LEFT_PADDLE2")
, (CInt
CEnumZ SDL_GamepadButton
20, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_TOUCHPAD")
, (CInt
CEnumZ SDL_GamepadButton
21, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_MISC2")
, (CInt
CEnumZ SDL_GamepadButton
22, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_MISC3")
, (CInt
CEnumZ SDL_GamepadButton
23, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_MISC4")
, (CInt
CEnumZ SDL_GamepadButton
24, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_MISC5")
, (CInt
CEnumZ SDL_GamepadButton
25, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_MISC6")
, (CInt
CEnumZ SDL_GamepadButton
26, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_COUNT")
]
showsUndeclared :: forall (proxy :: * -> *).
proxy SDL_GamepadButton -> Int -> CEnumZ SDL_GamepadButton -> ShowS
showsUndeclared =
String
-> proxy SDL_GamepadButton
-> Int
-> CEnumZ SDL_GamepadButton
-> ShowS
forall a (proxy :: * -> *).
Show (CEnumZ a) =>
String -> proxy a -> Int -> CEnumZ a -> ShowS
CEnum.showsWrappedUndeclared String
"SDL_GamepadButton"
readPrecUndeclared :: ReadPrec SDL_GamepadButton
readPrecUndeclared =
String -> ReadPrec SDL_GamepadButton
forall a. (CEnum a, Read (CEnumZ a)) => String -> ReadPrec a
CEnum.readPrecWrappedUndeclared String
"SDL_GamepadButton"
isDeclared :: SDL_GamepadButton -> Bool
isDeclared = SDL_GamepadButton -> Bool
forall a. SequentialCEnum a => a -> Bool
CEnum.seqIsDeclared
mkDeclared :: CEnumZ SDL_GamepadButton -> Maybe SDL_GamepadButton
mkDeclared = CEnumZ SDL_GamepadButton -> Maybe SDL_GamepadButton
forall a. SequentialCEnum a => CEnumZ a -> Maybe a
CEnum.seqMkDeclared
instance CEnum.SequentialCEnum SDL_GamepadButton where
minDeclaredValue :: SDL_GamepadButton
minDeclaredValue = SDL_GamepadButton
SDL_GAMEPAD_BUTTON_INVALID
maxDeclaredValue :: SDL_GamepadButton
maxDeclaredValue = SDL_GamepadButton
SDL_GAMEPAD_BUTTON_COUNT
instance Show SDL_GamepadButton where
showsPrec :: Int -> SDL_GamepadButton -> ShowS
showsPrec = Int -> SDL_GamepadButton -> ShowS
forall a. CEnum a => Int -> a -> ShowS
CEnum.shows
instance Read SDL_GamepadButton where
readPrec :: ReadPrec SDL_GamepadButton
readPrec = ReadPrec SDL_GamepadButton
forall a. CEnum a => ReadPrec a
CEnum.readPrec
readList :: ReadS [SDL_GamepadButton]
readList = ReadS [SDL_GamepadButton]
forall a. Read a => ReadS [a]
BG.readListDefault
readListPrec :: ReadPrec [SDL_GamepadButton]
readListPrec = ReadPrec [SDL_GamepadButton]
forall a. Read a => ReadPrec [a]
BG.readListPrecDefault
instance
(ty ~ BG.CInt)
=> BG.CompatHasField.HasField "unwrap" SDL_GamepadButton ty
where
hasField :: SDL_GamepadButton -> (ty -> SDL_GamepadButton, ty)
hasField =
\SDL_GamepadButton
x0 ->
( \ty
y1 ->
SDL_GamepadButton{unwrap :: CInt
unwrap = ty
CInt
y1}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"unwrap" SDL_GamepadButton
x0
)
instance
(ty ~ BG.CInt)
=> BG.HasField "unwrap" (BG.Ptr SDL_GamepadButton) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadButton -> Ptr ty
getField = Proxy "unwrap"
-> Ptr SDL_GamepadButton
-> Ptr (CFieldType SDL_GamepadButton "unwrap")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"unwrap")
instance HasCField.HasCField SDL_GamepadButton "unwrap" where
type CFieldType SDL_GamepadButton "unwrap" = BG.CInt
offset# :: Proxy# SDL_GamepadButton -> Proxy# "unwrap" -> Int
offset# = \Proxy# SDL_GamepadButton
_ -> \Proxy# "unwrap"
_ -> Int
0
pattern SDL_GAMEPAD_BUTTON_INVALID :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_INVALID :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_INVALID :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_INVALID = SDL_GamepadButton (-1)
pattern SDL_GAMEPAD_BUTTON_SOUTH :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_SOUTH :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_SOUTH :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_SOUTH = SDL_GamepadButton 0
pattern SDL_GAMEPAD_BUTTON_EAST :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_EAST :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_EAST :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_EAST = SDL_GamepadButton 1
pattern SDL_GAMEPAD_BUTTON_WEST :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_WEST :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_WEST :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_WEST = SDL_GamepadButton 2
pattern SDL_GAMEPAD_BUTTON_NORTH :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_NORTH :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_NORTH :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_NORTH = SDL_GamepadButton 3
pattern SDL_GAMEPAD_BUTTON_BACK :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_BACK :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_BACK :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_BACK = SDL_GamepadButton 4
pattern SDL_GAMEPAD_BUTTON_GUIDE :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_GUIDE :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_GUIDE :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_GUIDE = SDL_GamepadButton 5
pattern SDL_GAMEPAD_BUTTON_START :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_START :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_START :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_START = SDL_GamepadButton 6
pattern SDL_GAMEPAD_BUTTON_LEFT_STICK :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_LEFT_STICK :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LEFT_STICK :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_LEFT_STICK = SDL_GamepadButton 7
pattern SDL_GAMEPAD_BUTTON_RIGHT_STICK :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_RIGHT_STICK :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_RIGHT_STICK :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_RIGHT_STICK = SDL_GamepadButton 8
pattern SDL_GAMEPAD_BUTTON_LEFT_SHOULDER :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_LEFT_SHOULDER :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LEFT_SHOULDER :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_LEFT_SHOULDER = SDL_GamepadButton 9
pattern SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_RIGHT_SHOULDER :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_RIGHT_SHOULDER :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER = SDL_GamepadButton 10
pattern SDL_GAMEPAD_BUTTON_DPAD_UP :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_DPAD_UP :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_DPAD_UP :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_DPAD_UP = SDL_GamepadButton 11
pattern SDL_GAMEPAD_BUTTON_DPAD_DOWN :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_DPAD_DOWN :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_DPAD_DOWN :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_DPAD_DOWN = SDL_GamepadButton 12
pattern SDL_GAMEPAD_BUTTON_DPAD_LEFT :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_DPAD_LEFT :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_DPAD_LEFT :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_DPAD_LEFT = SDL_GamepadButton 13
pattern SDL_GAMEPAD_BUTTON_DPAD_RIGHT :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_DPAD_RIGHT :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_DPAD_RIGHT :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_DPAD_RIGHT = SDL_GamepadButton 14
pattern SDL_GAMEPAD_BUTTON_MISC1 :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_MISC1 :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_MISC1 :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_MISC1 = SDL_GamepadButton 15
pattern SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1 :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_RIGHT_PADDLE1 :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_RIGHT_PADDLE1 :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1 = SDL_GamepadButton 16
pattern SDL_GAMEPAD_BUTTON_LEFT_PADDLE1 :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_LEFT_PADDLE1 :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LEFT_PADDLE1 :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_LEFT_PADDLE1 = SDL_GamepadButton 17
pattern SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2 :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_RIGHT_PADDLE2 :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_RIGHT_PADDLE2 :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2 = SDL_GamepadButton 18
pattern SDL_GAMEPAD_BUTTON_LEFT_PADDLE2 :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_LEFT_PADDLE2 :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LEFT_PADDLE2 :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_LEFT_PADDLE2 = SDL_GamepadButton 19
pattern SDL_GAMEPAD_BUTTON_TOUCHPAD :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_TOUCHPAD :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_TOUCHPAD :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_TOUCHPAD = SDL_GamepadButton 20
pattern SDL_GAMEPAD_BUTTON_MISC2 :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_MISC2 :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_MISC2 :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_MISC2 = SDL_GamepadButton 21
pattern SDL_GAMEPAD_BUTTON_MISC3 :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_MISC3 :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_MISC3 :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_MISC3 = SDL_GamepadButton 22
pattern SDL_GAMEPAD_BUTTON_MISC4 :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_MISC4 :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_MISC4 :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_MISC4 = SDL_GamepadButton 23
pattern SDL_GAMEPAD_BUTTON_MISC5 :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_MISC5 :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_MISC5 :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_MISC5 = SDL_GamepadButton 24
pattern SDL_GAMEPAD_BUTTON_MISC6 :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_MISC6 :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_MISC6 :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_MISC6 = SDL_GamepadButton 25
pattern SDL_GAMEPAD_BUTTON_COUNT :: SDL_GamepadButton
pattern $mSDL_GAMEPAD_BUTTON_COUNT :: forall {r}. SDL_GamepadButton -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_COUNT :: SDL_GamepadButton
SDL_GAMEPAD_BUTTON_COUNT = SDL_GamepadButton 26
newtype SDL_GamepadButtonLabel = SDL_GamepadButtonLabel
{ SDL_GamepadButtonLabel -> CUInt
unwrap :: BG.CUInt
}
deriving stock ((forall x. SDL_GamepadButtonLabel -> Rep SDL_GamepadButtonLabel x)
-> (forall x.
Rep SDL_GamepadButtonLabel x -> SDL_GamepadButtonLabel)
-> Generic SDL_GamepadButtonLabel
forall x. Rep SDL_GamepadButtonLabel x -> SDL_GamepadButtonLabel
forall x. SDL_GamepadButtonLabel -> Rep SDL_GamepadButtonLabel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SDL_GamepadButtonLabel -> Rep SDL_GamepadButtonLabel x
from :: forall x. SDL_GamepadButtonLabel -> Rep SDL_GamepadButtonLabel x
$cto :: forall x. Rep SDL_GamepadButtonLabel x -> SDL_GamepadButtonLabel
to :: forall x. Rep SDL_GamepadButtonLabel x -> SDL_GamepadButtonLabel
BG.Generic, SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
(SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool)
-> (SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool)
-> Eq SDL_GamepadButtonLabel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
== :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
$c/= :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
/= :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
Eq, Eq SDL_GamepadButtonLabel
Eq SDL_GamepadButtonLabel =>
(SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Ordering)
-> (SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool)
-> (SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool)
-> (SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool)
-> (SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool)
-> (SDL_GamepadButtonLabel
-> SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel)
-> (SDL_GamepadButtonLabel
-> SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel)
-> Ord SDL_GamepadButtonLabel
SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Ordering
SDL_GamepadButtonLabel
-> SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Ordering
compare :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Ordering
$c< :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
< :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
$c<= :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
<= :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
$c> :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
> :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
$c>= :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
>= :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool
$cmax :: SDL_GamepadButtonLabel
-> SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel
max :: SDL_GamepadButtonLabel
-> SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel
$cmin :: SDL_GamepadButtonLabel
-> SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel
min :: SDL_GamepadButtonLabel
-> SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel
Ord)
deriving newtype (FFIType SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel
SDL_GamepadButtonLabel -> FFIType SDL_GamepadButtonLabel
(SDL_GamepadButtonLabel -> FFIType SDL_GamepadButtonLabel)
-> (FFIType SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel)
-> HasFFIType SDL_GamepadButtonLabel
forall a. (a -> FFIType a) -> (FFIType a -> a) -> HasFFIType a
$ctoFFIType :: SDL_GamepadButtonLabel -> FFIType SDL_GamepadButtonLabel
toFFIType :: SDL_GamepadButtonLabel -> FFIType SDL_GamepadButtonLabel
$cfromFFIType :: FFIType SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel
fromFFIType :: FFIType SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel
BG.HasFFIType)
instance Marshal.StaticSize SDL_GamepadButtonLabel where
staticSizeOf :: Proxy SDL_GamepadButtonLabel -> Int
staticSizeOf = \Proxy SDL_GamepadButtonLabel
_ -> (Int
4 :: Int)
staticAlignment :: Proxy SDL_GamepadButtonLabel -> Int
staticAlignment = \Proxy SDL_GamepadButtonLabel
_ -> (Int
4 :: Int)
instance Marshal.ReadRaw SDL_GamepadButtonLabel where
readRaw :: Ptr SDL_GamepadButtonLabel -> IO SDL_GamepadButtonLabel
readRaw =
\Ptr SDL_GamepadButtonLabel
ptr0 ->
(CUInt -> SDL_GamepadButtonLabel)
-> IO (CUInt -> SDL_GamepadButtonLabel)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CUInt -> SDL_GamepadButtonLabel
SDL_GamepadButtonLabel
IO (CUInt -> SDL_GamepadButtonLabel)
-> IO CUInt -> IO SDL_GamepadButtonLabel
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Ptr SDL_GamepadButtonLabel -> Int -> IO CUInt
forall a b. ReadRaw a => Ptr b -> Int -> IO a
Marshal.readRawByteOff Ptr SDL_GamepadButtonLabel
ptr0 (Int
0 :: Int)
instance Marshal.WriteRaw SDL_GamepadButtonLabel where
writeRaw :: Ptr SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> IO ()
writeRaw =
\Ptr SDL_GamepadButtonLabel
ptr0 ->
\SDL_GamepadButtonLabel
s1 ->
case SDL_GamepadButtonLabel
s1 of
SDL_GamepadButtonLabel CUInt
unwrap2 ->
Ptr SDL_GamepadButtonLabel -> Int -> CUInt -> IO ()
forall a b. WriteRaw a => Ptr b -> Int -> a -> IO ()
Marshal.writeRawByteOff Ptr SDL_GamepadButtonLabel
ptr0 (Int
0 :: Int) CUInt
unwrap2
deriving via
Marshal.EquivStorable SDL_GamepadButtonLabel
instance
BG.Storable SDL_GamepadButtonLabel
deriving via BG.CUInt instance BG.Prim SDL_GamepadButtonLabel
instance CEnum.CEnum SDL_GamepadButtonLabel where
type CEnumZ SDL_GamepadButtonLabel = BG.CUInt
toCEnum :: CEnumZ SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel
toCEnum = CUInt -> SDL_GamepadButtonLabel
CEnumZ SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel
SDL_GamepadButtonLabel
fromCEnum :: SDL_GamepadButtonLabel -> CEnumZ SDL_GamepadButtonLabel
fromCEnum = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"unwrap"
declaredValues :: forall (proxy :: * -> *).
proxy SDL_GamepadButtonLabel
-> DeclaredValues SDL_GamepadButtonLabel
declaredValues =
\proxy SDL_GamepadButtonLabel
_ ->
[(CEnumZ SDL_GamepadButtonLabel, NonEmpty String)]
-> DeclaredValues SDL_GamepadButtonLabel
forall a.
Ord (CEnumZ a) =>
[(CEnumZ a, NonEmpty String)] -> DeclaredValues a
CEnum.declaredValuesFromList
[ (CUInt
CEnumZ SDL_GamepadButtonLabel
0, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN")
, (CUInt
CEnumZ SDL_GamepadButtonLabel
1, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LABEL_A")
, (CUInt
CEnumZ SDL_GamepadButtonLabel
2, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LABEL_B")
, (CUInt
CEnumZ SDL_GamepadButtonLabel
3, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LABEL_X")
, (CUInt
CEnumZ SDL_GamepadButtonLabel
4, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LABEL_Y")
, (CUInt
CEnumZ SDL_GamepadButtonLabel
5, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LABEL_CROSS")
, (CUInt
CEnumZ SDL_GamepadButtonLabel
6, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LABEL_CIRCLE")
, (CUInt
CEnumZ SDL_GamepadButtonLabel
7, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LABEL_SQUARE")
, (CUInt
CEnumZ SDL_GamepadButtonLabel
8, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE")
]
showsUndeclared :: forall (proxy :: * -> *).
proxy SDL_GamepadButtonLabel
-> Int -> CEnumZ SDL_GamepadButtonLabel -> ShowS
showsUndeclared =
String
-> proxy SDL_GamepadButtonLabel
-> Int
-> CEnumZ SDL_GamepadButtonLabel
-> ShowS
forall a (proxy :: * -> *).
Show (CEnumZ a) =>
String -> proxy a -> Int -> CEnumZ a -> ShowS
CEnum.showsWrappedUndeclared String
"SDL_GamepadButtonLabel"
readPrecUndeclared :: ReadPrec SDL_GamepadButtonLabel
readPrecUndeclared =
String -> ReadPrec SDL_GamepadButtonLabel
forall a. (CEnum a, Read (CEnumZ a)) => String -> ReadPrec a
CEnum.readPrecWrappedUndeclared String
"SDL_GamepadButtonLabel"
isDeclared :: SDL_GamepadButtonLabel -> Bool
isDeclared = SDL_GamepadButtonLabel -> Bool
forall a. SequentialCEnum a => a -> Bool
CEnum.seqIsDeclared
mkDeclared :: CEnumZ SDL_GamepadButtonLabel -> Maybe SDL_GamepadButtonLabel
mkDeclared = CEnumZ SDL_GamepadButtonLabel -> Maybe SDL_GamepadButtonLabel
forall a. SequentialCEnum a => CEnumZ a -> Maybe a
CEnum.seqMkDeclared
instance CEnum.SequentialCEnum SDL_GamepadButtonLabel where
minDeclaredValue :: SDL_GamepadButtonLabel
minDeclaredValue = SDL_GamepadButtonLabel
SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN
maxDeclaredValue :: SDL_GamepadButtonLabel
maxDeclaredValue = SDL_GamepadButtonLabel
SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE
instance Show SDL_GamepadButtonLabel where
showsPrec :: Int -> SDL_GamepadButtonLabel -> ShowS
showsPrec = Int -> SDL_GamepadButtonLabel -> ShowS
forall a. CEnum a => Int -> a -> ShowS
CEnum.shows
instance Read SDL_GamepadButtonLabel where
readPrec :: ReadPrec SDL_GamepadButtonLabel
readPrec = ReadPrec SDL_GamepadButtonLabel
forall a. CEnum a => ReadPrec a
CEnum.readPrec
readList :: ReadS [SDL_GamepadButtonLabel]
readList = ReadS [SDL_GamepadButtonLabel]
forall a. Read a => ReadS [a]
BG.readListDefault
readListPrec :: ReadPrec [SDL_GamepadButtonLabel]
readListPrec = ReadPrec [SDL_GamepadButtonLabel]
forall a. Read a => ReadPrec [a]
BG.readListPrecDefault
instance
(ty ~ BG.CUInt)
=> BG.CompatHasField.HasField "unwrap" SDL_GamepadButtonLabel ty
where
hasField :: SDL_GamepadButtonLabel -> (ty -> SDL_GamepadButtonLabel, ty)
hasField =
\SDL_GamepadButtonLabel
x0 ->
( \ty
y1 ->
SDL_GamepadButtonLabel{unwrap :: CUInt
unwrap = ty
CUInt
y1}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"unwrap" SDL_GamepadButtonLabel
x0
)
instance
(ty ~ BG.CUInt)
=> BG.HasField "unwrap" (BG.Ptr SDL_GamepadButtonLabel) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadButtonLabel -> Ptr ty
getField = Proxy "unwrap"
-> Ptr SDL_GamepadButtonLabel
-> Ptr (CFieldType SDL_GamepadButtonLabel "unwrap")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"unwrap")
instance HasCField.HasCField SDL_GamepadButtonLabel "unwrap" where
type
CFieldType SDL_GamepadButtonLabel "unwrap" =
BG.CUInt
offset# :: Proxy# SDL_GamepadButtonLabel -> Proxy# "unwrap" -> Int
offset# = \Proxy# SDL_GamepadButtonLabel
_ -> \Proxy# "unwrap"
_ -> Int
0
pattern SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN :: SDL_GamepadButtonLabel
pattern $mSDL_GAMEPAD_BUTTON_LABEL_UNKNOWN :: forall {r}.
SDL_GamepadButtonLabel -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LABEL_UNKNOWN :: SDL_GamepadButtonLabel
SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN = SDL_GamepadButtonLabel 0
pattern SDL_GAMEPAD_BUTTON_LABEL_A :: SDL_GamepadButtonLabel
pattern $mSDL_GAMEPAD_BUTTON_LABEL_A :: forall {r}.
SDL_GamepadButtonLabel -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LABEL_A :: SDL_GamepadButtonLabel
SDL_GAMEPAD_BUTTON_LABEL_A = SDL_GamepadButtonLabel 1
pattern SDL_GAMEPAD_BUTTON_LABEL_B :: SDL_GamepadButtonLabel
pattern $mSDL_GAMEPAD_BUTTON_LABEL_B :: forall {r}.
SDL_GamepadButtonLabel -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LABEL_B :: SDL_GamepadButtonLabel
SDL_GAMEPAD_BUTTON_LABEL_B = SDL_GamepadButtonLabel 2
pattern SDL_GAMEPAD_BUTTON_LABEL_X :: SDL_GamepadButtonLabel
pattern $mSDL_GAMEPAD_BUTTON_LABEL_X :: forall {r}.
SDL_GamepadButtonLabel -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LABEL_X :: SDL_GamepadButtonLabel
SDL_GAMEPAD_BUTTON_LABEL_X = SDL_GamepadButtonLabel 3
pattern SDL_GAMEPAD_BUTTON_LABEL_Y :: SDL_GamepadButtonLabel
pattern $mSDL_GAMEPAD_BUTTON_LABEL_Y :: forall {r}.
SDL_GamepadButtonLabel -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LABEL_Y :: SDL_GamepadButtonLabel
SDL_GAMEPAD_BUTTON_LABEL_Y = SDL_GamepadButtonLabel 4
pattern SDL_GAMEPAD_BUTTON_LABEL_CROSS :: SDL_GamepadButtonLabel
pattern $mSDL_GAMEPAD_BUTTON_LABEL_CROSS :: forall {r}.
SDL_GamepadButtonLabel -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LABEL_CROSS :: SDL_GamepadButtonLabel
SDL_GAMEPAD_BUTTON_LABEL_CROSS = SDL_GamepadButtonLabel 5
pattern SDL_GAMEPAD_BUTTON_LABEL_CIRCLE :: SDL_GamepadButtonLabel
pattern $mSDL_GAMEPAD_BUTTON_LABEL_CIRCLE :: forall {r}.
SDL_GamepadButtonLabel -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LABEL_CIRCLE :: SDL_GamepadButtonLabel
SDL_GAMEPAD_BUTTON_LABEL_CIRCLE = SDL_GamepadButtonLabel 6
pattern SDL_GAMEPAD_BUTTON_LABEL_SQUARE :: SDL_GamepadButtonLabel
pattern $mSDL_GAMEPAD_BUTTON_LABEL_SQUARE :: forall {r}.
SDL_GamepadButtonLabel -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LABEL_SQUARE :: SDL_GamepadButtonLabel
SDL_GAMEPAD_BUTTON_LABEL_SQUARE = SDL_GamepadButtonLabel 7
pattern SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE :: SDL_GamepadButtonLabel
pattern $mSDL_GAMEPAD_BUTTON_LABEL_TRIANGLE :: forall {r}.
SDL_GamepadButtonLabel -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BUTTON_LABEL_TRIANGLE :: SDL_GamepadButtonLabel
SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE = SDL_GamepadButtonLabel 8
newtype SDL_GamepadAxis = SDL_GamepadAxis
{ SDL_GamepadAxis -> CInt
unwrap :: BG.CInt
}
deriving stock ((forall x. SDL_GamepadAxis -> Rep SDL_GamepadAxis x)
-> (forall x. Rep SDL_GamepadAxis x -> SDL_GamepadAxis)
-> Generic SDL_GamepadAxis
forall x. Rep SDL_GamepadAxis x -> SDL_GamepadAxis
forall x. SDL_GamepadAxis -> Rep SDL_GamepadAxis x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SDL_GamepadAxis -> Rep SDL_GamepadAxis x
from :: forall x. SDL_GamepadAxis -> Rep SDL_GamepadAxis x
$cto :: forall x. Rep SDL_GamepadAxis x -> SDL_GamepadAxis
to :: forall x. Rep SDL_GamepadAxis x -> SDL_GamepadAxis
BG.Generic, SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
(SDL_GamepadAxis -> SDL_GamepadAxis -> Bool)
-> (SDL_GamepadAxis -> SDL_GamepadAxis -> Bool)
-> Eq SDL_GamepadAxis
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
== :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
$c/= :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
/= :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
Eq, Eq SDL_GamepadAxis
Eq SDL_GamepadAxis =>
(SDL_GamepadAxis -> SDL_GamepadAxis -> Ordering)
-> (SDL_GamepadAxis -> SDL_GamepadAxis -> Bool)
-> (SDL_GamepadAxis -> SDL_GamepadAxis -> Bool)
-> (SDL_GamepadAxis -> SDL_GamepadAxis -> Bool)
-> (SDL_GamepadAxis -> SDL_GamepadAxis -> Bool)
-> (SDL_GamepadAxis -> SDL_GamepadAxis -> SDL_GamepadAxis)
-> (SDL_GamepadAxis -> SDL_GamepadAxis -> SDL_GamepadAxis)
-> Ord SDL_GamepadAxis
SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
SDL_GamepadAxis -> SDL_GamepadAxis -> Ordering
SDL_GamepadAxis -> SDL_GamepadAxis -> SDL_GamepadAxis
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SDL_GamepadAxis -> SDL_GamepadAxis -> Ordering
compare :: SDL_GamepadAxis -> SDL_GamepadAxis -> Ordering
$c< :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
< :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
$c<= :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
<= :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
$c> :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
> :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
$c>= :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
>= :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool
$cmax :: SDL_GamepadAxis -> SDL_GamepadAxis -> SDL_GamepadAxis
max :: SDL_GamepadAxis -> SDL_GamepadAxis -> SDL_GamepadAxis
$cmin :: SDL_GamepadAxis -> SDL_GamepadAxis -> SDL_GamepadAxis
min :: SDL_GamepadAxis -> SDL_GamepadAxis -> SDL_GamepadAxis
Ord)
deriving newtype (FFIType SDL_GamepadAxis -> SDL_GamepadAxis
SDL_GamepadAxis -> FFIType SDL_GamepadAxis
(SDL_GamepadAxis -> FFIType SDL_GamepadAxis)
-> (FFIType SDL_GamepadAxis -> SDL_GamepadAxis)
-> HasFFIType SDL_GamepadAxis
forall a. (a -> FFIType a) -> (FFIType a -> a) -> HasFFIType a
$ctoFFIType :: SDL_GamepadAxis -> FFIType SDL_GamepadAxis
toFFIType :: SDL_GamepadAxis -> FFIType SDL_GamepadAxis
$cfromFFIType :: FFIType SDL_GamepadAxis -> SDL_GamepadAxis
fromFFIType :: FFIType SDL_GamepadAxis -> SDL_GamepadAxis
BG.HasFFIType)
instance Marshal.StaticSize SDL_GamepadAxis where
staticSizeOf :: Proxy SDL_GamepadAxis -> Int
staticSizeOf = \Proxy SDL_GamepadAxis
_ -> (Int
4 :: Int)
staticAlignment :: Proxy SDL_GamepadAxis -> Int
staticAlignment = \Proxy SDL_GamepadAxis
_ -> (Int
4 :: Int)
instance Marshal.ReadRaw SDL_GamepadAxis where
readRaw :: Ptr SDL_GamepadAxis -> IO SDL_GamepadAxis
readRaw =
\Ptr SDL_GamepadAxis
ptr0 ->
(CInt -> SDL_GamepadAxis) -> IO (CInt -> SDL_GamepadAxis)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CInt -> SDL_GamepadAxis
SDL_GamepadAxis
IO (CInt -> SDL_GamepadAxis) -> IO CInt -> IO SDL_GamepadAxis
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Ptr SDL_GamepadAxis -> Int -> IO CInt
forall a b. ReadRaw a => Ptr b -> Int -> IO a
Marshal.readRawByteOff Ptr SDL_GamepadAxis
ptr0 (Int
0 :: Int)
instance Marshal.WriteRaw SDL_GamepadAxis where
writeRaw :: Ptr SDL_GamepadAxis -> SDL_GamepadAxis -> IO ()
writeRaw =
\Ptr SDL_GamepadAxis
ptr0 ->
\SDL_GamepadAxis
s1 ->
case SDL_GamepadAxis
s1 of
SDL_GamepadAxis CInt
unwrap2 ->
Ptr SDL_GamepadAxis -> Int -> CInt -> IO ()
forall a b. WriteRaw a => Ptr b -> Int -> a -> IO ()
Marshal.writeRawByteOff Ptr SDL_GamepadAxis
ptr0 (Int
0 :: Int) CInt
unwrap2
deriving via Marshal.EquivStorable SDL_GamepadAxis instance BG.Storable SDL_GamepadAxis
deriving via BG.CInt instance BG.Prim SDL_GamepadAxis
instance CEnum.CEnum SDL_GamepadAxis where
type CEnumZ SDL_GamepadAxis = BG.CInt
toCEnum :: CEnumZ SDL_GamepadAxis -> SDL_GamepadAxis
toCEnum = CInt -> SDL_GamepadAxis
CEnumZ SDL_GamepadAxis -> SDL_GamepadAxis
SDL_GamepadAxis
fromCEnum :: SDL_GamepadAxis -> CEnumZ SDL_GamepadAxis
fromCEnum = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"unwrap"
declaredValues :: forall (proxy :: * -> *).
proxy SDL_GamepadAxis -> DeclaredValues SDL_GamepadAxis
declaredValues =
\proxy SDL_GamepadAxis
_ ->
[(CEnumZ SDL_GamepadAxis, NonEmpty String)]
-> DeclaredValues SDL_GamepadAxis
forall a.
Ord (CEnumZ a) =>
[(CEnumZ a, NonEmpty String)] -> DeclaredValues a
CEnum.declaredValuesFromList
[ (-CInt
1, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_AXIS_INVALID")
, (CInt
CEnumZ SDL_GamepadAxis
0, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_AXIS_LEFTX")
, (CInt
CEnumZ SDL_GamepadAxis
1, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_AXIS_LEFTY")
, (CInt
CEnumZ SDL_GamepadAxis
2, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_AXIS_RIGHTX")
, (CInt
CEnumZ SDL_GamepadAxis
3, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_AXIS_RIGHTY")
, (CInt
CEnumZ SDL_GamepadAxis
4, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_AXIS_LEFT_TRIGGER")
, (CInt
CEnumZ SDL_GamepadAxis
5, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_AXIS_RIGHT_TRIGGER")
, (CInt
CEnumZ SDL_GamepadAxis
6, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_AXIS_COUNT")
]
showsUndeclared :: forall (proxy :: * -> *).
proxy SDL_GamepadAxis -> Int -> CEnumZ SDL_GamepadAxis -> ShowS
showsUndeclared =
String
-> proxy SDL_GamepadAxis -> Int -> CEnumZ SDL_GamepadAxis -> ShowS
forall a (proxy :: * -> *).
Show (CEnumZ a) =>
String -> proxy a -> Int -> CEnumZ a -> ShowS
CEnum.showsWrappedUndeclared String
"SDL_GamepadAxis"
readPrecUndeclared :: ReadPrec SDL_GamepadAxis
readPrecUndeclared =
String -> ReadPrec SDL_GamepadAxis
forall a. (CEnum a, Read (CEnumZ a)) => String -> ReadPrec a
CEnum.readPrecWrappedUndeclared String
"SDL_GamepadAxis"
isDeclared :: SDL_GamepadAxis -> Bool
isDeclared = SDL_GamepadAxis -> Bool
forall a. SequentialCEnum a => a -> Bool
CEnum.seqIsDeclared
mkDeclared :: CEnumZ SDL_GamepadAxis -> Maybe SDL_GamepadAxis
mkDeclared = CEnumZ SDL_GamepadAxis -> Maybe SDL_GamepadAxis
forall a. SequentialCEnum a => CEnumZ a -> Maybe a
CEnum.seqMkDeclared
instance CEnum.SequentialCEnum SDL_GamepadAxis where
minDeclaredValue :: SDL_GamepadAxis
minDeclaredValue = SDL_GamepadAxis
SDL_GAMEPAD_AXIS_INVALID
maxDeclaredValue :: SDL_GamepadAxis
maxDeclaredValue = SDL_GamepadAxis
SDL_GAMEPAD_AXIS_COUNT
instance Show SDL_GamepadAxis where
showsPrec :: Int -> SDL_GamepadAxis -> ShowS
showsPrec = Int -> SDL_GamepadAxis -> ShowS
forall a. CEnum a => Int -> a -> ShowS
CEnum.shows
instance Read SDL_GamepadAxis where
readPrec :: ReadPrec SDL_GamepadAxis
readPrec = ReadPrec SDL_GamepadAxis
forall a. CEnum a => ReadPrec a
CEnum.readPrec
readList :: ReadS [SDL_GamepadAxis]
readList = ReadS [SDL_GamepadAxis]
forall a. Read a => ReadS [a]
BG.readListDefault
readListPrec :: ReadPrec [SDL_GamepadAxis]
readListPrec = ReadPrec [SDL_GamepadAxis]
forall a. Read a => ReadPrec [a]
BG.readListPrecDefault
instance
(ty ~ BG.CInt)
=> BG.CompatHasField.HasField "unwrap" SDL_GamepadAxis ty
where
hasField :: SDL_GamepadAxis -> (ty -> SDL_GamepadAxis, ty)
hasField =
\SDL_GamepadAxis
x0 ->
( \ty
y1 ->
SDL_GamepadAxis{unwrap :: CInt
unwrap = ty
CInt
y1}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"unwrap" SDL_GamepadAxis
x0
)
instance
(ty ~ BG.CInt)
=> BG.HasField "unwrap" (BG.Ptr SDL_GamepadAxis) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadAxis -> Ptr ty
getField = Proxy "unwrap"
-> Ptr SDL_GamepadAxis -> Ptr (CFieldType SDL_GamepadAxis "unwrap")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"unwrap")
instance HasCField.HasCField SDL_GamepadAxis "unwrap" where
type CFieldType SDL_GamepadAxis "unwrap" = BG.CInt
offset# :: Proxy# SDL_GamepadAxis -> Proxy# "unwrap" -> Int
offset# = \Proxy# SDL_GamepadAxis
_ -> \Proxy# "unwrap"
_ -> Int
0
pattern SDL_GAMEPAD_AXIS_INVALID :: SDL_GamepadAxis
pattern $mSDL_GAMEPAD_AXIS_INVALID :: forall {r}. SDL_GamepadAxis -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_AXIS_INVALID :: SDL_GamepadAxis
SDL_GAMEPAD_AXIS_INVALID = SDL_GamepadAxis (-1)
pattern SDL_GAMEPAD_AXIS_LEFTX :: SDL_GamepadAxis
pattern $mSDL_GAMEPAD_AXIS_LEFTX :: forall {r}. SDL_GamepadAxis -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_AXIS_LEFTX :: SDL_GamepadAxis
SDL_GAMEPAD_AXIS_LEFTX = SDL_GamepadAxis 0
pattern SDL_GAMEPAD_AXIS_LEFTY :: SDL_GamepadAxis
pattern $mSDL_GAMEPAD_AXIS_LEFTY :: forall {r}. SDL_GamepadAxis -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_AXIS_LEFTY :: SDL_GamepadAxis
SDL_GAMEPAD_AXIS_LEFTY = SDL_GamepadAxis 1
pattern SDL_GAMEPAD_AXIS_RIGHTX :: SDL_GamepadAxis
pattern $mSDL_GAMEPAD_AXIS_RIGHTX :: forall {r}. SDL_GamepadAxis -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_AXIS_RIGHTX :: SDL_GamepadAxis
SDL_GAMEPAD_AXIS_RIGHTX = SDL_GamepadAxis 2
pattern SDL_GAMEPAD_AXIS_RIGHTY :: SDL_GamepadAxis
pattern $mSDL_GAMEPAD_AXIS_RIGHTY :: forall {r}. SDL_GamepadAxis -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_AXIS_RIGHTY :: SDL_GamepadAxis
SDL_GAMEPAD_AXIS_RIGHTY = SDL_GamepadAxis 3
pattern SDL_GAMEPAD_AXIS_LEFT_TRIGGER :: SDL_GamepadAxis
pattern $mSDL_GAMEPAD_AXIS_LEFT_TRIGGER :: forall {r}. SDL_GamepadAxis -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_AXIS_LEFT_TRIGGER :: SDL_GamepadAxis
SDL_GAMEPAD_AXIS_LEFT_TRIGGER = SDL_GamepadAxis 4
pattern SDL_GAMEPAD_AXIS_RIGHT_TRIGGER :: SDL_GamepadAxis
pattern $mSDL_GAMEPAD_AXIS_RIGHT_TRIGGER :: forall {r}. SDL_GamepadAxis -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_AXIS_RIGHT_TRIGGER :: SDL_GamepadAxis
SDL_GAMEPAD_AXIS_RIGHT_TRIGGER = SDL_GamepadAxis 5
pattern SDL_GAMEPAD_AXIS_COUNT :: SDL_GamepadAxis
pattern $mSDL_GAMEPAD_AXIS_COUNT :: forall {r}. SDL_GamepadAxis -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_AXIS_COUNT :: SDL_GamepadAxis
SDL_GAMEPAD_AXIS_COUNT = SDL_GamepadAxis 6
newtype SDL_GamepadBindingType = SDL_GamepadBindingType
{ SDL_GamepadBindingType -> CUInt
unwrap :: BG.CUInt
}
deriving stock ((forall x. SDL_GamepadBindingType -> Rep SDL_GamepadBindingType x)
-> (forall x.
Rep SDL_GamepadBindingType x -> SDL_GamepadBindingType)
-> Generic SDL_GamepadBindingType
forall x. Rep SDL_GamepadBindingType x -> SDL_GamepadBindingType
forall x. SDL_GamepadBindingType -> Rep SDL_GamepadBindingType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SDL_GamepadBindingType -> Rep SDL_GamepadBindingType x
from :: forall x. SDL_GamepadBindingType -> Rep SDL_GamepadBindingType x
$cto :: forall x. Rep SDL_GamepadBindingType x -> SDL_GamepadBindingType
to :: forall x. Rep SDL_GamepadBindingType x -> SDL_GamepadBindingType
BG.Generic, SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
(SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool)
-> (SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool)
-> Eq SDL_GamepadBindingType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
== :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
$c/= :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
/= :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
Eq, Eq SDL_GamepadBindingType
Eq SDL_GamepadBindingType =>
(SDL_GamepadBindingType -> SDL_GamepadBindingType -> Ordering)
-> (SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool)
-> (SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool)
-> (SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool)
-> (SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool)
-> (SDL_GamepadBindingType
-> SDL_GamepadBindingType -> SDL_GamepadBindingType)
-> (SDL_GamepadBindingType
-> SDL_GamepadBindingType -> SDL_GamepadBindingType)
-> Ord SDL_GamepadBindingType
SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
SDL_GamepadBindingType -> SDL_GamepadBindingType -> Ordering
SDL_GamepadBindingType
-> SDL_GamepadBindingType -> SDL_GamepadBindingType
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Ordering
compare :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Ordering
$c< :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
< :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
$c<= :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
<= :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
$c> :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
> :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
$c>= :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
>= :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool
$cmax :: SDL_GamepadBindingType
-> SDL_GamepadBindingType -> SDL_GamepadBindingType
max :: SDL_GamepadBindingType
-> SDL_GamepadBindingType -> SDL_GamepadBindingType
$cmin :: SDL_GamepadBindingType
-> SDL_GamepadBindingType -> SDL_GamepadBindingType
min :: SDL_GamepadBindingType
-> SDL_GamepadBindingType -> SDL_GamepadBindingType
Ord)
deriving newtype (FFIType SDL_GamepadBindingType -> SDL_GamepadBindingType
SDL_GamepadBindingType -> FFIType SDL_GamepadBindingType
(SDL_GamepadBindingType -> FFIType SDL_GamepadBindingType)
-> (FFIType SDL_GamepadBindingType -> SDL_GamepadBindingType)
-> HasFFIType SDL_GamepadBindingType
forall a. (a -> FFIType a) -> (FFIType a -> a) -> HasFFIType a
$ctoFFIType :: SDL_GamepadBindingType -> FFIType SDL_GamepadBindingType
toFFIType :: SDL_GamepadBindingType -> FFIType SDL_GamepadBindingType
$cfromFFIType :: FFIType SDL_GamepadBindingType -> SDL_GamepadBindingType
fromFFIType :: FFIType SDL_GamepadBindingType -> SDL_GamepadBindingType
BG.HasFFIType)
instance Marshal.StaticSize SDL_GamepadBindingType where
staticSizeOf :: Proxy SDL_GamepadBindingType -> Int
staticSizeOf = \Proxy SDL_GamepadBindingType
_ -> (Int
4 :: Int)
staticAlignment :: Proxy SDL_GamepadBindingType -> Int
staticAlignment = \Proxy SDL_GamepadBindingType
_ -> (Int
4 :: Int)
instance Marshal.ReadRaw SDL_GamepadBindingType where
readRaw :: Ptr SDL_GamepadBindingType -> IO SDL_GamepadBindingType
readRaw =
\Ptr SDL_GamepadBindingType
ptr0 ->
(CUInt -> SDL_GamepadBindingType)
-> IO (CUInt -> SDL_GamepadBindingType)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CUInt -> SDL_GamepadBindingType
SDL_GamepadBindingType
IO (CUInt -> SDL_GamepadBindingType)
-> IO CUInt -> IO SDL_GamepadBindingType
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Ptr SDL_GamepadBindingType -> Int -> IO CUInt
forall a b. ReadRaw a => Ptr b -> Int -> IO a
Marshal.readRawByteOff Ptr SDL_GamepadBindingType
ptr0 (Int
0 :: Int)
instance Marshal.WriteRaw SDL_GamepadBindingType where
writeRaw :: Ptr SDL_GamepadBindingType -> SDL_GamepadBindingType -> IO ()
writeRaw =
\Ptr SDL_GamepadBindingType
ptr0 ->
\SDL_GamepadBindingType
s1 ->
case SDL_GamepadBindingType
s1 of
SDL_GamepadBindingType CUInt
unwrap2 ->
Ptr SDL_GamepadBindingType -> Int -> CUInt -> IO ()
forall a b. WriteRaw a => Ptr b -> Int -> a -> IO ()
Marshal.writeRawByteOff Ptr SDL_GamepadBindingType
ptr0 (Int
0 :: Int) CUInt
unwrap2
deriving via
Marshal.EquivStorable SDL_GamepadBindingType
instance
BG.Storable SDL_GamepadBindingType
deriving via BG.CUInt instance BG.Prim SDL_GamepadBindingType
instance CEnum.CEnum SDL_GamepadBindingType where
type CEnumZ SDL_GamepadBindingType = BG.CUInt
toCEnum :: CEnumZ SDL_GamepadBindingType -> SDL_GamepadBindingType
toCEnum = CUInt -> SDL_GamepadBindingType
CEnumZ SDL_GamepadBindingType -> SDL_GamepadBindingType
SDL_GamepadBindingType
fromCEnum :: SDL_GamepadBindingType -> CEnumZ SDL_GamepadBindingType
fromCEnum = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"unwrap"
declaredValues :: forall (proxy :: * -> *).
proxy SDL_GamepadBindingType
-> DeclaredValues SDL_GamepadBindingType
declaredValues =
\proxy SDL_GamepadBindingType
_ ->
[(CEnumZ SDL_GamepadBindingType, NonEmpty String)]
-> DeclaredValues SDL_GamepadBindingType
forall a.
Ord (CEnumZ a) =>
[(CEnumZ a, NonEmpty String)] -> DeclaredValues a
CEnum.declaredValuesFromList
[ (CUInt
CEnumZ SDL_GamepadBindingType
0, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BINDTYPE_NONE")
, (CUInt
CEnumZ SDL_GamepadBindingType
1, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BINDTYPE_BUTTON")
, (CUInt
CEnumZ SDL_GamepadBindingType
2, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BINDTYPE_AXIS")
, (CUInt
CEnumZ SDL_GamepadBindingType
3, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_GAMEPAD_BINDTYPE_HAT")
]
showsUndeclared :: forall (proxy :: * -> *).
proxy SDL_GamepadBindingType
-> Int -> CEnumZ SDL_GamepadBindingType -> ShowS
showsUndeclared =
String
-> proxy SDL_GamepadBindingType
-> Int
-> CEnumZ SDL_GamepadBindingType
-> ShowS
forall a (proxy :: * -> *).
Show (CEnumZ a) =>
String -> proxy a -> Int -> CEnumZ a -> ShowS
CEnum.showsWrappedUndeclared String
"SDL_GamepadBindingType"
readPrecUndeclared :: ReadPrec SDL_GamepadBindingType
readPrecUndeclared =
String -> ReadPrec SDL_GamepadBindingType
forall a. (CEnum a, Read (CEnumZ a)) => String -> ReadPrec a
CEnum.readPrecWrappedUndeclared String
"SDL_GamepadBindingType"
isDeclared :: SDL_GamepadBindingType -> Bool
isDeclared = SDL_GamepadBindingType -> Bool
forall a. SequentialCEnum a => a -> Bool
CEnum.seqIsDeclared
mkDeclared :: CEnumZ SDL_GamepadBindingType -> Maybe SDL_GamepadBindingType
mkDeclared = CEnumZ SDL_GamepadBindingType -> Maybe SDL_GamepadBindingType
forall a. SequentialCEnum a => CEnumZ a -> Maybe a
CEnum.seqMkDeclared
instance CEnum.SequentialCEnum SDL_GamepadBindingType where
minDeclaredValue :: SDL_GamepadBindingType
minDeclaredValue = SDL_GamepadBindingType
SDL_GAMEPAD_BINDTYPE_NONE
maxDeclaredValue :: SDL_GamepadBindingType
maxDeclaredValue = SDL_GamepadBindingType
SDL_GAMEPAD_BINDTYPE_HAT
instance Show SDL_GamepadBindingType where
showsPrec :: Int -> SDL_GamepadBindingType -> ShowS
showsPrec = Int -> SDL_GamepadBindingType -> ShowS
forall a. CEnum a => Int -> a -> ShowS
CEnum.shows
instance Read SDL_GamepadBindingType where
readPrec :: ReadPrec SDL_GamepadBindingType
readPrec = ReadPrec SDL_GamepadBindingType
forall a. CEnum a => ReadPrec a
CEnum.readPrec
readList :: ReadS [SDL_GamepadBindingType]
readList = ReadS [SDL_GamepadBindingType]
forall a. Read a => ReadS [a]
BG.readListDefault
readListPrec :: ReadPrec [SDL_GamepadBindingType]
readListPrec = ReadPrec [SDL_GamepadBindingType]
forall a. Read a => ReadPrec [a]
BG.readListPrecDefault
instance
(ty ~ BG.CUInt)
=> BG.CompatHasField.HasField "unwrap" SDL_GamepadBindingType ty
where
hasField :: SDL_GamepadBindingType -> (ty -> SDL_GamepadBindingType, ty)
hasField =
\SDL_GamepadBindingType
x0 ->
( \ty
y1 ->
SDL_GamepadBindingType{unwrap :: CUInt
unwrap = ty
CUInt
y1}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"unwrap" SDL_GamepadBindingType
x0
)
instance
(ty ~ BG.CUInt)
=> BG.HasField "unwrap" (BG.Ptr SDL_GamepadBindingType) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBindingType -> Ptr ty
getField = Proxy "unwrap"
-> Ptr SDL_GamepadBindingType
-> Ptr (CFieldType SDL_GamepadBindingType "unwrap")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"unwrap")
instance HasCField.HasCField SDL_GamepadBindingType "unwrap" where
type
CFieldType SDL_GamepadBindingType "unwrap" =
BG.CUInt
offset# :: Proxy# SDL_GamepadBindingType -> Proxy# "unwrap" -> Int
offset# = \Proxy# SDL_GamepadBindingType
_ -> \Proxy# "unwrap"
_ -> Int
0
pattern SDL_GAMEPAD_BINDTYPE_NONE :: SDL_GamepadBindingType
pattern $mSDL_GAMEPAD_BINDTYPE_NONE :: forall {r}.
SDL_GamepadBindingType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BINDTYPE_NONE :: SDL_GamepadBindingType
SDL_GAMEPAD_BINDTYPE_NONE = SDL_GamepadBindingType 0
pattern SDL_GAMEPAD_BINDTYPE_BUTTON :: SDL_GamepadBindingType
pattern $mSDL_GAMEPAD_BINDTYPE_BUTTON :: forall {r}.
SDL_GamepadBindingType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BINDTYPE_BUTTON :: SDL_GamepadBindingType
SDL_GAMEPAD_BINDTYPE_BUTTON = SDL_GamepadBindingType 1
pattern SDL_GAMEPAD_BINDTYPE_AXIS :: SDL_GamepadBindingType
pattern $mSDL_GAMEPAD_BINDTYPE_AXIS :: forall {r}.
SDL_GamepadBindingType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BINDTYPE_AXIS :: SDL_GamepadBindingType
SDL_GAMEPAD_BINDTYPE_AXIS = SDL_GamepadBindingType 2
pattern SDL_GAMEPAD_BINDTYPE_HAT :: SDL_GamepadBindingType
pattern $mSDL_GAMEPAD_BINDTYPE_HAT :: forall {r}.
SDL_GamepadBindingType -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_GAMEPAD_BINDTYPE_HAT :: SDL_GamepadBindingType
SDL_GAMEPAD_BINDTYPE_HAT = SDL_GamepadBindingType 3
data SDL_GamepadBinding_input_axis = SDL_GamepadBinding_input_axis
{ SDL_GamepadBinding_input_axis -> CInt
axis :: BG.CInt
, SDL_GamepadBinding_input_axis -> CInt
axis_min :: BG.CInt
, SDL_GamepadBinding_input_axis -> CInt
axis_max :: BG.CInt
}
deriving stock ((forall x.
SDL_GamepadBinding_input_axis
-> Rep SDL_GamepadBinding_input_axis x)
-> (forall x.
Rep SDL_GamepadBinding_input_axis x
-> SDL_GamepadBinding_input_axis)
-> Generic SDL_GamepadBinding_input_axis
forall x.
Rep SDL_GamepadBinding_input_axis x
-> SDL_GamepadBinding_input_axis
forall x.
SDL_GamepadBinding_input_axis
-> Rep SDL_GamepadBinding_input_axis x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SDL_GamepadBinding_input_axis
-> Rep SDL_GamepadBinding_input_axis x
from :: forall x.
SDL_GamepadBinding_input_axis
-> Rep SDL_GamepadBinding_input_axis x
$cto :: forall x.
Rep SDL_GamepadBinding_input_axis x
-> SDL_GamepadBinding_input_axis
to :: forall x.
Rep SDL_GamepadBinding_input_axis x
-> SDL_GamepadBinding_input_axis
BG.Generic, SDL_GamepadBinding_input_axis
-> SDL_GamepadBinding_input_axis -> Bool
(SDL_GamepadBinding_input_axis
-> SDL_GamepadBinding_input_axis -> Bool)
-> (SDL_GamepadBinding_input_axis
-> SDL_GamepadBinding_input_axis -> Bool)
-> Eq SDL_GamepadBinding_input_axis
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_GamepadBinding_input_axis
-> SDL_GamepadBinding_input_axis -> Bool
== :: SDL_GamepadBinding_input_axis
-> SDL_GamepadBinding_input_axis -> Bool
$c/= :: SDL_GamepadBinding_input_axis
-> SDL_GamepadBinding_input_axis -> Bool
/= :: SDL_GamepadBinding_input_axis
-> SDL_GamepadBinding_input_axis -> Bool
Eq, Int -> SDL_GamepadBinding_input_axis -> ShowS
[SDL_GamepadBinding_input_axis] -> ShowS
SDL_GamepadBinding_input_axis -> String
(Int -> SDL_GamepadBinding_input_axis -> ShowS)
-> (SDL_GamepadBinding_input_axis -> String)
-> ([SDL_GamepadBinding_input_axis] -> ShowS)
-> Show SDL_GamepadBinding_input_axis
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SDL_GamepadBinding_input_axis -> ShowS
showsPrec :: Int -> SDL_GamepadBinding_input_axis -> ShowS
$cshow :: SDL_GamepadBinding_input_axis -> String
show :: SDL_GamepadBinding_input_axis -> String
$cshowList :: [SDL_GamepadBinding_input_axis] -> ShowS
showList :: [SDL_GamepadBinding_input_axis] -> ShowS
Show)
instance Marshal.StaticSize SDL_GamepadBinding_input_axis where
staticSizeOf :: Proxy SDL_GamepadBinding_input_axis -> Int
staticSizeOf = \Proxy SDL_GamepadBinding_input_axis
_ -> (Int
12 :: Int)
staticAlignment :: Proxy SDL_GamepadBinding_input_axis -> Int
staticAlignment = \Proxy SDL_GamepadBinding_input_axis
_ -> (Int
4 :: Int)
instance Marshal.ReadRaw SDL_GamepadBinding_input_axis where
readRaw :: Ptr SDL_GamepadBinding_input_axis
-> IO SDL_GamepadBinding_input_axis
readRaw =
\Ptr SDL_GamepadBinding_input_axis
ptr0 ->
(CInt -> CInt -> CInt -> SDL_GamepadBinding_input_axis)
-> IO (CInt -> CInt -> CInt -> SDL_GamepadBinding_input_axis)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CInt -> CInt -> CInt -> SDL_GamepadBinding_input_axis
SDL_GamepadBinding_input_axis
IO (CInt -> CInt -> CInt -> SDL_GamepadBinding_input_axis)
-> IO CInt -> IO (CInt -> CInt -> SDL_GamepadBinding_input_axis)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "axis"
-> Ptr SDL_GamepadBinding_input_axis
-> IO (CFieldType SDL_GamepadBinding_input_axis "axis")
forall a (field :: Symbol).
(HasCField a field, ReadRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> IO (CFieldType a field)
HasCField.readRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis") Ptr SDL_GamepadBinding_input_axis
ptr0
IO (CInt -> CInt -> SDL_GamepadBinding_input_axis)
-> IO CInt -> IO (CInt -> SDL_GamepadBinding_input_axis)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "axis_min"
-> Ptr SDL_GamepadBinding_input_axis
-> IO (CFieldType SDL_GamepadBinding_input_axis "axis_min")
forall a (field :: Symbol).
(HasCField a field, ReadRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> IO (CFieldType a field)
HasCField.readRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis_min") Ptr SDL_GamepadBinding_input_axis
ptr0
IO (CInt -> SDL_GamepadBinding_input_axis)
-> IO CInt -> IO SDL_GamepadBinding_input_axis
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "axis_max"
-> Ptr SDL_GamepadBinding_input_axis
-> IO (CFieldType SDL_GamepadBinding_input_axis "axis_max")
forall a (field :: Symbol).
(HasCField a field, ReadRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> IO (CFieldType a field)
HasCField.readRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis_max") Ptr SDL_GamepadBinding_input_axis
ptr0
instance Marshal.WriteRaw SDL_GamepadBinding_input_axis where
writeRaw :: Ptr SDL_GamepadBinding_input_axis
-> SDL_GamepadBinding_input_axis -> IO ()
writeRaw =
\Ptr SDL_GamepadBinding_input_axis
ptr0 ->
\SDL_GamepadBinding_input_axis
s1 ->
case SDL_GamepadBinding_input_axis
s1 of
SDL_GamepadBinding_input_axis CInt
axis2 CInt
axis_min3 CInt
axis_max4 ->
Proxy "axis"
-> Ptr SDL_GamepadBinding_input_axis
-> CFieldType SDL_GamepadBinding_input_axis "axis"
-> IO ()
forall a (field :: Symbol).
(HasCField a field, WriteRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> CFieldType a field -> IO ()
HasCField.writeRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis") Ptr SDL_GamepadBinding_input_axis
ptr0 CInt
CFieldType SDL_GamepadBinding_input_axis "axis"
axis2
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Proxy "axis_min"
-> Ptr SDL_GamepadBinding_input_axis
-> CFieldType SDL_GamepadBinding_input_axis "axis_min"
-> IO ()
forall a (field :: Symbol).
(HasCField a field, WriteRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> CFieldType a field -> IO ()
HasCField.writeRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis_min") Ptr SDL_GamepadBinding_input_axis
ptr0 CInt
CFieldType SDL_GamepadBinding_input_axis "axis_min"
axis_min3
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Proxy "axis_max"
-> Ptr SDL_GamepadBinding_input_axis
-> CFieldType SDL_GamepadBinding_input_axis "axis_max"
-> IO ()
forall a (field :: Symbol).
(HasCField a field, WriteRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> CFieldType a field -> IO ()
HasCField.writeRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis_max") Ptr SDL_GamepadBinding_input_axis
ptr0 CInt
CFieldType SDL_GamepadBinding_input_axis "axis_max"
axis_max4
deriving via
Marshal.EquivStorable SDL_GamepadBinding_input_axis
instance
BG.Storable SDL_GamepadBinding_input_axis
deriving via
Struct.IsStructViaReadRaw SDL_GamepadBinding_input_axis
instance
Struct.IsStruct SDL_GamepadBinding_input_axis
instance
(ty ~ BG.CInt)
=> BG.CompatHasField.HasField "axis" SDL_GamepadBinding_input_axis ty
where
hasField :: SDL_GamepadBinding_input_axis
-> (ty -> SDL_GamepadBinding_input_axis, ty)
hasField =
\SDL_GamepadBinding_input_axis
x0 ->
( \ty
y1 ->
SDL_GamepadBinding_input_axis
{ axis :: CInt
axis = ty
CInt
y1
, axis_min :: CInt
axis_min = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis_min" SDL_GamepadBinding_input_axis
x0
, axis_max :: CInt
axis_max = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis_max" SDL_GamepadBinding_input_axis
x0
}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis" SDL_GamepadBinding_input_axis
x0
)
instance
(ty ~ BG.CInt)
=> BG.HasField "axis" (BG.Ptr SDL_GamepadBinding_input_axis) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_input_axis -> Ptr ty
getField = Proxy "axis"
-> Ptr SDL_GamepadBinding_input_axis
-> Ptr (CFieldType SDL_GamepadBinding_input_axis "axis")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis")
instance HasCField.HasCField SDL_GamepadBinding_input_axis "axis" where
type
CFieldType SDL_GamepadBinding_input_axis "axis" =
BG.CInt
offset# :: Proxy# SDL_GamepadBinding_input_axis -> Proxy# "axis" -> Int
offset# = \Proxy# SDL_GamepadBinding_input_axis
_ -> \Proxy# "axis"
_ -> Int
0
instance
(ty ~ BG.CInt)
=> BG.CompatHasField.HasField "axis_min" SDL_GamepadBinding_input_axis ty
where
hasField :: SDL_GamepadBinding_input_axis
-> (ty -> SDL_GamepadBinding_input_axis, ty)
hasField =
\SDL_GamepadBinding_input_axis
x0 ->
( \ty
y1 ->
SDL_GamepadBinding_input_axis
{ axis_min :: CInt
axis_min = ty
CInt
y1
, axis :: CInt
axis = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis" SDL_GamepadBinding_input_axis
x0
, axis_max :: CInt
axis_max = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis_max" SDL_GamepadBinding_input_axis
x0
}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis_min" SDL_GamepadBinding_input_axis
x0
)
instance
(ty ~ BG.CInt)
=> BG.HasField "axis_min" (BG.Ptr SDL_GamepadBinding_input_axis) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_input_axis -> Ptr ty
getField = Proxy "axis_min"
-> Ptr SDL_GamepadBinding_input_axis
-> Ptr (CFieldType SDL_GamepadBinding_input_axis "axis_min")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis_min")
instance HasCField.HasCField SDL_GamepadBinding_input_axis "axis_min" where
type
CFieldType SDL_GamepadBinding_input_axis "axis_min" =
BG.CInt
offset# :: Proxy# SDL_GamepadBinding_input_axis -> Proxy# "axis_min" -> Int
offset# = \Proxy# SDL_GamepadBinding_input_axis
_ -> \Proxy# "axis_min"
_ -> Int
4
instance
(ty ~ BG.CInt)
=> BG.CompatHasField.HasField "axis_max" SDL_GamepadBinding_input_axis ty
where
hasField :: SDL_GamepadBinding_input_axis
-> (ty -> SDL_GamepadBinding_input_axis, ty)
hasField =
\SDL_GamepadBinding_input_axis
x0 ->
( \ty
y1 ->
SDL_GamepadBinding_input_axis
{ axis_max :: CInt
axis_max = ty
CInt
y1
, axis :: CInt
axis = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis" SDL_GamepadBinding_input_axis
x0
, axis_min :: CInt
axis_min = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis_min" SDL_GamepadBinding_input_axis
x0
}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis_max" SDL_GamepadBinding_input_axis
x0
)
instance
(ty ~ BG.CInt)
=> BG.HasField "axis_max" (BG.Ptr SDL_GamepadBinding_input_axis) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_input_axis -> Ptr ty
getField = Proxy "axis_max"
-> Ptr SDL_GamepadBinding_input_axis
-> Ptr (CFieldType SDL_GamepadBinding_input_axis "axis_max")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis_max")
instance HasCField.HasCField SDL_GamepadBinding_input_axis "axis_max" where
type
CFieldType SDL_GamepadBinding_input_axis "axis_max" =
BG.CInt
offset# :: Proxy# SDL_GamepadBinding_input_axis -> Proxy# "axis_max" -> Int
offset# = \Proxy# SDL_GamepadBinding_input_axis
_ -> \Proxy# "axis_max"
_ -> Int
8
data SDL_GamepadBinding_input_hat = SDL_GamepadBinding_input_hat
{ SDL_GamepadBinding_input_hat -> CInt
hat :: BG.CInt
, SDL_GamepadBinding_input_hat -> CInt
hat_mask :: BG.CInt
}
deriving stock ((forall x.
SDL_GamepadBinding_input_hat -> Rep SDL_GamepadBinding_input_hat x)
-> (forall x.
Rep SDL_GamepadBinding_input_hat x -> SDL_GamepadBinding_input_hat)
-> Generic SDL_GamepadBinding_input_hat
forall x.
Rep SDL_GamepadBinding_input_hat x -> SDL_GamepadBinding_input_hat
forall x.
SDL_GamepadBinding_input_hat -> Rep SDL_GamepadBinding_input_hat x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SDL_GamepadBinding_input_hat -> Rep SDL_GamepadBinding_input_hat x
from :: forall x.
SDL_GamepadBinding_input_hat -> Rep SDL_GamepadBinding_input_hat x
$cto :: forall x.
Rep SDL_GamepadBinding_input_hat x -> SDL_GamepadBinding_input_hat
to :: forall x.
Rep SDL_GamepadBinding_input_hat x -> SDL_GamepadBinding_input_hat
BG.Generic, SDL_GamepadBinding_input_hat
-> SDL_GamepadBinding_input_hat -> Bool
(SDL_GamepadBinding_input_hat
-> SDL_GamepadBinding_input_hat -> Bool)
-> (SDL_GamepadBinding_input_hat
-> SDL_GamepadBinding_input_hat -> Bool)
-> Eq SDL_GamepadBinding_input_hat
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_GamepadBinding_input_hat
-> SDL_GamepadBinding_input_hat -> Bool
== :: SDL_GamepadBinding_input_hat
-> SDL_GamepadBinding_input_hat -> Bool
$c/= :: SDL_GamepadBinding_input_hat
-> SDL_GamepadBinding_input_hat -> Bool
/= :: SDL_GamepadBinding_input_hat
-> SDL_GamepadBinding_input_hat -> Bool
Eq, Int -> SDL_GamepadBinding_input_hat -> ShowS
[SDL_GamepadBinding_input_hat] -> ShowS
SDL_GamepadBinding_input_hat -> String
(Int -> SDL_GamepadBinding_input_hat -> ShowS)
-> (SDL_GamepadBinding_input_hat -> String)
-> ([SDL_GamepadBinding_input_hat] -> ShowS)
-> Show SDL_GamepadBinding_input_hat
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SDL_GamepadBinding_input_hat -> ShowS
showsPrec :: Int -> SDL_GamepadBinding_input_hat -> ShowS
$cshow :: SDL_GamepadBinding_input_hat -> String
show :: SDL_GamepadBinding_input_hat -> String
$cshowList :: [SDL_GamepadBinding_input_hat] -> ShowS
showList :: [SDL_GamepadBinding_input_hat] -> ShowS
Show)
instance Marshal.StaticSize SDL_GamepadBinding_input_hat where
staticSizeOf :: Proxy SDL_GamepadBinding_input_hat -> Int
staticSizeOf = \Proxy SDL_GamepadBinding_input_hat
_ -> (Int
8 :: Int)
staticAlignment :: Proxy SDL_GamepadBinding_input_hat -> Int
staticAlignment = \Proxy SDL_GamepadBinding_input_hat
_ -> (Int
4 :: Int)
instance Marshal.ReadRaw SDL_GamepadBinding_input_hat where
readRaw :: Ptr SDL_GamepadBinding_input_hat -> IO SDL_GamepadBinding_input_hat
readRaw =
\Ptr SDL_GamepadBinding_input_hat
ptr0 ->
(CInt -> CInt -> SDL_GamepadBinding_input_hat)
-> IO (CInt -> CInt -> SDL_GamepadBinding_input_hat)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CInt -> CInt -> SDL_GamepadBinding_input_hat
SDL_GamepadBinding_input_hat
IO (CInt -> CInt -> SDL_GamepadBinding_input_hat)
-> IO CInt -> IO (CInt -> SDL_GamepadBinding_input_hat)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "hat"
-> Ptr SDL_GamepadBinding_input_hat
-> IO (CFieldType SDL_GamepadBinding_input_hat "hat")
forall a (field :: Symbol).
(HasCField a field, ReadRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> IO (CFieldType a field)
HasCField.readRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"hat") Ptr SDL_GamepadBinding_input_hat
ptr0
IO (CInt -> SDL_GamepadBinding_input_hat)
-> IO CInt -> IO SDL_GamepadBinding_input_hat
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "hat_mask"
-> Ptr SDL_GamepadBinding_input_hat
-> IO (CFieldType SDL_GamepadBinding_input_hat "hat_mask")
forall a (field :: Symbol).
(HasCField a field, ReadRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> IO (CFieldType a field)
HasCField.readRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"hat_mask") Ptr SDL_GamepadBinding_input_hat
ptr0
instance Marshal.WriteRaw SDL_GamepadBinding_input_hat where
writeRaw :: Ptr SDL_GamepadBinding_input_hat
-> SDL_GamepadBinding_input_hat -> IO ()
writeRaw =
\Ptr SDL_GamepadBinding_input_hat
ptr0 ->
\SDL_GamepadBinding_input_hat
s1 ->
case SDL_GamepadBinding_input_hat
s1 of
SDL_GamepadBinding_input_hat CInt
hat2 CInt
hat_mask3 ->
Proxy "hat"
-> Ptr SDL_GamepadBinding_input_hat
-> CFieldType SDL_GamepadBinding_input_hat "hat"
-> IO ()
forall a (field :: Symbol).
(HasCField a field, WriteRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> CFieldType a field -> IO ()
HasCField.writeRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"hat") Ptr SDL_GamepadBinding_input_hat
ptr0 CInt
CFieldType SDL_GamepadBinding_input_hat "hat"
hat2
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Proxy "hat_mask"
-> Ptr SDL_GamepadBinding_input_hat
-> CFieldType SDL_GamepadBinding_input_hat "hat_mask"
-> IO ()
forall a (field :: Symbol).
(HasCField a field, WriteRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> CFieldType a field -> IO ()
HasCField.writeRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"hat_mask") Ptr SDL_GamepadBinding_input_hat
ptr0 CInt
CFieldType SDL_GamepadBinding_input_hat "hat_mask"
hat_mask3
deriving via
Marshal.EquivStorable SDL_GamepadBinding_input_hat
instance
BG.Storable SDL_GamepadBinding_input_hat
deriving via
Struct.IsStructViaReadRaw SDL_GamepadBinding_input_hat
instance
Struct.IsStruct SDL_GamepadBinding_input_hat
instance
(ty ~ BG.CInt)
=> BG.CompatHasField.HasField "hat" SDL_GamepadBinding_input_hat ty
where
hasField :: SDL_GamepadBinding_input_hat
-> (ty -> SDL_GamepadBinding_input_hat, ty)
hasField =
\SDL_GamepadBinding_input_hat
x0 ->
( \ty
y1 ->
SDL_GamepadBinding_input_hat{hat :: CInt
hat = ty
CInt
y1, hat_mask :: CInt
hat_mask = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"hat_mask" SDL_GamepadBinding_input_hat
x0}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"hat" SDL_GamepadBinding_input_hat
x0
)
instance
(ty ~ BG.CInt)
=> BG.HasField "hat" (BG.Ptr SDL_GamepadBinding_input_hat) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_input_hat -> Ptr ty
getField = Proxy "hat"
-> Ptr SDL_GamepadBinding_input_hat
-> Ptr (CFieldType SDL_GamepadBinding_input_hat "hat")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"hat")
instance HasCField.HasCField SDL_GamepadBinding_input_hat "hat" where
type
CFieldType SDL_GamepadBinding_input_hat "hat" =
BG.CInt
offset# :: Proxy# SDL_GamepadBinding_input_hat -> Proxy# "hat" -> Int
offset# = \Proxy# SDL_GamepadBinding_input_hat
_ -> \Proxy# "hat"
_ -> Int
0
instance
(ty ~ BG.CInt)
=> BG.CompatHasField.HasField "hat_mask" SDL_GamepadBinding_input_hat ty
where
hasField :: SDL_GamepadBinding_input_hat
-> (ty -> SDL_GamepadBinding_input_hat, ty)
hasField =
\SDL_GamepadBinding_input_hat
x0 ->
( \ty
y1 ->
SDL_GamepadBinding_input_hat{hat_mask :: CInt
hat_mask = ty
CInt
y1, hat :: CInt
hat = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"hat" SDL_GamepadBinding_input_hat
x0}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"hat_mask" SDL_GamepadBinding_input_hat
x0
)
instance
(ty ~ BG.CInt)
=> BG.HasField "hat_mask" (BG.Ptr SDL_GamepadBinding_input_hat) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_input_hat -> Ptr ty
getField = Proxy "hat_mask"
-> Ptr SDL_GamepadBinding_input_hat
-> Ptr (CFieldType SDL_GamepadBinding_input_hat "hat_mask")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"hat_mask")
instance HasCField.HasCField SDL_GamepadBinding_input_hat "hat_mask" where
type
CFieldType SDL_GamepadBinding_input_hat "hat_mask" =
BG.CInt
offset# :: Proxy# SDL_GamepadBinding_input_hat -> Proxy# "hat_mask" -> Int
offset# = \Proxy# SDL_GamepadBinding_input_hat
_ -> \Proxy# "hat_mask"
_ -> Int
4
newtype SDL_GamepadBinding_input = SDL_GamepadBinding_input
{ SDL_GamepadBinding_input -> ByteArray
unwrap :: BG.ByteArray
}
deriving stock ((forall x.
SDL_GamepadBinding_input -> Rep SDL_GamepadBinding_input x)
-> (forall x.
Rep SDL_GamepadBinding_input x -> SDL_GamepadBinding_input)
-> Generic SDL_GamepadBinding_input
forall x.
Rep SDL_GamepadBinding_input x -> SDL_GamepadBinding_input
forall x.
SDL_GamepadBinding_input -> Rep SDL_GamepadBinding_input x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SDL_GamepadBinding_input -> Rep SDL_GamepadBinding_input x
from :: forall x.
SDL_GamepadBinding_input -> Rep SDL_GamepadBinding_input x
$cto :: forall x.
Rep SDL_GamepadBinding_input x -> SDL_GamepadBinding_input
to :: forall x.
Rep SDL_GamepadBinding_input x -> SDL_GamepadBinding_input
BG.Generic)
deriving via BG.SizedByteArray 12 4 instance Marshal.StaticSize SDL_GamepadBinding_input
deriving via BG.SizedByteArray 12 4 instance Marshal.ReadRaw SDL_GamepadBinding_input
deriving via BG.SizedByteArray 12 4 instance Marshal.WriteRaw SDL_GamepadBinding_input
deriving via
Marshal.EquivStorable SDL_GamepadBinding_input
instance
BG.Storable SDL_GamepadBinding_input
deriving via BG.SizedByteArray 12 4 instance Union.IsUnion SDL_GamepadBinding_input
instance
(ty ~ BG.CInt)
=> BG.HasField "button" SDL_GamepadBinding_input ty
where
getField :: SDL_GamepadBinding_input -> ty
getField = SDL_GamepadBinding_input -> ty
forall payload union.
(Storable payload, Coercible union ByteArray) =>
union -> payload
BG.getUnionPayload
instance
(ty ~ BG.CInt)
=> BG.CompatHasField.HasField "button" SDL_GamepadBinding_input ty
where
hasField :: SDL_GamepadBinding_input -> (ty -> SDL_GamepadBinding_input, ty)
hasField =
\SDL_GamepadBinding_input
x0 ->
( \ty
y1 ->
ty -> SDL_GamepadBinding_input -> SDL_GamepadBinding_input
forall payload union.
(Storable payload, Coercible union ByteArray) =>
payload -> union -> union
BG.setUnionPayload ty
y1 SDL_GamepadBinding_input
x0
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"button" SDL_GamepadBinding_input
x0
)
instance
(ty ~ BG.CInt)
=> BG.HasField "button" (BG.Ptr SDL_GamepadBinding_input) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_input -> Ptr ty
getField = Proxy "button"
-> Ptr SDL_GamepadBinding_input
-> Ptr (CFieldType SDL_GamepadBinding_input "button")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"button")
instance HasCField.HasCField SDL_GamepadBinding_input "button" where
type
CFieldType SDL_GamepadBinding_input "button" =
BG.CInt
offset# :: Proxy# SDL_GamepadBinding_input -> Proxy# "button" -> Int
offset# = \Proxy# SDL_GamepadBinding_input
_ -> \Proxy# "button"
_ -> Int
0
instance
(ty ~ SDL_GamepadBinding_input_axis)
=> BG.HasField "axis" SDL_GamepadBinding_input ty
where
getField :: SDL_GamepadBinding_input -> ty
getField = SDL_GamepadBinding_input -> ty
forall payload union.
(Storable payload, Coercible union ByteArray) =>
union -> payload
BG.getUnionPayload
instance
(ty ~ SDL_GamepadBinding_input_axis)
=> BG.CompatHasField.HasField "axis" SDL_GamepadBinding_input ty
where
hasField :: SDL_GamepadBinding_input -> (ty -> SDL_GamepadBinding_input, ty)
hasField =
\SDL_GamepadBinding_input
x0 ->
( \ty
y1 ->
ty -> SDL_GamepadBinding_input -> SDL_GamepadBinding_input
forall payload union.
(Storable payload, Coercible union ByteArray) =>
payload -> union -> union
BG.setUnionPayload ty
y1 SDL_GamepadBinding_input
x0
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis" SDL_GamepadBinding_input
x0
)
instance
(ty ~ SDL_GamepadBinding_input_axis)
=> BG.HasField "axis" (BG.Ptr SDL_GamepadBinding_input) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_input -> Ptr ty
getField = Proxy "axis"
-> Ptr SDL_GamepadBinding_input
-> Ptr (CFieldType SDL_GamepadBinding_input "axis")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis")
instance HasCField.HasCField SDL_GamepadBinding_input "axis" where
type
CFieldType SDL_GamepadBinding_input "axis" =
SDL_GamepadBinding_input_axis
offset# :: Proxy# SDL_GamepadBinding_input -> Proxy# "axis" -> Int
offset# = \Proxy# SDL_GamepadBinding_input
_ -> \Proxy# "axis"
_ -> Int
0
instance
(ty ~ SDL_GamepadBinding_input_hat)
=> BG.HasField "hat" SDL_GamepadBinding_input ty
where
getField :: SDL_GamepadBinding_input -> ty
getField = SDL_GamepadBinding_input -> ty
forall payload union.
(Storable payload, Coercible union ByteArray) =>
union -> payload
BG.getUnionPayload
instance
(ty ~ SDL_GamepadBinding_input_hat)
=> BG.CompatHasField.HasField "hat" SDL_GamepadBinding_input ty
where
hasField :: SDL_GamepadBinding_input -> (ty -> SDL_GamepadBinding_input, ty)
hasField =
\SDL_GamepadBinding_input
x0 ->
( \ty
y1 ->
ty -> SDL_GamepadBinding_input -> SDL_GamepadBinding_input
forall payload union.
(Storable payload, Coercible union ByteArray) =>
payload -> union -> union
BG.setUnionPayload ty
y1 SDL_GamepadBinding_input
x0
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"hat" SDL_GamepadBinding_input
x0
)
instance
(ty ~ SDL_GamepadBinding_input_hat)
=> BG.HasField "hat" (BG.Ptr SDL_GamepadBinding_input) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_input -> Ptr ty
getField = Proxy "hat"
-> Ptr SDL_GamepadBinding_input
-> Ptr (CFieldType SDL_GamepadBinding_input "hat")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"hat")
instance HasCField.HasCField SDL_GamepadBinding_input "hat" where
type
CFieldType SDL_GamepadBinding_input "hat" =
SDL_GamepadBinding_input_hat
offset# :: Proxy# SDL_GamepadBinding_input -> Proxy# "hat" -> Int
offset# = \Proxy# SDL_GamepadBinding_input
_ -> \Proxy# "hat"
_ -> Int
0
data SDL_GamepadBinding_output_axis = SDL_GamepadBinding_output_axis
{ SDL_GamepadBinding_output_axis -> SDL_GamepadAxis
axis :: SDL_GamepadAxis
, SDL_GamepadBinding_output_axis -> CInt
axis_min :: BG.CInt
, SDL_GamepadBinding_output_axis -> CInt
axis_max :: BG.CInt
}
deriving stock ((forall x.
SDL_GamepadBinding_output_axis
-> Rep SDL_GamepadBinding_output_axis x)
-> (forall x.
Rep SDL_GamepadBinding_output_axis x
-> SDL_GamepadBinding_output_axis)
-> Generic SDL_GamepadBinding_output_axis
forall x.
Rep SDL_GamepadBinding_output_axis x
-> SDL_GamepadBinding_output_axis
forall x.
SDL_GamepadBinding_output_axis
-> Rep SDL_GamepadBinding_output_axis x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SDL_GamepadBinding_output_axis
-> Rep SDL_GamepadBinding_output_axis x
from :: forall x.
SDL_GamepadBinding_output_axis
-> Rep SDL_GamepadBinding_output_axis x
$cto :: forall x.
Rep SDL_GamepadBinding_output_axis x
-> SDL_GamepadBinding_output_axis
to :: forall x.
Rep SDL_GamepadBinding_output_axis x
-> SDL_GamepadBinding_output_axis
BG.Generic, SDL_GamepadBinding_output_axis
-> SDL_GamepadBinding_output_axis -> Bool
(SDL_GamepadBinding_output_axis
-> SDL_GamepadBinding_output_axis -> Bool)
-> (SDL_GamepadBinding_output_axis
-> SDL_GamepadBinding_output_axis -> Bool)
-> Eq SDL_GamepadBinding_output_axis
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_GamepadBinding_output_axis
-> SDL_GamepadBinding_output_axis -> Bool
== :: SDL_GamepadBinding_output_axis
-> SDL_GamepadBinding_output_axis -> Bool
$c/= :: SDL_GamepadBinding_output_axis
-> SDL_GamepadBinding_output_axis -> Bool
/= :: SDL_GamepadBinding_output_axis
-> SDL_GamepadBinding_output_axis -> Bool
Eq, Int -> SDL_GamepadBinding_output_axis -> ShowS
[SDL_GamepadBinding_output_axis] -> ShowS
SDL_GamepadBinding_output_axis -> String
(Int -> SDL_GamepadBinding_output_axis -> ShowS)
-> (SDL_GamepadBinding_output_axis -> String)
-> ([SDL_GamepadBinding_output_axis] -> ShowS)
-> Show SDL_GamepadBinding_output_axis
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SDL_GamepadBinding_output_axis -> ShowS
showsPrec :: Int -> SDL_GamepadBinding_output_axis -> ShowS
$cshow :: SDL_GamepadBinding_output_axis -> String
show :: SDL_GamepadBinding_output_axis -> String
$cshowList :: [SDL_GamepadBinding_output_axis] -> ShowS
showList :: [SDL_GamepadBinding_output_axis] -> ShowS
Show)
instance Marshal.StaticSize SDL_GamepadBinding_output_axis where
staticSizeOf :: Proxy SDL_GamepadBinding_output_axis -> Int
staticSizeOf = \Proxy SDL_GamepadBinding_output_axis
_ -> (Int
12 :: Int)
staticAlignment :: Proxy SDL_GamepadBinding_output_axis -> Int
staticAlignment = \Proxy SDL_GamepadBinding_output_axis
_ -> (Int
4 :: Int)
instance Marshal.ReadRaw SDL_GamepadBinding_output_axis where
readRaw :: Ptr SDL_GamepadBinding_output_axis
-> IO SDL_GamepadBinding_output_axis
readRaw =
\Ptr SDL_GamepadBinding_output_axis
ptr0 ->
(SDL_GamepadAxis -> CInt -> CInt -> SDL_GamepadBinding_output_axis)
-> IO
(SDL_GamepadAxis -> CInt -> CInt -> SDL_GamepadBinding_output_axis)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure SDL_GamepadAxis -> CInt -> CInt -> SDL_GamepadBinding_output_axis
SDL_GamepadBinding_output_axis
IO
(SDL_GamepadAxis -> CInt -> CInt -> SDL_GamepadBinding_output_axis)
-> IO SDL_GamepadAxis
-> IO (CInt -> CInt -> SDL_GamepadBinding_output_axis)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "axis"
-> Ptr SDL_GamepadBinding_output_axis
-> IO (CFieldType SDL_GamepadBinding_output_axis "axis")
forall a (field :: Symbol).
(HasCField a field, ReadRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> IO (CFieldType a field)
HasCField.readRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis") Ptr SDL_GamepadBinding_output_axis
ptr0
IO (CInt -> CInt -> SDL_GamepadBinding_output_axis)
-> IO CInt -> IO (CInt -> SDL_GamepadBinding_output_axis)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "axis_min"
-> Ptr SDL_GamepadBinding_output_axis
-> IO (CFieldType SDL_GamepadBinding_output_axis "axis_min")
forall a (field :: Symbol).
(HasCField a field, ReadRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> IO (CFieldType a field)
HasCField.readRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis_min") Ptr SDL_GamepadBinding_output_axis
ptr0
IO (CInt -> SDL_GamepadBinding_output_axis)
-> IO CInt -> IO SDL_GamepadBinding_output_axis
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "axis_max"
-> Ptr SDL_GamepadBinding_output_axis
-> IO (CFieldType SDL_GamepadBinding_output_axis "axis_max")
forall a (field :: Symbol).
(HasCField a field, ReadRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> IO (CFieldType a field)
HasCField.readRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis_max") Ptr SDL_GamepadBinding_output_axis
ptr0
instance Marshal.WriteRaw SDL_GamepadBinding_output_axis where
writeRaw :: Ptr SDL_GamepadBinding_output_axis
-> SDL_GamepadBinding_output_axis -> IO ()
writeRaw =
\Ptr SDL_GamepadBinding_output_axis
ptr0 ->
\SDL_GamepadBinding_output_axis
s1 ->
case SDL_GamepadBinding_output_axis
s1 of
SDL_GamepadBinding_output_axis SDL_GamepadAxis
axis2 CInt
axis_min3 CInt
axis_max4 ->
Proxy "axis"
-> Ptr SDL_GamepadBinding_output_axis
-> CFieldType SDL_GamepadBinding_output_axis "axis"
-> IO ()
forall a (field :: Symbol).
(HasCField a field, WriteRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> CFieldType a field -> IO ()
HasCField.writeRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis") Ptr SDL_GamepadBinding_output_axis
ptr0 CFieldType SDL_GamepadBinding_output_axis "axis"
SDL_GamepadAxis
axis2
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Proxy "axis_min"
-> Ptr SDL_GamepadBinding_output_axis
-> CFieldType SDL_GamepadBinding_output_axis "axis_min"
-> IO ()
forall a (field :: Symbol).
(HasCField a field, WriteRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> CFieldType a field -> IO ()
HasCField.writeRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis_min") Ptr SDL_GamepadBinding_output_axis
ptr0 CInt
CFieldType SDL_GamepadBinding_output_axis "axis_min"
axis_min3
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Proxy "axis_max"
-> Ptr SDL_GamepadBinding_output_axis
-> CFieldType SDL_GamepadBinding_output_axis "axis_max"
-> IO ()
forall a (field :: Symbol).
(HasCField a field, WriteRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> CFieldType a field -> IO ()
HasCField.writeRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis_max") Ptr SDL_GamepadBinding_output_axis
ptr0 CInt
CFieldType SDL_GamepadBinding_output_axis "axis_max"
axis_max4
deriving via
Marshal.EquivStorable SDL_GamepadBinding_output_axis
instance
BG.Storable SDL_GamepadBinding_output_axis
deriving via
Struct.IsStructViaReadRaw SDL_GamepadBinding_output_axis
instance
Struct.IsStruct SDL_GamepadBinding_output_axis
instance
(ty ~ SDL_GamepadAxis)
=> BG.CompatHasField.HasField "axis" SDL_GamepadBinding_output_axis ty
where
hasField :: SDL_GamepadBinding_output_axis
-> (ty -> SDL_GamepadBinding_output_axis, ty)
hasField =
\SDL_GamepadBinding_output_axis
x0 ->
( \ty
y1 ->
SDL_GamepadBinding_output_axis
{ axis :: SDL_GamepadAxis
axis = ty
SDL_GamepadAxis
y1
, axis_min :: CInt
axis_min = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis_min" SDL_GamepadBinding_output_axis
x0
, axis_max :: CInt
axis_max = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis_max" SDL_GamepadBinding_output_axis
x0
}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis" SDL_GamepadBinding_output_axis
x0
)
instance
(ty ~ SDL_GamepadAxis)
=> BG.HasField "axis" (BG.Ptr SDL_GamepadBinding_output_axis) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_output_axis -> Ptr ty
getField = Proxy "axis"
-> Ptr SDL_GamepadBinding_output_axis
-> Ptr (CFieldType SDL_GamepadBinding_output_axis "axis")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis")
instance HasCField.HasCField SDL_GamepadBinding_output_axis "axis" where
type
CFieldType SDL_GamepadBinding_output_axis "axis" =
SDL_GamepadAxis
offset# :: Proxy# SDL_GamepadBinding_output_axis -> Proxy# "axis" -> Int
offset# = \Proxy# SDL_GamepadBinding_output_axis
_ -> \Proxy# "axis"
_ -> Int
0
instance
(ty ~ BG.CInt)
=> BG.CompatHasField.HasField "axis_min" SDL_GamepadBinding_output_axis ty
where
hasField :: SDL_GamepadBinding_output_axis
-> (ty -> SDL_GamepadBinding_output_axis, ty)
hasField =
\SDL_GamepadBinding_output_axis
x0 ->
( \ty
y1 ->
SDL_GamepadBinding_output_axis
{ axis_min :: CInt
axis_min = ty
CInt
y1
, axis :: SDL_GamepadAxis
axis = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis" SDL_GamepadBinding_output_axis
x0
, axis_max :: CInt
axis_max = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis_max" SDL_GamepadBinding_output_axis
x0
}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis_min" SDL_GamepadBinding_output_axis
x0
)
instance
(ty ~ BG.CInt)
=> BG.HasField "axis_min" (BG.Ptr SDL_GamepadBinding_output_axis) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_output_axis -> Ptr ty
getField = Proxy "axis_min"
-> Ptr SDL_GamepadBinding_output_axis
-> Ptr (CFieldType SDL_GamepadBinding_output_axis "axis_min")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis_min")
instance HasCField.HasCField SDL_GamepadBinding_output_axis "axis_min" where
type
CFieldType SDL_GamepadBinding_output_axis "axis_min" =
BG.CInt
offset# :: Proxy# SDL_GamepadBinding_output_axis -> Proxy# "axis_min" -> Int
offset# = \Proxy# SDL_GamepadBinding_output_axis
_ -> \Proxy# "axis_min"
_ -> Int
4
instance
(ty ~ BG.CInt)
=> BG.CompatHasField.HasField "axis_max" SDL_GamepadBinding_output_axis ty
where
hasField :: SDL_GamepadBinding_output_axis
-> (ty -> SDL_GamepadBinding_output_axis, ty)
hasField =
\SDL_GamepadBinding_output_axis
x0 ->
( \ty
y1 ->
SDL_GamepadBinding_output_axis
{ axis_max :: CInt
axis_max = ty
CInt
y1
, axis :: SDL_GamepadAxis
axis = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis" SDL_GamepadBinding_output_axis
x0
, axis_min :: CInt
axis_min = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis_min" SDL_GamepadBinding_output_axis
x0
}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis_max" SDL_GamepadBinding_output_axis
x0
)
instance
(ty ~ BG.CInt)
=> BG.HasField "axis_max" (BG.Ptr SDL_GamepadBinding_output_axis) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_output_axis -> Ptr ty
getField = Proxy "axis_max"
-> Ptr SDL_GamepadBinding_output_axis
-> Ptr (CFieldType SDL_GamepadBinding_output_axis "axis_max")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis_max")
instance HasCField.HasCField SDL_GamepadBinding_output_axis "axis_max" where
type
CFieldType SDL_GamepadBinding_output_axis "axis_max" =
BG.CInt
offset# :: Proxy# SDL_GamepadBinding_output_axis -> Proxy# "axis_max" -> Int
offset# = \Proxy# SDL_GamepadBinding_output_axis
_ -> \Proxy# "axis_max"
_ -> Int
8
newtype SDL_GamepadBinding_output = SDL_GamepadBinding_output
{ SDL_GamepadBinding_output -> ByteArray
unwrap :: BG.ByteArray
}
deriving stock ((forall x.
SDL_GamepadBinding_output -> Rep SDL_GamepadBinding_output x)
-> (forall x.
Rep SDL_GamepadBinding_output x -> SDL_GamepadBinding_output)
-> Generic SDL_GamepadBinding_output
forall x.
Rep SDL_GamepadBinding_output x -> SDL_GamepadBinding_output
forall x.
SDL_GamepadBinding_output -> Rep SDL_GamepadBinding_output x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SDL_GamepadBinding_output -> Rep SDL_GamepadBinding_output x
from :: forall x.
SDL_GamepadBinding_output -> Rep SDL_GamepadBinding_output x
$cto :: forall x.
Rep SDL_GamepadBinding_output x -> SDL_GamepadBinding_output
to :: forall x.
Rep SDL_GamepadBinding_output x -> SDL_GamepadBinding_output
BG.Generic)
deriving via BG.SizedByteArray 12 4 instance Marshal.StaticSize SDL_GamepadBinding_output
deriving via BG.SizedByteArray 12 4 instance Marshal.ReadRaw SDL_GamepadBinding_output
deriving via BG.SizedByteArray 12 4 instance Marshal.WriteRaw SDL_GamepadBinding_output
deriving via
Marshal.EquivStorable SDL_GamepadBinding_output
instance
BG.Storable SDL_GamepadBinding_output
deriving via BG.SizedByteArray 12 4 instance Union.IsUnion SDL_GamepadBinding_output
instance
(ty ~ SDL_GamepadButton)
=> BG.HasField "button" SDL_GamepadBinding_output ty
where
getField :: SDL_GamepadBinding_output -> ty
getField = SDL_GamepadBinding_output -> ty
forall payload union.
(Storable payload, Coercible union ByteArray) =>
union -> payload
BG.getUnionPayload
instance
(ty ~ SDL_GamepadButton)
=> BG.CompatHasField.HasField "button" SDL_GamepadBinding_output ty
where
hasField :: SDL_GamepadBinding_output -> (ty -> SDL_GamepadBinding_output, ty)
hasField =
\SDL_GamepadBinding_output
x0 ->
( \ty
y1 ->
ty -> SDL_GamepadBinding_output -> SDL_GamepadBinding_output
forall payload union.
(Storable payload, Coercible union ByteArray) =>
payload -> union -> union
BG.setUnionPayload ty
y1 SDL_GamepadBinding_output
x0
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"button" SDL_GamepadBinding_output
x0
)
instance
(ty ~ SDL_GamepadButton)
=> BG.HasField "button" (BG.Ptr SDL_GamepadBinding_output) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_output -> Ptr ty
getField = Proxy "button"
-> Ptr SDL_GamepadBinding_output
-> Ptr (CFieldType SDL_GamepadBinding_output "button")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"button")
instance HasCField.HasCField SDL_GamepadBinding_output "button" where
type
CFieldType SDL_GamepadBinding_output "button" =
SDL_GamepadButton
offset# :: Proxy# SDL_GamepadBinding_output -> Proxy# "button" -> Int
offset# = \Proxy# SDL_GamepadBinding_output
_ -> \Proxy# "button"
_ -> Int
0
instance
(ty ~ SDL_GamepadBinding_output_axis)
=> BG.HasField "axis" SDL_GamepadBinding_output ty
where
getField :: SDL_GamepadBinding_output -> ty
getField = SDL_GamepadBinding_output -> ty
forall payload union.
(Storable payload, Coercible union ByteArray) =>
union -> payload
BG.getUnionPayload
instance
(ty ~ SDL_GamepadBinding_output_axis)
=> BG.CompatHasField.HasField "axis" SDL_GamepadBinding_output ty
where
hasField :: SDL_GamepadBinding_output -> (ty -> SDL_GamepadBinding_output, ty)
hasField =
\SDL_GamepadBinding_output
x0 ->
( \ty
y1 ->
ty -> SDL_GamepadBinding_output -> SDL_GamepadBinding_output
forall payload union.
(Storable payload, Coercible union ByteArray) =>
payload -> union -> union
BG.setUnionPayload ty
y1 SDL_GamepadBinding_output
x0
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"axis" SDL_GamepadBinding_output
x0
)
instance
(ty ~ SDL_GamepadBinding_output_axis)
=> BG.HasField "axis" (BG.Ptr SDL_GamepadBinding_output) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding_output -> Ptr ty
getField = Proxy "axis"
-> Ptr SDL_GamepadBinding_output
-> Ptr (CFieldType SDL_GamepadBinding_output "axis")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"axis")
instance HasCField.HasCField SDL_GamepadBinding_output "axis" where
type
CFieldType SDL_GamepadBinding_output "axis" =
SDL_GamepadBinding_output_axis
offset# :: Proxy# SDL_GamepadBinding_output -> Proxy# "axis" -> Int
offset# = \Proxy# SDL_GamepadBinding_output
_ -> \Proxy# "axis"
_ -> Int
0
data SDL_GamepadBinding = SDL_GamepadBinding
{ SDL_GamepadBinding -> SDL_GamepadBindingType
input_type :: SDL_GamepadBindingType
, SDL_GamepadBinding -> SDL_GamepadBinding_input
input :: SDL_GamepadBinding_input
, SDL_GamepadBinding -> SDL_GamepadBindingType
output_type :: SDL_GamepadBindingType
, SDL_GamepadBinding -> SDL_GamepadBinding_output
output :: SDL_GamepadBinding_output
}
deriving stock ((forall x. SDL_GamepadBinding -> Rep SDL_GamepadBinding x)
-> (forall x. Rep SDL_GamepadBinding x -> SDL_GamepadBinding)
-> Generic SDL_GamepadBinding
forall x. Rep SDL_GamepadBinding x -> SDL_GamepadBinding
forall x. SDL_GamepadBinding -> Rep SDL_GamepadBinding x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SDL_GamepadBinding -> Rep SDL_GamepadBinding x
from :: forall x. SDL_GamepadBinding -> Rep SDL_GamepadBinding x
$cto :: forall x. Rep SDL_GamepadBinding x -> SDL_GamepadBinding
to :: forall x. Rep SDL_GamepadBinding x -> SDL_GamepadBinding
BG.Generic)
instance Marshal.StaticSize SDL_GamepadBinding where
staticSizeOf :: Proxy SDL_GamepadBinding -> Int
staticSizeOf = \Proxy SDL_GamepadBinding
_ -> (Int
32 :: Int)
staticAlignment :: Proxy SDL_GamepadBinding -> Int
staticAlignment = \Proxy SDL_GamepadBinding
_ -> (Int
4 :: Int)
instance Marshal.ReadRaw SDL_GamepadBinding where
readRaw :: Ptr SDL_GamepadBinding -> IO SDL_GamepadBinding
readRaw =
\Ptr SDL_GamepadBinding
ptr0 ->
(SDL_GamepadBindingType
-> SDL_GamepadBinding_input
-> SDL_GamepadBindingType
-> SDL_GamepadBinding_output
-> SDL_GamepadBinding)
-> IO
(SDL_GamepadBindingType
-> SDL_GamepadBinding_input
-> SDL_GamepadBindingType
-> SDL_GamepadBinding_output
-> SDL_GamepadBinding)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure SDL_GamepadBindingType
-> SDL_GamepadBinding_input
-> SDL_GamepadBindingType
-> SDL_GamepadBinding_output
-> SDL_GamepadBinding
SDL_GamepadBinding
IO
(SDL_GamepadBindingType
-> SDL_GamepadBinding_input
-> SDL_GamepadBindingType
-> SDL_GamepadBinding_output
-> SDL_GamepadBinding)
-> IO SDL_GamepadBindingType
-> IO
(SDL_GamepadBinding_input
-> SDL_GamepadBindingType
-> SDL_GamepadBinding_output
-> SDL_GamepadBinding)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "input_type"
-> Ptr SDL_GamepadBinding
-> IO (CFieldType SDL_GamepadBinding "input_type")
forall a (field :: Symbol).
(HasCField a field, ReadRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> IO (CFieldType a field)
HasCField.readRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"input_type") Ptr SDL_GamepadBinding
ptr0
IO
(SDL_GamepadBinding_input
-> SDL_GamepadBindingType
-> SDL_GamepadBinding_output
-> SDL_GamepadBinding)
-> IO SDL_GamepadBinding_input
-> IO
(SDL_GamepadBindingType
-> SDL_GamepadBinding_output -> SDL_GamepadBinding)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "input"
-> Ptr SDL_GamepadBinding
-> IO (CFieldType SDL_GamepadBinding "input")
forall a (field :: Symbol).
(HasCField a field, ReadRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> IO (CFieldType a field)
HasCField.readRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"input") Ptr SDL_GamepadBinding
ptr0
IO
(SDL_GamepadBindingType
-> SDL_GamepadBinding_output -> SDL_GamepadBinding)
-> IO SDL_GamepadBindingType
-> IO (SDL_GamepadBinding_output -> SDL_GamepadBinding)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "output_type"
-> Ptr SDL_GamepadBinding
-> IO (CFieldType SDL_GamepadBinding "output_type")
forall a (field :: Symbol).
(HasCField a field, ReadRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> IO (CFieldType a field)
HasCField.readRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"output_type") Ptr SDL_GamepadBinding
ptr0
IO (SDL_GamepadBinding_output -> SDL_GamepadBinding)
-> IO SDL_GamepadBinding_output -> IO SDL_GamepadBinding
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "output"
-> Ptr SDL_GamepadBinding
-> IO (CFieldType SDL_GamepadBinding "output")
forall a (field :: Symbol).
(HasCField a field, ReadRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> IO (CFieldType a field)
HasCField.readRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"output") Ptr SDL_GamepadBinding
ptr0
instance Marshal.WriteRaw SDL_GamepadBinding where
writeRaw :: Ptr SDL_GamepadBinding -> SDL_GamepadBinding -> IO ()
writeRaw =
\Ptr SDL_GamepadBinding
ptr0 ->
\SDL_GamepadBinding
s1 ->
case SDL_GamepadBinding
s1 of
SDL_GamepadBinding SDL_GamepadBindingType
input_type2 SDL_GamepadBinding_input
input3 SDL_GamepadBindingType
output_type4 SDL_GamepadBinding_output
output5 ->
Proxy "input_type"
-> Ptr SDL_GamepadBinding
-> CFieldType SDL_GamepadBinding "input_type"
-> IO ()
forall a (field :: Symbol).
(HasCField a field, WriteRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> CFieldType a field -> IO ()
HasCField.writeRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"input_type") Ptr SDL_GamepadBinding
ptr0 CFieldType SDL_GamepadBinding "input_type"
SDL_GamepadBindingType
input_type2
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Proxy "input"
-> Ptr SDL_GamepadBinding
-> CFieldType SDL_GamepadBinding "input"
-> IO ()
forall a (field :: Symbol).
(HasCField a field, WriteRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> CFieldType a field -> IO ()
HasCField.writeRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"input") Ptr SDL_GamepadBinding
ptr0 CFieldType SDL_GamepadBinding "input"
SDL_GamepadBinding_input
input3
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Proxy "output_type"
-> Ptr SDL_GamepadBinding
-> CFieldType SDL_GamepadBinding "output_type"
-> IO ()
forall a (field :: Symbol).
(HasCField a field, WriteRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> CFieldType a field -> IO ()
HasCField.writeRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"output_type") Ptr SDL_GamepadBinding
ptr0 CFieldType SDL_GamepadBinding "output_type"
SDL_GamepadBindingType
output_type4
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Proxy "output"
-> Ptr SDL_GamepadBinding
-> CFieldType SDL_GamepadBinding "output"
-> IO ()
forall a (field :: Symbol).
(HasCField a field, WriteRaw (CFieldType a field)) =>
Proxy field -> Ptr a -> CFieldType a field -> IO ()
HasCField.writeRaw (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"output") Ptr SDL_GamepadBinding
ptr0 CFieldType SDL_GamepadBinding "output"
SDL_GamepadBinding_output
output5
deriving via Marshal.EquivStorable SDL_GamepadBinding instance BG.Storable SDL_GamepadBinding
deriving via
Struct.IsStructViaReadRaw SDL_GamepadBinding
instance
Struct.IsStruct SDL_GamepadBinding
instance
(ty ~ SDL_GamepadBindingType)
=> BG.CompatHasField.HasField "input_type" SDL_GamepadBinding ty
where
hasField :: SDL_GamepadBinding -> (ty -> SDL_GamepadBinding, ty)
hasField =
\SDL_GamepadBinding
x0 ->
( \ty
y1 ->
SDL_GamepadBinding
{ input_type :: SDL_GamepadBindingType
input_type = ty
SDL_GamepadBindingType
y1
, input :: SDL_GamepadBinding_input
input = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"input" SDL_GamepadBinding
x0
, output_type :: SDL_GamepadBindingType
output_type = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"output_type" SDL_GamepadBinding
x0
, output :: SDL_GamepadBinding_output
output = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"output" SDL_GamepadBinding
x0
}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"input_type" SDL_GamepadBinding
x0
)
instance
(ty ~ SDL_GamepadBindingType)
=> BG.HasField "input_type" (BG.Ptr SDL_GamepadBinding) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding -> Ptr ty
getField = Proxy "input_type"
-> Ptr SDL_GamepadBinding
-> Ptr (CFieldType SDL_GamepadBinding "input_type")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"input_type")
instance HasCField.HasCField SDL_GamepadBinding "input_type" where
type
CFieldType SDL_GamepadBinding "input_type" =
SDL_GamepadBindingType
offset# :: Proxy# SDL_GamepadBinding -> Proxy# "input_type" -> Int
offset# = \Proxy# SDL_GamepadBinding
_ -> \Proxy# "input_type"
_ -> Int
0
instance
(ty ~ SDL_GamepadBinding_input)
=> BG.CompatHasField.HasField "input" SDL_GamepadBinding ty
where
hasField :: SDL_GamepadBinding -> (ty -> SDL_GamepadBinding, ty)
hasField =
\SDL_GamepadBinding
x0 ->
( \ty
y1 ->
SDL_GamepadBinding
{ input :: SDL_GamepadBinding_input
input = ty
SDL_GamepadBinding_input
y1
, input_type :: SDL_GamepadBindingType
input_type = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"input_type" SDL_GamepadBinding
x0
, output_type :: SDL_GamepadBindingType
output_type = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"output_type" SDL_GamepadBinding
x0
, output :: SDL_GamepadBinding_output
output = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"output" SDL_GamepadBinding
x0
}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"input" SDL_GamepadBinding
x0
)
instance
(ty ~ SDL_GamepadBinding_input)
=> BG.HasField "input" (BG.Ptr SDL_GamepadBinding) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding -> Ptr ty
getField = Proxy "input"
-> Ptr SDL_GamepadBinding
-> Ptr (CFieldType SDL_GamepadBinding "input")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"input")
instance HasCField.HasCField SDL_GamepadBinding "input" where
type
CFieldType SDL_GamepadBinding "input" =
SDL_GamepadBinding_input
offset# :: Proxy# SDL_GamepadBinding -> Proxy# "input" -> Int
offset# = \Proxy# SDL_GamepadBinding
_ -> \Proxy# "input"
_ -> Int
4
instance
(ty ~ SDL_GamepadBindingType)
=> BG.CompatHasField.HasField "output_type" SDL_GamepadBinding ty
where
hasField :: SDL_GamepadBinding -> (ty -> SDL_GamepadBinding, ty)
hasField =
\SDL_GamepadBinding
x0 ->
( \ty
y1 ->
SDL_GamepadBinding
{ output_type :: SDL_GamepadBindingType
output_type = ty
SDL_GamepadBindingType
y1
, input_type :: SDL_GamepadBindingType
input_type = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"input_type" SDL_GamepadBinding
x0
, input :: SDL_GamepadBinding_input
input = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"input" SDL_GamepadBinding
x0
, output :: SDL_GamepadBinding_output
output = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"output" SDL_GamepadBinding
x0
}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"output_type" SDL_GamepadBinding
x0
)
instance
(ty ~ SDL_GamepadBindingType)
=> BG.HasField "output_type" (BG.Ptr SDL_GamepadBinding) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding -> Ptr ty
getField =
Proxy "output_type"
-> Ptr SDL_GamepadBinding
-> Ptr (CFieldType SDL_GamepadBinding "output_type")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"output_type")
instance HasCField.HasCField SDL_GamepadBinding "output_type" where
type
CFieldType SDL_GamepadBinding "output_type" =
SDL_GamepadBindingType
offset# :: Proxy# SDL_GamepadBinding -> Proxy# "output_type" -> Int
offset# = \Proxy# SDL_GamepadBinding
_ -> \Proxy# "output_type"
_ -> Int
16
instance
(ty ~ SDL_GamepadBinding_output)
=> BG.CompatHasField.HasField "output" SDL_GamepadBinding ty
where
hasField :: SDL_GamepadBinding -> (ty -> SDL_GamepadBinding, ty)
hasField =
\SDL_GamepadBinding
x0 ->
( \ty
y1 ->
SDL_GamepadBinding
{ output :: SDL_GamepadBinding_output
output = ty
SDL_GamepadBinding_output
y1
, input_type :: SDL_GamepadBindingType
input_type = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"input_type" SDL_GamepadBinding
x0
, input :: SDL_GamepadBinding_input
input = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"input" SDL_GamepadBinding
x0
, output_type :: SDL_GamepadBindingType
output_type = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"output_type" SDL_GamepadBinding
x0
}
, forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"output" SDL_GamepadBinding
x0
)
instance
(ty ~ SDL_GamepadBinding_output)
=> BG.HasField "output" (BG.Ptr SDL_GamepadBinding) (BG.Ptr ty)
where
getField :: Ptr SDL_GamepadBinding -> Ptr ty
getField = Proxy "output"
-> Ptr SDL_GamepadBinding
-> Ptr (CFieldType SDL_GamepadBinding "output")
forall a (field :: Symbol).
HasCField a field =>
Proxy field -> Ptr a -> Ptr (CFieldType a field)
HasCField.fromPtr (forall {k} (t :: k). Proxy t
forall (t :: Symbol). Proxy t
BG.Proxy @"output")
instance HasCField.HasCField SDL_GamepadBinding "output" where
type
CFieldType SDL_GamepadBinding "output" =
SDL_GamepadBinding_output
offset# :: Proxy# SDL_GamepadBinding -> Proxy# "output" -> Int
offset# = \Proxy# SDL_GamepadBinding
_ -> \Proxy# "output"
_ -> Int
20