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