#ifndef DEFINES_EGL_H
#define DEFINES_EGL_H

/*
    *** Automatically generated from '/data/deadwood/gitAROS/AROS/workbench/libs/mesa/src/aros/egl/egl.conf'. Edits will be lost. ***
    Copyright © 1995-2011, The AROS Development Team. All rights reserved.
*/

/*
    Desc: Defines for egl
*/

#include <aros/libcall.h>
#include <exec/types.h>
#include <aros/symbolsets.h>
#include <aros/preprocessor/variadic/cast2iptr.hpp>

__BEGIN_DECLS


#define __eglGetError_WB(__EglBase) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC0(EGLint, eglGetError, \
        struct Library *, (__EglBase), 35, Egl);\
})

#define eglGetError() \
    __eglGetError_WB(EglBase)

#define __eglGetDisplay_WB(__EglBase, __arg1) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC1(EGLDisplay, eglGetDisplay, \
                  AROS_LCA(EGLNativeDisplayType,(__arg1),D0), \
        struct Library *, (__EglBase), 36, Egl);\
})

#define eglGetDisplay(arg1) \
    __eglGetDisplay_WB(EglBase, (arg1))

#define __eglInitialize_WB(__EglBase, __arg1, __arg2, __arg3) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC3(EGLBoolean, eglInitialize, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLint *,(__arg2),A0), \
                  AROS_LCA(EGLint *,(__arg3),A1), \
        struct Library *, (__EglBase), 37, Egl);\
})

#define eglInitialize(arg1, arg2, arg3) \
    __eglInitialize_WB(EglBase, (arg1), (arg2), (arg3))

#define __eglTerminate_WB(__EglBase, __arg1) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC1(EGLBoolean, eglTerminate, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
        struct Library *, (__EglBase), 38, Egl);\
})

#define eglTerminate(arg1) \
    __eglTerminate_WB(EglBase, (arg1))

#define __eglQueryString_WB(__EglBase, __arg1, __arg2) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC2(const char *, eglQueryString, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLint,(__arg2),D1), \
        struct Library *, (__EglBase), 39, Egl);\
})

#define eglQueryString(arg1, arg2) \
    __eglQueryString_WB(EglBase, (arg1), (arg2))

#define __eglGetConfigs_WB(__EglBase, __arg1, __arg2, __arg3, __arg4) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC4(EGLBoolean, eglGetConfigs, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLConfig *,(__arg2),A0), \
                  AROS_LCA(EGLint,(__arg3),D1), \
                  AROS_LCA(EGLint *,(__arg4),A1), \
        struct Library *, (__EglBase), 40, Egl);\
})

#define eglGetConfigs(arg1, arg2, arg3, arg4) \
    __eglGetConfigs_WB(EglBase, (arg1), (arg2), (arg3), (arg4))

#define __eglChooseConfig_WB(__EglBase, __arg1, __arg2, __arg3, __arg4, __arg5) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC5(EGLBoolean, eglChooseConfig, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(const EGLint *,(__arg2),A0), \
                  AROS_LCA(EGLConfig *,(__arg3),A1), \
                  AROS_LCA(EGLint,(__arg4),D1), \
                  AROS_LCA(EGLint *,(__arg5),A2), \
        struct Library *, (__EglBase), 41, Egl);\
})

#define eglChooseConfig(arg1, arg2, arg3, arg4, arg5) \
    __eglChooseConfig_WB(EglBase, (arg1), (arg2), (arg3), (arg4), (arg5))

#define __eglGetConfigAttrib_WB(__EglBase, __arg1, __arg2, __arg3, __arg4) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC4(EGLBoolean, eglGetConfigAttrib, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLConfig,(__arg2),D1), \
                  AROS_LCA(EGLint,(__arg3),D2), \
                  AROS_LCA(EGLint *,(__arg4),A0), \
        struct Library *, (__EglBase), 42, Egl);\
})

#define eglGetConfigAttrib(arg1, arg2, arg3, arg4) \
    __eglGetConfigAttrib_WB(EglBase, (arg1), (arg2), (arg3), (arg4))

#define __eglCreateWindowSurface_WB(__EglBase, __arg1, __arg2, __arg3, __arg4) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC4(EGLSurface, eglCreateWindowSurface, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLConfig,(__arg2),D1), \
                  AROS_LCA(EGLNativeWindowType,(__arg3),D2), \
                  AROS_LCA(const EGLint *,(__arg4),A0), \
        struct Library *, (__EglBase), 43, Egl);\
})

#define eglCreateWindowSurface(arg1, arg2, arg3, arg4) \
    __eglCreateWindowSurface_WB(EglBase, (arg1), (arg2), (arg3), (arg4))

#define __eglCreatePbufferSurface_WB(__EglBase, __arg1, __arg2, __arg3) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC3(EGLSurface, eglCreatePbufferSurface, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLConfig,(__arg2),D1), \
                  AROS_LCA(const EGLint *,(__arg3),A0), \
        struct Library *, (__EglBase), 44, Egl);\
})

#define eglCreatePbufferSurface(arg1, arg2, arg3) \
    __eglCreatePbufferSurface_WB(EglBase, (arg1), (arg2), (arg3))

#define __eglCreatePixmapSurface_WB(__EglBase, __arg1, __arg2, __arg3, __arg4) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC4(EGLSurface, eglCreatePixmapSurface, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLConfig,(__arg2),D1), \
                  AROS_LCA(EGLNativePixmapType,(__arg3),D2), \
                  AROS_LCA(const EGLint *,(__arg4),A0), \
        struct Library *, (__EglBase), 45, Egl);\
})

#define eglCreatePixmapSurface(arg1, arg2, arg3, arg4) \
    __eglCreatePixmapSurface_WB(EglBase, (arg1), (arg2), (arg3), (arg4))

#define __eglDestroySurface_WB(__EglBase, __arg1, __arg2) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC2(EGLBoolean, eglDestroySurface, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLSurface,(__arg2),D1), \
        struct Library *, (__EglBase), 46, Egl);\
})

#define eglDestroySurface(arg1, arg2) \
    __eglDestroySurface_WB(EglBase, (arg1), (arg2))

#define __eglQuerySurface_WB(__EglBase, __arg1, __arg2, __arg3, __arg4) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC4(EGLBoolean, eglQuerySurface, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLSurface,(__arg2),D1), \
                  AROS_LCA(EGLint,(__arg3),D2), \
                  AROS_LCA(EGLint *,(__arg4),A0), \
        struct Library *, (__EglBase), 47, Egl);\
})

#define eglQuerySurface(arg1, arg2, arg3, arg4) \
    __eglQuerySurface_WB(EglBase, (arg1), (arg2), (arg3), (arg4))

#define __eglBindAPI_WB(__EglBase, __arg1) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC1(EGLBoolean, eglBindAPI, \
                  AROS_LCA(EGLenum,(__arg1),D0), \
        struct Library *, (__EglBase), 48, Egl);\
})

#define eglBindAPI(arg1) \
    __eglBindAPI_WB(EglBase, (arg1))

#define __eglQueryAPI_WB(__EglBase) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC0(EGLenum, eglQueryAPI, \
        struct Library *, (__EglBase), 49, Egl);\
})

#define eglQueryAPI() \
    __eglQueryAPI_WB(EglBase)

#define __eglWaitClient_WB(__EglBase) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC0(EGLBoolean, eglWaitClient, \
        struct Library *, (__EglBase), 50, Egl);\
})

#define eglWaitClient() \
    __eglWaitClient_WB(EglBase)

#define __eglReleaseThread_WB(__EglBase) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC0(EGLBoolean, eglReleaseThread, \
        struct Library *, (__EglBase), 51, Egl);\
})

#define eglReleaseThread() \
    __eglReleaseThread_WB(EglBase)

#define __eglCreatePbufferFromClientBuffer_WB(__EglBase, __arg1, __arg2, __arg3, __arg4, __arg5) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC5(EGLSurface, eglCreatePbufferFromClientBuffer, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLenum,(__arg2),D1), \
                  AROS_LCA(EGLClientBuffer,(__arg3),D2), \
                  AROS_LCA(EGLConfig,(__arg4),D3), \
                  AROS_LCA(const EGLint *,(__arg5),A0), \
        struct Library *, (__EglBase), 52, Egl);\
})

#define eglCreatePbufferFromClientBuffer(arg1, arg2, arg3, arg4, arg5) \
    __eglCreatePbufferFromClientBuffer_WB(EglBase, (arg1), (arg2), (arg3), (arg4), (arg5))

#define __eglSurfaceAttrib_WB(__EglBase, __arg1, __arg2, __arg3, __arg4) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC4(EGLBoolean, eglSurfaceAttrib, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLSurface,(__arg2),D1), \
                  AROS_LCA(EGLint,(__arg3),D2), \
                  AROS_LCA(EGLint,(__arg4),D3), \
        struct Library *, (__EglBase), 53, Egl);\
})

#define eglSurfaceAttrib(arg1, arg2, arg3, arg4) \
    __eglSurfaceAttrib_WB(EglBase, (arg1), (arg2), (arg3), (arg4))

#define __eglBindTexImage_WB(__EglBase, __arg1, __arg2, __arg3) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC3(EGLBoolean, eglBindTexImage, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLSurface,(__arg2),D1), \
                  AROS_LCA(EGLint,(__arg3),D2), \
        struct Library *, (__EglBase), 54, Egl);\
})

#define eglBindTexImage(arg1, arg2, arg3) \
    __eglBindTexImage_WB(EglBase, (arg1), (arg2), (arg3))

#define __eglReleaseTexImage_WB(__EglBase, __arg1, __arg2, __arg3) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC3(EGLBoolean, eglReleaseTexImage, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLSurface,(__arg2),D1), \
                  AROS_LCA(EGLint,(__arg3),D2), \
        struct Library *, (__EglBase), 55, Egl);\
})

#define eglReleaseTexImage(arg1, arg2, arg3) \
    __eglReleaseTexImage_WB(EglBase, (arg1), (arg2), (arg3))

#define __eglSwapInterval_WB(__EglBase, __arg1, __arg2) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC2(EGLBoolean, eglSwapInterval, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLint,(__arg2),D1), \
        struct Library *, (__EglBase), 56, Egl);\
})

#define eglSwapInterval(arg1, arg2) \
    __eglSwapInterval_WB(EglBase, (arg1), (arg2))

#define __eglCreateContext_WB(__EglBase, __arg1, __arg2, __arg3, __arg4) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC4(EGLContext, eglCreateContext, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLConfig,(__arg2),D1), \
                  AROS_LCA(EGLContext,(__arg3),D2), \
                  AROS_LCA(const EGLint *,(__arg4),A0), \
        struct Library *, (__EglBase), 57, Egl);\
})

#define eglCreateContext(arg1, arg2, arg3, arg4) \
    __eglCreateContext_WB(EglBase, (arg1), (arg2), (arg3), (arg4))

#define __eglDestroyContext_WB(__EglBase, __arg1, __arg2) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC2(EGLBoolean, eglDestroyContext, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLContext,(__arg2),D1), \
        struct Library *, (__EglBase), 58, Egl);\
})

#define eglDestroyContext(arg1, arg2) \
    __eglDestroyContext_WB(EglBase, (arg1), (arg2))

#define __eglMakeCurrent_WB(__EglBase, __arg1, __arg2, __arg3, __arg4) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC4(EGLBoolean, eglMakeCurrent, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLSurface,(__arg2),D1), \
                  AROS_LCA(EGLSurface,(__arg3),D2), \
                  AROS_LCA(EGLContext,(__arg4),D3), \
        struct Library *, (__EglBase), 59, Egl);\
})

#define eglMakeCurrent(arg1, arg2, arg3, arg4) \
    __eglMakeCurrent_WB(EglBase, (arg1), (arg2), (arg3), (arg4))

#define __eglGetCurrentContext_WB(__EglBase) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC0(EGLContext, eglGetCurrentContext, \
        struct Library *, (__EglBase), 60, Egl);\
})

#define eglGetCurrentContext() \
    __eglGetCurrentContext_WB(EglBase)

#define __eglGetCurrentSurface_WB(__EglBase, __arg1) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC1(EGLSurface, eglGetCurrentSurface, \
                  AROS_LCA(EGLint,(__arg1),D0), \
        struct Library *, (__EglBase), 61, Egl);\
})

#define eglGetCurrentSurface(arg1) \
    __eglGetCurrentSurface_WB(EglBase, (arg1))

#define __eglGetCurrentDisplay_WB(__EglBase) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC0(EGLDisplay, eglGetCurrentDisplay, \
        struct Library *, (__EglBase), 62, Egl);\
})

#define eglGetCurrentDisplay() \
    __eglGetCurrentDisplay_WB(EglBase)

#define __eglQueryContext_WB(__EglBase, __arg1, __arg2, __arg3, __arg4) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC4(EGLBoolean, eglQueryContext, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLContext,(__arg2),D1), \
                  AROS_LCA(EGLint,(__arg3),D2), \
                  AROS_LCA(EGLint *,(__arg4),A0), \
        struct Library *, (__EglBase), 63, Egl);\
})

#define eglQueryContext(arg1, arg2, arg3, arg4) \
    __eglQueryContext_WB(EglBase, (arg1), (arg2), (arg3), (arg4))

#define __eglWaitGL_WB(__EglBase) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC0(EGLBoolean, eglWaitGL, \
        struct Library *, (__EglBase), 64, Egl);\
})

#define eglWaitGL() \
    __eglWaitGL_WB(EglBase)

#define __eglWaitNative_WB(__EglBase, __arg1) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC1(EGLBoolean, eglWaitNative, \
                  AROS_LCA(EGLint,(__arg1),D0), \
        struct Library *, (__EglBase), 65, Egl);\
})

#define eglWaitNative(arg1) \
    __eglWaitNative_WB(EglBase, (arg1))

#define __eglSwapBuffers_WB(__EglBase, __arg1, __arg2) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC2(EGLBoolean, eglSwapBuffers, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLSurface,(__arg2),D1), \
        struct Library *, (__EglBase), 66, Egl);\
})

#define eglSwapBuffers(arg1, arg2) \
    __eglSwapBuffers_WB(EglBase, (arg1), (arg2))

#define __eglCopyBuffers_WB(__EglBase, __arg1, __arg2, __arg3) ({\
        AROS_LIBREQ(EglBase,0)\
        AROS_LC3(EGLBoolean, eglCopyBuffers, \
                  AROS_LCA(EGLDisplay,(__arg1),D0), \
                  AROS_LCA(EGLSurface,(__arg2),D1), \
                  AROS_LCA(EGLNativePixmapType,(__arg3),D2), \
        struct Library *, (__EglBase), 67, Egl);\
})

#define eglCopyBuffers(arg1, arg2, arg3) \
    __eglCopyBuffers_WB(EglBase, (arg1), (arg2), (arg3))

__END_DECLS

#endif /* DEFINES_EGL_H*/
