xbmc/xbmc — pull request #834 by amet (2012-03-31 18:47:07+00:00)
Title: Callback function for xbmc module

xbmc.Monitor will monitor for ScreenSaver activation/deactivation and Settings changing.

settings changing are quite useful on service addons to allow users to change the settings without deactivating/Activating addon to reload them.

cptspiff has gone over it but looks like the comments have been lost as I have squashed it down.

as ususal, this is a c/p monster from xbmc.Player callback , if anything needs changing I am all ears

Cheers,
amet

``` Python
class MyMonitor( xbmc.Monitor ):
def __init__( self, *args, **kwargs ):
xbmc.Monitor.__init__( self )

def onSettingsChanged( self ):
print "settings changed, fetch new settings"

def onScreensaverDeactivated( self ):
print "screensaver Deactivated"

def onScreensaverActivated( self ):
print "screensaver Activated"

monitor = MyMonitor(__ID__) # ID of the addon

```