Modules/GraphicApplication/tests/Main.cpp
agent 348daff9f2 GraphicApplication: platform-independent input layer
Starts the GraphicApplication module, which replaces Graphics. As in
Sketch2D, each library lives in src/<name>/ with its own public/ and
private/; only public/ is exported and headers are included by name.

input_layer/ is the boundary between platform backends and input consumers.
InputEvent is the one declaration of every event: a std::variant of small
structs (pointer sample, move, explicit PointerLeft, button, scroll, scroll
end, key, text, focus, gesture). InputSink::post() is the only entry point,
so the coalescer, the per-frame state and recordings all derive from the
same type instead of re-listing event kinds.

Keys and pointer buttons are separate enums (Key, PointerButton) and
separate events; KeyAction covers press, release and repeat.

InputCoalescer batches posted events per frame under delivery policies and
forwards every raw event to an optional tap. InputQueue collects delivered
events, releases held buttons and keys when the pointer or focus is lost,
and produces a read-only InputState: the ordered event log plus the pointer,
button, key, scroll and pressure state derived from it. InputView is a
consumer's view with its own pointer origin and optionally hidden buttons,
so callers never mutate shared state.

InputRecording serializes every event kind (text, key repeat and gestures
included) through one format table per variant alternative, and replays
into any InputSink. Two-finger touch gestures are tracked here too. The
layer depends on no window system and is unit-tested directly.
2026-10-29 05:24:06 +03:00

3 lines
83 B
C++

#include "UnitTest++/UnitTest++.h"
int main() { return UnitTest::RunAllTests(); }