SDL_IOWhence(3type)
β¨ SDL_IOWhence(3type) β¨
okay bestie, welcome to the SDL3 DATATYPES corner of the manual π this one's a lil baby page but it's lowkey important, iykyk. it's the enum that tells your I/O streams where to seek to. yes queen, positioning. main character energy fr.
πΈ NAME πΈ
SDL_IOWhence β the possible whence values for SDL_IOStream seeking π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_iostream.h>
typedef enum SDL_IOWhence
{
SDL_IO_SEEK_SET, /**< Seek from the beginning of data */
SDL_IO_SEEK_CUR, /**< Seek relative to current read point */
SDL_IO_SEEK_END /**< Seek relative to the end of data */
} SDL_IOWhence;
she's small but she's mighty π and every single one of those enumerators matters, so let's break it down:
SDL_IO_SEEK_SETβ seek from the beginning of the data. like, the very start. the origin story. π¦SDL_IO_SEEK_CURβ seek relative to the current read point. wherever you are right now, that's your home base. πSDL_IO_SEEK_ENDβ seek relative to the end of the data. the finish line, the finale, the last episode π
π DESCRIPTION π
so basically, these map to the same "whence" concept that fseek or lseek use in the standard C runtime. that's it. that's the whole vibe. if you already know fseek, you already know her β she's just wearing a cuter outfit now πβ¨
no cap, this is one of those "if you get it you get it" situations. and now you get it. periodt. π
π«Ά AVAILABILITY π«Ά
this enum has been around since SDL 3.2.0 β so if you're on anything older, sorry babe, she's not there yet π
π friendly reminder: keep the enumerator names exactly as written βSDL_IO_SEEK_SET,SDL_IO_SEEK_CUR,SDL_IO_SEEK_END. no shortcuts, no nicknames, no lowercase. the compiler is not forgiving and she will absolutely humble you π
and that's the whole page bestie, you ate that π this was SDL_IOWhence(3type), from the SDL3 DATATYPES collection, brought to you by the lovely folks at Simple Directmedia Layer β this particular copy being SDL 3.4.18 π mwah, go write something iconic, ily ππ§
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms