Namespaces

Variants
Actions

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 over the next few weeks. Thanks for all your past and future contributions.

How to create screensaver

From Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: kiranmudiyam (25 Jul 2007)
Last edited: hamishwillee (26 Jul 2012)

Contents

Steps to be followed to create a screensaver

Headers needed:

#include <screensaverpluginintdef.h>
#include <ImplementationProxy.h>

Libraries required:

LIBRARY euser.lib 
LIBRARY efsrv.lib
LIBRARY cone.lib
LIBRARY ECom.lib

In mmp-file:

TARGET YourScreenSaverName.dll
TARGETTYPE PLUGIN
UID 0x10009D8D 0xEA005C44

Don't forget to change dll-name and UID3.

Required capabilities:

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..

Code Examples

Internal Links

Simple Screen Saver (EN)

External Links

This page was last modified on 26 July 2012, at 03:08.
85 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×