Commit graph

133 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
6ab4611a6e
Invalidate widget tree from Responsive widget
... by introducing a new `invalidate_widgets` method to `Shell`
2022-01-11 13:47:43 +07:00
Héctor Ramón Jiménez
0648d9d234
Fix imports in application modules 2021-11-29 14:43:07 +07:00
Andreas Hofstadler
08c771fa70
Allow Application::run to return on native platforms 2021-11-29 14:41:05 +07:00
Imbris
b89d3bed5c Fix a few doc links 2021-11-17 12:08:52 -05:00
Héctor Ramón Jiménez
be97a5d502
Introduce mouse_interaction method to Widget trait 2021-10-18 16:43:18 +07:00
Héctor Ramón Jiménez
03b3493138
Remove trait-specific draw logic in iced_native 2021-10-14 16:07:22 +07:00
Héctor Ramón Jiménez
c0ab988842
Revert system menus support
The current implementation has some important issues on Windows. We will reintroduce the feature once we figure them out!

I have kept some of the changes in #945, like the new `keyboard::Modifiers` powered by `bitflags`.
2021-09-15 15:31:40 +07:00
Héctor Ramón Jiménez
7cb6e7438f
Implement move_to and resize commands for window 2021-09-02 16:30:14 +07:00
Héctor Ramón Jiménez
c9711ff48f
Handle clipboard::Action in iced_winit shell 2021-09-02 13:46:01 +07:00
Héctor Ramón Jiménez
76698ff2b5
Make Command implementations platform-specific
This allows us to introduce a platform-specific `Action` to both `iced_native`
and `iced_web` and remove the `Clipboard` from `Application::update` to maintain
purity.

Additionally, this should let us implement further actions to let users query
and modify the shell environment (e.g. window, clipboard, and more!)
2021-09-02 13:29:34 +07:00
Héctor Ramón Jiménez
acc47a5953
Rename SwapChainError to SurfaceError in iced_graphics 2021-08-25 15:42:35 +07:00
Héctor Ramón Jiménez
fe0de182c5
Remove SwapChain associated type from Compositor 2021-08-20 20:32:04 +07:00
Poly
18753b77fc wgpu: Update to 0.10 2021-08-19 03:06:38 +02:00
Héctor Ramón Jiménez
7337ab63bc
Introduce explicit id field to Settings
... and use it to set the application id of the window on Unix systems, instead of relying on the title of the application.
2021-08-11 19:48:55 +07:00
Billy Messenger
e5010b8ab8 redo custom error for Compositor::draw() 2021-07-22 13:23:36 -05:00
Billy Messenger
a7d2834a6d add custom error for Compositor::draw() 2021-07-22 13:08:13 -05:00
Billy Messenger
e822f654e4 Merge branch 'master' of https://github.com/hecrj/iced into wgpu_outdatedframe 2021-07-22 12:37:39 -05:00
Héctor Ramón Jiménez
c8ac77e4e9
Write documentation for menu method in Application 2021-07-19 21:05:16 +07:00
Héctor Ramón Jiménez
6221adf2b1
Draft conversion::menu_message in iced_winit
... and wire it up to the runtime loop
2021-07-13 20:55:21 +02:00
Héctor Ramón Jiménez
31997d255f
Store and synchronize Menu in application::State 2021-07-12 22:28:18 +02:00
Richard
9fc5ad23ed Initial menu implementation 2021-07-05 16:24:10 -03:00
Richard
612585109f
Use winit and glutin forks in iced-rs org 2021-06-25 14:15:11 +02:00
Richard
96a462d2f2
Use new enum variant and new winit repo 2021-06-25 14:14:03 +02:00
Richard
9ae22b58d8
Added events for url handling and create example 2021-06-25 14:14:03 +02:00
Héctor Ramón
3840b75bea Provide compatible_surface in iced_wgpu::Compositor 2021-05-05 14:33:30 +07:00
Héctor Ramón Jiménez
67db13ff7c Add support for graceful exits in Application
- `Settings` now contains an `exit_on_close_request` field
- `Application` has a new `should_exit` method
2021-03-30 21:44:19 +02:00
Héctor Ramón Jiménez
1207afa7d0 Skip redrawing if window has no surface 2021-03-26 14:46:19 +01:00
Héctor Ramón Jiménez
d66a34b272 Convert ScaleFactorChanged into Resized events in iced_winit
... instead of just dropping them when calling `to_static`.
2021-03-24 04:59:13 +01:00
Héctor Ramón Jiménez
ae517b9fa0 Add clipboard argument to Application::update 2021-03-11 03:38:20 +01:00
Héctor Ramón Jiménez
21971e0037 Make Clipboard argument in Widget trait mutable 2021-03-10 01:59:02 +01:00
Héctor Ramón Jiménez
b22b0dd7ff Update window_clipboard to 0.2 2021-03-10 01:16:26 +01:00
Billy Messenger
4e391013c8 don't panic when swapchain frame is outdated 2020-12-16 10:03:51 -06:00
Héctor Ramón Jiménez
01322f69a4 Use recently stabilized intra-doc links
See RFC: https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md
2020-11-26 02:05:43 +01:00
Héctor Ramón Jiménez
bf2d2561b8 Batch event processing in UserInterface::update 2020-11-12 02:51:26 +01:00
Héctor Ramón Jiménez
69c50c8511 Introduce event::Status to Subscription 2020-11-12 02:22:22 +01:00
Héctor Ramón Jiménez
33d80b5a0b Return event::Status in UserInterface::update 2020-11-12 02:00:08 +01:00
Héctor Ramón Jiménez
631c9e4a21 Write missing documentation in iced_winit 2020-11-06 02:25:56 +01:00
Héctor Ramón Jiménez
e966cd5b59 Remove a bit of code duplication in both shells 2020-11-05 04:50:57 +01:00
Héctor Ramón Jiménez
d5a15419e9 Drop UserInterface manually after exit request 2020-11-05 04:13:09 +01:00
Héctor Ramón Jiménez
6619fab044 Update iced_glutin with new event loop logic 2020-11-05 04:09:40 +01:00
Héctor Ramón Jiménez
88993fb092 Relayout UserInterface on resize in iced_winit 2020-11-05 04:09:40 +01:00
Héctor Ramón Jiménez
86b26f65d6 Handle event loop ControlFlow in iced_winit 2020-11-05 04:09:40 +01:00
Héctor Ramón Jiménez
fee46fd653 Introduce application::State in iced_winit 2020-11-05 04:09:40 +01:00
Héctor Ramón Jiménez
ed2b9a91b4 Initialize runtime values in application::run 2020-11-05 04:09:40 +01:00
Héctor Ramón Jiménez
ee38b04d8b Use static noop Waker in application::run 2020-11-05 04:09:40 +01:00
Héctor Ramón Jiménez
c153d11aa6 Draft strategy to reuse view result in event loop 2020-11-05 04:09:31 +01:00
Héctor Ramón Jiménez
c1f79b40cf Make Application and Sandbox return a Result 2020-09-08 00:44:59 +02:00
Héctor Ramón Jiménez
72f89ba77f Fix cursor position after a CursorLeft event 2020-08-25 01:39:54 +02:00
Héctor Ramón Jiménez
4030326a35 Handle ScaleFactorChanged in iced_winit 2020-07-16 18:18:36 +02:00
Héctor Ramón Jiménez
f30a666dc8 Decouple cursor_position from Cache
Instead, we ask explicitly for it in the different `update` and `draw` methods.
This way, the runtime can derive the logical position of the cursor from
the source of truth.
2020-06-23 06:44:34 +02:00