1 <!-- ##### SECTION ./tmpl/desktop_entry.sgml:Long_Description ##### -->
3 The "GDesktopEntry" parser is intended to parse files written to
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.
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
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().
33 <!-- ##### SECTION ./tmpl/desktop_entry.sgml:See_Also ##### -->
39 <!-- ##### SECTION ./tmpl/desktop_entry.sgml:Short_Description ##### -->
40 serializes and deserializes a desktop entry.
43 <!-- ##### SECTION ./tmpl/desktop_entry.sgml:Title ##### -->
47 <!-- ##### SECTION ./tmpl/glib-unused.sgml:Stability_Level ##### -->
51 <!-- ##### SECTION ./tmpl/testutils.sgml:Long_Description ##### -->
57 <!-- ##### SECTION ./tmpl/testutils.sgml:See_Also ##### -->
63 <!-- ##### SECTION ./tmpl/testutils.sgml:Short_Description ##### -->
67 <!-- ##### SECTION ./tmpl/testutils.sgml:Stability_Level ##### -->
71 <!-- ##### SECTION ./tmpl/testutils.sgml:Title ##### -->
75 <!-- ##### ENUM GChannelError ##### -->
80 @G_CHANNEL_ERROR_ACCES:
81 @G_CHANNEL_ERROR_BADF:
82 @G_CHANNEL_ERROR_DEADLK:
83 @G_CHANNEL_ERROR_FAULT:
84 @G_CHANNEL_ERROR_INVAL:
86 @G_CHANNEL_ERROR_ISDIR:
87 @G_CHANNEL_ERROR_MFILE:
88 @G_CHANNEL_ERROR_NOLCK:
89 @G_CHANNEL_ERROR_NOSPC:
90 @G_CHANNEL_ERROR_PERM:
91 @G_CHANNEL_ERROR_PIPE:
92 @G_CHANNEL_ERROR_SPIPE:
93 @G_CHANNEL_ERROR_ENCODE_RW:
94 @G_CHANNEL_ERROR_FAILED:
96 <!-- ##### ENUM GChannelStatus ##### -->
101 @G_CHANNEL_STATUS_NORMAL:
102 @G_CHANNEL_STATUS_EOF:
103 @G_CHANNEL_STATUS_PARTIAL_CHARS:
104 @G_CHANNEL_STATUS_AGAIN:
105 @G_CHANNEL_STATUS_INTR:
106 @G_CHANNEL_STATUS_ERROR:
107 @G_CHANNEL_STATUS_BAD_INPUT:
109 <!-- ##### USER_FUNCTION GCompareFuncData ##### -->
119 <!-- ##### USER_FUNCTION GCompletionStrcmpFunc ##### -->
128 <!-- ##### STRUCT GDesktopEntry ##### -->
134 <!-- ##### ENUM GDesktopEntryError ##### -->
136 Error codes returned by desktop entry parsing.
139 @G_DESKTOP_ENTRY_ERROR_UNKNOWN_ENCODING: text being parsed is not UTF-8 and
141 @G_DESKTOP_ENTRY_ERROR_BAD_START_GROUP: desktop entry does not start with a
143 @G_DESKTOP_ENTRY_ERROR_PARSE: desktop entry is empty or contains invalid
145 @G_DESKTOP_ENTRY_ERROR_NOT_FOUND: valid desktop entry could not be found.
146 @G_DESKTOP_ENTRY_ERROR_KEY_NOT_FOUND: desktop entry does not have requested
148 @G_DESKTOP_ENTRY_ERROR_GROUP_NOT_FOUND: desktop entry does not have requested
150 @G_DESKTOP_ENTRY_ERROR_INVALID_VALUE: desktop entry contains key which has
151 value that cannot be validated.
153 <!-- ##### ENUM GDesktopEntryFlags ##### -->
155 #GDesktopEntry supports a few flags for tweaking performance during
156 deserialization. #G_DESKTOP_ENTRY_DISCARD_COMMENTS and
157 #G_DESKTOP_ENTRY_DISCARD_TRANSLATIONS will reduce memory footprint,
158 and #G_DESKTOP_ENTRY_GENERATE_LOOKUP_MAP will increase key lookup speed.
161 @G_DESKTOP_ENTRY_NONE: use parser defaults
162 @G_DESKTOP_ENTRY_DISCARD_COMMENTS: Discard all lines that are blank
164 @G_DESKTOP_ENTRY_DISCARD_TRANSLATIONS: Only retain translations that
165 are returned by g_get_language_names().
166 @G_DESKTOP_ENTRY_GENERATE_LOOKUP_MAP: Generate a lookup map for key names to make lookups constant time at the cost of more memory.
168 <!-- ##### USER_FUNCTION GErrorFunc ##### -->
170 Specifies the type of function passed to g_set_error_handler().
173 @str: the error message.
175 <!-- ##### USER_FUNCTION GHookFreeFunc ##### -->
183 <!-- ##### MACRO GINT16_TO_BE ##### -->
185 Converts a #gint16 value from host byte order to big-endian.
188 @val: a #gint16 value in host byte order.
189 @Returns: @val converted to big-endian.
191 <!-- ##### MACRO GINT16_TO_LE ##### -->
193 Converts a #gint16 value from host byte order to little-endian.
196 @val: a #gint16 value in host byte order.
197 @Returns: @val converted to little-endian.
199 <!-- ##### MACRO GINT32_TO_BE ##### -->
201 Converts a #gint32 value from host byte order to big-endian.
204 @val: a #gint32 value in host byte order.
205 @Returns: @val converted to big-endian.
207 <!-- ##### MACRO GINT32_TO_LE ##### -->
209 Converts a #gint32 value from host byte order to little-endian.
212 @val: a #gint32 value in host byte order.
213 @Returns: @val converted to little-endian.
215 <!-- ##### MACRO GINT64_TO_BE ##### -->
217 Converts a #gint64 value from host byte order to big-endian.
220 @val: a #gint64 value in host byte order.
221 @Returns: @val converted to big-endian.
223 <!-- ##### MACRO GINT64_TO_LE ##### -->
225 Converts a #gint64 value from host byte order to little-endian.
228 @val: a #gint64 value in host byte order.
229 @Returns: @val converted to little-endian.
231 <!-- ##### MACRO GINT_TO_BE ##### -->
233 Converts a #gint value from host byte order to big-endian.
236 @val: a #gint value in host byte order.
237 @Returns: @val converted to big-endian byte order.
239 <!-- ##### MACRO GINT_TO_LE ##### -->
241 Converts a #gint value from host byte order to little-endian.
244 @val: a #gint value in host byte order.
245 @Returns: @val converted to little-endian byte order.
247 <!-- ##### MACRO GINT_TO_POINTER ##### -->
249 Stuffs an integer into a pointer type.
252 Remember, YOU MAY NOT STORE POINTERS IN INTEGERS. THIS IS NOT PORTABLE
253 IN ANY WAY SHAPE OR FORM. These macros <emphasis>ONLY</emphasis> allow
254 storing integers in pointers, and only preserve 32 bits of the
255 integer; values outside the range of a 32-bit integer will be mangled.
258 @i: integer to stuff into a pointer.
260 <!-- ##### ENUM GIOFileMode ##### -->
265 @G_IO_FILE_MODE_READ:
266 @G_IO_FILE_MODE_WRITE:
267 @G_IO_FILE_MODE_APPEND:
268 @G_IO_FILE_MODE_READ_WRITE:
269 @G_IO_FILE_MODE_READ_WRITE_TRUNCATE:
270 @G_IO_FILE_MODE_READ_WRITE_APPEND:
272 <!-- ##### MACRO GLIB_MAJOR_VERSION ##### -->
274 The major version number of the GLib library.
275 Like #glib_major_version, but from the headers used at
276 application compile time, rather than from the library linked against
277 at application run time.
281 <!-- ##### MACRO GLIB_MICRO_VERSION ##### -->
283 The micro version number of the GLib library.
284 Like #gtk_micro_version, but from the headers used at
285 application compile time, rather than from the library linked against
286 at application run time.
290 <!-- ##### MACRO GLIB_MINOR_VERSION ##### -->
292 The minor version number of the GLib library.
293 Like #gtk_minor_version, but from the headers used at
294 application compile time, rather than from the library linked against
295 at application run time.
299 <!-- ##### MACRO GLONG_TO_BE ##### -->
301 Converts a #glong value from host byte order to big-endian.
304 @val: a #glong value in host byte order.
305 @Returns: @val converted to big-endian byte order.
307 <!-- ##### MACRO GLONG_TO_LE ##### -->
309 Converts a #glong value from host byte order to little-endian.
312 @val: a #glong value in host byte order.
313 @Returns: @val converted to little-endian.
315 <!-- ##### ENUM GMatchType ##### -->
317 Enumeration representing different kinds of patterns. This is only used
318 internally for optimizing the match algorithm.
321 @G_MATCH_ALL: a general pattern.
322 @G_MATCH_ALL_TAIL: a general pattern which contains a fixed part matching
323 the end of the string.
324 @G_MATCH_HEAD: a pattern matching every string with a certain prefix.
325 @G_MATCH_TAIL: a pattern matching every string with a certain suffix.
326 @G_MATCH_EXACT: a pattern matching exactly one string.
329 <!-- ##### STRUCT GModule ##### -->
331 The #GModule struct is an opaque data structure to represent a
332 <link linkend="glib-Dynamic-Loading-of-Modules">Dynamically-Loaded Module</link>.
333 It should only be accessed via the following functions.
337 <!-- ##### USER_FUNCTION GModuleCheckInit ##### -->
339 Specifies the type of the module initialization function.
340 If a module contains a function named g_module_check_init() it is called
341 automatically when the module is loaded. It is passed the #GModule structure
342 and should return %NULL on success or a string describing the initialization
346 @module: the #GModule corresponding to the module which has just been loaded.
347 @Returns: %NULL on success, or a string describing the initialization error.
349 <!-- ##### ENUM GModuleFlags ##### -->
351 Flags passed to g_module_open(). Note that these flags are
352 not supported on all platforms.
355 @G_MODULE_BIND_LAZY: specifies that symbols are only resolved when needed.
356 The default action is to bind all symbols when the module is loaded.
357 @G_MODULE_BIND_LOCAL: specifies that symbols in the module should
358 not be added to the global name space. The default action on most
359 platforms is to place symbols in the module in the global name space,
360 which may cause conflicts with existing symbols.
361 @G_MODULE_BIND_MASK: mask for all flags.
363 <!-- ##### USER_FUNCTION GModuleUnload ##### -->
365 Specifies the type of the module function called when it is unloaded.
366 If a module contains a function named g_module_unload() it is called
367 automatically when the module is unloaded.
368 It is passed the #GModule structure.
371 @module: the #GModule about to be unloaded.
373 <!-- ##### MACRO GPOINTER_TO_INT ##### -->
375 Extracts an integer from a pointer. The integer must have
376 been stored in the pointer with GINT_TO_POINTER().
379 Remember, YOU MAY NOT STORE POINTERS IN INTEGERS. THIS IS NOT PORTABLE
380 IN ANY WAY SHAPE OR FORM. These macros <emphasis>ONLY</emphasis> allow
381 storing integers in pointers, and only preserve 32 bits of the
382 integer; values outside the range of a 32-bit integer will be mangled.
385 @p: pointer containing an integer.
387 <!-- ##### MACRO GPOINTER_TO_UINT ##### -->
389 Extracts an unsigned integer from a pointer. The integer must have
390 been stored in the pointer with GUINT_TO_POINTER().
393 @p: pointer to extract an unsigned integer from.
395 <!-- ##### TYPEDEF GPid ##### -->
397 A type which is used to hold a process identification.
398 On Unix, processes are identified by a process id (an
399 integer), while Windows uses process handles (which are
404 <!-- ##### MACRO GUINT16_TO_BE ##### -->
406 Converts a #guint16 value from host byte order to big-endian.
409 @val: a #guint16 value in host byte order.
410 @Returns: @val converted to big-endian.
412 <!-- ##### MACRO GUINT16_TO_LE ##### -->
414 Converts a #guint16 value from host byte order to little-endian.
417 @val: a #guint16 value in host byte order.
418 @Returns: @val converted to little-endian.
420 <!-- ##### MACRO GUINT32_TO_BE ##### -->
422 Converts a #guint32 value from host byte order to big-endian.
425 @val: a #guint32 value in host byte order.
426 @Returns: @val converted to big-endian.
428 <!-- ##### MACRO GUINT32_TO_LE ##### -->
430 Converts a #guint32 value from host byte order to little-endian.
433 @val: a #guint32 value in host byte order.
434 @Returns: @val converted to little-endian.
436 <!-- ##### MACRO GUINT64_TO_BE ##### -->
438 Converts a #guint64 value from host byte order to big-endian.
441 @val: a #guint64 value in host byte order.
442 @Returns: @val converted to big-endian.
444 <!-- ##### MACRO GUINT64_TO_LE ##### -->
446 Converts a #guint64 value from host byte order to little-endian.
449 @val: a #guint64 value in host byte order.
450 @Returns: @val converted to little-endian.
452 <!-- ##### MACRO GUINT_TO_BE ##### -->
454 Converts a #guint value from host byte order to big-endian.
457 @val: a #guint value in host byte order.
458 @Returns: @val converted to big-endian byte order.
460 <!-- ##### MACRO GUINT_TO_LE ##### -->
462 Converts a #guint value from host byte order to little-endian.
465 @val: a #guint value in host byte order.
466 @Returns: @val converted to little-endian byte order.
468 <!-- ##### MACRO GUINT_TO_POINTER ##### -->
470 Stuffs an unsigned integer into a pointer type.
473 @u: unsigned integer to stuff into the pointer.
475 <!-- ##### MACRO GULONG_TO_BE ##### -->
477 Converts a #gulong value from host byte order to big-endian.
480 @val: a #gulong value in host byte order.
481 @Returns: @val converted to big-endian.
483 <!-- ##### MACRO GULONG_TO_LE ##### -->
485 Converts a #gulong value from host byte order to little-endian.
488 @val: a #gulong value in host byte order.
489 @Returns: @val converted to little-endian.
491 <!-- ##### USER_FUNCTION GWarningFunc ##### -->
493 Specifies the type of function passed to g_set_warning_handler().
496 @str: the warning message.
498 <!-- ##### MACRO G_BYTE_ORDER ##### -->
501 This can be either #G_LITTLE_ENDIAN or #G_BIG_ENDIAN (support for
502 #G_PDP_ENDIAN may be added in future.)
506 <!-- ##### MACRO G_CHANNEL_ERROR ##### -->
512 <!-- ##### MACRO G_DESKTOP_ENTRY_ERROR ##### -->
514 Error domain for desktop entry parsing. Errors in this domain will
515 be from the #GDesktopEntryError enumeration. See #GError for information on
520 <!-- ##### MACRO G_GINT16_FORMAT ##### -->
522 This is the platform dependent conversion specifier for scanning and
523 printing values of type #gint16. It is a string literal, but doesn't
524 include the percent-sign, such that you can add precision and length
525 modifiers between percent-sign and conversion specifier.
533 sscanf ("42", "%" G_GINT16_FORMAT, &in)
535 g_print ("%" G_GINT32_FORMAT, out);
541 <!-- ##### MACRO G_GINT16_MODIFIER ##### -->
543 The platform dependent length modifier for constructing printf() conversion
544 specifiers for values of type #gint16 or #guint16. It is a string literal,
545 but doesn't include the percent-sign, such that you can add precision and
546 length modifiers between percent-sign and conversion specifier and append a
547 conversion specifier.
551 The following example prints "0x7b";
555 g_print ("%#" G_GINT16_MODIFIER "x", value);
562 <!-- ##### MACRO G_GINT32_FORMAT ##### -->
564 This is the platform dependent conversion specifier for scanning and
565 printing values of type #gint32. See also #G_GINT16_FORMAT.
569 <!-- ##### MACRO G_GINT32_MODIFIER ##### -->
571 The platform dependent length modifier for constructing printf() conversion
572 specifiers for values of type #gint32 or #guint32. See also #G_GINT16_MODIFIER.
577 <!-- ##### MACRO G_GINT64_CONSTANT ##### -->
579 This macro is used to insert 64-bit integer literals into the source code.
582 @val: a literal integer value, e.g. 0x1d636b02300a7aa7U.
584 <!-- ##### MACRO G_GINT64_FORMAT ##### -->
586 This is the platform dependent conversion specifier for scanning and
587 printing values of type #gint64. See also #G_GINT16_FORMAT.
592 Some platforms do not support scanning and printing 64 bit integers,
593 even though the types are supported. On such platforms #G_GINT64_FORMAT
594 is not defined. Note that scanf() may not support 64 bit integers, even
595 if #G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() is not
596 recommended for parsing anyway; consider using g_strtoull() instead.
601 <!-- ##### MACRO G_GINT64_MODIFIER ##### -->
603 The platform dependent length modifier for constructing printf() conversion
604 specifiers for values of type #gint64 or #guint64. See also #G_GINT16_MODIFIER.
609 Some platforms do not support printing 64 bit integers,
610 even though the types are supported. On such platforms #G_GINT64_MODIFIER
617 <!-- ##### MACRO G_GNUC_INTERNAL ##### -->
619 This attribute can be used for marking library functions as being used
620 internally to the library only, which may allow the compiler to handle
621 function calls more efficiently.
622 Note that static functions do not need to be marked as internal in this way.
623 See the GNU C documentation for details.
626 When using a compiler that supports the GNU C hidden visibility attribute,
627 this macro expands to <literal>__attribute__((visibility("hidden")))</literal>.
628 When using the Sun Studio compiler, it expands to <literal>__hidden</literal>.
631 Note that for portability, the attribute should be placed before the
632 function declaration. While GCC allows the macro after the declaration,
635 <informalexample><programlisting>
637 void _g_log_fallback_handler (const gchar *log_domain,
638 GLogLevelFlags log_level,
639 const gchar *message,
640 gpointer unused_data);
641 </programlisting></informalexample>
646 <!-- ##### MACRO G_GSIZE_FORMAT ##### -->
648 This is the platform dependent conversion specifier for scanning and
649 printing values of type #gsize. See also #G_GINT16_FORMAT.
654 <!-- ##### MACRO G_GSIZE_MODIFIER ##### -->
656 The platform dependent length modifier for constructing printf() conversion
657 specifiers for values of type #gsize or #gssize. See also #G_GINT16_MODIFIER.
662 <!-- ##### MACRO G_GSSIZE_FORMAT ##### -->
664 This is the platform dependent conversion specifier for scanning and
665 printing values of type #gssize. See also #G_GINT16_FORMAT.
670 <!-- ##### MACRO G_GUINT16_FORMAT ##### -->
672 This is the platform dependent conversion specifier for scanning and
673 printing values of type #guint16. See also #G_GINT16_FORMAT.
677 <!-- ##### MACRO G_GUINT32_FORMAT ##### -->
679 This is the platform dependent conversion specifier for scanning and
680 printing values of type #guint32. See also #G_GINT16_FORMAT.
684 <!-- ##### MACRO G_GUINT64_CONSTANT ##### -->
686 This macro is used to insert 64-bit unsigned integer literals into the
690 @val: a literal integer value, e.g. 0x1d636b02300a7aa7U.
693 <!-- ##### MACRO G_GUINT64_FORMAT ##### -->
695 This is the platform dependent conversion specifier for scanning and
696 printing values of type #guint64. See also #G_GINT16_FORMAT.
701 Some platforms do not support scanning and printing 64 bit integers,
702 even though the types are supported. On such platforms #G_GUINT64_FORMAT
703 is not defined. Note that scanf() may not support 64 bit integers, even
704 if #G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() is not
705 recommended for parsing anyway; consider using g_strtoull() instead.
710 <!-- ##### MACRO G_HAVE_GINT64 ##### -->
712 This macro is defined if 64-bit signed and unsigned integers are available
716 @Deprecated: GLib requires 64-bit integer support since version 2.0, therefore
717 %G_HAVE_GINT64 is <emphasis>always</emphasis> defined.
719 <!-- ##### MACRO G_HAVE_GNUC_VISIBILITY ##### -->
721 This macro is defined as 1 if the compiler supports ELF visibility
722 attributes (currently only <command>gcc</command>).
728 <!-- ##### MACRO G_HOOK_DEFERRED_DESTROY ##### -->
734 <!-- ##### MACRO G_IO_CHANNEL_DEFAULT_LINE_TERM ##### -->
736 One of %G_IO_CHANNEL_UNIX_LINE_TERM, %G_IO_CHANNEL_DOS_LINE_TERM,
737 or %G_IO_CHANNEL_MACINTOSH_LINE_TERM (unimplemented)
738 depending on the system type.
742 <!-- ##### MACRO G_IO_CHANNEL_DOS_LINE_TERM ##### -->
748 <!-- ##### MACRO G_IO_CHANNEL_ENCODE_RAW ##### -->
750 Encoding for nonbuffered IO. With this encoding, data must be
751 read using g_io_channel_read_chars(); the other functions will
756 <!-- ##### MACRO G_IO_CHANNEL_MACINTOSH_LINE_TERM ##### -->
762 <!-- ##### MACRO G_IO_CHANNEL_UNIX_LINE_TERM ##### -->
768 <!-- ##### MACRO G_MAXDOUBLE ##### -->
770 The maximum value which can be held in a #gdouble.
774 <!-- ##### MACRO G_MAXFLOAT ##### -->
776 The maximum value which can be held in a #gfloat.
780 <!-- ##### MACRO G_MAXINT ##### -->
782 The maximum value which can be held in a #gint.
786 <!-- ##### MACRO G_MAXLONG ##### -->
788 The maximum value which can be held in a #glong.
792 <!-- ##### MACRO G_MAXOFFSET ##### -->
794 The maximum value which can be held in a #goffset.
798 <!-- ##### MACRO G_MAXSHORT ##### -->
800 The maximum value which can be held in a #gshort.
804 <!-- ##### MACRO G_MAXSIZE ##### -->
806 The maximum value which can be held in a #gsize.
811 <!-- ##### MACRO G_MAXSSIZE ##### -->
813 The maximum value which can be held in a #gssize.
818 <!-- ##### MACRO G_MAXUINT ##### -->
820 The maximum value which can be held in a #guint.
824 <!-- ##### MACRO G_MAXULONG ##### -->
826 The maximum value which can be held in a #gulong.
830 <!-- ##### MACRO G_MAXUSHORT ##### -->
832 The maximum value which can be held in a #gushort.
836 <!-- ##### MACRO G_MINDOUBLE ##### -->
838 The minimum positive value which can be held in a #gdouble.
841 If you are interested in the smallest value which can be held in a #gdouble,
846 <!-- ##### MACRO G_MINFLOAT ##### -->
848 The minimum positive value which can be held in a #gfloat.
851 If you are interested in the smallest value which can be held in a #gfloat,
856 <!-- ##### MACRO G_MININT ##### -->
858 The minimum value which can be held in a #gint.
862 <!-- ##### MACRO G_MINLONG ##### -->
864 The minimum value which can be held in a #glong.
868 <!-- ##### MACRO G_MINOFFSET ##### -->
870 The minimum value which can be held in a #goffset.
874 <!-- ##### MACRO G_MINSHORT ##### -->
876 The minimum value which can be held in a #gshort.
880 <!-- ##### MACRO G_MINSSIZE ##### -->
882 The minimum value which can be held in a #gssize.
887 <!-- ##### MACRO G_MODULE_EXPORT ##### -->
889 Used to declare functions exported by modules. This is a no-op on Linux and
890 Unices, but when compiling for Windows, it marks a symbol to be exported from
891 the library or executable being built.
895 <!-- ##### MACRO G_MODULE_IMPORT ##### -->
897 Used to declare functions imported from modules.
901 <!-- ##### MACRO G_MODULE_SUFFIX ##### -->
903 Expands to the proper shared library suffix for the current platform
904 without the leading dot. For the most Unices and Linux this is "so",
905 for some HP-UX versions this is "sl" and for Windows this is "dll".
909 <!-- ##### MACRO G_THREADS_ENABLED ##### -->
912 This macro is defined if GLib was compiled with thread support. This
913 does not necessarily mean that there is a thread implementation
914 available, but it does mean that the infrastructure is in place and
915 that once you provide a thread implementation to g_thread_init(), GLib
916 will be multi-thread safe. If #G_THREADS_ENABLED is not defined, then
917 Glib is not, and cannot be, multi-thread safe.
921 <!-- ##### MACRO NAME_MAX ##### -->
923 Provided for UNIX emulation on Windows; equivalent to UNIX macro
924 %NAME_MAX, which is the maximum length of a single path component.
925 i.e. just the <filename>foo</filename> in <filename>/usr/bin/foo</filename>.
929 <!-- ##### MACRO _ ##### -->
931 Marks a string for translation, gets replaced with the translated string
935 @String: the string to be translated
938 <!-- ##### MACRO access ##### -->
944 <!-- ##### MACRO close ##### -->
950 <!-- ##### FUNCTION closedir ##### -->
952 Provided for UNIX emulation on Windows; see documentation for <function>closedir()</function>
959 <!-- ##### MACRO fdopen ##### -->
965 <!-- ##### MACRO ftruncate ##### -->
967 Provided for UNIX emulation on Windows; see documentation for ftruncate()
974 <!-- ##### FUNCTION g_channel_error_from_errno ##### -->
982 <!-- ##### FUNCTION g_channel_error_quark ##### -->
989 <!-- ##### FUNCTION g_convert_error_quark ##### -->
996 <!-- ##### FUNCTION g_desktop_entry_escape_strings ##### -->
1004 <!-- ##### FUNCTION g_desktop_entry_free ##### -->
1011 <!-- ##### FUNCTION g_desktop_entry_get_boolean ##### -->
1022 <!-- ##### FUNCTION g_desktop_entry_get_boolean_list ##### -->
1034 <!-- ##### FUNCTION g_desktop_entry_get_groups ##### -->
1043 <!-- ##### FUNCTION g_desktop_entry_get_integer ##### -->
1054 <!-- ##### FUNCTION g_desktop_entry_get_integer_list ##### -->
1066 <!-- ##### FUNCTION g_desktop_entry_get_keys ##### -->
1077 <!-- ##### FUNCTION g_desktop_entry_get_locale_string ##### -->
1089 <!-- ##### FUNCTION g_desktop_entry_get_locale_string_list ##### -->
1102 <!-- ##### FUNCTION g_desktop_entry_get_start_group ##### -->
1110 <!-- ##### FUNCTION g_desktop_entry_get_string ##### -->
1121 <!-- ##### FUNCTION g_desktop_entry_get_string_list ##### -->
1133 <!-- ##### FUNCTION g_desktop_entry_has_group ##### -->
1142 <!-- ##### FUNCTION g_desktop_entry_has_key ##### -->
1153 <!-- ##### FUNCTION g_desktop_entry_new ##### -->
1162 <!-- ##### FUNCTION g_desktop_entry_new_from_data ##### -->
1169 @legal_start_groups:
1174 <!-- ##### FUNCTION g_desktop_entry_new_from_data_dirs ##### -->
1181 @legal_start_groups:
1186 <!-- ##### FUNCTION g_desktop_entry_new_from_file ##### -->
1192 @legal_start_groups:
1197 <!-- ##### FUNCTION g_desktop_entry_remove_group ##### -->
1206 <!-- ##### FUNCTION g_desktop_entry_remove_key ##### -->
1216 <!-- ##### FUNCTION g_desktop_entry_set_boolean ##### -->
1227 <!-- ##### FUNCTION g_desktop_entry_set_boolean_list ##### -->
1239 <!-- ##### FUNCTION g_desktop_entry_set_integer ##### -->
1250 <!-- ##### FUNCTION g_desktop_entry_set_integer_list ##### -->
1262 <!-- ##### FUNCTION g_desktop_entry_set_locale_string ##### -->
1274 <!-- ##### FUNCTION g_desktop_entry_set_locale_string_list ##### -->
1287 <!-- ##### FUNCTION g_desktop_entry_set_string ##### -->
1298 <!-- ##### FUNCTION g_desktop_entry_set_string_list ##### -->
1310 <!-- ##### FUNCTION g_desktop_entry_to_data ##### -->
1320 <!-- ##### FUNCTION g_file_replace ##### -->
1331 <!-- ##### FUNCTION g_format_file_size_for_display ##### -->
1339 <!-- ##### FUNCTION g_io_channel_error_quark ##### -->
1346 <!-- ##### VARIABLE g_log_domain_glib ##### -->
1348 The log domain used for messages logged by GLib itself.
1352 <!-- ##### FUNCTION g_main_add_poll ##### -->
1354 Adds a file descriptor to be polled.
1355 This is usually combined with g_source_add() to add an event source.
1356 The event source's check function will typically test the revents
1357 field in the #GPollFD struct and return TRUE if events need to be processed.
1360 @fd: a #GPollFD, which is a file descriptor together with a bitwise
1361 combination of #GIOCondition flags determining which events to poll for.
1362 @priority: the priority of the poll, which should be the same as the priority
1363 used for g_source_add() to ensure that the file descriptor is polled whenever
1364 the results may be needed.
1365 See #G_PRIORITY_DEFAULT, #G_PRIORITY_DEFAULT_IDLE, #G_PRIORITY_HIGH,
1366 #G_PRIORITY_HIGH_IDLE, and #G_PRIORITY_LOW.
1368 <!-- ##### FUNCTION g_main_context_get ##### -->
1376 <!-- ##### FUNCTION g_main_loop_destroy ##### -->
1383 <!-- ##### FUNCTION g_main_remove_poll ##### -->
1385 Removes a file descriptor from the list being polled.
1388 @fd: the #GPollFD to remove.
1390 <!-- ##### FUNCTION g_main_win32_get_poll_func ##### -->
1397 <!-- ##### FUNCTION g_mem_check ##### -->
1399 Checks if the given memory has already been freed. If it has it outputs
1401 To use this function you must configure glib with the flag
1402 '--enable-mem-check=yes' before compiling.
1405 @mem: the memory to check.
1407 <!-- ##### MACRO g_memmove ##### -->
1416 <!-- ##### FUNCTION g_module_build_path ##### -->
1418 A portable way to build the filename of a module. The platform-specific
1419 prefix and suffix are added to the filename, if needed, and the result is
1420 added to the directory, using the correct separator character.
1423 The directory should specify the directory where the module can be found.
1424 It can be %NULL or an empty string to indicate that the module is in a standard
1425 platform-specific directory, though this is not recommended since the
1426 wrong module may be found.
1429 For example, calling g_module_build_path() on a Linux system with a @directory
1430 of <filename>/lib</filename> and a @module_name of "mylibrary" will return
1431 <filename>/lib/libmylibrary.so</filename>. On a Windows system, using
1432 <filename>\Windows</filename> as the directory it will return
1433 <filename>\Windows\mylibrary.dll</filename>.
1436 @directory: the directory where the module is. This can be %NULL or the empty
1437 string to indicate that the standard platform-specific directories will be
1438 used, though that is not recommended.
1439 @module_name: the name of the module.
1440 @Returns: the complete path of the module, including the standard library
1441 prefix and suffix. This should be freed when no longer needed.
1443 <!-- ##### FUNCTION g_module_close ##### -->
1448 @module: a #GModule to close.
1449 @Returns: %TRUE on success.
1451 <!-- ##### FUNCTION g_module_error ##### -->
1453 Gets a string describing the last module error.
1456 @Returns: a string describing the last module error.
1458 <!-- ##### FUNCTION g_module_make_resident ##### -->
1460 Ensures that a module will never be unloaded.
1461 Any future g_module_close() calls on the module will be ignored.
1464 @module: a #GModule to make permanently resident.
1466 <!-- ##### FUNCTION g_module_name ##### -->
1468 Gets the filename from a #GModule.
1471 @module: a #GModule.
1472 @Returns: the filename of the module, or "main" if the module is the main
1475 <!-- ##### FUNCTION g_module_open ##### -->
1477 Opens a module. If the module has already been opened, its reference
1478 count is incremented.
1482 First of all g_module_open() tries to open @file_name as a module. If
1483 that fails and @file_name has the ".la"-suffix (and is a libtool archive)
1484 it tries to open the corresponding module. If that fails and it doesn't
1485 have the proper module suffix for the platform (#G_MODULE_SUFFIX), this
1486 suffix will be appended and the corresponding module will be opended. If
1487 that fails and @file_name doesn't have the ".la"-suffix, this suffix is
1488 appended and g_module_open() tries to open the corresponding module. If
1489 eventually that fails as well, %NULL is returned.
1492 @file_name: the name of the file containing the module, or %NULL to obtain
1493 a #GModule representing the main program itself.
1494 @flags: the flags used for opening the module. This can be the logical
1495 OR of any of the #GModuleFlags.
1496 @Returns: a #GModule on success, or %NULL on failure.
1498 <!-- ##### FUNCTION g_module_supported ##### -->
1500 Checks if modules are supported on the current platform.
1503 @Returns: %TRUE if modules are supported.
1505 <!-- ##### FUNCTION g_module_symbol ##### -->
1507 Gets a symbol pointer from a module, such as one exported by #G_MODULE_EXPORT.
1510 Note that a valid symbol can be %NULL.
1513 @module: a #GModule.
1514 @symbol_name: the name of the symbol to find.
1515 @symbol: returns the pointer to the symbol value.
1516 @Returns: %TRUE on success.
1518 <!-- ##### FUNCTION g_regex_error_quark ##### -->
1525 <!-- ##### FUNCTION g_regex_free ##### -->
1532 <!-- ##### FUNCTION g_scanner_stat_mode ##### -->
1534 Gets the file attributes.
1535 This is the <structfield>st_mode</structfield> field from the
1536 <structname>stat</structname> structure. See the <function>stat()</function>
1540 @filename: the file name.
1541 @Returns: the file attributes.
1543 <!-- ##### FUNCTION g_set_error_handler ##### -->
1545 Sets the function to be called to handle error messages.
1546 This function is deprecated in favour of the new logging facilities.
1549 @func: the function to be called to handle error messages.
1550 @Returns: the old error handler.
1552 <!-- ##### FUNCTION g_set_message_handler ##### -->
1554 Sets the function to be called to handle messages.
1555 This function is deprecated in favour of the new logging facilities.
1558 @func: the function to be called to handle normal messages.
1559 @Returns: the old message handler.
1561 <!-- ##### FUNCTION g_set_warning_handler ##### -->
1563 Sets the function to be called to handle warning messages.
1564 This function is deprecated in favour of the new logging facilities.
1567 @func: the function to be called to handle warning messages.
1568 @Returns: the old warning handler.
1570 <!-- ##### FUNCTION g_source_add ##### -->
1584 <!-- ##### FUNCTION g_source_connect ##### -->
1594 <!-- ##### FUNCTION g_source_connect_indirect ##### -->
1603 <!-- ##### FUNCTION g_source_remove_by_source_data ##### -->
1605 Removes the first event source found with the given source data.
1608 Event sources are sorted with the highest priority first. Sources with equal
1609 priority are stored in the order in which they were added.
1612 @source_data: the source data, which contains information specific to the
1614 @Returns: TRUE if an event source was found and removed.
1616 <!-- ##### FUNCTION g_static_private_get_for_thread ##### -->
1625 <!-- ##### FUNCTION g_static_private_set_for_thread ##### -->
1635 <!-- ##### MACRO g_string ##### -->
1637 Turns the argument into a string literal by using the '#' stringizing operator.
1640 @x: text to convert to a literal string.
1642 <!-- ##### FUNCTION g_warn_message ##### -->
1653 <!-- ##### MACRO getcwd ##### -->
1659 <!-- ##### MACRO getpid ##### -->
1665 <!-- ##### TYPEDEF gint16 ##### -->
1667 A signed integer guaranteed to be 16 bits on all platforms.
1668 Values of this type can range from -32,768 to 32,767.
1672 <!-- ##### TYPEDEF gint32 ##### -->
1674 A signed integer guaranteed to be 32 bits on all platforms.
1675 Values of this type can range from -2,147,483,648 to 2,147,483,647.
1679 <!-- ##### TYPEDEF gint64 ##### -->
1681 A signed integer guaranteed to be 64 bits on all platforms.
1682 Values of this type can range from -9,223,372,036,854,775,808 to
1683 9,223,372,036,854,775,807.
1687 <!-- ##### TYPEDEF gint8 ##### -->
1689 A signed integer guaranteed to be 8 bits on all platforms.
1690 Values of this type can range from -128 to 127.
1694 <!-- ##### TYPEDEF goffset ##### -->
1696 A signed integer type that is used for file offsets, corresponding to the
1703 <!-- ##### TYPEDEF gsize ##### -->
1705 An unsigned integer type of the result of the sizeof operator, corresponding
1706 to the size_t type defined in C99. This type is wide enough to hold the numeric
1707 value of a pointer, so it is usually 32bit wide on a 32bit platform and
1708 64bit wide on a 64bit platform.
1712 <!-- ##### TYPEDEF gssize ##### -->
1714 A signed variant of gsize, corresponding to the ssize_t defined on most platforms.
1718 <!-- ##### TYPEDEF guint16 ##### -->
1720 An unsigned integer guaranteed to be 16 bits on all platforms.
1721 Values of this type can range from 0 to 65,535.
1725 <!-- ##### TYPEDEF guint32 ##### -->
1727 An unsigned integer guaranteed to be 32 bits on all platforms.
1728 Values of this type can range from 0 to 4,294,967,295.
1732 <!-- ##### TYPEDEF guint8 ##### -->
1734 An unsigned integer guaranteed to be 8 bits on all platforms.
1735 Values of this type can range from 0 to 255.
1739 <!-- ##### MACRO lseek ##### -->
1745 <!-- ##### MACRO open ##### -->
1751 <!-- ##### FUNCTION opendir ##### -->
1753 Provided for UNIX emulation on Windows; see documentation for <function>opendir()</function>
1760 <!-- ##### MACRO pclose ##### -->
1766 <!-- ##### MACRO pipe ##### -->
1768 Provided for UNIX emulation on Windows; see documentation for pipe()
1772 @phandles: file descriptors, the first one for reading, the second one for writing.
1774 <!-- ##### MACRO popen ##### -->
1780 <!-- ##### MACRO read ##### -->
1786 <!-- ##### MACRO readdir ##### -->
1788 Provided for UNIX emulation on Windows; see documentation for <function>readdir()</function>
1793 <!-- ##### FUNCTION rewinddir ##### -->
1795 Provided for UNIX emulation on Windows; see documentation for <function>rewinddir()</function>
1801 <!-- ##### MACRO write ##### -->