pub trait GestureSingleExt: IsA<GestureSingle> + 'static {
// Provided methods
fn button(&self) -> u32 { ... }
fn current_button(&self) -> u32 { ... }
fn current_sequence(&self) -> Option<EventSequence> { ... }
fn is_exclusive(&self) -> bool { ... }
fn is_touch_only(&self) -> bool { ... }
fn set_button(&self, button: u32) { ... }
fn set_exclusive(&self, exclusive: bool) { ... }
fn set_touch_only(&self, touch_only: bool) { ... }
fn connect_button_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_exclusive_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_touch_only_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Expand description
Trait containing all GestureSingle
methods.
§Implementors
DragSource
, GestureClick
, GestureDrag
, GestureLongPress
, GestureSingle
, GestureStylus
, GestureSwipe
Provided Methods§
Returns the button number @self listens for.
If this is 0, the gesture reacts to any button press.
§Returns
The button number, or 0 for any button
Returns the button number currently interacting with @self, or 0 if there is none.
§Returns
The current button number
Sourcefn current_sequence(&self) -> Option<EventSequence>
fn current_sequence(&self) -> Option<EventSequence>
Returns the event sequence currently interacting with @self.
This is only meaningful if GestureExt::is_active()
returns true
.
§Returns
the current sequence
Sourcefn is_exclusive(&self) -> bool
fn is_exclusive(&self) -> bool
Gets whether a gesture is exclusive.
For more information, see set_exclusive()
.
§Returns
Whether the gesture is exclusive
Sourcefn is_touch_only(&self) -> bool
fn is_touch_only(&self) -> bool
Sets the button number @self listens to.
If non-0, every button press from a different button number will be ignored. Touch events implicitly match with button 1.
§button
button number to listen to, or 0 for any button
Sourcefn set_exclusive(&self, exclusive: bool)
fn set_exclusive(&self, exclusive: bool)
Sourcefn set_touch_only(&self, touch_only: bool)
fn set_touch_only(&self, touch_only: bool)
fn connect_exclusive_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_touch_only_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.