equal
deleted
inserted
replaced
1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
12 // |
12 // |
13 // Description: |
13 // Description: |
14 // MBMANIM.CPP |
|
15 // Template for writing Anim DLL's |
14 // Template for writing Anim DLL's |
16 // |
15 // |
17 // |
16 // |
18 |
17 |
19 #include "mincmd.h" |
18 #include "mincmd.h" |
37 { |
36 { |
38 switch (aType) |
37 switch (aType) |
39 { |
38 { |
40 case EMinAnimWindow: |
39 case EMinAnimWindow: |
41 return new(ELeave) CMinWindowAnim(); |
40 return new(ELeave) CMinWindowAnim(); |
|
41 |
42 case EMinAnimHandwriting: |
42 case EMinAnimHandwriting: |
43 return new(ELeave) CMinHandAnim(); |
43 return new(ELeave) CMinHandAnim(); |
44 default:; //To stop a warning |
44 |
|
45 default: |
|
46 User::Leave(KErrArgument); |
45 } |
47 } |
46 } |
48 return NULL; // dummy return to prevent compiler error |
47 |
|
48 |
|
49 /*CMinWindowAnim*/ |
|
50 |
|
51 iAnimator->Animate(); |
|
52 } |
49 } |
53 |
50 |
54 |
51 |
55 /*CAnimateMbm*/ |
52 /*CAnimateMbm*/ |
56 |
53 |
94 } |
91 } |
95 |
92 |
96 void CAnimateMbm::Redraw() |
93 void CAnimateMbm::Redraw() |
97 { |
94 { |
98 iGc->BitBlt(TPoint(),iBitmap); |
95 iGc->BitBlt(TPoint(),iBitmap); |
99 /*if (1>0) |
|
100 { |
|
101 iGc->SetBrushStyle(CGraphicsContext::ESolidBrush); |
|
102 iGc->SetBrushColor(TRgb::Gray16(iIndex)); |
|
103 iGc->DrawRect(TRect(5,5,300,300)); |
|
104 }*/ |
|
105 } |
96 } |
106 |
97 |
107 void CAnimateMbm::Command(TInt aOpcode,TAny *aParams) |
98 void CAnimateMbm::Command(TInt aOpcode,TAny *aParams) |
108 { |
99 { |
109 switch (aOpcode) |
100 switch (aOpcode) |
124 iInterval=(21*iInterval.Int())/20; |
115 iInterval=(21*iInterval.Int())/20; |
125 break; |
116 break; |
126 case EMbmOpSetFileName: |
117 case EMbmOpSetFileName: |
127 iName=*STATIC_CAST(TBuf<32>*,aParams); |
118 iName=*STATIC_CAST(TBuf<32>*,aParams); |
128 iIndex=0; |
119 iIndex=0; |
129 //User::LeaveIfError(LoadBitmap()); |
|
130 break; |
120 break; |
131 default: |
121 default: |
132 iFunctions->Panic(); |
122 iFunctions->Panic(); |
133 } |
123 } |
134 } |
124 } |
137 { |
127 { |
138 } |
128 } |
139 |
129 |
140 TInt CAnimateMbm::CommandReplyL(TInt /*aOpcode*/,TAny* /*aParams*/) |
130 TInt CAnimateMbm::CommandReplyL(TInt /*aOpcode*/,TAny* /*aParams*/) |
141 { |
131 { |
142 /*switch (aOpcode) |
|
143 { |
|
144 default: |
|
145 iFunctions->Panic(); |
|
146 }*/ |
|
147 return KErrNone; |
132 return KErrNone; |
148 } |
133 } |