diff --git a/wire/wl_registry.txt b/wire/wl_registry.txt index b951da0f..64433d32 100644 --- a/wire/wl_registry.txt +++ b/wire/wl_registry.txt @@ -2,7 +2,7 @@ request bind { name: u32, interface: str, version: u32, - id: id(object), + id: id(object) (new), } event global { diff --git a/xml-to-wire/src/builder.rs b/xml-to-wire/src/builder.rs index ec7ce457..c3438bd9 100644 --- a/xml-to-wire/src/builder.rs +++ b/xml-to-wire/src/builder.rs @@ -90,6 +90,10 @@ fn handle_file_(path: &str) -> Result<(), BuilderError> { args.next(); continue; } + if arg.ty == ArgType::NewId && arg.interface.is_none() { + writeln!(file, " interface: str,")?; + writeln!(file, " version: u32,")?; + } write!(file, " {}: ", arg.name)?; 'ty: { let ty = match arg.ty {