MATE Library Reference Manual | ||||
---|---|---|---|---|
Top | Description |
#include <libmate/libmate.h> enum MateURLError; #define MATE_URL_ERROR gboolean mate_url_show (const char *url
,GError **error
); gboolean mate_url_show_with_env (const char *url
,char **envp
,GError **error
);
A MATE user can configure which viewers they wish to use to view certain protocols. Protocols can include http, ftp (where "view" might mean "download"), ghelp, etc. This module provides a means for application to display a url without having to worry about which viewer is going to ultimately handle the job.
typedef enum { MATE_URL_ERROR_PARSE, MATE_URL_ERROR_LAUNCH, MATE_URL_ERROR_URL, MATE_URL_ERROR_NO_DEFAULT, MATE_URL_ERROR_NOT_SUPPORTED, MATE_URL_ERROR_VFS, MATE_URL_ERROR_CANCELLED } MateURLError;
The errors that can be returned due to bad parameters being pass to
mate_url_show()
.
#define MATE_URL_ERROR (mate_url_error_quark ())
The class (domain) of errors raised by this module.
gboolean mate_url_show (const char *url
,GError **error
);
Once the input has been converted into a fully qualified url this function
calls mate_vfs_url_show. Any error codes returned by mate-vfs will be wrapped
in the error parameter. All errors comes from the MATE_URL_ERROR
% domain.
|
The url or path to display. The path can be relative to the current working directory or the user's home directory. This function will convert it into a fully qualified url using the mate_url_get_from_input function. |
|
Used to store any errors that result from trying to display the url .
|
Returns : |
TRUE if everything went fine, FALSE otherwise (in which case
error will contain the actual error).
|
gboolean mate_url_show_with_env (const char *url
,char **envp
,GError **error
);
Like mate_url_show()
, but mate_vfs_url_show_with_env
will be called with the given envirnoment.
|
The url or path to display. |
|
child's environment, or NULL to inherit parent's.
|
|
Used to store any errors that result from trying to display the url .
|
Returns : |
TRUE if everything went fine, FALSE otherwise (in which case
error will contain the actual error).
|
Since 2.2