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.Statestructure contains only private data and should be accessed using the provided APINew in version 1.4.
- classmethod new()¶
- Returns:
the newly create
Clutter.Stateinstance- Return type:
Creates a new
Clutter.StateNew in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransitionandClutter.TransitionGroupinstead
- get_animator(source_state_name, target_state_name)¶
- Parameters:
- Returns:
a
Clutter.Animatorinstance, orNone- Return type:
Retrieves the
Clutter.Animatorthat 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.KeyframeTransitionandClutter.TransitionGroupinstead
- 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.KeyframeTransitionandClutter.TransitionGroupinstead
- get_keys(source_state_name, target_state_name, object, property_name)¶
- Parameters:
source_state_name (
strorNone) – the source transition name to query, orNonefor all source statestarget_state_name (
strorNone) – the target transition name to query, orNonefor all target statesobject (
GObject.ObjectorNone) – the specific object instance to list keys for, orNonefor all managed objectsproperty_name (
strorNone) – the property name to search for, orNonefor all properties.
- Returns:
a newly allocated
GLib.ListofClutter.StateKeys. The contents of the returned list are owned by theClutter.Stateand 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.KeyframeTransitionandClutter.TransitionGroupinstead
- get_state()¶
- Returns:
a string containing the target state. The returned string is owned by the
Clutter.Stateand 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::completedsignal.New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransitionandClutter.TransitionGroupinstead
- get_states()¶
- Returns:
a newly allocated
GLib.Listof state names. The contents of the returnedGLib.Listare owned by theClutter.Stateand 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.KeyframeTransitionandClutter.TransitionGroupinstead
- get_timeline()¶
- Returns:
the
Clutter.Timelinethat drives the state change animations. The returned timeline is owned by theClutter.Stateand it should not be unreferenced directly- Return type:
Gets the timeline driving the
Clutter.StateNew in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransitionandClutter.TransitionGroupinstead
- remove_key(source_state_name, target_state_name, object, property_name)¶
- Parameters:
source_state_name (
strorNone) – the source state name to query, orNonefor all source statestarget_state_name (
strorNone) – the target state name to query, orNonefor all target statesobject (
GObject.ObjectorNone) – the specific object instance to list keys for, orNonefor all managed objectsproperty_name (
strorNone) – the property name to search for, orNonefor all properties.
Removes all keys matching the search criteria passed in arguments.
New in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransitionandClutter.TransitionGroupinstead
- 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.AnimatororNone) – aClutter.Animatorinstance, orNoneto unset an existingClutter.Animator
Specifies a
Clutter.Animatorto 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.Statekeys.If animator is
Noneit will unset an existing animator.Clutter.Statewill take a reference on the passed animator, if anyNew in version 1.4.
Deprecated since version 1.12: Use
Clutter.KeyframeTransitionandClutter.TransitionGroupinstead
- set_duration(source_state_name, target_state_name, duration)¶
- Parameters:
Sets the duration of a transition.
If both state names are
Nonethe 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.KeyframeTransitionandClutter.TransitionGroupinstead
- set_key(source_state_name, target_state_name, object, property_name, mode, value, pre_delay, post_delay)¶
- Parameters:
source_state_name (
strorNone) – the source transition to specify transition for, orNoneto 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.Objectto 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.Stateinstance, 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.KeyframeTransitionandClutter.TransitionGroupinstead
- set_state(target_state_name)¶
- Parameters:
target_state_name (
str) – the state to transition to- Returns:
the
Clutter.Timelinethat drives the state transition. The returned timeline is owned by theClutter.Stateand it should not be unreferenced- Return type:
Change the current state of
Clutter.Stateto target_state_name.The state will animate during its transition, see
Clutter.State.warp_to_statefor animation-free state switching.Setting a
Nonestate 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.KeyframeTransitionandClutter.TransitionGroupinstead
- warp_to_state(target_state_name)¶
- Parameters:
target_state_name (
str) – the state to transition to- Returns:
the
Clutter.Timelinethat drives the state transition. The returned timeline is owned by theClutter.Stateand 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.KeyframeTransitionandClutter.TransitionGroupinstead
- do_completed() virtual¶
class handler for the
Clutter.State::completedsignal
Signal Details¶
- Clutter.State.signals.completed(state)¶
- Signal Name:
completed- Flags:
- Parameters:
state (
Clutter.State) – The object which received the signal
The
::completedsignal is emitted when aClutter.Statereaches 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.KeyframeTransitionandClutter.TransitionGroupinstead
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.KeyframeTransitionandClutter.TransitionGroupinstead
- 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.KeyframeTransitionandClutter.TransitionGroupinstead