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