Rename PointerEventButton::None to PointerEventButton::Other

And mark the enum non_exhaustive

closes #1903
This commit is contained in:
Olivier Goffart 2023-01-26 11:33:28 +01:00 committed by Olivier Goffart
parent a0fb8bc771
commit ae20ec59c8
12 changed files with 52 additions and 12 deletions

View file

@ -15,7 +15,7 @@ fn enums(path: &Path) -> anyhow::Result<()> {
writeln!(enums, "// This file is auto-generated from {}", file!())?;
writeln!(enums, "namespace slint::cbindgen_private {{")?;
macro_rules! print_enums {
($( $(#[doc = $enum_doc:literal])* enum $Name:ident { $( $(#[doc = $value_doc:literal])* $Value:ident,)* })*) => {
($( $(#[doc = $enum_doc:literal])* $(#[non_exhaustive])? enum $Name:ident { $( $(#[doc = $value_doc:literal])* $Value:ident,)* })*) => {
$(
$(writeln!(enums, "///{}", $enum_doc)?;)*
writeln!(enums, "enum class {} {{", stringify!($Name))?;