GestureSwipe

#GtkGestureSwipe is a #GtkGesture implementation able to recognize swipes, after a press/move/.../move/release sequence happens, the #GtkGestureSwipe::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, gtk_gesture_swipe_get_velocity() can be called on eg. a #GtkGesture::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(Widget widget)

Returns a newly created #GtkGesture that recognizes swipes.

Members

Classes

OnSwipeDelegateWrapper
class OnSwipeDelegateWrapper
Undocumented in source.

Functions

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

This signal is emitted when the recognized gesture is finished, velocity and direction are a product of previously recorded events.

getGestureSwipeStruct
GtkGestureSwipe* getGestureSwipeStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getVelocity
bool getVelocity(double velocityX, double velocityY)

If the gesture is recognized, this function returns %TRUE and fill in @velocity_x and @velocity_y with the recorded velocity, as per the last event(s) processed.

internalRemoveOnSwipe
void internalRemoveOnSwipe(OnSwipeDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

callBackSwipe
void callBackSwipe(GtkGestureSwipe* gestureswipeStruct, double velocityX, double velocityY, OnSwipeDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSwipeDestroy
void callBackSwipeDestroy(OnSwipeDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
getType
GType getType()

Variables

gtkGestureSwipe
GtkGestureSwipe* gtkGestureSwipe;

the main Gtk struct

onSwipeListeners
OnSwipeDelegateWrapper[] onSwipeListeners;
Undocumented in source.

Inherited Members

From GestureSingle

gtkGestureSingle
GtkGestureSingle* gtkGestureSingle;

the main Gtk struct

getGestureSingleStruct
GtkGestureSingle* getGestureSingleStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
getType
GType getType()
getButton
uint getButton()

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

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. This is only meaningful if gtk_gesture_is_active() returns %TRUE.

getExclusive
bool getExclusive()

Gets whether a gesture is exclusive. For more information, see gtk_gesture_single_set_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. If non-0, every button press from a different button number will be ignored. Touch events implicitly match with button 1.

setExclusive
void setExclusive(bool exclusive)

Sets whether @gesture 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.

setTouchOnly
void setTouchOnly(bool touchOnly)

If @touch_only is %TRUE, @gesture will only handle events of type #GDK_TOUCH_BEGIN, #GDK_TOUCH_UPDATE or #GDK_TOUCH_END. If %FALSE, mouse events will be handled too.

Meta