Only show user-presets in favorite sidebar
[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 Lesser General Public License
7  * as published by the Free Software Foundation; either version 2.1 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  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser 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 int fluid_settings_add_option(fluid_settings_t *settings, const char *name, const char *s);
26 int fluid_settings_remove_option(fluid_settings_t *settings, const char *name, const char *s);
27
28
29 typedef void (*fluid_str_update_t)(void *data, const char *name, const char *value);
30
31 int fluid_settings_register_str(fluid_settings_t *settings, const char *name, const char *def, int hints);
32 int fluid_settings_callback_str(fluid_settings_t *settings, const char *name,
33                                 fluid_str_update_t fun, void *data);
34
35
36 typedef void (*fluid_num_update_t)(void *data, const char *name, double value);
37
38 int fluid_settings_register_num(fluid_settings_t *settings, const char *name, double def,
39                                 double min, double max, int hints);
40 int fluid_settings_callback_num(fluid_settings_t *settings, const char *name,
41                                 fluid_num_update_t fun, void *data);
42
43 /* Type specific wrapper for fluid_settings_getnum */
44 int fluid_settings_getnum_float(fluid_settings_t *settings, const char *name, float *val);
45
46
47 typedef void (*fluid_int_update_t)(void *data, const char *name, int value);
48 int fluid_settings_register_int(fluid_settings_t *settings, const char *name, int def,
49                                 int min, int max, int hints);
50 int fluid_settings_callback_int(fluid_settings_t *settings, const char *name,
51                                 fluid_int_update_t fun, void *data);
52
53 int fluid_settings_split_csv(const char *str, int *buf, int buf_len);
54
55 #endif /* _FLUID_SETTINGS_H */