2 * Copyright (C) <2003> Jean-Christophe Hoelt <jeko@free.fr>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #include "goom_config_param.h"
24 empty_fct (PluginParam * dummy)
29 goom_secure_param (PluginParam * p)
31 p->changed = empty_fct;
32 p->change_listener = empty_fct;
34 p->name = p->desc = 0;
39 goom_secure_f_param (PluginParam * p, const char *name)
44 p->type = PARAM_FLOATVAL;
52 goom_secure_f_feedback (PluginParam * p, const char *name)
54 secure_f_param (p, name);
60 goom_secure_s_param (PluginParam * p, const char *name)
65 p->type = PARAM_STRVAL;
70 goom_secure_b_param (PluginParam * p, const char *name, int value)
75 p->type = PARAM_BOOLVAL;
80 goom_secure_i_param (PluginParam * p, const char *name)
85 p->type = PARAM_INTVAL;
93 goom_secure_i_feedback (PluginParam * p, const char *name)
95 secure_i_param (p, name);
101 goom_plugin_parameters (PluginParameters * p, const char *name, int nb)
106 p->params = malloc (nb * sizeof (PluginParam *));
110 goom_plugin_parameters_free (PluginParameters * p)
115 /*---------------------------------------------------------------------------*/
118 goom_set_str_param_value (PluginParam * p, const char *str)
120 int len = strlen (str);
123 SVAL (*p) = (char *) realloc (SVAL (*p), len + 1);
125 SVAL (*p) = (char *) malloc (len + 1);
126 memcpy (SVAL (*p), str, len + 1);
130 goom_set_list_param_value (PluginParam * p, const char *str)
132 int len = strlen (str);
135 printf ("%s: %d\n", str, len);
138 LVAL (*p) = (char *) realloc (LVAL (*p), len + 1);
140 LVAL (*p) = (char *) malloc (len + 1);
141 memcpy (LVAL (*p), str, len + 1);