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: A set of product specific values used by CamUtility* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 #ifndef CAMPSI_H |
|
20 #define CAMPSI_H |
|
21 |
|
22 #include <gdi.h> |
|
23 #include <AknUtils.h> |
|
24 #include <e32keys.h> |
|
25 #include "Cam.hrh" |
|
26 |
|
27 // DATA TYPES |
|
28 |
|
29 // This enum lists all Product Specific Information values that can be |
|
30 // retrieved by the CamUtility::GetPSI methods. |
|
31 enum TCamPsiKey |
|
32 { |
|
33 ECamPsiOrientation, // application orientation landscape, portrait or unspecified |
|
34 // values are defined in CEikAppUi |
|
35 ECamPsiPrimaryCameraOrientation, |
|
36 ECamPsiSecondaryCameraOrientation, |
|
37 ECamPsiEditingOrientation, |
|
38 |
|
39 ECamPsiSoftKeyPosition, |
|
40 |
|
41 ECamPsiSidePanePosition, |
|
42 ECamPsiZoomInKey, |
|
43 ECamPsiZoomOutKey, |
|
44 ECamPsiVideoZoomSupport, |
|
45 ECamPsiOverLaySidePane, |
|
46 ECamPsiImageSizes, |
|
47 ECamPsiViewFinderFreeze, |
|
48 |
|
49 ECamPsiSelfTimerPeriod1, |
|
50 ECamPsiSelfTimerPeriod2, |
|
51 ECamPsiSelfTimerPeriod3, |
|
52 |
|
53 ECamPsiLongCaptureKeyPressInterval, |
|
54 ECamPsiMaxZoomSteps, |
|
55 ECamPsiMaxExtendedZoomSteps, |
|
56 ECamPsiMaxOpticalZoomSteps, |
|
57 ECamPsiSpecificZoomValues, |
|
58 ECamPsiNumSpecificZoomValues, |
|
59 ECamPsiLeftNaviKey, |
|
60 ECamPsiLeftNaviKeyCam2, |
|
61 ECamPsiRightNaviKey, |
|
62 |
|
63 ECamPsiSecondaryZoomInKey, |
|
64 ECamPsiSecondaryZoomOutKey, |
|
65 |
|
66 ECamPsiMaxBurstCapture, |
|
67 ECamPsiZoomBarLAF, |
|
68 ECamPsiSupportedStillResolutions, |
|
69 ECamPsiSupportedVideoResolutions, |
|
70 ECamPsiSupportedStillQualities, |
|
71 ECamPsiSupportedVideoQualities, |
|
72 // Supported scenes depend on user mode. |
|
73 // Each mode has now own key. |
|
74 // ECamPsiSupportedStillScenes, |
|
75 // ECamPsiSupportedVideoScenes, |
|
76 ECamPsiSupportedStillScenesNovice, |
|
77 ECamPsiSupportedStillScenesAdvanced, |
|
78 ECamPsiSupportedVideoScenesNovice, |
|
79 ECamPsiSupportedVideoScenesAdvanced, |
|
80 |
|
81 ECamPsiCaptureDelayTiming, |
|
82 |
|
83 ECamPsiEVCompSliderInfo, |
|
84 ECamPsiEVCompSliderBitmapId, |
|
85 ECamPsiAPEVCompLegend, |
|
86 ECamPsiEVCompSliderRangeResourceId, |
|
87 ECamPsiEVCompSliderRangeResourceAHId, |
|
88 ECamPsiUserSceneResourceIds, |
|
89 |
|
90 ECamPsiVideoViewFinderResolutions, |
|
91 ECamPsiVideoVFResSecondaryCamera, |
|
92 |
|
93 ECamPsiCourtesyUiTimeoutValue, |
|
94 |
|
95 ECamPsiNumberSupportedStillQualities, |
|
96 ECamPsiNumberSupportedVideoQualities, |
|
97 ECamPsiStillMaxQualityResId, |
|
98 |
|
99 ECamPsiStillQualitySliderLegendInfo, |
|
100 ECamPsiVideoQualitySliderLegendInfo, |
|
101 ECamPsiVideoQualityIconIds, |
|
102 ECamPsiVideoQualityFileTypeId, |
|
103 ECamPsiStillQualityIconIds, |
|
104 |
|
105 ECamPsiPrecapStillQualityIconIds, |
|
106 ECamPsiPrecapVideoQualityIconIds, |
|
107 |
|
108 ECamPsiPrecapLocationIconIds, |
|
109 |
|
110 ECamPsiModeKeyScanCode, |
|
111 ECamPsiJpegDataSizes, |
|
112 ECamPsiSequencePostProcessDataSizes, |
|
113 ECamPsiSnapshotSize, |
|
114 |
|
115 |
|
116 ECamPsiVideoUserModeNovDisabledSettings, |
|
117 ECamPsiPhotoUserModeNovDisabledSettings, |
|
118 ECamPsiEmbVideoUserModeNovDisabledSettings, |
|
119 ECamPsiEmbPhotoUserModeNovDisabledSettings, |
|
120 |
|
121 // Has own mapping function now => key not needed. |
|
122 // ECamPsiSharpnessValues, |
|
123 |
|
124 ECamPsiKeyNone |
|
125 }; |
|
126 |
|
127 // Whether the side pane is on the left or right hand side of the screen |
|
128 // in landscape mode. |
|
129 enum TCamHandedness |
|
130 { |
|
131 ECamHandLeft, |
|
132 ECamHandRight |
|
133 }; |
|
134 |
|
135 // Which behaviour is implemented for the left and right arrow keys |
|
136 enum TCamLeftRightNaviKeyBehaviour |
|
137 { |
|
138 ECamNaviKeyNone, |
|
139 ECamNaviKeyIncreaseFlashSetting, |
|
140 ECamNaviKeyDecreaseFlashSetting, |
|
141 ECamNaviKeyHorizontalSelector, |
|
142 ECamNaviKeyCaptureSetup |
|
143 }; |
|
144 |
|
145 // Which keys initiate a capture event |
|
146 enum TCamCaptureKeys |
|
147 { |
|
148 ECamCaptureKeyNaviSelect = EStdKeyDevice3 |
|
149 }; |
|
150 |
|
151 // This enum lists the options available for zooming in relation to video |
|
152 // capture. |
|
153 enum TCamVideoZoom // NOTE: Use as a bitmask |
|
154 { |
|
155 ECamZoomWhenRecord = 0x1 // Can zoom when recording video. |
|
156 }; |
|
157 |
|
158 |
|
159 // --------------------------------------------------------------------------- |
|
160 class TImageSizeArray |
|
161 { |
|
162 public: |
|
163 TInt iNoOfImageQuality; |
|
164 TInt iNoOfImageRes; |
|
165 TInt iArray[3][4]; |
|
166 }; |
|
167 |
|
168 // --------------------------------------------------------------------------- |
|
169 const TInt KNoOfSelfTimerPeriods = 3; |
|
170 |
|
171 class TSelfTimerSetting |
|
172 { |
|
173 public: |
|
174 |
|
175 // Default constructor to init values to KErrNotSupported. |
|
176 TSelfTimerSetting() |
|
177 { |
|
178 for( TInt i = 0; i < KNoOfSelfTimerPeriods; i++ ) |
|
179 { |
|
180 iThreshold [i] = KErrNotSupported; |
|
181 iFlashPeriod[i] = KErrNotSupported; |
|
182 iBeepPeriod [i] = KErrNotSupported; |
|
183 } |
|
184 iAutoFocus = KErrNotSupported; |
|
185 }; |
|
186 |
|
187 TInt iThreshold[KNoOfSelfTimerPeriods]; // |
|
188 TInt iFlashPeriod[KNoOfSelfTimerPeriods]; // |
|
189 TInt iBeepPeriod[KNoOfSelfTimerPeriods]; // |
|
190 TInt iAutoFocus; |
|
191 }; |
|
192 |
|
193 // --------------------------------------------------------------------------- |
|
194 // This class represents the maximum supported zoom step |
|
195 // for photo and video resolutions |
|
196 class TCamMaxZoomSteps |
|
197 { |
|
198 public: |
|
199 |
|
200 // Default constructor to init values to KErrNotSupported. |
|
201 TCamMaxZoomSteps(): |
|
202 iMaxPhotoStepW9MP (KErrNotSupported), |
|
203 iMaxPhotoStepW6MP (KErrNotSupported), |
|
204 iMaxPhotoStep12MP (KErrNotSupported), |
|
205 iMaxPhotoStep8MP (KErrNotSupported), |
|
206 iMaxPhotoStep5MP (KErrNotSupported), |
|
207 iMaxPhotoStep3MP (KErrNotSupported), |
|
208 iMaxPhotoStep2MP (KErrNotSupported), |
|
209 iMaxPhotoStep1_3MP(KErrNotSupported), |
|
210 iMaxPhotoStep1MP (KErrNotSupported), |
|
211 iMaxPhotoStep0_8MP(KErrNotSupported), |
|
212 iMaxPhotoStepSVGA (KErrNotSupported), |
|
213 iMaxPhotoStepVGA (KErrNotSupported), |
|
214 |
|
215 iMaxVideoStepHD (KErrNotSupported), |
|
216 iMaxVideoStepWVGA (KErrNotSupported), |
|
217 iMaxVideoStepNHD (KErrNotSupported), |
|
218 iMaxVideoStepVGA (KErrNotSupported), |
|
219 iMaxVideoStepQVGA (KErrNotSupported), |
|
220 iMaxVideoStepCIF (KErrNotSupported), |
|
221 iMaxVideoStepQCIF (KErrNotSupported), |
|
222 iMaxVideoStepSQCIF(KErrNotSupported), |
|
223 |
|
224 iMax2ndCamPhotoStep (KErrNotSupported), |
|
225 |
|
226 iMax2ndCamVideoStepCIF (KErrNotSupported), |
|
227 iMax2ndCamVideoStepQCIF (KErrNotSupported), |
|
228 iMax2ndCamVideoStepSQCIF(KErrNotSupported) |
|
229 {}; |
|
230 |
|
231 // Primary camera Photo steps |
|
232 TInt iMaxPhotoStepW9MP; |
|
233 TInt iMaxPhotoStepW6MP; |
|
234 TInt iMaxPhotoStep12MP; |
|
235 TInt iMaxPhotoStep8MP; |
|
236 TInt iMaxPhotoStep5MP; |
|
237 TInt iMaxPhotoStep3MP; |
|
238 TInt iMaxPhotoStep2MP; |
|
239 TInt iMaxPhotoStep1_3MP; |
|
240 TInt iMaxPhotoStep1MP; |
|
241 TInt iMaxPhotoStep0_8MP; |
|
242 TInt iMaxPhotoStepSVGA; |
|
243 TInt iMaxPhotoStepVGA; |
|
244 |
|
245 // Primary camera Video steps |
|
246 TInt iMaxVideoStepHD; |
|
247 TInt iMaxVideoStepWVGA; |
|
248 TInt iMaxVideoStepNHD; |
|
249 TInt iMaxVideoStepVGA; |
|
250 TInt iMaxVideoStepQVGA; |
|
251 TInt iMaxVideoStepCIF; |
|
252 TInt iMaxVideoStepQCIF; |
|
253 TInt iMaxVideoStepSQCIF; |
|
254 |
|
255 TInt iMax2ndCamPhotoStep; |
|
256 |
|
257 TInt iMax2ndCamVideoStepCIF; |
|
258 TInt iMax2ndCamVideoStepQCIF; |
|
259 TInt iMax2ndCamVideoStepSQCIF; |
|
260 }; |
|
261 |
|
262 // --------------------------------------------------------------------------- |
|
263 // Contains details of the time interval between zoom steps, and the number |
|
264 // of zoom steps to jump in each interval. |
|
265 // Also has the colour of each segment of the zoom pane. |
|
266 class TCamZoomLAF |
|
267 { |
|
268 public: |
|
269 // Default constructor to init values. |
|
270 TCamZoomLAF() : |
|
271 iZoomSpeedOpt(1), iZoomStepsOpt(1), iZoomColourOpt(), |
|
272 iZoomSpeedDig(1), iZoomStepsDig(1), iZoomColourDig(), |
|
273 iZoomSpeedExt(1), iZoomStepsExt(1), iZoomColourExt(), |
|
274 iSecondCameraZoomSteps(1) |
|
275 {}; |
|
276 |
|
277 |
|
278 TInt iZoomSpeedOpt; // Time per zoom tick in milliseconds |
|
279 TInt iZoomStepsOpt; // No of zoom steps per tick |
|
280 TRgb iZoomColourOpt; // Colour of optical zoom in zoom bar |
|
281 |
|
282 TInt iZoomSpeedDig; // Time per zoom tick in milliseconds |
|
283 TInt iZoomStepsDig; // No of zoom steps per tick |
|
284 TRgb iZoomColourDig; // Colour of optical zoom in zoom bar |
|
285 |
|
286 TInt iZoomSpeedExt; // Time per zoom tick in milliseconds |
|
287 TInt iZoomStepsExt; // No of zoom steps per tick |
|
288 TRgb iZoomColourExt; // Colour of optical zoom in zoom bar |
|
289 |
|
290 TInt iSecondCameraZoomSteps; |
|
291 }; |
|
292 |
|
293 // --------------------------------------------------------------------------- |
|
294 // EV comp slider range |
|
295 class TCamEvCompRange |
|
296 { |
|
297 public: |
|
298 // Default constructor to init values. |
|
299 TCamEvCompRange(): |
|
300 iMinValue(0), iMaxValue(0), iStepsPerUnit(-1) |
|
301 {}; |
|
302 |
|
303 TInt iMinValue; // Minimum EV value displayed on slider |
|
304 TInt iMaxValue; // Maximum EV value displayed on slider |
|
305 TInt iStepsPerUnit; // Number of divisions per singe EV unit |
|
306 }; |
|
307 |
|
308 #endif // CAMPSI_H |
|