Skip to content

Commit

Permalink
Update to the latest version of egui, 0.27.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
tepperson2 committed Apr 25, 2024
1 parent 1cea394 commit 4bd6d17
Show file tree
Hide file tree
Showing 19 changed files with 811 additions and 593 deletions.
1,175 changes: 687 additions & 488 deletions Cargo.lock

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions egui-multiwin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "egui-multiwin"
version = "0.3.1"
version = "0.4.0"
description="A crate that allows for multiple windows with egui"
license = "MIT OR Apache-2.0"
edition = "2018"
Expand All @@ -13,12 +13,13 @@ repository = "https://github.com/uglyoldbob/egui-multiwin"
serde = ["egui/serde"]

[dependencies]
arboard = "3.2.1"
egui = "0.23"
egui_glow = { version = "0.23", features = ["winit", "links"]}
enum_dispatch = "0.3.12"
winit = "0.28.7"
glutin = "0.30.10"
arboard = "3.3.2"
egui = "0.27.2"
egui_glow = { version = "0.27.2", features = ["winit", "links"]}
enum_dispatch = "0.3.13"
winit = {version = "0.29.15", features = ["rwh_05"] }
glutin = "0.31.3"
lazy_static = "1.4.0"
raw-window-handle = "0.5.2"
thiserror = "1.0.40"
raw-window-handle = "0.6.0"
raw-window-handle-5 = { package = "raw-window-handle", version = "0.5.2" }
thiserror = "1.0.59"
9 changes: 6 additions & 3 deletions egui-multiwin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
//! custom structs.
//!
//! There are several examples (<https://github.com/uglyoldbob/egui-multiwin/tree/master/examples>) that show how to use this crate in your project.
//!
//!
//! The majority of the code is created by the pair of macros named [`multi_window`](macro.multi_window.html) and [`tracked_window`](macro.tracked_window.html)
//!
//! The main struct for this crate is defined by the [`multi_window`](macro.multi_window.html) macro.
//!
//! Generally you will create a struct for data that is common to all windows, implement the `CommonEventHandler` trait on it.
//!
//!
//! It will be useful to run `cargo doc --open` on your application to fully see the documentation for this module. This is because the majority of the code is generated by a pair of macros.
//!
//! See the examples in the repository for example applications that can be used to start your application.
Expand All @@ -32,7 +32,10 @@

use winit::window::WindowId;

pub use {arboard, egui, egui_glow, enum_dispatch, glutin, raw_window_handle, thiserror, winit};
pub use {
arboard, egui, egui_glow, enum_dispatch, glutin, raw_window_handle, raw_window_handle_5,
thiserror, winit,
};
pub mod multi_window;
pub mod tracked_window;

Expand Down
158 changes: 86 additions & 72 deletions egui-multiwin/src/multi_window.rs

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions egui-multiwin/src/tracked_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ use std::num::NonZeroU32;
use egui::NumExt;
use glutin::context::{NotCurrentContext, PossiblyCurrentContext};
use glutin::prelude::GlDisplay;
use glutin::prelude::{
NotCurrentGlContextSurfaceAccessor, PossiblyCurrentContextGlSurfaceAccessor,
};
use glutin::prelude::{NotCurrentGlContext, PossiblyCurrentGlContext};
use glutin::surface::GlSurface;
use glutin::surface::WindowSurface;
use thiserror::Error;
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2018"
publish = ["crates-io"]

[dependencies]
egui-multiwin = { version = "0.3.0", path = "../../egui-multiwin" }
egui-multiwin = { version = "0.4.0", path = "../../egui-multiwin" }
4 changes: 2 additions & 2 deletions examples/basic/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl AppCommon {

fn main() {
let mut event_loop = egui_multiwin::winit::event_loop::EventLoopBuilder::with_user_event();
let event_loop = event_loop.build();
let event_loop = event_loop.build().unwrap();
let mut multi_window: MultiWindow = MultiWindow::new();
multi_window.add_font(
"computermodern".to_string(),
Expand All @@ -47,5 +47,5 @@ fn main() {

let _e = multi_window.add(root_window, &mut ac, &event_loop);
let _e = multi_window.add(root_window2, &mut ac, &event_loop);
multi_window.run(event_loop, ac);
multi_window.run(event_loop, ac).unwrap();
}
2 changes: 1 addition & 1 deletion examples/clipboard/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2018"
publish = ["crates-io"]

[dependencies]
egui-multiwin = { version = "0.3.0", path = "../../egui-multiwin" }
egui-multiwin = { version = "0.4.0", path = "../../egui-multiwin" }
4 changes: 2 additions & 2 deletions examples/clipboard/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl AppCommon {

fn main() {
let mut event_loop = egui_multiwin::winit::event_loop::EventLoopBuilder::with_user_event();
let event_loop = event_loop.build();
let event_loop = event_loop.build().unwrap();
let mut multi_window: MultiWindow = MultiWindow::new();
multi_window.add_font(
"computermodern".to_string(),
Expand All @@ -46,5 +46,5 @@ fn main() {

let _e = multi_window.add(root_window, &mut ac, &event_loop);
let _e = multi_window.add(root_window2, &mut ac, &event_loop);
multi_window.run(event_loop, ac);
multi_window.run(event_loop, ac).unwrap();
}
2 changes: 1 addition & 1 deletion examples/customevent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2018"
publish = ["crates-io"]

[dependencies]
egui-multiwin = { version = "0.3.0", path = "../../egui-multiwin" }
egui-multiwin = { version = "0.4.0", path = "../../egui-multiwin" }
4 changes: 2 additions & 2 deletions examples/customevent/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl AppCommon {

fn main() {
let mut event_loop = egui_multiwin::winit::event_loop::EventLoopBuilder::with_user_event();
let event_loop = event_loop.build();
let event_loop = event_loop.build().unwrap();
let proxy = event_loop.create_proxy();
if let Err(e) = proxy.send_event(CustomEvent {
window: None,
Expand Down Expand Up @@ -94,5 +94,5 @@ fn main() {
if let Err(e) = multi_window.add(root_window2, &mut ac, &event_loop) {
println!("Failed to create popup window {:?}", e);
}
multi_window.run(event_loop, ac);
multi_window.run(event_loop, ac).unwrap();
}
2 changes: 1 addition & 1 deletion examples/customevent2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2018"
publish = ["crates-io"]

[dependencies]
egui-multiwin = { version = "0.3.0", path = "../../egui-multiwin" }
egui-multiwin = { version = "0.4.0", path = "../../egui-multiwin" }
3 changes: 2 additions & 1 deletion examples/customevent2/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,6 @@ fn main() {
println!("Failed to create popup window {:?}", e);
}
ac
});
})
.unwrap();
}
2 changes: 1 addition & 1 deletion examples/macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2018"
publish = ["crates-io"]

[dependencies]
egui-multiwin = { version = "0.3.0", path = "../../egui-multiwin" }
egui-multiwin = { version = "0.4.0", path = "../../egui-multiwin" }
3 changes: 2 additions & 1 deletion examples/macro/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@ fn main() {
}
ac
},
);
)
.unwrap();
}
2 changes: 1 addition & 1 deletion examples/super_basic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2018"
publish = ["crates-io"]

[dependencies]
egui-multiwin = { version = "0.3.0", path = "../../egui-multiwin" }
egui-multiwin = { version = "0.4.0", path = "../../egui-multiwin" }
3 changes: 2 additions & 1 deletion examples/super_basic/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,6 @@ fn main() {
println!("Failed to create main window {:?}", e);
}
ac
});
})
.unwrap();
}
2 changes: 1 addition & 1 deletion examples/vsync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2018"
publish = ["crates-io"]

[dependencies]
egui-multiwin = { version = "0.3.0", path = "../../egui-multiwin" }
egui-multiwin = { version = "0.4.0", path = "../../egui-multiwin" }
4 changes: 2 additions & 2 deletions examples/vsync/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl AppCommon {

fn main() {
let mut event_loop = egui_multiwin::winit::event_loop::EventLoopBuilder::with_user_event();
let event_loop = event_loop.build();
let event_loop = event_loop.build().unwrap();
let mut multi_window: MultiWindow = MultiWindow::new();
multi_window.add_font(
"computermodern".to_string(),
Expand All @@ -47,5 +47,5 @@ fn main() {

let _e = multi_window.add(root_window, &mut ac, &event_loop);
let _e = multi_window.add(root_window2, &mut ac, &event_loop);
multi_window.run(event_loop, ac);
multi_window.run(event_loop, ac).unwrap();
}

0 comments on commit 4bd6d17

Please sign in to comment.