fuchsia.ui.brightness

Added: 7

PROTOCOLS

ColorAdjustment

Defined in fuchsia.ui.brightness/color_adjustment.fidl

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.

Added: 16

SetDiscreteColorAdjustment

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.

Request

NameType
color_adjustment ColorAdjustmentTable

Response

NameType
payload ColorAdjustment_SetDiscreteColorAdjustment_Result

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.

GetMaxAbsoluteBrightness

Gets the maximum supported backlight brightness in nits, if known.

Request

<EMPTY>

Response

NameType
payload Control_GetMaxAbsoluteBrightness_Result

SetAutoBrightness

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

Request

<EMPTY>

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

<EMPTY>

Response

NameType
enabled bool

WatchAutoBrightnessAdjustment

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

Request

<EMPTY>

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

<EMPTY>

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.

FieldTypeDescriptionDefault
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.

FieldTypeDescriptionDefault
points vector<BrightnessPoint>:50 No default

ColorAdjustment_SetDiscreteColorAdjustment_Response

Defined in fuchsia.ui.brightness/color_adjustment.fidl

<EMPTY>

Control_GetMaxAbsoluteBrightness_Response

Defined in fuchsia.ui.brightness/brightness.fidl

FieldTypeDescriptionDefault
max_brightness float64 No default

TABLES

ColorAdjustmentTable

Defined in fuchsia.ui.brightness/color_adjustment.fidl

The table for screen color tint adjustments.

OrdinalFieldTypeDescription
matrix array<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.

UNIONS

ColorAdjustment_SetDiscreteColorAdjustment_Result strict

Defined in fuchsia.ui.brightness/color_adjustment.fidl

OrdinalVariantTypeDescription
response ColorAdjustment_SetDiscreteColorAdjustment_Response
framework_err internal

Control_GetMaxAbsoluteBrightness_Result strict

Defined in fuchsia.ui.brightness/brightness.fidl

OrdinalVariantTypeDescription
response Control_GetMaxAbsoluteBrightness_Response
err zx/Status

ALIASES

NameValueDescription
brightness float32

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