blob: 6ba8f7b3095ad7ff82a4574e80672823292164aa [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() -> (resource struct {
context fuchsia.ui.views.ViewRef;
target fuchsia.ui.views.ViewRef;
});
/// 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() -> (struct {
viewport fuchsia.ui.pointerinjector.Viewport;
});
};