SDL_ProgressState(3type)
π 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 checkSDL_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 getSDL_PROGRESS_STATE_INVALIDback, that's your cue to callSDL_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
- 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