sdlSetWindowProgressState function video

bool sdlSetWindowProgressState(
  1. Pointer<SdlWindow> window,
  2. int state
)

Sets the state of the progress bar for the given window’s taskbar icon.

\param window the window whose progress state is to be modified. \param state the progress state. SDL_PROGRESS_STATE_NONE stops displaying the progress bar. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.4.0.

extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowProgressState(SDL_Window *window, SDL_ProgressState state)

Implementation

bool sdlSetWindowProgressState(Pointer<SdlWindow> window, int state) {
  final sdlSetWindowProgressStateLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlWindow> window, Int32 state),
        int Function(Pointer<SdlWindow> window, int state)
      >('SDL_SetWindowProgressState');
  return sdlSetWindowProgressStateLookupFunction(window, state) == 1;
}