GUI window callback functions.
More...
GUI window callback functions.
Functions to handle control callbacks from Kodi.
Likewise, all functions from here as well in the all window classes (Window, WindowDialog, WindowXML and WindowXMLDialog) with inserted and available.
Go back to normal functions from window
◆ onAction()
void XBMCAddon::xbmcgui::Window::onAction |
( |
|
... | ) |
|
@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> onAction(self, Action action) </big></font></span></code></h4> \endhtmlonly
onAction method.
This method will receive all actions that the main program will send to this window.
- Parameters
-
self | Own base class pointer |
action | The action id to perform, see Action to get use of them |
- Note
- By default, only the
PREVIOUS_MENU
and NAV_BACK actions
are handled.
- Overwrite this method to let your script handle all actions.
- Don't forget to capture
ACTION_PREVIOUS_MENU
or ACTION_NAV_BACK
, else the user can't close this window.
Example:
..
def onAction(self, action):
if action.getId() == ACTION_PREVIOUS_MENU:
print('action received: previous')
self.close()
if action.getId() == ACTION_SHOW_INFO:
print('action received: show info')
if action.getId() == ACTION_STOP:
print('action received: stop')
if action.getId() == ACTION_PAUSE:
print('action received: pause')
..
◆ onClick()
void XBMCAddon::xbmcgui::Window::onClick |
( |
|
... | ) |
|
@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> onClick(self, int controlId) </big></font></span></code></h4> \endhtmlonly
onClick method.
This method will receive all click events that the main program will send to this window.
- Parameters
-
self | Own base class pointer |
controlId | The one time clicked GUI control identifier |
Example:
..
def onClick(self,controlId):
if controlId == 10:
print("The control with Id 10 is clicked")
..
◆ onControl()
void XBMCAddon::xbmcgui::Window::onControl |
( |
|
... | ) |
|
@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> onControl(self, Control) </big></font></span></code></h4> \endhtmlonly
onControl method.
This method will receive all click events on owned and selected controls when the control itself doesn't handle the message.
- Parameters
-
self | Own base class pointer |
control | The Control class |
Example:
..
def onControl(self, control):
print("Window.onControl(control=[%s])"%control)
..
◆ onDoubleClick()
void XBMCAddon::xbmcgui::Window::onDoubleClick |
( |
|
... | ) |
|
@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> onDoubleClick(self, int controlId) </big></font></span></code></h4> \endhtmlonly
onDoubleClick method.
This method will receive all double click events that the main program will send to this window.
- Parameters
-
self | Own base class pointer |
controlId | The double clicked GUI control identifier |
Example:
..
def onDoubleClick(self,controlId):
if controlId == 10:
print("The control with Id 10 is double clicked")
..
◆ onFocus()
void XBMCAddon::xbmcgui::Window::onFocus |
( |
|
... | ) |
|
@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> onFocus(self, int controlId) </big></font></span></code></h4> \endhtmlonly
onFocus method.
This method will receive all focus events that the main program will send to this window.
- Parameters
-
self | Own base class pointer |
controlId | The focused GUI control identifier |
Example:
..
def onDoubleClick(self,controlId):
if controlId == 10:
print("The control with Id 10 is focused")
..
◆ onInit()
void XBMCAddon::xbmcgui::Window::onInit |
( |
|
... | ) |
|
@brief \htmlonly <h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font color=31363b><big> onInit(self) </big></font></span></code></h4> \endhtmlonly
onInit method.
This method will be called to initialize the window
- Parameters
-
self | Own base class pointer |
Example:
..
def onInit(self):
print("Window.onInit method called from Kodi")
..