mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
a8e631543e
Since Cogl has started restricting what cogl 1.x api is exposed when COGL_ENABLE_EXPERIMENTAL_2_0_API is defined and since we build all Clutter internals with COGL_ENABLE_EXPERIMENTAL_2_0_API defined this patch makes a first pass at reducing our internal use of the Cogl 1.x api. The most notable api that's no longer exposed to us internally is the cogl_material_ api so this switches all Clutter internals to use the cogl_pipeline_ api instead. This patch also makes quite a bit of progress removing internal uses of CoglHandle although there is still more to go.
140 lines
7.1 KiB
C
140 lines
7.1 KiB
C
#ifndef __CLUTTER_STAGE_WINDOW_H__
|
|
#define __CLUTTER_STAGE_WINDOW_H__
|
|
|
|
#include <clutter/clutter-actor.h>
|
|
#include <cogl/cogl.h>
|
|
#include <cairo.h>
|
|
|
|
/* XXX: Some of the private parts in this header expect the
|
|
* CoglFramebuffer typedef from Cogl, but its possible for this header
|
|
* to be included without the experimental Cogl api having been
|
|
* selected by defining COGL_ENABLE_EXPERIMENTAL_API or
|
|
* COGL_ENABLE_EXPERIMENTAL_2_0_API.
|
|
*
|
|
* We declare a place holder type ourselves in this case...
|
|
*/
|
|
#ifndef COGL_ENABLE_EXPERIMENTAL_API
|
|
typedef struct _CoglFramebuffer CoglFramebuffer;
|
|
#endif
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#define CLUTTER_TYPE_STAGE_WINDOW (clutter_stage_window_get_type ())
|
|
#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))
|
|
|
|
/**
|
|
* ClutterStageWindow: (skip)
|
|
*
|
|
* <structname>ClutterStageWindow</structname> is an opaque structure
|
|
* whose members should not be accessed directly
|
|
*
|
|
* Since: 0.8
|
|
*/
|
|
typedef struct _ClutterStageWindow ClutterStageWindow; /* dummy */
|
|
typedef struct _ClutterStageWindowIface ClutterStageWindowIface;
|
|
|
|
/**
|
|
* ClutterStageWindowIface: (skip)
|
|
*
|
|
* The interface implemented by backends for stage windows
|
|
*
|
|
* Since: 0.8
|
|
*/
|
|
struct _ClutterStageWindowIface
|
|
{
|
|
/*< private >*/
|
|
GTypeInterface parent_iface;
|
|
|
|
ClutterActor *(* get_wrapper) (ClutterStageWindow *stage_window);
|
|
|
|
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);
|
|
|
|
gboolean (* realize) (ClutterStageWindow *stage_window);
|
|
void (* unrealize) (ClutterStageWindow *stage_window);
|
|
|
|
void (* show) (ClutterStageWindow *stage_window,
|
|
gboolean do_raise);
|
|
void (* hide) (ClutterStageWindow *stage_window);
|
|
|
|
void (* resize) (ClutterStageWindow *stage_window,
|
|
gint width,
|
|
gint height);
|
|
void (* get_geometry) (ClutterStageWindow *stage_window,
|
|
cairo_rectangle_int_t *geometry);
|
|
|
|
int (* get_pending_swaps) (ClutterStageWindow *stage_window);
|
|
|
|
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,
|
|
cairo_rectangle_int_t *clip);
|
|
|
|
|
|
void (* set_accept_focus) (ClutterStageWindow *stage_window,
|
|
gboolean accept_focus);
|
|
|
|
void (* redraw) (ClutterStageWindow *stage_window);
|
|
|
|
CoglFramebuffer *(* get_active_framebuffer) (ClutterStageWindow *stage_window);
|
|
|
|
gboolean (* can_clip_redraws) (ClutterStageWindow *stage_window);
|
|
};
|
|
|
|
GType clutter_stage_window_get_type (void) G_GNUC_CONST;
|
|
|
|
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,
|
|
cairo_rectangle_int_t *geometry);
|
|
int _clutter_stage_window_get_pending_swaps (ClutterStageWindow *window);
|
|
|
|
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,
|
|
cairo_rectangle_int_t *clip);
|
|
|
|
void _clutter_stage_window_set_accept_focus (ClutterStageWindow *window,
|
|
gboolean accept_focus);
|
|
|
|
void _clutter_stage_window_redraw (ClutterStageWindow *window);
|
|
|
|
CoglFramebuffer *_clutter_stage_window_get_active_framebuffer (ClutterStageWindow *window);
|
|
|
|
gboolean _clutter_stage_window_can_clip_redraws (ClutterStageWindow *window);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __CLUTTER_STAGE_WINDOW_H__ */
|