sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.Dialog

Description

File dialog support.

SDL offers file dialogs, to let users select files with native GUI interfaces. There are "open" dialogs, "save" dialogs, and folder selection dialogs. The app can control some details, such as filtering to specific files, or whether multiple files can be selected by the user.

Note that launching a file dialog is a non-blocking operation; control returns to the app immediately, and a callback is called later (possibly in another thread) when the user makes a choice. An entry for filters for file dialogs.

name is a user-readable label for the filter (for example, "Office document").

pattern is a semicolon-separated list of file extensions (for example, "doc;docx"). File extensions may only contain alphanumeric characters, hyphens, underscores and periods. Alternatively, the whole string can be a single asterisk ("*"), which serves as an "All files" filter.

See also
SDL_DialogFileCallback, sDL_ShowOpenFileDialog, sDL_ShowSaveFileDialog, sDL_ShowOpenFolderDialog, sDL_ShowFileDialogWithProperties

Since: 3.2.0

Synopsis

Documentation

data SDL_DialogFileFilter Source #

C declaration
struct SDL_DialogFileFilter, defined at SDL3/SDL_dialog.h 70:16

Constructors

SDL_DialogFileFilter 

Fields

Instances

Instances details
Storable SDL_DialogFileFilter Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Generic SDL_DialogFileFilter Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Associated Types

type Rep SDL_DialogFileFilter 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

type Rep SDL_DialogFileFilter = D1 ('MetaData "SDL_DialogFileFilter" "SDL3.Sys.Bindgen.Dialog" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_DialogFileFilter" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PtrConst CChar)) :*: S1 ('MetaSel ('Just "pattern'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PtrConst CChar))))
Show SDL_DialogFileFilter Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Eq SDL_DialogFileFilter Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

ReadRaw SDL_DialogFileFilter Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

StaticSize SDL_DialogFileFilter Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

WriteRaw SDL_DialogFileFilter Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

IsStruct SDL_DialogFileFilter Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

HasCField SDL_DialogFileFilter "name" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Associated Types

type CFieldType SDL_DialogFileFilter "name" 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

HasCField SDL_DialogFileFilter "pattern'" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Associated Types

type CFieldType SDL_DialogFileFilter "pattern'" 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Methods

offset# :: Proxy# SDL_DialogFileFilter -> Proxy# "pattern'" -> Int #

ty ~ PtrConst CChar => HasField "name" SDL_DialogFileFilter ty Source #
C declaration
name, defined at SDL3/SDL_dialog.h 72:17
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

ty ~ PtrConst CChar => HasField "pattern'" SDL_DialogFileFilter ty Source #
C declaration
pattern, defined at SDL3/SDL_dialog.h 73:17
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

ty ~ PtrConst CChar => HasField "name" (Ptr SDL_DialogFileFilter) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

ty ~ PtrConst CChar => HasField "pattern'" (Ptr SDL_DialogFileFilter) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

type Rep SDL_DialogFileFilter Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

type Rep SDL_DialogFileFilter = D1 ('MetaData "SDL_DialogFileFilter" "SDL3.Sys.Bindgen.Dialog" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_DialogFileFilter" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PtrConst CChar)) :*: S1 ('MetaSel ('Just "pattern'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PtrConst CChar))))
type CFieldType SDL_DialogFileFilter "name" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

type CFieldType SDL_DialogFileFilter "pattern'" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

newtype SDL_DialogFileCallback_Aux Source #

Auxiliary type used by SDL_DialogFileCallback

C declaration
SDL_DialogFileCallback, defined at SDL3/SDL_dialog.h 113:24

Constructors

SDL_DialogFileCallback_Aux 

Fields

Instances

Instances details
Generic SDL_DialogFileCallback_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Associated Types

type Rep SDL_DialogFileCallback_Aux 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

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

Defined in SDL3.Sys.Bindgen.Dialog

ToFunPtr SDL_DialogFileCallback_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

HasCField SDL_DialogFileCallback_Aux "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Associated Types

type CFieldType SDL_DialogFileCallback_Aux "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

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

Defined in SDL3.Sys.Bindgen.Dialog

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

Defined in SDL3.Sys.Bindgen.Dialog

type Rep SDL_DialogFileCallback_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

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

Defined in SDL3.Sys.Bindgen.Dialog

newtype SDL_DialogFileCallback Source #

Callback used by file dialog functions.

The specific usage is described in each function.

If filelist is:

  • NULL, an error occurred. Details can be obtained with SDL_GetError().
  • A pointer to NULL, the user either didn't choose any file or canceled the dialog.
  • A pointer to non- NULL, the user chose one or more files. The argument is a null-terminated array of pointers to UTF-8 encoded strings, each containing a path.

The filelist argument should not be freed; it will automatically be freed when the callback returns.

The filter argument is the index of the filter that was selected, or -1 if no filter was selected or if the platform or method doesn't support fetching the selected filter.

In Android, the filelist are content:// URIs. They should be opened using SDL_IOFromFile() with appropriate modes. This applies both to open and save file dialog.

userdata
an app-provided pointer, for the callback's use.
filelist
the file(s) chosen by the user.
filter
index of the selected filter.
See also
SDL_DialogFileFilter, sDL_ShowOpenFileDialog, sDL_ShowSaveFileDialog, sDL_ShowOpenFolderDialog, sDL_ShowFileDialogWithProperties
C declaration
SDL_DialogFileCallback, defined at SDL3/SDL_dialog.h 113:24

Since: 3.2.0

Instances

Instances details
Storable SDL_DialogFileCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Generic SDL_DialogFileCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Associated Types

type Rep SDL_DialogFileCallback 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

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

Defined in SDL3.Sys.Bindgen.Dialog

Eq SDL_DialogFileCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Ord SDL_DialogFileCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

HasFFIType SDL_DialogFileCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

ReadRaw SDL_DialogFileCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

StaticSize SDL_DialogFileCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

WriteRaw SDL_DialogFileCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

HasCField SDL_DialogFileCallback "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Associated Types

type CFieldType SDL_DialogFileCallback "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Methods

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

ty ~ FunPtr SDL_DialogFileCallback_Aux => HasField "unwrap" SDL_DialogFileCallback ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

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

Defined in SDL3.Sys.Bindgen.Dialog

type Rep SDL_DialogFileCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

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

Defined in SDL3.Sys.Bindgen.Dialog

type CFieldType SDL_DialogFileCallback "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

newtype SDL_FileDialogType Source #

Various types of file dialogs.

This is used by SDL_ShowFileDialogWithProperties() to decide what kind of dialog to present to the user.

See also
sDL_ShowFileDialogWithProperties
C declaration
enum SDL_FileDialogType, defined at SDL3/SDL_dialog.h 272:14

Since: 3.2.0

Constructors

SDL_FileDialogType 

Fields

Instances

Instances details
Storable SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Generic SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Associated Types

type Rep SDL_FileDialogType 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

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

Defined in SDL3.Sys.Bindgen.Dialog

Show SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Eq SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Ord SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Prim SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

CEnum SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Associated Types

type CEnumZ SDL_FileDialogType 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

SequentialCEnum SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

HasFFIType SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Associated Types

type FFIType SDL_FileDialogType 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

ReadRaw SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

StaticSize SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

WriteRaw SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

HasCField SDL_FileDialogType "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Associated Types

type CFieldType SDL_FileDialogType "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

Methods

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

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

Defined in SDL3.Sys.Bindgen.Dialog

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

Defined in SDL3.Sys.Bindgen.Dialog

type Rep SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

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

Defined in SDL3.Sys.Bindgen.Dialog

type FFIType SDL_FileDialogType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

type CFieldType SDL_FileDialogType "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Dialog

pattern SDL_FILEDIALOG_OPENFILE :: SDL_FileDialogType Source #

C declaration
SDL_FILEDIALOG_OPENFILE, defined at SDL3/SDL_dialog.h 274:5

pattern SDL_FILEDIALOG_SAVEFILE :: SDL_FileDialogType Source #

C declaration
SDL_FILEDIALOG_SAVEFILE, defined at SDL3/SDL_dialog.h 275:5

pattern SDL_FILEDIALOG_OPENFOLDER :: SDL_FileDialogType Source #

C declaration
SDL_FILEDIALOG_OPENFOLDER, defined at SDL3/SDL_dialog.h 276:5

sDL_PROP_FILE_DIALOG_FILTERS_POINTER :: ByteString Source #

C declaration
macro SDL_PROP_FILE_DIALOG_FILTERS_POINTER, literal "SDL.filedialog.filters", defined at SDL3/SDL_dialog.h 328:9

sDL_PROP_FILE_DIALOG_NFILTERS_NUMBER :: ByteString Source #

C declaration
macro SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER, literal "SDL.filedialog.nfilters", defined at SDL3/SDL_dialog.h 329:9

sDL_PROP_FILE_DIALOG_WINDOW_POINTER :: ByteString Source #

C declaration
macro SDL_PROP_FILE_DIALOG_WINDOW_POINTER, literal "SDL.filedialog.window", defined at SDL3/SDL_dialog.h 330:9

sDL_PROP_FILE_DIALOG_LOCATION_STRING :: ByteString Source #

C declaration
macro SDL_PROP_FILE_DIALOG_LOCATION_STRING, literal "SDL.filedialog.location", defined at SDL3/SDL_dialog.h 331:9

sDL_PROP_FILE_DIALOG_MANY_BOOLEAN :: ByteString Source #

C declaration
macro SDL_PROP_FILE_DIALOG_MANY_BOOLEAN, literal "SDL.filedialog.many", defined at SDL3/SDL_dialog.h 332:9

sDL_PROP_FILE_DIALOG_TITLE_STRING :: ByteString Source #

C declaration
macro SDL_PROP_FILE_DIALOG_TITLE_STRING, literal "SDL.filedialog.title", defined at SDL3/SDL_dialog.h 333:9

sDL_PROP_FILE_DIALOG_ACCEPT_STRING :: ByteString Source #

C declaration
macro SDL_PROP_FILE_DIALOG_ACCEPT_STRING, literal "SDL.filedialog.accept", defined at SDL3/SDL_dialog.h 334:9

sDL_PROP_FILE_DIALOG_CANCEL_STRING :: ByteString Source #

C declaration
macro SDL_PROP_FILE_DIALOG_CANCEL_STRING, literal "SDL.filedialog.cancel", defined at SDL3/SDL_dialog.h 335:9