epoc32/include/mw/AknIconHeader.h
branchSymbian3
changeset 4 837f303aceeb
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Describes functionalities for Extended Bitmap Icon Header.
       
    15 *  Author : Shakti Prakash Chittara
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef AKNICONHEADER_
       
    22 #define AKNICONHEADER_
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32std.h>
       
    26 
       
    27 struct THeader         // be aware of padding!
       
    28 {
       
    29   TUint16	sign;             
       
    30   TUint8	version;
       
    31   TUint8	headerSize;
       
    32   TUint32	reserved1;
       
    33   TUint16	reserved2;
       
    34   TUint8	reserved3;
       
    35   TUint8  reserved4:4;                /// flags 
       
    36   TUint8  isMarginCorrection:1;           /// flags
       
    37 	TUint8  isMask:1;  // flags
       
    38   TUint8  aspectRatio:2;             /// flags
       
    39   TInt32	rotation;
       
    40   TInt32	iconColor;
       
    41   TInt32	bitmapid;
       
    42 } ;
       
    43 
       
    44 
       
    45 
       
    46 // CONSTANTS
       
    47 static const TInt KIconHeaderLength = sizeof(THeader);
       
    48 class TAknIconHeader
       
    49     {
       
    50     
       
    51 public:
       
    52     inline  TAknIconHeader(TDes8 &aData);
       
    53 
       
    54     inline ~TAknIconHeader();
       
    55     
       
    56     inline void Initialize();
       
    57     
       
    58     inline void SetRotation(TInt aAngle);
       
    59   
       
    60     inline TInt GetRotation() const;
       
    61   
       
    62    inline void SetScaleMode(TInt aMode);
       
    63   
       
    64     inline TInt GetScaleMode() const;
       
    65   
       
    66      inline void SetIconColor(TUint32 aColor);
       
    67   
       
    68     inline TUint32 GetIconColor() const;
       
    69   
       
    70     inline void SetMarginCorrection(TBool isMarginFlag);
       
    71   
       
    72     inline TBool IsMarginCorrection() const;
       
    73   
       
    74      inline void SetBitmapId(TInt aBitmapId);
       
    75   
       
    76     inline TInt GetBitmapId() const;
       
    77 
       
    78   inline void SetIsMask(TBool isMask);
       
    79   
       
    80   inline TBool IsMask() const;
       
    81   
       
    82 private:  
       
    83 
       
    84    THeader *iHeader;
       
    85     };
       
    86 
       
    87 #include "AknIconHeader.inl"
       
    88 #endif /*AKNICONHEADER_*/