Files
breeze/tests/scroll_input_link_test.c
T
waoziandClaude Opus 5.5 dc67b1bfbe Port Inbe screens, storage, and platform hosts to Ziran
Replace the remaining .kry and C application sources with Ziran modules,
move vendored dependencies to their current pointers, and add Ziran tests for
the ported hosts and policies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-27 15:40:52 -03:00

29 lines
898 B
C

#include "platform/scroll_input.h"
#include "session.h"
int main(void)
{
Rectangle bounds = {20.0f, 10.0f, 80.0f, 40.0f};
Vector2 mouse = {95.0f, 20.0f};
Session session = SessionOpen();
if(!SessionValid(session))
return 4;
BeginScrollFrame(session, mouse, true, true, false, -1.0f);
ScrollInput input = ScrollObservationFor(7, bounds);
if(!input.enabled || !input.pointer_allowed || input.wheel != -1.0f)
return 1;
ScrollFrame frame = {0};
frame.start_drag = true;
frame.consume_wheel = true;
frame.grab = 3.0f;
CommitScroll(7, frame);
input = ScrollObservationFor(7, bounds);
if(!input.owns_drag || input.wheel != 0.0f || input.grab != 3.0f)
return 2;
input = ScrollObservationFor(8, bounds);
if(!input.owner_captured || input.pointer_allowed)
return 3;
return SessionClose(session) ? 0 : 5;
}