sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.Filesystem

Description

SDL offers an API for examining and manipulating the system's filesystem. This covers most things one would need to do with directories, except for actual file I/O (which is covered by CategoryIOStream and CategoryAsyncIO instead).

There are functions to answer necessary path questions:

  • Where is my app's data? SDL_GetBasePath().
  • Where can I safely write files? SDL_GetPrefPath().
  • Where are paths like Downloads, Desktop, Music? SDL_GetUserFolder().
  • What is this thing at this location? SDL_GetPathInfo().
  • What items live in this folder? SDL_EnumerateDirectory().
  • What items live in this folder by wildcard? SDL_GlobDirectory().
  • What is my current working directory? SDL_GetCurrentDirectory().

SDL also offers functions to manipulate the directory tree: renaming, removing, copying files. Get the directory where the application was run from.

SDL caches the result of this call internally, but the first call to this function is not necessarily fast, so plan accordingly.

macOS and iOS Specific Functionality: If the application is in a ".app" bundle, this function returns the Resource directory (e.g. MyApp.app/Contents/Resources/). This behaviour can be overridden by adding a property to the Info.plist file. Adding a string key with the name SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the behaviour.

Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an application in /Applications/SDLApp/MyApp.app):

  • resource: bundle resource directory (the default). For example: /Applications/SDLApp/MyApp.app/Contents/Resources
  • bundle: the Bundle directory. For example: /Applications/SDLApp/MyApp.app/
  • parent: the containing directory of the bundle. For example: /Applications/SDLApp/

Android Specific Functionality: This function returns "./", which allows filesystem operations to use internal storage and the asset system.

Nintendo 3DS Specific Functionality: This function returns "romfs" directory of the application as it is uncommon to store resources outside the executable. As such it is not a writable directory.

The returned path is guaranteed to end with a path separator ('\' on Windows, '/' on most other platforms).

Returns
an absolute path in UTF-8 encoding to the application data directory. NULL will be returned on error or when the platform doesn't implement this functionality, call SDL_GetError() for more information.
Thread safety
It is safe to call this function from any thread.
See also
sDL_GetPrefPath

Since: 3.2.0

Synopsis

Documentation

newtype SDL_Folder Source #

The type of the OS-provided default folder for a specific purpose.

Note that the Trash folder isn't included here, because trashing files usually involves extra OS-specific functionality to remember the file's original location.

The folders supported per platform are:

Windows

macOS/iOS

tvOS

Unix (XDG)

Haiku

Emscripten

HOME

X

X

X

X

X

DESKTOP

X

X

X

X

DOCUMENTS

X

X

X

DOWNLOADS

Vista+

X

X

MUSIC

X

X

X

PICTURES

X

X

X

PUBLICSHARE

X

X

SAVEDGAMES

Vista+

SCREENSHOTS

Vista+

TEMPLATES

X

X

X

VIDEOS

X

X*

X

Note that on macOS/iOS, the Videos folder is called "Movies".

See also
sDL_GetUserFolder
C declaration
enum SDL_Folder, defined at SDL3/SDL_filesystem.h 195:14

Since: 3.2.0

Constructors

SDL_Folder 

Fields

Instances

Instances details
Storable SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Generic SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type Rep SDL_Folder 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_Folder = D1 ('MetaData "SDL_Folder" "SDL3.Sys.Bindgen.Filesystem" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_Folder" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
Read SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Show SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Eq SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Ord SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Prim SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

CEnum SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type CEnumZ SDL_Folder 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

SequentialCEnum SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

HasFFIType SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type FFIType SDL_Folder 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

ReadRaw SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

StaticSize SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

WriteRaw SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

writeRaw :: Ptr SDL_Folder -> SDL_Folder -> IO () #

HasCField SDL_Folder "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type CFieldType SDL_Folder "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_Folder "unwrap" = CUInt

Methods

offset# :: Proxy# SDL_Folder -> Proxy# "unwrap" -> Int #

ty ~ CUInt => HasField "unwrap" SDL_Folder ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

hasField :: SDL_Folder -> (ty -> SDL_Folder, ty) #

ty ~ CUInt => HasField "unwrap" (Ptr SDL_Folder) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

getField :: Ptr SDL_Folder -> Ptr ty #

type Rep SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_Folder = D1 ('MetaData "SDL_Folder" "SDL3.Sys.Bindgen.Filesystem" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_Folder" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
type CEnumZ SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type FFIType SDL_Folder Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_Folder "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_Folder "unwrap" = CUInt

pattern SDL_FOLDER_HOME :: SDL_Folder Source #

The folder which contains all of the current user's data, preferences, and documents. It usually contains most of the other folders. If a requested folder does not exist, the home folder can be considered a safe fallback to store a user's documents.

C declaration
SDL_FOLDER_HOME, defined at SDL3/SDL_filesystem.h 197:5

pattern SDL_FOLDER_DESKTOP :: SDL_Folder Source #

The folder of files that are displayed on the desktop. Note that the existence of a desktop folder does not guarantee that the system does show icons on its desktop; certain GNU/Linux distros with a graphical environment may not have desktop icons.

C declaration
SDL_FOLDER_DESKTOP, defined at SDL3/SDL_filesystem.h 198:5

pattern SDL_FOLDER_DOCUMENTS :: SDL_Folder Source #

User document files, possibly application-specific. This is a good place to save a user's projects.

C declaration
SDL_FOLDER_DOCUMENTS, defined at SDL3/SDL_filesystem.h 199:5

pattern SDL_FOLDER_DOWNLOADS :: SDL_Folder Source #

Standard folder for user files downloaded from the internet.

C declaration
SDL_FOLDER_DOWNLOADS, defined at SDL3/SDL_filesystem.h 200:5

pattern SDL_FOLDER_MUSIC :: SDL_Folder Source #

Music files that can be played using a standard music player (mp3, ogg...).

C declaration
SDL_FOLDER_MUSIC, defined at SDL3/SDL_filesystem.h 201:5

pattern SDL_FOLDER_PICTURES :: SDL_Folder Source #

Image files that can be displayed using a standard viewer (png, jpg...).

C declaration
SDL_FOLDER_PICTURES, defined at SDL3/SDL_filesystem.h 202:5

pattern SDL_FOLDER_PUBLICSHARE :: SDL_Folder Source #

Files that are meant to be shared with other users on the same computer.

C declaration
SDL_FOLDER_PUBLICSHARE, defined at SDL3/SDL_filesystem.h 203:5

pattern SDL_FOLDER_SAVEDGAMES :: SDL_Folder Source #

Save files for games.

C declaration
SDL_FOLDER_SAVEDGAMES, defined at SDL3/SDL_filesystem.h 204:5

pattern SDL_FOLDER_SCREENSHOTS :: SDL_Folder Source #

Application screenshots.

C declaration
SDL_FOLDER_SCREENSHOTS, defined at SDL3/SDL_filesystem.h 205:5

pattern SDL_FOLDER_TEMPLATES :: SDL_Folder Source #

Template files to be used when the user requests the desktop environment to create a new file in a certain folder, such as "New Text File.txt". Any file in the Templates folder can be used as a starting point for a new file.

C declaration
SDL_FOLDER_TEMPLATES, defined at SDL3/SDL_filesystem.h 206:5

pattern SDL_FOLDER_VIDEOS :: SDL_Folder Source #

Video files that can be played using a standard video player (mp4, webm...).

C declaration
SDL_FOLDER_VIDEOS, defined at SDL3/SDL_filesystem.h 207:5

pattern SDL_FOLDER_COUNT :: SDL_Folder Source #

Total number of types in this enum, not a folder type by itself.

C declaration
SDL_FOLDER_COUNT, defined at SDL3/SDL_filesystem.h 208:5

newtype SDL_PathType Source #

Types of filesystem entries.

Note that there may be other sorts of items on a filesystem: devices, named pipes, etc. They are currently reported as SDL_PATHTYPE_OTHER.

See also
SDL_PathInfo
C declaration
enum SDL_PathType, defined at SDL3/SDL_filesystem.h 251:14

Since: 3.2.0

Constructors

SDL_PathType 

Fields

Instances

Instances details
Storable SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Generic SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type Rep SDL_PathType 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_PathType = D1 ('MetaData "SDL_PathType" "SDL3.Sys.Bindgen.Filesystem" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_PathType" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
Read SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Show SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Eq SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Ord SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Prim SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

CEnum SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type CEnumZ SDL_PathType 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

SequentialCEnum SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

HasFFIType SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type FFIType SDL_PathType 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

ReadRaw SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

StaticSize SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

WriteRaw SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

HasCField SDL_PathType "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type CFieldType SDL_PathType "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_PathType "unwrap" = CUInt

Methods

offset# :: Proxy# SDL_PathType -> Proxy# "unwrap" -> Int #

ty ~ CUInt => HasField "unwrap" SDL_PathType ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

hasField :: SDL_PathType -> (ty -> SDL_PathType, ty) #

ty ~ CUInt => HasField "unwrap" (Ptr SDL_PathType) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

getField :: Ptr SDL_PathType -> Ptr ty #

type Rep SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_PathType = D1 ('MetaData "SDL_PathType" "SDL3.Sys.Bindgen.Filesystem" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_PathType" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
type CEnumZ SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type FFIType SDL_PathType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_PathType "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_PathType "unwrap" = CUInt

pattern SDL_PATHTYPE_NONE :: SDL_PathType Source #

path does not exist

C declaration
SDL_PATHTYPE_NONE, defined at SDL3/SDL_filesystem.h 253:5

pattern SDL_PATHTYPE_FILE :: SDL_PathType Source #

a normal file

C declaration
SDL_PATHTYPE_FILE, defined at SDL3/SDL_filesystem.h 254:5

pattern SDL_PATHTYPE_DIRECTORY :: SDL_PathType Source #

a directory

C declaration
SDL_PATHTYPE_DIRECTORY, defined at SDL3/SDL_filesystem.h 255:5

pattern SDL_PATHTYPE_OTHER :: SDL_PathType Source #

something completely different like a device node (not a symlink, those are always followed)

C declaration
SDL_PATHTYPE_OTHER, defined at SDL3/SDL_filesystem.h 256:5

data SDL_PathInfo Source #

Information about a path on the filesystem.

See also
sDL_GetPathInfo, SDL_GetStoragePathInfo
C declaration
struct SDL_PathInfo, defined at SDL3/SDL_filesystem.h 267:16

Since: 3.2.0

Constructors

SDL_PathInfo 

Fields

  • type' :: SDL_PathType

    the path type

    C declaration
    type, defined at SDL3/SDL_filesystem.h 269:18
  • size :: Uint64

    the file size in bytes

    C declaration
    size, defined at SDL3/SDL_filesystem.h 270:12
  • create_time :: SDL_Time

    the time when the path was created

    C declaration
    create_time, defined at SDL3/SDL_filesystem.h 271:14
  • modify_time :: SDL_Time

    the last time the path was modified

    C declaration
    modify_time, defined at SDL3/SDL_filesystem.h 272:14
  • access_time :: SDL_Time

    the last time the path was read

    C declaration
    access_time, defined at SDL3/SDL_filesystem.h 273:14

Instances

Instances details
Storable SDL_PathInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Generic SDL_PathInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type Rep SDL_PathInfo 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Show SDL_PathInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Eq SDL_PathInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

ReadRaw SDL_PathInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

StaticSize SDL_PathInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

WriteRaw SDL_PathInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

IsStruct SDL_PathInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

zero :: SDL_PathInfo #

HasCField SDL_PathInfo "access_time" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type CFieldType SDL_PathInfo "access_time" 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_PathInfo "access_time" = SDL_Time

Methods

offset# :: Proxy# SDL_PathInfo -> Proxy# "access_time" -> Int #

HasCField SDL_PathInfo "create_time" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type CFieldType SDL_PathInfo "create_time" 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_PathInfo "create_time" = SDL_Time

Methods

offset# :: Proxy# SDL_PathInfo -> Proxy# "create_time" -> Int #

HasCField SDL_PathInfo "modify_time" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type CFieldType SDL_PathInfo "modify_time" 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_PathInfo "modify_time" = SDL_Time

Methods

offset# :: Proxy# SDL_PathInfo -> Proxy# "modify_time" -> Int #

HasCField SDL_PathInfo "size" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type CFieldType SDL_PathInfo "size" 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

offset# :: Proxy# SDL_PathInfo -> Proxy# "size" -> Int #

HasCField SDL_PathInfo "type'" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type CFieldType SDL_PathInfo "type'" 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

offset# :: Proxy# SDL_PathInfo -> Proxy# "type'" -> Int #

ty ~ SDL_Time => HasField "access_time" SDL_PathInfo ty Source #

the last time the path was read

C declaration
access_time, defined at SDL3/SDL_filesystem.h 273:14
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

hasField :: SDL_PathInfo -> (ty -> SDL_PathInfo, ty) #

ty ~ SDL_Time => HasField "create_time" SDL_PathInfo ty Source #

the time when the path was created

C declaration
create_time, defined at SDL3/SDL_filesystem.h 271:14
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

hasField :: SDL_PathInfo -> (ty -> SDL_PathInfo, ty) #

ty ~ SDL_Time => HasField "modify_time" SDL_PathInfo ty Source #

the last time the path was modified

C declaration
modify_time, defined at SDL3/SDL_filesystem.h 272:14
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

hasField :: SDL_PathInfo -> (ty -> SDL_PathInfo, ty) #

ty ~ Uint64 => HasField "size" SDL_PathInfo ty Source #

the file size in bytes

C declaration
size, defined at SDL3/SDL_filesystem.h 270:12
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

hasField :: SDL_PathInfo -> (ty -> SDL_PathInfo, ty) #

ty ~ SDL_PathType => HasField "type'" SDL_PathInfo ty Source #

the path type

C declaration
type, defined at SDL3/SDL_filesystem.h 269:18
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

hasField :: SDL_PathInfo -> (ty -> SDL_PathInfo, ty) #

ty ~ SDL_Time => HasField "access_time" (Ptr SDL_PathInfo) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

getField :: Ptr SDL_PathInfo -> Ptr ty #

ty ~ SDL_Time => HasField "create_time" (Ptr SDL_PathInfo) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

getField :: Ptr SDL_PathInfo -> Ptr ty #

ty ~ SDL_Time => HasField "modify_time" (Ptr SDL_PathInfo) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

getField :: Ptr SDL_PathInfo -> Ptr ty #

ty ~ Uint64 => HasField "size" (Ptr SDL_PathInfo) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

getField :: Ptr SDL_PathInfo -> Ptr ty #

ty ~ SDL_PathType => HasField "type'" (Ptr SDL_PathInfo) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

getField :: Ptr SDL_PathInfo -> Ptr ty #

type Rep SDL_PathInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_PathInfo "access_time" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_PathInfo "access_time" = SDL_Time
type CFieldType SDL_PathInfo "create_time" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_PathInfo "create_time" = SDL_Time
type CFieldType SDL_PathInfo "modify_time" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_PathInfo "modify_time" = SDL_Time
type CFieldType SDL_PathInfo "size" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_PathInfo "type'" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

newtype SDL_GlobFlags Source #

Flags for path matching.

See also
sDL_GlobDirectory, SDL_GlobStorageDirectory
C declaration
SDL_GlobFlags, defined at SDL3/SDL_filesystem.h 284:16

Since: 3.2.0

Constructors

SDL_GlobFlags 

Fields

Instances

Instances details
Bits SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

FiniteBits SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Bounded SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Enum SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Storable SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Generic SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type Rep SDL_GlobFlags 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_GlobFlags = D1 ('MetaData "SDL_GlobFlags" "SDL3.Sys.Bindgen.Filesystem" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_GlobFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Uint32)))
Ix SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Num SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Read SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Integral SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Real SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Show SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Eq SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Ord SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Prim SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

HasFFIType SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type FFIType SDL_GlobFlags 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

ReadRaw SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

StaticSize SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

WriteRaw SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Bitfield SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

HasCField SDL_GlobFlags "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type CFieldType SDL_GlobFlags "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

offset# :: Proxy# SDL_GlobFlags -> Proxy# "unwrap" -> Int #

ty ~ Uint32 => HasField "unwrap" SDL_GlobFlags ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

hasField :: SDL_GlobFlags -> (ty -> SDL_GlobFlags, ty) #

ty ~ Uint32 => HasField "unwrap" (Ptr SDL_GlobFlags) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

getField :: Ptr SDL_GlobFlags -> Ptr ty #

type Rep SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_GlobFlags = D1 ('MetaData "SDL_GlobFlags" "SDL3.Sys.Bindgen.Filesystem" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_GlobFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Uint32)))
type FFIType SDL_GlobFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_GlobFlags "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

sDL_GLOB_CASEINSENSITIVE :: CUInt Source #

C declaration
macro SDL_GLOB_CASEINSENSITIVE, defined at SDL3/SDL_filesystem.h 286:9

newtype SDL_EnumerationResult Source #

Possible results from an enumeration callback.

See also
SDL_EnumerateDirectoryCallback
C declaration
enum SDL_EnumerationResult, defined at SDL3/SDL_filesystem.h 313:14

Since: 3.2.0

Constructors

SDL_EnumerationResult 

Fields

Instances

Instances details
Storable SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Generic SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type Rep SDL_EnumerationResult 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_EnumerationResult = D1 ('MetaData "SDL_EnumerationResult" "SDL3.Sys.Bindgen.Filesystem" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_EnumerationResult" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
Read SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Show SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Eq SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Ord SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Prim SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

CEnum SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type CEnumZ SDL_EnumerationResult 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

SequentialCEnum SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

HasFFIType SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

ReadRaw SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

StaticSize SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

WriteRaw SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

HasCField SDL_EnumerationResult "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type CFieldType SDL_EnumerationResult "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Methods

offset# :: Proxy# SDL_EnumerationResult -> Proxy# "unwrap" -> Int #

ty ~ CUInt => HasField "unwrap" SDL_EnumerationResult ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

ty ~ CUInt => HasField "unwrap" (Ptr SDL_EnumerationResult) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_EnumerationResult = D1 ('MetaData "SDL_EnumerationResult" "SDL3.Sys.Bindgen.Filesystem" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_EnumerationResult" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
type CEnumZ SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type FFIType SDL_EnumerationResult Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_EnumerationResult "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

pattern SDL_ENUM_CONTINUE :: SDL_EnumerationResult Source #

Value that requests that enumeration continue.

C declaration
SDL_ENUM_CONTINUE, defined at SDL3/SDL_filesystem.h 315:5

pattern SDL_ENUM_SUCCESS :: SDL_EnumerationResult Source #

Value that requests that enumeration stop, successfully.

C declaration
SDL_ENUM_SUCCESS, defined at SDL3/SDL_filesystem.h 316:5

pattern SDL_ENUM_FAILURE :: SDL_EnumerationResult Source #

Value that requests that enumeration stop, as a failure.

C declaration
SDL_ENUM_FAILURE, defined at SDL3/SDL_filesystem.h 317:5

newtype SDL_EnumerateDirectoryCallback_Aux Source #

Auxiliary type used by SDL_EnumerateDirectoryCallback

C declaration
SDL_EnumerateDirectoryCallback, defined at SDL3/SDL_filesystem.h 344:41

Instances

Instances details
Generic SDL_EnumerateDirectoryCallback_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type Rep SDL_EnumerateDirectoryCallback_Aux 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_EnumerateDirectoryCallback_Aux = D1 ('MetaData "SDL_EnumerateDirectoryCallback_Aux" "SDL3.Sys.Bindgen.Filesystem" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_EnumerateDirectoryCallback_Aux" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO SDL_EnumerationResult))))
FromFunPtr SDL_EnumerateDirectoryCallback_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

ToFunPtr SDL_EnumerateDirectoryCallback_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

HasCField SDL_EnumerateDirectoryCallback_Aux "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

ty ~ (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO SDL_EnumerationResult) => HasField "unwrap" SDL_EnumerateDirectoryCallback_Aux ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

ty ~ (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO SDL_EnumerationResult) => HasField "unwrap" (Ptr SDL_EnumerateDirectoryCallback_Aux) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_EnumerateDirectoryCallback_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_EnumerateDirectoryCallback_Aux = D1 ('MetaData "SDL_EnumerateDirectoryCallback_Aux" "SDL3.Sys.Bindgen.Filesystem" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_EnumerateDirectoryCallback_Aux" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ptr Void -> PtrConst CChar -> PtrConst CChar -> IO SDL_EnumerationResult))))
type CFieldType SDL_EnumerateDirectoryCallback_Aux "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

newtype SDL_EnumerateDirectoryCallback Source #

Callback for directory enumeration.

Enumeration of directory entries will continue until either all entries have been provided to the callback, or the callback has requested a stop through its return value.

Returning SDL_ENUM_CONTINUE will let enumeration proceed, calling the callback with further entries. SDL_ENUM_SUCCESS and SDL_ENUM_FAILURE will terminate the enumeration early, and dictate the return value of the enumeration function itself.

dirname is guaranteed to end with a path separator ('\' on Windows, '/' on most other platforms).

userdata
an app-controlled pointer that is passed to the callback.
dirname
the directory that is being enumerated.
fname
the next entry in the enumeration.
Returns
how the enumeration should proceed.
See also
sDL_EnumerateDirectory
C declaration
SDL_EnumerateDirectoryCallback, defined at SDL3/SDL_filesystem.h 344:41

Since: 3.2.0

Instances

Instances details
Storable SDL_EnumerateDirectoryCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Generic SDL_EnumerateDirectoryCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Associated Types

type Rep SDL_EnumerateDirectoryCallback 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_EnumerateDirectoryCallback = D1 ('MetaData "SDL_EnumerateDirectoryCallback" "SDL3.Sys.Bindgen.Filesystem" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_EnumerateDirectoryCallback" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FunPtr SDL_EnumerateDirectoryCallback_Aux))))
Show SDL_EnumerateDirectoryCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Eq SDL_EnumerateDirectoryCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

Ord SDL_EnumerateDirectoryCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

HasFFIType SDL_EnumerateDirectoryCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

ReadRaw SDL_EnumerateDirectoryCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

StaticSize SDL_EnumerateDirectoryCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

WriteRaw SDL_EnumerateDirectoryCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

HasCField SDL_EnumerateDirectoryCallback "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

ty ~ FunPtr SDL_EnumerateDirectoryCallback_Aux => HasField "unwrap" SDL_EnumerateDirectoryCallback ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

ty ~ FunPtr SDL_EnumerateDirectoryCallback_Aux => HasField "unwrap" (Ptr SDL_EnumerateDirectoryCallback) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_EnumerateDirectoryCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type Rep SDL_EnumerateDirectoryCallback = D1 ('MetaData "SDL_EnumerateDirectoryCallback" "SDL3.Sys.Bindgen.Filesystem" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_EnumerateDirectoryCallback" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FunPtr SDL_EnumerateDirectoryCallback_Aux))))
type FFIType SDL_EnumerateDirectoryCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem

type CFieldType SDL_EnumerateDirectoryCallback "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Filesystem