Emil Ernerfeldt
41b178b6ec
Use atomic_refcell instead of parking_lot for wasm32 targets ( #1404 )
Closes https://github.com/emilk/egui/issues/1401
3 years ago
Emil Ernerfeldt
15254f8235
Remove the single_threaded/multi_threaded feature flags ( #1390 )
Always use parking_lot for mutexes, i.e. always be multi-threaded.
Closes #1379
3 years ago
Emil Ernerfeldt
c768d1d48e
Context::request_repaint will wake up the UI thread ( #1366 )
This adds a callback (set by `Context::set_request_repaint_callback`)
which integration can use to wake up the UI thread.
eframe (egui_web and egui_glow) will use this, replacing
`epi::Frame::request_repaint`.
Existing code calling `epi::Frame::request_repaint` should be changed
to instead call `egui::Context::request_repaint`.
This is the first callback added to the egui API, which otherwise is
completely driven by data.
The purpose of this is to remove the confusion between the two
`request_repaint` methods (by removing one). Furthermore, it makes
`epi::Frame` a lot simpler, allowing future simplifications to it
(perhaps no longer having it be `Send+Sync+Clone`).
3 years ago
Emil Ernerfeldt
6aee4997d4
Add Shape::Callback to do custom rendering inside of an egui UI ( #1351 )
* Add Shape::Callback to do custom rendering inside of an egui UI
* Use Rc<glow::Context> everywhere
* Remove trait WebPainter
* Add glow::Context to epi::App::setup
3 years ago
Emil Ernerfeldt
29c52e8eb6
Remove epi backend from egui_glow ( #1361 )
3 years ago
Emil Ernerfeldt
52b4ab4e18
Remove egui_glium as a backend for eframe ( #1357 )
eframe will now always use egui_glow as a native backend.
Part of https://github.com/emilk/egui/issues/1198
3 years ago
Emil Ernerfeldt
30399bf6ff
Update regex crate v1.5.4 -> v1.5.5
3 years ago
Emil Ernerfeldt
a05520b9d3
Release 0.17.0 - Improved font selection and image handling
3 years ago
Emil Ernerfeldt
c5a9421dbd
Run wasm-bindgen in CI and update parking_lot ( #1293 )
* Run wasm-bindgen in CI
* Update parking_lot 0.11 -> 0.12
3 years ago
Emil Ernerfeldt
ddf914b517
Update crates ( #1283 )
* Update rfd 0.8 -> 0.8
* Update webbrowser 0.5 -> 0.6
* Update unicode_names2 0.4 -> 0.5
* cargo update
Updating crates.io index
Adding arrayvec v0.7.2
Updating async-lock v2.4.0 -> v2.5.0
Updating autocfg v1.0.1 -> v1.1.0
Updating cc v1.0.72 -> v1.0.73
Updating cfg-expr v0.9.1 -> v0.10.1
Updating core-foundation v0.9.2 -> v0.9.3
Updating crc32fast v1.3.1 -> v1.3.2
Updating crossbeam-epoch v0.9.6 -> v0.9.7
Updating crossbeam-utils v0.8.6 -> v0.8.7
Updating deflate v0.9.1 -> v1.0.0
Removing encoding v0.2.33
Removing encoding-index-japanese v1.20141219.5
Removing encoding-index-korean v1.20141219.5
Removing encoding-index-simpchinese v1.20141219.5
Removing encoding-index-singlebyte v1.20141219.5
Removing encoding-index-tradchinese v1.20141219.5
Removing encoding_index_tests v0.1.4
Updating enum-map v2.0.1 -> v2.0.2
Updating futures-core v0.3.19 -> v0.3.21
Updating futures-io v0.3.19 -> v0.3.21
Updating futures-sink v0.3.19 -> v0.3.21
Updating futures-task v0.3.19 -> v0.3.21
Updating futures-util v0.3.19 -> v0.3.21
Updating gio-sys v0.15.4 -> v0.15.6
Updating glib-sys v0.15.4 -> v0.15.6
Updating gobject-sys v0.15.1 -> v0.15.5
Updating image v0.24.0 -> v0.24.1
Updating kurbo v0.8.0 -> v0.8.3
Updating libc v0.2.117 -> v0.2.119
Updating memmap2 v0.5.2 -> v0.5.3
Adding miniz_oxide v0.5.1
Adding ndk-context v0.1.0
Removing ndk-glue v0.5.0
Removing ndk-glue v0.6.0
Adding ndk-glue v0.5.1
Adding ndk-glue v0.6.1
Updating ntapi v0.3.6 -> v0.3.7
Updating png v0.17.2 -> v0.17.3
Updating proc-macro-crate v1.1.0 -> v1.1.2
Updating rand v0.8.4 -> v0.8.5
Removing rand_hc v0.3.1
Updating rustls v0.20.2 -> v0.20.4
Updating semver v1.0.4 -> v1.0.5
Updating serde_json v1.0.78 -> v1.0.79
Updating system-deps v6.0.1 -> v6.0.2
Updating tracing v0.1.30 -> v0.1.31
Updating tracing-subscriber v0.3.7 -> v0.3.9
Updating tts v0.20.2 -> v0.20.3
Removing windows v0.30.0
Removing windows_aarch64_msvc v0.30.0
Removing windows_i686_gnu v0.30.0
Removing windows_i686_msvc v0.30.0
Removing windows_x86_64_gnu v0.30.0
Removing windows_x86_64_msvc v0.30.0
3 years ago
Emil Ernerfeldt
c3fc8997d6
Introduce egui_extras with RetainedImage for loading svg,png,jpeg,… ( #1282 )
3 years ago
Emil Ernerfeldt
b5c8f034e7
Add web location info to egui_web/epi ( #1258 )
This adds all parts of the web "location" (URL) to frame.info().web_info, included a HashMap of the query parameters, percent-decoded and ready to go.
This lets you easily pass key-value pairs to your eframe web app.
3 years ago
Yusuf Bera Ertan
1ebb5ccabf
Don't install console panic hook and tracing wasm subscriber in egui_web ( #1230 )
Do so in egui_demo_app instead
3 years ago
Emil Ernerfeldt
defc400c21
Add an example of how to display an SVG image in egui ( #1228 )
3 years ago
Emil Ernerfeldt
603ec82a5e
cargo deny: clarify MPL-2.0 license and use un-patched ureq again ( #1222 )
See https://github.com/algesten/ureq/issues/478#issuecomment-1031029647
3 years ago
Emil Ernerfeldt
ace2ac00da
Update to tts 0.20.2 which resolves copy-left license issue
See https://github.com/ndarilek/tts-rs/pull/21
3 years ago
Emil Ernerfeldt
712d8c9a2b
Run cargo deny in CI ( #1205 )
* Run cargo deny in CI
* Use patched fork of ureq to avoid copy-left license
* Use patched fork of tts to avoid LGPL license
More:
* https://github.com/ndarilek/tts-rs/pull/21
* https://github.com/algesten/ureq/pull/479
3 years ago
Emil Ernerfeldt
1b623fdd34
Update rfd 0.6 -> 0.7
3 years ago
Emil Ernerfeldt
47038c631e
Update image 0.23 -> 0.24
3 years ago
Emil Ernerfeldt
8dfa6ce2f0
Update tts 0.19 -> 0.20
3 years ago
Emil Ernerfeldt
3999e5b373
cargo update
Updating crates.io index
Removing anyhow v1.0.52
Updating atk-sys v0.14.0 -> v0.15.1
Updating backtrace v0.3.63 -> v0.3.64
Updating cairo-sys-rs v0.14.9 -> v0.15.1
Updating cfg-expr v0.8.1 -> v0.9.1
Updating clang-sys v1.3.0 -> v1.3.1
Updating crc32fast v1.3.0 -> v1.3.1
Updating enum-map v2.0.0 -> v2.0.1
Updating enum-map-derive v0.7.0 -> v0.8.0
Updating gdk-pixbuf-sys v0.14.0 -> v0.15.1
Updating gdk-sys v0.14.0 -> v0.15.1
Updating gio-sys v0.14.0 -> v0.15.4
Updating glib-sys v0.14.0 -> v0.15.4
Updating gobject-sys v0.14.0 -> v0.15.1
Updating gtk-sys v0.14.0 -> v0.15.3
Updating heck v0.3.3 -> v0.4.0
Updating js-sys v0.3.55 -> v0.3.56
Updating libc v0.2.116 -> v0.2.117
Updating lock_api v0.4.5 -> v0.4.6
Updating mint v0.5.8 -> v0.5.9
Updating nix v0.22.0 -> v0.22.3
Adding num_threads v0.1.3
Updating pango-sys v0.14.0 -> v0.15.1
Updating quote v1.0.14 -> v1.0.15
Updating rfd v0.6.3 -> v0.6.4
Updating serde v1.0.133 -> v1.0.136
Updating serde_derive v1.0.133 -> v1.0.136
Updating serde_json v1.0.75 -> v1.0.78
Removing strum v0.21.0
Removing strum_macros v0.21.1
Updating syn v1.0.85 -> v1.0.86
Updating system-deps v3.2.0 -> v6.0.1
Updating time v0.3.5 -> v0.3.7
Updating tracing v0.1.29 -> v0.1.30
Updating tracing-attributes v0.1.18 -> v0.1.19
Updating tracing-core v0.1.21 -> v0.1.22
Removing unicode-segmentation v1.8.0
Adding valuable v0.1.0
Updating version-compare v0.0.11 -> v0.1.0
Updating wasm-bindgen-futures v0.4.28 -> v0.4.29
Updating web-sys v0.3.55 -> v0.3.56
Updating which v4.2.2 -> v4.2.4
Adding windows v0.30.0
Adding windows_aarch64_msvc v0.30.0
Adding windows_i686_gnu v0.30.0
Adding windows_i686_msvc v0.30.0
Adding windows_x86_64_gnu v0.30.0
Adding windows_x86_64_msvc v0.30.0
Updating zbus v2.1.0 -> v2.1.1
Updating zbus_macros v2.1.0 -> v2.1.1
3 years ago
Emil Ernerfeldt
c3be566574
egui-winit: Automatically detect and apply dark or light mode ( #1045 )
3 years ago
Emil Ernerfeldt
c6ac1827f6
Use tracing crate for logging ( #1192 )
* egui_web: use tracing crate
* egui_glow: use tracing crate
* Log at the debug level
* egui_demo_app: enable tracing to log to stdout
* Use tracing in egui-winit
* Add opt-in tracing support to egui
3 years ago
Emil Ernerfeldt
ef81a52951
egui_web: log panics using console.error
3 years ago
Jay Oster
ffa1b6bd43
egui-winit: re-enable window transparency ( #1126 )
`winit` 0.26.1 fixes the crash on Windows 11
3 years ago
Emil Ernerfeldt
b2c8cd0867
Simplify http demo and add new download_image eframe demo
3 years ago
Emil Ernerfeldt
66d80e2519
Texture loading in egui ( #1110 )
* Move texture allocation into epaint/egui proper
* Add TextureHandle
* egui_glow: cast using bytemuck instead of unsafe code
* Optimize glium painter
* Optimize WebGL
* Add example of loading an image from file
3 years ago
Lampsitter
d31f7d6522
Faster dashed line generation ( #1027 )
* Faster dashed lines generation
* Add dashed_line benchmark
3 years ago
Niklas Korz
01015ac94c
Use `instant` crate in egui-winit for WebAssembly support ( #1023 )
* Replace `std::time::Instant` with wasm-compatible `instant::Instant`
* Change version requirement for instant to be compatible to winit
* Enable wasm-bindgen feature for instant
* Update lockfile
* Update changelog
* sort dependencies
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
3 years ago
Emil Ernerfeldt
b5c119ef19
0.16.1 patch release: Add back CtxRef::begin_frame/end_frame ( #1019 )
`begin_frame`, `end_frame` is more convenient when using egui in a game engine. In particular, 0.16.0 was incompatible with https://github.com/mvlabat/bevy_egui >.
3 years ago
Emil Ernerfeldt
0146c7e7fc
Release 0.16.0 - Context menus and rich text
3 years ago
Emil Ernerfeldt
037ca5f9cd
update tts 0.17 -> 0.19
3 years ago
Emil Ernerfeldt
ffd28252ab
cargo update
3 years ago
Jay Oster
dd99f68e82
Update winit to 0.26 ( #930 )
Also update glium, glutin and rfd
3 years ago
Emil Ernerfeldt
c71090473b
glow-vs-web cleanup following https://github.com/emilk/egui/pull/868
3 years ago
Emil Ernerfeldt
08cc07bb2d
Release 0.15.0 - Syntax highlighting, hscroll, egui-winit and egui_glow
3 years ago
Emil Ernerfeldt
4194a83a5e
Update ron 0.6 -> 0.7
3 years ago
Emil Ernerfeldt
5301043a77
cargo update
3 years ago
Emil Ernerfeldt
5d463b2af7
Remove serde_json from egui dev-dependencies
3 years ago
Emil Ernerfeldt
8178d23d19
Deduplicate code found in both egui_glium and egui_glow ( #819 )
* Move window building to egui-winit
* Move icon loading to egui-winit
* `use glow::HasContext;` -> `use glow::HasContext as _;`
* Move FileStorage into epi behind a feature flag
* De-duplicate screen_size_in_pixels and native_pixels_per_point
* Move creation of FileStorage to epi
* Handle epi app output (window size changes etc) in egui-winit
* Move app and memory persistence and autosave logic to egui-winit
* fix check.sh
* Make the epi backend opt-in for egui_glium and egui_glow
* Fix persistence
* Add integration name to epi::IntegrationInfo and the demo
* Clean up Cargo.toml files and fix making egui_glium optional
* fix typo
* Make egui_glium compile without the `epi` feature
3 years ago
Emil Ernerfeldt
844dd9d7a4
Remove "seconds_since_midnight" from epi/eframe. Use chrono instead
chrono works both natively and on web.
Related: https://github.com/emilk/egui/issues/212
3 years ago
Emil Ernerfeldt
cdd4dccf5f
Add egui_glow as an opt-in backend to eframe ( #817 )
* Make egui_glow and opt-in backend for eframe
* Add egui_glow to Cargo.toml and to CI
* Reference egui_glow where egui_glium is mentioned
* Remove path-patches from root Cargo.toml
* Add instructions on how to enable the glow backend of eframe
3 years ago
Emil Ernerfeldt
22a3a75eb5
Optimization: replace HashSet uses with AHashSet
3 years ago
Stock84
cd2227814f
Implement `bytemuck` behind a feature ( #775 )
3 years ago
Emil Ernerfeldt
a1bf5aff47
Add Memory::caches for caching things from one frame to the next
3 years ago
Emil Ernerfeldt
f0868c2f07
Code editor demo: nice syntax highlighting with customizable theme
3 years ago
Emil Ernerfeldt
e2bdd40985
Move WindowSettings from egui_glium to egui-winit
3 years ago
Emil Ernerfeldt
3e1db880dc
Revert change to winit event loop in egui_glium ( #756 )
* Revert change to winit event loop in egui_glium
This reverts https://github.com/emilk/egui/pull/631
Fixes https://github.com/emilk/egui/issues/755
* Add example of file dialogs and file drag-and-drop
* fix ci
3 years ago
Emil Ernerfeldt
e2fa13ed2a
cargo update
3 years ago
Emil Ernerfeldt
1b36863248
Split out new crate egui-winit from egui_glium ( #735 )
3 years ago