61 inline unsigned int GetWidth()
const override {
return m_Data.Width; }
68 inline unsigned int GetHeight()
const override {
return m_Data.Height; }
78 m_Data.EventCallback = callback;
93 void SetVSync(
bool enabled)
override;
132 void SetGLFWCallbacks(GLFWwindow* glfwWindow);
142 GLFWwindow* m_Window;
153 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
bool IsVSync() const override
Query for Mac VSync status.
Definition MacWindow.cpp:264
virtual ~MacWindow()
A destructor to clean up the mess and Mac window relevant resources.
Definition MacWindow.cpp:33
virtual void * GetNativeWindow() const override
Getter for the Mac Window handle.
Definition MacWindow.h:86
MacWindow(const WindowProps &props)
A constructor to initialize Mac Window with appropriate properties.
Definition MacWindow.cpp:28
void SetVSync(bool enabled) override
Based on API chosen, the Mac based VSync toggle.
Definition MacWindow.cpp:233
void OnUpdate() override
Called each loop for input polling and OpenGL swapbuffers.
Definition MacWindow.cpp:227
unsigned int GetHeight() const override
Getter for Mac Window height.
Definition MacWindow.h:68
void SetEventCallback(const EventCallbackFn &callback) override
Sets a listner for Mac Window.
Definition MacWindow.h:76
unsigned int GetWidth() const override
Getter for the Mac Window width.
Definition MacWindow.h:61
virtual bool OnResize(WindowResizeEvent &event) override
MacOS implementation of WindowResize event.
Definition MacWindow.cpp:38
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
The "tangible" properties of a window.
Definition Window.h:25