drag-action: Added x-drag-threshold and y-drag-threshold properties
authorHenrik Hedberg <hhedberg@innologies.fi>
Fri, 3 Sep 2010 17:00:40 +0000 (20:00 +0300)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 7 Sep 2010 09:40:49 +0000 (10:40 +0100)
commit1eae9fcd7edd3f8e330cd4be691e62fe759b67ec
tree70954c520579f4c42e8e63b9bdcde971b3fc31c6
parentba9aa3b332cd8f6bd57983a5dfbb6a24e8fd8ad9
drag-action: Added x-drag-threshold and y-drag-threshold properties

                *** This is an API change ***

Replaced the original drag-threshold property with two separate
horizontal (x-drag-threshold) and vertical (y-drag-threshold)
thresholds.

It is some times necessary to have different drag thresholds for the
horizontal and vertical axes. For example, when a draggable actor is
inside a horizontal scrolling area, only vertical movement must begin
dragging. That can be achieved by setting the x-drag-threshold to
G_MAXUINT while y-drag-threshold is something usual, say, 20 pixels.

This is different than drag axis, because after the threshold
has been cleared by the pointer, the draggable actor can be dragged
along both axes (if allowed by the drag-axis property).

http://bugzilla.clutter-project.org/show_bug.cgi?id=2291

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
clutter/clutter-drag-action.c
clutter/clutter-drag-action.h
tests/interactive/test-drag.c