blob: e8b542b7c33d48a23f07c49d4c1f38b0a1a363d3 [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.ui.brightness;
/// Allows clients to request changes to the screen's color adjustment matrix.
/// This protocol should be implemented and served by the owner of screen presentation.
@discoverable
@available(added=16)
open protocol ColorAdjustment {
/// Called to change the color adjustment to a discrete value.
/// The server will send a response once the request has been serviced.
/// A client can then use this response to determine when to make
/// additional calls when limiting the amount of requests being sent.
flexible SetDiscreteColorAdjustment(struct {
color_adjustment ColorAdjustmentTable;
}) -> ();
};
/// Handler implemented by the owner of the presentation.
/// The UI component that controls brightness and screen tint uses this protocol to request changes
/// to the screen's color adjustment matrix.
@discoverable
closed protocol ColorAdjustmentHandler {
/// Called when the color adjustment has changed.
strict SetColorAdjustment(struct {
color_adjustment ColorAdjustmentTable;
});
};
/// The table for screen color tint adjustments.
type ColorAdjustmentTable = table {
/// 3x3 Matrix in row-major form which will be used by root presenter
/// to apply color adjustment.
/// This field may be omitted to disable color adjustment.
1: matrix array<float32, 9>;
};