Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
How to create screensaver
Steps to be followed to create a screensaver
UID 0x10009D8D 0xEA005C44
Don't forget to change dll-name and UID3.
Capability NetworkServices WriteUserData ReadDeviceData
Capability LocalServices SwEvent UserEnvironment PowerMgmt
Capability Location ReadUserData WriteDeviceData
Extend your class from CScreensaverPluginInterfaceDefinition
As the M Class MScreensaverPlugin is inherited by CScreensaverPluginInterfaceDefinition, implement the following virtual methods:
TInt InitializeL(MScreensaverPluginHost* aHost);
TInt Draw(CWindowGc& aGc);
TInt HandleScreensaverEventL(TScreensaverEvent aEvent, TAny* aData);
InitializeL() : This is used to initialize the plugin module after creation.Here you can personalize your screensaver:
- Set screensaver application to use standard indicator view.
- To override the standard indicator view, notify plugin host that plugin module is going to take care of drawing indicator view
- Set timeout value for refresh timer. Plugin module's draw method is called every time when refresh timer expires
- Activate screensaver partial mode.Partial mode area specifies an area on the screen where screensaver plugin module is going to draw during next refresh period
- Request screen backlight to be turned on or off, etc..
Draw(): When a plugin module is active this method is called every time when refresh timer expires in screensaver application.Here you can draw to the screen. You can change display partial mode in this method too.
HandleScreensaverEventL() : This is the handler function for screensaver events like start, stop, event timed out, etc..