Mercurial > audlegacy-plugins
annotate src/skins/util.h @ 3182:631d217913e0
alsa-ng: Fix arithmetic overflow on 32-bit systems.
author | John Lindgren <john.lindgren@tds.net> |
---|---|
date | Fri, 12 Jun 2009 09:17:09 -0400 |
parents | f7613eafe9f0 |
children |
rev | line source |
---|---|
2573 | 1 /* Audacious - Cross-platform multimedia player |
2 * Copyright (C) 2005-2008 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 3 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, see <http://www.gnu.org/licenses>. | |
21 * | |
22 * The Audacious team does not consider modular code linking to | |
23 * Audacious or using our public API to be a derived work. | |
24 */ | |
25 | |
26 #ifndef UTIL_H | |
27 #define UTIL_H | |
28 | |
29 #ifdef _AUDACIOUS_CORE | |
30 # ifdef HAVE_CONFIG_H | |
31 # include "config.h" | |
32 # endif | |
33 #endif | |
34 | |
35 #include <glib.h> | |
36 #include <gtk/gtk.h> | |
37 | |
38 G_BEGIN_DECLS | |
39 | |
2971
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2573
diff
changeset
|
40 #include "audlegacy/plugin.h" |
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2573
diff
changeset
|
41 #include "audlegacy/libSAD.h" |
2573 | 42 |
43 #define SWAP(a, b) { a^=b; b^=a; a^=b; } | |
44 | |
45 typedef gboolean(*DirForeachFunc) (const gchar * path, | |
46 const gchar * basename, | |
47 gpointer user_data); | |
48 | |
49 | |
50 gchar *find_file_recursively(const gchar * dirname, const gchar * file); | |
51 gchar *find_path_recursively(const gchar * dirname, const gchar * file); | |
52 void del_directory(const gchar * dirname); | |
53 gboolean dir_foreach(const gchar * path, DirForeachFunc function, | |
54 gpointer user_data, GError ** error); | |
55 | |
56 | |
57 INIFile *open_ini_file(const gchar *filename); | |
58 void close_ini_file(INIFile *key_file); | |
59 gchar *read_ini_string(INIFile *key_file, const gchar *section, | |
60 const gchar *key); | |
61 GArray *read_ini_array(INIFile *key_file, const gchar *section, | |
62 const gchar *key); | |
63 | |
64 GArray *string_to_garray(const gchar * str); | |
65 | |
66 void glist_movedown(GList * list); | |
67 void glist_moveup(GList * list); | |
68 | |
69 void util_set_cursor(GtkWidget * window); | |
70 gboolean text_get_extents(const gchar * fontname, const gchar * text, | |
71 gint * width, gint * height, gint * ascent, | |
72 gint * descent); | |
73 | |
74 gboolean file_is_archive(const gchar * filename); | |
75 gchar *archive_decompress(const gchar * path); | |
76 gchar *archive_basename(const gchar * path); | |
77 | |
78 guint gint_count_digits(gint n); | |
79 | |
80 | |
81 GtkWidget *make_filebrowser(const gchar *title, gboolean save); | |
82 | |
83 GtkWidget *util_info_dialog(const gchar * title, const gchar * text, | |
84 const gchar * button_text, gboolean modal, GCallback button_action, | |
85 gpointer action_data); | |
86 | |
87 GdkPixbuf *audacious_create_colorized_pixbuf(GdkPixbuf *src, gint red, gint green, gint blue); | |
88 | |
89 gchar *util_get_localdir(void); | |
90 | |
91 gchar *construct_uri(gchar *string, const gchar *playlist_name); | |
92 | |
93 SAD_sample_format sadfmt_from_afmt(AFormat fmt); | |
94 | |
95 /* minimizes number of realloc's */ | |
96 gpointer smart_realloc(gpointer ptr, gsize *size); | |
97 | |
98 void make_directory(const gchar * path, mode_t mode); | |
99 | |
100 G_END_DECLS | |
101 | |
102 #endif |