Clutter.State¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Default transition duration |
||
r/w |
Currently set state, (transition to this state might not be complete) |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Clutter.State(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Clutter.State
structure contains only private data and should be accessed using the provided APINew in version 1.4.
- classmethod new()¶
- Returns:
the newly create
Clutter.State
instance- Return type:
Creates a new
Clutter.State
New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- get_animator(source_state_name, target_state_name)¶
- Parameters:
- Returns:
a
Clutter.Animator
instance, orNone
- Return type:
Retrieves the
Clutter.Animator
that is being used for transitioning between the two states, if any has been setNew in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- get_duration(source_state_name, target_state_name)¶
- Parameters:
- Returns:
the duration, in milliseconds
- Return type:
Queries the duration used for transitions between a source and target state pair
The semantics for the query are the same as the semantics used for setting the duration with
Clutter.State.set_duration
()New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- get_keys(source_state_name, target_state_name, object, property_name)¶
- Parameters:
source_state_name (
str
orNone
) – the source transition name to query, orNone
for all source statestarget_state_name (
str
orNone
) – the target transition name to query, orNone
for all target statesobject (
GObject.Object
orNone
) – the specific object instance to list keys for, orNone
for all managed objectsproperty_name (
str
orNone
) – the property name to search for, orNone
for all properties.
- Returns:
a newly allocated
GLib.List
ofClutter.StateKey
s. The contents of the returned list are owned by theClutter.State
and should not be modified or freed. Use g_list_free() to free the resources allocated by the returned list when done using it- Return type:
Returns a list of pointers to opaque structures with accessor functions that describe the keys added to an animator.
New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- get_state()¶
- Returns:
a string containing the target state. The returned string is owned by the
Clutter.State
and should not be modified or freed- Return type:
Queries the currently set target state.
During a transition this function will return the target of the transition.
This function is useful when called from handlers of the
Clutter.State
::completed
signal.New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- get_states()¶
- Returns:
a newly allocated
GLib.List
of state names. The contents of the returnedGLib.List
are owned by theClutter.State
and should not be modified or freed. Use g_list_free() to free the resources allocated by the returned list when done using it- Return type:
[
str
]
Gets a list of all the state names managed by this
Clutter.State
.New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- get_timeline()¶
- Returns:
the
Clutter.Timeline
that drives the state change animations. The returned timeline is owned by theClutter.State
and it should not be unreferenced directly- Return type:
Gets the timeline driving the
Clutter.State
New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- remove_key(source_state_name, target_state_name, object, property_name)¶
- Parameters:
source_state_name (
str
orNone
) – the source state name to query, orNone
for all source statestarget_state_name (
str
orNone
) – the target state name to query, orNone
for all target statesobject (
GObject.Object
orNone
) – the specific object instance to list keys for, orNone
for all managed objectsproperty_name (
str
orNone
) – the property name to search for, orNone
for all properties.
Removes all keys matching the search criteria passed in arguments.
New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- set_animator(source_state_name, target_state_name, animator)¶
- Parameters:
source_state_name (
str
) – the name of a source statetarget_state_name (
str
) – the name of a target stateanimator (
Clutter.Animator
orNone
) – aClutter.Animator
instance, orNone
to unset an existingClutter.Animator
Specifies a
Clutter.Animator
to be used when transitioning between the two named states.The animator allows specifying a transition between the state that is more elaborate than the basic transitions allowed by the tweening of properties defined in the
Clutter.State
keys.If animator is
None
it will unset an existing animator.Clutter.State
will take a reference on the passed animator, if anyNew in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- set_duration(source_state_name, target_state_name, duration)¶
- Parameters:
Sets the duration of a transition.
If both state names are
None
the default duration for self is set.If only target_state_name is specified, the passed duration becomes the default duration for transitions to the target state.
If both states names are specified, the passed duration only applies to the specified transition.
New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- set_key(source_state_name, target_state_name, object, property_name, mode, value, pre_delay, post_delay)¶
- Parameters:
source_state_name (
str
orNone
) – the source transition to specify transition for, orNone
to specify the default fallback when a more specific source state doesn’t exist.target_state_name (
str
) – the name of the transition to set a key value for.object (
GObject.Object
) – theGObject.Object
to set a key forproperty_name (
str
) – the property to set a key formode (
int
) – the id of the alpha function to usevalue (
GObject.Value
) – the value for property_name of object in state_namepre_delay (
float
) – relative time of the transition to be idle in the beginning of the transitionpost_delay (
float
) – relative time of the transition to be idle in the end of the transition
- Returns:
the
Clutter.State
instance, allowing chaining of multiple calls- Return type:
Sets one specific end key for a state name, object, property_name combination.
New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- set_state(target_state_name)¶
- Parameters:
target_state_name (
str
) – the state to transition to- Returns:
the
Clutter.Timeline
that drives the state transition. The returned timeline is owned by theClutter.State
and it should not be unreferenced- Return type:
Change the current state of
Clutter.State
to target_state_name.The state will animate during its transition, see
Clutter.State.warp_to_state
for animation-free state switching.Setting a
None
state will stop the current animation and unset the current state, but keys will be left intact.New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- warp_to_state(target_state_name)¶
- Parameters:
target_state_name (
str
) – the state to transition to- Returns:
the
Clutter.Timeline
that drives the state transition. The returned timeline is owned by theClutter.State
and it should not be unreferenced- Return type:
Change to the specified target state immediately with no animation.
See
Clutter.State.set_state
().New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- do_completed() virtual¶
Signal Details¶
- Clutter.State.signals.completed(state)¶
- Signal Name:
completed
- Flags:
- Parameters:
state (
Clutter.State
) – The object which received the signal
The
::completed
signal is emitted when aClutter.State
reaches the target state specified byClutter.State.set_state
() orClutter.State.warp_to_state
().New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
Property Details¶
- Clutter.State.props.duration¶
-
Default duration used if an duration has not been specified for a specific source/target state pair. The values is in milliseconds.
New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead
- Clutter.State.props.state¶
-
The currently set target state, setting it causes the state machine to transition to the new state, use
Clutter.State.warp_to_state
() to change state without a transition.New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransition
andClutter.TransitionGroup
instead