- closevoid close() 
- Close the window and destroy all the attached resources. 
- createvoid create(VideoMode mode, string title, Style style, const(ContextSettings) settings) 
- Create (or recreate) the window. 
- createvoid create(VideoMode mode, wstring title, Style style, const(ContextSettings) settings) 
- Create (or recreate) the window. 
- createvoid create(VideoMode mode, dstring title, Style style, const(ContextSettings) settings) 
- Create (or recreate) the window. 
- createvoid create(WindowHandle handle, const(ContextSettings) settings) 
- Create (or recreate) the window from an existing control. 
- deleteWindowPtrvoid deleteWindowPtr() 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- displayvoid display() 
- Display on screen what has been rendered to the window so far. 
- getMousePositionVector2i getMousePosition() 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- getSettingsContextSettings getSettings() 
- Get the settings of the OpenGL context of the window. 
- getSystemHandleWindowHandle getSystemHandle() 
- Get the OS-specific handle of the window. 
- isOpenbool isOpen() 
- Tell whether or not the window is open. 
- mouse_SetPositionvoid mouse_SetPosition(Vector2i pos) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- mouse_getPositionVector2i mouse_getPosition() 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- pollEventbool pollEvent(Event event) 
- Pop the event on top of the event queue, if any, and return it. 
- setActivebool setActive(bool active) 
- Activate or deactivate the window as the current target for OpenGL rendering. 
- setFramerateLimitvoid setFramerateLimit(uint limit) 
- Limit the framerate to a maximum fixed frequency. 
- setIconvoid setIcon(uint width, uint height, const(ubyte[]) pixels) 
- Change the window's icon. 
- setJoystickThreshholdvoid setJoystickThreshhold(float threshhold) 
- Change the joystick threshold. 
- setKeyRepeatEnabledvoid setKeyRepeatEnabled(bool enabled) 
- Enable or disable automatic key-repeat. 
- setMouseCursorVisiblevoid setMouseCursorVisible(bool visible) 
- Show or hide the mouse cursor. 
- setMousePositionvoid setMousePosition(Vector2i pos) 
- Undocumented in source. Be warned that the author may not have intended to support it. 
- setTitlevoid setTitle(string newTitle) 
- Change the title of the window. 
- setTitlevoid setTitle(wstring newTitle) 
- Change the title of the window. 
- setTitlevoid setTitle(dstring newTitle) 
- Change the title of the window. 
- setVerticalSyncEnabledvoid setVerticalSyncEnabled(bool enabled) 
- Enable or disable vertical synchronization. 
- setVisiblevoid setVisible(bool visible) 
- waitEventbool waitEvent(Event event) 
- Wait for an event and return it. 
Window that serves as a target for OpenGL rendering.
Window is the main class of the Window module.
It defines an OS window that is able to receive an OpenGL rendering.
A Window can create its own new window, or be embedded into an already existing control using the create(handle) function. This can be useful for embedding an OpenGL rendering area into a view which is part of a bigger GUI with existing windows, controls, etc. It can also serve as embedding an OpenGL rendering area into a window created by another (probably richer) GUI library like Qt or wxWidgets.
The Window class provides a simple interface for manipulating the window: move, resize, show/hide, control mouse cursor, etc. It also provides event handling through its pollEvent() and waitEvent() functions.
Note that OpenGL experts can pass their own parameters (antialiasing level, bits for the depth and stencil buffers, etc.) to the OpenGL context attached to the window, with the ContextSettings structure which is passed as an optional argument when creating the window.