-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(api): add SERIALIZE_TO_IPC_FN
const and implement it for dpi types, add more constructors
#11191
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
Merged
Merged
feat(api): add SERIALIZE_TO_IPC_FN
const and implement it for dpi types, add more constructors
#11191
Changes from 11 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
bee00b4
feat(api): add `toIpc` method on dpi types, add more constructors
amrbashir 93177b7
Update api-toIpc.md
amrbashir db2f2d3
Update api-toIpc.md
amrbashir c58811a
implment `toJSON` instead
amrbashir e795c8c
bring back toIPC to fix isolation
amrbashir f241ce3
bundle
amrbashir 9f2d412
fix isolation
amrbashir 27117b9
Merge branch 'dev' into feat/api/dpi-toIpc
amrbashir d88aa47
review suggestions
amrbashir ff11a44
Update .changes/api-dpi-toJSON-toIPC.md
amrbashir dcd4089
Update .changes/api-dpi-toJSON-toIPC.md
amrbashir aaf301f
Update packages/api/src/window.ts
amrbashir 4ed949d
fmt
amrbashir ef145ab
Update packages/api/src/window.ts
amrbashir aed5d67
Update crates/tauri/scripts/process-ipc-message-fn.js
amrbashir 77fce45
use `ToIPCSymbol` to define the special function
amrbashir efb1728
rename
amrbashir eb877b0
Merge branch 'dev' into feat/api/dpi-toIpc
lucasfernog 6e79d48
rename ToIPCKey to SERIALIZE_TO_IPC_FN
lucasfernog 744f4bc
use toIPC mechanism for channels, fix bug checking `null`
lucasfernog 4ed185f
Add `Size` and `Position` dpi types
amrbashir b01da7f
fix menu and submenu popup
amrbashir 258fe72
Merge branch 'dev' into feat/api/dpi-toIpc
amrbashir 6ffa222
revert channel change
lucasfernog 890723b
typo
lucasfernog bc08c82
Merge branch 'dev' into feat/api/dpi-toIpc
lucasfernog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@tauri-apps/api": "minor:enhance" | ||
--- | ||
|
||
Improved support for `dpi` module types to allow these types to be used without manual conversions with `invoke`: | ||
|
||
- Added `toIPC` method on `PhysicalSize`, `PhysicalPosition`, `LogicalSize` and `LogicalPosition` to convert it into a valid IPC-compatible value that can be deserialized correctly on the Rust side into its equivalent struct. | ||
- Implemented `toJSON` method on `PhysicalSize`, `PhysicalPosition`, `LogicalSize` and `LogicalPosition` that calls the new `toIPC` method, so `JSON.stringify` would serialize these types correctly. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.