SDL_ProgressState(3type)

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

πŸ’– SDL_ProgressState πŸ’–

okay bestie, so this is a page from the SDL3 DATATYPES corner of the manual, and it's all about one lil' enum that controls what your window's progress bar is doing. like, the taskbar/dock progress indicator? that's her. she's iconic, she's tiny, she's got ✨vibes✨.


🌸 NAME 🌸

SDL_ProgressState β€” window progress state 🫢

like the actual name of the thing, fr fr.


✨ SYNOPSIS ✨

first, you gotta pull her in:

#include <SDL3/SDL_video.h>

then here's the whole enum, verbatim, no cap:

typedef enum SDL_ProgressState
{
    SDL_PROGRESS_STATE_INVALID = -1,    /**< An invalid progress state indicating an error; check SDL_GetError() */
    SDL_PROGRESS_STATE_NONE,            /**< No progress bar is shown */
    SDL_PROGRESS_STATE_INDETERMINATE,   /**< The progress bar is shown in a indeterminate state */
    SDL_PROGRESS_STATE_NORMAL,          /**< The progress bar is shown in a normal state */
    SDL_PROGRESS_STATE_PAUSED,          /**< The progress bar is shown in a paused state */
    SDL_PROGRESS_STATE_ERROR            /**< The progress bar is shown in a state indicating the application had an error */
} SDL_ProgressState;

okay let's break down every single one of these babies because they all matter πŸ’…

  • SDL_PROGRESS_STATE_INVALID = -1 β€” this one is not it. it's an invalid progress state that means an error happened. so like, go check SDL_GetError() to find out what went wrong, bestie. 😭
  • SDL_PROGRESS_STATE_NONE β€” no progress bar is shown. nothing. silence. the bar is not giving anything today πŸ™ˆ
  • SDL_PROGRESS_STATE_INDETERMINATE β€” the progress bar is shown in a indeterminate state. i.e. "we're doing something but we genuinely don't know how long, don't ask" energy 🌈
  • SDL_PROGRESS_STATE_NORMAL β€” the progress bar is shown in a normal state. classic. the default girlie. slay πŸ’–
  • SDL_PROGRESS_STATE_PAUSED β€” the progress bar is shown in a paused state. she's on a lil break, she'll be back πŸŽ€
  • SDL_PROGRESS_STATE_ERROR β€” the progress bar is shown in a state indicating the application had an error. oh no. oh no no no. something went wrong and now the bar is telling on you πŸ’€

πŸ‘‘ AVAILABILITY πŸ‘‘

this enum has been available since SDL 3.2.8. so if you're on anything older, she's not there yet, sorry bestie πŸ¦‹


lowkey reminder: if you ever get SDL_PROGRESS_STATE_INVALID back, that's your cue to call SDL_GetError() and figure out the drama. don't just sit there wondering. periodt.

and that's the whole page, you ate that πŸ“ this was written by the fine folks at Simple Directmedia Layer, and the version floating around is SDL 3.4.18. mwah, go forth and progress-bar responsibly πŸ’œβœ¨

πŸ“¦ where this page comes from