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  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions, and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions, and the following disclaimer in the documentation
13  * provided with the distribution.
14  *
15  * This software is provided "as is" and without any warranty, express or
16  * implied. In no event shall the authors be liable for any damages arising from
17  * the use of this software.
18  */
19 
20 /* Do not include this file directly; use misc.h instead. */
21 
22 /* CAUTION: Many of these functions are not thread safe. */
23 
24 /* art.c */
25 
26 /* Fetches album art for <file> (the URI of a song file) as JPEG or PNG data.
27  * The data may be embedded in the song file, or it may be loaded from a
28  * separate file. When the data is no longer needed, art_unref() should be
29  * called. If an error occurs, <data> is set to NULL and art_unref() need not
30  * be called. */
31 AUD_VFUNC3 (art_get_data, const char *, file, const void * *, data, int64_t *, len)
32 
33 /* Returns the URI of an image file containing album art for <file>. If the
34  * song file contains embedded album art, the data is saved to a temporary file
35  * and the URI of the temporary file is returned. When the image file is no
36  * longer needed, art_unref() should be called. If a temporary file was
37  * created, art_unref() deletes it. If an error occurs, returns NULL and
38  * art_unref() need not be called. */
39 AUD_FUNC1 (const char *, art_get_file, const char *, file)
40 
41 /* Signals that the data or file returned by art_get_data() or art_get_file() is
42  * no longer needed. <file> must be the same URI passed to art_get_data() or
43  * art_get_file(). */
44 AUD_VFUNC1 (art_unref, const char *, file)
45 
46 /* config.c */
47 
48 AUD_VFUNC1 (config_clear_section, const char *, section)
49 AUD_VFUNC2 (config_set_defaults, const char *, section, const char * const *, entries)
50 
51 AUD_VFUNC3 (set_string, const char *, section, const char *, name, const char *, value)
52 AUD_FUNC2 (char *, get_string, const char *, section, const char *, name)
53 AUD_VFUNC3 (set_bool, const char *, section, const char *, name, bool_t, value)
54 AUD_FUNC2 (bool_t, get_bool, const char *, section, const char *, name)
55 AUD_VFUNC3 (set_int, const char *, section, const char *, name, int, value)
56 AUD_FUNC2 (int, get_int, const char *, section, const char *, name)
57 AUD_VFUNC3 (set_double, const char *, section, const char *, name, double, value)
58 AUD_FUNC2 (double, get_double, const char *, section, const char *, name)
59 
60 /* equalizer.c */
61 AUD_VFUNC1 (eq_set_bands, const double *, values)
62 AUD_VFUNC1 (eq_get_bands, double *, values)
63 AUD_VFUNC2 (eq_set_band, int, band, double, value)
64 AUD_FUNC1 (double, eq_get_band, int, band)
65 
66 /* equalizer_preset.c */
67 AUD_FUNC1 (Index *, equalizer_read_presets, const char *, basename)
68 AUD_FUNC2 (bool_t, equalizer_write_preset_file, Index *, list, const char *, basename)
70 AUD_FUNC2 (bool_t, save_preset_file, EqualizerPreset *, preset, const char *, filename)
71 AUD_FUNC1 (Index *, import_winamp_eqf, VFSFile *, file)
72 
73 /* history.c */
74 AUD_FUNC1 (const char *, history_get, int, entry)
75 AUD_VFUNC1 (history_add, const char *, path)
76 
77 /* interface.c */
78 AUD_VFUNC1 (interface_show, bool_t, show)
81 
82 /* interface_show_error() is safe to call from any thread */
83 AUD_VFUNC1 (interface_show_error, const char *, message)
84 
87 
88 AUD_VFUNC1 (interface_install_toolbar, void *, button)
90 
91 /* main.c */
92 AUD_FUNC1 (const char *, get_path, int, path)
93 
94 /* output.c */
96 
97 /* probe.c */
98 AUD_FUNC2 (PluginHandle *, file_find_decoder, const char *, filename, bool_t,
99  fast)
100 AUD_FUNC2 (Tuple *, file_read_tuple, const char *, filename, PluginHandle *,
101  decoder)
102 AUD_FUNC4 (bool_t, file_read_image, const char *, filename, PluginHandle *,
103  decoder, void * *, data, int64_t *, size)
104 AUD_FUNC2 (bool_t, file_can_write_tuple, const char *, filename,
105  PluginHandle *, decoder)
106 AUD_FUNC3 (bool_t, file_write_tuple, const char *, filename, PluginHandle *,
107  decoder, const Tuple *, tuple)
108 AUD_FUNC2 (bool_t, custom_infowin, const char *, filename, PluginHandle *,
109  decoder)
110 
111 /* ui_plugin_menu.c */
112 AUD_FUNC1 (/* GtkWidget * */ void *, get_plugin_menu, int, id)
113 AUD_VFUNC4 (plugin_menu_add, int, id, MenuFunc, func, const char *, name,
114  const char *, icon)
115 AUD_VFUNC2 (plugin_menu_remove, int, id, MenuFunc, func)
116 
117 /* ui_preferences.c */
118 AUD_VFUNC4 (create_widgets_with_domain, /* GtkWidget * */ void *, box,
119  const PreferencesWidget *, widgets, int, n_widgets, const char *, domain)
121 
122 /* util.c */
123 AUD_FUNC2 (char *, construct_uri, const char *, base, const char *, reference)
124 
125 /* visualization.c */
126 AUD_VFUNC2 (vis_func_add, int, type, VisFunc, func)
127 AUD_VFUNC1 (vis_func_remove, VisFunc, func)