Kodi Documentation  19.0
Kodi is an open source media player and entertainment hub.
XBMCAddon::xbmcgui::WindowXML Class Reference

#include <WindowXML.h>

Inheritance diagram for XBMCAddon::xbmcgui::WindowXML:
Collaboration diagram for XBMCAddon::xbmcgui::WindowXML:

Public Member Functions

 WindowXML (const String &xmlFilename, const String &scriptPath, const String &defaultSkin="Default", const String &defaultRes="720p", bool isMedia=false)
 
 ~WindowXML () override
 
 addItem (...)
 

Function: addItem(item[, position])


Add a new item to this Window List. More...
 
 addItems (...)
 

Function: addItems(items)


Add a list of items to to the window list. More...
 
 removeItem (...)
 

Function: removeItem(position)


Removes a specified item based on position, from the Window List. More...
 
 getCurrentListPosition ()
 

Function: getCurrentListPosition()


Gets the current position in the Window List. More...
 
 setCurrentListPosition (...)
 

Function: setCurrentListPosition(position)


Set the current position in the Window List. More...
 
 getListItem (...)
 

Function: getListItem(position)


Returns a given ListItem in this Window List. More...
 
 getListSize ()
 

Function: getListSize()


Returns the number of items in this Window List. More...
 
 clearList ()
 

Function: clearList()


Clear the Window List. More...
 
 setContainerProperty (...)
 

Function: setContainerProperty(key, value)


Sets a container property, similar to an infolabel. More...
 
 setContent (...)
 

Function: setContent(value)


Sets the content type of the container. More...
 
 getCurrentContainerId (...)
 

Function: getCurrentContainerId()


Get the id of the currently visible container. More...
 
bool OnMessage (CGUIMessage &message) override
 
bool OnAction (const CAction &action) override
 
SWIGHIDDENVIRTUAL void AllocResources (bool forceLoad=false)
 
SWIGHIDDENVIRTUAL void FreeResources (bool forceUnLoad=false)
 
SWIGHIDDENVIRTUAL bool OnClick (int iItem)
 
SWIGHIDDENVIRTUAL bool OnDoubleClick (int iItem)
 
SWIGHIDDENVIRTUAL void Process (unsigned int currentTime, CDirtyRegionList &dirtyregions)
 
bool IsMediaWindow () const override
 
- Public Member Functions inherited from XBMCAddon::xbmcgui::Window
 Window (int existingWindowId=-1)
 
 ~Window () override
 
SWIGHIDDENVIRTUAL bool OnMessage (CGUIMessage &message)
 
SWIGHIDDENVIRTUAL bool OnAction (const CAction &action)
 
SWIGHIDDENVIRTUAL bool OnBack (int actionId)
 
SWIGHIDDENVIRTUAL void OnDeinitWindow (int nextWindowID)
 
SWIGHIDDENVIRTUAL bool IsDialogRunning () const
 
SWIGHIDDENVIRTUAL bool IsDialog () const
 
SWIGHIDDENVIRTUAL bool IsModalDialog () const
 
SWIGHIDDENVIRTUAL bool IsMediaWindow () const
 
SWIGHIDDENVIRTUAL void dispose ()
 
void interceptorClear ()
 
 onAction (...)
 

Function: onAction(self, Action action)


onAction method. More...
 
void onControl (...)
 

Function: onControl(self, Control)


onControl method. More...
 
 onClick (...)
 

Function: onClick(self, int controlId)


onClick method. More...
 
 onDoubleClick (...)
 

Function: onDoubleClick(self, int controlId)


onDoubleClick method. More...
 
 onFocus (...)
 

Function: onFocus(self, int controlId)


onFocus method. More...
 
 onInit (...)
 

Function: onInit(self)


onInit method. More...
 
 show ()
 

Function: show()


Show this window. More...
 
 setFocus (...)
 

Function: setFocus(Control)


Give the supplied control focus. More...
 
 setFocusId (...)
 

Function: setFocusId(ControlId)


Gives the control with the supplied focus. More...
 
 getFocus ()
 

Function: getFocus(Control)


Returns the control which is focused. More...
 
 getFocusId ()
 

Function: getFocusId(int)


Returns the id of the control which is focused. More...
 
 removeControl (...)
 

Function: removeControl(Control)


Removes the control from this window. More...
 
 removeControls (...)
 

Function: removeControls(List)


Removes a list of controls from this window. More...
 
 getHeight ()
 

Function: getHeight()


Returns the height of this Window instance. More...
 
 getWidth ()
 

Function: getWidth()


Returns the width of this Window instance. More...
 
 setProperty (...)
 

Function: setProperty(key, value)


Sets a window property, similar to an infolabel. More...
 
 getProperty (...)
 

Function: getProperty(key)


Returns a window property as a string, similar to an infolabel. More...
 
 clearProperty (...)
 

Function: clearProperty(key)


Clears the specific window property. More...
 
 clearProperties ()
 

Function: clearProperties()


Clears all window properties. More...
 
 close ()
 

Function: close()


Closes this window. More...
 
 doModal ()
 

Function: doModal()


Display this window until close() is called. More...
 
 addControl (...)
 

Function: addControl(Control)


Add a Control to this window. More...
 
 addControls (...)
 

Function: addControls(List)


Add a list of Controls to this window. More...
 
 getControl (...)
 

Function: getControl(controlId)


Gets the control from this window. More...
 
- Public Member Functions inherited from XBMCAddon::AddonCallback
 ~AddonCallback () override
 
void setHandler (CallbackHandler *_handler)
 
void invokeCallback (Callback *callback)
 
- Public Member Functions inherited from XBMCAddon::AddonClass
 AddonClass ()
 
virtual ~AddonClass ()
 
const char * GetClassname () const
 
LanguageHookGetLanguageHook ()
 
bool isDeallocating ()
 
void Release () const
 
void Acquire () const
 
- Public Member Functions inherited from XbmcThreads::CountingLockable< XbmcThreads::CRecursiveMutex >
 CountingLockable ()=default
 
void lock ()
 
bool try_lock ()
 
void unlock ()
 
unsigned int exit (unsigned int leave=0)
 
void restore (unsigned int restoreCount)
 
XbmcThreads::CRecursiveMutex & get_underlying ()
 

Protected Member Functions

SWIGHIDDENVIRTUAL bool LoadXML (const String &strPath, const String &strPathLower)
 
SWIGHIDDENVIRTUAL void GetContextButtons (int itemNumber, CContextButtons &buttons)
 
SWIGHIDDENVIRTUAL bool Update (const String &strPath)
 
void SetupShares ()
 
- Protected Member Functions inherited from XBMCAddon::xbmcgui::Window
 Window (bool discrim)
 
void deallocating () override
 
void setWindow (InterceptorBase *_window)
 
void popActiveWindowId ()
 
ControlGetControlById (int iControlId, CCriticalSection *gc)
 
SWIGHIDDENVIRTUAL void PulseActionEvent ()
 
SWIGHIDDENVIRTUAL bool WaitForActionEvent (unsigned int milliseconds)
 
- Protected Member Functions inherited from XBMCAddon::AddonCallback
bool hasHandler ()
 
 AddonCallback ()
 

Static Protected Member Functions

static int lockingGetNextAvailableWindowId ()
 
- Static Protected Member Functions inherited from XBMCAddon::xbmcgui::Window
static int getNextAvailableWindowId ()
 
- Static Protected Member Functions inherited from XBMCAddon::AddonClass
static short getNextClassIndex ()
 

Protected Attributes

WindowXMLInterceptorinterceptor
 
String m_scriptPath
 
String m_mediaDir
 
bool m_isMedia
 
- Protected Attributes inherited from XBMCAddon::xbmcgui::Window
InterceptorBasewindow
 
int iWindowId = -1
 
std::vector< AddonClass::Ref< Control > > vecControls
 
int iOldWindowId = 0
 
int iCurrentControlId = 3000
 
bool bModal = false
 
CEvent m_actionEvent
 
bool canPulse = false
 
bool existingWindow = true
 
bool destroyAfterDeInit = false
 
- Protected Attributes inherited from XBMCAddon::AddonCallback
AddonClass::Ref< CallbackHandlerhandler
 
- Protected Attributes inherited from XBMCAddon::AddonClass
LanguageHooklanguageHook
 
- Protected Attributes inherited from XbmcThreads::CountingLockable< XbmcThreads::CRecursiveMutex >
XbmcThreads::CRecursiveMutex mutex
 
unsigned int count
 

Friends

class WindowXMLInterceptor
 

Additional Inherited Members

- Static Public Member Functions inherited from XBMCAddon::AddonClass
static short getNumAddonClasses ()
 

Constructor & Destructor Documentation

◆ WindowXML()

XBMCAddon::xbmcgui::WindowXML::WindowXML ( const String xmlFilename,
const String scriptPath,
const String defaultSkin = "Default",
const String defaultRes = "720p",
bool  isMedia = false 
)

◆ ~WindowXML()

XBMCAddon::xbmcgui::WindowXML::~WindowXML ( )
override

Member Function Documentation

◆ AllocResources()

void XBMCAddon::xbmcgui::WindowXML::AllocResources ( bool  forceLoad = false)

◆ FreeResources()

void XBMCAddon::xbmcgui::WindowXML::FreeResources ( bool  forceUnLoad = false)

◆ GetContextButtons()

void XBMCAddon::xbmcgui::WindowXML::GetContextButtons ( int  itemNumber,
CContextButtons buttons 
)
protected

◆ IsMediaWindow()

bool XBMCAddon::xbmcgui::WindowXML::IsMediaWindow ( ) const
inlineoverride

◆ LoadXML()

bool XBMCAddon::xbmcgui::WindowXML::LoadXML ( const String strPath,
const String strPathLower 
)
protected

◆ lockingGetNextAvailableWindowId()

int XBMCAddon::xbmcgui::WindowXML::lockingGetNextAvailableWindowId ( )
staticprotected

This helper retrieves the next available id. It is doesn't assume that the global lock is already being held.

◆ OnAction()

bool XBMCAddon::xbmcgui::WindowXML::OnAction ( const CAction action)
override

◆ OnClick()

bool XBMCAddon::xbmcgui::WindowXML::OnClick ( int  iItem)

◆ OnDoubleClick()

bool XBMCAddon::xbmcgui::WindowXML::OnDoubleClick ( int  iItem)

◆ OnMessage()

bool XBMCAddon::xbmcgui::WindowXML::OnMessage ( CGUIMessage message)
override
Todo:
We shouldn't be dropping down to CGUIWindow in any of this ideally. We have to make up our minds about what python should be doing and what this side of things should be doing

◆ Process()

void XBMCAddon::xbmcgui::WindowXML::Process ( unsigned int  currentTime,
CDirtyRegionList dirtyregions 
)

◆ SetupShares()

void XBMCAddon::xbmcgui::WindowXML::SetupShares ( )
protected

◆ Update()

bool XBMCAddon::xbmcgui::WindowXML::Update ( const String strPath)
protected

Friends And Related Function Documentation

◆ WindowXMLInterceptor

friend class WindowXMLInterceptor
friend

Member Data Documentation

◆ interceptor

WindowXMLInterceptor* XBMCAddon::xbmcgui::WindowXML::interceptor
protected

◆ m_isMedia

bool XBMCAddon::xbmcgui::WindowXML::m_isMedia
protected

◆ m_mediaDir

String XBMCAddon::xbmcgui::WindowXML::m_mediaDir
protected

◆ m_scriptPath

String XBMCAddon::xbmcgui::WindowXML::m_scriptPath
protected

The documentation for this class was generated from the following files: