Vuo 2.4.4
Loading...
Searching...
No Matches
module.h
Go to the documentation of this file.
1
10#ifndef MODULE_H
11#define MODULE_H
12
13#include "VuoConfig.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#if !defined(VUO_STRINGIFY)
21 #define VUO_STRINGIFY(...) #__VA_ARGS__
22#endif
23
24#include "VuoHeap.h"
25
26#if !defined(_json_object_h_) && !defined(DOXYGEN)
27 struct json_object;
28 extern const char* json_object_to_json_string(struct json_object *obj);
29#endif
30
31
108#define VuoModuleMetadata(...) extern const char *moduleDetails; const char *moduleDetails = #__VA_ARGS__
109
115#ifndef DISPATCH_RETURNS_RETAINED_BLOCK
118 #define DISPATCH_RETURNS_RETAINED_BLOCK
119#endif
121#include <dispatch/dispatch.h>
122
126const char *VuoGetWorkingDirectory(void);
127
128const char *VuoGetFrameworkPath(void);
129const char *VuoGetRunnerFrameworkPath(void);
131
135pid_t VuoGetRunnerPid(void);
136
140void VuoStopComposition(void);
141
149
161void VuoDisableTermination(void);
162
166void VuoEnableTermination(void);
167
172
173bool VuoIsPro(void);
174
175bool VuoProcessorSupportsAVX2(void);
176
182static inline unsigned long VuoListIndexToCArrayIndex(long index, unsigned long listCount) __attribute__((const));
183static inline unsigned long VuoListIndexToCArrayIndex(long index, unsigned long listCount)
184{
185 if (index <= 0)
186 return 0;
187
188 if (index > listCount)
189 return listCount - 1;
190
191 return index - 1;
192}
193
198extern const int VuoGraphicsWindowDefaultWidth;
199
218#define VuoJson_getObjectValue(type, js, key, ...) \
219(^{ \
220 json_object *o; \
221 if (json_object_object_get_ex(js, key, &o)) \
222 return type ## _makeFromJson(o); \
223 else \
224 return (type)__VA_ARGS__; \
225}())
226
242#define VuoType_returnInequality(type, a, b) \
243 if (type ## _isLessThan(a, b)) return true; \
244 if (type ## _isLessThan(b, a)) return false;
245
246#ifdef __cplusplus
247}
248#endif
249
250#endif