summaryrefslogtreecommitdiff
path: root/specs/eglapi.py
diff options
context:
space:
mode:
authorJosé Fonseca <jose.r.fonseca@gmail.com>2013-05-29 08:13:18 +0100
committerJosé Fonseca <jose.r.fonseca@gmail.com>2013-05-29 08:13:18 +0100
commit22ef2a5a9dee95072e47ca13c23ac854cb50f192 (patch)
tree84db11ad8ebb3e34b8a21ef61b9f5b1a2ed3172d /specs/eglapi.py
parent92e6a939fbbf372c4d0a11dc70bb1e875c07a95a (diff)
egltrace: Consolidate enum definitions.
Diffstat (limited to 'specs/eglapi.py')
-rw-r--r--specs/eglapi.py25
1 files changed, 10 insertions, 15 deletions
diff --git a/specs/eglapi.py b/specs/eglapi.py
index 510e0fab..0dad0ac7 100644
--- a/specs/eglapi.py
+++ b/specs/eglapi.py
@@ -47,7 +47,8 @@ EGLBoolean = Enum("EGLBoolean", [
EGLint = Alias("EGLint", Int32)
-EGLError = FakeEnum(EGLint, [
+EGLenum = Enum("EGLenum", [
+ # error codes
"EGL_SUCCESS", # 0x3000
"EGL_NOT_INITIALIZED", # 0x3001
"EGL_BAD_ACCESS", # 0x3002
@@ -63,17 +64,6 @@ EGLError = FakeEnum(EGLint, [
"EGL_BAD_PARAMETER", # 0x300C
"EGL_BAD_SURFACE", # 0x300D
"EGL_CONTEXT_LOST", # 0x300E /* EGL 1.1 - IMG_power_management */
-])
-
-EGLName = FakeEnum(EGLint, [
- "EGL_VENDOR", # 0x3053
- "EGL_VERSION", # 0x3054
- "EGL_EXTENSIONS", # 0x3055
- "EGL_CLIENT_APIS", # 0x308D
-])
-
-# collection of all other enum values
-EGLenum = Enum("EGLenum", [
# config attributes
"EGL_BUFFER_SIZE", # 0x3020
"EGL_ALPHA_SIZE", # 0x3021
@@ -114,6 +104,10 @@ EGLenum = Enum("EGLenum", [
"EGL_SLOW_CONFIG", # 0x3050 /* EGL_CONFIG_CAVEAT value */
"EGL_NON_CONFORMANT_CONFIG", # 0x3051 /* EGL_CONFIG_CAVEAT value */
"EGL_TRANSPARENT_RGB", # 0x3052 /* EGL_TRANSPARENT_TYPE value */
+ "EGL_VENDOR", # 0x3053
+ "EGL_VERSION", # 0x3054
+ "EGL_EXTENSIONS", # 0x3055
+ "EGL_CLIENT_APIS", # 0x308D
"EGL_RGB_BUFFER", # 0x308E /* EGL_COLOR_BUFFER_TYPE value */
"EGL_LUMINANCE_BUFFER", # 0x308F /* EGL_COLOR_BUFFER_TYPE value */
@@ -265,7 +259,8 @@ EGLenum = Enum("EGLenum", [
])
# an alias of EGLenum
-EGLattrib = Alias("EGLint", EGLenum)
+EGLint_enum = Alias("EGLint", EGLenum)
+EGLattrib = EGLint_enum
# EGL_KHR_image_base
EGLImageKHR = Opaque("EGLImageKHR")
@@ -301,13 +296,13 @@ def GlFunction(*args, **kwargs):
eglapi.addFunctions([
# EGL 1.4
- Function(EGLError, "eglGetError", [], sideeffects=False),
+ Function(EGLint_enum, "eglGetError", [], sideeffects=False),
Function(EGLDisplay, "eglGetDisplay", [(EGLNativeDisplayType, "display_id")]),
Function(EGLBoolean, "eglInitialize", [(EGLDisplay, "dpy"), Out(Pointer(EGLint), "major"), Out(Pointer(EGLint), "minor")]),
Function(EGLBoolean, "eglTerminate", [(EGLDisplay, "dpy")]),
- Function(ConstCString, "eglQueryString", [(EGLDisplay, "dpy"), (EGLName, "name")], sideeffects=False),
+ Function(ConstCString, "eglQueryString", [(EGLDisplay, "dpy"), (EGLint_enum, "name")], sideeffects=False),
Function(EGLBoolean, "eglGetConfigs", [(EGLDisplay, "dpy"), (Array(EGLConfig, "config_size"), "configs"), (EGLint, "config_size"), Out(Pointer(EGLint), "num_config")]),
Function(EGLBoolean, "eglChooseConfig", [(EGLDisplay, "dpy"), (EGLAttribList, "attrib_list"), (Array(EGLConfig, "config_size"), "configs"), (EGLint, "config_size"), Out(Pointer(EGLint), "num_config")]),