![]() |
![]() |
![]() |
Anjuta Developers Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <libanjuta/anjuta-utils.h> gboolean anjuta_util_copy_file (const gchar *src, const gchar *dest, gboolean show_error); gboolean anjuta_util_diff (const gchar *uri, const gchar *text); void anjuta_util_color_from_string (const gchar *val, guint16 *r, guint16 *g, guint16 *b); gchar* anjuta_util_string_from_color (guint16 r, guint16 g, guint16 b); GtkWidget* anjuta_util_button_new_with_stock_image (const gchar *text, const gchar *stock_id); GtkWidget* anjuta_util_dialog_add_button (GtkDialog *dialog, const gchar *text, const gchar *stock_id, gint response_id); void anjuta_util_dialog_error (GtkWindow *parent, const gchar *mesg, ...); void anjuta_util_dialog_warning (GtkWindow *parent, const gchar *mesg, ...); void anjuta_util_dialog_info (GtkWindow *parent, const gchar *mesg, ...); void anjuta_util_dialog_error_system (GtkWindow *parent, gint errnum, const gchar *mesg, ...); gboolean anjuta_util_dialog_boolean_question (GtkWindow *parent, const gchar *mesg, ...); gboolean anjuta_util_dialog_input (GtkWindow *parent, const gchar *label, const gchar *default_value, gchar **value); gboolean anjuta_util_prog_is_installed (const gchar *prog, gboolean show); gchar* anjuta_util_get_a_tmp_file (void); gchar* anjuta_util_convert_to_utf8 (const gchar *str); GList* anjuta_util_parse_args_from_string (const gchar *string); int anjuta_util_type_from_string (AnjutaUtilStringMap *map, const char *str); const char * anjuta_util_string_from_type (AnjutaUtilStringMap *map, int type); GList * anjuta_util_glist_from_map (AnjutaUtilStringMap *map); void anjuta_util_glist_strings_free (GList *list); void anjuta_util_glist_strings_prefix (GList *list, const gchar *prefix); void anjuta_util_glist_strings_sufix (GList *list, const gchar *sufix); GList* anjuta_util_glist_strings_sort (GList *list); gchar* anjuta_util_glist_strings_join (GList *list, gchar *delimiter); GList* anjuta_util_glist_from_string (const gchar *id); GList* anjuta_util_glist_strings_dup (GList *list); GList* anjuta_util_glist_path_dedup (GList *list); GList * anjuta_util_update_string_list (GList *p_list, const gchar *p_str, gint length); gboolean anjuta_util_create_dir (const gchar *d); gchar * anjuta_util_user_shell (void); pid_t anjuta_util_execute_shell (const gchar *dir, const gchar *command); gchar* anjuta_util_escape_quotes (const gchar *str); gchar* anjuta_util_get_real_path (const gchar *path); gchar* anjuta_util_uri_get_dirname (const gchar *uri); gchar* anjuta_util_replace_home_dir_with_tilde (const gchar *uri); gchar* anjuta_util_shell_expand (const gchar *string); gchar* anjuta_util_str_middle_truncate (const gchar *string, guint truncate_length); gchar* anjuta_util_get_local_path_from_uri (const gchar *uri); void anjuta_util_help_display (GtkWidget *parent, const gchar *doc_id, const gchar *file_name); GFile* anjuta_util_get_user_data_file (const gchar *path, ...); GFile* anjuta_util_get_user_cache_file (const gchar *path, ...); GFile* anjuta_util_get_user_config_file (const gchar *path, ...); gchar* anjuta_util_get_user_data_file_path (const gchar *path, ...); gchar* anjuta_util_get_user_cache_file_path (const gchar *path, ...); gchar* anjuta_util_get_user_config_file_path (const gchar *path, ...); #define ANJUTA_TYPE_BEGIN (class_name, prefix, parent_type) #define ANJUTA_TYPE_END #define ANJUTA_TYPE_ADD_INTERFACE (prefix,interface_type) #define ANJUTA_TYPE_BOILERPLATE (class_name, prefix, parent_type)
gboolean anjuta_util_copy_file (const gchar *src, const gchar *dest, gboolean show_error);
Copies src
to dest
and shows a dialog error in case is needed.
|
the file where copy |
|
the path to copy the src
|
|
TRUE to show a dialog error |
Returns : |
TRUE if there was an error copying the file. |
gboolean anjuta_util_diff (const gchar *uri, const gchar *text);
|
|
|
|
Returns : |
void anjuta_util_color_from_string (const gchar *val, guint16 *r, guint16 *g, guint16 *b);
|
|
|
|
|
|
|
gchar* anjuta_util_string_from_color (guint16 r, guint16 g, guint16 b);
|
|
|
|
|
|
Returns : |
GtkWidget* anjuta_util_button_new_with_stock_image (const gchar *text, const gchar *stock_id);
|
|
|
|
Returns : |
GtkWidget* anjuta_util_dialog_add_button (GtkDialog *dialog, const gchar *text, const gchar *stock_id, gint response_id);
|
|
|
|
|
|
|
|
Returns : |
void anjuta_util_dialog_error (GtkWindow *parent, const gchar *mesg, ...);
|
|
|
|
|
void anjuta_util_dialog_warning (GtkWindow *parent, const gchar *mesg, ...);
|
|
|
|
|
void anjuta_util_dialog_info (GtkWindow *parent, const gchar *mesg, ...);
|
|
|
|
|
void anjuta_util_dialog_error_system (GtkWindow *parent, gint errnum, const gchar *mesg, ...);
|
|
|
|
|
|
|
gboolean anjuta_util_dialog_boolean_question (GtkWindow *parent, const gchar *mesg, ...);
|
|
|
|
|
|
Returns : |
gboolean anjuta_util_dialog_input (GtkWindow *parent, const gchar *label, const gchar *default_value, gchar **value);
|
|
|
|
|
|
|
|
Returns : |
gboolean anjuta_util_prog_is_installed (const gchar *prog, gboolean show);
|
|
|
|
Returns : |
gchar* anjuta_util_convert_to_utf8 (const gchar *str);
|
|
Returns : |
GList* anjuta_util_parse_args_from_string (const gchar *string);
|
|
Returns : |
int anjuta_util_type_from_string (AnjutaUtilStringMap *map, const char *str);
|
|
|
|
Returns : |
const char * anjuta_util_string_from_type (AnjutaUtilStringMap *map, int type);
|
|
|
|
Returns : |
GList * anjuta_util_glist_from_map (AnjutaUtilStringMap *map);
|
|
Returns : |
void anjuta_util_glist_strings_prefix (GList *list, const gchar *prefix);
|
|
|
void anjuta_util_glist_strings_sufix (GList *list, const gchar *sufix);
|
|
|
GList* anjuta_util_glist_strings_sort (GList *list);
|
|
Returns : |
gchar* anjuta_util_glist_strings_join (GList *list, gchar *delimiter);
|
|
|
|
Returns : |
GList* anjuta_util_glist_from_string (const gchar *id);
|
|
Returns : |
GList* anjuta_util_glist_strings_dup (GList *list);
|
|
Returns : |
GList * anjuta_util_update_string_list (GList *p_list, const gchar *p_str, gint length);
|
|
|
|
|
|
Returns : |
gchar * anjuta_util_user_shell (void);
Retrieves the user's preferred shell.
Returns : |
A newly allocated string that is the path to the shell. |
pid_t anjuta_util_execute_shell (const gchar *dir, const gchar *command);
|
|
|
|
Returns : |
gchar* anjuta_util_uri_get_dirname (const gchar *uri);
|
|
Returns : |
gchar* anjuta_util_replace_home_dir_with_tilde (const gchar *uri);
|
|
Returns : |
gchar* anjuta_util_shell_expand (const gchar *string);
Expand environment variables $(var_name) and tilde (~) in the input string.
|
input string |
Returns : |
a newly-allocated string that must be freed with g_free() .
|
gchar* anjuta_util_str_middle_truncate (const gchar *string, guint truncate_length);
|
|
|
|
Returns : |
gchar* anjuta_util_get_local_path_from_uri (const gchar *uri);
|
|
Returns : |
void anjuta_util_help_display (GtkWidget *parent, const gchar *doc_id, const gchar *file_name);
|
|
|
|
|
GFile* anjuta_util_get_user_data_file (const gchar *path, ...);
|
|
|
|
Returns : |
GFile* anjuta_util_get_user_cache_file (const gchar *path, ...);
|
|
|
|
Returns : |
GFile* anjuta_util_get_user_config_file (const gchar *path, ...);
|
|
|
|
Returns : |
gchar* anjuta_util_get_user_data_file_path (const gchar *path, ...);
|
|
|
|
Returns : |
gchar* anjuta_util_get_user_cache_file_path (const gchar *path, ...);
|
|
|
|
Returns : |
gchar* anjuta_util_get_user_config_file_path (const gchar *path, ...);
|
|
|
|
Returns : |
#define ANJUTA_TYPE_BEGIN(class_name, prefix, parent_type)
|
|
|
|
|
#define ANJUTA_TYPE_ADD_INTERFACE(prefix,interface_type)
|
|
|