## Utilities

Utilities — Utility functions

##

# Synopsis

    gboolean    anjuta_util_copy_file           (gchar *src,
                                                 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   (guint8 r,
                                                 guint8 g,
                                                 guint8 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   (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);
    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);
    pid_t       anjuta_util_execute_shell       (const gchar *dir,
                                                 const gchar *command);
    gchar*      anjuta_util_escape_quotes       (const gchar *str);
    int         forkpty                         (int *amaster,
                                                 char *name,
                                                 struct termios *termp,
                                                 struct winsize *winp);
    int         alphasort                       (const struct dirent **a,
                                                 const struct dirent **b);
    #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)

## Description

## Details

### anjuta_util_copy_file ()

    gboolean    anjuta_util_copy_file           (gchar *src,
                                                 gchar *dest,
                                                 gboolean show_error);

`src` : |
`dest` : |
`show_error` : |
Returns : |

### anjuta_util_diff ()

    gboolean    anjuta_util_diff                (const gchar *uri,
                                                 const gchar *text);

`uri` : |
`text` : |
Returns : |

### anjuta_util_color_from_string ()

    void        anjuta_util_color_from_string   (const gchar *val,
                                                 guint16 *r,
                                                 guint16 *g,
                                                 guint16 *b);

`val` : |
`r` : |
`g` : |
`b` : |

### anjuta_util_string_from_color ()

    gchar*      anjuta_util_string_from_color   (guint8 r,
                                                 guint8 g,
                                                 guint8 b);

`r` : |
`g` : |
`b` : |
Returns : |

### anjuta_util_button_new_with_stock_image ()

    GtkWidget*  anjuta_util_button_new_with_stock_image
                                                (const gchar *text,
                                                 const gchar *stock_id);

`text` : |
`stock_id` : |
Returns : |

### anjuta_util_dialog_add_button ()

    GtkWidget*  anjuta_util_dialog_add_button   (GtkDialog *dialog,
                                                 const gchar *text,
                                                 const gchar *stock_id,
                                                 gint response_id);

`dialog` : |
`text` : |
`stock_id` : |
`response_id` : |
Returns : |

### anjuta_util_dialog_error ()

    void        anjuta_util_dialog_error        (GtkWindow *parent,
                                                 const gchar *mesg,
                                                 ...);

`parent` : |
`mesg` : |
`...` : |

### anjuta_util_dialog_warning ()

    void        anjuta_util_dialog_warning      (GtkWindow *parent,
                                                 const gchar *mesg,
                                                 ...);

`parent` : |
`mesg` : |
`...` : |

### anjuta_util_dialog_info ()

    void        anjuta_util_dialog_info         (GtkWindow *parent,
                                                 const gchar *mesg,
                                                 ...);

`parent` : |
`mesg` : |
`...` : |

### anjuta_util_dialog_error_system ()

    void        anjuta_util_dialog_error_system (GtkWindow *parent,
                                                 gint errnum,
                                                 const gchar *mesg,
                                                 ...);

`parent` : |
`errnum` : |
`mesg` : |
`...` : |

### anjuta_util_dialog_boolean_question ()

    gboolean    anjuta_util_dialog_boolean_question
                                                (GtkWindow *parent,
                                                 const gchar *mesg,
                                                 ...);

`parent` : |
`mesg` : |
`...` : |
Returns : |

### anjuta_util_dialog_input ()

    gboolean    anjuta_util_dialog_input        (GtkWindow *parent,
                                                 const gchar *label,
                                                 const gchar *default_value,
                                                 gchar **value);

`parent` : |
`label` : |
`default_value` : |
`value` : |
Returns : |

### anjuta_util_prog_is_installed ()

    gboolean    anjuta_util_prog_is_installed   (gchar *prog,
                                                 gboolean show);

`prog` : |
`show` : |
Returns : |

### anjuta_util_get_a_tmp_file ()

    gchar*      anjuta_util_get_a_tmp_file      (void);

Returns : |

### anjuta_util_convert_to_utf8 ()

    gchar*      anjuta_util_convert_to_utf8     (const gchar *str);

`str` : |
Returns : |

### anjuta_util_parse_args_from_string ()

    GList*      anjuta_util_parse_args_from_string
                                                (const gchar *string);

`string` : |
Returns : |

### anjuta_util_type_from_string ()

    int         anjuta_util_type_from_string    (AnjutaUtilStringMap *map,
                                                 const char *str);

`map` : |
`str` : |
Returns : |

### anjuta_util_string_from_type ()

    const char* anjuta_util_string_from_type    (AnjutaUtilStringMap *map,
                                                 int type);

`map` : |
`type` : |
Returns : |

### anjuta_util_glist_from_map ()

    GList*      anjuta_util_glist_from_map      (AnjutaUtilStringMap *map);

`map` : |
Returns : |

### anjuta_util_glist_strings_free ()

    void        anjuta_util_glist_strings_free  (GList *list);

`list` : |

### anjuta_util_glist_strings_prefix ()

    void        anjuta_util_glist_strings_prefix
                                                (GList *list,
                                                 const gchar *prefix);

`list` : |
`prefix` : |

### anjuta_util_glist_strings_sufix ()

    void        anjuta_util_glist_strings_sufix (GList *list,
                                                 const gchar *sufix);

`list` : |
`sufix` : |

### anjuta_util_glist_strings_sort ()

    GList*      anjuta_util_glist_strings_sort  (GList *list);

`list` : |
Returns : |

### anjuta_util_glist_from_string ()

    GList*      anjuta_util_glist_from_string   (const gchar *id);

`id` : |
Returns : |

### anjuta_util_glist_strings_dup ()

    GList*      anjuta_util_glist_strings_dup   (GList *list);

`list` : |
Returns : |

### anjuta_util_glist_path_dedup ()

    GList*      anjuta_util_glist_path_dedup    (GList *list);

`list` : |
Returns : |

### anjuta_util_update_string_list ()

    GList*      anjuta_util_update_string_list  (GList *p_list,
                                                 const gchar *p_str,
                                                 gint length);

`p_list` : |
`p_str` : |
`length` : |
Returns : |

### anjuta_util_create_dir ()

    gboolean    anjuta_util_create_dir          (const gchar *d);

`d` : |
Returns : |

### anjuta_util_execute_shell ()

    pid_t       anjuta_util_execute_shell       (const gchar *dir,
                                                 const gchar *command);

`dir` : |
`command` : |
Returns : |

### anjuta_util_escape_quotes ()

    gchar*      anjuta_util_escape_quotes       (const gchar *str);

`str` : |
Returns : |

### forkpty ()

    int         forkpty                         (int *amaster,
                                                 char *name,
                                                 struct termios *termp,
                                                 struct winsize *winp);

`amaster` : |
`name` : |
`termp` : |
`winp` : |
Returns : |

### alphasort ()

    int         alphasort                       (const struct dirent **a,
                                                 const struct dirent **b);

`a` : |
`b` : |
Returns : |

### ANJUTA_TYPE_BEGIN()

    #define     ANJUTA_TYPE_BEGIN(class_name, prefix, parent_type)

`class_name` : |
`prefix` : |
`parent_type` : |

### ANJUTA_TYPE_END

    #define     ANJUTA_TYPE_END

### ANJUTA_TYPE_ADD_INTERFACE()

    #define     ANJUTA_TYPE_ADD_INTERFACE(prefix,interface_type)

`prefix` : |
`interface_type` : |

### ANJUTA_TYPE_BOILERPLATE()

    #define     ANJUTA_TYPE_BOILERPLATE(class_name, prefix, parent_type)

`class_name` : |
`prefix` : |
`parent_type` : |