6 ex_gui_hover_8c example
gullradriel edited this page 2026-10-09 00:55:18 +02:00

ex_gui_hover.c

n_gui_hovered_widget() query test (headless). Hosts that want a pointing-hand mouse cursor over clickable widgets need to know which widget is under the pointer each frame. n_gui_process_event already maintains the exclusive HOVER state flag; this test synthesizes mouse moves/presses and asserts n_gui_hovered_widget() reports the widget under the pointer, -1 over empty space, the front-most window's widget when two overlap, and skips invisible widgets and closed windows.