SDL_GetWindowProgressValue(3)

πŸ“¦
version 3.4.18 Β· 5 versions
, in fedora 43, fedora 44

✨ SDL_GetWindowProgressValue ✨

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual πŸ’– this one is SDL_GetWindowProgressValue and it's literally the little sister of the function that sets the progress bar β€” this one just reads it back out. πŸ‘‘

🌸 NAME 🌸

SDL_GetWindowProgressValue β€” get the value of the progress bar for the given window's taskbar icon. πŸŽ€

yes bestie, that lil progress bar that lives on your taskbar/dock icon? this is how you peek at what number it's currently sitting at. no cap. πŸ¦‹


πŸ’… SYNOPSIS πŸ’…

#include <SDL3/SDL_video.h>

float SDL_GetWindowProgressValue(SDL_Window *window);

🫢 FUNCTION PARAMETERS 🫢

  • window β€” the window to get the current progress value from. like, which window's taskbar icon are we snooping on bestie πŸ‘€

😭 RETURN VALUE 😭

Returns the progress value in the range of [0.0f - 1.0f], or -1.0f on failure; call SDL_GetError() for more information.

so like. if it worked, you get a float somewhere between 0.0f and 1.0f β€” zero means empty, one means full, everything in between is the vibe check in progress πŸ“Šβœ¨. and if it flopped? you get -1.0f and you gotta go ask SDL_GetError() what happened, because she always knows. πŸ’€

🧚 THREAD SAFETY 🧚

This function should only be called on the main thread.

fr fr, main thread only. do not be out here calling this from some random worker thread and then acting surprised. πŸ™ˆ

🌈 AVAILABILITY 🌈

This function is available since SDL 3.4.0. ⭐


and that's the whole thing, bestie β€” short, sweet, iconic, periodt. πŸ’…

Simple Directmedia Layer made this, it's SDL 3.4.18 energy, and it's the SDL_GetWindowProgressValue(3) page β€” love that for us πŸ«ΆπŸŒΈπŸ’–

πŸ“¦ where this page comes from