1 /*---------------------------------------------------------------------------*/
6 ** Created by Jean-Christophe Hoelt on Sat Jul 19 2003
7 ** Copyright (c) 2003 iOS. All rights reserved.
9 /*---------------------------------------------------------------------------*/
11 #include "goom_config_param.h"
14 /* TODO: Ajouter goom_ devant ces fonctions */
17 empty_fct (PluginParam * dummy)
26 p.changed = empty_fct;
27 p.change_listener = empty_fct;
35 goom_secure_f_param (char *name)
37 PluginParam p = secure_param ();
40 p.type = PARAM_FLOATVAL;
49 goom_secure_f_feedback (char *name)
51 PluginParam p = secure_f_param (name);
58 goom_secure_s_param (char *name)
60 PluginParam p = secure_param ();
63 p.type = PARAM_STRVAL;
69 goom_secure_b_param (char *name, int value)
71 PluginParam p = secure_param ();
74 p.type = PARAM_BOOLVAL;
80 goom_secure_i_param (char *name)
82 PluginParam p = secure_param ();
85 p.type = PARAM_INTVAL;
94 goom_secure_i_feedback (char *name)
96 PluginParam p = secure_i_param (name);
103 goom_plugin_parameters (const char *name, int nb)
107 p.name = (char *) name;
110 p.params = (PluginParam **) malloc (nb * sizeof (PluginParam *));
115 goom_plugin_parameters_free (PluginParameters * p)
120 /*---------------------------------------------------------------------------*/
123 goom_set_str_param_value (PluginParam * p, const char *str)
125 int len = strlen (str);
128 SVAL (*p) = (char *) realloc (SVAL (*p), len + 1);
130 SVAL (*p) = (char *) malloc (len + 1);
131 memcpy (SVAL (*p), str, len + 1);
135 goom_set_list_param_value (PluginParam * p, const char *str)
137 int len = strlen (str);
140 printf ("%s: %d\n", str, len);
143 LVAL (*p) = (char *) realloc (LVAL (*p), len + 1);
145 LVAL (*p) = (char *) malloc (len + 1);
146 memcpy (LVAL (*p), str, len + 1);