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