Expand description
Gazo is a crate to capture screen pixel data on Wayland compositors that implement the wlr_screencopy protocol, like sway.
Structs§
- Capture
- 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 asrgb::RGBA8
. This can be cast to a slice ofu8
s using theComponentBytes
trait.
Enums§
- Error
- Enum representing potential errors.
Traits§
- Component
Bytes - Use
::bytemuck::cast_slice()
instead.
Functions§
- capture_
all_ outputs - This function will capture the entirety of all outputs and composite them into the capture, accounting for transformations, offsets, and scaling.
- capture_
output - 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. - capture_
region - This function will capture the region of the compositor specified by the
region_position
andregion_size
arguments. Theregion_position
should be the top left corner of the region with theregion_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.