Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::MOUSE::IMouseDriverHandler Class Referenceabstract

Interface for handling mouse driver events. More...

#include <IMouseDriverHandler.h>

Inheritance diagram for KODI::MOUSE::IMouseDriverHandler:
KODI::GAME::CAgentInput KODI::JOYSTICK::CButtonMapping KODI::MOUSE::CDefaultMouseHandling KODI::MOUSE::CMouseInputHandling PERIPHERALS::CAddonButtonMapping PERIPHERALS::CAddonInputHandling PERIPHERALS::CPeripheralMouse

Public Member Functions

virtual ~IMouseDriverHandler (void)=default
 
virtual bool OnPosition (int x, int y)=0
 Handle mouse position updates.
 
virtual bool OnButtonPress (BUTTON_ID button)=0
 A mouse button has been pressed.
 
virtual void OnButtonRelease (BUTTON_ID button)=0
 A mouse button has been released.
 

Detailed Description

Interface for handling mouse driver events.

Constructor & Destructor Documentation

◆ ~IMouseDriverHandler()

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

Member Function Documentation

◆ OnButtonPress()

virtual bool KODI::MOUSE::IMouseDriverHandler::OnButtonPress ( BUTTON_ID button)
pure virtual

A mouse button has been pressed.

Parameters
buttonThe index of the pressed button
Returns
True if the event was handled, otherwise false

Implemented in KODI::GAME::CAgentInput, KODI::JOYSTICK::CButtonMapping, KODI::MOUSE::CDefaultMouseHandling, KODI::MOUSE::CMouseInputHandling, PERIPHERALS::CAddonButtonMapping, PERIPHERALS::CAddonInputHandling, and PERIPHERALS::CPeripheralMouse.

◆ OnButtonRelease()

virtual void KODI::MOUSE::IMouseDriverHandler::OnButtonRelease ( BUTTON_ID button)
pure virtual

◆ OnPosition()

virtual bool KODI::MOUSE::IMouseDriverHandler::OnPosition ( int x,
int y )
pure virtual

Handle mouse position updates.

Parameters
xThe new x coordinate of the pointer
yThe new y coordinate of the pointer

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, false otherwise

Implemented in KODI::GAME::CAgentInput, KODI::JOYSTICK::CButtonMapping, KODI::MOUSE::CDefaultMouseHandling, KODI::MOUSE::CMouseInputHandling, PERIPHERALS::CAddonButtonMapping, PERIPHERALS::CAddonInputHandling, and PERIPHERALS::CPeripheralMouse.


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