Documentation fixes.
[platform/upstream/glib.git] / docs / reference / glib / tmpl / glib-unused.sgml
1 <!-- ##### SECTION ./tmpl/desktop_entry.sgml:Long_Description ##### -->
2 <para>
3 The "GDesktopEntry" parser is intended to parse files written to
4 the <ulink
5 url="http://www.freedesktop.org/Standards/desktop-entry-spec">Desktop
6 Entry Specification</ulink>.  It supports deserialization of
7 desktop entries from files and in-memory data.  Desktop entries
8 are used for a variety of things including menus, application
9 MIME type registration, and launchers.
10 </para>
11
12 <para>
13 To load an existing desktop entry from a data directory (as
14 returned by g_get_user_data_dir() and g_get_system_data_dirs())
15 use g_desktop_entry_new_from_data_dirs().  To load an existing
16 desktop entry from an arbitrary location on the file system use
17 g_desktop_entry_new_from_file().  If the desktop entry is already
18 in memory use g_desktop_entry_new_from_data().  Once the desktop 
19 entry is loaded its keys can be queried using the g_desktop_entry_get 
20 family of functions.
21 </para>
22
23 <para>
24 To create a new desktop entry first call g_desktop_entry_new().
25 Then, call the g_desktop_entry_set family of functions.  Next,
26 call g_desktop_entry_to_data() to output the desktop entry to 
27 a byte array, which can be written to disk or sent over a
28 network.  Finally, call g_desktop_entry_free() to deallocate the
29 #GDesktopEntry object returned by g_desktop_entry_new().
30 </para>
31
32
33 <!-- ##### SECTION ./tmpl/desktop_entry.sgml:See_Also ##### -->
34 <para>
35
36 </para>
37
38
39 <!-- ##### SECTION ./tmpl/desktop_entry.sgml:Short_Description ##### -->
40 serializes and deserializes a desktop entry.
41
42
43 <!-- ##### SECTION ./tmpl/desktop_entry.sgml:Title ##### -->
44 Desktop Entry Parser
45
46
47 <!-- ##### ENUM GChannelError ##### -->
48 <para>
49
50 </para>
51
52 @G_CHANNEL_ERROR_ACCES: 
53 @G_CHANNEL_ERROR_BADF: 
54 @G_CHANNEL_ERROR_DEADLK: 
55 @G_CHANNEL_ERROR_FAULT: 
56 @G_CHANNEL_ERROR_INVAL: 
57 @G_CHANNEL_ERROR_IO: 
58 @G_CHANNEL_ERROR_ISDIR: 
59 @G_CHANNEL_ERROR_MFILE: 
60 @G_CHANNEL_ERROR_NOLCK: 
61 @G_CHANNEL_ERROR_NOSPC: 
62 @G_CHANNEL_ERROR_PERM: 
63 @G_CHANNEL_ERROR_PIPE: 
64 @G_CHANNEL_ERROR_SPIPE: 
65 @G_CHANNEL_ERROR_ENCODE_RW: 
66 @G_CHANNEL_ERROR_FAILED: 
67
68 <!-- ##### ENUM GChannelStatus ##### -->
69 <para>
70
71 </para>
72
73 @G_CHANNEL_STATUS_NORMAL: 
74 @G_CHANNEL_STATUS_EOF: 
75 @G_CHANNEL_STATUS_PARTIAL_CHARS: 
76 @G_CHANNEL_STATUS_AGAIN: 
77 @G_CHANNEL_STATUS_INTR: 
78 @G_CHANNEL_STATUS_ERROR: 
79 @G_CHANNEL_STATUS_BAD_INPUT: 
80
81 <!-- ##### USER_FUNCTION GCompareFuncData ##### -->
82 <para>
83
84 </para>
85
86 @a: 
87 @b: 
88 @user_data: 
89 @Returns: 
90
91 <!-- ##### USER_FUNCTION GCompletionStrcmpFunc ##### -->
92 <para>
93
94 </para>
95
96 @s1: 
97 @s2: 
98 @Returns: 
99
100 <!-- ##### STRUCT GDesktopEntry ##### -->
101 <para>
102
103 </para>
104
105
106 <!-- ##### ENUM GDesktopEntryError ##### -->
107 <para>
108 Error codes returned by desktop entry parsing.
109 </para>
110
111 @G_DESKTOP_ENTRY_ERROR_UNKNOWN_ENCODING: text being parsed is not UTF-8 and
112 cannot be guessed.
113 @G_DESKTOP_ENTRY_ERROR_BAD_START_GROUP: desktop entry does not start with a
114 legal start group.
115 @G_DESKTOP_ENTRY_ERROR_PARSE: desktop entry is empty or contains invalid
116 data.
117 @G_DESKTOP_ENTRY_ERROR_NOT_FOUND: valid desktop entry could not be found.
118 @G_DESKTOP_ENTRY_ERROR_KEY_NOT_FOUND: desktop entry does not have requested
119 key.
120 @G_DESKTOP_ENTRY_ERROR_GROUP_NOT_FOUND: desktop entry does not have requested
121 group
122 @G_DESKTOP_ENTRY_ERROR_INVALID_VALUE: desktop entry contains key which has
123 value that cannot be validated.
124
125 <!-- ##### ENUM GDesktopEntryFlags ##### -->
126 <para>
127 #GDesktopEntry supports a few flags for tweaking performance during
128 deserialization.  #G_DESKTOP_ENTRY_DISCARD_COMMENTS and 
129 #G_DESKTOP_ENTRY_DISCARD_TRANSLATIONS will reduce memory footprint,
130 and #G_DESKTOP_ENTRY_GENERATE_LOOKUP_MAP will increase key lookup speed.
131 </para>
132
133 @G_DESKTOP_ENTRY_NONE: use parser defaults
134 @G_DESKTOP_ENTRY_DISCARD_COMMENTS:  Discard all lines that are blank
135 or start with "#".
136 @G_DESKTOP_ENTRY_DISCARD_TRANSLATIONS: Only retain translations that
137 are returned by g_get_language_names().
138 @G_DESKTOP_ENTRY_GENERATE_LOOKUP_MAP: Generate a lookup map for key names to make lookups constant time at the cost of more memory.
139
140 <!-- ##### USER_FUNCTION GErrorFunc ##### -->
141 <para>
142 Specifies the type of function passed to g_set_error_handler().
143 </para>
144
145 @str: the error message.
146
147 <!-- ##### USER_FUNCTION GHookFreeFunc ##### -->
148 <para>
149
150 </para>
151
152 @hook_list: 
153 @hook: 
154
155 <!-- ##### ENUM GIOFileMode ##### -->
156 <para>
157
158 </para>
159
160 @G_IO_FILE_MODE_READ: 
161 @G_IO_FILE_MODE_WRITE: 
162 @G_IO_FILE_MODE_APPEND: 
163 @G_IO_FILE_MODE_READ_WRITE: 
164 @G_IO_FILE_MODE_READ_WRITE_TRUNCATE: 
165 @G_IO_FILE_MODE_READ_WRITE_APPEND: 
166
167 <!-- ##### ENUM GMatchType ##### -->
168 <para>
169 Enumeration representing different kinds of patterns. This is only used
170 internally for optimizing the match algorithm.
171 </para>
172
173 @G_MATCH_ALL: a general pattern.
174 @G_MATCH_ALL_TAIL: a general pattern which contains a fixed part matching
175 the end of the string.
176 @G_MATCH_HEAD: a pattern matching every string with a certain prefix.
177 @G_MATCH_TAIL: a pattern matching every string with a certain suffix.
178 @G_MATCH_EXACT: a pattern matching exactly one string.
179 @G_MATCH_LAST: 
180
181 <!-- ##### USER_FUNCTION GWarningFunc ##### -->
182 <para>
183 Specifies the type of function passed to g_set_warning_handler().
184 </para>
185
186 @str: the warning message.
187
188 <!-- ##### MACRO G_CHANNEL_ERROR ##### -->
189 <para>
190
191 </para>
192
193
194 <!-- ##### MACRO G_DESKTOP_ENTRY_ERROR ##### -->
195 <para>
196 Error domain for desktop entry parsing. Errors in this domain will
197 be from the #GDesktopEntryError enumeration. See #GError for information on 
198 error domains.
199 </para>
200
201
202 <!-- ##### MACRO G_HOOK_DEFERRED_DESTROY ##### -->
203 <para>
204
205 </para>
206
207
208 <!-- ##### MACRO G_IO_CHANNEL_DEFAULT_LINE_TERM ##### -->
209 <para>
210 One of %G_IO_CHANNEL_UNIX_LINE_TERM, %G_IO_CHANNEL_DOS_LINE_TERM,
211 or %G_IO_CHANNEL_MACINTOSH_LINE_TERM (unimplemented)
212 depending on the system type.
213 </para>
214
215
216 <!-- ##### MACRO G_IO_CHANNEL_DOS_LINE_TERM ##### -->
217 <para>
218
219 </para>
220
221
222 <!-- ##### MACRO G_IO_CHANNEL_ENCODE_RAW ##### -->
223 <para>
224 Encoding for nonbuffered IO. With this encoding, data must be
225 read using g_io_channel_read_chars(); the other functions will
226 not work.
227 </para>
228
229
230 <!-- ##### MACRO G_IO_CHANNEL_MACINTOSH_LINE_TERM ##### -->
231 <para>
232
233 </para>
234
235
236 <!-- ##### MACRO G_IO_CHANNEL_UNIX_LINE_TERM ##### -->
237 <para>
238
239 </para>
240
241
242 <!-- ##### MACRO NAME_MAX ##### -->
243 <para>
244 Provided for UNIX emulation on Windows; equivalent to UNIX macro 
245 %NAME_MAX, which is the maximum length of a single path component.
246 i.e. just the <filename>foo</filename> in <filename>/usr/bin/foo</filename>.
247 </para>
248
249
250 <!-- ##### MACRO access ##### -->
251 <para>
252
253 </para>
254
255
256 <!-- ##### MACRO close ##### -->
257 <para>
258
259 </para>
260
261
262 <!-- ##### FUNCTION closedir ##### -->
263 <para>
264 Provided for UNIX emulation on Windows; see documentation for <function>closedir()</function>
265 in any UNIX manual.
266 </para>
267
268 @Param1: 
269 @Returns: 
270
271 <!-- ##### MACRO fdopen ##### -->
272 <para>
273
274 </para>
275
276
277 <!-- ##### MACRO ftruncate ##### -->
278 <para>
279 Provided for UNIX emulation on Windows; see documentation for <function>ftruncate()</function>
280 in any UNIX manual.
281 </para>
282
283 @fd: 
284 @size: 
285
286 <!-- ##### FUNCTION g_channel_error_from_errno ##### -->
287 <para>
288
289 </para>
290
291 @en: 
292 @Returns: 
293
294 <!-- ##### FUNCTION g_channel_error_quark ##### -->
295 <para>
296
297 </para>
298
299 @Returns: 
300
301 <!-- ##### FUNCTION g_convert_error_quark ##### -->
302 <para>
303
304 </para>
305
306 @Returns: 
307
308 <!-- ##### FUNCTION g_desktop_entry_escape_strings ##### -->
309 <para>
310
311 </para>
312
313 @entry: 
314 @should_escape: 
315
316 <!-- ##### FUNCTION g_desktop_entry_free ##### -->
317 <para>
318
319 </para>
320
321 @entry: 
322
323 <!-- ##### FUNCTION g_desktop_entry_get_boolean ##### -->
324 <para>
325
326 </para>
327
328 @entry: 
329 @group_name: 
330 @key: 
331 @error: 
332 @Returns: 
333
334 <!-- ##### FUNCTION g_desktop_entry_get_boolean_list ##### -->
335 <para>
336
337 </para>
338
339 @entry: 
340 @group_name: 
341 @key: 
342 @length: 
343 @error: 
344 @Returns: 
345
346 <!-- ##### FUNCTION g_desktop_entry_get_groups ##### -->
347 <para>
348
349 </para>
350
351 @entry: 
352 @length: 
353 @Returns: 
354
355 <!-- ##### FUNCTION g_desktop_entry_get_integer ##### -->
356 <para>
357
358 </para>
359
360 @entry: 
361 @group_name: 
362 @key: 
363 @error: 
364 @Returns: 
365
366 <!-- ##### FUNCTION g_desktop_entry_get_integer_list ##### -->
367 <para>
368
369 </para>
370
371 @entry: 
372 @group_name: 
373 @key: 
374 @length: 
375 @error: 
376 @Returns: 
377
378 <!-- ##### FUNCTION g_desktop_entry_get_keys ##### -->
379 <para>
380
381 </para>
382
383 @entry: 
384 @group_name: 
385 @length: 
386 @error: 
387 @Returns: 
388
389 <!-- ##### FUNCTION g_desktop_entry_get_locale_string ##### -->
390 <para>
391
392 </para>
393
394 @entry: 
395 @group_name: 
396 @key: 
397 @locale: 
398 @error: 
399 @Returns: 
400
401 <!-- ##### FUNCTION g_desktop_entry_get_locale_string_list ##### -->
402 <para>
403
404 </para>
405
406 @entry: 
407 @group_name: 
408 @key: 
409 @locale: 
410 @length: 
411 @error: 
412 @Returns: 
413
414 <!-- ##### FUNCTION g_desktop_entry_get_start_group ##### -->
415 <para>
416
417 </para>
418
419 @entry: 
420 @Returns: 
421
422 <!-- ##### FUNCTION g_desktop_entry_get_string ##### -->
423 <para>
424
425 </para>
426
427 @entry: 
428 @group_name: 
429 @key: 
430 @error: 
431 @Returns: 
432
433 <!-- ##### FUNCTION g_desktop_entry_get_string_list ##### -->
434 <para>
435
436 </para>
437
438 @entry: 
439 @group_name: 
440 @key: 
441 @length: 
442 @error: 
443 @Returns: 
444
445 <!-- ##### FUNCTION g_desktop_entry_has_group ##### -->
446 <para>
447
448 </para>
449
450 @entry: 
451 @group_name: 
452 @Returns: 
453
454 <!-- ##### FUNCTION g_desktop_entry_has_key ##### -->
455 <para>
456
457 </para>
458
459 @entry: 
460 @group_name: 
461 @key: 
462 @error: 
463 @Returns: 
464
465 <!-- ##### FUNCTION g_desktop_entry_new ##### -->
466 <para>
467
468 </para>
469
470 @flags: 
471 @error: 
472 @Returns: 
473
474 <!-- ##### FUNCTION g_desktop_entry_new_from_data ##### -->
475 <para>
476
477 </para>
478
479 @data: 
480 @length: 
481 @legal_start_groups: 
482 @flags: 
483 @error: 
484 @Returns: 
485
486 <!-- ##### FUNCTION g_desktop_entry_new_from_data_dirs ##### -->
487 <para>
488
489 </para>
490
491 @file: 
492 @full_path: 
493 @legal_start_groups: 
494 @flags: 
495 @error: 
496 @Returns: 
497
498 <!-- ##### FUNCTION g_desktop_entry_new_from_file ##### -->
499 <para>
500
501 </para>
502
503 @file: 
504 @legal_start_groups: 
505 @flags: 
506 @error: 
507 @Returns: 
508
509 <!-- ##### FUNCTION g_desktop_entry_remove_group ##### -->
510 <para>
511
512 </para>
513
514 @entry: 
515 @group_name: 
516 @error: 
517
518 <!-- ##### FUNCTION g_desktop_entry_remove_key ##### -->
519 <para>
520
521 </para>
522
523 @entry: 
524 @group_name: 
525 @key: 
526 @error: 
527
528 <!-- ##### FUNCTION g_desktop_entry_set_boolean ##### -->
529 <para>
530
531 </para>
532
533 @entry: 
534 @group_name: 
535 @key: 
536 @boolean: 
537 @error: 
538
539 <!-- ##### FUNCTION g_desktop_entry_set_boolean_list ##### -->
540 <para>
541
542 </para>
543
544 @entry: 
545 @group_name: 
546 @key: 
547 @list: 
548 @length: 
549 @error: 
550
551 <!-- ##### FUNCTION g_desktop_entry_set_integer ##### -->
552 <para>
553
554 </para>
555
556 @entry: 
557 @group_name: 
558 @key: 
559 @integer: 
560 @error: 
561
562 <!-- ##### FUNCTION g_desktop_entry_set_integer_list ##### -->
563 <para>
564
565 </para>
566
567 @entry: 
568 @group_name: 
569 @key: 
570 @list: 
571 @length: 
572 @error: 
573
574 <!-- ##### FUNCTION g_desktop_entry_set_locale_string ##### -->
575 <para>
576
577 </para>
578
579 @entry: 
580 @group_name: 
581 @key: 
582 @locale: 
583 @string: 
584 @error: 
585
586 <!-- ##### FUNCTION g_desktop_entry_set_locale_string_list ##### -->
587 <para>
588
589 </para>
590
591 @entry: 
592 @group_name: 
593 @key: 
594 @locale: 
595 @list: 
596 @length: 
597 @error: 
598
599 <!-- ##### FUNCTION g_desktop_entry_set_string ##### -->
600 <para>
601
602 </para>
603
604 @entry: 
605 @group_name: 
606 @key: 
607 @string: 
608 @error: 
609
610 <!-- ##### FUNCTION g_desktop_entry_set_string_list ##### -->
611 <para>
612
613 </para>
614
615 @entry: 
616 @group_name: 
617 @key: 
618 @list: 
619 @length: 
620 @error: 
621
622 <!-- ##### FUNCTION g_desktop_entry_to_data ##### -->
623 <para>
624
625 </para>
626
627 @entry: 
628 @length: 
629 @error: 
630 @Returns: 
631
632 <!-- ##### FUNCTION g_io_channel_error_quark ##### -->
633 <para>
634
635 </para>
636
637 @Returns: 
638
639 <!-- ##### VARIABLE g_log_domain_glib ##### -->
640 <para>
641 The log domain used for messages logged by GLib itself.
642 </para>
643
644
645 <!-- ##### FUNCTION g_main_add_poll ##### -->
646 <para>
647 Adds a file descriptor to be polled.
648 This is usually combined with g_source_add() to add an event source.
649 The event source's check function will typically test the revents
650 field in the #GPollFD struct and return TRUE if events need to be processed.
651 </para>
652
653 @fd: a #GPollFD, which is a file descriptor together with a bitwise
654 combination of #GIOCondition flags determining which events to poll for.
655 @priority: the priority of the poll, which should be the same as the priority
656 used for g_source_add() to ensure that the file descriptor is polled whenever
657 the results may be needed.
658 See #G_PRIORITY_DEFAULT, #G_PRIORITY_DEFAULT_IDLE, #G_PRIORITY_HIGH,
659 #G_PRIORITY_HIGH_IDLE, and #G_PRIORITY_LOW.
660
661 <!-- ##### FUNCTION g_main_context_get ##### -->
662 <para>
663
664 </para>
665
666 @thread: 
667 @Returns: 
668
669 <!-- ##### FUNCTION g_main_loop_destroy ##### -->
670 <para>
671
672 </para>
673
674 @loop: 
675
676 <!-- ##### FUNCTION g_main_remove_poll ##### -->
677 <para>
678 Removes a file descriptor from the list being polled.
679 </para>
680
681 @fd: the #GPollFD to remove.
682
683 <!-- ##### FUNCTION g_main_win32_get_poll_func ##### -->
684 <para>
685
686 </para>
687
688 @Returns: 
689
690 <!-- ##### FUNCTION g_mem_check ##### -->
691 <para>
692 Checks if the given memory has already been freed. If it has it outputs
693 a warning message.
694 To use this function you must configure glib with the flag
695 '--enable-mem-check=yes' before compiling.
696 </para>
697
698 @mem: the memory to check.
699
700 <!-- ##### FUNCTION g_scanner_stat_mode ##### -->
701 <para>
702 Gets the file attributes.
703 This is the <structfield>st_mode</structfield> field from the
704 <structname>stat</structname> structure. See the <function>stat()</function>
705 documentation.
706 </para>
707
708 @filename: the file name.
709 @Returns: the file attributes.
710
711 <!-- ##### FUNCTION g_set_error_handler ##### -->
712 <para>
713 Sets the function to be called to handle error messages.
714 This function is deprecated in favour of the new logging facilities.
715 </para>
716
717 @func: the function to be called to handle error messages.
718 @Returns: the old error handler.
719
720 <!-- ##### FUNCTION g_set_message_handler ##### -->
721 <para>
722 Sets the function to be called to handle messages.
723 This function is deprecated in favour of the new logging facilities.
724 </para>
725
726 @func: the function to be called to handle normal messages.
727 @Returns: the old message handler.
728
729 <!-- ##### FUNCTION g_set_warning_handler ##### -->
730 <para>
731 Sets the function to be called to handle warning messages.
732 This function is deprecated in favour of the new logging facilities.
733 </para>
734
735 @func: the function to be called to handle warning messages.
736 @Returns: the old warning handler.
737
738 <!-- ##### FUNCTION g_source_add ##### -->
739 <para>
740 </para>
741
742 @priority: 
743 @can_recurse: 
744 @funcs: 
745 @source_data: 
746 @user_data: 
747 @notify: 
748 @Returns: 
749 @source: 
750 @context: 
751
752 <!-- ##### FUNCTION g_source_connect ##### -->
753 <para>
754
755 </para>
756
757 @source: 
758 @func: 
759 @data: 
760 @notify: 
761
762 <!-- ##### FUNCTION g_source_connect_indirect ##### -->
763 <para>
764
765 </para>
766
767 @source: 
768 @callback_data: 
769 @callback_funcs: 
770
771 <!-- ##### FUNCTION g_source_remove_by_source_data ##### -->
772 <para>
773 Removes the first event source found with the given source data.
774 </para>
775 <para>
776 Event sources are sorted with the highest priority first. Sources with equal
777 priority are stored in the order in which they were added.
778 </para>
779
780 @source_data: the source data, which contains information specific to the
781 type of source.
782 @Returns: TRUE if an event source was found and removed.
783
784 <!-- ##### FUNCTION g_static_private_get_for_thread ##### -->
785 <para>
786
787 </para>
788
789 @private_key: 
790 @thread: 
791 @Returns: 
792
793 <!-- ##### FUNCTION g_static_private_set_for_thread ##### -->
794 <para>
795
796 </para>
797
798 @private_key: 
799 @thread: 
800 @data: 
801 @notify: 
802
803 <!-- ##### MACRO g_string ##### -->
804 <para>
805 Turns the argument into a string literal by using the '#' stringizing operator.
806 </para>
807
808 @x: text to convert to a literal string.
809
810 <!-- ##### MACRO getcwd ##### -->
811 <para>
812
813 </para>
814
815
816 <!-- ##### MACRO getpid ##### -->
817 <para>
818
819 </para>
820
821
822 <!-- ##### MACRO lseek ##### -->
823 <para>
824
825 </para>
826
827
828 <!-- ##### MACRO open ##### -->
829 <para>
830
831 </para>
832
833
834 <!-- ##### FUNCTION opendir ##### -->
835 <para>
836 Provided for UNIX emulation on Windows; see documentation for <function>opendir()</function>
837 in any UNIX manual.
838 </para>
839
840 @Param1: 
841 @Returns: 
842
843 <!-- ##### MACRO pclose ##### -->
844 <para>
845
846 </para>
847
848
849 <!-- ##### MACRO popen ##### -->
850 <para>
851
852 </para>
853
854
855 <!-- ##### MACRO read ##### -->
856 <para>
857
858 </para>
859
860
861 <!-- ##### MACRO readdir ##### -->
862 <para>
863 Provided for UNIX emulation on Windows; see documentation for <function>readdir()</function>
864 in any UNIX manual.
865 </para>
866
867
868 <!-- ##### FUNCTION rewinddir ##### -->
869 <para>
870 Provided for UNIX emulation on Windows; see documentation for <function>rewinddir()</function>
871 in any UNIX manual.
872 </para>
873
874 @Param1: 
875
876 <!-- ##### MACRO write ##### -->
877 <para>
878
879 </para>
880
881