Clutter.GestureAction¶
- Subclasses:
Clutter.PanAction
,Clutter.RotateAction
,Clutter.SwipeAction
,Clutter.TapAction
,Clutter.ZoomAction
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Number of touch points |
||
r/w/co |
The horizontal trigger distance used by the action |
||
r/w/co |
The vertical trigger distance used by the action |
||
r/w/co |
The trigger edge used by the action |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The ::gesture_begin signal is emitted when the |
|
The |
|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Clutter.GestureAction(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Clutter.GestureAction
structure contains only private data and should be accessed using the provided APINew in version 1.8.
- classmethod new()¶
- Returns:
the newly created
Clutter.GestureAction
- Return type:
Creates a new
Clutter.GestureAction
instance.New in version 1.8.
- cancel()¶
Cancel a
Clutter.GestureAction
before it beginsNew in version 1.12.
- get_device(point)¶
- Parameters:
point (
int
) – the touch point index, with 0 being the first touch point received by the action- Returns:
the
Clutter.InputDevice
of a touch point.- Return type:
Retrieves the
Clutter.InputDevice
of a touch point.New in version 1.12.
- get_last_event(point)¶
- Parameters:
point (
int
) – index of a point currently active- Returns:
the last
Clutter.Event
for a touch point.- Return type:
Retrieves a reference to the last
Clutter.Event
for a touch point. CallClutter.Event.copy
() if you need to store the reference somewhere.New in version 1.14.
- get_motion_coords(point)¶
- Parameters:
point (
int
) – the touch point index, with 0 being the first touch point received by the action- Returns:
- motion_x:
return location for the latest motion event’s X coordinate
- motion_y:
return location for the latest motion event’s Y coordinate
- Return type:
Retrieves the coordinates, in stage space, of the latest motion event during the dragging.
New in version 1.8.
- get_motion_delta(point)¶
- Parameters:
point (
int
) – the touch point index, with 0 being the first touch point received by the action- Returns:
the distance since last motion event
- delta_x:
return location for the X axis component of the incremental motion delta
- delta_y:
return location for the Y axis component of the incremental motion delta
- Return type:
Retrieves the incremental delta since the last motion event during the dragging.
New in version 1.12.
- get_n_current_points()¶
- Returns:
the number of points currently active.
- Return type:
Retrieves the number of points currently active.
New in version 1.12.
- get_n_touch_points()¶
- Returns:
the number of points to trigger the gesture.
- Return type:
Retrieves the number of requested points to trigger the gesture.
New in version 1.12.
- get_press_coords(point)¶
- Parameters:
point (
int
) – the touch point index, with 0 being the first touch point received by the action- Returns:
- press_x:
return location for the press event’s X coordinate
- press_y:
return location for the press event’s Y coordinate
- Return type:
Retrieves the coordinates, in stage space, of the press event that started the dragging for a specific touch point.
New in version 1.8.
- get_release_coords(point)¶
- Parameters:
point (
int
) – the touch point index, with 0 being the first touch point received by the action- Returns:
- release_x:
return location for the X coordinate of the last release
- release_y:
return location for the Y coordinate of the last release
- Return type:
Retrieves the coordinates, in stage space, where the touch point was last released.
New in version 1.8.
- get_sequence(point)¶
- Parameters:
point (
int
) – index of a point currently active- Returns:
the
Clutter.EventSequence
of a touch point.- Return type:
Retrieves the
Clutter.EventSequence
of a touch point.New in version 1.12.
- get_threshold_trigger_distance()¶
- Returns:
- Return type:
Retrieves the threshold trigger distance of the gesture self, as set using
Clutter.GestureAction.set_threshold_trigger_distance
().New in version 1.18.
- get_threshold_trigger_edge()¶
- Returns:
the edge trigger
- Return type:
Retrieves the edge trigger of the gesture self, as set using
Clutter.GestureAction.set_threshold_trigger_edge
().New in version 1.20.
- get_threshold_trigger_egde()¶
- Returns:
the edge trigger
- Return type:
Retrieves the edge trigger of the gesture self, as set using
Clutter.GestureAction.set_threshold_trigger_edge
().New in version 1.18.
Deprecated since version 1.20: Use
Clutter.GestureAction.get_threshold_trigger_edge
() instead.
- get_velocity(point)¶
- Parameters:
point (
int
) – the touch point index, with 0 being the first touch point received by the action- Returns:
- velocity_x:
return location for the latest motion event’s X velocity
- velocity_y:
return location for the latest motion event’s Y velocity
- Return type:
Retrieves the velocity, in stage pixels per millisecond, of the latest motion event during the dragging.
New in version 1.12.
- set_n_touch_points(nb_points)¶
- Parameters:
nb_points (
int
) – a number of points
Sets the number of points needed to trigger the gesture.
New in version 1.12.
- set_threshold_trigger_distance(x, y)¶
- Parameters:
Sets the threshold trigger distance for the gesture drag threshold, if any.
This function should only be called by sub-classes of
Clutter.GestureAction
during their construction phase.New in version 1.18.
- set_threshold_trigger_edge(edge)¶
- Parameters:
edge (
Clutter.GestureTriggerEdge
) – theClutter.GestureTriggerEdge
Sets the edge trigger for the gesture drag threshold, if any.
This function should only be called by sub-classes of
Clutter.GestureAction
during their construction phase.New in version 1.18.
- do_gesture_begin(actor) virtual¶
- Parameters:
actor (
Clutter.Actor
) –- Return type:
- do_gesture_cancel(actor) virtual¶
- Parameters:
actor (
Clutter.Actor
) –
- do_gesture_end(actor) virtual¶
- Parameters:
actor (
Clutter.Actor
) –
- do_gesture_prepare(actor) virtual¶
- Parameters:
actor (
Clutter.Actor
) –- Return type:
- do_gesture_progress(actor) virtual¶
- Parameters:
actor (
Clutter.Actor
) –- Return type:
Signal Details¶
- Clutter.GestureAction.signals.gesture_begin(gesture_action, actor)¶
- Signal Name:
gesture-begin
- Flags:
- Parameters:
gesture_action (
Clutter.GestureAction
) – The object which received the signalactor (
Clutter.Actor
) – theClutter.Actor
attached to the action
- Returns:
True
if the gesture should start, andFalse
if the gesture should be ignored.- Return type:
The ::gesture_begin signal is emitted when the
Clutter.Actor
to which aClutter.GestureAction
has been applied starts receiving a gesture.New in version 1.8.
- Clutter.GestureAction.signals.gesture_cancel(gesture_action, actor)¶
- Signal Name:
gesture-cancel
- Flags:
- Parameters:
gesture_action (
Clutter.GestureAction
) – The object which received the signalactor (
Clutter.Actor
) – theClutter.Actor
attached to the action
The
::gesture-cancel
signal is emitted when the ongoing gesture gets cancelled from theClutter.GestureAction
::gesture-progress
signal handler.This signal is emitted if and only if the
Clutter.GestureAction
::gesture-begin
signal has been emitted first.New in version 1.8.
- Clutter.GestureAction.signals.gesture_end(gesture_action, actor)¶
- Signal Name:
gesture-end
- Flags:
- Parameters:
gesture_action (
Clutter.GestureAction
) – The object which received the signalactor (
Clutter.Actor
) – theClutter.Actor
attached to the action
The
::gesture-end
signal is emitted at the end of the gesture gesture, when the pointer’s button is releasedThis signal is emitted if and only if the
Clutter.GestureAction
::gesture-begin
signal has been emitted first.New in version 1.8.
- Clutter.GestureAction.signals.gesture_progress(gesture_action, actor)¶
- Signal Name:
gesture-progress
- Flags:
- Parameters:
gesture_action (
Clutter.GestureAction
) – The object which received the signalactor (
Clutter.Actor
) – theClutter.Actor
attached to the action
- Returns:
True
if the gesture should continue, andFalse
if the gesture should be cancelled.- Return type:
The
::gesture-progress
signal is emitted for each motion event after theClutter.GestureAction
::gesture-begin
signal has been emitted.New in version 1.8.
Property Details¶
- Clutter.GestureAction.props.n_touch_points¶
-
Number of touch points to trigger a gesture action.
New in version 1.16.
- Clutter.GestureAction.props.threshold_trigger_distance_x¶
- Name:
threshold-trigger-distance-x
- Type:
- Default Value:
-1.0
- Flags:
The horizontal trigger distance to be used by the action to either emit the
Clutter.GestureAction
::gesture-begin
signal or to emit theClutter.GestureAction
::gesture-cancel
signal.A negative value will be interpreted as the default drag threshold.
New in version 1.18.
- Clutter.GestureAction.props.threshold_trigger_distance_y¶
- Name:
threshold-trigger-distance-y
- Type:
- Default Value:
-1.0
- Flags:
The vertical trigger distance to be used by the action to either emit the
Clutter.GestureAction
::gesture-begin
signal or to emit theClutter.GestureAction
::gesture-cancel
signal.A negative value will be interpreted as the default drag threshold.
New in version 1.18.
- Clutter.GestureAction.props.threshold_trigger_edge¶
- Name:
threshold-trigger-edge
- Type:
- Default Value:
- Flags:
The trigger edge to be used by the action to either emit the
Clutter.GestureAction
::gesture-begin
signal or to emit theClutter.GestureAction
::gesture-cancel
signal.New in version 1.18.