blob: 7cbf5deacada8f917de02cb0f3320bcfd00d55f7 [file] [log] [blame]
// Copyright 2019 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.settings;
/// Settings related to display
[Discoverable]
protocol Display {
/// Gets the current [DisplaySettings]. Returns immediately on first call;
/// subsequent calls return when the value changes.
Watch() -> (DisplaySettings settings) error Error;
/// Obtains the current data from the light sensor. Returns immediately on
/// first call; subsequent calls return when the light sensor value changes
/// by a certain amount measured in lux.
WatchLightSensor(float32 delta) -> (LightSensorData light_sensor_data) error Error;
/// Sets display settings. Any field not explicitly set in the table performs a
/// no-op, and will not make any changes.
Set(DisplaySettings settings) -> () error Error;
};
table DisplaySettings {
1: bool auto_brightness;
2: float32 brightness_value;
};
table LightSensorData {
/// Brightness from the light sensor measured in lux
1: float32 illuminance_lux;
};