ipc: Add CastKind

This commit is contained in:
Ivan Molodetskikh
2026-01-13 13:49:52 +03:00
parent e82830c68c
commit b98f4906da
3 changed files with 27 additions and 1 deletions
+17
View File
@@ -1490,6 +1490,8 @@ pub struct Cast {
///
/// Do not confuse `session_id` with [`stream_id`](Self::stream_id).
pub session_id: u64,
/// Kind of this screencast.
pub kind: CastKind,
/// Target being captured.
pub target: CastTarget,
/// Whether this is a Dynamic Cast Target screencast.
@@ -1505,6 +1507,21 @@ pub struct Cast {
pub is_active: bool,
}
/// Kind of screencast.
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
pub enum CastKind {
/// PipeWire screencast, typically via xdg-desktop-portal-gnome.
PipeWire,
/// wlr-screencopy protocol screencast.
///
/// Tools like wf-recorder, and the xdg-desktop-portal-wlr portal.
///
/// Only wlr-screencopy with damage tracking is reported here. Screencopy without damage is
/// treated as a regular screenshot and not reported as a screencast.
WlrScreencopy,
}
/// Target of a screencast.
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]