pub struct CoordinatorListenerProxy { /* private fields */ }
Implementations§
Source§impl CoordinatorListenerProxy
impl CoordinatorListenerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.display/CoordinatorListener.
Sourcepub fn take_event_stream(&self) -> CoordinatorListenerEventStream
pub fn take_event_stream(&self) -> CoordinatorListenerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn on_displays_changed(
&self,
added: &[Info],
removed: &[DisplayId],
) -> Result<(), Error>
pub fn on_displays_changed( &self, added: &[Info], removed: &[DisplayId], ) -> Result<(), Error>
Called when the set of connected displays changes.
Also used to communicate the set of connected displays to a newly connected client.
After this method is called, all applied and draft configurations may no
longer be valid. The client must validate and apply a new configuration,
by calling [Coordinator.CheckConfig
] and [Coordinator.ApplyConfig
].
added
and removed
must not be both empty.
Sourcepub fn on_vsync(
&self,
display_id: &DisplayId,
timestamp: i64,
applied_config_stamp: &ConfigStamp,
cookie: &VsyncAckCookie,
) -> Result<(), Error>
pub fn on_vsync( &self, display_id: &DisplayId, timestamp: i64, applied_config_stamp: &ConfigStamp, cookie: &VsyncAckCookie, ) -> Result<(), Error>
Called on every display Vertical Synchronization (Vsync).
Clients must acknowledge VSync events via the method
[Coordinator.AcknowledgeVsync
]. The coordinator may throttle a client
that accumulates a certain number of unacknowledged VSync cookies.
Throttled clients do not receive VSync events.
After a the client catches up on acknowledging cookies, the coordinator will unthrottle it (resume sending VSync events). Throttled clients may miss some VSync events, as the coordinator is allowed to drop VSync event information for throttled clients.
When dropping VSync event information for throttled clients, the coordinator should prioritize retaining the information for newer events. In other words, the oldest unreported events should be dropped first.
Sourcepub fn on_client_ownership_change(
&self,
has_ownership: bool,
) -> Result<(), Error>
pub fn on_client_ownership_change( &self, has_ownership: bool, ) -> Result<(), Error>
Called when the corresponding Coordinator
client gains or loses
ownership of the displays.
A Coordinator
client’s active config is displayed iff it holds the
ownership of the displays.
A new Coordinator
client should assume they do not have ownership
of the displays until this method informs them otherwise.
Trait Implementations§
Source§impl Clone for CoordinatorListenerProxy
impl Clone for CoordinatorListenerProxy
Source§fn clone(&self) -> CoordinatorListenerProxy
fn clone(&self) -> CoordinatorListenerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl CoordinatorListenerProxyInterface for CoordinatorListenerProxy
impl CoordinatorListenerProxyInterface for CoordinatorListenerProxy
fn on_displays_changed( &self, added: &[Info], removed: &[DisplayId], ) -> Result<(), Error>
fn on_vsync( &self, display_id: &DisplayId, timestamp: i64, applied_config_stamp: &ConfigStamp, cookie: &VsyncAckCookie, ) -> Result<(), Error>
fn on_client_ownership_change(&self, has_ownership: bool) -> Result<(), Error>
Source§impl Debug for CoordinatorListenerProxy
impl Debug for CoordinatorListenerProxy
Source§impl Proxy for CoordinatorListenerProxy
impl Proxy for CoordinatorListenerProxy
Source§type Protocol = CoordinatorListenerMarker
type Protocol = CoordinatorListenerMarker
Proxy
controls.