summaryrefslogtreecommitdiffstats
path: root/src/gui/egl/qegl_p.h
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2010-04-23 07:39:40 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2010-04-23 07:49:48 (GMT)
commit41b110e17b3deb102c7521d19964896228fcc8c6 (patch)
tree687809a25deb02532be742e13da8dc95e2c13728 /src/gui/egl/qegl_p.h
parent2ca4e77f0a29bc6d7571ca614a6101d9e1bd83e0 (diff)
downloadQt-41b110e17b3deb102c7521d19964896228fcc8c6.zip
Qt-41b110e17b3deb102c7521d19964896228fcc8c6.tar.gz
Qt-41b110e17b3deb102c7521d19964896228fcc8c6.tar.bz2
Stub implementations for EGL for symbian
This is done to keep binary compatibility between Qt built with openvg vs Qt built without openvg support. The problem is that Symbian uses .def files to map between exported symbol names and ordinals in the DLL export table. The alternative of manually maintaining two versions of the QtGui def files proved to be too error prone and time consuming. Note that the EGL exports are defined in a private header, for use by the openvg and opengl graphics system plugins. These plugins should always be compiled against Qt configured with support for the graphics system, as the headers contain default parameters which are inlined into the plugin binary. Task-number: QTBUG-7870 Reviewed-by: Tom Cooksey
Diffstat (limited to 'src/gui/egl/qegl_p.h')
-rw-r--r--src/gui/egl/qegl_p.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h
index 83bdb5e..6c562ef 100644
--- a/src/gui/egl/qegl_p.h
+++ b/src/gui/egl/qegl_p.h
@@ -55,6 +55,7 @@
QT_BEGIN_INCLUDE_NAMESPACE
+#ifndef QT_NO_EGL
#if defined(QT_OPENGL_ES_2)
# include <GLES2/gl2.h>
#endif
@@ -64,6 +65,23 @@ QT_BEGIN_INCLUDE_NAMESPACE
#else
# include <EGL/egl.h>
#endif
+#else
+
+//types from egltypes.h for compiling stub without EGL headers
+typedef int EGLBoolean;
+typedef int EGLint;
+typedef int EGLenum;
+typedef int NativeDisplayType;
+typedef void* NativeWindowType;
+typedef void* NativePixmapType;
+typedef int EGLDisplay;
+typedef int EGLConfig;
+typedef int EGLSurface;
+typedef int EGLContext;
+typedef int EGLClientBuffer;
+#define EGL_NONE 0x3038 /* Attrib list terminator */
+
+#endif
#if defined(Q_WS_X11)
// If <EGL/egl.h> included <X11/Xlib.h>, then the global namespace
@@ -169,7 +187,7 @@ namespace QEgl {
Translucent = 0x01,
Renderable = 0x02 // Config will be compatable with the paint engines (VG or GL)
};
- Q_DECLARE_FLAGS(ConfigOptions, ConfigOption);
+ Q_DECLARE_FLAGS(ConfigOptions, ConfigOption)
// Most of the time we use the same config for things like widgets & pixmaps, so rather than
// go through the eglChooseConfig loop every time, we use defaultConfig, which will return
@@ -182,7 +200,11 @@ namespace QEgl {
Q_GUI_EXPORT void dumpAllConfigs();
+#ifdef QT_NO_EGL
+ Q_GUI_EXPORT QString errorString(EGLint code = 0);
+#else
Q_GUI_EXPORT QString errorString(EGLint code = eglGetError());
+#endif
Q_GUI_EXPORT QString extensions();
Q_GUI_EXPORT bool hasExtension(const char* extensionName);
@@ -200,9 +222,9 @@ namespace QEgl {
#ifdef Q_WS_X11
Q_GUI_EXPORT VisualID getCompatibleVisualId(EGLConfig config);
#endif
-};
+}
-Q_DECLARE_OPERATORS_FOR_FLAGS(QEgl::ConfigOptions);
+Q_DECLARE_OPERATORS_FOR_FLAGS(QEgl::ConfigOptions)
QT_END_NAMESPACE