os/graphics/windowing/windowserverplugins/openwfc/inc/panic.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 __PANIC_H__
sl@0
    17
#define __PANIC_H__
sl@0
    18
sl@0
    19
enum TStdPluginPanic
sl@0
    20
	{
sl@0
    21
	EPluginPanicTemp = 0,
sl@0
    22
	EPluginPanicNoDisplayModeFound = 1,
sl@0
    23
	EPluginPanicCreatedOffScreenBitmapInWrongDimensions = 2,
sl@0
    24
	EPluginPanicDisplayRenderStageMustBeFinal = 3,
sl@0
    25
	EPluginPanicFlickerBufferRenderStageMustNotBeFinal = 4,
sl@0
    26
	EPluginPanicIniFileMissing = 5,	// can't find an MWsIniFile instance
sl@0
    27
	EPluginPanicPreviousUiSurfaceUnregisterable = 6,
sl@0
    28
	EPluginPanicDuplicateUiElement = 7,	// occurs when trying to add a UI element when another UI element is already part of the scene
sl@0
    29
	EPluginPanicNonMatchingRemovalOfUiElement = 8, // occurs when removing a UI element, when it's not the current UI element
sl@0
    30
	EPluginPanicUiSurfaceIsNull = 9,	// occurs when the UI surface is NULL
sl@0
    31
	EPluginPanicScreenDeviceMissing = 10, // can't get MWsScreenDevice from the next render stage
sl@0
    32
	EPluginPanicCompositionContextMissing = 11, // can't get MWsCompositionContext from the next render stage
sl@0
    33
	EPluginPanicPopGcSettings = 12, // problem when popping gc settings, previously saved
sl@0
    34
	EPluginPanicDrawCommandsInvalidState = 13,	//The draw commands state doesn't match with the action that is occuring
sl@0
    35
	EPluginPanicInvalidCursorType = 14, // invalid cursor
sl@0
    36
	EPluginPanicRegionError = 15, //Region is not NULL and TRegion::CheckError() has returned ETrue, or validation of region state has failed
sl@0
    37
	EPluginPanicBadBeginEndSequence = 16, // End() has been called without corresponding Begin(), or Begin() has been called twice.
sl@0
    38
	EPluginPanicRedrawNotCompleted = 17, // A redraw has been requested before the previous redraw has completed.  
sl@0
    39
	EPluginPanicNoContext = 18, // Graphics context from the next rendering stage is not available
sl@0
    40
	EPluginPanicSizeInTwipsFailed = 19, // HAL has returned a value of zero for display twips
sl@0
    41
	EPluginPanicMultipleUpdateRequests = 20, // Client has requested an update with updates outstanding
sl@0
    42
	EPluginPanicObjectConstructionFailed = 21, // Allocation and construction of an object has failed 
sl@0
    43
	EPluginPanicNoDrawableSourceProvider = 22, // The next render stange doesn't support MWsDrawableSourceProvider
sl@0
    44
	EPluginPanicDrawableSourceInitializationFailed = 23, // Failure when calling MWsDrawableSourceProvider::OpenDrawable() for an offscreen image
sl@0
    45
	EPluginPanicInvalidDrawableSource = 24, // Invalid drawable source pointer passed to MWsDrawableSourceProvider
sl@0
    46
	EPluginPanicDisplayControlMissing = 25, // End() has been called without corresponding Begin(), or Begin() has been called twice.
sl@0
    47
	EPluginPanicScreenCaptureRenderStageMustNotBeFinal = 26, // A redraw has been requested before the previous redraw has completed.
sl@0
    48
	EPluginPanicScreenCaptureInvalidCommand=27,  // No Such Command
sl@0
    49
	EPluginPanicDisplayMappingMissing = 28, // can't get MWsDisplayMapping from the next render stage
sl@0
    50
	EPluginPanicNewUiSurfaceUnsettable = 30,	//can't set a new ui surface
sl@0
    51
	EPluginPanicHalSetDisplayState = 31, //error returned when trying to set DisplayState
sl@0
    52
	EPluginPanicSceneMissing = 32, // can't get MWsScene from the next render stage
sl@0
    53
	EPluginPanicCompositionSequenceError = 33, // an attempt to compose was made which was out of sequence with Begin()/End() 
sl@0
    54
sl@0
    55
	};
sl@0
    56
sl@0
    57
void Panic(TStdPluginPanic aPanic);
sl@0
    58
sl@0
    59
#ifdef _DEBUG
sl@0
    60
#define STD_ASSERT_DEBUG(c, p) \
sl@0
    61
	do { \
sl@0
    62
		if(!(c)) \
sl@0
    63
			{ \
sl@0
    64
			Panic(p); \
sl@0
    65
			} \
sl@0
    66
		} while (EFalse)
sl@0
    67
#else
sl@0
    68
#define STD_ASSERT_DEBUG(c, p)
sl@0
    69
#endif //_DEBUG
sl@0
    70
sl@0
    71
#define STD_ASSERT_ALWAYS(c, p) \
sl@0
    72
	do { \
sl@0
    73
		if(!(c)) \
sl@0
    74
			{ \
sl@0
    75
			Panic(p); \
sl@0
    76
			} \
sl@0
    77
		} while (EFalse)
sl@0
    78
sl@0
    79
#endif //__PANIC_H__