pub struct MouseEvent {
pub event_type: MouseEventType,
pub col: u16,
pub row: u16,
pub button: i16,
pub ctrl_key: bool,
pub shift_key: bool,
pub alt_key: bool,
}
Expand description
Mouse event data with terminal coordinates
Fields§
§event_type: MouseEventType
Type of mouse event
col: u16
Column in terminal grid (0-based)
row: u16
Row in terminal grid (0-based)
Mouse button (0=left, 1=middle, 2=right)
ctrl_key: bool
Whether Ctrl key was pressed
shift_key: bool
Whether Shift key was pressed
alt_key: bool
Whether Alt key was pressed
Trait Implementations§
Source§impl Clone for MouseEvent
impl Clone for MouseEvent
Source§fn clone(&self) -> MouseEvent
fn clone(&self) -> MouseEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MouseEvent
impl Debug for MouseEvent
Source§impl From<MouseEvent> for JsValue
impl From<MouseEvent> for JsValue
Source§fn from(value: MouseEvent) -> Self
fn from(value: MouseEvent) -> Self
Converts to this type from the input type.
Source§impl From<TerminalMouseEvent> for MouseEvent
impl From<TerminalMouseEvent> for MouseEvent
Source§fn from(event: TerminalMouseEvent) -> Self
fn from(event: TerminalMouseEvent) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for MouseEvent
impl FromWasmAbi for MouseEvent
Source§impl IntoWasmAbi for MouseEvent
impl IntoWasmAbi for MouseEvent
Source§impl LongRefFromWasmAbi for MouseEvent
impl LongRefFromWasmAbi for MouseEvent
Source§impl OptionFromWasmAbi for MouseEvent
impl OptionFromWasmAbi for MouseEvent
Source§impl OptionIntoWasmAbi for MouseEvent
impl OptionIntoWasmAbi for MouseEvent
Source§impl RefFromWasmAbi for MouseEvent
impl RefFromWasmAbi for MouseEvent
Source§type Anchor = RcRef<MouseEvent>
type Anchor = RcRef<MouseEvent>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for MouseEvent
impl RefMutFromWasmAbi for MouseEvent
Source§impl TryFromJsValue for MouseEvent
impl TryFromJsValue for MouseEvent
Source§impl VectorFromWasmAbi for MouseEvent
impl VectorFromWasmAbi for MouseEvent
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[MouseEvent]>
Source§impl VectorIntoJsValue for MouseEvent
impl VectorIntoJsValue for MouseEvent
fn vector_into_jsvalue(vector: Box<[MouseEvent]>) -> JsValue
Source§impl VectorIntoWasmAbi for MouseEvent
impl VectorIntoWasmAbi for MouseEvent
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[MouseEvent]>) -> Self::Abi
Source§impl WasmDescribeVector for MouseEvent
impl WasmDescribeVector for MouseEvent
impl Copy for MouseEvent
impl SupportsConstructor for MouseEvent
impl SupportsInstanceProperty for MouseEvent
impl SupportsStaticProperty for MouseEvent
Auto Trait Implementations§
impl Freeze for MouseEvent
impl RefUnwindSafe for MouseEvent
impl Send for MouseEvent
impl Sync for MouseEvent
impl Unpin for MouseEvent
impl UnwindSafe for MouseEvent
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.