2008-04-04 15:02:11 +00:00
|
|
|
#ifndef __CLUTTER_STAGE_WINDOW_H__
|
|
|
|
#define __CLUTTER_STAGE_WINDOW_H__
|
|
|
|
|
2011-03-10 22:05:03 +00:00
|
|
|
#include <cogl/cogl.h>
|
2012-03-01 11:06:04 +00:00
|
|
|
#include <clutter/clutter-types.h>
|
Introduce regional stage rendering
Add support for drawing a stage using multiple framebuffers each making
up one part of the stage. This works by the stage backend
(ClutterStageWindow) providing a list of views which will be for
splitting up the stage in different regions.
A view layout, for now, is a set of rectangles. The stage window (i.e.
stage "backend" will use this information when drawing a frame, using
one framebuffer for each view. The scene graph is adapted to explictly
take a view when painting the stage. It will use this view, its
assigned framebuffer and layout to offset and clip the drawing
accordingly.
This effectively removes any notion of "stage framebuffer", since each
stage now may consist of multiple framebuffers. Therefore, API
involving this has been deprecated and made no-ops; namely
clutter_stage_ensure_context(). Callers are now assumed to either
always use a framebuffer reference explicitly, or push/pop the
framebuffer of a given view where the code has not yet changed to use
the explicit-buffer-using cogl API.
Currently only the nested X11 backend supports this mode fully, and the
per view framebuffers are all offscreen. Upon frame completion, it'll
blit each view's framebuffer onto the onscreen framebuffer before
swapping.
Other backends (X11 CM and native/KMS) are adapted to manage a
full-stage view. The X11 CM backend will continue to use this method,
while the native/KMS backend will be adopted to use multiple view
drawing.
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-05-27 11:09:24 +08:00
|
|
|
#include "clutter/clutter-stage-view.h"
|
2012-02-21 15:55:51 +00:00
|
|
|
|
2008-04-04 15:02:11 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2012-03-01 11:06:04 +00:00
|
|
|
#define CLUTTER_TYPE_STAGE_WINDOW (_clutter_stage_window_get_type ())
|
2008-04-04 15:02:11 +00:00
|
|
|
#define CLUTTER_STAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_STAGE_WINDOW, ClutterStageWindow))
|
|
|
|
#define CLUTTER_IS_STAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_STAGE_WINDOW))
|
|
|
|
#define CLUTTER_STAGE_WINDOW_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_STAGE_WINDOW, ClutterStageWindowIface))
|
|
|
|
|
2012-03-01 11:06:04 +00:00
|
|
|
/*
|
2010-12-10 17:15:39 +00:00
|
|
|
* ClutterStageWindow: (skip)
|
2010-09-08 16:41:47 +01:00
|
|
|
*
|
2014-03-18 14:14:22 +00:00
|
|
|
* #ClutterStageWindow is an opaque structure
|
2010-09-08 16:41:47 +01:00
|
|
|
* whose members should not be accessed directly
|
|
|
|
*
|
|
|
|
* Since: 0.8
|
|
|
|
*/
|
2008-04-04 15:02:11 +00:00
|
|
|
typedef struct _ClutterStageWindow ClutterStageWindow; /* dummy */
|
|
|
|
typedef struct _ClutterStageWindowIface ClutterStageWindowIface;
|
|
|
|
|
2012-03-01 11:06:04 +00:00
|
|
|
/*
|
2010-12-10 17:15:39 +00:00
|
|
|
* ClutterStageWindowIface: (skip)
|
2010-09-08 16:41:47 +01:00
|
|
|
*
|
|
|
|
* The interface implemented by backends for stage windows
|
|
|
|
*
|
|
|
|
* Since: 0.8
|
|
|
|
*/
|
2008-04-04 15:02:11 +00:00
|
|
|
struct _ClutterStageWindowIface
|
|
|
|
{
|
2010-09-08 16:41:47 +01:00
|
|
|
/*< private >*/
|
2008-04-04 15:02:11 +00:00
|
|
|
GTypeInterface parent_iface;
|
|
|
|
|
2011-03-10 22:05:03 +00:00
|
|
|
ClutterActor *(* get_wrapper) (ClutterStageWindow *stage_window);
|
2009-11-30 17:47:55 +00:00
|
|
|
|
2011-03-10 22:05:03 +00:00
|
|
|
void (* set_title) (ClutterStageWindow *stage_window,
|
|
|
|
const gchar *title);
|
|
|
|
void (* set_fullscreen) (ClutterStageWindow *stage_window,
|
|
|
|
gboolean is_fullscreen);
|
|
|
|
void (* set_cursor_visible) (ClutterStageWindow *stage_window,
|
|
|
|
gboolean cursor_visible);
|
|
|
|
void (* set_user_resizable) (ClutterStageWindow *stage_window,
|
|
|
|
gboolean is_resizable);
|
2009-11-30 17:47:55 +00:00
|
|
|
|
2011-03-10 22:05:03 +00:00
|
|
|
gboolean (* realize) (ClutterStageWindow *stage_window);
|
|
|
|
void (* unrealize) (ClutterStageWindow *stage_window);
|
2009-11-30 17:47:55 +00:00
|
|
|
|
2011-03-10 22:05:03 +00:00
|
|
|
void (* show) (ClutterStageWindow *stage_window,
|
|
|
|
gboolean do_raise);
|
|
|
|
void (* hide) (ClutterStageWindow *stage_window);
|
2009-11-30 17:47:55 +00:00
|
|
|
|
2011-03-10 22:05:03 +00:00
|
|
|
void (* resize) (ClutterStageWindow *stage_window,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
|
|
|
void (* get_geometry) (ClutterStageWindow *stage_window,
|
2011-08-16 16:01:22 +01:00
|
|
|
cairo_rectangle_int_t *geometry);
|
2009-11-30 17:47:55 +00:00
|
|
|
|
2012-11-08 12:42:24 -05:00
|
|
|
void (* schedule_update) (ClutterStageWindow *stage_window,
|
|
|
|
int sync_delay);
|
|
|
|
gint64 (* get_update_time) (ClutterStageWindow *stage_window);
|
|
|
|
void (* clear_update_time) (ClutterStageWindow *stage_window);
|
2009-11-30 17:47:55 +00:00
|
|
|
|
2011-08-16 16:01:22 +01:00
|
|
|
void (* add_redraw_clip) (ClutterStageWindow *stage_window,
|
|
|
|
cairo_rectangle_int_t *stage_rectangle);
|
|
|
|
gboolean (* has_redraw_clips) (ClutterStageWindow *stage_window);
|
|
|
|
gboolean (* ignoring_redraw_clips) (ClutterStageWindow *stage_window);
|
|
|
|
gboolean (* get_redraw_clip_bounds) (ClutterStageWindow *stage_window,
|
2011-07-12 17:16:43 +01:00
|
|
|
cairo_rectangle_int_t *clip);
|
|
|
|
|
2010-12-28 17:36:27 +00:00
|
|
|
|
2011-03-10 22:05:03 +00:00
|
|
|
void (* set_accept_focus) (ClutterStageWindow *stage_window,
|
|
|
|
gboolean accept_focus);
|
2011-02-04 15:08:48 +00:00
|
|
|
|
2011-03-10 22:05:03 +00:00
|
|
|
void (* redraw) (ClutterStageWindow *stage_window);
|
|
|
|
|
2013-02-06 11:05:58 +01:00
|
|
|
void (* get_dirty_pixel) (ClutterStageWindow *stage_window,
|
Introduce regional stage rendering
Add support for drawing a stage using multiple framebuffers each making
up one part of the stage. This works by the stage backend
(ClutterStageWindow) providing a list of views which will be for
splitting up the stage in different regions.
A view layout, for now, is a set of rectangles. The stage window (i.e.
stage "backend" will use this information when drawing a frame, using
one framebuffer for each view. The scene graph is adapted to explictly
take a view when painting the stage. It will use this view, its
assigned framebuffer and layout to offset and clip the drawing
accordingly.
This effectively removes any notion of "stage framebuffer", since each
stage now may consist of multiple framebuffers. Therefore, API
involving this has been deprecated and made no-ops; namely
clutter_stage_ensure_context(). Callers are now assumed to either
always use a framebuffer reference explicitly, or push/pop the
framebuffer of a given view where the code has not yet changed to use
the explicit-buffer-using cogl API.
Currently only the nested X11 backend supports this mode fully, and the
per view framebuffers are all offscreen. Upon frame completion, it'll
blit each view's framebuffer onto the onscreen framebuffer before
swapping.
Other backends (X11 CM and native/KMS) are adapted to manage a
full-stage view. The X11 CM backend will continue to use this method,
while the native/KMS backend will be adopted to use multiple view
drawing.
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-05-27 11:09:24 +08:00
|
|
|
ClutterStageView *view,
|
2013-02-06 11:05:58 +01:00
|
|
|
int *x, int *y);
|
|
|
|
|
2011-09-30 13:58:40 +01:00
|
|
|
gboolean (* can_clip_redraws) (ClutterStageWindow *stage_window);
|
2013-08-14 11:17:09 +01:00
|
|
|
|
|
|
|
void (* set_scale_factor) (ClutterStageWindow *stage_window,
|
|
|
|
int factor);
|
|
|
|
int (* get_scale_factor) (ClutterStageWindow *stage_window);
|
Introduce regional stage rendering
Add support for drawing a stage using multiple framebuffers each making
up one part of the stage. This works by the stage backend
(ClutterStageWindow) providing a list of views which will be for
splitting up the stage in different regions.
A view layout, for now, is a set of rectangles. The stage window (i.e.
stage "backend" will use this information when drawing a frame, using
one framebuffer for each view. The scene graph is adapted to explictly
take a view when painting the stage. It will use this view, its
assigned framebuffer and layout to offset and clip the drawing
accordingly.
This effectively removes any notion of "stage framebuffer", since each
stage now may consist of multiple framebuffers. Therefore, API
involving this has been deprecated and made no-ops; namely
clutter_stage_ensure_context(). Callers are now assumed to either
always use a framebuffer reference explicitly, or push/pop the
framebuffer of a given view where the code has not yet changed to use
the explicit-buffer-using cogl API.
Currently only the nested X11 backend supports this mode fully, and the
per view framebuffers are all offscreen. Upon frame completion, it'll
blit each view's framebuffer onto the onscreen framebuffer before
swapping.
Other backends (X11 CM and native/KMS) are adapted to manage a
full-stage view. The X11 CM backend will continue to use this method,
while the native/KMS backend will be adopted to use multiple view
drawing.
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-05-27 11:09:24 +08:00
|
|
|
GList *(* get_views) (ClutterStageWindow *stage_window);
|
2016-05-25 12:44:52 +08:00
|
|
|
int64_t (* get_frame_counter) (ClutterStageWindow *stage_window);
|
Introduce regional stage rendering
Add support for drawing a stage using multiple framebuffers each making
up one part of the stage. This works by the stage backend
(ClutterStageWindow) providing a list of views which will be for
splitting up the stage in different regions.
A view layout, for now, is a set of rectangles. The stage window (i.e.
stage "backend" will use this information when drawing a frame, using
one framebuffer for each view. The scene graph is adapted to explictly
take a view when painting the stage. It will use this view, its
assigned framebuffer and layout to offset and clip the drawing
accordingly.
This effectively removes any notion of "stage framebuffer", since each
stage now may consist of multiple framebuffers. Therefore, API
involving this has been deprecated and made no-ops; namely
clutter_stage_ensure_context(). Callers are now assumed to either
always use a framebuffer reference explicitly, or push/pop the
framebuffer of a given view where the code has not yet changed to use
the explicit-buffer-using cogl API.
Currently only the nested X11 backend supports this mode fully, and the
per view framebuffers are all offscreen. Upon frame completion, it'll
blit each view's framebuffer onto the onscreen framebuffer before
swapping.
Other backends (X11 CM and native/KMS) are adapted to manage a
full-stage view. The X11 CM backend will continue to use this method,
while the native/KMS backend will be adopted to use multiple view
drawing.
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-05-27 11:09:24 +08:00
|
|
|
void (* finish_frame) (ClutterStageWindow *stage_window);
|
2008-04-04 15:02:11 +00:00
|
|
|
};
|
|
|
|
|
2016-05-20 16:43:26 +08:00
|
|
|
CLUTTER_AVAILABLE_IN_MUTTER
|
2012-03-01 11:06:04 +00:00
|
|
|
GType _clutter_stage_window_get_type (void) G_GNUC_CONST;
|
2008-04-04 15:02:11 +00:00
|
|
|
|
2011-03-10 22:05:03 +00:00
|
|
|
ClutterActor * _clutter_stage_window_get_wrapper (ClutterStageWindow *window);
|
|
|
|
|
|
|
|
void _clutter_stage_window_set_title (ClutterStageWindow *window,
|
|
|
|
const gchar *title);
|
|
|
|
void _clutter_stage_window_set_fullscreen (ClutterStageWindow *window,
|
|
|
|
gboolean is_fullscreen);
|
|
|
|
void _clutter_stage_window_set_cursor_visible (ClutterStageWindow *window,
|
|
|
|
gboolean is_visible);
|
|
|
|
void _clutter_stage_window_set_user_resizable (ClutterStageWindow *window,
|
|
|
|
gboolean is_resizable);
|
|
|
|
|
|
|
|
gboolean _clutter_stage_window_realize (ClutterStageWindow *window);
|
|
|
|
void _clutter_stage_window_unrealize (ClutterStageWindow *window);
|
|
|
|
|
|
|
|
void _clutter_stage_window_show (ClutterStageWindow *window,
|
|
|
|
gboolean do_raise);
|
|
|
|
void _clutter_stage_window_hide (ClutterStageWindow *window);
|
|
|
|
|
|
|
|
void _clutter_stage_window_resize (ClutterStageWindow *window,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
|
|
|
void _clutter_stage_window_get_geometry (ClutterStageWindow *window,
|
2011-08-16 16:01:22 +01:00
|
|
|
cairo_rectangle_int_t *geometry);
|
2012-11-08 12:42:24 -05:00
|
|
|
void _clutter_stage_window_schedule_update (ClutterStageWindow *window,
|
|
|
|
int sync_delay);
|
|
|
|
gint64 _clutter_stage_window_get_update_time (ClutterStageWindow *window);
|
|
|
|
void _clutter_stage_window_clear_update_time (ClutterStageWindow *window);
|
2011-03-10 22:05:03 +00:00
|
|
|
|
2011-08-16 16:01:22 +01:00
|
|
|
void _clutter_stage_window_add_redraw_clip (ClutterStageWindow *window,
|
|
|
|
cairo_rectangle_int_t *stage_clip);
|
|
|
|
gboolean _clutter_stage_window_has_redraw_clips (ClutterStageWindow *window);
|
|
|
|
gboolean _clutter_stage_window_ignoring_redraw_clips (ClutterStageWindow *window);
|
|
|
|
gboolean _clutter_stage_window_get_redraw_clip_bounds (ClutterStageWindow *window,
|
2011-07-12 17:16:43 +01:00
|
|
|
cairo_rectangle_int_t *clip);
|
2011-03-10 22:05:03 +00:00
|
|
|
|
|
|
|
void _clutter_stage_window_set_accept_focus (ClutterStageWindow *window,
|
2011-08-16 16:01:22 +01:00
|
|
|
gboolean accept_focus);
|
2010-12-28 17:36:27 +00:00
|
|
|
|
2011-03-10 22:05:03 +00:00
|
|
|
void _clutter_stage_window_redraw (ClutterStageWindow *window);
|
|
|
|
|
2013-02-06 11:05:58 +01:00
|
|
|
void _clutter_stage_window_get_dirty_pixel (ClutterStageWindow *window,
|
Introduce regional stage rendering
Add support for drawing a stage using multiple framebuffers each making
up one part of the stage. This works by the stage backend
(ClutterStageWindow) providing a list of views which will be for
splitting up the stage in different regions.
A view layout, for now, is a set of rectangles. The stage window (i.e.
stage "backend" will use this information when drawing a frame, using
one framebuffer for each view. The scene graph is adapted to explictly
take a view when painting the stage. It will use this view, its
assigned framebuffer and layout to offset and clip the drawing
accordingly.
This effectively removes any notion of "stage framebuffer", since each
stage now may consist of multiple framebuffers. Therefore, API
involving this has been deprecated and made no-ops; namely
clutter_stage_ensure_context(). Callers are now assumed to either
always use a framebuffer reference explicitly, or push/pop the
framebuffer of a given view where the code has not yet changed to use
the explicit-buffer-using cogl API.
Currently only the nested X11 backend supports this mode fully, and the
per view framebuffers are all offscreen. Upon frame completion, it'll
blit each view's framebuffer onto the onscreen framebuffer before
swapping.
Other backends (X11 CM and native/KMS) are adapted to manage a
full-stage view. The X11 CM backend will continue to use this method,
while the native/KMS backend will be adopted to use multiple view
drawing.
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-05-27 11:09:24 +08:00
|
|
|
ClutterStageView *view,
|
2013-02-06 11:05:58 +01:00
|
|
|
int *x, int *y);
|
|
|
|
|
2011-09-30 13:58:40 +01:00
|
|
|
gboolean _clutter_stage_window_can_clip_redraws (ClutterStageWindow *window);
|
|
|
|
|
2013-08-14 11:17:09 +01:00
|
|
|
void _clutter_stage_window_set_scale_factor (ClutterStageWindow *window,
|
|
|
|
int factor);
|
|
|
|
int _clutter_stage_window_get_scale_factor (ClutterStageWindow *window);
|
|
|
|
|
Introduce regional stage rendering
Add support for drawing a stage using multiple framebuffers each making
up one part of the stage. This works by the stage backend
(ClutterStageWindow) providing a list of views which will be for
splitting up the stage in different regions.
A view layout, for now, is a set of rectangles. The stage window (i.e.
stage "backend" will use this information when drawing a frame, using
one framebuffer for each view. The scene graph is adapted to explictly
take a view when painting the stage. It will use this view, its
assigned framebuffer and layout to offset and clip the drawing
accordingly.
This effectively removes any notion of "stage framebuffer", since each
stage now may consist of multiple framebuffers. Therefore, API
involving this has been deprecated and made no-ops; namely
clutter_stage_ensure_context(). Callers are now assumed to either
always use a framebuffer reference explicitly, or push/pop the
framebuffer of a given view where the code has not yet changed to use
the explicit-buffer-using cogl API.
Currently only the nested X11 backend supports this mode fully, and the
per view framebuffers are all offscreen. Upon frame completion, it'll
blit each view's framebuffer onto the onscreen framebuffer before
swapping.
Other backends (X11 CM and native/KMS) are adapted to manage a
full-stage view. The X11 CM backend will continue to use this method,
while the native/KMS backend will be adopted to use multiple view
drawing.
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-05-27 11:09:24 +08:00
|
|
|
GList * _clutter_stage_window_get_views (ClutterStageWindow *window);
|
2016-05-25 12:44:52 +08:00
|
|
|
|
Introduce regional stage rendering
Add support for drawing a stage using multiple framebuffers each making
up one part of the stage. This works by the stage backend
(ClutterStageWindow) providing a list of views which will be for
splitting up the stage in different regions.
A view layout, for now, is a set of rectangles. The stage window (i.e.
stage "backend" will use this information when drawing a frame, using
one framebuffer for each view. The scene graph is adapted to explictly
take a view when painting the stage. It will use this view, its
assigned framebuffer and layout to offset and clip the drawing
accordingly.
This effectively removes any notion of "stage framebuffer", since each
stage now may consist of multiple framebuffers. Therefore, API
involving this has been deprecated and made no-ops; namely
clutter_stage_ensure_context(). Callers are now assumed to either
always use a framebuffer reference explicitly, or push/pop the
framebuffer of a given view where the code has not yet changed to use
the explicit-buffer-using cogl API.
Currently only the nested X11 backend supports this mode fully, and the
per view framebuffers are all offscreen. Upon frame completion, it'll
blit each view's framebuffer onto the onscreen framebuffer before
swapping.
Other backends (X11 CM and native/KMS) are adapted to manage a
full-stage view. The X11 CM backend will continue to use this method,
while the native/KMS backend will be adopted to use multiple view
drawing.
https://bugzilla.gnome.org/show_bug.cgi?id=768976
2016-05-27 11:09:24 +08:00
|
|
|
void _clutter_stage_window_finish_frame (ClutterStageWindow *window);
|
|
|
|
|
2016-05-25 12:44:52 +08:00
|
|
|
int64_t _clutter_stage_window_get_frame_counter (ClutterStageWindow *window);
|
|
|
|
|
2008-04-04 15:02:11 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __CLUTTER_STAGE_WINDOW_H__ */
|