Window.this

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

  1. this(SDL_Window* sdlWindow, bool isOwner, void* userRef)
  2. this(void* nativeHandle)
  3. this(string title, uint[2] position, uint[2] size, bool shaped, bool fullscreen, bool fullscreenDesktop, bool openGL, bool shown, bool hidden, bool borderless, bool resizable, bool minimized, bool maximized, bool inputGrabbed, bool inputFocus, bool mouseFocus, bool foreign, bool allowHighDPI, bool mouseCapture, bool alwaysOnTop, bool skipTaskbar, bool utility, bool tooltip, bool popupMenu, bool vulkan, bool metal, bool mouseGrabbed, bool keyboardGrabbed)
    class Window
    @trusted
    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
    )

Parameters

title string

title given to the shown window

position uint[2]

top-left position of the window in the desktop environment (pair of two uints or flags from dsdl2.WindowPos)

size uint[2]

size of the window in pixels

shaped bool

true to use SDL_CreateShapedWindow; false to use SDL_CreateWindow instead

fullscreen bool

adds SDL_WINDOW_FULLSCREEN flag

fullscreenDesktop bool

adds SDL_WINDOW_FULLSCREEN_DESKTOP flag

openGL bool

adds SDL_WINDOW_OPENGL flag

shown bool

adds SDL_WINDOW_SHOWN flag

hidden bool

adds SDL_WINDOW_HIDDEN flag

borderless bool

adds SDL_WINDOW_BORDERLESS flag

resizable bool

adds SDL_WINDOW_RESIZABLE flag

minimized bool

adds SDL_WINDOW_MINIMIZED flag

maximized bool

adds SDL_WINDOW_MAXIMIZED flag

inputGrabbed bool

adds SDL_WINDOW_INPUT_GRABBED flag

inputFocus bool

adds SDL_WINDOW_INPUT_FOCUS flag

mouseFocus bool

adds SDL_WINDOW_MOUSE_FOCUS flag

foreign bool

adds SDL_WINDOW_FOREIGN flag

allowHighDPI bool

adds SDL_WINDOW_ALLOW_HIGHDPI flag (from SDL 2.0.1)

mouseCapture bool

adds SDL_WINDOW_MOUSE_CAPTURE flag (from SDL 2.0.2)

alwaysOnTop bool

adds SDL_WINDOW_ALWAYS_ON_TOP flag (from SDL 2.0.5)

skipTaskbar bool

adds SDL_WINDOW_SKIP_TASKBAR flag (from SDL 2.0.5)

utility bool

adds SDL_WINDOW_UTILITY flag (from SDL 2.0.5)

tooltip bool

adds SDL_WINDOW_TOOLTIP flag (from SDL 2.0.5)

popupMenu bool

adds SDL_WINDOW_POPUP_MENU flag (from SDL 2.0.5)

vulkan bool

adds SDL_WINDOW_VULKAN flag (from SDL 2.0.6)

metal bool

adds SDL_WINDOW_METAL flag (from SDL 2.0.6)

mouseGrabbed bool

adds SDL_WINDOW_MOUSE_GRABBED flag (from SDL 2.0.16)

keyboardGrabbed bool

adds SDL_WINDOW_KEYBOARD_GRABBED flag (from SDL 2.0.16)

Throws

dsdl2.SDLException if window creation failed

Meta