?? cmyscreensaverplugin.h
字號:
#include <e32base.h>
#include <w32std.h>
#include <screensaverplugin.h>
#include <eikenv.h>
#include <coecntrl.h>
// CONSTANTS
_LIT( KMyScreenSaverPluginName, "ScreenSaverExamplePlugin.dll" );
class CMyScreenSaverPlugin : public CCoeControl,
public MScreensaverPlugin
{
public:
/**
* destructor.
*/
~CMyScreenSaverPlugin() {}
//////////////////////////////////////////////////////////////////////////
/// from MScreensaverPlugin
//////////////////////////////////////////////////////////////////////////
/**
* Used to initialize the plugin module after creation.
* Name() function may be called without the plugin being initialized,
* to enable name query from modules that are not plugin hosts.
*
* @param aHost Screen saver plugin host.
* @return KErrNone if everything went ok. Otherwise
* system wide error code.
*/
virtual TInt InitializeL(MScreensaverPluginHost *aHost);
/**
* When a plugin module is active this method is called every time
* when refresh timer expires in screensaver application.
*
* @param aGc Graphics context for plugin module to draw to.
* @return KErrNone if everything went ok. Otherwise
* system wide error code (doesn't have any effect in
* current version).
*/
virtual TInt Draw(CWindowGc& aGc);
/**
* Returns the name of plugin module. Returned name is displayed in
* the list of installed plugin modules in personalization application.
*
* @return Descriptor containing the name of the plugin module.
*/
virtual const TDesC16& Name() const;
/**
* Handler function for screensaver events.
*
* @param aEvent Event to be handled.
* @param aData Currently not used, reserved for future purposes.
*
* @return Should always return KErrNone.
*/
virtual TInt HandleScreensaverEventL(TScreensaverEvent aEvent,
TAny* aData);
/**
* Screensaver plugin capabilities query. The capabilitities
* reveal which functions the plugin implements, that can be
* used by calling PluginFunction)(.
*
* @return Bit mask of plugin capabilities.
*/
virtual TInt Capabilities() { return EScpCapsNone; }
/**
* Screensaver plugin function method. Only the functions
* returned by Capabilities() can be used, and only one
* function at a time.
*
* @paran aFunction
* @param aParam Parameters to the function. TBD function-by-function.
*
* @return System wide error code. KErrNone on success.
*/
virtual TInt PluginFunction(TScPluginCaps /*aFunction*/,
TAny* /*aParam*/)
{
return KErrNone;
}
private:
MScreensaverPluginHost* iHost;
TBool iStatusCallsOrMsgs;
TInt64 iRandSeed;
const CFont* iFontUsed;
// Internal functions
void InitializeGraphics(CWindowGc& aGc, TRect aClearArea);
void RandomizeDrawingPosition(TInt aRandomizedRangeX,
TInt aRandomizedRangeY,
TPoint& aPos);
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -