accessoryservices/pluggeddisplay/pluggeddisplayengine/inc/tvstandbyfigure.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2  * Copyright (c) 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:  Plugged Display Engine is responsible for initializing the TV
       
    15  *               driver during the boot and always when the cable is connected.
       
    16  *
       
    17  */
       
    18 
       
    19 
       
    20 #ifndef CTVSTANDBYFIGURE_H
       
    21 #define CTVSTANDBYFIGURE_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // DATA TYPES
       
    32 
       
    33 // FUNCTION PROTOTYPES
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class CFbsBitmap;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41  *  Helper class for handling the stand by figure.
       
    42  *  Loads an bitmap from the .mbm file, writes a string over it and
       
    43  *  converts the result bitmap to 16-bit RGB565 format.
       
    44  *
       
    45  *  @code
       
    46  *   ?good_class_usage_example(s)
       
    47  *  @endcode
       
    48  *
       
    49  *  @lib none.
       
    50  *  @since TB 9.2
       
    51  */
       
    52 class CTvStandbyFigure : public CBase
       
    53     {
       
    54     public:  // Constructors and destructor
       
    55 
       
    56         /**
       
    57         * Two-phased constructor.
       
    58         * The bitmap should be in 16-million color (display mode EColor16M).
       
    59         * @param aFilename The name of the mbm file which contains the bitmap.
       
    60         * @param aImageNumber The number of the image in the mbm file.
       
    61         * @param aText The text to be drawn to the bitmap.
       
    62         */
       
    63         static CTvStandbyFigure* NewLC(
       
    64                                             const TDesC& aFilename,
       
    65                                             TInt aImageNumber );
       
    66 
       
    67         /**
       
    68         * Two-phased constructor.
       
    69         * The bitmap should be in 16-million color (display mode EColor16M).
       
    70         * @param aFilename The name of the mbm file which contains the bitmap.
       
    71         * @param aImageNumber The number of the image in the mbm file.
       
    72         * @param aText The text to be drawn to the bitmap.
       
    73         */
       
    74         static CTvStandbyFigure* NewL(
       
    75                                             const TDesC& aFilename,
       
    76                                             TInt aImageNumber );
       
    77         
       
    78         /**
       
    79         * Destructor.
       
    80         */
       
    81         virtual ~CTvStandbyFigure();
       
    82 
       
    83     public: // New functions
       
    84 
       
    85         /**
       
    86         * Return the bitmap as 16-bit RGB565 coded bitmap.
       
    87         * @since Series60 3.1
       
    88         * @return The 16-bit RGB565 coded bitmap, 
       
    89         * the caller should dispose when no longer needed.
       
    90         */
       
    91         TUint16* RgbConvertL();
       
    92 
       
    93         /**
       
    94         * Returns the size of the bitmap.
       
    95         * @since Series60 3.1
       
    96         * @param aSize The returned size of the bitmap.
       
    97         */
       
    98         void GetFigureSize( TSize& aSize );
       
    99 
       
   100     private:
       
   101         /**
       
   102         * C++ default constructor.
       
   103         */
       
   104         CTvStandbyFigure();
       
   105 
       
   106         /**
       
   107         * 2nd phase constructor, does everything. After the object has been
       
   108         * constructed, the modified bitmap is ready. The bitmap should be in
       
   109         * 16-million color (display mode EColor16M).
       
   110         * @param aFilename The name of the mbm file which contains the bitmap.
       
   111         * @param aImageNumber The number of the image in the mbm file.
       
   112         * @param aText The text to be drawn to the bitmap.
       
   113         */
       
   114         void ConstructL(
       
   115                     const TDesC& aFilename,
       
   116                     TInt aImageNumber );
       
   117 
       
   118     private:    // Data
       
   119         // The bitmap to be manipulated
       
   120         CFbsBitmap* iBitmap;
       
   121     };
       
   122 
       
   123 #endif      // CTVSTANDBYFIGURE_H
       
   124             
       
   125 // End of File