2011-12-22 15:19:25 +00:00
|
|
|
/*
|
|
|
|
* \brief Genode-specific EGL platform definitions
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2010-07-01
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2018-03-16 09:46:39 +00:00
|
|
|
* Copyright (C) 2010-2018 Genode Labs GmbH
|
2011-12-22 15:19:25 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2011-12-22 15:19:25 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __eglplatform_h_ /* include-guard named as on the other platforms */
|
|
|
|
#define __eglplatform_h_
|
|
|
|
|
|
|
|
#include <KHR/khrplatform.h>
|
|
|
|
|
|
|
|
#ifndef EGLAPI
|
|
|
|
#define EGLAPI KHRONOS_APICALL
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef EGLAPIENTRY
|
|
|
|
#define EGLAPIENTRY KHRONOS_APIENTRY
|
|
|
|
#endif
|
|
|
|
#define EGLAPIENTRYP EGLAPIENTRY*
|
|
|
|
|
2017-08-17 11:27:18 +00:00
|
|
|
typedef long EGLNativeDisplayType;
|
2011-12-22 15:19:25 +00:00
|
|
|
typedef void *EGLNativePixmapType;
|
|
|
|
|
2017-08-17 11:27:18 +00:00
|
|
|
|
|
|
|
enum Surface_type {
|
|
|
|
WINDOW,
|
|
|
|
PIXMAP
|
|
|
|
};
|
|
|
|
|
2013-11-21 14:53:56 +00:00
|
|
|
struct Genode_egl_window
|
|
|
|
{
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
unsigned char *addr;
|
2017-08-17 11:27:18 +00:00
|
|
|
enum Surface_type type;
|
2013-11-21 14:53:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct Genode_egl_window *EGLNativeWindowType;
|
|
|
|
|
2018-03-16 09:46:39 +00:00
|
|
|
/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
|
|
|
|
typedef EGLNativeDisplayType NativeDisplayType;
|
|
|
|
typedef EGLNativePixmapType NativePixmapType;
|
|
|
|
typedef EGLNativeWindowType NativeWindowType;
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
typedef khronos_int32_t EGLint;
|
|
|
|
|
2018-03-16 09:46:39 +00:00
|
|
|
/* C++ / C typecast macros for special EGL handle values */
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
#define EGL_CAST(type, value) (static_cast<type>(value))
|
|
|
|
#else
|
|
|
|
#define EGL_CAST(type, value) ((type) (value))
|
|
|
|
#endif
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
#endif /* __eglplatform_h_ */
|