blob: 652c9e692dac61c1acd5024b7fd1bea9e4ec7b7d [file] [log] [blame]
// Copyright 2017 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.
// This file contains the definition of SurfaceRelation and its properties.
library fuchsia.modular;
/// Describes the relationship between two Surfaces.
/// Provides information to the StoryShell for layout optimization.
struct SurfaceRelation {
/// Advice on arranging these surfaces on the screen together.
SurfaceArrangement arrangement = SurfaceArrangement.NONE;
/// Advice for dismissal of surfaces to be linked.
SurfaceDependency dependency = SurfaceDependency.NONE;
/// Relative emphasis of the child surface, relative to the parent.
/// Influences relative areas of surfaces on screen.
float32 emphasis = 1.0;
/// Expresses arrangement type.
enum SurfaceArrangement {
/// No arrangement specified.
NONE = 0;
/// Desire to present simultaneously.
/// The parent prefers to not be presented simultaneously with its child.
/// (The child may still become part of a simultaneous presentation depending
/// on the relationships between it and subsequently added surfaces).
/// Place this surface on top of and obscuring the parent surface. This is a
/// complete replacement, not a modal or inset presentation.
ONTOP = 3;
/// Links surface dismissal.
enum SurfaceDependency {
/// No dependency specified.
NONE = 0;
/// Child is dependent on parent.
/// If parent is dismissed, child is dismissed as well.