mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
<!-- Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md) before opening a Pull Request! * Keep your PR:s small and focused. * The PR title is what ends up in the changelog, so make it descriptive! * If applicable, add a screenshot or gif. * If it is a non-trivial addition, consider adding a demo for it to `egui_demo_lib`, or a new example. * Do NOT open PR:s from your `master` branch, as that makes it hard for maintainers to test and add commits to your PR. * Remember to run `cargo fmt` and `cargo clippy`. * Open the PR as a draft until you have self-reviewed it and run `./scripts/check.sh`. * When you have addressed a PR comment, mark it as resolved. Please be patient! I will review your PR, but my time is limited! --> * Closes #2875 * Closes https://github.com/emilk/egui/pull/3340 * [x] I have followed the instructions in the PR template Adds `create_native`. Similiar to `run_native` but it returns an `EframeWinitApplication` which is a `winit::ApplicationHandler`. This can be run on your own event loop. A helper fn `pump_eframe_app` is provided to pump the event loop and get the control flow state back. I have been using this approach for a few months. --------- Co-authored-by: Will Brown <opensource@rebeagle.com>
36 lines
737 B
TOML
36 lines
737 B
TOML
[package]
|
|
name = "external_eventloop_async"
|
|
version = "0.1.0"
|
|
authors = ["Will Brown <opensource@rebeagle.com>"]
|
|
license = "MIT OR Apache-2.0"
|
|
edition = "2021"
|
|
rust-version = "1.84"
|
|
publish = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
linux-example = []
|
|
|
|
[[bin]]
|
|
name = "external_eventloop_async"
|
|
required-features = ["linux-example"]
|
|
|
|
[dependencies]
|
|
eframe = { workspace = true, features = [
|
|
"default",
|
|
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
|
|
] }
|
|
|
|
env_logger = { version = "0.10", default-features = false, features = [
|
|
"auto-color",
|
|
"humantime",
|
|
] }
|
|
|
|
log = { workspace = true }
|
|
|
|
winit = { workspace = true }
|
|
|
|
tokio = { version = "1", features = ["rt", "time", "net"] }
|