Rewrite WMFontPanel in Rust #25

Open
trurl wants to merge 10 commits from trurl/wmaker:refactor/font-panel-in-rust into refactor/riir
Owner

WMFontPanel is not actually used anywhere, but rewriting it in Rust is a helpful way to show progress that we are making towards porting higher-level WINGs constructs. It is also one of the few places where WMHashMap is used, so porting it helps towards the goal of reducing the size of WUtils.

This passes a basic rendering test. I have played around with it a little bit in Xephyr, and it looks like it is basically doing the right thing. Future work on playing back interactions in a snapshot test should help to shake out bugs whenever we get around to fixing them.

WMFontPanel is not actually used anywhere, but rewriting it in Rust is a helpful way to show progress that we are making towards porting higher-level WINGs constructs. It is also one of the few places where WMHashMap is used, so porting it helps towards the goal of reducing the size of WUtils. This passes a basic rendering test. I have played around with it a little bit in Xephyr, and it looks like it is basically doing the right thing. Future work on playing back interactions in a snapshot test should help to shake out bugs whenever we get around to fixing them.
trurl added 8 commits 2026-04-04 12:46:25 -04:00
This accounts for a bugfix in array iteration, which had been causing font entries to be duplicated.
This is needed so that bindgen cann refer to the enum properly when generating a corresponding Rust type.
This is still a mess, but it's not all in one big line now.

Going forward, commits that need new bindgen functions and types should put them on their own lines. That will make it easier to figure out which commit introduced the use of a given symbol.
This is a macro in C, and it would be helpful to be able to do the same thing in Rust. It is simply ported over as a Rust function.
This was originally a macro in C. We reimplement it as a Rust function.
Porting WINGs widgets to Rust will require using some WINGs abstractions. One of them is the base widget type, which is implemented by giving all widgets a common layout (with the first few fields always being the same basic types).

We don't need access to all of the information in these fields yet, so we only expose the widget's WMView.
trurl force-pushed refactor/font-panel-in-rust from abdbfbdecb to 78569f6030 2026-04-05 11:47:12 -04:00 Compare
trurl force-pushed refactor/font-panel-in-rust from 78569f6030 to 0772b42dca 2026-04-05 12:54:46 -04:00 Compare
trurl force-pushed refactor/font-panel-in-rust from 0772b42dca to c4ac2c7e11 2026-04-05 20:02:34 -04:00 Compare
trurl force-pushed refactor/font-panel-in-rust from c4ac2c7e11 to 8af54c3a98 2026-04-05 20:41:14 -04:00 Compare
trurl force-pushed refactor/font-panel-in-rust from 8af54c3a98 to c51aab0f15 2026-04-05 20:44:51 -04:00 Compare
trurl force-pushed refactor/font-panel-in-rust from c51aab0f15 to e2f84aea25 2026-04-05 20:53:05 -04:00 Compare
trurl force-pushed refactor/font-panel-in-rust from e2f84aea25 to 2f623e433d 2026-04-05 20:59:46 -04:00 Compare
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u refactor/font-panel-in-rust:trurl-refactor/font-panel-in-rust
git checkout trurl-refactor/font-panel-in-rust
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vitrine/wmaker#25