Mercurial > audlegacy
annotate audacious/util.h @ 2253:329fb2453c87 trunk
[svn] More copyright notice updates
author | kiyoshi |
---|---|
date | Wed, 03 Jan 2007 14:55:03 -0800 |
parents | 72d593e5d7e4 |
children |
rev | line source |
---|---|
2253 | 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 | |
0 | 6 * |
7 * Based on XMMS: | |
2253 | 8 * Copyright (C) 1998-2003 XMMS development team |
0 | 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 | |
2105
f18a5b617c34
[svn] - move to GPLv2-only. Based on my interpretation of the license, we are
nenolod
parents:
2074
diff
changeset
|
12 * the Free Software Foundation; under version 2 of the License. |
0 | 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 | |
1459 | 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
0 | 22 */ |
23 | |
24 #ifndef UTIL_H | |
25 #define UTIL_H | |
26 | |
27 #ifdef HAVE_CONFIG_H | |
28 # include "config.h" | |
29 #endif | |
30 | |
31 #include <glib.h> | |
32 #include <gtk/gtk.h> | |
33 | |
1737 | 34 G_BEGIN_DECLS |
0 | 35 |
36 #define NO_PLAY_BUTTON FALSE | |
37 #define PLAY_BUTTON TRUE | |
38 | |
39 #define SWAP(a, b) { a^=b; b^=a; a^=b; } | |
40 | |
41 | |
42 typedef gboolean(*DirForeachFunc) (const gchar * path, | |
43 const gchar * basename, | |
44 gpointer user_data); | |
45 | |
46 | |
47 gchar *escape_shell_chars(const gchar * string); | |
48 | |
49 gchar *find_file_recursively(const gchar * dirname, const gchar * file); | |
50 void del_directory(const gchar * dirname); | |
51 gboolean dir_foreach(const gchar * path, DirForeachFunc function, | |
52 gpointer user_data, GError ** error); | |
53 | |
54 gchar *read_ini_string(const gchar * filename, const gchar * section, | |
55 const gchar * key); | |
56 GArray *read_ini_array(const gchar * filename, const gchar * section, | |
57 const gchar * key); | |
58 | |
59 GArray *string_to_garray(const gchar * str); | |
60 | |
61 void glist_movedown(GList * list); | |
62 void glist_moveup(GList * list); | |
63 | |
86 | 64 GtkWidget *util_add_url_dialog_new(const gchar * caption, GCallback ok_func, |
0 | 65 GCallback enqueue_func); |
66 void util_menu_position(GtkMenu * menu, gint * x, gint * y, | |
67 gboolean * push_in, gpointer data); | |
68 | |
69 void util_run_filebrowser(gboolean clear_pl_on_ok); | |
70 gboolean util_filechooser_is_dir(GtkFileChooser * filesel); | |
71 | |
72 GdkFont *util_font_load(const gchar * name); | |
73 void util_set_cursor(GtkWidget * window); | |
74 gboolean text_get_extents(const gchar * fontname, const gchar * text, | |
75 gint * width, gint * height, gint * ascent, | |
76 gint * descent); | |
77 | |
78 gboolean file_is_archive(const gchar * filename); | |
79 gchar *archive_decompress(const gchar * path); | |
80 gchar *archive_basename(const gchar * path); | |
81 | |
82 guint gint_count_digits(gint n); | |
83 | |
84 gchar *convert_title_text(gchar * text); | |
85 | |
86 gchar *str_append(gchar * str, const gchar * add_str); | |
87 gchar *str_replace(gchar * str, gchar * new_str); | |
88 void str_replace_in(gchar ** str, gchar * new_str); | |
89 | |
90 gboolean str_has_prefix_nocase(const gchar * str, const gchar * prefix); | |
91 gboolean str_has_suffix_nocase(const gchar * str, const gchar * suffix); | |
92 gboolean str_has_suffixes_nocase(const gchar * str, gchar * const *suffixes); | |
93 const gchar *str_skip_chars(const gchar * str, const gchar * chars); | |
94 | |
95 gchar *filename_to_utf8(const gchar * filename); | |
96 gchar *str_to_utf8(const gchar * str); | |
97 gchar *str_to_utf8_fallback(const gchar * str); | |
98 | |
99 #if ENABLE_NLS | |
100 gchar *bmp_menu_translate(const gchar * path, gpointer func_data); | |
101 #else | |
102 # define bmp_menu_translate NULL | |
103 #endif | |
104 | |
1653 | 105 GtkWidget *make_filebrowser(const gchar * title, |
0 | 106 gboolean save); |
107 | |
108 typedef struct { | |
109 gint x; | |
110 gint y; | |
111 } MenuPos; | |
112 | |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
86
diff
changeset
|
113 gchar *chardet_to_utf8(const gchar *str, gssize len, |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
86
diff
changeset
|
114 gsize *arg_bytes_read, gsize *arg_bytes_write, GError **arg_error); |
0 | 115 |
1851
aceb472cce6c
[svn] - add audacious_pixmap_resize() for resizing a skin pixmap on demand.
nenolod
parents:
1750
diff
changeset
|
116 GdkPixmap *audacious_pixmap_resize(GdkWindow *src, GdkGC *src_gc, GdkPixmap *in, gint width, gint height); |
aceb472cce6c
[svn] - add audacious_pixmap_resize() for resizing a skin pixmap on demand.
nenolod
parents:
1750
diff
changeset
|
117 |
1734
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
118 /* XMMS names */ |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
119 |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
120 #define bmp_info_dialog(title, text, button_text, model, button_action, action_data) \ |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
121 xmms_show_message(title, text, button_text, model, button_action, action_data) |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
122 |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
123 #define bmp_usleep(usec) \ |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
124 xmms_usleep(usec) |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
125 |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
126 #define bmp_check_realtime_priority() \ |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
127 xmms_check_realtime_priority() |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
128 |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
129 GtkWidget *xmms_show_message(const gchar * title, const gchar * text, |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
130 const gchar * button_text, gboolean modal, |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
131 GtkSignalFunc button_action, |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
132 gpointer action_data); |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
133 gboolean xmms_check_realtime_priority(void); |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
134 void xmms_usleep(gint usec); |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
135 |
1938 | 136 GdkImage *create_dblsize_image(GdkImage * img); |
137 | |
2074
c725daec3849
[svn] - move xmms_urldecode_path() back into main binary
nenolod
parents:
1938
diff
changeset
|
138 gchar *xmms_urldecode_path(const gchar * encoded_path); |
c725daec3849
[svn] - move xmms_urldecode_path() back into main binary
nenolod
parents:
1938
diff
changeset
|
139 |
2185
c108a98794b1
[svn] - add pixbuf_effects.c, containing various routines to alter images used by the skinengine
nenolod
parents:
2105
diff
changeset
|
140 GdkPixbuf *audacious_create_colorized_pixbuf(GdkPixbuf *src, gint red, gint green, gint blue); |
2074
c725daec3849
[svn] - move xmms_urldecode_path() back into main binary
nenolod
parents:
1938
diff
changeset
|
141 |
1734
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
142 G_END_DECLS |
43c197f55dda
[svn] - merge libaudacious (public) and audacious util APIs
nenolod
parents:
1653
diff
changeset
|
143 |
0 | 144 #endif |