Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 347 lines (261 sloc) 14.862 kb
ea36acb @mhroth First commit of ZenGarden.h/cpp. This is the ZenGarden header which shou...
authored
1 /*
5ce45ca @mhroth Allow new messages to be created with a string in ZenGarden.h
authored
2 * Copyright 2010,2011,2012 Reality Jockey, Ltd.
ea36acb @mhroth First commit of ZenGarden.h/cpp. This is the ZenGarden header which shou...
authored
3 * info@rjdj.me
4 * http://rjdj.me/
5 *
6 * This file is part of ZenGarden.
7 *
8 * ZenGarden is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * ZenGarden is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with ZenGarden. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23 #ifndef _ZENGARDEN_H_
24 #define _ZENGARDEN_H_
25
5e4823e @mhroth Update the callback architecture for PdGraph. Expose this interface also...
authored
26 #include "ZGCallbackFunction.h"
27
ea36acb @mhroth First commit of ZenGarden.h/cpp. This is the ZenGarden header which shou...
authored
28 /**
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
29 * This header file defines the C interface between ZenGarden and the outside world. Include this header
ea36acb @mhroth First commit of ZenGarden.h/cpp. This is the ZenGarden header which shou...
authored
30 * along with the <code>libzengarden</code> library in your project in order to integrate it.
31 */
32 #ifdef __cplusplus
d94e9cd @mhroth Massive refactor to use concept of a global context. Unfortunately there...
authored
33 class PdContext;
ea36acb @mhroth First commit of ZenGarden.h/cpp. This is the ZenGarden header which shou...
authored
34 class PdGraph;
d94e9cd @mhroth Massive refactor to use concept of a global context. Unfortunately there...
authored
35 class MessageObject;
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
36 class PdMessage;
d94e9cd @mhroth Massive refactor to use concept of a global context. Unfortunately there...
authored
37 typedef PdContext ZGContext;
ea36acb @mhroth First commit of ZenGarden.h/cpp. This is the ZenGarden header which shou...
authored
38 typedef PdGraph ZGGraph;
d94e9cd @mhroth Massive refactor to use concept of a global context. Unfortunately there...
authored
39 typedef MessageObject ZGObject;
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
40 typedef PdMessage ZGMessage;
ea36acb @mhroth First commit of ZenGarden.h/cpp. This is the ZenGarden header which shou...
authored
41 extern "C" {
42 #else
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
43 typedef void ZGGraph;
44 typedef void ZGContext;
45 typedef void ZGObject;
46 typedef void ZGMessage;
ea36acb @mhroth First commit of ZenGarden.h/cpp. This is the ZenGarden header which shou...
authored
47 #endif
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
48
7f71ffa @mhroth Add ability to get connection info from objects in ZenGarden.h.
authored
49 typedef struct ZGConnectionPair {
50 ZGObject *object;
51 unsigned int letIndex;
52 } ZGConnectionPair;
ea36acb @mhroth First commit of ZenGarden.h/cpp. This is the ZenGarden header which shou...
authored
53
59777a9 @mhroth Remove need for external programs to include ConnectionType.h when inclu...
authored
54 /** Enumerates the types of elements of which messages are composed. */
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
55 typedef enum ZGMessageElementType {
56 ZG_MESSAGE_ELEMENT_FLOAT,
57 ZG_MESSAGE_ELEMENT_SYMBOL,
58 ZG_MESSAGE_ELEMENT_BANG
59 } ZGMessageElementType;
60
34045e7 @mhroth Implement external receiver registration.
authored
61 /**
62 * A pointer to this structure is supplied in the callback function with ZG_RECEIVER_MESSAGE.
59777a9 @mhroth Remove need for external programs to include ConnectionType.h when inclu...
authored
63 * The structure will not persistent after the function returns and the pointer will become invalid.
34045e7 @mhroth Implement external receiver registration.
authored
64 */
65 typedef struct ZGReceiverMessagePair {
66 const char *receiverName;
67 ZGMessage *message;
68 } ZGReceiverMessagePair;
69
59777a9 @mhroth Remove need for external programs to include ConnectionType.h when inclu...
authored
70 /** Enumerates the kinds of connections in ZenGarden; Message and DSP */
71 typedef enum ZGConnectionType {
72 ZG_CONNECTION_MESSAGE,
73 ZG_CONNECTION_DSP
74 } ZGConnectionType;
75
3388398 Allow objects to be created and added to graphs, and add connections bet...
Martin Roth authored
76
f8100bb @mhroth Update ZenGarden API with ability to get graph and node lists from conte...
authored
77 #pragma mark - Context
3388398 Allow objects to be created and added to graphs, and add connections bet...
Martin Roth authored
78
d94e9cd @mhroth Massive refactor to use concept of a global context. Unfortunately there...
authored
79 /** Create a new context to which graphs can be added. */
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
80 ZGContext *zg_context_new(int numInputChannels, int numOutputChannels, int blockSize, float sampleRate,
7329847 @mhroth Add static factory method to all objects in order to create an object in...
authored
81 void *(*callbackFunction)(ZGCallbackFunction function, void *userData, void *ptr), void *userData);
d94e9cd @mhroth Massive refactor to use concept of a global context. Unfortunately there...
authored
82
83 /** Create a new empty graph in the given context. Ideal for building graphs on the fly. */
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
84 ZGGraph *zg_context_new_empty_graph(ZGContext *context);
d94e9cd @mhroth Massive refactor to use concept of a global context. Unfortunately there...
authored
85
255afe4 @mhroth Add stub to ZenGarden.h for creating a graph from a string.
authored
86 /** Create a new graph from a Pd file. */
87 ZGGraph *zg_context_new_graph_from_file(ZGContext *context, const char *directory, const char *filename);
88
89 /** Create a new graph based on a string representation of the netlist. */
90 ZGGraph *zg_context_new_graph_from_string(ZGContext *context, const char *netlist);
d94e9cd @mhroth Massive refactor to use concept of a global context. Unfortunately there...
authored
91
92 /** Remove the graph from the context. */
188075f @mhroth Remove zg_remove_graph from ZenGarden.h simply because it hasn't actuall...
authored
93 //void zg_remove_graph(ZGContext *context, ZGGraph *graph);
d94e9cd @mhroth Massive refactor to use concept of a global context. Unfortunately there...
authored
94
95 /**
96 * Delete the given context. All attached graphs are also deleted. Unattached graphs are not
97 * automatically deleted, but should be by the user. They are thereafter useless.
98 */
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
99 void zg_context_delete(ZGContext *context);
ea36acb @mhroth First commit of ZenGarden.h/cpp. This is the ZenGarden header which shou...
authored
100
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
101 /** Returns the userinfo pointer used with the callback function. */
102 void *zg_context_get_userinfo(ZGContext *context);
f8100bb @mhroth Update ZenGarden API with ability to get graph and node lists from conte...
authored
103
104 /**
105 * Returns all root graphs attached to this context. The returned array, with length n, must
106 * be freed by the caller.
107 */
108 ZGGraph *zg_context_get_graphs(ZGContext *context, unsigned int *n);
7c33e93 @mhroth Refactor to take const char * argument instead of char *. This is safer.
authored
109
6a491db @mhroth Add external object un/registration to ZenGarden.h
authored
110 /**
111 * Register an external such that the context can instantiate instances of it. If an object
112 * with the same label already exists, then the factory method is replaced with the new one.
113 */
114 void zg_context_register_external_object(ZGContext *context, const char *objectLabel,
115 ZGObject *(*factory)(ZGMessage *message, ZGGraph *graph));
116
117 /** Unregister an external such that the context will be unaware of it. */
118 void zg_context_unregister_external_object(ZGContext *context, const char *objectLabel);
119
7c33e93 @mhroth Refactor to take const char * argument instead of char *. This is safer.
authored
120
cc8e606 @Kyew Added functions to register abstraction from memory
Kyew authored
121 #pragma mark - Abstractions from Context
813cf54 @mhroth Edit PdAbstractionDatabase files for syntax
authored
122
cc8e606 @Kyew Added functions to register abstraction from memory
Kyew authored
123 /** Register an abstraction from memory. */
d98804d @Kyew cleared and reorganized some code
Kyew authored
124 void zg_context_register_memorymapped_abstraction(ZGContext *context, const char *objectLabel,
813cf54 @mhroth Edit PdAbstractionDatabase files for syntax
authored
125 const char *abstraction);
cc8e606 @Kyew Added functions to register abstraction from memory
Kyew authored
126
127 /** Unregister an abstraction. */
d98804d @Kyew cleared and reorganized some code
Kyew authored
128 void zg_context_unregister_memorymapped_abstraction(ZGContext *context, const char *objectLabel);
cc8e606 @Kyew Added functions to register abstraction from memory
Kyew authored
129
7c33e93 @mhroth Refactor to take const char * argument instead of char *. This is safer.
authored
130 #pragma mark - Objects from Context
131
132 /** Returns the global table object with the given name. NULL if the table does not exist. */
133 ZGObject *zg_context_get_table_for_name(ZGObject *table, const char *name);
20b7f81 @mhroth Expanded support for messages in ZenGarden.h
authored
134
c237fb2 @mhroth Remove zg_graph_new_object and replace it with zg_graph_add_new_object. ...
authored
135
20b7f81 @mhroth Expanded support for messages in ZenGarden.h
authored
136 #pragma mark - Graph
137
f8100bb @mhroth Update ZenGarden API with ability to get graph and node lists from conte...
authored
138 /** Deletes the given graph. If attached, the graph is automatically removed from its context. */
139 void zg_graph_delete(ZGGraph *graph);
140
141 /** Returns the $0 argument to a graph, allowing graph-specific receivers to be addressed. */
142 unsigned int zg_graph_get_dollar_zero(ZGGraph *graph);
143
20b7f81 @mhroth Expanded support for messages in ZenGarden.h
authored
144 /** Attaches a graph to its context */
145 void zg_graph_attach(ZGGraph *graph);
146
def8c95 @mhroth Implement zg_graph_get_objects.
authored
147 /** Unattaches a graph to its context */
20b7f81 @mhroth Expanded support for messages in ZenGarden.h
authored
148 void zg_graph_unattach(ZGGraph *graph);
149
f8100bb @mhroth Update ZenGarden API with ability to get graph and node lists from conte...
authored
150 /** Returns all objects in this graph. The returned array, with length n, must be freed by the caller. */
def8c95 @mhroth Implement zg_graph_get_objects.
authored
151 ZGObject **zg_graph_get_objects(ZGGraph *graph, unsigned int *n);
f8100bb @mhroth Update ZenGarden API with ability to get graph and node lists from conte...
authored
152
20b7f81 @mhroth Expanded support for messages in ZenGarden.h
authored
153
a059d26 Expose object ConnectionType information in ZenGarden API.
Martin Roth authored
154 #pragma mark - Manage Connections
3388398 Allow objects to be created and added to graphs, and add connections bet...
Martin Roth authored
155
156 /**
157 * Add a connection between two objects, both of which are in the given graph. The new connection
158 * may cause the object graph to be reordered and cause audio dropouts. If the arguments do
159 * not define a valid connection, then this function does nothing.
160 */
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
161 void zg_graph_add_connection(ZGGraph *graph, ZGObject *fromObject, int outletIndex, ZGObject *toObject, int inletIndex);
3388398 Allow objects to be created and added to graphs, and add connections bet...
Martin Roth authored
162
163 /**
164 * Remove a connection between two objects, both of which are in the given graph. If the arguments
165 * do not define a valid connection, then this function does nothing.
166 */
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
167 void zg_graph_remove_connection(ZGGraph *graph, ZGObject *fromObject, int outletIndex, ZGObject *toObject, int inletIndex);
3388398 Allow objects to be created and added to graphs, and add connections bet...
Martin Roth authored
168
59777a9 @mhroth Remove need for external programs to include ConnectionType.h when inclu...
authored
169 /** Returns the connection type of the outlet of the given object. */
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
170 ZGConnectionType zg_object_get_connection_type(ZGObject *object, unsigned int outletIndex);
a059d26 Expose object ConnectionType information in ZenGarden API.
Martin Roth authored
171
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
172 unsigned int zg_object_get_num_inlets(ZGObject *object);
3edcdec Allow object instantiation with a single string, instead of having to br...
Martin Roth authored
173
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
174 unsigned int zg_object_get_num_outlets(ZGObject *object);
3edcdec Allow object instantiation with a single string, instead of having to br...
Martin Roth authored
175
7f71ffa @mhroth Add ability to get connection info from objects in ZenGarden.h.
authored
176
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
177 #pragma mark - Context Process
d94e9cd @mhroth Massive refactor to use concept of a global context. Unfortunately there...
authored
178
b35e884 @mhroth Add zg_context_process_s, making it easy to process interleaved short bu...
authored
179 /** Process the given context. Audio buffers are channel-uninterleaved with float (32-bit) samples. */
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
180 void zg_context_process(ZGContext *context, float *inputBuffers, float *outputBuffers);
ea36acb @mhroth First commit of ZenGarden.h/cpp. This is the ZenGarden header which shou...
authored
181
b35e884 @mhroth Add zg_context_process_s, making it easy to process interleaved short bu...
authored
182 /** Process the given context. Audio buffers are channel-interleaved with signed short (16-bit) samples. */
183 void zg_context_process_s(ZGContext *context, short *inputBuffers, short *outputBuffers);
184
3388398 Allow objects to be created and added to graphs, and add connections bet...
Martin Roth authored
185
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
186 #pragma mark - Context Send Message
3388398 Allow objects to be created and added to graphs, and add connections bet...
Martin Roth authored
187
0c83b96 @mhroth Merge branch 'master' of github.com:mhroth/ZenGarden
authored
188 /** Send a message to the named receiver. */
189 void zg_context_send_message(ZGContext *context, const char *receiverName, ZGMessage *message);
190
3fa0b34 @mhroth Allow a message to be sent in a context, as described by a string.
authored
191 /** Send a message described by the <code>initString</code> to the named receiver at the given timestamp. */
192 void zg_context_send_message_from_string(ZGContext *context, const char *receiverName,
193 double timestamp, const char *initString);
194
36c101a @mhroth Add zg_send_message() to ZenGarden.h. Allows a message of any format to ...
authored
195 /**
196 * Send a message to the named receiver with the given format at the beginning of the next audio block.
2ded8bc @mhroth Add MessageNotein. This is the beginnings of support for Pd's midi frame...
authored
197 * If no receiver exists with the given name, then this funtion does nothing.
36c101a @mhroth Add zg_send_message() to ZenGarden.h. Allows a message of any format to ...
authored
198 * E.g., zg_send_message(graph, "#accelerate", "fff", 0.0f, 0.0f, 0.0f);
199 * sends a message containing three floats, each with value 0.0f, to all receivers named "#accelerate".
200 * Messages may also be formatted with "s" and "b" for symbols and bangs, respectively.
201 * E.g., zg_send_message(graph, "test", "s", "hello");
202 * E.g., zg_send_message(graph, "test", "b");
203 */
3e851a7 @mhroth Create independent PdFileParser, pull functionality out of PdContext.
authored
204 void zg_context_send_messageV(ZGContext *context, const char *receiverName, double timestamp,
205 const char *messageFormat, ...);
b622115 @mhroth Add zg_send_message_at_blockindex to ZenGarden.h. Allow the scheduling o...
authored
206
207 /**
208 * Send a message to the named receiver with the given format at the given block index. If the
209 * block index is negative or greater than the block size (given when instantiating the graph)
210 * the the message will be sent at the very beginning of the next block. A fractional block index
211 * may be given, and the message will be evaluated between rendered samples. If the given block
212 * index falls outside of the block size (either positive or negative), then the message will be
2ded8bc @mhroth Add MessageNotein. This is the beginnings of support for Pd's midi frame...
authored
213 * delivered at the beginning of the block. If no receiver exists with the given name, then this
214 * funtion does nothing.
b622115 @mhroth Add zg_send_message_at_blockindex to ZenGarden.h. Allow the scheduling o...
authored
215 * This function is equivalent to e.g., zg_send_message(graph, "#accelerate", 0.0, "fff", 0.0f, 0.0f, 0.0f)
216 * E.g., zg_send_message_at_blockindex(graph, "#accelerate", 56.3, "fff", 0.0f, 0.0f, 0.0f);
217 * sends a message containing three floats, each with value 0.0f, to all receivers named "#accelerate"
218 * between samples 56th and 57th samples (counting from zero) of the block.
219 */
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
220 void zg_context_send_message_at_blockindex(ZGContext *context, const char *receiverName,
221 double blockIndex, const char *messageFormat, ...);
36c101a @mhroth Add zg_send_message() to ZenGarden.h. Allows a message of any format to ...
authored
222
2ded8bc @mhroth Add MessageNotein. This is the beginnings of support for Pd's midi frame...
authored
223 /**
224 * Send a midi note message on the given channel to occur at the given block index. The
225 * <code>blockIndex</code> parameter behaves in the same way as in <code>zg_send_message_at_blockindex()</code>.
226 * All messages are sent to <code>notein</code> objects, i.e. omni. Channels are zero-index and only
227 * 16 are supported. A note off message is generally interpreted as having velocity zero.
228 */
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
229 void zg_context_send_midinote(ZGContext *context, int channel, int noteNumber, int velocity, double blockIndex);
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
230
231
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
232 #pragma mark - Context Un/Register External Receivers
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
233
234 void zg_context_register_receiver(ZGContext *context, const char *receiverName);
235
236 void zg_context_unregister_receiver(ZGContext *context, const char *receiverName);
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
237
238
239 #pragma mark - Object
240
241 /**
c237fb2 @mhroth Remove zg_graph_new_object and replace it with zg_graph_add_new_object. ...
authored
242 * Create a new object with a string, e.g. "osc~ 440", "+", or "pack t t s, and add it to the graph.
243 * If the graph is currently attached then audio may be interrupted
244 * while the object is attached the and graph reconfigured (if necessary). If the graph is unattached
245 * then no audio interruption will take place, even if reconfiguration takes place. The canvasX
246 * and canvasY arguments specify the canvas location of the object. This is only relevant for
247 * input/~ and output/~ objects, otherwise 0 may be specified.
248 */
a49a6f4 @mhroth Return the created object in zg_graph_add_new_object.
authored
249 ZGObject *zg_graph_add_new_object(ZGGraph *graph, const char *objectString, float canvasX, float canvasY);
c237fb2 @mhroth Remove zg_graph_new_object and replace it with zg_graph_add_new_object. ...
authored
250
251 /**
252 * Removes the object from the graph and deletes it from memory. Any connections that this object
253 * may have had in the graph are also deleted. The reference to the object after this function
254 * completes is invalid.
255 */
256 void zg_object_remove(ZGObject *object);
257
258 /**
7c7a01b @mhroth Rename function for clarity in ZenGarden.h.
authored
259 * Returns an array of ZGConnectionPair structs indicating the objects and outlets from which
260 * the connections are comming. The result in n is the length of the array (i.e. the number of
261 * connections at the given inlet). The returned array is owned and must be freed by the caller.
262 */
263 ZGConnectionPair *zg_object_get_connections_at_inlet(ZGObject *object, unsigned int inletIndex, unsigned int *n);
264 ZGConnectionPair *zg_object_get_connections_at_outlet(ZGObject *object, unsigned int outletIndex, unsigned int *n);
265
266 /**
267 * Send a message directly to an object. The message will be evaluated at the beginning of the
268 * next block, before any other messages otherwise scheduled are evaluated. The timestamp of
269 * this message is ignored. If the message should be delivered at a specific time, use
270 * zg_context_send_message() and its variants in order to send the message to a named receiver.
271 */
272 void zg_object_send_message(ZGObject *object, unsigned int inletIndex, ZGMessage *message);
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
273
2f26a8e @mhroth Store canvas position in MessageObject and store them as floats.
authored
274 /**
275 * Returns the canvas position of the object. Position coordinates are represented as floats
276 * and are real valued, though Pd uses only non-negative values.
277 */
278 void zg_object_get_canvas_position(ZGObject *object, float *x, float *y);
279
280 /** Sets the canvas position of the object. Coordinates may be positive or negative. */
281 void zg_object_set_canvas_position(ZGObject *object, float x, float y);
282
cfba86a @mhroth nit
authored
283 /** Returns the object label, e.g. "osc~" or "+". */
284 const char *zg_object_get_label(ZGObject *object);
285
fa80ae6 @mhroth A basic implementation for zg_object_to_string.
authored
286 /**
287 * Returns a canonical string description of the object. The description reflects the state of the
288 * object when at the time of the request. The pointer must be freed by the caller.
289 * For example, "osc~ 440" or "trigger b b".
290 */
291 char *zg_object_to_string(ZGObject *object);
292
7c33e93 @mhroth Refactor to take const char * argument instead of char *. This is safer.
authored
293
294 #pragma mark - Table
295
296 /**
297 * Returns a direct pointer to the table's buffer with a given length. Note that if elements
298 * of the buffer are modified while the context is being processed, a race condition may occur
299 * between the timing of the write and the read by zg_context_process().
300 */
301 float *zg_table_get_buffer(ZGObject *table, unsigned int *n);
302
303 /**
304 * The table's buffer is resized and copied from the given buffer. This set operation is thread-safe
305 * especially with regards to zg_context_process().
306 */
307 void zg_table_set_buffer(ZGObject *table, float *buffer, unsigned int n);
308
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
309
310 #pragma mark - Message
311
ee06c73 @mhroth Enable Java test for external receiver registration. Make the test work.
authored
312 /** Returns a new message with the given timestamp and the number of elements. */
313 ZGMessage *zg_message_new(double timetamp, unsigned int numElemets);
20b7f81 @mhroth Expanded support for messages in ZenGarden.h
authored
314
5ce45ca @mhroth Allow new messages to be created with a string in ZenGarden.h
authored
315 /** Returns a new message based on the given string. */
316 ZGMessage *zg_message_new_from_string(double timetamp, const char *initMessage);
317
ee06c73 @mhroth Enable Java test for external receiver registration. Make the test work.
authored
318 /** The message is released from memory. */
20b7f81 @mhroth Expanded support for messages in ZenGarden.h
authored
319 void zg_message_delete(ZGMessage *message);
320
321 void zg_message_set_float(ZGMessage *message, unsigned int index, float f);
322
3e851a7 @mhroth Create independent PdFileParser, pull functionality out of PdContext.
authored
323 /** The symbol parameter is copied into the message. Any previous symbol is freed from memory. */
20b7f81 @mhroth Expanded support for messages in ZenGarden.h
authored
324 void zg_message_set_symbol(ZGMessage *message, unsigned int index, const char *s);
325
326 void zg_message_set_bang(ZGMessage *message, unsigned int index);
327
b14bdc7 @mhroth Additional comments and documentation in ZenGarden.h.
authored
328 unsigned int zg_message_get_num_elements(ZGMessage *message);
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
329
b14bdc7 @mhroth Additional comments and documentation in ZenGarden.h.
authored
330 double zg_message_get_timestamp(ZGMessage *message);
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
331
3e851a7 @mhroth Create independent PdFileParser, pull functionality out of PdContext.
authored
332 ZGMessageElementType zg_message_get_element_type(ZGMessage *message, unsigned int index);
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
333
3e851a7 @mhroth Create independent PdFileParser, pull functionality out of PdContext.
authored
334 float zg_message_get_float(ZGMessage *message, unsigned int index);
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
335
3e851a7 @mhroth Create independent PdFileParser, pull functionality out of PdContext.
authored
336 const char *zg_message_get_symbol(ZGMessage *message, unsigned int index);
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
337
4196bf7 @mhroth Add zg_message_to_string to ZenGarden.h
authored
338 /** Returns a string representation of the message. The string must be freed by the caller. */
339 char *zg_message_to_string(ZGMessage *message);
340
8176164 @mhroth Update ZenGarden.h to work with Java API.
authored
341
ea36acb @mhroth First commit of ZenGarden.h/cpp. This is the ZenGarden header which shou...
authored
342 #ifdef __cplusplus
343 }
344 #endif
345
346 #endif // _ZENGARDEN_H_
Something went wrong with that request. Please try again.