1
0
Fork 0
forked from wry/wry

it: test natural scrolling

This commit is contained in:
Julian Orth 2024-04-02 10:26:42 +02:00
parent f562f887f0
commit adf6d2ae2b
12 changed files with 149 additions and 2 deletions

View file

@ -19,6 +19,7 @@ pub struct TestPointer {
pub leave: TEEH<Leave>,
pub enter: TEEH<Enter>,
pub motion: TEEH<Motion>,
pub axis_relative_direction: TEEH<AxisRelativeDirection>,
}
impl TestPointer {
@ -76,6 +77,12 @@ impl TestPointer {
let _ev = AxisDiscrete::parse_full(parser)?;
Ok(())
}
fn handle_axis_relative_direction(&self, parser: MsgParser<'_, '_>) -> TestResult {
let ev = AxisRelativeDirection::parse_full(parser)?;
self.axis_relative_direction.push(ev);
Ok(())
}
}
impl Drop for TestPointer {
@ -96,6 +103,7 @@ test_object! {
AXIS_SOURCE => handle_axis_source,
AXIS_STOP => handle_axis_stop,
AXIS_DISCRETE => handle_axis_discrete,
AXIS_RELATIVE_DIRECTION => handle_axis_relative_direction,
}
impl TestObject for TestPointer {}