//! One design for the mailbox view. Each prototype file exports //! `pub const prototype: Prototype`, and all.zig lists them. const std = @import("std"); const siv = @import("siv"); const kit = @import("kit.zig"); const Settings = @import("Settings.zig"); const Store = @import("Store.zig"); const Allocator = std.mem.Allocator; /// A state worth a screenshot: the keys that reach it from the state /// before, and its name. Shots run in order in one window. pub const Shot = struct { name: []const u8, keys: []const kit.Key, }; /// What `parcel-proto NAME` runs: lowercase, one word. name: []const u8, title: []const u8, /// The idea, in a sentence. idea: []const u8, /// Builds the window's tree and installs its keymap. `arena` lives as long /// as the window, so state the handlers keep goes in it. `settings` is /// where it keeps what should outlast the run; null in tests and shots. build: *const fn (arena: Allocator, window: siv.Window, store: *Store, settings: ?Settings) anyerror!void, shots: []const Shot,