diff -r ea65f74e6de4 -r 8e5f6eea9c9f tvout/tvoutengine/inc/glxhdmicontroller.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tvout/tvoutengine/inc/glxhdmicontroller.h Tue Aug 31 15:14:51 2010 +0300 @@ -0,0 +1,167 @@ +/** +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Creates the HDMI engine and provides functionality +* for all its usage and needs through simple API's +* +*/ + + +#ifndef GLXHDMICONTROLLER_H_ +#define GLXHDMICONTROLLER_H_ + +// Internal includes +class CGlxHdmiContainer; +class CGlxHdmiSurfaceUpdater; + +/** + * Class Description + * This is the entry point of the HDMI engine. + * It Promisses to provide all HDMI functionality with simple API calls. + * + * To Show an image on TV, create an instance of this object and call + * CGlxHdmiController::SetImageL() with appropriate parameters. + * + * To Shift from native to clone and vice versa, use ShiftToPostingMode() and + * ShiftToCloningMode() respectively + * + * For Not supported items, make sure to call ItemNotSupported() API + */ + +class CGlxHdmiController : public CBase + { +public: + /** + * NewLC + * @param aRect rect in which the CCoecontrol actually needs to be constructed + * @param EffectsOn - if the effect should be on, by default it is OFF, + * used only for SLIDESHOW + * + * @return CGlxHdmiController object. + */ + IMPORT_C static CGlxHdmiController* NewL(TRect aRect ,TBool aEfectsOn = EFalse); + + /** + * Destructor + */ + IMPORT_C ~CGlxHdmiController(); + + /** + * Update Image + * @param aImageFile file path + * @param aFsBitmap Fullscreen bitmap, make sure to send a grid bitmap if FS bitmap not present + * @param aStore An internal parameter to store the image path or not, clients neednot use this. + */ + IMPORT_C void SetImageL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap = NULL, + TBool aStore = ETrue); + + /** + * To intimate that the item is not supported. + */ + IMPORT_C void ItemNotSupported(); + + /** + * Activating zoom in posting mode + * @param aAutoZoomOut if it should auto zoom out + */ + IMPORT_C void ActivateZoom(TBool aAutoZoomOut); + + /** + * Deactivating zoom in posting mode + */ + IMPORT_C void DeactivateZoom(); + + /** + * ShiftToCloningMode + * Shifts the TV UI to cloning mode if it is posting + * else does nothing + */ + IMPORT_C void ShiftToCloningMode(); + + /** + * ShiftToPostingMode + * Shifts the TV UI to posting mode if cloning mode, + * else does nothing + */ + IMPORT_C void ShiftToPostingMode(); + + /** + * Fadeing of the Surface + * @param aFadeInOut ETrue - FadeIn ( as in gaining brightness ) + * EFalse - FadeOut ( as in loosing brightness ) + */ + IMPORT_C void FadeSurface(TBool aFadeInOut); + +private:/// class private method + /** + * Constructor + * @param aRect Rect size + * @param aEfectsOn if effects needs to be on(used in Slideshow only) + */ + CGlxHdmiController(TRect aRect ,TBool aEfectsOn); + + /** + * ConstructL + */ + void ConstructL(); + + /** + * Create the Hdmi Container + */ + void CreateHdmiContainerL(); + + /** + * Create surface updater and update background surface + * @param aImageFile Image file + */ + void CreateSurfaceUpdaterL(const TDesC& aImageFile); + + /** + * To Destroy the surface updater if present + */ + void DestroySurfaceUpdater(); + + /** + * Detroy the container + */ + void DestroyContainer(); + + /** + * Stores the Image File name + * @param aImageFile Image file path + * @param aFsBitmap Fullscreen Bitmap + */ + void StoreImageInfoL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap); + +private: + /// Fullscreen Bitmap + CFbsBitmap* iFsBitmap; + /** + * Stored image path + */ + HBufC* iStoredImagePath; + /** + * Hdmi container + */ + CGlxHdmiContainer* iHdmiContainer; + /// Surface updater instance + CGlxHdmiSurfaceUpdater* iSurfaceUpdater; + /// Rect + TRect iRect; + /// Flag to see if Image is supported + TBool iIsImageSupported; + /// Flag to set if effects should be on + TBool iEffectsOn; + }; + +#endif /* GLXHDMICONTROLLER_H_ */