SDL_TellIO(3)

πŸ’– SDL_TellIO(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_TellIO ✨ she's the one who tells you where you're at in a stream. literally your emotional support offset reader 🫢


🌸 NAME 🌸

SDL_TellIO β€” figure out the current read/write offset inside an SDL_IOStream data stream. yes, like a little "you are here" map but for bytes πŸ—ΊοΈβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_iostream.h>

Sint64 SDL_TellIO(SDL_IOStream *context);

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• SDL_TellIO is actually a wrapper function β€” she's not out here doing the work herself, she's calling the SDL_IOStream's seek method with an offset of 0 bytes from SDL_IO_SEEK_CUR, purely to make your application development life easier. no cap, that's the whole bit πŸ’…

like. she's the friend who forwards your text to the right group chat. iconic behaviour honestly πŸ‘‘


πŸ’œ FUNCTION PARAMETERS πŸ’œ

  • context β€” an SDL_IOStream data stream object, aka the lil stream you wanna get the current offset from. bestie, this is the one you're asking "where r u" 🌈

⭐ RETURN VALUE ⭐

Returns the current offset in the stream, or -1 if that information cannot be determined 😭 (yes, -1 is the "idk her" of return values).


πŸ”₯ THREAD SAFETY πŸ”₯

Do NOT use the same SDL_IOStream from two threads at once. 🚫🧡 she is not built for that kind of chaos, and honestly? same.

🌈 AVAILABILITY 🌈

this function has been available since SDL 3.2.0 ✨ so if you're on anything older, she hasn't been born yet, sorry bestie πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

  • SDL_SeekIO(3) β€” her sister, the one who actually does the seeking πŸ’– go say hi

Simple Directmedia Layer πŸŽ€ SDL 3.4.18 β€” that's the source and version, babes, straight from the footer, love u, drink water, go check your stream offsets πŸ’…πŸ¦‹βœ¨

πŸ“¦ where this page comes from