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., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #include "goom_config_param.h"
23 /* TODO: Ajouter goom_ devant ces fonctions */
26 empty_fct (PluginParam * dummy)
35 p.changed = empty_fct;
36 p.change_listener = empty_fct;
44 goom_secure_f_param (char *name)
46 PluginParam p = secure_param ();
49 p.type = PARAM_FLOATVAL;
58 goom_secure_f_feedback (char *name)
60 PluginParam p = secure_f_param (name);
67 goom_secure_s_param (char *name)
69 PluginParam p = secure_param ();
72 p.type = PARAM_STRVAL;
78 goom_secure_b_param (char *name, int value)
80 PluginParam p = secure_param ();
83 p.type = PARAM_BOOLVAL;
89 goom_secure_i_param (char *name)
91 PluginParam p = secure_param ();
94 p.type = PARAM_INTVAL;
103 goom_secure_i_feedback (char *name)
105 PluginParam p = secure_i_param (name);
112 goom_plugin_parameters (const char *name, int nb)
116 p.name = (char *) name;
119 p.params = (PluginParam **) malloc (nb * sizeof (PluginParam *));
124 goom_plugin_parameters_free (PluginParameters * p)
129 /*---------------------------------------------------------------------------*/
132 goom_set_str_param_value (PluginParam * p, const char *str)
134 int len = strlen (str);
137 SVAL (*p) = (char *) realloc (SVAL (*p), len + 1);
139 SVAL (*p) = (char *) malloc (len + 1);
140 memcpy (SVAL (*p), str, len + 1);
144 goom_set_list_param_value (PluginParam * p, const char *str)
146 int len = strlen (str);
149 printf ("%s: %d\n", str, len);
152 LVAL (*p) = (char *) realloc (LVAL (*p), len + 1);
154 LVAL (*p) = (char *) malloc (len + 1);
155 memcpy (LVAL (*p), str, len + 1);