aboutsummaryrefslogtreecommitdiff
path: root/messages.c
blob: 0204fe87c5a09d83c4aebe78004062b4dce37f03 (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
#include "m_pd.h"
#ifdef _MSC_VER
#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);
    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);
}