1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
Index: g_text.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_text.c,v
retrieving revision 1.11
diff -u -w -r1.11 g_text.c
--- g_text.c 15 Sep 2005 03:17:27 -0000 1.11
+++ g_text.c 14 Jun 2006 14:56:36 -0000
@@ -566,6 +566,19 @@
gatom_bang(x);
}
+ /* We need a list method because, since there's both an "inlet" and a
+ "nofirstin" flag, the standard list behavior gets confused. */
+static void gatom_list(t_gatom *x, t_symbol *s, int argc, t_atom *argv)
+{
+ if (!argc)
+ gatom_bang(x);
+ else if (argv->a_type == A_FLOAT)
+ gatom_float(x, argv->a_w.w_float);
+ else if (argv->a_type == A_SYMBOL)
+ gatom_symbol(x, argv->a_w.w_symbol);
+ else pd_error(x, "gatom_list: need float or symbol");
+}
+
static void gatom_motion(void *z, t_floatarg dx, t_floatarg dy)
{
t_gatom *x = (t_gatom *)z;
@@ -1349,6 +1362,7 @@
class_addbang(gatom_class, gatom_bang);
class_addfloat(gatom_class, gatom_float);
class_addsymbol(gatom_class, gatom_symbol);
+ class_addlist(gatom_class, gatom_list);
class_addmethod(gatom_class, (t_method)gatom_set, gensym("set"),
A_GIMME, 0);
class_addmethod(gatom_class, (t_method)gatom_click, gensym("click"),
|