pub struct CoordinatorListenerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl CoordinatorListenerSynchronousProxy
impl CoordinatorListenerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<CoordinatorListenerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<CoordinatorListenerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
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 SynchronousProxy for CoordinatorListenerSynchronousProxy
impl SynchronousProxy for CoordinatorListenerSynchronousProxy
Source§type Proxy = CoordinatorListenerProxy
type Proxy = CoordinatorListenerProxy
Source§type Protocol = CoordinatorListenerMarker
type Protocol = CoordinatorListenerMarker
Proxy
controls.