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>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">
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="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>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#clutter-Value-intervals.synopsis" class="shortcut">Top</a>
26 <a href="#clutter-Value-intervals.description" class="shortcut">Description</a>
28 <a href="#clutter-Value-intervals.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#clutter-Value-intervals.properties" class="shortcut">Properties</a>
33 <div class="refentry">
34 <a name="clutter-Value-intervals"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
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>
40 <td valign="top" align="right"></td>
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><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> 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><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> gtype</code></em>,
49 <em class="parameter"><code>const <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *initial</code></em>,
50 <em class="parameter"><code>const <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *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 <a href="../gobject/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> <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 <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *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><a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);
57 <a href="../gobject/gobject-Generic-values.html#GValue"><span class="returnvalue">GValue</span></a> * <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 <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *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><a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);
62 <a href="../gobject/gobject-Generic-values.html#GValue"><span class="returnvalue">GValue</span></a> * <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>);
72 <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <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><a href="../gobject/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);
74 <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <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><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> factor</code></em>,
76 <em class="parameter"><code><a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);
77 const <a href="../gobject/gobject-Generic-values.html#GValue"><span class="returnvalue">GValue</span></a> * <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><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> factor</code></em>);
80 <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (<a class="link" href="clutter-Value-intervals.html#ClutterProgressFunc" title="ClutterProgressFunc ()">*ClutterProgressFunc</a>) (<em class="parameter"><code>const <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *a</code></em>,
81 <em class="parameter"><code>const <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *b</code></em>,
82 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> progress</code></em>,
83 <em class="parameter"><code><a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *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><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> 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>);
89 <div class="refsect1">
90 <a name="clutter-Value-intervals.object-hierarchy"></a><h2>Object Hierarchy</h2>
91 <pre class="synopsis">
92 <a href="../gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
93 +----<a href="../gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
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>" <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a>* : Read / Write / Construct Only
103 <div class="refsect1">
104 <a name="clutter-Value-intervals.description"></a><h2>Description</h2>
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 <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>.
111 Once a <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> for a specific <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> 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.
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 <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref-sink"><code class="function">g_object_ref_sink()</code></a>.
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.
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.
128 <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> is available since Clutter 1.0
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>
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.
140 <p class="since">Since 1.0</p>
143 <div class="refsect2">
144 <a name="ClutterIntervalClass"></a><h3>struct ClutterIntervalClass</h3>
145 <pre class="programlisting">struct ClutterIntervalClass {
146 gboolean (* validate) (ClutterInterval *interval,
148 gboolean (* compute_value) (ClutterInterval *interval,
154 The <a class="link" href="clutter-Value-intervals.html#ClutterIntervalClass" title="struct ClutterIntervalClass"><span class="type">ClutterIntervalClass</span></a> contains only private data.
156 <div class="variablelist"><table border="0">
157 <col align="left" valign="top">
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 <a href="../gobject/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a>
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>
172 <p class="since">Since 1.0</p>
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><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> gtype</code></em>,
178 <em class="parameter"><code>...</code></em>);</pre>
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>.
183 This function avoids using a <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> for the initial and final values
188 <div class="informalexample">
189 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
192 <td class="listing_lines" align="right"><pre>1
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"><a href="../gobject/gobject-Type-Information.html#G-TYPE-FLOAT:CAPS">G_TYPE_FLOAT</a></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"><a href="../gobject/gobject-Type-Information.html#G-TYPE-BOOLEAN:CAPS">G_TYPE_BOOLEAN</a></span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></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"><a href="../gobject/gobject-Type-Information.html#G-TYPE-INT:CAPS">G_TYPE_INT</a></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>
205 <div class="variablelist"><table border="0">
206 <col align="left" valign="top">
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>
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>
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>
223 <p class="since">Since 1.0</p>
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><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> gtype</code></em>,
229 <em class="parameter"><code>const <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *initial</code></em>,
230 <em class="parameter"><code>const <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *final</code></em>);</pre>
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>.
236 This function is useful for language bindings.
238 <div class="variablelist"><table border="0">
239 <col align="left" valign="top">
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>
246 <td><p><span class="term"><em class="parameter"><code>initial</code></em> :</span></p></td>
247 <td>a <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> holding the initial value of the interval</td>
250 <td><p><span class="term"><em class="parameter"><code>final</code></em> :</span></p></td>
251 <td>a <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> holding the final value of the interval</td>
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>
260 <p class="since">Since 1.0</p>
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>
267 Creates a copy of <em class="parameter"><code>interval</code></em>.
269 <div class="variablelist"><table border="0">
270 <col align="left" valign="top">
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>
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>
284 <p class="since">Since 1.0</p>
287 <div class="refsect2">
288 <a name="clutter-interval-get-value-type"></a><h3>clutter_interval_get_value_type ()</h3>
289 <pre class="programlisting"><a href="../gobject/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> 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>
291 Retrieves the <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the values inside <em class="parameter"><code>interval</code></em>.
293 <div class="variablelist"><table border="0">
294 <col align="left" valign="top">
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>
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>
307 <p class="since">Since 1.0</p>
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 <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
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>.
319 Rename to: clutter_interval_set_initial
321 <div class="variablelist"><table border="0">
322 <col align="left" valign="top">
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>
330 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
331 <td>a <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>
336 <p class="since">Since 1.0</p>
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><a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
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>.
348 The passed <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> 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>.
351 <div class="variablelist"><table border="0">
352 <col align="left" valign="top">
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>
360 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
361 <td>a <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
366 <p class="since">Since 1.0</p>
369 <div class="refsect2">
370 <a name="clutter-interval-peek-initial-value"></a><h3>clutter_interval_peek_initial_value ()</h3>
371 <pre class="programlisting"><a href="../gobject/gobject-Generic-values.html#GValue"><span class="returnvalue">GValue</span></a> * 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>
373 Gets the pointer to the initial value of <em class="parameter"><code>interval</code></em>
375 <div class="variablelist"><table border="0">
376 <col align="left" valign="top">
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>
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>
392 <p class="since">Since 1.0</p>
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 <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
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>.
404 Rename to: clutter_interval_set_final
406 <div class="variablelist"><table border="0">
407 <col align="left" valign="top">
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>
415 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
416 <td>a <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>
421 <p class="since">Since 1.0</p>
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><a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
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>.
433 The passed <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> 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>.
436 <div class="variablelist"><table border="0">
437 <col align="left" valign="top">
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>
445 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
446 <td>a <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
451 <p class="since">Since 1.0</p>
454 <div class="refsect2">
455 <a name="clutter-interval-peek-final-value"></a><h3>clutter_interval_peek_final_value ()</h3>
456 <pre class="programlisting"><a href="../gobject/gobject-Generic-values.html#GValue"><span class="returnvalue">GValue</span></a> * 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>
458 Gets the pointer to the final value of <em class="parameter"><code>interval</code></em>
460 <div class="variablelist"><table border="0">
461 <col align="left" valign="top">
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>
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>
477 <p class="since">Since 1.0</p>
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>
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 <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> arguments:
491 <div class="informalexample">
492 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
495 <td class="listing_lines" align="right"><pre>1
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"> <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">);</span></pre></td>
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.
512 <div class="variablelist"><table border="0">
513 <col align="left" valign="top">
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>
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>
526 <p class="since">Since 1.0</p>
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>
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 <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> arguments:
540 <div class="informalexample">
541 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
544 <td class="listing_lines" align="right"><pre>1
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">&</span><span class="normal">a</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">b</span><span class="symbol">);</span></pre></td>
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.
559 <div class="variablelist"><table border="0">
560 <col align="left" valign="top">
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>
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
574 <p class="since">Since 1.0</p>
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>
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>.
585 This function is meant as a convenience for the C API.
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>
591 <div class="variablelist"><table border="0">
592 <col align="left" valign="top">
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>
600 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
601 <td>the initial value of the interval.</td>
605 <p class="since">Since 1.10</p>
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>
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>.
616 This function is meant as a convenience for the C API.
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.
621 <div class="variablelist"><table border="0">
622 <col align="left" valign="top">
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>
630 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
631 <td>the final value of the interval</td>
635 <p class="since">Since 1.10</p>
638 <div class="refsect2">
639 <a name="clutter-interval-validate"></a><h3>clutter_interval_validate ()</h3>
640 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 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><a href="../gobject/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);</pre>
643 Validates the initial and final values of <em class="parameter"><code>interval</code></em> against
644 a <a href="../gobject/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a>.
646 <div class="variablelist"><table border="0">
647 <col align="left" valign="top">
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>
655 <td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
656 <td>a <a href="../gobject/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a>
660 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
662 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a class="link" href="clutter-Value-intervals.html#ClutterInterval"><span class="type">ClutterInterval</span></a> is valid, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
666 <p class="since">Since 1.0</p>
669 <div class="refsect2">
670 <a name="clutter-interval-compute-value"></a><h3>clutter_interval_compute_value ()</h3>
671 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 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><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> factor</code></em>,
673 <em class="parameter"><code><a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
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>.
678 <div class="variablelist"><table border="0">
679 <col align="left" valign="top">
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>
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>
691 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
692 <td>return location for an initialized <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
696 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
698 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation was successful</td>
702 <p class="since">Since 1.0</p>
705 <div class="refsect2">
706 <a name="clutter-interval-compute"></a><h3>clutter_interval_compute ()</h3>
707 <pre class="programlisting">const <a href="../gobject/gobject-Generic-values.html#GValue"><span class="returnvalue">GValue</span></a> * 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><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> factor</code></em>);</pre>
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>
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
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 <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-set-property"><code class="function">g_object_set_property()</code></a>
722 <div class="variablelist"><table border="0">
723 <col align="left" valign="top">
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>
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>
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>
742 <p class="since">Since 1.4</p>
745 <div class="refsect2">
746 <a name="ClutterProgressFunc"></a><h3>ClutterProgressFunc ()</h3>
747 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (*ClutterProgressFunc) (<em class="parameter"><code>const <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *a</code></em>,
748 <em class="parameter"><code>const <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *b</code></em>,
749 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> progress</code></em>,
750 <em class="parameter"><code><a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *retval</code></em>);</pre>
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>.
757 The <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> 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>.
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>.
765 <div class="variablelist"><table border="0">
766 <col align="left" valign="top">
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>
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>
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>
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>
785 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
787 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the function successfully computed
788 the value and stored it inside <em class="parameter"><code>retval</code></em>
793 <p class="since">Since 1.0</p>
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><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> 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>
802 Sets the progress function for a given <em class="parameter"><code>value_type</code></em>, like:
806 <div class="informalexample">
807 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
810 <td class="listing_lines" align="right"><pre>1
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>
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 <a href="../gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> 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,
830 <div class="informalexample">
831 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
834 <td class="listing_lines" align="right"><pre>1
850 <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gboolean">gboolean</a></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"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-get-int">g_value_get_int</a></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"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-get-int">g_value_get_int</a></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>
860 <span class="normal"> </span><span class="function"><a href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-set-int">g_value_set_int</a></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>
862 <span class="normal"> </span><span class="keyword">return</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">;</span>
863 <span class="cbracket">}</span>
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"><a href="../gobject/gobject-Type-Information.html#G-TYPE-INT:CAPS">G_TYPE_INT</a></span><span class="symbol">,</span><span class="normal"> my_int_progress</span><span class="symbol">);</span></pre></td>
874 To unset a previously set progress function of a <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a>, 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>.
877 <div class="variablelist"><table border="0">
878 <col align="left" valign="top">
881 <td><p><span class="term"><em class="parameter"><code>value_type</code></em> :</span></p></td>
882 <td>a <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a>
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>
892 <p class="since">Since 1.0</p>
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" <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a>* : Read / Write / Construct Only</pre>
901 The type of the values in the interval.
903 <p>Allowed values: void</p>
904 <p class="since">Since 1.0</p>
910 Generated by GTK-Doc V1.18.1</div>