diff -r 2bd88482bfe5 -r 6a1564a2f3e6 egl/eglinterface/include/eglwindowcommon.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/egl/eglinterface/include/eglwindowcommon.h Fri Sep 17 08:36:49 2010 +0300 @@ -0,0 +1,58 @@ +// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +/** + @file + @publishedPartner + @prototype +*/ + + +#ifndef __EGLWINDOWCOMMON_H__ +#define __EGLWINDOWCOMMON_H__ + + +#include +#include +#include + + +/** +EGL Window panic codes, panic function and assert macro. +*/ +enum TEglWindowPanicCode + { + EEglWindowPanicInvalidSurface = 0, + EEglWindowPanicInvalidScreenNumber = 1, + EEglWindowPanicSizeInPixelsIsNegative = 2, + EEglWindowPanicSizeInTwipsIsNegative = 3, + EEglWindowPanicREglStandAloneWindowNotCreated = 4, + EEglWindowPanicRWindowHasNoSession = 5, + }; + + +static inline void EglWindowPanic(TEglWindowPanicCode aPanicCode) + { + _LIT(KPanicCategory, "EglWindow"); + User::Panic(KPanicCategory, aPanicCode); + } + + +#define EGL_WINDOW_ASSERT_DEBUG(aAssert, aPanicCode) __ASSERT_DEBUG(aAssert, EglWindowPanic(aPanicCode)) +#define EGL_WINDOW_ASSERT_ALWAYS(aAssert, aPanicCode) __ASSERT_ALWAYS(aAssert, EglWindowPanic(aPanicCode)) + + +#endif