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