Jamoma API  0.6.0.a19
PureData/source/j.model/j.model.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup implementationPdExternals
4  *
5  * @brief j.model / j.view - The main control center of Jamoma model and view patcher
6  *
7  * @details
8  *
9  * @authors Tim Place, Théo de la Hogue, Trond Lossius
10  *
11  * @copyright Copyright © 2010 by Tim Place and Théo de la Hogue @n
12  * This code is licensed under the terms of the "New BSD License" @n
13  * http://creativecommons.org/licenses/BSD/
14  */
15 
16 
18 #include "TTModelInfo.h"
19 
20 /** Data structure for storing extra data.
21  @ingroup typedefs
22  */
23 typedef struct extra {
24  TTObject *modelInfo;
25  TTAddress containerAddress; ///< Store the address of the container (see in model_subscribe and model_free).
26  TTAddress argAddress; ///< Store the address from the argument (see in model_upper_view_model_address).
27 
28  TTString *text; ///< The text of the editor to read after edclose.
29  t_object *textEditor; ///< The text editor window.
30 
31  TTObject *presetManager; ///< The preset manager object.
32  TTSymbol attr_presets;
33  TTPtr filewatcher; ///< A preset filewatcher.
34  TTObject *toEdit; ///< The object to edit (a preset or all the preset list).
35  TTSymbol presetName; ///< The name of the edited preset.
36 
37  TTHashPtr attr_amenities;
38  TTBoolean all_amenities;
39  TTBoolean no_amenities;
40 } t_extra;
41 #define EXTRA ((t_extra*)x->extra)
42 
43 #define data_out 0
44 #define dump_out 1
45 
46 
47 /** Set up what methods (Max messages) that the wrapped class is to respond to.
48  @param c Pointer to the wrapped class.
49  */
50 void WrapTTContainerClass(WrappedClassPtr c);
51 
52 
53 /** Constructor: Initiate the wrapped object instance.
54  @param self Pointer to the object.
55  @param argc The number of arguments to the new object instance
56  @param argv Pointer to the array of atoms containing the arguments to the object instance.
57  */
58 void WrappedContainerClass_new(TTPtr self, long argc, t_atom *argv);
59 
60 
61 /** Deconstructor: Destroy the object and free memory assigned to it.
62  @param self Pointer to the object.
63  */
65 
66 
67 /**
68  @param self Pointer to the object.
69  @param msg The message sent to the object.
70  @param argc The number of arguments of the message.
71  @param argv The arguments of the message as an array of atoms.
72  */
73 void WrappedContainerClass_anything(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
74 
75 
76 /** Display assist messages for inlets and outlets in Max.
77  @param self Pointer to the object.
78  @param b This does not seem to be used.
79  @param msg "1" if we are to display assist message for an inlet, else we are to display assist message for an outlet.
80  @param arg The number of the inlet or outlet that we are to display assist message for. 0 is the leftmost.
81  @param dst Pointer to the destination used for displaying the assist message.
82  */
83 void model_assist(TTPtr self, void *b, long msg, long arg, char *dst);
84 
85 
86 /**
87  @param self
88  @param patcherInfo
89  */
90 void model_share_patcher_info(TTPtr self, TTValuePtr patcherInfo);
91 
92 
93 /**
94  @param self
95  @param patcherNode
96  */
97 void model_share_patcher_node(TTPtr self, TTNodePtr *patcherNode);
98 
99 
100 /**
101  @param self
102  @param msg
103  @param argc
104  @param argv
105  */
106 void model_return_address(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
107 
108 
109 
110 /**
111  @param self
112  @param msg
113  @param argc
114  @param argv
115  */
116 void model_return_value(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
117 
118 
119 /**
120  @param self
121  */
122 void model_subscribe(TTPtr self);
123 
124 
125 /**
126  @param self
127  @param msg
128  @param argc
129  @param argv
130  */
131 void model_subscribe_view(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
132 
133 
134 /**
135  @param self
136  @param msg
137  @param argc
138  @param argv
139  */
140 void model_return_upper_view_model_address(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
141 
142 
143 /**
144  @param self
145  */
146 void model_init(TTPtr self);
147 
148 
149 /**
150  @param self
151  @param msg
152  @param argc
153  @param argv
154  */
155 void model_address(TTPtr self, t_symbol *msg, long argc, t_atom *argv); // only in view patch
156 
157 
158 /**
159  @param self
160  @param msg
161  @param argc
162  @param argv
163  */
164 void model_reference_write(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
165 
166 
167 /**
168  @param self
169  @param msg
170  @param argc
171  @param argv
172  */
173 void model_reference_dowrite(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
174 
175 
176 /**
177  @param self
178  */
179 void model_preset_amenities(TTPtr self);
180 
181 
182 /**
183  @param self
184  @param msg
185  @param argc
186  @param argv
187  */
188 void model_preset_return_names(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
189 
190 
191 /**
192  @param self
193  @param filename
194  @param path
195  */
196 void model_preset_filechanged(TTPtr self, char *filename, short path);
197 
198 
199 /**
200  @param self
201  @param msg
202  @param argc
203  @param argv
204  */
205 void model_preset_read(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
206 
207 
208 /**
209  @param self
210  @param msg
211  @param argc
212  @param argv
213  */
214 void model_preset_doread(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
215 
216 
217 /**
218  @param self
219  */
220 void model_preset_read_again(TTPtr self);
221 
222 
223 /**
224  @param self
225  */
227 
228 
229 /**
230  @param self
231  @param msg
232  @param argc
233  @param argv
234  */
235 void model_preset_write(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
236 
237 
238 /**
239  @param self
240  @param msg
241  @param argc
242  @param argv
243  */
244 void model_preset_dowrite(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
245 
246 
247 /**
248  @param self
249  */
251 
252 
253 /**
254  @param self
255  */
257 
258 
259 /**
260  @param self
261  */
262 void model_preset_default(TTPtr self);
263 
264 
265 /**
266  @param self
267  @param msg
268  @param argc
269  @param argv
270  */
271 void model_preset_dorecall(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
272 
273 
274 /**
275  @param self
276  @param msg
277  @param argc
278  @param argv
279  */
280 void model_preset_edit(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
281 
282 
283 /**
284  @param self
285  @param text
286  @param size
287  */
288 void model_preset_edclose(TTPtr self, char **text, long size);
289 
290 
291 /**
292  @param self
293  */
294 void model_preset_doedit(TTPtr self);
295 
296 
297 /**
298  @param self
299  @param attr
300  @param ac
301  @param av
302  */
303 t_max_err model_preset_get_presets(TTPtr self, TTPtr attr, long *ac, t_atom **av);
304 
305 
306 /**
307  @param self
308  @param attr
309  @param ac
310  @param av
311  */
312 t_max_err model_preset_set_presets(TTPtr self, TTPtr attr, long ac, t_atom *av);
313 
314 
315 /**
316  @param self
317  @param attr
318  @param ac
319  @param av
320  */
321 t_max_err model_get_amenities(TTPtr self, TTPtr attr, long *ac, t_atom **av);
322 
323 
324 /**
325  @param self
326  @param attr
327  @param ac
328  @param av
329  */
330 t_max_err model_set_amenities(TTPtr self, TTPtr attr, long ac, t_atom *av);
331 
332 
333 /**
334  @param self
335  @param name
336  */
338 
339 
340 /**
341  @param self
342  @param attr
343  @param argc
344  @param argv
345  */
346 void model_signal_amenities(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
347 
348 
349 /**
350  @param self
351  @param attr
352  @param argc
353  @param argv
354  */
355 void model_signal_return_data_active(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
356 
357 
358 /**
359  @param self
360  @param attr
361  @param argc
362  @param argv
363  */
364 void model_signal_return_data_bypass(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
365 
366 
367 /**
368  @param self
369  @param attr
370  @param argc
371  @param argv
372  */
373 void model_signal_return_audio_mute(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
374 
375 
376 /**
377  @param self
378  @param attr
379  @param argc
380  @param argv
381  */
382 void model_signal_return_audio_bypass(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
383 
384 
385 /**
386  @param self
387  @param attr
388  @param argc
389  @param argv
390  */
391 void model_signal_return_audio_mix(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
392 
393 
394 /**
395  @param self
396  @param attr
397  @param argc
398  @param argv
399  */
400 void model_signal_return_audio_gain(TTPtr self, t_symbol *msg, long argc, t_atom *argv);
401 
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
Definition: TTBase.h:167
void model_share_patcher_node(TTPtr self, TTNodePtr *patcherNode)
void model_preset_doread_again(TTPtr self)
void model_signal_return_audio_mute(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
We build a directory of TTNodes, and you can request a pointer for any TTNode, or add an observer to ...
Definition: TTNode.h:59
void model_preset_dorecall(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
void model_preset_filechanged(TTPtr self, char *filename, short path)
void model_preset_read(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
void model_return_upper_view_model_address(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
void model_preset_read_again(TTPtr self)
The TTAddress class is used to represent a string and efficiently pass and compare that string...
Definition: TTAddress.h:29
Create and use Jamoma object instances.
Definition: TTObject.h:29
void model_reference_dowrite(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
Data structure for storing extra data.
void model_preset_doedit(TTPtr self)
void WrappedContainerClass_free(TTPtr self)
Deconstructor: Destroy the object and free memory assigned to it.
void model_preset_doread(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
Maintain a collection of TTValue objects indexed by TTSymbol pointers.
Definition: TTHash.h:36
A base class for Jamoma models.
void model_preset_dowrite_again(TTPtr self)
void * TTPtr
A generic pointer.
Definition: TTBase.h:248
void model_preset_write_again(TTPtr self)
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
void model_signal_return_audio_gain(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
t_max_err model_preset_get_presets(TTPtr self, TTPtr attr, long *ac, t_atom **av)
void model_preset_return_names(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
void model_return_value(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
t_max_err model_preset_set_presets(TTPtr self, TTPtr attr, long ac, t_atom *av)
t_max_err model_get_amenities(TTPtr self, TTPtr attr, long *ac, t_atom **av)
void model_preset_dowrite(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
void model_signal_return_data_active(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
t_max_err model_set_amenities(TTPtr self, TTPtr attr, long ac, t_atom *av)
void model_preset_default(TTPtr self)
Wraps Jamoma Core classes as objects for PureData.
void model_preset_edclose(TTPtr self, char **text, long size)
void model_preset_amenities(TTPtr self)
void model_signal_return_audio_bypass(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
void WrapTTContainerClass(WrappedClassPtr c)
Set up what methods (Max messages) that the wrapped class is to respond to.
void model_share_patcher_info(TTPtr self, TTValuePtr patcherInfo)
void model_signal_return_data_bypass(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
void model_subscribe_view(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
TTBoolean model_test_amenities(TTPtr self, TTSymbol name)
void model_subscribe(TTPtr self)
void WrappedContainerClass_new(TTPtr self, long argc, t_atom *argv)
Constructor: Initiate the wrapped object instance.
void model_reference_write(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
The TTString class is used to represent a string.
Definition: TTString.h:34
void model_assist(TTPtr self, void *b, long msg, long arg, char *dst)
Display assist messages for inlets and outlets in Max.
void model_signal_return_audio_mix(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
void model_signal_amenities(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
void model_preset_write(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
void model_return_address(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34
void model_address(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
void model_preset_edit(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
void model_init(TTPtr self)
void WrappedContainerClass_anything(TTPtr self, t_symbol *msg, long argc, t_atom *argv)