Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

[DRAFT] Port to vello and winit #56

Merged
merged 21 commits into from
Apr 19, 2024
Merged

[DRAFT] Port to vello and winit #56

merged 21 commits into from
Apr 19, 2024

Conversation

PoignardAzur
Copy link
Collaborator

@PoignardAzur PoignardAzur commented Apr 2, 2024

This PR tries to make Masonry work with Winit instead of druid_shell and Vello insteaf of Piet, while changing as little code as possible. It's very much a work in progress.

The general plan is to remove features that are too coupled with Vello/Winit to change seamlessly, document them here and when the PR is merged, create issues to explain what the plan is to re-introduce them.

Roadmap for this PR:

  • Replace Piet with Vello and Parley
    • Port paint methods of various widgets
    • Port WidgetPod and PaintCtx
    • Port test harness
    • Port Label widget
    • Port Image widget
    • Port TextBox widget
  • Replace druid_shell with Winit
    • Write new architecture
    • Port test harness
    • Remove features too coupled to port
    • Integrate Winit's EventLoop
  • Port examples
  • Run cargo clippy

@PoignardAzur
Copy link
Collaborator Author

I've opened linebender/xilem#337 to lay out a roadmap for text-handling, as per above.

@PoignardAzur
Copy link
Collaborator Author

Also, note to self: I need to add FontContext to GlobalPassCtx before this is merged.

Remove TextBox
Remove `text` module
Remove references to Piet
Update snapshot tests.
Update doc tests.
@PoignardAzur
Copy link
Collaborator Author

I've pushed the first version of the Winit port. Very experimental.

@PoignardAzur PoignardAzur marked this pull request as ready for review April 19, 2024 14:52
@PoignardAzur PoignardAzur merged commit 10c6de6 into main Apr 19, 2024
1 of 6 checks passed
github-merge-queue bot pushed a commit to linebender/xilem that referenced this pull request May 3, 2024
This brings in a lot of the old work from Druid and Masonry (prior to
linebender/masonry#56) on text, as well as some types from Glazier.

Needed work:
- [X] Text display using abstract types
- [x] Text selection with mouse
- [x] Text input with keyboard
- [ ] IME integration (of the kind winit understands)

Follow up work:
- [ ] Keyboard control of the selection area (hard-coded hotkeys)
- [ ] [Proper
placement](https://raphlinus.github.io/text/2020/10/26/text-layout.html#shaping-cluster)
of cursor
- [ ] Input methods
- [ ] Proper hotkey handling
- [ ] Copy and/or paste
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant