Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform-specific Command implementations #1019

Merged
merged 9 commits into from
Sep 13, 2021
Merged

Platform-specific Command implementations #1019

merged 9 commits into from
Sep 13, 2021

Conversation

hecrj
Copy link
Member

@hecrj hecrj commented Sep 2, 2021

This PR introduces a platform-specific Action as an underlying implementation of Command to both iced_native and iced_web.

This allows us to remove the Clipboard from Application::update and keep it side-effect free (i.e. pure). Additionally, this should let us implement further actions to let users query and modify the shell environment (e.g. window, clipboard, and more!) without introducing more arguments to Application::update, but instead leveraging the Command API.

As a consequence, the clipboard should be accessed by using the new read and write functions in the new clipboard module.

Furthermore, I have added actions for interacting with the application window at runtime. The new move_to and resize functions in the window module can be leveraged for this purpose.

More actions coming soon!

Fixes #493.
Fixes #644.
Fixes #767.
Closes #930.

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!)
@hecrj hecrj added the feature New feature or request label Sep 2, 2021
@hecrj hecrj added this to the 0.4.0 milestone Sep 2, 2021
@hecrj hecrj mentioned this pull request Sep 4, 2021
@hecrj hecrj merged commit 93fec8d into master Sep 13, 2021
@hecrj hecrj deleted the command-actions branch September 13, 2021 04:49
@hecrj hecrj mentioned this pull request Sep 29, 2021
@fenhl fenhl mentioned this pull request Nov 23, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
2 participants