Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
290 commits
Select commit Hold shift + click to select a range
57bb227
fix(screen): make line drawing independent of the clip box
dpt Aug 28, 2026
0e37b42
fix(wuss): stop test tasks double-counting the scroll offset
dpt Aug 28, 2026
060d929
refactor(wuss): move wuss_idle declaration to wuss.h
dpt Aug 28, 2026
3d3dc34
refactor(wuss): split the task API out into wuss/task.h
dpt Aug 28, 2026
793d66e
refactor(geom): add size2d_t and use it for wuss window sizes
dpt Aug 28, 2026
93e7f1f
refactor(framebuf): use size2d_t for bitmap, screen and rect sizes
dpt Aug 28, 2026
78d6336
feat(wuss): draw interior rules between content and furniture
dpt Aug 28, 2026
74983d4
fix(wuss): invalidate the reserved furniture strip on resize
dpt Aug 28, 2026
62a9193
Merge pull request #6 from dpt/wuss-sharp
dpt Aug 28, 2026
229da8d
feat(wuss): add an animated Porter-Duff demo task to the wuss test
dpt Aug 28, 2026
2e67c4b
feat(wuss): scroll the opposite way on an Adjust-clicked scroll arrow
dpt Aug 28, 2026
fa65ea3
docs(wuss): rewrap the window and wuss headers, retitle the README se…
dpt Aug 28, 2026
bdb8288
fix(wuss)!: make mouse buttons flags so chords can be reported
dpt Aug 28, 2026
6e2c57f
docs(wuss): move wuss.md into a windowing directory
dpt Aug 28, 2026
8c0509d
docs(wuss): add a glossary
dpt Aug 28, 2026
5fa615d
feat(wuss)!: let a window set a minimum content extent
dpt Aug 28, 2026
61e1f7a
fix(wuss): track launcher running state in a separate array
dpt Aug 28, 2026
9c468a4
refactor(geom): add POINT and SIZE2D compound-literal macros
dpt Aug 28, 2026
fa735d7
fix(wuss): preserve pointer offset in resize-corner drag
dpt Aug 29, 2026
d99aa4e
docs: trim derivable build and module-layout notes from CLAUDE.md
dpt Aug 29, 2026
131d0e5
feat(wuss): add work-area icons
dpt Aug 29, 2026
43af586
fix(wuss): scroll work-area grid and axis rulers with the document
dpt Aug 29, 2026
63a6fde
feat(wuss): add wuss_icon_create_array for bulk icon creation
dpt Aug 29, 2026
85a004d
test(wuss): pad the image task with a border and min-doc floor
dpt Aug 29, 2026
ac5e5cc
refactor(wuss): pass the image path into image_create
dpt Aug 29, 2026
0b3bff9
feat(wuss): add wuss_window_create_placed for wuss-chosen positions
dpt Aug 29, 2026
3232d2d
refactor(wuss): let test tasks self-place via wuss_window_create_placed
dpt Aug 29, 2026
34962d7
feat(packer): add packer_set_gutter for spacing between located boxes
dpt Aug 29, 2026
316fd6d
feat(wuss): mark sofa-task vertices with white dots
dpt Aug 30, 2026
cbd4397
fix(screen): remove signed-overflow and negative-shift UB in wu fix8 …
dpt Aug 30, 2026
d6cf9d1
refactor(wuss): make launcher rows work-area button icons
dpt Aug 30, 2026
bac930d
feat(wuss): set an overall screen margin in window packer
dpt Aug 30, 2026
1afeb0d
refactor(wuss): give each launcher task per-instance heap state
dpt Aug 30, 2026
d6a6103
build(tools): add wrap_protos.py and rewrap overlong prototypes
dpt Aug 30, 2026
f679894
feat(screen): add screen_draw_ninepatch for resizable 9-patch frames
dpt Aug 30, 2026
52bc62f
docs: update CLAUDE.md build/test/style guidance
dpt Aug 30, 2026
7a0d2f6
feat(screen): add screen_NINEPATCH_NO_CENTRE flag
dpt Aug 30, 2026
8a741b0
docs: start CHANGELOG.md
dpt Aug 30, 2026
1d7d305
fix(wuss): release held icon when a window opens over it
dpt Aug 30, 2026
74faa65
fix(wuss): don't repaint blitted pixels when a drag slides one clean …
dpt Aug 30, 2026
277b4e8
docs: fill in CHANGELOG for changes since 62a9193
dpt Aug 30, 2026
b860d83
fix(wuss): don't raise window when dragging a scrollbar well
dpt Aug 30, 2026
834fa55
feat(wuss): make furniture and icon subsystems compile-time optional
dpt Aug 30, 2026
587bcc4
feat(wuss): pattern-fill work-area icons
dpt Aug 30, 2026
3a9a4bf
perf(framebuf): expand screen_fill_pattern tile rows to colour runs
dpt Aug 30, 2026
e00cabf
docs: fill in CHANGELOG for changes since 277b4e8
dpt Aug 30, 2026
fcdeb88
fix(screen): clamp ninepatch corners so they don't overlap on tiny boxes
dpt Aug 30, 2026
4d561b2
style(screen): group screen_fill_pattern declarations at top of scope
dpt Aug 30, 2026
57e3c71
fix(wuss): don't wedge oversized auto-placed windows at the origin
dpt Aug 30, 2026
55dc77d
refactor(wuss): share bevel/backdrop colour validation in wuss_create
dpt Aug 30, 2026
e82cb39
refactor(wuss): replace dead wuss__icon_screen_box with a shared tran…
dpt Aug 30, 2026
1ca951a
docs(wuss): correct the screen_copy_rect failure comment in window_move
dpt Aug 30, 2026
fea7015
docs: note the ninepatch corner-clamp fix in CHANGELOG
dpt Aug 30, 2026
671cb53
Merge pull request #7 from dpt/wuss-platypus
dpt Aug 30, 2026
00e84f9
fix(wuss): clamp scroll offset after a resize reveals past-extent con…
dpt Aug 30, 2026
dbcb811
feat(wuss): allow the desktop and window backgrounds to be a pattern …
dpt Aug 30, 2026
a418424
fix(wuss): keep a 2px gap at each end of the scrollbar well
dpt Aug 30, 2026
28023e5
refactor(wuss): drop PICO-8 dependency from the NULL-palette default …
dpt Aug 30, 2026
cbc02d0
feat(palettes): add define_wimp16_palette and a WUSS_PALETTE selector
dpt Aug 30, 2026
963f19e
fix(wuss): MENU on furniture should have no effect
dpt Aug 30, 2026
f971b87
fix(wuss): Fix missing text task content when scrolled horizontally
dpt Aug 31, 2026
be48120
docs(wuss): explain how redraw coordinate spaces relate
dpt Aug 31, 2026
7d4644e
refactor(wuss): split the text task's layout and rendering
dpt Aug 31, 2026
da29ca7
feat(bmtext): factor pixel-wrapped text layout into a library
dpt Aug 31, 2026
e9ce0ae
docs(readme): add Text section for txtfmt and bmtext
dpt Aug 31, 2026
d759a6c
refactor(wuss): extract the interactive demo into a standalone app
dpt Aug 31, 2026
88f9172
fix(framebuf): avoid undefined shifts flagged by UBSan
dpt Aug 31, 2026
b0e0f40
test(curve): cut headless frame count from 1000 to 100
dpt Aug 31, 2026
0c36e0a
fix(packer): reclaim released space exactly instead of fragmenting
dpt Aug 31, 2026
0f6c5ef
docs(packer): document packer_release and exact space reclaim
dpt Aug 31, 2026
7f4dc1c
docs: Update
dpt Aug 31, 2026
a28eecd
feat(wuss): add grouping-frame icon type and label justification
dpt Aug 31, 2026
16fb5d6
feat(wuss): add default action button styling for work-area buttons
dpt Aug 31, 2026
408df3f
feat(wuss): add radio and option button icons
dpt Aug 31, 2026
6018ff6
feat(wuss): add plain bitmap icons
dpt Aug 31, 2026
f1fba1b
feat(wuss): add menu-entry icons and hover tracking
dpt Aug 31, 2026
f19964c
feat(wuss): add WUSS_MENUS pop-up menu helper
dpt Aug 31, 2026
db6e02d
feat(wuss): add wuss_menu_create_from_desc descriptor parser
dpt Aug 31, 2026
e69f71a
feat(wuss): menu appearance fixes and screen_draw_dashed_line
dpt Aug 31, 2026
a50c2ba
fix(wuss): draw menu titlebars
dpt Aug 31, 2026
98b2dbb
feat(wuss): dashed menu items draw a rule above and stay pickable
dpt Aug 31, 2026
bfca212
feat(wuss): pluggable allocator via wuss_alloc_t
dpt Sep 1, 2026
2725cee
refactor(wuss): split wuss__icon_draw into per-type sub-functions
dpt Sep 1, 2026
0c38ad6
chore: path-relative header comments across all sources
dpt Sep 1, 2026
429bbab
perf(wuss): skip icon redraw on hover when appearance is hover-indepe…
dpt Sep 1, 2026
8d191a0
fix(wuss): re-resolve the hovered icon after a scroll
dpt Sep 1, 2026
8510756
perf(wuss): blit the still-valid content when a resize re-clamps the …
dpt Sep 1, 2026
5d95242
perf(wuss): blit un-occluded content on scroll when the window is not…
dpt Sep 1, 2026
4c54556
fix(wuss): clip scroll/resize blit repaint set to visible area
dpt Sep 1, 2026
8a65a20
feat(wuss): add Lissajous figure client
dpt Sep 1, 2026
ff7d341
refactor(wuss): use box lib primitives for icon/invalidate box ops
dpt Sep 1, 2026
def9ef9
feat(screen): add screen_draw_lines and unfilled screen_draw_rect
dpt Sep 1, 2026
143654d
refactor(wuss): route core->furniture calls through a dispatch table
dpt Sep 1, 2026
74d23fe
feat(wuss): make menu separators their own short inert row
dpt Sep 1, 2026
76aaee2
refactor(wuss): condense icon pressed/selected/hovered into a flags word
dpt Sep 1, 2026
94cdbf2
feat(screen): add 17-level Bayer dither fill patterns
dpt Sep 1, 2026
ecbb75d
refactor(wuss): show pattern swatches as a 16x16 grid
dpt Sep 1, 2026
d105a9d
feat(screen): use the full 8x8 65-level Bayer dither ramp
dpt Sep 1, 2026
9bcf4ad
feat(wuss): clamp windows so they can never grow larger than the screen
dpt Sep 1, 2026
c7322c4
fix(wuss): give menus an outline
dpt Sep 1, 2026
90418b0
fix(wuss): stop the menu outline cropping the last row
dpt Sep 1, 2026
b5561a6
Revert "fix(wuss): stop the menu outline cropping the last row"
dpt Sep 1, 2026
5689b2a
Revert "fix(wuss): give menus an outline"
dpt Sep 1, 2026
ccfdef5
fix(wuss): restore the Quit row in the app demo menu
dpt Sep 1, 2026
ea0413d
Reapply "fix(wuss): give menus an outline"
dpt Sep 1, 2026
158490f
Reapply "fix(wuss): stop the menu outline cropping the last row"
dpt Sep 1, 2026
a299ebc
refactor(wuss): make menu separators a flag on a real entry plus a RU…
dpt Sep 1, 2026
cdef3f7
fix(wuss): stop scroll blitting content over a mid-content occluder
dpt Sep 1, 2026
b1db2c6
fix(wuss): order scroll blit sub-pieces so one doesn't clobber anothe…
dpt Sep 1, 2026
1221497
docs(wuss): put icon enum/struct member docs before each member
dpt Sep 1, 2026
cddfdf8
refactor(wuss): replace the demo launcher window with a backdrop menu
dpt Sep 1, 2026
9d81727
refactor(wuss): validate icon type with a switch not a chain of !=
dpt Sep 1, 2026
8cff9e4
refactor(wuss): pass NULL for the unused width out-param of bmfont_ge…
dpt Sep 1, 2026
de20588
feat(wuss): add a 'Quit Wuss' task-menu entry that shuts the app down
dpt Sep 1, 2026
1b94b14
fix(wuss): close menu chain before invoking on_select
dpt Sep 1, 2026
dc90dc7
style(wuss): drop horizontal padding from menu rule lines
dpt Sep 1, 2026
0686a50
refactor(wuss): bunch g_* runtime statics into a single struct
dpt Sep 1, 2026
cd4fd21
fix(wuss): don't wheel-scroll windows that declared an axis non-scrol…
dpt Sep 1, 2026
ab85864
feat(wuss): scroll over-tall pop-up menus instead of cropping them
dpt Sep 1, 2026
631af4c
refactor(wuss): split pattern swatches out of icons task
dpt Sep 1, 2026
3d437ff
feat(wuss): add wuss_nearest_colour
dpt Sep 1, 2026
bdcfd36
fix(wuss): draw menu text in the nearest-black palette entry
dpt Sep 1, 2026
da8633d
refactor(wuss): common out ball invalidation box
dpt Sep 1, 2026
accb160
refactor(wuss): drop palette args from test-task constructors
dpt Sep 1, 2026
5c3bfff
refactor(wuss): table-drive the demo chrome palette, tidy task colour…
dpt Sep 1, 2026
259c0d5
fix(wuss): don't blit stale pixels when scrolls arrive faster than re…
dpt Sep 1, 2026
0ec6602
feat(wuss): swap the system palette mid-session
dpt Sep 1, 2026
fe6e083
refactor(wuss): sort the launch menu tasks by name
dpt Sep 1, 2026
27df2fd
fix(wuss): ignore the mouse-up that follows a menu-opening press
dpt Sep 2, 2026
b48fa28
docs(wuss): changelog the menu mouse-up fix
dpt Sep 2, 2026
7504222
docs: fill in CHANGELOG for changes since 671cb53d
dpt Sep 2, 2026
db8d9af
feat(wuss): allow a window as a menu sub-menu
dpt Sep 2, 2026
0b16dae
docs(wuss): changelog the window-as-submenu feature
dpt Sep 2, 2026
bc36e44
Merge pull request #8 from dpt/wuss-octopus
dpt Sep 2, 2026
161ddc5
refactor(wuss)!: make wuss_task a registered event target
dpt Sep 2, 2026
0bee48e
refactor(wuss)!: route all window events through wuss__deliver
dpt Sep 2, 2026
5b12cca
feat(wuss)!: veto-able PRE_SHOW and PRE_CLOSE window events
dpt Sep 2, 2026
b42797c
refactor(wuss)!: fold menu selection into the task handler
dpt Sep 2, 2026
52e3bca
test(wuss): migrate wuss-test to the registered-task event API
dpt Sep 2, 2026
fc65709
test(wuss): port the SDL task drivers to the registered-task API
dpt Sep 2, 2026
240bb7e
docs(wuss): changelog the event-dispatch rework
dpt Sep 2, 2026
017a936
fix(wuss): reap fire-and-forget tasks when their last window closes
dpt Sep 2, 2026
d92e438
feat(wuss): add a native RISC OS frontend for the interactive demo
dpt Sep 2, 2026
2f87040
feat(base): map result codes to strings
dpt Sep 2, 2026
6bf6235
feat(wuss): print result_string on error paths
dpt Sep 2, 2026
7152c96
fix(wuss): correct RISC OS screen-height read and hide OS cursors
dpt Sep 2, 2026
2637ce7
refactor(wuss): drop the daydream font from the demo
dpt Sep 2, 2026
b935153
feat(wuss): add a font picker menu to the Chars task
dpt Sep 2, 2026
c7e2748
feat(wuss): flash the picked menu row before delivering MENU_SELECT
dpt Sep 2, 2026
c045956
refactor(wuss): tidy up sofa proportions in demo task
dpt Sep 2, 2026
9c239f6
fix(wuss): keep a flashed menu row highlit if the pointer stays on it
dpt Sep 2, 2026
cd52d20
fix(wuss): avoid use-after-free re-picking a menu row mid-flash
dpt Sep 2, 2026
4053518
fix(wuss): reap the task node when a demo task fails to build its window
dpt Sep 2, 2026
b2494dd
fix(wuss): cache the next task before broadcasting IDLE / PALETTE
dpt Sep 2, 2026
2f9461f
feat(wuss): add wuss_set_backdrop to swap the desktop backdrop mid-se…
dpt Sep 2, 2026
319f2c8
fix(wuss): leave GARBAGE test junk on screen instead of wiping it
dpt Sep 2, 2026
5e37664
feat(screen): add inverse fill patterns and put the Bayer run first
dpt Sep 2, 2026
244cd2b
fix(wuss): draw radio/option state changes and menu ticks on click
dpt Sep 2, 2026
64ba979
fix(wuss): only act on Select clicks in task handlers, not Menu
dpt Sep 2, 2026
1836fbe
feat(wuss): add an analogue clock task
dpt Sep 2, 2026
f1dca91
feat(wuss): letter the clock face with bmfont numerals
dpt Sep 2, 2026
8551795
feat(screen): add circle outline and fill primitives
dpt Sep 2, 2026
a1fbcab
refactor(wuss): draw ball and clock bezel with screen circle primitives
dpt Sep 2, 2026
806e6b9
feat(wuss): wire up Shift-F1 screen-garbage input
dpt Sep 2, 2026
c093680
fix(wuss): stop the bouncing ball leaving a trail
dpt Sep 2, 2026
d70c40c
feat(wuss): randomise bouncing ball size and colour
dpt Sep 2, 2026
64015c9
feat(wuss): symbolic wuss_colour_t values for named and role colours
dpt Sep 2, 2026
6305038
refactor(wuss): fold nearest-black/white cache into the symbolic table
dpt Sep 3, 2026
1d99b25
feat(framebuf): add bitmap_draw_pattern for pattern-masked fills
dpt Sep 3, 2026
f057579
refactor(framebuf): unify pattern fills and rename raster-transfer op…
dpt Sep 3, 2026
76dddac
refactor(framebuf): align the three copy ops on result_t
dpt Sep 3, 2026
438c865
feat(framebuf): extract screen_fill_hline from screen_fill_rect
dpt Sep 3, 2026
f087eb3
refactor(framebuf): split per-pixel-format screen op bodies into helpers
dpt Sep 3, 2026
d271462
refactor(framebuf): route solid fills through a span->fill primitive
dpt Sep 3, 2026
9a3e85e
docs(framebuf): note screen_fill_hline wraps span->fill in the status…
dpt Sep 3, 2026
39a618a
feat(bmfont): add bmfont_enumerate to list fonts in a directory
dpt Sep 3, 2026
ff4792c
feat(wuss): add shared task components with a FontMenu
dpt Sep 3, 2026
25139c6
feat(wuss): add wuss_colourmenu component backed by menu swatch rows
dpt Sep 3, 2026
456e210
refactor(wuss): route wuss_colourmenu allocation through wuss's alloc…
dpt Sep 3, 2026
e542175
refactor(wuss)!: give wuss_fontmenu_create an allocator param
dpt Sep 3, 2026
09c7cc3
feat(wuss): add a Colour menu entry to the interactive demo launcher
dpt Sep 3, 2026
eb3799f
fix(wuss): stop wuss_colourmenu using the wuss_t after it is freed
dpt Sep 3, 2026
a76febd
refactor(wuss): add wuss__alloc_strdup and wuss__array_grow allocator…
dpt Sep 3, 2026
4e9ef5c
feat(wuss): add wuss_icon_plot, an icon draw that retains nothing
dpt Sep 3, 2026
3d73455
feat(wuss): swatches colour menu sets the mixing paper
dpt Sep 3, 2026
9413438
test(wuss): use longer lorem ipsum paragraph in text task
dpt Sep 3, 2026
a793fc3
fix(bmfont): reject malformed font grid instead of asserting
dpt Sep 3, 2026
a1dd67f
refactor(wuss): drive the chars font picker from wuss_fontmenu
dpt Sep 3, 2026
db64918
chore(bmfont): rename font fixtures to their display names
dpt Sep 3, 2026
c628016
test(bmfont): update font fixture table for renamed PNGs
dpt Sep 3, 2026
018888b
refactor(bmfont): use logf_info/logf_error instead of BMFONT_DEBUG
dpt Sep 3, 2026
cbf1a2b
fix(bmfont): verify grid cell height against the advance-width strip
dpt Sep 3, 2026
10453c2
chore(bmfont): re-export Digits-Bold and Digits-Regular fixtures
dpt Sep 3, 2026
556c8bf
feat(wuss): let wuss_create take an array of fonts and icons pick one
dpt Sep 3, 2026
a908daf
chore(bmfonts): drop stray exec bit on Digits-Bold.png
dpt Sep 3, 2026
6088fb5
test(wuss): draw the icons demo heading in the bold font
dpt Sep 3, 2026
0089dbf
feat(wuss): draw window titles in the bold font when one is supplied
dpt Sep 3, 2026
7bc1553
test(wuss): add a font picker to the Lorem Ipsum task
dpt Sep 3, 2026
48edc42
chore(bmfonts): drop stray exec bit on Digits-Bold.png (again)
dpt Sep 3, 2026
5db85e5
feat(wuss): page the content when clicking in a scroll well
dpt Sep 3, 2026
75788c5
feat(wuss): add an Emscripten/WebAssembly build of the interactive demo
dpt Sep 3, 2026
126f6d1
ci: publish the Wuss wasm demo to GitHub Pages
dpt Sep 4, 2026
7deda42
feat(wuss): toggle-size expands windows to full screen, repositioning…
dpt Sep 4, 2026
d641213
perf(wuss): blit the overlapping content when a toggle-size repositio…
dpt Sep 4, 2026
d169b1a
fix(wuss): stop the toggle-size blit carrying furniture
dpt Sep 4, 2026
82b2e47
fix(wuss): wuss_window_resize honours the requested size verbatim
dpt Sep 4, 2026
fc11bcb
refactor(wuss): split menu-desc helper out of the core menu header
dpt Sep 4, 2026
f7932a5
docs(wuss): annotate free() const-discard casts in menu teardown
dpt Sep 4, 2026
d1dd1ed
refactor(wuss): move core sources into a core/ subdir
dpt Sep 4, 2026
127d759
refactor(wuss): merge vscroll/hscroll box geometry into one axis-gene…
dpt Sep 4, 2026
513c890
refactor(wuss): extract shared piece-array blit engine
dpt Sep 4, 2026
59deb8c
refactor(wuss): use box_translated for the on-screen nudge in window_…
dpt Sep 4, 2026
5c85166
refactor(wuss): wrap the redraw-only furniture dispatch calls
dpt Sep 4, 2026
d551bb5
refactor(wuss): name the z-order node-to-window cast
dpt Sep 4, 2026
77ef4af
refactor(wuss): fold the furniture-rect fills behind one helper
dpt Sep 4, 2026
2e5b4be
feat(wuss): log when a window op drops to a whole-region repaint
dpt Sep 4, 2026
a2d11ce
docs(wuss): move menu-item field docs before each member
dpt Sep 4, 2026
6eeb296
feat(wuss): group the task menu into Launch and Test submenus
dpt Sep 4, 2026
1489263
fix(wuss): open a submenu only from its arrow, close it on any re-entry
dpt Sep 4, 2026
c218de9
feat(wuss): draw menu tick and submenu arrow from a symbol font
dpt Sep 4, 2026
1846d2c
test(wuss): load a symbol font in the interactive driver
dpt Sep 4, 2026
ba6e27a
feat(wuss): log when invalidations overflow and get coalesced
dpt Sep 4, 2026
1268a3c
feat(wuss): tick the selected font in chars' font menu
dpt Sep 4, 2026
76dbc7b
fix(wuss): retick an ADJUST-kept-open menu in place
dpt Sep 4, 2026
e885c54
feat(wuss): tag font slots with a class and name for pickers
dpt Sep 4, 2026
2068de4
chore(bmfonts): regenerate Digits-Regular and Symbols PNGs
dpt Sep 4, 2026
f6b0624
fix(wuss): clip furniture redraws to unoccluded pieces
dpt Sep 4, 2026
74496d7
refactor(wuss): rebuild icons demo task with grouped layout
dpt Sep 4, 2026
a941be8
fix(wuss): drop unused bmfont_get_info out-params, pass NULL
dpt Sep 4, 2026
3d65dca
refactor: use MIN/MAX/CLAMP macros for hand-rolled clamps
dpt Sep 4, 2026
457011c
chore(bmfont): Improve Digits-Regular 's'
dpt Sep 4, 2026
045ea2a
feat(wuss): show glyph index above glyph in chars task grid
dpt Sep 4, 2026
09af33c
fix(wuss): fix UAF when menu-pick flash finish re-enters and closes c…
dpt Sep 4, 2026
69b2c17
fix(wuss): close owned menu chain in wuss_task_destroy
dpt Sep 4, 2026
75cc9d9
fix(wuss): deliver pending MENU_SELECT when a flashing menu is torn d…
dpt Sep 4, 2026
43a3b3b
fix(wuss): restore borrowed-window position when its PRE_SHOW vetoes …
dpt Sep 4, 2026
b431d65
fix(wuss): deliver QUIT to registered tasks in wuss_destroy
dpt Sep 4, 2026
d89736d
fix(wuss): bounds-check bmfont advance-width pixel reads before they …
dpt Sep 4, 2026
8335f3e
fix(screen): no-op screen_fill_hline for an unregistered pixel format…
dpt Sep 4, 2026
118293c
fix(wuss): tie font-slot array sizes to a named, bounds-checked constant
dpt Sep 4, 2026
de873bd
docs(bmfont): fix broken Digits Font image link after PNG rename
dpt Sep 4, 2026
ac237eb
chore(wuss): fix stale file header after get-font.c moved into core/
dpt Sep 4, 2026
5827b2f
ci(pages): deploy wasm build on develop pushes too
dpt Sep 4, 2026
dc1fabe
docs: changelog work since 64015c9
dpt Sep 4, 2026
94b221e
fix(bmfont): fix RISC OS build failing on undefined dirent references
dpt Sep 4, 2026
c4c2762
test(bmfont): fix bmfont_enumerate_test missing Symbols.png fixture
dpt Sep 4, 2026
5487df8
fix(bmfonts): correct case of tracked fixture filenames
dpt Sep 4, 2026
3053939
fix(wuss): fix stale lowercase font filename causing test segfault
dpt Sep 4, 2026
754bc5c
fix(bmfont): add MSVC Win32 enumerate path
dpt Sep 4, 2026
24f8bd2
fix(wuss): drop redundant compound-literal cast in test
dpt Sep 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
67 changes: 67 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
# Build the Wuss WebAssembly demo and publish it to GitHub Pages.
#

name: Pages
on:
push:
branches: [master, develop]
workflow_dispatch:

# Allow one concurrent deployment; let a running one finish.
concurrency:
group: pages
cancel-in-progress: false

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
name: Build wasm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Install CMake
uses: lukka/get-cmake@latest

- name: Set up Emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: 4.0.6
actions-cache-folder: emsdk-cache

- name: Configure
run: |
emcmake cmake -B build-emscripten -G Ninja \
-DBUILD_APPS=ON -DBUILD_TESTS=OFF

- name: Build
run: cmake --build build-emscripten --target wuss

- name: Assemble site
run: |
mkdir -p _site
cp build-emscripten/wuss.html _site/index.html
cp build-emscripten/wuss.js build-emscripten/wuss.wasm \
build-emscripten/wuss.data _site/

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site

deploy:
name: Deploy to Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4
382 changes: 382 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

62 changes: 47 additions & 15 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,57 @@ DPTLib is a platform-independent C99 library (base, databases, datastruct, frame

## Build

Build directories are per-config and already created; there is **no** plain
`build/` — never invoke `./build/DPTLibTest` or `cmake --build build`.

- `build-asan/` — **default**. Debug, core tests (`BUILD_TESTS=YES`). Use this
unless told otherwise. Despite the name its cache currently has
`USE_ASAN=OFF`; re-run cmake with `-DUSE_ASAN=YES` if you actually need the
sanitisers.
- `build-sdl/` — Release, SDL tests on (`BUILD_SDL_TESTS=ON`). Needed for the
interactive `wuss` driver and anything under `libraries/wuss/test/tasks/`.
- `build-nosdl/` — Release, core tests only.
- `build-riscos/`— GCCSDK cross build. Leave alone unless working on RISC OS.
- `build.xc/` — Xcode generator.
- `build-emscripten/` — WebAssembly build of the `wuss` demo. Not pre-created;
configure with `emcmake cmake -B build-emscripten -G Ninja -DBUILD_APPS=ON
-DBUILD_TESTS=OFF`, build with `cmake --build build-emscripten --target wuss`,
then serve the dir and open `wuss.html` (e.g.
`python3 -m http.server -d build-emscripten`). Uses Emscripten's bundled SDL3
and libpng ports (`-sUSE_SDL=3`, `-sUSE_LIBPNG=1`); the browser owns the main
loop via `emscripten_set_main_loop_arg`; `resources/` is baked into
`wuss.data` and mounted at MEMFS `/resources`.

CMake options: `BUILD_TESTS`, `BUILD_SDL_TESTS`, `USE_ASAN` (ASan + UBSan),
`USE_FORTIFY` (bundled Fortify), `DPTLIB_IMAGES_READ_ONLY` (libpng no write).

(Re)configure a dir only if its `CMakeCache.txt` is missing or you are changing
options:
```
mkdir build && cd build
cmake -DBUILD_TESTS=YES ..
make -j4
cmake -B build-asan -G Ninja -DBUILD_TESTS=YES
```

Useful CMake options:
- `BUILD_TESTS=YES` — build the `DPTLibTest` self-test executable.
- `BUILD_SDL_TESTS=YES` — additionally build tests needing SDL2/SDL2_image.
- `USE_FORTIFY=YES` — link the bundled Fortify memory-debugging library.
- `DPTLIB_IMAGES_READ_ONLY=YES` — build libpng without write support.
Build:
```
cmake --build build-asan --target DPTLibTest
```

Requires libpng (`find_package(PNG)` on non-RISC OS). On RISC OS the build fetches and patches zlib/libpng itself via `FetchContent` (see `cmake/*.patch`).

## Testing

Run all tests (needs `-resources` pointing at the repo root, for test fixture files):
Run from the **repo root** so `-resources .` resolves the fixture files:
```
./build/DPTLibTest -resources /path/to/DPTLib
./build-asan/DPTLibTest -resources .
```

Run a subset by naming tests (names come from the `tests[]` table in `apps/test/main.c`, e.g. `atom`, `bitvec`, `curve`, `pickle`, `stream`, `packer`):
Run a subset by naming tests (names come from the `tests[]` table in `apps/test/main.c`, e.g. `atom`, `bitvec`, `curve`, `pickle`, `stream`, `packer`, `wuss`):
```
./build/DPTLibTest -resources /path/to/DPTLib atom bitvec
./build-asan/DPTLibTest -resources . atom bitvec
```

SDL / interactive tests use the `build-sdl` binary instead.

Success prints `++ Tests completed in Ns: N of N tests passed.`

### Adding a new test
Expand All @@ -45,12 +70,12 @@ Success prints `++ Tests completed in Ns: N of N tests passed.`

## Architecture

**Module layout.** Each module lives in two places that must be kept in sync:
- `include/<area>/<module>.h` — the public API, always wrapped in `extern "C"`, documented with Doxygen `\file`/`\param`/`\return` comments.
- `libraries/<area>/<module>/` — implementation `.c` files (often one function per file, e.g. `libraries/datastruct/vector/{create,destroy,insert,...}.c`), plus a private `impl.h` defining the opaque struct behind the public typedef and any internal-only declarations.
**Module layout.** Each module is split between `include/<area>/<module>.h` (public API, `extern "C"`, Doxygen-documented) and `libraries/<area>/<module>/` (implementation `.c` files, often one function per file, plus a private `impl.h` for the opaque struct and internal-only declarations).

New source/header files must be added by hand to the relevant `set(..._SOURCES ...)` list and, for public headers, to `PUBLIC_HEADERS`, in `CMakeLists.txt` — there is no globbing.

**Internal naming (see `wuss`).** Functions declared in a private `impl.h` and not part of the public header use a double-underscore prefix, e.g. `wuss__titlebar_height_for`; internal-only enum constants still use the module's normal single-underscore style (e.g. `wuss_WINDOW_STATE_TOGGLED`), matching public enums. Per-instance internal state that isn't part of the public appearance API (e.g. `struct wuss_window`'s toggled/maximised state) is kept as a bitflags enum with `wuss__window_*` accessor helpers rather than loose `int`/`bool` fields, leaving room to add flags without growing the struct.

**Error handling.** No exceptions; functions return `result_t` (`include/base/result.h`). Each module reserves a `result_BASE_<MODULE>` offset block and defines its own `result_<MODULE>_*` codes starting from that base. Common generic codes (`result_OK`, `result_OOM`, `result_BAD_ARG`, etc.) live at `result_BASE_GENERIC`. Callers typically check `rc != result_OK` and propagate.

**Debug/logging.** `include/base/debug.h` provides `logf_info/warning/error/fatal/abort`, plus `check(err)` (log-and-`goto failure`) and `sentinel` (unreachable-code marker), both of which are compiled out entirely when `NDEBUG` is set — don't rely on their side effects in release builds.
Expand All @@ -68,7 +93,14 @@ New source/header files must be added by hand to the relevant `set(..._SOURCES .
- File header comment format: `/* filename.c -- one-line description */`.
- Section breaks within files use `/* ----- ... ----- */` rule comments.
- Public API docs use Doxygen (`\file`, `\param`, `\return`); a `Doxyfile` exists for generating them.
- Edit `.c`/`.h` files with the Edit tool, never `sed -i` line-range splices — they corrupt the Allman/2-space layout and can't be verified without re-reading. To inspect exact bytes or indentation, Read the file; don't shell out to `cat -A`/`cat -v`.
- After editing any `.c`/`.h` function prototype or definition, run `python3 tools/wrap_protos.py <file>`; after editing a header's Doxygen, run `python3 tools/wrap_doxygen.py <file>` (skip vendored headers).

## Commit messages

Use [Conventional Commits](https://www.conventionalcommits.org/): `<type>[optional scope]: <description>`, e.g. `fix(pickle): handle zero-length blobs`. Common types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `ci`, `build`. Add a `!` before the colon (or a `BREAKING CHANGE:` footer) for breaking changes.

When the user says "commit": stage the relevant files and `git commit` with the
message passed via repeated `-m` flags (subject, then body). Do **not** write a
`COMMIT_MSG` / `COMMIT_MSG_TMP` file. Never `git push` unless explicitly asked —
pushing prompts for an SSH key passphrase and will hang.
Loading