15 virtual ~WindowsWindow();
20 inline unsigned int GetWidth()
const override {
return m_Data.Width; }
21 inline unsigned int GetHeight()
const override {
return m_Data.Height; }
25 m_Data.EventCallback = callback;
29 void SetVSync(
bool enabled)
override;
32 GLFWwindow* GetHandle()
const {
return m_Window; }
35 void Init(
const WindowProps& props);
37 void SetGLFWCallbacks(GLFWwindow* glfwWindow);
41 GraphicsContext* m_Context;
46 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
Pure virtual function for VSync.
Definition WindowsWindow.cpp:218
virtual bool OnResize(WindowResizeEvent &event) override
Pure virtual function called when Window resize happens.
Definition WindowsWindow.cpp:96
void SetEventCallback(const EventCallbackFn &callback) override
Setting a function, Application::OnEvent, to be called when a Karma Event happens,...
Definition WindowsWindow.h:23
bool IsVSync() const override
Pure virtual function for VSync status.
Definition WindowsWindow.cpp:250
virtual void OnUpdate() override
Pure virtual function for calls in each loop.
Definition WindowsWindow.cpp:212
unsigned int GetHeight() const override
Pure virtual getter for the Height of the Window.
Definition WindowsWindow.h:21
unsigned int GetWidth() const override
A pure virtual getter for Width of the Window.
Definition WindowsWindow.h:20
virtual void * GetNativeWindow() const override
Pure virtual getter for the native (GLFW) Window handle.
Definition WindowsWindow.h:27
The "tangible" properties of a window.
Definition Window.h:25