|
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: AknIconHeader Functionality. |
|
15 * Author : Shakti Prakash Chittara |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef AKNICONHEADER_INL |
|
20 #define AKNICONHEADER_INL |
|
21 #include <e32std.h> |
|
22 |
|
23 inline TAknIconHeader::TAknIconHeader(TDes8 &aData) |
|
24 { |
|
25 __ASSERT_ALWAYS(aData.Length() >= KIconHeaderLength, User::Panic(_L("not sufficient size"), KErrBadDescriptor)); |
|
26 iHeader = (THeader *)(aData.LeftTPtr(KIconHeaderLength).Ptr()); |
|
27 } |
|
28 |
|
29 inline void TAknIconHeader::Initialize() |
|
30 { |
|
31 Mem::FillZ(iHeader,KIconHeaderLength); |
|
32 iHeader->headerSize = KIconHeaderLength; |
|
33 } |
|
34 |
|
35 inline TAknIconHeader::~TAknIconHeader() |
|
36 { |
|
37 } |
|
38 |
|
39 inline void TAknIconHeader::SetRotation(TInt aAngle) |
|
40 { |
|
41 iHeader->rotation = aAngle; |
|
42 } |
|
43 |
|
44 inline TInt TAknIconHeader::GetRotation() const |
|
45 { |
|
46 return iHeader->rotation; |
|
47 } |
|
48 |
|
49 inline void TAknIconHeader::SetScaleMode(TInt aMode) |
|
50 { |
|
51 iHeader->aspectRatio = aMode; |
|
52 } |
|
53 |
|
54 inline TInt TAknIconHeader::GetScaleMode() const |
|
55 { |
|
56 return iHeader->aspectRatio; |
|
57 } |
|
58 |
|
59 inline void TAknIconHeader::SetIconColor(TUint32 aColor) |
|
60 { |
|
61 iHeader->iconColor = aColor; |
|
62 } |
|
63 |
|
64 inline TUint32 TAknIconHeader::GetIconColor() const |
|
65 { |
|
66 return iHeader->iconColor; |
|
67 } |
|
68 |
|
69 inline void TAknIconHeader::SetMarginCorrection(TBool isMarginFlag) |
|
70 { |
|
71 iHeader->isMarginCorrection= isMarginFlag; |
|
72 } |
|
73 |
|
74 inline TBool TAknIconHeader::IsMarginCorrection() const |
|
75 { |
|
76 return iHeader->isMarginCorrection; |
|
77 } |
|
78 |
|
79 inline void TAknIconHeader::SetBitmapId(TInt aBitmapId) |
|
80 { |
|
81 iHeader->bitmapid = aBitmapId; |
|
82 } |
|
83 |
|
84 inline TInt TAknIconHeader::GetBitmapId() const |
|
85 { |
|
86 return iHeader->bitmapid; |
|
87 } |
|
88 |
|
89 inline void TAknIconHeader::SetIsMask(TBool isMask) |
|
90 { |
|
91 iHeader->isMask = isMask; |
|
92 } |
|
93 |
|
94 inline TBool TAknIconHeader::IsMask() const |
|
95 { |
|
96 return iHeader->isMask; |
|
97 } |
|
98 #endif |
|
99 // End of File |