Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.

Action class. More...

Modules

 Action Id's
 Actions that we have defined.
 

Classes

class  XBMCAddon::xbmcgui::Action
 

Functions

 XBMCAddon::xbmcgui::Action::getId ()
 
 XBMCAddon::xbmcgui::Action::getButtonCode ()
 
 XBMCAddon::xbmcgui::Action::getAmount1 ()
 
 XBMCAddon::xbmcgui::Action::getAmount2 ()
 

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 ( )

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> getAmount1() </big></font></span></code></h4> \endhtmlonly

Returns the first amount of force applied to the thumbstick.

Returns
[float] first amount

◆ getAmount2()

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

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> getAmount2() </big></font></span></code></h4> \endhtmlonly

Returns the second amount of force applied to the thumbstick.

Returns
[float] second amount

◆ getButtonCode()

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

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> getButtonCode() </big></font></span></code></h4> \endhtmlonly

Returns the button code for this action.

Returns
[integer] button code

◆ getId()

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

@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> getId() </big></font></span></code></h4> \endhtmlonly

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')
..