1 /* -*- mode: c; tab-width: 8; -*- */
2 /* vi: set sw=4 ts=8: */
3 /* Platform-specific types and definitions for egl.h */
5 #ifndef __eglplatform_h_
6 #define __eglplatform_h_
8 /* Windows calling convention boilerplate */
9 #if (defined(WIN32) || defined(_WIN32_WCE))
10 #ifndef WIN32_LEAN_AND_MEAN
11 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
16 #include <sys/types.h>
18 /* Macros used in EGL function prototype declarations.
20 * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
21 * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
23 * On Windows, EGLAPIENTRY can be defined like APIENTRY.
24 * On most other platforms, it should be empty.
31 #define EGLAPIENTRYP EGLAPIENTRY *
37 /* The types NativeDisplayType, NativeWindowType, and NativePixmapType
38 * are aliases of window-system-dependent types, such as X Display * or
39 * Windows Device Context. They must be defined in platform-specific
40 * code below. The EGL-prefixed versions of Native*Type are the same
41 * types, renamed in EGL 1.3 so all types in the API start with "EGL".
46 typedef Display *NativeDisplayType;
47 - or maybe, if encoding "hostname:display.head"
48 typedef const char *NativeWindowType;
53 #if (defined(WIN32) || defined(_WIN32_WCE))
55 /** BEGIN Added for Windows **/
57 typedef HDC NativeDisplayType
;
58 typedef HWND NativeWindowType
;
59 typedef HBITMAP NativePixmapType
;
60 /** END Added for Windows **/
62 #elif defined(__gnu_linux__)
64 /** BEGIN Added for X (Mesa) **/
66 typedef Display
*NativeDisplayType
;
67 typedef Window NativeWindowType
;
68 typedef Pixmap NativePixmapType
;
69 /** END Added for X (Mesa) **/
73 /* EGL 1.2 types, renamed for consistency in EGL 1.3 */
74 typedef NativeDisplayType EGLNativeDisplayType
;
75 typedef NativePixmapType EGLNativePixmapType
;
76 typedef NativeWindowType EGLNativeWindowType
;
78 #endif /* __eglplatform_h */