|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: internal for Nokia |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <s32mem.h> |
|
19 #include <akntranseffect.h> |
|
20 #include "alfbridge.h" |
|
21 |
|
22 // Timer to send finish full screen effect |
|
23 // --------------------------------------------------------- |
|
24 // CAlfFinishTimer |
|
25 // --------------------------------------------------------- |
|
26 // |
|
27 NONSHARABLE_CLASS( CAlfRosterFreezeEndTimer ):public CTimer |
|
28 { |
|
29 public: // Constructors and destructor |
|
30 static CAlfRosterFreezeEndTimer* NewL( CAlfBridge& aBridge ); |
|
31 virtual ~CAlfRosterFreezeEndTimer(); |
|
32 |
|
33 public: // New functions |
|
34 void Start( TTimeIntervalMicroSeconds32 aPeriod ); |
|
35 |
|
36 protected: // Functions from base classes |
|
37 void DoCancel(); |
|
38 |
|
39 private: |
|
40 CAlfRosterFreezeEndTimer( CAlfBridge& aBridge ); |
|
41 void ConstructL(); |
|
42 void RunL(); |
|
43 |
|
44 private: // Data |
|
45 CAlfBridge& iBridge; |
|
46 |
|
47 }; |
|
48 |
|
49 |
|
50 |
|
51 // Timer to send finish full screen effect |
|
52 // --------------------------------------------------------- |
|
53 // CAlfFinishTimer |
|
54 // --------------------------------------------------------- |
|
55 // |
|
56 NONSHARABLE_CLASS( CAlfEffectEndTimer ):public CTimer |
|
57 { |
|
58 public: // Constructors and destructor |
|
59 static CAlfEffectEndTimer* NewL( CAlfBridge& aBridge ); |
|
60 virtual ~CAlfEffectEndTimer(); |
|
61 |
|
62 public: // New functions |
|
63 void Start( TTimeIntervalMicroSeconds32 aPeriod, TInt aHandle ); |
|
64 |
|
65 protected: // Functions from base classes |
|
66 void DoCancel(); |
|
67 |
|
68 private: |
|
69 CAlfEffectEndTimer( CAlfBridge& aBridge ); |
|
70 void ConstructL(); |
|
71 void RunL(); |
|
72 |
|
73 private: // Data |
|
74 CAlfBridge& iBridge; |
|
75 TInt iHandle; |
|
76 |
|
77 }; |
|
78 |
|
79 // --------------------------------------------------------- |
|
80 // CAlfLayoutSwitchEffectcoordinator |
|
81 // --------------------------------------------------------- |
|
82 // |
|
83 NONSHARABLE_CLASS( CAlfLayoutSwitchEffectCoordinator ) : public CBase, public MAlfGfxEffectObserver |
|
84 { |
|
85 public: // Constructors and destructor |
|
86 CAlfLayoutSwitchEffectCoordinator( CAlfBridge& aBridge ); |
|
87 virtual ~CAlfLayoutSwitchEffectCoordinator(); |
|
88 |
|
89 public: // MAlfGfxEffectObserver |
|
90 void AlfGfxEffectEndCallBack( TInt aHandle ); |
|
91 |
|
92 public: |
|
93 void BeginLayoutSwitch(); |
|
94 void Cancel(); |
|
95 |
|
96 private: |
|
97 AknTransEffect::TContext NextLayoutSwitchContext(); |
|
98 void SetLayoutSwitchEffect(AknTransEffect::TContext aContext); |
|
99 TBool LayoutSwitchEffectsExist(); |
|
100 |
|
101 private: // Data |
|
102 |
|
103 CAlfBridge& iBridge; |
|
104 AknTransEffect::TContext iLayoutSwitchEffectContext; |
|
105 TThreadPriority iOriginalPriority; |
|
106 CAlfRosterFreezeEndTimer* iRosterFreezeEndTimer; |
|
107 }; |
|
108 |
|
109 // --------------------------------------------------------- |
|
110 // Effects states are used for effects request that arrive before the effected |
|
111 // window has been created. This is very common with fullscreen effects and |
|
112 // occational with control effects. |
|
113 // |
|
114 // NOTE: control effects support currently only one "delayed" effect. This is propably |
|
115 // not sufficient for all sitations. |
|
116 // --------------------------------------------------------- |
|
117 // |
|
118 NONSHARABLE_CLASS(CEffectState) : public CBase |
|
119 { |
|
120 public: |
|
121 |
|
122 CEffectState(); |
|
123 virtual ~CEffectState(); |
|
124 |
|
125 protected: |
|
126 /** |
|
127 * ResolveFileNameL |
|
128 * |
|
129 * Reads filename from stream and composes it to iEffectName variable. |
|
130 */ |
|
131 void ResolveFileNameL(RMemReadStream& aStream); |
|
132 |
|
133 public: |
|
134 |
|
135 TInt iAction; |
|
136 TInt iHandle; |
|
137 |
|
138 HBufC* iEffectName; |
|
139 // Handle using which client should be informed of completion. |
|
140 TInt iCompletionHandle; |
|
141 // State information |
|
142 TInt iOperation; |
|
143 |
|
144 }; |
|
145 |
|
146 NONSHARABLE_CLASS(CControlEffectState ) : public CEffectState |
|
147 { |
|
148 public: |
|
149 |
|
150 TUint32 iClientHandle; |
|
151 TUint32 iClientGroupHandle; |
|
152 |
|
153 void ConstructL(TInt aAction, RMemReadStream& aStream); |
|
154 }; |
|
155 |
|
156 NONSHARABLE_CLASS(CFullScreenEffectState ) : public CEffectState |
|
157 { |
|
158 public: |
|
159 ~CFullScreenEffectState(); |
|
160 |
|
161 void ConstructL(TInt aAction, RMemReadStream& aStream); |
|
162 |
|
163 TBool ResetTimerL(CAlfBridge* aBridge); |
|
164 |
|
165 void NotifyDrawingTimeout(); |
|
166 |
|
167 // Information from BeginFullScreen |
|
168 TInt iType; |
|
169 TInt iWg1; |
|
170 TInt iWg2; |
|
171 TInt iToAppId; |
|
172 TInt iFromAppId; |
|
173 TRect iRect; |
|
174 |
|
175 // ETrue if waiting for window group to appear |
|
176 TBool iWaitingWindowGroup; |
|
177 // ETrue if end fullscreen has been performed |
|
178 TBool iEndFullScreen; |
|
179 // ETrue if setup effect container has been done |
|
180 TBool iSetupDone; |
|
181 |
|
182 // used for resolving the iCleanupStackItem that holds the frozen app layout underneath the starting application |
|
183 TInt iAppStartScreenshotItemHandle; |
|
184 |
|
185 RRegion iPaintedRegion; |
|
186 enum TEffectType |
|
187 { |
|
188 ENotDefinedEffect = 0, |
|
189 EStartEffect, |
|
190 EExitEffect |
|
191 }; |
|
192 |
|
193 TEffectType iEffectType; |
|
194 TSize iDisplaySize; |
|
195 CAlfBridge* iBridge; // for callback. not own. |
|
196 |
|
197 CPeriodic* iDrawingCompleteTimer; |
|
198 }; |