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: RectangleThe 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: RectangleThe 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> Decode<ViewParameters, D> for ViewParameterswhere
    D: ResourceDialect,
 
impl<D> Decode<ViewParameters, D> for ViewParameterswhere
    D: ResourceDialect,
Source§fn new_empty() -> ViewParameters
 
fn new_empty() -> ViewParameters
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<ViewParameters, D> for &ViewParameterswhere
    D: ResourceDialect,
 
impl<D> Encode<ViewParameters, D> for &ViewParameterswhere
    D: ResourceDialect,
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.Source§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 moreSource§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 moreSource§fn borrow(
    value: &<ViewParameters as TypeMarker>::Owned,
) -> <ViewParameters as ValueTypeMarker>::Borrowed<'_>
 
fn borrow( value: &<ViewParameters as TypeMarker>::Owned, ) -> <ViewParameters as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.