|
1 // Copyright (c) 2004-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 /** @file |
|
17 @internalTechnology */ |
|
18 inline |
|
19 CDelayTimer::CDelayTimer(CMngPlayer& aPlayer):CTimer(EPriorityNormal),iPlayer(aPlayer) |
|
20 { |
|
21 CActiveScheduler::Add(this); |
|
22 } |
|
23 |
|
24 inline |
|
25 TTimeIntervalMicroSeconds32 CMngPlayer::Ticks2TimeInterval(TInt aTicks) const |
|
26 { |
|
27 return TTimeIntervalMicroSeconds32(aTicks * iTickLength); |
|
28 } |
|
29 |
|
30 inline |
|
31 void CMngPlayer::SetInternalDelayOn(TBool aIsOn) |
|
32 { |
|
33 iPerformFrameDelayInternally = aIsOn; |
|
34 } |
|
35 |
|
36 inline |
|
37 TTimeIntervalMicroSeconds32 CMngPlayer::ThisFrameDelay() const |
|
38 { |
|
39 return iNominalDelayBeforeThisFrame; |
|
40 } |
|
41 |
|
42 inline |
|
43 TInt CMngPlayer::NumFrames() const |
|
44 { |
|
45 ASSERT(iMngHeader); |
|
46 return iMngHeader->iNominalFrameCount; |
|
47 } |
|
48 |
|
49 inline |
|
50 CMngRenderer* CMngPlayer::Renderer() const |
|
51 { |
|
52 return iMngRenderer; |
|
53 } |
|
54 |
|
55 inline |
|
56 TSize CMngPlayer::FrameSize() const |
|
57 { |
|
58 ASSERT(iMngHeader); |
|
59 return TSize(iMngHeader->iFrameWidth, iMngHeader->iFrameHeight); |
|
60 } |
|
61 |
|
62 inline |
|
63 void CMngPlayer::SetTerminationFrameNum(TInt aFrameNumber) |
|
64 { |
|
65 iFrameNumberToTerminate = aFrameNumber; |
|
66 } |
|
67 |
|
68 inline |
|
69 void CMngPlayer::SetFramingMode(TMngFramingMode aFramingMode) |
|
70 { |
|
71 if (aFramingMode != EMngFramDoNotChangeMode) |
|
72 { |
|
73 iFramingMode = aFramingMode; |
|
74 } |
|
75 } |
|
76 |
|
77 inline |
|
78 TBool CMngPlayer::IsAlphaNeeded() const |
|
79 { |
|
80 ASSERT(iMngHeader); |
|
81 return iMngHeader->iProfileValidity==0 || (iMngHeader->iInternalTransparencyPresence || |
|
82 (iMngHeader->iBkgAndSemiTransparencyValidity && |
|
83 (iMngHeader->iSemiTransparencyPresence || iMngHeader->iBkgTransparencyPresence) |
|
84 )); |
|
85 } |
|
86 |
|
87 inline |
|
88 void CMngPlayer::SetRequiredDisplayModes(TDisplayMode aDestDisplayMode, TDisplayMode aMaskDisplayMode) |
|
89 { |
|
90 iDestDisplayMode = aDestDisplayMode; |
|
91 iMaskDisplayMode = aMaskDisplayMode; |
|
92 } |
|
93 |
|
94 inline |
|
95 void CMngPlayer::SetDestinationBitmap(CFbsBitmap* aDestination) |
|
96 { |
|
97 iCurrentFrame = aDestination; |
|
98 } |
|
99 |
|
100 inline |
|
101 CFbsBitmap* CMngPlayer::GetDestinationBitmap() |
|
102 { |
|
103 return iCurrentFrame; |
|
104 } |
|
105 |
|
106 inline |
|
107 RMngObjectList::TObjectIterator RMngObjectList::End() const |
|
108 { |
|
109 return Count(); |
|
110 } |
|
111 |
|
112 inline |
|
113 RMngObjectList::TObjectIterator RMngObjectList::Begin() const |
|
114 { |
|
115 return TObjectIterator(0); |
|
116 } |
|
117 |
|
118 inline |
|
119 RLoopStack& CMngPlayer::LoopStack() |
|
120 { |
|
121 return iLoopStack; |
|
122 } |
|
123 |
|
124 inline |
|
125 void RLoopStack::PushL(const TLoopStackItem& aItem) |
|
126 { |
|
127 User::LeaveIfError( Append(aItem) ); |
|
128 } |
|
129 |
|
130 inline |
|
131 TInt RLoopStack::Pop(TLoopStackItem& aItem) |
|
132 { |
|
133 TInt idx=Count()-1; |
|
134 if (idx < 0 ) |
|
135 { |
|
136 return KErrNotFound; |
|
137 } |
|
138 aItem = (*this)[idx]; |
|
139 Remove(idx); |
|
140 return KErrNone; |
|
141 } |
|
142 |
|
143 inline |
|
144 TBool RLoopStack::IsEmpty() const |
|
145 { |
|
146 return (Count() == 0); |
|
147 } |
|
148 |
|
149 inline |
|
150 TProviderEntry::TProviderEntry():iProvider(NULL) |
|
151 { |
|
152 } |
|
153 |
|
154 inline |
|
155 TProviderEntry::TProviderEntry(const TChunkId& aId, MUniqueChunkDataProvider& aProvider):iId(aId), |
|
156 iProvider(&aProvider) |
|
157 { |
|
158 } |