|
1 /* |
|
2 * Copyright (c) 2007-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: The effect interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __SHWCONSTANTS_H__ |
|
22 #define __SHWCONSTANTS_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32std.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 |
|
29 // CLASS DECLARATION |
|
30 /** |
|
31 * Namespace for slideshow constants. |
|
32 */ |
|
33 namespace NShwSlideshow |
|
34 { |
|
35 enum TPlayDirection |
|
36 { |
|
37 EPlayForwards = 1, // default |
|
38 EPlayBackwards, |
|
39 EPlayRandom |
|
40 }; |
|
41 |
|
42 // Named constants for navigation directions |
|
43 // to avoid "magic number" warnings |
|
44 const TInt KNavigateForwards = 1; |
|
45 const TInt KNavigateBackwards = -1; |
|
46 |
|
47 // Engine DLL's uid |
|
48 const TUid KEngineDllUid = {0x200071D3}; |
|
49 |
|
50 // First visual fade-in time, also applies when user navigates |
|
51 const TInt KFirstEffectFadeInDuration = 0; |
|
52 // default transition duration, milliseconds |
|
53 const TInt KDefaultTransitionDuration = 2000; |
|
54 |
|
55 // @todo get correct UID for effect types |
|
56 /** |
|
57 The effect Id is a combination of the ecom plugin UID and an array index |
|
58 within the plugin. |
|
59 */ |
|
60 const TUid KDefaultEffectPluginUid = { 0x200071D6 }; |
|
61 |
|
62 // Crossfade effects name - used if no localised strings are available |
|
63 _LIT( KEffectNameCrossFade, "Cross Fade" ); |
|
64 |
|
65 // maximum opacity for TShwCrossFadeLayout |
|
66 const TReal32 KMaxOpacity = 1.0; |
|
67 // minimum opacity for TShwCrossFadeLayout |
|
68 const TReal32 KMinOpacity = 0.0; |
|
69 |
|
70 // effect Index - the index within the ecom plugin |
|
71 const TInt KEffectUidXFadeNormal = 1; |
|
72 const TInt KEffectUidZoomAndPan = 0; |
|
73 |
|
74 // Zoom and Pan effect's name - used if no localised strings are available |
|
75 _LIT( KEffectNameZoomAndPan, "Zoom and Pan" ); |
|
76 // maximum zoom ever is 200%, note that this should |
|
77 // not be larger than MaxThumbnailSize |
|
78 const TReal32 KMaxZoomAndPanFactor = 2.0; |
|
79 // optimal zoom is 100% |
|
80 const TReal32 KOptimalZoomAndPanFactor = 1.0; |
|
81 // this defines the minimum zoom factor, |
|
82 // 1.2 means we zoom images that are originally larger than 120% of the screen |
|
83 const TReal32 KMinZoomAndPanFactor = 1.2; |
|
84 // this constant specifies the length of the curve for panning |
|
85 const TInt KZoomAndPanCurveLength = 100; |
|
86 |
|
87 // set the maximum loaded thumbnail size to be 2 times the screen |
|
88 // note that this should not be smaller than KMaxZoomAndPanFactor |
|
89 // otherwise we zoom beyond 1:1 pixelsize in big pictures |
|
90 const TInt KMaxThumbnailSize = 2; |
|
91 |
|
92 // maximum effect name length |
|
93 const TUint KMaxEffectNameLen = 64; |
|
94 |
|
95 /// Thumbnail loading |
|
96 // priority 2 is the highest we use, we need size |
|
97 // attribute to be loaded first |
|
98 const TInt KSizeContextPriority = 2; |
|
99 // load image sizes 4 items in front and back |
|
100 const TInt KSizeContextOffset = 4; |
|
101 |
|
102 // lowest priority for the high quality context |
|
103 // because we have time to wait as we have |
|
104 // default icon to show |
|
105 const TInt KHighQualityContextPriority = 0; |
|
106 } |
|
107 |
|
108 #endif // __SHWCONSTANTS_H__ |