Imported Upstream version 2.50.2
[platform/upstream/glib.git] / docs / reference / gio / html / GAppInfoMonitor.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GAppInfoMonitor: GIO Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="types.html" title="File types and applications">
9 <link rel="prev" href="GAppInfo.html" title="GAppInfo">
10 <link rel="next" href="gio-Desktop-file-based-GAppInfo.html" title="GDesktopAppInfo">
11 <meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#GAppInfoMonitor.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
19                   <a href="#GAppInfoMonitor.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_signals">  <span class="dim">|</span> 
20                   <a href="#GAppInfoMonitor.signals" class="shortcut">Signals</a></span>
21 </td>
22 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
23 <td><a accesskey="u" href="types.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
24 <td><a accesskey="p" href="GAppInfo.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
25 <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>
26 </tr></table>
27 <div class="refentry">
28 <a name="GAppInfoMonitor"></a><div class="titlepage"></div>
29 <div class="refnamediv"><table width="100%"><tr>
30 <td valign="top">
31 <h2><span class="refentrytitle"><a name="GAppInfoMonitor.top_of_page"></a>GAppInfoMonitor</span></h2>
32 <p>GAppInfoMonitor — Monitor application information for changes</p>
33 </td>
34 <td class="gallery_image" valign="top" align="right"></td>
35 </tr></table></div>
36 <div class="refsect1">
37 <a name="GAppInfoMonitor.functions"></a><h2>Functions</h2>
38 <div class="informaltable"><table class="informaltable" width="100%" border="0">
39 <colgroup>
40 <col width="150px" class="functions_return">
41 <col class="functions_name">
42 </colgroup>
43 <tbody><tr>
44 <td class="function_type">
45 <a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="returnvalue">GAppInfoMonitor</span></a> *
46 </td>
47 <td class="function_name">
48 <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>
49 </td>
50 </tr></tbody>
51 </table></div>
52 </div>
53 <div class="refsect1">
54 <a name="GAppInfoMonitor.signals"></a><h2>Signals</h2>
55 <div class="informaltable"><table class="informaltable" border="0">
56 <colgroup>
57 <col width="150px" class="signals_return">
58 <col width="300px" class="signals_name">
59 <col width="200px" class="signals_flags">
60 </colgroup>
61 <tbody><tr>
62 <td class="signal_type"><span class="returnvalue">void</span></td>
63 <td class="signal_name"><a class="link" href="GAppInfoMonitor.html#GAppInfoMonitor-changed" title="The “changed” signal">changed</a></td>
64 <td class="signal_flags"><a href="../gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></td>
65 </tr></tbody>
66 </table></div>
67 </div>
68 <div class="refsect1">
69 <a name="GAppInfoMonitor.object-hierarchy"></a><h2>Object Hierarchy</h2>
70 <pre class="screen">    <a href="../gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
71     <span class="lineart">╰──</span> GAppInfoMonitor
72 </pre>
73 </div>
74 <div class="refsect1">
75 <a name="GAppInfoMonitor.description"></a><h2>Description</h2>
76 <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
77 info database for changes (ie: newly installed or removed
78 applications).</p>
79 <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
80 to the "changed" signal.</p>
81 <p>In the usual case, applications should try to make note of the change
82 (doing things like invalidating caches) but not act on it.  In
83 particular, applications should avoid making calls to <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> APIs
84 in response to the change signal, deferring these until the time that
85 the data is actually required.  The exception to this case is when
86 application information is actually being displayed on the screen
87 (eg: during a search or when the list of all applications is shown).
88 The reason for this is that changes to the list of installed
89 applications often come in groups (like during system updates) and
90 rescanning the list on every change is pointless and expensive.</p>
91 </div>
92 <div class="refsect1">
93 <a name="GAppInfoMonitor.functions_details"></a><h2>Functions</h2>
94 <div class="refsect2">
95 <a name="g-app-info-monitor-get"></a><h3>g_app_info_monitor_get ()</h3>
96 <pre class="programlisting"><a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="returnvalue">GAppInfoMonitor</span></a> *
97 g_app_info_monitor_get (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
98 <p>Gets the <a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="type">GAppInfoMonitor</span></a> for the current thread-default main
99 context.</p>
100 <p>The <a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="type">GAppInfoMonitor</span></a> will emit a "changed" signal in the
101 thread-default main context whenever the list of installed
102 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>
103 <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
104 the same main context as you created it.</p>
105 <div class="refsect3">
106 <a name="g-app-info-monitor-get.returns"></a><h4>Returns</h4>
107 <p> a reference to a <a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="type">GAppInfoMonitor</span></a>. </p>
108 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
109 </div>
110 <p class="since">Since: <a class="link" href="api-index-2-40.html#api-index-2.40">2.40</a></p>
111 </div>
112 </div>
113 <div class="refsect1">
114 <a name="GAppInfoMonitor.other_details"></a><h2>Types and Values</h2>
115 </div>
116 <div class="refsect1">
117 <a name="GAppInfoMonitor.signal-details"></a><h2>Signal Details</h2>
118 <div class="refsect2">
119 <a name="GAppInfoMonitor-changed"></a><h3>The <code class="literal">“changed”</code> signal</h3>
120 <pre class="programlisting"><span class="returnvalue">void</span>
121 user_function (<a class="link" href="GAppInfoMonitor.html" title="GAppInfoMonitor"><span class="type">GAppInfoMonitor</span></a> *arg0,
122                <a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>         user_data)</pre>
123 <p>Signal emitted when the app info database for changes (ie: newly installed
124 or removed applications).</p>
125 <div class="refsect3">
126 <a name="GAppInfoMonitor-changed.parameters"></a><h4>Parameters</h4>
127 <div class="informaltable"><table class="informaltable" width="100%" border="0">
128 <colgroup>
129 <col width="150px" class="parameters_name">
130 <col class="parameters_description">
131 <col width="200px" class="parameters_annotations">
132 </colgroup>
133 <tbody><tr>
134 <td class="parameter_name"><p>user_data</p></td>
135 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
136 <td class="parameter_annotations"> </td>
137 </tr></tbody>
138 </table></div>
139 </div>
140 <p>Flags: <a href="../gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></p>
141 </div>
142 </div>
143 </div>
144 <div class="footer">
145 <hr>Generated by GTK-Doc V1.25.1</div>
146 </body>
147 </html>