|
1 /** |
|
2 * Copyright (c) 2008-2009 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: Creates the HDMI engine and provides functionality |
|
15 * for all its usage and needs through simple API's |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef GLXHDMICONTROLLER_H_ |
|
21 #define GLXHDMICONTROLLER_H_ |
|
22 |
|
23 // Internal includes |
|
24 class CGlxHdmiContainer; |
|
25 class CGlxHdmiSurfaceUpdater; |
|
26 |
|
27 /** |
|
28 * Class Description |
|
29 * This is the entry point of the HDMI engine. |
|
30 * It Promisses to provide all HDMI functionality with simple API calls. |
|
31 * |
|
32 * To Show an image on TV, create an instance of this object and call |
|
33 * CGlxHdmiController::SetImageL() with appropriate parameters. |
|
34 * |
|
35 * To Shift from native to clone and vice versa, use ShiftToPostingMode() and |
|
36 * ShiftToCloningMode() respectively |
|
37 * |
|
38 * For Not supported items, make sure to call ItemNotSupported() API |
|
39 */ |
|
40 |
|
41 class CGlxHdmiController : public CBase |
|
42 { |
|
43 public: |
|
44 /** |
|
45 * NewLC |
|
46 * @param aRect rect in which the CCoecontrol actually needs to be constructed |
|
47 * @param EffectsOn - if the effect should be on, by default it is OFF, |
|
48 * used only for SLIDESHOW |
|
49 * |
|
50 * @return CGlxHdmiController object. |
|
51 */ |
|
52 IMPORT_C static CGlxHdmiController* NewL(TRect aRect ,TBool aEfectsOn = EFalse); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 IMPORT_C ~CGlxHdmiController(); |
|
58 |
|
59 /** |
|
60 * Update Image |
|
61 * @param aImageFile file path |
|
62 * @param aFsBitmap Fullscreen bitmap, make sure to send a grid bitmap if FS bitmap not present |
|
63 * @param aStore An internal parameter to store the image path or not, clients neednot use this. |
|
64 */ |
|
65 IMPORT_C void SetImageL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap = NULL, |
|
66 TBool aStore = ETrue); |
|
67 |
|
68 /** |
|
69 * To intimate that the item is not supported. |
|
70 */ |
|
71 IMPORT_C void ItemNotSupported(); |
|
72 |
|
73 /** |
|
74 * Activating zoom in posting mode |
|
75 * @param aAutoZoomOut if it should auto zoom out |
|
76 */ |
|
77 IMPORT_C void ActivateZoom(TBool aAutoZoomOut); |
|
78 |
|
79 /** |
|
80 * Deactivating zoom in posting mode |
|
81 */ |
|
82 IMPORT_C void DeactivateZoom(); |
|
83 |
|
84 /** |
|
85 * ShiftToCloningMode |
|
86 * Shifts the TV UI to cloning mode if it is posting |
|
87 * else does nothing |
|
88 */ |
|
89 IMPORT_C void ShiftToCloningMode(); |
|
90 |
|
91 /** |
|
92 * ShiftToPostingMode |
|
93 * Shifts the TV UI to posting mode if cloning mode, |
|
94 * else does nothing |
|
95 */ |
|
96 IMPORT_C void ShiftToPostingMode(); |
|
97 |
|
98 /** |
|
99 * Fadeing of the Surface |
|
100 * @param aFadeInOut ETrue - FadeIn ( as in gaining brightness ) |
|
101 * EFalse - FadeOut ( as in loosing brightness ) |
|
102 */ |
|
103 IMPORT_C void FadeSurface(TBool aFadeInOut); |
|
104 |
|
105 private:/// class private method |
|
106 /** |
|
107 * Constructor |
|
108 * @param aRect Rect size |
|
109 * @param aEfectsOn if effects needs to be on(used in Slideshow only) |
|
110 */ |
|
111 CGlxHdmiController(TRect aRect ,TBool aEfectsOn); |
|
112 |
|
113 /** |
|
114 * ConstructL |
|
115 */ |
|
116 void ConstructL(); |
|
117 |
|
118 /** |
|
119 * Create the Hdmi Container |
|
120 */ |
|
121 void CreateHdmiContainerL(); |
|
122 |
|
123 /** |
|
124 * Create surface updater and update background surface |
|
125 * @param aImageFile Image file |
|
126 */ |
|
127 void CreateSurfaceUpdaterL(const TDesC& aImageFile); |
|
128 |
|
129 /** |
|
130 * To Destroy the surface updater if present |
|
131 */ |
|
132 void DestroySurfaceUpdater(); |
|
133 |
|
134 /** |
|
135 * Detroy the container |
|
136 */ |
|
137 void DestroyContainer(); |
|
138 |
|
139 /** |
|
140 * Stores the Image File name |
|
141 * @param aImageFile Image file path |
|
142 * @param aFsBitmap Fullscreen Bitmap |
|
143 */ |
|
144 void StoreImageInfoL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap); |
|
145 |
|
146 private: |
|
147 /// Fullscreen Bitmap |
|
148 CFbsBitmap* iFsBitmap; |
|
149 /** |
|
150 * Stored image path |
|
151 */ |
|
152 HBufC* iStoredImagePath; |
|
153 /** |
|
154 * Hdmi container |
|
155 */ |
|
156 CGlxHdmiContainer* iHdmiContainer; |
|
157 /// Surface updater instance |
|
158 CGlxHdmiSurfaceUpdater* iSurfaceUpdater; |
|
159 /// Rect |
|
160 TRect iRect; |
|
161 /// Flag to see if Image is supported |
|
162 TBool iIsImageSupported; |
|
163 /// Flag to set if effects should be on |
|
164 TBool iEffectsOn; |
|
165 }; |
|
166 |
|
167 #endif /* GLXHDMICONTROLLER_H_ */ |