It could be Typescript or Rust. But probably a lot of oter languages have enums expressed like this too.
Likely not C, because no semicolon, and no prefix on the variants.
It's been a while since I looked into details of wayland, but one thing I recall is that a lot of things depend on the specific compositor / desktop environment you are using.
X is very open: you can easily query open windows etc, while on wayland things are less standardized / more hidden.
Confirmation is not very effective, except if you use the function rarely. If you use it a lot, confirming just goes into musle memory.
The "shit, i didn't mean to do that" moment is really when concious thought kicks in again. That's why undo is so great.
It could be Typescript or Rust. But probably a lot of oter languages have enums expressed like this too. Likely not C, because no semicolon, and no prefix on the variants.