2007-03-22 18:21:59 +00:00
|
|
|
#ifndef __CLUTTER_STAGE_EGL_H__
|
|
|
|
#define __CLUTTER_STAGE_EGL_H__
|
|
|
|
|
2010-08-12 13:05:01 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2007-03-27 21:09:11 +00:00
|
|
|
#include <glib-object.h>
|
2007-03-22 18:21:59 +00:00
|
|
|
#include <clutter/clutter-stage.h>
|
|
|
|
|
2010-08-12 13:05:01 +00:00
|
|
|
#ifdef COGL_HAS_X11_SUPPORT
|
2007-03-27 21:09:11 +00:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xatom.h>
|
|
|
|
#include <X11/Xutil.h>
|
2010-08-12 13:05:01 +00:00
|
|
|
#include "../x11/clutter-stage-x11.h"
|
|
|
|
#endif
|
2007-03-27 21:09:11 +00:00
|
|
|
|
2008-05-27 17:42:50 +00:00
|
|
|
#include "clutter-egl-headers.h"
|
2010-06-18 03:38:43 +00:00
|
|
|
#include "clutter-backend-egl.h"
|
2007-03-27 21:09:11 +00:00
|
|
|
|
2011-02-04 15:09:41 +00:00
|
|
|
G_BEGIN_DECLS
|
2007-03-27 21:09:11 +00:00
|
|
|
|
2010-08-13 14:48:30 +00:00
|
|
|
#define CLUTTER_TYPE_STAGE_EGL (_clutter_stage_egl_get_type ())
|
2007-05-31 12:35:36 +00:00
|
|
|
#define CLUTTER_STAGE_EGL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_STAGE_EGL, ClutterStageEGL))
|
2007-03-22 18:21:59 +00:00
|
|
|
#define CLUTTER_IS_STAGE_EGL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_STAGE_EGL))
|
2007-05-31 12:35:36 +00:00
|
|
|
#define CLUTTER_STAGE_EGL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_STAGE_EGL, ClutterStageEGLClass))
|
2007-03-22 18:21:59 +00:00
|
|
|
#define CLUTTER_IS_STAGE_EGL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_STAGE_EGL))
|
2007-05-31 12:35:36 +00:00
|
|
|
#define CLUTTER_STAGE_EGL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_STAGE_EGL, ClutterStageEGLClass))
|
2007-03-22 18:21:59 +00:00
|
|
|
|
2007-05-31 12:35:36 +00:00
|
|
|
typedef struct _ClutterStageEGL ClutterStageEGL;
|
|
|
|
typedef struct _ClutterStageEGLClass ClutterStageEGLClass;
|
2007-03-22 18:21:59 +00:00
|
|
|
|
2007-05-31 12:35:36 +00:00
|
|
|
struct _ClutterStageEGL
|
2007-03-22 18:21:59 +00:00
|
|
|
{
|
2010-06-18 03:38:43 +00:00
|
|
|
#ifdef COGL_HAS_X11_SUPPORT
|
|
|
|
|
2010-08-12 13:05:01 +00:00
|
|
|
ClutterStageX11 parent_instance;
|
|
|
|
|
2010-06-18 03:38:43 +00:00
|
|
|
#else
|
|
|
|
|
2010-08-12 13:05:01 +00:00
|
|
|
GObject parent_instance;
|
|
|
|
|
2010-06-18 03:38:43 +00:00
|
|
|
/* the stage wrapper */
|
|
|
|
ClutterStage *wrapper;
|
|
|
|
|
|
|
|
/* back pointer to the backend */
|
|
|
|
ClutterBackendEGL *backend;
|
|
|
|
|
|
|
|
#endif
|
2010-11-16 13:54:15 +00:00
|
|
|
|
2011-02-25 00:31:41 +00:00
|
|
|
CoglOnscreen *onscreen;
|
|
|
|
|
2010-11-16 13:54:15 +00:00
|
|
|
/* We only enable clipped redraws after 2 frames, since we've seen
|
|
|
|
* a lot of drivers can struggle to get going and may output some
|
|
|
|
* junk frames to start with. */
|
|
|
|
unsigned long frame_count;
|
|
|
|
|
|
|
|
gboolean initialized_redraw_clip;
|
|
|
|
ClutterGeometry bounding_redraw_clip;
|
2007-03-22 18:21:59 +00:00
|
|
|
};
|
|
|
|
|
2007-05-31 12:35:36 +00:00
|
|
|
struct _ClutterStageEGLClass
|
2007-03-22 18:21:59 +00:00
|
|
|
{
|
2010-08-12 13:05:01 +00:00
|
|
|
#ifdef COGL_HAS_X11_SUPPORT
|
2007-11-15 14:45:27 +00:00
|
|
|
ClutterStageX11Class parent_class;
|
2010-08-12 13:05:01 +00:00
|
|
|
#else
|
|
|
|
GObjectClass parent_class;
|
|
|
|
#endif
|
2007-03-22 18:21:59 +00:00
|
|
|
};
|
|
|
|
|
2010-08-13 14:48:30 +00:00
|
|
|
GType _clutter_stage_egl_get_type (void) G_GNUC_CONST;
|
2007-03-22 18:21:59 +00:00
|
|
|
|
2011-02-04 15:09:41 +00:00
|
|
|
G_END_DECLS
|
2010-03-26 02:37:26 +00:00
|
|
|
|
2007-03-22 18:21:59 +00:00
|
|
|
#endif /* __CLUTTER_STAGE_EGL_H__ */
|