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