9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: Handles & propogates UI state change notifications. |
14 * Description: Creates the HDMI engine and provides functionality |
|
15 * for all its usage and needs through simple API's |
15 * |
16 * |
16 */ |
17 */ |
|
18 |
17 |
19 |
18 #ifndef GLXHDMICONTROLLER_H_ |
20 #ifndef GLXHDMICONTROLLER_H_ |
19 #define GLXHDMICONTROLLER_H_ |
21 #define GLXHDMICONTROLLER_H_ |
20 |
22 |
21 // Internal includes |
23 // Internal includes |
22 |
|
23 class CGlxHdmiContainer; |
24 class CGlxHdmiContainer; |
24 class CGlxHdmiSurfaceUpdater; |
25 class CGlxHdmiSurfaceUpdater; |
25 |
26 |
26 /* |
27 /** |
27 * This class will be called from FS and Slideshow for its requirements |
28 * Class Description |
28 */ |
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 |
29 class CGlxHdmiController : public CBase |
41 class CGlxHdmiController : public CBase |
30 { |
42 { |
31 public: |
43 public: |
32 /* |
44 /** |
33 * NewLC |
45 * NewLC |
34 * @param1 - Image file path default to NULL |
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. |
35 */ |
51 */ |
36 IMPORT_C static CGlxHdmiController* NewL(TBool aEfectsOn = EFalse); |
52 IMPORT_C static CGlxHdmiController* NewL(TRect aRect ,TBool aEfectsOn = EFalse); |
37 |
53 |
38 /* |
54 /** |
39 * Destructor |
55 * Destructor |
40 */ |
56 */ |
41 IMPORT_C ~CGlxHdmiController(); |
57 IMPORT_C ~CGlxHdmiController(); |
42 |
58 |
43 /* |
59 /** |
44 * Update Image |
60 * Update Image |
45 * @param1 - Image file path |
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. |
46 */ |
64 */ |
47 IMPORT_C void SetImageL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap = NULL, |
65 IMPORT_C void SetImageL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap = NULL, |
48 TBool aStore = ETrue); |
66 TBool aStore = ETrue); |
49 |
67 |
50 /* |
68 /** |
51 * To intimate that the item is not supported. |
69 * To intimate that the item is not supported. |
52 */ |
70 */ |
53 IMPORT_C void ItemNotSupported(); |
71 IMPORT_C void ItemNotSupported(); |
54 |
72 |
55 /* |
73 /** |
56 * Activating zoom in posting mode |
74 * Activating zoom in posting mode |
|
75 * @param aAutoZoomOut if it should auto zoom out |
57 */ |
76 */ |
58 IMPORT_C void ActivateZoom(TBool aAutoZoomOut); |
77 IMPORT_C void ActivateZoom(TBool aAutoZoomOut); |
59 /* |
78 |
|
79 /** |
60 * Deactivating zoom in posting mode |
80 * Deactivating zoom in posting mode |
61 */ |
81 */ |
62 IMPORT_C void DeactivateZoom(); |
82 IMPORT_C void DeactivateZoom(); |
63 |
83 |
64 /* |
84 /** |
65 * ShiftToCloningMode |
85 * ShiftToCloningMode |
|
86 * Shifts the TV UI to cloning mode if it is posting |
|
87 * else does nothing |
66 */ |
88 */ |
67 IMPORT_C void ShiftToCloningMode(); |
89 IMPORT_C void ShiftToCloningMode(); |
68 |
90 |
69 /* |
91 /** |
70 * ShiftToPostingMode |
92 * ShiftToPostingMode |
|
93 * Shifts the TV UI to posting mode if cloning mode, |
|
94 * else does nothing |
71 */ |
95 */ |
72 IMPORT_C void ShiftToPostingMode(); |
96 IMPORT_C void ShiftToPostingMode(); |
73 |
97 |
74 /* |
98 /** |
75 * Fadeing of the Surface |
99 * Fadeing of the Surface |
76 * @param1 ETrue - FadeIn ( as in gaining brightness ) |
100 * @param aFadeInOut ETrue - FadeIn ( as in gaining brightness ) |
77 * EFalse - FadeOut ( as in loosing brightness ) |
101 * EFalse - FadeOut ( as in loosing brightness ) |
78 */ |
102 */ |
79 IMPORT_C void FadeSurface(TBool aFadeInOut); |
103 IMPORT_C void FadeSurface(TBool aFadeInOut); |
80 |
104 |
81 private: |
105 private:/// class private method |
82 /* |
106 /** |
83 * Constructor |
107 * Constructor |
|
108 * @param aRect Rect size |
|
109 * @param aEfectsOn if effects needs to be on(used in Slideshow only) |
84 */ |
110 */ |
85 CGlxHdmiController(TBool aEfectsOn); |
111 CGlxHdmiController(TRect aRect ,TBool aEfectsOn); |
86 |
112 |
87 /* |
113 /** |
88 * ConstructL |
114 * ConstructL |
89 */ |
115 */ |
90 void ConstructL(); |
116 void ConstructL(); |
91 |
117 |
92 /* |
118 /** |
93 * Create the Hdmi Container |
119 * Create the Hdmi Container |
94 */ |
120 */ |
95 void CreateHdmiContainerL(); |
121 void CreateHdmiContainerL(); |
96 |
122 |
97 /* |
123 /** |
98 * Create surface updater and update background surface |
124 * Create surface updater and update background surface |
99 * @param1 - Image file |
125 * @param aImageFile Image file |
100 */ |
126 */ |
101 void CreateSurfaceUpdaterL(const TDesC& aImageFile); |
127 void CreateSurfaceUpdaterL(const TDesC& aImageFile); |
102 |
128 |
103 /* |
129 /** |
104 * To Destroy the surface updater if present |
130 * To Destroy the surface updater if present |
105 */ |
131 */ |
106 void DestroySurfaceUpdater(); |
132 void DestroySurfaceUpdater(); |
107 |
133 |
108 /* |
134 /** |
109 * Detroy the container |
135 * Detroy the container |
110 */ |
136 */ |
111 void DestroyContainer(); |
137 void DestroyContainer(); |
112 |
138 |
113 /* |
139 /** |
114 * Stores the Image File name |
140 * Stores the Image File name |
115 * @param1 - Image file |
141 * @param aImageFile Image file path |
|
142 * @param aFsBitmap Fullscreen Bitmap |
116 */ |
143 */ |
117 void StoreImageInfoL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap); |
144 void StoreImageInfoL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap); |
118 |
145 |
119 private: |
146 private: |
120 CFbsBitmap* iFsBitmap; |
147 /// Fullscreen Bitmap |
121 HBufC* iStoredImagePath; |
148 CFbsBitmap* iFsBitmap; |
122 |
149 /** |
|
150 * Stored image path |
|
151 */ |
|
152 HBufC* iStoredImagePath; |
|
153 /** |
|
154 * Hdmi container |
|
155 */ |
123 CGlxHdmiContainer* iHdmiContainer; |
156 CGlxHdmiContainer* iHdmiContainer; |
|
157 /// Surface updater instance |
124 CGlxHdmiSurfaceUpdater* iSurfaceUpdater; |
158 CGlxHdmiSurfaceUpdater* iSurfaceUpdater; |
125 TBool iIsImageSupported; // Flag to see if Image is supported |
159 /// Rect |
126 TBool iEffectsOn; |
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; |
127 }; |
165 }; |
128 |
166 |
129 #endif /* GLXHDMICONTROLLER_H_ */ |
167 #endif /* GLXHDMICONTROLLER_H_ */ |