diff --git a/docs/contract-api.md b/docs/contract-api.md index 528bcfa47..6e9dcaf0e 100644 --- a/docs/contract-api.md +++ b/docs/contract-api.md @@ -3862,8 +3862,9 @@ Decision records and findings. Inspected regions ([`record`]) collect pipeline s `runtime::install`: adds the runtime plugin once and sets the egui options the runtime owns. - `craft_ui::runtime::install::InstallError`: `pub enum InstallError { AlreadyInstalled, DuplicateStyle(DuplicateStyle), Commands(commands::CommandDefError), DuringPass }`. Why `install` refused a spec. -- `craft_ui::runtime::install::InstallSpec`: `pub struct InstallSpec { pub shell_info: ShellInfo, pub window_system: Arc, pub placement: Option>>, pub frame_layers: Option, pub looks: StyleReplacements, pub frame: Option, pub system: SystemReader, pub wheel: WheelModifiers, pub app_id: String, pub pen: Option, pub stories: bool }`. What `install` takes. +- `craft_ui::runtime::install::InstallSpec`: `pub struct InstallSpec { pub shell_info: ShellInfo, pub window_system: Arc, pub placement: Option>>, pub frame_layers: Option, pub looks: StyleReplacements, pub frame: Option, pub system: SystemReader, pub wheel: WheelModifiers, pub app_id: String, pub pen: Option, pub stories: bool, pub clipboard: Option }`. What `install` takes. - `pub fn new(shell_info: ShellInfo, window_system: Arc) -> Self`. A spec for `shell_info` and `window_system`, with no ghost-layer painter. + - `pub fn clipboard(mut self, clipboard: craft_platform::clipboard::Clipboard) -> Self`. Installs the host's clipboard (system, browser event, memory) in place of the runtime's own. - `pub fn stories(mut self) -> Self`. Loads the stories' command sets too, for an install that shows stories. - `pub fn placement(mut self, store: Arc>) -> Self`. Sets the store viewport mounts save their window placement in. - `pub fn looks(mut self, looks: impl Into) -> Self`. Sets the app's style replacements. @@ -3876,7 +3877,6 @@ Decision records and findings. Inspected regions ([`record`]) collect pipeline s - `craft_ui::runtime::install::WheelModifiers`: `pub struct WheelModifiers { pub zoom: egui::Modifiers, pub sideways: egui::Modifiers }`. The modifiers the mouse wheel zooms and scrolls sideways with. - `pub const fn new(zoom: egui::Modifiers, sideways: egui::Modifiers) -> Self`. The wheel zooms with `zoom` held and scrolls sideways with `sideways` held. - `craft_ui::runtime::install::install`: `pub fn install(ctx: &Context, spec: InstallSpec) -> Result<(), InstallError>`. Adds the runtime plugin to `ctx` and sets the egui options the runtime owns: interface scale is a command, quit goes - - `pub fn clipboard(mut self, clipboard: craft_platform::clipboard::Clipboard) -> Self`. Installs the host's clipboard (system, browser event, memory) in place of the runtime's own. ## `craft_ui::runtime::keys`