Rewrite WINGs wfont.c in Rust #9

Merged
trurl merged 14 commits from trurl/wmaker:refactor/wings-rs-font into refactor/wings-rs 2025-12-15 12:36:08 -05:00

14 Commits

Author SHA1 Message Date
9444c56e15 Name arguments directly instead of aping the Google C++ style guide. 2025-12-15 12:34:51 -05:00
3a9ea4f0c7 Add new Rust source files to Makefile.am.
Forgot to do this earlier.
2025-11-24 07:56:46 -05:00
abf49492c8 Rewrite all functions from WINGs wfont.c in Rust.
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.
2025-11-23 16:16:02 -05:00
f2f961ff1e Make WINGs configuration visible from Rust. 2025-11-23 16:03:53 -05:00
6a18ba06d5 Fix build order issues by moving wings-rs/ into WINGs/.
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.
2025-11-23 15:58:21 -05:00
50dad6d86e Ignore target dir for nested Cargo subdirs, too. 2025-11-23 15:49:33 -05:00
dc0179fe24 Tweak build so that WINGsP.rs gets generated at the right time. 2025-11-23 14:52:10 -05:00
8457fd61f0 Put the font and y (ascent) fields of W_Font behind accessors. 2025-11-23 12:48:16 -05:00
db94395ecc Mark wings-rs as a staticlib. 2025-11-23 12:44:11 -05:00
ad6df25960 Use bindgen to generate Rust bindings for WINGs types.
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.
2025-11-16 17:23:48 -05:00
72181e4345 Remove unused functions WMSetWidgetDefaultFont, WMSetWidgetDefaultBoldFont. 2025-11-14 01:15:08 -05:00
b0d49171eb Remove unused function WMCopyFontWithStyle. 2025-11-14 01:10:37 -05:00
897233cb1d Remove unused function WMIsAntialiasingEnabled. 2025-11-14 01:09:34 -05:00
50caed30c0 Add a wings-rs crate for porting WINGs proper to Rust. 2025-11-14 01:07:40 -05:00