Files
wlgol/AGENTS.md
T
arek 5e7abfb56b docs: add input-and-placement OpenSpec change and update AGENTS.md
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.
2026-11-08 14:30:09 +01:00

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 target Hashtable); 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.c are generated by wayland-scanner from the vendored xdg-shell.xml into build/include/ and build/. Do not edit them; rebuild to regenerate. CMakeLists.txt lists the generated .c in SOURCES and the .h as a source to force generation.
  • compile_commands.json at the repo root is a symlink to build/compile_commands.json; configure first.

Code notes

  • Hashtable: hashtable_new(size) requires size > 0 (used as a modulo). hashtable_destroy frees keys/entries but not values (caller owns values). hashtable_set returns the previous value or NULL, indistinguishable from "key absent".
  • Entry point is wlgol.c; modules tkeyboard.c, tpointer.c, hashtable.c; headers in include/.