1 gfxtransadapter.h |
1 // Copyright (c) 2006-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef _GFXTRANSADAPTERADAPTER_H_ |
|
17 #define _GFXTRANSADAPTERADAPTER_H_ |
|
18 |
|
19 #include <gfxtranseffect/gfxtransclient.h> |
|
20 |
|
21 //class CTransitionControl; |
|
22 |
|
23 /** |
|
24 This is the abstract interface of a transition adapter. |
|
25 The transition engine vendor implements this interface to serve transitions. |
|
26 The implementation is a static interface dll with two exports, |
|
27 at ordinal 1, MGfxTransAdapter::CreateL() to create an adapter adapter and |
|
28 at ordinal 2, MGfxTransAdapter::Destroy() to destroy it. |
|
29 */ |
|
30 class MGfxTransAdapter |
|
31 { |
|
32 public: //DLL Interface |
|
33 IMPORT_C static MGfxTransAdapter* CreateL(MGfxTransClient* aProvider); |
|
34 IMPORT_C static void Destroy(MGfxTransAdapter* aAdapter); |
|
35 public: //Adapter Interface. |
|
36 enum TClientState |
|
37 { |
|
38 EPreBeginCapture, |
|
39 EPostBeginCapture, |
|
40 EPreEndCapture, |
|
41 EPostEndCapture, |
|
42 EAbort, |
|
43 EGlobalAbort, |
|
44 EBeginGroup, |
|
45 EEndGroup, |
|
46 EFallback, |
|
47 }; |
|
48 /** |
|
49 Handles a specific client state. |
|
50 @param aState a client state to handle |
|
51 @param aKey the registered control, NULL if not valid |
|
52 @param aHandle handle to the transition in progress, 0 if not valid. |
|
53 */ |
|
54 virtual TInt HandleClientState(TClientState aState, const CCoeControl* aKey, TInt aHandle) = 0; |
|
55 |
|
56 /** |
|
57 Handles an update to a transition participant during transition animation. |
|
58 Is called by the client if new draw commands arrive after End, but before MGfxTransClient::TransitionFinished() |
|
59 has been called. |
|
60 @param aHandle handle to the transition. |
|
61 @param aParticipantId the id of the participant that was updated. |
|
62 @param aDrawRect |
|
63 @param aBoundingRect |
|
64 */ |
|
65 virtual void HandleParticpantUpdate(TInt aHandle, const CParticipantData* aParticipant, RWsGraphicMsgBuf* aCommandBuffer, const TRect& aDrawRect, const TRect& aBoundingRect) = 0; |
|
66 |
|
67 /** |
|
68 |
|
69 @return ETrue if the adapter is ready to serve transitions. |
|
70 */ |
|
71 virtual TBool IsActive() = 0; |
|
72 |
|
73 /** |
|
74 Returns the current set of transition policies. |
|
75 The engine might choose to return NULL and push all policies through MGfxTransClient::TransitionPolicyUpdate() |
|
76 @param aCount on return, contains the number of policies returned. |
|
77 @return an array of TControlPolicy pointers. caller takes responsibility for cleanup. |
|
78 */ |
|
79 virtual TControlPolicy* GetTransitionPolicies(TInt &aCount) = 0; |
|
80 |
|
81 /** |
|
82 A notify of external state change. |
|
83 Same as the API function, is passed straight from the client. |
|
84 @param aState the user supplied state |
|
85 @param aArg optional arguments or NULL if not used. |
|
86 */ |
|
87 virtual void NotifyExternalState(TInt aState, const TDesC8* aArg) = 0; |
|
88 |
|
89 /** |
|
90 Requests a transition finished event. |
|
91 This MUST result in a later call to MGfxTransClient::TransitionFinished(). |
|
92 It can be called immediatly if adapter does not need to handle this. |
|
93 */ |
|
94 virtual void StartTransition(TInt aHandle) = 0; |
|
95 |
|
96 /** |
|
97 Tells the engine to start a full screen effect. |
|
98 @param aAction Effect identifier |
|
99 @param aEffectArea the part of the framebuffer to be affected |
|
100 */ |
|
101 virtual void BeginFullScreen(TUint aAction, const TRect &aEffectArea) = 0; |
|
102 /** |
|
103 Tells the engine to start a full screen effect. |
|
104 @param aAction Effect identifier |
|
105 @param aEffectArea the part of the framebuffer to be affected |
|
106 @param aType the type of the parameters. |
|
107 @param aParam the parameters. |
|
108 */ |
|
109 virtual void BeginFullScreen(TUint aAction, const TRect &aEffectArea, TUint aType, const TDesC8& aParams) = 0; |
|
110 |
|
111 /** |
|
112 Informs the engine of the endpoint of a fullscreen effect. |
|
113 */ |
|
114 virtual void EndFullScreen() = 0; |
|
115 |
|
116 /** |
|
117 Tells the engine to abort a fullscreen effect. |
|
118 */ |
|
119 virtual void AbortFullScreen() = 0; |
|
120 }; |
|
121 |
|
122 |
|
123 #endif |