Mercurial > audlegacy
annotate src/audacious/util.h @ 2514:7934ac463591 trunk
[svn] - removed unused function bmp_menu_translate()
- removed playlist_file_selection_browser() and replaced it with
make_filebrowser()
- modified make_filebrowser() behaviour
- adapted equalizer file loading/saving functions to new
make_filebrowser()
| author | mf0102 |
|---|---|
| date | Tue, 13 Feb 2007 06:09:50 -0800 |
| parents | 44df6c17411b |
| children | 299be5908480 |
| rev | line source |
|---|---|
| 2313 | 1 /* Audacious - Cross-platform multimedia player |
| 2 * Copyright (C) 2005-2007 Audacious development team | |
| 3 * | |
| 4 * Based on BMP: | |
| 5 * Copyright (C) 2003-2004 BMP development team | |
| 6 * | |
| 7 * Based on XMMS: | |
| 8 * Copyright (C) 1998-2003 XMMS development team | |
| 9 * | |
| 10 * This program is free software; you can redistribute it and/or modify | |
| 11 * it under the terms of the GNU General Public License as published by | |
| 12 * the Free Software Foundation; under version 2 of the License. | |
| 13 * | |
| 14 * This program is distributed in the hope that it will be useful, | |
| 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 * GNU General Public License for more details. | |
| 18 * | |
| 19 * You should have received a copy of the GNU General Public License | |
| 20 * along with this program; if not, write to the Free Software | |
| 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
| 22 */ | |
| 23 | |
| 24 #ifndef UTIL_H | |
| 25 #define UTIL_H | |
| 26 | |
|
2334
345d38f25eb1
[svn] - only evaluate -DHAVE_CONFIG_H if we're in audacious core. closes #760.
nenolod
parents:
2313
diff
changeset
|
27 #ifdef _AUDACIOUS_CORE |
|
345d38f25eb1
[svn] - only evaluate -DHAVE_CONFIG_H if we're in audacious core. closes #760.
nenolod
parents:
2313
diff
changeset
|
28 # ifdef HAVE_CONFIG_H |
| 2313 | 29 # include "config.h" |
|
2334
345d38f25eb1
[svn] - only evaluate -DHAVE_CONFIG_H if we're in audacious core. closes #760.
nenolod
parents:
2313
diff
changeset
|
30 # endif |
| 2313 | 31 #endif |
| 32 | |
| 33 #include <glib.h> | |
| 34 #include <gtk/gtk.h> | |
| 35 | |
| 36 G_BEGIN_DECLS | |
| 37 | |
| 38 #define SWAP(a, b) { a^=b; b^=a; a^=b; } | |
| 39 | |
| 40 typedef gboolean(*DirForeachFunc) (const gchar * path, | |
| 41 const gchar * basename, | |
| 42 gpointer user_data); | |
| 43 | |
| 44 | |
| 45 gchar *find_file_recursively(const gchar * dirname, const gchar * file); | |
| 46 void del_directory(const gchar * dirname); | |
| 47 gboolean dir_foreach(const gchar * path, DirForeachFunc function, | |
| 48 gpointer user_data, GError ** error); | |
| 49 | |
| 50 gchar *read_ini_string(const gchar * filename, const gchar * section, | |
| 51 const gchar * key); | |
| 52 GArray *read_ini_array(const gchar * filename, const gchar * section, | |
| 53 const gchar * key); | |
| 54 | |
| 55 GArray *string_to_garray(const gchar * str); | |
| 56 | |
| 57 void glist_movedown(GList * list); | |
| 58 void glist_moveup(GList * list); | |
| 59 | |
| 60 void util_menu_position(GtkMenu * menu, gint * x, gint * y, | |
| 61 gboolean * push_in, gpointer data); | |
| 62 | |
| 63 GdkFont *util_font_load(const gchar * name); | |
| 64 void util_set_cursor(GtkWidget * window); | |
| 65 gboolean text_get_extents(const gchar * fontname, const gchar * text, | |
| 66 gint * width, gint * height, gint * ascent, | |
| 67 gint * descent); | |
| 68 | |
| 69 gboolean file_is_archive(const gchar * filename); | |
| 70 gchar *archive_decompress(const gchar * path); | |
| 71 gchar *archive_basename(const gchar * path); | |
| 72 | |
| 73 guint gint_count_digits(gint n); | |
| 74 | |
| 75 | |
|
2514
7934ac463591
[svn] - removed unused function bmp_menu_translate()
mf0102
parents:
2442
diff
changeset
|
76 GtkWidget *make_filebrowser(const gchar *title, gboolean save); |
| 2313 | 77 |
| 78 typedef struct { | |
| 79 gint x; | |
| 80 gint y; | |
| 81 } MenuPos; | |
| 82 | |
| 83 | |
| 84 GdkPixmap *audacious_pixmap_resize(GdkWindow *src, GdkGC *src_gc, GdkPixmap *in, gint width, gint height); | |
| 85 | |
| 86 /* XMMS names */ | |
| 87 | |
| 88 #define bmp_info_dialog(title, text, button_text, model, button_action, action_data) \ | |
| 89 xmms_show_message(title, text, button_text, model, button_action, action_data) | |
| 90 | |
| 91 #define bmp_usleep(usec) \ | |
| 92 xmms_usleep(usec) | |
| 93 | |
| 94 #define bmp_check_realtime_priority() \ | |
| 95 xmms_check_realtime_priority() | |
| 96 | |
| 97 GtkWidget *xmms_show_message(const gchar * title, const gchar * text, | |
| 98 const gchar * button_text, gboolean modal, | |
| 99 GtkSignalFunc button_action, | |
| 100 gpointer action_data); | |
| 101 gboolean xmms_check_realtime_priority(void); | |
| 102 void xmms_usleep(gint usec); | |
| 103 | |
| 104 GdkImage *create_dblsize_image(GdkImage * img); | |
| 105 | |
| 106 gchar *xmms_urldecode_path(const gchar * encoded_path); | |
| 107 | |
| 108 GdkPixbuf *audacious_create_colorized_pixbuf(GdkPixbuf *src, gint red, gint green, gint blue); | |
| 109 | |
|
2340
eb71fec30e9a
[svn] - added audacious_get_localdir() in util.c/h, returns a string with the full path of audacious local datadir
giacomo
parents:
2334
diff
changeset
|
110 gchar *audacious_get_localdir(void); |
|
eb71fec30e9a
[svn] - added audacious_get_localdir() in util.c/h, returns a string with the full path of audacious local datadir
giacomo
parents:
2334
diff
changeset
|
111 |
|
2514
7934ac463591
[svn] - removed unused function bmp_menu_translate()
mf0102
parents:
2442
diff
changeset
|
112 void audacious_menu_main_show(gint x, gint y, guint button, guint time); |
|
2353
0fb258122933
[svn] - added audacious_menu_main_show(x,y,button,time) in util.h, convenience function to display the audacious main popup menu
giacomo
parents:
2340
diff
changeset
|
113 |
|
2514
7934ac463591
[svn] - removed unused function bmp_menu_translate()
mf0102
parents:
2442
diff
changeset
|
114 gchar *fileinfo_recursive_get_image(const gchar *path, const gchar *file_name, |
|
7934ac463591
[svn] - removed unused function bmp_menu_translate()
mf0102
parents:
2442
diff
changeset
|
115 gint depth); |
|
2442
44df6c17411b
[svn] - split out albumart locating functions into a seperate file and make the public API available in util.h
nenolod
parents:
2422
diff
changeset
|
116 |
| 2313 | 117 G_END_DECLS |
| 118 | |
| 119 #endif |
