Class Window

A window is, as it name suggests, a window This window class is extremely minimalistic and is a port of the SDL_Window

class Window ;

Constructors

NameDescription
this Constructor for a window; needs at least a width and a height
this Creates the window from an already existing SDL_Window

Properties

NameTypeDescription
brightness[set] floatSets the window's brightness or gama multiplier
brightness[get] floatGets the window's brightness or gama multiplier
displayMode[set] derelict.sdl2.internal.sdl_types.SDL_DisplayModeSets the display mode of this window
displayMode[get] derelict.sdl2.internal.sdl_types.SDL_DisplayModeGets the display mode of this window
grab[set] boolSets whether the window grabs input or not
grab[get] boolGets whether the window grabs input or not
handle[get] derelict.sdl2.internal.sdl_types.SDL_Window*Returns the raw SDL data of this object
icon[set] SurfaceSets the window's icon
info[get] derelict.sdl2.internal.sdl_types.SDL_WindowFlags[]Gets the information about the window Returns an array of all the flags that describe this window
maximumSize[set] Vector!(int,2)Sets the window's maximum size
maximumSize[get] Vector!(int,2)Gets the window's maximum size
minimumSize[set] Vector!(int,2)Sets the window's minimum size
minimumSize[get] Vector!(int,2)Gets the window's minimum size
opacity[set] floatSets the window's opacity
opacity[get] floatGets the window's opacity
position[set] Vector!(int,2)Sets the window's screen position
position[get] Vector!(int,2)Gets the window's screen position
renderer[get] RendererGets the window's renderer This function shouldn't be used because this function returns a renderer object Once the returned object gets garbage collected, it deletes all instances of this window's renderer
size[set] Vector!(int,2)Sets the window's size
size[get] Vector!(int,2)Gets the window's size
title[set] stringSets the window's title
title[get] stringGets the window's title

Methods

NameDescription
hide Hides the window
maximize Maximizes the window
minimize Minimizes window in terms of size
raise Moves the window to be on top of everything else and to have the focus
restore Restores a window to its original state before a maximize or minimize
setAsModalFor Marks the current window as a modal for the given parent window
setBordered Sets whether the window should be bordered or not Is not a property method because it is a setter without a getter
setResizable Sets whether the window should be resizable or not Is not a property method because it is a setter without a getter
show Shows the window