diff --git a/Cargo.lock b/Cargo.lock index 1c3df4e3b..c76065dae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2660,6 +2660,7 @@ dependencies = [ "egui-wgpu", "log", "pollster 1.0.1", + "tempfile", ] [[package]] @@ -3375,11 +3376,13 @@ dependencies = [ "craft-docpath", "craft-host", "craft-theme", + "fmv-macos-events", "futures-lite", "js-sys", "log", "objc2-app-kit 0.3.2", "objc2-foundation 0.3.2", + "rfd", "serde", "serde_json", "sysinfo", @@ -3388,6 +3391,7 @@ dependencies = [ "wasm-bindgen-test", "web-sys", "web-time", + "windows", "wl-clipboard-rs", "x11rb", "xcap", @@ -3464,12 +3468,15 @@ dependencies = [ "craft-ui", "craft-winprint-gdi", "egui", + "js-sys", "log", "miniz_oxide 0.9.1", "roxmltree 0.21.2", "serde", "serde_json", "tempfile", + "wasm-bindgen", + "web-sys", "winprint", "winsafe", ] @@ -3638,11 +3645,14 @@ dependencies = [ "craft-host", "craft-settings", "dirs", + "log", "serde", "serde_json", "tempfile", "toml", "toml_edit", + "wasm-bindgen-test", + "web-sys", "web-time", ] @@ -5737,6 +5747,17 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "fmv-macos-events" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90642cf66dde7f205dc8b42dfe57b47d0f3a29f571b832742883ef512e23fe55" +dependencies = [ + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", +] + [[package]] name = "fnv" version = "1.0.7" diff --git a/crates/platform/src/clipboard/types.rs b/crates/platform/src/clipboard/types.rs index 74c43828c..a74015f7c 100644 --- a/crates/platform/src/clipboard/types.rs +++ b/crates/platform/src/clipboard/types.rs @@ -56,6 +56,11 @@ impl Flavor { pub fn text(text: &str) -> Self { Self::new(TEXT, text.as_bytes().to_vec()) } + + /// The image of an [`RGBA8`] flavor's bytes; `None` when they are not a whole image (pf.C-P3, S-L190). + pub fn rgba8_image(&self) -> Option { + super::convert::rgba8_image(&self.data) + } } /// A bitmap on the clipboard: straight (not premultiplied) RGBA8, rows top to bottom, diff --git a/crates/ui-contract/src/runtime/frame.rs b/crates/ui-contract/src/runtime/frame.rs index 133fde603..cedf8d581 100644 --- a/crates/ui-contract/src/runtime/frame.rs +++ b/crates/ui-contract/src/runtime/frame.rs @@ -267,14 +267,6 @@ impl PerViewport> { } } -/// This frame's wheel speed and Alt-code pages, from the `RootEnv` that `set_input` stored before egui ran the input -/// hook; the defaults when no input was set (owed by platform-w3, S-L151). -pub(crate) fn root_input(ctx: &Context) -> (crate::runtime::env::WheelSpeed, crate::runtime::env::AltCodePages) { - pass_state::with::(ctx, |state| { - state.input.as_ref().map(|input| (input.root.wheel, input.root.alt_codes.clone())).unwrap_or_default() - }) -} - /// Registers the end hook's prune of a service's per-viewport records, once per service type. pub(crate) fn register_prune(ctx: &Context, key: TypeId, prune: fn(&Context, &[ViewportId])) { pass_state::with::(ctx, |state| {