CicmWrapper  Beta 0.4
A wrapper for Pure Data
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
enative.h
1 /*
2  * CicmWrapper - Pure Data Enhanced
3 
4  * Copyright (C) 2013 Pierre Guillot, CICM - Université Paris 8
5  * All rights reserved.
6  * Website : https://github.com/CICM/CicmWrapper
7  * Contacts : cicm.mshparisnord@gmail.com
8  * For information on usage and redistribution, and for a DISCLAIMER OF ALL
9  * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
10  */
11 
18 #ifndef DEF_EPD_NATIVE
19 #define DEF_EPD_NATIVE
20 
27 typedef void (*t_method)(void* x, ...);
29 
31 #define CLASS_DEFAULT 0
32 #define CLASS_PD 1
34 #define CLASS_GOBJ 2
36 #define CLASS_PATCHABLE 3
38 #define CLASS_NOINLET 8
40 
46 typedef struct t_symbol
47 {
48  char *s_name;
49  struct t_class **s_thing;
50  struct t_symbol *s_next;
51 } t_symbol;
52 
58 typedef struct t_binbuf
59 {
60  int b_n;
62 } t_binbuf;
63 
69 typedef union word
70 {
71  t_float w_float;
73  t_gpointer *w_gpointer;
74  t_array *w_array;
75  struct _binbuf *w_binbuf;
76  int w_index;
77 } t_word;
78 
84 typedef enum
85 {
89  A_POINTER,
90  A_SEMI,
91  A_COMMA,
92  A_DEFFLOAT,
93  A_DEFSYM,
94  A_DOLLAR,
95  A_DOLLSYM,
98 } t_atomtype;
99 
105 typedef struct t_atom
106 {
108  union word a_w;
109 } t_atom;
110 
116 typedef struct t_outlet
117 {
119  struct _outlet *o_next;
120  t_outconnect *o_connections;
122 } t_outlet;
123 
125 typedef t_class *t_pd;
126 
132 typedef struct t_gobj
133 {
135  struct t_gobj *g_next;
136 } t_gobj;
137 
143 typedef struct t_object
144 {
148  t_inlet *te_inlet;
149  short te_xpix;
150  short te_ypix;
151  short te_width;
152  unsigned int te_type:2;
153 } t_object;
154 
160 typedef struct t_clock
161 {
162  double c_settime;
163  void *c_owner;
164  t_clockmethod c_fn;
165  struct t_clock *c_next;
166  t_float c_unit;
167 } t_clock;
168 
183 
191 t_symbol *gensym(const char *s);
192 
201 t_clock *clock_new(void *owner, method fn);
202 
208 void clock_free(t_clock *x);
209 
216 void clock_delay(t_clock *x, double delaytime);
217 
226 t_outlet *outlet_new(t_object *owner, t_symbol *s);
227 
233 void outlet_bang(t_outlet *x);
234 
240 void pd_bang(t_pd *x);
241 
242 
244 #endif
struct t_gobj * g_next
Definition: enative.h:135
struct t_symbol * s_next
Definition: enative.h:50
Definition: enative.h:88
struct _outlet * o_next
Definition: enative.h:119
t_atomtype a_type
Definition: enative.h:107
void clock_delay(t_clock *x, double delaytime)
defer the excecution of the t_clock's method.
t_clockmethod c_fn
Definition: enative.h:164
t_symbol * gensym(const char *s)
Retrieves the t_symbol that match with the string.
t_float c_unit
Definition: enative.h:166
t_binbuf * te_binbuf
Definition: enative.h:146
t_clock * clock_new(void *owner, method fn)
Allocates a new t_clock.
void outlet_bang(t_outlet *x)
Send a bang through an outlet.
struct _binbuf * w_binbuf
Definition: enative.h:75
void clock_free(t_clock *x)
Frees a t_clock.
double c_settime
Definition: enative.h:162
union word a_w
Definition: enative.h:108
t_inlet * te_inlet
Definition: enative.h:148
t_outlet * outlet_new(t_object *owner, t_symbol *s)
Allocates and initializes a new t_outlet for an object.
t_array * w_array
Definition: enative.h:74
int b_n
Definition: enative.h:60
t_atomtype
The flags that discribes the type of an t_atom.
Definition: enative.h:84
EXTERN t_symbol s_symbol
The pre-defined symbol t_symbol.
Definition: enative.h:174
unsigned int te_type
Definition: enative.h:152
t_gobj te_g
Definition: enative.h:145
The t_atom struture.
Definition: enative.h:105
The t_binbuf struture.
Definition: enative.h:58
The t_clock struture.
Definition: enative.h:160
void(* t_method)(void *x,...)
The standart method aka method.
Definition: enative.h:28
The t_symbol struture.
Definition: enative.h:46
The t_word struture.
Definition: enative.h:69
The graphical t_object struture.
Definition: enative.h:132
The t_object struture.
Definition: enative.h:143
The t_outlet struture.
Definition: enative.h:116
short te_xpix
Definition: enative.h:149
short te_width
Definition: enative.h:151
EXTERN t_symbol s_float
The pre-defined float t_symbol.
Definition: enative.h:172
t_outconnect * o_connections
Definition: enative.h:120
Definition: enative.h:96
t_outlet * te_outlet
Definition: enative.h:147
void * c_owner
Definition: enative.h:163
t_object * o_owner
Definition: enative.h:118
t_class * t_pd
pure datum: nothing but a class pointer
Definition: enative.h:125
EXTERN t_symbol s_list
The pre-defined list t_symbol.
Definition: enative.h:178
EXTERN t_symbol s_signal
The pre-defined signal t_symbol.
Definition: enative.h:182
t_pd g_pd
Definition: enative.h:134
Definition: enative.h:86
short te_ypix
Definition: enative.h:150
char * s_name
Definition: enative.h:48
Definition: enative.h:97
t_symbol * o_sym
Definition: enative.h:121
EXTERN t_symbol s_pointer
The pre-defined pointer t_symbol.
Definition: enative.h:170
t_atom * b_vec
Definition: enative.h:61
t_symbol * w_symbol
Definition: enative.h:72
t_float w_float
Definition: enative.h:71
void pd_bang(t_pd *x)
Send a bang to t_pd internal object.
Definition: enative.h:87
struct t_clock * c_next
Definition: enative.h:165
EXTERN t_symbol s_anything
The pre-defined anything t_symbol.
Definition: enative.h:180
struct t_class ** s_thing
Definition: enative.h:49
EXTERN t_symbol s_bang
The pre-defined bang t_symbol.
Definition: enative.h:176