pub enum TouchScreenRequest {
SimulateTap {
payload: TouchScreenSimulateTapRequest,
responder: TouchScreenSimulateTapResponder,
},
SimulateMultiTap {
payload: TouchScreenSimulateMultiTapRequest,
responder: TouchScreenSimulateMultiTapResponder,
},
SimulateSwipe {
payload: TouchScreenSimulateSwipeRequest,
responder: TouchScreenSimulateSwipeResponder,
},
SimulateMultiFingerGesture {
payload: TouchScreenSimulateMultiFingerGestureRequest,
responder: TouchScreenSimulateMultiFingerGestureResponder,
},
SimulateTouchEvent {
report: TouchInputReport,
responder: TouchScreenSimulateTouchEventResponder,
},
}
Expand description
A tool to inject touch events into Input Pipeline.
Please extend as necessary.
Variants§
SimulateTap
Simulates a tap at the requested location.
SimulateMultiTap
Simulates multi finger tap at the requested locations.
SimulateSwipe
Simulates a swipe that starts at start_location
and ends at end_location
,
with a total number of move events equal to move_event_count
.
The generated pointer event stream will be:
DOWN + CHANGE_1 + … + CHANGE_n + UP, where n == move_event_count
Events are injected with no explicit delay in between; in other words, the observed delay between successive events will be approximately equal to the time required to inject a single event.
SimulateMultiFingerGesture
Simulates a multi fingers linear gesture that starts at start_locations
and ends at end_locations
, with a total number of move events equal to
move_event_count
. if the arguments are invalid, the server should close
the connection.
The generated pointer event stream will be:
DOWN + CHANGE_1 + … + CHANGE_n + UP, where n == move_event_count
Events are injected with a small explicit delay in between.
Fields
SimulateTouchEvent
Simulate a touch event by a touch input report.
TouchInputReport includes a list of contacts that are currently contacting the touch surface. The report can represent multiply touch events by comparing with previous reports received.
Implementations§
Source§impl TouchScreenRequest
impl TouchScreenRequest
pub fn into_simulate_tap( self, ) -> Option<(TouchScreenSimulateTapRequest, TouchScreenSimulateTapResponder)>
pub fn into_simulate_multi_tap( self, ) -> Option<(TouchScreenSimulateMultiTapRequest, TouchScreenSimulateMultiTapResponder)>
pub fn into_simulate_swipe( self, ) -> Option<(TouchScreenSimulateSwipeRequest, TouchScreenSimulateSwipeResponder)>
pub fn into_simulate_multi_finger_gesture( self, ) -> Option<(TouchScreenSimulateMultiFingerGestureRequest, TouchScreenSimulateMultiFingerGestureResponder)>
pub fn into_simulate_touch_event( self, ) -> Option<(TouchInputReport, TouchScreenSimulateTouchEventResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL