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