62df2ec104c1d7147c1b7829243519fdebb86bf8
[profile/ivi/clutter.git] / doc / reference / clutter / html / clutter-Value-intervals.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Value intervals</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="ch09.html" title="Base classes">
9 <link rel="prev" href="ClutterAlpha.html" title="ClutterAlpha">
10 <link rel="next" href="ClutterTransition.html" title="ClutterTransition">
11 <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
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">
16 <tr valign="middle">
17 <td><a accesskey="p" href="ClutterAlpha.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch09.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="ClutterTransition.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#clutter-Value-intervals.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#clutter-Value-intervals.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#clutter-Value-intervals.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#clutter-Value-intervals.properties" class="shortcut">Properties</a>
31 </td></tr>
32 </table>
33 <div class="refentry">
34 <a name="clutter-Value-intervals"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
36 <td valign="top">
37 <h2><span class="refentrytitle"><a name="clutter-Value-intervals.top_of_page"></a>Value intervals</span></h2>
38 <p>Value intervals — An object holding an interval of two values</p>
39 </td>
40 <td valign="top" align="right"></td>
41 </tr></table></div>
42 <div class="refsynopsisdiv">
43 <a name="clutter-Value-intervals.synopsis"></a><h2>Synopsis</h2>
44 <a name="ClutterInterval"></a><pre class="synopsis">                    <a class="link" href="clutter-Value-intervals.html#ClutterInterval-struct" title="ClutterInterval">ClutterInterval</a>;
45 struct              <a class="link" href="clutter-Value-intervals.html#ClutterIntervalClass" title="struct ClutterIntervalClass">ClutterIntervalClass</a>;
46 <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="returnvalue">ClutterInterval</span></a> *   <a class="link" href="clutter-Value-intervals.html#clutter-interval-new" title="clutter_interval_new ()">clutter_interval_new</a>                (<em class="parameter"><code><span class="type">GType</span> gtype</code></em>,
47                                                          <em class="parameter"><code>...</code></em>);
48 <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="returnvalue">ClutterInterval</span></a> *   <a class="link" href="clutter-Value-intervals.html#clutter-interval-new-with-values" title="clutter_interval_new_with_values ()">clutter_interval_new_with_values</a>    (<em class="parameter"><code><span class="type">GType</span> gtype</code></em>,
49                                                          <em class="parameter"><code>const <span class="type">GValue</span> *initial</code></em>,
50                                                          <em class="parameter"><code>const <span class="type">GValue</span> *final</code></em>);
51 <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="returnvalue">ClutterInterval</span></a> *   <a class="link" href="clutter-Value-intervals.html#clutter-interval-clone" title="clutter_interval_clone ()">clutter_interval_clone</a>              (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>);
52 <span class="returnvalue">GType</span>               <a class="link" href="clutter-Value-intervals.html#clutter-interval-get-value-type" title="clutter_interval_get_value_type ()">clutter_interval_get_value_type</a>     (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>);
53 <span class="returnvalue">void</span>                <a class="link" href="clutter-Value-intervals.html#clutter-interval-set-initial-value" title="clutter_interval_set_initial_value ()">clutter_interval_set_initial_value</a>  (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
54                                                          <em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);
55 <span class="returnvalue">void</span>                <a class="link" href="clutter-Value-intervals.html#clutter-interval-get-initial-value" title="clutter_interval_get_initial_value ()">clutter_interval_get_initial_value</a>  (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
56                                                          <em class="parameter"><code><span class="type">GValue</span> *value</code></em>);
57 <span class="returnvalue">GValue</span> *            <a class="link" href="clutter-Value-intervals.html#clutter-interval-peek-initial-value" title="clutter_interval_peek_initial_value ()">clutter_interval_peek_initial_value</a> (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>);
58 <span class="returnvalue">void</span>                <a class="link" href="clutter-Value-intervals.html#clutter-interval-set-final-value" title="clutter_interval_set_final_value ()">clutter_interval_set_final_value</a>    (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
59                                                          <em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);
60 <span class="returnvalue">void</span>                <a class="link" href="clutter-Value-intervals.html#clutter-interval-get-final-value" title="clutter_interval_get_final_value ()">clutter_interval_get_final_value</a>    (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
61                                                          <em class="parameter"><code><span class="type">GValue</span> *value</code></em>);
62 <span class="returnvalue">GValue</span> *            <a class="link" href="clutter-Value-intervals.html#clutter-interval-peek-final-value" title="clutter_interval_peek_final_value ()">clutter_interval_peek_final_value</a>   (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>);
63 <span class="returnvalue">void</span>                <a class="link" href="clutter-Value-intervals.html#clutter-interval-set-interval" title="clutter_interval_set_interval ()">clutter_interval_set_interval</a>       (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
64                                                          <em class="parameter"><code>...</code></em>);
65 <span class="returnvalue">void</span>                <a class="link" href="clutter-Value-intervals.html#clutter-interval-get-interval" title="clutter_interval_get_interval ()">clutter_interval_get_interval</a>       (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
66                                                          <em class="parameter"><code>...</code></em>);
67 <span class="returnvalue">void</span>                <a class="link" href="clutter-Value-intervals.html#clutter-interval-set-initial" title="clutter_interval_set_initial ()">clutter_interval_set_initial</a>        (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
68                                                          <em class="parameter"><code>...</code></em>);
69 <span class="returnvalue">void</span>                <a class="link" href="clutter-Value-intervals.html#clutter-interval-set-final" title="clutter_interval_set_final ()">clutter_interval_set_final</a>          (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
70                                                          <em class="parameter"><code>...</code></em>);
71
72 <span class="returnvalue">gboolean</span>            <a class="link" href="clutter-Value-intervals.html#clutter-interval-validate" title="clutter_interval_validate ()">clutter_interval_validate</a>           (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
73                                                          <em class="parameter"><code><span class="type">GParamSpec</span> *pspec</code></em>);
74 <span class="returnvalue">gboolean</span>            <a class="link" href="clutter-Value-intervals.html#clutter-interval-compute-value" title="clutter_interval_compute_value ()">clutter_interval_compute_value</a>      (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
75                                                          <em class="parameter"><code><span class="type">gdouble</span> factor</code></em>,
76                                                          <em class="parameter"><code><span class="type">GValue</span> *value</code></em>);
77 const <span class="returnvalue">GValue</span> *      <a class="link" href="clutter-Value-intervals.html#clutter-interval-compute" title="clutter_interval_compute ()">clutter_interval_compute</a>            (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
78                                                          <em class="parameter"><code><span class="type">gdouble</span> factor</code></em>);
79
80 <span class="returnvalue">gboolean</span>            (<a class="link" href="clutter-Value-intervals.html#ClutterProgressFunc" title="ClutterProgressFunc ()">*ClutterProgressFunc</a>)              (<em class="parameter"><code>const <span class="type">GValue</span> *a</code></em>,
81                                                          <em class="parameter"><code>const <span class="type">GValue</span> *b</code></em>,
82                                                          <em class="parameter"><code><span class="type">gdouble</span> progress</code></em>,
83                                                          <em class="parameter"><code><span class="type">GValue</span> *retval</code></em>);
84 <span class="returnvalue">void</span>                <a class="link" href="clutter-Value-intervals.html#clutter-interval-register-progress-func" title="clutter_interval_register_progress_func ()">clutter_interval_register_progress_func</a>
85                                                         (<em class="parameter"><code><span class="type">GType</span> value_type</code></em>,
86                                                          <em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterProgressFunc" title="ClutterProgressFunc ()"><span class="type">ClutterProgressFunc</span></a> func</code></em>);
87 </pre>
88 </div>
89 <div class="refsect1">
90 <a name="clutter-Value-intervals.object-hierarchy"></a><h2>Object Hierarchy</h2>
91 <pre class="synopsis">
92   GObject
93    +----GInitiallyUnowned
94          +----ClutterInterval
95 </pre>
96 </div>
97 <div class="refsect1">
98 <a name="clutter-Value-intervals.properties"></a><h2>Properties</h2>
99 <pre class="synopsis">
100   "<a class="link" href="clutter-Value-intervals.html#ClutterInterval--value-type" title='The "value-type" property'>value-type</a>"               <span class="type">GType</span>*                : Read / Write / Construct Only
101 </pre>
102 </div>
103 <div class="refsect1">
104 <a name="clutter-Value-intervals.description"></a><h2>Description</h2>
105 <p>
106 <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> is a simple object that can hold two values
107 defining an interval. <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> can hold any value that
108 can be enclosed inside a <span class="type">GValue</span>.
109 </p>
110 <p>
111 Once a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> for a specific <span class="type">GType</span> has been instantiated
112 the <a class="link" href="clutter-Value-intervals.html#ClutterInterval--value-type" title='The "value-type" property'><span class="type">"value-type"</span></a> property cannot be changed anymore.
113 </p>
114 <p>
115 <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> starts with a floating reference; this means that
116 any object taking a reference on a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> instance should
117 also take ownership of the interval by using <code class="function">g_object_ref_sink()</code>.
118 </p>
119 <p>
120 <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> is used by <a class="link" href="clutter-Implicit-Animations.html#ClutterAnimation"><span class="type">ClutterAnimation</span></a> to define the
121 interval of values that an implicit animation should tween over.
122 </p>
123 <p>
124 <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> can be subclassed to override the validation
125 and value computation.
126 </p>
127 <p>
128 <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> is available since Clutter 1.0
129 </p>
130 </div>
131 <div class="refsect1">
132 <a name="clutter-Value-intervals.details"></a><h2>Details</h2>
133 <div class="refsect2">
134 <a name="ClutterInterval-struct"></a><h3>ClutterInterval</h3>
135 <pre class="programlisting">typedef struct _ClutterInterval ClutterInterval;</pre>
136 <p>
137 The <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> structure contains only private data and should
138 be accessed using the provided functions.
139 </p>
140 <p class="since">Since 1.0</p>
141 </div>
142 <hr>
143 <div class="refsect2">
144 <a name="ClutterIntervalClass"></a><h3>struct ClutterIntervalClass</h3>
145 <pre class="programlisting">struct ClutterIntervalClass {
146   gboolean (* validate)      (ClutterInterval *interval,
147                               GParamSpec      *pspec);
148   gboolean (* compute_value) (ClutterInterval *interval,
149                               gdouble          factor,
150                               GValue          *value);
151 };
152 </pre>
153 <p>
154 The <a class="link" href="clutter-Value-intervals.html#ClutterIntervalClass" title="struct ClutterIntervalClass"><span class="type">ClutterIntervalClass</span></a> contains only private data.
155 </p>
156 <div class="variablelist"><table border="0">
157 <col align="left" valign="top">
158 <tbody>
159 <tr>
160 <td><p><span class="term"><em class="structfield"><code><a name="ClutterIntervalClass.validate"></a>validate</code></em> ()</span></p></td>
161 <td>virtual function for validating an interval
162 using a <span class="type">GParamSpec</span>
163 </td>
164 </tr>
165 <tr>
166 <td><p><span class="term"><em class="structfield"><code><a name="ClutterIntervalClass.compute-value"></a>compute_value</code></em> ()</span></p></td>
167 <td>virtual function for computing the value
168 inside an interval using an adimensional factor between 0 and 1</td>
169 </tr>
170 </tbody>
171 </table></div>
172 <p class="since">Since 1.0</p>
173 </div>
174 <hr>
175 <div class="refsect2">
176 <a name="clutter-interval-new"></a><h3>clutter_interval_new ()</h3>
177 <pre class="programlisting"><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="returnvalue">ClutterInterval</span></a> *   clutter_interval_new                (<em class="parameter"><code><span class="type">GType</span> gtype</code></em>,
178                                                          <em class="parameter"><code>...</code></em>);</pre>
179 <p>
180 Creates a new <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> holding values of type <em class="parameter"><code>gtype</code></em>.
181 </p>
182 <p>
183 This function avoids using a <span class="type">GValue</span> for the initial and final values
184 of the interval:
185 </p>
186 <p>
187 </p>
188 <div class="informalexample">
189   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
190     <tbody>
191       <tr>
192         <td class="listing_lines" align="right"><pre>1
193 2
194 3</pre></td>
195         <td class="listing_code"><pre class="programlisting"><span class="normal">interval </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="clutter-Value-intervals.html#clutter-interval-new">clutter_interval_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">G_TYPE_FLOAT</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1.0</span><span class="symbol">);</span>
196 <span class="normal">interval </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="clutter-Value-intervals.html#clutter-interval-new">clutter_interval_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">G_TYPE_BOOLEAN</span><span class="symbol">,</span><span class="normal"> FALSE</span><span class="symbol">,</span><span class="normal"> TRUE</span><span class="symbol">);</span>
197 <span class="normal">interval </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="clutter-Value-intervals.html#clutter-interval-new">clutter_interval_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">G_TYPE_INT</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">360</span><span class="symbol">);</span></pre></td>
198       </tr>
199     </tbody>
200   </table>
201 </div>
202
203 <p>
204 </p>
205 <div class="variablelist"><table border="0">
206 <col align="left" valign="top">
207 <tbody>
208 <tr>
209 <td><p><span class="term"><em class="parameter"><code>gtype</code></em> :</span></p></td>
210 <td>the type of the values in the interval</td>
211 </tr>
212 <tr>
213 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
214 <td>the initial value and the final value of the interval</td>
215 </tr>
216 <tr>
217 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
218 <td>the newly created <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
219 </td>
220 </tr>
221 </tbody>
222 </table></div>
223 <p class="since">Since 1.0</p>
224 </div>
225 <hr>
226 <div class="refsect2">
227 <a name="clutter-interval-new-with-values"></a><h3>clutter_interval_new_with_values ()</h3>
228 <pre class="programlisting"><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="returnvalue">ClutterInterval</span></a> *   clutter_interval_new_with_values    (<em class="parameter"><code><span class="type">GType</span> gtype</code></em>,
229                                                          <em class="parameter"><code>const <span class="type">GValue</span> *initial</code></em>,
230                                                          <em class="parameter"><code>const <span class="type">GValue</span> *final</code></em>);</pre>
231 <p>
232 Creates a new <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> of type <em class="parameter"><code>gtype</code></em>, between <em class="parameter"><code>initial</code></em>
233 and <em class="parameter"><code>final</code></em>.
234 </p>
235 <p>
236 This function is useful for language bindings.
237 </p>
238 <div class="variablelist"><table border="0">
239 <col align="left" valign="top">
240 <tbody>
241 <tr>
242 <td><p><span class="term"><em class="parameter"><code>gtype</code></em> :</span></p></td>
243 <td>the type of the values in the interval</td>
244 </tr>
245 <tr>
246 <td><p><span class="term"><em class="parameter"><code>initial</code></em> :</span></p></td>
247 <td>a <span class="type">GValue</span> holding the initial value of the interval</td>
248 </tr>
249 <tr>
250 <td><p><span class="term"><em class="parameter"><code>final</code></em> :</span></p></td>
251 <td>a <span class="type">GValue</span> holding the final value of the interval</td>
252 </tr>
253 <tr>
254 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
255 <td>the newly created <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
256 </td>
257 </tr>
258 </tbody>
259 </table></div>
260 <p class="since">Since 1.0</p>
261 </div>
262 <hr>
263 <div class="refsect2">
264 <a name="clutter-interval-clone"></a><h3>clutter_interval_clone ()</h3>
265 <pre class="programlisting"><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="returnvalue">ClutterInterval</span></a> *   clutter_interval_clone              (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>);</pre>
266 <p>
267 Creates a copy of <em class="parameter"><code>interval</code></em>.
268 </p>
269 <div class="variablelist"><table border="0">
270 <col align="left" valign="top">
271 <tbody>
272 <tr>
273 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
274 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
275 </td>
276 </tr>
277 <tr>
278 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
279 <td>the newly created <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
280 </td>
281 </tr>
282 </tbody>
283 </table></div>
284 <p class="since">Since 1.0</p>
285 </div>
286 <hr>
287 <div class="refsect2">
288 <a name="clutter-interval-get-value-type"></a><h3>clutter_interval_get_value_type ()</h3>
289 <pre class="programlisting"><span class="returnvalue">GType</span>               clutter_interval_get_value_type     (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>);</pre>
290 <p>
291 Retrieves the <span class="type">GType</span> of the values inside <em class="parameter"><code>interval</code></em>.
292 </p>
293 <div class="variablelist"><table border="0">
294 <col align="left" valign="top">
295 <tbody>
296 <tr>
297 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
298 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
299 </td>
300 </tr>
301 <tr>
302 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
303 <td>the type of the value, or G_TYPE_INVALID</td>
304 </tr>
305 </tbody>
306 </table></div>
307 <p class="since">Since 1.0</p>
308 </div>
309 <hr>
310 <div class="refsect2">
311 <a name="clutter-interval-set-initial-value"></a><h3>clutter_interval_set_initial_value ()</h3>
312 <pre class="programlisting"><span class="returnvalue">void</span>                clutter_interval_set_initial_value  (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
313                                                          <em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);</pre>
314 <p>
315 Sets the initial value of <em class="parameter"><code>interval</code></em> to <em class="parameter"><code>value</code></em>. The value is copied
316 inside the <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>.
317 </p>
318 <p>
319 Rename to: clutter_interval_set_initial
320 </p>
321 <div class="variablelist"><table border="0">
322 <col align="left" valign="top">
323 <tbody>
324 <tr>
325 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
326 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
327 </td>
328 </tr>
329 <tr>
330 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
331 <td>a <span class="type">GValue</span>
332 </td>
333 </tr>
334 </tbody>
335 </table></div>
336 <p class="since">Since 1.0</p>
337 </div>
338 <hr>
339 <div class="refsect2">
340 <a name="clutter-interval-get-initial-value"></a><h3>clutter_interval_get_initial_value ()</h3>
341 <pre class="programlisting"><span class="returnvalue">void</span>                clutter_interval_get_initial_value  (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
342                                                          <em class="parameter"><code><span class="type">GValue</span> *value</code></em>);</pre>
343 <p>
344 Retrieves the initial value of <em class="parameter"><code>interval</code></em> and copies
345 it into <em class="parameter"><code>value</code></em>.
346 </p>
347 <p>
348 The passed <span class="type">GValue</span> must be initialized to the value held by
349 the <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>.
350 </p>
351 <div class="variablelist"><table border="0">
352 <col align="left" valign="top">
353 <tbody>
354 <tr>
355 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
356 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
357 </td>
358 </tr>
359 <tr>
360 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
361 <td>a <span class="type">GValue</span>. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
362 </td>
363 </tr>
364 </tbody>
365 </table></div>
366 <p class="since">Since 1.0</p>
367 </div>
368 <hr>
369 <div class="refsect2">
370 <a name="clutter-interval-peek-initial-value"></a><h3>clutter_interval_peek_initial_value ()</h3>
371 <pre class="programlisting"><span class="returnvalue">GValue</span> *            clutter_interval_peek_initial_value (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>);</pre>
372 <p>
373 Gets the pointer to the initial value of <em class="parameter"><code>interval</code></em>
374 </p>
375 <div class="variablelist"><table border="0">
376 <col align="left" valign="top">
377 <tbody>
378 <tr>
379 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
380 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
381 </td>
382 </tr>
383 <tr>
384 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
385 <td>the initial value of the interval.
386 The value is owned by the <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> and it should not be
387 modified or freed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
388 </td>
389 </tr>
390 </tbody>
391 </table></div>
392 <p class="since">Since 1.0</p>
393 </div>
394 <hr>
395 <div class="refsect2">
396 <a name="clutter-interval-set-final-value"></a><h3>clutter_interval_set_final_value ()</h3>
397 <pre class="programlisting"><span class="returnvalue">void</span>                clutter_interval_set_final_value    (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
398                                                          <em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);</pre>
399 <p>
400 Sets the final value of <em class="parameter"><code>interval</code></em> to <em class="parameter"><code>value</code></em>. The value is
401 copied inside the <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>.
402 </p>
403 <p>
404 Rename to: clutter_interval_set_final
405 </p>
406 <div class="variablelist"><table border="0">
407 <col align="left" valign="top">
408 <tbody>
409 <tr>
410 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
411 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
412 </td>
413 </tr>
414 <tr>
415 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
416 <td>a <span class="type">GValue</span>
417 </td>
418 </tr>
419 </tbody>
420 </table></div>
421 <p class="since">Since 1.0</p>
422 </div>
423 <hr>
424 <div class="refsect2">
425 <a name="clutter-interval-get-final-value"></a><h3>clutter_interval_get_final_value ()</h3>
426 <pre class="programlisting"><span class="returnvalue">void</span>                clutter_interval_get_final_value    (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
427                                                          <em class="parameter"><code><span class="type">GValue</span> *value</code></em>);</pre>
428 <p>
429 Retrieves the final value of <em class="parameter"><code>interval</code></em> and copies
430 it into <em class="parameter"><code>value</code></em>.
431 </p>
432 <p>
433 The passed <span class="type">GValue</span> must be initialized to the value held by
434 the <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>.
435 </p>
436 <div class="variablelist"><table border="0">
437 <col align="left" valign="top">
438 <tbody>
439 <tr>
440 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
441 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
442 </td>
443 </tr>
444 <tr>
445 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
446 <td>a <span class="type">GValue</span>. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
447 </td>
448 </tr>
449 </tbody>
450 </table></div>
451 <p class="since">Since 1.0</p>
452 </div>
453 <hr>
454 <div class="refsect2">
455 <a name="clutter-interval-peek-final-value"></a><h3>clutter_interval_peek_final_value ()</h3>
456 <pre class="programlisting"><span class="returnvalue">GValue</span> *            clutter_interval_peek_final_value   (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>);</pre>
457 <p>
458 Gets the pointer to the final value of <em class="parameter"><code>interval</code></em>
459 </p>
460 <div class="variablelist"><table border="0">
461 <col align="left" valign="top">
462 <tbody>
463 <tr>
464 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
465 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
466 </td>
467 </tr>
468 <tr>
469 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
470 <td>the final value of the interval.
471 The value is owned by the <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> and it should not be
472 modified or freed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
473 </td>
474 </tr>
475 </tbody>
476 </table></div>
477 <p class="since">Since 1.0</p>
478 </div>
479 <hr>
480 <div class="refsect2">
481 <a name="clutter-interval-set-interval"></a><h3>clutter_interval_set_interval ()</h3>
482 <pre class="programlisting"><span class="returnvalue">void</span>                clutter_interval_set_interval       (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
483                                                          <em class="parameter"><code>...</code></em>);</pre>
484 <p>
485 Variable arguments wrapper for <a class="link" href="clutter-Value-intervals.html#clutter-interval-set-initial-value" title="clutter_interval_set_initial_value ()"><code class="function">clutter_interval_set_initial_value()</code></a>
486 and <a class="link" href="clutter-Value-intervals.html#clutter-interval-set-final-value" title="clutter_interval_set_final_value ()"><code class="function">clutter_interval_set_final_value()</code></a> that avoids using the
487 <span class="type">GValue</span> arguments:
488 </p>
489 <p>
490 </p>
491 <div class="informalexample">
492   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
493     <tbody>
494       <tr>
495         <td class="listing_lines" align="right"><pre>1
496 2
497 3</pre></td>
498         <td class="listing_code"><pre class="programlisting"><span class="function"><a href="clutter-Value-intervals.html#clutter-interval-set-interval">clutter_interval_set_interval</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">interval</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">50</span><span class="symbol">);</span>
499 <span class="function"><a href="clutter-Value-intervals.html#clutter-interval-set-interval">clutter_interval_set_interval</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">interval</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.0</span><span class="symbol">);</span>
500 <span class="function"><a href="clutter-Value-intervals.html#clutter-interval-set-interval">clutter_interval_set_interval</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">interval</span><span class="symbol">,</span><span class="normal"> FALSE</span><span class="symbol">,</span><span class="normal"> TRUE</span><span class="symbol">);</span></pre></td>
501       </tr>
502     </tbody>
503   </table>
504 </div>
505
506 <p>
507 </p>
508 <p>
509 This function is meant for the convenience of the C API; bindings
510 should reimplement this function using the <span class="type">GValue-based</span> API.
511 </p>
512 <div class="variablelist"><table border="0">
513 <col align="left" valign="top">
514 <tbody>
515 <tr>
516 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
517 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
518 </td>
519 </tr>
520 <tr>
521 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
522 <td>the initial and final values of the interval</td>
523 </tr>
524 </tbody>
525 </table></div>
526 <p class="since">Since 1.0</p>
527 </div>
528 <hr>
529 <div class="refsect2">
530 <a name="clutter-interval-get-interval"></a><h3>clutter_interval_get_interval ()</h3>
531 <pre class="programlisting"><span class="returnvalue">void</span>                clutter_interval_get_interval       (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
532                                                          <em class="parameter"><code>...</code></em>);</pre>
533 <p>
534 Variable arguments wrapper for <a class="link" href="clutter-Value-intervals.html#clutter-interval-get-initial-value" title="clutter_interval_get_initial_value ()"><code class="function">clutter_interval_get_initial_value()</code></a>
535 and <a class="link" href="clutter-Value-intervals.html#clutter-interval-get-final-value" title="clutter_interval_get_final_value ()"><code class="function">clutter_interval_get_final_value()</code></a> that avoids using the
536 <span class="type">GValue</span> arguments:
537 </p>
538 <p>
539 </p>
540 <div class="informalexample">
541   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
542     <tbody>
543       <tr>
544         <td class="listing_lines" align="right"><pre>1
545 2</pre></td>
546         <td class="listing_code"><pre class="programlisting"><span class="usertype">gint</span><span class="normal"> a </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> b </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
547 <span class="function"><a href="clutter-Value-intervals.html#clutter-interval-get-interval">clutter_interval_get_interval</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">interval</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">a</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">b</span><span class="symbol">);</span></pre></td>
548       </tr>
549     </tbody>
550   </table>
551 </div>
552
553 <p>
554 </p>
555 <p>
556 This function is meant for the convenience of the C API; bindings
557 should reimplement this function using the <span class="type">GValue-based</span> API.
558 </p>
559 <div class="variablelist"><table border="0">
560 <col align="left" valign="top">
561 <tbody>
562 <tr>
563 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
564 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
565 </td>
566 </tr>
567 <tr>
568 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
569 <td>return locations for the initial and final values of
570 the interval</td>
571 </tr>
572 </tbody>
573 </table></div>
574 <p class="since">Since 1.0</p>
575 </div>
576 <hr>
577 <div class="refsect2">
578 <a name="clutter-interval-set-initial"></a><h3>clutter_interval_set_initial ()</h3>
579 <pre class="programlisting"><span class="returnvalue">void</span>                clutter_interval_set_initial        (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
580                                                          <em class="parameter"><code>...</code></em>);</pre>
581 <p>
582 Variadic arguments version of <a class="link" href="clutter-Value-intervals.html#clutter-interval-set-initial-value" title="clutter_interval_set_initial_value ()"><code class="function">clutter_interval_set_initial_value()</code></a>.
583 </p>
584 <p>
585 This function is meant as a convenience for the C API.
586 </p>
587 <p>
588 Language bindings should use <a class="link" href="clutter-Value-intervals.html#clutter-interval-set-initial-value" title="clutter_interval_set_initial_value ()"><code class="function">clutter_interval_set_initial_value()</code></a>
589 instead.
590 </p>
591 <div class="variablelist"><table border="0">
592 <col align="left" valign="top">
593 <tbody>
594 <tr>
595 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
596 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
597 </td>
598 </tr>
599 <tr>
600 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
601 <td>the initial value of the interval.</td>
602 </tr>
603 </tbody>
604 </table></div>
605 <p class="since">Since 1.10</p>
606 </div>
607 <hr>
608 <div class="refsect2">
609 <a name="clutter-interval-set-final"></a><h3>clutter_interval_set_final ()</h3>
610 <pre class="programlisting"><span class="returnvalue">void</span>                clutter_interval_set_final          (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
611                                                          <em class="parameter"><code>...</code></em>);</pre>
612 <p>
613 Variadic arguments version of <a class="link" href="clutter-Value-intervals.html#clutter-interval-set-final-value" title="clutter_interval_set_final_value ()"><code class="function">clutter_interval_set_final_value()</code></a>.
614 </p>
615 <p>
616 This function is meant as a convenience for the C API.
617 </p>
618 <p>
619 Language bindings should use <a class="link" href="clutter-Value-intervals.html#clutter-interval-set-final-value" title="clutter_interval_set_final_value ()"><code class="function">clutter_interval_set_final_value()</code></a> instead.
620 </p>
621 <div class="variablelist"><table border="0">
622 <col align="left" valign="top">
623 <tbody>
624 <tr>
625 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
626 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
627 </td>
628 </tr>
629 <tr>
630 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
631 <td>the final value of the interval</td>
632 </tr>
633 </tbody>
634 </table></div>
635 <p class="since">Since 1.10</p>
636 </div>
637 <hr>
638 <div class="refsect2">
639 <a name="clutter-interval-validate"></a><h3>clutter_interval_validate ()</h3>
640 <pre class="programlisting"><span class="returnvalue">gboolean</span>            clutter_interval_validate           (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
641                                                          <em class="parameter"><code><span class="type">GParamSpec</span> *pspec</code></em>);</pre>
642 <p>
643 Validates the initial and final values of <em class="parameter"><code>interval</code></em> against
644 a <span class="type">GParamSpec</span>.
645 </p>
646 <div class="variablelist"><table border="0">
647 <col align="left" valign="top">
648 <tbody>
649 <tr>
650 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
651 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
652 </td>
653 </tr>
654 <tr>
655 <td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
656 <td>a <span class="type">GParamSpec</span>
657 </td>
658 </tr>
659 <tr>
660 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
661 <td>
662 <code class="literal">TRUE</code> if the <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> is valid, <code class="literal">FALSE</code> otherwise</td>
663 </tr>
664 </tbody>
665 </table></div>
666 <p class="since">Since 1.0</p>
667 </div>
668 <hr>
669 <div class="refsect2">
670 <a name="clutter-interval-compute-value"></a><h3>clutter_interval_compute_value ()</h3>
671 <pre class="programlisting"><span class="returnvalue">gboolean</span>            clutter_interval_compute_value      (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
672                                                          <em class="parameter"><code><span class="type">gdouble</span> factor</code></em>,
673                                                          <em class="parameter"><code><span class="type">GValue</span> *value</code></em>);</pre>
674 <p>
675 Computes the value between the <em class="parameter"><code>interval</code></em> boundaries given the
676 progress <em class="parameter"><code>factor</code></em> and copies it into <em class="parameter"><code>value</code></em>.
677 </p>
678 <div class="variablelist"><table border="0">
679 <col align="left" valign="top">
680 <tbody>
681 <tr>
682 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
683 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
684 </td>
685 </tr>
686 <tr>
687 <td><p><span class="term"><em class="parameter"><code>factor</code></em> :</span></p></td>
688 <td>the progress factor, between 0 and 1</td>
689 </tr>
690 <tr>
691 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
692 <td>return location for an initialized <span class="type">GValue</span>. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
693 </td>
694 </tr>
695 <tr>
696 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
697 <td>
698 <code class="literal">TRUE</code> if the operation was successful</td>
699 </tr>
700 </tbody>
701 </table></div>
702 <p class="since">Since 1.0</p>
703 </div>
704 <hr>
705 <div class="refsect2">
706 <a name="clutter-interval-compute"></a><h3>clutter_interval_compute ()</h3>
707 <pre class="programlisting">const <span class="returnvalue">GValue</span> *      clutter_interval_compute            (<em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> *interval</code></em>,
708                                                          <em class="parameter"><code><span class="type">gdouble</span> factor</code></em>);</pre>
709 <p>
710 Computes the value between the <em class="parameter"><code>interval</code></em> boundaries given the
711 progress <em class="parameter"><code>factor</code></em>
712 </p>
713 <p>
714 Unlike <a class="link" href="clutter-Value-intervals.html#clutter-interval-compute-value" title="clutter_interval_compute_value ()"><code class="function">clutter_interval_compute_value()</code></a>, this function will
715 return a const pointer to the computed value
716 </p>
717 <p>
718 You should use this function if you immediately pass the computed
719 value to another function that makes a copy of it, like
720 <code class="function">g_object_set_property()</code>
721 </p>
722 <div class="variablelist"><table border="0">
723 <col align="left" valign="top">
724 <tbody>
725 <tr>
726 <td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td>
727 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a>
728 </td>
729 </tr>
730 <tr>
731 <td><p><span class="term"><em class="parameter"><code>factor</code></em> :</span></p></td>
732 <td>the progress factor, between 0 and 1</td>
733 </tr>
734 <tr>
735 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
736 <td>a pointer to the computed value,
737 or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if the computation was not successfull. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
738 </td>
739 </tr>
740 </tbody>
741 </table></div>
742 <p class="since">Since 1.4</p>
743 </div>
744 <hr>
745 <div class="refsect2">
746 <a name="ClutterProgressFunc"></a><h3>ClutterProgressFunc ()</h3>
747 <pre class="programlisting"><span class="returnvalue">gboolean</span>            (*ClutterProgressFunc)              (<em class="parameter"><code>const <span class="type">GValue</span> *a</code></em>,
748                                                          <em class="parameter"><code>const <span class="type">GValue</span> *b</code></em>,
749                                                          <em class="parameter"><code><span class="type">gdouble</span> progress</code></em>,
750                                                          <em class="parameter"><code><span class="type">GValue</span> *retval</code></em>);</pre>
751 <p>
752 Prototype of the progress function used to compute the value
753 between the two ends <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em> of an interval depending on
754 the value of <em class="parameter"><code>progress</code></em>.
755 </p>
756 <p>
757 The <span class="type">GValue</span> in <em class="parameter"><code>retval</code></em> is already initialized with the same
758 type as <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em>.
759 </p>
760 <p>
761 This function will be called by <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> if the
762 type of the values of the interval was registered using
763 <a class="link" href="clutter-Value-intervals.html#clutter-interval-register-progress-func" title="clutter_interval_register_progress_func ()"><code class="function">clutter_interval_register_progress_func()</code></a>.
764 </p>
765 <div class="variablelist"><table border="0">
766 <col align="left" valign="top">
767 <tbody>
768 <tr>
769 <td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
770 <td>the initial value of an interval</td>
771 </tr>
772 <tr>
773 <td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
774 <td>the final value of an interval</td>
775 </tr>
776 <tr>
777 <td><p><span class="term"><em class="parameter"><code>progress</code></em> :</span></p></td>
778 <td>the progress factor, between 0 and 1</td>
779 </tr>
780 <tr>
781 <td><p><span class="term"><em class="parameter"><code>retval</code></em> :</span></p></td>
782 <td>the value used to store the progress</td>
783 </tr>
784 <tr>
785 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
786 <td>
787 <code class="literal">TRUE</code> if the function successfully computed
788 the value and stored it inside <em class="parameter"><code>retval</code></em>
789 </td>
790 </tr>
791 </tbody>
792 </table></div>
793 <p class="since">Since 1.0</p>
794 </div>
795 <hr>
796 <div class="refsect2">
797 <a name="clutter-interval-register-progress-func"></a><h3>clutter_interval_register_progress_func ()</h3>
798 <pre class="programlisting"><span class="returnvalue">void</span>                clutter_interval_register_progress_func
799                                                         (<em class="parameter"><code><span class="type">GType</span> value_type</code></em>,
800                                                          <em class="parameter"><code><a class="link" href="clutter-Value-intervals.html#ClutterProgressFunc" title="ClutterProgressFunc ()"><span class="type">ClutterProgressFunc</span></a> func</code></em>);</pre>
801 <p>
802 Sets the progress function for a given <em class="parameter"><code>value_type</code></em>, like:
803 </p>
804 <p>
805 </p>
806 <div class="informalexample">
807   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
808     <tbody>
809       <tr>
810         <td class="listing_lines" align="right"><pre>1
811 2</pre></td>
812         <td class="listing_code"><pre class="programlisting"><span class="function"><a href="clutter-Value-intervals.html#clutter-interval-register-progress-func">clutter_interval_register_progress_func</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">MY_TYPE_FOO</span><span class="symbol">,</span>
813 <span class="normal">                                         my_foo_progress</span><span class="symbol">);</span></pre></td>
814       </tr>
815     </tbody>
816   </table>
817 </div>
818
819 <p>
820 </p>
821 <p>
822 Whenever a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> instance using the default
823 <span class="type">"compute_value"</span> implementation is set as an
824 interval between two <span class="type">GValue</span> of type <em class="parameter"><code>value_type</code></em>, it will call
825 <em class="parameter"><code>func</code></em> to establish the value depending on the given progress,
826 for instance:
827 </p>
828 <p>
829 </p>
830 <div class="informalexample">
831   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
832     <tbody>
833       <tr>
834         <td class="listing_lines" align="right"><pre>1
835 2
836 3
837 4
838 5
839 6
840 7
841 8
842 9
843 10
844 11
845 12
846 13
847 14
848 15
849 16</pre></td>
850         <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> gboolean</span>
851 <span class="function">my_int_progress</span><span class="normal"> </span><span class="symbol">(</span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">GValue</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">a</span><span class="symbol">,</span>
852 <span class="normal">                 </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">GValue</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">b</span><span class="symbol">,</span>
853 <span class="normal">                 </span><span class="usertype">gdouble</span><span class="normal">       progress</span><span class="symbol">,</span>
854 <span class="normal">                 </span><span class="usertype">GValue</span><span class="normal">       </span><span class="symbol">*</span><span class="normal">retval</span><span class="symbol">)</span>
855 <span class="cbracket">{</span>
856 <span class="normal">  </span><span class="usertype">gint</span><span class="normal"> ia </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_value_get_int</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">a</span><span class="symbol">);</span>
857 <span class="normal">  </span><span class="usertype">gint</span><span class="normal"> ib </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_value_get_int</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">b</span><span class="symbol">);</span>
858 <span class="normal">  </span><span class="usertype">gint</span><span class="normal"> res </span><span class="symbol">=</span><span class="normal"> factor </span><span class="symbol">*</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">ib </span><span class="symbol">-</span><span class="normal"> ia</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">+</span><span class="normal"> ia</span><span class="symbol">;</span>
859
860 <span class="normal">  </span><span class="function">g_value_set_int</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">retval</span><span class="symbol">,</span><span class="normal"> res</span><span class="symbol">);</span>
861
862 <span class="normal">  </span><span class="keyword">return</span><span class="normal"> TRUE</span><span class="symbol">;</span>
863 <span class="cbracket">}</span>
864
865 <span class="function"><a href="clutter-Value-intervals.html#clutter-interval-register-progress-func">clutter_interval_register_progress_func</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">G_TYPE_INT</span><span class="symbol">,</span><span class="normal"> my_int_progress</span><span class="symbol">);</span></pre></td>
866       </tr>
867     </tbody>
868   </table>
869 </div>
870
871 <p>
872 </p>
873 <p>
874 To unset a previously set progress function of a <span class="type">GType</span>, pass <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
875 for <em class="parameter"><code>func</code></em>.
876 </p>
877 <div class="variablelist"><table border="0">
878 <col align="left" valign="top">
879 <tbody>
880 <tr>
881 <td><p><span class="term"><em class="parameter"><code>value_type</code></em> :</span></p></td>
882 <td>a <span class="type">GType</span>
883 </td>
884 </tr>
885 <tr>
886 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
887 <td>a <a class="link" href="clutter-Value-intervals.html#ClutterProgressFunc" title="ClutterProgressFunc ()"><span class="type">ClutterProgressFunc</span></a>, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> to unset a previously
888 set progress function</td>
889 </tr>
890 </tbody>
891 </table></div>
892 <p class="since">Since 1.0</p>
893 </div>
894 </div>
895 <div class="refsect1">
896 <a name="clutter-Value-intervals.property-details"></a><h2>Property Details</h2>
897 <div class="refsect2">
898 <a name="ClutterInterval--value-type"></a><h3>The <code class="literal">"value-type"</code> property</h3>
899 <pre class="programlisting">  "value-type"               <span class="type">GType</span>*                : Read / Write / Construct Only</pre>
900 <p>
901 The type of the values in the interval.
902 </p>
903 <p>Allowed values: void</p>
904 <p class="since">Since 1.0</p>
905 </div>
906 </div>
907 </div>
908 <div class="footer">
909 <hr>
910           Generated by GTK-Doc V1.18.1</div>
911 </body>
912 </html>