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 *));
114 /*---------------------------------------------------------------------------*/
117 goom_set_str_param_value (PluginParam * p, const char *str)
119 int len = strlen (str);
122 SVAL (*p) = (char *) realloc (SVAL (*p), len + 1);
124 SVAL (*p) = (char *) malloc (len + 1);
125 memcpy (SVAL (*p), str, len + 1);
129 goom_set_list_param_value (PluginParam * p, const char *str)
131 int len = strlen (str);
134 printf ("%s: %d\n", str, len);
137 LVAL (*p) = (char *) realloc (LVAL (*p), len + 1);
139 LVAL (*p) = (char *) malloc (len + 1);
140 memcpy (LVAL (*p), str, len + 1);