annotate src/rovascope/actuators.c @ 1558:289fa4cb75db

Merge fileinfo window fixes from XMMS-SID.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 02 Sep 2007 21:34:37 +0300
parents 290588854a9d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
149
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
1 #ifdef HAVE_CONFIG_H
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
2 # include <config.h>
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
3 #endif
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
4
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
5 #include <glib.h>
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
6
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
7 #include "actuators.h"
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
8 //#include "containers.h"
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
9
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
10 /* FIXME: container options override containees - fix this? */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
11 /* FIXME: add actuator groups (by a group name string) */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
12
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
13 /* FIXME: add support for copying containers' children (optionally) */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
14 struct pn_actuator *
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
15 copy_actuator (const struct pn_actuator *a)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
16 {
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
17 struct pn_actuator *actuator;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
18 int i;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
19
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
20 actuator = g_new (struct pn_actuator, 1);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
21
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
22 actuator->desc = a->desc;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
23
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
24 /* Make an options table */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
25 if (actuator->desc->option_descs)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
26 {
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
27 /* count the options */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
28 for (i=0; actuator->desc->option_descs[i].name; i++);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
29
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
30 actuator->options = g_new (struct pn_actuator_option, i);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
31 for (i=0; actuator->desc->option_descs[i].name; i++)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
32 {
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
33 actuator->options[i].desc = &actuator->desc->option_descs[i];
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
34
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
35 /* copy the default options */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
36 switch (actuator->desc->option_descs[i].type)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
37 {
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
38 case OPT_TYPE_INT:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
39 case OPT_TYPE_COLOR_INDEX:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
40 case OPT_TYPE_FLOAT:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
41 case OPT_TYPE_COLOR:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
42 case OPT_TYPE_BOOLEAN:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
43 memcpy (&actuator->options[i].val,
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
44 &a->options[i].val,
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
45 sizeof (union actuator_option_val));
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
46 break;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
47 case OPT_TYPE_STRING:
296
0f3ed1b6b273 [svn] - fix handling of strings
nenolod
parents: 188
diff changeset
48 actuator->options[i].val.sval = g_strdup(a->options[i].val.sval);
0f3ed1b6b273 [svn] - fix handling of strings
nenolod
parents: 188
diff changeset
49 break;
149
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
50 default:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
51 break;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
52 }
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
53 }
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
54
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
55 /* the NULL option */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
56 actuator->options[i].desc = NULL;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
57 }
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
58 else
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
59 actuator->options = NULL;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
60
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
61 if (actuator->desc->init)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
62 actuator->desc->init (&actuator->data);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
63
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
64 return actuator;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
65 }
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
66
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
67 struct pn_actuator_desc *
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
68 get_actuator_desc (const char *name)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
69 {
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
70 int i;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
71
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
72 for (i=0; builtin_table[i]; i++)
168
e094aa00fdee [svn] - support lookup of actuator templates by their display name
nenolod
parents: 149
diff changeset
73 if (! g_strcasecmp (name, builtin_table[i]->name) || ! g_strcasecmp(name, builtin_table[i]->dispname))
149
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
74 break;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
75
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
76 /* actuator not found */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
77 if (! builtin_table[i])
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
78 return NULL;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
79
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
80 return builtin_table[i];
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
81 }
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
82
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
83 struct pn_actuator *
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
84 create_actuator (const char *name)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
85 {
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
86 int i;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
87 struct pn_actuator_desc *desc;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
88 struct pn_actuator *actuator;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
89
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
90 /* find the actuatoreration */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
91 desc = get_actuator_desc (name);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
92
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
93 if (! desc)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
94 return NULL;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
95
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
96 actuator = g_new (struct pn_actuator, 1);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
97 actuator->desc = desc;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
98
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
99 /* Make an options table */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
100 if (actuator->desc->option_descs)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
101 {
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
102 /* count the options */
188
0d826917c56f [svn] - 64-bit safety (pass 1 of 2)
nenolod
parents: 168
diff changeset
103 for (i=0; actuator->desc->option_descs[i].name != NULL; i++);
149
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
104
188
0d826917c56f [svn] - 64-bit safety (pass 1 of 2)
nenolod
parents: 168
diff changeset
105 actuator->options = g_new0 (struct pn_actuator_option, i + 1);
0d826917c56f [svn] - 64-bit safety (pass 1 of 2)
nenolod
parents: 168
diff changeset
106 for (i=0; actuator->desc->option_descs[i].name != NULL; i++)
149
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
107 {
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
108 actuator->options[i].desc = &actuator->desc->option_descs[i];
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
109
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
110 /* copy the default options */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
111 switch (actuator->desc->option_descs[i].type)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
112 {
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
113 case OPT_TYPE_INT:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
114 case OPT_TYPE_COLOR_INDEX:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
115 case OPT_TYPE_FLOAT:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
116 case OPT_TYPE_COLOR:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
117 case OPT_TYPE_BOOLEAN:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
118 memcpy (&actuator->options[i].val,
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
119 &actuator->desc->option_descs[i].default_val,
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
120 sizeof (union actuator_option_val));
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
121 break;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
122 case OPT_TYPE_STRING:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
123 /* NOTE: It's not realloc'ed so don't free it */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
124 actuator->options[i].val.sval =
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
125 actuator->desc->option_descs[i].default_val.sval;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
126 break;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
127 }
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
128 }
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
129
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
130 /* the NULL option */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
131 actuator->options[i].desc = NULL;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
132 }
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
133 else
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
134 actuator->options = NULL;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
135
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
136 if (actuator->desc->init)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
137 actuator->desc->init (&actuator->data);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
138
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
139 return actuator;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
140 }
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
141
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
142 void
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
143 destroy_actuator (struct pn_actuator *actuator)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
144 {
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
145 int i;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
146
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
147 if (actuator->desc->cleanup)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
148 actuator->desc->cleanup (actuator->data);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
149
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
150 /* find any option val's that need to be freed */
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
151 if (actuator->options)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
152 for (i=0; actuator->options[i].desc; i++)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
153 switch (actuator->options[i].desc->type)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
154 {
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
155 case OPT_TYPE_INT:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
156 case OPT_TYPE_FLOAT:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
157 case OPT_TYPE_COLOR:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
158 case OPT_TYPE_COLOR_INDEX:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
159 case OPT_TYPE_BOOLEAN:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
160 break;
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
161 case OPT_TYPE_STRING:
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
162 if (actuator->options[i].val.sval
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
163 != actuator->options[i].desc->default_val.sval)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
164 g_free ((char *)actuator->options[i].val.sval);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
165 }
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
166
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
167 g_free (actuator->options);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
168 g_free (actuator);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
169 }
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
170
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
171 void
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
172 exec_actuator (struct pn_actuator *actuator)
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
173 {
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
174 g_assert (actuator);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
175 g_assert (actuator->desc);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
176 g_assert (actuator->desc->exec);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
177 actuator->desc->exec (actuator->options, actuator->data);
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
178 }
fd9c0a5871ac [svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff changeset
179