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 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 18 * 02111-1307, 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 */ 28int fluid_settings_add_option(fluid_settings_t* settings, char* name, char* s); 29 30/** returns 1 if the option was added, 0 otherwise */ 31int fluid_settings_remove_option(fluid_settings_t* settings, char* name, char* s); 32 33 34typedef int (*fluid_num_update_t)(void* data, char* name, double value); 35typedef int (*fluid_str_update_t)(void* data, char* name, char* value); 36typedef int (*fluid_int_update_t)(void* data, char* name, int value); 37 38/** returns 0 if the value has been resgister correctly, non-zero 39 otherwise */ 40int fluid_settings_register_str(fluid_settings_t* settings, char* name, char* def, int hints, 41 fluid_str_update_t fun, void* data); 42 43/** returns 0 if the value has been resgister correctly, non-zero 44 otherwise */ 45int fluid_settings_register_num(fluid_settings_t* settings, char* name, double min, double max, 46 double def, int hints, fluid_num_update_t fun, void* data); 47 48 49/** returns 0 if the value has been resgister correctly, non-zero 50 otherwise */ 51int fluid_settings_register_int(fluid_settings_t* settings, char* name, int min, int max, 52 int def, int hints, fluid_int_update_t fun, void* data); 53 54 55#endif /* _FLUID_SETTINGS_H */ 56