171
|
1 |
// Copyright (c) 2010 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 |
|
|
17 |
/**
|
|
18 |
@file
|
|
19 |
@publishedPartner
|
|
20 |
@prototype
|
|
21 |
*/
|
|
22 |
|
|
23 |
|
|
24 |
#ifndef __EGLWINDOWCOMMON_H__
|
|
25 |
#define __EGLWINDOWCOMMON_H__
|
|
26 |
|
|
27 |
|
|
28 |
#include <e32std.h>
|
|
29 |
#include <graphics/surfaceconfiguration.h>
|
|
30 |
#include <graphics/suerror.h>
|
|
31 |
|
|
32 |
|
|
33 |
/**
|
|
34 |
EGL Window panic codes, panic function and assert macro.
|
|
35 |
*/
|
|
36 |
enum TEglWindowPanicCode
|
|
37 |
{
|
|
38 |
EEglWindowPanicInvalidSurface = 0,
|
|
39 |
EEglWindowPanicInvalidScreenNumber = 1,
|
|
40 |
EEglWindowPanicSizeInPixelsIsNegative = 2,
|
|
41 |
EEglWindowPanicSizeInTwipsIsNegative = 3,
|
|
42 |
EEglWindowPanicREglStandAloneWindowNotCreated = 4,
|
|
43 |
EEglWindowPanicRWindowHasNoSession = 5,
|
|
44 |
};
|
|
45 |
|
|
46 |
|
|
47 |
static inline void EglWindowPanic(TEglWindowPanicCode aPanicCode)
|
|
48 |
{
|
|
49 |
_LIT(KPanicCategory, "EglWindow");
|
|
50 |
User::Panic(KPanicCategory, aPanicCode);
|
|
51 |
}
|
|
52 |
|
|
53 |
|
|
54 |
#define EGL_WINDOW_ASSERT_DEBUG(aAssert, aPanicCode) __ASSERT_DEBUG(aAssert, EglWindowPanic(aPanicCode))
|
|
55 |
#define EGL_WINDOW_ASSERT_ALWAYS(aAssert, aPanicCode) __ASSERT_ALWAYS(aAssert, EglWindowPanic(aPanicCode))
|
|
56 |
|
|
57 |
|
|
58 |
#endif
|