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