KarmaEngine
Game Engine for practical learning and research purposes
|
The abstract base class of Karma's window (for platform specific purposes) More...
#include <Window.h>
Public Types | |
using | EventCallbackFn = std::function<void(Event&)> |
A data structure for use in Window::SetEventCallback. | |
Public Member Functions | |
virtual | ~Window () |
A virtual destructor for the Window. | |
virtual void | OnUpdate ()=0 |
Pure virtual function for calls in each loop. | |
virtual bool | OnResize (WindowResizeEvent &event)=0 |
Pure virtual function called when Window resize happens. | |
virtual unsigned int | GetWidth () const =0 |
A pure virtual getter for Width of the Window. | |
virtual unsigned int | GetHeight () const =0 |
Pure virtual getter for the Height of the Window. | |
virtual void | SetEventCallback (const EventCallbackFn &callback)=0 |
Setting a function, Application::OnEvent, to be called when a Karma Event happens, detected by GLFW Window like so. | |
virtual void | SetVSync (bool enabled)=0 |
Pure virtual function for VSync. | |
virtual bool | IsVSync () const =0 |
Pure virtual function for VSync status. | |
virtual void * | GetNativeWindow () const =0 |
Pure virtual getter for the native (GLFW) Window handle. | |
Static Public Member Functions | |
static Window * | Create (const WindowProps &props=WindowProps()) |
Platform based, implemented function for Window creation. | |
The abstract base class of Karma's window (for platform specific purposes)
using Karma::Window::EventCallbackFn = std::function<void(Event&)> |
A data structure for use in Window::SetEventCallback.
For instance KR_BIND_EVENT_FN(Application::OnEvent) is a EventCallbackFn.
|
inlinevirtual |
A virtual destructor for the Window.
|
static |
Platform based, implemented function for Window creation.
|
pure virtual |
Pure virtual getter for the Height of the Window.
Implemented in Karma::LinuxWindow, Karma::MacWindow, and Karma::WindowsWindow.
|
pure virtual |
Pure virtual getter for the native (GLFW) Window handle.
Implemented in Karma::LinuxWindow, Karma::MacWindow, and Karma::WindowsWindow.
|
pure virtual |
A pure virtual getter for Width of the Window.
Implemented in Karma::LinuxWindow, Karma::MacWindow, and Karma::WindowsWindow.
|
pure virtual |
Pure virtual function for VSync status.
Implemented in Karma::LinuxWindow, Karma::MacWindow, and Karma::WindowsWindow.
|
pure virtual |
Pure virtual function called when Window resize happens.
Implemented in Karma::LinuxWindow, Karma::MacWindow, and Karma::WindowsWindow.
|
pure virtual |
Pure virtual function for calls in each loop.
Implemented in Karma::LinuxWindow, Karma::MacWindow, and Karma::WindowsWindow.
|
pure virtual |
Setting a function, Application::OnEvent, to be called when a Karma Event happens, detected by GLFW Window like so.
Setting the listener basically.
callback | The function to be called |
Implemented in Karma::LinuxWindow, Karma::MacWindow, and Karma::WindowsWindow.
|
pure virtual |
Pure virtual function for VSync.
Implemented in Karma::LinuxWindow, Karma::MacWindow, and Karma::WindowsWindow.