skins/AknSkins/inc/AknsScalabilityUtils.h
changeset 0 05e9090e2422
child 1 ba33815114d6
equal deleted inserted replaced
-1:000000000000 0:05e9090e2422
       
     1 /*
       
     2 * Copyright (c) 2004-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:  Internal utility class to handle scalability-related
       
    15                  operations.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef AKNSSCALABILITYUTILS_H
       
    21 #define AKNSSCALABILITYUTILS_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <AknsItemData.h>
       
    25 #include "AknsAppSkinInstance.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MAknsSkinInstance;
       
    29 class CBitmapContext;
       
    30 class CAknsItemDef;
       
    31 class CAknsRlMasterLayout;
       
    32 class TAknsBackground;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 * Internal utility class for scalability-related operations.
       
    38 *
       
    39 * @since 2.8
       
    40 *
       
    41 * @internal
       
    42 */
       
    43 NONSHARABLE_CLASS(AknsScalabilityUtils)
       
    44     {
       
    45 
       
    46     public: // New methods
       
    47 
       
    48         /**
       
    49         * Performs scalability-aware drawing of a bitmap.
       
    50         * @internal
       
    51         * @since 2.8
       
    52         */
       
    53         static TBool DrawPartialCachedImage(
       
    54             MAknsSkinInstance* aSkin, CBitmapContext& aGc,
       
    55             const TRect& aTrgLayoutRect, const TRect& aTrgDrawRect,
       
    56             CAknsImageItemData* aImgData, const TAknsItemID& aIID,
       
    57             const TAknsImageAttributeData* aAttr,
       
    58             const TInt aDrawParam );
       
    59 
       
    60         /**
       
    61         * Processes (and re-ceates if necessary) an item def.
       
    62         *
       
    63         * @internal
       
    64         *
       
    65         * @since 2.8
       
    66         */
       
    67         static CAknsItemDef* ProcessDefL( CAknsItemDef* aDef );
       
    68 
       
    69         /**
       
    70         * Converts the given effect queue item to a rendered bitmap
       
    71         * item, if possible.
       
    72         *
       
    73         * @internal
       
    74         *
       
    75         * @since 2.8
       
    76         *
       
    77         * @return Cached pointer to the bitmap item data, or @c NULL.
       
    78         *   No ownership is transferred.
       
    79         */
       
    80         static CAknsImageItemData* ConvertToBitmap(
       
    81             CAknsAppSkinInstance* aSkin, const TAknsItemID aIID,
       
    82             const TAknsBackground* aLayout );
       
    83 
       
    84         /**
       
    85         * Gets the concrete item ID of a scalable item:
       
    86         *
       
    87         * @since 2.8
       
    88         *
       
    89         * @internal
       
    90         */
       
    91         static TAknsItemID ConcreteEffectQueue( CAknsAppSkinInstance* aSkin,
       
    92             const TAknsItemID& aIID );
       
    93 
       
    94         /**
       
    95         * Gets the backward-compatibility adjusted skin color.
       
    96         *
       
    97         * @since 2.8
       
    98         *
       
    99         * @internal
       
   100         *
       
   101         * @return @c ETrue if color assigned, @c EFalse otherwise.
       
   102         */
       
   103         static TBool GetBackwardCompatibilityColor(
       
   104             MAknsSkinInstance* aInstance, TRgb& aRgb,
       
   105             const TAknsItemID& aID, const TInt aIndex );
       
   106 
       
   107     protected: // New methods
       
   108 
       
   109        /**
       
   110         * Renders the given item recursively, placing the resulting
       
   111         * bitmaps back to the cached content.
       
   112         *
       
   113         * @internal
       
   114         *
       
   115         * @since 2.8
       
   116         *
       
   117         * @return Rendered bitmap, no ownership transferred.
       
   118         */
       
   119         static CAknsImageItemData* RecursiveCacheRenderL(
       
   120             CAknsAppSkinInstance* aSkin,
       
   121             const TAknsItemID aIID, const TInt aLayoutType,
       
   122             CAknsRlMasterLayout& aLayoutMaster,
       
   123             const TSize& aLayoutSize, TRect& aRectOut, TBool& aMorphingOut,
       
   124             TBool& aEmpty );
       
   125 
       
   126     private: // Construction and destruction
       
   127 
       
   128         AknsScalabilityUtils();
       
   129         ~AknsScalabilityUtils();
       
   130 
       
   131     };
       
   132 
       
   133 #endif // AKNSSCALABILITYUTILS_H
       
   134 
       
   135 // End of File