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
void SetVSync(bool enabled) override
Based on API chosen, the Linux based VSync toggle.
Definition LinuxWindow.cpp:232
virtual void * GetNativeWindow() const override
Getter for the Linux Window handle.
Definition LinuxWindow.h:86
LinuxWindow(const WindowProps &props)
A constructor to initialize Linux Window with appropriate properties.
Definition LinuxWindow.cpp:27
unsigned int GetHeight() const override
Getter for Linux Window height.
Definition LinuxWindow.h:68
virtual bool OnResize(WindowResizeEvent &event) override
Linux implementation of WindowResize event.
Definition LinuxWindow.cpp:103
virtual ~LinuxWindow()
A destructor to clean up the mess and Linux window relevant resources.
Definition LinuxWindow.cpp:32
bool IsVSync() const override
Query for Linux VSync status.
Definition LinuxWindow.cpp:263
void SetEventCallback(const EventCallbackFn &callback) override
Sets a listner for Linux Window.
Definition LinuxWindow.h:76
void OnUpdate() override
Called each loop for input polling and OpenGL swapbuffers.
Definition LinuxWindow.cpp:226
unsigned int GetWidth() const override
Getter for the Linux Window width.
Definition LinuxWindow.h:61
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