| 1 |
/* |
| 2 |
* (C) Copyright 2016, NVIDIA CORPORATION. |
| 3 |
* All Rights Reserved. |
| 4 |
* |
| 5 |
* Permission is hereby granted, free of charge, to any person obtaining a |
| 6 |
* copy of this software and associated documentation files (the "Software"), |
| 7 |
* to deal in the Software without restriction, including without limitation |
| 8 |
* on the rights to use, copy, modify, merge, publish, distribute, sub |
| 9 |
* license, and/or sell copies of the Software, and to permit persons to whom |
| 10 |
* the Software is furnished to do so, subject to the following conditions: |
| 11 |
* |
| 12 |
* The above copyright notice and this permission notice (including the next |
| 13 |
* paragraph) shall be included in all copies or substantial portions of the |
| 14 |
* Software. |
| 15 |
* |
| 16 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 |
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL |
| 19 |
* IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 21 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
| 22 |
* IN THE SOFTWARE. |
| 23 |
* |
| 24 |
* Authors: |
| 25 |
* Kyle Brenneman <[email protected]> |
| 26 |
*/ |
| 27 |
|
| 28 |
#ifndef EGLDISPATCHSTUBS_H |
| 29 |
#define EGLDISPATCHSTUBS_H |
| 30 |
|
| 31 |
#include "glvnd/libeglabi.h" |
| 32 |
|
| 33 |
// These variables are all generated along with the dispatch stubs. |
| 34 |
extern const int __EGL_DISPATCH_FUNC_COUNT; |
| 35 |
extern const char *const __EGL_DISPATCH_FUNC_NAMES[]; |
| 36 |
extern int __EGL_DISPATCH_FUNC_INDICES[]; |
| 37 |
extern const __eglMustCastToProperFunctionPointerType __EGL_DISPATCH_FUNCS[]; |
| 38 |
|
| 39 |
void |
| 40 |
__eglInitDispatchStubs(const __EGLapiExports *exportsTable); |
| 41 |
void |
| 42 |
__eglSetDispatchIndex(const char *name, int index); |
| 43 |
|
| 44 |
/** |
| 45 |
* Returns the dispatch function for the given name, or \c NULL if the function |
| 46 |
* isn't supported. |
| 47 |
*/ |
| 48 |
void * |
| 49 |
__eglDispatchFindDispatchFunction(const char *name); |
| 50 |
|
| 51 |
// Helper functions used by the generated stubs. |
| 52 |
__eglMustCastToProperFunctionPointerType |
| 53 |
__eglDispatchFetchByDisplay(EGLDisplay dpy, int index); |
| 54 |
__eglMustCastToProperFunctionPointerType |
| 55 |
__eglDispatchFetchByDevice(EGLDeviceEXT dpy, int index); |
| 56 |
__eglMustCastToProperFunctionPointerType |
| 57 |
__eglDispatchFetchByCurrent(int index); |
| 58 |
|
| 59 |
#endif // EGLDISPATCHSTUBS_H |