时钟屏保开发手记
09月 18th, 2007
本文参考NewLC的Tutorial,并通过自己创建一个dll工程实现 类需要继承CScreensaverPluginInterfaceDefinition, 并实现MScreensaverPlugin接口的一些虚函数 class CClockScreenSaver : public CScreensaverPluginInterfaceDefinition
virtual TInt InitializeL(MScreensaverPluginHost *aHost);
virtual TInt Draw(CWindowGc& aGc);
virtual const TDesC16& Name() const;
virtual TInt HandleScreensaverEventL(TScreensaverEvent aEvent,
TAny* aData);
需要一个RSS文件,告诉ECom框架所需要的信息
需要一个ImplementationProxy.cpp文件,
Helps the ECom framework locating the interface implementations
MMP中,TARGETTYPE是PLUGIN , UID 是:0×10009D8D 0×06EF7F58
需要很多Capabilities,所以只能用开发者证书来sign。
pkg文件中dll的位置应该放到sysbin下面
“C:Symbian9.2S60_3rd_FP1Epoc32releaseGCCEURELClockScreenSaver.dll”
-“!:sysbinClockScreenSaver.dll
基本上就这些,总体感觉还是比较简单的。
模拟时钟的关键代码都在Draw函数中。
我这里用到了画圆,画线,TTime,TDateTime,字符串转换等。
最后show一下效果:

Popularity: 5% [?]
Entry Filed under: Symbian时钟屏保
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed