mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
edfe5cc3b7
This implements the viewporter protocol which offers a cropping and scaling capabilities to wayland clients. There are several use cases for this, for example video players and games, both as a convenience function and as potential performance optimization when paired with hardware overlays etc. https://gitlab.gnome.org/GNOME/mutter/merge_requests/323
78 lines
3.3 KiB
C
78 lines
3.3 KiB
C
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
#ifndef META_SURFACE_ACTOR_PRIVATE_H
|
|
#define META_SURFACE_ACTOR_PRIVATE_H
|
|
|
|
#include "config.h"
|
|
|
|
#include "backends/meta-backend-types.h"
|
|
#include "meta/meta-shaped-texture.h"
|
|
#include "meta/window.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#define META_TYPE_SURFACE_ACTOR (meta_surface_actor_get_type ())
|
|
G_DECLARE_DERIVABLE_TYPE (MetaSurfaceActor,
|
|
meta_surface_actor,
|
|
META, SURFACE_ACTOR,
|
|
ClutterActor)
|
|
|
|
struct _MetaSurfaceActorClass
|
|
{
|
|
/*< private >*/
|
|
ClutterActorClass parent_class;
|
|
|
|
void (* process_damage) (MetaSurfaceActor *actor,
|
|
int x, int y, int width, int height);
|
|
void (* pre_paint) (MetaSurfaceActor *actor);
|
|
gboolean (* is_visible) (MetaSurfaceActor *actor);
|
|
|
|
gboolean (* should_unredirect) (MetaSurfaceActor *actor);
|
|
void (* set_unredirected) (MetaSurfaceActor *actor,
|
|
gboolean unredirected);
|
|
gboolean (* is_unredirected) (MetaSurfaceActor *actor);
|
|
|
|
MetaWindow *(* get_window) (MetaSurfaceActor *actor);
|
|
};
|
|
|
|
cairo_surface_t *meta_surface_actor_get_image (MetaSurfaceActor *self,
|
|
cairo_rectangle_int_t *clip);
|
|
|
|
MetaShapedTexture *meta_surface_actor_get_texture (MetaSurfaceActor *self);
|
|
MetaWindow *meta_surface_actor_get_window (MetaSurfaceActor *self);
|
|
|
|
gboolean meta_surface_actor_is_obscured (MetaSurfaceActor *self);
|
|
|
|
void meta_surface_actor_set_input_region (MetaSurfaceActor *self,
|
|
cairo_region_t *region);
|
|
void meta_surface_actor_set_opaque_region (MetaSurfaceActor *self,
|
|
cairo_region_t *region);
|
|
cairo_region_t * meta_surface_actor_get_opaque_region (MetaSurfaceActor *self);
|
|
|
|
void meta_surface_actor_process_damage (MetaSurfaceActor *actor,
|
|
int x, int y, int width, int height);
|
|
void meta_surface_actor_pre_paint (MetaSurfaceActor *actor);
|
|
gboolean meta_surface_actor_is_argb32 (MetaSurfaceActor *actor);
|
|
gboolean meta_surface_actor_is_visible (MetaSurfaceActor *actor);
|
|
|
|
void meta_surface_actor_set_frozen (MetaSurfaceActor *actor,
|
|
gboolean frozen);
|
|
|
|
gboolean meta_surface_actor_should_unredirect (MetaSurfaceActor *actor);
|
|
void meta_surface_actor_set_unredirected (MetaSurfaceActor *actor,
|
|
gboolean unredirected);
|
|
gboolean meta_surface_actor_is_unredirected (MetaSurfaceActor *actor);
|
|
|
|
void meta_surface_actor_set_transform (MetaSurfaceActor *self,
|
|
MetaMonitorTransform transform);
|
|
void meta_surface_actor_set_viewport_src_rect (MetaSurfaceActor *self,
|
|
ClutterRect *src_rect);
|
|
void meta_surface_actor_reset_viewport_src_rect (MetaSurfaceActor *self);
|
|
void meta_surface_actor_set_viewport_dst_size (MetaSurfaceActor *self,
|
|
int dst_width,
|
|
int dst_height);
|
|
void meta_surface_actor_reset_viewport_dst_size (MetaSurfaceActor *self);
|
|
G_END_DECLS
|
|
|
|
#endif /* META_SURFACE_ACTOR_PRIVATE_H */
|