From 9d3b37ac3fa7d5ea25a897e5baa7c7a66da0873f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 1 Oct 2011 21:03:14 -0400 Subject: Move keyfile docs inline --- docs/reference/glib/tmpl/keyfile.sgml | 939 ---------------------------------- 1 file changed, 939 deletions(-) delete mode 100644 docs/reference/glib/tmpl/keyfile.sgml (limited to 'docs') diff --git a/docs/reference/glib/tmpl/keyfile.sgml b/docs/reference/glib/tmpl/keyfile.sgml deleted file mode 100644 index 8080774f4..000000000 --- a/docs/reference/glib/tmpl/keyfile.sgml +++ /dev/null @@ -1,939 +0,0 @@ - -Key-value file parser - - -parses .ini-like config files - - - -#GKeyFile lets you parse, edit or create files containing groups of -key-value pairs, which we call key files for -lack of a better name. Several freedesktop.org specifications use -key files now, e.g the -Desktop -Entry Specification and the -Icon -Theme Specification. - - - -The syntax of key files is described in detail in the -Desktop -Entry Specification, here is a quick summary: Key files -consists of groups of key-value pairs, interspersed with comments. - - - -# this is just an example -# there can be comments before the first group - -[First Group] - -Name=Key File Example\tthis value shows\nescaping - -# localized strings are stored in multiple key-value pairs -Welcome=Hello -Welcome[de]=Hallo -Welcome[fr_FR]=Bonjour -Welcome[it]=Ciao -Welcome[be@latin]=Hello - -[Another Group] - -Numbers=2;20;-200;0 - -Booleans=true;false;true;true - - - - -Lines beginning with a '#' and blank lines are considered comments. - - - -Groups are started by a header line containing the group name enclosed -in '[' and ']', and ended implicitly by the start of the next group or -the end of the file. Each key-value pair must be contained in a group. - - - -Key-value pairs generally have the form key=value, -with the exception of localized strings, which have the form -key[locale]=value, with a locale identifier of the form -lang_COUNTRY@MODIFIER where COUNTRY and -MODIFIER are optional. Space before and after the -'=' character are ignored. Newline, tab, carriage return and backslash -characters in value are escaped as \n, \t, \r, and \\, respectively. -To preserve leading spaces in values, these can also be escaped as \s. - - - -Key files can store strings (possibly with localized variants), integers, -booleans and lists of these. Lists are separated by a separator character, -typically ';' or ','. To use the list separator character in a value in -a list, it has to be escaped by prefixing it with a backslash. - - - -This syntax is obviously inspired by the .ini -files commonly met on Windows, but there are some important differences: - - -.ini files use the ';' character to begin comments, - key files use the '#' character. - - -Key files do not allow for ungrouped keys meaning only comments can precede the first group. - - -Key files are always encoded in UTF-8. - - -Key and Group names are case-sensitive, for example a group called -[GROUP] is a different group from [group]. - - -.ini files don't have a strongly typed boolean entry type, they only -have GetProfileInt. In GKeyFile only -true and false (in lower case) are allowed. - - - - - -Note that in contrast to the -Desktop -Entry Specification, groups in key files may contain the same -key multiple times; the last entry wins. Key files may also contain -multiple groups with the same name; they are merged together. -Another difference is that keys and group names in key files are not -restricted to ASCII characters. - - - - - - - - - - - - - - - -The GKeyFile struct contains only private fields -and should not be used directly. - - - - - -Error domain for key file parsing. Errors in this domain will -be from the #GKeyFileError enumeration. See #GError for information on -error domains. - - - - - - -Error codes returned by key file parsing. - - -@G_KEY_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding -@G_KEY_FILE_ERROR_PARSE: document was ill-formed -@G_KEY_FILE_ERROR_NOT_FOUND: the file was not found -@G_KEY_FILE_ERROR_KEY_NOT_FOUND: a requested key was not found -@G_KEY_FILE_ERROR_GROUP_NOT_FOUND: a requested group was not found -@G_KEY_FILE_ERROR_INVALID_VALUE: a value could not be parsed - - - -Flags which influence the parsing. - - -@G_KEY_FILE_NONE: No flags, default behaviour -@G_KEY_FILE_KEEP_COMMENTS: Use this flag if you plan to write the (possibly modified) - contents of the key file back to a file; otherwise all comments will be lost when - the key file is written back. -@G_KEY_FILE_KEEP_TRANSLATIONS: Use this flag if you plan to write the (possibly modified) - contents of the key file back to a file; otherwise only the translations for the current - language will be written back. - - - - - - -@void: -@Returns: - - - - - - - -@key_file: - - - - - - - -@key_file: -@separator: - - - - - - - -@key_file: -@file: -@flags: -@error: -@Returns: - - - - - - - -@key_file: -@data: -@length: -@flags: -@error: -@Returns: - - - - - - - -@key_file: -@file: -@full_path: -@flags: -@error: -@Returns: - - - - - - - -@key_file: -@file: -@search_dirs: -@full_path: -@flags: -@error: -@Returns: - - - - - - - -@key_file: -@length: -@error: -@Returns: - - - - - - - -@key_file: -@Returns: - - - - - - - -@key_file: -@length: -@Returns: - - - - - - - -@key_file: -@group_name: -@length: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@locale: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@length: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@locale: -@length: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@length: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@length: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@length: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@value: - - - - - - - -@key_file: -@group_name: -@key: -@string: - - - - - - - -@key_file: -@group_name: -@key: -@locale: -@string: - - - - - - - -@key_file: -@group_name: -@key: -@value: - - - - - - - -@key_file: -@group_name: -@key: -@value: - - - - - - - -@key_file: -@group_name: -@key: -@value: - - - - - - - -@key_file: -@group_name: -@key: -@value: - - - - - - - -@key_file: -@group_name: -@key: -@value: - - - - - - - -@key_file: -@group_name: -@key: -@list: -@length: - - - - - - - -@key_file: -@group_name: -@key: -@locale: -@list: -@length: - - - - - - - -@key_file: -@group_name: -@key: -@list: -@length: - - - - - - - -@key_file: -@group_name: -@key: -@list: -@length: - - - - - - - -@key_file: -@group_name: -@key: -@list: -@length: - - - - - - - -@key_file: -@group_name: -@key: -@comment: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@error: -@Returns: - - - - - - - -@key_file: -@group_name: -@key: -@error: -@Returns: - - - - -The name of the main group of a desktop entry file, as defined in the -Desktop -Entry Specification. Consult the specification for more -details about the meanings of the keys below. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a string giving the type of the desktop entry. Usually -G_KEY_FILE_DESKTOP_TYPE_APPLICATION, -G_KEY_FILE_DESKTOP_TYPE_LINK, or -G_KEY_FILE_DESKTOP_TYPE_DIRECTORY. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a string giving the version of the Desktop -Entry Specification used for the desktop entry file. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a localized string giving the specific name of the -desktop entry. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a localized string giving the generic name of the -desktop entry. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a boolean stating whether the desktop entry should be -shown in menus. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a localized string giving the tooltip for the desktop -entry. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a localized string giving the name of the icon to be -displayed for the desktop entry. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a boolean stating whether the desktop entry has been -deleted by the user. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a list of strings identifying the environments that -should display the desktop entry. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a list of strings identifying the environments that -should not display the desktop entry. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a string giving the file name of a binary on disk -used to determine if the program is actually installed. It is only -valid for desktop entries with the Application -type. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a string giving the command line to execute. It is only -valid for desktop entries with the Application -type. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a string containing the working directory to run the -program in. It is only valid for desktop entries with the -Application type. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a boolean stating whether the program should be -run in a terminal window. It is only valid for desktop entries with -the Application type. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a list of strings giving the MIME types supported -by this desktop entry. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a list of strings giving the categories in which the -desktop entry should be shown in a menu. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a boolean stating whether the application supports -the Startup -Notification Protocol Specification. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is string identifying the WM class or name hint of a -window that the application will create, which can be used to emulate -Startup Notification with older applications. - - -@Since: 2.14 - - - - -A key under G_KEY_FILE_DESKTOP_GROUP -whose value is a string giving the URL to access. It is only valid -for desktop entries with the Link type. - - -@Since: 2.14 - - - - -The value of the G_KEY_FILE_DESKTOP_KEY_TYPE -key for desktop entries representing applications. - - -@Since: 2.14 - - - - -The value of the G_KEY_FILE_DESKTOP_KEY_TYPE -key for desktop entries representing links to documents. - - -@Since: 2.14 - - - - -The value of the G_KEY_FILE_DESKTOP_KEY_TYPE -key for desktop entries representing directories. - - -@Since: 2.14 - - -- cgit v1.2.1