* implement save_plot
* fix for check.sh
* clippy
* add save_plot to Cargo.lock
* adapted for PR #2676 (removes unsafe code)
* add some comments
* implemented the comments from emilk
* update comments in code
* rustfmt
* remove picked_path
* add more comments
* removed unused import
* use `inner.response.rect` as the plot position
* remove plot_location from MyApp members
* sort entries
* Update examples/save_plot/src/main.rs
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* use env_logger instead of tracing subscriber
* use env_logger instead of tracing subscriber and combine if let
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Expose raw window and display handles in eframe
* Ensure that no one implements `Clone` in the future
* Cleanup
---------
Co-authored-by: Matti Virkkunen <mvirkkunen@gmail.com>
* Update accesskit to 0.11
* Add instructions on how to test the web viewer to CONTRIBUTING.md
Also removed dependency on `jq`
Closes https://github.com/emilk/egui/issues/2859
* Detect panics during initialization and show them to the user
* PanicHandler now also logs the panics
* Add example of how to call into your app from JS
* Refactor: break out AppRunner and AppRunnerRef to own files
* Hide AppRunner
* Simplify user code
* AppRunnerRef -> WebRunner
* Better docs
* Don't paint until first animation frame
* Update multiple_apps.html
* Update web demo
* Cleanup and fixes
* left-align panic message in html
* Make wgpu webgl/gles opt-in (but still work out of the box via feature flag), workaround canvas creation issue
* missing allow unsafe code annotations
* add breaking change not to eframe release notes
* Add --webgpu flag to build_demo_web.sh
* Improve CHANGELOG docs
* Clean up, and prepare for having to wasm:s
* put canvas without workaround under `if false`
* fix spelling
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* eframe: Set app icon on Mac and Windows
Also: correctly set window title on Mac when launching from
another process, e.g. python.
Co-authored-by: Wumpf <andreas@rerun.io>
* lint fixes
* Fix web build
* fix typo
* Try fix windows build
---------
Co-authored-by: Wumpf <andreas@rerun.io>
* Refactor repaint logic
* request_repaint_after also fires the request_repaint callback
* Bug fixes
* Add test to egui_demo_app
* build_demo_web: build debug unless --release is specified
* Fix the web backend too
* Run special clippy for wasm, forbidding some types/methods
* Remove wasm_bindgen_check.sh
* Fix typos
* Revert "Remove wasm_bindgen_check.sh"
This reverts commit 92dde25344.
* Only run cranky/clippy once
* add method for requesting attention to the main window
* use another enum member for user attention type instead of nested `Option`s
(also, document the enum members now that they don't mirror `winit`)
* update the docstring
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* add an example app for testing window attention requests
* Apply suggestions from code review
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* remove `chrono` dependency and improve the attention example's readability
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Remove dark-light dependency
Since https://github.com/emilk/egui/pull/2750 we now get what we need
straight from `winit`.
* fix warning
* Docstring formatting
* fix typo in check.sh
* Replace tracing crate with log
It's just so much simpler to use
* Add `bacon wasm` job
* eframe: add a WebLogger for piping log events to the web console
Instead of depending on android-activity directly, this exposes the
android-native-activity and android-game-activity features from Winit.
This ensures that applications can choose what android-backend they use
while also relying on Winit to decide what version of android-activity to
use - without increasing the risk of a version conflict by having a direct
dependency.
_(NB: Egui doesn't currently use the android-activity API itself)_
Since android-activity provides the `android_main()` entry point for
Android applications it's not possible to link in multiple version of
the android-activity crate and so it's particularly important to
avoid unnecessary direct dependencies that could cause a version
conflict in the future.
To help avoid the need for applications to directly depend on
android-activity the Winit crate re-exports the android-activity API
and exposes features to configure the backend so that application crates
can instead rely on Winit to pull in a compatible version of
android-activity. (This way version bumps for android-activity only
need to be synchronized with the Winit crate).
CI now enables the `android-native-activity` feature for testing.
Fixes: #2829Fixes: #2720Closes: #2834
* use glutin-winit for glow context creation
* added some tracing for easier debugging of glutin problems
* fmt
* add more debug logs
* more tracing
* fallback egl instead of prefer egl
* update pure glow example to use glutin_winit
* add more logging. ignore vsync option if not supported
* cranky lint
* add some logging for easier debugging
* drop window after glutin surface
* small changes based on pr review
* build fix
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
* Update resvg, tiny-skia and usv to latest
* Remove default features from svg crates
Users can always opt-in to them themselves
* Update png 0.17.6 -> 0.17.7
* Update to winit 0.28
Mac trackpads pinch gestures will now generate `egui::Event::Zoom`
* Update accesskit_winit
* Try to get Android CI green
* Fix wayland compilation
* Add comment about android-activity
* Update changelogs
* Fix call to register_xlib_error_hook
* Remove native screen reader support
Use the "accesskit" feature flag to `eframe` instead.
[AccessKit](https://github.com/AccessKit/accesskit) is the future.
`tts` was a mess to compile on many platforms, so I no longer want
the native `tts` dependency.
* Update tts to 0.25
* Update changelogs
* Turn on all feature flags for package.metadata.docs.rs
* remove tts from deny.toml skip-tree
* Update web build scripts
* Update deny.toml
* Deprecate egui_glium - looking for new maintainer
egui_glium was the first backend of egui, and it served us well for
a long time, but we have long since moved on to glow and wgpu.
Not egui_glium is holding back an update to latest winit.
Since development on glium has long since been discontinued I will
therefore deprecate egui_glium with this PR.
The code is still there in the repository for a while longer,
but is no longer compiled.
If there is any interest in maintaining egui_glium, then fork it and
make a PR to remove the last egui_glium from this repository.
I will give you publish rights on crates.io.
* update glutin 0.30.2 -> 0.30.3
* cargo update -p backtrace
Updating crates.io index
Updating addr2line v0.17.0 -> v0.19.0
Updating backtrace v0.3.66 -> v0.3.67
Updating gimli v0.26.2 -> v0.27.1
Removing miniz_oxide v0.5.4
Updating object v0.29.0 -> v0.30.3
* cargo deny: allow duplicates of windows-sys, wayland-sys, and nix
* cargo-deny whitelist tiny-skia
* eframe::run_native: return errors instead of crashing
* Detect and handle glutin errors
* egui_demo_app: silence wgpu log spam
* Add trace logs for why eframe is shutting down
* Fix: only save App state once on Mac
* Handle Winit failure
* Log where we load app state from
* Don't panic on zero-sized window
* Clamp loaded window size to not be too tiny to see
* Simplify code: more shared code in window_builder
* Improve code readability
* Fix wasm32 build
* fix android
* Update changelog
* split out ecolor crate
* split up ecolor crate in lots of modules
* add changelog notes
* add readme to ecolor
* put clippy::manual_range_contains on cranky allow list
* fix hex color issues
* doc fixes
* more hex_color fixes
* Document features
* Rename hex_color module to avoid warning
* Sort the feature names
* fix link in CHANGELOG.md
* better wording
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>