blob: 3d10413497a92d931ac13267260ad9f0bcfd8e41 [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 = NONE;
// Advice for dismissal of surfaces to be linked.
SurfaceDependency dependency = 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.
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.
enum SurfaceDependency {
// No dependency specified.
NONE = 0;
// Child is dependent on parent.
// If parent is dismissed, child is dismissed as well.
DEPENDENT = 1;
};