Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
misc-api.h
Go to the documentation of this file.
00001 /*
00002  * misc-api.h
00003  * Copyright 2010-2011 John Lindgren
00004  *
00005  * This file is part of Audacious.
00006  *
00007  * Audacious is free software: you can redistribute it and/or modify it under
00008  * the terms of the GNU General Public License as published by the Free Software
00009  * Foundation, version 2 or version 3 of the License.
00010  *
00011  * Audacious is distributed in the hope that it will be useful, but WITHOUT ANY
00012  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00013  * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License along with
00016  * Audacious. If not, see <http://www.gnu.org/licenses/>.
00017  *
00018  * The Audacious team does not consider modular code linking to Audacious or
00019  * using our public API to be a derived work.
00020  */
00021 
00022 /* Do not include this file directly; use misc.h instead. */
00023 
00024 /* CAUTION: Many of these functions are not thread safe. */
00025 
00026 /* art.c */
00027 
00028 /* Fetches album art for <file> (the URI of a song file) as JPEG or PNG data.
00029  * The data may be embedded in the song file, or it may be loaded from a
00030  * separate file.  When the data is no longer needed, art_unref() should be
00031  * called.  If an error occurs, <data> is set to NULL and art_unref() need not
00032  * be called. */
00033 AUD_VFUNC3 (art_get_data, const char *, file, const void * *, data, int64_t *, len)
00034 
00035 /* Returns the URI of an image file containing album art for <file>.  If the
00036  * song file contains embedded album art, the data is saved to a temporary file
00037  * and the URI of the temporary file is returned.  When the image file is no
00038  * longer needed, art_unref() should be called.  If a temporary file was
00039  * created, art_unref() deletes it.  If an error occurs, returns NULL and
00040  * art_unref() need not be called. */
00041 AUD_FUNC1 (const char *, art_get_file, const char *, file)
00042 
00043 /* Signals that the data or file returned by art_get_data() or art_get_file() is
00044  * no longer needed.  <file> must be the same URI passed to art_get_data() or
00045  * art_get_file(). */
00046 AUD_VFUNC1 (art_unref, const char *, file)
00047 
00048 /* config.c */
00049 
00050 AUD_VFUNC1 (config_clear_section, const char *, section)
00051 AUD_VFUNC2 (config_set_defaults, const char *, section, const char * const *, entries)
00052 
00053 AUD_VFUNC3 (set_string, const char *, section, const char *, name, const char *, value)
00054 AUD_FUNC2 (char *, get_string, const char *, section, const char *, name)
00055 AUD_VFUNC3 (set_bool, const char *, section, const char *, name, bool_t, value)
00056 AUD_FUNC2 (bool_t, get_bool, const char *, section, const char *, name)
00057 AUD_VFUNC3 (set_int, const char *, section, const char *, name, int, value)
00058 AUD_FUNC2 (int, get_int, const char *, section, const char *, name)
00059 AUD_VFUNC3 (set_double, const char *, section, const char *, name, double, value)
00060 AUD_FUNC2 (double, get_double, const char *, section, const char *, name)
00061 
00062 /* credits.c */
00063 AUD_VFUNC3 (get_audacious_credits, const char * *, brief,
00064  const char * const * *, credits, const char * const * *, translators)
00065 
00066 /* equalizer.c */
00067 AUD_VFUNC1 (eq_set_bands, const double *, values)
00068 AUD_VFUNC1 (eq_get_bands, double *, values)
00069 AUD_VFUNC2 (eq_set_band, int, band, double, value)
00070 AUD_FUNC1 (double, eq_get_band, int, band)
00071 
00072 /* equalizer_preset.c */
00073 AUD_FUNC1 (Index *, equalizer_read_presets, const char *, basename)
00074 AUD_FUNC2 (bool_t, equalizer_write_preset_file, Index *, list, const char *, basename)
00075 AUD_FUNC1 (EqualizerPreset *, load_preset_file, const char *, filename)
00076 AUD_FUNC2 (bool_t, save_preset_file, EqualizerPreset *, preset, const char *, filename)
00077 AUD_FUNC1 (Index *, import_winamp_eqf, VFSFile *, file)
00078 
00079 /* history.c */
00080 AUD_FUNC1 (const char *, history_get, int, entry)
00081 AUD_VFUNC1 (history_add, const char *, path)
00082 
00083 /* interface.c */
00084 AUD_VFUNC1 (interface_show, bool_t, show)
00085 AUD_FUNC0 (bool_t, interface_is_shown)
00086 AUD_FUNC0 (bool_t, interface_is_focused)
00087 
00088 /* interface_show_error() is safe to call from any thread */
00089 AUD_VFUNC1 (interface_show_error, const char *, message)
00090 
00091 AUD_VFUNC1 (interface_show_filebrowser, bool_t, play)
00092 AUD_VFUNC0 (interface_show_jump_to_track)
00093 
00094 AUD_VFUNC1 (interface_install_toolbar, void *, button)
00095 AUD_VFUNC1 (interface_uninstall_toolbar, void *, button)
00096 
00097 /* main.c */
00098 AUD_FUNC1 (const char *, get_path, int, path)
00099 
00100 /* probe.c */
00101 AUD_FUNC2 (PluginHandle *, file_find_decoder, const char *, filename, bool_t,
00102  fast)
00103 AUD_FUNC2 (Tuple *, file_read_tuple, const char *, filename, PluginHandle *,
00104  decoder)
00105 AUD_FUNC4 (bool_t, file_read_image, const char *, filename, PluginHandle *,
00106  decoder, void * *, data, int64_t *, size)
00107 AUD_FUNC2 (bool_t, file_can_write_tuple, const char *, filename,
00108  PluginHandle *, decoder)
00109 AUD_FUNC3 (bool_t, file_write_tuple, const char *, filename, PluginHandle *,
00110  decoder, const Tuple *, tuple)
00111 AUD_FUNC2 (bool_t, custom_infowin, const char *, filename, PluginHandle *,
00112  decoder)
00113 
00114 /* ui_plugin_menu.c */
00115 AUD_FUNC1 (/* GtkWidget * */ void *, get_plugin_menu, int, id)
00116 AUD_VFUNC4 (plugin_menu_add, int, id, MenuFunc, func, const char *, name,
00117  const char *, icon)
00118 AUD_VFUNC2 (plugin_menu_remove, int, id, MenuFunc, func)
00119 
00120 /* ui_preferences.c */
00121 AUD_VFUNC4 (create_widgets_with_domain, /* GtkWidget * */ void *, box,
00122  PreferencesWidget *, widgets, int, count, const char *, domain)
00123 AUD_VFUNC0 (show_prefs_window)
00124 
00125 /* util.c */
00126 AUD_FUNC2 (char *, construct_uri, const char *, base, const char *, reference)
00127 
00128 /* visualization.c */
00129 AUD_VFUNC2 (vis_func_add, int, type, VisFunc, func)
00130 AUD_VFUNC1 (vis_func_remove, VisFunc, func)