|
Kodi Documentation
18.0
Kodi is an open source media player and entertainment hub.
|
GUI xml window class. More...
Modules | |
| Subclass - WindowDialogXML | |
| GUI xml window dialog | |
Classes | |
| class | XBMCAddon::xbmcgui::WindowXML |
Functions | |
| XBMCAddon::xbmcgui::WindowXML::addItem (...) | |
| |
| XBMCAddon::xbmcgui::WindowXML::addItems (...) | |
| |
| XBMCAddon::xbmcgui::WindowXML::removeItem (...) | |
| |
| XBMCAddon::xbmcgui::WindowXML::getCurrentListPosition () | |
| |
| XBMCAddon::xbmcgui::WindowXML::setCurrentListPosition (...) | |
| |
| XBMCAddon::xbmcgui::WindowXML::getListItem (...) | |
| |
| XBMCAddon::xbmcgui::WindowXML::getListSize () | |
| |
| XBMCAddon::xbmcgui::WindowXML::clearList () | |
| |
| XBMCAddon::xbmcgui::WindowXML::setContainerProperty (...) | |
| |
| XBMCAddon::xbmcgui::WindowXML::setContent (...) | |
| |
| XBMCAddon::xbmcgui::WindowXML::getCurrentContainerId (...) | |
| |
GUI xml window class.
Class: xbmcgui.WindowXML(xmlFilename, scriptPath[, defaultSkin, defaultRes]) Creates a new xml file based window class.
Window.| xmlFilename | string - the name of the xml file to look for. |
| scriptPath | string - path to script. used to fallback to if the xml doesn't exist in the current skin. (eg xbmcaddon.Addon().getAddonInfo('path').decode('utf-8')) |
| defaultSkin | [opt] string - name of the folder in the skins path to look in for the xml. (default='Default') |
| defaultRes | [opt] string - default skins resolution. (default='720p') |
| isMedia | [opt] bool - if False, create a regular window. if True, create a mediawindow. (default=False) |
| 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:
On functions defined input variable controlId (GUI control identifier) is the on window.xml defined value behind type added with id="..." and used to identify for changes there and on callbacks.
| void XBMCAddon::xbmcgui::WindowXML::addItem | ( | ... | ) |
Function: addItem(item[, position]) Add a new item to this Window List.
| item | string, unicode or ListItem - item to add. |
| position | [opt] integer - position of item to add. (NO Int = Adds to bottom,0 adds to top, 1 adds to one below from top,-1 adds to one above from bottom etc etc )
|
Example:
| void XBMCAddon::xbmcgui::WindowXML::addItems | ( | ... | ) |
Function: addItems(items) Add a list of items to to the window list.
| items | List - list of strings, unicode objects or ListItems to add. |
Example:
| void XBMCAddon::xbmcgui::WindowXML::clearList | ( | ) |
| int XBMCAddon::xbmcgui::WindowXML::getCurrentContainerId | ( | ... | ) |
Function: getCurrentContainerId() Get the id of the currently visible container.
Example:
| int XBMCAddon::xbmcgui::WindowXML::getCurrentListPosition | ( | ) |
| ListItem * XBMCAddon::xbmcgui::WindowXML::getListItem | ( | ... | ) |
| int XBMCAddon::xbmcgui::WindowXML::getListSize | ( | ) |
| void XBMCAddon::xbmcgui::WindowXML::removeItem | ( | ... | ) |
| void XBMCAddon::xbmcgui::WindowXML::setContainerProperty | ( | ... | ) |
Function: setContainerProperty(key, value) Sets a container property, similar to an infolabel.
| key | string - property name. |
| value | string or unicode - value of property. |
Example:
| void XBMCAddon::xbmcgui::WindowXML::setContent | ( | ... | ) |
Function: setContent(value) Sets the content type of the container.
| value | string or unicode - content value. |
Available content types
| Name | Media |
|---|---|
| actors | Videos |
| addons | Addons, Music, Pictures, Programs, Videos |
| albums | Music, Videos |
| artists | Music, Videos |
| countries | Music, Videos |
| directors | Videos |
| files | Music, Videos |
| games | Games |
| genres | Music, Videos |
| images | Pictures |
| mixed | Music, Videos |
| movies | Videos |
| Musicvideos | Music, Videos |
| playlists | Music, Videos |
| seasons | Videos |
| sets | Videos |
| songs | Music |
| studios | Music, Videos |
| tags | Music, Videos |
| tvshows | Videos |
| videos | Videos |
| years | Music, Videos |
Example: