4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>XfceDesktopEntry</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7
7
<link rel="home" href="index.html" title="libxfce4util Reference Manual">
8
8
<link rel="up" href="libxfce4util-core.html" title="Xfce Core Application support">
9
9
<link rel="prev" href="libxfce4util-core.html" title="Xfce Core Application support">
10
10
<link rel="next" href="libxfce4util-Xfce-Kiosk-functions.html" title="Xfce Kiosk functions">
11
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
28
28
<a href="#libxfce4util-Desktop-entries.object-hierarchy" class="shortcut">Object Hierarchy</a>
31
<div class="refentry" title="XfceDesktopEntry">
31
<div class="refentry">
32
32
<a name="libxfce4util-Desktop-entries"></a><div class="titlepage"></div>
33
33
<div class="refnamediv"><table width="100%"><tr>
38
38
<td valign="top" align="right"></td>
39
39
</tr></table></div>
40
<div class="refsynopsisdiv" title="Synopsis">
40
<div class="refsynopsisdiv">
41
41
<a name="libxfce4util-Desktop-entries.synopsis"></a><h2>Synopsis</h2>
42
42
<a name="XfceDesktopEntry"></a><pre class="synopsis">
43
43
#include <libxfce4util/libxfce4util.h>
45
<a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry-struct" title="XfceDesktopEntry">XfceDesktopEntry</a>;
45
struct <a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry-struct" title="struct XfceDesktopEntry">XfceDesktopEntry</a>;
46
46
<a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="returnvalue">XfceDesktopEntry</span></a> * <a class="link" href="libxfce4util-Desktop-entries.html#xfce-desktop-entry-new" title="xfce_desktop_entry_new ()">xfce_desktop_entry_new</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *file</code></em>,
47
47
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **categories</code></em>,
48
48
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> num_categories</code></em>);
62
62
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);
65
<div class="refsect1" title="Object Hierarchy">
65
<div class="refsect1">
66
66
<a name="libxfce4util-Desktop-entries.object-hierarchy"></a><h2>Object Hierarchy</h2>
67
67
<pre class="synopsis">
68
68
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
69
69
+----XfceDesktopEntry
72
<div class="refsect1" title="Description">
72
<div class="refsect1">
73
73
<a name="libxfce4util-Desktop-entries.description"></a><h2>Description</h2>
75
75
XfceDesktopEntry is a wrapper for a so-called desktop entry file. The
76
76
desktop entry format is defined on <a class="ulink" href="http://www.freedesktop.org/" target="_top">Freedesktop.org</a>.
79
<div class="refsect1" title="Details">
79
<div class="refsect1">
80
80
<a name="libxfce4util-Desktop-entries.details"></a><h2>Details</h2>
81
<div class="refsect2" title="XfceDesktopEntry">
82
<a name="XfceDesktopEntry-struct"></a><h3>XfceDesktopEntry</h3>
83
<pre class="programlisting">typedef struct _XfceDesktopEntry XfceDesktopEntry;</pre>
84
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
81
<div class="refsect2">
82
<a name="XfceDesktopEntry-struct"></a><h3>struct XfceDesktopEntry</h3>
83
<pre class="programlisting">struct XfceDesktopEntry;</pre>
84
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
85
85
<h3 class="title">Warning</h3>
86
86
<p><code class="literal">XfceDesktopEntry</code> has been deprecated since version 4.8 and should not be used in newly-written code. Use <a class="link" href="libxfce4util-Resource-Config-File-Support.html#XfceRc" title="XfceRc"><span class="type">XfceRc</span></a> instead.</p>
95
<div class="refsect2" title="xfce_desktop_entry_new ()">
95
<div class="refsect2">
96
96
<a name="xfce-desktop-entry-new"></a><h3>xfce_desktop_entry_new ()</h3>
97
97
<pre class="programlisting"><a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="returnvalue">XfceDesktopEntry</span></a> * xfce_desktop_entry_new (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *file</code></em>,
98
98
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **categories</code></em>,
99
99
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> num_categories</code></em>);</pre>
100
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
100
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
101
101
<h3 class="title">Warning</h3>
102
102
<p><code class="literal">xfce_desktop_entry_new</code> has been deprecated since version 4.8 and should not be used in newly-written code. Use <a class="link" href="libxfce4util-Resource-Config-File-Support.html#XfceRc" title="XfceRc"><span class="type">XfceRc</span></a> instead.</p>
115
115
<td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td>
116
<td>full path to the desktop entry file to use.
116
<td>full path to the desktop entry file to use.</td>
120
119
<td><p><span class="term"><em class="parameter"><code>categories</code></em> :</span></p></td>
121
<td>array of categories, not necessarily NULL terminated.
120
<td>array of categories, not necessarily NULL terminated.</td>
125
123
<td><p><span class="term"><em class="parameter"><code>num_categories</code></em> :</span></p></td>
126
<td>number of items in <em class="parameter"><code>categories</code></em>.
124
<td>number of items in <em class="parameter"><code>categories</code></em>.</td>
130
127
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
131
<td> newly created <a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a> or NULL if something goes wrong.
128
<td>newly created <a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a> or NULL if something goes wrong.</td>
137
132
<p class="since">Since 4.2</p>
140
<div class="refsect2" title="xfce_desktop_entry_new_from_data ()">
135
<div class="refsect2">
141
136
<a name="xfce-desktop-entry-new-from-data"></a><h3>xfce_desktop_entry_new_from_data ()</h3>
142
137
<pre class="programlisting"><a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="returnvalue">XfceDesktopEntry</span></a> * xfce_desktop_entry_new_from_data (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *data</code></em>,
143
138
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **categories</code></em>,
144
139
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> num_categories</code></em>);</pre>
145
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
140
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
146
141
<h3 class="title">Warning</h3>
147
142
<p><code class="literal">xfce_desktop_entry_new_from_data</code> has been deprecated since version 4.8 and should not be used in newly-written code. Use <a class="link" href="libxfce4util-Resource-Config-File-Support.html#XfceRc" title="XfceRc"><span class="type">XfceRc</span></a> instead.</p>
160
155
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
161
<td>pointer to the desktop entry inline data.
156
<td>pointer to the desktop entry inline data.</td>
165
159
<td><p><span class="term"><em class="parameter"><code>categories</code></em> :</span></p></td>
166
<td>array of categories, not necessarily NULL terminated.
160
<td>array of categories, not necessarily NULL terminated.</td>
170
163
<td><p><span class="term"><em class="parameter"><code>num_categories</code></em> :</span></p></td>
171
<td>number of items in <em class="parameter"><code>categories</code></em>.
164
<td>number of items in <em class="parameter"><code>categories</code></em>.</td>
175
167
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
176
<td> newly created <a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a> or NULL if something goes wrong.
168
<td>newly created <a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a> or NULL if something goes wrong.</td>
182
172
<p class="since">Since 4.2</p>
185
<div class="refsect2" title="xfce_desktop_entry_get_file ()">
175
<div class="refsect2">
186
176
<a name="xfce-desktop-entry-get-file"></a><h3>xfce_desktop_entry_get_file ()</h3>
187
177
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * xfce_desktop_entry_get_file (<em class="parameter"><code><a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a> *desktop_entry</code></em>);</pre>
188
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
178
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
189
179
<h3 class="title">Warning</h3>
190
180
<p><code class="literal">xfce_desktop_entry_get_file</code> has been deprecated since version 4.8 and should not be used in newly-written code. Use <a class="link" href="libxfce4util-Resource-Config-File-Support.html#XfceRc" title="XfceRc"><span class="type">XfceRc</span></a> instead.</p>
200
190
<td><p><span class="term"><em class="parameter"><code>desktop_entry</code></em> :</span></p></td>
201
<td>an <a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a>.
191
<td>an <a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a>.</td>
205
194
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
206
<td> path of the desktop entry file used to create <em class="parameter"><code>desktop_entry</code></em>. The
207
return value should be considered read-only and must not be freed
195
<td>path of the desktop entry file used to create <em class="parameter"><code>desktop_entry</code></em>. The
196
return value should be considered read-only and must not be freed
213
201
<p class="since">Since 4.2</p>
216
<div class="refsect2" title="xfce_desktop_entry_get_string ()">
204
<div class="refsect2">
217
205
<a name="xfce-desktop-entry-get-string"></a><h3>xfce_desktop_entry_get_string ()</h3>
218
206
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> xfce_desktop_entry_get_string (<em class="parameter"><code><a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a> *desktop_entry</code></em>,
219
207
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
220
208
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> translated</code></em>,
221
209
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **value_return</code></em>);</pre>
222
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
210
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
223
211
<h3 class="title">Warning</h3>
224
212
<p><code class="literal">xfce_desktop_entry_get_string</code> has been deprecated since version 4.8 and should not be used in newly-written code. Use <a class="link" href="libxfce4util-Resource-Config-File-Support.html#XfceRc" title="XfceRc"><span class="type">XfceRc</span></a> instead.</p>
240
228
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
241
<td>category to find value for.
229
<td>category to find value for.</td>
245
232
<td><p><span class="term"><em class="parameter"><code>translated</code></em> :</span></p></td>
246
<td>set to TRUE if the translated value is preferred.
233
<td>set to TRUE if the translated value is preferred.</td>
250
236
<td><p><span class="term"><em class="parameter"><code>value_return</code></em> :</span></p></td>
251
<td>location for the value, which will be newly allocated.
237
<td>location for the value, which will be newly allocated.</td>
255
240
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
256
<td> TRUE on success, FALSE on failure. <em class="parameter"><code>value_return</code></em> must be freed.
241
<td>TRUE on success, FALSE on failure. <em class="parameter"><code>value_return</code></em> must be freed.</td>
262
245
<p class="since">Since 4.2</p>
265
<div class="refsect2" title="xfce_desktop_entry_get_int ()">
248
<div class="refsect2">
266
249
<a name="xfce-desktop-entry-get-int"></a><h3>xfce_desktop_entry_get_int ()</h3>
267
250
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> xfce_desktop_entry_get_int (<em class="parameter"><code><a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a> *desktop_entry</code></em>,
268
251
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
269
252
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *value_return</code></em>);</pre>
270
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
253
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
271
254
<h3 class="title">Warning</h3>
272
255
<p><code class="literal">xfce_desktop_entry_get_int</code> has been deprecated since version 4.8 and should not be used in newly-written code. Use <a class="link" href="libxfce4util-Resource-Config-File-Support.html#XfceRc" title="XfceRc"><span class="type">XfceRc</span></a> instead.</p>
282
265
<td><p><span class="term"><em class="parameter"><code>desktop_entry</code></em> :</span></p></td>
283
<td>an <a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a>.
266
<td>an <a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a>.</td>
287
269
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
288
<td>category to find value for.
270
<td>category to find value for.</td>
292
273
<td><p><span class="term"><em class="parameter"><code>value_return</code></em> :</span></p></td>
293
<td>location for the value.
274
<td>location for the value.</td>
297
277
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
298
<td> TRUE on success, FALSE on failure.
278
<td>TRUE on success, FALSE on failure.</td>
304
282
<p class="since">Since 4.2</p>
307
<div class="refsect2" title="xfce_desktop_entry_has_translated_entry ()">
285
<div class="refsect2">
308
286
<a name="xfce-desktop-entry-has-translated-entry"></a><h3>xfce_desktop_entry_has_translated_entry ()</h3>
309
287
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> xfce_desktop_entry_has_translated_entry
310
288
(<em class="parameter"><code><a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a> *desktop_entry</code></em>,
311
289
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);</pre>
312
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
290
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
313
291
<h3 class="title">Warning</h3>
314
292
<p><code class="literal">xfce_desktop_entry_has_translated_entry</code> has been deprecated since version 4.8 and should not be used in newly-written code. Use <a class="link" href="libxfce4util-Resource-Config-File-Support.html#XfceRc" title="XfceRc"><span class="type">XfceRc</span></a> instead.</p>
324
302
<td><p><span class="term"><em class="parameter"><code>desktop_entry</code></em> :</span></p></td>
325
<td>an <a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a>.
303
<td>an <a class="link" href="libxfce4util-Desktop-entries.html#XfceDesktopEntry"><span class="type">XfceDesktopEntry</span></a>.</td>
329
306
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
330
<td>the key to check.
307
<td>the key to check.</td>
334
310
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
335
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there is a translated key, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
312
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there is a translated key, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>