CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::PlatformWindowInputProvider Class Reference

An input provider implementation for the macOS platform. More...

#include <CeresEngine/Input/Provider/PlatformWindowInputProvider.hpp>

Inheritance diagram for CeresEngine::PlatformWindowInputProvider:
CeresEngine::InputProvider

Public Member Functions

 PlatformWindowInputProvider (PlatformWindow &window)
 Creates a new input provider from the given window instance.
 
 ~PlatformWindowInputProvider () override
 Destroys the input provider instance.
 
Vector< AnyInputEventgetEvents () final
 A set of events that have been triggered since the last call to getEvents.
 
void setCursorMode (CursorMode mode) final
 Sets the cursor mode.
 
- Public Member Functions inherited from CeresEngine::InputProvider
virtual ~InputProvider ()=default
 Defaulted virtual destructor.
 

Protected Member Functions

void queueEvent (AnyInputEvent &&event)
 Internal method called by the macOS window implementation to queue an event for handling by the input manager.
 
void onPlatformWindowEvent (const AnyInputEvent &event)
 Internal method called whenever the window receives an event.
 

Private Attributes

PlatformWindowmWindow
 The window that backs the input provider data.
 
Vector< AnyInputEventmPendingEvents
 A vector of pending events to be handled and processed by the input manager.
 
EventConnection mOnPlatformWindowEvent
 

Detailed Description

An input provider implementation for the macOS platform.

Constructor & Destructor Documentation

◆ PlatformWindowInputProvider()

CeresEngine::PlatformWindowInputProvider::PlatformWindowInputProvider ( PlatformWindow window)
explicit

Creates a new input provider from the given window instance.

◆ ~PlatformWindowInputProvider()

CeresEngine::PlatformWindowInputProvider::~PlatformWindowInputProvider ( )
override

Destroys the input provider instance.

Member Function Documentation

◆ getEvents()

Vector< AnyInputEvent > CeresEngine::PlatformWindowInputProvider::getEvents ( )
finalvirtual

A set of events that have been triggered since the last call to getEvents.

The order is guaranteed to be in the order as they came in from the system.

Implements CeresEngine::InputProvider.

◆ onPlatformWindowEvent()

void CeresEngine::PlatformWindowInputProvider::onPlatformWindowEvent ( const AnyInputEvent event)
protected

Internal method called whenever the window receives an event.

Parameters
eventThe received event.

◆ queueEvent()

void CeresEngine::PlatformWindowInputProvider::queueEvent ( AnyInputEvent &&  event)
protected

Internal method called by the macOS window implementation to queue an event for handling by the input manager.

\ param event The event to be added to the provider event queue.

◆ setCursorMode()

void CeresEngine::PlatformWindowInputProvider::setCursorMode ( CursorMode  mode)
finalvirtual

Sets the cursor mode.

Parameters
modeThe cursor mode to be set

Implements CeresEngine::InputProvider.

Member Data Documentation

◆ mOnPlatformWindowEvent

EventConnection CeresEngine::PlatformWindowInputProvider::mOnPlatformWindowEvent
private

◆ mPendingEvents

Vector<AnyInputEvent> CeresEngine::PlatformWindowInputProvider::mPendingEvents
private

A vector of pending events to be handled and processed by the input manager.

◆ mWindow

PlatformWindow& CeresEngine::PlatformWindowInputProvider::mWindow
private

The window that backs the input provider data.


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