Skip to main content

SDL_EnumerateDirectoryCallback

Type Alias SDL_EnumerateDirectoryCallback 

Source
pub type SDL_EnumerateDirectoryCallback = Option<unsafe extern "C" fn(userdata: *mut c_void, dirname: *const c_char, fname: *const c_char) -> SDL_EnumerationResult>;
Expand description

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).

Parameter: userdata an app-controlled pointer that is passed to the callback. Parameter: dirname the directory that is being enumerated. Parameter: fname the next entry in the enumeration. Returns: how the enumeration should proceed.

Available Since: This datatype is available since SDL 3.2.0.

See Also: SDL_EnumerateDirectory

Aliased Type§

pub enum SDL_EnumerateDirectoryCallback {
    None,
    Some(unsafe extern "C" fn(*mut c_void, *const i8, *const i8) -> SDL_EnumerationResult),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut c_void, *const i8, *const i8) -> SDL_EnumerationResult)

Some value of type T.