|
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 __STDPANIC_H__ |
|
17 #define __STDPANIC_H__ |
|
18 |
|
19 enum TStdPluginPanic |
|
20 { |
|
21 EStdPanicTemp = 0, |
|
22 EStdPanicNoDisplayModeFound = 1, |
|
23 EStdPanicCreatedOffScreenBitmapInWrongDimensions = 2, |
|
24 EStdPanicStdRenderStageMustBeFinal = 3, |
|
25 EStdPanicFlickerBufferRenderStageMustNotBeFinal = 4, |
|
26 EStdPanicIniFileMissing = 5, // can't find an MWsIniFile instance |
|
27 EStdPanicPreviousUiSurfaceUnregisterable = 6, |
|
28 EStdPanicDuplicateUiLayer = 7, // occurs when trying to add a UI layer when another UI layer is already part of the scene |
|
29 EStdPanicNonMatchingRemovalOfUiLayer = 8, // occurs when removing a UI layer, when it's not the current UI layer |
|
30 EStdPanicUiSurfaceIsNull = 9, // occurs when the UI surface is NULL |
|
31 EStdPanicScreenDeviceMissing = 10, // can't get MWsScreenDevice from the next render stage |
|
32 EStdPanicCompositionContextMissing = 11, // can't get MWsCompositionContext from the next render stage |
|
33 EStdPanicPopGcSettings = 12, // problem when popping gc settings, previously saved |
|
34 EStdPanicDrawCommandsInvalidState = 13, //The draw commands state doesn't match with the action that is occuring |
|
35 EStdPanicInvalidCursorType = 14, // invalid cursor |
|
36 EStdPanicRegionError = 15, //Region is not NULL and TRegion::CheckError() has returned ETrue, or validation of region state has failed |
|
37 EStdPanicBadBeginEndSequence = 16, // End() has been called without corresponding Begin(), or Begin() has been called twice. |
|
38 EStdPanicRedrawNotCompleted = 17, // A redraw has been requested before the previous redraw has completed. |
|
39 EStdPanicNoContext = 18, // Graphics context from the next rendering stage is not available |
|
40 }; |
|
41 |
|
42 void Panic(TStdPluginPanic aPanic); |
|
43 |
|
44 #ifdef _DEBUG |
|
45 #define STD_ASSERT_DEBUG(c, p) \ |
|
46 do { \ |
|
47 if(!(c)) \ |
|
48 { \ |
|
49 Panic(p); \ |
|
50 } \ |
|
51 } while (EFalse) |
|
52 #else |
|
53 #define STD_ASSERT_DEBUG(c, p) |
|
54 #endif //_DEBUG |
|
55 |
|
56 #define STD_ASSERT_ALWAYS(c, p) \ |
|
57 do { \ |
|
58 if(!(c)) \ |
|
59 { \ |
|
60 Panic(p); \ |
|
61 } \ |
|
62 } while (EFalse) |
|
63 |
|
64 #endif //__STDPANIC_H__ |