sdlSetWindowAlwaysOnTop function

void sdlSetWindowAlwaysOnTop(
  1. Pointer<SdlWindow> window,
  2. bool onTop
)

Set the window to always be above the others.

This will add or remove the window's SDL_WINDOW_ALWAYS_ON_TOP flag. This will bring the window to the front and keep the window above the rest.

\param window The window of which to change the always on top state \param on_top SDL_TRUE to set the window always on top, SDL_FALSE to disable

\since This function is available since SDL 2.0.16.

\sa SDL_GetWindowFlags

extern DECLSPEC void SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window * window, SDL_bool on_top)

Implementation

void sdlSetWindowAlwaysOnTop(Pointer<SdlWindow> window, bool onTop) {
  final sdlSetWindowAlwaysOnTopLookupFunction = libSdl2.lookupFunction<
      Void Function(Pointer<SdlWindow> window, Int32 onTop),
      void Function(
          Pointer<SdlWindow> window, int onTop)>('SDL_SetWindowAlwaysOnTop');
  return sdlSetWindowAlwaysOnTopLookupFunction(window, onTop ? 1 : 0);
}