1#ifndef __eglplatform_h_
2#define __eglplatform_h_
31#define EGLAPI KHRONOS_APICALL
35#define EGLAPIENTRY KHRONOS_APIENTRY
37#define EGLAPIENTRYP EGLAPIENTRY*
51#if defined(EGL_NO_PLATFORM_SPECIFIC_TYPES)
53typedef void *EGLNativeDisplayType;
54typedef void *EGLNativePixmapType;
55typedef void *EGLNativeWindowType;
57#elif defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
58#ifndef WIN32_LEAN_AND_MEAN
59#define WIN32_LEAN_AND_MEAN 1
63typedef HDC EGLNativeDisplayType;
64typedef HBITMAP EGLNativePixmapType;
65typedef HWND EGLNativeWindowType;
70typedef struct _screen_pixmap* EGLNativePixmapType;
71typedef struct _screen_window* EGLNativeWindowType;
73#elif defined(__EMSCRIPTEN__)
75typedef int EGLNativeDisplayType;
76typedef int EGLNativePixmapType;
77typedef int EGLNativeWindowType;
79#elif defined(__WINSCW__) || defined(__SYMBIAN32__)
81typedef int EGLNativeDisplayType;
82typedef void *EGLNativePixmapType;
83typedef void *EGLNativeWindowType;
85#elif defined(WL_EGL_PLATFORM)
87typedef struct wl_display *EGLNativeDisplayType;
88typedef struct wl_egl_pixmap *EGLNativePixmapType;
89typedef struct wl_egl_window *EGLNativeWindowType;
93typedef struct gbm_device *EGLNativeDisplayType;
94typedef struct gbm_bo *EGLNativePixmapType;
95typedef void *EGLNativeWindowType;
97#elif defined(__ANDROID__) || defined(ANDROID)
100struct egl_native_pixmap_t;
102typedef void* EGLNativeDisplayType;
103typedef struct egl_native_pixmap_t* EGLNativePixmapType;
104typedef struct ANativeWindow* EGLNativeWindowType;
106#elif defined(USE_OZONE)
108typedef intptr_t EGLNativeDisplayType;
109typedef intptr_t EGLNativePixmapType;
110typedef intptr_t EGLNativeWindowType;
112#elif defined(USE_X11)
116#include <X11/Xutil.h>
118typedef Display *EGLNativeDisplayType;
119typedef Pixmap EGLNativePixmapType;
120typedef Window EGLNativeWindowType;
122#elif defined(__unix__)
124typedef void *EGLNativeDisplayType;
128#elif defined(__APPLE__)
130typedef int EGLNativeDisplayType;
131typedef void *EGLNativePixmapType;
132typedef void *EGLNativeWindowType;
134#elif defined(__HAIKU__)
136#include <kernel/image.h>
138typedef void *EGLNativeDisplayType;
142#elif defined(__Fuchsia__)
144typedef void *EGLNativeDisplayType;
149#error "Platform not recognized"
169#if defined(__cplusplus)
170#define EGL_CAST(type, value) (static_cast<type>(value))
172#define EGL_CAST(type, value) ((type) (value))