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>ClutterModel: 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="ch12.html" title="Generic list model">
<link rel="prev" href="ch12.html" title="Generic list model">
<link rel="next" href="ClutterModelIter.html" title="ClutterModelIter">
<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="#ClutterModel.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#ClutterModel.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
                  <a href="#ClutterModel.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#ClutterModel.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
                  <a href="#ClutterModel.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="ch12.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch12.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ClutterModelIter.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="ClutterModel"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ClutterModel.top_of_page"></a>ClutterModel</span></h2>
<p>ClutterModel — A generic model implementation</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="ClutterModel.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">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="ClutterModel.html#clutter-model-set-names" title="clutter_model_set_names ()">clutter_model_set_names</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="ClutterModel.html#clutter-model-set-types" title="clutter_model_set_types ()">clutter_model_set_types</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="ClutterModel.html#clutter-model-get-column-name" title="clutter_model_get_column_name ()">clutter_model_get_column_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GType</span>
</td>
<td class="function_name">
<a class="link" href="ClutterModel.html#clutter-model-get-column-type" title="clutter_model_get_column_type ()">clutter_model_get_column_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<a class="link" href="ClutterModel.html#clutter-model-get-n-columns" title="clutter_model_get_n_columns ()">clutter_model_get_n_columns</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<a class="link" href="ClutterModel.html#clutter-model-get-n-rows" title="clutter_model_get_n_rows ()">clutter_model_get_n_rows</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="ClutterModel.html#clutter-model-append" title="clutter_model_append ()">clutter_model_append</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="ClutterModel.html#clutter-model-appendv" title="clutter_model_appendv ()">clutter_model_appendv</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="ClutterModel.html#clutter-model-prepend" title="clutter_model_prepend ()">clutter_model_prepend</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="ClutterModel.html#clutter-model-prependv" title="clutter_model_prependv ()">clutter_model_prependv</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="ClutterModel.html#clutter-model-insert" title="clutter_model_insert ()">clutter_model_insert</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="ClutterModel.html#clutter-model-insertv" title="clutter_model_insertv ()">clutter_model_insertv</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="ClutterModel.html#clutter-model-insert-value" title="clutter_model_insert_value ()">clutter_model_insert_value</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="ClutterModel.html#clutter-model-remove" title="clutter_model_remove ()">clutter_model_remove</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="ClutterModel.html#ClutterModelForeachFunc" title="ClutterModelForeachFunc ()">*ClutterModelForeachFunc</a><span class="c_punctuation">)</span> <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="ClutterModel.html#clutter-model-foreach" title="clutter_model_foreach ()">clutter_model_foreach</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="ClutterModel.html#clutter-model-set-sorting-column" title="clutter_model_set_sorting_column ()">clutter_model_set_sorting_column</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="ClutterModel.html#clutter-model-get-sorting-column" title="clutter_model_get_sorting_column ()">clutter_model_get_sorting_column</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="ClutterModel.html#ClutterModelSortFunc" title="ClutterModelSortFunc ()">*ClutterModelSortFunc</a><span class="c_punctuation">)</span> <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="ClutterModel.html#clutter-model-set-sort" title="clutter_model_set_sort ()">clutter_model_set_sort</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="ClutterModel.html#clutter-model-resort" title="clutter_model_resort ()">clutter_model_resort</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="ClutterModel.html#ClutterModelFilterFunc" title="ClutterModelFilterFunc ()">*ClutterModelFilterFunc</a><span class="c_punctuation">)</span> <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="ClutterModel.html#clutter-model-set-filter" title="clutter_model_set_filter ()">clutter_model_set_filter</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ClutterModel.html#clutter-model-get-filter-set" title="clutter_model_get_filter_set ()">clutter_model_get_filter_set</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ClutterModel.html#clutter-model-filter-iter" title="clutter_model_filter_iter ()">clutter_model_filter_iter</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ClutterModel.html#clutter-model-filter-row" title="clutter_model_filter_row ()">clutter_model_filter_row</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="returnvalue">ClutterModelIter</span></a> *
</td>
<td class="function_name">
<a class="link" href="ClutterModel.html#clutter-model-get-first-iter" title="clutter_model_get_first_iter ()">clutter_model_get_first_iter</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="returnvalue">ClutterModelIter</span></a> *
</td>
<td class="function_name">
<a class="link" href="ClutterModel.html#clutter-model-get-last-iter" title="clutter_model_get_last_iter ()">clutter_model_get_last_iter</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="returnvalue">ClutterModelIter</span></a> *
</td>
<td class="function_name">
<a class="link" href="ClutterModel.html#clutter-model-get-iter-at-row" title="clutter_model_get_iter_at_row ()">clutter_model_get_iter_at_row</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterModel.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">gboolean</span></td>
<td class="property_name"><a class="link" href="ClutterModel.html#ClutterModel--filter-set" title="The “filter-set” property">filter-set</a></td>
<td class="property_flags">Read</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterModel.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="ClutterModel.html#ClutterModel-filter-changed" title="The “filter-changed” signal">filter-changed</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="ClutterModel.html#ClutterModel-row-added" title="The “row-added” signal">row-added</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="ClutterModel.html#ClutterModel-row-changed" title="The “row-changed” signal">row-changed</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="ClutterModel.html#ClutterModel-row-removed" title="The “row-removed” signal">row-removed</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="ClutterModel.html#ClutterModel-sort-changed" title="The “sort-changed” signal">sort-changed</a></td>
<td class="signal_flags">Run Last</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterModel.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">struct</td>
<td class="function_name"><a class="link" href="ClutterModel.html#ClutterModel-struct" title="struct ClutterModel">ClutterModel</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="ClutterModel.html#ClutterModelClass" title="struct ClutterModelClass">ClutterModelClass</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterModel.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> ClutterModel
        <span class="lineart">╰──</span> <a class="link" href="ClutterListModel.html" title="ClutterListModel">ClutterListModel</a>
</pre>
</div>
<div class="refsect1">
<a name="ClutterModel.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
ClutterModel implements
 <a class="link" href="ClutterScriptable.html" title="ClutterScriptable">ClutterScriptable</a>.</p>
</div>
<div class="refsect1">
<a name="ClutterModel.description"></a><h2>Description</h2>
<p><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> is a generic list model API which can be used to implement
the model-view-controller architectural pattern in Clutter.</p>
<p>The <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> class is a list model which can accept most GObject 
types as a column type.</p>
<div class="refsect3">
<a name="id-1.7.4.2.9.4"></a><h4>Creating a simple ClutterModel</h4>
<p>The example below shows how to create a simple list model.</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="keyword">enum</span>
<span class="cbracket">{</span>
<span class="normal">  COLUMN_INT</span><span class="symbol">,</span>
<span class="normal">  COLUMN_STRING</span><span class="symbol">,</span>

<span class="normal">  N_COLUMNS</span>
<span class="cbracket">}</span><span class="symbol">;</span>

<span class="cbracket">{</span>
<span class="normal">  </span><span class="usertype">ClutterModel</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">model</span><span class="symbol">;</span>
<span class="normal">  </span><span class="usertype">gint</span><span class="normal"> i</span><span class="symbol">;</span>

<span class="normal">  model </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="ClutterListModel.html#clutter-list-model-new">clutter_list_model_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">N_COLUMNS</span><span class="symbol">,</span>
<span class="normal">                                  </span><span class="comment">// column type, title</span>
<span class="normal">                                  G_TYPE_INT</span><span class="symbol">,</span><span class="normal">     </span><span class="string">"my integers"</span><span class="symbol">,</span>
<span class="normal">                                  G_TYPE_STRING</span><span class="symbol">,</span><span class="normal">  </span><span class="string">"my strings"</span><span class="symbol">);</span>
<span class="normal">  </span><span class="keyword">for</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">i </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span><span class="normal"> i </span><span class="symbol">&lt;</span><span class="normal"> </span><span class="number">10</span><span class="symbol">;</span><span class="normal"> i</span><span class="symbol">++)</span>
<span class="normal">    </span><span class="cbracket">{</span>
<span class="normal">      </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">string </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_strdup_printf</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"String %d"</span><span class="symbol">,</span><span class="normal"> i</span><span class="symbol">);</span>
<span class="normal">      </span><span class="function"><a href="ClutterModel.html#clutter-model-append">clutter_model_append</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">model</span><span class="symbol">,</span>
<span class="normal">                            COLUMN_INT</span><span class="symbol">,</span><span class="normal"> i</span><span class="symbol">,</span>
<span class="normal">                            COLUMN_STRING</span><span class="symbol">,</span><span class="normal"> string</span><span class="symbol">,</span>
<span class="normal">                            </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">);</span>
<span class="normal">      </span><span class="function">g_free</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">string</span><span class="symbol">);</span>
<span class="normal">    </span><span class="cbracket">}</span>

<span class="normal">  </span>
<span class="cbracket">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
</div>
<div class="refsect3">
<a name="id-1.7.4.2.9.5"></a><h4>Iterating through a ClutterModel</h4>
<p>Iterating through the model consists of retrieving a new <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a>
pointing to the starting row, and calling <a class="link" href="ClutterModelIter.html#clutter-model-iter-next" title="clutter_model_iter_next ()"><code class="function">clutter_model_iter_next()</code></a> or
<a class="link" href="ClutterModelIter.html#clutter-model-iter-prev" title="clutter_model_iter_prev ()"><code class="function">clutter_model_iter_prev()</code></a> to move forward or backwards, repectively.</p>
<p>A valid <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> represents the position between two rows in the
model. For example, the "first" iterator represents the gap immediately 
before the first row, and the "last" iterator represents the gap immediately
after the last row. In an empty sequence, the first and last iterators are
the same.</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="keyword">enum</span>
<span class="cbracket">{</span>
<span class="normal">  COLUMN_INT</span><span class="symbol">,</span>
<span class="normal">  COLUMN_STRING</span><span class="symbol">.</span>

<span class="normal">  N_COLUMNS</span>
<span class="cbracket">}</span><span class="symbol">;</span>

<span class="cbracket">{</span>
<span class="normal">  </span><span class="usertype">ClutterModel</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">model</span><span class="symbol">;</span>
<span class="normal">  </span><span class="usertype">ClutterModelIter</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">iter </span><span class="symbol">=</span><span class="normal"> NULL</span><span class="symbol">;</span>

<span class="normal">  </span><span class="comment">// fill the model</span>
<span class="normal">  model </span><span class="symbol">=</span><span class="normal"> </span><span class="function">populate_model</span><span class="normal"> </span><span class="symbol">();</span>

<span class="normal">  </span><span class="comment">// get the iterator for the first row in the model</span>
<span class="normal">  iter </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="ClutterModel.html#clutter-model-get-first-iter">clutter_model_get_first_iter</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">model</span><span class="symbol">);</span>
<span class="normal">  </span><span class="keyword">while</span><span class="normal"> </span><span class="symbol">(!</span><span class="function"><a href="ClutterModelIter.html#clutter-model-iter-is-last">clutter_model_iter_is_last</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">iter</span><span class="symbol">))</span>
<span class="normal">    </span><span class="cbracket">{</span>
<span class="normal">      </span><span class="function">print_row</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">iter</span><span class="symbol">);</span>
<span class="normal">      </span>
<span class="normal">      iter </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="ClutterModelIter.html#clutter-model-iter-next">clutter_model_iter_next</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">iter</span><span class="symbol">);</span>
<span class="normal">    </span><span class="cbracket">}</span>

<span class="normal">  </span><span class="comment">// Make sure to unref the iter</span>
<span class="normal">  </span><span class="function">g_object_unref</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">iter</span><span class="symbol">);</span>
<span class="cbracket">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> is an abstract class. Clutter provides a list model
implementation called <a class="link" href="ClutterListModel.html" title="ClutterListModel"><span class="type">ClutterListModel</span></a> which has been optimised
for insertion and look up in sorted lists.</p>
<p><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> is available since Clutter 0.6</p>
</div>
<div class="refsect3">
<a name="id-1.7.4.2.9.6"></a><h4>ClutterModel custom properties for ClutterScript</h4>
<p><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> defines a custom property "columns" for <a class="link" href="ClutterScript.html" title="ClutterScript"><span class="type">ClutterScript</span></a>
which allows defining the column names and types. It also defines a custom
"rows" property which allows filling the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> with some
data.</p>
<p>The definition below will create a <a class="link" href="ClutterListModel.html" title="ClutterListModel"><span class="type">ClutterListModel</span></a> with three
columns: the first one with name "Name" and containing strings; the
second one with name "Score" and containing integers; the third one with
name "Icon" and containing <a href="ClutterTexture.html#ClutterTexture-struct"><span class="type">ClutterTextures</span></a>. The model is filled
with three rows. A row can be defined either with an array that holds
all columns of a row, or an object that holds "column-name" :
"column-value" pairs.</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="cbracket">{</span>
<span class="normal">  </span><span class="string">"type"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"ClutterListModel"</span><span class="symbol">,</span>
<span class="normal">  </span><span class="string">"id"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"teams-model"</span><span class="symbol">,</span>
<span class="normal">  </span><span class="string">"columns"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="symbol">[</span>
<span class="normal">    </span><span class="symbol">[</span><span class="normal"> </span><span class="string">"Name"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"gchararray"</span><span class="normal"> </span><span class="symbol">],</span>
<span class="normal">    </span><span class="symbol">[</span><span class="normal"> </span><span class="string">"Score"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"gint"</span><span class="normal"> </span><span class="symbol">],</span>
<span class="normal">    </span><span class="symbol">[</span><span class="normal"> </span><span class="string">"Icon"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"ClutterTexture"</span><span class="normal"> </span><span class="symbol">]</span>
<span class="normal">  </span><span class="symbol">],</span>
<span class="normal">  </span><span class="string">"rows"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="symbol">[</span>
<span class="normal">    </span><span class="symbol">[</span><span class="normal"> </span><span class="string">"Team 1"</span><span class="symbol">,</span><span class="normal"> </span><span class="number">42</span><span class="symbol">,</span><span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"type"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"ClutterTexture"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"filename"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"team1.png"</span><span class="normal"> </span><span class="cbracket">}</span><span class="normal"> </span><span class="symbol">],</span>
<span class="normal">    </span><span class="symbol">[</span><span class="normal"> </span><span class="string">"Team 2"</span><span class="symbol">,</span><span class="normal"> </span><span class="number">23</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"team2-icon-script-id"</span><span class="normal"> </span><span class="symbol">],</span>
<span class="normal">    </span><span class="cbracket">{</span><span class="normal"> </span><span class="string">"Name"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"Team 3"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Icon"</span><span class="normal"> </span><span class="symbol">:</span><span class="normal"> </span><span class="string">"team3-icon-script-id"</span><span class="normal"> </span><span class="cbracket">}</span>
<span class="normal">  </span><span class="symbol">]</span>
<span class="cbracket">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
</div>
<div class="refsect1">
<a name="ClutterModel.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="clutter-model-set-names"></a><h3>clutter_model_set_names ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_set_names (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                         <em class="parameter"><code><span class="type">guint</span> n_columns</code></em>,
                         <em class="parameter"><code>const <span class="type">gchar</span> * const names[]</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_set_names</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Assigns a name to the columns of a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>.</p>
<p>This function is meant primarily for <span class="type">GObjects</span> that inherit from
<a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>, and should only be used when contructing a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>.
It will not work after the initial creation of the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>.</p>
<div class="refsect3">
<a name="clutter-model-set-names.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_columns</p></td>
<td class="parameter_description"><p>the number of column names</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>names</p></td>
<td class="parameter_description"><p> an array of strings. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_columns]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-set-types"></a><h3>clutter_model_set_types ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_set_types (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                         <em class="parameter"><code><span class="type">guint</span> n_columns</code></em>,
                         <em class="parameter"><code><span class="type">GType</span> *types</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_set_types</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Sets the types of the columns inside a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>.</p>
<p>This function is meant primarily for <span class="type">GObjects</span> that inherit from
<a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>, and should only be used when contructing a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>.
It will not work after the initial creation of the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>.</p>
<div class="refsect3">
<a name="clutter-model-set-types.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_columns</p></td>
<td class="parameter_description"><p>number of columns for the model</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>types</p></td>
<td class="parameter_description"><p> an array of <span class="type">GType</span> types. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_columns]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-get-column-name"></a><h3>clutter_model_get_column_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
clutter_model_get_column_name (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                               <em class="parameter"><code><span class="type">guint</span> column</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_get_column_name</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Retrieves the name of the <em class="parameter"><code>column</code></em>
</p>
<div class="refsect3">
<a name="clutter-model-get-column-name.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>model</p></td>
<td class="parameter_description"><p><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>column</p></td>
<td class="parameter_description"><p>the column number</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-model-get-column-name.returns"></a><h4>Returns</h4>
<p> the name of the column. The model holds the returned
string, and it should not be modified or freed</p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-get-column-type"></a><h3>clutter_model_get_column_type ()</h3>
<pre class="programlisting"><span class="returnvalue">GType</span>
clutter_model_get_column_type (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                               <em class="parameter"><code><span class="type">guint</span> column</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_get_column_type</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Retrieves the type of the <em class="parameter"><code>column</code></em>
.</p>
<div class="refsect3">
<a name="clutter-model-get-column-type.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>model</p></td>
<td class="parameter_description"><p><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>column</p></td>
<td class="parameter_description"><p>the column number</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-model-get-column-type.returns"></a><h4>Returns</h4>
<p> the type of the column.</p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-get-n-columns"></a><h3>clutter_model_get_n_columns ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>
clutter_model_get_n_columns (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_get_n_columns</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Retrieves the number of columns inside <em class="parameter"><code>model</code></em>
.</p>
<div class="refsect3">
<a name="clutter-model-get-n-columns.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-model-get-n-columns.returns"></a><h4>Returns</h4>
<p> the number of columns</p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-get-n-rows"></a><h3>clutter_model_get_n_rows ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>
clutter_model_get_n_rows (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_get_n_rows</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Retrieves the number of rows inside <em class="parameter"><code>model</code></em>
, eventually taking
into account any filtering function set using <a class="link" href="ClutterModel.html#clutter-model-set-filter" title="clutter_model_set_filter ()"><code class="function">clutter_model_set_filter()</code></a>.</p>
<div class="refsect3">
<a name="clutter-model-get-n-rows.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-model-get-n-rows.returns"></a><h4>Returns</h4>
<p> The length of the <em class="parameter"><code>model</code></em>
. If there is a filter set, then
the length of the filtered <em class="parameter"><code>model</code></em>
is returned.</p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-append"></a><h3>clutter_model_append ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_append (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                      <em class="parameter"><code>...</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_append</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Creates and appends a new row to the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>, setting the
row values upon creation. For example, to append a new row where
column 0 is type <code class="literal">G_TYPE_INT</code> and column 1 is of type <code class="literal">G_TYPE_STRING</code>:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="usertype">ClutterModel</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">model</span><span class="symbol">;</span>
<span class="normal">model </span><span class="symbol">=</span><span class="normal"> </span><span class="function">clutter_model_default_new</span><span class="normal"> </span><span class="symbol">(</span><span class="number">2</span><span class="symbol">,</span>
<span class="normal">                                   G_TYPE_INT</span><span class="symbol">,</span><span class="normal">    </span><span class="string">"Score"</span><span class="symbol">,</span>
<span class="normal">                                   G_TYPE_STRING</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Team"</span><span class="symbol">);</span>
<span class="function"><a href="ClutterModel.html#clutter-model-append">clutter_model_append</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">model</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">42</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Team &lt;GTKDOCLINK HREF="</span><span class="number">1</span><span class="symbol">:</span><span class="normal">CAPS</span><span class="string">"&gt;1&lt;/GTKDOCLINK&gt;"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="refsect3">
<a name="clutter-model-append.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>pairs of column number and value, terminated with -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-appendv"></a><h3>clutter_model_appendv ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_appendv (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                       <em class="parameter"><code><span class="type">guint</span> n_columns</code></em>,
                       <em class="parameter"><code><span class="type">guint</span> *columns</code></em>,
                       <em class="parameter"><code><span class="type">GValue</span> *values</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_appendv</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Creates and appends a new row to the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>, setting the row
values for the given <em class="parameter"><code>columns</code></em>
 upon creation.</p>
<div class="refsect3">
<a name="clutter-model-appendv.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_columns</p></td>
<td class="parameter_description"><p>the number of columns and values</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>columns</p></td>
<td class="parameter_description"><p> a vector with the columns to set. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_columns]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>values</p></td>
<td class="parameter_description"><p> a vector with the values. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_columns]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-prepend"></a><h3>clutter_model_prepend ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_prepend (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                       <em class="parameter"><code>...</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_prepend</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Creates and prepends a new row to the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>, setting the row
values upon creation. For example, to prepend a new row where column 0
is type <code class="literal">G_TYPE_INT</code> and column 1 is of type <code class="literal">G_TYPE_STRING</code>:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="usertype">ClutterModel</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">model</span><span class="symbol">;</span>
<span class="normal">model </span><span class="symbol">=</span><span class="normal"> </span><span class="function">clutter_model_default_new</span><span class="normal"> </span><span class="symbol">(</span><span class="number">2</span><span class="symbol">,</span>
<span class="normal">                                   G_TYPE_INT</span><span class="symbol">,</span><span class="normal">    </span><span class="string">"Score"</span><span class="symbol">,</span>
<span class="normal">                                   G_TYPE_STRING</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Team"</span><span class="symbol">);</span>
<span class="function"><a href="ClutterModel.html#clutter-model-prepend">clutter_model_prepend</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">model</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">42</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Team &lt;GTKDOCLINK HREF="</span><span class="number">1</span><span class="symbol">:</span><span class="normal">CAPS</span><span class="string">"&gt;1&lt;/GTKDOCLINK&gt;"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="refsect3">
<a name="clutter-model-prepend.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>pairs of column number and value, terminated with -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-prependv"></a><h3>clutter_model_prependv ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_prependv (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                        <em class="parameter"><code><span class="type">guint</span> n_columns</code></em>,
                        <em class="parameter"><code><span class="type">guint</span> *columns</code></em>,
                        <em class="parameter"><code><span class="type">GValue</span> *values</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_prependv</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Creates and prepends a new row to the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>, setting the row
values for the given <em class="parameter"><code>columns</code></em>
 upon creation.</p>
<div class="refsect3">
<a name="clutter-model-prependv.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_columns</p></td>
<td class="parameter_description"><p>the number of columns and values to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>columns</p></td>
<td class="parameter_description"><p> a vector containing the columns to set. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_columns]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>values</p></td>
<td class="parameter_description"><p> a vector containing the values for the cells. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_columns]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-insert"></a><h3>clutter_model_insert ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_insert (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                      <em class="parameter"><code><span class="type">guint</span> row</code></em>,
                      <em class="parameter"><code>...</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_insert</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Inserts a new row to the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> at <em class="parameter"><code>row</code></em>
, setting the row
values upon creation. For example, to insert a new row at index 100,
where column 0 is type <code class="literal">G_TYPE_INT</code> and column 1 is of type
<code class="literal">G_TYPE_STRING</code>:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="usertype">ClutterModel</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">model</span><span class="symbol">;</span>
<span class="normal">model </span><span class="symbol">=</span><span class="normal"> </span><span class="function">clutter_model_default_new</span><span class="normal"> </span><span class="symbol">(</span><span class="number">2</span><span class="symbol">,</span>
<span class="normal">                                   G_TYPE_INT</span><span class="symbol">,</span><span class="normal">    </span><span class="string">"Score"</span><span class="symbol">,</span>
<span class="normal">                                   G_TYPE_STRING</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Team"</span><span class="symbol">);</span>
<span class="function"><a href="ClutterModel.html#clutter-model-insert">clutter_model_insert</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">model</span><span class="symbol">,</span><span class="normal"> </span><span class="number">3</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">42</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Team &lt;GTKDOCLINK HREF="</span><span class="number">1</span><span class="symbol">:</span><span class="normal">CAPS</span><span class="string">"&gt;1&lt;/GTKDOCLINK&gt;"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="refsect3">
<a name="clutter-model-insert.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>row</p></td>
<td class="parameter_description"><p>the position to insert the new row</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>pairs of column number and value, terminated with -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-insertv"></a><h3>clutter_model_insertv ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_insertv (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                       <em class="parameter"><code><span class="type">guint</span> row</code></em>,
                       <em class="parameter"><code><span class="type">guint</span> n_columns</code></em>,
                       <em class="parameter"><code><span class="type">guint</span> *columns</code></em>,
                       <em class="parameter"><code><span class="type">GValue</span> *values</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_insertv</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Inserts data at <em class="parameter"><code>row</code></em>
 into the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>, setting the row
values for the given <em class="parameter"><code>columns</code></em>
 upon creation.</p>
<div class="refsect3">
<a name="clutter-model-insertv.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>row</p></td>
<td class="parameter_description"><p>row index</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_columns</p></td>
<td class="parameter_description"><p>the number of columns and values to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>columns</p></td>
<td class="parameter_description"><p> a vector containing the columns to set. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_columns]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>values</p></td>
<td class="parameter_description"><p> a vector containing the values for the cells. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_columns]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-insert-value"></a><h3>clutter_model_insert_value ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_insert_value (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                            <em class="parameter"><code><span class="type">guint</span> row</code></em>,
                            <em class="parameter"><code><span class="type">guint</span> column</code></em>,
                            <em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_insert_value</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Sets the data in the cell specified by <em class="parameter"><code>iter</code></em>
 and <em class="parameter"><code>column</code></em>
. The type of 
<em class="parameter"><code>value</code></em>
 must be convertable to the type of the column. If the row does
not exist then it is created.</p>
<div class="refsect3">
<a name="clutter-model-insert-value.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>row</p></td>
<td class="parameter_description"><p>position of the row to modify</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>column</p></td>
<td class="parameter_description"><p>column to modify</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>new value for the cell</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-remove"></a><h3>clutter_model_remove ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_remove (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                      <em class="parameter"><code><span class="type">guint</span> row</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_remove</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Removes the row at the given position from the model.</p>
<div class="refsect3">
<a name="clutter-model-remove.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>row</p></td>
<td class="parameter_description"><p>position of row to remove</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterModelForeachFunc"></a><h3>ClutterModelForeachFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
<span class="c_punctuation">(</span>*ClutterModelForeachFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                            <em class="parameter"><code><a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> *iter</code></em>,
                            <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<div class="warning">
<p><code class="literal">ClutterModelForeachFunc</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span></p>
</div>
<p>Iterates on the content of a row in the model</p>
<div class="refsect3">
<a name="ClutterModelForeachFunc.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>the iterator for the row</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>data passed to <a class="link" href="ClutterModel.html#clutter-model-foreach" title="clutter_model_foreach ()"><code class="function">clutter_model_foreach()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ClutterModelForeachFunc.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the iteration should continue, <code class="literal">FALSE</code> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-foreach"></a><h3>clutter_model_foreach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_foreach (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                       <em class="parameter"><code><a class="link" href="ClutterModel.html#ClutterModelForeachFunc" title="ClutterModelForeachFunc ()"><span class="type">ClutterModelForeachFunc</span></a> func</code></em>,
                       <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_foreach</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Calls <em class="parameter"><code>func</code></em>
 for each row in the model.</p>
<div class="refsect3">
<a name="clutter-model-foreach.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p> a <a class="link" href="ClutterModel.html#ClutterModelForeachFunc" title="ClutterModelForeachFunc ()"><span class="type">ClutterModelForeachFunc</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data to pass to <em class="parameter"><code>func</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-set-sorting-column"></a><h3>clutter_model_set_sorting_column ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_set_sorting_column (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                                  <em class="parameter"><code><span class="type">gint</span> column</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_set_sorting_column</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Sets the model to sort by <em class="parameter"><code>column</code></em>
. If <em class="parameter"><code>column</code></em>
 is a negative value
the sorting column will be unset.</p>
<div class="refsect3">
<a name="clutter-model-set-sorting-column.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>column</p></td>
<td class="parameter_description"><p>the column of the <em class="parameter"><code>model</code></em>
to sort, or -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-get-sorting-column"></a><h3>clutter_model_get_sorting_column ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
clutter_model_get_sorting_column (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_get_sorting_column</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Retrieves the number of column used for sorting the <em class="parameter"><code>model</code></em>
.</p>
<div class="refsect3">
<a name="clutter-model-get-sorting-column.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-model-get-sorting-column.returns"></a><h4>Returns</h4>
<p> a column number, or -1 if the model is not sorted</p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterModelSortFunc"></a><h3>ClutterModelSortFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
<span class="c_punctuation">(</span>*ClutterModelSortFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                         <em class="parameter"><code>const <span class="type">GValue</span> *a</code></em>,
                         <em class="parameter"><code>const <span class="type">GValue</span> *b</code></em>,
                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<div class="warning">
<p><code class="literal">ClutterModelSortFunc</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Implement sorting using a custom <span class="type">GListModel</span> instead</p>
</div>
<p>Compares the content of two rows in the model.</p>
<div class="refsect3">
<a name="ClutterModelSortFunc.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <span class="type">GValue</span> representing the contents of the row</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <span class="type">GValue</span> representing the contents of the second row</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>data passed to <a class="link" href="ClutterModel.html#clutter-model-set-sort" title="clutter_model_set_sort ()"><code class="function">clutter_model_set_sort()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ClutterModelSortFunc.returns"></a><h4>Returns</h4>
<p> a positive integer if <em class="parameter"><code>a</code></em>
is after <em class="parameter"><code>b</code></em>
, a negative integer if
<em class="parameter"><code>a</code></em>
is before <em class="parameter"><code>b</code></em>
, or 0 if the rows are the same</p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-set-sort"></a><h3>clutter_model_set_sort ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_set_sort (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                        <em class="parameter"><code><span class="type">gint</span> column</code></em>,
                        <em class="parameter"><code><a class="link" href="ClutterModel.html#ClutterModelSortFunc" title="ClutterModelSortFunc ()"><span class="type">ClutterModelSortFunc</span></a> func</code></em>,
                        <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
                        <em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_set_sort</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Sorts <em class="parameter"><code>model</code></em>
 using the given sorting function.</p>
<div class="refsect3">
<a name="clutter-model-set-sort.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>column</p></td>
<td class="parameter_description"><p>the column to sort on</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p> a <a class="link" href="ClutterModel.html#ClutterModelSortFunc" title="ClutterModelSortFunc ()"><span class="type">ClutterModelSortFunc</span></a>, or <span class="type">NULL</span>. </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>user_data</p></td>
<td class="parameter_description"><p>user data to pass to <em class="parameter"><code>func</code></em>
, or <span class="type">NULL</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>notify</p></td>
<td class="parameter_description"><p>destroy notifier of <em class="parameter"><code>user_data</code></em>
, or <span class="type">NULL</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-resort"></a><h3>clutter_model_resort ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_resort (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_resort</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Force a resort on the <em class="parameter"><code>model</code></em>
. This function should only be
used by subclasses of <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>.</p>
<div class="refsect3">
<a name="clutter-model-resort.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterModelFilterFunc"></a><h3>ClutterModelFilterFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
<span class="c_punctuation">(</span>*ClutterModelFilterFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                           <em class="parameter"><code><a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> *iter</code></em>,
                           <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<div class="warning">
<p><code class="literal">ClutterModelFilterFunc</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Implement filters using a custom <span class="type">GListModel</span> instead</p>
</div>
<p>Filters the content of a row in the model.</p>
<div class="refsect3">
<a name="ClutterModelFilterFunc.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>the iterator for the row</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>data passed to <a class="link" href="ClutterModel.html#clutter-model-set-filter" title="clutter_model_set_filter ()"><code class="function">clutter_model_set_filter()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ClutterModelFilterFunc.returns"></a><h4>Returns</h4>
<p> If the row should be displayed, return <code class="literal">TRUE</code></p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-set-filter"></a><h3>clutter_model_set_filter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_model_set_filter (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                          <em class="parameter"><code><a class="link" href="ClutterModel.html#ClutterModelFilterFunc" title="ClutterModelFilterFunc ()"><span class="type">ClutterModelFilterFunc</span></a> func</code></em>,
                          <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
                          <em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_set_filter</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Filters the <em class="parameter"><code>model</code></em>
 using the given filtering function.</p>
<div class="refsect3">
<a name="clutter-model-set-filter.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p> a <a class="link" href="ClutterModel.html#ClutterModelFilterFunc" title="ClutterModelFilterFunc ()"><span class="type">ClutterModelFilterFunc</span></a>, or <span class="type">NULL</span>. </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>user_data</p></td>
<td class="parameter_description"><p>user data to pass to <em class="parameter"><code>func</code></em>
, or <span class="type">NULL</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>notify</p></td>
<td class="parameter_description"><p>destroy notifier of <em class="parameter"><code>user_data</code></em>
, or <span class="type">NULL</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-get-filter-set"></a><h3>clutter_model_get_filter_set ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
clutter_model_get_filter_set (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_get_filter_set</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Returns whether the <em class="parameter"><code>model</code></em>
 has a filter in place, set
using <a class="link" href="ClutterModel.html#clutter-model-set-filter" title="clutter_model_set_filter ()"><code class="function">clutter_model_set_filter()</code></a></p>
<div class="refsect3">
<a name="clutter-model-get-filter-set.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-model-get-filter-set.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if a filter is set</p>
</div>
<p class="since">Since: <a class="link" href="ix07.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-filter-iter"></a><h3>clutter_model_filter_iter ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
clutter_model_filter_iter (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                           <em class="parameter"><code><a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> *iter</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_filter_iter</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Checks whether the row pointer by <em class="parameter"><code>iter</code></em>
 should be filtered or not using
the filtering function set on <em class="parameter"><code>model</code></em>
.</p>
<p>This function should be used only by subclasses of <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>.</p>
<div class="refsect3">
<a name="clutter-model-filter-iter.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>the row to filter</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-model-filter-iter.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the row should be displayed,
<code class="literal">FALSE</code> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-filter-row"></a><h3>clutter_model_filter_row ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
clutter_model_filter_row (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                          <em class="parameter"><code><span class="type">guint</span> row</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_filter_row</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Checks whether <em class="parameter"><code>row</code></em>
 should be filtered or not using the
filtering function set on <em class="parameter"><code>model</code></em>
.</p>
<p>This function should be used only by subclasses of <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>.</p>
<div class="refsect3">
<a name="clutter-model-filter-row.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>row</p></td>
<td class="parameter_description"><p>the row to filter</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-model-filter-row.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the row should be displayed,
<code class="literal">FALSE</code> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-get-first-iter"></a><h3>clutter_model_get_first_iter ()</h3>
<pre class="programlisting"><a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="returnvalue">ClutterModelIter</span></a> *
clutter_model_get_first_iter (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_get_first_iter</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Retrieves a <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> representing the first non-filtered
row in <em class="parameter"><code>model</code></em>
.</p>
<div class="refsect3">
<a name="clutter-model-get-first-iter.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-model-get-first-iter.returns"></a><h4>Returns</h4>
<p> A new <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a>.
Call <code class="function">g_object_unref()</code> when done using it. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-get-last-iter"></a><h3>clutter_model_get_last_iter ()</h3>
<pre class="programlisting"><a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="returnvalue">ClutterModelIter</span></a> *
clutter_model_get_last_iter (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_get_last_iter</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Retrieves a <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> representing the last non-filtered
row in <em class="parameter"><code>model</code></em>
.</p>
<div class="refsect3">
<a name="clutter-model-get-last-iter.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-model-get-last-iter.returns"></a><h4>Returns</h4>
<p> A new <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a>.
Call <code class="function">g_object_unref()</code> when done using it. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-model-get-iter-at-row"></a><h3>clutter_model_get_iter_at_row ()</h3>
<pre class="programlisting"><a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="returnvalue">ClutterModelIter</span></a> *
clutter_model_get_iter_at_row (<em class="parameter"><code><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model</code></em>,
                               <em class="parameter"><code><span class="type">guint</span> row</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_model_get_iter_at_row</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Retrieves a <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> representing the row at the given index.</p>
<p>If a filter function has been set using <a class="link" href="ClutterModel.html#clutter-model-set-filter" title="clutter_model_set_filter ()"><code class="function">clutter_model_set_filter()</code></a>
then the <em class="parameter"><code>model</code></em>
 implementation will return the first non filtered
row.</p>
<div class="refsect3">
<a name="clutter-model-get-iter-at-row.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>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>row</p></td>
<td class="parameter_description"><p>position of the row to retrieve</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="clutter-model-get-iter-at-row.returns"></a><h4>Returns</h4>
<p> A new <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a>, or <code class="literal">NULL</code> if <em class="parameter"><code>row</code></em>
was
out of bounds. When done using the iterator object, call <code class="function">g_object_unref()</code>
to deallocate its resources. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
</div>
<div class="refsect1">
<a name="ClutterModel.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="ClutterModel-struct"></a><h3>struct ClutterModel</h3>
<pre class="programlisting">struct ClutterModel;</pre>
<div class="warning">
<p><code class="literal">ClutterModel</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Base class for list models. The <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> structure contains
only private data and should be manipulated using the provided
API.</p>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterModelClass"></a><h3>struct ClutterModelClass</h3>
<pre class="programlisting">struct ClutterModelClass {
  /* vtable */
  guint             (* get_n_rows)      (ClutterModel         *model);
  guint             (* get_n_columns)   (ClutterModel         *model);
  const gchar *     (* get_column_name) (ClutterModel         *model,
                                         guint                 column);
  GType             (* get_column_type) (ClutterModel         *model,
                                         guint                 column);
  ClutterModelIter *(* insert_row)      (ClutterModel         *model,
                                         gint                  index_);
  void              (* remove_row)      (ClutterModel         *model,
                                         guint                 row);
  ClutterModelIter *(* get_iter_at_row) (ClutterModel         *model,
                                         guint                 row);
  void              (* resort)          (ClutterModel         *model,
                                         ClutterModelSortFunc  func,
                                         gpointer              data);

  /* signals */
  void              (* row_added)       (ClutterModel     *model,
                                         ClutterModelIter *iter);
  void              (* row_removed)     (ClutterModel     *model,
                                         ClutterModelIter *iter);
  void              (* row_changed)     (ClutterModel     *model,
                                         ClutterModelIter *iter);
  void              (* sort_changed)    (ClutterModel     *model);
  void              (* filter_changed)  (ClutterModel     *model);
};
</pre>
<div class="warning">
<p><code class="literal">ClutterModelClass</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Class for <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> instances.</p>
<div class="refsect3">
<a name="ClutterModelClass.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.get-n-rows"></a>get_n_rows</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual function for returning the number of rows
of the model</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.get-n-columns"></a>get_n_columns</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual function for retuning the number of columns
of the model</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.get-column-name"></a>get_column_name</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual function for returning the name of a column</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.get-column-type"></a>get_column_type</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual function for returning the type of a column</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.insert-row"></a>insert_row</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual function for inserting a row at the given index
and returning an iterator pointing to it; if the index is a negative
integer, the row should be appended to the model</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.remove-row"></a>remove_row</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual function for removing a row at the given index</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.get-iter-at-row"></a>get_iter_at_row</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual function for returning an iterator for the
given row</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.resort"></a>resort</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual function for sorting the model using the passed
sorting function</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.row-added"></a>row_added</code></em> ()</p></td>
<td class="struct_member_description"><p>signal class handler for ClutterModel::row-added</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.row-removed"></a>row_removed</code></em> ()</p></td>
<td class="struct_member_description"><p>signal class handler for ClutterModel::row-removed</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.row-changed"></a>row_changed</code></em> ()</p></td>
<td class="struct_member_description"><p>signal class handler for ClutterModel::row-changed</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.sort-changed"></a>sort_changed</code></em> ()</p></td>
<td class="struct_member_description"><p>signal class handler for ClutterModel::sort-changed</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterModelClass.filter-changed"></a>filter_changed</code></em> ()</p></td>
<td class="struct_member_description"><p>signal class handler for ClutterModel::filter-changed</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.6">0.6</a></p>
</div>
</div>
<div class="refsect1">
<a name="ClutterModel.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="ClutterModel--filter-set"></a><h3>The <code class="literal">“filter-set”</code> property</h3>
<pre class="programlisting">  “filter-set”               <span class="type">gboolean</span></pre>
<p>Whether the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> has a filter set</p>
<p>This property is set to <code class="literal">TRUE</code> if a filter function has been
set using <a class="link" href="ClutterModel.html#clutter-model-set-filter" title="clutter_model_set_filter ()"><code class="function">clutter_model_set_filter()</code></a></p>
<div class="warning">
<p><code class="literal">ClutterModel:filter-set</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<p>Flags: Read</p>
<p>Default value: FALSE</p>
<p class="since">Since: <a class="link" href="ix07.html#api-index-1.0">1.0</a></p>
</div>
</div>
<div class="refsect1">
<a name="ClutterModel.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="ClutterModel-filter-changed"></a><h3>The <code class="literal">“filter-changed”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model,
               <span class="type">gpointer</span>      user_data)</pre>
<p>The ::filter-changed signal is emitted when a new filter has been applied</p>
<div class="warning">
<p><code class="literal">ClutterModel::filter-changed</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<div class="refsect3">
<a name="ClutterModel-filter-changed.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>model</p></td>
<td class="parameter_description"><p>the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> on which the signal is emitted   </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="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterModel-row-added"></a><h3>The <code class="literal">“row-added”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>     *model,
               <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> *iter,
               <span class="type">gpointer</span>          user_data)</pre>
<p>The ::row-added signal is emitted when a new row has been added.
The data on the row has already been set when the ::row-added signal
has been emitted.</p>
<div class="warning">
<p><code class="literal">ClutterModel::row-added</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<div class="refsect3">
<a name="ClutterModel-row-added.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>model</p></td>
<td class="parameter_description"><p>the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> on which the signal is emitted</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> pointing to the new row</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="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterModel-row-changed"></a><h3>The <code class="literal">“row-changed”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>     *model,
               <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> *iter,
               <span class="type">gpointer</span>          user_data)</pre>
<p>The ::row-removed signal is emitted when a row has been changed.
The data on the row has already been updated when the ::row-changed
signal has been emitted.</p>
<div class="warning">
<p><code class="literal">ClutterModel::row-changed</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<div class="refsect3">
<a name="ClutterModel-row-changed.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>model</p></td>
<td class="parameter_description"><p>the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> on which the signal is emitted</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> pointing to the changed row</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="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterModel-row-removed"></a><h3>The <code class="literal">“row-removed”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>     *model,
               <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> *iter,
               <span class="type">gpointer</span>          user_data)</pre>
<p>The ::row-removed signal is emitted when a row has been removed.
The data on the row pointed by the passed iterator is still valid
when the ::row-removed signal has been emitted.</p>
<div class="warning">
<p><code class="literal">ClutterModel::row-removed</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<div class="refsect3">
<a name="ClutterModel-row-removed.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>model</p></td>
<td class="parameter_description"><p>the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> on which the signal is emitted</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterModelIter.html" title="ClutterModelIter"><span class="type">ClutterModelIter</span></a> pointing to the removed row</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="ix05.html#api-index-0.6">0.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterModel-sort-changed"></a><h3>The <code class="literal">“sort-changed”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> *model,
               <span class="type">gpointer</span>      user_data)</pre>
<p>The ::sort-changed signal is emitted after the model has been sorted</p>
<div class="warning">
<p><code class="literal">ClutterModel::sort-changed</code> has been deprecated since version 1.24 and should not be used in newly-written code.</p>
<p>Use <span class="type">GListModel</span> instead</p>
</div>
<div class="refsect3">
<a name="ClutterModel-sort-changed.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>model</p></td>
<td class="parameter_description"><p>the <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> on which the signal is emitted</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="ix05.html#api-index-0.6">0.6</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>