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_X11_H__
23 #define __CLUTTER_STAGE_X11_H__
25 #include <clutter/clutter-group.h>
26 #include <clutter/clutter-stage.h>
28 #include <X11/Xatom.h>
30 #include "clutter-backend-x11.h"
31 #include "cogl/clutter-stage-cogl.h"
35 #define CLUTTER_TYPE_STAGE_X11 (_clutter_stage_x11_get_type ())
36 #define CLUTTER_STAGE_X11(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_STAGE_X11, ClutterStageX11))
37 #define CLUTTER_IS_STAGE_X11(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_STAGE_X11))
38 #define CLUTTER_STAGE_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_STAGE_X11, ClutterStageX11Class))
39 #define CLUTTER_IS_STAGE_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_STAGE_X11))
40 #define CLUTTER_STAGE_X11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_STAGE_X11, ClutterStageX11Class))
42 typedef struct _ClutterStageX11 ClutterStageX11;
43 typedef struct _ClutterStageX11Class ClutterStageX11Class;
47 STAGE_X11_WITHDRAWN = 1 << 1
48 } ClutterStageX11State;
50 struct _ClutterStageX11
52 ClutterStageCogl parent_instance;
56 gint xwin_height; /* FIXME target_width / height */
60 guint clipped_redraws_cool_off;
62 ClutterStageX11State wm_state;
64 guint is_foreign_xwin : 1;
65 guint fullscreening : 1;
66 guint is_cursor_visible : 1;
67 guint viewport_initialized : 1;
68 guint accept_focus : 1;
69 guint fullscreen_on_realize : 1;
72 struct _ClutterStageX11Class
74 ClutterStageCoglClass parent_class;
77 #define CLUTTER_STAGE_X11_EVENT_MASK \
78 StructureNotifyMask | \
81 PropertyChangeMask | \
90 GType _clutter_stage_x11_get_type (void) G_GNUC_CONST;
92 void _clutter_stage_x11_update_foreign_event_mask (CoglOnscreen *onscreen,
95 void _clutter_stage_x11_events_device_changed (ClutterStageX11 *stage_x11,
96 ClutterInputDevice *device,
97 ClutterDeviceManager *device_manager);
99 /* Private to subclasses */
100 void _clutter_stage_x11_set_user_time (ClutterStageX11 *stage_x11,
102 gboolean _clutter_stage_x11_get_root_coords (ClutterStageX11 *stage_x11,
108 #endif /* __CLUTTER_STAGE_H__ */