util

util

Synopsis




#define             SWAP                                (a, b)
typedef             INIFile;
gboolean            (*DirForeachFunc)                   (const gchar *path,
                                                         const gchar *basename,
                                                         gpointer user_data);
gchar*              find_file_recursively               (const gchar *dirname,
                                                         const gchar *file);
void                del_directory                       (const gchar *dirname);
gboolean            dir_foreach                         (const gchar *path,
                                                         DirForeachFunc function,
                                                         gpointer user_data,
                                                         GError **error);
INIFile*            open_ini_file                       (const gchar *filename);
void                close_ini_file                      (INIFile *key_file);
gchar*              read_ini_string                     (INIFile *key_file,
                                                         const gchar *section,
                                                         const gchar *key);
GArray*             read_ini_array                      (INIFile *key_file,
                                                         const gchar *section,
                                                         const gchar *key);
GArray*             string_to_garray                    (const gchar *str);
void                glist_movedown                      (GList *list);
void                glist_moveup                        (GList *list);
void                util_menu_position                  (GtkMenu *menu,
                                                         gint *x,
                                                         gint *y,
                                                         gboolean *push_in,
                                                         gpointer data);
GdkFont*            util_font_load                      (const gchar *name);
void                util_set_cursor                     (GtkWidget *window);
gboolean            text_get_extents                    (const gchar *fontname,
                                                         const gchar *text,
                                                         gint *width,
                                                         gint *height,
                                                         gint *ascent,
                                                         gint *descent);
gboolean            file_is_archive                     (const gchar *filename);
gchar*              archive_decompress                  (const gchar *path);
gchar*              archive_basename                    (const gchar *path);
guint               gint_count_digits                   (gint n);
GtkWidget*          make_filebrowser                    (const gchar *title,
                                                         gboolean save);
                    MenuPos;
GdkPixmap*          audacious_pixmap_resize             (GdkWindow *src,
                                                         GdkGC *src_gc,
                                                         GdkPixmap *in,
                                                         gint width,
                                                         gint height);
#define             bmp_info_dialog                     (title, text, button_text, model, button_action, action_data)
#define             bmp_usleep                          (usec)
#define             bmp_check_realtime_priority         ()
GtkWidget*          xmms_show_message                   (const gchar *title,
                                                         const gchar *text,
                                                         const gchar *button_text,
                                                         gboolean modal,
                                                         GtkSignalFunc button_action,
                                                         gpointer action_data);
gboolean            xmms_check_realtime_priority        (void);
void                xmms_usleep                         (gint usec);
GdkImage*           create_dblsize_image                (GdkImage *img);
gchar*              xmms_urldecode_path                 (const gchar *encoded_path);
GdkPixbuf*          audacious_create_colorized_pixbuf   (GdkPixbuf *src,
                                                         gint red,
                                                         gint green,
                                                         gint blue);
gchar*              audacious_get_localdir              (void);
void                audacious_menu_main_show            (gint x,
                                                         gint y,
                                                         guint button,
                                                         guint time);

Description

Details

SWAP()

#define SWAP(a, b)      { a^=b; b^=a; a^=b; }

a :

b :


INIFile

typedef GHashTable INIFile;


DirForeachFunc ()

gboolean            (*DirForeachFunc)                   (const gchar *path,
                                                         const gchar *basename,
                                                         gpointer user_data);

path :

basename :

user_data :

Returns :


find_file_recursively ()

gchar*              find_file_recursively               (const gchar *dirname,
                                                         const gchar *file);

dirname :

file :

Returns :


del_directory ()

void                del_directory                       (const gchar *dirname);

dirname :


dir_foreach ()

gboolean            dir_foreach                         (const gchar *path,
                                                         DirForeachFunc function,
                                                         gpointer user_data,
                                                         GError **error);

path :

function :

user_data :

error :

Returns :


open_ini_file ()

INIFile*            open_ini_file                       (const gchar *filename);

filename :

Returns :


close_ini_file ()

void                close_ini_file                      (INIFile *key_file);

key_file :


read_ini_string ()

gchar*              read_ini_string                     (INIFile *key_file,
                                                         const gchar *section,
                                                         const gchar *key);

key_file :

section :

key :

Returns :


read_ini_array ()

GArray*             read_ini_array                      (INIFile *key_file,
                                                         const gchar *section,
                                                         const gchar *key);

key_file :

section :

key :

Returns :


string_to_garray ()

GArray*             string_to_garray                    (const gchar *str);

str :

Returns :


glist_movedown ()

void                glist_movedown                      (GList *list);

list :


glist_moveup ()

void                glist_moveup                        (GList *list);

list :


util_menu_position ()

void                util_menu_position                  (GtkMenu *menu,
                                                         gint *x,
                                                         gint *y,
                                                         gboolean *push_in,
                                                         gpointer data);

menu :

x :

y :

push_in :

data :


util_font_load ()

GdkFont*            util_font_load                      (const gchar *name);

name :

Returns :


util_set_cursor ()

void                util_set_cursor                     (GtkWidget *window);

window :


text_get_extents ()

gboolean            text_get_extents                    (const gchar *fontname,
                                                         const gchar *text,
                                                         gint *width,
                                                         gint *height,
                                                         gint *ascent,
                                                         gint *descent);

fontname :

text :

width :

height :

ascent :

descent :

Returns :


file_is_archive ()

gboolean            file_is_archive                     (const gchar *filename);

filename :

Returns :


archive_decompress ()

gchar*              archive_decompress                  (const gchar *path);

path :

Returns :


archive_basename ()

gchar*              archive_basename                    (const gchar *path);

path :

Returns :


gint_count_digits ()

guint               gint_count_digits                   (gint n);

n :

Returns :


make_filebrowser ()

GtkWidget*          make_filebrowser                    (const gchar *title,
                                                         gboolean save);

title :

save :

Returns :


MenuPos

typedef struct {
    gint x;
    gint y;
} MenuPos;


audacious_pixmap_resize ()

GdkPixmap*          audacious_pixmap_resize             (GdkWindow *src,
                                                         GdkGC *src_gc,
                                                         GdkPixmap *in,
                                                         gint width,
                                                         gint height);

src :

src_gc :

in :

width :

height :

Returns :


bmp_info_dialog()

#define             bmp_info_dialog(title, text, button_text, model, button_action, action_data)

title :

text :

button_text :

model :

button_action :

action_data :


bmp_usleep()

#define             bmp_usleep(usec)

usec :


bmp_check_realtime_priority()

#define             bmp_check_realtime_priority()


xmms_show_message ()

GtkWidget*          xmms_show_message                   (const gchar *title,
                                                         const gchar *text,
                                                         const gchar *button_text,
                                                         gboolean modal,
                                                         GtkSignalFunc button_action,
                                                         gpointer action_data);

Displays a message box.

title :

The title of the message to show.

text :

The text of the message to show.

button_text :

The text of the button which will close the messagebox.

modal :

Whether or not the messagebox should be modal.

button_action :

Code to execute on when the messagebox is closed, or NULL.

action_data :

Optional opaque data to pass to button_action.

Returns :

A GTK widget handle for the message box.

xmms_check_realtime_priority ()

gboolean            xmms_check_realtime_priority        (void);

Legacy function included for compatibility with XMMS.

Returns :

FALSE

xmms_usleep ()

void                xmms_usleep                         (gint usec);

Legacy function included for compatibility with XMMS.

usec :

The amount of microseconds to sleep.

create_dblsize_image ()

GdkImage*           create_dblsize_image                (GdkImage *img);

img :

Returns :


xmms_urldecode_path ()

gchar*              xmms_urldecode_path                 (const gchar *encoded_path);

encoded_path :

Returns :


audacious_create_colorized_pixbuf ()

GdkPixbuf*          audacious_create_colorized_pixbuf   (GdkPixbuf *src,
                                                         gint red,
                                                         gint green,
                                                         gint blue);

src :

red :

green :

blue :

Returns :


audacious_get_localdir ()

gchar*              audacious_get_localdir              (void);

Returns a string with the full path of Audacious local datadir (where config files are placed). It's useful in order to put in the right place custom config files for audacious plugins.

Returns :

a string with full path of Audacious local datadir (should be freed after use)

audacious_menu_main_show ()

void                audacious_menu_main_show            (gint x,
                                                         gint y,
                                                         guint button,
                                                         guint time);

x :

y :

button :

time :