1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>ClutterListModel</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="Clutter Reference Manual">
8 <link rel="up" href="ch13.html" title="Generic list model">
9 <link rel="prev" href="ClutterModelIter.html" title="ClutterModelIter">
10 <link rel="next" href="clutterbackends.html" title="Part VII. Clutter Backends">
11 <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="ClutterModelIter.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch13.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">Clutter Reference Manual</th>
21 <td><a accesskey="n" href="clutterbackends.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#ClutterListModel.synopsis" class="shortcut">Top</a>
26 <a href="#ClutterListModel.description" class="shortcut">Description</a>
28 <a href="#ClutterListModel.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#ClutterListModel.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
33 <div class="refentry">
34 <a name="ClutterListModel"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
37 <h2><span class="refentrytitle"><a name="ClutterListModel.top_of_page"></a>ClutterListModel</span></h2>
38 <p>ClutterListModel — List model implementation</p>
40 <td valign="top" align="right"></td>
42 <div class="refsynopsisdiv">
43 <a name="ClutterListModel.synopsis"></a><h2>Synopsis</h2>
44 <pre class="synopsis">struct <a class="link" href="ClutterListModel.html#ClutterListModel-struct" title="struct ClutterListModel">ClutterListModel</a>;
45 struct <a class="link" href="ClutterListModel.html#ClutterListModelClass" title="struct ClutterListModelClass">ClutterListModelClass</a>;
46 <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="returnvalue">ClutterModel</span></a> * <a class="link" href="ClutterListModel.html#clutter-list-model-new" title="clutter_list_model_new ()">clutter_list_model_new</a> (<em class="parameter"><code><span class="type">guint</span> n_columns</code></em>,
47 <em class="parameter"><code>...</code></em>);
48 <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="returnvalue">ClutterModel</span></a> * <a class="link" href="ClutterListModel.html#clutter-list-model-newv" title="clutter_list_model_newv ()">clutter_list_model_newv</a> (<em class="parameter"><code><span class="type">guint</span> n_columns</code></em>,
49 <em class="parameter"><code><span class="type">GType</span> *types</code></em>,
50 <em class="parameter"><code>const <span class="type">gchar</span> * const names[]</code></em>);
53 <div class="refsect1">
54 <a name="ClutterListModel.object-hierarchy"></a><h2>Object Hierarchy</h2>
55 <pre class="synopsis">
57 +----<a class="link" href="ClutterModel.html" title="ClutterModel">ClutterModel</a>
61 <div class="refsect1">
62 <a name="ClutterListModel.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
64 ClutterListModel implements
65 <a class="link" href="ClutterScriptable.html" title="ClutterScriptable">ClutterScriptable</a>.</p>
67 <div class="refsect1">
68 <a name="ClutterListModel.description"></a><h2>Description</h2>
70 <a class="link" href="ClutterListModel.html" title="ClutterListModel"><span class="type">ClutterListModel</span></a> is a <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> implementation provided by
71 Clutter. <a class="link" href="ClutterListModel.html" title="ClutterListModel"><span class="type">ClutterListModel</span></a> uses a <span class="type">GSequence</span> for storing the
72 values for each row, so it's optimized for insertion and look up
76 <a class="link" href="ClutterListModel.html" title="ClutterListModel"><span class="type">ClutterListModel</span></a> is available since Clutter 0.6
79 <div class="refsect1">
80 <a name="ClutterListModel.details"></a><h2>Details</h2>
81 <div class="refsect2">
82 <a name="ClutterListModel-struct"></a><h3>struct ClutterListModel</h3>
83 <pre class="programlisting">struct ClutterListModel;</pre>
85 The <a class="link" href="ClutterListModel.html" title="ClutterListModel"><span class="type">ClutterListModel</span></a> struct contains only private data.
87 <p class="since">Since 0.6</p>
90 <div class="refsect2">
91 <a name="ClutterListModelClass"></a><h3>struct ClutterListModelClass</h3>
92 <pre class="programlisting">struct ClutterListModelClass {
96 The <a class="link" href="ClutterListModel.html#ClutterListModelClass" title="struct ClutterListModelClass"><span class="type">ClutterListModelClass</span></a> struct contains only private data.
98 <p class="since">Since 0.6</p>
101 <div class="refsect2">
102 <a name="clutter-list-model-new"></a><h3>clutter_list_model_new ()</h3>
103 <pre class="programlisting"><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="returnvalue">ClutterModel</span></a> * clutter_list_model_new (<em class="parameter"><code><span class="type">guint</span> n_columns</code></em>,
104 <em class="parameter"><code>...</code></em>);</pre>
106 Creates a new default model with <em class="parameter"><code>n_columns</code></em> columns with the types
114 <div class="informalexample">
115 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
118 <td class="listing_lines" align="right"><pre>1
122 <td class="listing_code"><pre class="programlisting"><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="number">3</span><span class="symbol">,</span>
123 <span class="normal"> G_TYPE_INT</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Score"</span><span class="symbol">,</span>
124 <span class="normal"> G_TYPE_STRING</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Team"</span><span class="symbol">,</span>
125 <span class="normal"> GDK_TYPE_PIXBUF</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Logo"</span><span class="symbol">);</span></pre></td>
134 will create a new <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a> with three columns of type int,
135 string and <span class="type">GdkPixbuf</span> respectively.
138 Note that the name of the column can be set to <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>, in which case
139 the canonical name of the type held by the column will be used as
142 <div class="variablelist"><table border="0">
143 <col align="left" valign="top">
146 <td><p><span class="term"><em class="parameter"><code>n_columns</code></em> :</span></p></td>
147 <td>number of columns in the model</td>
150 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
152 <em class="parameter"><code>n_columns</code></em> number of <span class="type">GType</span> and string pairs</td>
155 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
156 <td>a new <a class="link" href="ClutterListModel.html" title="ClutterListModel"><span class="type">ClutterListModel</span></a>
161 <p class="since">Since 0.6</p>
164 <div class="refsect2">
165 <a name="clutter-list-model-newv"></a><h3>clutter_list_model_newv ()</h3>
166 <pre class="programlisting"><a class="link" href="ClutterModel.html" title="ClutterModel"><span class="returnvalue">ClutterModel</span></a> * clutter_list_model_newv (<em class="parameter"><code><span class="type">guint</span> n_columns</code></em>,
167 <em class="parameter"><code><span class="type">GType</span> *types</code></em>,
168 <em class="parameter"><code>const <span class="type">gchar</span> * const names[]</code></em>);</pre>
170 Non-vararg version of <a class="link" href="ClutterListModel.html#clutter-list-model-new" title="clutter_list_model_new ()"><code class="function">clutter_list_model_new()</code></a>. This function is
171 useful for language bindings.
173 <div class="variablelist"><table border="0">
174 <col align="left" valign="top">
177 <td><p><span class="term"><em class="parameter"><code>n_columns</code></em> :</span></p></td>
178 <td>number of columns in the model</td>
181 <td><p><span class="term"><em class="parameter"><code>types</code></em> :</span></p></td>
182 <td>an array of <span class="type">GType</span> types for the columns, from first to last. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_columns]</span>
186 <td><p><span class="term"><em class="parameter"><code>names</code></em> :</span></p></td>
187 <td>an array of names for the columns, from first to last. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_columns]</span>
191 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
192 <td>a new default <a class="link" href="ClutterModel.html" title="ClutterModel"><span class="type">ClutterModel</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
197 <p class="since">Since 0.6</p>
203 Generated by GTK-Doc V1.18.1</div>