SDL_OpenIO

Create a custom SDL_IOStream.

Applications do not need to use this function unless they are providing their own SDL_IOStream implementation. If you just need an SDL_IOStream to read/write a common data source, you should use the built-in implementations in SDL, like SDL_IOFromFile() or SDL_IOFromMem(), etc.

This function makes a copy of iface and the caller does not need to keep it around after this call.

extern (C) nothrow @nogc extern
SDL_OpenIO

Parameters

iface const(SDL_IOStreamInterface)*

the interface that implements this SDL_IOStream, initialized using SDL_INIT_INTERFACE().

userdata void*

the pointer that will be passed to the interface functions.

Return Value

A pointer to the allocated memory on success or NULL on failure; call SDL_GetError() for more information.

Threadsafety: It is safe to call this function from any thread.

See Also

Meta