|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __HWATRANSEFFECT__ |
|
20 #define __HWATRANSEFFECT__ |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <cone.h> |
|
24 #include <alf/alfvisual.h> |
|
25 |
|
26 class HwaTransEffect |
|
27 { |
|
28 public: |
|
29 |
|
30 enum EFxGuiLibrary{ |
|
31 EGuiNone, // No connection to wserv |
|
32 EGuiAvkon, // WServ, Cone & Avkon assumed within a thread |
|
33 EGuiQt |
|
34 } |
|
35 |
|
36 enum EApplicationFxEvent |
|
37 { |
|
38 EFxApplicationStarting, |
|
39 EFxApplicationClosing, |
|
40 EFxApplicationActivated, |
|
41 EFxApplicationDeactivated, |
|
42 EFxApplicationEmbeddedStarting, |
|
43 EFxApplicationEmbeddedClosing |
|
44 // Todo: Should we have different events for embed cases where hos loses its focus ? |
|
45 } |
|
46 |
|
47 |
|
48 // should we enforce this somehow to AppFW (e.g. ref to CAknAppUi / CCoeEnv / ..) |
|
49 // or e.g. just enum |
|
50 // Framework will call |
|
51 IMPORT_C static TInt InitStatic(TUid aAppUid, TInt aFxGuiLibrary = EGuiAvkon ); |
|
52 IMPORT_C void Close(); |
|
53 |
|
54 // Geter for thread singleton |
|
55 IMPORT_C HwaTransEffect* Static() |
|
56 |
|
57 // -------------------------------------------------------------------------------------------------------------- |
|
58 // Registering a component (Effect identifier & component identifier could be strings as well , should they even be??) |
|
59 // -------------------------------------------------------------------------------------------------------------- |
|
60 IMPORT_C TInt Register(const CCoeControl& aControl, TInt aEffectIdentifier); |
|
61 IMPORT_C TInt RegisterUnique(const TDesC8& aComponentIdentifier, const CCoeControl& aControl, TInt aEffectIdentifier); |
|
62 IMPORT_C TInt Register(const CAlfVisual& aVisual, TInt aEffectIdentifier); |
|
63 IMPORT_C TInt RegisterUnique(const TDesC8& aComponentIdentifier, const CAlfVisual& aVisual, TInt aEffectIdentifier); |
|
64 |
|
65 // ToDo: Should there be possibility to unregister elements / effects as well ? |
|
66 |
|
67 // -------------------------------------------------------------------------------------------------------------- |
|
68 // Launching an effect |
|
69 // -------------------------------------------------------------------------------------------------------------- |
|
70 IMPORT_C void Start(TInt aEffectIdentifier ); |
|
71 IMPORT_C void End( TInt aEffectIdentifier ); |
|
72 |
|
73 // ToDo: Other way to launch unique effects would be using just passing cntrl / visual reference here |
|
74 // On the other hand, if we assume that registering is the method that is allowed to fail, it shoul |
|
75 IMPORT_C void Start(const TDesC8& aComponentIdentifier, TInt aEffectIdentifier ); |
|
76 IMPORT_C void End( const TDesC8& aComponentIdentifier, TInt aEffectIdentifier ); |
|
77 |
|
78 IMPORT_C void StartApplicationEffect(const TUid& aAppUid, TInt aApplicationFxEvent); |
|
79 IMPORT_C void StartApplicationEffect(TInt aWindowGroupId, TInt aApplicationFxEvent); |
|
80 IMPORT_C void ResetApplicationEffect(TInt aApplicationFxEvent); |
|
81 |
|
82 private: |
|
83 class HwaTransEffectData; |
|
84 HwaTransEffectData* iData |
|
85 }; |
|
86 |
|
87 #endif // #ifndef __HWATRANSEFFECT__ |
|
88 |
|
89 |
|
90 |