sdlGetWindowGammaRamp function

int sdlGetWindowGammaRamp(
  1. Pointer<SdlWindow> window,
  2. Pointer<Uint16> red,
  3. Pointer<Uint16> green,
  4. Pointer<Uint16> blue,
)

Get the gamma ramp for a given window's display.

Despite the name and signature, this method retrieves the gamma ramp 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 gamma ramp will be queried \param red a 256 element array of 16-bit quantities filled in with the translation table for the red channel, or NULL \param green a 256 element array of 16-bit quantities filled in with the translation table for the green channel, or NULL \param blue a 256 element array of 16-bit quantities filled in with the translation table for the blue channel, or NULL \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_SetWindowGammaRamp

extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window, Uint16 * red, Uint16 * green, Uint16 * blue)

Implementation

int sdlGetWindowGammaRamp(Pointer<SdlWindow> window, Pointer<Uint16> red,
    Pointer<Uint16> green, Pointer<Uint16> blue) {
  final sdlGetWindowGammaRampLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlWindow> window, Pointer<Uint16> red,
          Pointer<Uint16> green, Pointer<Uint16> blue),
      int Function(
          Pointer<SdlWindow> window,
          Pointer<Uint16> red,
          Pointer<Uint16> green,
          Pointer<Uint16> blue)>('SDL_GetWindowGammaRamp');
  return sdlGetWindowGammaRampLookupFunction(window, red, green, blue);
}