blob: 94c777f4223550074033df058cd1012e87d2762b [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.session.scene;
using fuchsia.ui.app;
using fuchsia.ui.policy;
using fuchsia.ui.views;
/// A protocol used to manage the scene graph of the session.
///
/// This protocol is exposed by the `scene_manager` component. The `scene_manager`
/// component configures and constructs a scene graph in Scenic. A product may
/// use the `scene_manager` to reduce Scenic-related configuration code in their session.
[Discoverable]
protocol Manager {
/// Sets the root view of the scene graph to the view provided by `view_provider`.
///
/// Subsequent calls will remove the existing root view, as well as any of its
/// descendants from the scene graph. The root view is shared between all clients
/// of `Manager`.
///
/// Returns a `fuchsia.ui.views.ViewRef` to the view provided by `view_provider`.
SetRootView(fuchsia.ui.app.ViewProvider view_provider) -> (fuchsia.ui.views.ViewRef view_ref);
/// Focuses the provided `view_ref`.
///
/// Returns once the view associated with `view_ref` has been focused, or if there
/// was an error focusing the specified view.
RequestFocus(fuchsia.ui.views.ViewRef view_ref) -> () error fuchsia.ui.views.Error;
/// Adds a listener for "raw" pointer events.
///
/// This exists to support legacy clients, and new uses are discouraged. This method
/// will be removed prior to the inclusion of `Manager` in the SDK.
CapturePointerEvents(fuchsia.ui.policy.PointerCaptureListenerHACK listener);
};