![]() |
Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
|
Functions | |
virtual bool | kodi::gui::CWindow::OnInit () |
GUI window callback functions. More... | |
virtual bool | kodi::gui::CWindow::OnFocus (int controlId) |
OnFocus method. More... | |
virtual bool | kodi::gui::CWindow::OnClick (int controlId) |
OnClick method. More... | |
virtual bool | kodi::gui::CWindow::OnAction (int actionId) |
OnAction method. More... | |
virtual void | kodi::gui::CWindow::GetContextButtons (int itemNumber, std::vector< std::pair< unsigned int, std::string > > &buttons) |
Get context menu buttons for list entry. More... | |
virtual bool | kodi::gui::CWindow::OnContextButton (int itemNumber, unsigned int button) |
Called after selection in context menu. More... | |
void | kodi::gui::CWindow::SetIndependentCallbacks (GUIHANDLE cbhdl, bool(*CBOnInit)(GUIHANDLE cbhdl), bool(*CBOnFocus)(GUIHANDLE cbhdl, int controlId), bool(*CBOnClick)(GUIHANDLE cbhdl, int controlId), bool(*CBOnAction)(GUIHANDLE cbhdl, int actionId), void(*CBGetContextButtons)(GUIHANDLE cbhdl, int itemNumber, gui_context_menu_pair *buttons, unsigned int *size)=nullptr, bool(*CBOnContextButton)(GUIHANDLE cbhdl, int itemNumber, unsigned int button)=nullptr) |
Set independent callbacks More... | |
|
inlinevirtual |
Get context menu buttons for list entry.
[in] | itemNumber | selected list item entry |
[in] | buttons | list where context menus becomes added with his identifier and name. |
|
inlinevirtual |
OnAction method.
[in] | actionId | The action id to perform, see Action Id's to get list of them |
This method will receive all actions that the main program will send to this window.
PREVIOUS_MENU
and NAV_BACK
actions are handled.ACTION_PREVIOUS_MENU
or ACTION_NAV_BACK
, else the user can't close this window.Example:
|
inlinevirtual |
OnClick method.
[in] | controlId | GUI control identifier |
|
inlinevirtual |
Called after selection in context menu.
[in] | itemNumber | selected list item entry |
[in] | button | the pressed button id |
|
inlinevirtual |
OnFocus method.
[in] | controlId | GUI control identifier |
|
inlinevirtual |
GUI window callback functions.
Functions to handle control callbacks from Kodi
Go back to normal functions from CWindow
OnInit method.
|
inline |
Set independent callbacks
If the class is used independent (with "new CWindow") and not as parent (with "cCLASS_own : CWindow") from own must be the callback from Kodi to add-on overdriven with own functions!
[in] | cbhdl | The pointer to own handle data structure / class |
[in] | CBOnInit | Own defined window init function |
[in] | CBOnFocus | Own defined focus function |
[in] | CBOnClick | Own defined click function |
[in] | CBOnAction | Own defined action function |
[in] | CBGetContextButtons | [opt] To get context menu entries for lists function |
[in] | CBOnContextButton | [opt] Used context menu entry function |
Example: