Expand description
§XDG ScreenCast Portal utilities
This module defines an interface for interacting with the ScreenCast portal.
The general interaction pattern with the ScreenCast
portal is to open a
session, set which source types are of interest, and call start()
.
let screen_cast = ScreenCast::new()?.start(None)?;
In more complex cases you can modify the ScreenCast
before starting it:
let mut screen_cast = ScreenCast::new()?;
// Set which source types to allow, and enable multiple items to be shared.
screen_cast.set_source_types(SourceType::MONITOR);
screen_cast.enable_multiple();
screen_cast.set_cursor_mode(CursorMode::HIDDEN);
// If you have a window handle you can tie the dialog to it
let screen_cast = screen_cast.start(Some("wayland:<window_id>"))?;
Structs§
- Active
Screen Cast - An active ScreenCast session. This holds a file descriptor for connecting to PipeWire along with metadata for the active streams.
- Cursor
Mode - Cursor Mode Bitflags
- Screen
Cast - An un-opened screencast session. This can be queried for the supported
capture source types, and used to configure which source types to prompt
for. Each
ScreenCast
can be mde active once by callingstart()
. - Screen
Cast Stream - A single active stream
- Source
Type - Source Type Bitflags
Enums§
- Portal
Error - Desktop portal error. This could be an error from the underlying
dbus
library, a generic error string, or some structured error.