17ec681f3Smrg/*
27ec681f3Smrg * (C) Copyright 2016, NVIDIA CORPORATION.
37ec681f3Smrg * All Rights Reserved.
47ec681f3Smrg *
57ec681f3Smrg * Permission is hereby granted, free of charge, to any person obtaining a
67ec681f3Smrg * copy of this software and associated documentation files (the "Software"),
77ec681f3Smrg * to deal in the Software without restriction, including without limitation
87ec681f3Smrg * on the rights to use, copy, modify, merge, publish, distribute, sub
97ec681f3Smrg * license, and/or sell copies of the Software, and to permit persons to whom
107ec681f3Smrg * the Software is furnished to do so, subject to the following conditions:
117ec681f3Smrg *
127ec681f3Smrg * The above copyright notice and this permission notice (including the next
137ec681f3Smrg * paragraph) shall be included in all copies or substantial portions of the
147ec681f3Smrg * Software.
157ec681f3Smrg *
167ec681f3Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
177ec681f3Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
187ec681f3Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
197ec681f3Smrg * IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
207ec681f3Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
217ec681f3Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
227ec681f3Smrg * IN THE SOFTWARE.
237ec681f3Smrg *
247ec681f3Smrg * Authors:
257ec681f3Smrg *    Kyle Brenneman <kbrenneman@nvidia.com>
267ec681f3Smrg */
277ec681f3Smrg
2801e04c3fSmrg#ifndef EGLDISPATCHSTUBS_H
2901e04c3fSmrg#define EGLDISPATCHSTUBS_H
3001e04c3fSmrg
3101e04c3fSmrg#include "glvnd/libeglabi.h"
3201e04c3fSmrg
3301e04c3fSmrg// These variables are all generated along with the dispatch stubs.
3401e04c3fSmrgextern const int __EGL_DISPATCH_FUNC_COUNT;
3501e04c3fSmrgextern const char * const __EGL_DISPATCH_FUNC_NAMES[];
3601e04c3fSmrgextern int __EGL_DISPATCH_FUNC_INDICES[];
3701e04c3fSmrgextern const __eglMustCastToProperFunctionPointerType __EGL_DISPATCH_FUNCS[];
3801e04c3fSmrg
3901e04c3fSmrgvoid __eglInitDispatchStubs(const __EGLapiExports *exportsTable);
4001e04c3fSmrgvoid __eglSetDispatchIndex(const char *name, int index);
4101e04c3fSmrg
4201e04c3fSmrg/**
4301e04c3fSmrg * Returns the dispatch function for the given name, or \c NULL if the function
4401e04c3fSmrg * isn't supported.
4501e04c3fSmrg */
4601e04c3fSmrgvoid *__eglDispatchFindDispatchFunction(const char *name);
4701e04c3fSmrg
4801e04c3fSmrg// Helper functions used by the generated stubs.
4901e04c3fSmrg__eglMustCastToProperFunctionPointerType __eglDispatchFetchByDisplay(EGLDisplay dpy, int index);
5001e04c3fSmrg__eglMustCastToProperFunctionPointerType __eglDispatchFetchByDevice(EGLDeviceEXT dpy, int index);
5101e04c3fSmrg__eglMustCastToProperFunctionPointerType __eglDispatchFetchByCurrent(int index);
5201e04c3fSmrg
5301e04c3fSmrg#endif // EGLDISPATCHSTUBS_H
54