Platform-specific Command
implementations
#1019
Merged
+556
−323
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a platform-specific
Action
as an underlying implementation ofCommand
to bothiced_native
andiced_web
.This allows us to remove the
Clipboard
fromApplication::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 toApplication::update
, but instead leveraging theCommand
API.As a consequence, the clipboard should be accessed by using the new
read
andwrite
functions in the newclipboard
module.Furthermore, I have added actions for interacting with the application window at runtime. The new
move_to
andresize
functions in thewindow
module can be leveraged for this purpose.More actions coming soon!
Fixes #493.
Fixes #644.
Fixes #767.
Closes #930.