Commit graph

238 commits

Author SHA1 Message Date
Matt Campbell
e1f348e4b2
Implement accessibility APIs via AccessKit (#2294)
* squash before rebase

* Update AccessKit, introducing support for editable spinners on Windows and an important fix for navigation order on macOS

* Restore support for increment and decrement actions in DragValue

* Avoid VoiceOver race condition bug

* fix clippy lint

* Tell AccessKit that the default action for a text edit (equivalent to a click) is to set the focus. This matters to some platform adapters.

* Refactor InputState functions for AccessKit actions

* Support the AccessKit SetValue for DragValue; this is the only way for a Windows AT to programmatically adjust the value

* Same for Slider

* Properly associate the slider label with both the slider and the drag value

* Lazily activate egui's AccessKit support

* fix clippy lint

* Update AccessKit

* More documentation, particularly around lazy activation

* Tweak one of the doc comments

* See if I can get AccessKit exempted from the 'missing backticks' lint

* Make PlatformOutput::accesskit_update an Option

* Refactor lazy activation

* Refactor node mutation (again)

* Eliminate the need for an explicit is_accesskit_active method, at least for now

* Fix doc comment

* More refactoring of tree construction; don't depend on Arc::get_mut

* Override a clippy lint; I seem to have no other choice

* Final planned refactor: a more flexible approach to hierarchy

* Last AccessKit update for this PR; includes an important macOS DPI fix

* Move and document the optional accesskit dependency

* Fix comment typo

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* reformat

* More elegant code for conditionally creating a node

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* Set step to 1.0 for all integer sliders

* Add doc example for Response::labelled_by

* Clarify a TODO comment I left for myself

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-12-04 19:17:12 +01:00
Emil Ernerfeldt
48666e1d7a
Automatically generate screenshots for all examples (#2379) 2022-12-04 17:27:40 +01:00
JP
85f8eeb9d5
Fix key pressed event (#2334)
* Fix key press event

* Add example with key presses

* Changelog line for key_press fix

* PR review improvements

* Add PR link in changelog

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-11-30 20:40:11 +01:00
Emil Ernerfeldt
7d8154971b
Update ndk-sys v0.4.0 -> v0.4.1+23.1.7779620 (#2340)
Closes https://github.com/emilk/egui/issues/2336
2022-11-24 10:09:32 +01:00
Red Artist
8ff139687a
bump msrv 1.64 and tts + bindgen dep (#2274)
* bump msrv 1.64 and tts + bindgen dep

* Update crates/egui-winit/Cargo.toml

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* Update crates/eframe/Cargo.toml

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-11-11 10:27:25 +01:00
Emil Ernerfeldt
e225c6b8d0 Opt-in logging of egui-wgpu using puffin 2022-11-10 16:28:08 +01:00
Emil Ernerfeldt
8c76b8caff
Update op puffin 0.14.0 (#2257) 2022-11-07 12:37:37 +01:00
Emil Ernerfeldt
17501d7e3e
Update arboard, fixing copy-paste on X11 (#2238)
* Revert "Fix copy-paste on Windows (#2120)"

This reverts commit f61044cef7.

* Update arboard to 3.2
2022-11-07 09:54:42 +01:00
Emil Ernerfeldt
e48602059d
Update ahash to 0.8.1 (#2255) 2022-11-07 09:23:45 +01:00
Emil Ernerfeldt
a0b3f1126b
Add helpers for zooming an app using Ctrl+Plus and Ctrl+Minus (#2239)
* Using tracing-subscriber in hello_world example

* Add Key::Plus/Minus/Equals

* Warn if failing to guess OS from User-Agent

* Remove jitter when using Context::set_pixels_per_point

* Demo app: zoom in/out using ⌘+ and ⌘-

* Demo app: make backend panel GUI scale slider better

* Optimize debug builds a bit

* typo

* Update changelog

* Add helper module `egui::gui_zoom` for zooming an app

* Better names, and update changelog

* Combine Plus and Equals keys

* Last fix

* Fix docs
2022-11-05 11:18:13 +01:00
Andreas Reich
cd74c74f6f
Update to wgpu 0.14 (#2114) 2022-10-06 15:50:46 +02:00
Andreas Reich
c2a37f4bd8
eframe support for wgpu on the web (#2107)
* basic working wgpu @ webgl on websys

* fix glow compile error

* introduced WebPainter trait, provide wgpu renderstate

* WebPainterWgpu destroy implemented

* make custom3d demo work on wgpu backend

* changelog entry for wgpu support eframe wasm

* remove temporary logging hack

* stop using pollster for web
we're actually not allowed to block - this only worked because wgpu on webgl doesn't actually cause anything blocking. However, when trying webgpu this became an issue

* revert cargo update

* compile error if neither glow nor wgpu features are enabled

* code cleanup

* Error handling

* Update changelog with link

* Make sure --all-features work

* Select best framebuffer format from the available ones

* update to wasm-bindgen 0.2.83

* Fix typo

* Clean up Cargo.toml

* Log about using the wgpu painter

* fixup wgpu labels

* fix custom3d_wgpu_shader ub padding

* remove duplicated uniforms struct in wgsl shader for custom3d

* Update docs: add async/await to the web 'start' function

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-10-05 20:14:18 +02:00
Emil Ernerfeldt
77df8ca0b0
Update some crates (#2100)
* Update crate webbrowser 0.7 -> 0.8

* Update criterion 0.3 -> 0.4

* Update tts 0.20 -> 0.24

* revert tts update
2022-10-02 20:33:45 +02:00
Emil Ernerfeldt
4ac1e28eae
Improve text redering and do all color operation in gamma space (#2071) 2022-09-24 17:53:11 +02:00
Emil Ernerfeldt
12dc61ed0f
update arboard to 3.0 (#2067) 2022-09-21 09:14:55 +02:00
Emil Ernerfeldt
3142c52b94
Minor wgpu-web releated stuff (#1977)
* egui_demo_app: remove wgpu and pollster as direct dependencies

* eframe: use same web-sys version as wgpu crate

* Make note that web_sys_unstable_apis is required by the wgpu crate

* Rename the glow web painter in eframe

* Remove trait DummyWebGLConstructor from web_glow_painter.rs

* cargo fmt

* Fix check.sh
2022-08-28 10:58:58 +02:00
Emil Ernerfeldt
bd5250f85d
Disable custom 3D painting example in the egui demo app for Es100 (#1945)
Closes https://github.com/emilk/egui/issues/1944
2022-08-20 19:54:18 +02:00
Emil Ernerfeldt
97ce103209 Release 0.19.0 - wgpu backend, repaint_after, continue-after-close 2022-08-20 16:49:58 +02:00
Emil Ernerfeldt
725aa5277b Update crate rfd to 0.10 (in file_dialog example)
Also update ab_glyph from 0.2.15 to 0.2.16
2022-08-20 14:42:37 +02:00
Emil Ernerfeldt
5514a8afda
Update dependencies (#1933)
* Update ahash from 0.7 to 0.8

Opt to use ahash::HashMap over ahash::AHashMap

* Fix ahash compilation for web

* Update ron to 0.8

* Add note about why we cannot update tiny-skia

* cargo update

    Updating crates.io index
    Updating android_system_properties v0.1.2 -> v0.1.4
    Updating anyhow v1.0.58 -> v1.0.62
    Updating async-broadcast v0.4.0 -> v0.4.1
    Updating async-channel v1.6.1 -> v1.7.1
    Updating async-io v1.7.0 -> v1.8.0
    Updating async-task v4.2.0 -> v4.3.0
    Updating async-trait v0.1.56 -> v0.1.57
    Updating backtrace v0.3.65 -> v0.3.66
    Updating bit-set v0.5.2 -> v0.5.3
    Updating bumpalo v3.10.0 -> v3.11.0
    Updating bytemuck v1.10.0 -> v1.12.1
    Updating bytemuck_derive v1.1.0 -> v1.2.1
    Updating bytes v1.1.0 -> v1.2.1
    Updating cast v0.2.7 -> v0.3.0
    Updating chrono v0.4.19 -> v0.4.22
    Updating clap v3.2.8 -> v3.2.17
    Updating clipboard-win v4.4.1 -> v4.4.2
    Updating combine v4.6.4 -> v4.6.6
    Updating concurrent-queue v1.2.2 -> v1.2.4
    Updating criterion v0.3.5 -> v0.3.6
    Updating criterion-plot v0.4.4 -> v0.4.5
    Updating crossbeam-channel v0.5.5 -> v0.5.6
    Updating crossbeam-deque v0.8.1 -> v0.8.2
    Updating crossbeam-epoch v0.9.9 -> v0.9.10
    Updating crossbeam-utils v0.8.10 -> v0.8.11
    Updating document-features v0.2.1 -> v0.2.3
    Updating dyn-clone v1.0.6 -> v1.0.9
    Removing easy-parallel v3.2.0
    Updating either v1.7.0 -> v1.8.0
    Updating enum-map v2.1.0 -> v2.4.1
    Updating enum-map-derive v0.8.0 -> v0.10.0
    Updating event-listener v2.5.2 -> v2.5.3
    Updating fastrand v1.7.0 -> v1.8.0
    Updating futures-core v0.3.21 -> v0.3.23
    Updating futures-io v0.3.21 -> v0.3.23
    Updating futures-sink v0.3.21 -> v0.3.23
    Updating futures-task v0.3.21 -> v0.3.23
    Updating futures-util v0.3.21 -> v0.3.23
    Updating gimli v0.26.1 -> v0.26.2
    Updating gpu-descriptor v0.2.2 -> v0.2.3
    Removing hashbrown v0.11.2
    Removing hashbrown v0.12.1
      Adding hashbrown v0.12.3
      Adding iana-time-zone v0.1.46
    Updating image v0.24.2 -> v0.24.3
    Updating inplace_it v0.3.3 -> v0.3.4
    Updating itoa v1.0.2 -> v1.0.3
    Updating js-sys v0.3.58 -> v0.3.59
    Updating libc v0.2.126 -> v0.2.132
    Updating libm v0.2.2 -> v0.2.5
    Removing memmap2 v0.3.1
    Removing memmap2 v0.5.4
      Adding memmap2 v0.5.7
    Removing num-iter v0.1.43
    Updating object v0.28.4 -> v0.29.0
    Updating once_cell v1.13.0 -> v1.13.1
    Updating os_str_bytes v6.1.0 -> v6.3.0
    Updating owned_ttf_parser v0.15.0 -> v0.15.1
    Removing parking_lot v0.11.2
    Removing parking_lot_core v0.8.5
    Updating plotters v0.3.1 -> v0.3.3
    Updating plotters-backend v0.3.2 -> v0.3.4
    Updating plotters-svg v0.3.1 -> v0.3.3
    Updating proc-macro-crate v1.1.3 -> v1.2.1
    Updating proc-macro2 v1.0.40 -> v1.0.43
    Updating quote v1.0.20 -> v1.0.21
    Updating redox_syscall v0.2.13 -> v0.2.16
    Updating regex v1.5.6 -> v1.6.0
    Updating regex-syntax v0.6.26 -> v0.6.27
    Updating rfd v0.8.0 -> v0.8.4
    Removing rustc_version v0.4.0
    Updating ryu v1.0.10 -> v1.0.11
    Updating sctk-adwaita v0.4.1 -> v0.4.2
    Removing semver v1.0.12
    Updating serde v1.0.138 -> v1.0.143
    Updating serde_derive v1.0.138 -> v1.0.143
    Updating serde_json v1.0.82 -> v1.0.83
    Updating serde_repr v0.1.8 -> v0.1.9
    Updating slab v0.4.6 -> v0.4.7
    Removing smithay-client-toolkit v0.15.4
    Updating smithay-clipboard v0.6.5 -> v0.6.6
    Updating syn v1.0.98 -> v1.0.99
    Updating thiserror v1.0.31 -> v1.0.32
    Updating thiserror-impl v1.0.31 -> v1.0.32
    Updating time v0.3.11 -> v0.3.13
      Adding tiny-skia v0.7.0
      Adding tiny-skia-path v0.7.0
    Updating tracing v0.1.35 -> v0.1.36
    Updating tracing-core v0.1.28 -> v0.1.29
    Updating tracing-subscriber v0.3.14 -> v0.3.15
    Updating unicode-ident v1.0.1 -> v1.0.3
    Updating unicode_names2 v0.5.0 -> v0.5.1
    Updating ureq v2.4.0 -> v2.5.0
    Updating wasm-bindgen-futures v0.4.31 -> v0.4.32
    Updating web-sys v0.3.58 -> v0.3.59
    Updating webpki-roots v0.22.3 -> v0.22.4
    Updating weezl v0.1.6 -> v0.1.7
    Updating wgpu-core v0.13.1 -> v0.13.2
    Updating wgpu-hal v0.13.1 -> v0.13.2
    Updating wgpu-types v0.13.0 -> v0.13.2
    Updating windows v0.32.0 -> v0.37.0
    Updating windows_aarch64_msvc v0.32.0 -> v0.37.0
    Updating windows_i686_gnu v0.32.0 -> v0.37.0
    Updating windows_i686_msvc v0.32.0 -> v0.37.0
    Updating windows_x86_64_gnu v0.32.0 -> v0.37.0
    Updating windows_x86_64_msvc v0.32.0 -> v0.37.0
    Updating x11-dl v2.19.1 -> v2.20.0
    Updating zbus_names v2.1.0 -> v2.2.0
    Updating zvariant v3.4.1 -> v3.6.0
    Updating zvariant_derive v3.4.1 -> v3.6.0

* Add "Unicode-DFS-2016" to deny.toml whitelist
2022-08-19 11:46:38 +02:00
Asger Nyman Christiansen
eeeb4b7de2
Improve custom_3d_three-d example (#1923)
* Use correct FBO to output

* custom_3d_three-d web

* Update .gitignore

* Do not free the FBO

* Use three-d 0.13

* ThreeDApp

* Only construct model and camera once

* Clean-up and docs

* Web build instructions

* Remove unused dependencies

* Update Cargo.lock

* Fix build

* More fixes

* omg
2022-08-17 21:33:34 +02:00
Emil Ernerfeldt
9c58f12a6c
eframe: several windows in series (#1919)
* Add example of opening several eframe windows in series

* Reuse the same winit event loop

* Ignore events to the wrong window

* Run run_return again
2022-08-15 16:31:03 +02:00
Emil Ernerfeldt
923b67ef9c
Update to winit 0.27.2, glutin 0.29.0, glium 0.32 (#1914) 2022-08-14 16:23:46 +02:00
Emil Ernerfeldt
a7012cf8a6
Use pinned version of wasm-bindgen-cli (#1855)
* Use pinned version of wasm-bindgen-cli

* Update wasm-bindgen to 0.2.82

* Call setup_web.sh from scripts that depends on it
2022-07-25 23:02:10 +02:00
Sven Niederberger
0bf9fc9428
Improve plot item UX (#1816)
* initial work

* changelog entry

* fix CI

* Update egui/src/widgets/plot/items/values.rs

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* Update egui/src/widgets/plot/items/values.rs

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* derive 'FromIterator'

* remove `bytemuck` dependency again and remove borrowing plot points for now

* update doctest

* update documentation

* remove unnecessary numeric cast

* cargo fmt

* Update egui/src/widgets/plot/items/values.rs

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-07-24 17:13:12 +02:00
Emil Ernerfeldt
0f0031ebbb
cargo update (#1794)
* cargo update

    Updating crates.io index
    Updating anyhow v1.0.57 -> v1.0.58
    Updating arboard v2.1.0 -> v2.1.1
    Updating async-broadcast v0.3.4 -> v0.4.0
    Updating async-io v1.6.0 -> v1.7.0
    Updating async-trait v0.1.53 -> v0.1.56
    Updating bindgen v0.59.2 -> v0.60.1
    Updating bumpalo v3.9.1 -> v3.10.0
    Updating bytemuck v1.9.1 -> v1.10.0
    Updating cfg-expr v0.10.2 -> v0.10.3
    Updating clang-sys v1.3.1 -> v1.3.3
      Adding clap v3.2.8
      Adding clap_lex v0.2.4
    Updating crossbeam-channel v0.5.4 -> v0.5.5
    Updating crossbeam-epoch v0.9.8 -> v0.9.9
    Updating crossbeam-utils v0.8.8 -> v0.8.10
    Updating dyn-clone v1.0.5 -> v1.0.6
    Updating either v1.6.1 -> v1.7.0
    Updating enum-map v2.1.0 -> v2.4.0
    Updating enum-map-derive v0.8.0 -> v0.9.0
    Updating flate2 v1.0.23 -> v1.0.24
    Updating getrandom v0.2.6 -> v0.2.7
    Updating gif v0.11.3 -> v0.11.4
      Adding hashbrown v0.12.1
    Updating indexmap v1.8.1 -> v1.9.1
    Updating itoa v1.0.1 -> v1.0.2
    Updating jpeg-decoder v0.2.4 -> v0.2.6
    Updating linked-hash-map v0.5.4 -> v0.5.6
    Updating log v0.4.16 -> v0.4.17
    Updating memmap2 v0.5.3 -> v0.5.4
    Updating miniz_oxide v0.5.1 -> v0.5.3
    Updating mio v0.8.2 -> v0.8.4
    Removing miow v0.3.7
      Adding nix v0.24.1
    Removing ntapi v0.3.7
    Updating num-rational v0.4.0 -> v0.4.1
    Updating num-traits v0.2.14 -> v0.2.15
    Updating num_threads v0.1.5 -> v0.1.6
    Updating object v0.28.3 -> v0.28.4
    Updating once_cell v1.10.0 -> v1.12.0
      Adding os_str_bytes v6.1.0
    Updating parking_lot v0.12.0 -> v0.12.1
    Updating parking_lot_core v0.9.1 -> v0.9.3
    Updating proc-macro2 v1.0.37 -> v1.0.40
    Updating profiling v1.0.5 -> v1.0.6
    Updating puffin v0.13.1 -> v0.13.3
    Updating quote v1.0.18 -> v1.0.20
    Updating rayon v1.5.2 -> v1.5.3
    Updating rayon-core v1.9.2 -> v1.9.3
    Updating regex v1.5.5 -> v1.5.6
    Updating regex-syntax v0.6.25 -> v0.6.26
      Adding remove_dir_all v0.5.3
    Updating rfd v0.8.0 -> v0.8.4
    Updating rgb v0.8.32 -> v0.8.33
    Updating ron v0.7.0 -> v0.7.1
    Updating rustls v0.20.4 -> v0.20.6
    Updating rustybuzz v0.5.0 -> v0.5.1
    Updating ryu v1.0.9 -> v1.0.10
    Updating semver v1.0.7 -> v1.0.12
    Updating serde v1.0.136 -> v1.0.138
    Updating serde_derive v1.0.136 -> v1.0.138
    Updating serde_json v1.0.79 -> v1.0.82
    Updating serde_repr v0.1.7 -> v0.1.8
    Updating smallvec v1.8.0 -> v1.9.0
      Adding smithay-client-toolkit v0.16.0
    Updating smithay-clipboard v0.6.5 -> v0.6.6
    Updating str-buf v1.0.5 -> v1.0.6
    Removing strsim v0.8.0
    Updating svgtypes v0.8.0 -> v0.8.1
    Updating syn v1.0.92 -> v1.0.98
      Adding tempfile v3.3.0
      Adding textwrap v0.15.0
    Updating thiserror v1.0.30 -> v1.0.31
    Updating thiserror-impl v1.0.30 -> v1.0.31
    Removing time v0.1.43
    Removing time v0.3.9
      Adding time v0.1.44
      Adding time v0.3.11
    Updating tiny-skia v0.6.3 -> v0.6.6
    Updating tracing v0.1.34 -> v0.1.35
    Updating tracing-attributes v0.1.21 -> v0.1.22
    Updating tracing-core v0.1.26 -> v0.1.28
    Updating tracing-subscriber v0.3.11 -> v0.3.14
    Updating ttf-parser v0.15.0 -> v0.15.2
    Updating tts v0.20.3 -> v0.20.4
    Updating twox-hash v1.6.2 -> v1.6.3
      Adding uds_windows v1.0.2
      Adding unicode-ident v1.0.1
    Updating unicode-normalization v0.1.19 -> v0.1.21
    Removing vec_map v0.8.2
    Updating wasi v0.10.2+wasi-snapshot-preview1 -> v0.10.0+wasi-snapshot-preview1
    Updating wgpu v0.13.0 -> v0.13.1
    Updating wgpu-core v0.13.0 -> v0.13.1
    Updating wgpu-hal v0.13.0 -> v0.13.1
    Removing windows v0.32.0
      Adding windows v0.33.0
      Adding windows v0.37.0
    Updating windows-sys v0.32.0 -> v0.36.1
    Removing windows_aarch64_msvc v0.32.0
      Adding windows_aarch64_msvc v0.33.0
      Adding windows_aarch64_msvc v0.36.1
      Adding windows_aarch64_msvc v0.37.0
    Removing windows_i686_gnu v0.32.0
      Adding windows_i686_gnu v0.33.0
      Adding windows_i686_gnu v0.36.1
      Adding windows_i686_gnu v0.37.0
    Removing windows_i686_msvc v0.32.0
      Adding windows_i686_msvc v0.33.0
      Adding windows_i686_msvc v0.36.1
      Adding windows_i686_msvc v0.37.0
    Removing windows_x86_64_gnu v0.32.0
      Adding windows_x86_64_gnu v0.33.0
      Adding windows_x86_64_gnu v0.36.1
      Adding windows_x86_64_gnu v0.37.0
    Removing windows_x86_64_msvc v0.32.0
      Adding windows_x86_64_msvc v0.33.0
      Adding windows_x86_64_msvc v0.36.1
      Adding windows_x86_64_msvc v0.37.0
    Updating zbus v2.1.1 -> v2.3.2
    Updating zbus_macros v2.1.1 -> v2.3.2
    Updating zstd v0.10.0+zstd.1.5.2 -> v0.11.2+zstd.1.5.2
    Updating zstd-safe v4.1.4+zstd.1.5.2 -> v5.0.2+zstd.1.5.2
    Updating zstd-sys v1.6.3+zstd.1.5.2 -> v2.0.1+zstd.1.5.2
    Updating zvariant v3.1.2 -> v3.4.1
    Updating zvariant_derive v3.1.2 -> v3.4.1

❯ cargo update -p smithay-clipboard --precise 0.6.5
    Updating crates.io index
    Removing nix v0.24.1
    Removing smithay-client-toolkit v0.16.0
    Updating smithay-clipboard v0.6.6 -> v0.6.5

* Downgrade enum-map so we can build with rust 1.60

* update syntect

* Update usvg and resvg

* Fix syntect update

* Update tts to 0.22

* Make egui_demo_app compile for wasm with wgpu feature

This broke in https://github.com/emilk/egui/pull/1781

* Ignore rfd tree in deny.toml

* Revert "Update tts to 0.22"

This reverts commit 2e1280b61ef9422c76491ab718ad8da105657097.

* Explain why tts is stuck on an old version

* Downgrade `rfd` to avoid problems with duplicate `windows` crate
2022-07-03 20:12:57 +02:00
Emil Ernerfeldt
bd2cab2f0e
Update three d (#1793)
* Update three-d to 0.12

* Fix Z fighting in three-d example

Closes https://github.com/emilk/egui/issues/1744

* cargo deny: ignore three-d (only used in examples)
2022-07-03 18:29:12 +02:00
Ashley
9739009f20
Update wgpu to 0.13 (#1670)
* Update the wgsl syntax used in egui-wgpu

* Updates for the latest version of wgpu

* Update the wgpu version

* get_preffered_format -> get_supported_formats

* Just use an array access for compatible formats

* Use the naga cli to validate the egui demo app custom wgpu shader

* Run cargo check on the custom3d wgpu app

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-07-03 15:43:39 +02:00
Emil Ernerfeldt
3169ce62d5
Document feature flags using crate document-features (#1725) 2022-06-09 15:27:22 +02:00
René Rössler
4a7a2d6430
eframe::App::post_rendering (#1591) 2022-05-29 20:33:04 +02:00
Zicklag
1d9524cc59
Re-implement PaintCallbacks With Support for WGPU (#1684)
* Re-implement PaintCallbacks With Support for WGPU

This makes breaking changes to the PaintCallback system, but makes it
flexible enough to support both the WGPU and glow backends with custom
rendering.

Also adds a WGPU equivalent to the glow demo for custom painting.
2022-05-28 17:52:36 +02:00
Robert Bragg
a5076d4cc4
egui_winit/wgpu: enable Android support (#1634)
* egui-winit: don't assume window available at init

On Android in particular we can only initialize render state once we
have a native window, after a 'Resumed' lifecycle event. It's still
practical to be able to initialize an egui_winit::State early on
so this adds setters for the max_texture_side and pixels_per_point
that can be called once we have a valid Window and have initialized
a graphics context.

On Wayland, where we need to access the Display for clipboard handling
we now get the Display from the event loop instead of a window.

* egui-wgpu: lazily initialize render + surface state

Enable the renderer and surface state initialization to be deferred
until we know that any winit window we created has a valid native window
and enable the surface state to be updated in case the native window
changes.

In particular these changes help with running on Android where winit
windows will only have a valid native window associated with them
between Resumed and Paused lifecycle events, and so surface creation
(and render state initialization) needs to wait until the first
Resumed event, and the surface needs to be dropped/recreated based on
Paused/Resumed events.
2022-05-22 20:24:41 +02:00
Emil Ernerfeldt
fff2008255 Move three-d patch into example Cargo.tom 2022-05-22 18:14:00 +02:00
Emil Ernerfeldt
d6fd5dec3b
Add single-threaded deadlock detection to RwMutex (#1619) 2022-05-21 14:08:19 +02:00
Antti Keränen
b8a5924295
Fix clipboard on Wayland (#1613)
arboard advertises that it works with Wayland, but in reality it only
works with Wayland terminal applications. To make the clipboard work
with applications that draw Wayland surfaces, arboard isn't going to
work.

Copypasta does support Wayland's graphical clipboard, but the usage
isn't documented. However, for the reasons mentioned in #1474 the move
from Copypasta to arboard makes sense.

To resolve the issue, this commit brings in an optional dependency
smithay-clipboard, that is a crate that correctly handles the Wayland
clipboard in graphical applications. It is used by default if a Wayland
window handle is found. If for some reason the handle to the Wayland
window handle cannot be fetched, arboard is used as a backup.
2022-05-16 16:37:41 +02:00
Luke Newcomb
d2decfa338
Add ability to convert from a hex string to Color32 using macros (#1596) 2022-05-15 17:07:30 +02:00
Emil Ernerfeldt
931e716b97
Add egui_wgpu crate (#1564)
Based on https://github.com/hasenbanck/egui_wgpu_backend

`egui-wgpu` is now an official backend for `eframe` (opt-in).

Use the `wgpu` feature flag on `eframe` and the `NativeOptions::renderer` settings to pick it.

Co-authored-by: Nils Hasenbanck <nils@hasenbanck.de>
Co-authored-by: Sven Niederberger <niederberger@embotech.com>
Co-authored-by: Sven Niederberger <73159570+s-nie@users.noreply.github.com>
2022-05-12 09:02:28 +02:00
Emil Ernerfeldt
d69ce546fa Release egui_glow 0.18.1 - remove unnecessary calls to gl.get_error 2022-05-09 12:43:37 +02:00
Emil Ernerfeldt
b30224471c
Release 0.18.1 of egui & epaint - Change Shape::Callback to &mut dyn Any (#1552) 2022-05-01 11:35:29 +02:00
Emil Ernerfeldt
dc26890a80 Release 0.18.0 - Shape::Callback, Table, and better text contrast 2022-04-30 20:27:27 +02:00
Emil Ernerfeldt
f0e6332b42
Fix cargo deny (#1549)
* Make the strip demo less ugly

* revert duplicated windows dependency in Cargo.lock

* cargo update

* Remove duplicated windows dependency by reverting rfd

* And again for parking_lot_core
2022-04-30 20:18:59 +02:00
Emil Ernerfeldt
d24599f3cc Revert tts version to 0.20 2022-04-30 19:23:44 +02:00
Emil Ernerfeldt
ec57683c1a Update some crates 2022-04-30 18:05:58 +02:00
Emil Ernerfeldt
00471f2887 Update cint 0.2 -> 0.3 2022-04-30 18:01:24 +02:00
Emil Ernerfeldt
ed4fe43e7a Update tts 0.20 -> 0.21 2022-04-30 17:59:30 +02:00
Emil Ernerfeldt
30aeb2a94f Update webbrowser 0.6 -> 0.7 2022-04-30 17:58:12 +02:00
Emil Ernerfeldt
3a83a600bb
Add a custom 3D demo using glow to egui_demo_app (#1546) 2022-04-30 12:58:29 +02:00
Emil Ernerfeldt
bb421c7e8a
Remove egui_web and epi (#1545)
* Remove integration name (it is always eframe)

* Remove egui_web crate

* Move egui_web/CHANGELOG.md into eframe/CHANGELOG.md

* Remove all mentions of egui_web

* Remove epi crate and absorb into eframe

* egui_glow: only use puffin on native

* Remove WASM doc from CI (we don't generate it anyways!)

* Remove eframe::epi and improve eframe docs
2022-04-30 10:44:35 +02:00
Emil Ernerfeldt
ed002acc68
Refactor: move things into eframe (#1542)
* Move all epi-related code from egui_glow into eframe

* Move epi stuff from egui-winit into eframe

* Remove mention of epi in egui

* Remove mention of epi in egui_glium

* Remove trait epi::NativeTexture

* Remove confusing mentions of epi

* Refactor egui_web: break up into smaller files

* Clean up feature flags further, and update changelogs

* Clean up check.sh

* Small cleanup of egui_web/Cargo.toml

* Fix dependencies for pure_glow example

* Fix clippy false positive
2022-04-29 08:17:49 +02:00
Emil Ernerfeldt
355d70d2b9
Move code from egui_demo_lib to egui_demo_app (#1540)
Also clean up feature names and dependencies
2022-04-28 11:23:34 +02:00