We will use these to port W_Font, W_Screen, etc., to Rust.
Bindings are regenerated whenever the relevant C source files change and then
patched to make sure they will build. This is a bit hacky but will serve our
purposes: the struct definitions should be migrated to Rust sooner rather than
later, so the hackishness should be transient.
Having wings-rs depend on WINGs/WINGs/WINGsP.h was not working very well if all
of WINGs/ had to be built before wings-rs/. Moving wings-rs/ into WINGs/
addresses this.
This starts to establish the structure for an in-place rewrite of WINGs. An
actual redesign of WINGs may follow, but for now there are no plans to alter the
structure of WINGs substantially.
trurl
requested review from cross 2025-11-23 16:29:36 -05:00
Instead of the comments, why not give these proper names via `let` bindings?
```rust
let ignore_scalable = 0;
let complete = 0;
unsafe { x11::xft::XftXlfdParse(name.as_ptr(), ignore_scalable, complete) }
...
```
This is certainly an improvement! I'm a bit surprised there aren't crates providing better bindings to both Xft and pango, but that's a separate matter.
This is certainly an improvement! I'm a bit surprised there aren't crates providing better bindings to both Xft and pango, but that's a separate matter.
There are crates that provide pango bindings, but there's some weird provenance (https://github.com/yeslogic/fontconfig-rs/issues/52), and nothing seems like a drop-dead obvious thing to drop into the existing WINGs API.
Switching to a dedicated Xft/Pango crate, or something else entirely for managing fonts and drawing to the screen (to provide independence from X11), is definitely in the cards.
There are crates that provide pango bindings, but there's some weird provenance (https://github.com/yeslogic/fontconfig-rs/issues/52), and nothing seems like a drop-dead obvious thing to drop into the existing WINGs API.
Switching to a dedicated Xft/Pango crate, or something else entirely for managing fonts and drawing to the screen (to provide independence from X11), is definitely in the cards.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This is a step towards getting rid of all uses of WMHashTable and, more importantly, a first crack at rewriting WINGs itself.
y(ascent) fields of W_Font behind accessors. 8457fd61f0@@ -0,0 +41,4 @@NonNull::new(unsafe {x11::xft::XftXlfdParse(name.as_ptr(),/*ignore_scalable=*/ 0,Instead of the comments, why not give these proper names via
letbindings?I like the Google C++ style guide's prescription on this, but we don't have a lint, so... sure.
This is certainly an improvement! I'm a bit surprised there aren't crates providing better bindings to both Xft and pango, but that's a separate matter.
There are crates that provide pango bindings, but there's some weird provenance (https://github.com/yeslogic/fontconfig-rs/issues/52), and nothing seems like a drop-dead obvious thing to drop into the existing WINGs API.
Switching to a dedicated Xft/Pango crate, or something else entirely for managing fonts and drawing to the screen (to provide independence from X11), is definitely in the cards.