Module window

Source
Expand description

Functions and types relating to the game window, and the environment it is running in.

Enums§

WindowPosition
Represents the position of a window on the screen.

Functions§

focus
Brings the window to the front and gives it input focus.
get_current_monitor
Gets the index of the monitor that the window is currently on.
get_current_monitor_height
Gets the height of the monitor that the window is currently on.
get_current_monitor_name
Gets the name of the monitor that the window is currently on.
get_current_monitor_size
Gets the size of the monitor that the window is currently on.
get_current_monitor_width
Gets the width of the monitor that the window is currently on.
get_dpi_scale
Returns the ratio of the logical resolution to the physical resolution of the current display on which the window is being displayed.
get_height
Gets the height of the window.
get_maximum_size
Gets the maximum size of the window.
get_minimum_size
Gets the minimum size of the window.
get_monitor_count
Gets the number of monitors connected to the device.
get_monitor_height
Gets the height of a monitor connected to the device.
get_monitor_name
Gets the name of a monitor connected to the device.
get_monitor_size
Gets the size of a monitor connected to the device.
get_monitor_width
Gets the width of a monitor connected to the device.
get_physical_height
Returns the height of the window in physical pixels.
get_physical_size
Returns the size of the window in physical pixels.
get_physical_width
Returns the width of the window in physical pixels.
get_position
Gets the position of the window.
get_size
Gets the size of the window.
get_title
Gets the current title of the window.
get_width
Gets the width of the window.
is_fullscreen
Returns whether or not the window is currently in fullscreen mode.
is_key_repeat_enabled
Returns whether or not key repeat is enabled.
is_mouse_grabbed
Returns whether or not the mouse is currently grabbed by the window.
is_mouse_visible
Returns whether or not the mouse cursor is currently visible.
is_relative_mouse_mode
Returns whether or not relative mouse mode is currently enabled.
is_screen_saver_enabled
Returns whether or not the user’s screen saver can be displayed while the game is running.
is_visible
Returns whether the window is currently visible, or whether it has been hidden.
is_vsync_enabled
Returns whether or not vsync is enabled.
maximize
Maximizes the window.
minimize
Minimizes the window.
quit
Quits the game, if it is currently running.
restore
Restores the size and position of a minimized or maximized window.
set_decorated
Sets whether or not the window should have decorations, such as a border and a close button.
set_fullscreen
Sets whether the window should be in fullscreen mode.
set_height
Sets the height of the window.
set_icon
Sets the icon for the window.
set_key_repeat_enabled
Sets whether or not key repeat should be enabled.
set_maximum_size
Sets the maximum size of the window.
set_minimum_size
Sets the minimum size of the window.
set_mouse_grabbed
Sets whether or not the mouse is grabbed by the window.
set_mouse_visible
Sets whether or not the mouse cursor should be visible.
set_position
Sets the position of the window.
set_relative_mouse_mode
Sets whether or not relative mouse mode is enabled.
set_screen_saver_enabled
Sets whether or not the user’s screen saver can be displayed while the game is running.
set_size
Sets the size of the window.
set_title
Sets the title of the window.
set_visible
Sets whether or not the window should be visible to the user.
set_vsync
Sets whether the window should be vsynced.
set_width
Sets the width of the window.