1#ifndef TOPAZ_OS_WINDOW_HPP
2#define TOPAZ_OS_WINDOW_HPP
3#include "tz/core/handle.hpp"
4#include "tz/core/error.hpp"
34 return static_cast<window_flags>(
static_cast<int>(lhs) |
static_cast<int>(rhs));
39 return static_cast<int>(lhs) &
static_cast<int>(rhs);
Represents a generic opaque handle.
Definition handle.hpp:32
error_code
Error codes for Topaz.
Definition error.hpp:14
window_handle get_window_handle()
Retrieve a opaque handle corresponding to the underlying window native.
window_flags
Optional behaviours/attributes when opening windows.
Definition window.hpp:20
unsigned int window_get_width()
Retrieve the width of the window, in pixels.
void window_set_dimensions(unsigned int width, unsigned int height)
Set a new width and height for the open window.
tz::error_code close_window()
Close a previously-opened window.
void window_show()
Show the window as normal, even if it is currently maximised/minimised/fullscreen.
void window_set_title(std::string_view title)
Set a new title for the open window.
tz::error_code open_window(window_info winfo={})
Open a new window.
void window_minimise()
Minimise the window, causing it to no longer be visible until maximised/shown.
void window_fullscreen()
Display the window in proper fullscreen.
bool window_is_open()
Query as to whether a window has been opened that has not yet been closed.
void window_maximise()
Maximise the window, causing it to cover the whole screen.
void window_update()
Poll updates for a window, advancing input events etc.
unsigned int window_get_height()
Retrieve the height of the window, in pixels.
std::string window_get_title()
Retrieve the title of the window.
@ maximised
Ignore the width and height provided within window_info and set set the window as maximised instead.
Definition window.hpp:25
@ transparent
When a pixel of the window's framebuffer is never drawn to, instead of being a clamped colour it is i...
Definition window.hpp:27
@ centered_window
Ignore the x and y coordinates provided within window_info and position the window approximately in t...
Definition window.hpp:23
@ invisible
When the window is "opened", it is completely invisible to the user. They won't see the window,...
Definition window.hpp:29
Basic customisation of a newly-opened window.
Definition window.hpp:47
unsigned int width
Width of the window body, in pixels.
Definition window.hpp:55
unsigned int x
x-position of the window, in pixels.
Definition window.hpp:51
unsigned int height
Height of the window body, in pixels.
Definition window.hpp:57
unsigned int y
y-position of the window, in pixels.
Definition window.hpp:53
std::string title
Title of the window. If you don't provide one, the name of the application specified in tz::initialis...
Definition window.hpp:49
window_flags flags
Some optional extra flags. See window_flags.
Definition window.hpp:59