From 29b86f9852b2b7ecc31cdfee56679537e40bc6e2 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 12 Apr 2010 09:53:17 +0000 Subject: svn merge -r524:HEAD "^/branches/released" . --- mesalib/include/EGL/egl.h | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'mesalib/include/EGL/egl.h') diff --git a/mesalib/include/EGL/egl.h b/mesalib/include/EGL/egl.h index e33a31572..990ce0a45 100644 --- a/mesalib/include/EGL/egl.h +++ b/mesalib/include/EGL/egl.h @@ -1,9 +1,32 @@ /* -*- mode: c; tab-width: 8; -*- */ /* vi: set sw=4 ts=8: */ /* Reference version of egl.h for EGL 1.4. - * Last modified 2008/05/02 + * $Revision$ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ */ +/* +** Copyright (c) 2007-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + #ifndef __egl_h_ #define __egl_h_ @@ -17,7 +40,7 @@ extern "C" { #endif /* EGL Types */ -typedef int32_t EGLint; +/* EGLint is defined in eglplatform.h */ typedef unsigned int EGLBoolean; typedef unsigned int EGLenum; typedef void *EGLConfig; @@ -42,7 +65,7 @@ typedef void *EGLClientBuffer; #define EGL_TRUE 1 /* Out-of-band handle values */ -#define EGL_DEFAULT_DISPLAY ((void *)0) +#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) #define EGL_NO_CONTEXT ((EGLContext)0) #define EGL_NO_DISPLAY ((EGLDisplay)0) #define EGL_NO_SURFACE ((EGLSurface)0) @@ -86,7 +109,6 @@ typedef void *EGLClientBuffer; #define EGL_NATIVE_RENDERABLE 0x302D #define EGL_NATIVE_VISUAL_ID 0x302E #define EGL_NATIVE_VISUAL_TYPE 0x302F -#define EGL_PRESERVED_RESOURCES 0x3030 #define EGL_SAMPLES 0x3031 #define EGL_SAMPLE_BUFFERS 0x3032 #define EGL_SURFACE_TYPE 0x3033 @@ -291,7 +313,14 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); -EGLAPI void (* EGLAPIENTRY eglGetProcAddress(const char *procname))(void); +/* This is a generic function pointer type, whose name indicates it must + * be cast to the proper type *and calling convention* before use. + */ +typedef void (*__eglMustCastToProperFunctionPointerType)(void); + +/* Now, define eglGetProcAddress using the generic function ptr. type */ +EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY + eglGetProcAddress(const char *procname); #ifdef __cplusplus } -- cgit v1.2.3