blob: 4f858120f06017c35cdb730a459c950d21d1b77a [file] [log] [blame]
// Copyright 2016 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.policy;
using fuchsia.ui.gfx;
using fuchsia.ui.views;
/// The Presenter service provides a way for applications to ask that a view be
/// added to a view tree, leaving any window management concerns up to the
/// discretion of the presenter implementation.
[Discoverable]
protocol Presenter {
/// Request that the View's contents be displayed on the screen as a `Presentation`.
/// Each call to `PresentView` creates a new `Presentation`. Having more than one simultaneous
/// `Presentation` (i.e. calling `PresentView` more than once) is deprecated, and will
/// print a warning. In the future, this will result in an error and the channel being closed.
PresentView(fuchsia.ui.views.ViewHolderToken view_holder_token, request<Presentation>? presentation_request);
/// Request that the View's contents be displayed on the screen as a `Presentation`.
/// Destroys any existing presentations and replaces them with the new one.
/// This is true whether the existing view was created by a call to
/// PresentOrReplaceView or to PresentView.
PresentOrReplaceView(fuchsia.ui.views.ViewHolderToken view_holder_token, request<Presentation>? presentation_request);
/// Sets new default renderer params and forces them on for the duration of the
/// presenter's lifetime. Only applies to any subsequent calls to Present().
/// Used for testing.
HACK_SetRendererParams(bool enable_clipping, vector<fuchsia.ui.gfx.RendererParam> params);
};