Module iostream

Available on crate feature dep_sdl3 only.
Expand description

SDL provides an abstract interface for reading and writing data streams. It offers implementations for files, memory, etc, and the app can provide their own implementations, too.

SDL_IOStream is not related to the standard C++ iostream class, other than both are abstract interfaces to read/write data.

Structs§

SDL_IOStatus
SDL_IOStream status, set by a read or write operation.
SDL_IOStream
The read/write operation structure.
SDL_IOStreamInterface
The function pointers that drive an SDL_IOStream.
SDL_IOWhence
Possible whence values for SDL_IOStream seeking.

Constants§

SDL_IO_SEEK_CUR
Seek relative to current read point
SDL_IO_SEEK_END
Seek relative to the end of data
SDL_IO_SEEK_SET
Seek from the beginning of data
SDL_IO_STATUS_EOF
End of file
SDL_IO_STATUS_ERROR
Read or write I/O error
SDL_IO_STATUS_NOT_READY
Non blocking I/O, not ready
SDL_IO_STATUS_READONLY
Tried to write a read-only buffer
SDL_IO_STATUS_READY
Everything is ready (no errors and not EOF).
SDL_IO_STATUS_WRITEONLY
Tried to read a write-only buffer
SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER
SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER
SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER
SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER
SDL_PROP_IOSTREAM_MEMORY_POINTER
SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER
SDL_PROP_IOSTREAM_STDIO_FILE_POINTER
SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER

Functions§

SDL_CloseIO
Close and free an allocated SDL_IOStream structure.
SDL_FlushIO
Flush any buffered data in the stream.
SDL_GetIOProperties
Get the properties associated with an SDL_IOStream.
SDL_GetIOSize
Use this function to get the size of the data stream in an SDL_IOStream.
SDL_GetIOStatus
Query the stream status of an SDL_IOStream.
SDL_IOFromConstMem
Use this function to prepare a read-only memory buffer for use with SDL_IOStream.
SDL_IOFromDynamicMem
Use this function to create an SDL_IOStream that is backed by dynamically allocated memory.
SDL_IOFromFile
Use this function to create a new SDL_IOStream structure for reading from and/or writing to a named file.
SDL_IOFromMem
Use this function to prepare a read-write memory buffer for use with SDL_IOStream.
SDL_IOprintf
Print to an SDL_IOStream data stream.
SDL_IOvprintf
Print to an SDL_IOStream data stream.
SDL_LoadFile
Load all the data from a file path.
SDL_LoadFile_IO
Load all the data from an SDL data stream.
SDL_OpenIO
Create a custom SDL_IOStream.
SDL_ReadIO
Read from a data source.
SDL_ReadS8
Use this function to read a signed byte from an SDL_IOStream.
SDL_ReadS16BE
Use this function to read 16 bits of big-endian data from an SDL_IOStream and return in native format.
SDL_ReadS16LE
Use this function to read 16 bits of little-endian data from an SDL_IOStream and return in native format.
SDL_ReadS32BE
Use this function to read 32 bits of big-endian data from an SDL_IOStream and return in native format.
SDL_ReadS32LE
Use this function to read 32 bits of little-endian data from an SDL_IOStream and return in native format.
SDL_ReadS64BE
Use this function to read 64 bits of big-endian data from an SDL_IOStream and return in native format.
SDL_ReadS64LE
Use this function to read 64 bits of little-endian data from an SDL_IOStream and return in native format.
SDL_ReadU8
Use this function to read a byte from an SDL_IOStream.
SDL_ReadU16BE
Use this function to read 16 bits of big-endian data from an SDL_IOStream and return in native format.
SDL_ReadU16LE
Use this function to read 16 bits of little-endian data from an SDL_IOStream and return in native format.
SDL_ReadU32BE
Use this function to read 32 bits of big-endian data from an SDL_IOStream and return in native format.
SDL_ReadU32LE
Use this function to read 32 bits of little-endian data from an SDL_IOStream and return in native format.
SDL_ReadU64BE
Use this function to read 64 bits of big-endian data from an SDL_IOStream and return in native format.
SDL_ReadU64LE
Use this function to read 64 bits of little-endian data from an SDL_IOStream and return in native format.
SDL_SaveFile
Save all the data into a file path.
SDL_SaveFile_IO
Save all the data into an SDL data stream.
SDL_SeekIO
Seek within an SDL_IOStream data stream.
SDL_TellIO
Determine the current read/write offset in an SDL_IOStream data stream.
SDL_WriteIO
Write to an SDL_IOStream data stream.
SDL_WriteS8
Use this function to write a signed byte to an SDL_IOStream.
SDL_WriteS16BE
Use this function to write 16 bits in native format to an SDL_IOStream as big-endian data.
SDL_WriteS16LE
Use this function to write 16 bits in native format to an SDL_IOStream as little-endian data.
SDL_WriteS32BE
Use this function to write 32 bits in native format to an SDL_IOStream as big-endian data.
SDL_WriteS32LE
Use this function to write 32 bits in native format to an SDL_IOStream as little-endian data.
SDL_WriteS64BE
Use this function to write 64 bits in native format to an SDL_IOStream as big-endian data.
SDL_WriteS64LE
Use this function to write 64 bits in native format to an SDL_IOStream as little-endian data.
SDL_WriteU8
Use this function to write a byte to an SDL_IOStream.
SDL_WriteU16BE
Use this function to write 16 bits in native format to an SDL_IOStream as big-endian data.
SDL_WriteU16LE
Use this function to write 16 bits in native format to an SDL_IOStream as little-endian data.
SDL_WriteU32BE
Use this function to write 32 bits in native format to an SDL_IOStream as big-endian data.
SDL_WriteU32LE
Use this function to write 32 bits in native format to an SDL_IOStream as little-endian data.
SDL_WriteU64BE
Use this function to write 64 bits in native format to an SDL_IOStream as big-endian data.
SDL_WriteU64LE
Use this function to write 64 bits in native format to an SDL_IOStream as little-endian data.