This topic provides information about fader plug-ins in the non-ScreenPlay variant.
Variant: Non-ScreenPlay. Target audience: Device creators.
In ScreenPlay, fading effects can be created using render stages. See ScreenPlay Render Stages for more information.
This document is intended to demonstrate how to implement a MWsFader interface for use by plug-ins.
All specified plug-ins are loaded by WSERV, or the default plug-ins are loaded if none are specified.
The plug-ins to be loaded are specified in the WSINI.INI file using a line such as the following:
PLUGINS FLICKERBUFFER STD DEFAULTFADER
Each plug-in can then have its own section in the WSINI.INI file in which ID, TYPE, and DATA parameters can be specified. These are as follows:
ID is a UID, used to search for <uid>.dll.
TYPE is a type, used for every dll of that type. This can be used if no UID is specified.
DATA can be used to pass arbitrary data to a plug-in.
A typical section might look like this:
[FLICKERBUFFER] ID 0x10285A2C
Setup in WSINI.INI file
In the WSINI.INI file, the name of the fader to be used is specified on a per screen basis using lines such as the following:
[SCREEN 0]
FADER DEFAULTFADER
If no fader is specified, the default fader will be used.
Process
The following code will need to be used:
CScreen::ConstructL() is called.
WsIniFile()->FindVar(“FADER”) will return the name of fader to be used
CWsPluginManager::FindNamedImplementation<MwsFader>() is called. This is a templated function, where the template determines what is returned.
For each plug-in in the list of plug-ins:
Call CWsPlugin::ObjectInterface(“MWsFader”), requesting the plug-in to supply the MWsFader interface
This results in a call to ResolveObjectInterface(“MWsFader”) on the plug-in. If the plug-in is a fader plug-in, then it is required to “return this ”, otherwise “return NULL ”
If the plug-in returns an MWsFader*, and it has the correct plug-in name, return the MWsFader*
Endfor.
Process
CWsWindowRedraw::PostDrawWindow() is called
If fading enabled: Get the pointer to the fader instance via CPlaybackGc
Call CFader::SetFadingParameters().
Call CFader::FadeArea()
The fader plug-in fades the requested area.
Endif.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.