2 * An OpenGL based 'interactive canvas' library.
3 * Authored By Matthew Allum <mallum@openedhand.com>
4 * Copyright (C) 2006-2007 OpenedHand
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef __CLUTTER_STAGE_GLX_H__
23 #define __CLUTTER_STAGE_GLX_H__
25 #include <glib-object.h>
26 #include <clutter/clutter-stage.h>
28 #include <X11/Xatom.h>
32 #include "clutter-backend-glx.h"
33 #include "../x11/clutter-stage-x11.h"
37 #define CLUTTER_TYPE_STAGE_GLX (_clutter_stage_glx_get_type ())
38 #define CLUTTER_STAGE_GLX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_STAGE_GLX, ClutterStageGLX))
39 #define CLUTTER_IS_STAGE_GLX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_STAGE_GLX))
40 #define CLUTTER_STAGE_GLX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_STAGE_GLX, ClutterStageGLXClass))
41 #define CLUTTER_IS_STAGE_GLX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_STAGE_GLX))
42 #define CLUTTER_STAGE_GLX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_STAGE_GLX, ClutterStageGLXClass))
44 typedef struct _ClutterStageGLX ClutterStageGLX;
45 typedef struct _ClutterStageGLXClass ClutterStageGLXClass;
47 struct _ClutterStageGLX
49 ClutterStageX11 parent_instance;
53 CoglOnscreen *onscreen;
55 unsigned int swap_callback_id;
57 /* We only enable clipped redraws after 2 frames, since we've seen
58 * a lot of drivers can struggle to get going and may output some
59 * junk frames to start with.
63 ClutterGeometry bounding_redraw_clip;
65 guint initialized_redraw_clip : 1;
68 struct _ClutterStageGLXClass
70 ClutterStageX11Class parent_class;
73 GType _clutter_stage_glx_get_type (void) G_GNUC_CONST;
77 #endif /* __CLUTTER_STAGE_H__ */