uiaccelerator_plat/alf_core_toolkit_api/inc/uiacceltk/huidisplaybackgrounditem.h
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2006-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:   Defines item in display background.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __HUIDISPLAYBACKGROUNDITEM_H__
       
    21 #define __HUIDISPLAYBACKGROUNDITEM_H__
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <AknsUtils.h>
       
    25 
       
    26 /**
       
    27  * This class specifies an item that is drawn in the display background.
       
    28  * Item can specify background as either:
       
    29  *
       
    30  *  "None"  - Nothing is drawn to given display area. Can be used to minimize
       
    31  *            updates to display background areas that e.g. are not visible 
       
    32  *            and thus maximize framerate.
       
    33  *
       
    34  *  "Color" - Given display area is filled with given color. Can be defined as 
       
    35  *            skinnable color or normal RGB color..
       
    36  *            
       
    37  *  "Skin background" - Given display area is filled with given skin background
       
    38  *            graphics.
       
    39  * 
       
    40  */
       
    41 NONSHARABLE_CLASS( THuiDisplayBackgroundItem )
       
    42     {
       
    43 public:   
       
    44    /** 
       
    45     * Constructor. Default constructor. 
       
    46     */
       
    47     IMPORT_C THuiDisplayBackgroundItem();
       
    48 
       
    49    /**
       
    50     * Constructor. Creates backgroun item which area is not cleared. 
       
    51     * @param aRect Item area in display coordinates (pixels).
       
    52     */
       
    53     IMPORT_C THuiDisplayBackgroundItem( const TRect& aRect );
       
    54     
       
    55    /**
       
    56     * Constructor. Creates backgroun item which area is cleared
       
    57     * using the given skin background graphics.
       
    58     * @param aRect Item area in display coordinates (pixels).
       
    59     * @param aSkinID Skin background that is used to clear the item area.
       
    60     *                Possible values are e.g.
       
    61     *                KAknsIIDQsnBgScreen
       
    62     *                KAknsIIDQsnBgScreenIdle
       
    63     *                KAknsIIDQsnBgScreenMp
       
    64     *                KAknsIIDQsnBgAreaMain
       
    65     *                KAknsIIDQsnBgAreaMainAppsGrid 
       
    66     *                KAknsIIDQsnBgAreaMainHigh 
       
    67     *                KAknsIIDQsnBgAreaMainFlat 
       
    68     *                KAknsIIDQsnBgAreaMainSmall
       
    69     *                KAknsIIDWallpaper
       
    70     *                KAknsIIDQsnBgAreaMainIdle 
       
    71     *                KAknsIIDQsnBgAreaStatus 
       
    72     *                KAknsIIDQsnBgAreaStatusIdle 
       
    73     *                KAknsIIDQsnBgAreaStaconRt 
       
    74     *                KAknsIIDQsnBgAreaStaconLt 
       
    75     *                KAknsIIDQsnBgAreaStaconRb 
       
    76     *                KAknsIIDQsnBgAreaStaconLb 
       
    77     *                KAknsIIDQsnBgAreaStaconRtIdle 
       
    78     *                KAknsIIDQsnBgAreaStaconLtIdle 
       
    79     *                KAknsIIDQsnBgAreaStaconRbIdle 
       
    80     *                KAknsIIDQsnBgAreaStaconLbIdle 
       
    81     *                KAknsIIDQsnBgAreaControl 
       
    82     *                KAknsIIDQsnBgAreaControlPopup 
       
    83     *                KAknsIIDQsnBgAreaControlMp 
       
    84     *                KAknsIIDQsnBgAreaControlMp 
       
    85     *                KAknsIIDQsnBgNavipaneSolid 
       
    86     *                KAknsIIDQsnBgNavipaneSolidIdle 
       
    87     *
       
    88     */
       
    89     IMPORT_C THuiDisplayBackgroundItem( const TRect& aRect,
       
    90                                const TAknsItemID& aSkinID );
       
    91 
       
    92    /**
       
    93     * Constructor. Creates backgroun item which area is cleared
       
    94     * using the given skin color. 
       
    95     * @param aRect Item area in display coordinates (pixels).
       
    96     * @param aSkinID Skin color group that is used to clear the item area.
       
    97     *                Possible values are e.g.                       
       
    98     *                KAknsIIDQsnIconColors
       
    99     *                KAknsIIDQsnTextColors
       
   100     *                KAknsIIDQsnLineColors
       
   101     *                KAknsIIDQsnOtherColors
       
   102     *                KAknsIIDQsnHighlightColors
       
   103     *                etc.
       
   104     * @param aColorIndex Skin color index.
       
   105     */
       
   106     IMPORT_C THuiDisplayBackgroundItem( const TRect& aRect,
       
   107                                const TAknsItemID& aSkinID, 
       
   108                                TInt aColorIndex );
       
   109 
       
   110    /**
       
   111     * Constructor. Creates backgroun item which area is cleared
       
   112     * using the given color. 
       
   113     * @param aRect Item area in display coordinates (pixels).
       
   114     * @param aColor Color that is used to clear the item area.
       
   115     */
       
   116     IMPORT_C THuiDisplayBackgroundItem( const TRect& aRect,
       
   117                                const TRgb& aColor );
       
   118     
       
   119    /**
       
   120     * Sets area for the item.
       
   121     * @param aRect Item area in display coordinates (pixels).
       
   122     */
       
   123     IMPORT_C void SetRect( const TRect& aRect );            
       
   124     
       
   125    /**
       
   126     * Sets color that is used clear the item area. This overrides
       
   127     * old color or the skin background if it has been previously given.
       
   128     * @param Item color.
       
   129     */
       
   130     IMPORT_C void SetColor( const TRgb& aColor );
       
   131 
       
   132    /**
       
   133     * Sets skinned color that is used clear the item area. This overrides
       
   134     * old color or skin background if it has been previously given.
       
   135     * @param aSkinID Skin color group that is used to clear the item area.
       
   136     *                Possible values are e.g.                       
       
   137     *                KAknsIIDQsnIconColors
       
   138     *                KAknsIIDQsnTextColors
       
   139     *                KAknsIIDQsnLineColors
       
   140     *                KAknsIIDQsnOtherColors
       
   141     *                KAknsIIDQsnHighlightColors
       
   142     *                etc.
       
   143     * @param aColorIndex Color index.
       
   144     */
       
   145     IMPORT_C void SetColor( const TAknsItemID& aSkinID, TInt aColorIndex );
       
   146     
       
   147    /**
       
   148     * Sets skin backgroud that is used clear the item area. This overrides
       
   149     * old color or skin background if it has been previously given.
       
   150     * 
       
   151     * @param aSkinID Skin background that is used to clear the item area.
       
   152     *                Possible values are e.g.
       
   153     *                KAknsIIDQsnBgScreen
       
   154     *                KAknsIIDQsnBgScreenIdle
       
   155     *                KAknsIIDQsnBgScreenMp
       
   156     *                KAknsIIDQsnBgAreaMain
       
   157     *                KAknsIIDQsnBgAreaMainAppsGrid 
       
   158     *                KAknsIIDQsnBgAreaMainHigh 
       
   159     *                KAknsIIDQsnBgAreaMainFlat 
       
   160     *                KAknsIIDQsnBgAreaMainSmall
       
   161     *                KAknsIIDWallpaper
       
   162     *                KAknsIIDQsnBgAreaMainIdle 
       
   163     *                KAknsIIDQsnBgAreaStatus 
       
   164     *                KAknsIIDQsnBgAreaStatusIdle 
       
   165     *                KAknsIIDQsnBgAreaStaconRt 
       
   166     *                KAknsIIDQsnBgAreaStaconLt 
       
   167     *                KAknsIIDQsnBgAreaStaconRb 
       
   168     *                KAknsIIDQsnBgAreaStaconLb 
       
   169     *                KAknsIIDQsnBgAreaStaconRtIdle 
       
   170     *                KAknsIIDQsnBgAreaStaconLtIdle 
       
   171     *                KAknsIIDQsnBgAreaStaconRbIdle 
       
   172     *                KAknsIIDQsnBgAreaStaconLbIdle 
       
   173     *                KAknsIIDQsnBgAreaControl 
       
   174     *                KAknsIIDQsnBgAreaControlPopup 
       
   175     *                KAknsIIDQsnBgAreaControlMp 
       
   176     *                KAknsIIDQsnBgAreaControlMp 
       
   177     *                KAknsIIDQsnBgNavipaneSolid 
       
   178     *                KAknsIIDQsnBgNavipaneSolidIdle 
       
   179     *
       
   180     */
       
   181     IMPORT_C void SetSkinBackground( const TAknsItemID& aSkinID );
       
   182 
       
   183    /**
       
   184     * Returns the proper display clear mode for drawing the item. 
       
   185     * Possible values are:
       
   186     * 
       
   187     * CHuiDisplay::EClearNone
       
   188     * CHuiDisplay::EClearWithColor
       
   189     * CHuiDisplay::EClearWithSkinBackground
       
   190     *
       
   191     * @return Display clear mode that should be used for drawing the item.
       
   192     */
       
   193     IMPORT_C TInt ClearMode() const;
       
   194     
       
   195    /**
       
   196     * Gets area for the item.
       
   197     * @return Item area in display coordinates (pixels).
       
   198     */
       
   199     IMPORT_C TRect Rect() const;
       
   200     
       
   201    /**
       
   202     * Gets color that is used clear the item area. Color is valid only if item
       
   203     * has been set to "Color" using either skin color group or RBG color.
       
   204     * @return Item color.
       
   205     */
       
   206     IMPORT_C TRgb Color() const;
       
   207     
       
   208    /**
       
   209     * Gets backgroud that is used clear the item area. 
       
   210     * @return Item skin id. Can be either skin background.
       
   211     */
       
   212     IMPORT_C TAknsItemID SkinBackground() const;
       
   213     
       
   214 private:    
       
   215     /** Item draw area, specified in display pixels */
       
   216     TRect iRect;       
       
   217 
       
   218     /** Item skin id. Can be a skin background or skin color */
       
   219     TAknsItemID iSkinID;
       
   220 
       
   221     /** Item skin color index */
       
   222     TInt iColorIndex;
       
   223 
       
   224     /** Item color (used if draw mode is clear with color) */
       
   225     TRgb iColor;    
       
   226     
       
   227     /** Item draw mode */
       
   228     TInt iClearMode;
       
   229     
       
   230     /** Reserved for future use */
       
   231     TInt iSpare1;
       
   232     TInt iSpare2;
       
   233     TInt iSpare3;
       
   234     };
       
   235 
       
   236 #endif