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