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 /* art.c (thread-safe) */
23 
24 /* deprecated; use the non-blocking art_request_* functions instead */
25 AUD_VFUNC3 (art_get_data, const char *, file, const void * *, data, int64_t *, len)
26 AUD_FUNC1 (const char *, art_get_file, const char *, file)
27 
28 /* Releases album art returned by art_request_data() or art_request_file(). */
29 AUD_VFUNC1 (art_unref, const char *, file)
30 
31 /* config.c */
32 
33 AUD_VFUNC1 (config_clear_section, const char *, section)
34 AUD_VFUNC2 (config_set_defaults, const char *, section, const char * const *, entries)
35 
36 AUD_VFUNC3 (set_string, const char *, section, const char *, name, const char *, value)
37 AUD_FUNC2 (char *, get_string, const char *, section, const char *, name)
38 AUD_VFUNC3 (set_bool, const char *, section, const char *, name, bool_t, value)
39 AUD_FUNC2 (bool_t, get_bool, const char *, section, const char *, name)
40 AUD_VFUNC3 (set_int, const char *, section, const char *, name, int, value)
41 AUD_FUNC2 (int, get_int, const char *, section, const char *, name)
42 AUD_VFUNC3 (set_double, const char *, section, const char *, name, double, value)
43 AUD_FUNC2 (double, get_double, const char *, section, const char *, name)
44 
45 /* equalizer.c */
46 AUD_VFUNC1 (eq_set_bands, const double *, values)
47 AUD_VFUNC1 (eq_get_bands, double *, values)
48 AUD_VFUNC2 (eq_set_band, int, band, double, value)
49 AUD_FUNC1 (double, eq_get_band, int, band)
50 
51 /* equalizer_preset.c */
52 AUD_FUNC1 (Index *, equalizer_read_presets, const char *, basename)
53 AUD_FUNC2 (bool_t, equalizer_write_preset_file, Index *, list, const char *, basename)
55 AUD_FUNC2 (bool_t, save_preset_file, EqualizerPreset *, preset, const char *, filename)
56 AUD_FUNC1 (Index *, import_winamp_eqf, VFSFile *, file)
57 
58 /* history.c */
59 AUD_FUNC1 (const char *, history_get, int, entry)
60 AUD_VFUNC1 (history_add, const char *, path)
61 
62 /* interface.c */
63 AUD_VFUNC1 (interface_show, bool_t, show)
66 
67 /* interface_show_error() is safe to call from any thread */
68 AUD_VFUNC1 (interface_show_error, const char *, message)
69 
72 
73 AUD_VFUNC1 (interface_install_toolbar, void *, button)
75 
76 /* main.c */
77 AUD_FUNC1 (const char *, get_path, int, path)
78 
79 /* output.c */
81 
82 /* probe.c */
83 AUD_FUNC2 (PluginHandle *, file_find_decoder, const char *, filename, bool_t,
84  fast)
85 AUD_FUNC2 (Tuple *, file_read_tuple, const char *, filename, PluginHandle *,
86  decoder)
87 AUD_FUNC4 (bool_t, file_read_image, const char *, filename, PluginHandle *,
88  decoder, void * *, data, int64_t *, size)
89 AUD_FUNC2 (bool_t, file_can_write_tuple, const char *, filename,
90  PluginHandle *, decoder)
91 AUD_FUNC3 (bool_t, file_write_tuple, const char *, filename, PluginHandle *,
92  decoder, const Tuple *, tuple)
93 AUD_FUNC2 (bool_t, custom_infowin, const char *, filename, PluginHandle *,
94  decoder)
95 
96 /* ui_plugin_menu.c */
97 AUD_FUNC1 (/* GtkWidget * */ void *, get_plugin_menu, int, id)
98 AUD_VFUNC4 (plugin_menu_add, int, id, MenuFunc, func, const char *, name,
99  const char *, icon)
100 AUD_VFUNC2 (plugin_menu_remove, int, id, MenuFunc, func)
101 
102 /* ui_preferences.c */
103 AUD_VFUNC4 (create_widgets_with_domain, /* GtkWidget * */ void *, box,
104  const PreferencesWidget *, widgets, int, n_widgets, const char *, domain)
106 
107 /* util.c */
108 AUD_FUNC2 (char *, construct_uri, const char *, base, const char *, reference)
109 
110 /* visualization.c */
111 AUD_VFUNC2 (vis_func_add, int, type, VisFunc, func)
112 AUD_VFUNC1 (vis_func_remove, VisFunc, func)
113 
114 /* added in Audacious 3.4 */
115 
116 /* Gets album art for <file> (the URI of a song file) as JPEG or PNG data. If
117  * the album art is not yet loaded, sets <data> to NULL and begins to load the
118  * album art in the background. On completion, the "art ready" hook is called,
119  * with <file> as a parameter. The "current art ready" hook is also called if
120  * <file> is the currently playing song. */
121 AUD_VFUNC3 (art_request_data, const char *, file, const void * *, data, int64_t *, len)
122 
123 /* Similar to art_request_data() but returns the URI of an image file.
124  * (A temporary file will be created if necessary.) */
125 AUD_FUNC1 (const char *, art_request_file, const char *, file)
file_read_tuple
Definition: misc-api.h:85
void art_get_data(const char *file, const void **data, int64_t *len)
Definition: art.c:294
void art_request_data(const char *file, const void **data, int64_t *len)
Definition: art.c:284
bool_t interface_is_shown(void)
Definition: interface.c:72
bool_t equalizer_write_preset_file(Index *list, const char *basename)
const char PluginHandle decoder file_can_write_tuple
Definition: misc-api.h:89
void show_prefs_window(void)
void config_clear_section(const char *section)
Definition: config.c:169
const char filename
Definition: misc-api.h:85
const char PluginHandle decoder const char PluginHandle decoder const char PluginHandle decoder AUD_VFUNC4(plugin_menu_add, int, id, MenuFunc, func, const char *, name, const char *, icon) AUD_VFUNC4(create_widgets_with_domain
void eq_set_bands(const double *values)
Definition: equalizer.c:183
const char PluginHandle decoder const char PluginHandle decoder const char PluginHandle decoder void const PreferencesWidget n_widgets
Definition: misc-api.h:103
const char * art_get_file(const char *file)
Definition: art.c:301
char * get_string(const char *section, const char *name)
Definition: config.c:270
void interface_show_filebrowser(bool_t play_button)
Definition: interface.c:132
PluginHandle * file_find_decoder(const char *filename, bool_t fast)
Definition: probe.c:160
bool_t file_read_image(const char *filename, PluginHandle *decoder, void **data, int64_t *size)
Definition: probe.c:214
void plugin_menu_add(int id, MenuFunc func, const char *name, const char *icon)
double get_double(const char *section, const char *name)
Definition: config.c:327
bool_t play
Definition: main.c:58
void(* VisFunc)(void)
Definition: misc.h:70
void set_string(const char *section, const char *name, const char *value)
Definition: config.c:221
type
Definition: plugins-api.h:41
char * construct_uri(const char *string, const char *playlist_name)
Definition: util.c:70
void set_bool(const char *section, const char *name, bool_t value)
Definition: config.c:289
const char PluginHandle decoder AUD_FUNC4(bool_t, file_read_image, const char *, filename, PluginHandle *, decoder, void **, data, int64_t *, size) AUD_FUNC2(bool_t
bool_t file_write_tuple(const char *filename, PluginHandle *decoder, const Tuple *tuple)
Definition: probe.c:244
Index Index bool_t
Definition: playlist-api.h:122
const char PluginHandle decoder const char PluginHandle decoder AUD_FUNC3(bool_t, file_write_tuple, const char *, filename, PluginHandle *, decoder, const Tuple *, tuple) AUD_FUNC2(bool_t
void vis_func_add(int type, GCallback func)
Definition: visualization.c:45
void config_set_defaults(const char *section, const char *const *entries)
Definition: config.c:186
void plugin_menu_remove(int id, MenuFunc func)
void * get_plugin_menu(int id)
Index * equalizer_read_presets(const char *basename)
void art_unref(const char *file)
Definition: art.c:308
#define AUD_VFUNC1(n, t1, n1)
const char * name
Definition: plugin-init.c:38
#define AUD_FUNC0(t, n)
void eq_set_band(int band, double value)
Definition: equalizer.c:199
bool_t interface_is_focused(void)
Definition: interface.c:81
void set_int(const char *section, const char *name, int value)
Definition: config.c:302
EqualizerPreset * load_preset_file(const char *filename)
void set_double(const char *section, const char *name, double value)
Definition: config.c:319
AUD_FUNC2(PluginHandle *, file_find_decoder, const char *, filename, bool_t, fast) AUD_FUNC2(Tuple *
bool_t get_bool(const char *section, const char *name)
Definition: config.c:294
void interface_uninstall_toolbar(void *widget)
Definition: interface.c:193
func
Definition: plugins-api.h:41
const char PluginHandle decoder const char PluginHandle decoder const char PluginHandle decoder void const PreferencesWidget widgets
Definition: misc-api.h:103
void(* MenuFunc)(void)
Definition: misc.h:60
void eq_get_bands(double *values)
Definition: equalizer.c:191
const char * get_path(int id)
Definition: main.c:225
void interface_show_jump_to_track(void)
Definition: interface.c:140
double eq_get_band(int band)
Definition: equalizer.c:208
Index * import_winamp_eqf(VFSFile *file)
void create_widgets_with_domain(void *box, const PreferencesWidget *widgets, int amt, const char *domain)
void output_reset(int type)
Definition: output.c:507
const char PluginHandle decoder const char PluginHandle decoder const char PluginHandle decoder void box
Definition: misc-api.h:103
int get_int(const char *section, const char *name)
Definition: config.c:310
void vis_func_remove(GCallback func)
Definition: visualization.c:53
#define AUD_FUNC1(t, n, t1, n1)
#define AUD_VFUNC0(n)
void interface_install_toolbar(void *widget)
Definition: interface.c:183
const char * art_request_file(const char *file)
Definition: art.c:289
bool_t save_preset_file(EqualizerPreset *preset, const char *filename)
const char PluginHandle decoder const char PluginHandle decoder custom_infowin
Definition: misc-api.h:93
void interface_show_error(const char *message)
Definition: interface.c:115
#define AUD_VFUNC2(n, t1, n1, t2, n2)
void interface_show(bool_t show)
Definition: interface.c:62
#define AUD_VFUNC3(n, t1, n1, t2, n2, t3, n3)
Index Index play entry
Definition: playlist-api.h:144
void history_add(const char *path)
Definition: history.c:101
const char * history_get(int entry)
Definition: history.c:95