68 inline unsigned int GetWidth()
const override {
return m_Data.Width; }
76 inline unsigned int GetHeight()
const override {
return m_Data.Height; }
88 m_Data.EventCallback = callback;
105 void SetVSync(
bool enabled)
override;
126 void SetGLFWCallbacks(GLFWwindow* glfwWindow);
129 GLFWwindow* m_Window;
135 unsigned int Width, Height;
This file contains the Window class.
An abstract class for creating a context for Renderer and provide graphics API.
Definition GraphicsContext.h:20
The abstract base class of Karma's window (for platform specific purposes).
Definition Window.h:63
std::function< void(Event &)> EventCallbackFn
A data structure for use in Window::SetEventCallback.
Definition Window.h:72
Event triggered when Window is resized.
Definition ApplicationEvent.h:22
void SetVSync(bool enabled) override
Sets VSync on or off.
Definition WindowsWindow.cpp:218
virtual bool OnResize(WindowResizeEvent &event) override
Windows specific implementation of WindowResize event.
Definition WindowsWindow.cpp:96
virtual ~WindowsWindow()
A destructor.
Definition WindowsWindow.cpp:31
void SetEventCallback(const EventCallbackFn &callback) override
Sets a listener for Window events.
Definition WindowsWindow.h:86
WindowsWindow(const WindowProps &props)
A constructor.
Definition WindowsWindow.cpp:26
bool IsVSync() const override
Getter for VSync status.
Definition WindowsWindow.cpp:250
GLFWwindow * GetHandle() const
Getter for the GLFW Window handle.
Definition WindowsWindow.h:121
virtual void OnUpdate() override
Function called in each loop iteration.
Definition WindowsWindow.cpp:212
unsigned int GetHeight() const override
Getter for the Window height.
Definition WindowsWindow.h:76
unsigned int GetWidth() const override
Getter for the Window width.
Definition WindowsWindow.h:68
virtual void * GetNativeWindow() const override
Getter for the native Window handle.
Definition WindowsWindow.h:97
The "tangible" properties of a window.
Definition Window.h:25