GestureSwipe

GtkGestureSwipe is a GtkGesture for swipe gestures.

After a press/move/.../move/release sequence happens, the [signal@Gtk.GestureSwipe::swipe] signal will be emitted, providing the velocity and directionality of the sequence at the time it was lifted.

If the velocity is desired in intermediate points, [method@Gtk.GestureSwipe.get_velocity] can be called in a [signal@Gtk.Gesture::update] handler.

All velocities are reported in pixels/sec units.

Constructors

this
this(GtkGestureSwipe* gtkGestureSwipe, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Returns a newly created GtkGesture that recognizes swipes.

Members

Functions

addOnSwipe
gulong addOnSwipe(void delegate(double, double, GestureSwipe) dlg, ConnectFlags connectFlags)

Emitted when the recognized gesture is finished.

getGestureSwipeStruct
GtkGestureSwipe* getGestureSwipeStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getVelocity
bool getVelocity(double velocityX, double velocityY)

Gets the current velocity.

Static functions

getType
GType getType()

Variables

gtkGestureSwipe
GtkGestureSwipe* gtkGestureSwipe;

the main Gtk struct

Inherited Members

From GestureSingle

gtkGestureSingle
GtkGestureSingle* gtkGestureSingle;

the main Gtk struct

getGestureSingleStruct
GtkGestureSingle* getGestureSingleStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getButton
uint getButton()

Returns the button number @gesture listens for.

getCurrentButton
uint getCurrentButton()

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

getCurrentSequence
GdkEventSequence* getCurrentSequence()

Returns the event sequence currently interacting with @gesture.

getExclusive
bool getExclusive()

Gets whether a gesture is exclusive.

getTouchOnly
bool getTouchOnly()

Returns %TRUE if the gesture is only triggered by touch events.

setButton
void setButton(uint button)

Sets the button number @gesture listens to.

setExclusive
void setExclusive(bool exclusive)

Sets whether @gesture is exclusive.

setTouchOnly
void setTouchOnly(bool touchOnly)

Sets whether to handle only touch events.

Meta