os/graphics/windowing/windowserver/test/tauto/stdpanic.h
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
#ifndef __STDPANIC_H__
sl@0
    17
#define __STDPANIC_H__
sl@0
    18
sl@0
    19
enum TStdPluginPanic
sl@0
    20
{
sl@0
    21
	EStdPanicTemp = 0,
sl@0
    22
	EStdPanicNoDisplayModeFound = 1,
sl@0
    23
	EStdPanicCreatedOffScreenBitmapInWrongDimensions = 2,
sl@0
    24
	EStdPanicStdRenderStageMustBeFinal = 3,
sl@0
    25
	EStdPanicFlickerBufferRenderStageMustNotBeFinal = 4,
sl@0
    26
	EStdPanicIniFileMissing = 5,	// can't find an MWsIniFile instance
sl@0
    27
	EStdPanicPreviousUiSurfaceUnregisterable = 6,
sl@0
    28
	EStdPanicDuplicateUiLayer = 7,	// occurs when trying to add a UI layer when another UI layer is already part of the scene
sl@0
    29
	EStdPanicNonMatchingRemovalOfUiLayer = 8, // occurs when removing a UI layer, when it's not the current UI layer
sl@0
    30
	EStdPanicUiSurfaceIsNull = 9,	// occurs when the UI surface is NULL
sl@0
    31
	EStdPanicScreenDeviceMissing = 10, // can't get MWsScreenDevice from the next render stage
sl@0
    32
	EStdPanicCompositionContextMissing = 11, // can't get MWsCompositionContext from the next render stage
sl@0
    33
	EStdPanicPopGcSettings = 12, // problem when popping gc settings, previously saved
sl@0
    34
	EStdPanicDrawCommandsInvalidState = 13,	//The draw commands state doesn't match with the action that is occuring
sl@0
    35
	EStdPanicInvalidCursorType = 14, // invalid cursor
sl@0
    36
	EStdPanicRegionError = 15, //Region is not NULL and TRegion::CheckError() has returned ETrue, or validation of region state has failed
sl@0
    37
	EStdPanicBadBeginEndSequence = 16, // End() has been called without corresponding Begin(), or Begin() has been called twice.
sl@0
    38
	EStdPanicRedrawNotCompleted = 17, // A redraw has been requested before the previous redraw has completed.  
sl@0
    39
	EStdPanicNoContext = 18, // Graphics context from the next rendering stage is not available
sl@0
    40
};
sl@0
    41
sl@0
    42
void Panic(TStdPluginPanic aPanic);
sl@0
    43
sl@0
    44
#ifdef _DEBUG
sl@0
    45
#define STD_ASSERT_DEBUG(c, p) \
sl@0
    46
	do { \
sl@0
    47
		if(!(c)) \
sl@0
    48
			{ \
sl@0
    49
			Panic(p); \
sl@0
    50
			} \
sl@0
    51
		} while (EFalse)
sl@0
    52
#else
sl@0
    53
#define STD_ASSERT_DEBUG(c, p)
sl@0
    54
#endif //_DEBUG
sl@0
    55
sl@0
    56
#define STD_ASSERT_ALWAYS(c, p) \
sl@0
    57
	do { \
sl@0
    58
		if(!(c)) \
sl@0
    59
			{ \
sl@0
    60
			Panic(p); \
sl@0
    61
			} \
sl@0
    62
		} while (EFalse)
sl@0
    63
sl@0
    64
#endif //__STDPANIC_H__