Struct gdk4::Event

source ·
#[repr(transparent)]
pub struct Event { /* private fields */ }

Implementations§

source§

impl Event

source

pub const NONE: Option<&'static Event> = None

source

pub fn axes(&self) -> Option<Vec<f64>>

source

pub fn axis(&self, axis_use: AxisUse) -> Option<f64>

source

pub fn device(&self) -> Option<Device>

source

pub fn device_tool(&self) -> Option<DeviceTool>

source

pub fn display(&self) -> Option<Display>

source

pub fn event_sequence(&self) -> EventSequence

source

pub fn event_type(&self) -> EventType

source

pub fn history(&self) -> Vec<TimeCoord>

source

pub fn modifier_state(&self) -> ModifierType

source

pub fn is_pointer_emulated(&self) -> bool

source

pub fn position(&self) -> Option<(f64, f64)>

source

pub fn seat(&self) -> Option<Seat>

source

pub fn surface(&self) -> Option<Surface>

source

pub fn time(&self) -> u32

source

pub fn triggers_context_menu(&self) -> bool

source§

impl Event

source

pub fn is<T: EventKind>(&self) -> bool

source

pub fn type_(&self) -> Type

source

pub fn downcast<T: EventKind>(self) -> Result<T, Event>

source

pub fn downcast_ref<T: EventKind>(&self) -> Option<&T>

source

pub fn angle(&self, event: impl AsRef<Event>) -> Option<f64>

source

pub fn center(&self, event: impl AsRef<Event>) -> Option<(f64, f64)>

source

pub fn distance(&self, event: impl AsRef<Event>) -> Option<f64>

Trait Implementations§

source§

impl AsRef<Event> for ButtonEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<Event> for CrossingEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<Event> for DNDEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<Event> for DeleteEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<Event> for FocusEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<Event> for GrabBrokenEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<Event> for KeyEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<Event> for MotionEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<Event> for PadEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<Event> for ProximityEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<Event> for ScrollEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<Event> for TouchEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<Event> for TouchpadEvent

source§

fn as_ref(&self) -> &Event

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for Event

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Event

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Event

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl StaticType for Event

source§

fn static_type() -> Type

Returns the type identifier of Self.

Auto Trait Implementations§

§

impl RefUnwindSafe for Event

§

impl !Send for Event

§

impl !Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticTypeExt for Twhere T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.