blob: 21adc5a78b57025261c96c2fe015d28b49e63075 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GAppInfoMonitor: 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="types.html" title="File types and applications">
<link rel="prev" href="GAppInfo.html" title="GAppInfo">
<link rel="next" href="gio-Desktop-file-based-GAppInfo.html" title="GDesktopAppInfo">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#GAppInfoMonitor.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GAppInfoMonitor.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_signals">  <span class="dim">|</span> 
<a href="#GAppInfoMonitor.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="types.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GAppInfo.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gio-Desktop-file-based-GAppInfo.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GAppInfoMonitor"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GAppInfoMonitor.top_of_page"></a>GAppInfoMonitor</span></h2>
<p>GAppInfoMonitor — Monitor application information for changes</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GAppInfoMonitor.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody><tr>
<td class="function_type">
<a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="returnvalue">GAppInfoMonitor</span></a> *
</td>
<td class="function_name">
<a class="link" href="GAppInfoMonitor.html#g-app-info-monitor-get" title="g_app_info_monitor_get ()">g_app_info_monitor_get</a> <span class="c_punctuation">()</span>
</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GAppInfoMonitor.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GAppInfoMonitor.html#GAppInfoMonitor-changed" title="The “changed” signal">changed</a></td>
<td class="signal_flags"><a href="../gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GAppInfoMonitor.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="../gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> GAppInfoMonitor
</pre>
</div>
<div class="refsect1">
<a name="GAppInfoMonitor.description"></a><h2>Description</h2>
<p><a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="type">GAppInfoMonitor</span></a> is a very simple object used for monitoring the app
info database for changes (ie: newly installed or removed
applications).</p>
<p>Call <a class="link" href="GAppInfoMonitor.html#g-app-info-monitor-get" title="g_app_info_monitor_get ()"><code class="function">g_app_info_monitor_get()</code></a> to get a <a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="type">GAppInfoMonitor</span></a> and connect
to the "changed" signal.</p>
<p>In the usual case, applications should try to make note of the change
(doing things like invalidating caches) but not act on it. In
particular, applications should avoid making calls to <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> APIs
in response to the change signal, deferring these until the time that
the data is actually required. The exception to this case is when
application information is actually being displayed on the screen
(eg: during a search or when the list of all applications is shown).
The reason for this is that changes to the list of installed
applications often come in groups (like during system updates) and
rescanning the list on every change is pointless and expensive.</p>
</div>
<div class="refsect1">
<a name="GAppInfoMonitor.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-app-info-monitor-get"></a><h3>g_app_info_monitor_get ()</h3>
<pre class="programlisting"><a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="returnvalue">GAppInfoMonitor</span></a> *
g_app_info_monitor_get (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Gets the <a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="type">GAppInfoMonitor</span></a> for the current thread-default main
context.</p>
<p>The <a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="type">GAppInfoMonitor</span></a> will emit a "changed" signal in the
thread-default main context whenever the list of installed
applications (as reported by <a class="link" href="GAppInfo.html#g-app-info-get-all" title="g_app_info_get_all ()"><code class="function">g_app_info_get_all()</code></a>) may have changed.</p>
<p>You must only call <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> on the return value from under
the same main context as you created it.</p>
<div class="refsect3">
<a name="g-app-info-monitor-get.returns"></a><h4>Returns</h4>
<p> a reference to a <a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="type">GAppInfoMonitor</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-40.html#api-index-2.40">2.40</a></p>
</div>
</div>
<div class="refsect1">
<a name="GAppInfoMonitor.other_details"></a><h2>Types and Values</h2>
</div>
<div class="refsect1">
<a name="GAppInfoMonitor.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GAppInfoMonitor-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="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="type">GAppInfoMonitor</span></a> *arg0,
<a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>Signal emitted when the app info database for changes (ie: newly installed
or removed applications).</p>
<div class="refsect3">
<a name="GAppInfoMonitor-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-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>