blob: b424a639041da6ca0b4df36a5e5424eb38e28c8b [file] [log] [blame]
// Copyright 2021 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.pointerinjector.configuration;
using fuchsia.ui.pointerinjector;
using fuchsia.ui.views;
/// A service used by an input pipeline to set up pointer injection into Scenic.
/// This should be implemented by the component that configures the scene
/// (Root Presenter or Scene Manager).
[Discoverable]
protocol Setup {
/// Returns the viewrefs for injection authority (`Config.context`) and injection
/// destination (`Config.target`).
///
/// This only returns when valid context and target views exist.
/// Typically called just once.
GetViewRefs() -> (fuchsia.ui.views.ViewRef context, fuchsia.ui.views.ViewRef target);
/// Returns the current viewport. Follows the hanging get pattern.
///
/// The first call to this function will return the current viewport, whenever
/// one exists. Subsequent calls will block until the viewport has been updated.
///
/// Flow control: There should only be one outstanding call to this function.
/// The channel will be closed if an additional call to this function is made
/// while a call is outstanding.
WatchViewport() -> (fuchsia.ui.pointerinjector.Viewport viewport);
};