feat(core): add mult-window support#1217
Conversation
tauri.conf.json to multiple windows| #[serde(default)] | ||
| pub url: WindowUrl, | ||
| /// The horizontal position of the window's top left corner | ||
| pub x: Option<f64>, |
There was a problem hiding this comment.
I think we should accept usize for these and convert them to i64 on the wry side. I can't think of a scenario where you'd actually pass a non integer so it makes more sense to accept an integer imo, it will save people from having to add the .0, which could be confusing for those unfamiliar with Rust and statically typed languages.
There was a problem hiding this comment.
I was just following the wry interface. We should follow the same convention.
This is the tauri.conf.json stuff and the deserialization would also work with integers. The only real issue regarding this would be the Rust API to create windows, but I can also change that to accept both usize and f64.
There was a problem hiding this comment.
I think that Wry itself should take usizes, but if Tauri accepts either that's ok too.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
fix: #xxx[,#xxx], where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
This PR adds multi-window support to Tauri. Check out the new example:
$ cd tauri $ cargo run --example multiwindowFor now the windows can be configured on
tauri.conf.jsonbut a Rust API will be provided soon on the AppBuilder struct.The window API will be improved on a subsequent PR, with the event system refactored to simplify multi-window usage and APIs to manipulate the windows.