Konkitoman
8ecd29dea7
eframe: Now WGPU implementation when creating a sync viewport will inherit the icon of his parent
...
And refactoring and adding some inline documentation
2023-09-20 18:56:38 +03:00
Konkitoman
915d1b6997
Add ViewportIdPair, Viewport, ViewportOutput
2023-09-19 17:55:54 +03:00
Konkitoman
c96197db79
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-19 17:22:31 +03:00
Barugon
c07394b576
Only show on-screen-keyboard and IME when editing text ( #3362 )
...
* Remove calls to `set_ime_allowed`
* Allow IME if `text_cursor_pos` is `Some`
* Only call `Window::set_ime_allowed` when necessary
* allow_ime doesn't need to be atomic
* Remove unused imports
* Fix assignment
2023-09-19 14:14:42 +02:00
Sebastian Reinhard
433d1fc239
file_storage: Wrap File in BufWriter ( #3353 )
...
When exiting my application, it would freeze for around a minute waiting to finish writing ca. 40MB to file storage.
Some quick profiling revealed that it was spending all that time in `File::write`,
presumably making a large number of system calls writing tiny amounts of data at a time.
We can avoid this by buffering writes using a `BufWriter`, just like we already do with `BufReader`.
With this change, my application takes around 1-2 seconds to exit, with the majority of that time spent serializing `ron`.
I'm sure there are further potential performance improvements there, but this is already an order of magnitude or two better.
I also fixed the call to `log::warn!`, which was using incorrect formatting syntax and not including the error message.
2023-09-18 16:40:29 +02:00
aspect
9c4f55b1f4
Remove Function() invocation from eframe text_agent to bypass "unsafe-eval" restrictions in Chrome browser extensions. ( #3349 )
...
* remove Function (eval) from eframe text agent for compatibility with browser extensions.
* cargo fmt on image viewer
2023-09-17 13:25:50 +02:00
Emil Ernerfeldt
4b5146d35d
Add more profiling scopes ( #3332 )
2023-09-13 19:32:19 +02:00
Emil Ernerfeldt
fc3bddd0cf
Add more puffin profile scopes to eframe ( #3330 )
...
* Add puffin profile scopes to the startup and running of eframe
* puffin_profiler example: start puffin right away
* cargo format let-else statements
* More profile scopes
* Add some `#[inline]`
* Standardize puffin profile scope definitions
* standardize again
* Silence warning when puffin is disabled
2023-09-13 09:00:38 +02:00
Konkitoman
fc90a7e7c8
Fix cyclical reference
...
Removed the last fix because there is not need for it now!
2023-09-11 18:50:17 +03:00
Konkitoman
956c1c3527
Fix memory leak
2023-09-10 15:33:06 +03:00
Konkitoman
a5d4ce84d4
Now eframe glow supports viewport sync icon
2023-09-06 19:16:20 +03:00
Konkitoman
fb80880ff8
* Fix posibile deadlock when sending a viewport command from a sync viewport
...
* Improve viewports example
2023-09-06 16:30:20 +03:00
Konkitoman
b1189c14ae
Now when creating a async viewport, if we not spefify the icon will have his parent icon
2023-09-06 15:58:41 +03:00
Konkitoman
83f82601e8
* Fix warnings
...
* Refactor eframe wgpu
2023-09-06 15:18:18 +03:00
Konkitoman
fea6ed7878
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-06 13:35:02 +03:00
Emil Ernerfeldt
82704bebbf
Update MSRV to Rust 1.70.0 ( #3310 )
...
* Update to Rust 1.70
* Fix renamed clippy lint
* Use let-else more
* Code cleanup
* Remove derelict Safety comments
* Enable more clippy lints
2023-09-06 07:59:24 +02:00
Konkitoman
e44c2e6928
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-05 16:19:41 +03:00
Emil Ernerfeldt
67168be069
Improve clippy, and add more docs ( #3306 )
...
* Silence a few clippy warnings
* Use named threads
* Remove some deprecated functions
* Document Context and Ui fully
* Use `parking_lot::Mutex` in `eframe`
* Expand clippy.toml files
* build fix
2023-09-05 14:11:22 +02:00
Konkitoman
f30bf519ee
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-05 12:19:02 +03:00
Barugon
1b8e8cb38e
eframe::Frame::info returns a reference (#3301 )
...
* Get a reference to `IntegrationInfo`
* Add doc comment
* Change `info` to return a reference
* Clone integration info
* Remove `&`
* Clone integration info in another place
2023-09-05 10:43:39 +02:00
Konkitoman
7c4a85ebda
Now in ViewportBuilder, InputState, RawInput: viewport_inner_pos, viewport_outer_pos, viewport_inner_size, viewport_outer_size are stored as inner_pos, outer_pos, inner_size, outer_pos and Now every (i32, i32) is stored as egui::Pos2
...
Addes some documentation
2023-09-04 14:23:21 +03:00
Konkitoman
4a9e087e92
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-04 13:39:08 +03:00
Emil Ernerfeldt
5f742b9aba
Improve documentation of eframe, especially for wasm32 ( #3295 )
...
* Improve documentation of `eframe`, especially for wasm32
* remove dead code
* fix
2023-09-04 09:55:47 +02:00
Konkitoman
4eb32c6ccf
Simplify
2023-09-01 12:09:01 +03:00
Konkitoman
661120dc1d
Simplify
2023-09-01 11:52:00 +03:00
Konkitoman
c10a4cd79a
Fix: First frame of Context::create_viewport_sync was always skiped because we didn't have a window to draw on!
...
Changes: Now Context::create_viewport_sync returns T, before was Option<T>
2023-08-31 17:07:39 +03:00
Konkitoman
6618a47c20
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-08-30 15:03:28 +03:00
Emil Ernerfeldt
70bfc7e09f
Add eframe::storage_dir ( #3286 )
...
* Add `eframe::storage_dir`
Now you can easily tell where eframe stores its state
* egui_plot: work even without the `serde` featur flag
2023-08-29 15:22:07 +02:00
Konkitoman
51011d1bbd
Fix: sync viewport was not updating on windows
...
Changes: no more manual calls to winit:🪟 :Window::request_redraw, in glow or wgpu
2023-08-29 11:01:19 +03:00
Konkitoman
a21cb80f56
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-08-29 10:00:14 +03:00
Konkitoman
4d01644b33
* Fix example hello_world_par
...
* Added warning for glow eframe when creating `Context::create_viewport_sync` in other thread, or cannot be rendered!
* Fix clippy warning
2023-08-25 11:22:18 +03:00
Antoine Beyeler
2c5fc5a0a5
Added mime field to DroppedFiles ( #3273 )
2023-08-23 15:13:47 +02:00
Konkitoman
3b41253442
This should make the viewport to redraw normaly in windows
2023-08-23 14:31:37 +03:00
Konkitoman
dadcd508c9
Fix deadlock when creating a viewport sync in a viewport sync
...
But will not affect anything because the viewport builders will processed when the async viewport will end
2023-08-23 07:18:16 +03:00
Konkitoman
189e34e3d2
Fix flickering for Context::create_viewport_sync but now will return a Option<T>
2023-08-23 06:20:31 +03:00
Konkitoman
3f8fe1db3a
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-08-23 06:10:34 +03:00
lucasmerlin
461328f54d
Fix iOS support in eframe ( #3241 )
...
* Fix the app only taking up half the screen size on iPad
* Fix request_repaint not working on iOS
* Always use run_and_exit on iOS since run_and_return is not supported by winit on iOS right now.
* Fix typo
* Fix eframe glow on ios
* Handle more cases
2023-08-22 14:35:18 +02:00
Konkitoman
7aefba60df
Fix windows and android errors
2023-08-22 11:20:34 +03:00
Konkitoman
8e864bdfbc
typo: fix typos
2023-08-22 11:08:56 +03:00
Konkitoman
ab59bf8c88
Now viewports will be identified by there id a normal egui::Id
...
Before viewports was identified by there title
2023-08-22 10:34:43 +03:00
Konkitoman
013f01dbcb
* Now: is_desktop can only be set at the creation with egui::Context::new insted of default!
...
* Removed: egui::Context::is_desktop, egui::Context::set_desktop
* Added: egui::Context::force_embedding, egui::Context::set_force_embedding
2023-08-22 09:39:41 +03:00
Konkitoman
2919a325d9
Fix Typo
2023-08-19 19:30:49 +03:00
Konkitoman
18575d5931
Fix all warnings
2023-08-15 04:04:52 +03:00
Konkitoman
191ee82c3e
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-08-15 02:17:12 +03:00
Konkitoman
08f207a0a8
Fix some warnings
2023-08-14 17:59:26 +03:00
lucasmerlin
1036cb1f7d
Change force to be Option<f32> instead of f32 ( #3240 )
2023-08-12 13:50:40 +02:00
Emil Ernerfeldt
6633ecce64
Fix wrong detection of OS ( #3238 )
...
We had a bunch of `cfg!(windows)` and `cfg!(macos)` which should
have been `cfg!(target_os = "windows")`.
I wonder what the effects of this PR will be fore Windows 😬
2023-08-12 13:50:31 +02:00
Konkitoman
d33075388c
* Implement changes_between_builders
...
* Now process_viewport_commands was renamed to process_viewports_commands
* Added process_viewport_commands
* eframe glutin backend uses changes_between_builders
2023-08-11 17:39:14 +03:00
Emil Ernerfeldt
dd417cfc1a
eframe: Better restore Window position on Mac when on secondary monitor ( #3239 )
2023-08-11 16:25:22 +02:00
Emil Ernerfeldt
08fb447fb5
Increase MSRV to 1.67 ( #3234 )
...
* Bump MSRV to 1.67
* clippy fixes
* cargo clippy: inline format args
* Add `clippy::uninlined_format_args` to cranky lints
* Fix clippy on wasm
* More clippy fixes
2023-08-11 13:54:02 +02:00