Clutter.ClickAction¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Whether the clickable has a grab |
||
r/w |
The minimum duration of a long press to recognize the gesture |
||
r/w |
The maximum threshold before a long press is cancelled |
||
r |
Whether the clickable should be in pressed state |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Clutter.ClickAction(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Clutter.ClickAction
structure contains only private data and should be accessed using the provided APINew in version 1.4.
- classmethod new()¶
- Returns:
the newly created
Clutter.ClickAction
- Return type:
Creates a new
Clutter.ClickAction
instanceNew in version 1.4.
- get_button()¶
- Returns:
the button value
- Return type:
Retrieves the button that was pressed.
New in version 1.4.
- get_coords()¶
- Returns:
- Return type:
Retrieves the screen coordinates of the button press.
New in version 1.8.
- get_state()¶
- Returns:
the modifier state parameter, or 0
- Return type:
Retrieves the modifier state of the click action.
New in version 1.6.
- release()¶
Emulates a release of the pointer button, which ungrabs the pointer and unsets the
Clutter.ClickAction
:pressed
state.This function will also cancel the long press gesture if one was initiated.
This function is useful to break a grab, for instance after a certain amount of time has passed.
New in version 1.4.
- do_clicked(actor) virtual¶
- Parameters:
actor (
Clutter.Actor
) –
- do_long_press(actor, state) virtual¶
- Parameters:
actor (
Clutter.Actor
) –state (
Clutter.LongPressState
) –
- Return type:
Signal Details¶
- Clutter.ClickAction.signals.clicked(click_action, actor)¶
- Signal Name:
clicked
- Flags:
- Parameters:
click_action (
Clutter.ClickAction
) – The object which received the signalactor (
Clutter.Actor
) – theClutter.Actor
attached to the action
The
::clicked
signal is emitted when theClutter.Actor
to which aClutter.ClickAction
has been applied should respond to a pointer button press and release eventsNew in version 1.4.
- Clutter.ClickAction.signals.long_press(click_action, actor, state)¶
- Signal Name:
long-press
- Flags:
- Parameters:
click_action (
Clutter.ClickAction
) – The object which received the signalactor (
Clutter.Actor
) – theClutter.Actor
attached to the actionstate (
Clutter.LongPressState
) – the long press state
- Returns:
Only the
Clutter.LongPressState.QUERY
state uses the returned value of the handler; other states will ignore it- Return type:
The
::long-press
signal is emitted during the long press gesture handling.This signal can be emitted multiple times with different states.
The
Clutter.LongPressState.QUERY
state will be emitted on button presses, and its return value will determine whether the long press handling should be initiated. If the signal handlers will returnTrue
, theClutter.LongPressState.QUERY
state will be followed either by a signal emission with theClutter.LongPressState.ACTIVATE
state if the long press constraints were respected, or by a signal emission with theClutter.LongPressState.CANCEL
state if the long press was cancelled.It is possible to forcibly cancel a long press detection using
Clutter.ClickAction.release
().New in version 1.8.
Property Details¶
- Clutter.ClickAction.props.held¶
-
Whether the clickable actor has the pointer grabbed
New in version 1.4.
- Clutter.ClickAction.props.long_press_duration¶
-
The minimum duration of a press for it to be recognized as a long press gesture, in milliseconds.
A value of -1 will make the
Clutter.ClickAction
use the value of theClutter.Settings
:long-press-duration
property.New in version 1.8.
- Clutter.ClickAction.props.long_press_threshold¶
-
The maximum allowed distance that can be covered (on both axes) before a long press gesture is cancelled, in pixels.
A value of -1 will make the
Clutter.ClickAction
use the value of theClutter.Settings
:dnd-drag-threshold
property.New in version 1.8.