Codebase list xapp / 20f2d95 docs / reference / XAppFavorites.html
20f2d95

Tree @20f2d95 (Download .tar.gz)

XAppFavorites.html @20f2d95raw · history · blame

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
<!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>