os/graphics/windowing/windowserver/test/t_eventchecker/inc/openwfc/panics.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 __PANICS_H__
    17 #define __PANICS_H__
    18 
    19 enum TEventCheckerPanic
    20 	{
    21 	EEventCheckerPanicEventCheckerMustNotBeFinalRenderStage,
    22 	//CWsRenderStage
    23 	EEventCheckerPanicBeginWithoutPrecedingEnd,
    24 	EEventCheckerPanicEndWithoutPrecedingBegin,
    25 	//MWsGraphicsContext
    26 	EEventCheckerPanicMWsGraphicsContextRequestedOutsideBeginEnd,
    27 	EEventCheckerPanicNextRenderStageHasNoMWsGraphicsContext,
    28 	EEventCheckerPanicNextRenderStageHasChangedMWsGraphicsContextWithinBeginEnd,
    29 	EEventCheckerPanicUsingMWsGraphicsContextAfterEnd,
    30 	//MWsTextCursor
    31 	EEventCheckerPanicMWsTextCursorRequestedOutsideBeginEnd,
    32 	EEventCheckerPanicNextRenderStageHasNoMWsTextCursor,
    33 	EEventCheckerPanicNextRenderStageHasChangedMWsTextCursorWithinBeginEnd,
    34 	EEventCheckerPanicUsingMWsTextCursorAfterEnd,
    35 	//MWsFader
    36 	EEventCheckerPanicMWsFaderRequestedOutsideBeginEnd,
    37 	EEventCheckerPanicNextRenderStageHasNoMWsFader,
    38 	EEventCheckerPanicNextRenderStageHasChangedMWsFaderWithinBeginEnd,
    39 	EEventCheckerPanicUsingMWsFaderAfterEnd,
    40 	//MWsScene
    41 	EEventCheckerPanicNextRenderStageHasNoMWsScene,
    42 	EEventCheckerPanicElementCountMismatch,
    43 	EEventCheckerPanicElementLinksMismatch,
    44 	EEventCheckerPanicAcquireElementWithoutWindow,
    45 	EEventCheckerPanicAcquireElementForUnknownElement,
    46 	EEventCheckerPanicElementsWithoutAssociatedWindow,
    47 	//MWsDrawAnnotationObserver
    48 	EEventCheckerPanicUnbalancedDrawingTargetEvents,
    49 	EEventCheckerPanicDrawingWithoutTarget,
    50 	};
    51 
    52 void Panic(TEventCheckerPanic aPanic);
    53 
    54 #ifdef _DEBUG
    55 #define CHK_ASSERT_DEBUG(c, p) \
    56 	do { \
    57 		if(!(c)) \
    58 			{ \
    59 			Panic(p); \
    60 			} \
    61 		} while (EFalse)
    62 #else
    63 #define CHK_ASSERT_DEBUG(c, p)
    64 #endif //_DEBUG
    65 
    66 #define CHK_ASSERT_ALWAYS(c, p) \
    67 	do { \
    68 		if(!(c)) \
    69 			{ \
    70 			Panic(p); \
    71 			} \
    72 		} while (EFalse)
    73 
    74 #endif // __PANICS_H__