diff options
| author | Lena <lena@omega> | 2026-01-01 00:00:00 +0000 |
|---|---|---|
| committer | Lena <lena@omega> | 2026-01-01 00:00:00 +0000 |
| commit | 2fa72ee0dc67d973330aec4ba98260e9f57f7821 (patch) | |
| tree | e6a25c07c8da61d29e4e1f8a72436565e63c5777 /core.h | |
| download | mouseboard-0.1.tar.gz | |
Keyboard-only pointing: a labelled grid over every monitor, type a
label to jump to a cell, bisect it by quadrant until the crosshair is
exact, then one key clicks. The coarse grid keeps labels short and
bisection keeps precision unlimited, so a hotkey and a few keystrokes
replace the mouse.
The core talks only to the backend interface in platform.h; wlroots
Wayland and Win32 backends supply the overlay, keyboard grab and
pointer.
Diffstat (limited to 'core.h')
| -rw-r--r-- | core.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +/* core.h - platform-independent interaction logic. */ +#ifndef MOUSEBOARD_CORE_H +#define MOUSEBOARD_CORE_H + +#include "config.h" +#include "platform.h" + +/* + * Run the full flow: draw the grid, read keys, refine by bisection, and click. + * If dry_run is set, the chosen target and action are printed to stdout instead + * of moving/clicking the pointer. + * + * Returns 0 if an action was taken, 1 if the user cancelled, 2 on error. + */ +int core_run(struct platform *p, const struct config *cfg, int dry_run); + +/* Offline checks of the pure logic (labels, bisection, config). Prints results; + * returns 0 if all pass. Needs no display. */ +int core_selftest(void); + +#endif /* MOUSEBOARD_CORE_H */ |