|
Kodi Documentation
18.0
Kodi is an open source media player and entertainment hub.
|
GUI window class for Add-Ons. More...
Modules | |
| Callback functions from Kodi to add-on | |
| GUI window callback functions. | |
| Subclass - WindowDialog | |
| GUI window dialog class for Add-Ons. | |
| Subclass - WindowXML | |
| GUI xml window class. | |
Classes | |
| class | XBMCAddon::xbmcgui::Window |
Functions | |
| XBMCAddon::xbmcgui::Window::show () | |
| |
| XBMCAddon::xbmcgui::Window::setFocus (...) | |
| |
| XBMCAddon::xbmcgui::Window::setFocusId (...) | |
| |
| XBMCAddon::xbmcgui::Window::getFocus () | |
| |
| XBMCAddon::xbmcgui::Window::getFocusId () | |
| |
| XBMCAddon::xbmcgui::Window::removeControl (...) | |
| |
| XBMCAddon::xbmcgui::Window::removeControls (...) | |
| |
| XBMCAddon::xbmcgui::Window::getHeight () | |
| |
| XBMCAddon::xbmcgui::Window::getWidth () | |
| |
| XBMCAddon::xbmcgui::Window::getResolution () | |
| |
| XBMCAddon::xbmcgui::Window::setCoordinateResolution (...) | |
| |
| XBMCAddon::xbmcgui::Window::setProperty (...) | |
| |
| XBMCAddon::xbmcgui::Window::getProperty (...) | |
| |
| XBMCAddon::xbmcgui::Window::clearProperty (...) | |
| |
| XBMCAddon::xbmcgui::Window::clearProperties () | |
| |
| XBMCAddon::xbmcgui::Window::close () | |
| |
| XBMCAddon::xbmcgui::Window::doModal () | |
| |
| XBMCAddon::xbmcgui::Window::addControl (...) | |
| |
| XBMCAddon::xbmcgui::Window::addControls (...) | |
| |
| XBMCAddon::xbmcgui::Window::getControl (...) | |
| |
GUI window class for Add-Ons.
This class allows over their functions to create and edit windows that can be accessed from an Add-On.
Likewise, all functions from here as well in the other window classes WindowDialog, WindowXML and WindowXMLDialog with inserted and available.
Class: xbmcgui.Window([existingWindowId]): Creates a new from Add-On usable window class. This is to create window for related controls by system calls.
| existingWindowId | [opt] Specify an id to use an existing window. |
| ValueError | if supplied window Id does not exist. |
| Exception | if more then 200 windows are created. |
Deleting this window will activate the old window that was active and resets (not delete) all controls that are associated with this window.
Example:
| void XBMCAddon::xbmcgui::Window::addControl | ( | ... | ) |
Function: addControl(Control) Add a Control to this window.
| TypeError | If supplied argument is not a Control type |
| ReferenceError | If control is already used in another window |
| RuntimeError | Should not happen :-) |
The next controls can be added to a window atm
| Control-class | Description |
|---|---|
| ControlLabel | Label control to show text |
| ControlFadeLabel | The fadelabel has multiple labels which it cycles through |
| ControlTextBox | To show bigger text field |
| ControlButton | Brings a button to do some actions |
| ControlEdit | The edit control allows a user to input text in Kodi |
| ControlFadeLabel | The fade label control is used for displaying multiple pieces of text in the same space in Kodi |
| ControlList | Add a list for something like files |
| ControlGroup | Is for a group which brings the others together |
| ControlImage | Controls a image on skin |
| ControlRadioButton | For a radio button which handle boolean values |
| ControlProgress | Progress bar for a performed work or something else |
| ControlSlider | The slider control is used for things where a sliding bar best represents the operation at hand |
| ControlSpin | The spin control is used for when a list of options can be chosen |
| ControlTextBox | The text box is used for showing a large multipage piece of text in Kodi |
| void XBMCAddon::xbmcgui::Window::addControls | ( | ... | ) |
| void XBMCAddon::xbmcgui::Window::clearProperties | ( | ) |
Function: clearProperties() Clears all window properties.
Example:
| void XBMCAddon::xbmcgui::Window::clearProperty | ( | ... | ) |
Function: clearProperty(key) Clears the specific window property.
| key | string - property name. |
Example:
Function: close() Closes this window.
Closes this window by activating the old window.
| void XBMCAddon::xbmcgui::Window::doModal | ( | ) |
| Control * XBMCAddon::xbmcgui::Window::getControl | ( | ... | ) |
Function: getControl(controlId) Gets the control from this window.
| controlId | Control id to get |
| Exception | If Control doesn't exist |
| Control * XBMCAddon::xbmcgui::Window::getFocus | ( | ) |
Function: getFocus(Control) Returns the control which is focused.
| SystemError | On Internal error |
| RuntimeError | If no control has focus |
| long XBMCAddon::xbmcgui::Window::getFocusId | ( | ) |
Function: getFocusId(int) Returns the id of the control which is focused.
| SystemError | On Internal error |
| RuntimeError | If no control has focus |
| long XBMCAddon::xbmcgui::Window::getHeight | ( | ) |
Function: getHeight() Returns the height of this Window instance.
| String XBMCAddon::xbmcgui::Window::getProperty | ( | ... | ) |
Function: getProperty(key) Returns a window property as a string, similar to an infolabel.
| key | string - property name. |
Example:
| long XBMCAddon::xbmcgui::Window::getResolution | ( | ) |
Function: getResolution() Returns The resolution of the screen
| value | Resolution |
|---|---|
| 0 | 1080i (1920x1080) |
| 1 | 720p (1280x720) |
| 2 | 480p 4:3 (720x480) |
| 3 | 480p 16:9 (720x480) |
| 4 | NTSC 4:3 (720x480) |
| 5 | NTSC 16:9 (720x480) |
| 6 | PAL 4:3 (720x576) |
| 7 | PAL 16:9 (720x576) |
| 8 | PAL60 4:3 (720x480) |
| 9 | PAL60 16:9 (720x480) |
| long XBMCAddon::xbmcgui::Window::getWidth | ( | ) |
Function: getWidth() Returns the width of this Window instance.
| void XBMCAddon::xbmcgui::Window::removeControl | ( | ... | ) |
| void XBMCAddon::xbmcgui::Window::removeControls | ( | ... | ) |
Function: removeControls(List) Removes a list of controls from this window.
| TypeError | If supplied argument is not a Control type |
| RuntimeError | If control is not added to this window |
This will not delete the controls. They are only removed from the window.
| void XBMCAddon::xbmcgui::Window::setCoordinateResolution | ( | ... | ) |
Function: setCoordinateResolution(int resolution) Sets the resolution
That the coordinates of all controls are defined in. Allows Kodi to scale control positions and width/heights to whatever resolution Kodi is currently using.
| res | Coordinate resolution to set Resolution is one of the following:
|
Example:
| void XBMCAddon::xbmcgui::Window::setFocus | ( | ... | ) |
| void XBMCAddon::xbmcgui::Window::setFocusId | ( | ... | ) |
Function: setFocusId(ControlId) Gives the control with the supplied focus.
| ControlId | [integer] On skin defined id of control |
| SystemError | On Internal error |
| RuntimeError | If control is not added to a window |
| void XBMCAddon::xbmcgui::Window::setProperty | ( | ... | ) |
Function: setProperty(key, value) Sets a window property, similar to an infolabel.
| key | string - property name. |
| value | string or unicode - value of property. |
Example:
| void XBMCAddon::xbmcgui::Window::show | ( | ) |