genode_c_api/event: add wheel events

issue #4958
This commit is contained in:
Sebastian Sumpf 2023-07-04 20:51:31 +02:00 committed by Christian Helmuth
parent c5a55e5af4
commit f9e70b0300
2 changed files with 9 additions and 0 deletions

View File

@ -77,6 +77,8 @@ struct genode_event_submit
struct genode_event_touch_args const *);
void (*touch_release) (struct genode_event_submit *, unsigned finger);
void (*wheel) (struct genode_event_submit *, int x, int y);
};

View File

@ -109,6 +109,12 @@ namespace {
batch.submit(Input::Touch_release { id }); });
}
static void _wheel(struct genode_event_submit *myself, int x, int y)
{
_with_batch(myself, [&] (Event::Session_client::Batch &batch) {
batch.submit(Input::Wheel { x, y }); });
}
Submit(Event::Session_client::Batch &batch)
:
batch(batch)
@ -118,6 +124,7 @@ namespace {
rel_motion = _rel_motion;
touch = _touch;
touch_release = _touch_release;
wheel = _wheel;
};
};