summaryrefslogtreecommitdiff
path: root/cogl/cogl-egl.h
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2012-07-10 15:14:07 +0200
committerRobert Bragg <robert@linux.intel.com>2012-08-06 18:51:32 +0100
commitbb258c1d425917f13727a46d0ceed031bf8cb1b7 (patch)
treea8ee44093e2add645648ab0044ceec89b39b02d2 /cogl/cogl-egl.h
parent90641cf2ca77dce583fa081a2e0196c785cb5e98 (diff)
downloadcogl-bb258c1d425917f13727a46d0ceed031bf8cb1b7.tar.gz
Avoid including the EGL headers from the public Cogl headers
Otherwise, X11 identifiers may leak and cause havoc in big applications Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit ed0cdca0eca815543619fe72fbd42d662d53f92d)
Diffstat (limited to 'cogl/cogl-egl.h')
-rw-r--r--cogl/cogl-egl.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/cogl/cogl-egl.h b/cogl/cogl-egl.h
new file mode 100644
index 00000000..c9ca7865
--- /dev/null
+++ b/cogl/cogl-egl.h
@@ -0,0 +1,60 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2007,2008,2009,2010 Intel Corporation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ */
+
+#ifndef __COGL_EGL_H__
+#define __COGL_EGL_H__
+
+#ifdef COGL_HAS_EGL_SUPPORT
+
+#include "cogl-egl-defines.h"
+
+G_BEGIN_DECLS
+
+#define NativeDisplayType EGLNativeDisplayType
+#define NativeWindowType EGLNativeWindowType
+
+#ifndef GL_OES_EGL_image
+#define GLeglImageOES void *
+#endif
+
+/**
+ * cogl_egl_context_get_egl_display:
+ * @context: A #CoglContext pointer
+ *
+ * If you have done a runtime check to determine that Cogl is using
+ * EGL internally then this API can be used to retrieve the EGLDisplay
+ * handle that was setup internally. The result is undefined if Cogl
+ * is not using EGL.
+ *
+ * Return value: The internally setup EGLDisplay handle.
+ * Since: 1.8
+ * Stability: unstable
+ */
+EGLDisplay
+cogl_egl_context_get_egl_display (CoglContext *context);
+
+G_END_DECLS
+
+#endif /* COGL_HAS_EGL_SUPPORT */
+
+#endif