Function SDL_SeekIO
pub unsafe extern "C" fn SDL_SeekIO(
context: *mut SDL_IOStream,
offset: i64,
whence: SDL_IOWhence,
) -> i64 ⓘ
Available on crate feature
dep_sdl3
only.Expand description
Seek within an SDL_IOStream
data stream.
This function seeks to byte offset
, relative to whence
.
whence
may be any of the following values:
SDL_IO_SEEK_SET
: seek from the beginning of dataSDL_IO_SEEK_CUR
: seek relative to current read pointSDL_IO_SEEK_END
: seek relative to the end of data
If this stream can not seek, it will return -1.
§Parameters
context
: a pointer to anSDL_IOStream
structure.offset
: an offset in bytes, relative towhence
location; can be negative.whence
: any ofSDL_IO_SEEK_SET
,SDL_IO_SEEK_CUR
,SDL_IO_SEEK_END
.
§Return value
Returns the final offset in the data stream after the seek or -1 on
failure; call SDL_GetError()
for more information.
§Thread safety
This function is not thread safe.
§Availability
This function is available since SDL 3.2.0.