GestureMultiPress

#GtkGestureMultiPress is a #GtkGesture implementation able to recognize multiple clicks on a nearby zone, which can be listened for through the #GtkGestureMultiPress::pressed signal. Whenever time or distance between clicks exceed the GTK+ defaults, #GtkGestureMultiPress::stopped is emitted, and the click counter is reset.

Callers may also restrict the area that is considered valid for a >1 touch/button press through gtk_gesture_multi_press_set_area(), so any click happening outside that area is considered to be a first click of its own.

class GestureMultiPress : GestureSingle {}

Constructors

this
this(GtkGestureMultiPress* gtkGestureMultiPress, bool ownedRef)

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

this
this(Widget widget)

Returns a newly created #GtkGesture that recognizes single and multiple presses.

Members

Classes

OnPressedDelegateWrapper
class OnPressedDelegateWrapper
Undocumented in source.
OnReleasedDelegateWrapper
class OnReleasedDelegateWrapper
Undocumented in source.
OnStoppedDelegateWrapper
class OnStoppedDelegateWrapper
Undocumented in source.

Functions

addOnPressed
gulong addOnPressed(void delegate(int, double, double, GestureMultiPress) dlg, ConnectFlags connectFlags)

This signal is emitted whenever a button or touch press happens.

addOnReleased
gulong addOnReleased(void delegate(int, double, double, GestureMultiPress) dlg, ConnectFlags connectFlags)

This signal is emitted when a button or touch is released. @n_press will report the number of press that is paired to this event, note that #GtkGestureMultiPress::stopped may have been emitted between the press and its release, @n_press will only start over at the next press.

addOnStopped
gulong addOnStopped(void delegate(GestureMultiPress) dlg, ConnectFlags connectFlags)

This signal is emitted whenever any time/distance threshold has been exceeded.

getArea
bool getArea(GdkRectangle rect)

If an area was set through gtk_gesture_multi_press_set_area(), this function will return %TRUE and fill in @rect with the press area. See gtk_gesture_multi_press_set_area() for more details on what the press area represents.

getGestureMultiPressStruct
GtkGestureMultiPress* getGestureMultiPressStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

internalRemoveOnPressed
void internalRemoveOnPressed(OnPressedDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnReleased
void internalRemoveOnReleased(OnReleasedDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
internalRemoveOnStopped
void internalRemoveOnStopped(OnStoppedDelegateWrapper source)
Undocumented in source. Be warned that the author may not have intended to support it.
setArea
void setArea(GdkRectangle* rect)

If @rect is non-%NULL, the press area will be checked to be confined within the rectangle, otherwise the button count will be reset so the press is seen as being the first one. If @rect is #NULL, the area will be reset to an unrestricted state.

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

Static functions

callBackPressed
void callBackPressed(GtkGestureMultiPress* gesturemultipressStruct, int nPress, double x, double y, OnPressedDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPressedDestroy
void callBackPressedDestroy(OnPressedDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackReleased
void callBackReleased(GtkGestureMultiPress* gesturemultipressStruct, int nPress, double x, double y, OnReleasedDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackReleasedDestroy
void callBackReleasedDestroy(OnReleasedDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackStopped
void callBackStopped(GtkGestureMultiPress* gesturemultipressStruct, OnStoppedDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackStoppedDestroy
void callBackStoppedDestroy(OnStoppedDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
getType
GType getType()

Variables

gtkGestureMultiPress
GtkGestureMultiPress* gtkGestureMultiPress;

the main Gtk struct

onPressedListeners
OnPressedDelegateWrapper[] onPressedListeners;
Undocumented in source.
onReleasedListeners
OnReleasedDelegateWrapper[] onReleasedListeners;
Undocumented in source.
onStoppedListeners
OnStoppedDelegateWrapper[] onStoppedListeners;
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