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)
31 goom_secure_param (PluginParam * p)
33 p->changed = empty_fct;
34 p->change_listener = empty_fct;
36 p->name = p->desc = 0;
41 goom_secure_f_param (PluginParam * p, const char *name)
46 p->type = PARAM_FLOATVAL;
54 goom_secure_f_feedback (PluginParam * p, const char *name)
56 secure_f_param (p, name);
62 goom_secure_s_param (PluginParam * p, const char *name)
67 p->type = PARAM_STRVAL;
72 goom_secure_b_param (PluginParam * p, const char *name, int value)
77 p->type = PARAM_BOOLVAL;
82 goom_secure_i_param (PluginParam * p, const char *name)
87 p->type = PARAM_INTVAL;
95 goom_secure_i_feedback (PluginParam * p, const char *name)
97 secure_i_param (p, name);
103 goom_plugin_parameters (PluginParameters * p, const char *name, int nb)
108 p->params = malloc (nb * sizeof (PluginParam *));
112 goom_plugin_parameters_free (PluginParameters * p)
117 /*---------------------------------------------------------------------------*/
120 goom_set_str_param_value (PluginParam * p, const char *str)
122 int len = strlen (str);
125 SVAL (*p) = (char *) realloc (SVAL (*p), len + 1);
127 SVAL (*p) = (char *) malloc (len + 1);
128 memcpy (SVAL (*p), str, len + 1);
132 goom_set_list_param_value (PluginParam * p, const char *str)
134 int len = strlen (str);
137 printf ("%s: %d\n", str, len);
140 LVAL (*p) = (char *) realloc (LVAL (*p), len + 1);
142 LVAL (*p) = (char *) malloc (len + 1);
143 memcpy (LVAL (*p), str, len + 1);