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

Class to translate input from driver info to higher-level features. More...

#include <MouseInputHandling.h>

Inheritance diagram for KODI::MOUSE::CMouseInputHandling:
KODI::MOUSE::IMouseDriverHandler

Public Member Functions

 CMouseInputHandling (IMouseInputHandler *handler, JOYSTICK::IButtonMap *buttonMap)
 
 ~CMouseInputHandling (void) override=default
 
bool OnPosition (int x, int y) override
 Handle mouse position updates.
 
bool OnButtonPress (BUTTON_ID button) override
 A mouse button has been pressed.
 
void OnButtonRelease (BUTTON_ID button) override
 A mouse button has been released.
 
- Public Member Functions inherited from KODI::MOUSE::IMouseDriverHandler
virtual ~IMouseDriverHandler (void)=default
 

Detailed Description

Class to translate input from driver info to higher-level features.

Constructor & Destructor Documentation

◆ CMouseInputHandling()

CMouseInputHandling::CMouseInputHandling ( IMouseInputHandler * handler,
JOYSTICK::IButtonMap * buttonMap )

◆ ~CMouseInputHandling()

KODI::MOUSE::CMouseInputHandling::~CMouseInputHandling ( void )
overridedefault

Member Function Documentation

◆ OnButtonPress()

bool CMouseInputHandling::OnButtonPress ( BUTTON_ID button)
overridevirtual

A mouse button has been pressed.

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

Implements KODI::MOUSE::IMouseDriverHandler.

◆ OnButtonRelease()

void CMouseInputHandling::OnButtonRelease ( BUTTON_ID button)
overridevirtual

A mouse button has been released.

Parameters
buttonThe index of the released button

Implements KODI::MOUSE::IMouseDriverHandler.

◆ OnPosition()

bool CMouseInputHandling::OnPosition ( int x,
int y )
overridevirtual

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

Implements KODI::MOUSE::IMouseDriverHandler.


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