Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
misc-api.h
Go to the documentation of this file.
1 /*
2  * misc-api.h
3  * Copyright 2010-2011 John Lindgren
4  *
5  * This file is part of Audacious.
6  *
7  * Audacious is free software: you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License as published by the Free Software
9  * Foundation, version 2 or version 3 of the License.
10  *
11  * Audacious is distributed in the hope that it will be useful, but WITHOUT ANY
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13  * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * Audacious. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * The Audacious team does not consider modular code linking to Audacious or
19  * using our public API to be a derived work.
20  */
21 
22 /* Do not include this file directly; use misc.h instead. */
23 
24 /* CAUTION: Many of these functions are not thread safe. */
25 
26 /* art.c */
27 
28 /* Fetches album art for <file> (the URI of a song file) as JPEG or PNG data.
29  * The data may be embedded in the song file, or it may be loaded from a
30  * separate file. When the data is no longer needed, art_unref() should be
31  * called. If an error occurs, <data> is set to NULL and art_unref() need not
32  * be called. */
33 AUD_VFUNC3 (art_get_data, const char *, file, const void * *, data, int64_t *, len)
34 
35 /* Returns the URI of an image file containing album art for <file>. If the
36  * song file contains embedded album art, the data is saved to a temporary file
37  * and the URI of the temporary file is returned. When the image file is no
38  * longer needed, art_unref() should be called. If a temporary file was
39  * created, art_unref() deletes it. If an error occurs, returns NULL and
40  * art_unref() need not be called. */
41 AUD_FUNC1 (const char *, art_get_file, const char *, file)
42 
43 /* Signals that the data or file returned by art_get_data() or art_get_file() is
44  * no longer needed. <file> must be the same URI passed to art_get_data() or
45  * art_get_file(). */
46 AUD_VFUNC1 (art_unref, const char *, file)
47 
48 /* config.c */
49 
50 AUD_VFUNC1 (config_clear_section, const char *, section)
51 AUD_VFUNC2 (config_set_defaults, const char *, section, const char * const *, entries)
52 
53 AUD_VFUNC3 (set_string, const char *, section, const char *, name, const char *, value)
54 AUD_FUNC2 (char *, get_string, const char *, section, const char *, name)
55 AUD_VFUNC3 (set_bool, const char *, section, const char *, name, bool_t, value)
56 AUD_FUNC2 (bool_t, get_bool, const char *, section, const char *, name)
57 AUD_VFUNC3 (set_int, const char *, section, const char *, name, int, value)
58 AUD_FUNC2 (int, get_int, const char *, section, const char *, name)
59 AUD_VFUNC3 (set_double, const char *, section, const char *, name, double, value)
60 AUD_FUNC2 (double, get_double, const char *, section, const char *, name)
61 
62 /* credits.c */
63 AUD_VFUNC3 (get_audacious_credits, const char * *, brief,
64  const char * const * *, credits, const char * const * *, translators)
65 
66 /* equalizer.c */
67 AUD_VFUNC1 (eq_set_bands, const double *, values)
68 AUD_VFUNC1 (eq_get_bands, double *, values)
69 AUD_VFUNC2 (eq_set_band, int, band, double, value)
70 AUD_FUNC1 (double, eq_get_band, int, band)
71 
72 /* equalizer_preset.c */
73 AUD_FUNC1 (Index *, equalizer_read_presets, const char *, basename)
74 AUD_FUNC2 (bool_t, equalizer_write_preset_file, Index *, list, const char *, basename)
76 AUD_FUNC2 (bool_t, save_preset_file, EqualizerPreset *, preset, const char *, filename)
77 AUD_FUNC1 (Index *, import_winamp_eqf, VFSFile *, file)
78 
79 /* history.c */
80 AUD_FUNC1 (const char *, history_get, int, entry)
81 AUD_VFUNC1 (history_add, const char *, path)
82 
83 /* interface.c */
84 AUD_VFUNC1 (interface_show, bool_t, show)
87 
88 /* interface_show_error() is safe to call from any thread */
89 AUD_VFUNC1 (interface_show_error, const char *, message)
90 
93 
94 AUD_VFUNC1 (interface_install_toolbar, void *, button)
96 
97 /* main.c */
98 AUD_FUNC1 (const char *, get_path, int, path)
99 
100 /* probe.c */
102  fast)
103 AUD_FUNC2 (Tuple *, file_read_tuple, const char *, filename, PluginHandle *,
104  decoder)
105 AUD_FUNC4 (bool_t, file_read_image, const char *, filename, PluginHandle *,
106  decoder, void * *, data, int64_t *, size)
107 AUD_FUNC2 (bool_t, file_can_write_tuple, const char *, filename,
108  PluginHandle *, decoder)
109 AUD_FUNC3 (bool_t, file_write_tuple, const char *, filename, PluginHandle *,
110  decoder, const Tuple *, tuple)
111 AUD_FUNC2 (bool_t, custom_infowin, const char *, filename, PluginHandle *,
112  decoder)
113 
114 /* ui_plugin_menu.c */
115 AUD_FUNC1 (/* GtkWidget * */ void *, get_plugin_menu, int, id)
116 AUD_VFUNC4 (plugin_menu_add, int, id, MenuFunc, func, const char *, name,
117  const char *, icon)
118 AUD_VFUNC2 (plugin_menu_remove, int, id, MenuFunc, func)
119 
120 /* ui_preferences.c */
121 AUD_VFUNC4 (create_widgets_with_domain, /* GtkWidget * */ void *, box,
122  PreferencesWidget *, widgets, int, count, const char *, domain)
124 
125 /* util.c */
126 AUD_FUNC2 (char *, construct_uri, const char *, base, const char *, reference)
127 
128 /* visualization.c */
129 AUD_VFUNC2 (vis_func_add, int, type, VisFunc, func)
130 AUD_VFUNC1 (vis_func_remove, VisFunc, func)