blob: 7741fda81714c3fb124a17a7cdc9bcb6c9a3f6a2 [file] [log] [blame]
// Copyright 2023 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.hardware.display.types;
/// The result of checking a draft display config.
///
/// Values are produced by [`fuchsia.hardware.display/Coordinator.CheckConfig`].
type ConfigResult = strict enum : uint32 {
/// The config is compatible with the current hardware.
OK = 0;
/// The config is not compatible with any hardware.
INVALID_CONFIG = 1;
/// The config layer assignment is not supported by the current hardware.
UNSUPPORTED_CONFIG = 2;
/// The config uses more than the number of connected displays.
TOO_MANY_DISPLAYS = 3;
/// The config display modes are not supported by the current hardware.
///
/// The client should try a different set of displays or display modes.
UNSUPPORTED_DISPLAY_MODES = 4;
};
/// Identifies an accepted display config.
///
/// This is a type-safe wrapper for a
/// [`fuchsia.hardware.display.types/ConfigStampValue`], which is a raw numeric
/// value.
///
/// Each successful call to [`fuchsia.hardware.display/Coordinator.ApplyConfig`]
/// generates a valid value. Values are reported in
/// [`fuchsia.hardware.display/Coordinator.Vsync`] events.
///
/// Generated values are strictly increasing (unique, strictly monotonic) within
/// the lifetime of a [`fuchsia.display/Coordinator`] connection.
///
/// [`fuchsia.hardware.display.types/INVALID_CONFIG_STAMP_VALUE`] represents an
/// invalid value.
type ConfigStamp = struct {
value ConfigStampValue;
};
/// See [`fuchsia.hardware.display.types/ConfigStamp`].
alias ConfigStampValue = uint64;
const INVALID_CONFIG_STAMP_VALUE ConfigStampValue = 0;