KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/share/gtk-doc/html/gtk/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/share/gtk-doc/html/gtk/GtkListStore.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GtkListStore</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="prev" href="GtkCellRendererToggle.html" title="GtkCellRendererToggle">
<link rel="next" href="GtkTreeStore.html" title="GtkTreeStore">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part&#160;I.&#160;GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part&#160;II.&#160;GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part&#160;III.&#160;GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part&#160;IV.&#160;Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and 
         GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="part" href="pt05.html" title="Part&#160;V.&#160;GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</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="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkCellRendererToggle.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="TreeWidgetObjects.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ Reference Manual</th>
<td><a accesskey="n" href="GtkTreeStore.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3238688" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id3239505" class="shortcut">Description</a>
                  &#160;|&#160;
                  <a href="#id3239437" class="shortcut">Object Hierarchy</a>
                  &#160;|&#160;
                  <a href="#id3239461" class="shortcut">Implemented Interfaces</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="GtkListStore"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id3238688"></a><span class="refentrytitle">GtkListStore</span>
</h2>
<p>GtkListStore &#8212; A list-like data structure that can be used with the <a href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a></p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;gtk/gtk.h&gt;


            <a href="GtkListStore.html#GtkListStore-struct">GtkListStore</a>;
<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a>* <a href="GtkListStore.html#gtk-list-store-new">gtk_list_store_new</a>            (<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_columns,
                                             ...);
<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a>* <a href="GtkListStore.html#gtk-list-store-newv">gtk_list_store_newv</a>           (<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_columns,
                                             <a
href="../gobject/gobject-Type-Information.html#GType"
>GType</a> *types);
void        <a href="GtkListStore.html#gtk-list-store-set-column-types">gtk_list_store_set_column_types</a> (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_columns,
                                             <a
href="../gobject/gobject-Type-Information.html#GType"
>GType</a> *types);
void        <a href="GtkListStore.html#gtk-list-store-set">gtk_list_store_set</a>              (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             ...);
void        <a href="GtkListStore.html#gtk-list-store-set-valist">gtk_list_store_set_valist</a>       (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             va_list var_args);
void        <a href="GtkListStore.html#gtk-list-store-set-value">gtk_list_store_set_value</a>        (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> column,
                                             <a
href="../gobject/gobject-Generic-values.html#GValue"
>GValue</a> *value);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="GtkListStore.html#gtk-list-store-remove">gtk_list_store_remove</a>           (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter);
void        <a href="GtkListStore.html#gtk-list-store-insert">gtk_list_store_insert</a>           (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> position);
void        <a href="GtkListStore.html#gtk-list-store-insert-before">gtk_list_store_insert_before</a>    (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *sibling);
void        <a href="GtkListStore.html#gtk-list-store-insert-after">gtk_list_store_insert_after</a>     (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *sibling);
void        <a href="GtkListStore.html#gtk-list-store-insert-with-values">gtk_list_store_insert_with_values</a>
                                            (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> position,
                                             ...);
void        <a href="GtkListStore.html#gtk-list-store-insert-with-valuesv">gtk_list_store_insert_with_valuesv</a>
                                            (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> position,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *columns,
                                             <a
href="../gobject/gobject-Generic-values.html#GValue"
>GValue</a> *values,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_values);
void        <a href="GtkListStore.html#gtk-list-store-prepend">gtk_list_store_prepend</a>          (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter);
void        <a href="GtkListStore.html#gtk-list-store-append">gtk_list_store_append</a>           (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter);
void        <a href="GtkListStore.html#gtk-list-store-clear">gtk_list_store_clear</a>            (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="GtkListStore.html#gtk-list-store-iter-is-valid">gtk_list_store_iter_is_valid</a>    (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter);
void        <a href="GtkListStore.html#gtk-list-store-reorder">gtk_list_store_reorder</a>          (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *store,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *new_order);
void        <a href="GtkListStore.html#gtk-list-store-swap">gtk_list_store_swap</a>             (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *a,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *b);
void        <a href="GtkListStore.html#gtk-list-store-move-before">gtk_list_store_move_before</a>      (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *position);
void        <a href="GtkListStore.html#gtk-list-store-move-after">gtk_list_store_move_after</a>       (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *position);


</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3239437"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">

  <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----GtkListStore
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3239461"></a><h2>Implemented Interfaces</h2>
<p>
GtkListStore implements
 <a href="GtkTreeModel.html" title="GtkTreeModel">GtkTreeModel</a>,  <a href="gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragSource">GtkTreeDragSource</a>,  <a href="gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragDest">GtkTreeDragDest</a> and  <a href="GtkTreeSortable.html" title="GtkTreeSortable">GtkTreeSortable</a>.</p>
</div>
<div class="refsect1" lang="en">
<a name="id3239505"></a><h2>Description</h2>
<p>
The <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> object is a list model for use with a <a href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a>
widget.  It implements the <a href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> interface, and consequentialy,
can use all of the methods available there.  It also implements the
<a href="GtkTreeSortable.html" title="GtkTreeSortable"><span class="type">GtkTreeSortable</span></a> interface so it can be sorted by the view.
Finally, it also implements the tree drag and
drop interfaces.
</p>
<p>
The <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> can accept most GObject types as a column type, though
it can't accept all custom types.  Internally, it will keep a copy of
data passed in (such as a string or a boxed pointer).  Columns that
accept <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>s are handled a little differently.  The
<a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> will keep a reference to the object instead of copying the
value.  As a result, if the object is modified, it is up to the
application writer to call <em class="parameter"><code>gtk_tree_model_row_changed</code></em> to emit the
"row_changed" signal.  This most commonly affects lists with
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>s stored.
</p>
<div class="example">
<a name="id3239617"></a><p class="title"><b>Example&#160;5.&#160;Creating a simple list store.</b></p>
<pre class="programlisting">
enum {
  COLUMN_STRING,
  COLUMN_INT,
  COLUMN_BOOLEAN,
  N_COLUMNS
};

{
  GtkListStore *list_store;
  GtkTreePath *path;
  GtkTreeIter iter;
  gint i;

  list_store = gtk_list_store_new (N_COLUMNS,
                                   G_TYPE_STRING,
                                   G_TYPE_INT,
                                   G_TYPE_BOOLEAN);

  for (i = 0; i &lt; 10; i++)
    {
      gchar *some_data;

      some_data = get_some_data (i);

      /* Add a new row to the model */
      gtk_list_store_append (list_store, &amp;iter);
      gtk_list_store_set (list_store, &amp;iter,
                          COLUMN_STRING, some_data,
                          COLUMN_INT, i,
                          COLUMN_BOOLEAN,  FALSE,
                          -1);

      /* As the store will keep a copy of the string internally, we
       * free some_data.
       */
      g_free (some_data);
    }

  /* Modify a particular row */
  path = gtk_tree_path_new_from_string ("4");
  gtk_tree_model_get_iter (GTK_TREE_MODEL (list_store),
                           &amp;iter,
                           path);
  gtk_tree_path_free (path);
  gtk_list_store_set (list_store, &amp;iter,
                      COLUMN_BOOLEAN, TRUE,
                      -1);
}
</pre>
</div>
<div class="refsect2" lang="en">
<a name="id3239670"></a><h3>Performance Considerations</h3>
<p>
Internally, the <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> was implemented with a linked list with a
tail pointer prior to GTK+ 2.6.  As a result, it was fast at data
insertion and deletion, and not fast at random data access.  The
<a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> sets the <a href="GtkTreeModel.html#GTK-TREE-MODEL-ITERS-PERSIST:CAPS"><span class="type">GTK_TREE_MODEL_ITERS_PERSIST</span></a> flag, which means
that <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>s can be cached while the row exists.  Thus, if
access to a particular row is needed often and your code is expected to
run on older versions of GTK+, it is worth keeping the iter around.
</p>
<h3>Atomic Operations</h3>
<p>
It is important to note that only the methods <em class="parameter"><code>gtk_list_store_insert_with_values</code></em> and
<em class="parameter"><code>gtk_list_store_insert_with_valuesv</code></em> are atomic, in the sense that the row is being appended
to the store and the values filled in in a single operation with regard to <a href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> signaling.
In contrast, using e.g. <em class="parameter"><code>gtk_list_store_append</code></em> and then <em class="parameter"><code>gtk_list_store_set</code></em> will first create a row,
which triggers the "row_inserted" <a href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> signal on <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>. The row, however, is still
empty, and any signal handler connecting to "row_inserted" on this particular store should be prepared
for the situation that the row might be empty.
This is especially important if you are wrapping the <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> inside a <a href="GtkTreeModelFilter.html" title="GtkTreeModelFilter"><span class="type">GtkTreeModelFilter</span></a> and are
using a <a href="GtkTreeModelFilter.html#GtkTreeModelFilterVisibleFunc"><span class="type">GtkTreeModelFilterVisibleFunc</span></a>. Using any of the non-atomic operations to append rows to the <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
will cause the <a href="GtkTreeModelFilter.html#GtkTreeModelFilterVisibleFunc"><span class="type">GtkTreeModelFilterVisibleFunc</span></a> to be visited with an empty row first; the function must be prepared for that.
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3239835"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id3239845"></a><h3>
<a name="GtkListStore-struct"></a>GtkListStore</h3>
<a class="indexterm" name="id3239858"></a><pre class="programlisting">typedef struct _GtkListStore GtkListStore;</pre>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3239874"></a><h3>
<a name="gtk-list-store-new"></a>gtk_list_store_new ()</h3>
<a class="indexterm" name="id3239887"></a><pre class="programlisting"><a href="GtkListStore.html" title="GtkListStore">GtkListStore</a>* gtk_list_store_new            (<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_columns,
                                             ...);</pre>
<p>
Creates a new list store as with <em class="parameter"><code>n_columns</code></em> columns each of the types passed
in.  Note that only types derived from standard GObject fundamental types 
are supported. 
</p>
<p>
As an example, <code class="literal">gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,
GDK_TYPE_PIXBUF);</code> will create a new <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> with three columns, of type
int, string and <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> respectively.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_columns</code></em>&#160;:</span></td>
<td> number of columns in the list store
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></td>
<td> all <a
href="../gobject/gobject-Type-Information.html#GType"
><span class="type">GType</span></a> types for the columns, from first to last
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3240015"></a><h3>
<a name="gtk-list-store-newv"></a>gtk_list_store_newv ()</h3>
<a class="indexterm" name="id3240028"></a><pre class="programlisting"><a href="GtkListStore.html" title="GtkListStore">GtkListStore</a>* gtk_list_store_newv           (<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_columns,
                                             <a
href="../gobject/gobject-Type-Information.html#GType"
>GType</a> *types);</pre>
<p>
Non-vararg creation function.  Used primarily by language bindings.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_columns</code></em>&#160;:</span></td>
<td> number of columns in the list store
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>types</code></em>&#160;:</span></td>
<td> an array of <a
href="../gobject/gobject-Type-Information.html#GType"
><span class="type">GType</span></a> types for the columns, from first to last
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3240128"></a><h3>
<a name="gtk-list-store-set-column-types"></a>gtk_list_store_set_column_types ()</h3>
<a class="indexterm" name="id3240142"></a><pre class="programlisting">void        gtk_list_store_set_column_types (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_columns,
                                             <a
href="../gobject/gobject-Type-Information.html#GType"
>GType</a> *types);</pre>
<p>
This function is meant primarily for <span class="type">GObjects</span> that inherit from <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>,
and should only be used when constructing a new <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.  It will not
function after a row has been added, or a method on the <a href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>
interface is called.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_columns</code></em>&#160;:</span></td>
<td> Number of columns for the list store
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>types</code></em>&#160;:</span></td>
<td> An array length n of <span class="type">GTypes</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3240290"></a><h3>
<a name="gtk-list-store-set"></a>gtk_list_store_set ()</h3>
<a class="indexterm" name="id3240303"></a><pre class="programlisting">void        gtk_list_store_set              (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             ...);</pre>
<p>
Sets the value of one or more cells in the row referenced by <em class="parameter"><code>iter</code></em>.
The variable argument list should contain integer column numbers,
each column number followed by the value to be set.
The list is terminated by a -1. For example, to set column 0 with type
<a
href="../gobject/gobject-Type-Information.html#G-TYPE-STRING:CAPS"
><code class="literal">G_TYPE_STRING</code></a> to "Foo", you would write <code class="literal">gtk_list_store_set (store, iter,
0, "Foo", -1)</code>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> a <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> row iterator
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></td>
<td> pairs of column number and value, terminated with -1
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3240425"></a><h3>
<a name="gtk-list-store-set-valist"></a>gtk_list_store_set_valist ()</h3>
<a class="indexterm" name="id3240439"></a><pre class="programlisting">void        gtk_list_store_set_valist       (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             va_list var_args);</pre>
<p>
See <a href="GtkListStore.html#gtk-list-store-set"><code class="function">gtk_list_store_set()</code></a>; this version takes a va_list for use by language
bindings.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> A valid <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> for the row being modified
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>var_args</code></em>&#160;:</span></td>
<td> va_list of column/value pairs
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3240560"></a><h3>
<a name="gtk-list-store-set-value"></a>gtk_list_store_set_value ()</h3>
<a class="indexterm" name="id3240572"></a><pre class="programlisting">void        gtk_list_store_set_value        (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> column,
                                             <a
href="../gobject/gobject-Generic-values.html#GValue"
>GValue</a> *value);</pre>
<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 convertible to the type of the
column.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> A valid <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> for the row being modified
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>column</code></em>&#160;:</span></td>
<td> column number to modify
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></td>
<td> new value for the cell
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3240723"></a><h3>
<a name="gtk-list-store-remove"></a>gtk_list_store_remove ()</h3>
<a class="indexterm" name="id3240736"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_list_store_remove           (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter);</pre>
<p>
Removes the given row from the list store.  After being removed, 
<em class="parameter"><code>iter</code></em> is set to be the next valid row, or invalidated if it pointed 
to the last row in <em class="parameter"><code>list_store</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> A valid <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>iter</code></em> is valid, <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> if not.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3240874"></a><h3>
<a name="gtk-list-store-insert"></a>gtk_list_store_insert ()</h3>
<a class="indexterm" name="id3240887"></a><pre class="programlisting">void        gtk_list_store_insert           (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> position);</pre>
<p>
Creates a new row at <em class="parameter"><code>position</code></em>.  <em class="parameter"><code>iter</code></em> will be changed to point to this new
row.  If <em class="parameter"><code>position</code></em> is larger than the number of rows on the list, then the
new row will be appended to the list. The row will be empty after this
function is called.  To fill in values, you need to call 
<a href="GtkListStore.html#gtk-list-store-set"><code class="function">gtk_list_store_set()</code></a> or <a href="GtkListStore.html#gtk-list-store-set-value"><code class="function">gtk_list_store_set_value()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> An unset <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the new row
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></td>
<td> position to insert the new row
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3241040"></a><h3>
<a name="gtk-list-store-insert-before"></a>gtk_list_store_insert_before ()</h3>
<a class="indexterm" name="id3241054"></a><pre class="programlisting">void        gtk_list_store_insert_before    (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *sibling);</pre>
<p>
Inserts a new row before <em class="parameter"><code>sibling</code></em>. If <em class="parameter"><code>sibling</code></em> is <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, then the row will 
be appended to the end of the list. <em class="parameter"><code>iter</code></em> will be changed to point to this 
new row. The row will be empty after this function is called. To fill in 
values, you need to call <a href="GtkListStore.html#gtk-list-store-set"><code class="function">gtk_list_store_set()</code></a> or <a href="GtkListStore.html#gtk-list-store-set-value"><code class="function">gtk_list_store_set_value()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> An unset <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the new row
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>sibling</code></em>&#160;:</span></td>
<td> A valid <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3241234"></a><h3>
<a name="gtk-list-store-insert-after"></a>gtk_list_store_insert_after ()</h3>
<a class="indexterm" name="id3241248"></a><pre class="programlisting">void        gtk_list_store_insert_after     (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *sibling);</pre>
<p>
Inserts a new row after <em class="parameter"><code>sibling</code></em>. If <em class="parameter"><code>sibling</code></em> is <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, then the row will be
prepended to the beginning of the list. <em class="parameter"><code>iter</code></em> will be changed to point to
this new row. The row will be empty after this function is called. To fill
in values, you need to call <a href="GtkListStore.html#gtk-list-store-set"><code class="function">gtk_list_store_set()</code></a> or <a href="GtkListStore.html#gtk-list-store-set-value"><code class="function">gtk_list_store_set_value()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> An unset <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the new row
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>sibling</code></em>&#160;:</span></td>
<td> A valid <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3241428"></a><h3>
<a name="gtk-list-store-insert-with-values"></a>gtk_list_store_insert_with_values ()</h3>
<a class="indexterm" name="id3241445"></a><pre class="programlisting">void        gtk_list_store_insert_with_values
                                            (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> position,
                                             ...);</pre>
<p>
Creates a new row at <em class="parameter"><code>position</code></em>.  <em class="parameter"><code>iter</code></em> will be changed to point to this new
row.  If <em class="parameter"><code>position</code></em> is larger than the number of rows on the list, then the
new row will be appended to the list. The row will be filled with the 
values given to this function. 
</p>
<p>
Calling
<code class="literal">gtk_list_store_insert_with_values(list_store, iter, position...)</code> 
has the same effect as calling 
</p>
<div class="informalexample"><pre class="programlisting">
gtk_list_store_insert (list_store, iter, position);
gtk_list_store_set (list_store, iter, ...);
</pre></div>
<p>
with the difference that the former will only emit a row_inserted signal,
while the latter will emit row_inserted, row_changed and, if the list store
is sorted, rows_reordered. Since emitting the rows_reordered signal
repeatedly can affect the performance of the program, 
<a href="GtkListStore.html#gtk-list-store-insert-with-values"><code class="function">gtk_list_store_insert_with_values()</code></a> should generally be preferred when
inserting rows in a sorted list store.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> An unset <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the new row, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></td>
<td> position to insert the new row
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></td>
<td> pairs of column number and value, terminated with -1
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3241642"></a><h3>
<a name="gtk-list-store-insert-with-valuesv"></a>gtk_list_store_insert_with_valuesv ()</h3>
<a class="indexterm" name="id3241659"></a><pre class="programlisting">void        gtk_list_store_insert_with_valuesv
                                            (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> position,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *columns,
                                             <a
href="../gobject/gobject-Generic-values.html#GValue"
>GValue</a> *values,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_values);</pre>
<p>
A variant of <a href="GtkListStore.html#gtk-list-store-insert-with-values"><code class="function">gtk_list_store_insert_with_values()</code></a> which
takes the columns and values as two arrays, instead of
varargs. This function is mainly intended for 
language-bindings.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> An unset <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the new row, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></td>
<td> position to insert the new row
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>columns</code></em>&#160;:</span></td>
<td> an array of column numbers
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>values</code></em>&#160;:</span></td>
<td> an array of GValues 
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_values</code></em>&#160;:</span></td>
<td> the length of the <em class="parameter"><code>columns</code></em> and <em class="parameter"><code>values</code></em> arrays
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3241874"></a><h3>
<a name="gtk-list-store-prepend"></a>gtk_list_store_prepend ()</h3>
<a class="indexterm" name="id3241887"></a><pre class="programlisting">void        gtk_list_store_prepend          (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter);</pre>
<p>
Prepends a new row to <em class="parameter"><code>list_store</code></em>. <em class="parameter"><code>iter</code></em> will be changed to point to this new
row. The row will be empty after this function is called. To fill in
values, you need to call <a href="GtkListStore.html#gtk-list-store-set"><code class="function">gtk_list_store_set()</code></a> or <a href="GtkListStore.html#gtk-list-store-set-value"><code class="function">gtk_list_store_set_value()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> An unset <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the prepend row
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3242010"></a><h3>
<a name="gtk-list-store-append"></a>gtk_list_store_append ()</h3>
<a class="indexterm" name="id3242024"></a><pre class="programlisting">void        gtk_list_store_append           (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter);</pre>
<p>
Appends a new row to <em class="parameter"><code>list_store</code></em>.  <em class="parameter"><code>iter</code></em> will be changed to point to this new
row.  The row will be empty after this function is called.  To fill in
values, you need to call <a href="GtkListStore.html#gtk-list-store-set"><code class="function">gtk_list_store_set()</code></a> or <a href="GtkListStore.html#gtk-list-store-set-value"><code class="function">gtk_list_store_set_value()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> An unset <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the appended row
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3242147"></a><h3>
<a name="gtk-list-store-clear"></a>gtk_list_store_clear ()</h3>
<a class="indexterm" name="id3242160"></a><pre class="programlisting">void        gtk_list_store_clear            (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store);</pre>
<p>
Removes all rows from the list store.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> a <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3242219"></a><h3>
<a name="gtk-list-store-iter-is-valid"></a>gtk_list_store_iter_is_valid ()</h3>
<a class="indexterm" name="id3242235"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_list_store_iter_is_valid    (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter);</pre>
<p>
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>This function is slow. Only use it for debugging and/or testing
purposes.</div>
<p>
</p>
<p>
Checks if the given iter is a valid iter for this <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>list_store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> A <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the iter is valid, <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> if the iter is invalid.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3242374"></a><h3>
<a name="gtk-list-store-reorder"></a>gtk_list_store_reorder ()</h3>
<a class="indexterm" name="id3242389"></a><pre class="programlisting">void        gtk_list_store_reorder          (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *store,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *new_order);</pre>
<p>
Reorders <em class="parameter"><code>store</code></em> to follow the order indicated by <em class="parameter"><code>new_order</code></em>. Note that
this function only works with unsorted stores.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>new_order</code></em>&#160;:</span></td>
<td> an array of integers mapping the new position of each child
     to its old position before the re-ordering,
     i.e. <em class="parameter"><code>new_order</code></em><code class="literal">[newpos] = oldpos</code>.
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3242498"></a><h3>
<a name="gtk-list-store-swap"></a>gtk_list_store_swap ()</h3>
<a class="indexterm" name="id3242514"></a><pre class="programlisting">void        gtk_list_store_swap             (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *a,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *b);</pre>
<p>
Swaps <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em> in <em class="parameter"><code>store</code></em>. Note that this function only works with
unsorted stores.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>a</code></em>&#160;:</span></td>
<td> A <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>b</code></em>&#160;:</span></td>
<td> Another <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3242652"></a><h3>
<a name="gtk-list-store-move-before"></a>gtk_list_store_move_before ()</h3>
<a class="indexterm" name="id3242668"></a><pre class="programlisting">void        gtk_list_store_move_before      (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *position);</pre>
<p>
Moves <em class="parameter"><code>iter</code></em> in <em class="parameter"><code>store</code></em> to the position before <em class="parameter"><code>position</code></em>. Note that this
function only works with unsorted stores. If <em class="parameter"><code>position</code></em> is <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, <em class="parameter"><code>iter</code></em>
will be moved to the end of the list.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> A <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></td>
<td> A <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3242840"></a><h3>
<a name="gtk-list-store-move-after"></a>gtk_list_store_move_after ()</h3>
<a class="indexterm" name="id3242856"></a><pre class="programlisting">void        gtk_list_store_move_after       (<a href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *store,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
                                             <a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *position);</pre>
<p>
Moves <em class="parameter"><code>iter</code></em> in <em class="parameter"><code>store</code></em> to the position after <em class="parameter"><code>position</code></em>. Note that this
function only works with unsorted stores. If <em class="parameter"><code>position</code></em> is <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, <em class="parameter"><code>iter</code></em>
will be moved to the start of the list.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>store</code></em>&#160;:</span></td>
<td> A <a href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></td>
<td> A <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></td>
<td> A <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.2
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3243029"></a><h2>See Also</h2>
<p>
<a href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>, <a href="GtkTreeStore.html" title="GtkTreeStore"><span class="type">GtkTreeStore</span></a>
</p>
</div>
</div>
</body>
</html>

Anon7 - 2021