Clutter.PanAction¶
- Subclasses:
None
Methods¶
- Inherited:
Clutter.GestureAction (18), Clutter.ActorMeta (5), GObject.Object (37)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
Factor applied to the momentum when starting the interpolated phase |
||
r/w |
Rate at which the interpolated panning will decelerate in |
||
r/w |
Whether interpolated events emission is enabled. |
||
r/w |
Constraints the panning to an axis |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Clutter.PanAction(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Clutter.PanActionstructure contains only private data and should be accessed using the provided APINew in version 1.12.
- classmethod new()¶
- Returns:
the newly created
Clutter.PanAction- Return type:
Creates a new
Clutter.PanActioninstanceNew in version 1.12.
- get_acceleration_factor()¶
- Returns:
The initial acceleration factor for interpolated events.
- Return type:
Retrieves the initial acceleration factor for interpolated
::panevents.New in version 1.12.
- get_constrained_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 delta
- delta_y:
return location for the Y delta
- Return type:
Retrieves the delta, in stage space, dependent on the current state of the
Clutter.PanAction, and respecting the constraint specified by theClutter.PanAction:pan-axisproperty.New in version 1.24.
- get_deceleration()¶
- Returns:
The deceleration rate of the interpolated events.
- Return type:
Retrieves the deceleration rate of interpolated
::panevents.New in version 1.12.
- get_interpolate()¶
-
Checks if the action should emit
::panevents even after releasing the pointer during a panning gesture, to emulate some kind of kinetic inertia.New in version 1.12.
- get_interpolated_coords()¶
- Returns:
- interpolated_x:
return location for the latest interpolated event’s X coordinate
- interpolated_y:
return location for the latest interpolated event’s Y coordinate
- Return type:
Retrieves the coordinates, in stage space, of the latest interpolated event, analogous to
Clutter.GestureAction.get_motion_coords().New in version 1.12.
- get_interpolated_delta()¶
- Returns:
the distance since the latest interpolated event
- delta_x:
return location for the X delta since the latest interpolated event
- delta_y:
return location for the Y delta since the latest interpolated event
- Return type:
Retrieves the delta, in stage space, since the latest interpolated event, analogous to
Clutter.GestureAction.get_motion_delta().New in version 1.12.
- 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 X coordinate
- motion_y:
return location for the Y coordinate
- Return type:
Retrieves the coordinates, in stage space, dependent on the current state of the
Clutter.PanAction. If it is inactive, both fields will be set to 0. If it is panning by user action, the values will be equivalent to those returned byClutter.GestureAction.get_motion_coords(). If it is interpolating with some form of kinetic scrolling, the values will be equivalent to those returned byClutter.PanAction.get_interpolated_coords(). This is a convenience method designed to be used in replacement “pan” signal handlers.New in version 1.14.
- get_motion_delta(point)¶
- Parameters:
point (
int) – the touch point index, with 0 being the first touch point received by the action- Returns:
- delta_x:
return location for the X delta
- delta_y:
return location for the Y delta
- Return type:
Retrieves the delta, in stage space, dependent on the current state of the
Clutter.PanAction. If it is inactive, both fields will be set to 0. If it is panning by user action, the values will be equivalent to those returned byClutter.GestureAction.get_motion_delta(). If it is interpolating with some form of kinetic scrolling, the values will be equivalent to those returned byClutter.PanAction.get_interpolated_delta(). This is a convenience method designed to be used in replacement “pan” signal handlers.New in version 1.14.
- get_pan_axis()¶
- Returns:
the axis constraint
- Return type:
Retrieves the axis constraint set by
Clutter.PanAction.set_pan_axis()New in version 1.12.
- set_acceleration_factor(factor)¶
- Parameters:
factor (
float) – The acceleration factor
Factor applied to the momentum velocity at the time of releasing the pointer when generating interpolated
::panevents.New in version 1.12.
- set_deceleration(rate)¶
- Parameters:
rate (
float) – The deceleration rate
Sets the deceleration rate of the interpolated
::panevents generated after a pan gesture. This is approximately the value that the momentum at the time of releasing the pointer is divided by every 60th of a second.New in version 1.12.
- set_interpolate(should_interpolate)¶
- Parameters:
should_interpolate (
bool) – whether to enable interpolated pan events
Sets whether the action should emit interpolated
::panevents after the drag has ended, to emulate the gesture kinetic inertia.New in version 1.12.
- set_pan_axis(axis)¶
- Parameters:
axis (
Clutter.PanAxis) – the axis to constraint the panning to
Restricts the panning action to a specific axis
New in version 1.12.
- do_pan(actor, is_interpolated) virtual¶
- Parameters:
actor (
Clutter.Actor) –is_interpolated (
bool) –
- Return type:
class handler for the
Clutter.PanAction::pansignal
- do_pan_stopped(actor) virtual¶
- Parameters:
actor (
Clutter.Actor) –
class handler for the
Clutter.PanAction::pan-stoppedsignal
Signal Details¶
- Clutter.PanAction.signals.pan(pan_action, actor, is_interpolated)¶
- Signal Name:
pan- Flags:
- Parameters:
pan_action (
Clutter.PanAction) – The object which received the signalactor (
Clutter.Actor) – theClutter.Actorattached to the actionis_interpolated (
bool) – if the event is the result of interpolating the motion velocity at the end of the drag
- Returns:
Trueif the pan should continue, andFalseif the pan should be cancelled.- Return type:
The
::pansignal is emitted to keep track of the motion during a pan gesture. is_interpolated is set toTrueduring the interpolation phase of the pan, after the drag has ended and the:interpolateproperty was set toTrue.New in version 1.12.
- Clutter.PanAction.signals.pan_stopped(pan_action, actor)¶
- Signal Name:
pan-stopped- Flags:
- Parameters:
pan_action (
Clutter.PanAction) – The object which received the signalactor (
Clutter.Actor) – theClutter.Actorattached to the action
The
::pan-stoppedsignal is emitted at the end of the interpolation phase of the pan action, only when:interpolateis set toTrue.New in version 1.12.
Property Details¶
- Clutter.PanAction.props.acceleration_factor¶
-
The initial acceleration factor
The kinetic momentum measured at the time of releasing the pointer will be multiplied by the factor specified by this property before being used to generate interpolated
::panevents.New in version 1.12.
- Clutter.PanAction.props.deceleration¶
-
The rate at which the interpolated panning will decelerate in
Clutter.PanActionwill emit interpolated::panevents with decreasing scroll deltas, using the rate specified by this property.New in version 1.12.
- Clutter.PanAction.props.interpolate¶
-
Whether interpolated events emission is enabled.
New in version 1.12.
- Clutter.PanAction.props.pan_axis¶
- Name:
pan-axis- Type:
- Default Value:
- Flags:
Constraints the panning action to the specified axis
New in version 1.12.