blob: 91e4b63c164d3aab276a44f1d959df89010ac089 [file]
// Copyright 2022 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 fuchsia.ui.test.input;
using fuchsia.input.report;
using zx;
/// A tool to inject media button events into Input Pipeline.
///
/// Please extend as necessary.
closed protocol MediaButtonsDevice {
/// Simulates a button press and release on the requested button on the
/// device.
strict SimulateButtonPress(table {
/// The button receiving the button press.
1: button fuchsia.input.report.ConsumerControlButton;
}) -> ();
/// Send a vector of pressing button on the requested button on the
/// device. Passing empty vector will release all pressing buttons.
@available(added=19)
strict SendButtonsState(table {
/// The button receiving the button press.
1: buttons
vector<fuchsia.input.report.ConsumerControlButton>:fuchsia.input.report.CONSUMER_CONTROL_MAX_NUM_BUTTONS;
}) -> ();
/// Schedules a button press and release of the requested button at a
/// specific duration from now. "Now" is defined as the time when the request is processed by the
/// device, so there is some latency.
@available(added=31)
strict ScheduleSimulateButtonPress(table {
/// The button receiving the button press.
1: button fuchsia.input.report.ConsumerControlButton;
/// The length of the delay before sending the button (in nanos).
2: delay zx.Duration;
}) -> ();
};