Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
KODI::MOUSE::IMouseInputHandler Class Referenceabstract

Interface for handling mouse events. More...

#include <IMouseInputHandler.h>

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

Public Member Functions

virtual ~IMouseInputHandler (void)=default
 
virtual std::string ControllerID (void) const =0
 The controller profile for this mouse input handler.
 
virtual bool OnPosition (const PointerName &relpointer, int positionX, int positionY)=0
 A relative pointer has moved to a new absolute position.
 
virtual bool OnMotion (const PointerName &relpointer, int differenceX, int differenceY)=0
 A relative pointer has moved a relative distance.
 
virtual bool OnButtonPress (const ButtonName &button)=0
 A mouse button has been pressed.
 
virtual void OnButtonRelease (const ButtonName &button)=0
 A mouse button has been released.
 
virtual void OnInputFrame ()=0
 Called at the end of the frame that provided input.
 

Detailed Description

Interface for handling mouse events.

Constructor & Destructor Documentation

◆ ~IMouseInputHandler()

virtual KODI::MOUSE::IMouseInputHandler::~IMouseInputHandler ( void )
virtualdefault

Member Function Documentation

◆ ControllerID()

virtual std::string KODI::MOUSE::IMouseInputHandler::ControllerID ( void ) const
pure virtual

The controller profile for this mouse input handler.

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

Implemented in KODI::GAME::CAgentMouse, and KODI::GAME::CGameClientMouse.

◆ OnButtonPress()

virtual bool KODI::MOUSE::IMouseInputHandler::OnButtonPress ( const ButtonName & button)
pure virtual

A mouse button has been pressed.

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

Implemented in KODI::GAME::CAgentMouse, and KODI::GAME::CGameClientMouse.

◆ OnButtonRelease()

virtual void KODI::MOUSE::IMouseInputHandler::OnButtonRelease ( const ButtonName & button)
pure virtual

A mouse button has been released.

Parameters
buttonThe name of the feature being released

Implemented in KODI::GAME::CAgentMouse, and KODI::GAME::CGameClientMouse.

◆ OnInputFrame()

virtual void KODI::MOUSE::IMouseInputHandler::OnInputFrame ( )
pure virtual

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().

Implemented in KODI::GAME::CAgentMouse, and KODI::GAME::CGameClientMouse.

◆ OnMotion()

virtual bool KODI::MOUSE::IMouseInputHandler::OnMotion ( const PointerName & relpointer,
int differenceX,
int differenceY )
pure virtual

A relative pointer has moved a relative distance.

Parameters
relpointerThe name of the relative pointer being moved
differenceXThe relative x coordinate of motion
differenceYThe 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

Implemented in KODI::GAME::CAgentMouse, and KODI::GAME::CGameClientMouse.

◆ OnPosition()

virtual bool KODI::MOUSE::IMouseInputHandler::OnPosition ( const PointerName & relpointer,
int positionX,
int positionY )
pure virtual

A relative pointer has moved to a new absolute position.

Parameters
relpointerThe name of the relative pointer being moved
positionXThe absolute x coordinate of motion
positionYThe absolute 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

Implemented in KODI::GAME::CAgentMouse, and KODI::GAME::CGameClientMouse.


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