KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::LinuxWindow Class Reference

Linux specific Window class. More...

#include <LinuxWindow.h>

Inheritance diagram for Karma::LinuxWindow:
Collaboration diagram for Karma::LinuxWindow:

Public Member Functions

 LinuxWindow (const WindowProps &props)
 A constructor to initialize Linux Window with appropriate properties.
 
virtual ~LinuxWindow ()
 A destructor to clean up the mess and Linux window relevant resources.
 
void OnUpdate () override
 Called each loop for input polling and OpenGL swapbuffers.
 
virtual bool OnResize (WindowResizeEvent &event) override
 Linux implementation of WindowResize event.
 
unsigned int GetWidth () const override
 Getter for the Linux Window width.
 
unsigned int GetHeight () const override
 Getter for Linux Window height.
 
void SetEventCallback (const EventCallbackFn &callback) override
 Sets a listner for Linux Window.
 
virtual void * GetNativeWindow () const override
 Getter for the Linux Window handle.
 
void SetVSync (bool enabled) override
 Based on API chosen, the Linux based VSync toggle.
 
bool IsVSync () const override
 Query for Linux VSync status.
 
- Public Member Functions inherited from Karma::Window
virtual ~Window ()
 A virtual destructor for the Window.
 

Additional Inherited Members

- Public Types inherited from Karma::Window
using EventCallbackFn = std::function<void(Event&)>
 A data structure for use in Window::SetEventCallback.
 
- Static Public Member Functions inherited from Karma::Window
static WindowCreate (const WindowProps &props=WindowProps())
 Platform based, implemented function for Window creation.
 

Detailed Description

Linux specific Window class.

Constructor & Destructor Documentation

◆ LinuxWindow()

Karma::LinuxWindow::LinuxWindow ( const WindowProps & props)

A constructor to initialize Linux Window with appropriate properties.

Parameters
propsThe properties with which the window is to be initialized
Since
Karma 1.0.0

◆ ~LinuxWindow()

Karma::LinuxWindow::~LinuxWindow ( )
virtual

A destructor to clean up the mess and Linux window relevant resources.

Since
Karma 1.0.0

Member Function Documentation

◆ GetHeight()

unsigned int Karma::LinuxWindow::GetHeight ( ) const
inlineoverridevirtual

Getter for Linux Window height.

Since
Karma 1.0.0

Implements Karma::Window.

◆ GetNativeWindow()

virtual void * Karma::LinuxWindow::GetNativeWindow ( ) const
inlineoverridevirtual

Getter for the Linux Window handle.

Since
Karma 1.0.0

Implements Karma::Window.

◆ GetWidth()

unsigned int Karma::LinuxWindow::GetWidth ( ) const
inlineoverridevirtual

Getter for the Linux Window width.

Since
Karma 1.0.0

Implements Karma::Window.

◆ IsVSync()

bool Karma::LinuxWindow::IsVSync ( ) const
overridevirtual

Query for Linux VSync status.

Since
Karma 1.0.0

Implements Karma::Window.

◆ OnResize()

bool Karma::LinuxWindow::OnResize ( WindowResizeEvent & event)
overridevirtual

Linux implementation of WindowResize event.

Since
Karma 1.0.0

Implements Karma::Window.

◆ OnUpdate()

void Karma::LinuxWindow::OnUpdate ( )
overridevirtual

Called each loop for input polling and OpenGL swapbuffers.

See also
Application::Run()
Since
Karma 1.0.0

Implements Karma::Window.

◆ SetEventCallback()

void Karma::LinuxWindow::SetEventCallback ( const EventCallbackFn & callback)
inlineoverridevirtual

Sets a listner for Linux Window.

Parameters
callbackThe function to be called
Since
Karma 1.0.0

Implements Karma::Window.

◆ SetVSync()

void Karma::LinuxWindow::SetVSync ( bool enabled)
overridevirtual

Based on API chosen, the Linux based VSync toggle.

Since
Karma 1.0.0

Implements Karma::Window.


The documentation for this class was generated from the following files: