diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index f2252a31e..d3f5cd14e 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -29,4 +29,4 @@ jobs: with: mode: minimum count: 1 - labels: "CI, dependencies, docs and examples, ecolor, eframe, egui_extras, egui_glow, egui_plot, egui-wgpu, egui-winit, egui, epaint, typo" + labels: "CI, dependencies, docs and examples, ecolor, eframe, egui_extras, egui_glow, egui_plot, egui-wgpu, egui-winit, egui, epaint, exclude from changelog, typo" diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 679023315..2b952ef6b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -81,6 +81,9 @@ jobs: - name: Cranky run: cargo cranky --all-targets --all-features -- -D warnings + - name: Cranky release + run: cargo cranky --all-targets --all-features --release -- -D warnings + # --------------------------------------------------------------------------- check_wasm: diff --git a/CHANGELOG.md b/CHANGELOG.md index ae62045fa..e57ab5389 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,91 @@ This file is updated upon each release. Changes since the last release can be found by running the `scripts/generate_changelog.py` script. +## 0.23.0 - 2023-09-27 - New image API +This release contains a simple and powerful image API: + +```rs +// Load from web: +ui.image("https://www.example.com/some_image.png"); + +// Include image in the binary using `include_bytes`: +ui.image(egui::include_image!("../assets/ferris.svg")); + +// With options: +ui.add( + egui::Image::new("file://path/to/image.jpg") + .max_width(200.0) + .rounding(10.0), +); +``` + +The API is based on a plugin-system, where you can tell `egui` how to load the images, and from where. + +`egui_extras` comes with loaders for you, so all you need to do is add the following to your `Cargo.toml`: + +```toml +egui_extras = { version = "0.23", features = ["all_loaders"] } +image = { version = "0.24", features = ["jpeg", "png"] } # Add the types you want support for +``` + +And this to your code: + +```rs +egui_extras::install_image_loaders(egui_ctx); +``` + +### ⚠️ BREAKING +* Update MSRV to Rust 1.70.0 [#3310](https://github.com/emilk/egui/pull/3310) +* Break out plotting to own crate `egui_plot` [#3282](https://github.com/emilk/egui/pull/3282) + +### ⭐ Added +* A new image API [#3297](https://github.com/emilk/egui/pull/3297) [#3315](https://github.com/emilk/egui/pull/3315) [#3328](https://github.com/emilk/egui/pull/3328) [#3338](https://github.com/emilk/egui/pull/3338) [#3342](https://github.com/emilk/egui/pull/3342) [#3343](https://github.com/emilk/egui/pull/3343) [#3402](https://github.com/emilk/egui/pull/3402) (thanks [@jprochazk](https://github.com/jprochazk)!) +* Add option to truncate text at some width [#3244](https://github.com/emilk/egui/pull/3244) +* Add control of line height and letter spacing [#3302](https://github.com/emilk/egui/pull/3302) +* Support images with rounded corners [#3257](https://github.com/emilk/egui/pull/3257) +* Change focused widget with arrow keys [#3272](https://github.com/emilk/egui/pull/3272) (thanks [@TimonPost](https://github.com/TimonPost)!) +* Add opt-in `puffin` feature to egui [#3298](https://github.com/emilk/egui/pull/3298) +* Add debug-option to show a callstack to the widget under the mouse [#3391](https://github.com/emilk/egui/pull/3391) +* Add `Context::open_url` and `Context::copy_text` [#3380](https://github.com/emilk/egui/pull/3380) +* Add `Area::constrain_to` and `Window::constrain_to` [#3396](https://github.com/emilk/egui/pull/3396) +* Add `Memory::area_rect` [#3161](https://github.com/emilk/egui/pull/3161) (thanks [@tosti007](https://github.com/tosti007)!) +* Add `Margin::expand_rect` and `shrink_rect` [#3214](https://github.com/emilk/egui/pull/3214) +* Provide `into_inner()` for `egui::mutex::{Mutex, RwLock}` [#3110](https://github.com/emilk/egui/pull/3110) (thanks [@KmolYuan](https://github.com/KmolYuan)!) +* Support multi-threaded Wasm [#3236](https://github.com/emilk/egui/pull/3236) +* Change touch force to be `Option` instead of `f32` [#3240](https://github.com/emilk/egui/pull/3240) (thanks [@lucasmerlin](https://github.com/lucasmerlin)!) +* Add option to always open hyperlink in a new browser tab [#3242](https://github.com/emilk/egui/pull/3242) (thanks [@FreddyFunk](https://github.com/FreddyFunk)!) +* Add `Window::drag_to_scroll` [#3118](https://github.com/emilk/egui/pull/3118) (thanks [@KYovchevski](https://github.com/KYovchevski)!) +* Add `CollapsingState::remove` to clear stored state [#3252](https://github.com/emilk/egui/pull/3252) (thanks [@dmackdev](https://github.com/dmackdev)!) +* Add tooltip_delay option [#3245](https://github.com/emilk/egui/pull/3245) (thanks [@YgorSouza](https://github.com/YgorSouza)!) +* Added `Context::is_context_menu_open()` [#3267](https://github.com/emilk/egui/pull/3267) (thanks [@dmlary](https://github.com/dmlary)!) +* Add `mime` field to `DroppedFile` [#3273](https://github.com/emilk/egui/pull/3273) (thanks [@abey79](https://github.com/abey79)!) +* Allow setting the progress bar height [#3183](https://github.com/emilk/egui/pull/3183) (thanks [@s-nie](https://github.com/s-nie)!) +* Add `scroll_area::State::velocity` [#3300](https://github.com/emilk/egui/pull/3300) (thanks [@Barugon](https://github.com/Barugon)!) +* Add `Visuals::interact_cursor` [#3312](https://github.com/emilk/egui/pull/3312) (thanks [@zkldi](https://github.com/zkldi)!) +* Add method to `RichText` making it easier to construct layout jobs [#3319](https://github.com/emilk/egui/pull/3319) (thanks [@OmegaJak](https://github.com/OmegaJak)!) +* Add `Context::style_mut` [#3359](https://github.com/emilk/egui/pull/3359) +* `std::borrow::Cow<'_, str>` now implements `TextBuffer` [#3164](https://github.com/emilk/egui/pull/3164) (thanks [@burtonageo](https://github.com/burtonageo)!) + +### 🔧 Changed +* Separate text cursor from selection visuals [#3181](https://github.com/emilk/egui/pull/3181) (thanks [@lampsitter](https://github.com/lampsitter)!) +* `DragValue`: update value on each key press by default [#2880](https://github.com/emilk/egui/pull/2880) (thanks [@Barugon](https://github.com/Barugon)!) +* Replace uses of `RangeInclusive` with `emath::Rangef` [#3221](https://github.com/emilk/egui/pull/3221) +* Implement `Send + Sync` for `ColorPickerFn` and `Ui` (#3148) [#3233](https://github.com/emilk/egui/pull/3233) (thanks [@idanarye](https://github.com/idanarye)!) +* Use the minus character instead of "dash" [#3271](https://github.com/emilk/egui/pull/3271) +* Changing `menu_image_button` to use `ImageButton` builder [#3288](https://github.com/emilk/egui/pull/3288) (thanks [@v-kat](https://github.com/v-kat)!) +* Prune old egui memory data when reaching some limit [#3299](https://github.com/emilk/egui/pull/3299) + +### 🐛 Fixed +* Fix TextEdit's character limit [#3173](https://github.com/emilk/egui/pull/3173) (thanks [@Serverator](https://github.com/Serverator)!) +* Set the correct unicode character for "ctrl" shortcuts [#3186](https://github.com/emilk/egui/pull/3186) (thanks [@abey79](https://github.com/abey79)!) +* Fix crash in `DragValue` when only setting `min_decimals` [#3231](https://github.com/emilk/egui/pull/3231) +* Fix clipping issued with `ScrollArea` [#2860](https://github.com/emilk/egui/pull/2860) (thanks [@Barugon](https://github.com/Barugon)!) +* Fix moving slider with arrow keys [#3354](https://github.com/emilk/egui/pull/3354) +* Fix problems with tabs in text [#3355](https://github.com/emilk/egui/pull/3355) +* Fix interaction with moved color-picker [#3395](https://github.com/emilk/egui/pull/3395) + + + ## 0.22.0 - 2023-05-23 - A plethora of small improvements ### ⭐ Added * Scroll bar visibility options [#2729](https://github.com/emilk/egui/pull/2729) (thanks [@IVAN-MK7](https://github.com/IVAN-MK7)!) diff --git a/Cargo.lock b/Cargo.lock index b2f275ce3..f559b75dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,9 +20,9 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c98a5d094590335462354da402d754fe2cb78f0e6ce5024611c28ed539c1de" +checksum = "76eb1adf08c5bcaa8490b9851fd53cca27fa9880076f178ea9d29f05196728a8" dependencies = [ "enumn", "serde", @@ -30,18 +30,18 @@ dependencies = [ [[package]] name = "accesskit_consumer" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca541e0fdb600916d196a940228df99b86d804fd2e6ef13894d7814f2799db43" +checksum = "04bb4d9e4772fe0d47df57d0d5dbe5d85dd05e2f37ae1ddb6b105e76be58fb00" dependencies = [ "accesskit", ] [[package]] name = "accesskit_macos" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfea17e5bb5dcbfcf5b256ab2f5889a3e6f6582de78b9db9b6689adad3b002f3" +checksum = "134d0acf6acb667c89d3332999b1a5df4edbc8d6113910f392ebb73f2b03bb56" dependencies = [ "accesskit", "accesskit_consumer", @@ -51,9 +51,9 @@ dependencies = [ [[package]] name = "accesskit_unix" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4d1517421278cc8e67422d0786a18cf4291093ebe49eadf1cf989ff80e57f90" +checksum = "e084cb5168790c0c112626175412dc5ad127083441a8248ae49ddf6725519e83" dependencies = [ "accesskit", "accesskit_consumer", @@ -66,23 +66,23 @@ dependencies = [ [[package]] name = "accesskit_windows" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11c7f177739f23bd19bb856e4a64fdd96eb8638ec0a6a6dde9a7019a9e91c53" +checksum = "9eac0a7f2d7cd7a93b938af401d3d8e8b7094217989a7c25c55a953023436e31" dependencies = [ "accesskit", "accesskit_consumer", "arrayvec", "once_cell", "paste", - "windows 0.44.0", + "windows 0.48.0", ] [[package]] name = "accesskit_winit" -version = "0.14.0" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f741b54fba827e49a73d55fdd43e8d3d5133aa7710a48581013c7802f232b83" +checksum = "825d23acee1bd6d25cbaa3ca6ed6e73faf24122a774ec33d52c5c86c6ab423c0" dependencies = [ "accesskit", "accesskit_macos", @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -106,17 +106,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.3" @@ -131,13 +120,19 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "android-activity" version = "0.4.1" @@ -162,6 +157,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -179,22 +180,21 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arboard" -version = "3.2.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6041616acea41d67c4a984709ddab1587fd0b10efe5cc563fee954d2f011854" +checksum = "ac57f2b058a76363e357c056e4f74f1945bf734d37b8b3ef49066c4787dde0fc" dependencies = [ "clipboard-win", "log", "objc", "objc-foundation", "objc_id", - "once_cell", "parking_lot", "thiserror", "winapi", @@ -209,9 +209,9 @@ checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "ash" @@ -228,35 +228,47 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" dependencies = [ - "event-listener", + "event-listener 2.5.3", "futures-core", ] [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] [[package]] name = "async-executor" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +checksum = "78f2db9467baa66a700abce2a18c5ad793f6f83310aca1284796fc3921d113fd" dependencies = [ "async-lock", "async-task", "concurrent-queue", - "fastrand", + "fastrand 2.0.1", "futures-lite", "slab", ] +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock", + "autocfg", + "blocking", + "futures-lite", +] + [[package]] name = "async-io" version = "1.13.0" @@ -271,7 +283,7 @@ dependencies = [ "log", "parking", "polling", - "rustix", + "rustix 0.37.23", "slab", "socket2", "waker-fn", @@ -279,39 +291,75 @@ dependencies = [ [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ - "event-listener", + "event-listener 2.5.3", +] + +[[package]] +name = "async-process" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf012553ce51eb7aa6dc2143804cc8252bd1cb681a1c5cb7fa94ca88682dee1d" +dependencies = [ + "async-io", + "async-lock", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.0.0", + "futures-lite", + "rustix 0.38.14", + "windows-sys 0.48.0", ] [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", +] + +[[package]] +name = "async-signal" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4af361a844928cb7d36590d406709473a1b574f443094422ef166daa3b493208" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "concurrent-queue", + "futures-core", + "futures-io", + "libc", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", ] [[package]] name = "async-task" -version = "4.4.0" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" +checksum = "b9441c6b2fe128a7c2bf680a44c34d0df31ce09e5b7e401fcca3faa483dbc921" [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] @@ -326,6 +374,12 @@ dependencies = [ "system-deps", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "atspi" version = "0.10.1" @@ -372,9 +426,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -402,11 +456,11 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.65.1" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" +checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cexpr", "clang-sys", "lazy_static", @@ -419,7 +473,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.16", + "syn 2.0.37", "which", ] @@ -446,9 +500,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6776fc96284a0bb647b615056fc496d1fe1644a7ab01829818a6d91cae888b84" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "block" @@ -485,29 +539,45 @@ dependencies = [ ] [[package]] -name = "bumpalo" -version = "3.13.0" +name = "blocking" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "94c4ef1f913d78636d78d538eec1f18de81e481f44b1be0a81060090530846e1" +dependencies = [ + "async-channel", + "async-lock", + "async-task", + "fastrand 2.0.1", + "futures-io", + "futures-lite", + "piper", + "tracing", +] + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] @@ -518,9 +588,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cairo-sys-rs" @@ -534,10 +604,11 @@ dependencies = [ [[package]] name = "calloop" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a59225be45a478d772ce015d9743e49e92798ece9e34eda9a6aa2a6a7f40192" +checksum = "52e0d00eb1ea24371a97d2da6201c6747a633dc6dc1988ef503403b4c59504a8" dependencies = [ + "bitflags 1.3.2", "log", "nix 0.25.1", "slotmap", @@ -553,11 +624,12 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -577,9 +649,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.1" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8790cf1286da485c72cf5fc7aeba308438800036ec67d89425924c4807268c9" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" dependencies = [ "smallvec", "target-lexicon", @@ -608,17 +680,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -673,7 +744,7 @@ checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "bitflags 1.3.2", "clap_lex", - "indexmap", + "indexmap 1.9.3", "textwrap", ] @@ -715,15 +786,14 @@ dependencies = [ [[package]] name = "cocoa-foundation" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" +checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" dependencies = [ "bitflags 1.3.2", "block", "core-foundation", "core-graphics-types", - "foreign-types 0.3.2", "libc", "objc", ] @@ -768,9 +838,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -814,21 +884,20 @@ dependencies = [ [[package]] name = "core-graphics-types" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" dependencies = [ "bitflags 1.3.2", "core-foundation", - "foreign-types 0.3.2", "libc", ] [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -888,9 +957,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -945,7 +1014,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.0", "libloading 0.8.0", "winapi", ] @@ -991,6 +1060,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d7439c3735f405729d52c3fbbe4de140eaf938a1fe47d227c27f8254d4302a5" +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" + [[package]] name = "derivative" version = "2.2.0" @@ -1022,26 +1097,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1061,11 +1116,11 @@ checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] name = "dlib" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.7.4", + "libloading 0.8.0", ] [[package]] @@ -1106,13 +1161,13 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "ecolor" -version = "0.22.0" +version = "0.23.0" dependencies = [ "bytemuck", "cint", @@ -1123,7 +1178,7 @@ dependencies = [ [[package]] name = "eframe" -version = "0.22.0" +version = "0.23.0" dependencies = [ "bytemuck", "cocoa", @@ -1160,10 +1215,11 @@ dependencies = [ [[package]] name = "egui" -version = "0.22.0" +version = "0.23.0" dependencies = [ "accesskit", - "ahash 0.8.3", + "ahash", + "backtrace", "document-features", "epaint", "log", @@ -1175,7 +1231,7 @@ dependencies = [ [[package]] name = "egui-wgpu" -version = "0.22.0" +version = "0.23.0" dependencies = [ "bytemuck", "document-features", @@ -1191,7 +1247,7 @@ dependencies = [ [[package]] name = "egui-winit" -version = "0.22.0" +version = "0.23.0" dependencies = [ "accesskit_winit", "arboard", @@ -1209,7 +1265,7 @@ dependencies = [ [[package]] name = "egui_demo_app" -version = "0.22.0" +version = "0.23.0" dependencies = [ "bytemuck", "chrono", @@ -1231,7 +1287,7 @@ dependencies = [ [[package]] name = "egui_demo_lib" -version = "0.22.0" +version = "0.23.0" dependencies = [ "chrono", "criterion", @@ -1246,7 +1302,7 @@ dependencies = [ [[package]] name = "egui_extras" -version = "0.22.0" +version = "0.23.0" dependencies = [ "chrono", "document-features", @@ -1266,7 +1322,7 @@ dependencies = [ [[package]] name = "egui_glow" -version = "0.22.0" +version = "0.23.0" dependencies = [ "bytemuck", "document-features", @@ -1276,7 +1332,7 @@ dependencies = [ "glutin", "glutin-winit", "log", - "memoffset", + "memoffset 0.6.5", "puffin", "raw-window-handle", "wasm-bindgen", @@ -1285,7 +1341,7 @@ dependencies = [ [[package]] name = "egui_plot" -version = "0.22.0" +version = "0.23.0" dependencies = [ "document-features", "egui", @@ -1294,9 +1350,9 @@ dependencies = [ [[package]] name = "ehttp" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e4525e883dd283d12b755ab3ad71d7c8dea2ee8e8a062b9f4c4f84637ed681" +checksum = "f88f45662356f96afc7d9e2bc9910ad8352ee01417f7c69b8b16a53c8767a75d" dependencies = [ "document-features", "js-sys", @@ -1308,13 +1364,13 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "emath" -version = "0.22.0" +version = "0.23.0" dependencies = [ "bytemuck", "document-features", @@ -1324,9 +1380,9 @@ dependencies = [ [[package]] name = "enum-map" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "988f0d17a0fa38291e5f41f71ea8d46a5d5497b9054d5a759fae2cbb819f2356" +checksum = "c188012f8542dee7b3996e44dd89461d64aa471b0a7c71a1ae2f595d259e96e5" dependencies = [ "enum-map-derive", "serde", @@ -1334,20 +1390,20 @@ dependencies = [ [[package]] name = "enum-map-derive" -version = "0.11.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4da76b3b6116d758c7ba93f7ec6a35d2e2cf24feda76c6e38a375f4d5c59f2" +checksum = "04d0b288e3bb1d861c4403c1774a6f7a798781dfc519b3647df2a3dd4ae95f25" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", ] [[package]] name = "enumflags2" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", "serde", @@ -1355,24 +1411,24 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] name = "enumn" -version = "0.1.8" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48016319042fb7c87b78d2993084a831793a897a5cd1a2a67cab9d1eeb4b7d76" +checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] @@ -1390,10 +1446,10 @@ dependencies = [ [[package]] name = "epaint" -version = "0.22.0" +version = "0.23.0" dependencies = [ "ab_glyph", - "ahash 0.8.3", + "ahash", "backtrace", "bytemuck", "criterion", @@ -1407,10 +1463,16 @@ dependencies = [ ] [[package]] -name = "errno" -version = "0.3.1" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -1444,10 +1506,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] -name = "fancy-regex" -version = "0.7.1" +name = "event-listener" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6b8560a05112eb52f04b00e5d3790c0dd75d9d980eb8a122fb23b92a623ccf" +checksum = "29e56284f00d94c1bc7fd3c77027b4623c88c1f53d8d2394c6199f2921dea325" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "fancy-regex" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" dependencies = [ "bit-set", "regex", @@ -1462,6 +1535,21 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "fdeflate" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" +dependencies = [ + "simd-adler32", +] + [[package]] name = "file_dialog" version = "0.1.0" @@ -1473,9 +1561,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "miniz_oxide", @@ -1520,7 +1608,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] @@ -1537,9 +1625,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -1562,7 +1650,7 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", @@ -1651,20 +1739,20 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] name = "gimli" -version = "0.27.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "gio-sys" @@ -1720,9 +1808,9 @@ dependencies = [ [[package]] name = "glutin" -version = "0.30.8" +version = "0.30.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f9b771a65f0a1e3ddb6aa16f867d87dc73c922411c255e6c4ab7f6d45c7327" +checksum = "8fc93b03242719b8ad39fb26ed2b01737144ce7bd4bfc7adadcef806596760fe" dependencies = [ "bitflags 1.3.2", "cfg_aliases", @@ -1755,9 +1843,9 @@ dependencies = [ [[package]] name = "glutin_egl_sys" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b3bcbddc51573b977fc6dca5d93867e4f29682cdbaf5d13e48f4fa4346d4d87" +checksum = "af784eb26c5a68ec85391268e074f0aa618c096eadb5d6330b0911cf34fe57c5" dependencies = [ "gl_generator", "windows-sys 0.45.0", @@ -1799,7 +1887,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.0", "gpu-alloc-types", ] @@ -1809,7 +1897,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.0", ] [[package]] @@ -1827,22 +1915,22 @@ dependencies = [ [[package]] name = "gpu-descriptor" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0c02e1ba0bdb14e965058ca34e09c020f8e507a760df1121728e0aef68d57a" +checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "gpu-descriptor-types", - "hashbrown", + "hashbrown 0.14.0", ] [[package]] name = "gpu-descriptor-types" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126" +checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", ] [[package]] @@ -1874,8 +1962,15 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" dependencies = [ - "ahash 0.7.6", + "ahash", + "allocator-api2", ] [[package]] @@ -1904,6 +1999,7 @@ name = "hello_world" version = "0.1.0" dependencies = [ "eframe", + "egui_extras", "env_logger", ] @@ -1934,9 +2030,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1967,9 +2063,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1996,9 +2092,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2006,9 +2102,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.6" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" +checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" dependencies = [ "bytemuck", "byteorder", @@ -2042,7 +2138,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", ] [[package]] @@ -2059,24 +2165,23 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.3", "libc", "windows-sys 0.48.0", ] [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", + "hermit-abi 0.3.3", + "rustix 0.38.14", "windows-sys 0.48.0", ] @@ -2091,9 +2196,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jni" @@ -2189,9 +2294,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libloading" @@ -2234,6 +2339,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" + [[package]] name = "litrs" version = "0.2.3" @@ -2242,9 +2353,9 @@ checksum = "f9275e0933cf8bb20f008924c0cb07a0692fe54d8064996520bf998de9eb79aa" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -2252,12 +2363,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lz4_flex" @@ -2276,9 +2384,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memmap2" @@ -2298,13 +2406,22 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + [[package]] name = "metal" version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "623b5e6cefd76e58f774bd3cc0c6f5c7615c58c03a97815245a25c3c9bdee318" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.0", "block", "core-graphics-types", "foreign-types 0.5.0", @@ -2337,11 +2454,12 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", + "simd-adler32", ] [[package]] @@ -2352,14 +2470,14 @@ checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff" [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "wasi", + "windows-sys 0.48.0", ] [[package]] @@ -2369,10 +2487,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1ceaaa4eedaece7e4ec08c55c640ba03dbb73fb812a6570a59bcf1930d0f70e" dependencies = [ "bit-set", - "bitflags 2.3.1", + "bitflags 2.4.0", "codespan-reporting", "hexf-parse", - "indexmap", + "indexmap 1.9.3", "log", "num-traits", "rustc-hash", @@ -2449,7 +2567,7 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset", + "memoffset 0.6.5", ] [[package]] @@ -2462,8 +2580,19 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset", - "pin-utils", + "memoffset 0.6.5", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.7.1", ] [[package]] @@ -2505,9 +2634,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -2600,18 +2729,18 @@ dependencies = [ [[package]] name = "object" -version = "0.30.3" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "oorandom" @@ -2621,9 +2750,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "orbclient" -version = "0.3.45" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "221d488cd70617f1bd599ed8ceb659df2147d9393717954d82a0f5e8032a6ab1" +checksum = "8378ac0dfbd4e7895f2d2c1f1345cab3836910baf3a300b000d04250f0c8428f" dependencies = [ "redox_syscall 0.3.5", ] @@ -2640,9 +2769,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.5.0" +version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" +checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" [[package]] name = "owned_ttf_parser" @@ -2673,9 +2802,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "e52c774a4c39359c1d1c52e43f73dd91a75a614652c825408eec30c95a9b2067" [[package]] name = "parking_lot" @@ -2689,22 +2818,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.5", ] [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "peeking_take_while" @@ -2714,9 +2843,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pico-args" @@ -2726,9 +2855,9 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2736,6 +2865,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + [[package]] name = "pkg-config" version = "0.3.27" @@ -2749,31 +2889,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5329b8f106a176ab0dce4aae5da86bfcb139bb74fb00882859e03745011f3635" dependencies = [ "base64", - "indexmap", + "indexmap 1.9.3", "line-wrap", "quick-xml", "serde", - "time 0.3.21", + "time", ] [[package]] name = "png" -version = "0.17.7" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" +checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" dependencies = [ "bitflags 1.3.2", "crc32fast", + "fdeflate", "flate2", "miniz_oxide", ] [[package]] name = "poll-promise" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf2a02372dfae23c9c01267fb296b8a3413bb4e45fbd589c3ac73c6dcfbb305" +checksum = "5f6a58fecbf9da8965bcdb20ce4fd29788d1acee68ddbb64f0ba1b81bccdb7df" dependencies = [ + "document-features", "static_assertions", ] @@ -2807,12 +2949,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.5" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617feabb81566b593beb4886fb8c1f38064169dae4dccad0e3220160c3b37203" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] @@ -2827,18 +2969,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] [[package]] name = "profiling" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332cd62e95873ea4f41f3dfd6bbbfc5b52aec892d7e8d534197c4720a0bbbab2" +checksum = "f89dff0959d98c9758c88826cc002e2c3d0b9dfac4139711d1f30de442f1139b" [[package]] name = "puffin" @@ -2890,9 +3032,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.27" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2976,26 +3118,32 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.2" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1a59b5d8e97dee33696bf13c5ba8ab85341c002922fba050069326b9c498974" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.2", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "renderdoc-sys" @@ -3100,23 +3248,36 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.37.19" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys 0.4.7", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring", @@ -3126,9 +3287,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safemem" @@ -3164,9 +3325,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "screenshot" @@ -3202,29 +3363,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.163" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -3233,20 +3394,20 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -3261,9 +3422,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -3272,9 +3433,24 @@ dependencies = [ [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "simplecss" @@ -3287,15 +3463,15 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -3311,15 +3487,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "smithay-client-toolkit" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9" dependencies = [ "bitflags 1.3.2", "calloop", @@ -3404,9 +3580,9 @@ checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" [[package]] name = "strict-num" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9df65f20698aeed245efdde3628a6b559ea1239bbb871af1b6e3b58c413b2bd1" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" dependencies = [ "float-cmp", ] @@ -3439,9 +3615,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -3450,21 +3626,19 @@ dependencies = [ [[package]] name = "syntect" -version = "5.0.0" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c454c27d9d7d9a84c7803aaa3c50cd088d2906fe3c6e42da3209aa623576a8" +checksum = "e02b4b303bf8d08bfeb0445cba5068a3d306b6baece1d5582171a9bf49188f91" dependencies = [ "bincode", "bitflags 1.3.2", "fancy-regex", "flate2", "fnv", - "lazy_static", "once_cell", "plist", - "regex-syntax 0.6.29", + "regex-syntax", "serde", - "serde_derive", "serde_json", "thiserror", "walkdir", @@ -3473,9 +3647,9 @@ dependencies = [ [[package]] name = "system-deps" -version = "6.1.0" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5fa6fb9ee296c0dc2df41a656ca7948546d061958115ddb0bcaae43ad0d17d2" +checksum = "30c2de8a4d8f4b823d634affc9cd2a74ec98c53a756f317e529a48046cbf71f3" dependencies = [ "cfg-expr", "heck", @@ -3486,28 +3660,28 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", - "fastrand", + "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix", - "windows-sys 0.45.0", + "rustix 0.38.14", + "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] @@ -3520,41 +3694,31 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] name = "time" -version = "0.1.45" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ + "deranged", "itoa", "serde", "time-core", @@ -3563,15 +3727,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -3628,9 +3792,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.7.4" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", @@ -3640,20 +3804,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.9" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d964908cec0d030b812013af25a0e57fddfadb1e066ecc6681d86253129d4f" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", @@ -3674,13 +3838,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", ] [[package]] @@ -3694,15 +3858,15 @@ dependencies = [ [[package]] name = "ttf-parser" -version = "0.19.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44dcf002ae3b32cd25400d6df128c5babec3927cd1eb7ce813cfff20eb6c3746" +checksum = "a464a4b34948a5f67fddd2b823c62d9d92e44be75058b99939eae6c5b6960b33" [[package]] name = "tts" -version = "0.25.5" +version = "0.25.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e339627916d1e1425f806c68b57d7eb6f9486ef0500829b1324556bef3b4fa2d" +checksum = "aee57eae77c7059f02e9ae166cd3ef4973e62c859b1eeaf9a738032a5b1c38e4" dependencies = [ "cocoa-foundation", "core-foundation", @@ -3719,7 +3883,7 @@ dependencies = [ "thiserror", "wasm-bindgen", "web-sys", - "windows 0.48.0", + "windows 0.51.1", ] [[package]] @@ -3733,9 +3897,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uds_windows" @@ -3764,9 +3928,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -3779,9 +3943,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -3819,9 +3983,9 @@ dependencies = [ [[package]] name = "url" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -3884,26 +4048,20 @@ dependencies = [ [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -3931,15 +4089,15 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -3965,7 +4123,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4084,9 +4242,9 @@ dependencies = [ [[package]] name = "webbrowser" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd222aa310eb7532e3fd427a5d7db7e44bc0b0cf1c1e21139c345325511a85b6" +checksum = "b2c79b77f525a2d670cb40619d7d9c673d09e0666f72c591ebd7861f84a87e57" dependencies = [ "core-foundation", "home", @@ -4150,7 +4308,7 @@ checksum = "ecf7454d9386f602f7399225c92dd2fbdcde52c519bc8fb0bd6fbeb388075dc2" dependencies = [ "arrayvec", "bit-vec", - "bitflags 2.3.1", + "bitflags 2.4.0", "codespan-reporting", "log", "naga", @@ -4175,7 +4333,7 @@ dependencies = [ "arrayvec", "ash", "bit-set", - "bitflags 2.3.1", + "bitflags 2.4.0", "block", "core-graphics-types", "d3d12", @@ -4212,20 +4370,21 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee64d7398d0c2f9ca48922c902ef69c42d000c759f3db41e355f4a570b052b67" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.0", "js-sys", "web-sys", ] [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix 0.38.14", ] [[package]] @@ -4252,9 +4411,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -4280,8 +4439,6 @@ version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" dependencies = [ - "windows-implement", - "windows-interface", "windows-targets 0.42.2", ] @@ -4291,14 +4448,35 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", + "windows-implement", + "windows-interface", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +dependencies = [ + "windows-core", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", ] [[package]] name = "windows-implement" -version = "0.44.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce87ca8e3417b02dc2a8a22769306658670ec92d78f1bd420d6310a67c245c6" +checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" dependencies = [ "proc-macro2", "quote", @@ -4307,9 +4485,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.44.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853f69a591ecd4f810d29f17e902d40e349fb05b0b11fff63b08b826bfe39c7f" +checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" dependencies = [ "proc-macro2", "quote", @@ -4331,7 +4509,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -4351,17 +4529,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -4372,9 +4550,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -4384,9 +4562,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -4396,9 +4574,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -4408,9 +4586,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -4420,9 +4598,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -4432,9 +4610,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -4444,9 +4622,9 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winit" @@ -4485,9 +4663,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] @@ -4535,10 +4713,20 @@ dependencies = [ ] [[package]] -name = "xml-rs" -version = "0.8.15" +name = "xdg-home" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a56c84a8ccd4258aed21c92f70c0f6dea75356b6892ae27c24139da456f9336" +checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" +dependencies = [ + "nix 0.26.4", + "winapi", +] + +[[package]] +name = "xml-rs" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" [[package]] name = "xmlparser" @@ -4557,27 +4745,29 @@ dependencies = [ [[package]] name = "zbus" -version = "3.10.0" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f770930448dd412a4a7131dd968a8e6df0064db4d7916fbbd2d6c3f26b566938" +checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" dependencies = [ "async-broadcast", "async-executor", + "async-fs", "async-io", "async-lock", + "async-process", "async-recursion", "async-task", "async-trait", + "blocking", "byteorder", "derivative", - "dirs", "enumflags2", - "event-listener", + "event-listener 2.5.3", "futures-core", "futures-sink", "futures-util", "hex", - "nix 0.25.1", + "nix 0.26.4", "once_cell", "ordered-stream", "rand", @@ -4588,6 +4778,7 @@ dependencies = [ "tracing", "uds_windows", "winapi", + "xdg-home", "zbus_macros", "zbus_names", "zvariant", @@ -4595,22 +4786,23 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.10.0" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4832059b438689017db7340580ebabba07f114eab91bf990c6e55052408b40d8" +checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", "regex", "syn 1.0.109", + "zvariant_utils", ] [[package]] name = "zbus_names" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82441e6033be0a741157a72951a3e4957d519698f3a824439cc131c5ba77ac2a" +checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" dependencies = [ "serde", "static_assertions", @@ -4619,9 +4811,9 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622cc473f10cef1b0d73b7b34a266be30ebdcfaea40ec297dd8cbda088f9f93c" +checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" dependencies = [ "byteorder", "enumflags2", @@ -4633,9 +4825,9 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d9c1b57352c25b778257c661f3c4744b7cefb7fc09dd46909a153cce7773da2" +checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" dependencies = [ "proc-macro-crate", "proc-macro2", diff --git a/Cranky.toml b/Cranky.toml index d67d3e75c..4099a187c 100644 --- a/Cranky.toml +++ b/Cranky.toml @@ -95,7 +95,6 @@ warn = [ "clippy::rest_pat_in_fully_bound_structs", "clippy::same_functions_in_if_condition", "clippy::semicolon_if_nothing_returned", - "clippy::significant_drop_tightening", "clippy::single_match_else", "clippy::str_to_string", "clippy::string_add_assign", @@ -138,6 +137,8 @@ warn = [ allow = [ "clippy::manual_range_contains", # this one is just worse imho + "clippy::significant_drop_tightening", # False positives + # TODO(emilk): enable more of these lints: "clippy::let_underscore_untyped", "clippy::missing_assert_message", diff --git a/README.md b/README.md index 03d39b94d..cbfa92eb4 100644 --- a/README.md +++ b/README.md @@ -9,30 +9,24 @@ [![Apache](https://img.shields.io/badge/license-Apache-blue.svg)](https://github.com/emilk/egui/blob/master/LICENSE-APACHE) [![Discord](https://img.shields.io/discord/900275882684477440?label=egui%20discord)](https://discord.gg/JFcEma9bJq) + +
+ + +egui development is sponsored by [Rerun](https://www.rerun.io/), a startup building
+an SDK for visualizing streams of multimodal data. +
+ +--- + 👉 [Click to run the web demo](https://www.egui.rs/#demo) 👈 -egui (pronounced "e-gooey") is a simple, fast, and highly portable immediate mode GUI library for Rust. egui runs on the web, natively, and [in your favorite game engine](#integrations) (or will soon). +egui (pronounced "e-gooey") is a simple, fast, and highly portable immediate mode GUI library for Rust. egui runs on the web, natively, and [in your favorite game engine](#integrations). egui aims to be the easiest-to-use Rust GUI library, and the simplest way to make a web app in Rust. egui can be used anywhere you can draw textured triangles, which means you can easily integrate it into your game engine of choice. -Sections: - -* [Example](#example) -* [Quick start](#quick-start) -* [Demo](#demo) -* [Goals](#goals) -* [Who is egui for?](#who-is-egui-for) -* [State / features](#state) -* [Integrations](#integrations) -* [Why immediate mode](#why-immediate-mode) -* [FAQ](#faq) -* [Other](#other) -* [Credits](#credits) - -([egui 的中文翻译文档 / chinese translation](https://github.com/Re-Ch-Love/egui-doc-cn/blob/main/README_zh-hans.md)) - ## Example ``` rust @@ -46,10 +40,29 @@ if ui.button("Click each year").clicked() { age += 1; } ui.label(format!("Hello '{name}', age {age}")); +ui.image(egui::include_image!("ferris.png")); ``` +## Sections: + +* [Example](#example) +* [Quick start](#quick-start) +* [Demo](#demo) +* [Goals](#goals) +* [State / features](#state) +* [Dependencies](#dependencies) +* [Who is egui for?](#who-is-egui-for) +* [Integrations](#integrations) +* [Why immediate mode](#why-immediate-mode) +* [FAQ](#faq) +* [Other](#other) +* [Credits](#credits) + +([egui 的中文翻译文档 / chinese translation](https://github.com/Re-Ch-Love/egui-doc-cn/blob/main/README_zh-hans.md)) + + ## Quick start There are simple examples in [the `examples/` folder](https://github.com/emilk/egui/blob/master/examples/). If you want to write a web app, then go to and follow the instructions. The official docs are at . For inspiration and more examples, check out the [the egui web demo](https://www.egui.rs/#demo) and follow the links in it to its source code. @@ -99,6 +112,32 @@ egui is *not* a framework. egui is a library you call into, not an environment y * Native looking interface * Advanced and flexible layouts (that's fundamentally incompatible with immediate mode) +## State + +egui is in active development. It works well for what it does, but it lacks many features and the interfaces are still in flux. New releases will have breaking changes. + +Still, egui can be used to create professional looking applications, like [the Rerun Viewer](https://app.rerun.io/). + +### Features + +* Widgets: label, text button, hyperlink, checkbox, radio button, slider, draggable value, text editing, combo box, color picker, spinner +* Images +* Layouts: horizontal, vertical, columns, automatic wrapping +* Text editing: multiline, copy/paste, undo, emoji supports +* Windows: move, resize, name, minimize and close. Automatically sized and positioned. +* Regions: resizing, vertical scrolling, collapsing headers (sections) +* Rendering: Anti-aliased rendering of lines, circles, text and convex polygons. +* Tooltips on hover +* Accessibility via [AccessKit](https://accesskit.dev/) +* More + + + +Light Theme: + + + + ## Dependencies `egui` has a minimal set of default dependencies: @@ -142,27 +181,6 @@ So in summary: * egui: pure Rust, new, exciting, work in progress * Dear ImGui: feature rich, well tested, cumbersome Rust integration -## State - -egui is in active development. It works well for what it does, but it lacks many features and the interfaces are still in flux. New releases will have breaking changes. - -### Features - -* Widgets: label, text button, hyperlink, checkbox, radio button, slider, draggable value, text editing, combo box, color picker -* Layouts: horizontal, vertical, columns, automatic wrapping -* Text editing: multiline, copy/paste, undo, emoji supports -* Windows: move, resize, name, minimize and close. Automatically sized and positioned. -* Regions: resizing, vertical scrolling, collapsing headers (sections) -* Rendering: Anti-aliased rendering of lines, circles, text and convex polygons. -* Tooltips on hover -* More - - - -Light Theme: - - - ## Integrations egui is built to be easy to integrate into any existing game engine or platform you are working on. @@ -255,7 +273,7 @@ For "atomic" widgets (e.g. a button) `egui` knows the size before showing it, so #### CPU usage Since an immediate mode GUI does a full layout each frame, the layout code needs to be quick. If you have a very complex GUI this can tax the CPU. In particular, having a very large UI in a scroll area (with very long scrollback) can be slow, as the content needs to be laid out each frame. -If you design the GUI with this in mind and refrain from huge scroll areas (or only lay out the part that is in view) then the performance hit is generally pretty small. For most cases you can expect `egui` to take up 1-2 ms per frame, but `egui` still has a lot of room for optimization (it's not something I've focused on yet). You can also set up `egui` to only repaint when there is interaction (e.g. mouse movement). +If you design the GUI with this in mind and refrain from huge scroll areas (or only lay out the part that is in view) then the performance hit is generally pretty small. For most cases you can expect `egui` to take up 1-2 ms per frame, but `egui` still has a lot of room for optimization (it's not something I've focused on yet). `egui` only repaints when there is interaction (e.g. mouse movement) or an animation, so if your app is idle, no CPU is wasted. If your GUI is highly interactive, then immediate mode may actually be more performant compared to retained mode. Go to any web page and resize the browser window, and you'll notice that the browser is very slow to do the layout and eats a lot of CPU doing it. Resize a window in `egui` by contrast, and you'll get smooth 60 FPS at no extra CPU cost. @@ -278,6 +296,8 @@ Yes! But you need to install your own font (`.ttf` or `.otf`) using `Context::se ### Can I customize the look of egui? Yes! You can customize the colors, spacing, fonts and sizes of everything using `Context::set_style`. +This is not yet as powerful as say CSS, [but this is going to improve soon](https://github.com/emilk/egui/issues/3284). + Here is an example (from https://github.com/AlexxxRu/TinyPomodoro): @@ -286,7 +306,7 @@ Here is an example (from https://github.com/AlexxxRu/TinyPomodoro): If you call `.await` in your GUI code, the UI will freeze, which is very bad UX. Instead, keep the GUI thread non-blocking and communicate with any concurrent tasks (`async` tasks or other threads) with something like: * Channels (e.g. [`std::sync::mpsc::channel`](https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html)). Make sure to use [`try_recv`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.try_recv) so you don't block the gui thread! * `Arc>` (background thread sets a value; GUI thread reads it) -* [`poll_promise::Promise`](https://docs.rs/poll-promise) (example: [`examples/download_image/`](https://github.com/emilk/egui/blob/master/examples/download_image/)) +* [`poll_promise::Promise`](https://docs.rs/poll-promise) * [`eventuals::Eventual`](https://docs.rs/eventuals/latest/eventuals/struct.Eventual.html) * [`tokio::sync::watch::channel`](https://docs.rs/tokio/latest/tokio/sync/watch/fn.channel.html) @@ -385,8 +405,8 @@ Default fonts: ---
- + -egui development is sponsored by [Rerun](https://www.rerun.io/), a startup doing
-visualizations for computer vision and robotics. +egui development is sponsored by [Rerun](https://www.rerun.io/), a startup building
+an SDK for visualizing streams of multimodal data.
diff --git a/crates/ecolor/Cargo.toml b/crates/ecolor/Cargo.toml index 2e821516e..8acafe7bd 100644 --- a/crates/ecolor/Cargo.toml +++ b/crates/ecolor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ecolor" -version = "0.22.0" +version = "0.23.0" authors = [ "Emil Ernerfeldt ", "Andreas Reich ", diff --git a/crates/eframe/CHANGELOG.md b/crates/eframe/CHANGELOG.md index 072a54e8c..2a0b5136e 100644 --- a/crates/eframe/CHANGELOG.md +++ b/crates/eframe/CHANGELOG.md @@ -6,6 +6,39 @@ NOTE: [`egui-winit`](../egui-winit/CHANGELOG.md), [`egui_glium`](../egui_glium/C This file is updated upon each release. Changes since the last release can be found by running the `scripts/generate_changelog.py` script. +## 0.23.0 - 2023-09-27 +* Update MSRV to Rust 1.70.0 [#3310](https://github.com/emilk/egui/pull/3310) +* Update to puffin 0.16 [#3144](https://github.com/emilk/egui/pull/3144) +* Update to `wgpu` 0.17.0 [#3170](https://github.com/emilk/egui/pull/3170) (thanks [@Aaron1011](https://github.com/Aaron1011)!) +* Improved wgpu callbacks [#3253](https://github.com/emilk/egui/pull/3253) (thanks [@Wumpf](https://github.com/Wumpf)!) +* Improve documentation of `eframe`, especially for wasm32 [#3295](https://github.com/emilk/egui/pull/3295) +* `eframe::Frame::info` returns a reference [#3301](https://github.com/emilk/egui/pull/3301) (thanks [@Barugon](https://github.com/Barugon)!) +* Move `App::persist_window` to `NativeOptions` and `App::max_size_points` to `WebOptions` [#3397](https://github.com/emilk/egui/pull/3397) + +#### Desktop/Native: +* Only show on-screen-keyboard and IME when editing text [#3362](https://github.com/emilk/egui/pull/3362) (thanks [@Barugon](https://github.com/Barugon)!) +* Add `eframe::storage_dir` [#3286](https://github.com/emilk/egui/pull/3286) +* Add `NativeOptions::window_builder` for more customization [#3390](https://github.com/emilk/egui/pull/3390) (thanks [@twop](https://github.com/twop)!) +* Better restore Window position on Mac when on secondary monitor [#3239](https://github.com/emilk/egui/pull/3239) +* Fix iOS support in `eframe` [#3241](https://github.com/emilk/egui/pull/3241) (thanks [@lucasmerlin](https://github.com/lucasmerlin)!) +* Speed up `eframe` state storage [#3353](https://github.com/emilk/egui/pull/3353) (thanks [@sebbert](https://github.com/sebbert)!) +* Allow users to opt-out of default `winit` features [#3228](https://github.com/emilk/egui/pull/3228) +* Expose Raw Window and Display Handles [#3073](https://github.com/emilk/egui/pull/3073) (thanks [@bash](https://github.com/bash)!) +* Use window title as fallback when app_id is not set [#3107](https://github.com/emilk/egui/pull/3107) (thanks [@jacekpoz](https://github.com/jacekpoz)!) +* Sleep a bit only when minimized [#3139](https://github.com/emilk/egui/pull/3139) (thanks [@icedrocket](https://github.com/icedrocket)!) +* Prevent text from being cleared when selected due to winit IME [#3376](https://github.com/emilk/egui/pull/3376) (thanks [@YgorSouza](https://github.com/YgorSouza)!) +* Fix android app quit on resume with glow backend [#3080](https://github.com/emilk/egui/pull/3080) (thanks [@tkkcc](https://github.com/tkkcc)!) +* Fix panic with persistence without window [#3167](https://github.com/emilk/egui/pull/3167) (thanks [@sagebind](https://github.com/sagebind)!) +* Only call `run_return` twice on Windows [#3053](https://github.com/emilk/egui/pull/3053) (thanks [@pan93412](https://github.com/pan93412)!) +* Gracefully catch error saving state to disk [#3230](https://github.com/emilk/egui/pull/3230) +* Recognize numpad enter/plus/minus [#3285](https://github.com/emilk/egui/pull/3285) +* Add more puffin profile scopes to `eframe` [#3330](https://github.com/emilk/egui/pull/3330) [#3332](https://github.com/emilk/egui/pull/3332) + +#### Web: +* Update to wasm-bindgen 0.2.87 [#3237](https://github.com/emilk/egui/pull/3237) +* Remove `Function()` invocation from eframe text_agent to bypass "unsafe-eval" restrictions in Chrome browser extensions. [#3349](https://github.com/emilk/egui/pull/3349) (thanks [@aspect](https://github.com/aspect)!) +* Fix docs about web [#3026](https://github.com/emilk/egui/pull/3026) (thanks [@kerryeon](https://github.com/kerryeon)!) + ## 0.22.0 - 2023-05-23 * Fix: `request_repaint_after` works even when called from background thread [#2939](https://github.com/emilk/egui/pull/2939) diff --git a/crates/eframe/Cargo.toml b/crates/eframe/Cargo.toml index 619ae8e57..0faca5602 100644 --- a/crates/eframe/Cargo.toml +++ b/crates/eframe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "eframe" -version = "0.22.0" +version = "0.23.0" authors = ["Emil Ernerfeldt "] description = "egui framework - write GUI apps that compiles to web and/or natively" edition = "2021" @@ -39,6 +39,16 @@ default = [ ## Enable platform accessibility API implementations through [AccessKit](https://accesskit.dev/). accesskit = ["egui/accesskit", "egui-winit/accesskit"] +# Allow crates to choose an android-activity backend via Winit +# - It's important that most applications should not have to depend on android-activity directly, and can +# rely on Winit to pull in a suitable version (unlike most Rust crates, any version conflicts won't link) +# - It's also important that we don't impose an android-activity backend by taking this choice away from applications. + +## Enable the `game-activity` backend via `egui-winit` on Android +android-game-activity = ["egui-winit/android-game-activity"] +## Enable the `native-activity` backend via `egui-winit` on Android +android-native-activity = ["egui-winit/android-native-activity"] + ## If set, egui will use `include_bytes!` to bundle some fonts. ## If you plan on specifying your own fonts you may disable this feature. default_fonts = ["egui/default_fonts"] @@ -46,12 +56,6 @@ default_fonts = ["egui/default_fonts"] ## Use [`glow`](https://github.com/grovesNL/glow) for painting, via [`egui_glow`](https://github.com/emilk/egui/tree/master/crates/egui_glow). glow = ["dep:glow", "dep:egui_glow", "dep:glutin", "dep:glutin-winit"] -## Enables wayland support and fixes clipboard issue. -wayland = ["egui-winit/wayland"] - -## Enables compiling for x11. -x11 = ["egui-winit/x11"] - ## Enable saving app state to disk. persistence = [ "directories-next", @@ -63,35 +67,32 @@ persistence = [ ## Enable profiling with the [`puffin`](https://docs.rs/puffin) crate. ## -## Only enabled on native, because of the low resolution (1ms) of clocks in browsers. ## `eframe` will call `puffin::GlobalProfiler::lock().new_frame()` for you +## +## Only enabled on native, because of the low resolution (1ms) of clocks in browsers. puffin = ["dep:puffin", "egui/puffin", "egui_glow?/puffin", "egui-wgpu?/puffin"] +## Enables wayland support and fixes clipboard issue. +wayland = ["egui-winit/wayland"] + ## Enable screen reader support (requires `ctx.options_mut(|o| o.screen_reader = true);`) on web. ## -## For other platforms, use the "accesskit" feature instead. +## For other platforms, use the `accesskit` feature instead. web_screen_reader = ["tts"] -## If set, eframe will look for the env-var `EFRAME_SCREENSHOT_TO` and write a screenshot to that location, and then quit. -## This is used to generate images for the examples. -__screenshot = [] - ## Use [`wgpu`](https://docs.rs/wgpu) for painting (via [`egui-wgpu`](https://github.com/emilk/egui/tree/master/crates/egui-wgpu)). ## This overrides the `glow` feature. wgpu = ["dep:wgpu", "dep:egui-wgpu", "dep:pollster", "dep:raw-window-handle"] -# Allow crates to choose an android-activity backend via Winit -# - It's important that most applications should not have to depend on android-activity directly, and can -# rely on Winit to pull in a suitable version (unlike most Rust crates, any version conflicts won't link) -# - It's also important that we don't impose an android-activity backend by taking this choice away from applications. +## Enables compiling for x11. +x11 = ["egui-winit/x11"] -## Enable the `native-activity` backend via `egui-winit` on Android -android-native-activity = ["egui-winit/android-native-activity"] -## Enable the `game-activity` backend via `egui-winit` on Android -android-game-activity = ["egui-winit/android-game-activity"] +## If set, eframe will look for the env-var `EFRAME_SCREENSHOT_TO` and write a screenshot to that location, and then quit. +## This is used to generate images for examples. +__screenshot = [] [dependencies] -egui = { version = "0.22.0", path = "../egui", default-features = false, features = [ +egui = { version = "0.23.0", path = "../egui", default-features = false, features = [ "bytemuck", "log", ] } @@ -104,7 +105,7 @@ thiserror.workspace = true ## Enable this when generating docs. document-features = { version = "0.2", optional = true } -egui_glow = { version = "0.22.0", path = "../egui_glow", optional = true, default-features = false } +egui_glow = { version = "0.23.0", path = "../egui_glow", optional = true, default-features = false } glow = { version = "0.12", optional = true } ron = { version = "0.8", optional = true, features = ["integer128"] } serde = { version = "1", optional = true, features = ["derive"] } @@ -112,7 +113,7 @@ serde = { version = "1", optional = true, features = ["derive"] } # ------------------------------------------- # native: [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -egui-winit = { version = "0.22.0", path = "../egui-winit", default-features = false, features = [ +egui-winit = { version = "0.23.0", path = "../egui-winit", default-features = false, features = [ "clipboard", "links", ] } @@ -124,7 +125,7 @@ winit = { version = "0.28.1", default-features = false } # optional native: directories-next = { version = "2", optional = true } -egui-wgpu = { version = "0.22.0", path = "../egui-wgpu", optional = true, features = [ +egui-wgpu = { version = "0.23.0", path = "../egui-wgpu", optional = true, features = [ "winit", ] } # if wgpu is used, use it with winit pollster = { version = "0.3", optional = true } # needed for wgpu @@ -138,7 +139,7 @@ wgpu = { workspace = true, optional = true } # mac: [target.'cfg(any(target_os = "macos"))'.dependencies] -cocoa = "0.24.1" +cocoa = "0.24.1" # Stuck on old version until we update to winit 0.29 objc = "0.2.7" # windows: @@ -198,7 +199,7 @@ web-sys = { version = "0.3.58", features = [ ] } # optional web: -egui-wgpu = { version = "0.22.0", path = "../egui-wgpu", optional = true } # if wgpu is used, use it without (!) winit +egui-wgpu = { version = "0.23.0", path = "../egui-wgpu", optional = true } # if wgpu is used, use it without (!) winit raw-window-handle = { version = "0.5.2", optional = true } tts = { version = "0.25", optional = true, default-features = false } wgpu = { workspace = true, optional = true } diff --git a/crates/eframe/README.md b/crates/eframe/README.md index 2356af0e0..15cdf72d3 100644 --- a/crates/eframe/README.md +++ b/crates/eframe/README.md @@ -28,6 +28,7 @@ You need to either use `edition = "2021"`, or set `resolver = "2"` in the `[work You can opt-in to the using [`egui_wgpu`](https://github.com/emilk/egui/tree/master/crates/egui_wgpu) for rendering by enabling the `wgpu` feature and setting `NativeOptions::renderer` to `Renderer::Wgpu`. +To get copy-paste working on web, you need to compile with `export RUSTFLAGS=--cfg=web_sys_unstable_apis`. ## Alternatives `eframe` is not the only way to write an app using `egui`! You can also try [`egui-miniquad`](https://github.com/not-fl3/egui-miniquad), [`bevy_egui`](https://github.com/mvlabat/bevy_egui), [`egui_sdl2_gl`](https://github.com/ArjunNair/egui_sdl2_gl), and others. diff --git a/crates/eframe/src/epi/icon_data.rs b/crates/eframe/src/epi/icon_data.rs index c62b6a689..078b57714 100644 --- a/crates/eframe/src/epi/icon_data.rs +++ b/crates/eframe/src/epi/icon_data.rs @@ -14,6 +14,15 @@ pub struct IconData { pub height: u32, } +impl std::fmt::Debug for IconData { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("IconData") + .field("width", &self.width) + .field("height", &self.height) + .finish_non_exhaustive() + } +} + impl IconData { /// Convert into [`image::RgbaImage`] /// diff --git a/crates/eframe/src/epi/mod.rs b/crates/eframe/src/epi/mod.rs index d45b39cfb..ba83acbb4 100644 --- a/crates/eframe/src/epi/mod.rs +++ b/crates/eframe/src/epi/mod.rs @@ -9,6 +9,7 @@ #[cfg(not(target_arch = "wasm32"))] mod icon_data; +use egui::ViewportBuilder; #[cfg(not(target_arch = "wasm32"))] pub use icon_data::IconData; @@ -28,7 +29,7 @@ use static_assertions::assert_not_impl_any; #[cfg(not(target_arch = "wasm32"))] #[cfg(any(feature = "glow", feature = "wgpu"))] -pub use winit::event_loop::EventLoopBuilder; +pub use winit::{event_loop::EventLoopBuilder, window::WindowBuilder}; /// Hook into the building of an event loop before it is run /// @@ -38,6 +39,14 @@ pub use winit::event_loop::EventLoopBuilder; #[cfg(any(feature = "glow", feature = "wgpu"))] pub type EventLoopBuilderHook = Box)>; +/// Hook into the building of a the native window. +/// +/// You can configure any platform specific details required on top of the default configuration +/// done by `eframe`. +#[cfg(not(target_arch = "wasm32"))] +#[cfg(any(feature = "glow", feature = "wgpu"))] +pub type WindowBuilderHook = Box ViewportBuilder>; + /// This is how your app is created. /// /// You can use the [`CreationContext`] to setup egui, restore state, setup OpenGL things, etc. @@ -182,13 +191,6 @@ pub trait App { std::time::Duration::from_secs(30) } - /// The size limit of the web app canvas. - /// - /// By default the max size is [`egui::Vec2::INFINITY`], i.e. unlimited. - fn max_size_points(&self) -> egui::Vec2 { - egui::Vec2::INFINITY - } - /// Background color values for the app, e.g. what is sent to `gl.clearColor`. /// /// This is the background of your windows if you don't set a central panel. @@ -208,12 +210,6 @@ pub trait App { // _visuals.window_fill() would also be a natural choice } - /// Controls whether or not the native window position and size will be - /// persisted (only if the "persistence" feature is enabled). - fn persist_native_window(&self) -> bool { - true - } - /// Controls whether or not the egui memory (window positions etc) will be /// persisted (only if the "persistence" feature is enabled). fn persist_egui_memory(&self) -> bool { @@ -313,6 +309,7 @@ pub struct NativeOptions { pub resizable: bool, /// On desktop: make the window transparent. + /// /// You control the transparency with [`App::clear_color()`]. /// You should avoid having a [`egui::CentralPanel`], or make sure its frame is also transparent. pub transparent: bool, @@ -397,6 +394,15 @@ pub struct NativeOptions { #[cfg(any(feature = "glow", feature = "wgpu"))] pub event_loop_builder: Option, + /// Hook into the building of a window. + /// + /// Specify a callback here in case you need to make platform specific changes to the + /// window appearance. + /// + /// Note: A [`NativeOptions`] clone will not include any `window_builder` hook. + #[cfg(any(feature = "glow", feature = "wgpu"))] + pub window_builder: Option, + #[cfg(feature = "glow")] /// Needed for cross compiling for VirtualBox VMSVGA driver with OpenGL ES 2.0 and OpenGL 2.1 which doesn't support SRGB texture. /// See . @@ -455,6 +461,10 @@ pub struct NativeOptions { /// } /// ``` pub app_id: Option, + + /// Controls whether or not the native window position and size will be + /// persisted (only if the "persistence" feature is enabled). + pub persist_window: bool, } #[cfg(not(target_arch = "wasm32"))] @@ -466,6 +476,9 @@ impl Clone for NativeOptions { #[cfg(any(feature = "glow", feature = "wgpu"))] event_loop_builder: None, // Skip any builder callbacks if cloning + #[cfg(any(feature = "glow", feature = "wgpu"))] + window_builder: None, // Skip any builder callbacks if cloning + #[cfg(feature = "wgpu")] wgpu_options: self.wgpu_options.clone(), @@ -520,6 +533,9 @@ impl Default for NativeOptions { #[cfg(any(feature = "glow", feature = "wgpu"))] event_loop_builder: None, + #[cfg(any(feature = "glow", feature = "wgpu"))] + window_builder: None, + #[cfg(feature = "glow")] shader_version: None, @@ -529,6 +545,8 @@ impl Default for NativeOptions { wgpu_options: egui_wgpu::WgpuConfiguration::default(), app_id: None, + + persist_window: true, } } } @@ -566,6 +584,11 @@ pub struct WebOptions { /// Configures wgpu instance/device/adapter/surface creation and renderloop. #[cfg(feature = "wgpu")] pub wgpu_options: egui_wgpu::WgpuConfiguration, + + /// The size limit of the web app canvas. + /// + /// By default the max size is [`egui::Vec2::INFINITY`], i.e. unlimited. + pub max_size_points: egui::Vec2, } #[cfg(target_arch = "wasm32")] @@ -581,6 +604,8 @@ impl Default for WebOptions { #[cfg(feature = "wgpu")] wgpu_options: egui_wgpu::WgpuConfiguration::default(), + + max_size_points: egui::Vec2::INFINITY, } } } @@ -1164,7 +1189,8 @@ pub fn get_value(storage: &dyn Storage, key: &st .and_then(|value| match ron::from_str(&value) { Ok(value) => Some(value), Err(err) => { - log::warn!("Failed to decode RON: {err}"); + // This happens on when we break the format, e.g. when updating egui. + log::debug!("Failed to decode RON: {err}"); None } }) diff --git a/crates/eframe/src/lib.rs b/crates/eframe/src/lib.rs index 4ceae307a..2c36d4287 100644 --- a/crates/eframe/src/lib.rs +++ b/crates/eframe/src/lib.rs @@ -280,7 +280,7 @@ pub fn run_simple_native( update_fun: U, } - impl App for SimpleApp { + impl App for SimpleApp { fn update(&mut self, ctx: &egui::Context, frame: &mut Frame) { (self.update_fun)(ctx, frame); } diff --git a/crates/eframe/src/native/epi_integration.rs b/crates/eframe/src/native/epi_integration.rs index 88aaf37c1..2f1c78eea 100644 --- a/crates/eframe/src/native/epi_integration.rs +++ b/crates/eframe/src/native/epi_integration.rs @@ -70,7 +70,7 @@ pub fn read_window_info( pub fn window_builder( event_loop: &EventLoopWindowTarget, title: &str, - native_options: &epi::NativeOptions, + native_options: &mut epi::NativeOptions, window_settings: Option, ) -> ViewportBuilder { let epi::NativeOptions { @@ -173,7 +173,10 @@ pub fn window_builder( } } - window_builder + match std::mem::take(&mut native_options.window_builder) { + Some(hook) => hook(window_builder), + None => window_builder, + } } pub fn apply_native_options_to_window( @@ -326,6 +329,8 @@ pub struct EpiIntegration { can_drag_window: bool, window_state: WindowState, follow_system_theme: bool, + #[cfg(feature = "persistence")] + persist_window: bool, app_icon_setter: super::app_icon::AppTitleIconSetter, } @@ -388,6 +393,8 @@ impl EpiIntegration { can_drag_window: false, window_state, follow_system_theme: native_options.follow_system_theme, + #[cfg(feature = "persistence")] + persist_window: native_options.persist_window, app_icon_setter, beginning: Instant::now(), } @@ -578,7 +585,7 @@ impl EpiIntegration { crate::profile_function!(); if let Some(window) = _window { - if _app.persist_native_window() { + if self.persist_window { crate::profile_scope!("native_window"); epi::set_value( storage, diff --git a/crates/eframe/src/native/file_storage.rs b/crates/eframe/src/native/file_storage.rs index 6b059e817..4c44430f8 100644 --- a/crates/eframe/src/native/file_storage.rs +++ b/crates/eframe/src/native/file_storage.rs @@ -130,6 +130,7 @@ fn save_to_disk(file_path: &PathBuf, kv: &HashMap) { let mut writer = std::io::BufWriter::new(file); let config = Default::default(); + crate::profile_scope!("ron::serialize"); if let Err(err) = ron::ser::to_writer_pretty(&mut writer, &kv, config) .and_then(|_| writer.flush().map_err(|err| err.into())) { diff --git a/crates/eframe/src/native/run.rs b/crates/eframe/src/native/run.rs index 9b57f6637..dd021fbab 100644 --- a/crates/eframe/src/native/run.rs +++ b/crates/eframe/src/native/run.rs @@ -895,7 +895,7 @@ mod glow_integration { event_loop: &EventLoopWindowTarget, storage: Option<&dyn epi::Storage>, title: &str, - native_options: &NativeOptions, + native_options: &mut NativeOptions, ) -> Result<(GlutinWindowContext, glow::Context)> { crate::profile_function!(); @@ -945,7 +945,7 @@ mod glow_integration { event_loop, storage.as_deref(), &self.app_name, - &self.native_options, + &mut self.native_options, )?; let gl = Arc::new(gl); @@ -1944,7 +1944,7 @@ mod wgpu_integration { event_loop: &EventLoopWindowTarget, storage: Option<&dyn epi::Storage>, title: &str, - native_options: &NativeOptions, + native_options: &mut NativeOptions, ) -> std::result::Result<(winit::window::Window, ViewportBuilder), winit::error::OsError> { crate::profile_function!(); @@ -2556,7 +2556,7 @@ mod wgpu_integration { event_loop, running.integration.read().frame.storage(), &self.app_name, - &self.native_options, + &mut self.native_options, )?; self.set_window(ViewportId::MAIN)?; } @@ -2571,7 +2571,7 @@ mod wgpu_integration { event_loop, storage.as_deref(), &self.app_name, - &self.native_options, + &mut self.native_options, )?; self.init_run_state(event_loop, storage, window, builder)?; } diff --git a/crates/eframe/src/web/app_runner.rs b/crates/eframe/src/web/app_runner.rs index 76028ecdc..934a31c40 100644 --- a/crates/eframe/src/web/app_runner.rs +++ b/crates/eframe/src/web/app_runner.rs @@ -7,6 +7,7 @@ use crate::{epi, App}; use super::{now_sec, web_painter::WebPainter, NeedRepaint}; pub struct AppRunner { + web_options: crate::WebOptions, pub(crate) frame: epi::Frame, egui_ctx: egui::Context, painter: super::ActiveWebPainter, @@ -99,6 +100,7 @@ impl AppRunner { } let mut runner = Self { + web_options, frame, egui_ctx, painter, @@ -175,7 +177,7 @@ impl AppRunner { pub fn logic(&mut self) -> (std::time::Duration, Vec) { let frame_start = now_sec(); - super::resize_canvas_to_screen_size(self.canvas_id(), self.app.max_size_points()); + super::resize_canvas_to_screen_size(self.canvas_id(), self.web_options.max_size_points); let canvas_size = super::canvas_size_in_points(self.canvas_id()); let raw_input = self.input.new_frame(canvas_size); diff --git a/crates/egui-wgpu/CHANGELOG.md b/crates/egui-wgpu/CHANGELOG.md index d7cbee4d1..6d8ba691e 100644 --- a/crates/egui-wgpu/CHANGELOG.md +++ b/crates/egui-wgpu/CHANGELOG.md @@ -6,6 +6,13 @@ This file is updated upon each release. Changes since the last release can be found by running the `scripts/generate_changelog.py` script. +## 0.23.0 - 2023-09-27 +* Update to `wgpu` 0.17.0 [#3170](https://github.com/emilk/egui/pull/3170) (thanks [@Aaron1011](https://github.com/Aaron1011)!) +* Improved wgpu callbacks [#3253](https://github.com/emilk/egui/pull/3253) (thanks [@Wumpf](https://github.com/Wumpf)!) +* Fix depth texture init with multisampling [#3207](https://github.com/emilk/egui/pull/3207) (thanks [@mauliu](https://github.com/mauliu)!) +* Fix panic on wgpu GL backend due to new screenshot capability [#3078](https://github.com/emilk/egui/pull/3078) (thanks [@amfaber](https://github.com/amfaber)!) + + ## 0.22.0 - 2023-05-23 * Update to wgpu 0.16 [#2884](https://github.com/emilk/egui/pull/2884) (thanks [@niklaskorz](https://github.com/niklaskorz)!) * Device configuration is now dependent on adapter [#2951](https://github.com/emilk/egui/pull/2951) (thanks [@Wumpf](https://github.com/Wumpf)!) diff --git a/crates/egui-wgpu/Cargo.toml b/crates/egui-wgpu/Cargo.toml index 70533dd44..3b7547cb2 100644 --- a/crates/egui-wgpu/Cargo.toml +++ b/crates/egui-wgpu/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egui-wgpu" -version = "0.22.0" +version = "0.23.0" description = "Bindings for using egui natively using the wgpu library" authors = [ "Nils Hasenbanck ", @@ -36,8 +36,8 @@ winit = ["dep:winit"] [dependencies] -egui = { version = "0.22.0", path = "../egui", default-features = false } -epaint = { version = "0.22.0", path = "../epaint", default-features = false, features = [ +egui = { version = "0.23.0", path = "../egui", default-features = false } +epaint = { version = "0.23.0", path = "../epaint", default-features = false, features = [ "bytemuck", ] } diff --git a/crates/egui-wgpu/src/lib.rs b/crates/egui-wgpu/src/lib.rs index 8d9d5912c..a46e185e8 100644 --- a/crates/egui-wgpu/src/lib.rs +++ b/crates/egui-wgpu/src/lib.rs @@ -123,6 +123,16 @@ pub struct WgpuConfiguration { pub on_surface_error: Arc SurfaceErrorAction>, } +impl std::fmt::Debug for WgpuConfiguration { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("WgpuConfiguration") + .field("supported_backends", &self.supported_backends) + .field("present_mode", &self.present_mode) + .field("power_preference", &self.power_preference) + .finish_non_exhaustive() + } +} + impl Default for WgpuConfiguration { fn default() -> Self { Self { diff --git a/crates/egui-winit/CHANGELOG.md b/crates/egui-winit/CHANGELOG.md index d181b99b4..ecb1de768 100644 --- a/crates/egui-winit/CHANGELOG.md +++ b/crates/egui-winit/CHANGELOG.md @@ -5,6 +5,13 @@ This file is updated upon each release. Changes since the last release can be found by running the `scripts/generate_changelog.py` script. +## 0.23.0 - 2023-09-27 +* Only show on-screen-keyboard and IME when editing text [#3362](https://github.com/emilk/egui/pull/3362) (thanks [@Barugon](https://github.com/Barugon)!) +* Replace `instant` with `web_time` [#3296](https://github.com/emilk/egui/pull/3296) +* Allow users to opt-out of default `winit` features [#3228](https://github.com/emilk/egui/pull/3228) +* Recognize numpad enter/plus/minus [#3285](https://github.com/emilk/egui/pull/3285) + + ## 0.22.0 - 2023-05-23 * Only use `wasm-bindgen` feature for `instant` when building for wasm32 [#2808](https://github.com/emilk/egui/pull/2808) (thanks [@gferon](https://github.com/gferon)!) * Fix unsafe API of `Clipboard::new` [#2765](https://github.com/emilk/egui/pull/2765) (thanks [@dhardy](https://github.com/dhardy)!) diff --git a/crates/egui-winit/Cargo.toml b/crates/egui-winit/Cargo.toml index 5f670007c..e48c2b074 100644 --- a/crates/egui-winit/Cargo.toml +++ b/crates/egui-winit/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egui-winit" -version = "0.22.0" +version = "0.23.0" authors = ["Emil Ernerfeldt "] description = "Bindings for using egui with winit" edition = "2021" @@ -23,6 +23,15 @@ default = ["clipboard", "links", "wayland", "winit/default", "x11"] ## Enable platform accessibility API implementations through [AccessKit](https://accesskit.dev/). accesskit = ["accesskit_winit", "egui/accesskit"] +# Allow crates to choose an android-activity backend via Winit +# - It's important that most applications should not have to depend on android-activity directly, and can +# rely on Winit to pull in a suitable version (unlike most Rust crates, any version conflicts won't link) +# - It's also important that we don't impose an android-activity backend by taking this choice away from applications. +## Enable the `game-activity` backend via Winit on Android +android-game-activity = ["winit/android-game-activity"] +## Enable the `native-activity` backend via Winit on Android +android-native-activity = ["winit/android-native-activity"] + ## [`bytemuck`](https://docs.rs/bytemuck) enables you to cast [`egui::epaint::Vertex`], [`egui::Vec2`] etc to `&[u8]`. bytemuck = ["egui/bytemuck"] @@ -45,18 +54,8 @@ wayland = ["winit/wayland"] ## Enables compiling for x11. x11 = ["winit/x11"] -# Allow crates to choose an android-activity backend via Winit -# - It's important that most applications should not have to depend on android-activity directly, and can -# rely on Winit to pull in a suitable version (unlike most Rust crates, any version conflicts won't link) -# - It's also important that we don't impose an android-activity backend by taking this choice away from applications. - -## Enable the `native-activity` backend via Winit on Android -android-native-activity = ["winit/android-native-activity"] -## Enable the `game-activity` backend via Winit on Android -android-game-activity = ["winit/android-game-activity"] - [dependencies] -egui = { version = "0.22.0", path = "../egui", default-features = false, features = [ +egui = { version = "0.23.0", path = "../egui", default-features = false, features = [ "log", ] } log = { version = "0.4", features = ["std"] } diff --git a/crates/egui/Cargo.toml b/crates/egui/Cargo.toml index 7ce890f4b..349f0849a 100644 --- a/crates/egui/Cargo.toml +++ b/crates/egui/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egui" -version = "0.22.0" +version = "0.23.0" authors = ["Emil Ernerfeldt "] description = "An easy-to-use immediate mode GUI that runs on both web and native" edition = "2021" @@ -22,9 +22,18 @@ all-features = true [features] default = ["default_fonts"] +## Exposes detailed accessibility implementation required by platform +## accessibility APIs. Also requires support in the egui integration. +accesskit = ["dep:accesskit"] + ## [`bytemuck`](https://docs.rs/bytemuck) enables you to cast [`epaint::Vertex`], [`emath::Vec2`] etc to `&[u8]`. bytemuck = ["epaint/bytemuck"] +## Show a debug-ui on hover including the stacktrace to the hovered item. +## This is very useful in finding the code that creates a part of the UI. +## Does not work on web. +callstack = ["dep:backtrace"] + ## [`cint`](https://docs.rs/cint) enables interoperability with other color libraries. cint = ["epaint/cint"] @@ -67,7 +76,7 @@ unity = ["epaint/unity"] [dependencies] -epaint = { version = "0.22.0", path = "../epaint", default-features = false } +epaint = { version = "0.23.0", path = "../epaint", default-features = false } ahash = { version = "0.8.1", default-features = false, features = [ "no-rng", # we don't need DOS-protection, so we let users opt-in to it instead @@ -76,10 +85,10 @@ ahash = { version = "0.8.1", default-features = false, features = [ nohash-hasher = "0.2" #! ### Optional dependencies -## Exposes detailed accessibility implementation required by platform -## accessibility APIs. Also requires support in the egui integration. accesskit = { version = "0.11", optional = true } +backtrace = { version = "0.3", optional = true } + ## Enable this when generating docs. document-features = { version = "0.2", optional = true } diff --git a/crates/egui/src/callstack.rs b/crates/egui/src/callstack.rs new file mode 100644 index 000000000..fac5ac593 --- /dev/null +++ b/crates/egui/src/callstack.rs @@ -0,0 +1,186 @@ +#[derive(Clone)] +struct Frame { + /// `_main` is usually as the deepest depth. + depth: usize, + name: String, + file_and_line: String, +} + +/// Capture a callstack, skipping the frames that are not interesting. +/// +/// In particular: slips everything before `egui::Context::run`, +/// and skipping all frames in the `egui::` namespace. +pub fn capture() -> String { + let mut frames = vec![]; + let mut depth = 0; + + backtrace::trace(|frame| { + // Resolve this instruction pointer to a symbol name + backtrace::resolve_frame(frame, |symbol| { + let mut file_and_line = symbol.filename().map(shorten_source_file_path); + + if let Some(file_and_line) = &mut file_and_line { + if let Some(line_nr) = symbol.lineno() { + file_and_line.push_str(&format!(":{line_nr}")); + } + } + let file_and_line = file_and_line.unwrap_or_default(); + + let name = symbol + .name() + .map(|name| name.to_string()) + .unwrap_or_default(); + + frames.push(Frame { + depth, + name, + file_and_line, + }); + }); + + depth += 1; // note: we can resolve multiple symbols on the same frame. + + true // keep going to the next frame + }); + + if frames.is_empty() { + return Default::default(); + } + + // Inclusive: + let mut min_depth = 0; + let mut max_depth = frames.len() - 1; + + for frame in &frames { + if frame.name.starts_with("egui::callstack::capture") { + min_depth = frame.depth + 1; + } + if frame.name.starts_with("egui::context::Context::run") { + max_depth = frame.depth; + } + } + + // Remove frames that are uninteresting: + frames.retain(|frame| { + // Keep some special frames to give the user a sense of chronology: + if frame.name == "main" + || frame.name == "_main" + || frame.name.starts_with("egui::context::Context::run") + || frame.name.starts_with("eframe::run_native") + { + return true; + } + + if frame.depth < min_depth || max_depth < frame.depth { + return false; + } + + // Remove stuff that isn't user calls: + let skip_prefixes = [ + // "backtrace::", // not needed, since we cut at at egui::callstack::capture + "egui::", + "", + "egui_plot::", + "egui_extras::", + "core::ptr::drop_in_place::", + "eframe::", + "core::ops::function::FnOnce::call_once", + " as core::ops::function::FnOnce>::call_once", + ]; + for prefix in skip_prefixes { + if frame.name.starts_with(prefix) { + return false; + } + } + true + }); + + frames.reverse(); // main on top, i.e. chronological order. Same as Python. + + let mut deepest_depth = 0; + let mut widest_file_line = 0; + for frame in &frames { + deepest_depth = frame.depth.max(deepest_depth); + widest_file_line = frame.file_and_line.len().max(widest_file_line); + } + + let widest_depth = deepest_depth.to_string().len(); + + let mut formatted = String::new(); + + if !frames.is_empty() { + let mut last_depth = frames[0].depth; + + for frame in &frames { + let Frame { + depth, + name, + file_and_line, + } = frame; + + if frame.depth + 1 < last_depth || last_depth + 1 < frame.depth { + // Show that some frames were elided + formatted.push_str(&format!("{:widest_depth$} …\n", "")); + } + + formatted.push_str(&format!( + "{depth:widest_depth$}: {file_and_line:widest_file_line$} {name}\n" + )); + + last_depth = frame.depth; + } + } + + formatted +} + +/// Shorten a path to a Rust source file from a callstack. +/// +/// Example input: +/// * `/Users/emilk/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.24.1/src/runtime/runtime.rs` +/// * `crates/rerun/src/main.rs` +/// * `/rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ops/function.rs` +fn shorten_source_file_path(path: &std::path::Path) -> String { + // Look for `src` and strip everything up to it. + + let components: Vec<_> = path.iter().map(|path| path.to_string_lossy()).collect(); + + let mut src_idx = None; + for (i, c) in components.iter().enumerate() { + if c == "src" { + src_idx = Some(i); + } + } + + // Look for the last `src`: + if let Some(src_idx) = src_idx { + // Before `src` comes the name of the crate - let's include that: + let first_index = src_idx.saturating_sub(1); + + let mut output = components[first_index].to_string(); + for component in &components[first_index + 1..] { + output.push('/'); + output.push_str(component); + } + output + } else { + // No `src` directory found - weird! + path.display().to_string() + } +} + +#[test] +fn test_shorten_path() { + for (before, after) in [ + ("/Users/emilk/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.24.1/src/runtime/runtime.rs", "tokio-1.24.1/src/runtime/runtime.rs"), + ("crates/rerun/src/main.rs", "rerun/src/main.rs"), + ("/rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ops/function.rs", "core/src/ops/function.rs"), + ("/weird/path/file.rs", "/weird/path/file.rs"), + ] + { + use std::str::FromStr as _; + let before = std::path::PathBuf::from_str(before).unwrap(); + assert_eq!(shorten_source_file_path(&before), after); + } +} diff --git a/crates/egui/src/containers/area.rs b/crates/egui/src/containers/area.rs index f493c20cd..52c02b18b 100644 --- a/crates/egui/src/containers/area.rs +++ b/crates/egui/src/containers/area.rs @@ -65,12 +65,12 @@ pub struct Area { interactable: bool, enabled: bool, constrain: bool, + constrain_rect: Option, order: Order, default_pos: Option, pivot: Align2, anchor: Option<(Align2, Vec2)>, new_pos: Option, - drag_bounds: Option, } impl Area { @@ -80,13 +80,13 @@ impl Area { movable: true, interactable: true, constrain: false, + constrain_rect: None, enabled: true, order: Order::Middle, default_pos: None, new_pos: None, pivot: Align2::LEFT_TOP, anchor: None, - drag_bounds: None, } } @@ -155,6 +155,21 @@ impl Area { self } + /// Constraint the movement of the window to the given rectangle. + /// + /// For instance: `.constrain_to(ctx.screen_rect())`. + pub fn constrain_to(mut self, constrain_rect: Rect) -> Self { + self.constrain = true; + self.constrain_rect = Some(constrain_rect); + self + } + + #[deprecated = "Use `constrain_to` instead"] + pub fn drag_bounds(mut self, constrain_rect: Rect) -> Self { + self.constrain_rect = Some(constrain_rect); + self + } + /// Where the "root" of the area is. /// /// For instance, if you set this to [`Align2::RIGHT_TOP`] @@ -189,12 +204,6 @@ impl Area { self.movable(false) } - /// Constrain the area up to which the window can be dragged. - pub fn drag_bounds(mut self, bounds: Rect) -> Self { - self.drag_bounds = Some(bounds); - self - } - pub(crate) fn get_pivot(&self) -> Align2 { if let Some((pivot, _)) = self.anchor { pivot @@ -209,7 +218,8 @@ pub(crate) struct Prepared { state: State, move_response: Response, enabled: bool, - drag_bounds: Option, + constrain: bool, + constrain_rect: Option, /// We always make windows invisible the first frame to hide "first-frame-jitters". /// @@ -243,8 +253,8 @@ impl Area { new_pos, pivot, anchor, - drag_bounds, constrain, + constrain_rect, } = self; let layer_id = LayerId::new(order, id); @@ -271,7 +281,7 @@ impl Area { } // interact right away to prevent frame-delay - let move_response = { + let mut move_response = { let interact_id = layer_id.id.with("move"); let sense = if movable { Sense::click_and_drag() @@ -291,16 +301,8 @@ impl Area { enabled, ); - // Important check - don't try to move e.g. a combobox popup! - if movable { - if move_response.dragged() { - state.pivot_pos += ctx.input(|i| i.pointer.delta()); - } - - state.set_left_top_pos( - ctx.constrain_window_rect_to_area(state.rect(), drag_bounds) - .min, - ); + if movable && move_response.dragged() { + state.pivot_pos += ctx.input(|i| i.pointer.delta()); } if (move_response.dragged() || move_response.clicked()) @@ -314,21 +316,25 @@ impl Area { move_response }; - state.set_left_top_pos(ctx.round_pos_to_pixels(state.left_top_pos())); - if constrain { state.set_left_top_pos( - ctx.constrain_window_rect_to_area(state.rect(), drag_bounds) - .left_top(), + ctx.constrain_window_rect_to_area(state.rect(), constrain_rect) + .min, ); } + state.set_left_top_pos(ctx.round_pos_to_pixels(state.left_top_pos())); + + // Update responsbe with posisbly moved/constrained rect: + move_response = move_response.with_new_rect(state.rect()); + Prepared { layer_id, state, move_response, enabled, - drag_bounds, + constrain, + constrain_rect, temporarily_invisible: is_new, } } @@ -371,15 +377,19 @@ impl Prepared { &mut self.state } - pub(crate) fn drag_bounds(&self) -> Option { - self.drag_bounds + pub(crate) fn constrain(&self) -> bool { + self.constrain + } + + pub(crate) fn constrain_rect(&self) -> Option { + self.constrain_rect } pub(crate) fn content_ui(&self, ctx: &Context) -> Ui { let screen_rect = ctx.screen_rect(); - let bounds = if let Some(bounds) = self.drag_bounds { - bounds.intersect(screen_rect) // protect against infinite bounds + let constrain_rect = if let Some(constrain_rect) = self.constrain_rect { + constrain_rect.intersect(screen_rect) // protect against infinite bounds } else { let central_area = ctx.available_rect(); @@ -393,7 +403,7 @@ impl Prepared { let max_rect = Rect::from_min_max( self.state.left_top_pos(), - bounds + constrain_rect .max .at_least(self.state.left_top_pos() + Vec2::splat(32.0)), ); @@ -401,9 +411,9 @@ impl Prepared { let shadow_radius = ctx.style().visuals.window_shadow.extrusion; // hacky let clip_rect_margin = ctx.style().visuals.clip_rect_margin.max(shadow_radius); - let clip_rect = Rect::from_min_max(self.state.left_top_pos(), bounds.max) + let clip_rect = Rect::from_min_max(self.state.left_top_pos(), constrain_rect.max) .expand(clip_rect_margin) - .intersect(bounds); + .intersect(constrain_rect); let mut ui = Ui::new( ctx.clone(), @@ -424,7 +434,8 @@ impl Prepared { mut state, move_response, enabled: _, - drag_bounds: _, + constrain: _, + constrain_rect: _, temporarily_invisible: _, } = self; diff --git a/crates/egui/src/containers/popup.rs b/crates/egui/src/containers/popup.rs index e4ad1b130..78be080ba 100644 --- a/crates/egui/src/containers/popup.rs +++ b/crates/egui/src/containers/popup.rs @@ -260,9 +260,8 @@ fn show_tooltip_area_dyn<'c, R>( Area::new(area_id) .order(Order::Tooltip) .fixed_pos(window_pos) - .constrain(true) + .constrain_to(ctx.screen_rect()) .interactable(false) - .drag_bounds(ctx.screen_rect()) .show(ctx, |ui| { Frame::popup(&ctx.style()) .show(ui, |ui| { diff --git a/crates/egui/src/containers/resize.rs b/crates/egui/src/containers/resize.rs index 2f71a57c0..e991e4e10 100644 --- a/crates/egui/src/containers/resize.rs +++ b/crates/egui/src/containers/resize.rs @@ -314,6 +314,7 @@ impl Resize { state.store(ui.ctx(), id); + #[cfg(debug_assertions)] if ui.ctx().style().debug.show_resize { ui.ctx().debug_painter().debug_rect( Rect::from_min_size(content_ui.min_rect().left_top(), state.desired_size), diff --git a/crates/egui/src/containers/window.rs b/crates/egui/src/containers/window.rs index ca4f6190d..aa3fad118 100644 --- a/crates/egui/src/containers/window.rs +++ b/crates/egui/src/containers/window.rs @@ -43,7 +43,7 @@ impl<'open> Window<'open> { /// If you need a changing title, you must call `window.id(…)` with a fixed id. pub fn new(title: impl Into) -> Self { let title = title.into().fallback_text_style(TextStyle::Heading); - let area = Area::new(Id::new(title.text())); + let area = Area::new(Id::new(title.text())).constrain(true); Self { title, open: None, @@ -146,11 +146,31 @@ impl<'open> Window<'open> { } /// Constrains this window to the screen bounds. + /// + /// To change the area to constrain to, use [`Self::constraint_to`]. + /// + /// Default: `true`. pub fn constrain(mut self, constrain: bool) -> Self { self.area = self.area.constrain(constrain); self } + /// Constraint the movement of the window to the given rectangle. + /// + /// For instance: `.constrain_to(ctx.screen_rect())`. + pub fn constraint_to(mut self, constrain_rect: Rect) -> Self { + self.area = self.area.constrain_to(constrain_rect); + self + } + + #[deprecated = "Use `constrain_to` instead"] + pub fn drag_bounds(mut self, constrain_rect: Rect) -> Self { + #![allow(deprecated)] + + self.area = self.area.drag_bounds(constrain_rect); + self + } + /// Where the "root" of the window is. /// /// For instance, if you set this to [`Align2::RIGHT_TOP`] @@ -276,12 +296,6 @@ impl<'open> Window<'open> { self.scroll = self.scroll.drag_to_scroll(drag_to_scroll); self } - - /// Constrain the area up to which the window can be dragged. - pub fn drag_bounds(mut self, bounds: Rect) -> Self { - self.area = self.area.drag_bounds(bounds); - self - } } impl<'open> Window<'open> { @@ -452,13 +466,6 @@ impl<'open> Window<'open> { content_inner }; - { - let pos = ctx - .constrain_window_rect_to_area(area.state().rect(), area.drag_bounds()) - .left_top(); - area.state_mut().set_left_top_pos(pos); - } - let full_response = area.end(ctx, area_content_ui); let inner_response = InnerResponse { @@ -562,9 +569,11 @@ fn interact( resize_id: Id, ) -> Option { let new_rect = move_and_resize_window(ctx, &window_interaction)?; - let new_rect = ctx.round_rect_to_pixels(new_rect); + let mut new_rect = ctx.round_rect_to_pixels(new_rect); - let new_rect = ctx.constrain_window_rect_to_area(new_rect, area.drag_bounds()); + if area.constrain() { + new_rect = ctx.constrain_window_rect_to_area(new_rect, area.constrain_rect()); + } // TODO(emilk): add this to a Window state instead as a command "move here next frame" area.state_mut().set_left_top_pos(new_rect.left_top()); diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index 6f71970a9..d3804c51c 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -830,6 +830,7 @@ impl Context { // This solves the problem of overlapping widgets. // Whichever widget is added LAST (=on top) gets the input: if interact_rect.is_positive() && sense.interactive() { + #[cfg(debug_assertions)] if self.style().debug.show_interactive_widgets { Self::layer_painter(self, LayerId::debug()).rect( interact_rect, @@ -838,6 +839,8 @@ impl Context { Stroke::new(1.0, Color32::YELLOW.additive().linear_multiply(0.05)), ); } + + #[cfg(debug_assertions)] let mut show_blocking_widget = None; self.write(|ctx| { @@ -858,6 +861,7 @@ impl Context { // Another interactive widget is covering us at the pointer position, // so we aren't hovered. + #[cfg(debug_assertions)] if ctx.memory.options.style.debug.show_blocking_widget { // Store the rects to use them outside the write() call to // avoid deadlock @@ -873,6 +877,7 @@ impl Context { } }); + #[cfg(debug_assertions)] if let Some((interact_rect, prev_rect)) = show_blocking_widget { Self::layer_painter(self, LayerId::debug()).debug_rect( interact_rect, @@ -1892,15 +1897,15 @@ impl Context { // --------------------------------------------------------------------- /// Whether or not to debug widget layout on hover. + #[cfg(debug_assertions)] pub fn debug_on_hover(&self) -> bool { self.options(|opt| opt.style.debug.debug_on_hover) } /// Turn on/off whether or not to debug widget layout on hover. + #[cfg(debug_assertions)] pub fn set_debug_on_hover(&self, debug_on_hover: bool) { - let mut style = self.options(|opt| (*opt.style).clone()); - style.debug.debug_on_hover = debug_on_hover; - self.set_style(style); + self.style_mut(|style| style.debug.debug_on_hover = debug_on_hover); } } @@ -1991,7 +1996,6 @@ impl Context { /// Show the state of egui, including its input and output. pub fn inspection_ui(&self, ui: &mut Ui) { use crate::containers::*; - crate::trace!(ui); ui.label(format!("Is using pointer: {}", self.is_using_pointer())) .on_hover_text( diff --git a/crates/egui/src/data/input.rs b/crates/egui/src/data/input.rs index f95023364..e3542264b 100644 --- a/crates/egui/src/data/input.rs +++ b/crates/egui/src/data/input.rs @@ -479,6 +479,11 @@ impl Modifiers { !self.is_none() } + #[inline] + pub fn all(&self) -> bool { + self.alt && self.ctrl && self.shift && self.command + } + /// Is shift the only pressed button? #[inline] pub fn shift_only(&self) -> bool { diff --git a/crates/egui/src/frame_state.rs b/crates/egui/src/frame_state.rs index f82b2e7e6..49c3a5f10 100644 --- a/crates/egui/src/frame_state.rs +++ b/crates/egui/src/frame_state.rs @@ -54,6 +54,9 @@ pub(crate) struct FrameState { /// Highlight these widgets the next frame. Write to this. pub(crate) highlight_next_frame: IdSet, + + #[cfg(debug_assertions)] + pub(crate) has_debug_viewed_this_frame: bool, } impl Default for FrameState { @@ -70,6 +73,9 @@ impl Default for FrameState { accesskit_state: None, highlight_this_frame: Default::default(), highlight_next_frame: Default::default(), + + #[cfg(debug_assertions)] + has_debug_viewed_this_frame: false, } } } @@ -89,6 +95,9 @@ impl FrameState { accesskit_state, highlight_this_frame, highlight_next_frame, + + #[cfg(debug_assertions)] + has_debug_viewed_this_frame, } = self; used_ids.clear(); @@ -99,6 +108,11 @@ impl FrameState { *scroll_delta = input.scroll_delta; *scroll_target = [None, None]; + #[cfg(debug_assertions)] + { + *has_debug_viewed_this_frame = false; + } + #[cfg(feature = "accesskit")] { *accesskit_state = None; diff --git a/crates/egui/src/grid.rs b/crates/egui/src/grid.rs index 3f1dc592c..3e3e1df99 100644 --- a/crates/egui/src/grid.rs +++ b/crates/egui/src/grid.rs @@ -187,24 +187,27 @@ impl GridLayout { } pub(crate) fn advance(&mut self, cursor: &mut Rect, _frame_rect: Rect, widget_rect: Rect) { - let debug_expand_width = self.style.debug.show_expand_width; - let debug_expand_height = self.style.debug.show_expand_height; - if debug_expand_width || debug_expand_height { - let rect = widget_rect; - let too_wide = rect.width() > self.prev_col_width(self.col); - let too_high = rect.height() > self.prev_row_height(self.row); + #[cfg(debug_assertions)] + { + let debug_expand_width = self.style.debug.show_expand_width; + let debug_expand_height = self.style.debug.show_expand_height; + if debug_expand_width || debug_expand_height { + let rect = widget_rect; + let too_wide = rect.width() > self.prev_col_width(self.col); + let too_high = rect.height() > self.prev_row_height(self.row); - if (debug_expand_width && too_wide) || (debug_expand_height && too_high) { - let painter = self.ctx.debug_painter(); - painter.rect_stroke(rect, 0.0, (1.0, Color32::LIGHT_BLUE)); + if (debug_expand_width && too_wide) || (debug_expand_height && too_high) { + let painter = self.ctx.debug_painter(); + painter.rect_stroke(rect, 0.0, (1.0, Color32::LIGHT_BLUE)); - let stroke = Stroke::new(2.5, Color32::from_rgb(200, 0, 0)); - let paint_line_seg = |a, b| painter.line_segment([a, b], stroke); + let stroke = Stroke::new(2.5, Color32::from_rgb(200, 0, 0)); + let paint_line_seg = |a, b| painter.line_segment([a, b], stroke); - if debug_expand_width && too_wide { - paint_line_seg(rect.left_top(), rect.left_bottom()); - paint_line_seg(rect.left_center(), rect.right_center()); - paint_line_seg(rect.right_top(), rect.right_bottom()); + if debug_expand_width && too_wide { + paint_line_seg(rect.left_top(), rect.left_bottom()); + paint_line_seg(rect.left_center(), rect.right_center()); + paint_line_seg(rect.right_top(), rect.right_bottom()); + } } } } diff --git a/crates/egui/src/layout.rs b/crates/egui/src/layout.rs index 8da23700a..1dd77c215 100644 --- a/crates/egui/src/layout.rs +++ b/crates/egui/src/layout.rs @@ -801,6 +801,7 @@ impl Layout { /// ## Debug stuff impl Layout { /// Shows where the next widget is going to be placed + #[cfg(debug_assertions)] pub(crate) fn paint_text_at_cursor( &self, painter: &crate::Painter, diff --git a/crates/egui/src/lib.rs b/crates/egui/src/lib.rs index e822a58c4..fe3c91223 100644 --- a/crates/egui/src/lib.rs +++ b/crates/egui/src/lib.rs @@ -12,6 +12,10 @@ //! Then you add a [`Window`] or a [`SidePanel`] to get a [`Ui`], which is what you'll be using to add all the buttons and labels that you need. //! //! +//! ## Feature flags +#![cfg_attr(feature = "document-features", doc = document_features::document_features!())] +//! +//! //! # Using egui //! //! To see what is possible to build with egui you can check out the online demo at . @@ -163,7 +167,14 @@ //! //! # Understanding immediate mode //! -//! `egui` is an immediate mode GUI library. It is useful to fully grok what "immediate mode" implies. +//! `egui` is an immediate mode GUI library. +//! +//! Immediate mode has its roots in gaming, where everything on the screen is painted at the +//! display refresh rate, i.e. at 60+ frames per second. +//! In immediate mode GUIs, the entire interface is laid out and painted at the same high rate. +//! This makes immediate mode GUIs especially well suited for highly interactive applications. +//! +//! It is useful to fully grok what "immediate mode" implies. //! //! Here is an example to illustrate it: //! @@ -198,7 +209,7 @@ //! # }); //! ``` //! -//! Here egui will read `value` to display the slider, then look if the mouse is dragging the slider and if so change the `value`. +//! Here egui will read `value` (an `f32`) to display the slider, then look if the mouse is dragging the slider and if so change the `value`. //! Note that `egui` does not store the slider value for you - it only displays the current value, and changes it //! by how much the slider has been dragged in the previous few milliseconds. //! This means it is responsibility of the egui user to store the state (`value`) so that it persists between frames. @@ -318,10 +329,6 @@ //! }); // the temporary settings are reverted here //! # }); //! ``` -//! -//! ## Feature flags -#![cfg_attr(feature = "document-features", doc = document_features::document_features!())] -//! #![allow(clippy::float_cmp)] #![allow(clippy::manual_range_contains)] @@ -354,6 +361,10 @@ pub mod viewport; pub mod widget_text; pub mod widgets; +#[cfg(feature = "callstack")] +#[cfg(debug_assertions)] +mod callstack; + #[cfg(feature = "accesskit")] pub use accesskit; @@ -439,7 +450,8 @@ pub fn warn_if_debug_build(ui: &mut crate::Ui) { /// ui.image(egui::include_image!("../assets/ferris.png")); /// ui.add( /// egui::Image::new(egui::include_image!("../assets/ferris.png")) -/// .rounding(egui::Rounding::same(6.0)) +/// .max_width(200.0) +/// .rounding(10.0), /// ); /// /// let image_source: egui::ImageSource = egui::include_image!("../assets/ferris.png"); @@ -449,10 +461,10 @@ pub fn warn_if_debug_build(ui: &mut crate::Ui) { #[macro_export] macro_rules! include_image { ($path: literal) => { - $crate::ImageSource::Bytes( - ::std::borrow::Cow::Borrowed(concat!("bytes://", $path)), // uri - $crate::load::Bytes::Static(include_bytes!($path)), - ) + $crate::ImageSource::Bytes { + uri: ::std::borrow::Cow::Borrowed(concat!("bytes://", $path)), + bytes: $crate::load::Bytes::Static(include_bytes!($path)), + } }; } @@ -488,32 +500,6 @@ macro_rules! github_link_file { // ---------------------------------------------------------------------------- -/// Show debug info on hover when [`Context::set_debug_on_hover`] has been turned on. -/// -/// ``` -/// # egui::__run_test_ui(|ui| { -/// // Turn on tracing of widgets -/// ui.ctx().set_debug_on_hover(true); -/// -/// /// Show [`std::file`], [`std::line`] and argument on hover -/// egui::trace!(ui, "MyWindow"); -/// -/// /// Show [`std::file`] and [`std::line`] on hover -/// egui::trace!(ui); -/// # }); -/// ``` -#[macro_export] -macro_rules! trace { - ($ui: expr) => {{ - $ui.trace_location(format!("{}:{}", file!(), line!())) - }}; - ($ui: expr, $label: expr) => {{ - $ui.trace_location(format!("{} - {}:{}", $label, file!(), line!())) - }}; -} - -// ---------------------------------------------------------------------------- - /// An assert that is only active when `egui` is compiled with the `extra_asserts` feature /// or with the `extra_debug_asserts` feature in debug builds. #[macro_export] diff --git a/crates/egui/src/load.rs b/crates/egui/src/load.rs index 6f277cb5e..717383d31 100644 --- a/crates/egui/src/load.rs +++ b/crates/egui/src/load.rs @@ -4,7 +4,7 @@ //! will get you up and running quickly with its reasonable default implementations of the traits described below. //! //! 1. Add [`egui_extras`](https://crates.io/crates/egui_extras/) as a dependency with the `all_loaders` feature. -//! 2. Add a call to [`egui_extras::install_image_loaders`](https://docs.rs/egui_extras/latest/egui_extras/loaders/fn.install.html) +//! 2. Add a call to [`egui_extras::install_image_loaders`](https://docs.rs/egui_extras/latest/egui_extras/fn.install_image_loaders.html) //! in your app's setup code. //! 3. Use [`Ui::image`][`crate::ui::Ui::image`] with some [`ImageSource`][`crate::ImageSource`]. //! @@ -55,17 +55,20 @@ mod bytes_loader; mod texture_loader; -use crate::Context; +use std::borrow::Cow; +use std::fmt::Debug; +use std::ops::Deref; +use std::{error::Error as StdError, fmt::Display, sync::Arc}; + use ahash::HashMap; + use epaint::mutex::Mutex; use epaint::util::FloatOrd; use epaint::util::OrderedFloat; use epaint::TextureHandle; use epaint::{textures::TextureOptions, ColorImage, TextureId, Vec2}; -use std::borrow::Cow; -use std::fmt::Debug; -use std::ops::Deref; -use std::{error::Error as StdError, fmt::Display, sync::Arc}; + +use crate::Context; pub use self::bytes_loader::DefaultBytesLoader; pub use self::texture_loader::DefaultTextureLoader; @@ -76,15 +79,15 @@ pub enum LoadError { /// Programmer error: There are no image loaders installed. NoImageLoaders, - /// A specific loader does not support this schema, protocol or image format. + /// A specific loader does not support this scheme, protocol or image format. NotSupported, /// Programmer error: Failed to find the bytes for this image because - /// there was no [`BytesLoader`] supporting the schema. + /// there was no [`BytesLoader`] supporting the scheme. NoMatchingBytesLoader, /// Programmer error: Failed to parse the bytes as an image because - /// there was no [`ImageLoader`] supporting the schema. + /// there was no [`ImageLoader`] supporting the scheme. NoMatchingImageLoader, /// Programmer error: no matching [`TextureLoader`]. @@ -108,7 +111,7 @@ impl Display for LoadError { Self::NoMatchingTextureLoader => f.write_str("No matching TextureLoader. Did you remove the default one?"), - Self::NotSupported => f.write_str("Iagge schema or URI not supported by this loader"), + Self::NotSupported => f.write_str("Image scheme or URI not supported by this loader"), Self::Loading(message) => f.write_str(message), } diff --git a/crates/egui/src/menu.rs b/crates/egui/src/menu.rs index ab92f063d..55f60e52c 100644 --- a/crates/egui/src/menu.rs +++ b/crates/egui/src/menu.rs @@ -146,10 +146,9 @@ pub(crate) fn menu_ui<'c, R>( let area = Area::new(menu_id) .order(Order::Foreground) - .constrain(true) .fixed_pos(pos) - .interactable(true) - .drag_bounds(ctx.screen_rect()); + .constrain_to(ctx.screen_rect()) + .interactable(true); area.show(ctx, |ui| { set_menu_style(ui.style_mut()); @@ -348,8 +347,7 @@ impl MenuRoot { if let Some(root) = root.inner.as_mut() { if root.id == id { // pressed somewhere while this menu is open - let menu_state = root.menu_state.read(); - let in_menu = menu_state.area_contains(pos); + let in_menu = root.menu_state.read().area_contains(pos); if !in_menu { return MenuResponse::Close; } @@ -374,8 +372,7 @@ impl MenuRoot { let mut destroy = false; let mut in_old_menu = false; if let Some(root) = root { - let menu_state = root.menu_state.read(); - in_old_menu = menu_state.area_contains(pos); + in_old_menu = root.menu_state.read().area_contains(pos); destroy = root.id == response.id; } if !in_old_menu { diff --git a/crates/egui/src/placer.rs b/crates/egui/src/placer.rs index c9f9ddefb..81c137f4e 100644 --- a/crates/egui/src/placer.rs +++ b/crates/egui/src/placer.rs @@ -263,6 +263,7 @@ impl Placer { } impl Placer { + #[cfg(debug_assertions)] pub(crate) fn debug_paint_cursor(&self, painter: &crate::Painter, text: impl ToString) { let stroke = Stroke::new(1.0, Color32::DEBUG_COLOR); diff --git a/crates/egui/src/style.rs b/crates/egui/src/style.rs index cc31a1c61..3c44b292a 100644 --- a/crates/egui/src/style.rs +++ b/crates/egui/src/style.rs @@ -201,6 +201,9 @@ pub struct Style { pub animation_time: f32, /// Options to help debug why egui behaves strangely. + /// + /// Only available in debug builds. + #[cfg(debug_assertions)] pub debug: DebugOptions, /// Show tooltips explaining [`DragValue`]:s etc when hovered. @@ -690,12 +693,36 @@ impl WidgetVisuals { } /// Options for help debug egui by adding extra visualization -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] +#[cfg(debug_assertions)] pub struct DebugOptions { - /// However over widgets to see their rectangles + /// Always show callstack to ui on hover. + /// + /// Useful for figuring out where in the code some UI is being created. + /// + /// Only works in debug builds. + /// Requires the `callstack` feature. + /// Does not work on web. + #[cfg(debug_assertions)] pub debug_on_hover: bool, + /// Show callstack for the current widget on hover if all modifier keys are pressed down. + /// + /// Useful for figuring out where in the code some UI is being created. + /// + /// Only works in debug builds. + /// Requires the `callstack` feature. + /// Does not work on web. + /// + /// Default is `true` in debug builds, on native, if the `callstack` feature is enabled. + #[cfg(debug_assertions)] + pub debug_on_hover_with_all_modifiers: bool, + + /// If we show the hover ui, include where the next widget is placed. + #[cfg(debug_assertions)] + pub hover_shows_next: bool, + /// Show which widgets make their parent wider pub show_expand_width: bool, @@ -711,6 +738,23 @@ pub struct DebugOptions { pub show_blocking_widget: bool, } +#[cfg(debug_assertions)] +impl Default for DebugOptions { + fn default() -> Self { + Self { + debug_on_hover: false, + debug_on_hover_with_all_modifiers: cfg!(feature = "callstack") + && !cfg!(target_arch = "wasm32"), + hover_shows_next: false, + show_expand_width: false, + show_expand_height: false, + show_resize: false, + show_interactive_widgets: false, + show_blocking_widget: false, + } + } +} + // ---------------------------------------------------------------------------- /// The default text styles of the default egui theme. @@ -739,6 +783,7 @@ impl Default for Style { interaction: Interaction::default(), visuals: Visuals::default(), animation_time: 1.0 / 12.0, + #[cfg(debug_assertions)] debug: Default::default(), explanation_tooltips: false, } @@ -993,6 +1038,7 @@ impl Style { interaction, visuals, animation_time, + #[cfg(debug_assertions)] debug, explanation_tooltips, } = self; @@ -1055,6 +1101,8 @@ impl Style { ui.collapsing("📏 Spacing", |ui| spacing.ui(ui)); ui.collapsing("☝ Interaction", |ui| interaction.ui(ui)); ui.collapsing("🎨 Visuals", |ui| visuals.ui(ui)); + + #[cfg(debug_assertions)] ui.collapsing("🐛 Debug", |ui| debug.ui(ui)); ui.checkbox(explanation_tooltips, "Explanation tooltips") @@ -1477,10 +1525,13 @@ impl Visuals { } } +#[cfg(debug_assertions)] impl DebugOptions { pub fn ui(&mut self, ui: &mut crate::Ui) { let Self { debug_on_hover, + debug_on_hover_with_all_modifiers, + hover_shows_next, show_expand_width, show_expand_height, show_resize, @@ -1488,7 +1539,16 @@ impl DebugOptions { show_blocking_widget, } = self; - ui.checkbox(debug_on_hover, "Show debug info on hover"); + { + ui.checkbox(debug_on_hover, "Show widget info on hover."); + ui.checkbox( + debug_on_hover_with_all_modifiers, + "Show widget info on hover if holding all modifier keys", + ); + + ui.checkbox(hover_shows_next, "Show next widget placement on hover"); + } + ui.checkbox( show_expand_width, "Show which widgets make their parent wider", diff --git a/crates/egui/src/ui.rs b/crates/egui/src/ui.rs index 01241ccf2..1c0d21555 100644 --- a/crates/egui/src/ui.rs +++ b/crates/egui/src/ui.rs @@ -738,43 +738,41 @@ impl Ui { /// # }); /// ``` pub fn allocate_space(&mut self, desired_size: Vec2) -> (Id, Rect) { - // For debug rendering + #[cfg(debug_assertions)] let original_available = self.available_size_before_wrap(); - let too_wide = desired_size.x > original_available.x; - let too_high = desired_size.y > original_available.y; let rect = self.allocate_space_impl(desired_size); - if self.style().debug.debug_on_hover && self.rect_contains_pointer(rect) { - let painter = self.ctx().debug_painter(); - painter.rect_stroke(rect, 4.0, (1.0, Color32::LIGHT_BLUE)); - self.placer.debug_paint_cursor(&painter, "next"); - } + #[cfg(debug_assertions)] + { + let too_wide = desired_size.x > original_available.x; + let too_high = desired_size.y > original_available.y; - let debug_expand_width = self.style().debug.show_expand_width; - let debug_expand_height = self.style().debug.show_expand_height; + let debug_expand_width = self.style().debug.show_expand_width; + let debug_expand_height = self.style().debug.show_expand_height; - if (debug_expand_width && too_wide) || (debug_expand_height && too_high) { - self.painter - .rect_stroke(rect, 0.0, (1.0, Color32::LIGHT_BLUE)); + if (debug_expand_width && too_wide) || (debug_expand_height && too_high) { + self.painter + .rect_stroke(rect, 0.0, (1.0, Color32::LIGHT_BLUE)); - let stroke = Stroke::new(2.5, Color32::from_rgb(200, 0, 0)); - let paint_line_seg = |a, b| self.painter().line_segment([a, b], stroke); + let stroke = Stroke::new(2.5, Color32::from_rgb(200, 0, 0)); + let paint_line_seg = |a, b| self.painter().line_segment([a, b], stroke); - if debug_expand_width && too_wide { - paint_line_seg(rect.left_top(), rect.left_bottom()); - paint_line_seg(rect.left_center(), rect.right_center()); - paint_line_seg( - pos2(rect.left() + original_available.x, rect.top()), - pos2(rect.left() + original_available.x, rect.bottom()), - ); - paint_line_seg(rect.right_top(), rect.right_bottom()); - } + if debug_expand_width && too_wide { + paint_line_seg(rect.left_top(), rect.left_bottom()); + paint_line_seg(rect.left_center(), rect.right_center()); + paint_line_seg( + pos2(rect.left() + original_available.x, rect.top()), + pos2(rect.left() + original_available.x, rect.bottom()), + ); + paint_line_seg(rect.right_top(), rect.right_bottom()); + } - if debug_expand_height && too_high { - paint_line_seg(rect.left_top(), rect.right_top()); - paint_line_seg(rect.center_top(), rect.center_bottom()); - paint_line_seg(rect.left_bottom(), rect.right_bottom()); + if debug_expand_height && too_high { + paint_line_seg(rect.left_top(), rect.right_top()); + paint_line_seg(rect.center_top(), rect.center_bottom()); + paint_line_seg(rect.left_bottom(), rect.right_bottom()); + } } } @@ -795,6 +793,8 @@ impl Ui { self.placer .advance_after_rects(frame_rect, widget_rect, item_spacing); + register_rect(self, widget_rect); + widget_rect } @@ -803,6 +803,7 @@ impl Ui { /// Ignore the layout of the [`Ui`]: just put my widget here! /// The layout cursor will advance to past this `rect`. pub fn allocate_rect(&mut self, rect: Rect, sense: Sense) -> Response { + register_rect(self, rect); let id = self.advance_cursor_after_rect(rect); self.interact(rect, id, sense) } @@ -813,12 +814,6 @@ impl Ui { let item_spacing = self.spacing().item_spacing; self.placer.advance_after_rects(rect, rect, item_spacing); - if self.style().debug.debug_on_hover && self.rect_contains_pointer(rect) { - let painter = self.ctx().debug_painter(); - painter.rect_stroke(rect, 4.0, (1.0, Color32::LIGHT_BLUE)); - self.placer.debug_paint_cursor(&painter, "next"); - } - let id = Id::new(self.next_auto_id_source); self.next_auto_id_source = self.next_auto_id_source.wrapping_add(1); id @@ -896,13 +891,6 @@ impl Ui { self.placer .advance_after_rects(final_child_rect, final_child_rect, item_spacing); - if self.style().debug.debug_on_hover && self.rect_contains_pointer(final_child_rect) { - let painter = self.ctx().debug_painter(); - painter.rect_stroke(frame_rect, 4.0, (1.0, Color32::LIGHT_BLUE)); - painter.rect_stroke(final_child_rect, 4.0, (1.0, Color32::LIGHT_BLUE)); - self.placer.debug_paint_cursor(&painter, "next"); - } - let response = self.interact(final_child_rect, child_ui.id, Sense::hover()); InnerResponse::new(ret, response) } @@ -1561,7 +1549,7 @@ impl Ui { /// Show an image available at the given `uri`. /// /// ⚠ This will do nothing unless you install some image loaders first! - /// The easiest way to do this is via [`egui_extras::install_image_loaders`](https://docs.rs/egui_extras/latest/egui_extras/loaders/fn.install.html). + /// The easiest way to do this is via [`egui_extras::install_image_loaders`](https://docs.rs/egui_extras/latest/egui_extras/fn.install_image_loaders.html). /// /// The loaders handle caching image data, sampled textures, etc. across frames, so calling this is immediate-mode safe. /// @@ -1572,7 +1560,8 @@ impl Ui { /// ui.image(egui::include_image!("../assets/ferris.png")); /// ui.add( /// egui::Image::new(egui::include_image!("../assets/ferris.png")) - /// .rounding(egui::Rounding::same(6.0)) + /// .max_width(200.0) + /// .rounding(10.0), /// ); /// # }); /// ``` @@ -1793,10 +1782,7 @@ impl Ui { let mut child_rect = self.placer.available_rect_before_wrap(); child_rect.min.x += indent; - let mut child_ui = Self { - id: self.id.with(id_source), - ..self.child_ui(child_rect, *self.layout()) - }; + let mut child_ui = self.child_ui_with_id_source(child_rect, *self.layout(), id_source); let ret = add_contents(&mut child_ui); let left_vline = self.visuals().indent_has_left_vline; @@ -2024,12 +2010,6 @@ impl Ui { let item_spacing = self.spacing().item_spacing; self.placer.advance_after_rects(rect, rect, item_spacing); - if self.style().debug.debug_on_hover && self.rect_contains_pointer(rect) { - let painter = self.ctx().debug_painter(); - painter.rect_stroke(rect, 4.0, (1.0, Color32::LIGHT_BLUE)); - self.placer.debug_paint_cursor(&painter, "next"); - } - InnerResponse::new(inner, self.interact(rect, child_ui.id, Sense::hover())) } @@ -2215,21 +2195,121 @@ impl Ui { /// # Debug stuff impl Ui { /// Shows where the next widget is going to be placed + #[cfg(debug_assertions)] pub fn debug_paint_cursor(&self) { self.placer.debug_paint_cursor(&self.painter, "next"); } +} - /// Shows the given text where the next widget is to be placed - /// if when [`Context::set_debug_on_hover`] has been turned on and the mouse is hovering the Ui. - pub fn trace_location(&self, text: impl ToString) { - let rect = self.max_rect(); - if self.style().debug.debug_on_hover && self.rect_contains_pointer(rect) { - self.placer - .debug_paint_cursor(&self.ctx().debug_painter(), text); +#[cfg(debug_assertions)] +impl Drop for Ui { + fn drop(&mut self) { + register_rect(self, self.min_rect()); + } +} + +/// Show this rectangle to the user if certain debug options are set. +#[cfg(debug_assertions)] +fn register_rect(ui: &Ui, rect: Rect) { + let debug = ui.style().debug; + + let show_callstacks = debug.debug_on_hover + || debug.debug_on_hover_with_all_modifiers && ui.input(|i| i.modifiers.all()); + + if !show_callstacks { + return; + } + + if ui.ctx().frame_state(|o| o.has_debug_viewed_this_frame) { + return; + } + + if !ui.rect_contains_pointer(rect) { + return; + } + + // We only show one debug rectangle, or things get confusing: + ui.ctx() + .frame_state_mut(|o| o.has_debug_viewed_this_frame = true); + + // ---------------------------------------------- + + let is_clicking = ui.input(|i| i.pointer.could_any_button_be_click()); + + // Use the debug-painter to avoid clip rect, + // otherwise the content of the widget may cover what we paint here! + let painter = ui.ctx().debug_painter(); + + // Paint rectangle around widget: + { + let rect_fg_color = if is_clicking { + Color32::WHITE + } else { + Color32::LIGHT_BLUE + }; + let rect_bg_color = Color32::BLUE.gamma_multiply(0.5); + + painter.rect(rect, 0.0, rect_bg_color, (1.0, rect_fg_color)); + } + + // ---------------------------------------------- + + if debug.hover_shows_next { + ui.placer.debug_paint_cursor(&painter, "next"); + } + + // ---------------------------------------------- + + #[cfg(feature = "callstack")] + let callstack = crate::callstack::capture(); + + #[cfg(not(feature = "callstack"))] + let callstack = String::default(); + + if !callstack.is_empty() { + let font_id = FontId::monospace(12.0); + let text = format!("{callstack}\n\n(click to copy)"); + let galley = painter.layout_no_wrap(text, font_id, Color32::WHITE); + + // Position the text either under or above: + let screen_rect = ui.ctx().screen_rect(); + let y = if galley.size().y <= rect.top() { + // Above + rect.top() - galley.size().y + } else { + // Below + rect.bottom() + }; + + let y = y + .at_most(screen_rect.bottom() - galley.size().y) + .at_least(0.0); + + let x = rect + .left() + .at_most(screen_rect.right() - galley.size().x) + .at_least(0.0); + let text_pos = pos2(x, y); + + let text_bg_color = Color32::from_black_alpha(180); + let text_rect_stroke_color = if is_clicking { + Color32::WHITE + } else { + text_bg_color + }; + let text_rect = Rect::from_min_size(text_pos, galley.size()); + painter.rect(text_rect, 0.0, text_bg_color, (1.0, text_rect_stroke_color)); + painter.galley(text_pos, galley); + + if ui.input(|i| i.pointer.any_click()) { + ui.ctx().copy_text(callstack); } } } +#[cfg(not(debug_assertions))] +fn register_rect(_ui: &Ui, _rect: Rect) {} + #[test] fn ui_impl_send_sync() { fn assert_send_sync() {} diff --git a/crates/egui/src/util/id_type_map.rs b/crates/egui/src/util/id_type_map.rs index a9867eb1b..8cb33360b 100644 --- a/crates/egui/src/util/id_type_map.rs +++ b/crates/egui/src/util/id_type_map.rs @@ -588,10 +588,9 @@ impl PersistedMap { crate::profile_scope!("gather"); for (hash, element) in &map.map { if let Some(element) = element.to_serialize() { - let mut stats = types_map.entry(element.type_id).or_default(); + let stats = types_map.entry(element.type_id).or_default(); stats.num_bytes += element.ron.len(); - let mut generation_stats = - stats.generations.entry(element.generation).or_default(); + let generation_stats = stats.generations.entry(element.generation).or_default(); generation_stats.num_bytes += element.ron.len(); generation_stats.elements.push((*hash, element)); } else { diff --git a/crates/egui/src/widgets/image.rs b/crates/egui/src/widgets/image.rs index fde5c3304..c1838b464 100644 --- a/crates/egui/src/widgets/image.rs +++ b/crates/egui/src/widgets/image.rs @@ -100,7 +100,10 @@ impl<'a> Image<'a> { /// /// See [`ImageSource::Bytes`]. pub fn from_bytes(uri: impl Into>, bytes: impl Into) -> Self { - Self::new(ImageSource::Bytes(uri.into(), bytes.into())) + Self::new(ImageSource::Bytes { + uri: uri.into(), + bytes: bytes.into(), + }) } /// Texture options used when creating the texture. @@ -275,7 +278,7 @@ impl<'a> Image<'a> { pub fn size(&self) -> Option { match &self.source { ImageSource::Texture(texture) => Some(texture.size), - ImageSource::Uri(_) | ImageSource::Bytes(_, _) => None, + ImageSource::Uri(_) | ImageSource::Bytes { .. } => None, } } @@ -478,9 +481,10 @@ impl Default for ImageSize { /// This is used by [`Image::new`] and [`Ui::image`]. #[derive(Clone)] pub enum ImageSource<'a> { - /// Load the image from a URI. + /// Load the image from a URI, e.g. `https://example.com/image.png`. + /// + /// This could be a `file://` path, `https://` url, `bytes://` identifier, or some other scheme. /// - /// This could be a `file://` url, `http(s)?://` url, or a `bare` identifier. /// How the URI will be turned into a texture for rendering purposes is /// up to the registered loaders to handle. /// @@ -495,8 +499,6 @@ pub enum ImageSource<'a> { /// Load the image from some raw bytes. /// - /// For better error messages, use the `bytes://` prefix for the URI. - /// /// The [`Bytes`] may be: /// - `'static`, obtained from `include_bytes!` or similar /// - Anything that can be converted to `Arc<[u8]>` @@ -506,13 +508,22 @@ pub enum ImageSource<'a> { /// See also [`include_image`] for an easy way to load and display static images. /// /// See [`crate::load`] for more information. - Bytes(Cow<'static, str>, Bytes), + Bytes { + /// The unique identifier for this image, e.g. `bytes://my_logo.png`. + /// + /// You should use a proper extension (`.jpg`, `.png`, `.svg`, etc) for the image to load properly. + /// + /// Use the `bytes://` scheme for the URI for better error messages. + uri: Cow<'static, str>, + + bytes: Bytes, + }, } impl<'a> std::fmt::Debug for ImageSource<'a> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - ImageSource::Bytes(uri, _) | ImageSource::Uri(uri) => uri.as_ref().fmt(f), + ImageSource::Bytes { uri, .. } | ImageSource::Uri(uri) => uri.as_ref().fmt(f), ImageSource::Texture(st) => st.id.fmt(f), } } @@ -524,7 +535,7 @@ impl<'a> ImageSource<'a> { pub fn texture_size(&self) -> Option { match self { ImageSource::Texture(texture) => Some(texture.size), - ImageSource::Uri(_) | ImageSource::Bytes(_, _) => None, + ImageSource::Uri(_) | ImageSource::Bytes { .. } => None, } } @@ -539,7 +550,7 @@ impl<'a> ImageSource<'a> { match self { Self::Texture(texture) => Ok(TexturePoll::Ready { texture }), Self::Uri(uri) => ctx.try_load_texture(uri.as_ref(), texture_options, size_hint), - Self::Bytes(uri, bytes) => { + Self::Bytes { uri, bytes } => { ctx.include_bytes(uri.clone(), bytes); ctx.try_load_texture(uri.as_ref(), texture_options, size_hint) } @@ -551,7 +562,7 @@ impl<'a> ImageSource<'a> { /// This will return `None` for [`Self::Texture`]. pub fn uri(&self) -> Option<&str> { match self { - ImageSource::Bytes(uri, _) | ImageSource::Uri(uri) => Some(uri), + ImageSource::Bytes { uri, .. } | ImageSource::Uri(uri) => Some(uri), ImageSource::Texture(_) => None, } } @@ -644,21 +655,30 @@ impl<'a> From> for ImageSource<'a> { impl> From<(&'static str, T)> for ImageSource<'static> { #[inline] fn from((uri, bytes): (&'static str, T)) -> Self { - Self::Bytes(uri.into(), bytes.into()) + Self::Bytes { + uri: uri.into(), + bytes: bytes.into(), + } } } impl> From<(Cow<'static, str>, T)> for ImageSource<'static> { #[inline] fn from((uri, bytes): (Cow<'static, str>, T)) -> Self { - Self::Bytes(uri, bytes.into()) + Self::Bytes { + uri, + bytes: bytes.into(), + } } } impl> From<(String, T)> for ImageSource<'static> { #[inline] fn from((uri, bytes): (String, T)) -> Self { - Self::Bytes(uri.into(), bytes.into()) + Self::Bytes { + uri: uri.into(), + bytes: bytes.into(), + } } } diff --git a/crates/egui_demo_app/Cargo.toml b/crates/egui_demo_app/Cargo.toml index 677e74639..7ea72e67f 100644 --- a/crates/egui_demo_app/Cargo.toml +++ b/crates/egui_demo_app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egui_demo_app" -version = "0.22.0" +version = "0.23.0" authors = ["Emil Ernerfeldt "] license = "MIT OR Apache-2.0" edition = "2021" @@ -18,6 +18,9 @@ crate-type = ["cdylib", "rlib"] [features] default = ["glow", "persistence"] +# image_viewer adds about 0.9 MB of WASM +web_app = ["http", "persistence", "web_screen_reader"] + http = ["ehttp", "image", "poll-promise", "egui_extras/image"] image_viewer = ["image", "egui_extras/all_loaders", "rfd"] persistence = ["eframe/persistence", "egui/persistence", "serde"] @@ -33,12 +36,13 @@ chrono = { version = "0.4", default-features = false, features = [ "js-sys", "wasmbind", ] } -eframe = { version = "0.22.0", path = "../eframe", default-features = false } -egui = { version = "0.22.0", path = "../egui", features = [ +eframe = { version = "0.23.0", path = "../eframe", default-features = false } +egui = { version = "0.23.0", path = "../egui", features = [ + "callstack", "extra_debug_asserts", "log", ] } -egui_demo_lib = { version = "0.22.0", path = "../egui_demo_lib", features = [ +egui_demo_lib = { version = "0.23.0", path = "../egui_demo_lib", features = [ "chrono", ] } log = { version = "0.4", features = ["std"] } @@ -46,18 +50,17 @@ log = { version = "0.4", features = ["std"] } # Optional dependencies: bytemuck = { version = "1.7.1", optional = true } -egui_extras = { version = "0.22.0", path = "../egui_extras", features = [ +egui_extras = { version = "0.23.0", path = "../egui_extras", features = [ "image", ] } -rfd = { version = "0.11", optional = true } # feature "http": -ehttp = { version = "0.3.0", optional = true } +ehttp = { version = "0.3.1", optional = true } image = { version = "0.24", optional = true, default-features = false, features = [ "jpeg", "png", ] } -poll-promise = { version = "0.2", optional = true, default-features = false } +poll-promise = { version = "0.3", optional = true, default-features = false } # feature "persistence": serde = { version = "1", optional = true, features = ["derive"] } @@ -66,6 +69,7 @@ serde = { version = "1", optional = true, features = ["derive"] } # native: [target.'cfg(not(target_arch = "wasm32"))'.dependencies] env_logger = "0.10" +rfd = { version = "0.11", optional = true } # web: [target.'cfg(target_arch = "wasm32")'.dependencies] diff --git a/crates/egui_demo_app/src/backend_panel.rs b/crates/egui_demo_app/src/backend_panel.rs index ebef75f43..ae7336156 100644 --- a/crates/egui_demo_app/src/backend_panel.rs +++ b/crates/egui_demo_app/src/backend_panel.rs @@ -82,8 +82,6 @@ impl BackendPanel { } pub fn ui(&mut self, ui: &mut egui::Ui, frame: &mut eframe::Frame) { - egui::trace!(ui); - self.integration_ui(ui, frame); ui.separator(); @@ -101,11 +99,9 @@ impl BackendPanel { ui.separator(); - { - let mut debug_on_hover = ui.ctx().debug_on_hover(); - ui.checkbox(&mut debug_on_hover, "🐛 Debug on hover") - .on_hover_text("Show structure of the ui when you hover with the mouse"); - ui.ctx().set_debug_on_hover(debug_on_hover); + #[cfg(debug_assertions)] + if ui.ctx().style().debug.debug_on_hover_with_all_modifiers { + ui.label("Press down all modifiers and hover a widget to see a callstack for it"); } #[cfg(target_arch = "wasm32")] diff --git a/crates/egui_demo_app/src/wrap_app.rs b/crates/egui_demo_app/src/wrap_app.rs index 619e70ad8..e5f458874 100644 --- a/crates/egui_demo_app/src/wrap_app.rs +++ b/crates/egui_demo_app/src/wrap_app.rs @@ -164,21 +164,22 @@ pub struct WrapApp { } impl WrapApp { - pub fn new(_cc: &eframe::CreationContext<'_>) -> Self { - egui_extras::install_image_loaders(&_cc.egui_ctx); + pub fn new(cc: &eframe::CreationContext<'_>) -> Self { + // This gives us image support: + egui_extras::install_image_loaders(&cc.egui_ctx); #[allow(unused_mut)] let mut slf = Self { state: State::default(), #[cfg(any(feature = "glow", feature = "wgpu"))] - custom3d: crate::apps::Custom3d::new(_cc), + custom3d: crate::apps::Custom3d::new(cc), dropped_files: Default::default(), }; #[cfg(feature = "persistence")] - if let Some(storage) = _cc.storage { + if let Some(storage) = cc.storage { if let Some(state) = eframe::get_value(storage, eframe::APP_KEY) { slf.state = state; } @@ -263,7 +264,6 @@ impl eframe::App for WrapApp { let mut cmd = Command::Nothing; egui::TopBottomPanel::top("wrap_app_top_bar").show(ctx, |ui| { - egui::trace!(ui); ui.horizontal_wrapped(|ui| { ui.visuals_mut().button_frame = false; self.bar_contents(ui, frame, &mut cmd); diff --git a/crates/egui_demo_lib/Cargo.toml b/crates/egui_demo_lib/Cargo.toml index 33b927fa4..10fac0d11 100644 --- a/crates/egui_demo_lib/Cargo.toml +++ b/crates/egui_demo_lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egui_demo_lib" -version = "0.22.0" +version = "0.23.0" authors = ["Emil Ernerfeldt "] description = "Example library for egui" edition = "2021" @@ -11,7 +11,13 @@ readme = "README.md" repository = "https://github.com/emilk/egui/tree/master/crates/egui_demo_lib" categories = ["gui", "graphics"] keywords = ["glium", "egui", "gui", "gamedev"] -include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml"] +include = [ + "../LICENSE-APACHE", + "../LICENSE-MIT", + "**/*.rs", + "Cargo.toml", + "data/icon.png", +] [package.metadata.docs.rs] all-features = true @@ -32,9 +38,9 @@ syntect = ["egui_extras/syntect"] [dependencies] -egui = { version = "0.22.0", path = "../egui", default-features = false } -egui_extras = { version = "0.22.0", path = "../egui_extras" } -egui_plot = { version = "0.22.0", path = "../egui_plot" } +egui = { version = "0.23.0", path = "../egui", default-features = false } +egui_extras = { version = "0.23.0", path = "../egui_extras" } +egui_plot = { version = "0.23.0", path = "../egui_plot" } log = { version = "0.4", features = ["std"] } unicode_names2 = { version = "0.6.0", default-features = false } diff --git a/crates/egui_demo_lib/assets/icon.png b/crates/egui_demo_lib/data/icon.png similarity index 100% rename from crates/egui_demo_lib/assets/icon.png rename to crates/egui_demo_lib/data/icon.png diff --git a/crates/egui_demo_lib/src/demo/about.rs b/crates/egui_demo_lib/src/demo/about.rs index 57cbcd0c5..9ee3dee7d 100644 --- a/crates/egui_demo_lib/src/demo/about.rs +++ b/crates/egui_demo_lib/src/demo/about.rs @@ -11,6 +11,7 @@ impl super::Demo for About { fn show(&mut self, ctx: &egui::Context, open: &mut bool) { egui::Window::new(self.name()) .default_width(320.0) + .default_height(480.0) .open(open) .show(ctx, |ui| { use super::View as _; @@ -41,6 +42,15 @@ impl super::View for About { ui.add_space(12.0); // ui.separator(); ui.heading("Links"); links(ui); + + ui.add_space(12.0); + + ui.horizontal_wrapped(|ui| { + ui.spacing_mut().item_spacing.x = 0.0; + ui.label("egui development is sponsored by "); + ui.hyperlink_to("Rerun.io", "https://www.rerun.io/"); + ui.label(", a startup building an SDK for visualizing streams of multimodal data"); + }); } } @@ -65,15 +75,10 @@ fn about_immediate_mode(ui: &mut egui::Ui) { ); ui.add_space(8.0); - ui.label("Note how there are no callbacks or messages, and no button state to store."); - - ui.label("Immediate mode has its roots in gaming, where everything on the screen is painted at the display refresh rate, i.e. at 60+ frames per second. \ - In immediate mode GUIs, the entire interface is laid out and painted at the same high rate. \ - This makes immediate mode GUIs especially well suited for highly interactive applications."); - ui.horizontal_wrapped(|ui| { ui.spacing_mut().item_spacing.x = 0.0; - ui.label("More about immediate mode "); + ui.label("There are no callbacks or messages, and no button state to store. "); + ui.label("Read more about immediate mode "); ui.hyperlink_to("here", "https://github.com/emilk/egui#why-immediate-mode"); ui.label("."); }); diff --git a/crates/egui_demo_lib/src/demo/demo_app_windows.rs b/crates/egui_demo_lib/src/demo/demo_app_windows.rs index 02c88357c..0e82d03c2 100644 --- a/crates/egui_demo_lib/src/demo/demo_app_windows.rs +++ b/crates/egui_demo_lib/src/demo/demo_app_windows.rs @@ -1,6 +1,7 @@ -use egui::{Context, Modifiers, ScrollArea, Ui}; use std::collections::BTreeSet; +use egui::{Context, Modifiers, NumExt as _, ScrollArea, Ui}; + use super::About; use super::Demo; use super::View; @@ -180,7 +181,7 @@ impl DemoWindows { fn mobile_ui(&mut self, ctx: &Context) { if self.about_is_open { let screen_size = ctx.input(|i| i.screen_rect.size()); - let default_width = (screen_size.x - 20.0).min(400.0); + let default_width = (screen_size.x - 32.0).at_most(400.0); let mut close = false; egui::Window::new(self.about.name()) @@ -243,7 +244,6 @@ impl DemoWindows { .resizable(false) .default_width(150.0) .show(ctx, |ui| { - egui::trace!(ui); ui.vertical_centered(|ui| { ui.heading("✒ egui demos"); }); diff --git a/crates/egui_demo_lib/src/demo/widget_gallery.rs b/crates/egui_demo_lib/src/demo/widget_gallery.rs index 9cc7d2ca6..82589c402 100644 --- a/crates/egui_demo_lib/src/demo/widget_gallery.rs +++ b/crates/egui_demo_lib/src/demo/widget_gallery.rs @@ -197,7 +197,7 @@ impl WidgetGallery { ui.end_row(); ui.add(doc_link_label("Image", "Image")); - let egui_icon = egui::include_image!("../../assets/icon.png"); + let egui_icon = egui::include_image!("../../data/icon.png"); ui.add(egui::Image::new(egui_icon.clone())); ui.end_row(); diff --git a/crates/egui_demo_lib/src/demo/window_options.rs b/crates/egui_demo_lib/src/demo/window_options.rs index ed142d089..a69f6cf79 100644 --- a/crates/egui_demo_lib/src/demo/window_options.rs +++ b/crates/egui_demo_lib/src/demo/window_options.rs @@ -6,6 +6,7 @@ pub struct WindowOptions { closable: bool, collapsible: bool, resizable: bool, + constrain: bool, scroll2: [bool; 2], disabled_time: f64, @@ -22,6 +23,7 @@ impl Default for WindowOptions { closable: true, collapsible: true, resizable: true, + constrain: true, scroll2: [true; 2], disabled_time: f64::NEG_INFINITY, anchored: false, @@ -43,6 +45,7 @@ impl super::Demo for WindowOptions { closable, collapsible, resizable, + constrain, scroll2, disabled_time, anchored, @@ -59,6 +62,7 @@ impl super::Demo for WindowOptions { let mut window = egui::Window::new(title) .id(egui::Id::new("demo_window_options")) // required since we change the title .resizable(resizable) + .constrain(constrain) .collapsible(collapsible) .title_bar(title_bar) .scroll2(scroll2) @@ -81,6 +85,7 @@ impl super::View for WindowOptions { closable, collapsible, resizable, + constrain, scroll2, disabled_time: _, anchored, @@ -99,6 +104,8 @@ impl super::View for WindowOptions { ui.checkbox(closable, "closable"); ui.checkbox(collapsible, "collapsible"); ui.checkbox(resizable, "resizable"); + ui.checkbox(constrain, "constrain") + .on_hover_text("Constrain window to the screen"); ui.checkbox(&mut scroll2[0], "hscroll"); ui.checkbox(&mut scroll2[1], "vscroll"); }); diff --git a/crates/egui_extras/CHANGELOG.md b/crates/egui_extras/CHANGELOG.md index 3a968179b..937a89677 100644 --- a/crates/egui_extras/CHANGELOG.md +++ b/crates/egui_extras/CHANGELOG.md @@ -5,6 +5,14 @@ This file is updated upon each release. Changes since the last release can be found by running the `scripts/generate_changelog.py` script. +## 0.23.0 - 2023-09-27 +* `egui_extras::install_image_loaders` [#3297](https://github.com/emilk/egui/pull/3297) [#3315](https://github.com/emilk/egui/pull/3315) [#3328](https://github.com/emilk/egui/pull/3328) (thanks [@jprochazk](https://github.com/jprochazk)!) +* Add syntax highlighting feature to `egui_extras` [#3333](https://github.com/emilk/egui/pull/3333) [#3388](https://github.com/emilk/egui/pull/3388) +* Add `TableBuilder::drag_to_scroll` [#3100](https://github.com/emilk/egui/pull/3100) (thanks [@KYovchevski](https://github.com/KYovchevski)!) +* Add opt-in `puffin` feature to `egui-extras` [#3307](https://github.com/emilk/egui/pull/3307) +* Always depend on `log` crate [#3336](https://github.com/emilk/egui/pull/3336) +* Fix not taking clipping into account when calculating column remainder [#3357](https://github.com/emilk/egui/pull/3357) (thanks [@daxpedda](https://github.com/daxpedda)!) + ## 0.22.0 - 2023-05-23 - Add option to hide datepicker button calendar icon [#2910](https://github.com/emilk/egui/pull/2910) (thanks [@Barugon](https://github.com/Barugon)!) diff --git a/crates/egui_extras/Cargo.toml b/crates/egui_extras/Cargo.toml index d2d21068d..6d9ea6993 100644 --- a/crates/egui_extras/Cargo.toml +++ b/crates/egui_extras/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egui_extras" -version = "0.22.0" +version = "0.23.0" authors = [ "Dominik Rössler ", "Emil Ernerfeldt ", @@ -42,7 +42,8 @@ http = ["dep:ehttp"] ## ## You also need to ALSO opt-in to the image formats you want to support, like so: ## ```toml -## image = { version = "0.24", features = ["jpeg", "png"] } +## image = { version = "0.24", features = ["jpeg", "png"] } # Add the types you want support for + ## ``` image = ["dep:image"] @@ -59,7 +60,7 @@ syntect = ["dep:syntect"] [dependencies] -egui = { version = "0.22.0", path = "../egui", default-features = false, features = [ +egui = { version = "0.23.0", path = "../egui", default-features = false, features = [ "serde", ] } enum-map = { version = "2", features = ["serde"] } @@ -96,4 +97,4 @@ tiny-skia = { version = "0.8", optional = true, default-features = false } # mus usvg = { version = "0.28", optional = true, default-features = false } # http feature -ehttp = { version = "0.3.0", optional = true, default-features = false } +ehttp = { version = "0.3.1", optional = true, default-features = false } diff --git a/crates/egui_extras/README.md b/crates/egui_extras/README.md index e46176c95..0ccb1de2b 100644 --- a/crates/egui_extras/README.md +++ b/crates/egui_extras/README.md @@ -13,7 +13,7 @@ One thing `egui_extras` is commonly used for is to install image loaders for `eg ```toml egui_extras = { version = "*", features = ["all_loaders"] } -image = { version = "0.24", features = ["jpeg", "png"] } +image = { version = "0.24", features = ["jpeg", "png"] } # Add the types you want support for ``` ```rs diff --git a/crates/egui_extras/src/datepicker/button.rs b/crates/egui_extras/src/datepicker/button.rs index d40a7ebac..55d9bd023 100644 --- a/crates/egui_extras/src/datepicker/button.rs +++ b/crates/egui_extras/src/datepicker/button.rs @@ -117,6 +117,7 @@ impl<'a> Widget for DatePickerButton<'a> { } = Area::new(ui.make_persistent_id(self.id_source)) .order(Order::Foreground) .fixed_pos(pos) + .constrain_to(ui.ctx().screen_rect()) .show(ui.ctx(), |ui| { let frame = Frame::popup(ui.style()); frame diff --git a/crates/egui_extras/src/loaders.rs b/crates/egui_extras/src/loaders.rs index 0342fcabc..cc775a2ca 100644 --- a/crates/egui_extras/src/loaders.rs +++ b/crates/egui_extras/src/loaders.rs @@ -20,7 +20,7 @@ /// /// ```toml,ignore /// egui_extras = { version = "*", features = ["all_loaders"] } -/// image = { version = "0.24", features = ["jpeg", "png"] } +/// image = { version = "0.24", features = ["jpeg", "png"] } # Add the types you want support for /// ``` /// /// ⚠ You have to configure both the supported loaders in `egui_extras` _and_ the supported image formats diff --git a/crates/egui_glium/Cargo.toml b/crates/egui_glium/Cargo.toml index 7a8f75870..a76cde4e3 100644 --- a/crates/egui_glium/Cargo.toml +++ b/crates/egui_glium/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egui_glium" -version = "0.22.0" +version = "0.23.0" authors = ["Emil Ernerfeldt "] description = "Bindings for using egui natively using the glium library" edition = "2021" @@ -36,10 +36,10 @@ links = ["egui-winit/links"] [dependencies] -egui = { version = "0.22.0", path = "../egui", default-features = false, features = [ +egui = { version = "0.23.0", path = "../egui", default-features = false, features = [ "bytemuck", ] } -egui-winit = { version = "0.22.0", path = "../egui-winit", default-features = false } +egui-winit = { version = "0.23.0", path = "../egui-winit", default-features = false } ahash = { version = "0.8.1", default-features = false, features = [ "no-rng", # we don't need DOS-protection, so we let users opt-in to it instead @@ -54,5 +54,5 @@ document-features = { version = "0.2", optional = true } [dev-dependencies] -egui_demo_lib = { version = "0.22.0", path = "../egui_demo_lib", default-features = false } +egui_demo_lib = { version = "0.23.0", path = "../egui_demo_lib", default-features = false } image = { version = "0.24", default-features = false, features = ["png"] } diff --git a/crates/egui_glow/CHANGELOG.md b/crates/egui_glow/CHANGELOG.md index 3710edab4..4b82b58d2 100644 --- a/crates/egui_glow/CHANGELOG.md +++ b/crates/egui_glow/CHANGELOG.md @@ -5,7 +5,12 @@ This file is updated upon each release. Changes since the last release can be found by running the `scripts/generate_changelog.py` script. +## 0.23.0 - 2023-09-27 +* Update `egui` + + ## 0.22.0 - 2023-05-23 +* Update `egui` ## 0.21.0 - 2023-02-08 diff --git a/crates/egui_glow/Cargo.toml b/crates/egui_glow/Cargo.toml index d1e0d5afe..1f52b9b1d 100644 --- a/crates/egui_glow/Cargo.toml +++ b/crates/egui_glow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "egui_glow" -version = "0.22.0" +version = "0.23.0" authors = ["Emil Ernerfeldt "] description = "Bindings for using egui natively using the glow library" edition = "2021" @@ -44,7 +44,7 @@ winit = ["egui-winit"] [dependencies] -egui = { version = "0.22.0", path = "../egui", default-features = false, features = [ +egui = { version = "0.23.0", path = "../egui", default-features = false, features = [ "bytemuck", ] } @@ -59,7 +59,7 @@ document-features = { version = "0.2", optional = true } # Native: [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -egui-winit = { version = "0.22.0", path = "../egui-winit", optional = true, default-features = false } +egui-winit = { version = "0.23.0", path = "../egui-winit", optional = true, default-features = false } puffin = { version = "0.16", optional = true } # Web: diff --git a/crates/egui_glow/src/lib.rs b/crates/egui_glow/src/lib.rs index 4af9e409c..e53819523 100644 --- a/crates/egui_glow/src/lib.rs +++ b/crates/egui_glow/src/lib.rs @@ -1,6 +1,6 @@ //! [`egui`] bindings for [`glow`](https://github.com/grovesNL/glow). //! -//! The main types you want to look are are [`Painter`]. +//! The main type you want to look at is [`Painter`]. //! //! If you are writing an app, you may want to look at [`eframe`](https://docs.rs/eframe) instead. //! diff --git a/crates/egui_plot/CHANGELOG.md b/crates/egui_plot/CHANGELOG.md index 5f3b7cbc9..e0e093b52 100644 --- a/crates/egui_plot/CHANGELOG.md +++ b/crates/egui_plot/CHANGELOG.md @@ -3,3 +3,14 @@ All notable changes to the `egui_plot` integration will be noted in this file. This file is updated upon each release. Changes since the last release can be found by running the `scripts/generate_changelog.py` script. + + +## 0.23.0 - 2023-09-27 - Initial release, after being forked out from `egui` +* Draw axis labels and ticks outside of plotting window [#2284](https://github.com/emilk/egui/pull/2284) (thanks [@JohannesProgrammiert](https://github.com/JohannesProgrammiert)!) +* Add `PlotUi::response()` to replace `plot_clicked()` etc [#3223](https://github.com/emilk/egui/pull/3223) +* Add rotation feature to plot images [#3121](https://github.com/emilk/egui/pull/3121) (thanks [@ThundR67](https://github.com/ThundR67)!) +* Plot items: Image rotation and size in plot coordinates, polygon fill color [#3182](https://github.com/emilk/egui/pull/3182) (thanks [@s-nie](https://github.com/s-nie)!) +* Add method to specify `tip_size` of plot arrows [#3138](https://github.com/emilk/egui/pull/3138) (thanks [@nagua](https://github.com/nagua)!) +* Better handle additive colors in plots [#3387](https://github.com/emilk/egui/pull/3387) +* Fix auto_bounds when only one axis has restricted navigation [#3171](https://github.com/emilk/egui/pull/3171) (thanks [@KoffeinFlummi](https://github.com/KoffeinFlummi)!) +* Fix plot formatter not taking closures [#3260](https://github.com/emilk/egui/pull/3260) (thanks [@Wumpf](https://github.com/Wumpf)!) diff --git a/crates/egui_plot/Cargo.toml b/crates/egui_plot/Cargo.toml index 53f35c420..d61a2c63d 100644 --- a/crates/egui_plot/Cargo.toml +++ b/crates/egui_plot/Cargo.toml @@ -1,11 +1,7 @@ [package] name = "egui_plot" -version = "0.22.0" -authors = [ - "Dominik Rössler ", - "Emil Ernerfeldt ", - "René Rössler ", -] +version = "0.23.0" +authors = ["Emil Ernerfeldt "] description = "Immediate mode plotting for the egui GUI library" edition = "2021" rust-version = "1.70" @@ -32,7 +28,7 @@ serde = ["dep:serde", "egui/serde"] [dependencies] -egui = { version = "0.22.0", path = "../egui", default-features = false } +egui = { version = "0.23.0", path = "../egui", default-features = false } #! ### Optional dependencies diff --git a/crates/egui_plot/src/items/values.rs b/crates/egui_plot/src/items/values.rs index 55e0e464b..0527fb26e 100644 --- a/crates/egui_plot/src/items/values.rs +++ b/crates/egui_plot/src/items/values.rs @@ -47,6 +47,7 @@ impl PlotPoint { // ---------------------------------------------------------------------------- +/// Solid, dotted, dashed, etc. #[derive(Debug, PartialEq, Clone, Copy)] pub enum LineStyle { Solid, @@ -319,6 +320,7 @@ impl PlotPoints { // ---------------------------------------------------------------------------- +/// Circle, Diamond, Square, Cross, … #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub enum MarkerShape { Circle, diff --git a/crates/egui_plot/src/lib.rs b/crates/egui_plot/src/lib.rs index 835a75d19..111f5f65c 100644 --- a/crates/egui_plot/src/lib.rs +++ b/crates/egui_plot/src/lib.rs @@ -1,4 +1,4 @@ -//! Simple plotting library. +//! Simple plotting library for [`egui`](https://github.com/emilk/egui). //! //! ## Feature flags #![cfg_attr(feature = "document-features", doc = document_features::document_features!())] @@ -77,6 +77,7 @@ impl Default for CoordinatesFormatter { const MIN_LINE_SPACING_IN_POINTS: f64 = 6.0; // TODO(emilk): large enough for a wide label +/// Two bools, one for each axis (X and Y). #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct AxisBools { diff --git a/crates/emath/Cargo.toml b/crates/emath/Cargo.toml index 065b475a7..0e40ea274 100644 --- a/crates/emath/Cargo.toml +++ b/crates/emath/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "emath" -version = "0.22.0" +version = "0.23.0" authors = ["Emil Ernerfeldt "] description = "Minimal 2D math library for GUI work" edition = "2021" diff --git a/crates/epaint/CHANGELOG.md b/crates/epaint/CHANGELOG.md index e0f4e0569..36fcfc1b5 100644 --- a/crates/epaint/CHANGELOG.md +++ b/crates/epaint/CHANGELOG.md @@ -5,6 +5,17 @@ This file is updated upon each release. Changes since the last release can be found by running the `scripts/generate_changelog.py` script. +## 0.23.0 - 2023-09-27 +* Update MSRV to Rust 1.70.0 [#3310](https://github.com/emilk/egui/pull/3310) +* Add option to truncate text at wrap width [#3244](https://github.com/emilk/egui/pull/3244) [#3366](https://github.com/emilk/egui/pull/3366) +* Add control of line height and letter spacing [#3302](https://github.com/emilk/egui/pull/3302) +* Support images with rounded corners [#3257](https://github.com/emilk/egui/pull/3257) +* Add `ColorImage::from_gray` [#3166](https://github.com/emilk/egui/pull/3166) (thanks [@thomaseliot](https://github.com/thomaseliot)!) +* Provide `into_inner()` for `egui::mutex::{Mutex, RwLock}` [#3110](https://github.com/emilk/egui/pull/3110) (thanks [@KmolYuan](https://github.com/KmolYuan)!) +* Fix problems with tabs in text [#3355](https://github.com/emilk/egui/pull/3355) +* Refactor: change `ClippedShape` from struct-enum to a normal struct [#3225](https://github.com/emilk/egui/pull/3225) +* Document when `Galley`s get invalidated [#3024](https://github.com/emilk/egui/pull/3024) (thanks [@e00E](https://github.com/e00E)!) + ## 0.22.0 - 2023-05-23 * Fix compiling `epaint` without `bytemuck` dependency [#2913](https://github.com/emilk/egui/pull/2913) (thanks [@lunixbochs](https://github.com/lunixbochs)!) diff --git a/crates/epaint/Cargo.toml b/crates/epaint/Cargo.toml index 4da6195cc..16eda3dfa 100644 --- a/crates/epaint/Cargo.toml +++ b/crates/epaint/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "epaint" -version = "0.22.0" +version = "0.23.0" authors = ["Emil Ernerfeldt "] description = "Minimal 2D graphics library for GUI work" edition = "2021" @@ -70,8 +70,8 @@ serde = ["dep:serde", "ahash/serde", "emath/serde", "ecolor/serde"] unity = [] [dependencies] -emath = { version = "0.22.0", path = "../emath" } -ecolor = { version = "0.22.0", path = "../ecolor" } +emath = { version = "0.23.0", path = "../emath" } +ecolor = { version = "0.23.0", path = "../ecolor" } ab_glyph = "0.2.11" ahash = { version = "0.8.1", default-features = false, features = [ diff --git a/crates/epaint/src/shape.rs b/crates/epaint/src/shape.rs index 718da636b..cc4294f6c 100644 --- a/crates/epaint/src/shape.rs +++ b/crates/epaint/src/shape.rs @@ -498,6 +498,8 @@ pub struct RectShape { /// /// To display a texture, set [`Self::fill_texture_id`], /// and set this to `Rect::from_min_max(pos2(0.0, 0.0), pos2(1.0, 1.0))`. + /// + /// Use [`Rect::ZERO`] to turn off texturing. pub uv: Rect, } diff --git a/crates/epaint/src/text/font.rs b/crates/epaint/src/text/font.rs index 163697d5f..f33ff1cee 100644 --- a/crates/epaint/src/text/font.rs +++ b/crates/epaint/src/text/font.rs @@ -72,7 +72,7 @@ pub struct FontImpl { height_in_points: f32, // move each character by this much (hack) - y_offset: f32, + y_offset_in_points: f32, ascent: f32, pixels_per_point: f32, @@ -111,22 +111,23 @@ impl FontImpl { scale_in_points * tweak.y_offset_factor } + tweak.y_offset; - // center scaled glyphs properly - let y_offset_points = y_offset_points + (tweak.scale - 1.0) * 0.5 * (ascent + descent); + // Center scaled glyphs properly: + let height = ascent + descent; + let y_offset_points = y_offset_points - (1.0 - tweak.scale) * 0.5 * height; // Round to an even number of physical pixels to get even kerning. // See https://github.com/emilk/egui/issues/382 let scale_in_pixels = scale_in_pixels.round() as u32; // Round to closest pixel: - let y_offset = (y_offset_points * pixels_per_point).round() / pixels_per_point; + let y_offset_in_points = (y_offset_points * pixels_per_point).round() / pixels_per_point; Self { name, ab_glyph_font, scale_in_pixels, height_in_points: ascent - descent + line_gap, - y_offset, + y_offset_in_points, ascent: ascent + baseline_offset, pixels_per_point, glyph_info_cache: Default::default(), @@ -283,7 +284,8 @@ impl FontImpl { }); let offset_in_pixels = vec2(bb.min.x, bb.min.y); - let offset = offset_in_pixels / self.pixels_per_point + self.y_offset * Vec2::Y; + let offset = + offset_in_pixels / self.pixels_per_point + self.y_offset_in_points * Vec2::Y; UvRect { offset, size: vec2(glyph_width as f32, glyph_height as f32) / self.pixels_per_point, diff --git a/deny.toml b/deny.toml index 3c1f21d8c..96aec7009 100644 --- a/deny.toml +++ b/deny.toml @@ -36,6 +36,7 @@ deny = [ skip = [ { name = "arrayvec" }, # old version via tiny-skiaz { name = "libloading" }, # wgpu-hal itself depends on 0.8 while some of its dependencies, like ash and d3d12, depend on 0.7 + { name = "memoffset" }, # tiny dependency { name = "nix" }, # old version via winit { name = "redox_syscall" }, # old version via winit { name = "time" }, # old version pulled in by unmaintianed crate 'chrono' diff --git a/docs/egui_demo_app.js b/docs/egui_demo_app.js index 1ff9caa9c..30d8de5dc 100644 --- a/docs/egui_demo_app.js +++ b/docs/egui_demo_app.js @@ -75,14 +75,14 @@ function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); - const ptr = malloc(buf.length) >>> 0; + const ptr = malloc(buf.length, 1) >>> 0; getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; - let ptr = malloc(len) >>> 0; + let ptr = malloc(len, 1) >>> 0; const mem = getUint8Memory0(); @@ -98,7 +98,7 @@ function passStringToWasm0(arg, malloc, realloc) { if (offset !== 0) { arg = arg.slice(offset); } - ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0; + ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8Memory0().subarray(ptr + offset, ptr + len); const ret = encodeString(arg, view); @@ -220,10 +220,10 @@ function makeMutClosure(arg0, arg1, dtor, f) { return real; } -function __wbg_adapter_28(arg0, arg1) { +function __wbg_adapter_30(arg0, arg1) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb0203c3310c02e85(retptr, arg0, arg1); + wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd926101060f0783e(retptr, arg0, arg1); var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; if (r1) { @@ -234,12 +234,12 @@ function __wbg_adapter_28(arg0, arg1) { } } -function __wbg_adapter_31(arg0, arg1) { - wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h2a3101d1095ab00a(arg0, arg1); +function __wbg_adapter_33(arg0, arg1) { + wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5e12b61ce76cf0a6(arg0, arg1); } -function __wbg_adapter_34(arg0, arg1, arg2) { - wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4d1e0c1db4f0e0bb(arg0, arg1, addHeapObject(arg2)); +function __wbg_adapter_36(arg0, arg1, arg2) { + wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h2000f7e9add97f30(arg0, arg1, addHeapObject(arg2)); } function makeClosure(arg0, arg1, dtor, f) { @@ -263,12 +263,12 @@ function makeClosure(arg0, arg1, dtor, f) { return real; } -function __wbg_adapter_37(arg0, arg1, arg2) { - wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbc77240210741db8(arg0, arg1, addHeapObject(arg2)); +function __wbg_adapter_39(arg0, arg1, arg2) { + wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5304a2544517cb21(arg0, arg1, addHeapObject(arg2)); } -function __wbg_adapter_42(arg0, arg1, arg2) { - wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h19a82ca01a9b327d(arg0, arg1, addHeapObject(arg2)); +function __wbg_adapter_44(arg0, arg1, arg2) { + wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h033aeb86989a3bc1(arg0, arg1, addHeapObject(arg2)); } function handleError(f, args) { @@ -278,8 +278,8 @@ function handleError(f, args) { wasm.__wbindgen_exn_store(addHeapObject(e)); } } -function __wbg_adapter_580(arg0, arg1, arg2, arg3) { - wasm.wasm_bindgen__convert__closures__invoke2_mut__h4169691c0456ed25(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); +function __wbg_adapter_590(arg0, arg1, arg2, arg3) { + wasm.wasm_bindgen__convert__closures__invoke2_mut__h5948535385382d86(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); } /** @@ -418,9 +418,6 @@ async function __wbg_load(module, imports) { function __wbg_get_imports() { const imports = {}; imports.wbg = {}; - imports.wbg.__wbindgen_object_drop_ref = function(arg0) { - takeObject(arg0); - }; imports.wbg.__wbindgen_cb_drop = function(arg0) { const obj = takeObject(arg0).original; if (obj.cnt-- == 1) { @@ -430,6 +427,9 @@ function __wbg_get_imports() { const ret = false; return ret; }; + imports.wbg.__wbindgen_object_drop_ref = function(arg0) { + takeObject(arg0); + }; imports.wbg.__wbindgen_string_new = function(arg0, arg1) { const ret = getStringFromWasm0(arg0, arg1); return addHeapObject(ret); @@ -442,13 +442,11 @@ function __wbg_get_imports() { getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }; - imports.wbg.__wbindgen_number_get = function(arg0, arg1) { - const obj = getObject(arg1); - const ret = typeof(obj) === 'number' ? obj : undefined; - getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; - getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); + imports.wbg.__wbindgen_number_new = function(arg0) { + const ret = arg0; + return addHeapObject(ret); }; - imports.wbg.__wbg_error_e62b64b85c2bc545 = function(arg0, arg1) { + imports.wbg.__wbg_error_e38422e56bbd072c = function(arg0, arg1) { let deferred0_0; let deferred0_1; try { @@ -456,42 +454,48 @@ function __wbg_get_imports() { deferred0_1 = arg1; console.error(getStringFromWasm0(arg0, arg1)); } finally { - wasm.__wbindgen_free(deferred0_0, deferred0_1); + wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); } }; - imports.wbg.__wbg_new_40620131643ca1cf = function() { + imports.wbg.__wbg_new_e7fbaa407e13d590 = function() { const ret = new Error(); return addHeapObject(ret); }; - imports.wbg.__wbg_stack_e3e173f66e044a69 = function(arg0, arg1) { + imports.wbg.__wbg_stack_21698d2a5852e13e = function(arg0, arg1) { const ret = getObject(arg1).stack; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }; - imports.wbg.__wbg_trace_8d8f961bba04f90a = function(arg0, arg1) { - console.trace(getStringFromWasm0(arg0, arg1)); - }; - imports.wbg.__wbg_debug_7fc527041707e16e = function(arg0, arg1) { - console.debug(getStringFromWasm0(arg0, arg1)); - }; - imports.wbg.__wbg_info_e495fa41540a3eaa = function(arg0, arg1) { - console.info(getStringFromWasm0(arg0, arg1)); - }; - imports.wbg.__wbg_warn_8b4e19d4032139f0 = function(arg0, arg1) { - console.warn(getStringFromWasm0(arg0, arg1)); - }; imports.wbg.__wbindgen_object_clone_ref = function(arg0) { const ret = getObject(arg0); return addHeapObject(ret); }; + imports.wbg.__wbg_warn_a95766347500bf17 = function(arg0, arg1) { + console.warn(getStringFromWasm0(arg0, arg1)); + }; + imports.wbg.__wbg_info_7589c99c14cdc5ef = function(arg0, arg1) { + console.info(getStringFromWasm0(arg0, arg1)); + }; + imports.wbg.__wbg_debug_97244d3ec765cb44 = function(arg0, arg1) { + console.debug(getStringFromWasm0(arg0, arg1)); + }; + imports.wbg.__wbg_trace_71659133a99ab3e3 = function(arg0, arg1) { + console.trace(getStringFromWasm0(arg0, arg1)); + }; + imports.wbg.__wbindgen_number_get = function(arg0, arg1) { + const obj = getObject(arg1); + const ret = typeof(obj) === 'number' ? obj : undefined; + getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; + getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); + }; imports.wbg.__wbindgen_boolean_get = function(arg0) { const v = getObject(arg0); const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; return ret; }; - imports.wbg.__wbg_instanceof_WebGl2RenderingContext_a9b8e563e17071fe = function(arg0) { + imports.wbg.__wbg_instanceof_WebGl2RenderingContext_f921526c513bf717 = function(arg0) { let result; try { result = getObject(arg0) instanceof WebGL2RenderingContext; @@ -501,187 +505,187 @@ function __wbg_get_imports() { const ret = result; return ret; }; - imports.wbg.__wbg_bindVertexArray_ff82138c68ab11e2 = function(arg0, arg1) { + imports.wbg.__wbg_bindVertexArray_8863a216d7b0a339 = function(arg0, arg1) { getObject(arg0).bindVertexArray(getObject(arg1)); }; - imports.wbg.__wbg_bufferData_bc2f1a27f7162655 = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_bufferData_21334671c4ba6004 = function(arg0, arg1, arg2, arg3) { getObject(arg0).bufferData(arg1 >>> 0, getObject(arg2), arg3 >>> 0); }; - imports.wbg.__wbg_createVertexArray_c3ea33e844216f0c = function(arg0) { + imports.wbg.__wbg_createVertexArray_51d51e1e1e13e9f6 = function(arg0) { const ret = getObject(arg0).createVertexArray(); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_deleteVertexArray_6cac5e6d920ec62c = function(arg0, arg1) { + imports.wbg.__wbg_deleteVertexArray_3e4f2e2ff7f05a19 = function(arg0, arg1) { getObject(arg0).deleteVertexArray(getObject(arg1)); }; - imports.wbg.__wbg_texImage2D_dd4aced57a17360f = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + imports.wbg.__wbg_texImage2D_07240affd06971e9 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { getObject(arg0).texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, getObject(arg9)); }, arguments) }; - imports.wbg.__wbg_texSubImage2D_c3c012dc814eb4de = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + imports.wbg.__wbg_texSubImage2D_d2841ded12a8aa66 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { getObject(arg0).texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, getObject(arg9)); }, arguments) }; - imports.wbg.__wbg_texSubImage2D_6cc58218d4d2218e = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + imports.wbg.__wbg_texSubImage2D_bccf4e250f1ce1b8 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { getObject(arg0).texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); }, arguments) }; - imports.wbg.__wbg_activeTexture_0c3957272c193058 = function(arg0, arg1) { + imports.wbg.__wbg_activeTexture_799bf1387e911c27 = function(arg0, arg1) { getObject(arg0).activeTexture(arg1 >>> 0); }; - imports.wbg.__wbg_attachShader_cda29f0482c65440 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_attachShader_47256b6b3d42a22e = function(arg0, arg1, arg2) { getObject(arg0).attachShader(getObject(arg1), getObject(arg2)); }; - imports.wbg.__wbg_bindBuffer_6f9a2fa9ebc65b01 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_bindBuffer_24f6010e273fa400 = function(arg0, arg1, arg2) { getObject(arg0).bindBuffer(arg1 >>> 0, getObject(arg2)); }; - imports.wbg.__wbg_bindTexture_10219c0f804bff90 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_bindTexture_92d6d7f8bff9531e = function(arg0, arg1, arg2) { getObject(arg0).bindTexture(arg1 >>> 0, getObject(arg2)); }; - imports.wbg.__wbg_blendEquationSeparate_02dd5ec6a2c24f28 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_blendEquationSeparate_205526dad772d160 = function(arg0, arg1, arg2) { getObject(arg0).blendEquationSeparate(arg1 >>> 0, arg2 >>> 0); }; - imports.wbg.__wbg_blendFuncSeparate_f9dccffef5a98f44 = function(arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_blendFuncSeparate_fbf93dee3e5ce456 = function(arg0, arg1, arg2, arg3, arg4) { getObject(arg0).blendFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); }; - imports.wbg.__wbg_clear_15c6565459b2686d = function(arg0, arg1) { + imports.wbg.__wbg_clear_2db2efe323bfdf68 = function(arg0, arg1) { getObject(arg0).clear(arg1 >>> 0); }; - imports.wbg.__wbg_clearColor_116005afbb6df00f = function(arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_clearColor_7a7d04702f7e38e5 = function(arg0, arg1, arg2, arg3, arg4) { getObject(arg0).clearColor(arg1, arg2, arg3, arg4); }; - imports.wbg.__wbg_colorMask_1dfb9a91ae2b9e71 = function(arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_colorMask_fba1e2efd891e2ac = function(arg0, arg1, arg2, arg3, arg4) { getObject(arg0).colorMask(arg1 !== 0, arg2 !== 0, arg3 !== 0, arg4 !== 0); }; - imports.wbg.__wbg_compileShader_6f505d659e2795e6 = function(arg0, arg1) { + imports.wbg.__wbg_compileShader_6bf78b425d5c98e1 = function(arg0, arg1) { getObject(arg0).compileShader(getObject(arg1)); }; - imports.wbg.__wbg_createBuffer_0da7eb27184081a8 = function(arg0) { + imports.wbg.__wbg_createBuffer_323425af422748ac = function(arg0) { const ret = getObject(arg0).createBuffer(); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_createProgram_535e1a7a84baa7ff = function(arg0) { + imports.wbg.__wbg_createProgram_4eaf3b97b5747a62 = function(arg0) { const ret = getObject(arg0).createProgram(); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_createShader_b1a69c91a9abbcf9 = function(arg0, arg1) { + imports.wbg.__wbg_createShader_429776c9dd6fb87b = function(arg0, arg1) { const ret = getObject(arg0).createShader(arg1 >>> 0); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_createTexture_f999863e1ff4544e = function(arg0) { + imports.wbg.__wbg_createTexture_1bf4d6fec570124b = function(arg0) { const ret = getObject(arg0).createTexture(); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_deleteBuffer_d6466e666563f36a = function(arg0, arg1) { + imports.wbg.__wbg_deleteBuffer_2c09d03fa4b0bd08 = function(arg0, arg1) { getObject(arg0).deleteBuffer(getObject(arg1)); }; - imports.wbg.__wbg_deleteProgram_c6b502ab111ca429 = function(arg0, arg1) { + imports.wbg.__wbg_deleteProgram_53a32852f245b839 = function(arg0, arg1) { getObject(arg0).deleteProgram(getObject(arg1)); }; - imports.wbg.__wbg_deleteShader_cbb128151b8b2b6b = function(arg0, arg1) { + imports.wbg.__wbg_deleteShader_7c1222349324b5e2 = function(arg0, arg1) { getObject(arg0).deleteShader(getObject(arg1)); }; - imports.wbg.__wbg_deleteTexture_43dcaa158a7a967b = function(arg0, arg1) { + imports.wbg.__wbg_deleteTexture_4fcfea73cd8f6214 = function(arg0, arg1) { getObject(arg0).deleteTexture(getObject(arg1)); }; - imports.wbg.__wbg_detachShader_10a74e43565974e2 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_detachShader_04abccd441871232 = function(arg0, arg1, arg2) { getObject(arg0).detachShader(getObject(arg1), getObject(arg2)); }; - imports.wbg.__wbg_disable_94431bed03515efb = function(arg0, arg1) { + imports.wbg.__wbg_disable_e02106ca6c7002d6 = function(arg0, arg1) { getObject(arg0).disable(arg1 >>> 0); }; - imports.wbg.__wbg_disableVertexAttribArray_6f95b891552695e8 = function(arg0, arg1) { + imports.wbg.__wbg_disableVertexAttribArray_6d57776c8f642f44 = function(arg0, arg1) { getObject(arg0).disableVertexAttribArray(arg1 >>> 0); }; - imports.wbg.__wbg_drawArrays_77814548b9e573f2 = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_drawArrays_c91ce3f736bf1f2a = function(arg0, arg1, arg2, arg3) { getObject(arg0).drawArrays(arg1 >>> 0, arg2, arg3); }; - imports.wbg.__wbg_drawElements_9eb2a38d09666d1f = function(arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_drawElements_a9529eefaf2008bd = function(arg0, arg1, arg2, arg3, arg4) { getObject(arg0).drawElements(arg1 >>> 0, arg2, arg3 >>> 0, arg4); }; - imports.wbg.__wbg_enable_b36ff5159bc88f3d = function(arg0, arg1) { + imports.wbg.__wbg_enable_195891416c520019 = function(arg0, arg1) { getObject(arg0).enable(arg1 >>> 0); }; - imports.wbg.__wbg_enableVertexAttribArray_7e45a67bd47ec1bc = function(arg0, arg1) { + imports.wbg.__wbg_enableVertexAttribArray_8804480c2ea0bb72 = function(arg0, arg1) { getObject(arg0).enableVertexAttribArray(arg1 >>> 0); }; - imports.wbg.__wbg_getAttribLocation_9fb8d1fcf1e79c7d = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_getAttribLocation_7dbdbad935433494 = function(arg0, arg1, arg2, arg3) { const ret = getObject(arg0).getAttribLocation(getObject(arg1), getStringFromWasm0(arg2, arg3)); return ret; }; - imports.wbg.__wbg_getError_1a05a504dbd2417e = function(arg0) { + imports.wbg.__wbg_getError_7191ad6ea53607fe = function(arg0) { const ret = getObject(arg0).getError(); return ret; }; - imports.wbg.__wbg_getExtension_6b00e2c6c766b6cb = function() { return handleError(function (arg0, arg1, arg2) { + imports.wbg.__wbg_getExtension_77909f6d51d49d4d = function() { return handleError(function (arg0, arg1, arg2) { const ret = getObject(arg0).getExtension(getStringFromWasm0(arg1, arg2)); return isLikeNone(ret) ? 0 : addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_getParameter_9e1070be2e213377 = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_getParameter_55b36a787dbbfb74 = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg0).getParameter(arg1 >>> 0); return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_getProgramInfoLog_03d7941c48fa9179 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_getProgramInfoLog_b81bc53188e286fa = function(arg0, arg1, arg2) { const ret = getObject(arg1).getProgramInfoLog(getObject(arg2)); var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }; - imports.wbg.__wbg_getProgramParameter_dd171792e4ba3184 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_getProgramParameter_35522a0bfdfaad27 = function(arg0, arg1, arg2) { const ret = getObject(arg0).getProgramParameter(getObject(arg1), arg2 >>> 0); return addHeapObject(ret); }; - imports.wbg.__wbg_getShaderInfoLog_c1cca646bf94aa17 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_getShaderInfoLog_968b93e75477d725 = function(arg0, arg1, arg2) { const ret = getObject(arg1).getShaderInfoLog(getObject(arg2)); var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }; - imports.wbg.__wbg_getShaderParameter_c1d89b570b67be37 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_getShaderParameter_ac2727ae4fe7648e = function(arg0, arg1, arg2) { const ret = getObject(arg0).getShaderParameter(getObject(arg1), arg2 >>> 0); return addHeapObject(ret); }; - imports.wbg.__wbg_getSupportedExtensions_675e4373f0fe08ca = function(arg0) { + imports.wbg.__wbg_getSupportedExtensions_fafc31aab913037d = function(arg0) { const ret = getObject(arg0).getSupportedExtensions(); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_getUniformLocation_984bcb57f0539335 = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_getUniformLocation_9f6eb60c560a347b = function(arg0, arg1, arg2, arg3) { const ret = getObject(arg0).getUniformLocation(getObject(arg1), getStringFromWasm0(arg2, arg3)); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_linkProgram_0a25df9d4086c8c9 = function(arg0, arg1) { + imports.wbg.__wbg_linkProgram_33998194075d71fb = function(arg0, arg1) { getObject(arg0).linkProgram(getObject(arg1)); }; - imports.wbg.__wbg_pixelStorei_2a2698776f2da87a = function(arg0, arg1, arg2) { + imports.wbg.__wbg_pixelStorei_f3a24990aa352fc7 = function(arg0, arg1, arg2) { getObject(arg0).pixelStorei(arg1 >>> 0, arg2); }; - imports.wbg.__wbg_scissor_5bbf5da585fcd6cd = function(arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_scissor_e8e41e1c0a9817c8 = function(arg0, arg1, arg2, arg3, arg4) { getObject(arg0).scissor(arg1, arg2, arg3, arg4); }; - imports.wbg.__wbg_shaderSource_5c55ce208ee2dc38 = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_shaderSource_1cb7c64dc7d1a500 = function(arg0, arg1, arg2, arg3) { getObject(arg0).shaderSource(getObject(arg1), getStringFromWasm0(arg2, arg3)); }; - imports.wbg.__wbg_texParameteri_05700ca575d5f41d = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_texParameteri_85dad939f62a15aa = function(arg0, arg1, arg2, arg3) { getObject(arg0).texParameteri(arg1 >>> 0, arg2 >>> 0, arg3); }; - imports.wbg.__wbg_uniform1f_51ae9c9d19ab2a9e = function(arg0, arg1, arg2) { + imports.wbg.__wbg_uniform1f_88379f4e2630bc66 = function(arg0, arg1, arg2) { getObject(arg0).uniform1f(getObject(arg1), arg2); }; - imports.wbg.__wbg_uniform1i_ef0ff3d67b59f4de = function(arg0, arg1, arg2) { + imports.wbg.__wbg_uniform1i_d2e61a6a43889648 = function(arg0, arg1, arg2) { getObject(arg0).uniform1i(getObject(arg1), arg2); }; - imports.wbg.__wbg_uniform2f_7a195f76fb8bc260 = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_uniform2f_b6e484a1302ea599 = function(arg0, arg1, arg2, arg3) { getObject(arg0).uniform2f(getObject(arg1), arg2, arg3); }; - imports.wbg.__wbg_useProgram_f16b06e2ecdf168f = function(arg0, arg1) { + imports.wbg.__wbg_useProgram_3683cf6f60939dcd = function(arg0, arg1) { getObject(arg0).useProgram(getObject(arg1)); }; - imports.wbg.__wbg_vertexAttribPointer_c16280a7c840a534 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { + imports.wbg.__wbg_vertexAttribPointer_316ffe2f0458fde7 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { getObject(arg0).vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6); }; - imports.wbg.__wbg_viewport_a79678835091995e = function(arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_viewport_fad1ce9e18f741c0 = function(arg0, arg1, arg2, arg3, arg4) { getObject(arg0).viewport(arg1, arg2, arg3, arg4); }; - imports.wbg.__wbg_instanceof_Window_c5579e140698a9dc = function(arg0) { + imports.wbg.__wbg_instanceof_Window_9029196b662bc42a = function(arg0) { let result; try { result = getObject(arg0) instanceof Window; @@ -691,125 +695,62 @@ function __wbg_get_imports() { const ret = result; return ret; }; - imports.wbg.__wbg_document_508774c021174a52 = function(arg0) { + imports.wbg.__wbg_document_f7ace2b956f30a4f = function(arg0) { const ret = getObject(arg0).document; return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_location_f6c62a50e72200c8 = function(arg0) { + imports.wbg.__wbg_location_56243dba507f472d = function(arg0) { const ret = getObject(arg0).location; return addHeapObject(ret); }; - imports.wbg.__wbg_navigator_957c9b40d49df205 = function(arg0) { + imports.wbg.__wbg_navigator_7c9103698acde322 = function(arg0) { const ret = getObject(arg0).navigator; return addHeapObject(ret); }; - imports.wbg.__wbg_innerHeight_972bafa16334ae25 = function() { return handleError(function (arg0) { + imports.wbg.__wbg_innerHeight_2dd06d8cf68f1d7d = function() { return handleError(function (arg0) { const ret = getObject(arg0).innerHeight; return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_devicePixelRatio_027b47127fcabea6 = function(arg0) { + imports.wbg.__wbg_devicePixelRatio_f9de7bddca0eaf20 = function(arg0) { const ret = getObject(arg0).devicePixelRatio; return ret; }; - imports.wbg.__wbg_performance_01a75a1b70b2c191 = function(arg0) { + imports.wbg.__wbg_performance_2c295061c8b01e0b = function(arg0) { const ret = getObject(arg0).performance; return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_speechSynthesis_c411499eede06735 = function() { return handleError(function (arg0) { + imports.wbg.__wbg_speechSynthesis_58ae269ad6d93928 = function() { return handleError(function (arg0) { const ret = getObject(arg0).speechSynthesis; return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_localStorage_b5b6d3c826dbfeda = function() { return handleError(function (arg0) { + imports.wbg.__wbg_localStorage_dbac11bd189e9fa0 = function() { return handleError(function (arg0) { const ret = getObject(arg0).localStorage; return isLikeNone(ret) ? 0 : addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_matchMedia_0dd51eaa41e54a4a = function() { return handleError(function (arg0, arg1, arg2) { + imports.wbg.__wbg_matchMedia_12ef69056e32d0b3 = function() { return handleError(function (arg0, arg1, arg2) { const ret = getObject(arg0).matchMedia(getStringFromWasm0(arg1, arg2)); return isLikeNone(ret) ? 0 : addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_open_7403f38d13c728d5 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_open_7a2a86bf6285507d = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); return isLikeNone(ret) ? 0 : addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_requestAnimationFrame_d28701d8e57998d1 = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_requestAnimationFrame_d082200514b6674d = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg0).requestAnimationFrame(getObject(arg1)); return ret; }, arguments) }; - imports.wbg.__wbg_clearInterval_c4c01544d0ea3996 = function(arg0, arg1) { + imports.wbg.__wbg_clearInterval_080a47b47538d08c = function(arg0, arg1) { getObject(arg0).clearInterval(arg1); }; - imports.wbg.__wbg_fetch_bb49ae9f1d79408b = function(arg0, arg1) { + imports.wbg.__wbg_fetch_336b6f0cb426b46e = function(arg0, arg1) { const ret = getObject(arg0).fetch(getObject(arg1)); return addHeapObject(ret); }; - imports.wbg.__wbg_setTimeout_a71432ae24261750 = function() { return handleError(function (arg0, arg1, arg2) { + imports.wbg.__wbg_setTimeout_eb1a0d116c26d9f6 = function() { return handleError(function (arg0, arg1, arg2) { const ret = getObject(arg0).setTimeout(getObject(arg1), arg2); return ret; }, arguments) }; - imports.wbg.__wbg_setProperty_0a5af0fd1a9e8e25 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); - }, arguments) }; - imports.wbg.__wbg_width_3f3962bb2721e365 = function(arg0) { - const ret = getObject(arg0).width; - return ret; - }; - imports.wbg.__wbg_height_32cf02a714d68bd4 = function(arg0) { - const ret = getObject(arg0).height; - return ret; - }; - imports.wbg.__wbg_length_804062329ac4ddbb = function(arg0) { - const ret = getObject(arg0).length; - return ret; - }; - imports.wbg.__wbg_get_43359180ff298dda = function(arg0, arg1) { - const ret = getObject(arg0)[arg1 >>> 0]; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_set_76353df4722f4954 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); - }, arguments) }; - imports.wbg.__wbg_error_49c7bf770cd75883 = function(arg0) { - const ret = getObject(arg0).error; - return addHeapObject(ret); - }; - imports.wbg.__wbg_setvoice_b89f15aafa327ee8 = function(arg0, arg1) { - getObject(arg0).voice = getObject(arg1); - }; - imports.wbg.__wbg_setvolume_b175e9ad36c878ee = function(arg0, arg1) { - getObject(arg0).volume = arg1; - }; - imports.wbg.__wbg_setrate_ca2167dc6b346b26 = function(arg0, arg1) { - getObject(arg0).rate = arg1; - }; - imports.wbg.__wbg_setpitch_3a330092e7e9b96f = function(arg0, arg1) { - getObject(arg0).pitch = arg1; - }; - imports.wbg.__wbg_setonstart_963d173442cf886e = function(arg0, arg1) { - getObject(arg0).onstart = getObject(arg1); - }; - imports.wbg.__wbg_setonend_1fea8ae30b203c54 = function(arg0, arg1) { - getObject(arg0).onend = getObject(arg1); - }; - imports.wbg.__wbg_setonerror_c117a28570d46684 = function(arg0, arg1) { - getObject(arg0).onerror = getObject(arg1); - }; - imports.wbg.__wbg_newwithtext_8130d0159088eaf8 = function() { return handleError(function (arg0, arg1) { - const ret = new SpeechSynthesisUtterance(getStringFromWasm0(arg0, arg1)); - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_length_e9385289cac41215 = function(arg0) { - const ret = getObject(arg0).length; - return ret; - }; - imports.wbg.__wbg_item_3ce7f6824dd8c355 = function(arg0, arg1) { - const ret = getObject(arg0).item(arg1 >>> 0); - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_get_969f46cb0fad92dc = function(arg0, arg1) { - const ret = getObject(arg0)[arg1 >>> 0]; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_instanceof_HtmlInputElement_a15913e00980dd9c = function(arg0) { + imports.wbg.__wbg_instanceof_HtmlInputElement_31b50e0cf542c524 = function(arg0) { let result; try { result = getObject(arg0) instanceof HTMLInputElement; @@ -819,178 +760,145 @@ function __wbg_get_imports() { const ret = result; return ret; }; - imports.wbg.__wbg_setautofocus_ae682319cc846b47 = function(arg0, arg1) { + imports.wbg.__wbg_setautofocus_61b6a31b4866ad1f = function(arg0, arg1) { getObject(arg0).autofocus = arg1 !== 0; }; - imports.wbg.__wbg_setsize_ae008b7511e35484 = function(arg0, arg1) { + imports.wbg.__wbg_setsize_7532844e2c9f5e10 = function(arg0, arg1) { getObject(arg0).size = arg1 >>> 0; }; - imports.wbg.__wbg_value_09d384cba1c51c6f = function(arg0, arg1) { + imports.wbg.__wbg_value_9423da9d988ee8cf = function(arg0, arg1) { const ret = getObject(arg1).value; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }; - imports.wbg.__wbg_setvalue_7605619324f70225 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_setvalue_1f95e61cbc382f7f = function(arg0, arg1, arg2) { getObject(arg0).value = getStringFromWasm0(arg1, arg2); }; - imports.wbg.__wbg_type_a7d16081cac0a25b = function(arg0, arg1) { - const ret = getObject(arg1).type; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len1; - getInt32Memory0()[arg0 / 4 + 0] = ptr1; - }; - imports.wbg.__wbg_clientX_7ffcce9d4cf5ed8f = function(arg0) { - const ret = getObject(arg0).clientX; + imports.wbg.__wbg_top_98ff0408c018d25e = function(arg0) { + const ret = getObject(arg0).top; return ret; }; - imports.wbg.__wbg_clientY_2340b057451d96fb = function(arg0) { - const ret = getObject(arg0).clientY; + imports.wbg.__wbg_left_23a613d619fb4206 = function(arg0) { + const ret = getObject(arg0).left; return ret; }; - imports.wbg.__wbg_ctrlKey_1c15f65d527fd45e = function(arg0) { - const ret = getObject(arg0).ctrlKey; - return ret; - }; - imports.wbg.__wbg_shiftKey_1a7bf1612681d447 = function(arg0) { - const ret = getObject(arg0).shiftKey; - return ret; - }; - imports.wbg.__wbg_metaKey_3c7419a9d32c95d1 = function(arg0) { - const ret = getObject(arg0).metaKey; - return ret; - }; - imports.wbg.__wbg_button_88e86c8fe3039068 = function(arg0) { - const ret = getObject(arg0).button; - return ret; - }; - imports.wbg.__wbg_instanceof_Response_7ade9a5a066d1a55 = function(arg0) { - let result; - try { - result = getObject(arg0) instanceof Response; - } catch { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_url_59cb32ef6a837521 = function(arg0, arg1) { - const ret = getObject(arg1).url; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len1; - getInt32Memory0()[arg0 / 4 + 0] = ptr1; - }; - imports.wbg.__wbg_status_d2b2d0889f7e970f = function(arg0) { - const ret = getObject(arg0).status; - return ret; - }; - imports.wbg.__wbg_ok_0a0ed9a1863d8af5 = function(arg0) { - const ret = getObject(arg0).ok; - return ret; - }; - imports.wbg.__wbg_statusText_3600c56ee3873605 = function(arg0, arg1) { - const ret = getObject(arg1).statusText; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len1; - getInt32Memory0()[arg0 / 4 + 0] = ptr1; - }; - imports.wbg.__wbg_headers_2de03c88f895093b = function(arg0) { - const ret = getObject(arg0).headers; + imports.wbg.__wbg_error_bd8f2b9a1955400c = function(arg0) { + const ret = getObject(arg0).error; return addHeapObject(ret); }; - imports.wbg.__wbg_arrayBuffer_2693673868da65b7 = function() { return handleError(function (arg0) { - const ret = getObject(arg0).arrayBuffer(); + imports.wbg.__wbg_setvoice_1cdf4f6a91b1cc6d = function(arg0, arg1) { + getObject(arg0).voice = getObject(arg1); + }; + imports.wbg.__wbg_setvolume_9ce6fa0115fb0261 = function(arg0, arg1) { + getObject(arg0).volume = arg1; + }; + imports.wbg.__wbg_setrate_3cb16d28a89a549c = function(arg0, arg1) { + getObject(arg0).rate = arg1; + }; + imports.wbg.__wbg_setpitch_8bf2e2409e1707df = function(arg0, arg1) { + getObject(arg0).pitch = arg1; + }; + imports.wbg.__wbg_setonstart_d67a423413afcc19 = function(arg0, arg1) { + getObject(arg0).onstart = getObject(arg1); + }; + imports.wbg.__wbg_setonend_d777c00af811a8d0 = function(arg0, arg1) { + getObject(arg0).onend = getObject(arg1); + }; + imports.wbg.__wbg_setonerror_3419fd51cfc38793 = function(arg0, arg1) { + getObject(arg0).onerror = getObject(arg1); + }; + imports.wbg.__wbg_newwithtext_7319093976235888 = function() { return handleError(function (arg0, arg1) { + const ret = new SpeechSynthesisUtterance(getStringFromWasm0(arg0, arg1)); return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_deltaX_0e9fe84a3998df5e = function(arg0) { - const ret = getObject(arg0).deltaX; + imports.wbg.__wbg_length_25c4aaeba8cfcc81 = function(arg0) { + const ret = getObject(arg0).length; return ret; }; - imports.wbg.__wbg_deltaY_c24e1c19542b4ba4 = function(arg0) { - const ret = getObject(arg0).deltaY; + imports.wbg.__wbg_item_59a092aa0f27eab6 = function(arg0, arg1) { + const ret = getObject(arg0).item(arg1 >>> 0); + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_get_d6c4e69528650af4 = function(arg0, arg1) { + const ret = getObject(arg0)[arg1 >>> 0]; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_width_e0c6b79d8cdd8897 = function(arg0) { + const ret = getObject(arg0).width; return ret; }; - imports.wbg.__wbg_deltaMode_998c8ea939f3998a = function(arg0) { - const ret = getObject(arg0).deltaMode; + imports.wbg.__wbg_height_bed51746e072a118 = function(arg0) { + const ret = getObject(arg0).height; return ret; }; - imports.wbg.__wbg_matches_de64b7bec89b21e4 = function(arg0) { + imports.wbg.__wbg_length_b941879633a63ad8 = function(arg0) { + const ret = getObject(arg0).length; + return ret; + }; + imports.wbg.__wbg_get_b383d7f8253c2d61 = function(arg0, arg1) { + const ret = getObject(arg0)[arg1 >>> 0]; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_matches_07c564b5b4101cf2 = function(arg0) { const ret = getObject(arg0).matches; return ret; }; - imports.wbg.__wbg_bindVertexArrayOES_edb665af84add641 = function(arg0, arg1) { + imports.wbg.__wbg_matches_0f7e350783b542c2 = function(arg0) { + const ret = getObject(arg0).matches; + return ret; + }; + imports.wbg.__wbg_bindVertexArrayOES_b7d9da7e073aa6b5 = function(arg0, arg1) { getObject(arg0).bindVertexArrayOES(getObject(arg1)); }; - imports.wbg.__wbg_createVertexArrayOES_72dc110fc4561db9 = function(arg0) { + imports.wbg.__wbg_createVertexArrayOES_6a3c3a5a68201f8f = function(arg0) { const ret = getObject(arg0).createVertexArrayOES(); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_deleteVertexArrayOES_bb2f05cfcd49a758 = function(arg0, arg1) { + imports.wbg.__wbg_deleteVertexArrayOES_7bf4589e63d84df6 = function(arg0, arg1) { getObject(arg0).deleteVertexArrayOES(getObject(arg1)); }; - imports.wbg.__wbg_voiceURI_1c374d1801636c26 = function(arg0, arg1) { - const ret = getObject(arg1).voiceURI; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len1; - getInt32Memory0()[arg0 / 4 + 0] = ptr1; + imports.wbg.__wbg_headers_b439dcff02e808e5 = function(arg0) { + const ret = getObject(arg0).headers; + return addHeapObject(ret); }; - imports.wbg.__wbg_name_b85b3a3d45d797bf = function(arg0, arg1) { - const ret = getObject(arg1).name; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len1; - getInt32Memory0()[arg0 / 4 + 0] = ptr1; - }; - imports.wbg.__wbg_lang_760dcdec80a6c745 = function(arg0, arg1) { - const ret = getObject(arg1).lang; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len1; - getInt32Memory0()[arg0 / 4 + 0] = ptr1; - }; - imports.wbg.__wbg_default_e1aa2046d76cda57 = function(arg0) { - const ret = getObject(arg0).default; + imports.wbg.__wbg_newwithstrandinit_cad5cd6038c7ff5d = function() { return handleError(function (arg0, arg1, arg2) { + const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_deltaX_84508d00a1050e70 = function(arg0) { + const ret = getObject(arg0).deltaX; return ret; }; - imports.wbg.__wbg_addEventListener_d25d1ffe6c69ae96 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3)); - }, arguments) }; - imports.wbg.__wbg_removeEventListener_7a381df5fdb6037f = function() { return handleError(function (arg0, arg1, arg2, arg3) { - getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3)); - }, arguments) }; - imports.wbg.__wbg_now_c97f243e7947c4ac = function(arg0) { + imports.wbg.__wbg_deltaY_64823169afb0335d = function(arg0) { + const ret = getObject(arg0).deltaY; + return ret; + }; + imports.wbg.__wbg_deltaMode_1c680147cfdba8a5 = function(arg0) { + const ret = getObject(arg0).deltaMode; + return ret; + }; + imports.wbg.__wbg_now_0cfdc90c97d0c24b = function(arg0) { const ret = getObject(arg0).now(); return ret; }; - imports.wbg.__wbg_writeText_f3c15480e7666d78 = function(arg0, arg1, arg2) { - const ret = getObject(arg0).writeText(getStringFromWasm0(arg1, arg2)); - return addHeapObject(ret); - }; - imports.wbg.__wbg_items_577e171b04c9aaa9 = function(arg0) { + imports.wbg.__wbg_items_0076326dc6f1b7eb = function(arg0) { const ret = getObject(arg0).items; return addHeapObject(ret); }; - imports.wbg.__wbg_files_7ce5634e8bc25a85 = function(arg0) { + imports.wbg.__wbg_files_e5c28ff6ab126f7b = function(arg0) { const ret = getObject(arg0).files; return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_getData_f586c0811a7ec1c4 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_getData_8aeca5994420c599 = function() { return handleError(function (arg0, arg1, arg2, arg3) { const ret = getObject(arg1).getData(getStringFromWasm0(arg2, arg3)); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; - imports.wbg.__wbg_dataTransfer_87da4b5e2c2e3bc4 = function(arg0) { - const ret = getObject(arg0).dataTransfer; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_instanceof_HtmlCanvasElement_b2dfeaf97587c9fa = function(arg0) { + imports.wbg.__wbg_instanceof_HtmlCanvasElement_da5f9efa0688cf6d = function(arg0) { let result; try { result = getObject(arg0) instanceof HTMLCanvasElement; @@ -1000,101 +908,137 @@ function __wbg_get_imports() { const ret = result; return ret; }; - imports.wbg.__wbg_width_b1f2559ce447b1d9 = function(arg0) { + imports.wbg.__wbg_width_2931aaedd21f1fff = function(arg0) { const ret = getObject(arg0).width; return ret; }; - imports.wbg.__wbg_setwidth_196f4382488fd119 = function(arg0, arg1) { + imports.wbg.__wbg_setwidth_a667a942dba6656e = function(arg0, arg1) { getObject(arg0).width = arg1 >>> 0; }; - imports.wbg.__wbg_height_0d9fffc5de313208 = function(arg0) { + imports.wbg.__wbg_height_0d36fbbeb60b0661 = function(arg0) { const ret = getObject(arg0).height; return ret; }; - imports.wbg.__wbg_setheight_6d295d03e1783969 = function(arg0, arg1) { + imports.wbg.__wbg_setheight_a747d440760fe5aa = function(arg0, arg1) { getObject(arg0).height = arg1 >>> 0; }; - imports.wbg.__wbg_getContext_24464d6344024525 = function() { return handleError(function (arg0, arg1, arg2) { + imports.wbg.__wbg_getContext_7c5944ea807bf5d3 = function() { return handleError(function (arg0, arg1, arg2) { const ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2)); return isLikeNone(ret) ? 0 : addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_matches_03fa716e6d77d76f = function(arg0) { - const ret = getObject(arg0).matches; + imports.wbg.__wbg_clipboard_47d5c6d7496034ae = function(arg0) { + const ret = getObject(arg0).clipboard; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_userAgent_2053026e2b1e0c7e = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg1).userAgent; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }, arguments) }; + imports.wbg.__wbg_writeText_9c0cc5145d005509 = function(arg0, arg1, arg2) { + const ret = getObject(arg0).writeText(getStringFromWasm0(arg1, arg2)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_addEventListener_5651108fc3ffeb6e = function() { return handleError(function (arg0, arg1, arg2, arg3) { + getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3)); + }, arguments) }; + imports.wbg.__wbg_removeEventListener_5de660c02ed784e4 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3)); + }, arguments) }; + imports.wbg.__wbg_clientX_1a480606ab0cabaa = function(arg0) { + const ret = getObject(arg0).clientX; return ret; }; - imports.wbg.__wbg_headers_1eff4f53324496e6 = function(arg0) { - const ret = getObject(arg0).headers; - return addHeapObject(ret); + imports.wbg.__wbg_clientY_9c7878f7faf3900f = function(arg0) { + const ret = getObject(arg0).clientY; + return ret; }; - imports.wbg.__wbg_newwithstrandinit_a4cd16dfaafcf625 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2)); - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_body_db30cc67afcfce41 = function(arg0) { + imports.wbg.__wbg_ctrlKey_0a805df688b5bf42 = function(arg0) { + const ret = getObject(arg0).ctrlKey; + return ret; + }; + imports.wbg.__wbg_shiftKey_8a070ab6169b5fa4 = function(arg0) { + const ret = getObject(arg0).shiftKey; + return ret; + }; + imports.wbg.__wbg_metaKey_d89287be4389a3c1 = function(arg0) { + const ret = getObject(arg0).metaKey; + return ret; + }; + imports.wbg.__wbg_button_7a095234b69de930 = function(arg0) { + const ret = getObject(arg0).button; + return ret; + }; + imports.wbg.__wbg_error_788ae33f81d3b84b = function(arg0) { + console.error(getObject(arg0)); + }; + imports.wbg.__wbg_body_674aec4c1c0910cd = function(arg0) { const ret = getObject(arg0).body; return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_createElement_d975e66d06bc88da = function() { return handleError(function (arg0, arg1, arg2) { + imports.wbg.__wbg_createElement_4891554b28d3388b = function() { return handleError(function (arg0, arg1, arg2) { const ret = getObject(arg0).createElement(getStringFromWasm0(arg1, arg2)); return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_getElementById_2d1ad15c49298068 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_getElementById_cc0e0d931b0d9a28 = function(arg0, arg1, arg2) { const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2)); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_setid_7b804eee26ac1f4c = function(arg0, arg1, arg2) { + imports.wbg.__wbg_setid_1984ee27e5075311 = function(arg0, arg1, arg2) { getObject(arg0).id = getStringFromWasm0(arg1, arg2); }; - imports.wbg.__wbg_scrollLeft_d414f3347b1709bf = function(arg0) { + imports.wbg.__wbg_scrollLeft_ea915614eac6bbeb = function(arg0) { const ret = getObject(arg0).scrollLeft; return ret; }; - imports.wbg.__wbg_clientWidth_28c68ca0ee754d86 = function(arg0) { + imports.wbg.__wbg_clientWidth_51ec21e3189f5656 = function(arg0) { const ret = getObject(arg0).clientWidth; return ret; }; - imports.wbg.__wbg_clientHeight_fdbd966f05f13573 = function(arg0) { + imports.wbg.__wbg_clientHeight_09ec0b524d59c367 = function(arg0) { const ret = getObject(arg0).clientHeight; return ret; }; - imports.wbg.__wbg_getBoundingClientRect_89e65d65040347e7 = function(arg0) { + imports.wbg.__wbg_getBoundingClientRect_ac9db8cf97ca8083 = function(arg0) { const ret = getObject(arg0).getBoundingClientRect(); return addHeapObject(ret); }; - imports.wbg.__wbg_scrollTop_073ecc1ed0e30723 = function(arg0) { + imports.wbg.__wbg_scrollTop_9e5ce77431551404 = function(arg0) { const ret = getObject(arg0).scrollTop; return ret; }; - imports.wbg.__wbg_hidden_6e9683fc743723b7 = function(arg0) { + imports.wbg.__wbg_hidden_736e60e4fd2d186b = function(arg0) { const ret = getObject(arg0).hidden; return ret; }; - imports.wbg.__wbg_sethidden_253d3f6b07efe62c = function(arg0, arg1) { + imports.wbg.__wbg_sethidden_0cbfa2481b57c377 = function(arg0, arg1) { getObject(arg0).hidden = arg1 !== 0; }; - imports.wbg.__wbg_style_6bc91a563e84d432 = function(arg0) { + imports.wbg.__wbg_style_3801009b2339aa94 = function(arg0) { const ret = getObject(arg0).style; return addHeapObject(ret); }; - imports.wbg.__wbg_offsetTop_19bb0e1c142f9499 = function(arg0) { + imports.wbg.__wbg_offsetTop_815aa9ab53b3cf18 = function(arg0) { const ret = getObject(arg0).offsetTop; return ret; }; - imports.wbg.__wbg_offsetLeft_677c5033ce585ad4 = function(arg0) { + imports.wbg.__wbg_offsetLeft_3b7ae7e9baa5358a = function(arg0) { const ret = getObject(arg0).offsetLeft; return ret; }; - imports.wbg.__wbg_offsetWidth_20880536c835f478 = function(arg0) { + imports.wbg.__wbg_offsetWidth_4e9930121c69297f = function(arg0) { const ret = getObject(arg0).offsetWidth; return ret; }; - imports.wbg.__wbg_blur_c2d062c40054c68d = function() { return handleError(function (arg0) { + imports.wbg.__wbg_blur_53431c003c82bf53 = function() { return handleError(function (arg0) { getObject(arg0).blur(); }, arguments) }; - imports.wbg.__wbg_focus_6baebc9f44af9925 = function() { return handleError(function (arg0) { + imports.wbg.__wbg_focus_dbcbbbb2a04c0e1f = function() { return handleError(function (arg0) { getObject(arg0).focus(); }, arguments) }; - imports.wbg.__wbg_instanceof_WebGlRenderingContext_e1419556cd2b2d2d = function(arg0) { + imports.wbg.__wbg_instanceof_WebGlRenderingContext_ea632546035eecb1 = function(arg0) { let result; try { result = getObject(arg0) instanceof WebGLRenderingContext; @@ -1104,384 +1048,454 @@ function __wbg_get_imports() { const ret = result; return ret; }; - imports.wbg.__wbg_bufferData_bf07fdd88f2e61a0 = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_bufferData_a11a9f65f31e7256 = function(arg0, arg1, arg2, arg3) { getObject(arg0).bufferData(arg1 >>> 0, getObject(arg2), arg3 >>> 0); }; - imports.wbg.__wbg_texImage2D_b23cc3496d4c8934 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + imports.wbg.__wbg_texImage2D_6175916e58c59bc7 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { getObject(arg0).texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, getObject(arg9)); }, arguments) }; - imports.wbg.__wbg_texSubImage2D_3393b2faf4bdeda7 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { + imports.wbg.__wbg_texSubImage2D_f1a31f8045b7f831 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { getObject(arg0).texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, getObject(arg9)); }, arguments) }; - imports.wbg.__wbg_activeTexture_b191924c363f77ce = function(arg0, arg1) { + imports.wbg.__wbg_activeTexture_93b4de60af07da9c = function(arg0, arg1) { getObject(arg0).activeTexture(arg1 >>> 0); }; - imports.wbg.__wbg_attachShader_c6ba0e94024fcfd3 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_attachShader_b65b695055670cb5 = function(arg0, arg1, arg2) { getObject(arg0).attachShader(getObject(arg1), getObject(arg2)); }; - imports.wbg.__wbg_bindBuffer_bc746e5757cfd27a = function(arg0, arg1, arg2) { + imports.wbg.__wbg_bindBuffer_313561e5bc0e533f = function(arg0, arg1, arg2) { getObject(arg0).bindBuffer(arg1 >>> 0, getObject(arg2)); }; - imports.wbg.__wbg_bindTexture_003e92d5bd3d1cc7 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_bindTexture_9cb5c770d1ba2cca = function(arg0, arg1, arg2) { getObject(arg0).bindTexture(arg1 >>> 0, getObject(arg2)); }; - imports.wbg.__wbg_blendEquationSeparate_c22d96f84170b893 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_blendEquationSeparate_7ec5e34f066e44f8 = function(arg0, arg1, arg2) { getObject(arg0).blendEquationSeparate(arg1 >>> 0, arg2 >>> 0); }; - imports.wbg.__wbg_blendFuncSeparate_060a21922823f86f = function(arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_blendFuncSeparate_7547ade0a7dfade2 = function(arg0, arg1, arg2, arg3, arg4) { getObject(arg0).blendFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); }; - imports.wbg.__wbg_clear_0fbd94f2b3007978 = function(arg0, arg1) { + imports.wbg.__wbg_clear_2ccea1f65b510c97 = function(arg0, arg1) { getObject(arg0).clear(arg1 >>> 0); }; - imports.wbg.__wbg_clearColor_a72825467905e9d1 = function(arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_clearColor_de587608b28bc7ed = function(arg0, arg1, arg2, arg3, arg4) { getObject(arg0).clearColor(arg1, arg2, arg3, arg4); }; - imports.wbg.__wbg_colorMask_8154d2f1a5eb697a = function(arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_colorMask_7cbd7a102954ede9 = function(arg0, arg1, arg2, arg3, arg4) { getObject(arg0).colorMask(arg1 !== 0, arg2 !== 0, arg3 !== 0, arg4 !== 0); }; - imports.wbg.__wbg_compileShader_11deea085b781c35 = function(arg0, arg1) { + imports.wbg.__wbg_compileShader_d88d0a8cd9b72b4d = function(arg0, arg1) { getObject(arg0).compileShader(getObject(arg1)); }; - imports.wbg.__wbg_createBuffer_d90b963a9701a002 = function(arg0) { + imports.wbg.__wbg_createBuffer_59051f4461e7c5e2 = function(arg0) { const ret = getObject(arg0).createBuffer(); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_createProgram_d78c1ab5ce988d0a = function(arg0) { + imports.wbg.__wbg_createProgram_88dbe21c0b682e1a = function(arg0) { const ret = getObject(arg0).createProgram(); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_createShader_94cce4c7315d3927 = function(arg0, arg1) { + imports.wbg.__wbg_createShader_9d7d388633caad18 = function(arg0, arg1) { const ret = getObject(arg0).createShader(arg1 >>> 0); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_createTexture_ae9908092d6ebd13 = function(arg0) { + imports.wbg.__wbg_createTexture_9d0bb4d741b8ad76 = function(arg0) { const ret = getObject(arg0).createTexture(); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_deleteBuffer_10e438f4de8bbdd0 = function(arg0, arg1) { + imports.wbg.__wbg_deleteBuffer_cdc6b9c73f54aff7 = function(arg0, arg1) { getObject(arg0).deleteBuffer(getObject(arg1)); }; - imports.wbg.__wbg_deleteProgram_71b202b504e08521 = function(arg0, arg1) { + imports.wbg.__wbg_deleteProgram_d8d7fc79ba83b256 = function(arg0, arg1) { getObject(arg0).deleteProgram(getObject(arg1)); }; - imports.wbg.__wbg_deleteShader_91b6949c2cb57fa5 = function(arg0, arg1) { + imports.wbg.__wbg_deleteShader_9a2f85efe5cb3706 = function(arg0, arg1) { getObject(arg0).deleteShader(getObject(arg1)); }; - imports.wbg.__wbg_deleteTexture_89b7cefee5715eaf = function(arg0, arg1) { + imports.wbg.__wbg_deleteTexture_a883356c5034d482 = function(arg0, arg1) { getObject(arg0).deleteTexture(getObject(arg1)); }; - imports.wbg.__wbg_detachShader_619bf2d58c955ff2 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_detachShader_a047ade0450ff0bf = function(arg0, arg1, arg2) { getObject(arg0).detachShader(getObject(arg1), getObject(arg2)); }; - imports.wbg.__wbg_disable_18e601ffe079514a = function(arg0, arg1) { + imports.wbg.__wbg_disable_5cf2070641fa2ed7 = function(arg0, arg1) { getObject(arg0).disable(arg1 >>> 0); }; - imports.wbg.__wbg_disableVertexAttribArray_eebd7bbc31fe8477 = function(arg0, arg1) { + imports.wbg.__wbg_disableVertexAttribArray_8dacd44e21adcaa2 = function(arg0, arg1) { getObject(arg0).disableVertexAttribArray(arg1 >>> 0); }; - imports.wbg.__wbg_drawArrays_fa797947fad0d5a1 = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_drawArrays_d5c7dc2b2376c85a = function(arg0, arg1, arg2, arg3) { getObject(arg0).drawArrays(arg1 >>> 0, arg2, arg3); }; - imports.wbg.__wbg_drawElements_f61f3169f51e95a8 = function(arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_drawElements_3316ee0cd1117c2a = function(arg0, arg1, arg2, arg3, arg4) { getObject(arg0).drawElements(arg1 >>> 0, arg2, arg3 >>> 0, arg4); }; - imports.wbg.__wbg_enable_933052fc623337dd = function(arg0, arg1) { + imports.wbg.__wbg_enable_8965e69c596f0a94 = function(arg0, arg1) { getObject(arg0).enable(arg1 >>> 0); }; - imports.wbg.__wbg_enableVertexAttribArray_085d700612de8362 = function(arg0, arg1) { + imports.wbg.__wbg_enableVertexAttribArray_2b0475db43533cf2 = function(arg0, arg1) { getObject(arg0).enableVertexAttribArray(arg1 >>> 0); }; - imports.wbg.__wbg_getAttribLocation_019759a318602415 = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_getAttribLocation_a5a98d5272b01c0d = function(arg0, arg1, arg2, arg3) { const ret = getObject(arg0).getAttribLocation(getObject(arg1), getStringFromWasm0(arg2, arg3)); return ret; }; - imports.wbg.__wbg_getError_ffde7e40a0075b63 = function(arg0) { + imports.wbg.__wbg_getError_1e5ec1ec9e58b323 = function(arg0) { const ret = getObject(arg0).getError(); return ret; }; - imports.wbg.__wbg_getExtension_ffc1bd6e864d6abe = function() { return handleError(function (arg0, arg1, arg2) { + imports.wbg.__wbg_getExtension_088d115a16ecbd7d = function() { return handleError(function (arg0, arg1, arg2) { const ret = getObject(arg0).getExtension(getStringFromWasm0(arg1, arg2)); return isLikeNone(ret) ? 0 : addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_getParameter_211f7166414ae1d2 = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_getParameter_bfab7f0b00c9d7fb = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg0).getParameter(arg1 >>> 0); return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_getProgramInfoLog_e9101bb2902f723d = function(arg0, arg1, arg2) { + imports.wbg.__wbg_getProgramInfoLog_0b7af4ad85fa52a4 = function(arg0, arg1, arg2) { const ret = getObject(arg1).getProgramInfoLog(getObject(arg2)); var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }; - imports.wbg.__wbg_getProgramParameter_2b03f89296b12b4b = function(arg0, arg1, arg2) { + imports.wbg.__wbg_getProgramParameter_2a3735278367f8bc = function(arg0, arg1, arg2) { const ret = getObject(arg0).getProgramParameter(getObject(arg1), arg2 >>> 0); return addHeapObject(ret); }; - imports.wbg.__wbg_getShaderInfoLog_311c033a58aeed83 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_getShaderInfoLog_979aafa403ffb252 = function(arg0, arg1, arg2) { const ret = getObject(arg1).getShaderInfoLog(getObject(arg2)); var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }; - imports.wbg.__wbg_getShaderParameter_0003e598f392b3f6 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_getShaderParameter_e8054f1d9026fb70 = function(arg0, arg1, arg2) { const ret = getObject(arg0).getShaderParameter(getObject(arg1), arg2 >>> 0); return addHeapObject(ret); }; - imports.wbg.__wbg_getSupportedExtensions_642c7d68066b573c = function(arg0) { + imports.wbg.__wbg_getSupportedExtensions_4eb3a5f14f552ce5 = function(arg0) { const ret = getObject(arg0).getSupportedExtensions(); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_getUniformLocation_90a9c5e63646d30f = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_getUniformLocation_688976233799a45a = function(arg0, arg1, arg2, arg3) { const ret = getObject(arg0).getUniformLocation(getObject(arg1), getStringFromWasm0(arg2, arg3)); return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_linkProgram_12cc552bbaf3fcd8 = function(arg0, arg1) { + imports.wbg.__wbg_linkProgram_9a2d12d120d99917 = function(arg0, arg1) { getObject(arg0).linkProgram(getObject(arg1)); }; - imports.wbg.__wbg_pixelStorei_673b59ca3de9bf71 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_pixelStorei_5ec932ebefd00149 = function(arg0, arg1, arg2) { getObject(arg0).pixelStorei(arg1 >>> 0, arg2); }; - imports.wbg.__wbg_scissor_d6dd0b6d33070a27 = function(arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_scissor_c8ec3b1e053f3756 = function(arg0, arg1, arg2, arg3, arg4) { getObject(arg0).scissor(arg1, arg2, arg3, arg4); }; - imports.wbg.__wbg_shaderSource_be3c868a31ce0a63 = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_shaderSource_f435f9b74440bb54 = function(arg0, arg1, arg2, arg3) { getObject(arg0).shaderSource(getObject(arg1), getStringFromWasm0(arg2, arg3)); }; - imports.wbg.__wbg_texParameteri_8a613af30322a029 = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_texParameteri_1f17358e51eb8069 = function(arg0, arg1, arg2, arg3) { getObject(arg0).texParameteri(arg1 >>> 0, arg2 >>> 0, arg3); }; - imports.wbg.__wbg_uniform1f_47b794fe461d672a = function(arg0, arg1, arg2) { + imports.wbg.__wbg_uniform1f_7586c5e17ad254c9 = function(arg0, arg1, arg2) { getObject(arg0).uniform1f(getObject(arg1), arg2); }; - imports.wbg.__wbg_uniform1i_eb9e0e57747e2b87 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_uniform1i_9f94ef0ba6b3cc66 = function(arg0, arg1, arg2) { getObject(arg0).uniform1i(getObject(arg1), arg2); }; - imports.wbg.__wbg_uniform2f_75d4cb678b6f0e13 = function(arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_uniform2f_69ee217590f07278 = function(arg0, arg1, arg2, arg3) { getObject(arg0).uniform2f(getObject(arg1), arg2, arg3); }; - imports.wbg.__wbg_useProgram_72ab2082025590d6 = function(arg0, arg1) { + imports.wbg.__wbg_useProgram_019eb6df066fabf5 = function(arg0, arg1) { getObject(arg0).useProgram(getObject(arg1)); }; - imports.wbg.__wbg_vertexAttribPointer_39284763b38d2a03 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { + imports.wbg.__wbg_vertexAttribPointer_ca11984ee8843c0a = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { getObject(arg0).vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6); }; - imports.wbg.__wbg_viewport_d7c73a71f08f3aa1 = function(arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_viewport_6ebef187c89e2616 = function(arg0, arg1, arg2, arg3, arg4) { getObject(arg0).viewport(arg1, arg2, arg3, arg4); }; - imports.wbg.__wbg_length_bff46949c967d66a = function(arg0) { + imports.wbg.__wbg_length_dd2eb44022569c32 = function(arg0) { const ret = getObject(arg0).length; return ret; }; - imports.wbg.__wbg_get_277c616d81e49f73 = function(arg0, arg1) { + imports.wbg.__wbg_get_135f0a95f49ed3ff = function(arg0, arg1) { const ret = getObject(arg0)[arg1 >>> 0]; return isLikeNone(ret) ? 0 : addHeapObject(ret); }; - imports.wbg.__wbg_name_ae233a503e60a8f9 = function(arg0, arg1) { + imports.wbg.__wbg_name_a46b2d975591a0b3 = function(arg0, arg1) { const ret = getObject(arg1).name; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }; - imports.wbg.__wbg_lastModified_75062097476be87c = function(arg0) { + imports.wbg.__wbg_lastModified_711034410dfc02ad = function(arg0) { const ret = getObject(arg0).lastModified; return ret; }; - imports.wbg.__wbg_keyCode_48193538ac21d5a4 = function(arg0) { + imports.wbg.__wbg_keyCode_dfa86be31f5ef90c = function(arg0) { const ret = getObject(arg0).keyCode; return ret; }; - imports.wbg.__wbg_altKey_1796184c5e96a92b = function(arg0) { + imports.wbg.__wbg_altKey_612289acf855835c = function(arg0) { const ret = getObject(arg0).altKey; return ret; }; - imports.wbg.__wbg_ctrlKey_a6ae383772af67d4 = function(arg0) { + imports.wbg.__wbg_ctrlKey_582686fb2263dd3c = function(arg0) { const ret = getObject(arg0).ctrlKey; return ret; }; - imports.wbg.__wbg_shiftKey_0b1fd10d0674f847 = function(arg0) { + imports.wbg.__wbg_shiftKey_48e8701355d8e2d4 = function(arg0) { const ret = getObject(arg0).shiftKey; return ret; }; - imports.wbg.__wbg_metaKey_e6e67f783888f56d = function(arg0) { + imports.wbg.__wbg_metaKey_43193b7cc99f8914 = function(arg0) { const ret = getObject(arg0).metaKey; return ret; }; - imports.wbg.__wbg_isComposing_11821d1699a0901e = function(arg0) { + imports.wbg.__wbg_isComposing_f41d219def91d438 = function(arg0) { const ret = getObject(arg0).isComposing; return ret; }; - imports.wbg.__wbg_key_2e1ec0c70a342064 = function(arg0, arg1) { + imports.wbg.__wbg_key_8aeaa079126a9cc7 = function(arg0, arg1) { const ret = getObject(arg1).key; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }; - imports.wbg.__wbg_clipboard_4685056afb1bd02b = function(arg0) { - const ret = getObject(arg0).clipboard; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_userAgent_cda809ba30048ef3 = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg1).userAgent; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len1; - getInt32Memory0()[arg0 / 4 + 0] = ptr1; - }, arguments) }; - imports.wbg.__wbg_speaking_e166a6e6cd16926d = function(arg0) { - const ret = getObject(arg0).speaking; - return ret; - }; - imports.wbg.__wbg_cancel_2fd875e685342a41 = function(arg0) { - getObject(arg0).cancel(); - }; - imports.wbg.__wbg_getVoices_769c317b57ab4d62 = function(arg0) { - const ret = getObject(arg0).getVoices(); - return addHeapObject(ret); - }; - imports.wbg.__wbg_speak_79ff59113028b505 = function(arg0, arg1) { - getObject(arg0).speak(getObject(arg1)); - }; - imports.wbg.__wbg_identifier_bcd0d7d8565303c9 = function(arg0) { - const ret = getObject(arg0).identifier; - return ret; - }; - imports.wbg.__wbg_pageX_da46b41c74531c31 = function(arg0) { - const ret = getObject(arg0).pageX; - return ret; - }; - imports.wbg.__wbg_pageY_1a5658948b63f9ed = function(arg0) { - const ret = getObject(arg0).pageY; - return ret; - }; - imports.wbg.__wbg_force_77bad74f81971385 = function(arg0) { - const ret = getObject(arg0).force; - return ret; - }; - imports.wbg.__wbg_clipboardData_84b041aaf1dd9a2c = function(arg0) { - const ret = getObject(arg0).clipboardData; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_preventDefault_2f38e1471796356f = function(arg0) { - getObject(arg0).preventDefault(); - }; - imports.wbg.__wbg_stopPropagation_5df9f972a70ef515 = function(arg0) { - getObject(arg0).stopPropagation(); - }; - imports.wbg.__wbg_parentElement_065722829508e41a = function(arg0) { - const ret = getObject(arg0).parentElement; - return isLikeNone(ret) ? 0 : addHeapObject(ret); - }; - imports.wbg.__wbg_appendChild_1139b53a65d69bed = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg0).appendChild(getObject(arg1)); - return addHeapObject(ret); - }, arguments) }; - imports.wbg.__wbg_touches_08fba6286bed8021 = function(arg0) { - const ret = getObject(arg0).touches; - return addHeapObject(ret); - }; - imports.wbg.__wbg_changedTouches_0e21b77cd9200e74 = function(arg0) { - const ret = getObject(arg0).changedTouches; - return addHeapObject(ret); - }; - imports.wbg.__wbg_size_a058ca48cf388fd6 = function(arg0) { - const ret = getObject(arg0).size; - return ret; - }; - imports.wbg.__wbg_arrayBuffer_932c610fd9598bef = function(arg0) { - const ret = getObject(arg0).arrayBuffer(); - return addHeapObject(ret); - }; - imports.wbg.__wbg_data_64c5449b2adfdff6 = function(arg0, arg1) { - const ret = getObject(arg1).data; - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len1; - getInt32Memory0()[arg0 / 4 + 0] = ptr1; - }; - imports.wbg.__wbg_top_7f927afdb53442c3 = function(arg0) { - const ret = getObject(arg0).top; - return ret; - }; - imports.wbg.__wbg_left_d363f2200ca7bca7 = function(arg0) { - const ret = getObject(arg0).left; - return ret; - }; - imports.wbg.__wbg_href_68df54cac0a34be4 = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_href_d62a28e4fc1ab948 = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg1).href; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; - imports.wbg.__wbg_origin_ab6836ac8535fbb2 = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_origin_50aa482fa6784a0a = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg1).origin; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; - imports.wbg.__wbg_protocol_68c51e1c422d4ab9 = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_protocol_91948f5885595359 = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg1).protocol; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; - imports.wbg.__wbg_host_e72469b40dce950f = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_host_15090f3de0544fea = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg1).host; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; - imports.wbg.__wbg_hostname_d253c57e7fa779ea = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_hostname_b77e5e70d6ff6236 = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg1).hostname; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; - imports.wbg.__wbg_port_33d51963fa5f980d = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_port_1b2b1249cacfca76 = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg1).port; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; - imports.wbg.__wbg_search_41ecfaf18d054732 = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_search_6c3c472e076ee010 = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg1).search; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; - imports.wbg.__wbg_hash_afd040db1cf05017 = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_hash_a1a795b89dda8e3d = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg1).hash; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; - imports.wbg.__wbg_getItem_84095995ffbc84fc = function() { return handleError(function (arg0, arg1, arg2, arg3) { + imports.wbg.__wbg_speaking_f518bada6d9d9beb = function(arg0) { + const ret = getObject(arg0).speaking; + return ret; + }; + imports.wbg.__wbg_cancel_5e5d3ec8238c4c1b = function(arg0) { + getObject(arg0).cancel(); + }; + imports.wbg.__wbg_getVoices_c24bab8ed59e417e = function(arg0) { + const ret = getObject(arg0).getVoices(); + return addHeapObject(ret); + }; + imports.wbg.__wbg_speak_c5dda9a5a88d036d = function(arg0, arg1) { + getObject(arg0).speak(getObject(arg1)); + }; + imports.wbg.__wbg_clipboardData_c480a3b34e3e7b1d = function(arg0) { + const ret = getObject(arg0).clipboardData; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_setProperty_b95ef63ab852879e = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + getObject(arg0).setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); + }, arguments) }; + imports.wbg.__wbg_preventDefault_24104f3f0a54546a = function(arg0) { + getObject(arg0).preventDefault(); + }; + imports.wbg.__wbg_stopPropagation_55539cfa2506c867 = function(arg0) { + getObject(arg0).stopPropagation(); + }; + imports.wbg.__wbg_parentElement_c75962bc9997ea5f = function(arg0) { + const ret = getObject(arg0).parentElement; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_appendChild_51339d4cde00ee22 = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).appendChild(getObject(arg1)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_identifier_da93d3d09ccdc54c = function(arg0) { + const ret = getObject(arg0).identifier; + return ret; + }; + imports.wbg.__wbg_pageX_8e76f76ea9375a85 = function(arg0) { + const ret = getObject(arg0).pageX; + return ret; + }; + imports.wbg.__wbg_pageY_a5a407b52fe202e7 = function(arg0) { + const ret = getObject(arg0).pageY; + return ret; + }; + imports.wbg.__wbg_force_4dd0ab6e9ef993ec = function(arg0) { + const ret = getObject(arg0).force; + return ret; + }; + imports.wbg.__wbg_data_03708a776af7d2f6 = function(arg0, arg1) { + const ret = getObject(arg1).data; + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_dataTransfer_bac494821ce31837 = function(arg0) { + const ret = getObject(arg0).dataTransfer; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_voiceURI_64621a744591aba3 = function(arg0, arg1) { + const ret = getObject(arg1).voiceURI; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_name_0429be7b00828d24 = function(arg0, arg1) { + const ret = getObject(arg1).name; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_lang_3a66cb1ce82d3781 = function(arg0, arg1) { + const ret = getObject(arg1).lang; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_default_d943dbf9175dc6cd = function(arg0) { + const ret = getObject(arg0).default; + return ret; + }; + imports.wbg.__wbg_touches_8338f31b10bd7975 = function(arg0) { + const ret = getObject(arg0).touches; + return addHeapObject(ret); + }; + imports.wbg.__wbg_changedTouches_60ab7fa55837664f = function(arg0) { + const ret = getObject(arg0).changedTouches; + return addHeapObject(ret); + }; + imports.wbg.__wbg_size_b9bc39a333bd5d88 = function(arg0) { + const ret = getObject(arg0).size; + return ret; + }; + imports.wbg.__wbg_type_8b3fde044d705ef3 = function(arg0, arg1) { + const ret = getObject(arg1).type; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_arrayBuffer_27cefaea55cbf063 = function(arg0) { + const ret = getObject(arg0).arrayBuffer(); + return addHeapObject(ret); + }; + imports.wbg.__wbg_type_9f716e985ca0633c = function(arg0, arg1) { + const ret = getObject(arg1).type; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_set_b34caba58723c454 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); + }, arguments) }; + imports.wbg.__wbg_instanceof_Response_fc4327dbfcdf5ced = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof Response; + } catch { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_url_8503de97f69da463 = function(arg0, arg1) { + const ret = getObject(arg1).url; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_status_ac85a3142a84caa2 = function(arg0) { + const ret = getObject(arg0).status; + return ret; + }; + imports.wbg.__wbg_ok_e3d8d84e630fd064 = function(arg0) { + const ret = getObject(arg0).ok; + return ret; + }; + imports.wbg.__wbg_statusText_1dd32f6c94d79ef0 = function(arg0, arg1) { + const ret = getObject(arg1).statusText; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_headers_b70de86b8e989bc0 = function(arg0) { + const ret = getObject(arg0).headers; + return addHeapObject(ret); + }; + imports.wbg.__wbg_arrayBuffer_288fb3538806e85c = function() { return handleError(function (arg0) { + const ret = getObject(arg0).arrayBuffer(); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_getItem_ed8e218e51f1efeb = function() { return handleError(function (arg0, arg1, arg2, arg3) { const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3)); var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; - imports.wbg.__wbg_setItem_e9a65f0e6892d9c9 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + imports.wbg.__wbg_setItem_d002ee486462bfff = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); }, arguments) }; - imports.wbg.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) { + imports.wbg.__wbg_get_44be0491f933a435 = function(arg0, arg1) { const ret = getObject(arg0)[arg1 >>> 0]; return addHeapObject(ret); }; - imports.wbg.__wbg_length_820c786973abdd8a = function(arg0) { + imports.wbg.__wbg_length_fff51ee6522a1a18 = function(arg0) { const ret = getObject(arg0).length; return ret; }; @@ -1489,7 +1503,7 @@ function __wbg_get_imports() { const ret = typeof(getObject(arg0)) === 'function'; return ret; }; - imports.wbg.__wbg_newnoargs_c9e6043b8ad84109 = function(arg0, arg1) { + imports.wbg.__wbg_newnoargs_581967eacc0e2604 = function(arg0, arg1) { const ret = new Function(getStringFromWasm0(arg0, arg1)); return addHeapObject(ret); }; @@ -1498,51 +1512,51 @@ function __wbg_get_imports() { const ret = typeof(val) === 'object' && val !== null; return ret; }; - imports.wbg.__wbg_next_f4bc0e96ea67da68 = function(arg0) { + imports.wbg.__wbg_next_526fc47e980da008 = function(arg0) { const ret = getObject(arg0).next; return addHeapObject(ret); }; - imports.wbg.__wbg_next_ec061e48a0e72a96 = function() { return handleError(function (arg0) { + imports.wbg.__wbg_next_ddb3312ca1c4e32a = function() { return handleError(function (arg0) { const ret = getObject(arg0).next(); return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_done_b6abb27d42b63867 = function(arg0) { + imports.wbg.__wbg_done_5c1f01fb660d73b5 = function(arg0) { const ret = getObject(arg0).done; return ret; }; - imports.wbg.__wbg_value_2f4ef2036bfad28e = function(arg0) { + imports.wbg.__wbg_value_1695675138684bd5 = function(arg0) { const ret = getObject(arg0).value; return addHeapObject(ret); }; - imports.wbg.__wbg_iterator_7c7e58f62eb84700 = function() { + imports.wbg.__wbg_iterator_97f0c81209c6c35a = function() { const ret = Symbol.iterator; return addHeapObject(ret); }; - imports.wbg.__wbg_get_f53c921291c381bd = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_get_97b561fb56f034b5 = function() { return handleError(function (arg0, arg1) { const ret = Reflect.get(getObject(arg0), getObject(arg1)); return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_call_557a2f2deacc4912 = function() { return handleError(function (arg0, arg1) { + imports.wbg.__wbg_call_cb65541d95d71282 = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg0).call(getObject(arg1)); return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_new_2b6fea4ea03b1b95 = function() { + imports.wbg.__wbg_new_b51585de1b234aff = function() { const ret = new Object(); return addHeapObject(ret); }; - imports.wbg.__wbg_self_742dd6eab3e9211e = function() { return handleError(function () { + imports.wbg.__wbg_self_1ff1d729e9aae938 = function() { return handleError(function () { const ret = self.self; return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_window_c409e731db53a0e2 = function() { return handleError(function () { + imports.wbg.__wbg_window_5f4faef6c12b79ec = function() { return handleError(function () { const ret = window.window; return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_globalThis_b70c095388441f2d = function() { return handleError(function () { + imports.wbg.__wbg_globalThis_1d39714405582d3c = function() { return handleError(function () { const ret = globalThis.globalThis; return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_global_1c72617491ed7194 = function() { return handleError(function () { + imports.wbg.__wbg_global_651f05c6a0944d1c = function() { return handleError(function () { const ret = global.global; return addHeapObject(ret); }, arguments) }; @@ -1550,30 +1564,44 @@ function __wbg_get_imports() { const ret = getObject(arg0) === undefined; return ret; }; - imports.wbg.__wbg_call_587b30eea3e09332 = function() { return handleError(function (arg0, arg1, arg2) { + imports.wbg.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) { const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); return addHeapObject(ret); }, arguments) }; - imports.wbg.__wbg_getTime_40bd09e020e8bc8c = function(arg0) { + imports.wbg.__wbg_getTime_5e2054f832d82ec9 = function(arg0) { const ret = getObject(arg0).getTime(); return ret; }; - imports.wbg.__wbg_getTimezoneOffset_884011df4eb8cabc = function(arg0) { + imports.wbg.__wbg_getTimezoneOffset_8aee3445f323973e = function(arg0) { const ret = getObject(arg0).getTimezoneOffset(); return ret; }; - imports.wbg.__wbg_new0_494c19a27871d56f = function() { + imports.wbg.__wbg_new_cd59bfc8881f487b = function(arg0) { + const ret = new Date(getObject(arg0)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_new0_c0be7df4b6bd481f = function() { const ret = new Date(); return addHeapObject(ret); }; - imports.wbg.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) { + imports.wbg.__wbg_instanceof_TypeError_6ad728101212de55 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof TypeError; + } catch { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_new_43f1b47c28813cbd = function(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { - return __wbg_adapter_580(a, state0.b, arg0, arg1); + return __wbg_adapter_590(a, state0.b, arg0, arg1); } finally { state0.a = a; } @@ -1584,62 +1612,62 @@ function __wbg_get_imports() { state0.a = state0.b = 0; } }; - imports.wbg.__wbg_resolve_ae38ad63c43ff98b = function(arg0) { + imports.wbg.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) { const ret = Promise.resolve(getObject(arg0)); return addHeapObject(ret); }; - imports.wbg.__wbg_then_8df675b8bb5d5e3c = function(arg0, arg1) { + imports.wbg.__wbg_then_f7e06ee3c11698eb = function(arg0, arg1) { const ret = getObject(arg0).then(getObject(arg1)); return addHeapObject(ret); }; - imports.wbg.__wbg_then_835b073a479138e5 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_then_b2267541e2a73865 = function(arg0, arg1, arg2) { const ret = getObject(arg0).then(getObject(arg1), getObject(arg2)); return addHeapObject(ret); }; - imports.wbg.__wbg_buffer_55ba7a6b1b92e2ac = function(arg0) { + imports.wbg.__wbg_buffer_085ec1f694018c4f = function(arg0) { const ret = getObject(arg0).buffer; return addHeapObject(ret); }; - imports.wbg.__wbg_newwithbyteoffsetandlength_abbb764f85f16b6b = function(arg0, arg1, arg2) { + imports.wbg.__wbg_newwithbyteoffsetandlength_828b952f0e692245 = function(arg0, arg1, arg2) { const ret = new Int8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); return addHeapObject(ret); }; - imports.wbg.__wbg_newwithbyteoffsetandlength_6889cd5c48bfda26 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_newwithbyteoffsetandlength_735ed5ea2ae07fe9 = function(arg0, arg1, arg2) { const ret = new Int16Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); return addHeapObject(ret); }; - imports.wbg.__wbg_newwithbyteoffsetandlength_23602c96f86e952a = function(arg0, arg1, arg2) { + imports.wbg.__wbg_newwithbyteoffsetandlength_9f43b22ab631d1d6 = function(arg0, arg1, arg2) { const ret = new Int32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); return addHeapObject(ret); }; - imports.wbg.__wbg_newwithbyteoffsetandlength_88d1d8be5df94b9b = function(arg0, arg1, arg2) { + imports.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function(arg0, arg1, arg2) { const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); return addHeapObject(ret); }; - imports.wbg.__wbg_new_09938a7d020f049b = function(arg0) { + imports.wbg.__wbg_new_8125e318e6245eed = function(arg0) { const ret = new Uint8Array(getObject(arg0)); return addHeapObject(ret); }; - imports.wbg.__wbg_set_3698e3ca519b3c3c = function(arg0, arg1, arg2) { + imports.wbg.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) { getObject(arg0).set(getObject(arg1), arg2 >>> 0); }; - imports.wbg.__wbg_length_0aab7ffd65ad19ed = function(arg0) { + imports.wbg.__wbg_length_72e2208bbc0efc61 = function(arg0) { const ret = getObject(arg0).length; return ret; }; - imports.wbg.__wbg_newwithbyteoffsetandlength_051cff28f608b6cb = function(arg0, arg1, arg2) { + imports.wbg.__wbg_newwithbyteoffsetandlength_31ff1024ef0c63c7 = function(arg0, arg1, arg2) { const ret = new Uint16Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); return addHeapObject(ret); }; - imports.wbg.__wbg_newwithbyteoffsetandlength_fae0a69639559788 = function(arg0, arg1, arg2) { + imports.wbg.__wbg_newwithbyteoffsetandlength_6df0e8c3efd2a5d3 = function(arg0, arg1, arg2) { const ret = new Uint32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); return addHeapObject(ret); }; - imports.wbg.__wbg_newwithbyteoffsetandlength_ab5b524f83702d8d = function(arg0, arg1, arg2) { + imports.wbg.__wbg_newwithbyteoffsetandlength_69193e31c844b792 = function(arg0, arg1, arg2) { const ret = new Float32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); return addHeapObject(ret); }; - imports.wbg.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) { + imports.wbg.__wbg_set_092e06b0f9d71865 = function() { return handleError(function (arg0, arg1, arg2) { const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2)); return ret; }, arguments) }; @@ -1657,28 +1685,28 @@ function __wbg_get_imports() { const ret = wasm.memory; return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper2826 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 996, __wbg_adapter_28); + imports.wbg.__wbindgen_closure_wrapper3452 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1232, __wbg_adapter_30); return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper2827 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 996, __wbg_adapter_31); + imports.wbg.__wbindgen_closure_wrapper3453 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1232, __wbg_adapter_33); return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper2828 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 996, __wbg_adapter_34); + imports.wbg.__wbindgen_closure_wrapper3456 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1232, __wbg_adapter_36); return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper3214 = function(arg0, arg1, arg2) { - const ret = makeClosure(arg0, arg1, 1153, __wbg_adapter_37); + imports.wbg.__wbindgen_closure_wrapper3605 = function(arg0, arg1, arg2) { + const ret = makeClosure(arg0, arg1, 1300, __wbg_adapter_39); return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper3216 = function(arg0, arg1, arg2) { - const ret = makeClosure(arg0, arg1, 1153, __wbg_adapter_37); + imports.wbg.__wbindgen_closure_wrapper3607 = function(arg0, arg1, arg2) { + const ret = makeClosure(arg0, arg1, 1300, __wbg_adapter_39); return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper3259 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 1176, __wbg_adapter_42); + imports.wbg.__wbindgen_closure_wrapper3654 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1328, __wbg_adapter_44); return addHeapObject(ret); }; diff --git a/docs/egui_demo_app_bg.wasm b/docs/egui_demo_app_bg.wasm index ea97afe33..579432365 100644 Binary files a/docs/egui_demo_app_bg.wasm and b/docs/egui_demo_app_bg.wasm differ diff --git a/examples/hello_world/Cargo.toml b/examples/hello_world/Cargo.toml index b960dcfb7..a3ae0ea7d 100644 --- a/examples/hello_world/Cargo.toml +++ b/examples/hello_world/Cargo.toml @@ -12,4 +12,8 @@ publish = false eframe = { path = "../../crates/eframe", features = [ "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } + +# For image support: +egui_extras = { path = "../../crates/egui_extras", features = ["image"] } + env_logger = "0.10" diff --git a/examples/hello_world/screenshot.png b/examples/hello_world/screenshot.png index 450f6eead..f47e2c589 100644 Binary files a/examples/hello_world/screenshot.png and b/examples/hello_world/screenshot.png differ diff --git a/examples/hello_world/src/main.rs b/examples/hello_world/src/main.rs index 47c045db5..4a64a3bec 100644 --- a/examples/hello_world/src/main.rs +++ b/examples/hello_world/src/main.rs @@ -11,7 +11,12 @@ fn main() -> Result<(), eframe::Error> { eframe::run_native( "My egui App", options, - Box::new(|_cc| Box::::default()), + Box::new(|cc| { + // This gives us image support: + egui_extras::install_image_loaders(&cc.egui_ctx); + + Box::::default() + }), ) } @@ -43,6 +48,10 @@ impl eframe::App for MyApp { self.age += 1; } ui.label(format!("Hello '{}', age {}", self.name, self.age)); + + ui.image(egui::include_image!( + "../../../crates/egui/assets/ferris.png" + )); }); } } diff --git a/examples/images/screenshot.png b/examples/images/screenshot.png index b9d550b32..97066fa79 100644 Binary files a/examples/images/screenshot.png and b/examples/images/screenshot.png differ diff --git a/examples/images/src/main.rs b/examples/images/src/main.rs index 87a680d1e..d942a21c9 100644 --- a/examples/images/src/main.rs +++ b/examples/images/src/main.rs @@ -12,7 +12,7 @@ fn main() -> Result<(), eframe::Error> { "Image Viewer", options, Box::new(|cc| { - // The following call is needed to load images when using `ui.image` and `egui::Image`: + // This gives us image support: egui_extras::install_image_loaders(&cc.egui_ctx); Box::::default() }), @@ -29,8 +29,7 @@ impl eframe::App for MyApp { ui.image(egui::include_image!("ferris.svg")); ui.add( - egui::Image::new("https://picsum.photos/seed/1.759706314/1024") - .rounding(egui::Rounding::same(10.0)), + egui::Image::new("https://picsum.photos/seed/1.759706314/1024").rounding(10.0), ); }); }); diff --git a/examples/save_plot/README.md b/examples/save_plot/README.md index 523af1d6b..4a6c2e038 100644 --- a/examples/save_plot/README.md +++ b/examples/save_plot/README.md @@ -3,3 +3,5 @@ This example shows that you can save a plot in egui as a png. ```sh cargo run -p save_plot ``` + +![](screenshot.png) diff --git a/examples/save_plot/screenshot.png b/examples/save_plot/screenshot.png new file mode 100644 index 000000000..072810ef8 Binary files /dev/null and b/examples/save_plot/screenshot.png differ diff --git a/examples/save_plot/src/main.rs b/examples/save_plot/src/main.rs index c9adf1ec9..a13e071aa 100644 --- a/examples/save_plot/src/main.rs +++ b/examples/save_plot/src/main.rs @@ -8,7 +8,7 @@ fn main() -> Result<(), eframe::Error> { env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`). let options = eframe::NativeOptions { - initial_window_size: Some(egui::vec2(350.0, 400.0)), + initial_window_size: Some(egui::vec2(350.0, 200.0)), ..Default::default() }; eframe::run_native( @@ -27,45 +27,19 @@ impl eframe::App for MyApp { fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { let mut plot_rect = None; egui::CentralPanel::default().show(ctx, |ui| { - // these are just some dummy variables for the example, - // such that the plot is not at position (0,0) - let height = 200.0; - let border_x = 11.0; - let border_y = 18.0; - let width = 300.0; - - ui.heading("My egui Application"); - - // add some whitespace in y direction - ui.add_space(border_y); - if ui.button("Save Plot").clicked() { frame.request_screenshot(); } - // add some whitespace in y direction - ui.add_space(border_y); + let my_plot = Plot::new("My Plot").legend(Legend::default()); - ui.horizontal(|ui| { - // add some whitespace in x direction - ui.add_space(border_x); - - let my_plot = Plot::new("My Plot") - .height(height) - .width(width) - .legend(Legend::default()); - - // let's create a dummy line in the plot - let graph: Vec<[f64; 2]> = vec![[0.0, 1.0], [2.0, 3.0], [3.0, 2.0]]; - let inner = my_plot.show(ui, |plot_ui| { - plot_ui.line(Line::new(PlotPoints::from(graph)).name("curve")); - }); - // Remember the position of the plot - plot_rect = Some(inner.response.rect); + // let's create a dummy line in the plot + let graph: Vec<[f64; 2]> = vec![[0.0, 1.0], [2.0, 3.0], [3.0, 2.0]]; + let inner = my_plot.show(ui, |plot_ui| { + plot_ui.line(Line::new(PlotPoints::from(graph)).name("curve")); }); - - // add some whitespace in y direction - ui.add_space(border_y); + // Remember the position of the plot + plot_rect = Some(inner.response.rect); }); if let (Some(screenshot), Some(plot_location)) = (self.screenshot.take(), plot_rect) { diff --git a/media/demo.gif b/media/demo.gif index 2cff5878a..385c82281 100644 Binary files a/media/demo.gif and b/media/demo.gif differ diff --git a/media/rerun_io_logo.png b/media/rerun_io_logo.png index 6af3db834..cda042662 100644 Binary files a/media/rerun_io_logo.png and b/media/rerun_io_logo.png differ diff --git a/media/widget_gallery_0.23.gif b/media/widget_gallery_0.23.gif new file mode 100644 index 000000000..666631079 Binary files /dev/null and b/media/widget_gallery_0.23.gif differ diff --git a/media/widget_gallery_0.23_light.png b/media/widget_gallery_0.23_light.png new file mode 100644 index 000000000..a975f97cd Binary files /dev/null and b/media/widget_gallery_0.23_light.png differ diff --git a/scripts/build_demo_web.sh b/scripts/build_demo_web.sh index 37abcffc6..0e7766568 100755 --- a/scripts/build_demo_web.sh +++ b/scripts/build_demo_web.sh @@ -12,8 +12,7 @@ export RUSTFLAGS=--cfg=web_sys_unstable_apis CRATE_NAME="egui_demo_app" - # NOTE: persistence use up about 400kB (10%) of the WASM! -FEATURES="http,persistence,web_screen_reader" +FEATURES="web_app" OPEN=false OPTIMIZE=false diff --git a/scripts/cargo_deny.sh b/scripts/cargo_deny.sh index 41b65fcda..fa0ccc3c3 100755 --- a/scripts/cargo_deny.sh +++ b/scripts/cargo_deny.sh @@ -7,6 +7,7 @@ set -x # cargo install cargo-deny cargo deny --all-features --log-level error --target aarch64-apple-darwin check +cargo deny --all-features --log-level error --target aarch64-linux-android check cargo deny --all-features --log-level error --target i686-pc-windows-gnu check cargo deny --all-features --log-level error --target i686-pc-windows-msvc check cargo deny --all-features --log-level error --target i686-unknown-linux-gnu check diff --git a/scripts/generate_changelog.py b/scripts/generate_changelog.py index aed02dd07..b9bb86e57 100755 --- a/scripts/generate_changelog.py +++ b/scripts/generate_changelog.py @@ -3,7 +3,8 @@ """ Summarizes recent PRs based on their GitHub labels. -The result can be copy-pasted into CHANGELOG.md, though it often needs some manual editing too. +The result can be copy-pasted into CHANGELOG.md, +though it often needs some manual editing too. """ import multiprocessing @@ -89,7 +90,9 @@ def fetch_pr_info(pr_number: int) -> Optional[PrInfo]: def get_commit_info(commit: Any) -> CommitInfo: match = re.match(r"(.*) \(#(\d+)\)", commit.summary) if match: - return CommitInfo(hexsha=commit.hexsha, title=str(match.group(1)), pr_number=int(match.group(2))) + title = str(match.group(1)) + pr_number = int(match.group(2)) + return CommitInfo(hexsha=commit.hexsha, title=title, pr_number=pr_number) else: return CommitInfo(hexsha=commit.hexsha, title=commit.summary, pr_number=None) @@ -104,8 +107,9 @@ def print_section(crate: str, items: List[str]) -> None: if 0 < len(items): print(f"#### {crate}") for line in items: - line = remove_prefix(line, f"{crate}: ") line = remove_prefix(line, f"[{crate}] ") + line = remove_prefix(line, f"{crate}: ") + line = remove_prefix(line, f"`{crate}`: ") print(f"* {line}") print() @@ -152,9 +156,16 @@ def main() -> None: summary = f"{title} [{hexsha[:7]}](https://github.com/{OWNER}/{REPO}/commit/{hexsha})" unsorted_commits.append(summary) else: - title = pr_info.pr_title if pr_info else title # We prefer the PR title if available + # We prefer the PR title if available + title = pr_info.pr_title if pr_info else title labels = pr_info.labels if pr_info else [] + if 'exclude from changelog' in labels: + continue + if 'typo' in labels: + # We get so many typo PRs. Let's not flood the changelog with them. + continue + summary = f"{title} [#{pr_number}](https://github.com/{OWNER}/{REPO}/pull/{pr_number})" if INCLUDE_LABELS and 0 < len(labels): @@ -165,9 +176,6 @@ def main() -> None: if gh_user_name not in OFFICIAL_DEVS: summary += f" (thanks [@{gh_user_name}](https://github.com/{gh_user_name})!)" - if 'typo' in labels: - continue # We get so many typo PRs. Let's not flood the changelog with them. - added = False for crate in crate_names: