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

-- | The storage API is a high-level API designed to abstract away the portability issues that come up when using something lower-level (in SDL\'s case, this sits on top of the [Filesystem](CategoryFilesystem) and [IOStream](CategoryIOStream) subsystems). It is significantly more restrictive than a typical filesystem API, for a number of reasons:
--
--     1. __What to Access:__ A common pitfall with existing filesystem APIs is the assumption that all storage is monolithic. However, many other platforms (game consoles in particular) are more strict about what /type/ of filesystem is being accessed; for example, game content and user data are usually two separate storage devices with entirely different characteristics (and possibly different low-level APIs altogether!).
--
--     2. __How to Access:__ Another common mistake is applications assuming that all storage is universally writeable - again, many platforms treat game content and user data as two separate storage devices, and only user data is writeable while game content is read-only.
--
--     3. __When to Access:__ The most common portability issue with filesystem access is /timing/ - you cannot always assume that the storage device is always accessible all of the time, nor can you assume that there are no limits to how long you have access to a particular device.
--
--     Consider the following example:
--
--     @
--     void ReadGameData(void)
--     {
--         extern char** fileNames;
--         extern size_t numFiles;
--         for (size_t i = 0; i \< numFiles; i += 1) {
--             FILE *data = fopen(fileNames[i], \"rwb\");
--             if (data == NULL) {
--                 \/\/ Something bad happened!
--             } else {
--                 \/\/ A bunch of stuff happens here
--                 fclose(data);
--             }
--         }
--     }
--
--     void ReadSave(void)
--     {
--         FILE *save = fopen(\"saves\/save0.sav\", \"rb\");
--         if (save == NULL) {
--             \/\/ Something bad happened!
--         } else {
--             \/\/ A bunch of stuff happens here
--             fclose(save);
--         }
--     }
--
--     void WriteSave(void)
--     {
--         FILE *save = fopen(\"saves\/save0.sav\", \"wb\");
--         if (save == NULL) {
--             \/\/ Something bad happened!
--         } else {
--             \/\/ A bunch of stuff happens here
--             fclose(save);
--         }
--     }
--     @
--
--     Going over the bullet points again:
--
--     1. __What to Access:__ This code accesses a global filesystem; game data and saves are all presumed to be in the current working directory (which may or may not be the game\'s installation folder!).
--
--     2. __How to Access:__ This code assumes that content paths are writeable, and that save data is also writeable despite being in the same location as the game data.
--
--     3. __When to Access:__ This code assumes that they can be called at any time, since the filesystem is always accessible and has no limits on how long the filesystem is being accessed.
--
--     Due to these assumptions, the filesystem code is not portable and will fail under these common scenarios:
--
--     * The game is installed on a device that is read-only, both content loading and game saves will fail or crash outright
--
--     * Game\/User storage is not implicitly mounted, so no files will be found for either scenario when a platform requires explicitly mounting filesystems
--
--     * Save data may not be safe since the I\/O is not being flushed or validated, so an error occurring elsewhere in the program may result in missing\/corrupted save data
--
--     When using 'SDL_Storage', these types of problems are virtually impossible to trip over:
--
--     @
--     void ReadGameData(void)
--     {
--         extern char** fileNames;
--         extern size_t numFiles;
--
--         SDL_Storage *title = SDL_OpenTitleStorage(NULL, 0);
--         if (title == NULL) {
--             \/\/ Something bad happened!
--         }
--         while (!SDL_StorageReady(title)) {
--             SDL_Delay(1);
--         }
--
--         for (size_t i = 0; i \< numFiles; i += 1) {
--             void* dst;
--             Uint64 dstLen = 0;
--
--             if (SDL_GetStorageFileSize(title, fileNames[i], &dstLen) && dstLen > 0) {
--                 dst = SDL_malloc(dstLen);
--                 if (SDL_ReadStorageFile(title, fileNames[i], dst, dstLen)) {
--                     \/\/ A bunch of stuff happens here
--                 } else {
--                     \/\/ Something bad happened!
--                 }
--                 SDL_free(dst);
--             } else {
--                 \/\/ Something bad happened!
--             }
--         }
--
--         SDL_CloseStorage(title);
--     }
--
--     void ReadSave(void)
--     {
--         SDL_Storage *user = SDL_OpenUserStorage(\"libsdl\", \"Storage Example\", 0);
--         if (user == NULL) {
--             \/\/ Something bad happened!
--         }
--         while (!SDL_StorageReady(user)) {
--             SDL_Delay(1);
--         }
--
--         Uint64 saveLen = 0;
--         if (SDL_GetStorageFileSize(user, \"save0.sav\", &saveLen) && saveLen > 0) {
--             void* dst = SDL_malloc(saveLen);
--             if (SDL_ReadStorageFile(user, \"save0.sav\", dst, saveLen)) {
--                 \/\/ A bunch of stuff happens here
--             } else {
--                 \/\/ Something bad happened!
--             }
--             SDL_free(dst);
--         } else {
--             \/\/ Something bad happened!
--         }
--
--         SDL_CloseStorage(user);
--     }
--
--     void WriteSave(void)
--     {
--         SDL_Storage *user = SDL_OpenUserStorage(\"libsdl\", \"Storage Example\", 0);
--         if (user == NULL) {
--             \/\/ Something bad happened!
--         }
--         while (!SDL_StorageReady(user)) {
--             SDL_Delay(1);
--         }
--
--         extern void *saveData; \/\/ A bunch of stuff happened here...
--         extern Uint64 saveLen;
--         if (!SDL_WriteStorageFile(user, \"save0.sav\", saveData, saveLen)) {
--             \/\/ Something bad happened!
--         }
--
--         SDL_CloseStorage(user);
--     }
--     @
--
--     Note the improvements that 'SDL_Storage' makes:
--
--     1. __What to Access:__ This code explicitly reads from a title or user storage device based on the context of the function.
--
--     2. __How to Access:__ This code explicitly uses either a read or write function based on the context of the function.
--
--     3. __When to Access:__ This code explicitly opens the device when it needs to, and closes it when it is finished working with the filesystem.
--
--     The result is an application that is significantly more robust against the increasing demands of platforms and their filesystems!
--
--     A publicly available example of an 'SDL_Storage' backend is the [Steam Cloud](https://partner.steamgames.com/doc/features/cloud) backend - you can initialize Steamworks when starting the program, and then SDL will recognize that Steamworks is initialized and automatically use ISteamRemoteStorage when the application opens user storage. More importantly, when you /open/ storage it knows to begin a \"batch\" of filesystem operations, and when you /close/ storage it knows to end and flush the batch. This is used by Steam to support [Dynamic Cloud Sync](https://steamcommunity.com/groups/steamworks/announcements/detail/3142949576401813670); users can save data on one PC, put the device to sleep, and then continue playing on another PC (and vice versa) with the save data fully synchronized across all devices, allowing for a seamless experience without having to do full restarts of the program.
--
--     Notes on valid paths
--
--     All paths in the Storage API use Unix-style path separators (\'\/\'). Using a different path separator will not work, even if the underlying platform would otherwise accept it. This is to keep code using the Storage API portable between platforms and Storage implementations and simplify app code.
--
--     Paths with relative directories (\".\" and \"..\") are forbidden by the Storage API.
--
--     All valid UTF-8 strings (discounting the NULL terminator character and the \'\/\' path separator) are usable for filenames, however, an underlying Storage implementation may not support particularly strange sequences and refuse to create files with those names, etc. Function interface for 'SDL_Storage'.
--
--     Apps that want to supply a custom implementation of 'SDL_Storage' will fill in all the functions in this struct, and then pass it to SDL_OpenStorage to create a custom 'SDL_Storage' object.
--
--     It is not usually necessary to do this; SDL provides standard implementations for many things you might expect to do with an 'SDL_Storage'.
--
--     This structure should be initialized using SDL_INIT_INTERFACE()
--
--     @since 3.2.0
--
--     [See also]: SDL_INIT_INTERFACE
module SDL3.Sys.Bindgen.Storage (
  SDL3.Sys.Bindgen.Storage.SDL_StorageInterface (..),
  SDL3.Sys.Bindgen.Storage.SDL_Storage,
)
where

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

import HsBindgen.Runtime.HasCField qualified as HasCField
import HsBindgen.Runtime.Marshal qualified as Marshal
import HsBindgen.Runtime.PtrConst qualified as PtrConst
import HsBindgen.Runtime.Struct qualified as Struct
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CompatHasField qualified as BG.CompatHasField
import SDL3.Sys.Bindgen.Filesystem qualified
import SDL3.Sys.Bindgen.Stdinc qualified

-- | [C declaration]: @struct SDL_StorageInterface@, defined at @SDL3\/SDL_storage.h 274:16@
data SDL_StorageInterface = SDL_StorageInterface
  { SDL_StorageInterface -> Uint32
version :: SDL3.Sys.Bindgen.Stdinc.Uint32
  -- ^ [C declaration]: @version@, defined at @SDL3\/SDL_storage.h 277:12@
  , SDL_StorageInterface -> FunPtr (Ptr Void -> IO CBool)
close :: BG.FunPtr (BG.Ptr BG.Void -> IO BG.CBool)
  -- ^ [C declaration]: @close@, defined at @SDL3\/SDL_storage.h 280:20@
  , SDL_StorageInterface -> FunPtr (Ptr Void -> IO CBool)
ready :: BG.FunPtr (BG.Ptr BG.Void -> IO BG.CBool)
  -- ^ [C declaration]: @ready@, defined at @SDL3\/SDL_storage.h 283:20@
  , SDL_StorageInterface
-> FunPtr
     (Ptr Void
      -> PtrConst CChar
      -> SDL_EnumerateDirectoryCallback
      -> Ptr Void
      -> IO CBool)
enumerate
      :: BG.FunPtr
           ( BG.Ptr BG.Void
             -> PtrConst.PtrConst BG.CChar
             -> SDL3.Sys.Bindgen.Filesystem.SDL_EnumerateDirectoryCallback
             -> BG.Ptr BG.Void
             -> IO BG.CBool
           )
  -- ^ [C declaration]: @enumerate@, defined at @SDL3\/SDL_storage.h 286:20@
  , SDL_StorageInterface
-> FunPtr
     (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info
      :: BG.FunPtr
           ( BG.Ptr BG.Void
             -> PtrConst.PtrConst BG.CChar
             -> BG.Ptr SDL3.Sys.Bindgen.Filesystem.SDL_PathInfo
             -> IO BG.CBool
           )
  -- ^ [C declaration]: @info@, defined at @SDL3\/SDL_storage.h 289:20@
  , SDL_StorageInterface
-> FunPtr
     (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file
      :: BG.FunPtr
           ( BG.Ptr BG.Void
             -> PtrConst.PtrConst BG.CChar
             -> BG.Ptr BG.Void
             -> SDL3.Sys.Bindgen.Stdinc.Uint64
             -> IO BG.CBool
           )
  -- ^ [C declaration]: @read_file@, defined at @SDL3\/SDL_storage.h 292:20@
  , SDL_StorageInterface
-> FunPtr
     (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file
      :: BG.FunPtr
           ( BG.Ptr BG.Void
             -> PtrConst.PtrConst BG.CChar
             -> PtrConst.PtrConst BG.Void
             -> SDL3.Sys.Bindgen.Stdinc.Uint64
             -> IO BG.CBool
           )
  -- ^ [C declaration]: @write_file@, defined at @SDL3\/SDL_storage.h 295:20@
  , SDL_StorageInterface
-> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir :: BG.FunPtr (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> IO BG.CBool)
  -- ^ [C declaration]: @mkdir@, defined at @SDL3\/SDL_storage.h 298:20@
  , SDL_StorageInterface
-> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove :: BG.FunPtr (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> IO BG.CBool)
  -- ^ [C declaration]: @remove@, defined at @SDL3\/SDL_storage.h 301:20@
  , SDL_StorageInterface
-> FunPtr
     (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename
      :: BG.FunPtr
           (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> PtrConst.PtrConst BG.CChar -> IO BG.CBool)
  -- ^ [C declaration]: @rename@, defined at @SDL3\/SDL_storage.h 304:20@
  , SDL_StorageInterface
-> FunPtr
     (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy
      :: BG.FunPtr
           (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> PtrConst.PtrConst BG.CChar -> IO BG.CBool)
  -- ^ [C declaration]: @copy@, defined at @SDL3\/SDL_storage.h 307:20@
  , SDL_StorageInterface -> FunPtr (Ptr Void -> IO Uint64)
space_remaining :: BG.FunPtr (BG.Ptr BG.Void -> IO SDL3.Sys.Bindgen.Stdinc.Uint64)
  -- ^ [C declaration]: @space_remaining@, defined at @SDL3\/SDL_storage.h 310:22@
  }
  deriving stock ((forall x. SDL_StorageInterface -> Rep SDL_StorageInterface x)
-> (forall x. Rep SDL_StorageInterface x -> SDL_StorageInterface)
-> Generic SDL_StorageInterface
forall x. Rep SDL_StorageInterface x -> SDL_StorageInterface
forall x. SDL_StorageInterface -> Rep SDL_StorageInterface x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SDL_StorageInterface -> Rep SDL_StorageInterface x
from :: forall x. SDL_StorageInterface -> Rep SDL_StorageInterface x
$cto :: forall x. Rep SDL_StorageInterface x -> SDL_StorageInterface
to :: forall x. Rep SDL_StorageInterface x -> SDL_StorageInterface
BG.Generic, SDL_StorageInterface -> SDL_StorageInterface -> Bool
(SDL_StorageInterface -> SDL_StorageInterface -> Bool)
-> (SDL_StorageInterface -> SDL_StorageInterface -> Bool)
-> Eq SDL_StorageInterface
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SDL_StorageInterface -> SDL_StorageInterface -> Bool
== :: SDL_StorageInterface -> SDL_StorageInterface -> Bool
$c/= :: SDL_StorageInterface -> SDL_StorageInterface -> Bool
/= :: SDL_StorageInterface -> SDL_StorageInterface -> Bool
Eq, Int -> SDL_StorageInterface -> ShowS
[SDL_StorageInterface] -> ShowS
SDL_StorageInterface -> String
(Int -> SDL_StorageInterface -> ShowS)
-> (SDL_StorageInterface -> String)
-> ([SDL_StorageInterface] -> ShowS)
-> Show SDL_StorageInterface
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SDL_StorageInterface -> ShowS
showsPrec :: Int -> SDL_StorageInterface -> ShowS
$cshow :: SDL_StorageInterface -> String
show :: SDL_StorageInterface -> String
$cshowList :: [SDL_StorageInterface] -> ShowS
showList :: [SDL_StorageInterface] -> ShowS
Show)

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

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

instance Marshal.ReadRaw SDL_StorageInterface where
  readRaw :: Ptr SDL_StorageInterface -> IO SDL_StorageInterface
readRaw =
    \Ptr SDL_StorageInterface
ptr0 ->
      (Uint32
 -> FunPtr (Ptr Void -> IO CBool)
 -> FunPtr (Ptr Void -> IO CBool)
 -> FunPtr
      (Ptr Void
       -> PtrConst CChar
       -> SDL_EnumerateDirectoryCallback
       -> Ptr Void
       -> IO CBool)
 -> FunPtr
      (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
 -> FunPtr
      (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
 -> FunPtr
      (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
 -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
 -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
 -> FunPtr
      (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
 -> FunPtr
      (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
 -> FunPtr (Ptr Void -> IO Uint64)
 -> SDL_StorageInterface)
-> IO
     (Uint32
      -> FunPtr (Ptr Void -> IO CBool)
      -> FunPtr (Ptr Void -> IO CBool)
      -> FunPtr
           (Ptr Void
            -> PtrConst CChar
            -> SDL_EnumerateDirectoryCallback
            -> Ptr Void
            -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> IO Uint64)
      -> SDL_StorageInterface)
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Uint32
-> FunPtr (Ptr Void -> IO CBool)
-> FunPtr (Ptr Void -> IO CBool)
-> FunPtr
     (Ptr Void
      -> PtrConst CChar
      -> SDL_EnumerateDirectoryCallback
      -> Ptr Void
      -> IO CBool)
-> FunPtr
     (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
-> FunPtr
     (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
-> FunPtr
     (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
-> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
-> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
-> FunPtr
     (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
-> FunPtr
     (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
-> FunPtr (Ptr Void -> IO Uint64)
-> SDL_StorageInterface
SDL_StorageInterface
        IO
  (Uint32
   -> FunPtr (Ptr Void -> IO CBool)
   -> FunPtr (Ptr Void -> IO CBool)
   -> FunPtr
        (Ptr Void
         -> PtrConst CChar
         -> SDL_EnumerateDirectoryCallback
         -> Ptr Void
         -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> IO Uint64)
   -> SDL_StorageInterface)
-> IO Uint32
-> IO
     (FunPtr (Ptr Void -> IO CBool)
      -> FunPtr (Ptr Void -> IO CBool)
      -> FunPtr
           (Ptr Void
            -> PtrConst CChar
            -> SDL_EnumerateDirectoryCallback
            -> Ptr Void
            -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> IO Uint64)
      -> SDL_StorageInterface)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "version"
-> Ptr SDL_StorageInterface
-> IO (CFieldType SDL_StorageInterface "version")
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 @"version") Ptr SDL_StorageInterface
ptr0
        IO
  (FunPtr (Ptr Void -> IO CBool)
   -> FunPtr (Ptr Void -> IO CBool)
   -> FunPtr
        (Ptr Void
         -> PtrConst CChar
         -> SDL_EnumerateDirectoryCallback
         -> Ptr Void
         -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> IO Uint64)
   -> SDL_StorageInterface)
-> IO (FunPtr (Ptr Void -> IO CBool))
-> IO
     (FunPtr (Ptr Void -> IO CBool)
      -> FunPtr
           (Ptr Void
            -> PtrConst CChar
            -> SDL_EnumerateDirectoryCallback
            -> Ptr Void
            -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> IO Uint64)
      -> SDL_StorageInterface)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "close"
-> Ptr SDL_StorageInterface
-> IO (CFieldType SDL_StorageInterface "close")
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 @"close") Ptr SDL_StorageInterface
ptr0
        IO
  (FunPtr (Ptr Void -> IO CBool)
   -> FunPtr
        (Ptr Void
         -> PtrConst CChar
         -> SDL_EnumerateDirectoryCallback
         -> Ptr Void
         -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> IO Uint64)
   -> SDL_StorageInterface)
-> IO (FunPtr (Ptr Void -> IO CBool))
-> IO
     (FunPtr
        (Ptr Void
         -> PtrConst CChar
         -> SDL_EnumerateDirectoryCallback
         -> Ptr Void
         -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> IO Uint64)
      -> SDL_StorageInterface)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "ready"
-> Ptr SDL_StorageInterface
-> IO (CFieldType SDL_StorageInterface "ready")
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 @"ready") Ptr SDL_StorageInterface
ptr0
        IO
  (FunPtr
     (Ptr Void
      -> PtrConst CChar
      -> SDL_EnumerateDirectoryCallback
      -> Ptr Void
      -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> IO Uint64)
   -> SDL_StorageInterface)
-> IO
     (FunPtr
        (Ptr Void
         -> PtrConst CChar
         -> SDL_EnumerateDirectoryCallback
         -> Ptr Void
         -> IO CBool))
-> IO
     (FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> IO Uint64)
      -> SDL_StorageInterface)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "enumerate"
-> Ptr SDL_StorageInterface
-> IO (CFieldType SDL_StorageInterface "enumerate")
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 @"enumerate") Ptr SDL_StorageInterface
ptr0
        IO
  (FunPtr
     (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> IO Uint64)
   -> SDL_StorageInterface)
-> IO
     (FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool))
-> IO
     (FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> IO Uint64)
      -> SDL_StorageInterface)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "info"
-> Ptr SDL_StorageInterface
-> IO (CFieldType SDL_StorageInterface "info")
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 @"info") Ptr SDL_StorageInterface
ptr0
        IO
  (FunPtr
     (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> IO Uint64)
   -> SDL_StorageInterface)
-> IO
     (FunPtr
        (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool))
-> IO
     (FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> IO Uint64)
      -> SDL_StorageInterface)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "read_file"
-> Ptr SDL_StorageInterface
-> IO (CFieldType SDL_StorageInterface "read_file")
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 @"read_file") Ptr SDL_StorageInterface
ptr0
        IO
  (FunPtr
     (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> IO Uint64)
   -> SDL_StorageInterface)
-> IO
     (FunPtr
        (Ptr Void
         -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool))
-> IO
     (FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> IO Uint64)
      -> SDL_StorageInterface)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "write_file"
-> Ptr SDL_StorageInterface
-> IO (CFieldType SDL_StorageInterface "write_file")
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 @"write_file") Ptr SDL_StorageInterface
ptr0
        IO
  (FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> IO Uint64)
   -> SDL_StorageInterface)
-> IO (FunPtr (Ptr Void -> PtrConst CChar -> IO CBool))
-> IO
     (FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> IO Uint64)
      -> SDL_StorageInterface)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "mkdir"
-> Ptr SDL_StorageInterface
-> IO (CFieldType SDL_StorageInterface "mkdir")
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 @"mkdir") Ptr SDL_StorageInterface
ptr0
        IO
  (FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> IO Uint64)
   -> SDL_StorageInterface)
-> IO (FunPtr (Ptr Void -> PtrConst CChar -> IO CBool))
-> IO
     (FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr
           (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> IO Uint64)
      -> SDL_StorageInterface)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "remove"
-> Ptr SDL_StorageInterface
-> IO (CFieldType SDL_StorageInterface "remove")
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 @"remove") Ptr SDL_StorageInterface
ptr0
        IO
  (FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr
        (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> IO Uint64)
   -> SDL_StorageInterface)
-> IO
     (FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool))
-> IO
     (FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
      -> FunPtr (Ptr Void -> IO Uint64) -> SDL_StorageInterface)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "rename"
-> Ptr SDL_StorageInterface
-> IO (CFieldType SDL_StorageInterface "rename")
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 @"rename") Ptr SDL_StorageInterface
ptr0
        IO
  (FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
   -> FunPtr (Ptr Void -> IO Uint64) -> SDL_StorageInterface)
-> IO
     (FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool))
-> IO (FunPtr (Ptr Void -> IO Uint64) -> SDL_StorageInterface)
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "copy"
-> Ptr SDL_StorageInterface
-> IO (CFieldType SDL_StorageInterface "copy")
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 @"copy") Ptr SDL_StorageInterface
ptr0
        IO (FunPtr (Ptr Void -> IO Uint64) -> SDL_StorageInterface)
-> IO (FunPtr (Ptr Void -> IO Uint64)) -> IO SDL_StorageInterface
forall a b. IO (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Proxy "space_remaining"
-> Ptr SDL_StorageInterface
-> IO (CFieldType SDL_StorageInterface "space_remaining")
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 @"space_remaining") Ptr SDL_StorageInterface
ptr0

instance Marshal.WriteRaw SDL_StorageInterface where
  writeRaw :: Ptr SDL_StorageInterface -> SDL_StorageInterface -> IO ()
writeRaw =
    \Ptr SDL_StorageInterface
ptr0 ->
      \SDL_StorageInterface
s1 ->
        case SDL_StorageInterface
s1 of
          SDL_StorageInterface
            Uint32
version2
            FunPtr (Ptr Void -> IO CBool)
close3
            FunPtr (Ptr Void -> IO CBool)
ready4
            FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate5
            FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info6
            FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file7
            FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file8
            FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir9
            FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove10
            FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename11
            FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy12
            FunPtr (Ptr Void -> IO Uint64)
space_remaining13 ->
              Proxy "version"
-> Ptr SDL_StorageInterface
-> CFieldType SDL_StorageInterface "version"
-> 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 @"version") Ptr SDL_StorageInterface
ptr0 CFieldType SDL_StorageInterface "version"
Uint32
version2
                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 "close"
-> Ptr SDL_StorageInterface
-> CFieldType SDL_StorageInterface "close"
-> 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 @"close") Ptr SDL_StorageInterface
ptr0 FunPtr (Ptr Void -> IO CBool)
CFieldType SDL_StorageInterface "close"
close3
                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 "ready"
-> Ptr SDL_StorageInterface
-> CFieldType SDL_StorageInterface "ready"
-> 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 @"ready") Ptr SDL_StorageInterface
ptr0 FunPtr (Ptr Void -> IO CBool)
CFieldType SDL_StorageInterface "ready"
ready4
                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 "enumerate"
-> Ptr SDL_StorageInterface
-> CFieldType SDL_StorageInterface "enumerate"
-> 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 @"enumerate") Ptr SDL_StorageInterface
ptr0 FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
CFieldType SDL_StorageInterface "enumerate"
enumerate5
                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 "info"
-> Ptr SDL_StorageInterface
-> CFieldType SDL_StorageInterface "info"
-> 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 @"info") Ptr SDL_StorageInterface
ptr0 FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
CFieldType SDL_StorageInterface "info"
info6
                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 "read_file"
-> Ptr SDL_StorageInterface
-> CFieldType SDL_StorageInterface "read_file"
-> 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 @"read_file") Ptr SDL_StorageInterface
ptr0 FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
CFieldType SDL_StorageInterface "read_file"
read_file7
                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 "write_file"
-> Ptr SDL_StorageInterface
-> CFieldType SDL_StorageInterface "write_file"
-> 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 @"write_file") Ptr SDL_StorageInterface
ptr0 FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
CFieldType SDL_StorageInterface "write_file"
write_file8
                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 "mkdir"
-> Ptr SDL_StorageInterface
-> CFieldType SDL_StorageInterface "mkdir"
-> 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 @"mkdir") Ptr SDL_StorageInterface
ptr0 FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
CFieldType SDL_StorageInterface "mkdir"
mkdir9
                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 "remove"
-> Ptr SDL_StorageInterface
-> CFieldType SDL_StorageInterface "remove"
-> 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 @"remove") Ptr SDL_StorageInterface
ptr0 FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
CFieldType SDL_StorageInterface "remove"
remove10
                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 "rename"
-> Ptr SDL_StorageInterface
-> CFieldType SDL_StorageInterface "rename"
-> 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 @"rename") Ptr SDL_StorageInterface
ptr0 FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
CFieldType SDL_StorageInterface "rename"
rename11
                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 "copy"
-> Ptr SDL_StorageInterface
-> CFieldType SDL_StorageInterface "copy"
-> 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 @"copy") Ptr SDL_StorageInterface
ptr0 FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
CFieldType SDL_StorageInterface "copy"
copy12
                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 "space_remaining"
-> Ptr SDL_StorageInterface
-> CFieldType SDL_StorageInterface "space_remaining"
-> 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 @"space_remaining") Ptr SDL_StorageInterface
ptr0 FunPtr (Ptr Void -> IO Uint64)
CFieldType SDL_StorageInterface "space_remaining"
space_remaining13

deriving via Marshal.EquivStorable SDL_StorageInterface instance BG.Storable SDL_StorageInterface

deriving via
  Struct.IsStructViaReadRaw SDL_StorageInterface
  instance
    Struct.IsStruct SDL_StorageInterface

-- | [C declaration]: @version@, defined at @SDL3\/SDL_storage.h 277:12@
instance
  (ty ~ SDL3.Sys.Bindgen.Stdinc.Uint32)
  => BG.CompatHasField.HasField "version" SDL_StorageInterface ty
  where
  hasField :: SDL_StorageInterface -> (ty -> SDL_StorageInterface, ty)
hasField =
    \SDL_StorageInterface
x0 ->
      ( \ty
y1 ->
          SDL_StorageInterface
            { version :: Uint32
version = ty
Uint32
y1
            , close :: FunPtr (Ptr Void -> IO CBool)
close = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"close" SDL_StorageInterface
x0
            , ready :: FunPtr (Ptr Void -> IO CBool)
ready = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"ready" SDL_StorageInterface
x0
            , enumerate :: FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"enumerate" SDL_StorageInterface
x0
            , info :: FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"info" SDL_StorageInterface
x0
            , read_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"read_file" SDL_StorageInterface
x0
            , write_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"write_file" SDL_StorageInterface
x0
            , mkdir :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"mkdir" SDL_StorageInterface
x0
            , remove :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"remove" SDL_StorageInterface
x0
            , rename :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"rename" SDL_StorageInterface
x0
            , copy :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"copy" SDL_StorageInterface
x0
            , space_remaining :: FunPtr (Ptr Void -> IO Uint64)
space_remaining = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"space_remaining" SDL_StorageInterface
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 @"version" SDL_StorageInterface
x0
      )

instance
  (ty ~ SDL3.Sys.Bindgen.Stdinc.Uint32)
  => BG.HasField "version" (BG.Ptr SDL_StorageInterface) (BG.Ptr ty)
  where
  getField :: Ptr SDL_StorageInterface -> Ptr ty
getField = Proxy "version"
-> Ptr SDL_StorageInterface
-> Ptr (CFieldType SDL_StorageInterface "version")
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 @"version")

instance HasCField.HasCField SDL_StorageInterface "version" where
  type
    CFieldType SDL_StorageInterface "version" =
      SDL3.Sys.Bindgen.Stdinc.Uint32

  offset# :: Proxy# SDL_StorageInterface -> Proxy# "version" -> Int
offset# = \Proxy# SDL_StorageInterface
_ -> \Proxy# "version"
_ -> Int
0

-- | [C declaration]: @close@, defined at @SDL3\/SDL_storage.h 280:20@
instance
  (ty ~ BG.FunPtr (BG.Ptr BG.Void -> IO BG.CBool))
  => BG.CompatHasField.HasField "close" SDL_StorageInterface ty
  where
  hasField :: SDL_StorageInterface -> (ty -> SDL_StorageInterface, ty)
hasField =
    \SDL_StorageInterface
x0 ->
      ( \ty
y1 ->
          SDL_StorageInterface
            { close :: FunPtr (Ptr Void -> IO CBool)
close = ty
FunPtr (Ptr Void -> IO CBool)
y1
            , version :: Uint32
version = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"version" SDL_StorageInterface
x0
            , ready :: FunPtr (Ptr Void -> IO CBool)
ready = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"ready" SDL_StorageInterface
x0
            , enumerate :: FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"enumerate" SDL_StorageInterface
x0
            , info :: FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"info" SDL_StorageInterface
x0
            , read_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"read_file" SDL_StorageInterface
x0
            , write_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"write_file" SDL_StorageInterface
x0
            , mkdir :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"mkdir" SDL_StorageInterface
x0
            , remove :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"remove" SDL_StorageInterface
x0
            , rename :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"rename" SDL_StorageInterface
x0
            , copy :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"copy" SDL_StorageInterface
x0
            , space_remaining :: FunPtr (Ptr Void -> IO Uint64)
space_remaining = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"space_remaining" SDL_StorageInterface
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 @"close" SDL_StorageInterface
x0
      )

instance
  (ty ~ BG.FunPtr (BG.Ptr BG.Void -> IO BG.CBool))
  => BG.HasField "close" (BG.Ptr SDL_StorageInterface) (BG.Ptr ty)
  where
  getField :: Ptr SDL_StorageInterface -> Ptr ty
getField = Proxy "close"
-> Ptr SDL_StorageInterface
-> Ptr (CFieldType SDL_StorageInterface "close")
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 @"close")

instance HasCField.HasCField SDL_StorageInterface "close" where
  type
    CFieldType SDL_StorageInterface "close" =
      BG.FunPtr (BG.Ptr BG.Void -> IO BG.CBool)

  offset# :: Proxy# SDL_StorageInterface -> Proxy# "close" -> Int
offset# = \Proxy# SDL_StorageInterface
_ -> \Proxy# "close"
_ -> Int
8

-- | [C declaration]: @ready@, defined at @SDL3\/SDL_storage.h 283:20@
instance
  (ty ~ BG.FunPtr (BG.Ptr BG.Void -> IO BG.CBool))
  => BG.CompatHasField.HasField "ready" SDL_StorageInterface ty
  where
  hasField :: SDL_StorageInterface -> (ty -> SDL_StorageInterface, ty)
hasField =
    \SDL_StorageInterface
x0 ->
      ( \ty
y1 ->
          SDL_StorageInterface
            { ready :: FunPtr (Ptr Void -> IO CBool)
ready = ty
FunPtr (Ptr Void -> IO CBool)
y1
            , version :: Uint32
version = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"version" SDL_StorageInterface
x0
            , close :: FunPtr (Ptr Void -> IO CBool)
close = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"close" SDL_StorageInterface
x0
            , enumerate :: FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"enumerate" SDL_StorageInterface
x0
            , info :: FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"info" SDL_StorageInterface
x0
            , read_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"read_file" SDL_StorageInterface
x0
            , write_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"write_file" SDL_StorageInterface
x0
            , mkdir :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"mkdir" SDL_StorageInterface
x0
            , remove :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"remove" SDL_StorageInterface
x0
            , rename :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"rename" SDL_StorageInterface
x0
            , copy :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"copy" SDL_StorageInterface
x0
            , space_remaining :: FunPtr (Ptr Void -> IO Uint64)
space_remaining = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"space_remaining" SDL_StorageInterface
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 @"ready" SDL_StorageInterface
x0
      )

instance
  (ty ~ BG.FunPtr (BG.Ptr BG.Void -> IO BG.CBool))
  => BG.HasField "ready" (BG.Ptr SDL_StorageInterface) (BG.Ptr ty)
  where
  getField :: Ptr SDL_StorageInterface -> Ptr ty
getField = Proxy "ready"
-> Ptr SDL_StorageInterface
-> Ptr (CFieldType SDL_StorageInterface "ready")
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 @"ready")

instance HasCField.HasCField SDL_StorageInterface "ready" where
  type
    CFieldType SDL_StorageInterface "ready" =
      BG.FunPtr (BG.Ptr BG.Void -> IO BG.CBool)

  offset# :: Proxy# SDL_StorageInterface -> Proxy# "ready" -> Int
offset# = \Proxy# SDL_StorageInterface
_ -> \Proxy# "ready"
_ -> Int
16

-- | [C declaration]: @enumerate@, defined at @SDL3\/SDL_storage.h 286:20@
instance
  ( ty
      ~ BG.FunPtr
          ( BG.Ptr BG.Void
            -> PtrConst.PtrConst BG.CChar
            -> SDL3.Sys.Bindgen.Filesystem.SDL_EnumerateDirectoryCallback
            -> BG.Ptr BG.Void
            -> IO BG.CBool
          )
  )
  => BG.CompatHasField.HasField "enumerate" SDL_StorageInterface ty
  where
  hasField :: SDL_StorageInterface -> (ty -> SDL_StorageInterface, ty)
hasField =
    \SDL_StorageInterface
x0 ->
      ( \ty
y1 ->
          SDL_StorageInterface
            { enumerate :: FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate = ty
FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
y1
            , version :: Uint32
version = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"version" SDL_StorageInterface
x0
            , close :: FunPtr (Ptr Void -> IO CBool)
close = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"close" SDL_StorageInterface
x0
            , ready :: FunPtr (Ptr Void -> IO CBool)
ready = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"ready" SDL_StorageInterface
x0
            , info :: FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"info" SDL_StorageInterface
x0
            , read_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"read_file" SDL_StorageInterface
x0
            , write_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"write_file" SDL_StorageInterface
x0
            , mkdir :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"mkdir" SDL_StorageInterface
x0
            , remove :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"remove" SDL_StorageInterface
x0
            , rename :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"rename" SDL_StorageInterface
x0
            , copy :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"copy" SDL_StorageInterface
x0
            , space_remaining :: FunPtr (Ptr Void -> IO Uint64)
space_remaining = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"space_remaining" SDL_StorageInterface
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 @"enumerate" SDL_StorageInterface
x0
      )

instance
  ( ty
      ~ BG.FunPtr
          ( BG.Ptr BG.Void
            -> PtrConst.PtrConst BG.CChar
            -> SDL3.Sys.Bindgen.Filesystem.SDL_EnumerateDirectoryCallback
            -> BG.Ptr BG.Void
            -> IO BG.CBool
          )
  )
  => BG.HasField "enumerate" (BG.Ptr SDL_StorageInterface) (BG.Ptr ty)
  where
  getField :: Ptr SDL_StorageInterface -> Ptr ty
getField = Proxy "enumerate"
-> Ptr SDL_StorageInterface
-> Ptr (CFieldType SDL_StorageInterface "enumerate")
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 @"enumerate")

instance HasCField.HasCField SDL_StorageInterface "enumerate" where
  type
    CFieldType SDL_StorageInterface "enumerate" =
      BG.FunPtr
        ( BG.Ptr BG.Void
          -> PtrConst.PtrConst BG.CChar
          -> SDL3.Sys.Bindgen.Filesystem.SDL_EnumerateDirectoryCallback
          -> BG.Ptr BG.Void
          -> IO BG.CBool
        )

  offset# :: Proxy# SDL_StorageInterface -> Proxy# "enumerate" -> Int
offset# = \Proxy# SDL_StorageInterface
_ -> \Proxy# "enumerate"
_ -> Int
24

-- | [C declaration]: @info@, defined at @SDL3\/SDL_storage.h 289:20@
instance
  ( ty
      ~ BG.FunPtr
          ( BG.Ptr BG.Void
            -> PtrConst.PtrConst BG.CChar
            -> BG.Ptr SDL3.Sys.Bindgen.Filesystem.SDL_PathInfo
            -> IO BG.CBool
          )
  )
  => BG.CompatHasField.HasField "info" SDL_StorageInterface ty
  where
  hasField :: SDL_StorageInterface -> (ty -> SDL_StorageInterface, ty)
hasField =
    \SDL_StorageInterface
x0 ->
      ( \ty
y1 ->
          SDL_StorageInterface
            { info :: FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info = ty
FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
y1
            , version :: Uint32
version = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"version" SDL_StorageInterface
x0
            , close :: FunPtr (Ptr Void -> IO CBool)
close = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"close" SDL_StorageInterface
x0
            , ready :: FunPtr (Ptr Void -> IO CBool)
ready = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"ready" SDL_StorageInterface
x0
            , enumerate :: FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"enumerate" SDL_StorageInterface
x0
            , read_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"read_file" SDL_StorageInterface
x0
            , write_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"write_file" SDL_StorageInterface
x0
            , mkdir :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"mkdir" SDL_StorageInterface
x0
            , remove :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"remove" SDL_StorageInterface
x0
            , rename :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"rename" SDL_StorageInterface
x0
            , copy :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"copy" SDL_StorageInterface
x0
            , space_remaining :: FunPtr (Ptr Void -> IO Uint64)
space_remaining = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"space_remaining" SDL_StorageInterface
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 @"info" SDL_StorageInterface
x0
      )

instance
  ( ty
      ~ BG.FunPtr
          ( BG.Ptr BG.Void
            -> PtrConst.PtrConst BG.CChar
            -> BG.Ptr SDL3.Sys.Bindgen.Filesystem.SDL_PathInfo
            -> IO BG.CBool
          )
  )
  => BG.HasField "info" (BG.Ptr SDL_StorageInterface) (BG.Ptr ty)
  where
  getField :: Ptr SDL_StorageInterface -> Ptr ty
getField = Proxy "info"
-> Ptr SDL_StorageInterface
-> Ptr (CFieldType SDL_StorageInterface "info")
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 @"info")

instance HasCField.HasCField SDL_StorageInterface "info" where
  type
    CFieldType SDL_StorageInterface "info" =
      BG.FunPtr
        ( BG.Ptr BG.Void
          -> PtrConst.PtrConst BG.CChar
          -> BG.Ptr SDL3.Sys.Bindgen.Filesystem.SDL_PathInfo
          -> IO BG.CBool
        )

  offset# :: Proxy# SDL_StorageInterface -> Proxy# "info" -> Int
offset# = \Proxy# SDL_StorageInterface
_ -> \Proxy# "info"
_ -> Int
32

-- | [C declaration]: @read_file@, defined at @SDL3\/SDL_storage.h 292:20@
instance
  ( ty
      ~ BG.FunPtr
          ( BG.Ptr BG.Void
            -> PtrConst.PtrConst BG.CChar
            -> BG.Ptr BG.Void
            -> SDL3.Sys.Bindgen.Stdinc.Uint64
            -> IO BG.CBool
          )
  )
  => BG.CompatHasField.HasField "read_file" SDL_StorageInterface ty
  where
  hasField :: SDL_StorageInterface -> (ty -> SDL_StorageInterface, ty)
hasField =
    \SDL_StorageInterface
x0 ->
      ( \ty
y1 ->
          SDL_StorageInterface
            { read_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file = ty
FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
y1
            , version :: Uint32
version = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"version" SDL_StorageInterface
x0
            , close :: FunPtr (Ptr Void -> IO CBool)
close = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"close" SDL_StorageInterface
x0
            , ready :: FunPtr (Ptr Void -> IO CBool)
ready = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"ready" SDL_StorageInterface
x0
            , enumerate :: FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"enumerate" SDL_StorageInterface
x0
            , info :: FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"info" SDL_StorageInterface
x0
            , write_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"write_file" SDL_StorageInterface
x0
            , mkdir :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"mkdir" SDL_StorageInterface
x0
            , remove :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"remove" SDL_StorageInterface
x0
            , rename :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"rename" SDL_StorageInterface
x0
            , copy :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"copy" SDL_StorageInterface
x0
            , space_remaining :: FunPtr (Ptr Void -> IO Uint64)
space_remaining = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"space_remaining" SDL_StorageInterface
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 @"read_file" SDL_StorageInterface
x0
      )

instance
  ( ty
      ~ BG.FunPtr
          ( BG.Ptr BG.Void
            -> PtrConst.PtrConst BG.CChar
            -> BG.Ptr BG.Void
            -> SDL3.Sys.Bindgen.Stdinc.Uint64
            -> IO BG.CBool
          )
  )
  => BG.HasField "read_file" (BG.Ptr SDL_StorageInterface) (BG.Ptr ty)
  where
  getField :: Ptr SDL_StorageInterface -> Ptr ty
getField = Proxy "read_file"
-> Ptr SDL_StorageInterface
-> Ptr (CFieldType SDL_StorageInterface "read_file")
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 @"read_file")

instance HasCField.HasCField SDL_StorageInterface "read_file" where
  type
    CFieldType SDL_StorageInterface "read_file" =
      BG.FunPtr
        ( BG.Ptr BG.Void
          -> PtrConst.PtrConst BG.CChar
          -> BG.Ptr BG.Void
          -> SDL3.Sys.Bindgen.Stdinc.Uint64
          -> IO BG.CBool
        )

  offset# :: Proxy# SDL_StorageInterface -> Proxy# "read_file" -> Int
offset# = \Proxy# SDL_StorageInterface
_ -> \Proxy# "read_file"
_ -> Int
40

-- | [C declaration]: @write_file@, defined at @SDL3\/SDL_storage.h 295:20@
instance
  ( ty
      ~ BG.FunPtr
          ( BG.Ptr BG.Void
            -> PtrConst.PtrConst BG.CChar
            -> PtrConst.PtrConst BG.Void
            -> SDL3.Sys.Bindgen.Stdinc.Uint64
            -> IO BG.CBool
          )
  )
  => BG.CompatHasField.HasField "write_file" SDL_StorageInterface ty
  where
  hasField :: SDL_StorageInterface -> (ty -> SDL_StorageInterface, ty)
hasField =
    \SDL_StorageInterface
x0 ->
      ( \ty
y1 ->
          SDL_StorageInterface
            { write_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file = ty
FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
y1
            , version :: Uint32
version = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"version" SDL_StorageInterface
x0
            , close :: FunPtr (Ptr Void -> IO CBool)
close = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"close" SDL_StorageInterface
x0
            , ready :: FunPtr (Ptr Void -> IO CBool)
ready = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"ready" SDL_StorageInterface
x0
            , enumerate :: FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"enumerate" SDL_StorageInterface
x0
            , info :: FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"info" SDL_StorageInterface
x0
            , read_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"read_file" SDL_StorageInterface
x0
            , mkdir :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"mkdir" SDL_StorageInterface
x0
            , remove :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"remove" SDL_StorageInterface
x0
            , rename :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"rename" SDL_StorageInterface
x0
            , copy :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"copy" SDL_StorageInterface
x0
            , space_remaining :: FunPtr (Ptr Void -> IO Uint64)
space_remaining = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"space_remaining" SDL_StorageInterface
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 @"write_file" SDL_StorageInterface
x0
      )

instance
  ( ty
      ~ BG.FunPtr
          ( BG.Ptr BG.Void
            -> PtrConst.PtrConst BG.CChar
            -> PtrConst.PtrConst BG.Void
            -> SDL3.Sys.Bindgen.Stdinc.Uint64
            -> IO BG.CBool
          )
  )
  => BG.HasField "write_file" (BG.Ptr SDL_StorageInterface) (BG.Ptr ty)
  where
  getField :: Ptr SDL_StorageInterface -> Ptr ty
getField = Proxy "write_file"
-> Ptr SDL_StorageInterface
-> Ptr (CFieldType SDL_StorageInterface "write_file")
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 @"write_file")

instance HasCField.HasCField SDL_StorageInterface "write_file" where
  type
    CFieldType SDL_StorageInterface "write_file" =
      BG.FunPtr
        ( BG.Ptr BG.Void
          -> PtrConst.PtrConst BG.CChar
          -> PtrConst.PtrConst BG.Void
          -> SDL3.Sys.Bindgen.Stdinc.Uint64
          -> IO BG.CBool
        )

  offset# :: Proxy# SDL_StorageInterface -> Proxy# "write_file" -> Int
offset# = \Proxy# SDL_StorageInterface
_ -> \Proxy# "write_file"
_ -> Int
48

-- | [C declaration]: @mkdir@, defined at @SDL3\/SDL_storage.h 298:20@
instance
  (ty ~ BG.FunPtr (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> IO BG.CBool))
  => BG.CompatHasField.HasField "mkdir" SDL_StorageInterface ty
  where
  hasField :: SDL_StorageInterface -> (ty -> SDL_StorageInterface, ty)
hasField =
    \SDL_StorageInterface
x0 ->
      ( \ty
y1 ->
          SDL_StorageInterface
            { mkdir :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir = ty
FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
y1
            , version :: Uint32
version = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"version" SDL_StorageInterface
x0
            , close :: FunPtr (Ptr Void -> IO CBool)
close = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"close" SDL_StorageInterface
x0
            , ready :: FunPtr (Ptr Void -> IO CBool)
ready = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"ready" SDL_StorageInterface
x0
            , enumerate :: FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"enumerate" SDL_StorageInterface
x0
            , info :: FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"info" SDL_StorageInterface
x0
            , read_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"read_file" SDL_StorageInterface
x0
            , write_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"write_file" SDL_StorageInterface
x0
            , remove :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"remove" SDL_StorageInterface
x0
            , rename :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"rename" SDL_StorageInterface
x0
            , copy :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"copy" SDL_StorageInterface
x0
            , space_remaining :: FunPtr (Ptr Void -> IO Uint64)
space_remaining = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"space_remaining" SDL_StorageInterface
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 @"mkdir" SDL_StorageInterface
x0
      )

instance
  (ty ~ BG.FunPtr (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> IO BG.CBool))
  => BG.HasField "mkdir" (BG.Ptr SDL_StorageInterface) (BG.Ptr ty)
  where
  getField :: Ptr SDL_StorageInterface -> Ptr ty
getField = Proxy "mkdir"
-> Ptr SDL_StorageInterface
-> Ptr (CFieldType SDL_StorageInterface "mkdir")
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 @"mkdir")

instance HasCField.HasCField SDL_StorageInterface "mkdir" where
  type
    CFieldType SDL_StorageInterface "mkdir" =
      BG.FunPtr (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> IO BG.CBool)

  offset# :: Proxy# SDL_StorageInterface -> Proxy# "mkdir" -> Int
offset# = \Proxy# SDL_StorageInterface
_ -> \Proxy# "mkdir"
_ -> Int
56

-- | [C declaration]: @remove@, defined at @SDL3\/SDL_storage.h 301:20@
instance
  (ty ~ BG.FunPtr (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> IO BG.CBool))
  => BG.CompatHasField.HasField "remove" SDL_StorageInterface ty
  where
  hasField :: SDL_StorageInterface -> (ty -> SDL_StorageInterface, ty)
hasField =
    \SDL_StorageInterface
x0 ->
      ( \ty
y1 ->
          SDL_StorageInterface
            { remove :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove = ty
FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
y1
            , version :: Uint32
version = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"version" SDL_StorageInterface
x0
            , close :: FunPtr (Ptr Void -> IO CBool)
close = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"close" SDL_StorageInterface
x0
            , ready :: FunPtr (Ptr Void -> IO CBool)
ready = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"ready" SDL_StorageInterface
x0
            , enumerate :: FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"enumerate" SDL_StorageInterface
x0
            , info :: FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"info" SDL_StorageInterface
x0
            , read_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"read_file" SDL_StorageInterface
x0
            , write_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"write_file" SDL_StorageInterface
x0
            , mkdir :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"mkdir" SDL_StorageInterface
x0
            , rename :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"rename" SDL_StorageInterface
x0
            , copy :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"copy" SDL_StorageInterface
x0
            , space_remaining :: FunPtr (Ptr Void -> IO Uint64)
space_remaining = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"space_remaining" SDL_StorageInterface
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 @"remove" SDL_StorageInterface
x0
      )

instance
  (ty ~ BG.FunPtr (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> IO BG.CBool))
  => BG.HasField "remove" (BG.Ptr SDL_StorageInterface) (BG.Ptr ty)
  where
  getField :: Ptr SDL_StorageInterface -> Ptr ty
getField = Proxy "remove"
-> Ptr SDL_StorageInterface
-> Ptr (CFieldType SDL_StorageInterface "remove")
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 @"remove")

instance HasCField.HasCField SDL_StorageInterface "remove" where
  type
    CFieldType SDL_StorageInterface "remove" =
      BG.FunPtr (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> IO BG.CBool)

  offset# :: Proxy# SDL_StorageInterface -> Proxy# "remove" -> Int
offset# = \Proxy# SDL_StorageInterface
_ -> \Proxy# "remove"
_ -> Int
64

-- | [C declaration]: @rename@, defined at @SDL3\/SDL_storage.h 304:20@
instance
  ( ty
      ~ BG.FunPtr
          (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> PtrConst.PtrConst BG.CChar -> IO BG.CBool)
  )
  => BG.CompatHasField.HasField "rename" SDL_StorageInterface ty
  where
  hasField :: SDL_StorageInterface -> (ty -> SDL_StorageInterface, ty)
hasField =
    \SDL_StorageInterface
x0 ->
      ( \ty
y1 ->
          SDL_StorageInterface
            { rename :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename = ty
FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
y1
            , version :: Uint32
version = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"version" SDL_StorageInterface
x0
            , close :: FunPtr (Ptr Void -> IO CBool)
close = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"close" SDL_StorageInterface
x0
            , ready :: FunPtr (Ptr Void -> IO CBool)
ready = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"ready" SDL_StorageInterface
x0
            , enumerate :: FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"enumerate" SDL_StorageInterface
x0
            , info :: FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"info" SDL_StorageInterface
x0
            , read_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"read_file" SDL_StorageInterface
x0
            , write_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"write_file" SDL_StorageInterface
x0
            , mkdir :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"mkdir" SDL_StorageInterface
x0
            , remove :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"remove" SDL_StorageInterface
x0
            , copy :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"copy" SDL_StorageInterface
x0
            , space_remaining :: FunPtr (Ptr Void -> IO Uint64)
space_remaining = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"space_remaining" SDL_StorageInterface
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 @"rename" SDL_StorageInterface
x0
      )

instance
  ( ty
      ~ BG.FunPtr
          (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> PtrConst.PtrConst BG.CChar -> IO BG.CBool)
  )
  => BG.HasField "rename" (BG.Ptr SDL_StorageInterface) (BG.Ptr ty)
  where
  getField :: Ptr SDL_StorageInterface -> Ptr ty
getField = Proxy "rename"
-> Ptr SDL_StorageInterface
-> Ptr (CFieldType SDL_StorageInterface "rename")
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 @"rename")

instance HasCField.HasCField SDL_StorageInterface "rename" where
  type
    CFieldType SDL_StorageInterface "rename" =
      BG.FunPtr
        (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> PtrConst.PtrConst BG.CChar -> IO BG.CBool)

  offset# :: Proxy# SDL_StorageInterface -> Proxy# "rename" -> Int
offset# = \Proxy# SDL_StorageInterface
_ -> \Proxy# "rename"
_ -> Int
72

-- | [C declaration]: @copy@, defined at @SDL3\/SDL_storage.h 307:20@
instance
  ( ty
      ~ BG.FunPtr
          (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> PtrConst.PtrConst BG.CChar -> IO BG.CBool)
  )
  => BG.CompatHasField.HasField "copy" SDL_StorageInterface ty
  where
  hasField :: SDL_StorageInterface -> (ty -> SDL_StorageInterface, ty)
hasField =
    \SDL_StorageInterface
x0 ->
      ( \ty
y1 ->
          SDL_StorageInterface
            { copy :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy = ty
FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
y1
            , version :: Uint32
version = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"version" SDL_StorageInterface
x0
            , close :: FunPtr (Ptr Void -> IO CBool)
close = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"close" SDL_StorageInterface
x0
            , ready :: FunPtr (Ptr Void -> IO CBool)
ready = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"ready" SDL_StorageInterface
x0
            , enumerate :: FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"enumerate" SDL_StorageInterface
x0
            , info :: FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"info" SDL_StorageInterface
x0
            , read_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"read_file" SDL_StorageInterface
x0
            , write_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"write_file" SDL_StorageInterface
x0
            , mkdir :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"mkdir" SDL_StorageInterface
x0
            , remove :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"remove" SDL_StorageInterface
x0
            , rename :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"rename" SDL_StorageInterface
x0
            , space_remaining :: FunPtr (Ptr Void -> IO Uint64)
space_remaining = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"space_remaining" SDL_StorageInterface
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 @"copy" SDL_StorageInterface
x0
      )

instance
  ( ty
      ~ BG.FunPtr
          (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> PtrConst.PtrConst BG.CChar -> IO BG.CBool)
  )
  => BG.HasField "copy" (BG.Ptr SDL_StorageInterface) (BG.Ptr ty)
  where
  getField :: Ptr SDL_StorageInterface -> Ptr ty
getField = Proxy "copy"
-> Ptr SDL_StorageInterface
-> Ptr (CFieldType SDL_StorageInterface "copy")
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 @"copy")

instance HasCField.HasCField SDL_StorageInterface "copy" where
  type
    CFieldType SDL_StorageInterface "copy" =
      BG.FunPtr
        (BG.Ptr BG.Void -> PtrConst.PtrConst BG.CChar -> PtrConst.PtrConst BG.CChar -> IO BG.CBool)

  offset# :: Proxy# SDL_StorageInterface -> Proxy# "copy" -> Int
offset# = \Proxy# SDL_StorageInterface
_ -> \Proxy# "copy"
_ -> Int
80

-- | [C declaration]: @space_remaining@, defined at @SDL3\/SDL_storage.h 310:22@
instance
  (ty ~ BG.FunPtr (BG.Ptr BG.Void -> IO SDL3.Sys.Bindgen.Stdinc.Uint64))
  => BG.CompatHasField.HasField "space_remaining" SDL_StorageInterface ty
  where
  hasField :: SDL_StorageInterface -> (ty -> SDL_StorageInterface, ty)
hasField =
    \SDL_StorageInterface
x0 ->
      ( \ty
y1 ->
          SDL_StorageInterface
            { space_remaining :: FunPtr (Ptr Void -> IO Uint64)
space_remaining = ty
FunPtr (Ptr Void -> IO Uint64)
y1
            , version :: Uint32
version = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"version" SDL_StorageInterface
x0
            , close :: FunPtr (Ptr Void -> IO CBool)
close = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"close" SDL_StorageInterface
x0
            , ready :: FunPtr (Ptr Void -> IO CBool)
ready = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"ready" SDL_StorageInterface
x0
            , enumerate :: FunPtr
  (Ptr Void
   -> PtrConst CChar
   -> SDL_EnumerateDirectoryCallback
   -> Ptr Void
   -> IO CBool)
enumerate = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"enumerate" SDL_StorageInterface
x0
            , info :: FunPtr (Ptr Void -> PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool)
info = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"info" SDL_StorageInterface
x0
            , read_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> Ptr Void -> Uint64 -> IO CBool)
read_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"read_file" SDL_StorageInterface
x0
            , write_file :: FunPtr
  (Ptr Void -> PtrConst CChar -> PtrConst Void -> Uint64 -> IO CBool)
write_file = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"write_file" SDL_StorageInterface
x0
            , mkdir :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
mkdir = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"mkdir" SDL_StorageInterface
x0
            , remove :: FunPtr (Ptr Void -> PtrConst CChar -> IO CBool)
remove = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"remove" SDL_StorageInterface
x0
            , rename :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
rename = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"rename" SDL_StorageInterface
x0
            , copy :: FunPtr (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO CBool)
copy = forall {k} (x :: k) r a. HasField x r a => r -> a
forall (x :: Symbol) r a. HasField x r a => r -> a
BG.getField @"copy" SDL_StorageInterface
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 @"space_remaining" SDL_StorageInterface
x0
      )

instance
  (ty ~ BG.FunPtr (BG.Ptr BG.Void -> IO SDL3.Sys.Bindgen.Stdinc.Uint64))
  => BG.HasField "space_remaining" (BG.Ptr SDL_StorageInterface) (BG.Ptr ty)
  where
  getField :: Ptr SDL_StorageInterface -> Ptr ty
getField =
    Proxy "space_remaining"
-> Ptr SDL_StorageInterface
-> Ptr (CFieldType SDL_StorageInterface "space_remaining")
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 @"space_remaining")

instance HasCField.HasCField SDL_StorageInterface "space_remaining" where
  type
    CFieldType SDL_StorageInterface "space_remaining" =
      BG.FunPtr (BG.Ptr BG.Void -> IO SDL3.Sys.Bindgen.Stdinc.Uint64)

  offset# :: Proxy# SDL_StorageInterface -> Proxy# "space_remaining" -> Int
offset# = \Proxy# SDL_StorageInterface
_ -> \Proxy# "space_remaining"
_ -> Int
88

-- | An abstract interface for filesystem access.
--
--     This is an opaque datatype. One can create this object using standard SDL functions like SDL_OpenTitleStorage or SDL_OpenUserStorage, etc, or create an object with a custom implementation using SDL_OpenStorage.
--
--     @since 3.2.0
--
--     [C declaration]: @struct SDL_Storage@, defined at @SDL3\/SDL_storage.h 332:16@
data SDL_Storage