blob: 6b0034a34b6ba23603283fb3ddacc92031cfb8aa [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.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(resource struct {
view_provider client_end:fuchsia.ui.app.ViewProvider;
}) -> (resource struct {
view_ref fuchsia.ui.views.ViewRef;
});
/// 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(resource struct {
view_ref fuchsia.ui.views.ViewRef;
}) -> (struct {}) error fuchsia.ui.views.Error;
};