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

Interface for mapping buttons to Kodi actions for specific windows. More...

#include <IKeymap.h>

Inheritance diagram for KODI::KEYMAP::IWindowKeymap:
KODI::KEYMAP::CWindowKeymap

Public Member Functions

virtual ~IWindowKeymap ()=default
 
virtual std::string ControllerID () const =0
 The controller ID.
 
virtual void MapAction (int windowId, const std::string &keyName, KeymapAction action)=0
 Add an action to the keymap for a given key name and window ID.
 
virtual const KeymapActionGroupGetActions (int windowId, const std::string &keyName) const =0
 Get the actions for a given key name and window ID.
 

Detailed Description

Interface for mapping buttons to Kodi actions for specific windows.

See also
CJoystickUtils::MakeKeyName

Constructor & Destructor Documentation

◆ ~IWindowKeymap()

virtual KODI::KEYMAP::IWindowKeymap::~IWindowKeymap ( )
virtualdefault

Member Function Documentation

◆ ControllerID()

virtual std::string KODI::KEYMAP::IWindowKeymap::ControllerID ( ) const
pure virtual

The controller ID.

This is required because key names are specific to each controller

Implemented in KODI::KEYMAP::CWindowKeymap.

◆ GetActions()

virtual const KeymapActionGroup & KODI::KEYMAP::IWindowKeymap::GetActions ( int windowId,
const std::string & keyName ) const
pure virtual

Get the actions for a given key name and window ID.

Parameters
windowIdThe window ID to look up
keyNameThe key name created by CJoystickUtils::MakeKeyName()
Returns
A list of actions associated with the given key for the given window

Implemented in KODI::KEYMAP::CWindowKeymap.

◆ MapAction()

virtual void KODI::KEYMAP::IWindowKeymap::MapAction ( int windowId,
const std::string & keyName,
KeymapAction action )
pure virtual

Add an action to the keymap for a given key name and window ID.

Parameters
windowIdThe window ID to look up
keyNameThe key name created by CJoystickUtils::MakeKeyName()
actionThe action to map

Implemented in KODI::KEYMAP::CWindowKeymap.


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