From 80317994ba8a8b7f72c0bf0d824e4ade59a4b6c8 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Thu, 9 Apr 2026 23:07:23 +0200 Subject: fix build on linux --- .../Protocols/RiverLayerShellV1/Interface.lean | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 lib/Wayland/Protocols/RiverLayerShellV1/Interface.lean (limited to 'lib/Wayland/Protocols/RiverLayerShellV1/Interface.lean') diff --git a/lib/Wayland/Protocols/RiverLayerShellV1/Interface.lean b/lib/Wayland/Protocols/RiverLayerShellV1/Interface.lean new file mode 100644 index 0000000..5e0cb2d --- /dev/null +++ b/lib/Wayland/Protocols/RiverLayerShellV1/Interface.lean @@ -0,0 +1,123 @@ +import Wayland.Display +import Wayland.Protocols.RiverLayerShellV1.Header + +namespace Wayland.Protocols + +inductive RiverLayerShellV1.Event where + +inductive RiverLayerShellOutputV1.Event where + | nonExclusiveArea + (x : Int32) + (y : Int32) + (width : Int32) + (height : Int32) + +inductive RiverLayerShellSeatV1.Event where + | focusExclusive + | focusNonExclusive + | focusNone + + +instance instInterfaceRiverLayerShellV1 : Interface RiverLayerShellV1.name where + event := RiverLayerShellV1.Event + version := 1 + requests := #[ + { + name := "destroy" + args := #[] + since := 1 + isDestructor := true + }, + { + name := "get_output" + args := #[.newID (.some "river_layer_shell_output_v1"), .object .notNull (.some "river_output_v1")] + since := 1 + isDestructor := false + }, + { + name := "get_seat" + args := #[.newID (.some "river_layer_shell_seat_v1"), .object .notNull (.some "river_seat_v1")] + since := 1 + isDestructor := false + }, + ] + events := #[ + ] + demarshalEvent + | _ => throw s!"Received invalid opcode" + +instance instInterfaceRiverLayerShellOutputV1 : Interface RiverLayerShellOutputV1.name where + event := RiverLayerShellOutputV1.Event + version := 1 + requests := #[ + { + name := "destroy" + args := #[] + since := 1 + isDestructor := true + }, + { + name := "set_default" + args := #[] + since := 1 + isDestructor := false + }, + ] + events := #[ + { + name := "non_exclusive_area" + args := #[.int, .int, .int, .int] + since := 1 + isDestructor := false + }, + ] + demarshalEvent + | 0 => do + return .nonExclusiveArea + (← Marshallable.demarshal .int) + (← Marshallable.demarshal .int) + (← Marshallable.demarshal .int) + (← Marshallable.demarshal .int) + | _ => throw s!"Received invalid opcode" + +instance instInterfaceRiverLayerShellSeatV1 : Interface RiverLayerShellSeatV1.name where + event := RiverLayerShellSeatV1.Event + version := 1 + requests := #[ + { + name := "destroy" + args := #[] + since := 1 + isDestructor := true + }, + ] + events := #[ + { + name := "focus_exclusive" + args := #[] + since := 1 + isDestructor := false + }, + { + name := "focus_non_exclusive" + args := #[] + since := 1 + isDestructor := false + }, + { + name := "focus_none" + args := #[] + since := 1 + isDestructor := false + }, + ] + demarshalEvent + | 0 => do + return .focusExclusive + | 1 => do + return .focusNonExclusive + | 2 => do + return .focusNone + | _ => throw s!"Received invalid opcode" + +end Wayland.Protocols \ No newline at end of file -- cgit v1.3.1