File: messages.c

package info (click to toggle)
pd-ext13 0.17.1-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 392 kB
  • ctags: 638
  • sloc: ansic: 3,618; makefile: 251
file content (36 lines) | stat: -rw-r--r-- 636 bytes parent folder | download | duplicates (3)
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);
}