| // Copyright 2020 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library test.touch; |
| |
| using zx; |
| |
| /// A set of pointer event-related data that is returned to the test for verification. |
| type PointerData = table { |
| /// The horizontal coordinate reported in the client's coordinate system. |
| 1: local_x float64; |
| |
| /// The vertical coordinate reported in the client's coordinate system. |
| 2: local_y float64; |
| |
| /// The monotonic time (ns) the pointer data was received by the client. |
| 3: time_received zx.time; |
| |
| /// The number of physical pixels, per logical pixel, as reported by the client. |
| 4: device_pixel_ratio float64; |
| |
| // Name of the component to help distinguish responses from multiple components. |
| 5: component_name string:1024; |
| }; |
| |
| /// A test-specific scheme to gather signal from the client-under-test. |
| @discoverable |
| protocol ResponseListener { |
| /// Notify the test that client-under-test has received expected input. |
| Respond(struct { |
| pointer_data PointerData; |
| }); |
| }; |