Window

Window that serves as a target for OpenGL rendering.

Constructors

this
this()

Default constructor.

this
this(int )
Undocumented in source.
this
this(VideoMode mode, immutable(T)[] title, Style style, ContextSettings settings)

Construct a new window.

this
this(WindowHandle handle, ContextSettings settings)

Construct the window from an existing control.

Destructor

~this
~this()

Destructor.

Members

Enums

Style
enum Style

Choices for window style

Functions

close
void close()

Close the window and destroy all the attached resources.

create
void create(VideoMode mode, const(char)[] title, Style style, ContextSettings settings)
void create(VideoMode mode, const(wchar)[] title, Style style, ContextSettings settings)

Create (or recreate) the window.

create
void create(VideoMode mode, const(dchar)[] title, Style style, ContextSettings settings)
void create(WindowHandle handle, ContextSettings settings)

Create (or recreate) the window.

deleteWindowPtr
void deleteWindowPtr()
Undocumented in source. Be warned that the author may not have intended to support it.
display
void display()

Display on screen what has been rendered to the window so far.

getMousePosition
Vector2i getMousePosition()
Undocumented in source. Be warned that the author may not have intended to support it.
getSettings
ContextSettings getSettings()

Get the settings of the OpenGL context of the window.

getSystemHandle
WindowHandle getSystemHandle()

Get the OS-specific handle of the window.

hasFocus
bool hasFocus()

Check whether the window has the input focus

isOpen
bool isOpen()

Tell whether or not the window is open.

mouse_SetPosition
void mouse_SetPosition(Vector2i pos)
Undocumented in source. Be warned that the author may not have intended to support it.
mouse_getPosition
Vector2i mouse_getPosition()
Undocumented in source. Be warned that the author may not have intended to support it.
pollEvent
bool pollEvent(Event event)

Pop the event on top of the event queue, if any, and return it.

requestFocus
void requestFocus()

Request the current window to be made the active foreground window.

setActive
bool setActive(bool active)

Activate or deactivate the window as the current target for OpenGL rendering.

setFramerateLimit
void setFramerateLimit(uint limit)

Limit the framerate to a maximum fixed frequency.

setIcon
void setIcon(uint width, uint height, const(ubyte[]) pixels)

Change the window's icon.

setJoystickThreshhold
void setJoystickThreshhold(float threshhold)

Change the joystick threshold.

setJoystickThreshold
void setJoystickThreshold(float threshold)

Change the joystick threshold.

setKeyRepeatEnabled
void setKeyRepeatEnabled(bool enabled)

Enable or disable automatic key-repeat.

setMouseCursorVisible
void setMouseCursorVisible(bool visible)

Show or hide the mouse cursor.

setMousePosition
void setMousePosition(Vector2i pos)
Undocumented in source. Be warned that the author may not have intended to support it.
setTitle
void setTitle(const(char)[] newTitle)
void setTitle(const(wchar)[] newTitle)

Change the title of the window.

setTitle
void setTitle(const(dchar)[] newTitle)

Change the title of the window.

setVerticalSyncEnabled
void setVerticalSyncEnabled(bool enabled)

Enable or disable vertical synchronization.

setVisible
void setVisible(bool visible)

Show or hide the window.

waitEvent
bool waitEvent(Event event)

Wait for an event and return it.

Properties

position
Vector2i position [@property setter]
Vector2i position [@property getter]

Get's or set's the window's position.

size
Vector2u size [@property setter]

Get's or set's the window's size.

size
Vector2u size [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

getWindowPointer
void* getWindowPointer(const(Window) window)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

sfPtr
sfWindow* sfPtr;
Undocumented in source.

Meta