MScreensaverPluginHost Class Reference

API published in: S60 2nd Ed

Capability Information

Required Capabilities

LocalServices Location NetworkServices PowerMgmt ReadDeviceData ReadUserData SwEvent UserEnvironment WriteDeviceData WriteUserData

Exceptions

None


#include <screensaverplugin.h>

Detailed Description

This class defines plugin host interface.

Plugin module uses this interface for communicating with its host application. An instance of this interface is given as a parameter to plugin module when it is created.


Public Member Functions

virtual void  UseStandardIndicators ()=0
  Sets screensaver application to use standard indicator view.
virtual void  OverrideStandardIndicators ()=0
  Notifies plugin host that plugin module is going to take care of drawing indicator view and host shouldn't display them anymore.
virtual TBool  StandardIndicatorsUsed () const =0
  Returns boolean value indicating whether standard indicator drawing is used or not.
virtual void  SetRefreshTimerValue (TInt aValue)=0
  Sets timeout value for refresh timer.
virtual TInt  RefreshTimerValue () const =0
  Returns the current timeout value of refresh timer.
virtual TInt  GetIndicatorPayload (TScreensaverIndicatorIndex aIndex, TIndicatorPayload &aResult) const =0
  Returns payload associated with given screensaver indicator.
virtual TInt  SetActiveDisplayArea (TInt aStartRow, TInt aEndRow, const TScreensaverPartialMode &aMode)=0
  This method is used for activating so called screensaver partial mode.
virtual void  ExitPartialMode ()=0
  Cancels the effect of SetActiveDisplayArea method.
virtual const TScreensaverColorModel GetColorModel () const =0
  Queries screensaver color in current environment (includes partial modes supported by display hardware).
virtual void  Suspend (TInt aTime)=0
  This method suspends plugin module drawing for given time.
virtual void  RequestLights (TInt aSecs)=0
  With this method the plugin may request screen backlight to be turned on or off.
virtual TInt  DisplayInfo (TScreensaverDisplayInfo *aDisplayInfo)=0
  Plugin may use this function to enquire display properties.
virtual TInt  SetActiveDisplayArea (TRect &aRect, const TScreensaverPartialMode &aMode)=0
  This method is used for activating so called screensaver partial mode.
virtual void  UseRefreshTimer (TBool aOn=ETrue)=0
  With this method the plugin may request Draw() timer to be turned on or off.
virtual void  RequestTimeout (TInt aSecs)=0
  With this method the plugin may request a one-shot timeout event (EScreensaverEventTimeout) after the specified amount of seconds has passed.
virtual void  RevertToDefaultSaver ()=0
  With this method the plugin can revert to the default screensaver.

Member Function Documentation

virtual TInt MScreensaverPluginHost::DisplayInfo TScreensaverDisplayInfo aDisplayInfo  )  [pure virtual]
 

Plugin may use this function to enquire display properties.

Should be called e.g. in response to EScreensaverEventDisplayChanged to retrieve the new information.

Parameters:
aDisplayInfo  Struct to receive the display information. NOTE that iSize must be set by the caller.
virtual void MScreensaverPluginHost::ExitPartialMode  )  [pure virtual]
 

Cancels the effect of SetActiveDisplayArea method.

The whole display area is activated.

virtual const TScreensaverColorModel& MScreensaverPluginHost::GetColorModel  )  const [pure virtual]
 

Queries screensaver color in current environment (includes partial modes supported by display hardware).

Parameters:
aResult  A structure for storing the results of the query.
virtual TInt MScreensaverPluginHost::GetIndicatorPayload TScreensaverIndicatorIndex  aIndex,
TIndicatorPayload aResult
const [pure virtual]
 

Returns payload associated with given screensaver indicator.

For list of supported indcicator indices see definition of TScreensaverIndicatorIndex. Also see definition of TIndicatorPayload class.

Parameters:
aIndex  Index of requested indicator.
aResult  Structure where query results will be stored.
Returns:
KErrNone if query was succesful.
virtual void MScreensaverPluginHost::OverrideStandardIndicators  )  [pure virtual]
 

Notifies plugin host that plugin module is going to take care of drawing indicator view and host shouldn't display them anymore.

If not overridden, normal screensaver will display when there are indicators to show. Overriding the indicators does not mean they _have_ to be drawn by the plugin, but that screensaver will not try to do it.

virtual TInt MScreensaverPluginHost::RefreshTimerValue  )  const [pure virtual]
 

Returns the current timeout value of refresh timer.

Returns:
The current timeout value of refresh timer in microseconds.
virtual void MScreensaverPluginHost::RequestLights TInt  aSecs  )  [pure virtual]
 

With this method the plugin may request screen backlight to be turned on or off.

Parameters:
aSecs  Desired time in seconds the screen backlight should be turned on (1 - 30). Less than 1 will turn the lights off, more than 30 will be treated as 30. The plugin host has the final control over the lights, so time may be less than requested, or the lights may be switched off even without request before the time is up.
virtual void MScreensaverPluginHost::RequestTimeout TInt  aSecs  )  [pure virtual]
 

With this method the plugin may request a one-shot timeout event (EScreensaverEventTimeout) after the specified amount of seconds has passed.

If the plugin only wants to be displayed for a certain time, this can be used instead of defining a timer in the plugin. Note that the maximum time is about 35 minutes (TTimeIntervalMicroSeconds32). If the screensaver is stopped before the time has passed, the timer will be canceled and callback not issued. The timer is also cancelled after the timeout has occurred. New timeout requests also cancel any pending timeouts before issuing a new one. A time value of 0 just cancels a pending timeout.

Parameters:
aSecs  Desired time in seconds after which a timeout callback event should be issued.
virtual void MScreensaverPluginHost::RevertToDefaultSaver  )  [pure virtual]
 

With this method the plugin can revert to the default screensaver.

The plugin will be unloaded, and not used any more until the user re-selects the plugin to be the active screensaver. Should be used when the plugin encounters an unrecoverable error, such as a missing file or expired DRM, and will not be able to run any more. NOTE: A plugin should not expect any events after calling this function.

virtual TInt MScreensaverPluginHost::SetActiveDisplayArea TRect &  aRect,
const TScreensaverPartialMode aMode
[pure virtual]
 

This method is used for activating so called screensaver partial mode.

Partial mode area specifies an area on the screen where screensaver plugin module is going to draw during next refresh period. When partial mode is activated the screen segments outside given area are physically turned off to decrease power consumption. Whether partial mode is supported or not depends on actual display hardware. It is also possible that some devices support only limited number of colors in partial mode area. The actual size of the partial mode area may be restricted by the display hardware, and differ from the size requested. Note that both minimum and/or maximum size may be restricted. If partial mode is not supported this method does nothing (that's always the case in WINS environment).

Parameters:
aRect  Specifies the active area on the screen. Parts outside this area will not be visible. Note that x-dimension needs to be set, even if it's not currently used
aMode  Partial mode to be set.
Returns:
KErrNone if partial mode was successfully activated. otherwise system wide error code.
virtual TInt MScreensaverPluginHost::SetActiveDisplayArea TInt  aStartRow,
TInt  aEndRow,
const TScreensaverPartialMode aMode
[pure virtual]
 

This method is used for activating so called screensaver partial mode.

Partial mode area specifies an area on the screen where screensaver plugin module is going to draw during next refresh period. When partial mode is activated the screen segments outside given area are physically turned off to decrease power consumption. Whether partial mode is supported or not depends on actual display hardware. It is also possible that some devices support only limited number of colors in partial mode area. The actual size of the partial mode area may be restricted by the display hardware, and differ from the size requested. Note that both minimum and/or maximum size may be restricted. If partial mode is not supported this method does nothing (that's always the case in WINS environment).

Parameters:
aStartRow  Specifies the topmost pixel row of active display area on the screen.
aEndRow  Specifies the bottom pixel row of active display area.
aMode  Partial mode to be set.
Returns:
KErrNone if partial mode was successfully activated. otherwise system wide error code.
Deprecated:
Should use the rect-version from S60 v3.0 on
virtual void MScreensaverPluginHost::SetRefreshTimerValue TInt  aValue  )  [pure virtual]
 

Sets timeout value for refresh timer.

Plugin module's draw method is called every time when refresh timer expires.

Parameters:
aValue  Timeout value for refresh timer in microseconds.
virtual TBool MScreensaverPluginHost::StandardIndicatorsUsed  )  const [pure virtual]
 

Returns boolean value indicating whether standard indicator drawing is used or not.

Returns:
ETrue if standard indicator drawing is used EFalse if plugin module takes care of drawing indicators
virtual void MScreensaverPluginHost::Suspend TInt  aTime  )  [pure virtual]
 

This method suspends plugin module drawing for given time.

During that time standard screensaver view is drawn.

Parameters:
aTime  Suspension time in microseconds. Values below 500000 are rounded up to 500000. A negative value suspends the plugin indefinitely.
virtual void MScreensaverPluginHost::UseRefreshTimer TBool  aOn = ETrue  )  [pure virtual]
 

With this method the plugin may request Draw() timer to be turned on or off.

When on (the default) the plugins Draw() function is called in intervals specified in SetRefreshTimerValue().

Parameters:
aOn  Specifies whether the refresh timer is used to initiate Draw() calls.
virtual void MScreensaverPluginHost::UseStandardIndicators  )  [pure virtual]
 

Sets screensaver application to use standard indicator view.

This is default mode for indicator drawing.


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top