SDL_OpenIO(3)

SDL_OpenIO3

Create a custom sdl_iostream .

Usage

#include "SDL3/SDL.h"

SDL_IOStream * SDL_OpenIO(const SDL_IOStreamInterface *iface, void *userdata);

Header file

Defined in SDL3/SDL_iostream.h

Overview

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.

Function parameters

iface

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

userdata

the pointer that will be passed to the interface functions.

Return value

( SDL_IOStream
*) Returns a pointer to the allocated memory on success or NULL on failure; call SDL_GetError () for more information.

Thread safety

It is safe to call this function from any thread.

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.