Merge branch 'gallium-vertex-linear' into gallium-0.1
[mesa.git] / include / EGL / eglplatform.h
1 /* -*- mode: c; tab-width: 8; -*- */
2 /* vi: set sw=4 ts=8: */
3 /* Platform-specific types and definitions for egl.h */
4
5 #ifndef __eglplatform_h_
6 #define __eglplatform_h_
7
8 /* Windows calling convention boilerplate */
9 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
10 #define WIN32_LEAN_AND_MEAN 1
11 #include <windows.h>
12 #endif
13
14 #include <sys/types.h>
15
16 /* Macros used in EGL function prototype declarations.
17 *
18 * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
19 * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
20 *
21 * On Windows, EGLAPIENTRY can be defined like APIENTRY.
22 * On most other platforms, it should be empty.
23 */
24
25 #ifndef EGLAPIENTRY
26 #define EGLAPIENTRY
27 #endif
28 #ifndef EGLAPIENTRYP
29 #define EGLAPIENTRYP EGLAPIENTRY *
30 #endif
31 #ifndef EGLAPI
32 #define EGLAPI extern
33 #endif
34
35 /* The types NativeDisplayType, NativeWindowType, and NativePixmapType
36 * are aliases of window-system-dependent types, such as X Display * or
37 * Windows Device Context. They must be defined in platform-specific
38 * code below. The EGL-prefixed versions of Native*Type are the same
39 * types, renamed in EGL 1.3 so all types in the API start with "EGL".
40 */
41
42 /* Unix (tentative)
43 #include <X headers>
44 typedef Display *NativeDisplayType;
45 - or maybe, if encoding "hostname:display.head"
46 typedef const char *NativeWindowType;
47 etc.
48 */
49
50 /** BEGIN Added for X (Mesa) **/
51 #include <X11/Xlib.h>
52 typedef Display *NativeDisplayType;
53 typedef Window NativeWindowType;
54 typedef Pixmap NativePixmapType;
55 /** END Added for X (Mesa) **/
56
57 /* EGL 1.2 types, renamed for consistency in EGL 1.3 */
58 typedef NativeDisplayType EGLNativeDisplayType;
59 typedef NativePixmapType EGLNativePixmapType;
60 typedef NativeWindowType EGLNativeWindowType;
61
62 #endif /* __eglplatform_h */