Enum PointerSpace
pub enum PointerSpace {
Desktop {
room: String,
},
Surface {
surface: String,
},
Tile {
room: String,
tab: u64,
},
}Expand description
The coordinate space a pointer position is measured in.
A pointer is a pair of numbers that mean nothing on their own: the same
(230, 34) is a place on the desktop, in a file manager, and in a word
processor. The space travels with the position because it’s what decides
who may place it — and who may not: a presence frame reaches every app in
a room, so without this each read the position as its own and one person
was drawn once per open window. With the space carried, at most one
receiver can answer “that is my space”.
Variant order is a wire contract. Cap’n Proto carries the postcard key bytes opaquely and peer replication forwards the same bytes, so reordering silently misreads every pointer scope rather than failing to build.
Variants§
Desktop
Compositor scene coordinates on this device’s own desktop. Only
meaningful on the device that measured them: its monitors decide
where anything is, so a collaborator’s desktop is a different shape.
A person’s pointer goes to other devices as Self::Tile instead.
Surface
Content coordinates inside the surface surface names — the app id
that surface announces (crate::local_surface_id). Named by the
app rather than the window instance: two windows of one app on one
document are comparable content, but a file manager and a word
processor are not, even when the broker hands both the same frame.
Tile
Logical pixels from the top-left corner of the tile that shows tab
tab of room. Tabs are the room’s, shared by every device in it,
while which monitor shows a tab and where is each device’s own
layout — so this is how a person’s desktop pointer travels: every
receiver places it over its own tile for that tab, above every
window, whatever its monitors look like.
Trait Implementations§
§impl Clone for PointerSpace
impl Clone for PointerSpace
§fn clone(&self) -> PointerSpace
fn clone(&self) -> PointerSpace
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for PointerSpace
impl Debug for PointerSpace
§impl<'de> Deserialize<'de> for PointerSpace
impl<'de> Deserialize<'de> for PointerSpace
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PointerSpace, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PointerSpace, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Hash for PointerSpace
impl Hash for PointerSpace
§impl PartialEq for PointerSpace
impl PartialEq for PointerSpace
§impl Serialize for PointerSpace
impl Serialize for PointerSpace
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for PointerSpace
impl StructuralPartialEq for PointerSpace
Auto Trait Implementations§
impl Freeze for PointerSpace
impl RefUnwindSafe for PointerSpace
impl Send for PointerSpace
impl Sync for PointerSpace
impl Unpin for PointerSpace
impl UnsafeUnpin for PointerSpace
impl UnwindSafe for PointerSpace
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more