egui/examples
Will Brown c075053391
Add external eventloop support (#6750)
<!--
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>
2025-04-29 12:09:23 +02:00
..
confirm_exit Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
custom_3d_glow Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
custom_font Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
custom_font_style Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
custom_keypad Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
custom_style Enable more clippy lints (#6853) 2025-04-24 17:32:50 +02:00
custom_window_frame Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
external_eventloop Add external eventloop support (#6750) 2025-04-29 12:09:23 +02:00
external_eventloop_async Add external eventloop support (#6750) 2025-04-29 12:09:23 +02:00
file_dialog Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
hello_android Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
hello_world Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
hello_world_par Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
hello_world_simple Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
images Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
keyboard_events Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
multiple_viewports Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
popups Add `Popup` and `Tooltip`, unifying the previous behaviours (#5713) 2025-02-18 15:53:07 +01:00
puffin_profiler Enable more clippy lints (#6853) 2025-04-24 17:32:50 +02:00
screenshot Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
serial_windows Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
user_attention Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
README.md examples/README.md: explain that the examples are for master 2023-02-08 20:34:43 +01:00
run_all.sh Fix up some examples (#3614) 2023-11-23 12:58:44 +01:00

README.md

egui and eframe examples

All the examples in this folder uses eframe to set up a window for egui. Some examples are specific to eframe, but many are applicable to any egui integration.

There are a lot more examples at https://www.egui.rs, and it has links to the source code of each example.

Also check out the official docs at https://docs.rs/egui and https://docs.rs/eframe.

Note that all the examples on master are for the latest master version of egui.

If you want to look for examples for a specific version of egui, go to that tag, e.g. https://github.com/emilk/egui/tree/latest/examples.