The "GDesktopEntry" parser is intended to parse files written to the Desktop Entry Specification. It supports deserialization of desktop entries from files and in-memory data. Desktop entries are used for a variety of things including menus, application MIME type registration, and launchers. To load an existing desktop entry from a data directory (as returned by g_get_user_data_dir() and g_get_system_data_dirs()) use g_desktop_entry_new_from_data_dirs(). To load an existing desktop entry from an arbitrary location on the file system use g_desktop_entry_new_from_file(). If the desktop entry is already in memory use g_desktop_entry_new_from_data(). Once the desktop entry is loaded its keys can be queried using the g_desktop_entry_get family of functions. To create a new desktop entry first call g_desktop_entry_new(). Then, call the g_desktop_entry_set family of functions. Next, call g_desktop_entry_to_data() to output the desktop entry to a byte array, which can be written to disk or sent over a network. Finally, call g_desktop_entry_free() to deallocate the #GDesktopEntry object returned by g_desktop_entry_new(). serializes and deserializes a desktop entry. Desktop Entry Parser Testing @G_CHANNEL_ERROR_ACCES: @G_CHANNEL_ERROR_BADF: @G_CHANNEL_ERROR_DEADLK: @G_CHANNEL_ERROR_FAULT: @G_CHANNEL_ERROR_INVAL: @G_CHANNEL_ERROR_IO: @G_CHANNEL_ERROR_ISDIR: @G_CHANNEL_ERROR_MFILE: @G_CHANNEL_ERROR_NOLCK: @G_CHANNEL_ERROR_NOSPC: @G_CHANNEL_ERROR_PERM: @G_CHANNEL_ERROR_PIPE: @G_CHANNEL_ERROR_SPIPE: @G_CHANNEL_ERROR_ENCODE_RW: @G_CHANNEL_ERROR_FAILED: @G_CHANNEL_STATUS_NORMAL: @G_CHANNEL_STATUS_EOF: @G_CHANNEL_STATUS_PARTIAL_CHARS: @G_CHANNEL_STATUS_AGAIN: @G_CHANNEL_STATUS_INTR: @G_CHANNEL_STATUS_ERROR: @G_CHANNEL_STATUS_BAD_INPUT: @a: @b: @user_data: @Returns: @s1: @s2: @Returns: Error codes returned by desktop entry parsing. @G_DESKTOP_ENTRY_ERROR_UNKNOWN_ENCODING: text being parsed is not UTF-8 and cannot be guessed. @G_DESKTOP_ENTRY_ERROR_BAD_START_GROUP: desktop entry does not start with a legal start group. @G_DESKTOP_ENTRY_ERROR_PARSE: desktop entry is empty or contains invalid data. @G_DESKTOP_ENTRY_ERROR_NOT_FOUND: valid desktop entry could not be found. @G_DESKTOP_ENTRY_ERROR_KEY_NOT_FOUND: desktop entry does not have requested key. @G_DESKTOP_ENTRY_ERROR_GROUP_NOT_FOUND: desktop entry does not have requested group @G_DESKTOP_ENTRY_ERROR_INVALID_VALUE: desktop entry contains key which has value that cannot be validated. #GDesktopEntry supports a few flags for tweaking performance during deserialization. #G_DESKTOP_ENTRY_DISCARD_COMMENTS and #G_DESKTOP_ENTRY_DISCARD_TRANSLATIONS will reduce memory footprint, and #G_DESKTOP_ENTRY_GENERATE_LOOKUP_MAP will increase key lookup speed. @G_DESKTOP_ENTRY_NONE: use parser defaults @G_DESKTOP_ENTRY_DISCARD_COMMENTS: Discard all lines that are blank or start with "#". @G_DESKTOP_ENTRY_DISCARD_TRANSLATIONS: Only retain translations that are returned by g_get_language_names(). @G_DESKTOP_ENTRY_GENERATE_LOOKUP_MAP: Generate a lookup map for key names to make lookups constant time at the cost of more memory. Specifies the type of function passed to g_set_error_handler(). @str: the error message. @hook_list: @hook: @G_IO_FILE_MODE_READ: @G_IO_FILE_MODE_WRITE: @G_IO_FILE_MODE_APPEND: @G_IO_FILE_MODE_READ_WRITE: @G_IO_FILE_MODE_READ_WRITE_TRUNCATE: @G_IO_FILE_MODE_READ_WRITE_APPEND: Enumeration representing different kinds of patterns. This is only used internally for optimizing the match algorithm. @G_MATCH_ALL: a general pattern. @G_MATCH_ALL_TAIL: a general pattern which contains a fixed part matching the end of the string. @G_MATCH_HEAD: a pattern matching every string with a certain prefix. @G_MATCH_TAIL: a pattern matching every string with a certain suffix. @G_MATCH_EXACT: a pattern matching exactly one string. @G_MATCH_LAST: Specifies the type of function passed to g_set_warning_handler(). @str: the warning message. Error domain for desktop entry parsing. Errors in this domain will be from the #GDesktopEntryError enumeration. See #GError for information on error domains. One of %G_IO_CHANNEL_UNIX_LINE_TERM, %G_IO_CHANNEL_DOS_LINE_TERM, or %G_IO_CHANNEL_MACINTOSH_LINE_TERM (unimplemented) depending on the system type. Encoding for nonbuffered IO. With this encoding, data must be read using g_io_channel_read_chars(); the other functions will not work. Provided for UNIX emulation on Windows; equivalent to UNIX macro %NAME_MAX, which is the maximum length of a single path component. i.e. just the foo in /usr/bin/foo. Marks a string for translation, gets replaced with the translated string at runtime. @String: the string to be translated @Since: 2.4 Provided for UNIX emulation on Windows; see documentation for closedir() in any UNIX manual. @Param1: @Returns: Provided for UNIX emulation on Windows; see documentation for ftruncate() in any UNIX manual. @fd: @size: @en: @Returns: @Returns: @Returns: @entry: @should_escape: @entry: @entry: @group_name: @key: @error: @Returns: @entry: @group_name: @key: @length: @error: @Returns: @entry: @length: @Returns: @entry: @group_name: @key: @error: @Returns: @entry: @group_name: @key: @length: @error: @Returns: @entry: @group_name: @length: @error: @Returns: @entry: @group_name: @key: @locale: @error: @Returns: @entry: @group_name: @key: @locale: @length: @error: @Returns: @entry: @Returns: @entry: @group_name: @key: @error: @Returns: @entry: @group_name: @key: @length: @error: @Returns: @entry: @group_name: @Returns: @entry: @group_name: @key: @error: @Returns: @flags: @error: @Returns: @data: @length: @legal_start_groups: @flags: @error: @Returns: @file: @full_path: @legal_start_groups: @flags: @error: @Returns: @file: @legal_start_groups: @flags: @error: @Returns: @entry: @group_name: @error: @entry: @group_name: @key: @error: @entry: @group_name: @key: @boolean: @error: @entry: @group_name: @key: @list: @length: @error: @entry: @group_name: @key: @integer: @error: @entry: @group_name: @key: @list: @length: @error: @entry: @group_name: @key: @locale: @string: @error: @entry: @group_name: @key: @locale: @list: @length: @error: @entry: @group_name: @key: @string: @error: @entry: @group_name: @key: @list: @length: @error: @entry: @length: @error: @Returns: @filename: @contents: @length: @error: @Returns: @size: @Returns: @Returns: The log domain used for messages logged by GLib itself. Adds a file descriptor to be polled. This is usually combined with g_source_add() to add an event source. The event source's check function will typically test the revents field in the #GPollFD struct and return TRUE if events need to be processed. @fd: a #GPollFD, which is a file descriptor together with a bitwise combination of #GIOCondition flags determining which events to poll for. @priority: the priority of the poll, which should be the same as the priority used for g_source_add() to ensure that the file descriptor is polled whenever the results may be needed. See #G_PRIORITY_DEFAULT, #G_PRIORITY_DEFAULT_IDLE, #G_PRIORITY_HIGH, #G_PRIORITY_HIGH_IDLE, and #G_PRIORITY_LOW. @thread: @Returns: @loop: Removes a file descriptor from the list being polled. @fd: the #GPollFD to remove. @Returns: Checks if the given memory has already been freed. If it has it outputs a warning message. To use this function you must configure glib with the flag '--enable-mem-check=yes' before compiling. @mem: the memory to check. @Returns: @regex: Gets the file attributes. This is the st_mode field from the stat structure. See the stat() documentation. @filename: the file name. @Returns: the file attributes. Sets the function to be called to handle error messages. This function is deprecated in favour of the new logging facilities. @func: the function to be called to handle error messages. @Returns: the old error handler. Sets the function to be called to handle messages. This function is deprecated in favour of the new logging facilities. @func: the function to be called to handle normal messages. @Returns: the old message handler. Sets the function to be called to handle warning messages. This function is deprecated in favour of the new logging facilities. @func: the function to be called to handle warning messages. @Returns: the old warning handler. @priority: @can_recurse: @funcs: @source_data: @user_data: @notify: @Returns: @source: @context: @source: @func: @data: @notify: @source: @callback_data: @callback_funcs: Removes the first event source found with the given source data. Event sources are sorted with the highest priority first. Sources with equal priority are stored in the order in which they were added. @source_data: the source data, which contains information specific to the type of source. @Returns: TRUE if an event source was found and removed. @private_key: @thread: @Returns: @private_key: @thread: @data: @notify: Turns the argument into a string literal by using the '#' stringizing operator. @x: text to convert to a literal string. @domain: @file: @line: @func: @warnexpr: This is the binary age passed to libtool. If libtool means nothing to you, don't worry about it. ;-) @required_major: @required_minor: @required_micro: @Returns: This is the interface age passed to libtool. If libtool means nothing to you, don't worry about it. ;-) The major version number of the GLib library. (e.g. in GLib version 1.2.5 this is 1.) This variable is in the library, so represents the GLib library you have linked against. Contrast with the #GLIB_MAJOR_VERSION macro, which represents the major version of the GLib headers you have included. The micro version number of the GLib library. (e.g. in GLib version 1.2.5 this is 5.) This variable is in the library, so represents the GLib library you have linked against. Contrast with the #GLIB_MICRO_VERSION macro, which represents the micro version of the GLib headers you have included. The minor version number of the GLib library. (e.g. in GLib version 1.2.5 this is 2.) This variable is in the library, so represents the GLib library you have linked against. Contrast with the #GLIB_MINOR_VERSION macro, which represents the minor version of the GLib headers you have included. Provided for UNIX emulation on Windows; see documentation for opendir() in any UNIX manual. @Param1: @Returns: Provided for UNIX emulation on Windows; see documentation for pipe() in any UNIX manual. @phandles: file descriptors, the first one for reading, the second one for writing. Provided for UNIX emulation on Windows; see documentation for readdir() in any UNIX manual. Provided for UNIX emulation on Windows; see documentation for rewinddir() in any UNIX manual. @Param1: