egl: Fix the installed headers

• Use the public COGL_HAS_GLES[12] define instead of the HAVE_COGL_*
   ones which are private and defined in config.h,
 • Install clutter-egl-headers.h which is needed by clutter-egl.h,
 • Remove clutter-stage.h as it's uneeded and does not work since the
   single clutter.h include policy,
 • Install the egl headers into their own egl directory as the x11 and
   glx backends do. The include should then be <clutter/egl/clutter-egl.h>,
   so document it. It does not really break anything as nobody could
   have used those broken headers.
This commit is contained in:
Damien Lespiau 2010-08-27 16:19:00 +01:00
parent e1e5db0032
commit 70dc3ecbd6
3 changed files with 13 additions and 9 deletions

View File

@ -1,5 +1,5 @@
libclutterincludedir = $(includedir)/clutter-@CLUTTER_API_VERSION@/clutter
libclutterinclude_HEADERS = clutter-egl.h
libclutterincludedir = $(includedir)/clutter-@CLUTTER_API_VERSION@/clutter/egl
libclutterinclude_HEADERS = clutter-egl.h clutter-egl-headers.h
INCLUDES = \
-DG_LOG_DOMAIN=\"ClutterEGL\" \

View File

@ -22,17 +22,19 @@
#ifndef __CLUTTER_EGL_HEADERS_H__
#define __CLUTTER_EGL_HEADERS_H__
#ifdef HAVE_COGL_GLES2
#include <cogl/cogl.h>
#ifdef COGL_HAS_GLES2
#include <GLES2/gl2.h>
#include <EGL/egl.h>
#else /* HAVE_COGL_GLES2 */
#else /* COGL_HAS_GLES2 */
#include <GLES/gl.h>
#include <GLES/egl.h>
#endif /* HAVE_COGL_GLES2 */
#endif /* COGL_HAS_GLES2 */
#ifdef HAVE_COGL_GLES2
#ifdef COGL_HAS_GLES2
#define NativeDisplayType EGLNativeDisplayType
#define NativeWindowType EGLNativeWindowType
#endif /* HAVE_COGL_GLES2 */
#endif /* COGL_HAS_GLES2 */
#endif /* __CLUTTER_EGL_HEADERS_H__ */

View File

@ -28,6 +28,10 @@
* @short_description: EGL specific API
*
* The EGL backend for Clutter provides some EGL specific API
*
* You need to include
* <filename class="headerfile">&lt;clutter/egl/clutter-egl.h&gt;</filename>
* to have access to the functions documented here.
*/
#ifndef __CLUTTER_EGL_H__
@ -43,8 +47,6 @@
#include "clutter-egl-headers.h"
#include <clutter/clutter-stage.h>
G_BEGIN_DECLS
#ifdef COGL_HAS_XLIB_SUPPORT