Skip to content

Commit

Permalink
Merge branch 'emilk:master' into patch2
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Feb 5, 2024
2 parents a493bf4 + b522200 commit edc227a
Show file tree
Hide file tree
Showing 112 changed files with 3,043 additions and 1,465 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Introduction

`egui` has been an on-and-off weekend project of mine since late 2018. I am grateful to any help I can get, but bare in mind that sometimes I can be slow to respond because I am busy with other things!
`egui` has been an on-and-off weekend project of mine since late 2018. I am grateful to any help I can get, but bear in mind that sometimes I can be slow to respond because I am busy with other things!

/ Emil

Expand Down
75 changes: 58 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 25 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,35 @@ opt-level = 2


[workspace.dependencies]
emath = { version = "0.25.0", path = "crates/emath", default-features = false }
ecolor = { version = "0.25.0", path = "crates/ecolor", default-features = false }
epaint = { version = "0.25.0", path = "crates/epaint", default-features = false }
egui = { version = "0.25.0", path = "crates/egui", default-features = false }
egui_plot = { version = "0.25.0", path = "crates/egui_plot", default-features = false }
egui-winit = { version = "0.25.0", path = "crates/egui-winit", default-features = false }
egui_extras = { version = "0.25.0", path = "crates/egui_extras", default-features = false }
egui-wgpu = { version = "0.25.0", path = "crates/egui-wgpu", default-features = false }
egui_demo_lib = { version = "0.25.0", path = "crates/egui_demo_lib", default-features = false }
egui_glow = { version = "0.25.0", path = "crates/egui_glow", default-features = false }
eframe = { version = "0.25.0", path = "crates/eframe", default-features = false }

#TODO(emilk): make more things workspace dependencies
ahash = { version = "0.8.6", default-features = false, features = [
"no-rng", # we don't need DOS-protection, so we let users opt-in to it instead
"std",
] }
backtrace = "0.3"
criterion = { version = "0.5.1", default-features = false }
document-features = "0.2"
glow = "0.13"
puffin = "0.18"
log = { version = "0.4", features = ["std"] }
nohash-hasher = "0.2"
parking_lot = "0.12"
puffin = "0.19"
puffin_http = "0.16"
raw-window-handle = "0.6.0"
thiserror = "1.0.37"
web-time = "0.2" # Timekeeping for native and web
wgpu = { version = "0.19.1", default-features = false, features = [
# Make the renderer `Sync` even on wasm32, because it makes the code simpler:
"fragile-send-sync-non-atomic-wasm",
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ui.horizontal(|ui| {
ui.text_edit_singleline(&mut name);
});
ui.add(egui::Slider::new(&mut age, 0..=120).text("age"));
if ui.button("Click each year").clicked() {
if ui.button("Increment").clicked() {
age += 1;
}
ui.label(format!("Hello '{name}', age {age}"));
Expand Down Expand Up @@ -376,21 +376,21 @@ The library was originally called "Emigui", but was renamed to "egui" in 2020.

## Credits

egui author and maintainer: Emil Ernerfeldt [(@emilk](https://github.com/emilk)).
egui author and maintainer: Emil Ernerfeldt ([@emilk](https://github.com/emilk)).

Notable contributions by:

* [@n2](https://github.com/n2): [Mobile web input and IME support](https://github.com/emilk/egui/pull/253).
* [@optozorax](https://github.com/optozorax): [Arbitrary widget data storage](https://github.com/emilk/egui/pull/257).
* [@quadruple-output](https://github.com/quadruple-output): [Multitouch](https://github.com/emilk/egui/pull/306).
* [@EmbersArc](https://github.com/EmbersArc): [Plots](https://github.com/emilk/egui/pulls?q=+is%3Apr+author%3AEmbersArc).
* [@AsmPrgmC3](https://github.com/AsmPrgmC3): [Proper sRGBA blending for web](https://github.com/emilk/egui/pull/650).
* [@AlexApps99](https://github.com/AlexApps99): [`egui_glow`](https://github.com/emilk/egui/pull/685).
* [@mankinskin](https://github.com/mankinskin): [Context menus](https://github.com/emilk/egui/pull/543).
* [@t18b219k](https://github.com/t18b219k): [Port glow painter to web](https://github.com/emilk/egui/pull/868).
* [@danielkeller](https://github.com/danielkeller): [`Context` refactor](https://github.com/emilk/egui/pull/1050).
* [@MaximOsipenko](https://github.com/MaximOsipenko): [`Context` lock refactor](https://github.com/emilk/egui/pull/2625).
* [@mwcampbell](https://github.com/mwcampbell): [AccessKit](https://github.com/AccessKit/accesskit) [integration](https://github.com/emilk/egui/pull/2294).
* [@n2](https://github.com/n2): [Mobile web input and IME support](https://github.com/emilk/egui/pull/253)
* [@optozorax](https://github.com/optozorax): [Arbitrary widget data storage](https://github.com/emilk/egui/pull/257)
* [@quadruple-output](https://github.com/quadruple-output): [Multitouch](https://github.com/emilk/egui/pull/306)
* [@EmbersArc](https://github.com/EmbersArc): [Plots](https://github.com/emilk/egui/pulls?q=+is%3Apr+author%3AEmbersArc)
* [@AsmPrgmC3](https://github.com/AsmPrgmC3): [Proper sRGBA blending for web](https://github.com/emilk/egui/pull/650)
* [@AlexApps99](https://github.com/AlexApps99): [`egui_glow`](https://github.com/emilk/egui/pull/685)
* [@mankinskin](https://github.com/mankinskin): [Context menus](https://github.com/emilk/egui/pull/543)
* [@t18b219k](https://github.com/t18b219k): [Port glow painter to web](https://github.com/emilk/egui/pull/868)
* [@danielkeller](https://github.com/danielkeller): [`Context` refactor](https://github.com/emilk/egui/pull/1050)
* [@MaximOsipenko](https://github.com/MaximOsipenko): [`Context` lock refactor](https://github.com/emilk/egui/pull/2625)
* [@mwcampbell](https://github.com/mwcampbell): [AccessKit](https://github.com/AccessKit/accesskit) [integration](https://github.com/emilk/egui/pull/2294)
* [@hasenbanck](https://github.com/hasenbanck), [@s-nie](https://github.com/s-nie), [@Wumpf](https://github.com/Wumpf): [`egui-wgpu`](https://github.com/emilk/egui/tree/master/crates/egui-wgpu)
* [@jprochazk](https://github.com/jprochazk): [egui image API](https://github.com/emilk/egui/issues/3291)
* And [many more](https://github.com/emilk/egui/graphs/contributors?type=a).
Expand Down
2 changes: 1 addition & 1 deletion bacon.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ need_stdout = true
[keybindings]
i = "job:initial"
c = "job:cranky"
w = "job:wasm"
a = "job:wasm"
d = "job:doc-open"
t = "job:test"
r = "job:run"
2 changes: 1 addition & 1 deletion crates/ecolor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cint = { version = "0.3.1", optional = true }
color-hex = { version = "0.2.0", optional = true }

## Enable this when generating docs.
document-features = { version = "0.2", optional = true }
document-features = { workspace = true, optional = true }

## Allow serialization using [`serde`](https://docs.rs/serde).
serde = { version = "1", optional = true, features = ["derive"] }
27 changes: 14 additions & 13 deletions crates/eframe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ puffin = [
]

## Enables wayland support and fixes clipboard issue.
wayland = ["egui-winit/wayland"]
wayland = ["egui-winit/wayland", "egui-wgpu?/wayland", "egui_glow?/wayland"]

## Enable screen reader support (requires `ctx.options_mut(|o| o.screen_reader = true);`) on web.
##
Expand All @@ -105,7 +105,7 @@ web_screen_reader = [
## By default, only WebGPU is enabled on web.
## If you want to enable WebGL, you need to turn on the `webgl` feature of crate `wgpu`:
##
## ```ignore
## ```toml
## wgpu = { version = "*", features = ["webgpu", "webgl"] }
## ```
##
Expand All @@ -114,28 +114,29 @@ web_screen_reader = [
wgpu = ["dep:wgpu", "dep:egui-wgpu", "dep:pollster"]

## Enables compiling for x11.
x11 = ["egui-winit/x11"]
x11 = ["egui-winit/x11", "egui-wgpu?/x11", "egui_glow?/x11"]

## 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.25.0", path = "../egui", default-features = false, features = [
egui = { workspace = true, default-features = false, features = [
"bytemuck",
"log",
] }
log = { version = "0.4", features = ["std"] }
parking_lot = "0.12"

document-features.workspace = true
log.workspace = true
parking_lot.workspace = true
raw-window-handle.workspace = true
static_assertions = "1.1.0"
thiserror.workspace = true
web-time.workspace = true

#! ### Optional dependencies
## Enable this when generating docs.
document-features = { version = "0.2", optional = true }
# Optional dependencies

egui_glow = { version = "0.25.0", path = "../egui_glow", optional = true, default-features = false }
egui_glow = { workspace = true, optional = true, default-features = false }
glow = { workspace = true, optional = true }
# glutin stuck on old version of raw-window-handle:
rwh_05 = { package = "raw-window-handle", version = "0.5.2", optional = true, features = [
Expand All @@ -147,7 +148,7 @@ serde = { version = "1", optional = true, features = ["derive"] }
# -------------------------------------------
# native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
egui-winit = { version = "0.25.0", path = "../egui-winit", default-features = false, features = [
egui-winit = { workspace = true, default-features = false, features = [
"clipboard",
"links",
] }
Expand All @@ -158,7 +159,7 @@ winit = { workspace = true, default-features = false, features = ["rwh_06"] }

# optional native:
directories-next = { version = "2", optional = true }
egui-wgpu = { version = "0.25.0", path = "../egui-wgpu", optional = true, features = [
egui-wgpu = { workspace = true, optional = true, features = [
"winit",
] } # if wgpu is used, use it with winit
pollster = { version = "0.3", optional = true } # needed for wgpu
Expand Down Expand Up @@ -237,5 +238,5 @@ web-sys = { version = "0.3.58", features = [
] }

# optional web:
egui-wgpu = { version = "0.25.0", path = "../egui-wgpu", optional = true } # if wgpu is used, use it without (!) winit
egui-wgpu = { workspace = true, optional = true } # if wgpu is used, use it without (!) winit
wgpu = { workspace = true, optional = true }
8 changes: 7 additions & 1 deletion crates/eframe/src/epi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,13 @@ pub struct IntegrationInfo {
/// `None` means "don't know".
pub system_theme: Option<Theme>,

/// Seconds of cpu usage (in seconds) of UI code on the previous frame.
/// Seconds of cpu usage (in seconds) on the previous frame.
///
/// This includes [`App::update`] as well as rendering (except for vsync waiting).
///
/// For a more detailed view of cpu usage, use the [`puffin`](https://crates.io/crates/puffin)
/// profiler together with the `puffin` feature of `eframe`.
///
/// `None` if this is the first frame.
pub cpu_usage: Option<f32>,
}
Expand Down
Loading

0 comments on commit edc227a

Please sign in to comment.