egl/eglinterface/include/eglwindowcommon.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 17 Sep 2010 08:36:49 +0300
changeset 183 6a1564a2f3e6
permissions -rw-r--r--
Revision: 201037 Kit: 201037

// 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 <e32std.h>
#include <graphics/surfaceconfiguration.h>
#include <graphics/suerror.h>


/**
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