Top |
const gchar * | xfce_get_homedir () |
#define | xfce_get_homefile() |
gchar * | xfce_get_homefile_r () |
const gchar * | xfce_get_userdir () |
#define | xfce_get_userfile() |
gchar * | xfce_get_userfile_r () |
gchar * | xfce_gethostname () |
gchar * | xfce_expand_variables () |
void | xfce_append_quoted () |
gchar * | xfce_expand_desktop_entry_field_codes () |
gchar * | xfce_unescape_desktop_entry_value () |
const gchar *
xfce_get_homedir (void
);
Similar to g_get_home_dir()
in functionality but will never return NULL.
While g_get_home_dir()
may return NULL under certain circumstances, this
function is garantied to never ever return NULL, but always return a
valid character pointer with the absolute path to the user's home directory.
The returned string is owned by libxfce4util and must not be freed by the caller.
gchar * xfce_get_homefile_r (gchar *buffer
,size_t length
,const gchar *format
,...
);
Similar in functionality to xfce_get_homefile, but uses a user
defined buffer
instead of allocating a new buffer.
xfce_get_homefile_r uses safe string operations, that says, it garanties
that the resulting string is always zero terminated, as long as the
length
is greater than zero.
const gchar *
xfce_get_userdir (void
);
Safe way to retrieve the path to the user's ".xfce4" directory. The path to the current user's ".xfce4" directory is either taken from the environment variable XFCE4HOME if defined, or if unset, is gained by concatenating the path to the user's home directory and the ".xfce4". That says, it will, by default, return the path "$HOME/.xfce4", where $HOME is replaced with the absolute path to the user's home directory.
The returned string is managed by libxfce4util and must not be freed by the caller.
gchar * xfce_get_userfile_r (gchar *buffer
,size_t length
,const gchar *format
,...
);
gchar *
xfce_gethostname (void
);
Portable way to query the hostname of the node running the process. This
function does not ever return NULL
, but always returns a string containing
the current node's hostname.
gchar * xfce_expand_variables (const gchar *command
,gchar **envp
);
Expands shell like environment variables and tilde (~/ and ~user/ are both supported)
in command
.
command |
Input string or |
|
envp |
Addition environment variables to take into account. These variables have higher priority than the ones in the process's environment. |
Since: 4.2
void xfce_append_quoted (GString *string
,const gchar *unquoted
);
xfce_append_quoted
has been deprecated since version 4.17 and should not be used in newly-written code.
Renamed to xfce_g_string_append_quoted()
An alias of xfce_g_string_append_quoted()
.
gchar * xfce_expand_desktop_entry_field_codes (const gchar *command
,GSList *uri_list
,const gchar *icon
,const gchar *name
,const gchar *uri
,gboolean requires_terminal
);
Expands field codes in command
according to Freedesktop.org Desktop Entry Specification.
gchar *
xfce_unescape_desktop_entry_value (const gchar *value
);
Unescapes sequences in value
according to Freedesktop.org Desktop Entry Specification.
Since: 4.18