Product SiteDocumentation Site

A.12. wl_surface - an onscreen surface

A surface. This is an image that is displayed on the screen. It has a location, size and pixel contents.

A.12.1. Requests provided by wl_surface

A.12.1.1. wl_surface::destroy - delete surface

Deletes the surface and invalidates its object id.

A.12.1.2. wl_surface::attach - set the surface contents

Copy the contents of a buffer into this surface. The x and y arguments specify the location of the new buffers upper left corner, relative to the old buffers upper left corner.
wl_surface::attach arguments
buffer
Type: object
x
Type: int
y
Type: int

A.12.1.3. wl_surface::damage - mark part of the surface damaged

After attaching a new buffer, this request is used to describe the regions where the new buffer is different from the previous buffer and needs to be repainted. Coordinates are relative to the new buffer.
wl_surface::damage arguments
x
Type: int
y
Type: int
width
Type: int
height
Type: int

A.12.1.4. wl_surface::frame - request repaint feedback

Request notification when the next frame is displayed. Useful for throttling redrawing operations, and driving animations. The notification will only be posted for one frame unless requested again.
wl_surface::frame arguments
callback
Type: new_id