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
Vecwith the captured pixel data asrgb::RGBA8. This can be cast to a slice ofu8s using theComponentBytestrait.
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
namefield 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_positionandregion_sizearguments. Theregion_positionshould be the top left corner of the region with theregion_sizeexpanding 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.