Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

Action class. More...

Topics

 Action Id's
 Actions that we have defined.
 

Classes

class  XBMCAddon::xbmcgui::Action
 

Functions

 XBMCAddon::xbmcgui::Action::getId ()
 

Function: getId()


To get Action Id's
 
 XBMCAddon::xbmcgui::Action::getButtonCode ()
 

Function: getButtonCode()


Returns the button code for this action.
 
 XBMCAddon::xbmcgui::Action::getAmount1 ()
 

Function: getAmount1()


Returns the first amount of force applied to the thumbstick.
 
 XBMCAddon::xbmcgui::Action::getAmount2 ()
 

Function: getAmount2()


Returns the second amount of force applied to the thumbstick.
 

Detailed Description

Action class.

Class: xbmcgui.Action():

This class serves in addition to identify carried out Action Id's of Kodi and to be able to carry out thereby own necessary steps.

The data of this class are always transmitted by callback Window::onAction at a window.

Function Documentation

◆ getAmount1()

XBMCAddon::xbmcgui::Action::getAmount1 ( )

Function: getAmount1()


Returns the first amount of force applied to the thumbstick.

Returns
[float] first amount

◆ getAmount2()

XBMCAddon::xbmcgui::Action::getAmount2 ( )

Function: getAmount2()


Returns the second amount of force applied to the thumbstick.

Returns
[float] second amount

◆ getButtonCode()

XBMCAddon::xbmcgui::Action::getButtonCode ( )

Function: getButtonCode()


Returns the button code for this action.

Returns
[integer] button code

◆ getId()

XBMCAddon::xbmcgui::Action::getId ( )

Function: getId()


To get Action Id's

This function returns the identification code used by the explained order, it is necessary to determine the type of command from Action Id's.

Returns
The action's current id as a long or 0 if no action is mapped in the xml's.

Example:

..
def onAction(self, action):
if action.getId() == ACTION_PREVIOUS_MENU:
print('action received: previous')
..