{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}

-- | Simple log messages with priorities and categories. A message\'s 'SDL_LogPriority' signifies how important the message is. A message\'s 'SDL_LogCategory' signifies from what domain it belongs to. Every category has a minimum priority specified: when a message belongs to that category, it will only be sent out if it has that minimum priority or higher.
--
--     SDL\'s own logs are sent below the default priority threshold, so they are quiet by default.
--
--     You can change the log verbosity programmatically using @SDL_SetLogPriority()@ or with SDL_SetHint(SDL_HINT_LOGGING, ...), or with the \"SDL_LOGGING\" environment variable. This variable is a comma separated set of category=level tokens that define the default logging levels for SDL applications.
--
--     The category can be a numeric category, one of \"app\", \"error\", \"assert\", \"system\", \"audio\", \"video\", \"render\", \"input\", \"test\", or @*@ for any unspecified category.
--
--     The level can be a numeric level, one of \"trace\", \"verbose\", \"debug\", \"info\", \"warn\", \"error\", \"critical\", or \"quiet\" to disable that category.
--
--     You can omit the category if you want to set the logging level for all categories.
--
--     If this hint isn\'t set, the default log levels are equivalent to:
--
--     @app=info,assert=warn,test=verbose,*=error@
--
--     Here\'s where the messages go on different platforms:
--
--     * Windows: debug output stream
--
--     * Android: log output
--
--     * Others: standard error output (stderr)
--
--     You don\'t need to have a newline (@\\n@) on the end of messages, the functions will do that for you. For consistent behavior cross-platform, you shouldn\'t have any newlines in messages, such as to log multiple lines in one call; unusual platform-specific behavior can be observed in such usage. Do one log call per line instead, with no newlines in messages.
--
--     Each log call is atomic, so you won\'t see log messages cut off one another when logging from multiple threads. The predefined log categories
--
--     By default the application and gpu categories are enabled at the INFO level, the assert category is enabled at the WARN level, test is enabled at the VERBOSE level and all other categories are enabled at the ERROR level.
--
--     @since 3.2.0
module SDL3.Sys.Bindgen.Log (
  SDL3.Sys.Bindgen.Log.SDL_LogCategory (..),
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_APPLICATION,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_ERROR,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_ASSERT,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_SYSTEM,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_AUDIO,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_VIDEO,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_RENDER,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_INPUT,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_TEST,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_GPU,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_RESERVED2,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_RESERVED3,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_RESERVED4,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_RESERVED5,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_RESERVED6,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_RESERVED7,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_RESERVED8,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_RESERVED9,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_RESERVED10,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_CATEGORY_CUSTOM,
  SDL3.Sys.Bindgen.Log.SDL_LogPriority (..),
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_PRIORITY_INVALID,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_PRIORITY_TRACE,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_PRIORITY_VERBOSE,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_PRIORITY_DEBUG,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_PRIORITY_INFO,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_PRIORITY_WARN,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_PRIORITY_ERROR,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_PRIORITY_CRITICAL,
  pattern SDL3.Sys.Bindgen.Log.SDL_LOG_PRIORITY_COUNT,
  SDL3.Sys.Bindgen.Log.SDL_LogOutputFunction_Aux (..),
  SDL3.Sys.Bindgen.Log.SDL_LogOutputFunction (..),
)
where

import Prelude (Eq, IO, Int, Ord, Read, Show, fmap, pure, (<*>), type (~))

import HsBindgen.Runtime.CEnum qualified as CEnum
import HsBindgen.Runtime.HasCField qualified as HasCField
import HsBindgen.Runtime.Marshal qualified as Marshal
import HsBindgen.Runtime.PtrConst qualified as PtrConst
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CompatHasField qualified as BG.CompatHasField

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

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

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

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

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

deriving via Marshal.EquivStorable SDL_LogCategory instance BG.Storable SDL_LogCategory

deriving via BG.CUInt instance BG.Prim SDL_LogCategory

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

  toCEnum :: CEnumZ SDL_LogCategory -> SDL_LogCategory
toCEnum = CUInt -> SDL_LogCategory
CEnumZ SDL_LogCategory -> SDL_LogCategory
SDL_LogCategory

  fromCEnum :: SDL_LogCategory -> CEnumZ SDL_LogCategory
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_LogCategory -> DeclaredValues SDL_LogCategory
declaredValues =
    \proxy SDL_LogCategory
_ ->
      [(CEnumZ SDL_LogCategory, NonEmpty String)]
-> DeclaredValues SDL_LogCategory
forall a.
Ord (CEnumZ a) =>
[(CEnumZ a, NonEmpty String)] -> DeclaredValues a
CEnum.declaredValuesFromList
        [ (CUInt
CEnumZ SDL_LogCategory
0, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_APPLICATION")
        , (CUInt
CEnumZ SDL_LogCategory
1, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_ERROR")
        , (CUInt
CEnumZ SDL_LogCategory
2, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_ASSERT")
        , (CUInt
CEnumZ SDL_LogCategory
3, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_SYSTEM")
        , (CUInt
CEnumZ SDL_LogCategory
4, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_AUDIO")
        , (CUInt
CEnumZ SDL_LogCategory
5, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_VIDEO")
        , (CUInt
CEnumZ SDL_LogCategory
6, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_RENDER")
        , (CUInt
CEnumZ SDL_LogCategory
7, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_INPUT")
        , (CUInt
CEnumZ SDL_LogCategory
8, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_TEST")
        , (CUInt
CEnumZ SDL_LogCategory
9, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_GPU")
        , (CUInt
CEnumZ SDL_LogCategory
10, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_RESERVED2")
        , (CUInt
CEnumZ SDL_LogCategory
11, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_RESERVED3")
        , (CUInt
CEnumZ SDL_LogCategory
12, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_RESERVED4")
        , (CUInt
CEnumZ SDL_LogCategory
13, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_RESERVED5")
        , (CUInt
CEnumZ SDL_LogCategory
14, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_RESERVED6")
        , (CUInt
CEnumZ SDL_LogCategory
15, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_RESERVED7")
        , (CUInt
CEnumZ SDL_LogCategory
16, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_RESERVED8")
        , (CUInt
CEnumZ SDL_LogCategory
17, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_RESERVED9")
        , (CUInt
CEnumZ SDL_LogCategory
18, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_RESERVED10")
        , (CUInt
CEnumZ SDL_LogCategory
19, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_CATEGORY_CUSTOM")
        ]

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

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

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

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

instance CEnum.SequentialCEnum SDL_LogCategory where
  minDeclaredValue :: SDL_LogCategory
minDeclaredValue = SDL_LogCategory
SDL_LOG_CATEGORY_APPLICATION

  maxDeclaredValue :: SDL_LogCategory
maxDeclaredValue = SDL_LogCategory
SDL_LOG_CATEGORY_CUSTOM

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

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

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

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

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

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

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

-- | [C declaration]: @SDL_LOG_CATEGORY_APPLICATION@, defined at @SDL3\/SDL_log.h 92:5@
pattern SDL_LOG_CATEGORY_APPLICATION :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_APPLICATION :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_APPLICATION :: SDL_LogCategory
SDL_LOG_CATEGORY_APPLICATION = SDL_LogCategory 0

-- | [C declaration]: @SDL_LOG_CATEGORY_ERROR@, defined at @SDL3\/SDL_log.h 93:5@
pattern SDL_LOG_CATEGORY_ERROR :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_ERROR :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_ERROR :: SDL_LogCategory
SDL_LOG_CATEGORY_ERROR = SDL_LogCategory 1

-- | [C declaration]: @SDL_LOG_CATEGORY_ASSERT@, defined at @SDL3\/SDL_log.h 94:5@
pattern SDL_LOG_CATEGORY_ASSERT :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_ASSERT :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_ASSERT :: SDL_LogCategory
SDL_LOG_CATEGORY_ASSERT = SDL_LogCategory 2

-- | [C declaration]: @SDL_LOG_CATEGORY_SYSTEM@, defined at @SDL3\/SDL_log.h 95:5@
pattern SDL_LOG_CATEGORY_SYSTEM :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_SYSTEM :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_SYSTEM :: SDL_LogCategory
SDL_LOG_CATEGORY_SYSTEM = SDL_LogCategory 3

-- | [C declaration]: @SDL_LOG_CATEGORY_AUDIO@, defined at @SDL3\/SDL_log.h 96:5@
pattern SDL_LOG_CATEGORY_AUDIO :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_AUDIO :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_AUDIO :: SDL_LogCategory
SDL_LOG_CATEGORY_AUDIO = SDL_LogCategory 4

-- | [C declaration]: @SDL_LOG_CATEGORY_VIDEO@, defined at @SDL3\/SDL_log.h 97:5@
pattern SDL_LOG_CATEGORY_VIDEO :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_VIDEO :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_VIDEO :: SDL_LogCategory
SDL_LOG_CATEGORY_VIDEO = SDL_LogCategory 5

-- | [C declaration]: @SDL_LOG_CATEGORY_RENDER@, defined at @SDL3\/SDL_log.h 98:5@
pattern SDL_LOG_CATEGORY_RENDER :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_RENDER :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_RENDER :: SDL_LogCategory
SDL_LOG_CATEGORY_RENDER = SDL_LogCategory 6

-- | [C declaration]: @SDL_LOG_CATEGORY_INPUT@, defined at @SDL3\/SDL_log.h 99:5@
pattern SDL_LOG_CATEGORY_INPUT :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_INPUT :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_INPUT :: SDL_LogCategory
SDL_LOG_CATEGORY_INPUT = SDL_LogCategory 7

-- | [C declaration]: @SDL_LOG_CATEGORY_TEST@, defined at @SDL3\/SDL_log.h 100:5@
pattern SDL_LOG_CATEGORY_TEST :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_TEST :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_TEST :: SDL_LogCategory
SDL_LOG_CATEGORY_TEST = SDL_LogCategory 8

-- | [C declaration]: @SDL_LOG_CATEGORY_GPU@, defined at @SDL3\/SDL_log.h 101:5@
pattern SDL_LOG_CATEGORY_GPU :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_GPU :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_GPU :: SDL_LogCategory
SDL_LOG_CATEGORY_GPU = SDL_LogCategory 9

-- | [C declaration]: @SDL_LOG_CATEGORY_RESERVED2@, defined at @SDL3\/SDL_log.h 104:5@
pattern SDL_LOG_CATEGORY_RESERVED2 :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_RESERVED2 :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_RESERVED2 :: SDL_LogCategory
SDL_LOG_CATEGORY_RESERVED2 = SDL_LogCategory 10

-- | [C declaration]: @SDL_LOG_CATEGORY_RESERVED3@, defined at @SDL3\/SDL_log.h 105:5@
pattern SDL_LOG_CATEGORY_RESERVED3 :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_RESERVED3 :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_RESERVED3 :: SDL_LogCategory
SDL_LOG_CATEGORY_RESERVED3 = SDL_LogCategory 11

-- | [C declaration]: @SDL_LOG_CATEGORY_RESERVED4@, defined at @SDL3\/SDL_log.h 106:5@
pattern SDL_LOG_CATEGORY_RESERVED4 :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_RESERVED4 :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_RESERVED4 :: SDL_LogCategory
SDL_LOG_CATEGORY_RESERVED4 = SDL_LogCategory 12

-- | [C declaration]: @SDL_LOG_CATEGORY_RESERVED5@, defined at @SDL3\/SDL_log.h 107:5@
pattern SDL_LOG_CATEGORY_RESERVED5 :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_RESERVED5 :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_RESERVED5 :: SDL_LogCategory
SDL_LOG_CATEGORY_RESERVED5 = SDL_LogCategory 13

-- | [C declaration]: @SDL_LOG_CATEGORY_RESERVED6@, defined at @SDL3\/SDL_log.h 108:5@
pattern SDL_LOG_CATEGORY_RESERVED6 :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_RESERVED6 :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_RESERVED6 :: SDL_LogCategory
SDL_LOG_CATEGORY_RESERVED6 = SDL_LogCategory 14

-- | [C declaration]: @SDL_LOG_CATEGORY_RESERVED7@, defined at @SDL3\/SDL_log.h 109:5@
pattern SDL_LOG_CATEGORY_RESERVED7 :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_RESERVED7 :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_RESERVED7 :: SDL_LogCategory
SDL_LOG_CATEGORY_RESERVED7 = SDL_LogCategory 15

-- | [C declaration]: @SDL_LOG_CATEGORY_RESERVED8@, defined at @SDL3\/SDL_log.h 110:5@
pattern SDL_LOG_CATEGORY_RESERVED8 :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_RESERVED8 :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_RESERVED8 :: SDL_LogCategory
SDL_LOG_CATEGORY_RESERVED8 = SDL_LogCategory 16

-- | [C declaration]: @SDL_LOG_CATEGORY_RESERVED9@, defined at @SDL3\/SDL_log.h 111:5@
pattern SDL_LOG_CATEGORY_RESERVED9 :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_RESERVED9 :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_RESERVED9 :: SDL_LogCategory
SDL_LOG_CATEGORY_RESERVED9 = SDL_LogCategory 17

-- | [C declaration]: @SDL_LOG_CATEGORY_RESERVED10@, defined at @SDL3\/SDL_log.h 112:5@
pattern SDL_LOG_CATEGORY_RESERVED10 :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_RESERVED10 :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_RESERVED10 :: SDL_LogCategory
SDL_LOG_CATEGORY_RESERVED10 = SDL_LogCategory 18

-- | [C declaration]: @SDL_LOG_CATEGORY_CUSTOM@, defined at @SDL3\/SDL_log.h 122:5@
pattern SDL_LOG_CATEGORY_CUSTOM :: SDL_LogCategory
pattern $mSDL_LOG_CATEGORY_CUSTOM :: forall {r}. SDL_LogCategory -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_CATEGORY_CUSTOM :: SDL_LogCategory
SDL_LOG_CATEGORY_CUSTOM = SDL_LogCategory 19

-- | The predefined log priorities
--
--     @since 3.2.0
--
--     [C declaration]: @enum SDL_LogPriority@, defined at @SDL3\/SDL_log.h 130:14@
newtype SDL_LogPriority = SDL_LogPriority
  { SDL_LogPriority -> CUInt
unwrap :: BG.CUInt
  }
  deriving stock ((forall x. SDL_LogPriority -> Rep SDL_LogPriority x)
-> (forall x. Rep SDL_LogPriority x -> SDL_LogPriority)
-> Generic SDL_LogPriority
forall x. Rep SDL_LogPriority x -> SDL_LogPriority
forall x. SDL_LogPriority -> Rep SDL_LogPriority x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SDL_LogPriority -> Rep SDL_LogPriority x
from :: forall x. SDL_LogPriority -> Rep SDL_LogPriority x
$cto :: forall x. Rep SDL_LogPriority x -> SDL_LogPriority
to :: forall x. Rep SDL_LogPriority x -> SDL_LogPriority
BG.Generic, SDL_LogPriority -> SDL_LogPriority -> Bool
(SDL_LogPriority -> SDL_LogPriority -> Bool)
-> (SDL_LogPriority -> SDL_LogPriority -> Bool)
-> Eq SDL_LogPriority
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_LogPriority -> SDL_LogPriority -> Bool
== :: SDL_LogPriority -> SDL_LogPriority -> Bool
$c/= :: SDL_LogPriority -> SDL_LogPriority -> Bool
/= :: SDL_LogPriority -> SDL_LogPriority -> Bool
Eq, Eq SDL_LogPriority
Eq SDL_LogPriority =>
(SDL_LogPriority -> SDL_LogPriority -> Ordering)
-> (SDL_LogPriority -> SDL_LogPriority -> Bool)
-> (SDL_LogPriority -> SDL_LogPriority -> Bool)
-> (SDL_LogPriority -> SDL_LogPriority -> Bool)
-> (SDL_LogPriority -> SDL_LogPriority -> Bool)
-> (SDL_LogPriority -> SDL_LogPriority -> SDL_LogPriority)
-> (SDL_LogPriority -> SDL_LogPriority -> SDL_LogPriority)
-> Ord SDL_LogPriority
SDL_LogPriority -> SDL_LogPriority -> Bool
SDL_LogPriority -> SDL_LogPriority -> Ordering
SDL_LogPriority -> SDL_LogPriority -> SDL_LogPriority
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_LogPriority -> SDL_LogPriority -> Ordering
compare :: SDL_LogPriority -> SDL_LogPriority -> Ordering
$c< :: SDL_LogPriority -> SDL_LogPriority -> Bool
< :: SDL_LogPriority -> SDL_LogPriority -> Bool
$c<= :: SDL_LogPriority -> SDL_LogPriority -> Bool
<= :: SDL_LogPriority -> SDL_LogPriority -> Bool
$c> :: SDL_LogPriority -> SDL_LogPriority -> Bool
> :: SDL_LogPriority -> SDL_LogPriority -> Bool
$c>= :: SDL_LogPriority -> SDL_LogPriority -> Bool
>= :: SDL_LogPriority -> SDL_LogPriority -> Bool
$cmax :: SDL_LogPriority -> SDL_LogPriority -> SDL_LogPriority
max :: SDL_LogPriority -> SDL_LogPriority -> SDL_LogPriority
$cmin :: SDL_LogPriority -> SDL_LogPriority -> SDL_LogPriority
min :: SDL_LogPriority -> SDL_LogPriority -> SDL_LogPriority
Ord)
  deriving newtype (FFIType SDL_LogPriority -> SDL_LogPriority
SDL_LogPriority -> FFIType SDL_LogPriority
(SDL_LogPriority -> FFIType SDL_LogPriority)
-> (FFIType SDL_LogPriority -> SDL_LogPriority)
-> HasFFIType SDL_LogPriority
forall a. (a -> FFIType a) -> (FFIType a -> a) -> HasFFIType a
$ctoFFIType :: SDL_LogPriority -> FFIType SDL_LogPriority
toFFIType :: SDL_LogPriority -> FFIType SDL_LogPriority
$cfromFFIType :: FFIType SDL_LogPriority -> SDL_LogPriority
fromFFIType :: FFIType SDL_LogPriority -> SDL_LogPriority
BG.HasFFIType)

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

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

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

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

deriving via Marshal.EquivStorable SDL_LogPriority instance BG.Storable SDL_LogPriority

deriving via BG.CUInt instance BG.Prim SDL_LogPriority

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

  toCEnum :: CEnumZ SDL_LogPriority -> SDL_LogPriority
toCEnum = CUInt -> SDL_LogPriority
CEnumZ SDL_LogPriority -> SDL_LogPriority
SDL_LogPriority

  fromCEnum :: SDL_LogPriority -> CEnumZ SDL_LogPriority
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_LogPriority -> DeclaredValues SDL_LogPriority
declaredValues =
    \proxy SDL_LogPriority
_ ->
      [(CEnumZ SDL_LogPriority, NonEmpty String)]
-> DeclaredValues SDL_LogPriority
forall a.
Ord (CEnumZ a) =>
[(CEnumZ a, NonEmpty String)] -> DeclaredValues a
CEnum.declaredValuesFromList
        [ (CUInt
CEnumZ SDL_LogPriority
0, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_PRIORITY_INVALID")
        , (CUInt
CEnumZ SDL_LogPriority
1, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_PRIORITY_TRACE")
        , (CUInt
CEnumZ SDL_LogPriority
2, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_PRIORITY_VERBOSE")
        , (CUInt
CEnumZ SDL_LogPriority
3, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_PRIORITY_DEBUG")
        , (CUInt
CEnumZ SDL_LogPriority
4, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_PRIORITY_INFO")
        , (CUInt
CEnumZ SDL_LogPriority
5, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_PRIORITY_WARN")
        , (CUInt
CEnumZ SDL_LogPriority
6, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_PRIORITY_ERROR")
        , (CUInt
CEnumZ SDL_LogPriority
7, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_PRIORITY_CRITICAL")
        , (CUInt
CEnumZ SDL_LogPriority
8, String -> NonEmpty String
forall a. a -> NonEmpty a
BG.singleton String
"SDL_LOG_PRIORITY_COUNT")
        ]

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

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

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

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

instance CEnum.SequentialCEnum SDL_LogPriority where
  minDeclaredValue :: SDL_LogPriority
minDeclaredValue = SDL_LogPriority
SDL_LOG_PRIORITY_INVALID

  maxDeclaredValue :: SDL_LogPriority
maxDeclaredValue = SDL_LogPriority
SDL_LOG_PRIORITY_COUNT

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

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

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

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

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

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

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

-- | [C declaration]: @SDL_LOG_PRIORITY_INVALID@, defined at @SDL3\/SDL_log.h 132:5@
pattern SDL_LOG_PRIORITY_INVALID :: SDL_LogPriority
pattern $mSDL_LOG_PRIORITY_INVALID :: forall {r}. SDL_LogPriority -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_PRIORITY_INVALID :: SDL_LogPriority
SDL_LOG_PRIORITY_INVALID = SDL_LogPriority 0

-- | [C declaration]: @SDL_LOG_PRIORITY_TRACE@, defined at @SDL3\/SDL_log.h 133:5@
pattern SDL_LOG_PRIORITY_TRACE :: SDL_LogPriority
pattern $mSDL_LOG_PRIORITY_TRACE :: forall {r}. SDL_LogPriority -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_PRIORITY_TRACE :: SDL_LogPriority
SDL_LOG_PRIORITY_TRACE = SDL_LogPriority 1

-- | [C declaration]: @SDL_LOG_PRIORITY_VERBOSE@, defined at @SDL3\/SDL_log.h 134:5@
pattern SDL_LOG_PRIORITY_VERBOSE :: SDL_LogPriority
pattern $mSDL_LOG_PRIORITY_VERBOSE :: forall {r}. SDL_LogPriority -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_PRIORITY_VERBOSE :: SDL_LogPriority
SDL_LOG_PRIORITY_VERBOSE = SDL_LogPriority 2

-- | [C declaration]: @SDL_LOG_PRIORITY_DEBUG@, defined at @SDL3\/SDL_log.h 135:5@
pattern SDL_LOG_PRIORITY_DEBUG :: SDL_LogPriority
pattern $mSDL_LOG_PRIORITY_DEBUG :: forall {r}. SDL_LogPriority -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_PRIORITY_DEBUG :: SDL_LogPriority
SDL_LOG_PRIORITY_DEBUG = SDL_LogPriority 3

-- | [C declaration]: @SDL_LOG_PRIORITY_INFO@, defined at @SDL3\/SDL_log.h 136:5@
pattern SDL_LOG_PRIORITY_INFO :: SDL_LogPriority
pattern $mSDL_LOG_PRIORITY_INFO :: forall {r}. SDL_LogPriority -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_PRIORITY_INFO :: SDL_LogPriority
SDL_LOG_PRIORITY_INFO = SDL_LogPriority 4

-- | [C declaration]: @SDL_LOG_PRIORITY_WARN@, defined at @SDL3\/SDL_log.h 137:5@
pattern SDL_LOG_PRIORITY_WARN :: SDL_LogPriority
pattern $mSDL_LOG_PRIORITY_WARN :: forall {r}. SDL_LogPriority -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_PRIORITY_WARN :: SDL_LogPriority
SDL_LOG_PRIORITY_WARN = SDL_LogPriority 5

-- | [C declaration]: @SDL_LOG_PRIORITY_ERROR@, defined at @SDL3\/SDL_log.h 138:5@
pattern SDL_LOG_PRIORITY_ERROR :: SDL_LogPriority
pattern $mSDL_LOG_PRIORITY_ERROR :: forall {r}. SDL_LogPriority -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_PRIORITY_ERROR :: SDL_LogPriority
SDL_LOG_PRIORITY_ERROR = SDL_LogPriority 6

-- | [C declaration]: @SDL_LOG_PRIORITY_CRITICAL@, defined at @SDL3\/SDL_log.h 139:5@
pattern SDL_LOG_PRIORITY_CRITICAL :: SDL_LogPriority
pattern $mSDL_LOG_PRIORITY_CRITICAL :: forall {r}. SDL_LogPriority -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_PRIORITY_CRITICAL :: SDL_LogPriority
SDL_LOG_PRIORITY_CRITICAL = SDL_LogPriority 7

-- | [C declaration]: @SDL_LOG_PRIORITY_COUNT@, defined at @SDL3\/SDL_log.h 140:5@
pattern SDL_LOG_PRIORITY_COUNT :: SDL_LogPriority
pattern $mSDL_LOG_PRIORITY_COUNT :: forall {r}. SDL_LogPriority -> ((# #) -> r) -> ((# #) -> r) -> r
$bSDL_LOG_PRIORITY_COUNT :: SDL_LogPriority
SDL_LOG_PRIORITY_COUNT = SDL_LogPriority 8

-- | Auxiliary type used by 'SDL_LogOutputFunction'
--
--     [C declaration]: @SDL_LogOutputFunction@, defined at @SDL3\/SDL_log.h 485:24@
newtype SDL_LogOutputFunction_Aux = SDL_LogOutputFunction_Aux
  { SDL_LogOutputFunction_Aux
-> Ptr Void -> CInt -> SDL_LogPriority -> PtrConst CChar -> IO ()
unwrap :: BG.Ptr BG.Void -> BG.CInt -> SDL_LogPriority -> PtrConst.PtrConst BG.CChar -> IO ()
  }
  deriving stock ((forall x.
 SDL_LogOutputFunction_Aux -> Rep SDL_LogOutputFunction_Aux x)
-> (forall x.
    Rep SDL_LogOutputFunction_Aux x -> SDL_LogOutputFunction_Aux)
-> Generic SDL_LogOutputFunction_Aux
forall x.
Rep SDL_LogOutputFunction_Aux x -> SDL_LogOutputFunction_Aux
forall x.
SDL_LogOutputFunction_Aux -> Rep SDL_LogOutputFunction_Aux x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SDL_LogOutputFunction_Aux -> Rep SDL_LogOutputFunction_Aux x
from :: forall x.
SDL_LogOutputFunction_Aux -> Rep SDL_LogOutputFunction_Aux x
$cto :: forall x.
Rep SDL_LogOutputFunction_Aux x -> SDL_LogOutputFunction_Aux
to :: forall x.
Rep SDL_LogOutputFunction_Aux x -> SDL_LogOutputFunction_Aux
BG.Generic)

-- __unique:__ @toSDL_LogOutputFunction_Aux@
foreign import ccall safe "wrapper"
  hs_bindgen_e51284d24485bac7_base
    :: (BG.Ptr BG.Void -> BG.CInt -> BG.CUInt -> BG.Ptr BG.Void -> IO ())
    -> IO (BG.FunPtr (BG.Ptr BG.Void -> BG.CInt -> BG.CUInt -> BG.Ptr BG.Void -> IO ()))

-- __unique:__ @toSDL_LogOutputFunction_Aux@
hs_bindgen_e51284d24485bac7
  :: SDL_LogOutputFunction_Aux
  -> IO (BG.FunPtr SDL_LogOutputFunction_Aux)
hs_bindgen_e51284d24485bac7 :: SDL_LogOutputFunction_Aux -> IO (FunPtr SDL_LogOutputFunction_Aux)
hs_bindgen_e51284d24485bac7 =
  \SDL_LogOutputFunction_Aux
fun0 ->
    (FunPtr (Ptr Void -> CInt -> CUInt -> Ptr Void -> IO ())
 -> FunPtr SDL_LogOutputFunction_Aux)
-> IO (FunPtr (Ptr Void -> CInt -> CUInt -> Ptr Void -> IO ()))
-> IO (FunPtr SDL_LogOutputFunction_Aux)
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
      FunPtr (Ptr Void -> CInt -> CUInt -> Ptr Void -> IO ())
-> FunPtr SDL_LogOutputFunction_Aux
forall a b. FunPtr a -> FunPtr b
BG.castFunPtr
      ( (Ptr Void -> CInt -> CUInt -> Ptr Void -> IO ())
-> IO (FunPtr (Ptr Void -> CInt -> CUInt -> Ptr Void -> IO ()))
hs_bindgen_e51284d24485bac7_base
          ( \Ptr Void
x1 ->
              \CInt
x2 ->
                \CUInt
x3 ->
                  \Ptr Void
x4 ->
                    forall {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_LogOutputFunction_Aux
fun0
                      (FFIType (Ptr Void) -> Ptr Void
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType Ptr Void
FFIType (Ptr Void)
x1)
                      (FFIType CInt -> CInt
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType CInt
FFIType CInt
x2)
                      (FFIType SDL_LogPriority -> SDL_LogPriority
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType CUInt
FFIType SDL_LogPriority
x3)
                      (FFIType (PtrConst CChar) -> PtrConst CChar
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType Ptr Void
FFIType (PtrConst CChar)
x4)
          )
      )

-- __unique:__ @fromSDL_LogOutputFunction_Aux@
foreign import ccall safe "dynamic"
  hs_bindgen_0538751d36e72086_base
    :: BG.FunPtr (BG.Ptr BG.Void -> BG.CInt -> BG.CUInt -> BG.Ptr BG.Void -> IO ())
    -> BG.Ptr BG.Void
    -> BG.CInt
    -> BG.CUInt
    -> BG.Ptr BG.Void
    -> IO ()

-- __unique:__ @fromSDL_LogOutputFunction_Aux@
hs_bindgen_0538751d36e72086
  :: BG.FunPtr SDL_LogOutputFunction_Aux
  -> SDL_LogOutputFunction_Aux
hs_bindgen_0538751d36e72086 :: FunPtr SDL_LogOutputFunction_Aux -> SDL_LogOutputFunction_Aux
hs_bindgen_0538751d36e72086 =
  \FunPtr SDL_LogOutputFunction_Aux
funPtr0 ->
    (Ptr Void -> CInt -> SDL_LogPriority -> PtrConst CChar -> IO ())
-> SDL_LogOutputFunction_Aux
SDL_LogOutputFunction_Aux
      ( \Ptr Void
x1 ->
          \CInt
x2 ->
            \SDL_LogPriority
x3 ->
              \PtrConst CChar
x4 ->
                FunPtr (Ptr Void -> CInt -> CUInt -> Ptr Void -> IO ())
-> Ptr Void -> CInt -> CUInt -> Ptr Void -> IO ()
hs_bindgen_0538751d36e72086_base
                  (FunPtr SDL_LogOutputFunction_Aux
-> FunPtr (Ptr Void -> CInt -> CUInt -> Ptr Void -> IO ())
forall a b. FunPtr a -> FunPtr b
BG.castFunPtr FunPtr SDL_LogOutputFunction_Aux
funPtr0)
                  (Ptr Void -> FFIType (Ptr Void)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr Void
x1)
                  (CInt -> FFIType CInt
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CInt
x2)
                  (SDL_LogPriority -> FFIType SDL_LogPriority
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_LogPriority
x3)
                  (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x4)
      )

instance BG.ToFunPtr SDL_LogOutputFunction_Aux where
  toFunPtr :: SDL_LogOutputFunction_Aux -> IO (FunPtr SDL_LogOutputFunction_Aux)
toFunPtr = SDL_LogOutputFunction_Aux -> IO (FunPtr SDL_LogOutputFunction_Aux)
hs_bindgen_e51284d24485bac7

instance BG.FromFunPtr SDL_LogOutputFunction_Aux where
  fromFunPtr :: FunPtr SDL_LogOutputFunction_Aux -> SDL_LogOutputFunction_Aux
fromFunPtr = FunPtr SDL_LogOutputFunction_Aux -> SDL_LogOutputFunction_Aux
hs_bindgen_0538751d36e72086

instance
  (ty ~ (BG.Ptr BG.Void -> BG.CInt -> SDL_LogPriority -> PtrConst.PtrConst BG.CChar -> IO ()))
  => BG.CompatHasField.HasField "unwrap" SDL_LogOutputFunction_Aux ty
  where
  hasField :: SDL_LogOutputFunction_Aux -> (ty -> SDL_LogOutputFunction_Aux, ty)
hasField =
    \SDL_LogOutputFunction_Aux
x0 ->
      ( \ty
y1 ->
          SDL_LogOutputFunction_Aux{unwrap :: Ptr Void -> CInt -> SDL_LogPriority -> PtrConst CChar -> IO ()
unwrap = ty
Ptr Void -> CInt -> SDL_LogPriority -> PtrConst CChar -> IO ()
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_LogOutputFunction_Aux
x0
      )

instance
  (ty ~ (BG.Ptr BG.Void -> BG.CInt -> SDL_LogPriority -> PtrConst.PtrConst BG.CChar -> IO ()))
  => BG.HasField "unwrap" (BG.Ptr SDL_LogOutputFunction_Aux) (BG.Ptr ty)
  where
  getField :: Ptr SDL_LogOutputFunction_Aux -> Ptr ty
getField = Proxy "unwrap"
-> Ptr SDL_LogOutputFunction_Aux
-> Ptr (CFieldType SDL_LogOutputFunction_Aux "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_LogOutputFunction_Aux "unwrap" where
  type
    CFieldType SDL_LogOutputFunction_Aux "unwrap" =
      BG.Ptr BG.Void -> BG.CInt -> SDL_LogPriority -> PtrConst.PtrConst BG.CChar -> IO ()

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

-- | The prototype for the log output callback function.
--
--     This function is called by SDL when there is new text to be logged. A mutex is held so that this function is never called by more than one thread at once.
--
--     [@userdata@]: what was passed as @userdata@ to @SDL_SetLogOutputFunction()@.
--
--     [@category@]: the category of the message.
--
--     [@priority@]: the priority of the message.
--
--     [@message@]: the message being output.
--
--     @since 3.2.0
--
--     [C declaration]: @SDL_LogOutputFunction@, defined at @SDL3\/SDL_log.h 485:24@
newtype SDL_LogOutputFunction = SDL_LogOutputFunction
  { SDL_LogOutputFunction -> FunPtr SDL_LogOutputFunction_Aux
unwrap :: BG.FunPtr SDL_LogOutputFunction_Aux
  }
  deriving stock ((forall x. SDL_LogOutputFunction -> Rep SDL_LogOutputFunction x)
-> (forall x. Rep SDL_LogOutputFunction x -> SDL_LogOutputFunction)
-> Generic SDL_LogOutputFunction
forall x. Rep SDL_LogOutputFunction x -> SDL_LogOutputFunction
forall x. SDL_LogOutputFunction -> Rep SDL_LogOutputFunction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SDL_LogOutputFunction -> Rep SDL_LogOutputFunction x
from :: forall x. SDL_LogOutputFunction -> Rep SDL_LogOutputFunction x
$cto :: forall x. Rep SDL_LogOutputFunction x -> SDL_LogOutputFunction
to :: forall x. Rep SDL_LogOutputFunction x -> SDL_LogOutputFunction
BG.Generic, SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
(SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool)
-> (SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool)
-> Eq SDL_LogOutputFunction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
== :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
$c/= :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
/= :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
Eq, Eq SDL_LogOutputFunction
Eq SDL_LogOutputFunction =>
(SDL_LogOutputFunction -> SDL_LogOutputFunction -> Ordering)
-> (SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool)
-> (SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool)
-> (SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool)
-> (SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool)
-> (SDL_LogOutputFunction
    -> SDL_LogOutputFunction -> SDL_LogOutputFunction)
-> (SDL_LogOutputFunction
    -> SDL_LogOutputFunction -> SDL_LogOutputFunction)
-> Ord SDL_LogOutputFunction
SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
SDL_LogOutputFunction -> SDL_LogOutputFunction -> Ordering
SDL_LogOutputFunction
-> SDL_LogOutputFunction -> SDL_LogOutputFunction
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_LogOutputFunction -> SDL_LogOutputFunction -> Ordering
compare :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Ordering
$c< :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
< :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
$c<= :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
<= :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
$c> :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
> :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
$c>= :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
>= :: SDL_LogOutputFunction -> SDL_LogOutputFunction -> Bool
$cmax :: SDL_LogOutputFunction
-> SDL_LogOutputFunction -> SDL_LogOutputFunction
max :: SDL_LogOutputFunction
-> SDL_LogOutputFunction -> SDL_LogOutputFunction
$cmin :: SDL_LogOutputFunction
-> SDL_LogOutputFunction -> SDL_LogOutputFunction
min :: SDL_LogOutputFunction
-> SDL_LogOutputFunction -> SDL_LogOutputFunction
Ord, Int -> SDL_LogOutputFunction -> ShowS
[SDL_LogOutputFunction] -> ShowS
SDL_LogOutputFunction -> String
(Int -> SDL_LogOutputFunction -> ShowS)
-> (SDL_LogOutputFunction -> String)
-> ([SDL_LogOutputFunction] -> ShowS)
-> Show SDL_LogOutputFunction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SDL_LogOutputFunction -> ShowS
showsPrec :: Int -> SDL_LogOutputFunction -> ShowS
$cshow :: SDL_LogOutputFunction -> String
show :: SDL_LogOutputFunction -> String
$cshowList :: [SDL_LogOutputFunction] -> ShowS
showList :: [SDL_LogOutputFunction] -> ShowS
Show)
  deriving newtype
    ( FFIType SDL_LogOutputFunction -> SDL_LogOutputFunction
SDL_LogOutputFunction -> FFIType SDL_LogOutputFunction
(SDL_LogOutputFunction -> FFIType SDL_LogOutputFunction)
-> (FFIType SDL_LogOutputFunction -> SDL_LogOutputFunction)
-> HasFFIType SDL_LogOutputFunction
forall a. (a -> FFIType a) -> (FFIType a -> a) -> HasFFIType a
$ctoFFIType :: SDL_LogOutputFunction -> FFIType SDL_LogOutputFunction
toFFIType :: SDL_LogOutputFunction -> FFIType SDL_LogOutputFunction
$cfromFFIType :: FFIType SDL_LogOutputFunction -> SDL_LogOutputFunction
fromFFIType :: FFIType SDL_LogOutputFunction -> SDL_LogOutputFunction
BG.HasFFIType
    , Ptr SDL_LogOutputFunction -> IO SDL_LogOutputFunction
Ptr SDL_LogOutputFunction -> Int -> IO SDL_LogOutputFunction
Ptr SDL_LogOutputFunction -> Int -> SDL_LogOutputFunction -> IO ()
Ptr SDL_LogOutputFunction -> SDL_LogOutputFunction -> IO ()
SDL_LogOutputFunction -> Int
(SDL_LogOutputFunction -> Int)
-> (SDL_LogOutputFunction -> Int)
-> (Ptr SDL_LogOutputFunction -> Int -> IO SDL_LogOutputFunction)
-> (Ptr SDL_LogOutputFunction
    -> Int -> SDL_LogOutputFunction -> IO ())
-> (forall b. Ptr b -> Int -> IO SDL_LogOutputFunction)
-> (forall b. Ptr b -> Int -> SDL_LogOutputFunction -> IO ())
-> (Ptr SDL_LogOutputFunction -> IO SDL_LogOutputFunction)
-> (Ptr SDL_LogOutputFunction -> SDL_LogOutputFunction -> IO ())
-> Storable SDL_LogOutputFunction
forall b. Ptr b -> Int -> IO SDL_LogOutputFunction
forall b. Ptr b -> Int -> SDL_LogOutputFunction -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
$csizeOf :: SDL_LogOutputFunction -> Int
sizeOf :: SDL_LogOutputFunction -> Int
$calignment :: SDL_LogOutputFunction -> Int
alignment :: SDL_LogOutputFunction -> Int
$cpeekElemOff :: Ptr SDL_LogOutputFunction -> Int -> IO SDL_LogOutputFunction
peekElemOff :: Ptr SDL_LogOutputFunction -> Int -> IO SDL_LogOutputFunction
$cpokeElemOff :: Ptr SDL_LogOutputFunction -> Int -> SDL_LogOutputFunction -> IO ()
pokeElemOff :: Ptr SDL_LogOutputFunction -> Int -> SDL_LogOutputFunction -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SDL_LogOutputFunction
peekByteOff :: forall b. Ptr b -> Int -> IO SDL_LogOutputFunction
$cpokeByteOff :: forall b. Ptr b -> Int -> SDL_LogOutputFunction -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> SDL_LogOutputFunction -> IO ()
$cpeek :: Ptr SDL_LogOutputFunction -> IO SDL_LogOutputFunction
peek :: Ptr SDL_LogOutputFunction -> IO SDL_LogOutputFunction
$cpoke :: Ptr SDL_LogOutputFunction -> SDL_LogOutputFunction -> IO ()
poke :: Ptr SDL_LogOutputFunction -> SDL_LogOutputFunction -> IO ()
BG.Storable
    , Ptr SDL_LogOutputFunction -> IO SDL_LogOutputFunction
(Ptr SDL_LogOutputFunction -> IO SDL_LogOutputFunction)
-> ReadRaw SDL_LogOutputFunction
forall a. (Ptr a -> IO a) -> ReadRaw a
$creadRaw :: Ptr SDL_LogOutputFunction -> IO SDL_LogOutputFunction
readRaw :: Ptr SDL_LogOutputFunction -> IO SDL_LogOutputFunction
Marshal.ReadRaw
    , Proxy SDL_LogOutputFunction -> Int
(Proxy SDL_LogOutputFunction -> Int)
-> (Proxy SDL_LogOutputFunction -> Int)
-> StaticSize SDL_LogOutputFunction
forall a. (Proxy a -> Int) -> (Proxy a -> Int) -> StaticSize a
$cstaticSizeOf :: Proxy SDL_LogOutputFunction -> Int
staticSizeOf :: Proxy SDL_LogOutputFunction -> Int
$cstaticAlignment :: Proxy SDL_LogOutputFunction -> Int
staticAlignment :: Proxy SDL_LogOutputFunction -> Int
Marshal.StaticSize
    , Ptr SDL_LogOutputFunction -> SDL_LogOutputFunction -> IO ()
(Ptr SDL_LogOutputFunction -> SDL_LogOutputFunction -> IO ())
-> WriteRaw SDL_LogOutputFunction
forall a. (Ptr a -> a -> IO ()) -> WriteRaw a
$cwriteRaw :: Ptr SDL_LogOutputFunction -> SDL_LogOutputFunction -> IO ()
writeRaw :: Ptr SDL_LogOutputFunction -> SDL_LogOutputFunction -> IO ()
Marshal.WriteRaw
    )

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

instance
  (ty ~ BG.FunPtr SDL_LogOutputFunction_Aux)
  => BG.HasField "unwrap" (BG.Ptr SDL_LogOutputFunction) (BG.Ptr ty)
  where
  getField :: Ptr SDL_LogOutputFunction -> Ptr ty
getField = Proxy "unwrap"
-> Ptr SDL_LogOutputFunction
-> Ptr (CFieldType SDL_LogOutputFunction "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_LogOutputFunction "unwrap" where
  type
    CFieldType SDL_LogOutputFunction "unwrap" =
      BG.FunPtr SDL_LogOutputFunction_Aux

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