◆ GetHeight()
unsigned int Karma::WindowsWindow::GetHeight |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ GetNativeWindow()
virtual void * Karma::WindowsWindow::GetNativeWindow |
( |
| ) |
const |
|
inlineoverridevirtual |
Pure virtual getter for the native (GLFW) Window handle.
- Since
- Karma 1.0.0
Implements Karma::Window.
◆ GetWidth()
unsigned int Karma::WindowsWindow::GetWidth |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ IsVSync()
bool Karma::WindowsWindow::IsVSync |
( |
| ) |
const |
|
overridevirtual |
Pure virtual function for VSync status.
- Since
- Karma 1.0.0
Implements Karma::Window.
◆ OnResize()
Pure virtual function called when Window resize happens.
- See also
- Application::OnWindowResize
- Since
- Karma 1.0.0
Implements Karma::Window.
◆ OnUpdate()
void Karma::WindowsWindow::OnUpdate |
( |
| ) |
|
|
overridevirtual |
◆ SetEventCallback()
void Karma::WindowsWindow::SetEventCallback |
( |
const EventCallbackFn & | callback | ) |
|
|
inlineoverridevirtual |
Setting a function, Application::OnEvent, to be called when a Karma Event happens, detected by GLFW Window like so.
SetGLFWCallbacks(GLFWwindow* glfwWindow)
{
glfwSetWindowSizeCallback(glfwWindow, [](GLFWwindow* window, int width, int height)
{
WindowData& data = *(WindowData*)glfwGetWindowUserPointer(window);
data.Width = width;
data.Height = height;
data.EventCallback(event);
});
}
Event triggered when Window is resized.
Definition ApplicationEvent.h:22
Setting the listener basically.
- Parameters
-
callback | The function to be called |
- See also
- Application::Application()
- Since
- Karma 1.0.0
Implements Karma::Window.
◆ SetVSync()
void Karma::WindowsWindow::SetVSync |
( |
bool | enabled | ) |
|
|
overridevirtual |
Pure virtual function for VSync.
- Since
- Karma 1.0.0
Implements Karma::Window.
The documentation for this class was generated from the following files:
- Karma/src/Platform/Windows/WindowsWindow.h
- Karma/src/Platform/Windows/WindowsWindow.cpp