sdlSetWindowProgressValue function video

bool sdlSetWindowProgressValue(
  1. Pointer<SdlWindow> window,
  2. double value
)

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

\param window the window whose progress value is to be modified. \param value the progress value in the range of 0.0f - 1.0f. If the value is outside the valid range, it gets clamped. \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_SetWindowProgressValue(SDL_Window *window, float value)

Implementation

bool sdlSetWindowProgressValue(Pointer<SdlWindow> window, double value) {
  final sdlSetWindowProgressValueLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlWindow> window, Float value),
        int Function(Pointer<SdlWindow> window, double value)
      >('SDL_SetWindowProgressValue');
  return sdlSetWindowProgressValueLookupFunction(window, value) == 1;
}