aboutsummaryrefslogtreecommitdiffstats
path: root/include/EGL
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-05-27 13:43:01 -0600
committerBrian Paul <[email protected]>2008-05-27 13:43:01 -0600
commit704a5c7efbb6f41eb8dbe01e4f5a9275c1843699 (patch)
tree01edc10f097c9979e0e5017c6075a1df83994deb /include/EGL
parent6438f6fdf72efcdc596898d11fe3e95fc2a08db2 (diff)
new eglplatform.h from Khronos.org (replaces GLES/egltypes.h)
Diffstat (limited to 'include/EGL')
-rw-r--r--include/EGL/eglplatform.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h
new file mode 100644
index 00000000000..205812f2e31
--- /dev/null
+++ b/include/EGL/eglplatform.h
@@ -0,0 +1,55 @@
+/* -*- mode: c; tab-width: 8; -*- */
+/* vi: set sw=4 ts=8: */
+/* Platform-specific types and definitions for egl.h */
+
+#ifndef __eglplatform_h_
+#define __eglplatform_h_
+
+/* Windows calling convention boilerplate */
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+#endif
+
+#include <sys/types.h>
+
+/* Macros used in EGL function prototype declarations.
+ *
+ * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
+ * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
+ *
+ * On Windows, EGLAPIENTRY can be defined like APIENTRY.
+ * On most other platforms, it should be empty.
+ */
+
+#ifndef EGLAPIENTRY
+#define EGLAPIENTRY
+#endif
+#ifndef EGLAPIENTRYP
+#define EGLAPIENTRYP EGLAPIENTRY *
+#endif
+#ifndef EGLAPI
+#define EGLAPI extern
+#endif
+
+/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
+ * are aliases of window-system-dependent types, such as X Display * or
+ * Windows Device Context. They must be defined in platform-specific
+ * code below. The EGL-prefixed versions of Native*Type are the same
+ * types, renamed in EGL 1.3 so all types in the API start with "EGL".
+ */
+
+/* Unix (tentative)
+ #include <X headers>
+ typedef Display *NativeDisplayType;
+ - or maybe, if encoding "hostname:display.head"
+ typedef const char *NativeWindowType;
+ etc.
+ */
+
+/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
+typedef NativeDisplayType EGLNativeDisplayType;
+typedef NativePixmapType EGLNativePixmapType;
+typedef NativeWindowType EGLNativeWindowType;
+
+#endif /* __eglplatform_h */