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

fuchsia.ui.policy

PROTOCOLS

DeviceListenerRegistry

Defined in fuchsia.ui.policy/device_listener.fidl

Service for exposing state and events of devices, such as media buttons.

RegisterListener

Registers a listener to receive media button related events, such as changes from volume buttons and mute switches. On registration, the listener receives the last media button event that occured, if one exists, and all media button events going forward.

Request

NameType
listener MediaButtonsListener

Response

NameType

RegisterMediaButtonsListener

Registers a listener to receive media button related events, such as changes from volume buttons and mute switches.

Request

NameType
listener MediaButtonsListener

DisplayBacklight

Defined in fuchsia.ui.policy/display_backlight.fidl

Manipulates global policy for display backlight. Serves as the main "front end" interface for usage by UX components; other protocols (such as fuchsia.ui.scenic.Session and fuchsia.hardware.display.Controller) act as implementation.

Global Scope. All displays, in all display controllers, are affected uniformly.

Effect Timing. This protocol does not guarantee a deadline by which the minimum value is applied to a display; it is best effort.

Multiple clients. This protocol does not guarantee unique access to manipulate display backlight functionality.

Reference. Related to fuchsia.hardware.display.Controller.

SetMinimumRgb

Submits a new minimum color channel value for display backlight.

The valid range for a minimum value is [0, 255] (inclusive). For a new minimum value M, each color channel's range will be limited to [M, 255].

Flow control: The caller is allowed at most one in-flight |SetMinimumRgb| at at time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

Request

NameType
minimum_rgb uint8

Response

NameType

MediaButtonsListener

Defined in fuchsia.ui.policy/device_listener.fidl

A listener for media buttons events. DeviceListenerRegistry.RegisterMediaButtonsListener will consume this listener interface and call OnMediaButtonsEvent when the registered media buttons event occurs.

OnEvent

Request

NameType
event fuchsia.ui.input/MediaButtonsEvent

Response

NameType

OnMediaButtonsEvent

Request

NameType
event fuchsia.ui.input/MediaButtonsEvent

PointerCaptureListenerHACK

Defined in fuchsia.ui.policy/presentation.fidl

Presentation.CapturePointerEvent will consume this listener interface and call OnEvent when a pointer event occurs.

OnPointerEvent

Request

NameType
event fuchsia.ui.input/PointerEvent

Presentation

Defined in fuchsia.ui.policy/presentation.fidl

Allows clients of Presenter.Present() to control a presentation. Experimental.

CapturePointerEventsHACK

This call exists so that base shell can capture pointer events.

Request

NameType
listener PointerCaptureListenerHACK

Presenter

Defined in fuchsia.ui.policy/presenter.fidl

The Presenter service provides a way for applications to ask that a view be added to a view tree, leaving any window management concerns up to the discretion of the presenter implementation.

PresentOrReplaceView

Request that the View's contents be displayed on the screen as a Presentation. Destroys any existing presentations and replaces them with the new one. This is true whether the existing view was created by a call to PresentView, PresentOrReplaceView or PresentOrReplaceView2.

Request

NameType
view_holder_token fuchsia.ui.views/ViewHolderToken
presentation_request request<Presentation>?

PresentOrReplaceView2

Request

NameType
view_holder_token fuchsia.ui.views/ViewHolderToken
view_ref fuchsia.ui.views/ViewRef
presentation_request request<Presentation>?

PresentView

Request that the View's contents be displayed on the screen as a Presentation. Each call to PresentView creates a new Presentation. Having more than one simultaneous Presentation (i.e. calling PresentView more than once) is not allowed and will result

Request

NameType
view_holder_token fuchsia.ui.views/ViewHolderToken
presentation_request request<Presentation>?

STRUCTS

ENUMS

DisplayUsage strict

Type: uint32

Defined in fuchsia.ui.policy/display_usage.fidl

Describes the intended usage of the display.

NameValueDescription
kUnknown 0
kHandheld 1

Display is held in one or both hands.

kClose 2

Display is used well within arm's reach.

kNear 3

Display is used at arm's reach.

kMidrange 4

Display is used beyond arm's reach.

kFar 5

Display is used well beyond arm's reach.