xbmcgui.Window() class and real-time listening of callback functions from Kodi
Hi, I have a question about the Window() class from xbmcgui module. Apologies if this is very basic.

Are the Window() class and specifically the Callback functions from Kodi to add-on just for use in windows created by an addon via this class, or can it be set up to listen for certain events within existing Kodi windows, such as videos?

I think not but I'm not 100%. I tested Window.getCurrentWindowId() and that works for any window, but Window.getFocusId() only returned 0, I assume because it can only return a value from windows created using Window(). Thereforce, I'm guessing it wouldn't be possible to use this class and callback functions to listen for an event such as a list being navigated in the videos window? I'm trying to see if I can use my addon to replace the current 'hidden button' I'm using in a list in my video views to trigger some actions. 

I know I can do this via a xbmc.Monitor() poller, but then there will be a slight delay if the user input occurs in the middle of a waitforAbort between polls, whereas using a hidden button causes the actions to occur in real-time. But I'm not sure if there's a way to replicate this in an addon without having it take up too many system resources by setting an incredibly short waitforAbort time?
I hope you get an answer here. I asked the same question previously.


Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.

Logout Mark Read Team Forum Stats Members Help
xbmcgui.Window() class and real-time listening of callback functions from Kodi0
This forum uses Lukasz Tkacz MyBB addons.