|
1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __WSGRAPHICMSGBUF_H__ |
|
17 #define __WSGRAPHICMSGBUF_H__ |
|
18 |
|
19 #include <e32std.h> |
|
20 |
|
21 class TWsGraphicMsgBufParser |
|
22 /** Utility class for parsing incoming data associated with individual draw commands |
|
23 @see CWindowGc::DrawWsGraphic |
|
24 @see RWsGraphicMsgBuf |
|
25 @publishedPartner |
|
26 @released |
|
27 */ { |
|
28 public: |
|
29 IMPORT_C TWsGraphicMsgBufParser(const TDesC8& aData); |
|
30 IMPORT_C TInt Verify() const; |
|
31 IMPORT_C TInt Count() const; |
|
32 IMPORT_C TUid Uid(TInt aIndex) const; |
|
33 IMPORT_C TPtrC8 Data(TInt aIndex) const; |
|
34 IMPORT_C TInt Find(TUid aUid,TInt aStartingFrom = 0) const; |
|
35 IMPORT_C TBool LoadFixed(TUid aUid,TAny* aMsg,TInt aMsgSize,TInt aStartingFrom = 0) const; |
|
36 protected: |
|
37 TInt IntAt(TInt aOfs) const; |
|
38 protected: |
|
39 const TDesC8& iData; |
|
40 }; |
|
41 |
|
42 class TWsGraphicMsgAnimation |
|
43 /** Utility class for parsing incoming TWsGraphicAnimation messages |
|
44 @see CWindowGc::DrawWsGraphic |
|
45 @see RWsGraphicMsgBuf |
|
46 @publishedPartner |
|
47 @released |
|
48 */ { |
|
49 public: |
|
50 IMPORT_C TWsGraphicMsgAnimation(); |
|
51 IMPORT_C TInt Load(const TWsGraphicMsgBufParser& aData); |
|
52 IMPORT_C TInt Load(const TWsGraphicMsgBufParser& aData,TInt aIndex); |
|
53 IMPORT_C TTimeIntervalMicroSeconds AnimationTime(const TTime& aNow,const TTimeIntervalMicroSeconds& aAnimationLength) const; |
|
54 IMPORT_C TBool IsPlaying(const TTime& aNow,const TTimeIntervalMicroSeconds& aAnimationLength) const; |
|
55 private: |
|
56 enum |
|
57 { |
|
58 // animation state in lowest nibble |
|
59 EStopped = 0x00, |
|
60 EPlaying = 0x01, |
|
61 EStopping = 0x02, |
|
62 EPaused = 0x03, |
|
63 EStateMask = 0x0F, |
|
64 // other flags above |
|
65 ELoop = 0x10 |
|
66 }; |
|
67 TUint iFlags; |
|
68 TTime iPlay; |
|
69 TTime iPauseOrStopping; |
|
70 }; |
|
71 |
|
72 #endif //__WSGRAPHICMSGBUF_H__ |