5e7abfb56b
Plan input handling and pattern placement before Game of Life mechanics: keyboard bindings config, mouse placement with preview/rotation, HiDPI scaling, and cell grid. Update AGENTS.md project notes.
1.2 KiB
1.2 KiB
wlgol
Wayland Game of Life in C11; renders into a shared-memory buffer (no GL/Vulkan).
Build & test
- Configure:
cmake -G Ninja -B build - Build:
cmake --build ./build - Tests:
ctest --test-dir build(single targetHashtable); or run./build/test_hashtable - Run app:
./build/wlgol(requires a running Wayland compositor; not runnable headless)
Dependencies: cmake, ninja, pkg-config, wayland-scanner; libraries wayland-client, wayland-cursor, xkbcommon.
Generated code
xdg-shell.h/xdg-shell.care generated bywayland-scannerfrom the vendoredxdg-shell.xmlintobuild/include/andbuild/. Do not edit them; rebuild to regenerate.CMakeLists.txtlists the generated.cinSOURCESand the.has a source to force generation.compile_commands.jsonat the repo root is a symlink tobuild/compile_commands.json; configure first.
Code notes
- Hashtable:
hashtable_new(size)requiressize > 0(used as a modulo).hashtable_destroyfrees keys/entries but not values (caller owns values).hashtable_setreturns the previous value orNULL, indistinguishable from "key absent". - Entry point is
wlgol.c; modulestkeyboard.c,tpointer.c,hashtable.c; headers ininclude/.