[][src]Trait gtk::GestureSingleExt

pub trait GestureSingleExt: 'static {
    fn get_button(&self) -> u32;
fn get_current_button(&self) -> u32;
fn get_current_sequence(&self) -> Option<EventSequence>;
fn get_exclusive(&self) -> bool;
fn get_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_property_button_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_exclusive_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_touch_only_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all GestureSingle methods.

Implementors

GestureDrag, GestureLongPress, GestureMultiPress, GestureSingle, GestureStylus, GestureSwipe

Required methods

fn get_button(&self) -> u32

Returns the button number self listens for, or 0 if self reacts to any button press.

Returns

The button number, or 0 for any button

fn get_current_button(&self) -> u32

Returns the button number currently interacting with self, or 0 if there is none.

Returns

The current button number

fn get_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

fn get_exclusive(&self) -> bool

Gets whether a gesture is exclusive. For more information, see GestureSingleExt::set_exclusive.

Returns

Whether the gesture is exclusive

fn get_touch_only(&self) -> bool

Returns true if the gesture is only triggered by touch events.

Returns

true if the gesture only handles touch events

fn set_button(&self, button: u32)

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

fn set_exclusive(&self, exclusive: bool)

Sets whether self is exclusive. An exclusive gesture will only handle pointer and "pointer emulated" touch events, so at any given time, there is only one sequence able to interact with those.

exclusive

true to make self exclusive

fn set_touch_only(&self, touch_only: bool)

If touch_only is true, self will only handle events of type gdk::EventType::TouchBegin, gdk::EventType::TouchUpdate or gdk::EventType::TouchEnd. If false, mouse events will be handled too.

touch_only

whether self handles only touch events

fn connect_property_button_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_exclusive_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_touch_only_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<GestureSingle>> GestureSingleExt for O[src]

Loading content...