Window
Query the state of the window and control it.
Summary
Functions
Name | |
---|---|
bool | window_is_focused() const Returns true iff the window is currently focused. |
void | focus_window() const Focuses the window, making it pop to the foreground. |
void | maximize_window() Maximizes the window. |
void | minimize_window() Minimizes the window. Note that while your window is minimized everything will be frozen and no update, event or anything will happen. |
void | restore_window() Restores the window if it is currently maximized. Does nothing otherwise. |
bool | window_is_maximized() const Returns true iff the window is currently maximized. |
void | go_fullscreen() Makes the window fullscreen. |
void | escape_fullscreen() Exits the fullscreen mode. |
void | toggle_fullscreen() Goes fullscreen if it wasn't, escapes fullscreen if it was. |
bool | window_is_fullscreen() const Returns true iff the window is currently fullscreen. |
GLFWwindow * | underlying_glfw_window() const Advanced function that returns the glfw window pointer. |
Functions
window_is_focused()
bool
window_is_focused() const;
Returns true iff the window is currently focused.
focus_window()
void
focus_window() const;
Focuses the window, making it pop to the foreground.
maximize_window()
void
maximize_window();
Maximizes the window.
minimize_window()
void
minimize_window();
Minimizes the window. Note that while your window is minimized everything will be frozen and no update, event or anything will happen.
restore_window()
void
restore_window();
Restores the window if it is currently maximized. Does nothing otherwise.
window_is_maximized()
bool
window_is_maximized() const;
Returns true iff the window is currently maximized.
go_fullscreen()
void
go_fullscreen();
Makes the window fullscreen.
Does nothing if it was already fullscreen.
escape_fullscreen()
void
escape_fullscreen();
Exits the fullscreen mode.
Does nothing if the window wasn't fullscreen.
toggle_fullscreen()
void
toggle_fullscreen();
Goes fullscreen if it wasn't, escapes fullscreen if it was.
window_is_fullscreen()
bool
window_is_fullscreen() const;
Returns true iff the window is currently fullscreen.
underlying_glfw_window()
GLFWwindow *
underlying_glfw_window() const;
Advanced function that returns the glfw window pointer.
It allows you to call all the glfw functions that are not directly exposed by p6. Note that you might also want to raise an issue to ask us to add that functionality directly into p6 to simplify future uses. We would be very thankful for that.
Updated on 2024 October 24