// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module crosapi.mojom;
import "mojo/public/mojom/base/values.mojom";
[Stable, Extensible]
enum PowerState {
// A power status was read from the display but its value is unknown.
[Default] kUnknown = 0,
// There was an error when querying the display.
kError = 1,
// The kernel adapter is not configured (no EDID set).
kAdapterNotConfigured = 2,
// No response on the CEC bus (the connection was not ACKed).
kNoDevice = 3,
// The display is on.
kOn = 4,
// The display is in standby mode.
kStandBy = 5,
// The display is transitioning from standby to a powered on state. It's not
// guaranteed that any output is visible on the display at this stage.
kTransitioningToOn = 6,
// The display is transitioning into standby mode.
kTransitioningToStandBy = 7,
};
// Private API for HDMI CEC functionality.
[Stable, Uuid="e820f536-cad8-4891-be37-ba2f3aa770cc"]
interface CecPrivate {
// Attempt to put all HDMI CEC compatible devices in standby.
//
// This is not guaranteed to have any effect on the connected displays.
// Displays that do not support HDMI CEC will not be affected.
// Does nothing but call the void callback if the backend isn't available.
SendStandBy@0() => ();
// Attempt to announce this device as the active input source towards all
// HDMI CEC enabled displays connected, waking them from standby if
// necessary.
// Does nothing but call the void callback if the backend isn't available.
SendWakeUp@1() => ();
// Queries all HDMI CEC capable displays for their current power state.
// If the backend isn't available, passes an empty list to the callback.
QueryDisplayCecPowerState@2() => (array<PowerState> power_states);
};