From fbed027845c24eb69a3325d6a5bc3c0aad12c4a8 Mon Sep 17 00:00:00 2001 From: Paul Pogonyshev Date: Mon, 20 Apr 2009 23:19:03 +0300 Subject: Wrap four g_get_user_*_dir() functions Wrap g_get_user_cache_dir(), g_get_user_config_dir(), g_get_user_data_dir(), g_get_user_special_dir() and the constants required for the latter. Document all new functions and constants. (Bug #575999). --- docs/reference/pyglib-constants.xml | 60 +++++++++++++++ docs/reference/pyglib-functions.xml | 149 ++++++++++++++++++++++++++++++++++++ 2 files changed, 209 insertions(+) (limited to 'docs/reference') diff --git a/docs/reference/pyglib-constants.xml b/docs/reference/pyglib-constants.xml index a879171..0f1bf8d 100644 --- a/docs/reference/pyglib-constants.xml +++ b/docs/reference/pyglib-constants.xml @@ -15,6 +15,7 @@ + @@ -192,6 +193,65 @@ of argv to the child. + + Glib User Directory Constants + + The User Directory constants are integer values that are currently used only as arguments to + glib.get_user_special_dir() + function. See function documentation for details. + + + + glib.USER_DIRECTORY_DESKTOP + + the user's Desktop directory + + + + glib.USER_DIRECTORY_DOCUMENTS + + the user's Documents directory + + + + glib.USER_DIRECTORY_DOWNLOAD + + the user's Downloads directory + + + + glib.USER_DIRECTORY_MUSIC + + the user's Music directory + + + + glib.USER_DIRECTORY_PICTURES + + the user's Pictures directory + + + + glib.USER_DIRECTORY_PUBLIC_SHARE + + the user's shared directory + + + + glib.USER_DIRECTORY_TEMPLATES + + the user's Templates directory + + + + glib.USER_DIRECTORY_VIDEOS + + the user's Movies directory + + + + + Glib Version Constants The Version constants specify the version of diff --git a/docs/reference/pyglib-functions.xml b/docs/reference/pyglib-functions.xml index 59a590d..358fa83 100644 --- a/docs/reference/pyglib-functions.xml +++ b/docs/reference/pyglib-functions.xml @@ -71,6 +71,19 @@ linkend="function-glib--spawn-async">glib.spawn_async linkend="function-glib--get-current-time">glib.get_current_time glib.get_user_cache_dir + + glib.get_user_config_dir + + glib.get_user_data_dir + + glib.get_user_special_dir + directory + + glib.main_depth + + glib.get_user_cache_dir + + + glib.get_user_cache_dir + + + + Returns : + + + a strings with a path to user's cache directory. + + + + + + This function is available in PyGObject 2.18 and above. + + + Returns a base directory in which to store non-essential, + cached data specific to particular user. + + On UNIX platforms this is determined using the mechanisms + described in the + XDG + Base Directory Specification. + + + + glib.get_user_config_dir + + + glib.get_user_config_dir + + + + Returns : + + + a strings with a path to user's configuration directory. + + + + + + This function is available in PyGObject 2.18 and above. + + + Returns a base directory in which to store user-specific + application configuration information such as user preferences + and settings. + + On UNIX platforms this is determined using the mechanisms + described in the + XDG + Base Directory Specification. + + + + glib.get_user_data_dir + + + glib.get_user_data_dir + + + + Returns : + + + a strings with a path to user's data directory. + + + + + + This function is available in PyGObject 2.18 and above. + + + Returns a base directory in which to access application + data such as icons that is customized for a particular + user + + On UNIX platforms this is determined using the mechanisms + described in the + XDG + Base Directory Specification. + + + + glib.get_user_special_dir + + + glib.get_user_special_dir + directory + + + + directory : + + + the logical id of special directory, + see User + Directory constants for the list of supported + values + + + + + Returns : + + + a strings with a path to the requested directory. + + + + + + This function is available in PyGObject 2.18 and above. + + + Returns the full path of a special directory using its + logical id. + + On Unix this is done using the XDG special user + directories. For compatibility with existing practise, + glib.USER_DIRECTORY_DESKTOP + falls back to $HOME/Desktop when XDG + special user directories have not been set up. + + Depending on the platform, the user might be able to + change the path of the special directory without requiring the + session to restart; GLib will not reflect any change once the + special directories are loaded. + + glib.main_depth -- cgit