blob: f25f49e3df115477171f225a396fe83f5987b449 (
plain)
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
36
37
38
39
40
|
/* (C) Guenter Geiger <geiger@epy.co.at> */
#include <m_pd.h>
#ifdef NT
#pragma warning( disable : 4244 )
#pragma warning( disable : 4305 )
#endif
/* ------------------------ messages ----------------------------- */
static t_class *messages_class;
typedef struct _messages
{
t_object x_obj;
} t_messages;
void messages_bang(t_messages *x)
{
post("bang");
}
static void *messages_new()
{
t_messages *x = (t_messages *)pd_new(messages_class);
outlet_new(&x->x_obj, &s_float);
return (x);
}
void messages_setup(void)
{
messages_class = class_new(gensym("messages"), (t_newmethod)messages_new, 0,
sizeof(t_messages), 0,0);
class_addbang(messages_class,messages_bang);
}
|