Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
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 OnMotion (const PointerName &relpointer, int dx, int dy)=0
 A relative pointer has moved.
 
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::CGameClientMouse, and KODI::GAME::CAgentMouse.

◆ 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::CGameClientMouse, and KODI::GAME::CAgentMouse.

◆ OnMotion()

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

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

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


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