|
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 #include "Graphics/WSGRAPHICDRAWER.H" |
|
17 #include <Graphics/WSGRAPHICDRAWERINTERFACE.H> |
|
18 |
|
19 // TGraphicDrawerId \\\\\\\\\\\\\\\\\\\\\\\\ |
|
20 |
|
21 EXPORT_C TInt TGraphicDrawerId::Compare(const TGraphicDrawerId& aOther) const |
|
22 /** Compares another ID with this for equality. |
|
23 @param aOther the ID to be compared with this. |
|
24 @return 0 if identical, -1 if this is less than aOther and 1 if this is greater than aOther |
|
25 */ { |
|
26 // id is expected to differ most 99.99% of the time |
|
27 if(iId < aOther.iId) |
|
28 { |
|
29 return -1; |
|
30 } |
|
31 else if(iId > aOther.iId) |
|
32 { |
|
33 return 1; |
|
34 } |
|
35 // else we have to compare the iIsUid flag too; again, expect it to be a match 99.99% of these times |
|
36 else if(iIsUid == aOther.iIsUid) |
|
37 { |
|
38 return 0; |
|
39 } |
|
40 // collisions of id but not iIsUid are going to be really really rare |
|
41 else if(iIsUid) |
|
42 { |
|
43 return 1; |
|
44 } |
|
45 else |
|
46 { |
|
47 return -1; |
|
48 } |
|
49 } |
|
50 |
|
51 EXPORT_C TInt TGraphicDrawerId::Compare(const TGraphicDrawerId& aFirst,const TGraphicDrawerId& aSecond) |
|
52 /** Compares two IDs for equality. |
|
53 @param aFirst the ID to be compared with aSecond |
|
54 @param aSecond the ID to be compared with aFirst |
|
55 @return 0 if identical, -1 if aFirst is less than aSecond and 1 if aFirst is greater than aSecond |
|
56 */ { |
|
57 return aFirst.Compare(aSecond); |
|
58 } |
|
59 |
|
60 // MWsAnimationScheduler \\\\\\\\\\\\\\\\\\\\\\\\ |
|
61 |
|
62 EXPORT_C void MWsAnimationScheduler::Animate(MWsScreen& aScreen) |
|
63 /** Calls the screen's OnAnimation() callback |
|
64 @param aScreen the screen to be called back |
|
65 */ { |
|
66 aScreen.OnAnimation(NULL); |
|
67 } |
|
68 |
|
69 EXPORT_C void MWsAnimationScheduler::Animate(MWsScreen& aScreen, TRequestStatus* aFinished) |
|
70 /** Calls the screen's OnAnimation() callback. |
|
71 @param aScreen The screen to be called back. |
|
72 @param aFinished If not NULL, then this is signalled when the next (down stream) render stage |
|
73 is ready to recieve further updates. Note that it is valid to call Animate() again, before aFinished is signalled, |
|
74 but the render-stage pipeline may not be ready to recieve updates.*/ |
|
75 { |
|
76 aScreen.OnAnimation(aFinished); |
|
77 } |
|
78 |
|
79 EXPORT_C void MWsAnimationScheduler::Redraw(MWsScreen& aScreen) |
|
80 /** Calls the screen's Redraw() method |
|
81 @param aScreen the screen to be redrawn |
|
82 */ { |
|
83 aScreen.Redraw(); |
|
84 } |
|
85 |
|
86 EXPORT_C TBool MWsAnimationScheduler::RedrawInvalid(MWsScreen& aScreen,const TArray<TGraphicDrawerId>& aInvalid) |
|
87 /** Calls the screen's RedrawInvalid() method |
|
88 @param aScreen the screen to be signalled to redraw any affected areas |
|
89 @param the list of graphic IDs that are invalid |
|
90 @return whether the screen drew anything |
|
91 */ { |
|
92 return aScreen.RedrawInvalid(aInvalid); |
|
93 } |
|
94 |
|
95 // MWsObjectProvider \\\\\\\\\\\\\\\\\\\\\\\\ |
|
96 |
|
97 EXPORT_C TAny* MWsObjectProvider::ResolveObjectInterface(TUint /*aTypeId*/) |
|
98 { |
|
99 return NULL; |
|
100 } |
|
101 |
|
102 // MWsGraphicDrawerEnvironment \\\\\\\\\\\\\\\\\\\\\\\\ |
|
103 |