class SingletonDisplayService
Defined at line 30 of file ../../src/ui/scenic/lib/display/singleton_display_service.h
Implements the `fuchsia.ui.display.singleton.Info`,
`fuchsia.ui.composition.internal.DisplayOwnership`, and
`fuchsia.ui.input.internal.InputOwnership` FIDL services.
Architectural note on `InputOwnership` colocation:
`InputOwnership` is implemented here alongside `DisplayOwnership` because both protocols
distribute duplicates of the same underlying display kernel event (`Display::ownership_event()`),
which multiplexes orthogonal signal bits for both hardware display ownership (controlled by
`DisplayManager`) and direct input ownership (controlled by the `ViewTree` evaluator).
Public Methods
void SingletonDisplayService (std::shared_ptr<display::Display> display)
Defined at line 16 of file ../../src/ui/scenic/lib/display/singleton_display_service.cc
void GetMetrics (GetMetricsCompleter::Sync & completer)
`fuchsia_ui_display_singleton::Info`
Defined at line 19 of file ../../src/ui/scenic/lib/display/singleton_display_service.cc
void GetMetrics (fit::function<void (fuchsia_ui_display_singleton::InfoGetMetricsResponse)> callback)
Defined at line 25 of file ../../src/ui/scenic/lib/display/singleton_display_service.cc
void GetEvent (fidl::Server<fuchsia_ui_composition_internal::DisplayOwnership>::GetEventCompleter::Sync & completer)
`fuchsia_ui_composition_internal::DisplayOwnership`
Defined at line 42 of file ../../src/ui/scenic/lib/display/singleton_display_service.cc
void GetEvent (fit::function<void (fuchsia_ui_composition_internal::DisplayOwnershipGetEventResponse)> callback)
Defined at line 50 of file ../../src/ui/scenic/lib/display/singleton_display_service.cc
void GetEvent (fuchsia_ui_input_internal::InputOwnershipGetEventRequest & request, fidl::Server<fuchsia_ui_input_internal::InputOwnership>::GetEventCompleter::Sync & completer)
`fuchsia_ui_input_internal::InputOwnership`
Defined at line 69 of file ../../src/ui/scenic/lib/display/singleton_display_service.cc
void SetOnViewRefRegisteredCallback (ViewRefRegisteredCallback callback)
Registers a callback invoked whenever an input client requests `GetEvent()` with a
`kViewRef` target after handle duplication has succeeded.
Threading contract: Must be called on Scenic's main thread during initialization before
`AddPublicService()` starts serving incoming FIDL requests.
Lifecycle
&
direct-client model: In accordance with the system-wide singleton direct-client
model, registering a new client ViewRef replaces any prior registration in Scenic's
`InputOwnershipEvaluator`. The evaluator monitors when this registered view satisfies
single-view and full-screen criteria, while the duplicated kernel event broadcasts ownership
signal state changes.
Defined at line 75 of file ../../src/ui/scenic/lib/display/singleton_display_service.h
void GetEvent (fuchsia_ui_input_internal::InputOwnershipGetEventRequest request, fit::function<void (zx_status_t, std::optional<fit::result<fuchsia_ui_input_internal::InputOwnershipError, fuchsia_ui_input_internal::InputOwnershipGetEventResponse>>)> callback)
Defined at line 83 of file ../../src/ui/scenic/lib/display/singleton_display_service.cc
void AddPublicService (sys::OutgoingDirectory * outgoing_directory)
Registers this service impl in `outgoing_directory`. This service impl object must then live
for as long as it is possible for any service requests to be made.
Defined at line 167 of file ../../src/ui/scenic/lib/display/singleton_display_service.cc