1
0
Fork 0
forked from wry/wry

virtual-output: add support for virtual outputs

This commit is contained in:
Julian Orth 2026-03-17 18:42:49 +01:00
parent c25d17514d
commit 530e66ef78
27 changed files with 1480 additions and 9 deletions

View file

@ -480,6 +480,20 @@ impl ActionParser<'_> {
latch: true,
})
}
fn parse_create_virtual_output(&mut self, ext: &mut Extractor<'_>) -> ParseResult<Self> {
let (name,) = ext.extract((str("name"),))?;
Ok(Action::CreateVirtualOutput {
name: name.value.to_string(),
})
}
fn parse_remove_virtual_output(&mut self, ext: &mut Extractor<'_>) -> ParseResult<Self> {
let (name,) = ext.extract((str("name"),))?;
Ok(Action::RemoveVirtualOutput {
name: name.value.to_string(),
})
}
}
impl Parser for ActionParser<'_> {
@ -539,6 +553,8 @@ impl Parser for ActionParser<'_> {
"copy-mark" => self.parse_copy_mark(&mut ext),
"push-mode" => self.parse_push_mode(&mut ext),
"latch-mode" => self.parse_latch_mode(&mut ext),
"create-virtual-output" => self.parse_create_virtual_output(&mut ext),
"remove-virtual-output" => self.parse_remove_virtual_output(&mut ext),
v => {
ext.ignore_unused();
return Err(ActionParserError::UnknownType(v.to_string()).spanned(ty.span));