<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>XAppFavorites: XApp Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="XApp Reference Manual">
<link rel="up" href="ch01.html" title="API reference">
<link rel="prev" href="ch01.html" title="API reference">
<link rel="next" href="XAppGtkWindow.html" title="XAppGtkWindow">
<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="#XAppFavorites.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#XAppFavorites.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_signals"> <span class="dim">|</span>
<a href="#XAppFavorites.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="XAppGtkWindow.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="XAppFavorites"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="XAppFavorites.top_of_page"></a>XAppFavorites</span></h2>
<p>XAppFavorites — Keeps track of favorite files.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="XAppFavorites.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="XAppFavorites.html" title="XAppFavorites"><span class="returnvalue">XAppFavorites</span></a> *
</td>
<td class="function_name">
<a class="link" href="XAppFavorites.html#xapp-favorites-get-default" title="xapp_favorites_get_default ()">xapp_favorites_get_default</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
</td>
<td class="function_name">
<a class="link" href="XAppFavorites.html#xapp-favorites-get-favorites" title="xapp_favorites_get_favorites ()">xapp_favorites_get_favorites</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="XAppFavorites.html#xapp-favorites-get-n-favorites" title="xapp_favorites_get_n_favorites ()">xapp_favorites_get_n_favorites</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="returnvalue">XAppFavoriteInfo</span></a> *
</td>
<td class="function_name">
<a class="link" href="XAppFavorites.html#xapp-favorites-find-by-display-name" title="xapp_favorites_find_by_display_name ()">xapp_favorites_find_by_display_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="returnvalue">XAppFavoriteInfo</span></a> *
</td>
<td class="function_name">
<a class="link" href="XAppFavorites.html#xapp-favorites-find-by-uri" title="xapp_favorites_find_by_uri ()">xapp_favorites_find_by_uri</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="XAppFavorites.html#xapp-favorites-add" title="xapp_favorites_add ()">xapp_favorites_add</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="XAppFavorites.html#xapp-favorites-remove" title="xapp_favorites_remove ()">xapp_favorites_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="XAppFavorites.html#xapp-favorites-launch" title="xapp_favorites_launch ()">xapp_favorites_launch</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="XAppFavorites.html#xapp-favorites-rename" title="xapp_favorites_rename ()">xapp_favorites_rename</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="returnvalue">XAppFavoriteInfo</span></a> *
</td>
<td class="function_name">
<a class="link" href="XAppFavorites.html#xapp-favorite-info-copy" title="xapp_favorite_info_copy ()">xapp_favorite_info_copy</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="XAppFavorites.html#xapp-favorite-info-free" title="xapp_favorite_info_free ()">xapp_favorite_info_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="XAppFavorites.html#XAppFavoritesItemSelectedCallback" title="XAppFavoritesItemSelectedCallback ()">*XAppFavoritesItemSelectedCallback</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../gtk3/GtkWidget.html#GtkWidget-struct"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="XAppFavorites.html#xapp-favorites-create-menu" title="xapp_favorites_create_menu ()">xapp_favorites_create_menu</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
</td>
<td class="function_name">
<a class="link" href="XAppFavorites.html#xapp-favorites-create-actions" title="xapp_favorites_create_actions ()">xapp_favorites_create_actions</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="XAppFavorites.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signal_proto_type">
<col width="300px" class="signal_proto_name">
<col width="200px" class="signal_proto_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="XAppFavorites.html#XAppFavorites-changed" title="The “changed” signal">changed</a></td>
<td class="signal_flags"><a href="../gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td>
</tr></tbody>
</table></div>
</div>
<a name="XAppFavoriteInfo"></a><div class="refsect1">
<a name="XAppFavorites.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="define_keyword">#define</td>
<td class="function_name"><a class="link" href="XAppFavorites.html#XAPP-TYPE-FAVORITES:CAPS" title="XAPP_TYPE_FAVORITES">XAPP_TYPE_FAVORITES</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="XAppFavorites.html#XAppFavoriteInfo-struct" title="struct XAppFavoriteInfo">XAppFavoriteInfo</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="XAppFavorites.html#XAppFavorites-struct" title="XAppFavorites">XAppFavorites</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="XAppFavorites.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-Boxed-Types.html">GBoxed</a>
<span class="lineart">╰──</span> XAppFavoriteInfo
<a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> XAppFavorites
</pre>
</div>
<div class="refsect1">
<a name="XAppFavorites.description"></a><h2>Description</h2>
<p>The XAppFavorites class allows applications display frequently-used files and
provide a safe mechanism for launching them.</p>
<p>A list of <a href="XAppFavorites.html#XAppFavoriteInfo-struct"><span class="type">XAppFavoriteInfos</span></a> can be retrieved in full, or only for specific mimetypes.</p>
<p>XAppFavorites are new for 2.0</p>
</div>
<div class="refsect1">
<a name="XAppFavorites.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="xapp-favorites-get-default"></a><h3>xapp_favorites_get_default ()</h3>
<pre class="programlisting"><a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="returnvalue">XAppFavorites</span></a> *
xapp_favorites_get_default (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the <a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> instance.</p>
<div class="refsect3">
<a name="xapp-favorites-get-default.returns"></a><h4>Returns</h4>
<p>the XAppFavorites instance for the process. Do not free. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="xapp-favorites-get-favorites"></a><h3>xapp_favorites_get_favorites ()</h3>
<pre class="programlisting"><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
xapp_favorites_get_favorites (<em class="parameter"><code><a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> *favorites</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **mimetypes</code></em>);</pre>
<p>Gets a list of all favorites. If mimetype is not <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the list will
contain only favorites with that mimetype.</p>
<div class="refsect3">
<a name="xapp-favorites-get-favorites.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>favorites</p></td>
<td class="parameter_description"><p>The <a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mimetypes</p></td>
<td class="parameter_description"><p>The mimetypes to filter by for results. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="xapp-favorites-get-favorites.returns"></a><h4>Returns</h4>
<p>a list of <a href="XAppFavorites.html#XAppFavoriteInfo-struct"><span class="type">XAppFavoriteInfos</span></a>.
Free the list with <a href="../glib/glib-Doubly-Linked-Lists.html#g-list-free"><span class="type">g_list_free</span></a>, free elements with <a class="link" href="XAppFavorites.html#xapp-favorite-info-free" title="xapp_favorite_info_free ()"><span class="type">xapp_favorite_info_free</span></a>. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> XAppFavoriteInfo][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="xapp-favorites-get-n-favorites"></a><h3>xapp_favorites_get_n_favorites ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
xapp_favorites_get_n_favorites (<em class="parameter"><code><a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> *favorites</code></em>);</pre>
<div class="refsect3">
<a name="xapp-favorites-get-n-favorites.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>favorites</p></td>
<td class="parameter_description"><p>The <a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="xapp-favorites-get-n-favorites.returns"></a><h4>Returns</h4>
<p> The number of favorite files</p>
</div>
<p class="since">Since: 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="xapp-favorites-find-by-display-name"></a><h3>xapp_favorites_find_by_display_name ()</h3>
<pre class="programlisting"><a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="returnvalue">XAppFavoriteInfo</span></a> *
xapp_favorites_find_by_display_name (<em class="parameter"><code><a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> *favorites</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *display_name</code></em>);</pre>
<p>Looks for an XAppFavoriteInfo that corresponds to <em class="parameter"><code>display_name</code></em>
.</p>
<div class="refsect3">
<a name="xapp-favorites-find-by-display-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>favorites</p></td>
<td class="parameter_description"><p>The <a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>display_name</p></td>
<td class="parameter_description"><p>The display name to lookup info for. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="xapp-favorites-find-by-display-name.returns"></a><h4>Returns</h4>
<p>an XAppFavoriteInfo or NULL if one was not found. This is owned
by the favorites manager and should not be freed. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="xapp-favorites-find-by-uri"></a><h3>xapp_favorites_find_by_uri ()</h3>
<pre class="programlisting"><a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="returnvalue">XAppFavoriteInfo</span></a> *
xapp_favorites_find_by_uri (<em class="parameter"><code><a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> *favorites</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>);</pre>
<p>Looks for an XAppFavoriteInfo that corresponds to <em class="parameter"><code>uri</code></em>
.</p>
<div class="refsect3">
<a name="xapp-favorites-find-by-uri.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>favorites</p></td>
<td class="parameter_description"><p>The <a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The uri to lookup info for. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="xapp-favorites-find-by-uri.returns"></a><h4>Returns</h4>
<p>an XAppFavoriteInfo or NULL if one was not found. This is owned
by the favorites manager and should not be freed. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="xapp-favorites-add"></a><h3>xapp_favorites_add ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
xapp_favorites_add (<em class="parameter"><code><a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> *favorites</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>);</pre>
<p>Adds a new favorite. If the uri already exists, this does nothing.</p>
<div class="refsect3">
<a name="xapp-favorites-add.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>favorites</p></td>
<td class="parameter_description"><p>The <a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The uri the favorite is for</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="xapp-favorites-remove"></a><h3>xapp_favorites_remove ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
xapp_favorites_remove (<em class="parameter"><code><a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> *favorites</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>);</pre>
<p>Removes a favorite from the list.</p>
<div class="refsect3">
<a name="xapp-favorites-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>favorites</p></td>
<td class="parameter_description"><p>The <a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The uri for the favorite being removed</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="xapp-favorites-launch"></a><h3>xapp_favorites_launch ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
xapp_favorites_launch (<em class="parameter"><code><a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> *favorites</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> timestamp</code></em>);</pre>
<p>Opens a favorite in its default app.</p>
<div class="refsect3">
<a name="xapp-favorites-launch.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>favorites</p></td>
<td class="parameter_description"><p>The <a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>The uri for the favorite to launch</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timestamp</p></td>
<td class="parameter_description"><p>The timestamp from an event or 0</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="xapp-favorites-rename"></a><h3>xapp_favorites_rename ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
xapp_favorites_rename (<em class="parameter"><code><a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> *favorites</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *old_uri</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *new_uri</code></em>);</pre>
<p>Removes old_uri and adds new_uri. This is mainly for file managers to use as
a convenience instead of add/remove, and guarantees the result, without having to
worry about multiple dbus calls (gsettings).</p>
<div class="refsect3">
<a name="xapp-favorites-rename.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>old_uri</p></td>
<td class="parameter_description"><p>the old favorite's uri.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>new_uri</p></td>
<td class="parameter_description"><p>The new uri.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="xapp-favorite-info-copy"></a><h3>xapp_favorite_info_copy ()</h3>
<pre class="programlisting"><a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="returnvalue">XAppFavoriteInfo</span></a> *
xapp_favorite_info_copy (<em class="parameter"><code>const <a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="type">XAppFavoriteInfo</span></a> *info</code></em>);</pre>
<p>Makes an exact copy of an existing <a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="type">XAppFavoriteInfo</span></a>.</p>
<div class="refsect3">
<a name="xapp-favorite-info-copy.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>info</p></td>
<td class="parameter_description"><p>The <a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="type">XAppFavoriteInfo</span></a> to duplicate.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="xapp-favorite-info-copy.returns"></a><h4>Returns</h4>
<p>a new <a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="type">XAppFavoriteInfo</span></a>. Free using <a class="link" href="XAppFavorites.html#xapp-favorite-info-free" title="xapp_favorite_info_free ()"><span class="type">xapp_favorite_info_free</span></a>.</p>
<p>Since 2.0. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="xapp-favorite-info-free"></a><h3>xapp_favorite_info_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
xapp_favorite_info_free (<em class="parameter"><code><a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="type">XAppFavoriteInfo</span></a> *info</code></em>);</pre>
<p>Destroys the <a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="type">XAppFavoriteInfo</span></a>.</p>
<p>Since 2.0</p>
<div class="refsect3">
<a name="xapp-favorite-info-free.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>info</p></td>
<td class="parameter_description"><p>The <a class="link" href="XAppFavorites.html#XAppFavoriteInfo"><span class="type">XAppFavoriteInfo</span></a> to free.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="XAppFavoritesItemSelectedCallback"></a><h3>XAppFavoritesItemSelectedCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*XAppFavoritesItemSelectedCallback<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> *favorites</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="xapp-favorites-create-menu"></a><h3>xapp_favorites_create_menu ()</h3>
<pre class="programlisting"><a href="../gtk3/GtkWidget.html#GtkWidget-struct"><span class="returnvalue">GtkWidget</span></a> *
xapp_favorites_create_menu (<em class="parameter"><code><a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> *favorites</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **mimetypes</code></em>,
<em class="parameter"><code><a class="link" href="XAppFavorites.html#XAppFavoritesItemSelectedCallback" title="XAppFavoritesItemSelectedCallback ()"><span class="type">XAppFavoritesItemSelectedCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
<em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> func</code></em>);</pre>
<p>Generates a GtkMenu widget populated with favorites. The callback will be called when
a menu item has been activated, and will include the uri of the respective item.</p>
<div class="refsect3">
<a name="xapp-favorites-create-menu.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>favorites</p></td>
<td class="parameter_description"><p>The <a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> instance.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mimetypes</p></td>
<td class="parameter_description"><p>The mimetypes to filter for, or NULL to include all favorites. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>(closure user_data): The callback to use when a menu item has been selected. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until the GDestroyNotify argument is called."><span class="acronym">scope notified</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>The data to pass to the callback. </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>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>Destroy function for user_data</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="xapp-favorites-create-menu.returns"></a><h4>Returns</h4>
<p>a new <a href="../gtk3/GtkMenu.html#GtkMenu-struct"><span class="type">GtkMenu</span></a> populated with a list of favorites, or NULL
if there are no favorites. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="xapp-favorites-create-actions"></a><h3>xapp_favorites_create_actions ()</h3>
<pre class="programlisting"><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
xapp_favorites_create_actions (<em class="parameter"><code><a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> *favorites</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **mimetypes</code></em>);</pre>
<p>Generates a list of favorite GtkActions.</p>
<div class="refsect3">
<a name="xapp-favorites-create-actions.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>favorites</p></td>
<td class="parameter_description"><p>The <a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> instance.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mimetypes</p></td>
<td class="parameter_description"><p>The mimetypes to filter for, or NULL to include all favorites. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="xapp-favorites-create-actions.returns"></a><h4>Returns</h4>
<p>a new <a href="../gtk3/GtkActionGroup.html#GtkActionGroup-struct"><span class="type">GtkActionGroup</span></a> populated with a list of favorites, or NULL
if there are no favorites. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Gtk.Action][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.0</p>
</div>
</div>
<div class="refsect1">
<a name="XAppFavorites.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="XAPP-TYPE-FAVORITES:CAPS"></a><h3>XAPP_TYPE_FAVORITES</h3>
<pre class="programlisting">#define XAPP_TYPE_FAVORITES (xapp_favorites_get_type ())
</pre>
</div>
<hr>
<div class="refsect2">
<a name="XAppFavoriteInfo-struct"></a><h3>struct XAppFavoriteInfo</h3>
<pre class="programlisting">struct XAppFavoriteInfo {
gchar *uri;
gchar *display_name;
gchar *cached_mimetype;
};
</pre>
<p>Information related to a single favorite file.</p>
<div class="refsect3">
<a name="XAppFavoriteInfo.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="XAppFavoriteInfo-struct.uri"></a>uri</code></em>;</p></td>
<td class="struct_member_description"><p>The uri to the favorite file.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="XAppFavoriteInfo-struct.display-name"></a>display_name</code></em>;</p></td>
<td class="struct_member_description"><p>The name for use when displaying the item. This may not exactly match
the filename if there are files with the same name but in different folders.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="XAppFavoriteInfo-struct.cached-mimetype"></a>cached_mimetype</code></em>;</p></td>
<td class="struct_member_description"><p>The mimetype calculated for the uri when it was added to favorites.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="XAppFavorites-struct"></a><h3>XAppFavorites</h3>
<pre class="programlisting">typedef struct _XAppFavorites XAppFavorites;</pre>
</div>
</div>
<div class="refsect1">
<a name="XAppFavorites.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="XAppFavorites-changed"></a><h3>The <code class="literal">“changed”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="XAppFavorites.html" title="XAppFavorites"><span class="type">XAppFavorites</span></a> *xappfavorites,
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>Notifies when the favorites list has changed.</p>
<div class="refsect3">
<a name="XAppFavorites-changed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p>Flags: <a href="../gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>