pub struct ViewParameters {
pub view: Rectangle,
pub viewport: Rectangle,
pub viewport_to_view_transform: [f32; 9],
}
Expand description
The parameters of the associated view and viewport, sufficient to correctly interpret the position and scale of pointer events dispatched to this view.
Ordering. These parameters arrive over the same channel as pointer events, to provide synchronous context for interpreting the position of pointer events in the view’s local coordinate system.
Inter-protocol redundancy. Some of these parameters may also be sent over an independent channel dedicated to view control; the client is responsible for correct use of asynchronously received parameters.
TODO(https://fxbug.dev/42162292): Rename viewport, it is used in Flatland.
Fields§
§view: Rectangle
The view’s area of content, placed in the coordinate system of the view.
The rectangle is defined by the parent view’s setup of clipping on this view.
viewport: Rectangle
The viewport’s area of interaction, placed in an independent coordinate system.
A pointer event’s position is defined in the coordinate system of this viewport.
A change in viewport extents means the region for pointer interaction has itself moved, or changed in size, or both.
viewport_to_view_transform: [f32; 9]
The transform matrix that relates a point’s position in the viewport’s coordinate system to its position in the view’s coordinate system.
Trait Implementations§
Source§impl Clone for ViewParameters
impl Clone for ViewParameters
Source§fn clone(&self) -> ViewParameters
fn clone(&self) -> ViewParameters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ViewParameters
impl Debug for ViewParameters
Source§impl<D: ResourceDialect> Decode<ViewParameters, D> for ViewParameters
impl<D: ResourceDialect> Decode<ViewParameters, D> for ViewParameters
Source§impl<D: ResourceDialect> Encode<ViewParameters, D> for &ViewParameters
impl<D: ResourceDialect> Encode<ViewParameters, D> for &ViewParameters
Source§impl<D: ResourceDialect, T0: Encode<Rectangle, D>, T1: Encode<Rectangle, D>, T2: Encode<Array<f32, 9>, D>> Encode<ViewParameters, D> for (T0, T1, T2)
impl<D: ResourceDialect, T0: Encode<Rectangle, D>, T1: Encode<Rectangle, D>, T2: Encode<Array<f32, 9>, D>> Encode<ViewParameters, D> for (T0, T1, T2)
Source§impl PartialEq for ViewParameters
impl PartialEq for ViewParameters
Source§impl PartialOrd for ViewParameters
impl PartialOrd for ViewParameters
Source§impl TypeMarker for ViewParameters
impl TypeMarker for ViewParameters
Source§type Owned = ViewParameters
type Owned = ViewParameters
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for ViewParameters
impl ValueTypeMarker for ViewParameters
Source§type Borrowed<'a> = &'a ViewParameters
type Borrowed<'a> = &'a ViewParameters
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for ViewParameters
impl Persistable for ViewParameters
impl StructuralPartialEq for ViewParameters
Auto Trait Implementations§
impl Freeze for ViewParameters
impl RefUnwindSafe for ViewParameters
impl Send for ViewParameters
impl Sync for ViewParameters
impl Unpin for ViewParameters
impl UnwindSafe for ViewParameters
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = 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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)