kodi
Public Member Functions | List of all members
KODI::GAME::CAgentMouse Class Reference

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

#include <AgentMouse.h>

Inheritance diagram for KODI::GAME::CAgentMouse:
Inheritance graph
[legend]
Collaboration diagram for KODI::GAME::CAgentMouse:
Collaboration graph
[legend]

Public Member Functions

 CAgentMouse (PERIPHERALS::PeripheralPtr peripheral)
 
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. More...
 
bool OnMotion (const MOUSE::PointerName &relpointer, int differenceX, int differenceY) override
 A relative pointer has moved. More...
 
bool OnButtonPress (const MOUSE::ButtonName &button) override
 A mouse button has been pressed. More...
 
void OnButtonRelease (const MOUSE::ButtonName &button) override
 A mouse button has been released. More...
 
void OnInputFrame () override
 Called at the end of the frame that provided input. More...
 

Detailed Description

Handles mouse events for game agent functionality.

Member Function Documentation

◆ 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.

◆ 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: