sdlGetWindowBrightness function

double sdlGetWindowBrightness(
  1. Pointer<SdlWindow> window
)

Get the brightness (gamma multiplier) for a given window's display.

Despite the name and signature, this method retrieves the brightness of the entire display, not an individual window. A window is considered to be owned by the display that contains the window's center pixel. (The index of this display can be retrieved using SDL_GetWindowDisplayIndex().)

\param window the window used to select the display whose brightness will be queried \returns the brightness for the display where 0.0 is completely dark and 1.0 is normal brightness.

\since This function is available since SDL 2.0.0.

\sa SDL_SetWindowBrightness

extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window)

Implementation

double sdlGetWindowBrightness(Pointer<SdlWindow> window) {
  final sdlGetWindowBrightnessLookupFunction = libSdl2.lookupFunction<
      Float Function(Pointer<SdlWindow> window),
      double Function(Pointer<SdlWindow> window)>('SDL_GetWindowBrightness');
  return sdlGetWindowBrightnessLookupFunction(window);
}