summaryrefslogtreecommitdiff
path: root/src/egl/main/egldispatchstubs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main/egldispatchstubs.h')
-rw-r--r--src/egl/main/egldispatchstubs.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/egl/main/egldispatchstubs.h b/src/egl/main/egldispatchstubs.h
new file mode 100644
index 00000000000..7861ea5e61a
--- /dev/null
+++ b/src/egl/main/egldispatchstubs.h
@@ -0,0 +1,26 @@
+#ifndef EGLDISPATCHSTUBS_H
+#define EGLDISPATCHSTUBS_H
+
+#include "glvnd/libeglabi.h"
+
+// These variables are all generated along with the dispatch stubs.
+extern const int __EGL_DISPATCH_FUNC_COUNT;
+extern const char * const __EGL_DISPATCH_FUNC_NAMES[];
+extern int __EGL_DISPATCH_FUNC_INDICES[];
+extern const __eglMustCastToProperFunctionPointerType __EGL_DISPATCH_FUNCS[];
+
+void __eglInitDispatchStubs(const __EGLapiExports *exportsTable);
+void __eglSetDispatchIndex(const char *name, int index);
+
+/**
+ * Returns the dispatch function for the given name, or \c NULL if the function
+ * isn't supported.
+ */
+void *__eglDispatchFindDispatchFunction(const char *name);
+
+// Helper functions used by the generated stubs.
+__eglMustCastToProperFunctionPointerType __eglDispatchFetchByDisplay(EGLDisplay dpy, int index);
+__eglMustCastToProperFunctionPointerType __eglDispatchFetchByDevice(EGLDeviceEXT dpy, int index);
+__eglMustCastToProperFunctionPointerType __eglDispatchFetchByCurrent(int index);
+
+#endif // EGLDISPATCHSTUBS_H