|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include <gdi.h> |
|
17 #include <pixelformats.h> |
|
18 #include "panic.h" |
|
19 |
|
20 void Panic(TStdPluginPanic aPanic) |
|
21 { |
|
22 _LIT(KStdPanicCategory, "WSERV-PLUGIN"); |
|
23 User::Panic(KStdPanicCategory, aPanic); |
|
24 } |
|
25 |
|
26 GLDEF_C TDisplayMode ParseDisplayMode(const TDesC& aModeName) |
|
27 { |
|
28 // Not using _LIT because we only want the string temporarily, not permanently on the heap. |
|
29 if (!aModeName.CompareF(_L("Color16MAP"))) |
|
30 return EColor16MAP; |
|
31 else if (!aModeName.CompareF(_L("Color16MA"))) |
|
32 return EColor16MA; |
|
33 else if (!aModeName.CompareF(_L("Color16MU"))) |
|
34 return EColor16MU; |
|
35 else if (!aModeName.CompareF(_L("Color64K"))) |
|
36 return EColor64K; |
|
37 else if (!aModeName.CompareF(_L("Color4K"))) |
|
38 return EColor4K; |
|
39 else if (!aModeName.CompareF(_L("Color256"))) |
|
40 return EColor256; |
|
41 else if (!aModeName.CompareF(_L("Color16"))) |
|
42 return EColor16; |
|
43 else if (!aModeName.CompareF(_L("Gray256"))) |
|
44 return EGray256; |
|
45 else if (!aModeName.CompareF(_L("Gray16"))) |
|
46 return EGray16; |
|
47 else if (!aModeName.CompareF(_L("Gray4"))) |
|
48 return EGray4; |
|
49 else if (!aModeName.CompareF(_L("Gray2"))) |
|
50 return EGray2; |
|
51 else |
|
52 return ENone; |
|
53 } |