os/graphics/windowing/windowserverplugins/openwfc/inc/panic.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserverplugins/openwfc/inc/panic.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,79 @@
     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 +#ifndef __PANIC_H__
    1.20 +#define __PANIC_H__
    1.21 +
    1.22 +enum TStdPluginPanic
    1.23 +	{
    1.24 +	EPluginPanicTemp = 0,
    1.25 +	EPluginPanicNoDisplayModeFound = 1,
    1.26 +	EPluginPanicCreatedOffScreenBitmapInWrongDimensions = 2,
    1.27 +	EPluginPanicDisplayRenderStageMustBeFinal = 3,
    1.28 +	EPluginPanicFlickerBufferRenderStageMustNotBeFinal = 4,
    1.29 +	EPluginPanicIniFileMissing = 5,	// can't find an MWsIniFile instance
    1.30 +	EPluginPanicPreviousUiSurfaceUnregisterable = 6,
    1.31 +	EPluginPanicDuplicateUiElement = 7,	// occurs when trying to add a UI element when another UI element is already part of the scene
    1.32 +	EPluginPanicNonMatchingRemovalOfUiElement = 8, // occurs when removing a UI element, when it's not the current UI element
    1.33 +	EPluginPanicUiSurfaceIsNull = 9,	// occurs when the UI surface is NULL
    1.34 +	EPluginPanicScreenDeviceMissing = 10, // can't get MWsScreenDevice from the next render stage
    1.35 +	EPluginPanicCompositionContextMissing = 11, // can't get MWsCompositionContext from the next render stage
    1.36 +	EPluginPanicPopGcSettings = 12, // problem when popping gc settings, previously saved
    1.37 +	EPluginPanicDrawCommandsInvalidState = 13,	//The draw commands state doesn't match with the action that is occuring
    1.38 +	EPluginPanicInvalidCursorType = 14, // invalid cursor
    1.39 +	EPluginPanicRegionError = 15, //Region is not NULL and TRegion::CheckError() has returned ETrue, or validation of region state has failed
    1.40 +	EPluginPanicBadBeginEndSequence = 16, // End() has been called without corresponding Begin(), or Begin() has been called twice.
    1.41 +	EPluginPanicRedrawNotCompleted = 17, // A redraw has been requested before the previous redraw has completed.  
    1.42 +	EPluginPanicNoContext = 18, // Graphics context from the next rendering stage is not available
    1.43 +	EPluginPanicSizeInTwipsFailed = 19, // HAL has returned a value of zero for display twips
    1.44 +	EPluginPanicMultipleUpdateRequests = 20, // Client has requested an update with updates outstanding
    1.45 +	EPluginPanicObjectConstructionFailed = 21, // Allocation and construction of an object has failed 
    1.46 +	EPluginPanicNoDrawableSourceProvider = 22, // The next render stange doesn't support MWsDrawableSourceProvider
    1.47 +	EPluginPanicDrawableSourceInitializationFailed = 23, // Failure when calling MWsDrawableSourceProvider::OpenDrawable() for an offscreen image
    1.48 +	EPluginPanicInvalidDrawableSource = 24, // Invalid drawable source pointer passed to MWsDrawableSourceProvider
    1.49 +	EPluginPanicDisplayControlMissing = 25, // End() has been called without corresponding Begin(), or Begin() has been called twice.
    1.50 +	EPluginPanicScreenCaptureRenderStageMustNotBeFinal = 26, // A redraw has been requested before the previous redraw has completed.
    1.51 +	EPluginPanicScreenCaptureInvalidCommand=27,  // No Such Command
    1.52 +	EPluginPanicDisplayMappingMissing = 28, // can't get MWsDisplayMapping from the next render stage
    1.53 +	EPluginPanicNewUiSurfaceUnsettable = 30,	//can't set a new ui surface
    1.54 +	EPluginPanicHalSetDisplayState = 31, //error returned when trying to set DisplayState
    1.55 +	EPluginPanicSceneMissing = 32, // can't get MWsScene from the next render stage
    1.56 +	EPluginPanicCompositionSequenceError = 33, // an attempt to compose was made which was out of sequence with Begin()/End() 
    1.57 +
    1.58 +	};
    1.59 +
    1.60 +void Panic(TStdPluginPanic aPanic);
    1.61 +
    1.62 +#ifdef _DEBUG
    1.63 +#define STD_ASSERT_DEBUG(c, p) \
    1.64 +	do { \
    1.65 +		if(!(c)) \
    1.66 +			{ \
    1.67 +			Panic(p); \
    1.68 +			} \
    1.69 +		} while (EFalse)
    1.70 +#else
    1.71 +#define STD_ASSERT_DEBUG(c, p)
    1.72 +#endif //_DEBUG
    1.73 +
    1.74 +#define STD_ASSERT_ALWAYS(c, p) \
    1.75 +	do { \
    1.76 +		if(!(c)) \
    1.77 +			{ \
    1.78 +			Panic(p); \
    1.79 +			} \
    1.80 +		} while (EFalse)
    1.81 +
    1.82 +#endif //__PANIC_H__