Window.this - multiple declarations

Function Window.this

Constructs a dsdl2.Window from a vanilla SDL_Window* from bindbc-sdl

this (
  sdl.video.SDL_Window* sdlWindow,
  bool isOwner = true,
  void* userRef = null
);

Parameters

NameDescription
sdlWindow the SDL_Window pointer to manage
isOwner whether the instance owns the given SDL_Window* and should destroy it on its own
userRef optional pointer to maintain reference link, avoiding GC cleanup

Function Window.this

Creates an SDL-handled window from a native pointer handle of the OS, which wraps SDL_CreateWindowFrom

this (
  void* nativeHandle
);

Parameters

NameDescription
nativeHandle pointer to the native OS window

Throws

dsdl2.SDLException if window creation failed

Function Window.this

Creates a window on the desktop placed at a coordinate in the screen, which wraps SDL_CreateWindow

this (
  string title,
  uint[2] position,
  uint[2] size,
  bool shaped = false,
  bool fullscreen = false,
  bool fullscreenDesktop = false,
  bool openGL = false,
  bool shown = false,
  bool hidden = false,
  bool borderless = false,
  bool resizable = false,
  bool minimized = false,
  bool maximized = false,
  bool inputGrabbed = false,
  bool inputFocus = false,
  bool mouseFocus = false,
  bool foreign = false,
  bool allowHighDPI = false,
  bool mouseCapture = false,
  bool alwaysOnTop = false,
  bool skipTaskbar = false,
  bool utility = false,
  bool tooltip = false,
  bool popupMenu = false,
  bool vulkan = false,
  bool metal = false,
  bool mouseGrabbed = false,
  bool keyboardGrabbed = false
) @trusted;

Parameters

NameDescription
title title given to the shown window
position top-left position of the window in the desktop environment (pair of two uints or flags from dsdl2.WindowPos)
size size of the window in pixels
shaped true to use SDL_CreateShapedWindow; false to use SDL_CreateWindow instead
fullscreen adds SDL_WINDOW_FULLSCREEN flag
fullscreenDesktop adds SDL_WINDOW_FULLSCREEN_DESKTOP flag
openGL adds SDL_WINDOW_OPENGL flag
shown adds SDL_WINDOW_SHOWN flag
hidden adds SDL_WINDOW_HIDDEN flag
borderless adds SDL_WINDOW_BORDERLESS flag
resizable adds SDL_WINDOW_RESIZABLE flag
minimized adds SDL_WINDOW_MINIMIZED flag
maximized adds SDL_WINDOW_MAXIMIZED flag
inputGrabbed adds SDL_WINDOW_INPUT_GRABBED flag
inputFocus adds SDL_WINDOW_INPUT_FOCUS flag
mouseFocus adds SDL_WINDOW_MOUSE_FOCUS flag
foreign adds SDL_WINDOW_FOREIGN flag
allowHighDPI adds SDL_WINDOW_ALLOW_HIGHDPI flag (from SDL 2.0.1)
mouseCapture adds SDL_WINDOW_MOUSE_CAPTURE flag (from SDL 2.0.2)
alwaysOnTop adds SDL_WINDOW_ALWAYS_ON_TOP flag (from SDL 2.0.5)
skipTaskbar adds SDL_WINDOW_SKIP_TASKBAR flag (from SDL 2.0.5)
utility adds SDL_WINDOW_UTILITY flag (from SDL 2.0.5)
tooltip adds SDL_WINDOW_TOOLTIP flag (from SDL 2.0.5)
popupMenu adds SDL_WINDOW_POPUP_MENU flag (from SDL 2.0.5)
vulkan adds SDL_WINDOW_VULKAN flag (from SDL 2.0.6)
metal adds SDL_WINDOW_METAL flag (from SDL 2.0.6)
mouseGrabbed adds SDL_WINDOW_MOUSE_GRABBED flag (from SDL 2.0.16)
keyboardGrabbed adds SDL_WINDOW_KEYBOARD_GRABBED flag (from SDL 2.0.16)

Throws

dsdl2.SDLException if window creation failed