Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

eglplatform.h 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* -*- mode: c; tab-width: 8; -*- */
  2. /* vi: set sw=4 ts=8: */
  3. /* Platform-specific types and definitions for egl.h */
  4. #ifndef __eglplatform_h_
  5. #define __eglplatform_h_
  6. /* Windows calling convention boilerplate */
  7. #if (defined(WIN32) || defined(_WIN32_WCE))
  8. #ifndef WIN32_LEAN_AND_MEAN
  9. #define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */
  10. #endif
  11. #include <windows.h>
  12. #endif
  13. #if !defined(_WIN32_WCE)
  14. #include <sys/types.h>
  15. #endif
  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. #ifndef EGLAPIENTRY
  25. #define EGLAPIENTRY
  26. #endif
  27. #ifndef EGLAPIENTRYP
  28. #define EGLAPIENTRYP EGLAPIENTRY *
  29. #endif
  30. /* The types NativeDisplayType, NativeWindowType, and NativePixmapType
  31. * are aliases of window-system-dependent types, such as X Display * or
  32. * Windows Device Context. They must be defined in platform-specific
  33. * code below. The EGL-prefixed versions of Native*Type are the same
  34. * types, renamed in EGL 1.3 so all types in the API start with "EGL".
  35. */
  36. /* Unix (tentative)
  37. #include <X headers>
  38. typedef Display *NativeDisplayType;
  39. - or maybe, if encoding "hostname:display.head"
  40. typedef const char *NativeWindowType;
  41. etc.
  42. */
  43. #if (defined(WIN32) || defined(_WIN32_WCE))
  44. /** BEGIN Added for Windows **/
  45. #ifndef EGLAPI
  46. #define EGLAPI __declspec(dllexport)
  47. #endif
  48. typedef long int32_t;
  49. typedef HDC NativeDisplayType;
  50. typedef HWND NativeWindowType;
  51. typedef HBITMAP NativePixmapType;
  52. /** END Added for Windows **/
  53. #elif defined(__gnu_linux__)
  54. /** BEGIN Added for X (Mesa) **/
  55. #ifndef EGLAPI
  56. #define EGLAPI extern
  57. #endif
  58. #include <X11/Xlib.h>
  59. typedef Display *NativeDisplayType;
  60. typedef Window NativeWindowType;
  61. typedef Pixmap NativePixmapType;
  62. /** END Added for X (Mesa) **/
  63. #endif
  64. /* EGL 1.2 types, renamed for consistency in EGL 1.3 */
  65. typedef NativeDisplayType EGLNativeDisplayType;
  66. typedef NativePixmapType EGLNativePixmapType;
  67. typedef NativeWindowType EGLNativeWindowType;
  68. #endif /* __eglplatform_h */