pub struct PointerScroll {
pub x: f64,
pub y: f64,
pub scroll_type: i32,
}
Expand description
§065 - Pointer Scroll
This message, which must be sent by the client on the same stream as the
original 030 - Attach
message, indicates that the user has scrolled,
either using the mouse wheel, a touchpad, or some other mechanism.
The scroll_type determines how the values of x and y are interpreted.
CONTINUOUS
indicates a vector in pixels, in the coordinate space defined
by the resolution
parameter of the VirtualDisplayParams
set on the
session. Discrete indicates individual steps, for example on a clicky
scroll wheel.
In both cases, positive values indicate that the scrolled content should move right and down, revealing more content to the top and left.
Fields§
§x: f64
§y: f64
§scroll_type: i32
Implementations§
Source§impl PointerScroll
impl PointerScroll
Sourcepub fn scroll_type(&self) -> ScrollType
pub fn scroll_type(&self) -> ScrollType
Returns the enum value of scroll_type
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_scroll_type(&mut self, value: ScrollType)
pub fn set_scroll_type(&mut self, value: ScrollType)
Sets scroll_type
to the provided enum value.
Trait Implementations§
Source§impl Clone for PointerScroll
impl Clone for PointerScroll
Source§fn clone(&self) -> PointerScroll
fn clone(&self) -> PointerScroll
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PointerScroll
impl Debug for PointerScroll
Source§impl Default for PointerScroll
impl Default for PointerScroll
Source§impl From<PointerScroll> for MessageType
impl From<PointerScroll> for MessageType
Source§fn from(v: PointerScroll) -> Self
fn from(v: PointerScroll) -> Self
Source§impl Message for PointerScroll
impl Message for PointerScroll
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.