Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::GAME::CAgentMouse Class Reference

Handles mouse events for game agent functionality. More...

#include <AgentMouse.h>

Inheritance diagram for KODI::GAME::CAgentMouse:
KODI::MOUSE::IMouseInputHandler

Public Member Functions

 CAgentMouse (PERIPHERALS::PeripheralPtr peripheral)
 
 ~CAgentMouse () override
 
void Initialize ()
 
void Deinitialize ()
 
void ClearButtonState ()
 
float GetActivation () const
 
ControllerPtr Appearance () const
 
std::string ControllerID () const override
 The controller profile for this mouse input handler.
 
bool OnMotion (const MOUSE::PointerName &relpointer, int differenceX, int differenceY) override
 A relative pointer has moved.
 
bool OnButtonPress (const MOUSE::ButtonName &button) override
 A mouse button has been pressed.
 
void OnButtonRelease (const MOUSE::ButtonName &button) override
 A mouse button has been released.
 
void OnInputFrame () override
 Called at the end of the frame that provided input.
 
- Public Member Functions inherited from KODI::MOUSE::IMouseInputHandler
virtual ~IMouseInputHandler (void)=default
 

Detailed Description

Handles mouse events for game agent functionality.

Constructor & Destructor Documentation

◆ CAgentMouse()

CAgentMouse::CAgentMouse ( PERIPHERALS::PeripheralPtr peripheral)

◆ ~CAgentMouse()

CAgentMouse::~CAgentMouse ( )
overridedefault

Member Function Documentation

◆ Appearance()

ControllerPtr KODI::GAME::CAgentMouse::Appearance ( ) const
inline

◆ ClearButtonState()

void CAgentMouse::ClearButtonState ( )

◆ ControllerID()

std::string CAgentMouse::ControllerID ( ) const
overridevirtual

The controller profile for this mouse input handler.

Returns
The ID of the add-on extending kodi.game.controller

Implements KODI::MOUSE::IMouseInputHandler.

◆ Deinitialize()

void CAgentMouse::Deinitialize ( )

◆ GetActivation()

float CAgentMouse::GetActivation ( ) const

◆ Initialize()

void CAgentMouse::Initialize ( )

◆ OnButtonPress()

bool CAgentMouse::OnButtonPress ( const MOUSE::ButtonName & button)
overridevirtual

A mouse button has been pressed.

Parameters
buttonThe name of the feature being pressed
Returns
True if the event was handled, otherwise false

Implements KODI::MOUSE::IMouseInputHandler.

◆ OnButtonRelease()

void CAgentMouse::OnButtonRelease ( const MOUSE::ButtonName & button)
overridevirtual

A mouse button has been released.

Parameters
buttonThe name of the feature being released

Implements KODI::MOUSE::IMouseInputHandler.

◆ OnInputFrame()

void CAgentMouse::OnInputFrame ( )
overridevirtual

Called at the end of the frame that provided input.

This can be as a result of a pointer update, a button press, or a button release. All three events will result in a call to OnInputFrame().

Implements KODI::MOUSE::IMouseInputHandler.

◆ OnMotion()

bool CAgentMouse::OnMotion ( const MOUSE::PointerName & relpointer,
int dx,
int dy )
overridevirtual

A relative pointer has moved.

Parameters
relpointerThe name of the relative pointer being moved
dxThe relative x coordinate of motion
dyThe relative y coordinate of motion

The mouse uses a left-handed (graphics) cartesian coordinate system. Positive X is right, positive Y is down.

Returns
True if the event was handled, otherwise false

Implements KODI::MOUSE::IMouseInputHandler.


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