os/graphics/graphicscomposition/openwfcompositionengine/adaptation/src/Platform/OS/symbian/owfextensions.cpp
Update contrib.
1 // Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
3 // Permission is hereby granted, free of charge, to any person obtaining a
4 // copy of this software and/or associated documentation files (the
5 // "Materials"), to deal in the Materials without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Materials, and to
8 // permit persons to whom the Materials are furnished to do so, subject to
9 // the following conditions:
11 // The above copyright notice and this permission notice shall be included
12 // in all copies or substantial portions of the Materials.
14 // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 // MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
23 // Tables of OpenWF-C strings and extensions, plus access for EGL.
30 #include <KHR/khrplatform.h>
31 #include "owfextensions.h"
35 * Vendor, renderer and version strings
37 const char* wfc_strings[] =
40 "Sample Implementation",
45 * Table of extensions supported, terminated by a NULL.
47 const char *wfc_extensions[] =
53 typedef void (*OWFExtensionFunction)(...);
55 typedef void (*OWFExtensionFunction)();
58 typedef struct OWFExtension_tag
61 OWFExtensionFunction function;
65 * Table of extension function name/pointer pairs, terminated with a NULL name
66 * pair (pointer not used for terminating entry).
68 static OWFExtension OWF_ExtensionFunctionTable[] =
73 OWF_API_CALL OWFExtensionFunction
74 owfGetProcAddress(const char *procName)
83 for (ii=0; OWF_ExtensionFunctionTable[ii].name != NULL; ii++)
85 if (strcmp(procName, OWF_ExtensionFunctionTable[ii].name)==0)
87 return OWF_ExtensionFunctionTable[ii].function;
95 * eglGetProcAddress uses export 1 (implemented as GetExtensionFunctionTable) to
96 * fill in a function pointer table. The first entry is the function that looks up
97 * a function pointer for a given name. Other entries could be added in the
98 * future if coordinated with the EGL implementation.
103 OWFExtensionFunction (*owfGetProcAddressFn) (const char* procname);
106 extern "C" WFC_API_CALL void WFC_APIENTRY
107 GetExtensionFunctionTable(owfCFunctions* fnTable) WFC_APIEXIT
109 fnTable->owfGetProcAddressFn = owfGetProcAddress;