|
1 /* |
|
2 * Copyright (c) 2007 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 interface class for all Multimedia UI Library Cover Flow Widgets. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef I_MULCOVERFLOWWIDGET_H |
|
19 #define I_MULCOVERFLOWWIDGET_H |
|
20 |
|
21 #include <alf/ialfinterfacebase.h> |
|
22 #include <alf/alftypes.h> |
|
23 #include <mul/imulmultiitemwidget.h> |
|
24 #include <gdi.h> |
|
25 #include <AknsItemID.h> |
|
26 |
|
27 //Gesture Helper namespace |
|
28 namespace GestureHelper |
|
29 { |
|
30 class CGestureHelper; |
|
31 } |
|
32 |
|
33 namespace Alf |
|
34 { |
|
35 namespace mulcoverflowwidget |
|
36 { |
|
37 static const IfId Ident= |
|
38 { |
|
39 0, "mulcoverflowwidget" |
|
40 }; |
|
41 } |
|
42 |
|
43 /** |
|
44 * An interface for Multimedia coverflow Widget. |
|
45 * Widgets consist of control and visualization elements. |
|
46 * |
|
47 * Interface paradigm would be used in a restrictive way. |
|
48 * Controls are owned by Alfred environment. |
|
49 * Widgets can be constructed using the widget factory. |
|
50 * Widgets are owned and accessed using the Alfred |
|
51 * environment. |
|
52 * |
|
53 * @lib mulcoverflowwidget.lib |
|
54 */ |
|
55 class IMulCoverFlowWidget : public IMulMultiItemWidget |
|
56 { |
|
57 public: |
|
58 |
|
59 /** |
|
60 * Getter for the type identifier of this interface. |
|
61 * |
|
62 * @return A descriptor to identify the type of this interface. |
|
63 **/ |
|
64 static inline const IfId& Type() |
|
65 { |
|
66 return mulcoverflowwidget::Ident; |
|
67 } |
|
68 |
|
69 /** |
|
70 * Setting color as background of the coverflow. |
|
71 * The API should be used in the case when the background type doesn't |
|
72 * comes along with any extra data. This API should be used when the |
|
73 * background has to set to Black, White or any other color |
|
74 * |
|
75 * @param aColor RGB color |
|
76 * |
|
77 * <B>Examples:</b> |
|
78 * @code |
|
79 * Set background of the coverflow as red color. |
|
80 * |
|
81 * mCoverFlowWidget->SetBackground( KRgbRed ); |
|
82 * @endcode |
|
83 **/ |
|
84 virtual void SetBackground( const TRgb& aColor ) = 0; |
|
85 |
|
86 /** |
|
87 * Setting Skin id as background of the coverflow. |
|
88 * The API should be used in the case when the background of |
|
89 * Coverflow should come from skin data. |
|
90 * |
|
91 * @param aItemID Skin ID. |
|
92 * |
|
93 * <B>Examples:</b> |
|
94 * @code |
|
95 * Set background of the coverflow as a texture. |
|
96 * |
|
97 * mCoverFlowWidget->SetBackground( KAknsIIDQsnBgScreenIdle ); |
|
98 * |
|
99 * @endcode |
|
100 **/ |
|
101 virtual void SetBackground(const TAknsItemID& aItemID ) = 0; |
|
102 |
|
103 /** |
|
104 * Setting UIOnOff mode in template4 of the coverflow. |
|
105 * The API should be in template 4 to hide or show counter as per UI ON/OFF mode. |
|
106 * |
|
107 * @param aUIOn true if UIOn mode and counter to be displayed, else false for UIOff. |
|
108 * @param aTransition transition time to show or hide counter. |
|
109 |
|
110 * <B>Examples:</b> |
|
111 * @code |
|
112 * Set UiOnOff mode in coverflow widget. |
|
113 * |
|
114 * mCoverFlowWidget->SetUIOnOFF( true, 100 ); |
|
115 * |
|
116 * @endcode |
|
117 **/ |
|
118 virtual void SetUIMode(bool aUIOn = false, int aTransition = 0 ) = 0; |
|
119 |
|
120 /** |
|
121 * Rotate the highlight image |
|
122 * The API is supported in template 4(fullscreen templet) to rotate the highlight image as per the |
|
123 * direction specified in the param. |
|
124 * This will rotate the image 90 degree on left or right side. |
|
125 * |
|
126 * @param aDirection, Direction of the rotation (ERotateLeft/ERotateRight). |
|
127 * @param aImageSize, The actual size of the current highlighted image. |
|
128 * @param aTransition transition time to rotate the image. |
|
129 |
|
130 * <B>Examples:</b> |
|
131 * @code |
|
132 * Rotate the highlight image of the coverflow widget. |
|
133 * |
|
134 * mCoverFlowWidget->RotateImage( IMulWidget::ERotateLeft,TSize(500,400),100 ); |
|
135 * |
|
136 * @endcode |
|
137 **/ |
|
138 virtual void RotateImage(TMulRotation aDirection ,TSize aImageSize,int aAnimationTime) = 0; |
|
139 |
|
140 /** |
|
141 * Returns the gesture helper used in coverflow. |
|
142 * This API is required for sharing the gesture helper between the widget and application. |
|
143 * The ownership of the gesture helper lies with the widget. |
|
144 * |
|
145 * @return CGestureHelper Instance of gesture helper created by the widget. |
|
146 |
|
147 * <B>Examples:</b> |
|
148 * @code |
|
149 * Query the gesture helper and use it in application |
|
150 * |
|
151 * CGestureHelper* gestureInstance = mCoverFlowWidget->Gesturehelper(); |
|
152 * gestureInstance->addObserver(*this); |
|
153 * |
|
154 * @endcode |
|
155 **/ |
|
156 virtual GestureHelper::CGestureHelper* Gesturehelper() = 0; |
|
157 |
|
158 |
|
159 /** |
|
160 * Virtual destructor. |
|
161 **/ |
|
162 virtual ~IMulCoverFlowWidget() |
|
163 { |
|
164 } |
|
165 }; |
|
166 |
|
167 } // namespace Alf |
|
168 |
|
169 #endif // I_MULCOVERFLOWWIDGET_H |