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

Mac specific Window class. More...

#include <MacWindow.h>

Inheritance diagram for Karma::MacWindow:
Collaboration diagram for Karma::MacWindow:

Public Member Functions

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

Mac specific Window class.

Constructor & Destructor Documentation

◆ MacWindow()

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

A constructor to initialize Mac Window with appropriate properties.

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

◆ ~MacWindow()

Karma::MacWindow::~MacWindow ( )
virtual

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

Since
Karma 1.0.0

Member Function Documentation

◆ GetHeight()

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

Getter for Mac Window height.

Since
Karma 1.0.0

Implements Karma::Window.

◆ GetNativeWindow()

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

Getter for the Mac Window handle.

Since
Karma 1.0.0

Implements Karma::Window.

◆ GetWidth()

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

Getter for the Mac Window width.

Since
Karma 1.0.0

Implements Karma::Window.

◆ IsVSync()

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

Query for Mac VSync status.

Since
Karma 1.0.0

Implements Karma::Window.

◆ OnResize()

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

MacOS implementation of WindowResize event.

Since
Karma 1.0.0

Implements Karma::Window.

◆ OnUpdate()

void Karma::MacWindow::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::MacWindow::SetEventCallback ( const EventCallbackFn & callback)
inlineoverridevirtual

Sets a listner for Mac Window.

Parameters
callbackThe function to be called
Since
Karma 1.0.0

Implements Karma::Window.

◆ SetVSync()

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

Based on API chosen, the Mac based VSync toggle.

Since
Karma 1.0.0

Implements Karma::Window.


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