1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/windowing/windowserverplugins/openwfc/src/utils.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,53 @@
1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#include <gdi.h>
1.20 +#include <pixelformats.h>
1.21 +#include "panic.h"
1.22 +
1.23 +void Panic(TStdPluginPanic aPanic)
1.24 + {
1.25 + _LIT(KStdPanicCategory, "WSERV-PLUGIN");
1.26 + User::Panic(KStdPanicCategory, aPanic);
1.27 + }
1.28 +
1.29 +GLDEF_C TDisplayMode ParseDisplayMode(const TDesC& aModeName)
1.30 + {
1.31 + // Not using _LIT because we only want the string temporarily, not permanently on the heap.
1.32 + if (!aModeName.CompareF(_L("Color16MAP")))
1.33 + return EColor16MAP;
1.34 + else if (!aModeName.CompareF(_L("Color16MA")))
1.35 + return EColor16MA;
1.36 + else if (!aModeName.CompareF(_L("Color16MU")))
1.37 + return EColor16MU;
1.38 + else if (!aModeName.CompareF(_L("Color64K")))
1.39 + return EColor64K;
1.40 + else if (!aModeName.CompareF(_L("Color4K")))
1.41 + return EColor4K;
1.42 + else if (!aModeName.CompareF(_L("Color256")))
1.43 + return EColor256;
1.44 + else if (!aModeName.CompareF(_L("Color16")))
1.45 + return EColor16;
1.46 + else if (!aModeName.CompareF(_L("Gray256")))
1.47 + return EGray256;
1.48 + else if (!aModeName.CompareF(_L("Gray16")))
1.49 + return EGray16;
1.50 + else if (!aModeName.CompareF(_L("Gray4")))
1.51 + return EGray4;
1.52 + else if (!aModeName.CompareF(_L("Gray2")))
1.53 + return EGray2;
1.54 + else
1.55 + return ENone;
1.56 + }