Update fluidsynth
[ardour.git] / libs / fluidsynth / src / fluid_settings.h
1 /* FluidSynth - A Software Synthesizer
2  *
3  * Copyright (C) 2003  Peter Hanappe and others.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public License
7  * as published by the Free Software Foundation; either version 2 of
8  * the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the Free
17  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  * 02110-1301, USA
19  */
20
21
22 #ifndef _FLUID_SETTINGS_H
23 #define _FLUID_SETTINGS_H
24
25
26
27 /** returns 1 if the option was added, 0 otherwise */
28 int fluid_settings_add_option(fluid_settings_t* settings, const char* name, const char* s);
29
30 /** returns 1 if the option was added, 0 otherwise */
31 int fluid_settings_remove_option(fluid_settings_t* settings, const char* name, const char* s);
32
33
34 typedef int (*fluid_num_update_t)(void* data, const char* name, double value);
35 typedef int (*fluid_str_update_t)(void* data, const char* name, const char* value);
36 typedef int (*fluid_int_update_t)(void* data, const char* name, int value);
37
38 /** returns 0 if the value has been registered correctly, non-zero
39     otherwise */
40 int fluid_settings_register_str(fluid_settings_t* settings, const char* name, const char* def, int hints,
41                                fluid_str_update_t fun, void* data);
42
43 /** returns 0 if the value has been registered correctly, non-zero
44     otherwise */
45 int fluid_settings_register_num(fluid_settings_t* settings, char* name, double def,
46                                 double min, double max, int hints,
47                                 fluid_num_update_t fun, void* data);
48
49 /** returns 0 if the value has been registered correctly, non-zero
50     otherwise */
51 int fluid_settings_register_int(fluid_settings_t* settings, char* name, int def,
52                                 int min, int max, int hints,
53                                 fluid_int_update_t fun, void* data);
54
55
56 #endif /* _FLUID_SETTINGS_H */