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.

RegisterMediaButtonsListener

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

Request

NameType
listener MediaButtonsListener

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.

OnMediaButtonsEvent

Request

NameType
event fuchsia.ui.input/MediaButtonsEvent

KeyboardCaptureListenerHACK

Defined in fuchsia.ui.policy/presentation.fidl

Presentation.CaptureKeyboardEvent will consume this listener interface and call OnEvent when the registered keyboard event occurs.

OnEvent

Request

NameType
event fuchsia.ui.input/KeyboardEvent

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.

CaptureKeyboardEventHACK

This call exists so that base shell can capture hotkeys and do special things with it (e.g., switch a session shell). Phase and modifiers are always matched, and valid (non-zero) code points are matched. If there is no valid code point, the filter will match against the hid usage value. The full KeyboardEvent is supplied to listener's OnEvent.

Request

NameType
event_to_capture fuchsia.ui.input/KeyboardEvent
listener KeyboardCaptureListenerHACK

CapturePointerEventsHACK

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

Request

NameType
listener PointerCaptureListenerHACK

InjectPointerEventHACK

EXPERIMENTAL. Inject pointer events into input stream. This WILL go away. Used exclusively by Session Shells to test focus navigation.

Request

NameType
event fuchsia.ui.input/PointerEvent

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.

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 deprecated, and will print a warning. In the future, this will result in an error and the channel being closed.

Request

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

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 PresentOrReplaceView or to PresentView.

Request

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

HACK_SetRendererParams

Sets new default renderer params and forces them on for the duration of the presenter's lifetime. Only applies to any subsequent calls to Present(). Used for testing.

Request

NameType
enable_clipping bool
params vector<fuchsia.ui.gfx/RendererParam>

ENUMS

DisplayUsage

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.