Google is committed to advancing racial equity for Black communities. See how.

fuchsia.ui.brightness

PROTOCOLS

ColorAdjustmentHandler

Defined in fuchsia.ui.brightness/color_adjustment.fidl

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.

SetColorAdjustment

Called when the color adjustment has changed.

Request

NameType
color_adjustment ColorAdjustmentTable

Control

Defined in fuchsia.ui.brightness/brightness.fidl

Control provides an interface to manage the brightness component.

SetAutoBrightness

Turns the auto-brightness mode on. SetManualBrightness will turn it off.

Request

NameType

SetAutoBrightnessAdjustment

Sets the brightness adjustment. This will change the brightness curve by the factor of the adjustment. The adjustment is in the range of -1.0 to 1.0.

Request

NameType
adjustment float32

SetBrightnessTable

Sets the brightness curve as a set of points. This will override the built-in brightness curve. The default brightness curve will be used if the table is empty. The connection will be closed if table errors are detected.

Request

NameType
table BrightnessTable

SetManualBrightness

Turns auto-brightness mode off. Used by e.g. Settings to set manual brightness using a slider Value is in the range 0.0 to 1.0 representing min to max and will be clamped if out of range.

Request

NameType
value brightness

SetManualBrightnessSmooth

Set manual brightness specifying the duration over which the target brightness will be set.

Request

NameType
value brightness
duration zx/duration

WatchAutoBrightness

Requests the current auto-brightness mode. This call implements the Hanging Get protocol.

Request

NameType

Response

NameType
enabled bool

WatchAutoBrightnessAdjustment

Gets the current auto brightness adjustment. This call implements the Hanging Get protocol.

Request

NameType

Response

NameType
adjustment float32

WatchCurrentBrightness

Gets the current brightness in the range 0.0 to 1.0. This result is valid for both manual and auto-brightness modes and is typically used to show the current brightness on a slider. This call implements the Hanging Get protocol.

Request

NameType

Response

NameType
value brightness

STRUCTS

BrightnessPoint

Defined in fuchsia.ui.brightness/brightness.fidl

A tuple representing a point on the auto-brightness curve Ambient_lux and nits must be positive values.

NameTypeDescriptionDefault
ambient_lux float32 No default
display_nits float32 No default

BrightnessTable

Defined in fuchsia.ui.brightness/brightness.fidl

A set of points defining the auto-brightness curve. The ambient_lux values must be monotonically increasing.

NameTypeDescriptionDefault
points vector<BrightnessPoint>[50] No default

TABLES

ColorAdjustmentTable

Defined in fuchsia.ui.brightness/color_adjustment.fidl

The table for screen color tint adjustments.

OrdinalNameTypeDescription
1 matrix float32[9]

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.

TYPE ALIASES

NameValueDescription
brightness float32

A normalized relative brightness adjustment in the range 0.0 (off/minimum) to 1.0 (maximum).