pub struct Device(/* private fields */);
Implementations§
Source§impl Device
impl Device
pub fn get_associated_device(&self) -> Option<Device>
pub fn get_axes(&self) -> AxisFlags
pub fn get_axis_use(&self, index_: u32) -> AxisUse
pub fn get_device_type(&self) -> DeviceType
pub fn get_display(&self) -> Display
pub fn get_has_cursor(&self) -> bool
pub fn get_key(&self, index_: u32) -> Option<(u32, ModifierType)>
pub fn get_last_event_window(&self) -> Option<Window>
pub fn get_mode(&self) -> InputMode
pub fn get_n_axes(&self) -> i32
pub fn get_n_keys(&self) -> i32
pub fn get_name(&self) -> Option<GString>
pub fn get_position(&self) -> (Screen, i32, i32)
pub fn get_position_double(&self) -> (Screen, f64, f64)
pub fn get_product_id(&self) -> Option<GString>
pub fn get_seat(&self) -> Option<Seat>
pub fn get_source(&self) -> InputSource
pub fn get_vendor_id(&self) -> Option<GString>
pub fn get_window_at_position(&self) -> (Option<Window>, i32, i32)
pub fn get_window_at_position_double(&self) -> (Option<Window>, f64, f64)
pub fn grab<P: IsA<Window>>( &self, window: &P, grab_ownership: GrabOwnership, owner_events: bool, event_mask: EventMask, cursor: Option<&Cursor>, time_: u32, ) -> GrabStatus
👎Deprecated
pub fn list_axes(&self) -> Vec<Atom>
pub fn list_slave_devices(&self) -> Vec<Device>
pub fn set_axis_use(&self, index_: u32, use_: AxisUse)
pub fn set_key(&self, index_: u32, keyval: u32, modifiers: ModifierType)
pub fn set_mode(&self, mode: InputMode) -> bool
pub fn ungrab(&self, time_: u32)
👎Deprecated
pub fn warp(&self, screen: &Screen, x: i32, y: i32)
pub fn get_property_device_manager(&self) -> Option<DeviceManager>
pub fn get_property_input_mode(&self) -> InputMode
pub fn set_property_input_mode(&self, input_mode: InputMode)
pub fn get_property_input_source(&self) -> InputSource
pub fn get_property_num_touches(&self) -> u32
pub fn set_property_seat(&self, seat: Option<&Seat>)
pub fn get_property_tool(&self) -> Option<DeviceTool>
pub fn get_property_type(&self) -> DeviceType
pub fn grab_info_libgtk_only( display: &Display, device: &Device, ) -> Option<(Window, bool)>
👎Deprecated
pub fn connect_changed<F: Fn(&Device) + 'static>(&self, f: F) -> SignalHandlerId
pub fn connect_tool_changed<F: Fn(&Device, &DeviceTool) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_property_associated_device_notify<F: Fn(&Device) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_property_axes_notify<F: Fn(&Device) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_property_input_mode_notify<F: Fn(&Device) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_property_n_axes_notify<F: Fn(&Device) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_property_seat_notify<F: Fn(&Device) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_property_tool_notify<F: Fn(&Device) + 'static>( &self, f: F, ) -> SignalHandlerId
pub fn connect_property_type_notify<F: Fn(&Device) + 'static>( &self, f: F, ) -> SignalHandlerId
Trait Implementations§
Source§impl Ord for Device
impl Ord for Device
Source§impl<T: ObjectType> PartialEq<T> for Device
impl<T: ObjectType> PartialEq<T> for Device
Source§impl<T: ObjectType> PartialOrd<T> for Device
impl<T: ObjectType> PartialOrd<T> for Device
Source§impl StaticType for Device
impl StaticType for Device
Source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.impl Eq for Device
impl IsA<Device> for DevicePad
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl !Send for Device
impl !Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
Source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
Upcasts an object to a superclass or interface
T
. Read moreSource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
Upcasts an object to a reference of its superclass or interface
T
. Read moreSource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
Tries to downcast to a subclass or interface implementor
T
. Read moreSource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
Tries to downcast to a reference of its subclass or interface implementor
T
. Read moreSource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
Tries to cast to an object of type
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moreSource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Tries to cast to reference to an object of type
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moreSource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
Casts to
T
unconditionally. Read moreSource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
Casts to
&T
unconditionally. Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
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 GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
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>,
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 GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
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>,
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 GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
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>,
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 GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
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> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
Source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
Returns
true
if the object is an instance of (can be cast to) T
.