⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.10
Server IP:
157.245.101.34
Server:
Linux skvinfotech-website 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
gtk-doc
/
html
/
gio
/
View File Name :
GListStore.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>GListStore: GIO Reference Manual</title> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="index.html" title="GIO Reference Manual"> <link rel="up" href="data-models.html" title="Data Models"> <link rel="prev" href="GListModel.html" title="GListModel"> <link rel="next" href="application.html" title="Application support"> <meta name="generator" content="GTK-Doc V1.32 (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="#GListStore.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> <a href="#GListStore.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span> <a href="#GListStore.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span> <a href="#GListStore.properties" class="shortcut">Properties</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="data-models.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="GListModel.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="application.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="GListStore"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="GListStore.top_of_page"></a>GListStore</span></h2> <p>GListStore — A simple implementation of <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a></p> </td> <td class="gallery_image" valign="top" align="right"></td> </tr></table></div> <div class="refsect1"> <a name="GListStore.functions"></a><h2>Functions</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="functions_proto_type"> <col class="functions_proto_name"> </colgroup> <tbody> <tr> <td class="function_type"> <a class="link" href="GListStore.html" title="GListStore"><span class="returnvalue">GListStore</span></a> * </td> <td class="function_name"> <a class="link" href="GListStore.html#g-list-store-new" title="g_list_store_new ()">g_list_store_new</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GListStore.html#g-list-store-insert" title="g_list_store_insert ()">g_list_store_insert</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="GListStore.html#g-list-store-insert-sorted" title="g_list_store_insert_sorted ()">g_list_store_insert_sorted</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="GListStore.html#g-list-store-append" title="g_list_store_append ()">g_list_store_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="GListStore.html#g-list-store-remove" title="g_list_store_remove ()">g_list_store_remove</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="GListStore.html#g-list-store-remove-all" title="g_list_store_remove_all ()">g_list_store_remove_all</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="GListStore.html#g-list-store-splice" title="g_list_store_splice ()">g_list_store_splice</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="GListStore.html#g-list-store-sort" title="g_list_store_sort ()">g_list_store_sort</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="GListStore.html#g-list-store-find" title="g_list_store_find ()">g_list_store_find</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="GListStore.html#g-list-store-find-with-equal-func" title="g_list_store_find_with_equal_func ()">g_list_store_find_with_equal_func</a> <span class="c_punctuation">()</span> </td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GListStore.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">GType</span> *</td> <td class="property_name"><a class="link" href="GListStore.html#GListStore--item-type" title="The “item-type” property">item-type</a></td> <td class="property_flags">Read / Write / Construct Only</td> </tr></tbody> </table></div> </div> <div class="refsect1"> <a name="GListStore.other"></a><h2>Types and Values</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="other_proto_type"> <col class="other_proto_name"> </colgroup> <tbody><tr> <td class="datatype_keyword"> </td> <td class="function_name"><a class="link" href="GListStore.html#GListStore-struct" title="GListStore">GListStore</a></td> </tr></tbody> </table></div> </div> <div class="refsect1"> <a name="GListStore.object-hierarchy"></a><h2>Object Hierarchy</h2> <pre class="screen"> GObject <span class="lineart">╰──</span> GListStore </pre> </div> <div class="refsect1"> <a name="GListStore.implemented-interfaces"></a><h2>Implemented Interfaces</h2> <p> GListStore implements <a class="link" href="GListModel.html" title="GListModel">GListModel</a>.</p> </div> <div class="refsect1"> <a name="GListStore.includes"></a><h2>Includes</h2> <pre class="synopsis">#include <gio/gio.h> </pre> </div> <div class="refsect1"> <a name="GListStore.description"></a><h2>Description</h2> <p><a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a> is a simple implementation of <a class="link" href="GListModel.html" title="GListModel"><span class="type">GListModel</span></a> that stores all items in memory.</p> <p>It provides insertions, deletions, and lookups in logarithmic time with a fast path for the common case of iterating the list linearly.</p> </div> <div class="refsect1"> <a name="GListStore.functions_details"></a><h2>Functions</h2> <div class="refsect2"> <a name="g-list-store-new"></a><h3>g_list_store_new ()</h3> <pre class="programlisting"><a class="link" href="GListStore.html" title="GListStore"><span class="returnvalue">GListStore</span></a> * g_list_store_new (<em class="parameter"><code><span class="type">GType</span> item_type</code></em>);</pre> <p>Creates a new <a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a> with items of type <em class="parameter"><code>item_type</code></em> . <em class="parameter"><code>item_type</code></em> must be a subclass of <span class="type">GObject</span>.</p> <div class="refsect3"> <a name="g-list-store-new.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>item_type</p></td> <td class="parameter_description"><p>the <span class="type">GType</span> of items in the list</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-list-store-new.returns"></a><h4>Returns</h4> <p> a new <a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a></p> </div> <p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p> </div> <hr> <div class="refsect2"> <a name="g-list-store-insert"></a><h3>g_list_store_insert ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_list_store_insert (<em class="parameter"><code><a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a> *store</code></em>, <em class="parameter"><code><span class="type">guint</span> position</code></em>, <em class="parameter"><code><span class="type">gpointer</span> item</code></em>);</pre> <p>Inserts <em class="parameter"><code>item</code></em> into <em class="parameter"><code>store</code></em> at <em class="parameter"><code>position</code></em> . <em class="parameter"><code>item</code></em> must be of type <a class="link" href="GListStore.html#GListStore--item-type" title="The “item-type” property"><span class="type">“item-type”</span></a> or derived from it. <em class="parameter"><code>position</code></em> must be smaller than the length of the list, or equal to it to append.</p> <p>This function takes a ref on <em class="parameter"><code>item</code></em> .</p> <p>Use <a class="link" href="GListStore.html#g-list-store-splice" title="g_list_store_splice ()"><code class="function">g_list_store_splice()</code></a> to insert multiple items at the same time efficiently.</p> <div class="refsect3"> <a name="g-list-store-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>store</p></td> <td class="parameter_description"><p>a <a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>position</p></td> <td class="parameter_description"><p>the position at which to insert the new item</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>item</p></td> <td class="parameter_description"><p>the new item. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject]</span></td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p> </div> <hr> <div class="refsect2"> <a name="g-list-store-insert-sorted"></a><h3>g_list_store_insert_sorted ()</h3> <pre class="programlisting"><span class="returnvalue">guint</span> g_list_store_insert_sorted (<em class="parameter"><code><a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a> *store</code></em>, <em class="parameter"><code><span class="type">gpointer</span> item</code></em>, <em class="parameter"><code><span class="type">GCompareDataFunc</span> compare_func</code></em>, <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre> <p>Inserts <em class="parameter"><code>item</code></em> into <em class="parameter"><code>store</code></em> at a position to be determined by the <em class="parameter"><code>compare_func</code></em> .</p> <p>The list must already be sorted before calling this function or the result is undefined. Usually you would approach this by only ever inserting items by way of this function.</p> <p>This function takes a ref on <em class="parameter"><code>item</code></em> .</p> <div class="refsect3"> <a name="g-list-store-insert-sorted.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>store</p></td> <td class="parameter_description"><p>a <a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>item</p></td> <td class="parameter_description"><p>the new item. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject]</span></td> </tr> <tr> <td class="parameter_name"><p>compare_func</p></td> <td class="parameter_description"><p>pairwise comparison function for sorting. </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 for <em class="parameter"><code>compare_func</code></em> . </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-list-store-insert-sorted.returns"></a><h4>Returns</h4> <p> the position at which <em class="parameter"><code>item</code></em> was inserted</p> </div> <p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p> </div> <hr> <div class="refsect2"> <a name="g-list-store-append"></a><h3>g_list_store_append ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_list_store_append (<em class="parameter"><code><a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a> *store</code></em>, <em class="parameter"><code><span class="type">gpointer</span> item</code></em>);</pre> <p>Appends <em class="parameter"><code>item</code></em> to <em class="parameter"><code>store</code></em> . <em class="parameter"><code>item</code></em> must be of type <a class="link" href="GListStore.html#GListStore--item-type" title="The “item-type” property"><span class="type">“item-type”</span></a>.</p> <p>This function takes a ref on <em class="parameter"><code>item</code></em> .</p> <p>Use <a class="link" href="GListStore.html#g-list-store-splice" title="g_list_store_splice ()"><code class="function">g_list_store_splice()</code></a> to append multiple items at the same time efficiently.</p> <div class="refsect3"> <a name="g-list-store-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>store</p></td> <td class="parameter_description"><p>a <a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>item</p></td> <td class="parameter_description"><p>the new item. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject]</span></td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p> </div> <hr> <div class="refsect2"> <a name="g-list-store-remove"></a><h3>g_list_store_remove ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_list_store_remove (<em class="parameter"><code><a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a> *store</code></em>, <em class="parameter"><code><span class="type">guint</span> position</code></em>);</pre> <p>Removes the item from <em class="parameter"><code>store</code></em> that is at <em class="parameter"><code>position</code></em> . <em class="parameter"><code>position</code></em> must be smaller than the current length of the list.</p> <p>Use <a class="link" href="GListStore.html#g-list-store-splice" title="g_list_store_splice ()"><code class="function">g_list_store_splice()</code></a> to remove multiple items at the same time efficiently.</p> <div class="refsect3"> <a name="g-list-store-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>store</p></td> <td class="parameter_description"><p>a <a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>position</p></td> <td class="parameter_description"><p>the position of the item that is to be removed</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p> </div> <hr> <div class="refsect2"> <a name="g-list-store-remove-all"></a><h3>g_list_store_remove_all ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_list_store_remove_all (<em class="parameter"><code><a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a> *store</code></em>);</pre> <p>Removes all items from <em class="parameter"><code>store</code></em> .</p> <div class="refsect3"> <a name="g-list-store-remove-all.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>store</p></td> <td class="parameter_description"><p>a <a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p> </div> <hr> <div class="refsect2"> <a name="g-list-store-splice"></a><h3>g_list_store_splice ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_list_store_splice (<em class="parameter"><code><a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a> *store</code></em>, <em class="parameter"><code><span class="type">guint</span> position</code></em>, <em class="parameter"><code><span class="type">guint</span> n_removals</code></em>, <em class="parameter"><code><span class="type">gpointer</span> *additions</code></em>, <em class="parameter"><code><span class="type">guint</span> n_additions</code></em>);</pre> <p>Changes <em class="parameter"><code>store</code></em> by removing <em class="parameter"><code>n_removals</code></em> items and adding <em class="parameter"><code>n_additions</code></em> items to it. <em class="parameter"><code>additions</code></em> must contain <em class="parameter"><code>n_additions</code></em> items of type <a class="link" href="GListStore.html#GListStore--item-type" title="The “item-type” property"><span class="type">“item-type”</span></a>. <code class="literal">NULL</code> is not permitted.</p> <p>This function is more efficient than <a class="link" href="GListStore.html#g-list-store-insert" title="g_list_store_insert ()"><code class="function">g_list_store_insert()</code></a> and <a class="link" href="GListStore.html#g-list-store-remove" title="g_list_store_remove ()"><code class="function">g_list_store_remove()</code></a>, because it only emits <a class="link" href="GListModel.html#GListModel-items-changed" title="The “items-changed” signal"><span class="type">“items-changed”</span></a> once for the change.</p> <p>This function takes a ref on each item in <em class="parameter"><code>additions</code></em> .</p> <p>The parameters <em class="parameter"><code>position</code></em> and <em class="parameter"><code>n_removals</code></em> must be correct (ie: <em class="parameter"><code>position</code></em> + <em class="parameter"><code>n_removals</code></em> must be less than or equal to the length of the list at the time this function is called).</p> <div class="refsect3"> <a name="g-list-store-splice.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>store</p></td> <td class="parameter_description"><p>a <a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>position</p></td> <td class="parameter_description"><p>the position at which to make the change</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>n_removals</p></td> <td class="parameter_description"><p>the number of items to remove</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>additions</p></td> <td class="parameter_description"><p>the items to add. </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_additions][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GObject]</span></td> </tr> <tr> <td class="parameter_name"><p>n_additions</p></td> <td class="parameter_description"><p>the number of items to add</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p> </div> <hr> <div class="refsect2"> <a name="g-list-store-sort"></a><h3>g_list_store_sort ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_list_store_sort (<em class="parameter"><code><a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a> *store</code></em>, <em class="parameter"><code><span class="type">GCompareDataFunc</span> compare_func</code></em>, <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre> <p>Sort the items in <em class="parameter"><code>store</code></em> according to <em class="parameter"><code>compare_func</code></em> .</p> <div class="refsect3"> <a name="g-list-store-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>store</p></td> <td class="parameter_description"><p>a <a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>compare_func</p></td> <td class="parameter_description"><p>pairwise comparison function for sorting. </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 for <em class="parameter"><code>compare_func</code></em> . </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-46.html#api-index-2.46">2.46</a></p> </div> <hr> <div class="refsect2"> <a name="g-list-store-find"></a><h3>g_list_store_find ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_list_store_find (<em class="parameter"><code><a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a> *store</code></em>, <em class="parameter"><code><span class="type">gpointer</span> item</code></em>, <em class="parameter"><code><span class="type">guint</span> *position</code></em>);</pre> <p>Looks up the given <em class="parameter"><code>item</code></em> in the list store by looping over the items until the first occurrence of <em class="parameter"><code>item</code></em> . If <em class="parameter"><code>item</code></em> was not found, then <em class="parameter"><code>position</code></em> will not be set, and this method will return <code class="literal">FALSE</code>.</p> <p>If you need to compare the two items with a custom comparison function, use <a class="link" href="GListStore.html#g-list-store-find-with-equal-func" title="g_list_store_find_with_equal_func ()"><code class="function">g_list_store_find_with_equal_func()</code></a> with a custom <span class="type">GEqualFunc</span> instead.</p> <div class="refsect3"> <a name="g-list-store-find.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>store</p></td> <td class="parameter_description"><p>a <a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>item</p></td> <td class="parameter_description"><p>an item. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject]</span></td> </tr> <tr> <td class="parameter_name"><p>position</p></td> <td class="parameter_description"><p>the first position of <em class="parameter"><code>item</code></em> , if it was found. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-list-store-find.returns"></a><h4>Returns</h4> <p> Whether <em class="parameter"><code>store</code></em> contains <em class="parameter"><code>item</code></em> . If it was found, <em class="parameter"><code>position</code></em> will be set to the position where <em class="parameter"><code>item</code></em> occurred for the first time.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-64.html#api-index-2.64">2.64</a></p> </div> <hr> <div class="refsect2"> <a name="g-list-store-find-with-equal-func"></a><h3>g_list_store_find_with_equal_func ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_list_store_find_with_equal_func (<em class="parameter"><code><a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a> *store</code></em>, <em class="parameter"><code><span class="type">gpointer</span> item</code></em>, <em class="parameter"><code><span class="type">GEqualFunc</span> equal_func</code></em>, <em class="parameter"><code><span class="type">guint</span> *position</code></em>);</pre> <p>Looks up the given <em class="parameter"><code>item</code></em> in the list store by looping over the items and comparing them with <em class="parameter"><code>compare_func</code></em> until the first occurrence of <em class="parameter"><code>item</code></em> which matches. If <em class="parameter"><code>item</code></em> was not found, then <em class="parameter"><code>position</code></em> will not be set, and this method will return <code class="literal">FALSE</code>.</p> <div class="refsect3"> <a name="g-list-store-find-with-equal-func.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>store</p></td> <td class="parameter_description"><p>a <a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>item</p></td> <td class="parameter_description"><p>an item. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject]</span></td> </tr> <tr> <td class="parameter_name"><p>equal_func</p></td> <td class="parameter_description"><p>A custom equality check function. </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>position</p></td> <td class="parameter_description"><p>the first position of <em class="parameter"><code>item</code></em> , if it was found. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-list-store-find-with-equal-func.returns"></a><h4>Returns</h4> <p> Whether <em class="parameter"><code>store</code></em> contains <em class="parameter"><code>item</code></em> . If it was found, <em class="parameter"><code>position</code></em> will be set to the position where <em class="parameter"><code>item</code></em> occurred for the first time.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-64.html#api-index-2.64">2.64</a></p> </div> </div> <div class="refsect1"> <a name="GListStore.other_details"></a><h2>Types and Values</h2> <div class="refsect2"> <a name="GListStore-struct"></a><h3>GListStore</h3> <pre class="programlisting">typedef struct _GListStore GListStore;</pre> <p><a class="link" href="GListStore.html" title="GListStore"><span class="type">GListStore</span></a> is an opaque data structure and can only be accessed using the following functions.</p> </div> </div> <div class="refsect1"> <a name="GListStore.property-details"></a><h2>Property Details</h2> <div class="refsect2"> <a name="GListStore--item-type"></a><h3>The <code class="literal">“item-type”</code> property</h3> <pre class="programlisting"> “item-type” <span class="type">GType</span> *</pre> <p>The type of items contained in this list store. Items must be subclasses of <span class="type">GObject</span>.</p> <p>Owner: GListStore</p> <p>Flags: Read / Write / Construct Only</p> <p>Allowed values: GObject</p> <p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p> </div> </div> </div> <div class="footer"> <hr>Generated by GTK-Doc V1.32</div> </body> </html>