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.
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
Name | Type |
---|---|
color_adjustment |
ColorAdjustmentTable
|
Response
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
value |
brightness
|
SetManualBrightnessSmooth
Set manual brightness specifying the duration over which the target brightness will be set.
Request
Name | Type |
---|---|
value |
brightness
|
duration |
zx/Duration
|
WatchAutoBrightness
Requests the current auto-brightness mode. This call implements the Hanging Get protocol.
Request
<EMPTY>
Response
Name | Type |
---|---|
enabled |
bool
|
WatchAutoBrightnessAdjustment
Gets the current auto brightness adjustment. This call implements the Hanging Get protocol.
Request
<EMPTY>
Response
Name | Type |
---|---|
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
Name | Type |
---|---|
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.
Field | Type | Description | Default |
---|---|---|---|
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.
Field | Type | Description | Default |
---|---|---|---|
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
Field | Type | Description | Default |
---|---|---|---|
max_brightness |
float64
|
No default |
TABLES
ColorAdjustmentTable
Defined in fuchsia.ui.brightness/color_adjustment.fidl
The table for screen color tint adjustments.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
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
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
ColorAdjustment_SetDiscreteColorAdjustment_Response
|
|
3 |
framework_err |
internal
|
Control_GetMaxAbsoluteBrightness_Result strict
Defined in fuchsia.ui.brightness/brightness.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Control_GetMaxAbsoluteBrightness_Response
|
|
2 |
err |
zx/Status
|
ALIASES
Name | Value | Description |
---|---|---|
brightness |
float32 |
A normalized relative brightness adjustment in the range 0.0 (off/minimum) to 1.0 (maximum). |