|
Muto 0.0.1
|
Abstract interface representing an application window. More...
#include <Window.h>
Public Types | |
| using | EventCallbackFn = std::function< void(Event &)> |
Public Member Functions | |
| virtual uint32_t | GetHeight () const =0 |
| Retrieves the height of the window. | |
| virtual void * | GetNativeWindow () const =0 |
| Retrieves the native window handle. | |
| virtual uint32_t | GetWidth () const =0 |
| Retrieves the width of the window. | |
| virtual bool | IsVSync () const =0 |
| Checks if vertical synchronization (VSync) is enabled. | |
| virtual void | OnUpdate ()=0 |
| Called every frame to update the window. | |
| virtual void | SetEventCallback (const EventCallbackFn &callback)=0 |
| Sets the callback function for window events. | |
| virtual void | SetVSync (bool enabled)=0 |
| Sets whether vertical synchronization (VSync) is enabled. | |
| virtual | ~Window () |
Static Public Member Functions | |
| static Scope< Window > | Create (const WindowProps &props=WindowProps()) |
| Creates a window instance with the specified properties. | |
| using Muto::Window::EventCallbackFn = std::function<void(Event&)> |
|
inlinevirtual |
|
static |
Creates a window instance with the specified properties.
| props | The properties to initialize the window with. |
Retrieves the height of the window.
Implemented in Muto::WindowsWindow.
Referenced by Muto::ImGuiLayer::End(), and Sandbox2D::OnUpdate().
Retrieves the native window handle.
Implemented in Muto::WindowsWindow.
Referenced by Muto::Input::GetMousePosition(), Muto::Input::IsKeyPressed(), and Muto::Input::IsMouseButtonPressed().
Retrieves the width of the window.
Implemented in Muto::WindowsWindow.
Referenced by Muto::ImGuiLayer::End(), and Sandbox2D::OnUpdate().
Checks if vertical synchronization (VSync) is enabled.
Implemented in Muto::WindowsWindow.
Called every frame to update the window.
Implemented in Muto::WindowsWindow.
|
pure virtual |
Sets the callback function for window events.
Implemented in Muto::WindowsWindow.
Sets whether vertical synchronization (VSync) is enabled.
Implemented in Muto::WindowsWindow.