Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/libs/fluidsynth/src/utils/fluid_settings.h
4396 views
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
#ifdef __cplusplus
26
extern "C" {
27
#endif
28
29
int fluid_settings_add_option(fluid_settings_t *settings, const char *name, const char *s);
30
int fluid_settings_remove_option(fluid_settings_t *settings, const char *name, const char *s);
31
32
33
typedef void (*fluid_str_update_t)(void *data, const char *name, const char *value);
34
35
int fluid_settings_register_str(fluid_settings_t *settings, const char *name, const char *def, int hints);
36
int fluid_settings_callback_str(fluid_settings_t *settings, const char *name,
37
fluid_str_update_t fun, void *data);
38
39
40
typedef void (*fluid_num_update_t)(void *data, const char *name, double value);
41
42
int fluid_settings_register_num(fluid_settings_t *settings, const char *name, double def,
43
double min, double max, int hints);
44
int fluid_settings_callback_num(fluid_settings_t *settings, const char *name,
45
fluid_num_update_t fun, void *data);
46
47
/* Type specific wrapper for fluid_settings_getnum */
48
int fluid_settings_getnum_float(fluid_settings_t *settings, const char *name, float *val);
49
50
51
typedef void (*fluid_int_update_t)(void *data, const char *name, int value);
52
int fluid_settings_register_int(fluid_settings_t *settings, const char *name, int def,
53
int min, int max, int hints);
54
int fluid_settings_callback_int(fluid_settings_t *settings, const char *name,
55
fluid_int_update_t fun, void *data);
56
57
int fluid_settings_split_csv(const char *str, int *buf, int buf_len);
58
59
void* fluid_settings_get_user_data(fluid_settings_t * settings, const char *name);
60
61
#ifdef __cplusplus
62
}
63
#endif
64
65
#endif /* _FLUID_SETTINGS_H */
66
67