## ClutterWaylandSurface ClutterWaylandSurface — An actor which displays the content of a client surface |

## Synopsis

    struct              ClutterWaylandSurface;
    struct              ClutterWaylandSurfaceClass;
    ClutterActor *      clutter_wayland_surface_new         (struct wl_surface *surface);
    gboolean            clutter_wayland_surface_attach_buffer
                                                            (ClutterWaylandSurface *self,
                                                             struct wl_buffer *buffer,
                                                             GError **error);
    void                clutter_wayland_surface_damage_buffer
                                                            (ClutterWaylandSurface *self,
                                                             struct wl_buffer *buffer,
                                                             gint32 x,
                                                             gint32 y,
                                                             gint32 width,
                                                             gint32 height);
    CoglTexture *       clutter_wayland_surface_get_cogl_texture
                                                            (ClutterWaylandSurface *self);
    struct wl_surface * clutter_wayland_surface_get_surface (ClutterWaylandSurface *self);
    void                clutter_wayland_surface_set_surface (ClutterWaylandSurface *self,
                                                             struct wl_surface *surface);

## Description

ClutterWaylandSurface is an actor for displaying the contents of a client surface. It is intended to support developers implementing Clutter based wayland compositors.

## Details

### struct ClutterWaylandSurface

    struct ClutterWaylandSurface {
    };

The ClutterWaylandSurface structure contains only private data

Since 1.10

Stability Level: Unstable

### struct ClutterWaylandSurfaceClass

    struct ClutterWaylandSurfaceClass {
      void (*queue_damage_redraw) (ClutterWaylandSurface *texture,
                                   gint x,
                                   gint y,
                                   gint width,
                                   gint height);
    };

The ClutterWaylandSurfaceClass structure contains only private data

`queue_damage_redraw` () | class handler of the "queue-damage-redraw" signal

Since 1.10

Stability Level: Unstable

### clutter_wayland_surface_new ()

    ClutterActor *      clutter_wayland_surface_new         (struct wl_surface *surface);

Creates a new ClutterWaylandSurface for `surface`

`surface` : | the Wayland surface this actor should represent
Returns : | A new ClutterWaylandSurface representing `surface`

Since 1.8

Stability Level: Unstable

### clutter_wayland_surface_attach_buffer ()

    gboolean            clutter_wayland_surface_attach_buffer
                                                            (ClutterWaylandSurface *self,
                                                             struct wl_buffer *buffer,
                                                             GError **error);

This associates a client's buffer with the ClutterWaylandSurface actor `self`. This will automatically result in `self` being re-drawn with the new buffer contents.

`self` : | A ClutterWaylandSurface actor
`buffer` : | A compositor side struct wl_buffer pointer
`error` : | A GError

Since 1.8

Stability Level: Unstable

### clutter_wayland_surface_damage_buffer ()

    void                clutter_wayland_surface_damage_buffer
                                                            (ClutterWaylandSurface *self,
                                                             struct wl_buffer *buffer,
                                                             gint32 x,
                                                             gint32 y,
                                                             gint32 width,
                                                             gint32 height);

This marks a region of the given `buffer` has having been changed by the client. This will automatically result in the corresponding damaged region of the actor `self` being redrawn.

If multiple regions are changed then this should be called multiple times with different damage rectangles.

`self` : | A ClutterWaylandSurface actor
`buffer` : | A compositor side struct wl_buffer pointer
`x` : | The x coordinate of the damaged rectangle
`y` : | The y coordinate of the damaged rectangle
`width` : | The width of the damaged rectangle
`height` : | The height of the damaged rectangle

Since 1.8

Stability Level: Unstable

### clutter_wayland_surface_get_cogl_texture ()

    CoglTexture *       clutter_wayland_surface_get_cogl_texture
                                                            (ClutterWaylandSurface *self);

Retrieves the Cogl texture with the contents of the Wayland surface.

`self` : | a ClutterWaylandSurface
Returns : | a Cogl texture, or `NULL`. [transfer none]

Since 1.10

### clutter_wayland_surface_get_surface ()

    struct wl_surface * clutter_wayland_surface_get_surface (ClutterWaylandSurface *self);

Retrieves a point to the Wayland surface used by the actor.

`self` : | a ClutterWaylandSurface
Returns : | a wl_surface pointer, or `NULL`. [transfer none]

Since 1.10

### clutter_wayland_surface_set_surface ()

    void                clutter_wayland_surface_set_surface (ClutterWaylandSurface *self,
                                                             struct wl_surface *surface);

Sets the Wayland surface to be used by the actor.

`self` : | a ClutterWaylandSurface
`surface` : | a Wayland wl_surface pointer

Since 1.10