Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ClutterPathConstraint: Clutter Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Clutter Reference Manual">
<link rel="up" href="ch05.html" title="Constraints">
<link rel="prev" href="ClutterBindConstraint.html" title="ClutterBindConstraint">
<link rel="next" href="ClutterSnapConstraint.html" title="ClutterSnapConstraint">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#ClutterPathConstraint.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#ClutterPathConstraint.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#ClutterPathConstraint.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
                  <a href="#ClutterPathConstraint.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch05.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ClutterBindConstraint.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ClutterSnapConstraint.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="ClutterPathConstraint"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ClutterPathConstraint.top_of_page"></a>ClutterPathConstraint</span></h2>
<p>ClutterPathConstraint — A constraint that follows a path</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="ClutterPathConstraint.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="ClutterConstraint.html" title="ClutterConstraint"><span class="returnvalue">ClutterConstraint</span></a> *
</td>
<td class="function_name">
<a class="link" href="ClutterPathConstraint.html#clutter-path-constraint-new" title="clutter_path_constraint_new ()">clutter_path_constraint_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="ClutterPathConstraint.html#clutter-path-constraint-set-path" title="clutter_path_constraint_set_path ()">clutter_path_constraint_set_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="ClutterPath.html" title="ClutterPath"><span class="returnvalue">ClutterPath</span></a> *
</td>
<td class="function_name">
<a class="link" href="ClutterPathConstraint.html#clutter-path-constraint-get-path" title="clutter_path_constraint_get_path ()">clutter_path_constraint_get_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="ClutterPathConstraint.html#clutter-path-constraint-set-offset" title="clutter_path_constraint_set_offset ()">clutter_path_constraint_set_offset</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gfloat</span>
</td>
<td class="function_name">
<a class="link" href="ClutterPathConstraint.html#clutter-path-constraint-get-offset" title="clutter_path_constraint_get_offset ()">clutter_path_constraint_get_offset</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterPathConstraint.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><span class="type">gfloat</span></td>
<td class="property_name"><a class="link" href="ClutterPathConstraint.html#ClutterPathConstraint--offset" title="The “offset” property">offset</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a> *</td>
<td class="property_name"><a class="link" href="ClutterPathConstraint.html#ClutterPathConstraint--path" title="The “path” property">path</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterPathConstraint.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="ClutterPathConstraint.html#ClutterPathConstraint-node-reached" title="The “node-reached” signal">node-reached</a></td>
<td class="signal_flags">Run Last</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterPathConstraint.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="ClutterPathConstraint.html#ClutterPathConstraint-struct" title="ClutterPathConstraint">ClutterPathConstraint</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterPathConstraint.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> GInitiallyUnowned
        <span class="lineart">╰──</span> <a class="link" href="ClutterActorMeta.html" title="ClutterActorMeta">ClutterActorMeta</a>
            <span class="lineart">╰──</span> <a class="link" href="ClutterConstraint.html" title="ClutterConstraint">ClutterConstraint</a>
                <span class="lineart">╰──</span> ClutterPathConstraint
</pre>
</div>
<div class="refsect1">
<a name="ClutterPathConstraint.description"></a><h2>Description</h2>
<p><a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a> is a simple constraint that modifies the allocation
of the <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> to which it has been applied using a <a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a>.</p>
<p>By setting the <a class="link" href="ClutterPathConstraint.html#ClutterPathConstraint--offset" title="The “offset” property"><span class="type">“offset”</span></a> property it is possible to
control how far along the path the <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> should be.</p>
<p>ClutterPathConstraint is available since Clutter 1.6.</p>
</div>
<div class="refsect1">
<a name="ClutterPathConstraint.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="clutter-path-constraint-new"></a><h3>clutter_path_constraint_new ()</h3>
<pre class="programlisting"><a class="link" href="ClutterConstraint.html" title="ClutterConstraint"><span class="returnvalue">ClutterConstraint</span></a> *
clutter_path_constraint_new (<em class="parameter"><code><a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a> *path</code></em>,
                             <em class="parameter"><code><span class="type">gfloat</span> offset</code></em>);</pre>
<p>Creates a new <a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a> with the given <em class="parameter"><code>path</code></em>
 and <em class="parameter"><code>offset</code></em>
</p>
<div class="refsect3">
<a name="clutter-path-constraint-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p> a <a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a>, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>the offset along the <a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-path-constraint-new.returns"></a><h4>Returns</h4>
<p> the newly created <a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a></p>
</div>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-path-constraint-set-path"></a><h3>clutter_path_constraint_set_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_path_constraint_set_path (<em class="parameter"><code><a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a> *constraint</code></em>,
                                  <em class="parameter"><code><a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a> *path</code></em>);</pre>
<p>Sets the <em class="parameter"><code>path</code></em>
 to be followed by the <a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a>.</p>
<p>The <em class="parameter"><code>constraint</code></em>
 will take ownership of the <a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a> passed to this
function.</p>
<div class="refsect3">
<a name="clutter-path-constraint-set-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>constraint</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p> a <a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-path-constraint-get-path"></a><h3>clutter_path_constraint_get_path ()</h3>
<pre class="programlisting"><a class="link" href="ClutterPath.html" title="ClutterPath"><span class="returnvalue">ClutterPath</span></a> *
clutter_path_constraint_get_path (<em class="parameter"><code><a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a> *constraint</code></em>);</pre>
<p>Retrieves a pointer to the <a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a> used by <em class="parameter"><code>constraint</code></em>
.</p>
<div class="refsect3">
<a name="clutter-path-constraint-get-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>constraint</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-path-constraint-get-path.returns"></a><h4>Returns</h4>
<p> the <a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a> used by the
<a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a>, or <code class="literal">NULL</code>. The returned <a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a> is owned
by the constraint and it should not be unreferenced. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-path-constraint-set-offset"></a><h3>clutter_path_constraint_set_offset ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_path_constraint_set_offset (<em class="parameter"><code><a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a> *constraint</code></em>,
                                    <em class="parameter"><code><span class="type">gfloat</span> offset</code></em>);</pre>
<p>Sets the offset along the <a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a> used by <em class="parameter"><code>constraint</code></em>
.</p>
<div class="refsect3">
<a name="clutter-path-constraint-set-offset.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>constraint</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>the offset along the path</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-path-constraint-get-offset"></a><h3>clutter_path_constraint_get_offset ()</h3>
<pre class="programlisting"><span class="returnvalue">gfloat</span>
clutter_path_constraint_get_offset (<em class="parameter"><code><a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a> *constraint</code></em>);</pre>
<p>Retrieves the offset along the <a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a> used by <em class="parameter"><code>constraint</code></em>
.</p>
<div class="refsect3">
<a name="clutter-path-constraint-get-offset.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>constraint</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-path-constraint-get-offset.returns"></a><h4>Returns</h4>
<p> the offset</p>
</div>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
</div>
<div class="refsect1">
<a name="ClutterPathConstraint.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="ClutterPathConstraint-struct"></a><h3>ClutterPathConstraint</h3>
<pre class="programlisting">typedef struct _ClutterPathConstraint ClutterPathConstraint;</pre>
<p><a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a> is an opaque structure
whose members cannot be directly accessed</p>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
</div>
<div class="refsect1">
<a name="ClutterPathConstraint.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="ClutterPathConstraint--offset"></a><h3>The <code class="literal">“offset”</code> property</h3>
<pre class="programlisting">  “offset”                   <span class="type">gfloat</span></pre>
<p>The offset along the <a class="link" href="ClutterPathConstraint.html#ClutterPathConstraint--path" title="The “path” property"><span class="type">“path”</span></a>, between -1.0 and 2.0.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: [-1,2]</p>
<p>Default value: 0</p>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterPathConstraint--path"></a><h3>The <code class="literal">“path”</code> property</h3>
<pre class="programlisting">  “path”                     <a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a> *</pre>
<p>The <a class="link" href="ClutterPath.html" title="ClutterPath"><span class="type">ClutterPath</span></a> used to constrain the position of an actor.</p>
<p>Flags: Read / Write</p>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
</div>
<div class="refsect1">
<a name="ClutterPathConstraint.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="ClutterPathConstraint-node-reached"></a><h3>The <code class="literal">“node-reached”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a> *constraint,
               <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a>          *actor,
               <span class="type">guint</span>                  index,
               <span class="type">gpointer</span>               user_data)</pre>
<p>The ::node-reached signal is emitted each time a
<a class="link" href="ClutterPathConstraint.html#ClutterPathConstraint--offset" title="The “offset” property"><span class="type">“offset”</span></a> value results in the actor
passing a <a class="link" href="ClutterPath.html#ClutterPathNode"><span class="type">ClutterPathNode</span></a></p>
<div class="refsect3">
<a name="ClutterPathConstraint-node-reached.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>constraint</p></td>
<td class="parameter_description"><p>the <a class="link" href="ClutterPathConstraint.html" title="ClutterPathConstraint"><span class="type">ClutterPathConstraint</span></a> that emitted the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>actor</p></td>
<td class="parameter_description"><p>the <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> using the <em class="parameter"><code>constraint</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index</p></td>
<td class="parameter_description"><p>the index of the node that has been reached</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>