1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>ClutterState</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="Clutter Reference Manual">
8 <link rel="up" href="ch10.html" title="High Level API">
9 <link rel="prev" href="ClutterAnimator.html" title="ClutterAnimator">
10 <link rel="next" href="cluttertools.html" title="Part VI. Clutter Tools">
11 <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="ClutterAnimator.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch10.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">Clutter Reference Manual</th>
21 <td><a accesskey="n" href="cluttertools.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#ClutterState.synopsis" class="shortcut">Top</a>
26 <a href="#ClutterState.description" class="shortcut">Description</a>
28 <a href="#ClutterState.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#ClutterState.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
32 <a href="#ClutterState.properties" class="shortcut">Properties</a>
34 <a href="#ClutterState.signals" class="shortcut">Signals</a>
37 <div class="refentry">
38 <a name="ClutterState"></a><div class="titlepage"></div>
39 <div class="refnamediv"><table width="100%"><tr>
41 <h2><span class="refentrytitle"><a name="ClutterState.top_of_page"></a>ClutterState</span></h2>
42 <p>ClutterState — State machine with animated transitions</p>
44 <td valign="top" align="right"></td>
46 <div class="refsynopsisdiv">
47 <a name="ClutterState.synopsis"></a><h2>Synopsis</h2>
48 <pre class="synopsis"> <a class="link" href="ClutterState.html#ClutterState-struct" title="ClutterState">ClutterState</a>;
49 struct <a class="link" href="ClutterState.html#ClutterStateClass" title="struct ClutterStateClass">ClutterStateClass</a>;
50 <a class="link" href="ClutterState.html" title="ClutterState"><span class="returnvalue">ClutterState</span></a> * <a class="link" href="ClutterState.html#clutter-state-new" title="clutter_state_new ()">clutter_state_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
51 <a class="link" href="ClutterTimeline.html" title="ClutterTimeline"><span class="returnvalue">ClutterTimeline</span></a> * <a class="link" href="ClutterState.html#clutter-state-set-state" title="clutter_state_set_state ()">clutter_state_set_state</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
52 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>);
53 const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="ClutterState.html#clutter-state-get-state" title="clutter_state_get_state ()">clutter_state_get_state</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>);
54 <a class="link" href="ClutterTimeline.html" title="ClutterTimeline"><span class="returnvalue">ClutterTimeline</span></a> * <a class="link" href="ClutterState.html#clutter-state-warp-to-state" title="clutter_state_warp_to_state ()">clutter_state_warp_to_state</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
55 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>);
56 <span class="returnvalue">void</span> <a class="link" href="ClutterState.html#clutter-state-set" title="clutter_state_set ()">clutter_state_set</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
57 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
58 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>,
59 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> first_object</code></em>,
60 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
61 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> first_mode</code></em>,
62 <em class="parameter"><code>...</code></em>);
63 <a class="link" href="ClutterState.html" title="ClutterState"><span class="returnvalue">ClutterState</span></a> * <a class="link" href="ClutterState.html#clutter-state-set-key" title="clutter_state_set_key ()">clutter_state_set_key</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
64 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
65 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>,
66 <em class="parameter"><code><a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
67 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
68 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> mode</code></em>,
69 <em class="parameter"><code>const <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>,
70 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> pre_delay</code></em>,
71 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> post_delay</code></em>);
72 <span class="returnvalue">void</span> <a class="link" href="ClutterState.html#clutter-state-set-duration" title="clutter_state_set_duration ()">clutter_state_set_duration</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
73 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
74 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>,
75 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> duration</code></em>);
76 <a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="ClutterState.html#clutter-state-get-duration" title="clutter_state_get_duration ()">clutter_state_get_duration</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
77 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
78 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>);
79 <a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="ClutterState.html#clutter-state-get-states" title="clutter_state_get_states ()">clutter_state_get_states</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>);
80 <a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="ClutterState.html#clutter-state-get-keys" title="clutter_state_get_keys ()">clutter_state_get_keys</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
81 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
82 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>,
83 <em class="parameter"><code><a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
84 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);
85 <span class="returnvalue">void</span> <a class="link" href="ClutterState.html#clutter-state-remove-key" title="clutter_state_remove_key ()">clutter_state_remove_key</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
86 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
87 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>,
88 <em class="parameter"><code><a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
89 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);
90 <a class="link" href="ClutterTimeline.html" title="ClutterTimeline"><span class="returnvalue">ClutterTimeline</span></a> * <a class="link" href="ClutterState.html#clutter-state-get-timeline" title="clutter_state_get_timeline ()">clutter_state_get_timeline</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>);
91 <span class="returnvalue">void</span> <a class="link" href="ClutterState.html#clutter-state-set-animator" title="clutter_state_set_animator ()">clutter_state_set_animator</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
92 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
93 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>,
94 <em class="parameter"><code><a class="link" href="ClutterAnimator.html" title="ClutterAnimator"><span class="type">ClutterAnimator</span></a> *animator</code></em>);
95 <a class="link" href="ClutterAnimator.html" title="ClutterAnimator"><span class="returnvalue">ClutterAnimator</span></a> * <a class="link" href="ClutterState.html#clutter-state-get-animator" title="clutter_state_get_animator ()">clutter_state_get_animator</a> (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
96 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
97 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>);
99 <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey">ClutterStateKey</a>;
100 const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="ClutterState.html#clutter-state-key-get-source-state-name" title="clutter_state_key_get_source_state_name ()">clutter_state_key_get_source_state_name</a>
101 (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);
102 const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="ClutterState.html#clutter-state-key-get-target-state-name" title="clutter_state_key_get_target_state_name ()">clutter_state_key_get_target_state_name</a>
103 (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);
104 <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> * <a class="link" href="ClutterState.html#clutter-state-key-get-object" title="clutter_state_key_get_object ()">clutter_state_key_get_object</a> (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);
105 const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="ClutterState.html#clutter-state-key-get-property-name" title="clutter_state_key_get_property_name ()">clutter_state_key_get_property_name</a> (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);
106 <a href="../glib/glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a> <a class="link" href="ClutterState.html#clutter-state-key-get-mode" title="clutter_state_key_get_mode ()">clutter_state_key_get_mode</a> (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);
107 <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="ClutterState.html#clutter-state-key-get-value" title="clutter_state_key_get_value ()">clutter_state_key_get_value</a> (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>,
108 <em class="parameter"><code><a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);
109 <a href="../gobject/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> <a class="link" href="ClutterState.html#clutter-state-key-get-property-type" title="clutter_state_key_get_property_type ()">clutter_state_key_get_property_type</a> (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *key</code></em>);
110 <a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="ClutterState.html#clutter-state-key-get-pre-delay" title="clutter_state_key_get_pre_delay ()">clutter_state_key_get_pre_delay</a> (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);
111 <a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="ClutterState.html#clutter-state-key-get-post-delay" title="clutter_state_key_get_post_delay ()">clutter_state_key_get_post_delay</a> (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);
114 <div class="refsect1">
115 <a name="ClutterState.object-hierarchy"></a><h2>Object Hierarchy</h2>
116 <pre class="synopsis">
117 <a href="../gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
121 <div class="refsect1">
122 <a name="ClutterState.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
124 ClutterState implements
125 <a class="link" href="ClutterScriptable.html" title="ClutterScriptable">ClutterScriptable</a>.</p>
127 <div class="refsect1">
128 <a name="ClutterState.properties"></a><h2>Properties</h2>
129 <pre class="synopsis">
130 "<a class="link" href="ClutterState.html#ClutterState--duration" title='The "duration" property'>duration</a>" <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write
131 "<a class="link" href="ClutterState.html#ClutterState--state" title='The "state" property'>state</a>" <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
134 <div class="refsect1">
135 <a name="ClutterState.signals"></a><h2>Signals</h2>
136 <pre class="synopsis">
137 "<a class="link" href="ClutterState.html#ClutterState-completed" title='The "completed" signal'>completed</a>" : <a href="../gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
140 <div class="refsect1">
141 <a name="ClutterState.description"></a><h2>Description</h2>
143 <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> is an object controlling the tweening of properties on
144 multiple actors between a set of named states. <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>s
145 define how the properties are animated. If the source_state_name for a key
146 is NULL it is used for transition to the target state unless a specific key
147 exists for transitioning from the current state to the requested state.
151 <div class="example">
152 <a name="ClutterState-example"></a><p class="title"><b>Example 13. A ClutterState example</b></p>
153 <div class="example-contents">
154 <p>The following example defines a "base" and a "hover" state in a
155 <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> instance.</p>
156 <pre class="programlisting">
157 ClutterState *state = clutter_state_new ();
158 ClutterColor color = { 0, };
160 /* transition from any state to the "base" state */
161 clutter_color_from_string (&color, "rgb(255, 0, 0)");
162 clutter_state_set (state, NULL, "base",
163 actor, "color", CLUTTER_LINEAR, &color,
164 actor, "scale-x", CLUTTER_EASE_IN_BOUNCE, 1.0,
165 actor, "scale-y", CLUTTER_EASE_IN_BOUNCE, 1.0,
168 /* transition from the "base" state to the "hover" state */
169 clutter_color_from_string (&color, "rgb(0, 0, 255)");
170 clutter_state_set (state, "base", "hover",
171 actor, "color", CLUTTER_LINEAR, &color,
172 actor, "scale-x", CLUTTER_EASE_OUT_BOUNCE, 1.7,
173 actor, "scale-y", CLUTTER_EASE_OUT_BOUNCE, 1.7,
176 /* the default duration of any transition */
177 clutter_state_set_duration (state, NULL, NULL, 500);
179 /* set "base" as the initial state */
180 clutter_state_warp_to_state (state, "base");
182 <p>The actor then uses the <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> to animate through the
183 two states using callbacks for the <a class="link" href="ClutterActor.html#ClutterActor-enter-event" title='The "enter-event" signal'><span class="type">"enter-event"</span></a> and
184 <a class="link" href="ClutterActor.html#ClutterActor-leave-event" title='The "leave-event" signal'><span class="type">"leave-event"</span></a> signals.</p>
185 <pre class="programlisting">
187 on_enter (ClutterActor *actor,
191 clutter_state_set_state (state, "hover");
197 on_leave (ClutterActor *actor,
201 clutter_state_set_state (state, "base");
208 <p><br class="example-break">
212 <div class="refsect2">
213 <a name="ClutterState-script"></a><h3>ClutterState description for <a class="link" href="ClutterScript.html" title="ClutterScript"><span class="type">ClutterScript</span></a>
215 <p><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> defines a custom <span class="emphasis"><em>transitions</em></span>
216 property which allows describing the states.</p>
217 <p>The <span class="emphasis"><em>transitions</em></span> property has the following
219 <div class="informalexample">
220 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
223 <td class="listing_lines" align="right"><pre>1
256 <td class="listing_code"><pre class="programlisting"><span class="cbracket">{</span>
257 <span class="normal"> </span><span class="string">"transitions"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="symbol">[</span>
258 <span class="normal"> </span><span class="cbracket">{</span>
259 <span class="normal"> </span><span class="string">"source"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"<source-state>"</span><span class="symbol">,</span>
260 <span class="normal"> </span><span class="string">"target"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"<target-state>"</span><span class="symbol">,</span>
261 <span class="normal"> </span><span class="string">"duration"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="symbol"><</span><span class="normal">milliseconds</span><span class="symbol">>,</span>
262 <span class="normal"> </span><span class="string">"keys"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="symbol">[</span>
263 <span class="normal"> </span><span class="symbol">[</span>
264 <span class="normal"> </span><span class="string">"<object-id>"</span><span class="symbol">,</span>
265 <span class="normal"> </span><span class="string">"<property-name>"</span><span class="symbol">,</span>
266 <span class="normal"> </span><span class="string">"<easing-mode>"</span><span class="symbol">,</span>
267 <span class="normal"> </span><span class="string">"<final-value>"</span><span class="symbol">,</span>
268 <span class="normal"> </span><span class="symbol">],</span>
269 <span class="normal"> </span><span class="symbol">[</span>
270 <span class="normal"> </span><span class="string">"<object-id>"</span><span class="symbol">,</span>
271 <span class="normal"> </span><span class="string">"<property-name>"</span><span class="symbol">,</span>
272 <span class="normal"> </span><span class="string">"<easing-mode>"</span><span class="symbol">,</span>
273 <span class="normal"> </span><span class="string">"<final-value>"</span><span class="symbol">,</span>
274 <span class="normal"> </span><span class="symbol"><</span><span class="normal">pre</span><span class="symbol">-</span><span class="normal">delay</span><span class="symbol">>,</span>
275 <span class="normal"> </span><span class="symbol"><</span><span class="normal">post</span><span class="symbol">-</span><span class="normal">delay</span><span class="symbol">></span>
276 <span class="normal"> </span><span class="symbol">],</span>
277 <span class="normal"> </span><span class="symbol">...</span>
278 <span class="normal"> </span><span class="symbol">]</span>
279 <span class="normal"> </span><span class="cbracket">}</span><span class="symbol">,</span>
280 <span class="normal"> </span><span class="cbracket">{</span>
281 <span class="normal"> </span><span class="string">"source"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"<source-state>"</span><span class="symbol">,</span>
282 <span class="normal"> </span><span class="string">"target"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"<target-state>"</span><span class="symbol">,</span>
283 <span class="normal"> </span><span class="string">"duration"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="symbol"><</span><span class="normal">milliseconds</span><span class="symbol">>,</span>
284 <span class="normal"> </span><span class="string">"animator"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"<animator-definition>"</span>
285 <span class="normal"> </span><span class="cbracket">}</span><span class="symbol">,</span>
286 <span class="normal"> </span><span class="symbol">...</span>
287 <span class="normal"> </span><span class="symbol">]</span>
288 <span class="cbracket">}</span></pre></td>
294 <p>Each element of the <span class="emphasis"><em>transitions</em></span> array follows
295 the same rules as <a class="link" href="ClutterState.html#clutter-state-set-key" title="clutter_state_set_key ()"><code class="function">clutter_state_set_key()</code></a>.</p>
296 <p>The <span class="emphasis"><em>source</em></span> and <span class="emphasis"><em>target</em></span>
297 values control the source and target state of the transition. The
298 <span class="emphasis"><em>key</em></span> and <span class="emphasis"><em>animator</em></span> are mutually
299 exclusive. The <span class="emphasis"><em>pre-delay</em></span> and
300 <span class="emphasis"><em>post-delay</em></span> values are optional.</p>
301 <div class="example">
302 <a name="ClutterState-script-example"></a><p class="title"><b>Example 14. ClutterState definition</b></p>
303 <div class="example-contents">
304 <p>The example below is a translation into a <a class="link" href="ClutterScript.html" title="ClutterScript"><span class="type">ClutterScript</span></a>
305 definition of the code in the <a class="ulink" href="" target="_top">example
307 <pre class="programlisting">
309 "id" : "button-state",
310 "type" : "ClutterState",
317 [ "button", "color", "linear", "rgb(255, 0, 0)" ],
318 [ "button", "scale-x", "easeInBounce", 1.0 ],
319 [ "button", "scale-y", "easeInBounce", 1.0 ]
326 [ "button", "color", "linear", "rgb(0, 0, 255)" ],
327 [ "button", "scale-x", "easeOutBounce", 1.7 ],
328 [ "button", "scale-y", "easeOutBounce", 1.7 ]
336 <br class="example-break">
341 <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> is available since Clutter 1.4.
344 <div class="refsect1">
345 <a name="ClutterState.details"></a><h2>Details</h2>
346 <div class="refsect2">
347 <a name="ClutterState-struct"></a><h3>ClutterState</h3>
348 <pre class="programlisting">typedef struct _ClutterState ClutterState;</pre>
350 The <span class="structname">ClutterState</span> structure contains only
351 private data and should be accessed using the provided API
353 <p class="since">Since 1.4</p>
356 <div class="refsect2">
357 <a name="ClutterStateClass"></a><h3>struct ClutterStateClass</h3>
358 <pre class="programlisting">struct ClutterStateClass {
359 void (* completed) (ClutterState *state);
363 The <span class="structname">ClutterStateClass</span> structure contains
366 <div class="variablelist"><table border="0">
367 <col align="left" valign="top">
369 <td><p><span class="term"><em class="structfield"><code><a name="ClutterStateClass.completed"></a>completed</code></em> ()</span></p></td>
370 <td>class handler for the <a class="link" href="ClutterState.html#ClutterState-completed" title='The "completed" signal'><span class="type">"completed"</span></a> signal</td>
373 <p class="since">Since 1.4</p>
376 <div class="refsect2">
377 <a name="clutter-state-new"></a><h3>clutter_state_new ()</h3>
378 <pre class="programlisting"><a class="link" href="ClutterState.html" title="ClutterState"><span class="returnvalue">ClutterState</span></a> * clutter_state_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
380 Creates a new <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a>
382 <div class="variablelist"><table border="0">
383 <col align="left" valign="top">
385 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
386 <td>the newly create <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> instance</td>
391 <div class="refsect2">
392 <a name="clutter-state-set-state"></a><h3>clutter_state_set_state ()</h3>
393 <pre class="programlisting"><a class="link" href="ClutterTimeline.html" title="ClutterTimeline"><span class="returnvalue">ClutterTimeline</span></a> * clutter_state_set_state (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
394 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>);</pre>
396 Change the current state of <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> to <em class="parameter"><code>target_state_name</code></em>.
399 The state will animate during its transition, see
400 <a class="link" href="ClutterState.html#clutter-state-warp-to-state" title="clutter_state_warp_to_state ()"><span class="type">clutter_state_warp_to_state</span></a> for animation-free state switching.
403 Setting a <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> state will stop the current animation and unset
404 the current state, but keys will be left intact.
406 <div class="variablelist"><table border="0">
407 <col align="left" valign="top">
410 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
411 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a>
415 <td><p><span class="term"><em class="parameter"><code>target_state_name</code></em> :</span></p></td>
416 <td>the state to transition to</td>
419 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
420 <td>the <a class="link" href="ClutterTimeline.html" title="ClutterTimeline"><span class="type">ClutterTimeline</span></a> that drives the
421 state transition. The returned timeline is owned by the <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a>
422 and it should not be unreferenced. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
427 <p class="since">Since 1.4</p>
430 <div class="refsect2">
431 <a name="clutter-state-get-state"></a><h3>clutter_state_get_state ()</h3>
432 <pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * clutter_state_get_state (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>);</pre>
434 Queries the currently set target state.
437 During a transition this function will return the target of the transition.
440 This function is useful when called from handlers of the
441 <a class="link" href="ClutterState.html#ClutterState-completed" title='The "completed" signal'><span class="type">"completed"</span></a> signal.
443 <div class="variablelist"><table border="0">
444 <col align="left" valign="top">
447 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
448 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a>
452 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
453 <td>a string containing the target state. The returned string
454 is owned by the <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> and should not be modified or freed</td>
458 <p class="since">Since 1.4</p>
461 <div class="refsect2">
462 <a name="clutter-state-warp-to-state"></a><h3>clutter_state_warp_to_state ()</h3>
463 <pre class="programlisting"><a class="link" href="ClutterTimeline.html" title="ClutterTimeline"><span class="returnvalue">ClutterTimeline</span></a> * clutter_state_warp_to_state (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
464 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>);</pre>
466 Change to the specified target state immediately with no animation.
469 See <a class="link" href="ClutterState.html#clutter-state-set-state" title="clutter_state_set_state ()"><code class="function">clutter_state_set_state()</code></a>.
471 <div class="variablelist"><table border="0">
472 <col align="left" valign="top">
475 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
476 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a>
480 <td><p><span class="term"><em class="parameter"><code>target_state_name</code></em> :</span></p></td>
481 <td>the state to transition to</td>
484 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
485 <td>the <a class="link" href="ClutterTimeline.html" title="ClutterTimeline"><span class="type">ClutterTimeline</span></a> that drives the
486 state transition. The returned timeline is owned by the <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a>
487 and it should not be unreferenced. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
492 <p class="since">Since 1.4</p>
495 <div class="refsect2">
496 <a name="clutter-state-set"></a><h3>clutter_state_set ()</h3>
497 <pre class="programlisting"><span class="returnvalue">void</span> clutter_state_set (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
498 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
499 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>,
500 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> first_object</code></em>,
501 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
502 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> first_mode</code></em>,
503 <em class="parameter"><code>...</code></em>);</pre>
505 Adds multiple keys to a named state of a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> instance, specifying
506 the easing mode and value a given property of an object should have at a
507 given progress of the animation.
510 The mode specified is the easing mode used when going to from the previous
511 key to the specified key.
514 For instance, the code below:
518 <div class="informalexample">
519 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
522 <td class="listing_lines" align="right"><pre>1
527 <td class="listing_code"><pre class="programlisting"><span class="function"><a href="ClutterState.html#clutter-state-set">clutter_state_set</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">state</span><span class="symbol">,</span><span class="normal"> <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="string">"hover"</span><span class="symbol">,</span>
528 <span class="normal"> button</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"opacity"</span><span class="symbol">,</span><span class="normal"> <a href="clutter-Implicit-Animations.html#CLUTTER-LINEAR:CAPS">CLUTTER_LINEAR</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">255</span><span class="symbol">,</span>
529 <span class="normal"> button</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"scale-x"</span><span class="symbol">,</span><span class="normal"> <a href="clutter-Implicit-Animations.html#CLUTTER-EASE-OUT-CUBIC:CAPS">CLUTTER_EASE_OUT_CUBIC</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">1.2</span><span class="symbol">,</span>
530 <span class="normal"> button</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"scale-y"</span><span class="symbol">,</span><span class="normal"> <a href="clutter-Implicit-Animations.html#CLUTTER-EASE-OUT-CUBIC:CAPS">CLUTTER_EASE_OUT_CUBIC</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">1.2</span><span class="symbol">,</span>
531 <span class="normal"> <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
540 will create a transition from any state (a <em class="parameter"><code>source_state_name</code></em> or NULL is
541 treated as a wildcard) and a state named "hover"; the
542 <span class="emphasis"><em>button</em></span> object will have the <a class="link" href="ClutterActor.html#ClutterActor--opacity" title='The "opacity" property'><span class="type">"opacity"</span></a>
543 property animated to a value of 255 using <a class="link" href="clutter-Implicit-Animations.html#CLUTTER-LINEAR:CAPS"><code class="literal">CLUTTER_LINEAR</code></a> as the animation
544 mode, and the <a class="link" href="ClutterActor.html#ClutterActor--scale-x" title='The "scale-x" property'><span class="type">"scale-x"</span></a> and <a class="link" href="ClutterActor.html#ClutterActor--scale-y" title='The "scale-y" property'><span class="type">"scale-y"</span></a> properties
545 animated to a value of 1.2 using <a class="link" href="clutter-Implicit-Animations.html#CLUTTER-EASE-OUT-CUBIC:CAPS"><code class="literal">CLUTTER_EASE_OUT_CUBIC</code></a> as the animation
546 mode. To change the state (and start the transition) you can use the
547 <a class="link" href="ClutterState.html#clutter-state-set-state" title="clutter_state_set_state ()"><code class="function">clutter_state_set_state()</code></a> function:
551 <div class="informalexample">
552 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
555 <td class="listing_lines" align="right"><pre>1</pre></td>
556 <td class="listing_code"><pre class="programlisting"><span class="function"><a href="ClutterState.html#clutter-state-set-state">clutter_state_set_state</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">state</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"hover"</span><span class="symbol">);</span></pre></td>
565 If a given object, state_name, property tuple already exist in the
566 <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> instance, then the mode and value will be replaced with
567 the new specified values.
570 If a property name is prefixed with "delayed::" two additional
571 arguments per key are expected: a value relative to the full state time
572 to pause before transitioning and a similar value to pause after
577 <div class="informalexample">
578 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
581 <td class="listing_lines" align="right"><pre>1
585 <td class="listing_code"><pre class="programlisting"><span class="function"><a href="ClutterState.html#clutter-state-set">clutter_state_set</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">state</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"hover"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"toggled"</span><span class="symbol">,</span>
586 <span class="normal"> button</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"delayed::scale-x"</span><span class="symbol">,</span><span class="normal"> <a href="clutter-Implicit-Animations.html#CLUTTER-LINEAR:CAPS">CLUTTER_LINEAR</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">1.0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.2</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.2</span><span class="symbol">,</span>
587 <span class="normal"> button</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"delayed::scale-y"</span><span class="symbol">,</span><span class="normal"> <a href="clutter-Implicit-Animations.html#CLUTTER-LINEAR:CAPS">CLUTTER_LINEAR</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">1.0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.2</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.2</span><span class="symbol">,</span>
588 <span class="normal"> <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
597 will pause for 20% of the duration of the transition before animating,
598 and 20% of the duration after animating.
600 <div class="variablelist"><table border="0">
601 <col align="left" valign="top">
604 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
605 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> instance.</td>
608 <td><p><span class="term"><em class="parameter"><code>source_state_name</code></em> :</span></p></td>
609 <td>the name of the source state keys are being added for. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
613 <td><p><span class="term"><em class="parameter"><code>target_state_name</code></em> :</span></p></td>
614 <td>the name of the target state keys are being added for</td>
617 <td><p><span class="term"><em class="parameter"><code>first_object</code></em> :</span></p></td>
618 <td>a <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
622 <td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
623 <td>a property of <em class="parameter"><code>first_object</code></em> to specify a key for</td>
626 <td><p><span class="term"><em class="parameter"><code>first_mode</code></em> :</span></p></td>
627 <td>the id of the alpha function to use</td>
630 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
631 <td>the value <em class="parameter"><code>first_property_name</code></em> should have in <em class="parameter"><code>target_state_name</code></em>,
632 followed by object, property name, mode, value tuples, terminated
633 by <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
638 <p class="since">Since 1.4</p>
641 <div class="refsect2">
642 <a name="clutter-state-set-key"></a><h3>clutter_state_set_key ()</h3>
643 <pre class="programlisting"><a class="link" href="ClutterState.html" title="ClutterState"><span class="returnvalue">ClutterState</span></a> * clutter_state_set_key (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
644 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
645 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>,
646 <em class="parameter"><code><a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
647 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
648 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> mode</code></em>,
649 <em class="parameter"><code>const <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>,
650 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> pre_delay</code></em>,
651 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> post_delay</code></em>);</pre>
653 Sets one specific end key for a state name, <em class="parameter"><code>object</code></em>, <em class="parameter"><code>property_name</code></em>
656 <div class="variablelist"><table border="0">
657 <col align="left" valign="top">
660 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
661 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> instance.</td>
664 <td><p><span class="term"><em class="parameter"><code>source_state_name</code></em> :</span></p></td>
665 <td>the source transition to specify
666 transition for, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to specify the default fallback when a
667 more specific source state doesn't exist. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
671 <td><p><span class="term"><em class="parameter"><code>target_state_name</code></em> :</span></p></td>
672 <td>the name of the transition to set a key value for.</td>
675 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
676 <td>the <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> to set a key for</td>
679 <td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
680 <td>the property to set a key for</td>
683 <td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
684 <td>the id of the alpha function to use</td>
687 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
688 <td>the value for property_name of object in state_name</td>
691 <td><p><span class="term"><em class="parameter"><code>pre_delay</code></em> :</span></p></td>
692 <td>relative time of the transition to be idle in the beginning
693 of the transition</td>
696 <td><p><span class="term"><em class="parameter"><code>post_delay</code></em> :</span></p></td>
697 <td>relative time of the transition to be idle in the end of
701 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
702 <td>the <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> instance, allowing
703 chaining of multiple calls. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
708 <p class="since">Since 1.4</p>
711 <div class="refsect2">
712 <a name="clutter-state-set-duration"></a><h3>clutter_state_set_duration ()</h3>
713 <pre class="programlisting"><span class="returnvalue">void</span> clutter_state_set_duration (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
714 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
715 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>,
716 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> duration</code></em>);</pre>
718 Sets the duration of a transition.
721 If both state names are <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> the default duration for <em class="parameter"><code>state</code></em> is set.
724 If only <em class="parameter"><code>target_state_name</code></em> is specified, the passed <em class="parameter"><code>duration</code></em> becomes
725 the default duration for transitions to the target state.
728 If both states names are specified, the passed <em class="parameter"><code>duration</code></em> only applies
729 to the specified transition.
731 <div class="variablelist"><table border="0">
732 <col align="left" valign="top">
735 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
736 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a>
740 <td><p><span class="term"><em class="parameter"><code>source_state_name</code></em> :</span></p></td>
741 <td>the name of the source state, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
745 <td><p><span class="term"><em class="parameter"><code>target_state_name</code></em> :</span></p></td>
746 <td>the name of the target state, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
750 <td><p><span class="term"><em class="parameter"><code>duration</code></em> :</span></p></td>
751 <td>the duration of the transition, in milliseconds</td>
755 <p class="since">Since 1.4</p>
758 <div class="refsect2">
759 <a name="clutter-state-get-duration"></a><h3>clutter_state_get_duration ()</h3>
760 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> clutter_state_get_duration (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
761 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
762 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>);</pre>
764 Queries the duration used for transitions between a source and
768 The semantics for the query are the same as the semantics used for
769 setting the duration with <a class="link" href="ClutterState.html#clutter-state-set-duration" title="clutter_state_set_duration ()"><code class="function">clutter_state_set_duration()</code></a>
771 <div class="variablelist"><table border="0">
772 <col align="left" valign="top">
775 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
776 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a>
780 <td><p><span class="term"><em class="parameter"><code>source_state_name</code></em> :</span></p></td>
781 <td>the name of the source state to
782 get the duration of, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
786 <td><p><span class="term"><em class="parameter"><code>target_state_name</code></em> :</span></p></td>
787 <td>the name of the source state to
788 get the duration of, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
792 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
793 <td>the duration, in milliseconds</td>
797 <p class="since">Since 1.4</p>
800 <div class="refsect2">
801 <a name="clutter-state-get-states"></a><h3>clutter_state_get_states ()</h3>
802 <pre class="programlisting"><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * clutter_state_get_states (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>);</pre>
804 Gets a list of all the state names managed by this <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a>.
806 <div class="variablelist"><table border="0">
807 <col align="left" valign="top">
810 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
811 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> instance.</td>
814 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
815 <td>a newly allocated
816 <a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of state names. The contents of the returned <a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> are owned
817 by the <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> and should not be modified or freed. Use
818 <a href="../glib/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a> to free the resources allocated by the returned list when
819 done using it. <span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span>
824 <p class="since">Since 1.4</p>
827 <div class="refsect2">
828 <a name="clutter-state-get-keys"></a><h3>clutter_state_get_keys ()</h3>
829 <pre class="programlisting"><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * clutter_state_get_keys (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
830 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
831 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>,
832 <em class="parameter"><code><a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
833 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);</pre>
835 Returns a list of pointers to opaque structures with accessor functions
836 that describe the keys added to an animator.
838 <div class="variablelist"><table border="0">
839 <col align="left" valign="top">
842 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
843 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> instance.</td>
846 <td><p><span class="term"><em class="parameter"><code>source_state_name</code></em> :</span></p></td>
847 <td>the source transition name to query,
848 or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for all source states. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
852 <td><p><span class="term"><em class="parameter"><code>target_state_name</code></em> :</span></p></td>
853 <td>the target transition name to query,
854 or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for all target states. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
858 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
859 <td>the specific object instance to list keys for,
860 or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for all managed objects. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
864 <td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
865 <td>the property name to search for, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
866 for all properties. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
870 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
872 newly allocated <a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>s. The contents of
873 the returned list are owned by the <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> and should not be
874 modified or freed. Use <a href="../glib/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a> to free the resources allocated
875 by the returned list when done using it. <span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Clutter.StateKey]</span>
880 <p class="since">Since 1.4</p>
883 <div class="refsect2">
884 <a name="clutter-state-remove-key"></a><h3>clutter_state_remove_key ()</h3>
885 <pre class="programlisting"><span class="returnvalue">void</span> clutter_state_remove_key (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
886 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
887 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>,
888 <em class="parameter"><code><a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
889 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);</pre>
891 Removes all keys matching the search criteria passed in arguments.
893 <div class="variablelist"><table border="0">
894 <col align="left" valign="top">
897 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
898 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> instance.</td>
901 <td><p><span class="term"><em class="parameter"><code>source_state_name</code></em> :</span></p></td>
902 <td>the source state name to query,
903 or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for all source states. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
907 <td><p><span class="term"><em class="parameter"><code>target_state_name</code></em> :</span></p></td>
908 <td>the target state name to query,
909 or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for all target states. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
913 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
914 <td>the specific object instance to list keys for,
915 or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for all managed objects. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
919 <td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
920 <td>the property name to search for,
921 or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for all properties. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
926 <p class="since">Since 1.4</p>
929 <div class="refsect2">
930 <a name="clutter-state-get-timeline"></a><h3>clutter_state_get_timeline ()</h3>
931 <pre class="programlisting"><a class="link" href="ClutterTimeline.html" title="ClutterTimeline"><span class="returnvalue">ClutterTimeline</span></a> * clutter_state_get_timeline (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>);</pre>
933 Gets the timeline driving the <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a>
935 <div class="variablelist"><table border="0">
936 <col align="left" valign="top">
939 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
940 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a>
944 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
945 <td>the <a class="link" href="ClutterTimeline.html" title="ClutterTimeline"><span class="type">ClutterTimeline</span></a> that drives
946 the state change animations. The returned timeline is owned
947 by the <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> and it should not be unreferenced directly. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
952 <p class="since">Since 1.4</p>
955 <div class="refsect2">
956 <a name="clutter-state-set-animator"></a><h3>clutter_state_set_animator ()</h3>
957 <pre class="programlisting"><span class="returnvalue">void</span> clutter_state_set_animator (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
958 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
959 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>,
960 <em class="parameter"><code><a class="link" href="ClutterAnimator.html" title="ClutterAnimator"><span class="type">ClutterAnimator</span></a> *animator</code></em>);</pre>
962 Specifies a <a class="link" href="ClutterAnimator.html" title="ClutterAnimator"><span class="type">ClutterAnimator</span></a> to be used when transitioning between
963 the two named states.
966 The <em class="parameter"><code>animator</code></em> allows specifying a transition between the state that is
967 more elaborate than the basic transitions allowed by the tweening of
968 properties defined in the <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> keys.
971 If <em class="parameter"><code>animator</code></em> is <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> it will unset an existing animator.
974 <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> will take a reference on the passed <em class="parameter"><code>animator</code></em>, if any
976 <div class="variablelist"><table border="0">
977 <col align="left" valign="top">
980 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
981 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> instance.</td>
984 <td><p><span class="term"><em class="parameter"><code>source_state_name</code></em> :</span></p></td>
985 <td>the name of a source state</td>
988 <td><p><span class="term"><em class="parameter"><code>target_state_name</code></em> :</span></p></td>
989 <td>the name of a target state</td>
992 <td><p><span class="term"><em class="parameter"><code>animator</code></em> :</span></p></td>
993 <td>a <a class="link" href="ClutterAnimator.html" title="ClutterAnimator"><span class="type">ClutterAnimator</span></a> instance, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to
994 unset an existing <a class="link" href="ClutterAnimator.html" title="ClutterAnimator"><span class="type">ClutterAnimator</span></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
999 <p class="since">Since 1.4</p>
1002 <div class="refsect2">
1003 <a name="clutter-state-get-animator"></a><h3>clutter_state_get_animator ()</h3>
1004 <pre class="programlisting"><a class="link" href="ClutterAnimator.html" title="ClutterAnimator"><span class="returnvalue">ClutterAnimator</span></a> * clutter_state_get_animator (<em class="parameter"><code><a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state</code></em>,
1005 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source_state_name</code></em>,
1006 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *target_state_name</code></em>);</pre>
1008 Retrieves the <a class="link" href="ClutterAnimator.html" title="ClutterAnimator"><span class="type">ClutterAnimator</span></a> that is being used for transitioning
1009 between the two states, if any has been set
1011 <div class="variablelist"><table border="0">
1012 <col align="left" valign="top">
1015 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
1016 <td>a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> instance.</td>
1019 <td><p><span class="term"><em class="parameter"><code>source_state_name</code></em> :</span></p></td>
1020 <td>the name of a source state</td>
1023 <td><p><span class="term"><em class="parameter"><code>target_state_name</code></em> :</span></p></td>
1024 <td>the name of a target state</td>
1027 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1028 <td>a <a class="link" href="ClutterAnimator.html" title="ClutterAnimator"><span class="type">ClutterAnimator</span></a> instance, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1033 <p class="since">Since 1.4</p>
1036 <div class="refsect2">
1037 <a name="ClutterStateKey"></a><h3>ClutterStateKey</h3>
1038 <pre class="programlisting">typedef struct _ClutterStateKey ClutterStateKey;</pre>
1040 <span class="structname">ClutterStateKey</span> is an opaque structure whose
1041 members cannot be accessed directly
1043 <p class="since">Since 1.4</p>
1046 <div class="refsect2">
1047 <a name="clutter-state-key-get-source-state-name"></a><h3>clutter_state_key_get_source_state_name ()</h3>
1048 <pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * clutter_state_key_get_source_state_name
1049 (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);</pre>
1051 Retrieves the name of the source state of the <em class="parameter"><code>state_key</code></em>
1053 <div class="variablelist"><table border="0">
1054 <col align="left" valign="top">
1057 <td><p><span class="term"><em class="parameter"><code>state_key</code></em> :</span></p></td>
1058 <td>a <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>
1062 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1063 <td>the name of the source state for this key, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
1064 if this is the generic state key for the given property when
1065 transitioning to the target state. The returned string is owned
1066 by the <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> and should never be modified or freed</td>
1070 <p class="since">Since 1.4</p>
1073 <div class="refsect2">
1074 <a name="clutter-state-key-get-target-state-name"></a><h3>clutter_state_key_get_target_state_name ()</h3>
1075 <pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * clutter_state_key_get_target_state_name
1076 (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);</pre>
1078 Get the name of the source state this <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> contains,
1079 or NULL if this is the generic state key for the given property
1080 when transitioning to the target state.
1082 <div class="variablelist"><table border="0">
1083 <col align="left" valign="top">
1086 <td><p><span class="term"><em class="parameter"><code>state_key</code></em> :</span></p></td>
1087 <td>a <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>
1091 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1092 <td>the name of the source state for this key, or NULL if
1093 the key is generic</td>
1097 <p class="since">Since 1.4</p>
1100 <div class="refsect2">
1101 <a name="clutter-state-key-get-object"></a><h3>clutter_state_key_get_object ()</h3>
1102 <pre class="programlisting"><a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> * clutter_state_key_get_object (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);</pre>
1104 Retrieves the object instance this <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> applies to.
1106 <div class="variablelist"><table border="0">
1107 <col align="left" valign="top">
1110 <td><p><span class="term"><em class="parameter"><code>state_key</code></em> :</span></p></td>
1111 <td>a <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>
1115 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1116 <td>the object this state key applies to. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1121 <p class="since">Since 1.4</p>
1124 <div class="refsect2">
1125 <a name="clutter-state-key-get-property-name"></a><h3>clutter_state_key_get_property_name ()</h3>
1126 <pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * clutter_state_key_get_property_name (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);</pre>
1128 Retrieves the name of the property this <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> applies to
1130 <div class="variablelist"><table border="0">
1131 <col align="left" valign="top">
1134 <td><p><span class="term"><em class="parameter"><code>state_key</code></em> :</span></p></td>
1135 <td>a <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>
1139 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1140 <td>the name of the property. The returned string is owned
1141 by the <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> and should never be modified or freed</td>
1145 <p class="since">Since 1.4</p>
1148 <div class="refsect2">
1149 <a name="clutter-state-key-get-mode"></a><h3>clutter_state_key_get_mode ()</h3>
1150 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a> clutter_state_key_get_mode (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);</pre>
1152 Retrieves the easing mode used for <em class="parameter"><code>state_key</code></em>.
1154 <div class="variablelist"><table border="0">
1155 <col align="left" valign="top">
1158 <td><p><span class="term"><em class="parameter"><code>state_key</code></em> :</span></p></td>
1159 <td>a <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>
1163 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1164 <td>the mode of a <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>
1169 <p class="since">Since 1.4</p>
1172 <div class="refsect2">
1173 <a name="clutter-state-key-get-value"></a><h3>clutter_state_key_get_value ()</h3>
1174 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> clutter_state_key_get_value (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>,
1175 <em class="parameter"><code><a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
1177 Retrieves a copy of the value for a <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>.
1180 The <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> needs to be already initialized for the value type
1181 of the property or to a type that allow transformation from the value
1185 Use <a href="../gobject/gobject-Generic-values.html#g-value-unset"><code class="function">g_value_unset()</code></a> when done.
1187 <div class="variablelist"><table border="0">
1188 <col align="left" valign="top">
1191 <td><p><span class="term"><em class="parameter"><code>state_key</code></em> :</span></p></td>
1192 <td>a <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>
1196 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
1197 <td>a <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> initialized with the correct type for the <em class="parameter"><code>state_key</code></em>
1201 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1203 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the value was successfully retrieved,
1204 and <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
1208 <p class="since">Since 1.4</p>
1211 <div class="refsect2">
1212 <a name="clutter-state-key-get-property-type"></a><h3>clutter_state_key_get_property_type ()</h3>
1213 <pre class="programlisting"><a href="../gobject/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> clutter_state_key_get_property_type (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *key</code></em>);</pre>
1215 Retrieves the <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the property a key applies to
1218 You can use this type to initialize the <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> to pass to
1219 <a class="link" href="ClutterState.html#clutter-state-key-get-value" title="clutter_state_key_get_value ()"><code class="function">clutter_state_key_get_value()</code></a>
1221 <div class="variablelist"><table border="0">
1222 <col align="left" valign="top">
1225 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
1226 <td>a <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>
1230 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1231 <td>the <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the property</td>
1235 <p class="since">Since 1.4</p>
1238 <div class="refsect2">
1239 <a name="clutter-state-key-get-pre-delay"></a><h3>clutter_state_key_get_pre_delay ()</h3>
1240 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> clutter_state_key_get_pre_delay (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);</pre>
1242 Retrieves the pause before transitioning starts as a fraction of
1243 the total transition time.
1245 <div class="variablelist"><table border="0">
1246 <col align="left" valign="top">
1249 <td><p><span class="term"><em class="parameter"><code>state_key</code></em> :</span></p></td>
1250 <td>a <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>
1254 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1255 <td>the pre delay used before starting the transition.</td>
1259 <p class="since">Since 1.4</p>
1262 <div class="refsect2">
1263 <a name="clutter-state-key-get-post-delay"></a><h3>clutter_state_key_get_post_delay ()</h3>
1264 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> clutter_state_key_get_post_delay (<em class="parameter"><code>const <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a> *state_key</code></em>);</pre>
1266 Retrieves the duration of the pause after transitioning is complete
1267 as a fraction of the total transition time.
1269 <div class="variablelist"><table border="0">
1270 <col align="left" valign="top">
1273 <td><p><span class="term"><em class="parameter"><code>state_key</code></em> :</span></p></td>
1274 <td>a <a class="link" href="ClutterState.html#ClutterStateKey" title="ClutterStateKey"><span class="type">ClutterStateKey</span></a>
1278 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1279 <td>the post delay, used after doing the transition.</td>
1283 <p class="since">Since 1.4</p>
1286 <div class="refsect1">
1287 <a name="ClutterState.property-details"></a><h2>Property Details</h2>
1288 <div class="refsect2">
1289 <a name="ClutterState--duration"></a><h3>The <code class="literal">"duration"</code> property</h3>
1290 <pre class="programlisting"> "duration" <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre>
1292 Default duration used if an duration has not been specified for a specific
1293 source/target state pair. The values is in milliseconds.
1295 <p>Allowed values: <= 86400000</p>
1296 <p>Default value: 1000</p>
1299 <div class="refsect2">
1300 <a name="ClutterState--state"></a><h3>The <code class="literal">"state"</code> property</h3>
1301 <pre class="programlisting"> "state" <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre>
1303 The currently set target state, setting it causes the
1304 state machine to transition to the new state, use
1305 <a class="link" href="ClutterState.html#clutter-state-warp-to-state" title="clutter_state_warp_to_state ()"><code class="function">clutter_state_warp_to_state()</code></a> to change state without
1308 <p>Default value: NULL</p>
1311 <div class="refsect1">
1312 <a name="ClutterState.signal-details"></a><h2>Signal Details</h2>
1313 <div class="refsect2">
1314 <a name="ClutterState-completed"></a><h3>The <code class="literal">"completed"</code> signal</h3>
1315 <pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> *state,
1316 <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="../gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
1318 The ::completed signal is emitted when a <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> reaches
1319 the target state specified by <a class="link" href="ClutterState.html#clutter-state-set-state" title="clutter_state_set_state ()"><code class="function">clutter_state_set_state()</code></a> or
1320 <a class="link" href="ClutterState.html#clutter-state-warp-to-state" title="clutter_state_warp_to_state ()"><code class="function">clutter_state_warp_to_state()</code></a>.
1322 <div class="variablelist"><table border="0">
1323 <col align="left" valign="top">
1326 <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
1327 <td>the <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> that emitted the signal</td>
1330 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1331 <td>user data set when the signal handler was connected.</td>
1335 <p class="since">Since 1.4</p>
1339 <div class="footer">
1341 Generated by GTK-Doc V1.18.1</div>