1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723
|
/*
* This file is part of gtkD.
*
* gtkD is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version, with
* some exceptions, please read the COPYING file.
*
* gtkD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with gtkD; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
*/
// generated automatically - do not change
// find conversion definition on APILookup.txt
// implement new conversion functionalities on the wrap.utils pakage
module gtk.Gesture;
private import gdk.Device;
private import gdk.Event;
private import gdk.Window;
private import glib.ListG;
private import gobject.ObjectG;
private import gobject.Signals;
private import gtk.EventController;
private import gtk.c.functions;
public import gtk.c.types;
public import gtkc.gtktypes;
private import std.algorithm;
/**
* #GtkGesture is the base object for gesture recognition, although this
* object is quite generalized to serve as a base for multi-touch gestures,
* it is suitable to implement single-touch and pointer-based gestures (using
* the special %NULL #GdkEventSequence value for these).
*
* The number of touches that a #GtkGesture need to be recognized is controlled
* by the #GtkGesture:n-points property, if a gesture is keeping track of less
* or more than that number of sequences, it won't check wether the gesture
* is recognized.
*
* As soon as the gesture has the expected number of touches, the gesture will
* run the #GtkGesture::check signal regularly on input events until the gesture
* is recognized, the criteria to consider a gesture as "recognized" is left to
* #GtkGesture subclasses.
*
* A recognized gesture will then emit the following signals:
* - #GtkGesture::begin when the gesture is recognized.
* - A number of #GtkGesture::update, whenever an input event is processed.
* - #GtkGesture::end when the gesture is no longer recognized.
*
* ## Event propagation
*
* In order to receive events, a gesture needs to either set a propagation phase
* through gtk_event_controller_set_propagation_phase(), or feed those manually
* through gtk_event_controller_handle_event().
*
* In the capture phase, events are propagated from the toplevel down to the
* target widget, and gestures that are attached to containers above the widget
* get a chance to interact with the event before it reaches the target.
*
* After the capture phase, GTK+ emits the traditional #GtkWidget::button-press-event,
* #GtkWidget::button-release-event, #GtkWidget::touch-event, etc signals. Gestures
* with the %GTK_PHASE_TARGET phase are fed events from the default #GtkWidget::event
* handlers.
*
* In the bubble phase, events are propagated up from the target widget to the
* toplevel, and gestures that are attached to containers above the widget get
* a chance to interact with events that have not been handled yet.
*
* ## States of a sequence # {#touch-sequence-states}
*
* Whenever input interaction happens, a single event may trigger a cascade of
* #GtkGestures, both across the parents of the widget receiving the event and
* in parallel within an individual widget. It is a responsibility of the
* widgets using those gestures to set the state of touch sequences accordingly
* in order to enable cooperation of gestures around the #GdkEventSequences
* triggering those.
*
* Within a widget, gestures can be grouped through gtk_gesture_group(),
* grouped gestures synchronize the state of sequences, so calling
* gtk_gesture_set_sequence_state() on one will effectively propagate
* the state throughout the group.
*
* By default, all sequences start out in the #GTK_EVENT_SEQUENCE_NONE state,
* sequences in this state trigger the gesture event handler, but event
* propagation will continue unstopped by gestures.
*
* If a sequence enters into the #GTK_EVENT_SEQUENCE_DENIED state, the gesture
* group will effectively ignore the sequence, letting events go unstopped
* through the gesture, but the "slot" will still remain occupied while
* the touch is active.
*
* If a sequence enters in the #GTK_EVENT_SEQUENCE_CLAIMED state, the gesture
* group will grab all interaction on the sequence, by:
* - Setting the same sequence to #GTK_EVENT_SEQUENCE_DENIED on every other gesture
* group within the widget, and every gesture on parent widgets in the propagation
* chain.
* - calling #GtkGesture::cancel on every gesture in widgets underneath in the
* propagation chain.
* - Stopping event propagation after the gesture group handles the event.
*
* Note: if a sequence is set early to #GTK_EVENT_SEQUENCE_CLAIMED on
* #GDK_TOUCH_BEGIN/#GDK_BUTTON_PRESS (so those events are captured before
* reaching the event widget, this implies #GTK_PHASE_CAPTURE), one similar
* event will emulated if the sequence changes to #GTK_EVENT_SEQUENCE_DENIED.
* This way event coherence is preserved before event propagation is unstopped
* again.
*
* Sequence states can't be changed freely, see gtk_gesture_set_sequence_state()
* to know about the possible lifetimes of a #GdkEventSequence.
*
* ## Touchpad gestures
*
* On the platforms that support it, #GtkGesture will handle transparently
* touchpad gesture events. The only precautions users of #GtkGesture should do
* to enable this support are:
* - Enabling %GDK_TOUCHPAD_GESTURE_MASK on their #GdkWindows
* - If the gesture has %GTK_PHASE_NONE, ensuring events of type
* %GDK_TOUCHPAD_SWIPE and %GDK_TOUCHPAD_PINCH are handled by the #GtkGesture
*/
public class Gesture : EventController
{
/** the main Gtk struct */
protected GtkGesture* gtkGesture;
/** Get the main Gtk struct */
public GtkGesture* getGestureStruct(bool transferOwnership = false)
{
if (transferOwnership)
ownedRef = false;
return gtkGesture;
}
/** the main Gtk struct as a void* */
protected override void* getStruct()
{
return cast(void*)gtkGesture;
}
/**
* Sets our main struct and passes it to the parent class.
*/
public this (GtkGesture* gtkGesture, bool ownedRef = false)
{
this.gtkGesture = gtkGesture;
super(cast(GtkEventController*)gtkGesture, ownedRef);
}
/** */
public static GType getType()
{
return gtk_gesture_get_type();
}
/**
* If there are touch sequences being currently handled by @gesture,
* this function returns %TRUE and fills in @rect with the bounding
* box containing all active touches. Otherwise, %FALSE will be
* returned.
*
* Note: This function will yield unexpected results on touchpad
* gestures. Since there is no correlation between physical and
* pixel distances, these will look as if constrained in an
* infinitely small area, @rect width and height will thus be 0
* regardless of the number of touchpoints.
*
* Params:
* rect = bounding box containing all active touches.
*
* Returns: %TRUE if there are active touches, %FALSE otherwise
*
* Since: 3.14
*/
public bool getBoundingBox(out GdkRectangle rect)
{
return gtk_gesture_get_bounding_box(gtkGesture, &rect) != 0;
}
/**
* If there are touch sequences being currently handled by @gesture,
* this function returns %TRUE and fills in @x and @y with the center
* of the bounding box containing all active touches. Otherwise, %FALSE
* will be returned.
*
* Params:
* x = X coordinate for the bounding box center
* y = Y coordinate for the bounding box center
*
* Returns: %FALSE if no active touches are present, %TRUE otherwise
*
* Since: 3.14
*/
public bool getBoundingBoxCenter(out double x, out double y)
{
return gtk_gesture_get_bounding_box_center(gtkGesture, &x, &y) != 0;
}
/**
* Returns the master #GdkDevice that is currently operating
* on @gesture, or %NULL if the gesture is not being interacted.
*
* Returns: a #GdkDevice, or %NULL
*
* Since: 3.14
*/
public Device getDevice()
{
auto p = gtk_gesture_get_device(gtkGesture);
if(p is null)
{
return null;
}
return ObjectG.getDObject!(Device)(cast(GdkDevice*) p);
}
/**
* Returns all gestures in the group of @gesture
*
* Returns: The list
* of #GtkGestures, free with g_list_free()
*
* Since: 3.14
*/
public ListG getGroup()
{
auto p = gtk_gesture_get_group(gtkGesture);
if(p is null)
{
return null;
}
return new ListG(cast(GList*) p);
}
/**
* Returns the last event that was processed for @sequence.
*
* Note that the returned pointer is only valid as long as the @sequence
* is still interpreted by the @gesture. If in doubt, you should make
* a copy of the event.
*
* Params:
* sequence = a #GdkEventSequence
*
* Returns: The last event from @sequence
*/
public Event getLastEvent(GdkEventSequence* sequence)
{
auto p = gtk_gesture_get_last_event(gtkGesture, sequence);
if(p is null)
{
return null;
}
return ObjectG.getDObject!(Event)(cast(GdkEvent*) p);
}
/**
* Returns the #GdkEventSequence that was last updated on @gesture.
*
* Returns: The last updated sequence
*
* Since: 3.14
*/
public GdkEventSequence* getLastUpdatedSequence()
{
return gtk_gesture_get_last_updated_sequence(gtkGesture);
}
/**
* If @sequence is currently being interpreted by @gesture, this
* function returns %TRUE and fills in @x and @y with the last coordinates
* stored for that event sequence. The coordinates are always relative to the
* widget allocation.
*
* Params:
* sequence = a #GdkEventSequence, or %NULL for pointer events
* x = return location for X axis of the sequence coordinates
* y = return location for Y axis of the sequence coordinates
*
* Returns: %TRUE if @sequence is currently interpreted
*
* Since: 3.14
*/
public bool getPoint(GdkEventSequence* sequence, out double x, out double y)
{
return gtk_gesture_get_point(gtkGesture, sequence, &x, &y) != 0;
}
/**
* Returns the @sequence state, as seen by @gesture.
*
* Params:
* sequence = a #GdkEventSequence
*
* Returns: The sequence state in @gesture
*
* Since: 3.14
*/
public GtkEventSequenceState getSequenceState(GdkEventSequence* sequence)
{
return gtk_gesture_get_sequence_state(gtkGesture, sequence);
}
/**
* Returns the list of #GdkEventSequences currently being interpreted
* by @gesture.
*
* Returns: A list
* of #GdkEventSequences, the list elements are owned by GTK+
* and must not be freed or modified, the list itself must be deleted
* through g_list_free()
*
* Since: 3.14
*/
public ListG getSequences()
{
auto p = gtk_gesture_get_sequences(gtkGesture);
if(p is null)
{
return null;
}
return new ListG(cast(GList*) p);
}
/**
* Returns the user-defined window that receives the events
* handled by @gesture. See gtk_gesture_set_window() for more
* information.
*
* Returns: the user defined window, or %NULL if none
*
* Since: 3.14
*/
public Window getWindow()
{
auto p = gtk_gesture_get_window(gtkGesture);
if(p is null)
{
return null;
}
return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
}
/**
* Adds @gesture to the same group than @group_gesture. Gestures
* are by default isolated in their own groups.
*
* When gestures are grouped, the state of #GdkEventSequences
* is kept in sync for all of those, so calling gtk_gesture_set_sequence_state(),
* on one will transfer the same value to the others.
*
* Groups also perform an "implicit grabbing" of sequences, if a
* #GdkEventSequence state is set to #GTK_EVENT_SEQUENCE_CLAIMED on one group,
* every other gesture group attached to the same #GtkWidget will switch the
* state for that sequence to #GTK_EVENT_SEQUENCE_DENIED.
*
* Params:
* gesture = a #GtkGesture
*
* Since: 3.14
*/
public void group(Gesture gesture)
{
gtk_gesture_group(gtkGesture, (gesture is null) ? null : gesture.getGestureStruct());
}
/**
* Returns %TRUE if @gesture is currently handling events corresponding to
* @sequence.
*
* Params:
* sequence = a #GdkEventSequence or %NULL
*
* Returns: %TRUE if @gesture is handling @sequence, %FALSE otherwise
*
* Since: 3.14
*/
public bool handlesSequence(GdkEventSequence* sequence)
{
return gtk_gesture_handles_sequence(gtkGesture, sequence) != 0;
}
/**
* Returns %TRUE if the gesture is currently active.
* A gesture is active meanwhile there are touch sequences
* interacting with it.
*
* Returns: %TRUE if gesture is active
*
* Since: 3.14
*/
public bool isActive()
{
return gtk_gesture_is_active(gtkGesture) != 0;
}
/**
* Returns %TRUE if both gestures pertain to the same group.
*
* Params:
* other = another #GtkGesture
*
* Returns: whether the gestures are grouped
*
* Since: 3.14
*/
public bool isGroupedWith(Gesture other)
{
return gtk_gesture_is_grouped_with(gtkGesture, (other is null) ? null : other.getGestureStruct()) != 0;
}
/**
* Returns %TRUE if the gesture is currently recognized.
* A gesture is recognized if there are as many interacting
* touch sequences as required by @gesture, and #GtkGesture::check
* returned %TRUE for the sequences being currently interpreted.
*
* Returns: %TRUE if gesture is recognized
*
* Since: 3.14
*/
public bool isRecognized()
{
return gtk_gesture_is_recognized(gtkGesture) != 0;
}
/**
* Sets the state of @sequence in @gesture. Sequences start
* in state #GTK_EVENT_SEQUENCE_NONE, and whenever they change
* state, they can never go back to that state. Likewise,
* sequences in state #GTK_EVENT_SEQUENCE_DENIED cannot turn
* back to a not denied state. With these rules, the lifetime
* of an event sequence is constrained to the next four:
*
* * None
* * None → Denied
* * None → Claimed
* * None → Claimed → Denied
*
* Note: Due to event handling ordering, it may be unsafe to
* set the state on another gesture within a #GtkGesture::begin
* signal handler, as the callback might be executed before
* the other gesture knows about the sequence. A safe way to
* perform this could be:
*
* |[
* static void
* first_gesture_begin_cb (GtkGesture *first_gesture,
* GdkEventSequence *sequence,
* gpointer user_data)
* {
* gtk_gesture_set_sequence_state (first_gesture, sequence, GTK_EVENT_SEQUENCE_CLAIMED);
* gtk_gesture_set_sequence_state (second_gesture, sequence, GTK_EVENT_SEQUENCE_DENIED);
* }
*
* static void
* second_gesture_begin_cb (GtkGesture *second_gesture,
* GdkEventSequence *sequence,
* gpointer user_data)
* {
* if (gtk_gesture_get_sequence_state (first_gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED)
* gtk_gesture_set_sequence_state (second_gesture, sequence, GTK_EVENT_SEQUENCE_DENIED);
* }
* ]|
*
* If both gestures are in the same group, just set the state on
* the gesture emitting the event, the sequence will be already
* be initialized to the group's global state when the second
* gesture processes the event.
*
* Params:
* sequence = a #GdkEventSequence
* state = the sequence state
*
* Returns: %TRUE if @sequence is handled by @gesture,
* and the state is changed successfully
*
* Since: 3.14
*/
public bool setSequenceState(GdkEventSequence* sequence, GtkEventSequenceState state)
{
return gtk_gesture_set_sequence_state(gtkGesture, sequence, state) != 0;
}
/**
* Sets the state of all sequences that @gesture is currently
* interacting with. See gtk_gesture_set_sequence_state()
* for more details on sequence states.
*
* Params:
* state = the sequence state
*
* Returns: %TRUE if the state of at least one sequence
* was changed successfully
*
* Since: 3.14
*/
public bool setState(GtkEventSequenceState state)
{
return gtk_gesture_set_state(gtkGesture, state) != 0;
}
/**
* Sets a specific window to receive events about, so @gesture
* will effectively handle only events targeting @window, or
* a child of it. @window must pertain to gtk_event_controller_get_widget().
*
* Params:
* window = a #GdkWindow, or %NULL
*
* Since: 3.14
*/
public void setWindow(Window window)
{
gtk_gesture_set_window(gtkGesture, (window is null) ? null : window.getWindowStruct());
}
/**
* Separates @gesture into an isolated group.
*
* Since: 3.14
*/
public void ungroup()
{
gtk_gesture_ungroup(gtkGesture);
}
/**
* This signal is emitted when the gesture is recognized. This means the
* number of touch sequences matches #GtkGesture:n-points, and the #GtkGesture::check
* handler(s) returned #TRUE.
*
* Note: These conditions may also happen when an extra touch (eg. a third touch
* on a 2-touches gesture) is lifted, in that situation @sequence won't pertain
* to the current set of active touches, so don't rely on this being true.
*
* Params:
* sequence = the #GdkEventSequence that made the gesture to be recognized
*
* Since: 3.14
*/
gulong addOnBegin(void delegate(GdkEventSequence*, Gesture) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "begin", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
/**
* This signal is emitted when the gesture is recognized. This means the
* number of touch sequences matches #GtkGesture:n-points, and the #GtkGesture::check
* handler(s) returned #TRUE.
*
* Note: These conditions may also happen when an extra touch (eg. a third touch
* on a 2-touches gesture) is lifted, in that situation @sequence won't pertain
* to the current set of active touches, so don't rely on this being true.
*
* Params:
* sequence = the #GdkEventSequence that made the gesture to be recognized
*
* Since: 3.14
*/
gulong addOnBegin(void delegate(Event, Gesture) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "begin", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
/**
* This signal is emitted whenever a sequence is cancelled. This usually
* happens on active touches when gtk_event_controller_reset() is called
* on @gesture (manually, due to grabs...), or the individual @sequence
* was claimed by parent widgets' controllers (see gtk_gesture_set_sequence_state()).
*
* @gesture must forget everything about @sequence as a reaction to this signal.
*
* Params:
* sequence = the #GdkEventSequence that was cancelled
*
* Since: 3.14
*/
gulong addOnCancel(void delegate(GdkEventSequence*, Gesture) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "cancel", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
/**
* This signal is emitted whenever a sequence is cancelled. This usually
* happens on active touches when gtk_event_controller_reset() is called
* on @gesture (manually, due to grabs...), or the individual @sequence
* was claimed by parent widgets' controllers (see gtk_gesture_set_sequence_state()).
*
* @gesture must forget everything about @sequence as a reaction to this signal.
*
* Params:
* sequence = the #GdkEventSequence that was cancelled
*
* Since: 3.14
*/
gulong addOnCancel(void delegate(Event, Gesture) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "cancel", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
/**
* This signal is emitted when @gesture either stopped recognizing the event
* sequences as something to be handled (the #GtkGesture::check handler returned
* %FALSE), or the number of touch sequences became higher or lower than
* #GtkGesture:n-points.
*
* Note: @sequence might not pertain to the group of sequences that were
* previously triggering recognition on @gesture (ie. a just pressed touch
* sequence that exceeds #GtkGesture:n-points). This situation may be detected
* by checking through gtk_gesture_handles_sequence().
*
* Params:
* sequence = the #GdkEventSequence that made gesture recognition to finish
*
* Since: 3.14
*/
gulong addOnEnd(void delegate(GdkEventSequence*, Gesture) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "end", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
/**
* This signal is emitted when @gesture either stopped recognizing the event
* sequences as something to be handled (the #GtkGesture::check handler returned
* %FALSE), or the number of touch sequences became higher or lower than
* #GtkGesture:n-points.
*
* Note: @sequence might not pertain to the group of sequences that were
* previously triggering recognition on @gesture (ie. a just pressed touch
* sequence that exceeds #GtkGesture:n-points). This situation may be detected
* by checking through gtk_gesture_handles_sequence().
*
* Params:
* sequence = the #GdkEventSequence that made gesture recognition to finish
*
* Since: 3.14
*/
gulong addOnEnd(void delegate(Event, Gesture) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "end", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
/**
* This signal is emitted whenever a sequence state changes. See
* gtk_gesture_set_sequence_state() to know more about the expectable
* sequence lifetimes.
*
* Params:
* sequence = the #GdkEventSequence that was cancelled
* state = the new sequence state
*
* Since: 3.14
*/
gulong addOnSequenceStateChanged(void delegate(GdkEventSequence*, GtkEventSequenceState, Gesture) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "sequence-state-changed", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
/**
* This signal is emitted whenever a sequence state changes. See
* gtk_gesture_set_sequence_state() to know more about the expectable
* sequence lifetimes.
*
* Params:
* sequence = the #GdkEventSequence that was cancelled
* state = the new sequence state
*
* Since: 3.14
*/
gulong addOnSequenceStateChanged(void delegate(Event, GtkEventSequenceState, Gesture) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "sequence-state-changed", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
/**
* This signal is emitted whenever an event is handled while the gesture is
* recognized. @sequence is guaranteed to pertain to the set of active touches.
*
* Params:
* sequence = the #GdkEventSequence that was updated
*
* Since: 3.14
*/
gulong addOnUpdate(void delegate(GdkEventSequence*, Gesture) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "update", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
/**
* This signal is emitted whenever an event is handled while the gesture is
* recognized. @sequence is guaranteed to pertain to the set of active touches.
*
* Params:
* sequence = the #GdkEventSequence that was updated
*
* Since: 3.14
*/
gulong addOnUpdate(void delegate(Event, Gesture) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "update", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
}
|