Crate gazo

source ·
Expand description

Gazo is a crate to capture screen pixel data on Wayland compositors that implement the wlr_screencopy protocol, like sway.

Structs

This is the return type for the Ok variant of the capture functions. It contains the dimensions (width and height in pixels) of the capture and a Vec with the captured pixel data as rgb::RGBA8. This can be cast to a slice of u8s using the ComponentBytes trait.

Enums

Enum representing potential errors.

Traits

Casting a slice of RGB/A values to a slice of u8

Functions

This function will capture the entirety of all outputs and composite them into the capture, accounting for transformations, offsets, and scaling.
This function will capture the output specified in the name field of the arguments, returning an error if the name does not match an output.
This function will capture the region of the compositor specified by the region_position and region_size arguments. The region_position should be the top left corner of the region with the region_size expanding from there; these values should be based on the compositor logical output positions and sizes. This will be the same as the default output provided by slurp.