{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE ExplicitForAll #-}
{-# 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 #-}

-- | Header file for SDL HIDAPI functions.
--
--     This is an adaptation of the original HIDAPI interface by Alan Ott, and includes source code licensed under the following license:
--
--     @
--     HIDAPI - Multi-Platform library for
--     communication with HID devices.
--
--     Copyright 2009, Alan Ott, Signal 11 Software.
--     All Rights Reserved.
--
--     This software may be used by anyone for any reason so
--     long as the copyright notice in the source files
--     remains intact.
--     @
--
--     (Note that this license is the same as item three of SDL\'s zlib license, so it adds no new requirements on the user.)
--
--     If you would like a version of SDL without this code, you can build SDL with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for example on iOS or tvOS to avoid a dependency on the CoreBluetooth framework. An opaque handle representing an open HID device.
--
--     @since 3.2.0
module SDL3.Sys.Bindgen.Hidapi (
  SDL3.Sys.Bindgen.Hidapi.SDL_hid_device,
  SDL3.Sys.Bindgen.Hidapi.SDL_hid_bus_type (..),
  pattern SDL3.Sys.Bindgen.Hidapi.SDL_HID_API_BUS_UNKNOWN,
  pattern SDL3.Sys.Bindgen.Hidapi.SDL_HID_API_BUS_USB,
  pattern SDL3.Sys.Bindgen.Hidapi.SDL_HID_API_BUS_BLUETOOTH,
  pattern SDL3.Sys.Bindgen.Hidapi.SDL_HID_API_BUS_I2C,
  pattern SDL3.Sys.Bindgen.Hidapi.SDL_HID_API_BUS_SPI,
  SDL3.Sys.Bindgen.Hidapi.SDL_hid_device_info (..),
  SDL3.Sys.Bindgen.Hidapi.sDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER,
)
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.LibC qualified
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

-- | [C declaration]: @struct SDL_hid_device@, defined at @SDL3\/SDL_hidapi.h 71:16@
data SDL_hid_device

-- | HID underlying bus types.
--
--     @since 3.2.0
--
--     [C declaration]: @enum SDL_hid_bus_type@, defined at @SDL3\/SDL_hidapi.h 78:14@
newtype SDL_hid_bus_type = SDL_hid_bus_type
  { SDL_hid_bus_type -> CUInt
unwrap :: BG.CUInt
  }
  deriving stock ((forall x. SDL_hid_bus_type -> Rep SDL_hid_bus_type x)
-> (forall x. Rep SDL_hid_bus_type x -> SDL_hid_bus_type)
-> Generic SDL_hid_bus_type
forall x. Rep SDL_hid_bus_type x -> SDL_hid_bus_type
forall x. SDL_hid_bus_type -> Rep SDL_hid_bus_type x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SDL_hid_bus_type -> Rep SDL_hid_bus_type x
from :: forall x. SDL_hid_bus_type -> Rep SDL_hid_bus_type x
$cto :: forall x. Rep SDL_hid_bus_type x -> SDL_hid_bus_type
to :: forall x. Rep SDL_hid_bus_type x -> SDL_hid_bus_type
BG.Generic, SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
(SDL_hid_bus_type -> SDL_hid_bus_type -> Bool)
-> (SDL_hid_bus_type -> SDL_hid_bus_type -> Bool)
-> Eq SDL_hid_bus_type
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
== :: SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
$c/= :: SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
/= :: SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
Eq, Eq SDL_hid_bus_type
Eq SDL_hid_bus_type =>
(SDL_hid_bus_type -> SDL_hid_bus_type -> Ordering)
-> (SDL_hid_bus_type -> SDL_hid_bus_type -> Bool)
-> (SDL_hid_bus_type -> SDL_hid_bus_type -> Bool)
-> (SDL_hid_bus_type -> SDL_hid_bus_type -> Bool)
-> (SDL_hid_bus_type -> SDL_hid_bus_type -> Bool)
-> (SDL_hid_bus_type -> SDL_hid_bus_type -> SDL_hid_bus_type)
-> (SDL_hid_bus_type -> SDL_hid_bus_type -> SDL_hid_bus_type)
-> Ord SDL_hid_bus_type
SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
SDL_hid_bus_type -> SDL_hid_bus_type -> Ordering
SDL_hid_bus_type -> SDL_hid_bus_type -> SDL_hid_bus_type
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_hid_bus_type -> SDL_hid_bus_type -> Ordering
compare :: SDL_hid_bus_type -> SDL_hid_bus_type -> Ordering
$c< :: SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
< :: SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
$c<= :: SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
<= :: SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
$c> :: SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
> :: SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
$c>= :: SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
>= :: SDL_hid_bus_type -> SDL_hid_bus_type -> Bool
$cmax :: SDL_hid_bus_type -> SDL_hid_bus_type -> SDL_hid_bus_type
max :: SDL_hid_bus_type -> SDL_hid_bus_type -> SDL_hid_bus_type
$cmin :: SDL_hid_bus_type -> SDL_hid_bus_type -> SDL_hid_bus_type
min :: SDL_hid_bus_type -> SDL_hid_bus_type -> SDL_hid_bus_type
Ord)
  deriving newtype (FFIType SDL_hid_bus_type -> SDL_hid_bus_type
SDL_hid_bus_type -> FFIType SDL_hid_bus_type
(SDL_hid_bus_type -> FFIType SDL_hid_bus_type)
-> (FFIType SDL_hid_bus_type -> SDL_hid_bus_type)
-> HasFFIType SDL_hid_bus_type
forall a. (a -> FFIType a) -> (FFIType a -> a) -> HasFFIType a
$ctoFFIType :: SDL_hid_bus_type -> FFIType SDL_hid_bus_type
toFFIType :: SDL_hid_bus_type -> FFIType SDL_hid_bus_type
$cfromFFIType :: FFIType SDL_hid_bus_type -> SDL_hid_bus_type
fromFFIType :: FFIType SDL_hid_bus_type -> SDL_hid_bus_type
BG.HasFFIType)

instance Marshal.StaticSize SDL_hid_bus_type where
  staticSizeOf :: Proxy SDL_hid_bus_type -> Int
staticSizeOf = \Proxy SDL_hid_bus_type
_ -> (Int
4 :: Int)

  staticAlignment :: Proxy SDL_hid_bus_type -> Int
staticAlignment = \Proxy SDL_hid_bus_type
_ -> (Int
4 :: Int)

instance Marshal.ReadRaw SDL_hid_bus_type where
  readRaw :: Ptr SDL_hid_bus_type -> IO SDL_hid_bus_type
readRaw =
    \Ptr SDL_hid_bus_type
ptr0 ->
      (CUInt -> SDL_hid_bus_type) -> IO (CUInt -> SDL_hid_bus_type)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure CUInt -> SDL_hid_bus_type
SDL_hid_bus_type
        IO (CUInt -> SDL_hid_bus_type) -> IO CUInt -> IO SDL_hid_bus_type
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_hid_bus_type -> Int -> IO CUInt
forall a b. ReadRaw a => Ptr b -> Int -> IO a
Marshal.readRawByteOff Ptr SDL_hid_bus_type
ptr0 (Int
0 :: Int)

instance Marshal.WriteRaw SDL_hid_bus_type where
  writeRaw :: Ptr SDL_hid_bus_type -> SDL_hid_bus_type -> IO ()
writeRaw =
    \Ptr SDL_hid_bus_type
ptr0 ->
      \SDL_hid_bus_type
s1 ->
        case SDL_hid_bus_type
s1 of
          SDL_hid_bus_type CUInt
unwrap2 ->
            Ptr SDL_hid_bus_type -> Int -> CUInt -> IO ()
forall a b. WriteRaw a => Ptr b -> Int -> a -> IO ()
Marshal.writeRawByteOff Ptr SDL_hid_bus_type
ptr0 (Int
0 :: Int) CUInt
unwrap2

deriving via Marshal.EquivStorable SDL_hid_bus_type instance BG.Storable SDL_hid_bus_type

deriving via BG.CUInt instance BG.Prim SDL_hid_bus_type

instance CEnum.CEnum SDL_hid_bus_type where
  type CEnumZ SDL_hid_bus_type = BG.CUInt

  toCEnum :: CEnumZ SDL_hid_bus_type -> SDL_hid_bus_type
toCEnum = CUInt -> SDL_hid_bus_type
CEnumZ SDL_hid_bus_type -> SDL_hid_bus_type
SDL_hid_bus_type

  fromCEnum :: SDL_hid_bus_type -> CEnumZ SDL_hid_bus_type
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_hid_bus_type -> DeclaredValues SDL_hid_bus_type
declaredValues =
    \proxy SDL_hid_bus_type
_ ->
      [(CEnumZ SDL_hid_bus_type, NonEmpty String)]
-> DeclaredValues SDL_hid_bus_type
forall a.
Ord (CEnumZ a) =>
[(CEnumZ a, NonEmpty String)] -> DeclaredValues a
CEnum.declaredValuesFromList
        [ (CUInt
CEnumZ SDL_hid_bus_type
0, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_HID_API_BUS_UNKNOWN")
        , (CUInt
CEnumZ SDL_hid_bus_type
1, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_HID_API_BUS_USB")
        , (CUInt
CEnumZ SDL_hid_bus_type
2, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_HID_API_BUS_BLUETOOTH")
        , (CUInt
CEnumZ SDL_hid_bus_type
3, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_HID_API_BUS_I2C")
        , (CUInt
CEnumZ SDL_hid_bus_type
4, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_HID_API_BUS_SPI")
        ]

  showsUndeclared :: forall (proxy :: * -> *).
proxy SDL_hid_bus_type -> Int -> CEnumZ SDL_hid_bus_type -> ShowS
showsUndeclared =
    String
-> proxy SDL_hid_bus_type
-> Int
-> CEnumZ SDL_hid_bus_type
-> ShowS
forall a (proxy :: * -> *).
Show (CEnumZ a) =>
String -> proxy a -> Int -> CEnumZ a -> ShowS
CEnum.showsWrappedUndeclared String
"SDL_hid_bus_type"

  readPrecUndeclared :: ReadPrec SDL_hid_bus_type
readPrecUndeclared =
    String -> ReadPrec SDL_hid_bus_type
forall a. (CEnum a, Read (CEnumZ a)) => String -> ReadPrec a
CEnum.readPrecWrappedUndeclared String
"SDL_hid_bus_type"

  isDeclared :: SDL_hid_bus_type -> Bool
isDeclared = SDL_hid_bus_type -> Bool
forall a. SequentialCEnum a => a -> Bool
CEnum.seqIsDeclared

  mkDeclared :: CEnumZ SDL_hid_bus_type -> Maybe SDL_hid_bus_type
mkDeclared = CEnumZ SDL_hid_bus_type -> Maybe SDL_hid_bus_type
forall a. SequentialCEnum a => CEnumZ a -> Maybe a
CEnum.seqMkDeclared

instance CEnum.SequentialCEnum SDL_hid_bus_type where
  minDeclaredValue :: SDL_hid_bus_type
minDeclaredValue = SDL_hid_bus_type
SDL_HID_API_BUS_UNKNOWN

  maxDeclaredValue :: SDL_hid_bus_type
maxDeclaredValue = SDL_hid_bus_type
SDL_HID_API_BUS_SPI

instance Show SDL_hid_bus_type where
  showsPrec :: Int -> SDL_hid_bus_type -> ShowS
showsPrec = Int -> SDL_hid_bus_type -> ShowS
forall a. CEnum a => Int -> a -> ShowS
CEnum.shows

instance Read SDL_hid_bus_type where
  readPrec :: ReadPrec SDL_hid_bus_type
readPrec = ReadPrec SDL_hid_bus_type
forall a. CEnum a => ReadPrec a
CEnum.readPrec

  readList :: ReadS [SDL_hid_bus_type]
readList = ReadS [SDL_hid_bus_type]
forall a. Read a => ReadS [a]
BG.readListDefault

  readListPrec :: ReadPrec [SDL_hid_bus_type]
readListPrec = ReadPrec [SDL_hid_bus_type]
forall a. Read a => ReadPrec [a]
BG.readListPrecDefault

instance
  (ty ~ BG.CUInt)
  => BG.CompatHasField.HasField "unwrap" SDL_hid_bus_type ty
  where
  hasField :: SDL_hid_bus_type -> (ty -> SDL_hid_bus_type, ty)
hasField =
    \SDL_hid_bus_type
x0 ->
      ( \ty
y1 ->
          SDL_hid_bus_type{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_hid_bus_type
x0
      )

instance
  (ty ~ BG.CUInt)
  => BG.HasField "unwrap" (BG.Ptr SDL_hid_bus_type) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_bus_type -> Ptr ty
getField = Proxy "unwrap"
-> Ptr SDL_hid_bus_type
-> Ptr (CFieldType SDL_hid_bus_type "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_hid_bus_type "unwrap" where
  type CFieldType SDL_hid_bus_type "unwrap" = BG.CUInt

  offset# :: Proxy# SDL_hid_bus_type -> Proxy# "unwrap" -> Int
offset# = \Proxy# SDL_hid_bus_type
_ -> \Proxy# "unwrap"
_ -> Int
0

-- | Unknown bus type
--
--     [C declaration]: @SDL_HID_API_BUS_UNKNOWN@, defined at @SDL3\/SDL_hidapi.h 80:5@
pattern SDL_HID_API_BUS_UNKNOWN :: SDL_hid_bus_type
pattern $mSDL_HID_API_BUS_UNKNOWN :: forall {r}. SDL_hid_bus_type -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_HID_API_BUS_UNKNOWN :: SDL_hid_bus_type
SDL_HID_API_BUS_UNKNOWN = SDL_hid_bus_type 0

-- | USB bus Specifications: [https:\/\/usb.org\/hid](https://usb.org/hid)
--
--     [C declaration]: @SDL_HID_API_BUS_USB@, defined at @SDL3\/SDL_hidapi.h 85:5@
pattern SDL_HID_API_BUS_USB :: SDL_hid_bus_type
pattern $mSDL_HID_API_BUS_USB :: forall {r}. SDL_hid_bus_type -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_HID_API_BUS_USB :: SDL_hid_bus_type
SDL_HID_API_BUS_USB = SDL_hid_bus_type 1

-- | Bluetooth or Bluetooth LE bus Specifications: [https:\/\/www.bluetooth.com\/specifications\/specs\/human-interface-device-profile-1-1-1\/](https://www.bluetooth.com/specifications/specs/human-interface-device-profile-1-1-1/) [https:\/\/www.bluetooth.com\/specifications\/specs\/hid-service-1-0\/](https://www.bluetooth.com/specifications/specs/hid-service-1-0/) [https:\/\/www.bluetooth.com\/specifications\/specs\/hid-over-gatt-profile-1-0\/](https://www.bluetooth.com/specifications/specs/hid-over-gatt-profile-1-0/)
--
--     [C declaration]: @SDL_HID_API_BUS_BLUETOOTH@, defined at @SDL3\/SDL_hidapi.h 92:5@
pattern SDL_HID_API_BUS_BLUETOOTH :: SDL_hid_bus_type
pattern $mSDL_HID_API_BUS_BLUETOOTH :: forall {r}. SDL_hid_bus_type -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_HID_API_BUS_BLUETOOTH :: SDL_hid_bus_type
SDL_HID_API_BUS_BLUETOOTH = SDL_hid_bus_type 2

-- | I2C bus Specifications: [https:\/\/docs.microsoft.com\/previous-versions\/windows\/hardware\/design\/dn642101(v=vs.85)](https://docs.microsoft.com/previous-versions/windows/hardware/design/dn642101(v=vs.85))
--
--     [C declaration]: @SDL_HID_API_BUS_I2C@, defined at @SDL3\/SDL_hidapi.h 97:5@
pattern SDL_HID_API_BUS_I2C :: SDL_hid_bus_type
pattern $mSDL_HID_API_BUS_I2C :: forall {r}. SDL_hid_bus_type -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_HID_API_BUS_I2C :: SDL_hid_bus_type
SDL_HID_API_BUS_I2C = SDL_hid_bus_type 3

-- | SPI bus Specifications: [https:\/\/www.microsoft.com\/download\/details.aspx?id=103325](https://www.microsoft.com/download/details.aspx?id=103325)
--
--     [C declaration]: @SDL_HID_API_BUS_SPI@, defined at @SDL3\/SDL_hidapi.h 102:5@
pattern SDL_HID_API_BUS_SPI :: SDL_hid_bus_type
pattern $mSDL_HID_API_BUS_SPI :: forall {r}. SDL_hid_bus_type -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_HID_API_BUS_SPI :: SDL_hid_bus_type
SDL_HID_API_BUS_SPI = SDL_hid_bus_type 4

-- | hidapi info structure Information about a connected HID device
--
--     @since 3.2.0
--
--     [C declaration]: @struct SDL_hid_device_info@, defined at @SDL3\/SDL_hidapi.h 113:16@
data SDL_hid_device_info = SDL_hid_device_info
  { SDL_hid_device_info -> Ptr CChar
path :: BG.Ptr BG.CChar
  -- ^ Platform-specific device path
  --
  --          [C declaration]: @path@, defined at @SDL3\/SDL_hidapi.h 116:11@
  , SDL_hid_device_info -> CUShort
vendor_id :: BG.CUShort
  -- ^ Device Vendor ID
  --
  --          [C declaration]: @vendor_id@, defined at @SDL3\/SDL_hidapi.h 118:20@
  , SDL_hid_device_info -> CUShort
product_id :: BG.CUShort
  -- ^ Device Product ID
  --
  --          [C declaration]: @product_id@, defined at @SDL3\/SDL_hidapi.h 120:20@
  , SDL_hid_device_info -> Ptr CWchar
serial_number :: BG.Ptr HsBindgen.Runtime.LibC.CWchar
  -- ^ Serial Number
  --
  --          [C declaration]: @serial_number@, defined at @SDL3\/SDL_hidapi.h 122:14@
  , SDL_hid_device_info -> CUShort
release_number :: BG.CUShort
  -- ^ Device Release Number in binary-coded decimal, also known as Device Version Number
  --
  --          [C declaration]: @release_number@, defined at @SDL3\/SDL_hidapi.h 125:20@
  , SDL_hid_device_info -> Ptr CWchar
manufacturer_string :: BG.Ptr HsBindgen.Runtime.LibC.CWchar
  -- ^ Manufacturer String
  --
  --          [C declaration]: @manufacturer_string@, defined at @SDL3\/SDL_hidapi.h 127:14@
  , SDL_hid_device_info -> Ptr CWchar
product_string :: BG.Ptr HsBindgen.Runtime.LibC.CWchar
  -- ^ Product string
  --
  --          [C declaration]: @product_string@, defined at @SDL3\/SDL_hidapi.h 129:14@
  , SDL_hid_device_info -> CUShort
usage_page :: BG.CUShort
  -- ^ Usage Page for this Device\/Interface (Windows\/Mac\/hidraw only)
  --
  --          [C declaration]: @usage_page@, defined at @SDL3\/SDL_hidapi.h 132:20@
  , SDL_hid_device_info -> CUShort
usage :: BG.CUShort
  -- ^ Usage for this Device\/Interface (Windows\/Mac\/hidraw only)
  --
  --          [C declaration]: @usage@, defined at @SDL3\/SDL_hidapi.h 135:20@
  , SDL_hid_device_info -> CInt
interface_number :: BG.CInt
  -- ^ The USB interface which this logical device represents.
  --
  --          Valid only if the device is a USB HID device. Set to -1 in all other cases.
  --
  --          [C declaration]: @interface_number@, defined at @SDL3\/SDL_hidapi.h 142:9@
  , SDL_hid_device_info -> CInt
interface_class :: BG.CInt
  -- ^ Additional information about the USB interface. Valid on libusb and Android implementations.
  --
  --          [C declaration]: @interface_class@, defined at @SDL3\/SDL_hidapi.h 146:9@
  , SDL_hid_device_info -> CInt
interface_subclass :: BG.CInt
  -- ^ [C declaration]: @interface_subclass@, defined at @SDL3\/SDL_hidapi.h 147:9@
  , SDL_hid_device_info -> CInt
interface_protocol :: BG.CInt
  -- ^ [C declaration]: @interface_protocol@, defined at @SDL3\/SDL_hidapi.h 148:9@
  , SDL_hid_device_info -> SDL_hid_bus_type
bus_type :: SDL_hid_bus_type
  -- ^ Underlying bus type
  --
  --          [C declaration]: @bus_type@, defined at @SDL3\/SDL_hidapi.h 151:22@
  , SDL_hid_device_info -> Ptr SDL_hid_device_info
next :: BG.Ptr SDL_hid_device_info
  -- ^ Pointer to the next device
  --
  --          [C declaration]: @next@, defined at @SDL3\/SDL_hidapi.h 154:33@
  }
  deriving stock ((forall x. SDL_hid_device_info -> Rep SDL_hid_device_info x)
-> (forall x. Rep SDL_hid_device_info x -> SDL_hid_device_info)
-> Generic SDL_hid_device_info
forall x. Rep SDL_hid_device_info x -> SDL_hid_device_info
forall x. SDL_hid_device_info -> Rep SDL_hid_device_info x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SDL_hid_device_info -> Rep SDL_hid_device_info x
from :: forall x. SDL_hid_device_info -> Rep SDL_hid_device_info x
$cto :: forall x. Rep SDL_hid_device_info x -> SDL_hid_device_info
to :: forall x. Rep SDL_hid_device_info x -> SDL_hid_device_info
BG.Generic, SDL_hid_device_info -> SDL_hid_device_info -> Bool
(SDL_hid_device_info -> SDL_hid_device_info -> Bool)
-> (SDL_hid_device_info -> SDL_hid_device_info -> Bool)
-> Eq SDL_hid_device_info
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_hid_device_info -> SDL_hid_device_info -> Bool
== :: SDL_hid_device_info -> SDL_hid_device_info -> Bool
$c/= :: SDL_hid_device_info -> SDL_hid_device_info -> Bool
/= :: SDL_hid_device_info -> SDL_hid_device_info -> Bool
Eq, Int -> SDL_hid_device_info -> ShowS
[SDL_hid_device_info] -> ShowS
SDL_hid_device_info -> String
(Int -> SDL_hid_device_info -> ShowS)
-> (SDL_hid_device_info -> String)
-> ([SDL_hid_device_info] -> ShowS)
-> Show SDL_hid_device_info
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SDL_hid_device_info -> ShowS
showsPrec :: Int -> SDL_hid_device_info -> ShowS
$cshow :: SDL_hid_device_info -> String
show :: SDL_hid_device_info -> String
$cshowList :: [SDL_hid_device_info] -> ShowS
showList :: [SDL_hid_device_info] -> ShowS
Show)

instance Marshal.StaticSize SDL_hid_device_info where
  staticSizeOf :: Proxy SDL_hid_device_info -> Int
staticSizeOf = \Proxy SDL_hid_device_info
_ -> (Int
80 :: Int)

  staticAlignment :: Proxy SDL_hid_device_info -> Int
staticAlignment = \Proxy SDL_hid_device_info
_ -> (Int
8 :: Int)

instance Marshal.ReadRaw SDL_hid_device_info where
  readRaw :: Ptr SDL_hid_device_info -> IO SDL_hid_device_info
readRaw =
    \Ptr SDL_hid_device_info
ptr0 ->
      (Ptr CChar
 -> CUShort
 -> CUShort
 -> Ptr CWchar
 -> CUShort
 -> Ptr CWchar
 -> Ptr CWchar
 -> CUShort
 -> CUShort
 -> CInt
 -> CInt
 -> CInt
 -> CInt
 -> SDL_hid_bus_type
 -> Ptr SDL_hid_device_info
 -> SDL_hid_device_info)
-> IO
     (Ptr CChar
      -> CUShort
      -> CUShort
      -> Ptr CWchar
      -> CUShort
      -> Ptr CWchar
      -> Ptr CWchar
      -> CUShort
      -> CUShort
      -> CInt
      -> CInt
      -> CInt
      -> CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr CChar
-> CUShort
-> CUShort
-> Ptr CWchar
-> CUShort
-> Ptr CWchar
-> Ptr CWchar
-> CUShort
-> CUShort
-> CInt
-> CInt
-> CInt
-> CInt
-> SDL_hid_bus_type
-> Ptr SDL_hid_device_info
-> SDL_hid_device_info
SDL_hid_device_info
        IO
  (Ptr CChar
   -> CUShort
   -> CUShort
   -> Ptr CWchar
   -> CUShort
   -> Ptr CWchar
   -> Ptr CWchar
   -> CUShort
   -> CUShort
   -> CInt
   -> CInt
   -> CInt
   -> CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO (Ptr CChar)
-> IO
     (CUShort
      -> CUShort
      -> Ptr CWchar
      -> CUShort
      -> Ptr CWchar
      -> Ptr CWchar
      -> CUShort
      -> CUShort
      -> CInt
      -> CInt
      -> CInt
      -> CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "path"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "path")
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 @"path") Ptr SDL_hid_device_info
ptr0
        IO
  (CUShort
   -> CUShort
   -> Ptr CWchar
   -> CUShort
   -> Ptr CWchar
   -> Ptr CWchar
   -> CUShort
   -> CUShort
   -> CInt
   -> CInt
   -> CInt
   -> CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO CUShort
-> IO
     (CUShort
      -> Ptr CWchar
      -> CUShort
      -> Ptr CWchar
      -> Ptr CWchar
      -> CUShort
      -> CUShort
      -> CInt
      -> CInt
      -> CInt
      -> CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "vendor_id"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "vendor_id")
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 @"vendor_id") Ptr SDL_hid_device_info
ptr0
        IO
  (CUShort
   -> Ptr CWchar
   -> CUShort
   -> Ptr CWchar
   -> Ptr CWchar
   -> CUShort
   -> CUShort
   -> CInt
   -> CInt
   -> CInt
   -> CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO CUShort
-> IO
     (Ptr CWchar
      -> CUShort
      -> Ptr CWchar
      -> Ptr CWchar
      -> CUShort
      -> CUShort
      -> CInt
      -> CInt
      -> CInt
      -> CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "product_id"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "product_id")
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 @"product_id") Ptr SDL_hid_device_info
ptr0
        IO
  (Ptr CWchar
   -> CUShort
   -> Ptr CWchar
   -> Ptr CWchar
   -> CUShort
   -> CUShort
   -> CInt
   -> CInt
   -> CInt
   -> CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO (Ptr CWchar)
-> IO
     (CUShort
      -> Ptr CWchar
      -> Ptr CWchar
      -> CUShort
      -> CUShort
      -> CInt
      -> CInt
      -> CInt
      -> CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "serial_number"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "serial_number")
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 @"serial_number") Ptr SDL_hid_device_info
ptr0
        IO
  (CUShort
   -> Ptr CWchar
   -> Ptr CWchar
   -> CUShort
   -> CUShort
   -> CInt
   -> CInt
   -> CInt
   -> CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO CUShort
-> IO
     (Ptr CWchar
      -> Ptr CWchar
      -> CUShort
      -> CUShort
      -> CInt
      -> CInt
      -> CInt
      -> CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "release_number"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "release_number")
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 @"release_number") Ptr SDL_hid_device_info
ptr0
        IO
  (Ptr CWchar
   -> Ptr CWchar
   -> CUShort
   -> CUShort
   -> CInt
   -> CInt
   -> CInt
   -> CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO (Ptr CWchar)
-> IO
     (Ptr CWchar
      -> CUShort
      -> CUShort
      -> CInt
      -> CInt
      -> CInt
      -> CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "manufacturer_string"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "manufacturer_string")
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 @"manufacturer_string") Ptr SDL_hid_device_info
ptr0
        IO
  (Ptr CWchar
   -> CUShort
   -> CUShort
   -> CInt
   -> CInt
   -> CInt
   -> CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO (Ptr CWchar)
-> IO
     (CUShort
      -> CUShort
      -> CInt
      -> CInt
      -> CInt
      -> CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "product_string"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "product_string")
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 @"product_string") Ptr SDL_hid_device_info
ptr0
        IO
  (CUShort
   -> CUShort
   -> CInt
   -> CInt
   -> CInt
   -> CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO CUShort
-> IO
     (CUShort
      -> CInt
      -> CInt
      -> CInt
      -> CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "usage_page"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "usage_page")
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 @"usage_page") Ptr SDL_hid_device_info
ptr0
        IO
  (CUShort
   -> CInt
   -> CInt
   -> CInt
   -> CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO CUShort
-> IO
     (CInt
      -> CInt
      -> CInt
      -> CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "usage"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "usage")
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 @"usage") Ptr SDL_hid_device_info
ptr0
        IO
  (CInt
   -> CInt
   -> CInt
   -> CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO CInt
-> IO
     (CInt
      -> CInt
      -> CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "interface_number"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "interface_number")
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 @"interface_number") Ptr SDL_hid_device_info
ptr0
        IO
  (CInt
   -> CInt
   -> CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO CInt
-> IO
     (CInt
      -> CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "interface_class"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "interface_class")
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 @"interface_class") Ptr SDL_hid_device_info
ptr0
        IO
  (CInt
   -> CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO CInt
-> IO
     (CInt
      -> SDL_hid_bus_type
      -> Ptr SDL_hid_device_info
      -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "interface_subclass"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "interface_subclass")
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 @"interface_subclass") Ptr SDL_hid_device_info
ptr0
        IO
  (CInt
   -> SDL_hid_bus_type
   -> Ptr SDL_hid_device_info
   -> SDL_hid_device_info)
-> IO CInt
-> IO
     (SDL_hid_bus_type
      -> Ptr SDL_hid_device_info -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "interface_protocol"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "interface_protocol")
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 @"interface_protocol") Ptr SDL_hid_device_info
ptr0
        IO
  (SDL_hid_bus_type
   -> Ptr SDL_hid_device_info -> SDL_hid_device_info)
-> IO SDL_hid_bus_type
-> IO (Ptr SDL_hid_device_info -> SDL_hid_device_info)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "bus_type"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "bus_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 @"bus_type") Ptr SDL_hid_device_info
ptr0
        IO (Ptr SDL_hid_device_info -> SDL_hid_device_info)
-> IO (Ptr SDL_hid_device_info) -> IO SDL_hid_device_info
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "next"
-> Ptr SDL_hid_device_info
-> IO (CFieldType SDL_hid_device_info "next")
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 @"next") Ptr SDL_hid_device_info
ptr0

instance Marshal.WriteRaw SDL_hid_device_info where
  writeRaw :: Ptr SDL_hid_device_info -> SDL_hid_device_info -> IO ()
writeRaw =
    \Ptr SDL_hid_device_info
ptr0 ->
      \SDL_hid_device_info
s1 ->
        case SDL_hid_device_info
s1 of
          SDL_hid_device_info
            Ptr CChar
path2
            CUShort
vendor_id3
            CUShort
product_id4
            Ptr CWchar
serial_number5
            CUShort
release_number6
            Ptr CWchar
manufacturer_string7
            Ptr CWchar
product_string8
            CUShort
usage_page9
            CUShort
usage10
            CInt
interface_number11
            CInt
interface_class12
            CInt
interface_subclass13
            CInt
interface_protocol14
            SDL_hid_bus_type
bus_type15
            Ptr SDL_hid_device_info
next16 ->
              Proxy "path"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "path"
-> 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 @"path") Ptr SDL_hid_device_info
ptr0 Ptr CChar
CFieldType SDL_hid_device_info "path"
path2
                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 "vendor_id"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "vendor_id"
-> 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 @"vendor_id") Ptr SDL_hid_device_info
ptr0 CUShort
CFieldType SDL_hid_device_info "vendor_id"
vendor_id3
                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 "product_id"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "product_id"
-> 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 @"product_id") Ptr SDL_hid_device_info
ptr0 CUShort
CFieldType SDL_hid_device_info "product_id"
product_id4
                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 "serial_number"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "serial_number"
-> 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 @"serial_number") Ptr SDL_hid_device_info
ptr0 Ptr CWchar
CFieldType SDL_hid_device_info "serial_number"
serial_number5
                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 "release_number"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "release_number"
-> 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 @"release_number") Ptr SDL_hid_device_info
ptr0 CUShort
CFieldType SDL_hid_device_info "release_number"
release_number6
                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 "manufacturer_string"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "manufacturer_string"
-> 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 @"manufacturer_string") Ptr SDL_hid_device_info
ptr0 Ptr CWchar
CFieldType SDL_hid_device_info "manufacturer_string"
manufacturer_string7
                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 "product_string"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "product_string"
-> 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 @"product_string") Ptr SDL_hid_device_info
ptr0 Ptr CWchar
CFieldType SDL_hid_device_info "product_string"
product_string8
                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 "usage_page"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "usage_page"
-> 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 @"usage_page") Ptr SDL_hid_device_info
ptr0 CUShort
CFieldType SDL_hid_device_info "usage_page"
usage_page9
                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 "usage"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "usage"
-> 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 @"usage") Ptr SDL_hid_device_info
ptr0 CUShort
CFieldType SDL_hid_device_info "usage"
usage10
                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 "interface_number"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "interface_number"
-> 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 @"interface_number") Ptr SDL_hid_device_info
ptr0 CInt
CFieldType SDL_hid_device_info "interface_number"
interface_number11
                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 "interface_class"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "interface_class"
-> 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 @"interface_class") Ptr SDL_hid_device_info
ptr0 CInt
CFieldType SDL_hid_device_info "interface_class"
interface_class12
                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 "interface_subclass"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "interface_subclass"
-> 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 @"interface_subclass") Ptr SDL_hid_device_info
ptr0 CInt
CFieldType SDL_hid_device_info "interface_subclass"
interface_subclass13
                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 "interface_protocol"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "interface_protocol"
-> 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 @"interface_protocol") Ptr SDL_hid_device_info
ptr0 CInt
CFieldType SDL_hid_device_info "interface_protocol"
interface_protocol14
                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 "bus_type"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "bus_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 @"bus_type") Ptr SDL_hid_device_info
ptr0 CFieldType SDL_hid_device_info "bus_type"
SDL_hid_bus_type
bus_type15
                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 "next"
-> Ptr SDL_hid_device_info
-> CFieldType SDL_hid_device_info "next"
-> 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 @"next") Ptr SDL_hid_device_info
ptr0 Ptr SDL_hid_device_info
CFieldType SDL_hid_device_info "next"
next16

deriving via Marshal.EquivStorable SDL_hid_device_info instance BG.Storable SDL_hid_device_info

deriving via
  Struct.IsStructViaReadRaw SDL_hid_device_info
  instance
    Struct.IsStruct SDL_hid_device_info

-- | Platform-specific device path
--
--     [C declaration]: @path@, defined at @SDL3\/SDL_hidapi.h 116:11@
instance
  (ty ~ BG.Ptr BG.CChar)
  => BG.CompatHasField.HasField "path" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { path :: Ptr CChar
path = ty
Ptr CChar
y1
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"path" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.Ptr BG.CChar)
  => BG.HasField "path" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField = Proxy "path"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "path")
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 @"path")

instance HasCField.HasCField SDL_hid_device_info "path" where
  type
    CFieldType SDL_hid_device_info "path" =
      BG.Ptr BG.CChar

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "path" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "path"
_ -> Int
0

-- | Device Vendor ID
--
--     [C declaration]: @vendor_id@, defined at @SDL3\/SDL_hidapi.h 118:20@
instance
  (ty ~ BG.CUShort)
  => BG.CompatHasField.HasField "vendor_id" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { vendor_id :: CUShort
vendor_id = ty
CUShort
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"vendor_id" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.CUShort)
  => BG.HasField "vendor_id" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField = Proxy "vendor_id"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "vendor_id")
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 @"vendor_id")

instance HasCField.HasCField SDL_hid_device_info "vendor_id" where
  type
    CFieldType SDL_hid_device_info "vendor_id" =
      BG.CUShort

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "vendor_id" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "vendor_id"
_ -> Int
8

-- | Device Product ID
--
--     [C declaration]: @product_id@, defined at @SDL3\/SDL_hidapi.h 120:20@
instance
  (ty ~ BG.CUShort)
  => BG.CompatHasField.HasField "product_id" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { product_id :: CUShort
product_id = ty
CUShort
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"product_id" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.CUShort)
  => BG.HasField "product_id" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField = Proxy "product_id"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "product_id")
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 @"product_id")

instance HasCField.HasCField SDL_hid_device_info "product_id" where
  type
    CFieldType SDL_hid_device_info "product_id" =
      BG.CUShort

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "product_id" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "product_id"
_ -> Int
10

-- | Serial Number
--
--     [C declaration]: @serial_number@, defined at @SDL3\/SDL_hidapi.h 122:14@
instance
  (ty ~ BG.Ptr HsBindgen.Runtime.LibC.CWchar)
  => BG.CompatHasField.HasField "serial_number" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { serial_number :: Ptr CWchar
serial_number = ty
Ptr CWchar
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"serial_number" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.Ptr HsBindgen.Runtime.LibC.CWchar)
  => BG.HasField "serial_number" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField =
    Proxy "serial_number"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "serial_number")
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 @"serial_number")

instance HasCField.HasCField SDL_hid_device_info "serial_number" where
  type
    CFieldType SDL_hid_device_info "serial_number" =
      BG.Ptr HsBindgen.Runtime.LibC.CWchar

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "serial_number" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "serial_number"
_ -> Int
16

-- | Device Release Number in binary-coded decimal, also known as Device Version Number
--
--     [C declaration]: @release_number@, defined at @SDL3\/SDL_hidapi.h 125:20@
instance
  (ty ~ BG.CUShort)
  => BG.CompatHasField.HasField "release_number" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { release_number :: CUShort
release_number = ty
CUShort
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"release_number" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.CUShort)
  => BG.HasField "release_number" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField =
    Proxy "release_number"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "release_number")
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 @"release_number")

instance HasCField.HasCField SDL_hid_device_info "release_number" where
  type
    CFieldType SDL_hid_device_info "release_number" =
      BG.CUShort

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "release_number" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "release_number"
_ -> Int
24

-- | Manufacturer String
--
--     [C declaration]: @manufacturer_string@, defined at @SDL3\/SDL_hidapi.h 127:14@
instance
  (ty ~ BG.Ptr HsBindgen.Runtime.LibC.CWchar)
  => BG.CompatHasField.HasField "manufacturer_string" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { manufacturer_string :: Ptr CWchar
manufacturer_string = ty
Ptr CWchar
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"manufacturer_string" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.Ptr HsBindgen.Runtime.LibC.CWchar)
  => BG.HasField "manufacturer_string" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField =
    Proxy "manufacturer_string"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "manufacturer_string")
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 @"manufacturer_string")

instance HasCField.HasCField SDL_hid_device_info "manufacturer_string" where
  type
    CFieldType SDL_hid_device_info "manufacturer_string" =
      BG.Ptr HsBindgen.Runtime.LibC.CWchar

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "manufacturer_string" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "manufacturer_string"
_ -> Int
32

-- | Product string
--
--     [C declaration]: @product_string@, defined at @SDL3\/SDL_hidapi.h 129:14@
instance
  (ty ~ BG.Ptr HsBindgen.Runtime.LibC.CWchar)
  => BG.CompatHasField.HasField "product_string" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { product_string :: Ptr CWchar
product_string = ty
Ptr CWchar
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"product_string" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.Ptr HsBindgen.Runtime.LibC.CWchar)
  => BG.HasField "product_string" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField =
    Proxy "product_string"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "product_string")
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 @"product_string")

instance HasCField.HasCField SDL_hid_device_info "product_string" where
  type
    CFieldType SDL_hid_device_info "product_string" =
      BG.Ptr HsBindgen.Runtime.LibC.CWchar

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "product_string" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "product_string"
_ -> Int
40

-- | Usage Page for this Device\/Interface (Windows\/Mac\/hidraw only)
--
--     [C declaration]: @usage_page@, defined at @SDL3\/SDL_hidapi.h 132:20@
instance
  (ty ~ BG.CUShort)
  => BG.CompatHasField.HasField "usage_page" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { usage_page :: CUShort
usage_page = ty
CUShort
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"usage_page" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.CUShort)
  => BG.HasField "usage_page" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField = Proxy "usage_page"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "usage_page")
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 @"usage_page")

instance HasCField.HasCField SDL_hid_device_info "usage_page" where
  type
    CFieldType SDL_hid_device_info "usage_page" =
      BG.CUShort

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "usage_page" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "usage_page"
_ -> Int
48

-- | Usage for this Device\/Interface (Windows\/Mac\/hidraw only)
--
--     [C declaration]: @usage@, defined at @SDL3\/SDL_hidapi.h 135:20@
instance
  (ty ~ BG.CUShort)
  => BG.CompatHasField.HasField "usage" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { usage :: CUShort
usage = ty
CUShort
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"usage" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.CUShort)
  => BG.HasField "usage" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField = Proxy "usage"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "usage")
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 @"usage")

instance HasCField.HasCField SDL_hid_device_info "usage" where
  type
    CFieldType SDL_hid_device_info "usage" =
      BG.CUShort

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "usage" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "usage"
_ -> Int
50

-- | The USB interface which this logical device represents.
--
--     Valid only if the device is a USB HID device. Set to -1 in all other cases.
--
--     [C declaration]: @interface_number@, defined at @SDL3\/SDL_hidapi.h 142:9@
instance
  (ty ~ BG.CInt)
  => BG.CompatHasField.HasField "interface_number" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { interface_number :: CInt
interface_number = ty
CInt
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"interface_number" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.CInt)
  => BG.HasField "interface_number" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField =
    Proxy "interface_number"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "interface_number")
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 @"interface_number")

instance HasCField.HasCField SDL_hid_device_info "interface_number" where
  type
    CFieldType SDL_hid_device_info "interface_number" =
      BG.CInt

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "interface_number" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "interface_number"
_ -> Int
52

-- | Additional information about the USB interface. Valid on libusb and Android implementations.
--
--     [C declaration]: @interface_class@, defined at @SDL3\/SDL_hidapi.h 146:9@
instance
  (ty ~ BG.CInt)
  => BG.CompatHasField.HasField "interface_class" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { interface_class :: CInt
interface_class = ty
CInt
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"interface_class" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.CInt)
  => BG.HasField "interface_class" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField =
    Proxy "interface_class"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "interface_class")
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 @"interface_class")

instance HasCField.HasCField SDL_hid_device_info "interface_class" where
  type
    CFieldType SDL_hid_device_info "interface_class" =
      BG.CInt

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "interface_class" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "interface_class"
_ -> Int
56

-- | [C declaration]: @interface_subclass@, defined at @SDL3\/SDL_hidapi.h 147:9@
instance
  (ty ~ BG.CInt)
  => BG.CompatHasField.HasField "interface_subclass" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { interface_subclass :: CInt
interface_subclass = ty
CInt
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"interface_subclass" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.CInt)
  => BG.HasField "interface_subclass" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField =
    Proxy "interface_subclass"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "interface_subclass")
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 @"interface_subclass")

instance HasCField.HasCField SDL_hid_device_info "interface_subclass" where
  type
    CFieldType SDL_hid_device_info "interface_subclass" =
      BG.CInt

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "interface_subclass" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "interface_subclass"
_ -> Int
60

-- | [C declaration]: @interface_protocol@, defined at @SDL3\/SDL_hidapi.h 148:9@
instance
  (ty ~ BG.CInt)
  => BG.CompatHasField.HasField "interface_protocol" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { interface_protocol :: CInt
interface_protocol = ty
CInt
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"interface_protocol" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.CInt)
  => BG.HasField "interface_protocol" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField =
    Proxy "interface_protocol"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "interface_protocol")
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 @"interface_protocol")

instance HasCField.HasCField SDL_hid_device_info "interface_protocol" where
  type
    CFieldType SDL_hid_device_info "interface_protocol" =
      BG.CInt

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "interface_protocol" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "interface_protocol"
_ -> Int
64

-- | Underlying bus type
--
--     [C declaration]: @bus_type@, defined at @SDL3\/SDL_hidapi.h 151:22@
instance
  (ty ~ SDL_hid_bus_type)
  => BG.CompatHasField.HasField "bus_type" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { bus_type :: SDL_hid_bus_type
bus_type = ty
SDL_hid_bus_type
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , next :: Ptr SDL_hid_device_info
next = 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 @"next" SDL_hid_device_info
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 @"bus_type" SDL_hid_device_info
x0
      )

instance
  (ty ~ SDL_hid_bus_type)
  => BG.HasField "bus_type" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField = Proxy "bus_type"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "bus_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 @"bus_type")

instance HasCField.HasCField SDL_hid_device_info "bus_type" where
  type
    CFieldType SDL_hid_device_info "bus_type" =
      SDL_hid_bus_type

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "bus_type" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "bus_type"
_ -> Int
68

-- | Pointer to the next device
--
--     [C declaration]: @next@, defined at @SDL3\/SDL_hidapi.h 154:33@
instance
  (ty ~ BG.Ptr SDL_hid_device_info)
  => BG.CompatHasField.HasField "next" SDL_hid_device_info ty
  where
  hasField :: SDL_hid_device_info -> (ty -> SDL_hid_device_info, ty)
hasField =
    \SDL_hid_device_info
x0 ->
      ( \ty
y1 ->
          SDL_hid_device_info
            { next :: Ptr SDL_hid_device_info
next = ty
Ptr SDL_hid_device_info
y1
            , path :: Ptr CChar
path = 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 @"path" SDL_hid_device_info
x0
            , vendor_id :: CUShort
vendor_id = 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 @"vendor_id" SDL_hid_device_info
x0
            , product_id :: CUShort
product_id = 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 @"product_id" SDL_hid_device_info
x0
            , serial_number :: Ptr CWchar
serial_number = 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 @"serial_number" SDL_hid_device_info
x0
            , release_number :: CUShort
release_number = 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 @"release_number" SDL_hid_device_info
x0
            , manufacturer_string :: Ptr CWchar
manufacturer_string = 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 @"manufacturer_string" SDL_hid_device_info
x0
            , product_string :: Ptr CWchar
product_string = 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 @"product_string" SDL_hid_device_info
x0
            , usage_page :: CUShort
usage_page = 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 @"usage_page" SDL_hid_device_info
x0
            , usage :: CUShort
usage = 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 @"usage" SDL_hid_device_info
x0
            , interface_number :: CInt
interface_number = 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 @"interface_number" SDL_hid_device_info
x0
            , interface_class :: CInt
interface_class = 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 @"interface_class" SDL_hid_device_info
x0
            , interface_subclass :: CInt
interface_subclass = 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 @"interface_subclass" SDL_hid_device_info
x0
            , interface_protocol :: CInt
interface_protocol = 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 @"interface_protocol" SDL_hid_device_info
x0
            , bus_type :: SDL_hid_bus_type
bus_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 @"bus_type" SDL_hid_device_info
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 @"next" SDL_hid_device_info
x0
      )

instance
  (ty ~ BG.Ptr SDL_hid_device_info)
  => BG.HasField "next" (BG.Ptr SDL_hid_device_info) (BG.Ptr ty)
  where
  getField :: Ptr SDL_hid_device_info -> Ptr ty
getField = Proxy "next"
-> Ptr SDL_hid_device_info
-> Ptr (CFieldType SDL_hid_device_info "next")
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 @"next")

instance HasCField.HasCField SDL_hid_device_info "next" where
  type
    CFieldType SDL_hid_device_info "next" =
      BG.Ptr SDL_hid_device_info

  offset# :: Proxy# SDL_hid_device_info -> Proxy# "next" -> Int
offset# = \Proxy# SDL_hid_device_info
_ -> \Proxy# "next"
_ -> Int
72

-- | [C declaration]: @macro SDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER@, literal @\"SDL.hidapi.libusb.device.handle\"@, defined at @SDL3\/SDL_hidapi.h 303:9@
sDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER :: BG.ByteString
sDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER :: ByteString
sDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER =
  [Word8] -> ByteString
BG.pack
    [ Word8
0x53
    , Word8
0x44
    , Word8
0x4C
    , Word8
0x2E
    , Word8
0x68
    , Word8
0x69
    , Word8
0x64
    , Word8
0x61
    , Word8
0x70
    , Word8
0x69
    , Word8
0x2E
    , Word8
0x6C
    , Word8
0x69
    , Word8
0x62
    , Word8
0x75
    , Word8
0x73
    , Word8
0x62
    , Word8
0x2E
    , Word8
0x64
    , Word8
0x65
    , Word8
0x76
    , Word8
0x69
    , Word8
0x63
    , Word8
0x65
    , Word8
0x2E
    , Word8
0x68
    , Word8
0x61
    , Word8
0x6E
    , Word8
0x64
    , Word8
0x6C
    , Word8
0x65
    ]