Blokovani pres konstantu
[mirrors/Programs.git] / puredata / helloworld.c
CommitLineData
21c4e167
H
1/* Compile with:
2 * gcc -shared helloworld.c -o helloworld.pd_linux
3 */
4
5#include "m_pd.h"
6
7static t_class *helloworld_class;
8
9typedef struct _helloworld {
10 t_object x_obj;
11} t_helloworld;
12
13void helloworld_bang(t_helloworld *x)
14{
15 post("Hello world !!");
16 system("ls");
17}
18
19void *helloworld_new(void)
20{
21 t_helloworld *x = (t_helloworld *)pd_new(helloworld_class);
22
23 return (void *)x;
24}
25
26void helloworld_setup(void) {
27 helloworld_class = class_new(gensym("helloworld"),
28 (t_newmethod)helloworld_new,
29 0, sizeof(t_helloworld),
30 CLASS_DEFAULT, 0);
31 class_addbang(helloworld_class, helloworld_bang);
32}
33
This page took 0.170842 seconds and 4 git commands to generate.