gdk4

Struct ButtonEvent

Source
pub struct ButtonEvent { /* private fields */ }
Expand description

GLib type: Shared boxed type with reference counted clone semantics.

Implementations§

Source§

impl ButtonEvent

Source

pub fn as_ptr(&self) -> *mut GdkButtonEvent

Return the inner pointer to the underlying C value.

Source

pub unsafe fn from_glib_ptr_borrow(ptr: &*mut GdkButtonEvent) -> &Self

Borrows the underlying C value.

Source§

impl ButtonEvent

Source

pub fn button(&self) -> u32

Source§

impl ButtonEvent

Source

pub fn upcast(self) -> Event

Source

pub fn upcast_ref(&self) -> &Event

Methods from Deref<Target = Event>§

Source

pub fn as_ptr(&self) -> *mut GdkEvent

Return the inner pointer to the underlying C value.

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

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

Source

pub fn type_(&self) -> Type

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 Clone for ButtonEvent

Source§

fn clone(&self) -> Self

Makes a clone of this shared reference.

This increments the strong reference count of the reference. Dropping the reference will decrement it again.

1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ButtonEvent

Source§

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

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

impl Deref for ButtonEvent

Source§

type Target = Event

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl EventKind for ButtonEvent

Source§

fn event_types() -> &'static [EventType]

Source§

impl StaticType for ButtonEvent

Source§

fn static_type() -> Type

Returns the type identifier of Self.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

Source§

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

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 T
where T: StaticType,

Source§

fn ensure_type()

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

impl<T> ToOwned for T
where T: Clone,

Source§

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> TransparentType for T

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.