blob: 3ab85b14270f97c6ab2cdefef2af54af4961bba3 [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.
type SurfaceRelation = struct {
/// Advice on arranging these surfaces on the screen together.
@allow_deprecated_struct_defaults
arrangement SurfaceArrangement = SurfaceArrangement.NONE;
/// Advice for dismissal of surfaces to be linked.
@allow_deprecated_struct_defaults
dependency SurfaceDependency = SurfaceDependency.NONE;
/// Relative emphasis of the child surface, relative to the parent.
/// Influences relative areas of surfaces on screen.
@allow_deprecated_struct_defaults
emphasis float32 = 1.0;
};
/// Expresses arrangement type.
type SurfaceArrangement = strict enum {
/// No arrangement specified.
NONE = 0;
/// Desire to present simultaneously.
COPRESENT = 1;
/// 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).
SEQUENTIAL = 2;
/// 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.
type SurfaceDependency = strict enum {
/// No dependency specified.
NONE = 0;
/// Child is dependent on parent.
/// If parent is dismissed, child is dismissed as well.
DEPENDENT = 1;
};