OSSIA
Open Scenario System for Interactive Application
ossia-c.h
Go to the documentation of this file.
1 #ifndef OSSIA_H
2 #define OSSIA_H
3 #include <stddef.h>
4 
65 #if defined(_MSC_VER)
66 #if !defined(WIN32_LEAN_AND_MEAN)
67 #define WIN32_LEAN_AND_MEAN
68 #endif
69 #include <windows.h>
70 #undef BOOL
71 #undef INT
72 #undef FLOAT
73 #undef CHAR
74 #endif
75 
76 #include <ossia_export.h>
77 #if defined(__cplusplus)
78 extern "C" {
79 #endif
80 struct ossia_protocol;
81 struct ossia_device;
82 struct ossia_domain;
83 struct ossia_value;
84 struct ossia_logger;
85 
86 typedef struct ossia_protocol* ossia_protocol_t;
87 typedef struct ossia_device* ossia_device_t;
88 typedef struct ossia_domain* ossia_domain_t;
89 typedef struct ossia_value* ossia_value_t;
90 typedef struct ossia_logger* ossia_logger_t;
91 typedef void* ossia_node_t;
92 typedef void* ossia_parameter_t;
93 
94 typedef void (*ossia_node_callback_t)(void* ctx, ossia_node_t);
95 struct ossia_node_callback_index;
96 typedef struct ossia_node_callback_index* ossia_node_callback_idx_t;
97 
98 typedef void (*ossia_parameter_callback_t)(void* ctx, ossia_parameter_t);
99 struct ossia_parameter_callback_index;
100 typedef struct ossia_parameter_callback_index* ossia_parameter_callback_idx_t;
101 
102 typedef void (*ossia_value_callback_t)(void* ctx, ossia_value_t);
103 struct ossia_value_callback_index;
104 typedef struct ossia_value_callback_index* ossia_value_callback_idx_t;
105 
106 struct ossia_vec2f
107 {
108  float val[2];
109 };
110 struct ossia_vec3f
111 {
112  float val[3];
113 };
114 struct ossia_vec4f
115 {
116  float val[4];
117 };
118 
119 /****************/
120 /*** Protocol ***/
121 /****************/
122 
136 OSSIA_EXPORT
137 ossia_protocol_t ossia_protocol_multiplex_create();
138 
145 OSSIA_EXPORT
146 void ossia_protocol_multiplex_expose_to(ossia_protocol_t local, ossia_protocol_t other);
147 
157 OSSIA_EXPORT
158 ossia_protocol_t
159 ossia_protocol_osc_create(const char* ip, int remote_port, int local_port);
160 
171 OSSIA_EXPORT
172 ossia_protocol_t ossia_protocol_minuit_create(
173  const char* local_name, const char* ip, int remote_port, int local_port);
174 
183 OSSIA_EXPORT
184 ossia_protocol_t ossia_protocol_oscquery_server_create(int osc_port, int ws_port);
185 
193 OSSIA_EXPORT
194 ossia_protocol_t ossia_protocol_oscquery_mirror_create(const char* host);
195 
200 OSSIA_EXPORT
201 void ossia_protocol_free(ossia_protocol_t);
202 
205 /**************/
206 /*** Device ***/
207 /**************/
208 
224 OSSIA_EXPORT
225 ossia_device_t ossia_device_create(ossia_protocol_t protocol, const char* name);
226 
231 OSSIA_EXPORT
232 void ossia_device_free(ossia_device_t device);
233 
242 OSSIA_EXPORT
244 
252 OSSIA_EXPORT
253 int ossia_device_update_namespace(ossia_device_t device);
254 
264 OSSIA_EXPORT
265 ossia_node_t ossia_device_get_root_node(ossia_device_t device);
266 
275 OSSIA_EXPORT
276 const char* ossia_device_get_name(ossia_device_t device);
277 
289 OSSIA_EXPORT
290 ossia_node_callback_idx_t ossia_device_add_node_created_callback(
291  ossia_device_t device, ossia_node_callback_t callback, void* ctx);
292 
302 OSSIA_EXPORT
304  ossia_device_t device, ossia_node_callback_idx_t index);
305 
317 OSSIA_EXPORT
318 ossia_node_callback_idx_t ossia_device_add_node_removing_callback(
319  ossia_device_t device, ossia_node_callback_t callback, void* ctx);
329 OSSIA_EXPORT
331  ossia_device_t device, ossia_node_callback_idx_t index);
332 
344 OSSIA_EXPORT
345 ossia_parameter_callback_idx_t ossia_device_add_parameter_deleting_callback(
346  ossia_device_t device, ossia_parameter_callback_t callback, void* ctx);
356 OSSIA_EXPORT
358  ossia_device_t device, ossia_parameter_callback_idx_t index);
359 
362 /*****************/
363 /*** Parameter ***/
364 /*****************/
365 
375 typedef enum
376 {
377  FLOAT_T,
378  INT_T,
379  VEC2F_T,
380  VEC3F_T,
381  VEC4F_T,
382  IMPULSE_T,
383  BOOL_T,
384  STRING_T,
385  LIST_T,
386  CHAR_T
387 } ossia_type;
388 
392 typedef enum
393 {
394  BI,
395  GET,
396  SET
398 
402 typedef enum
403 {
404  FREE,
405  CLIP,
406  WRAP,
407  FOLD,
408  LOW,
409  HIGH
411 
416 OSSIA_EXPORT
417 ossia_node_t ossia_parameter_get_node(ossia_parameter_t param);
418 
423 OSSIA_EXPORT
424 void ossia_parameter_set_access_mode(ossia_parameter_t param, ossia_access_mode am);
429 OSSIA_EXPORT
430 ossia_access_mode ossia_parameter_get_access_mode(ossia_parameter_t param);
431 
436 OSSIA_EXPORT
437 void ossia_parameter_set_bounding_mode(ossia_parameter_t param, ossia_bounding_mode bm);
442 OSSIA_EXPORT
444 
449 OSSIA_EXPORT
450 void ossia_parameter_set_domain(ossia_parameter_t param, ossia_domain_t domain);
455 OSSIA_EXPORT
456 ossia_domain_t ossia_parameter_get_domain(ossia_parameter_t param);
457 
462 OSSIA_EXPORT
463 void ossia_parameter_set_unit(ossia_parameter_t param, const char* unit);
469 OSSIA_EXPORT
470 const char* ossia_parameter_get_unit(ossia_parameter_t param);
471 
476 OSSIA_EXPORT
477 void ossia_parameter_set_muted(ossia_parameter_t param, int muted);
482 OSSIA_EXPORT
483 int ossia_parameter_get_muted(ossia_parameter_t param);
484 
489 OSSIA_EXPORT
490 void ossia_parameter_set_disabled(ossia_parameter_t param, int disabled);
495 OSSIA_EXPORT
496 int ossia_parameter_get_disabled(ossia_parameter_t param);
497 
502 OSSIA_EXPORT
503 void ossia_parameter_set_critical(ossia_parameter_t param, int critical);
508 OSSIA_EXPORT
509 int ossia_parameter_get_critical(ossia_parameter_t param);
510 
517 OSSIA_EXPORT
519  ossia_parameter_t param, int repetition_filter);
525 OSSIA_EXPORT
526 int ossia_parameter_get_repetition_filter(ossia_parameter_t param);
527 
532 OSSIA_EXPORT
533 void ossia_parameter_set_value(ossia_parameter_t param, ossia_value_t value);
538 OSSIA_EXPORT
539 ossia_value_t ossia_parameter_get_value(ossia_parameter_t param);
540 
546 OSSIA_EXPORT
547 int ossia_parameter_to_int(ossia_parameter_t val);
553 OSSIA_EXPORT
554 float ossia_parameter_to_float(ossia_parameter_t val);
560 OSSIA_EXPORT
561 struct ossia_vec2f ossia_parameter_to_2f(ossia_parameter_t val);
567 OSSIA_EXPORT
568 struct ossia_vec3f ossia_parameter_to_3f(ossia_parameter_t val);
574 OSSIA_EXPORT
575 struct ossia_vec4f ossia_parameter_to_4f(ossia_parameter_t val);
581 OSSIA_EXPORT
582 int ossia_parameter_to_bool(ossia_parameter_t val);
583 
599 OSSIA_EXPORT
600 void ossia_parameter_to_byte_array(ossia_parameter_t val, char** str, size_t* sz);
609 OSSIA_EXPORT
610 const char* ossia_parameter_to_string(ossia_parameter_t val);
617 OSSIA_EXPORT
619  ossia_parameter_t val_in, ossia_value_t** out, size_t* size);
620 
628 OSSIA_EXPORT
629 void ossia_parameter_to_fn(ossia_parameter_t val_in, float** out, size_t* size);
630 
638 OSSIA_EXPORT
639 void ossia_parameter_to_in(ossia_parameter_t val_in, int** out, size_t* size);
640 
645 OSSIA_EXPORT
646 void ossia_parameter_push_value(ossia_parameter_t param, ossia_value_t value);
651 OSSIA_EXPORT
652 void ossia_parameter_push_impulse(ossia_parameter_t param);
657 OSSIA_EXPORT
658 void ossia_parameter_push_i(ossia_parameter_t param, int value);
665 OSSIA_EXPORT
666 void ossia_parameter_push_b(ossia_parameter_t param, int b);
671 OSSIA_EXPORT
672 void ossia_parameter_push_f(ossia_parameter_t param, float value);
677 OSSIA_EXPORT
678 void ossia_parameter_push_2f(ossia_parameter_t param, float v1, float v2);
683 OSSIA_EXPORT
684 void ossia_parameter_push_3f(ossia_parameter_t param, float v1, float v2, float v3);
689 OSSIA_EXPORT
691  ossia_parameter_t param, float v1, float v2, float v3, float v4);
696 OSSIA_EXPORT
697 void ossia_parameter_push_c(ossia_parameter_t param, char value);
702 OSSIA_EXPORT
703 void ossia_parameter_push_s(ossia_parameter_t param, const char* value);
704 
710 OSSIA_EXPORT
711 void ossia_parameter_push_in(ossia_parameter_t param, const int* value, size_t sz);
712 
718 OSSIA_EXPORT
719 void ossia_parameter_push_fn(ossia_parameter_t param, const float* value, size_t sz);
720 
726 OSSIA_EXPORT
727 void ossia_parameter_push_cn(ossia_parameter_t param, const char* value, size_t sz);
728 
734 OSSIA_EXPORT
736  ossia_parameter_t param, const ossia_value_t* value, size_t sz);
737 
744 OSSIA_EXPORT
745 ossia_value_t ossia_parameter_fetch_value(ossia_parameter_t param);
746 
751 OSSIA_EXPORT
752 void ossia_parameter_set_listening(ossia_parameter_t param, int listening);
753 
765 OSSIA_EXPORT
766 ossia_value_callback_idx_t ossia_parameter_add_callback(
767  ossia_parameter_t param, ossia_value_callback_t callback, void* ctx);
768 
779 OSSIA_EXPORT
781  ossia_parameter_t param, ossia_value_callback_t callback, void* ctx);
782 
791 OSSIA_EXPORT
793  ossia_parameter_t param, ossia_value_callback_idx_t index);
794 
799 OSSIA_EXPORT
800 void ossia_parameter_free_callback_idx(ossia_value_callback_idx_t);
801 
804 /************/
805 /*** Node ***/
806 /************/
807 
822 OSSIA_EXPORT ossia_node_t ossia_node_find(ossia_node_t root, const char* path);
823 
844 OSSIA_EXPORT void ossia_node_find_pattern(
845  ossia_node_t root, const char* pattern, ossia_node_t** data, size_t* size);
846 
865 OSSIA_EXPORT ossia_node_t ossia_node_create(ossia_node_t root, const char* path);
866 
887 OSSIA_EXPORT void ossia_node_create_pattern(
888  ossia_node_t root, const char* pattern, ossia_node_t** data, size_t* size);
889 
896 OSSIA_EXPORT void ossia_node_array_free(ossia_node_t*);
897 
907 OSSIA_EXPORT
908 ossia_node_t ossia_node_add_child(ossia_node_t node, const char* name);
909 
918 OSSIA_EXPORT
919 void ossia_node_remove_child(ossia_node_t node, ossia_node_t name);
920 
927 OSSIA_EXPORT
928 const char* ossia_node_get_name(ossia_node_t node);
929 
937 OSSIA_EXPORT
938 ossia_device_t ossia_node_get_device(ossia_node_t node);
939 
945 OSSIA_EXPORT
946 int ossia_node_child_size(ossia_node_t node);
947 
953 OSSIA_EXPORT
954 ossia_node_t ossia_node_get_child(ossia_node_t node, int child_n);
955 
961 OSSIA_EXPORT
962 ossia_node_t ossia_node_find_child(ossia_node_t node, const char* name);
963 
970 OSSIA_EXPORT
971 ossia_parameter_t ossia_node_create_parameter(ossia_node_t node, ossia_type type);
972 
979 OSSIA_EXPORT
980 ossia_parameter_t
981 ossia_create_parameter(ossia_node_t node, const char* name, const char* type);
982 
988 OSSIA_EXPORT
989 ossia_parameter_t ossia_node_get_parameter(ossia_node_t node);
990 
996 OSSIA_EXPORT
997 void ossia_node_remove_parameter(ossia_node_t node);
998 
1010 OSSIA_EXPORT
1011 ossia_node_callback_idx_t ossia_node_add_deleting_callback(
1012  ossia_node_t node, ossia_node_callback_t callback, void* ctx);
1022 OSSIA_EXPORT
1024  ossia_node_t node, ossia_node_callback_idx_t index);
1025 
1030 OSSIA_EXPORT
1031 void ossia_node_set_description(ossia_node_t node, const char* description);
1036 OSSIA_EXPORT
1037 const char* ossia_node_get_description(ossia_node_t node);
1038 
1043 OSSIA_EXPORT
1044 void ossia_node_set_extended_type(ossia_node_t node, const char* extended_type);
1049 OSSIA_EXPORT
1050 const char* ossia_node_get_extended_type(ossia_node_t node);
1051 
1056 OSSIA_EXPORT
1057 void ossia_node_set_tags(ossia_node_t node, const char** tags, size_t sz);
1062 OSSIA_EXPORT
1063 void ossia_node_get_tags(ossia_node_t node, char*** tags, size_t* sz);
1064 
1068 OSSIA_EXPORT
1069 void ossia_tags_free(char** tags, size_t sz);
1070 
1077 OSSIA_EXPORT
1078 void ossia_node_set_hidden(ossia_node_t node, int hidden);
1083 OSSIA_EXPORT
1084 int ossia_node_get_hidden(ossia_node_t node);
1085 
1090 OSSIA_EXPORT
1091 void ossia_node_set_refresh_rate(ossia_node_t node, int refresh_rate);
1096 OSSIA_EXPORT
1097 void ossia_node_unset_refresh_rate(ossia_node_t node);
1102 OSSIA_EXPORT
1103 int ossia_node_get_refresh_rate(ossia_node_t node, int* ok);
1104 
1109 OSSIA_EXPORT
1110 void ossia_node_set_priority(ossia_node_t node, float priority);
1115 OSSIA_EXPORT
1116 void ossia_node_unset_priority(ossia_node_t node);
1121 OSSIA_EXPORT
1122 float ossia_node_get_priority(ossia_node_t node, int* ok);
1123 
1128 OSSIA_EXPORT
1129 void ossia_node_set_value_step_size(ossia_node_t node, double value_step_size);
1134 OSSIA_EXPORT
1135 void ossia_node_unset_value_step_size(ossia_node_t node);
1140 OSSIA_EXPORT
1141 double ossia_node_get_value_step_size(ossia_node_t node, int* ok);
1142 
1147 OSSIA_EXPORT
1148 void ossia_node_set_instance_bounds(ossia_node_t node, int min, int max);
1153 OSSIA_EXPORT
1154 void ossia_node_unset_instance_bounds(ossia_node_t node);
1159 OSSIA_EXPORT
1160 void ossia_node_get_instance_bounds(ossia_node_t node, int* min, int* max, int* ok);
1161 
1166 OSSIA_EXPORT
1167 void ossia_node_set_default_value(ossia_node_t node, ossia_value_t default_value);
1172 OSSIA_EXPORT
1173 ossia_value_t ossia_node_get_default_value(ossia_node_t node);
1174 
1177 /**************/
1178 /*** Domain ***/
1179 /**************/
1180 
1193 OSSIA_EXPORT
1194 ossia_domain_t ossia_domain_create(void);
1195 
1202 OSSIA_EXPORT
1203 ossia_domain_t ossia_domain_make_min_max(ossia_value_t min, ossia_value_t max);
1204 
1210 OSSIA_EXPORT
1211 ossia_value_t ossia_domain_get_min(ossia_domain_t domain);
1217 OSSIA_EXPORT
1218 void ossia_domain_set_min(ossia_domain_t domain, ossia_value_t value);
1224 OSSIA_EXPORT
1225 ossia_value_t ossia_domain_get_max(ossia_domain_t domain);
1231 OSSIA_EXPORT
1232 void ossia_domain_set_max(ossia_domain_t domain, ossia_value_t value);
1233 
1240 OSSIA_EXPORT
1241 ossia_domain_t ossia_domain_make_string_set(const char** strings, size_t n);
1242 
1248 OSSIA_EXPORT
1249 ossia_domain_t ossia_domain_make_int_set(const int* values, size_t n);
1250 
1256 OSSIA_EXPORT
1257 ossia_domain_t ossia_domain_make_float_set(const float* values, size_t n);
1258 
1264 OSSIA_EXPORT
1265 ossia_domain_t ossia_domain_make_value_set(const ossia_value_t* values, size_t n);
1266 
1271 OSSIA_EXPORT
1272 void ossia_domain_get_values(ossia_domain_t domain, ossia_value_t** values, size_t* n);
1277 OSSIA_EXPORT
1279  ossia_domain_t domain, const ossia_value_t* values, size_t n);
1280 
1285 OSSIA_EXPORT
1286 void ossia_domain_free(ossia_domain_t domain);
1287 
1290 /*************/
1291 /*** Value ***/
1292 /*************/
1321 OSSIA_EXPORT
1322 ossia_value_t ossia_value_create_impulse();
1328 OSSIA_EXPORT
1329 ossia_value_t ossia_value_create_int(int value);
1335 OSSIA_EXPORT
1336 ossia_value_t ossia_value_create_float(float value);
1342 OSSIA_EXPORT
1343 ossia_value_t ossia_value_create_2f(float v1, float v2);
1349 OSSIA_EXPORT
1350 ossia_value_t ossia_value_create_3f(float v1, float v2, float v3);
1356 OSSIA_EXPORT
1357 ossia_value_t ossia_value_create_4f(float v1, float v2, float v3, float v4);
1363 OSSIA_EXPORT
1364 ossia_value_t ossia_value_create_bool(int value);
1370 OSSIA_EXPORT
1371 ossia_value_t ossia_value_create_char(char value);
1377 OSSIA_EXPORT
1378 ossia_value_t ossia_value_create_string(const char* value);
1384 OSSIA_EXPORT
1385 ossia_value_t ossia_value_create_byte_array(const char* value, size_t size);
1392 OSSIA_EXPORT
1393 ossia_value_t ossia_value_create_list(const ossia_value_t* values, size_t size);
1400 OSSIA_EXPORT
1401 ossia_value_t ossia_value_create_in(const int* values, size_t size);
1408 OSSIA_EXPORT
1409 ossia_value_t ossia_value_create_fn(const float* values, size_t size);
1410 
1416 OSSIA_EXPORT
1417 void ossia_value_free(ossia_value_t value);
1418 
1424 OSSIA_EXPORT
1425 ossia_type ossia_value_get_type(ossia_value_t type);
1426 
1432 OSSIA_EXPORT
1433 int ossia_value_to_int(ossia_value_t val);
1439 OSSIA_EXPORT
1440 float ossia_value_to_float(ossia_value_t val);
1446 OSSIA_EXPORT
1447 struct ossia_vec2f ossia_value_to_2f(ossia_value_t val);
1453 OSSIA_EXPORT
1454 struct ossia_vec3f ossia_value_to_3f(ossia_value_t val);
1460 OSSIA_EXPORT
1461 struct ossia_vec4f ossia_value_to_4f(ossia_value_t val);
1467 OSSIA_EXPORT
1468 int ossia_value_to_bool(ossia_value_t val);
1483 OSSIA_EXPORT
1484 void ossia_value_to_byte_array(ossia_value_t val, char** str, size_t* sz);
1492 OSSIA_EXPORT
1493 const char* ossia_value_to_string(ossia_value_t val);
1500 OSSIA_EXPORT
1501 void ossia_value_to_list(ossia_value_t val_in, ossia_value_t** out, size_t* size);
1505 OSSIA_EXPORT
1506 void ossia_value_free_list(ossia_value_t* out);
1507 
1515 OSSIA_EXPORT
1516 void ossia_value_to_fn(ossia_value_t val_in, float** out, size_t* size);
1520 OSSIA_EXPORT
1521 void ossia_value_free_fn(float* out);
1522 
1530 OSSIA_EXPORT
1531 void ossia_value_to_in(ossia_value_t val_in, int** out, size_t* size);
1535 OSSIA_EXPORT
1536 void ossia_value_free_in(int* out);
1537 
1545 OSSIA_EXPORT
1546 int ossia_value_convert_int(ossia_value_t val);
1554 OSSIA_EXPORT
1555 float ossia_value_convert_float(ossia_value_t val);
1563 OSSIA_EXPORT
1564 int ossia_value_convert_bool(ossia_value_t val);
1572 OSSIA_EXPORT
1573 char ossia_value_convert_char(ossia_value_t val);
1581 OSSIA_EXPORT
1582 void ossia_value_convert_byte_array(ossia_value_t val, char** str, size_t* sz);
1590 OSSIA_EXPORT
1591 void ossia_value_convert_list(ossia_value_t val_in, ossia_value_t** out, size_t* size);
1592 
1600 OSSIA_EXPORT
1601 struct ossia_vec2f ossia_value_convert_2f(ossia_value_t val);
1602 
1610 OSSIA_EXPORT
1611 struct ossia_vec3f ossia_value_convert_3f(ossia_value_t val);
1612 
1620 OSSIA_EXPORT
1621 struct ossia_vec4f ossia_value_convert_4f(ossia_value_t val);
1622 
1623 OSSIA_EXPORT
1624 void ossia_string_free(char*);
1625 
1628 /***************/
1629 /*** Logging ***/
1630 /***************/
1637 {
1638  trace,
1639  debug,
1640  info,
1641  warn,
1642  error,
1643  critical,
1644  off
1645 };
1646 
1654 OSSIA_EXPORT
1655 ossia_logger_t ossia_logger_create(const char* host, const char* app);
1660 OSSIA_EXPORT
1661 void ossia_logger_init_heartbeat(ossia_logger_t log, int pid, const char* cmdline);
1666 OSSIA_EXPORT
1667 void ossia_logger_set_level(ossia_logger_t log, enum log_level lvl);
1672 OSSIA_EXPORT
1673 void ossia_log(ossia_logger_t log, enum log_level lvl, const char* message);
1674 
1679 OSSIA_EXPORT
1680 void ossia_logger_free(ossia_logger_t log);
1681 
1684 /*************************/
1685 /*** Message-queue API ***/
1686 /*************************/
1687 
1706 typedef void* ossia_mq_t;
1707 
1717 OSSIA_EXPORT
1718 ossia_mq_t ossia_mq_create(ossia_device_t);
1719 
1723 OSSIA_EXPORT
1724 void ossia_mq_register(ossia_mq_t, ossia_parameter_t);
1725 
1729 OSSIA_EXPORT
1730 void ossia_mq_unregister(ossia_mq_t, ossia_parameter_t);
1731 
1736 OSSIA_EXPORT
1737 int ossia_mq_pop(ossia_mq_t mq, ossia_parameter_t* param, ossia_value_t* val);
1738 
1742 OSSIA_EXPORT
1743 void ossia_mq_free(ossia_mq_t);
1744 
1747 /***************************/
1748 /*** Network context API ***/
1749 /***************************/
1750 
1775 typedef void* ossia_network_context_t;
1779 OSSIA_EXPORT
1780 ossia_network_context_t ossia_network_context_create();
1781 
1785 OSSIA_EXPORT
1786 void ossia_network_context_free(ossia_network_context_t);
1787 
1791 OSSIA_EXPORT
1792 void ossia_network_context_poll(ossia_network_context_t);
1793 
1796 #if defined(__cplusplus)
1797 }
1798 #endif
1799 
1802 #endif
OSSIA_EXPORT ossia_node_callback_idx_t ossia_device_add_node_created_callback(ossia_device_t device, ossia_node_callback_t callback, void *ctx)
Add a callback called when a node is created in a device.
Definition: ossia_device.cpp:129
OSSIA_EXPORT ossia_device_t ossia_device_create(ossia_protocol_t protocol, const char *name)
Create a device.
Definition: ossia_device.cpp:19
OSSIA_EXPORT void ossia_device_reset_static()
Free the global device table.
Definition: ossia_device.cpp:91
OSSIA_EXPORT void ossia_device_remove_node_created_callback(ossia_device_t device, ossia_node_callback_idx_t index)
Remove a callback added with ossia_device_add_node_created_callback.
Definition: ossia_device.cpp:151
OSSIA_EXPORT void ossia_device_free(ossia_device_t device)
Free a device instance.
Definition: ossia_device.cpp:73
OSSIA_EXPORT int ossia_device_update_namespace(ossia_device_t device)
Request the nodes of a server if the protocol handles it.
Definition: ossia_device.cpp:103
OSSIA_EXPORT ossia_node_t ossia_device_get_root_node(ossia_device_t device)
Get the root node of a device.
Definition: ossia_device.cpp:118
OSSIA_EXPORT ossia_node_callback_idx_t ossia_device_add_node_removing_callback(ossia_device_t device, ossia_node_callback_t callback, void *ctx)
Add a callback called when a node is removed in a device.
Definition: ossia_device.cpp:172
OSSIA_EXPORT ossia_parameter_callback_idx_t ossia_device_add_parameter_deleting_callback(ossia_device_t device, ossia_parameter_callback_t callback, void *ctx)
Add a callback called when a parameter is removed in a device.
OSSIA_EXPORT void ossia_device_remove_parameter_deleting_callback(ossia_device_t device, ossia_parameter_callback_idx_t index)
Remove a callback added with ossia_device_add_parameter_deleting_callback.
Definition: ossia_device.cpp:237
OSSIA_EXPORT void ossia_device_remove_node_removing_callback(ossia_device_t device, ossia_node_callback_idx_t index)
Remove a callback added with ossia_device_add_node_removing_callback.
Definition: ossia_device.cpp:194
OSSIA_EXPORT const char * ossia_device_get_name(ossia_device_t device)
Get the name of a device.
Definition: ossia_device.cpp:55
OSSIA_EXPORT ossia_domain_t ossia_domain_create(void)
ossia_domain_create Create a domain
Definition: ossia_domain.cpp:11
OSSIA_EXPORT void ossia_domain_set_values(ossia_domain_t domain, const ossia_value_t *values, size_t n)
Set the values of a domain.
Definition: ossia_domain.cpp:147
OSSIA_EXPORT void ossia_domain_set_min(ossia_domain_t domain, ossia_value_t value)
Set the min of a domain.
Definition: ossia_domain.cpp:40
OSSIA_EXPORT ossia_value_t ossia_domain_get_min(ossia_domain_t domain)
Get the min of a domain.
Definition: ossia_domain.cpp:30
OSSIA_EXPORT ossia_domain_t ossia_domain_make_int_set(const int *values, size_t n)
Create a domain from a set of ints.
Definition: ossia_domain.cpp:81
OSSIA_EXPORT void ossia_domain_free(ossia_domain_t domain)
Free a domain.
Definition: ossia_domain.cpp:166
OSSIA_EXPORT ossia_domain_t ossia_domain_make_min_max(ossia_value_t min, ossia_value_t max)
Create a domain from two values.
Definition: ossia_domain.cpp:17
OSSIA_EXPORT void ossia_domain_get_values(ossia_domain_t domain, ossia_value_t **values, size_t *n)
Get the values of a domain.
Definition: ossia_domain.cpp:116
OSSIA_EXPORT ossia_domain_t ossia_domain_make_string_set(const char **strings, size_t n)
Create a domain from a set of strings.
Definition: ossia_domain.cpp:74
OSSIA_EXPORT ossia_value_t ossia_domain_get_max(ossia_domain_t domain)
Get the max of a domain.
Definition: ossia_domain.cpp:52
OSSIA_EXPORT void ossia_domain_set_max(ossia_domain_t domain, ossia_value_t value)
Set the max of a domain.
Definition: ossia_domain.cpp:62
OSSIA_EXPORT ossia_domain_t ossia_domain_make_value_set(const ossia_value_t *values, size_t n)
Create a domain from a set of values.
Definition: ossia_domain.cpp:105
OSSIA_EXPORT ossia_domain_t ossia_domain_make_float_set(const float *values, size_t n)
Create a domain from a set of floats.
Definition: ossia_domain.cpp:93
OSSIA_EXPORT void ossia_logger_free(ossia_logger_t log)
Free a logger instance.
Definition: ossia_log.cpp:89
OSSIA_EXPORT ossia_logger_t ossia_logger_create(const char *host, const char *app)
Create a logger instance.
Definition: ossia_log.cpp:47
OSSIA_EXPORT void ossia_logger_set_level(ossia_logger_t log, enum log_level lvl)
Change the current log level.
Definition: ossia_log.cpp:57
OSSIA_EXPORT void ossia_logger_init_heartbeat(ossia_logger_t log, int pid, const char *cmdline)
Start sending logger heartbeats.
Definition: ossia_log.cpp:52
log_level
Definition: ossia-c.h:1637
OSSIA_EXPORT void ossia_log(ossia_logger_t log, enum log_level lvl, const char *message)
Log a message.
Definition: ossia_log.cpp:62
OSSIA_EXPORT void ossia_mq_register(ossia_mq_t, ossia_parameter_t)
Register a parameter into a message queue.
Definition: ossia_parameter.cpp:816
OSSIA_EXPORT int ossia_mq_pop(ossia_mq_t mq, ossia_parameter_t *param, ossia_value_t *val)
Get the head of the message queue if any.
Definition: ossia_parameter.cpp:826
OSSIA_EXPORT void ossia_mq_unregister(ossia_mq_t, ossia_parameter_t)
Unregister a parameter from a message queue.
Definition: ossia_parameter.cpp:821
OSSIA_EXPORT ossia_mq_t ossia_mq_create(ossia_device_t)
Create a message queue for a given device.
Definition: ossia_parameter.cpp:811
OSSIA_EXPORT void ossia_mq_free(ossia_mq_t)
Remove a message queue.
Definition: ossia_parameter.cpp:840
OSSIA_EXPORT void ossia_network_context_poll(ossia_network_context_t)
Process the network events currently pending.
Definition: ossia_network_context.cpp:20
OSSIA_EXPORT ossia_network_context_t ossia_network_context_create()
Create a new network context.
Definition: ossia_network_context.cpp:9
OSSIA_EXPORT void ossia_network_context_free(ossia_network_context_t)
Free a network context.
Definition: ossia_network_context.cpp:14
OSSIA_EXPORT ossia_node_t ossia_node_get_child(ossia_node_t node, int child_n)
Get a specific direct child of a node.
Definition: ossia_node.cpp:182
OSSIA_EXPORT void ossia_node_create_pattern(ossia_node_t root, const char *pattern, ossia_node_t **data, size_t *size)
Create nodes matching a brace expansion pattern.
Definition: ossia_node.cpp:127
OSSIA_EXPORT void ossia_node_set_priority(ossia_node_t node, float priority)
Definition: ossia_node.cpp:486
OSSIA_EXPORT void ossia_node_array_free(ossia_node_t *)
Free an array of nodes allocated with ossia_node_find_pattern or ossia_node_create_pattern.
Definition: ossia_node.cpp:108
OSSIA_EXPORT void ossia_node_unset_instance_bounds(ossia_node_t node)
Definition: ossia_node.cpp:652
OSSIA_EXPORT void ossia_node_remove_parameter(ossia_node_t node)
Remove the address contained in a node if any.
Definition: ossia_node.cpp:271
OSSIA_EXPORT void ossia_node_get_instance_bounds(ossia_node_t node, int *min, int *max, int *ok)
Definition: ossia_node.cpp:664
OSSIA_EXPORT int ossia_node_child_size(ossia_node_t node)
Get the number of children of a node.
Definition: ossia_node.cpp:168
OSSIA_EXPORT void ossia_node_set_tags(ossia_node_t node, const char **tags, size_t sz)
Definition: ossia_node.cpp:393
OSSIA_EXPORT void ossia_node_set_description(ossia_node_t node, const char *description)
Definition: ossia_node.cpp:328
OSSIA_EXPORT void ossia_node_get_tags(ossia_node_t node, char ***tags, size_t *sz)
Definition: ossia_node.cpp:420
OSSIA_EXPORT const char * ossia_node_get_extended_type(ossia_node_t node)
Definition: ossia_node.cpp:375
OSSIA_EXPORT ossia_device_t ossia_node_get_device(ossia_node_t node)
Get the root device of a node.
Definition: ossia_node.cpp:48
OSSIA_EXPORT void ossia_tags_free(char **tags, size_t sz)
Free tags allocated with ossia_node_get_tags.
Definition: ossia_node.cpp:453
OSSIA_EXPORT float ossia_node_get_priority(ossia_node_t node, int *ok)
Definition: ossia_node.cpp:510
OSSIA_EXPORT int ossia_node_get_refresh_rate(ossia_node_t node, int *ok)
Definition: ossia_node.cpp:561
OSSIA_EXPORT ossia_node_t ossia_node_find(ossia_node_t root, const char *path)
Find a child node.
Definition: ossia_node.cpp:66
OSSIA_EXPORT ossia_parameter_t ossia_node_create_parameter(ossia_node_t node, ossia_type type)
Create a parameter in a node.
Definition: ossia_node.cpp:218
OSSIA_EXPORT ossia_node_t ossia_node_add_child(ossia_node_t node, const char *name)
Create a direct child node.
Definition: ossia_node.cpp:154
OSSIA_EXPORT double ossia_node_get_value_step_size(ossia_node_t node, int *ok)
Definition: ossia_node.cpp:612
OSSIA_EXPORT ossia_value_t ossia_node_get_default_value(ossia_node_t node)
Definition: ossia_node.cpp:709
OSSIA_EXPORT ossia_node_t ossia_node_find_child(ossia_node_t node, const char *name)
Find a direct child of a node by name.
Definition: ossia_node.cpp:199
OSSIA_EXPORT const char * ossia_node_get_description(ossia_node_t node)
Definition: ossia_node.cpp:341
OSSIA_EXPORT void ossia_node_set_instance_bounds(ossia_node_t node, int min, int max)
Definition: ossia_node.cpp:639
OSSIA_EXPORT void ossia_node_set_default_value(ossia_node_t node, ossia_value_t default_value)
Definition: ossia_node.cpp:693
OSSIA_EXPORT ossia_node_callback_idx_t ossia_node_add_deleting_callback(ossia_node_t node, ossia_node_callback_t callback, void *ctx)
Add a callback called when a node is about to be removed.
Definition: ossia_node.cpp:285
OSSIA_EXPORT void ossia_node_find_pattern(ossia_node_t root, const char *pattern, ossia_node_t **data, size_t *size)
Find nodes matching a wildcard pattern.
Definition: ossia_node.cpp:80
OSSIA_EXPORT void ossia_node_set_refresh_rate(ossia_node_t node, int refresh_rate)
Definition: ossia_node.cpp:537
OSSIA_EXPORT ossia_node_t ossia_node_create(ossia_node_t root, const char *path)
Create a child node.
Definition: ossia_node.cpp:113
OSSIA_EXPORT void ossia_node_unset_value_step_size(ossia_node_t node)
Definition: ossia_node.cpp:600
OSSIA_EXPORT void ossia_node_set_extended_type(ossia_node_t node, const char *extended_type)
Definition: ossia_node.cpp:358
OSSIA_EXPORT int ossia_node_get_hidden(ossia_node_t node)
Definition: ossia_node.cpp:473
OSSIA_EXPORT void ossia_node_unset_refresh_rate(ossia_node_t node)
Definition: ossia_node.cpp:549
OSSIA_EXPORT const char * ossia_node_get_name(ossia_node_t node)
Get the name of a node.
Definition: ossia_node.cpp:33
OSSIA_EXPORT void ossia_node_remove_child(ossia_node_t node, ossia_node_t name)
Removes a direct child node.
Definition: ossia_node.cpp:13
OSSIA_EXPORT void ossia_node_unset_priority(ossia_node_t node)
Definition: ossia_node.cpp:498
OSSIA_EXPORT void ossia_node_set_value_step_size(ossia_node_t node, double value_step_size)
Definition: ossia_node.cpp:588
OSSIA_EXPORT ossia_parameter_t ossia_node_get_parameter(ossia_node_t node)
Get the address contained in a node if any.
Definition: ossia_node.cpp:257
OSSIA_EXPORT void ossia_node_remove_deleting_callback(ossia_node_t node, ossia_node_callback_idx_t index)
Remove a callback added with ossia_node_add_deleting_callback.
Definition: ossia_node.cpp:307
OSSIA_EXPORT ossia_parameter_t ossia_create_parameter(ossia_node_t node, const char *name, const char *type)
Create a child parameter.
Definition: ossia_node.cpp:233
OSSIA_EXPORT void ossia_node_set_hidden(ossia_node_t node, int hidden)
Definition: ossia_node.cpp:460
OSSIA_EXPORT void ossia_parameter_push_s(ossia_parameter_t param, const char *value)
Definition: ossia_parameter.cpp:470
OSSIA_EXPORT struct ossia_vec4f ossia_parameter_to_4f(ossia_parameter_t val)
Get the value if it is a vec4f.
Definition: ossia_parameter.cpp:196
OSSIA_EXPORT void ossia_parameter_push_c(ossia_parameter_t param, char value)
Definition: ossia_parameter.cpp:458
OSSIA_EXPORT void ossia_parameter_push_i(ossia_parameter_t param, int value)
Definition: ossia_parameter.cpp:385
OSSIA_EXPORT void ossia_parameter_push_fn(ossia_parameter_t param, const float *value, size_t sz)
Push an array of floats.
Definition: ossia_parameter.cpp:509
OSSIA_EXPORT void ossia_parameter_set_listening(ossia_parameter_t param, int listening)
Enable or disable remote updates for a given address.
Definition: ossia_parameter.cpp:587
OSSIA_EXPORT void ossia_parameter_push_list(ossia_parameter_t param, const ossia_value_t *value, size_t sz)
Push an array of values.
Definition: ossia_parameter.cpp:550
OSSIA_EXPORT ossia_domain_t ossia_parameter_get_domain(ossia_parameter_t param)
Definition: ossia_parameter.cpp:98
OSSIA_EXPORT struct ossia_vec2f ossia_parameter_to_2f(ossia_parameter_t val)
Get the value if it is a vec2f.
Definition: ossia_parameter.cpp:168
OSSIA_EXPORT void ossia_parameter_push_2f(ossia_parameter_t param, float v1, float v2)
Definition: ossia_parameter.cpp:421
OSSIA_EXPORT void ossia_parameter_push_impulse(ossia_parameter_t param)
Definition: ossia_parameter.cpp:373
OSSIA_EXPORT void ossia_parameter_set_unit(ossia_parameter_t param, const char *unit)
Definition: ossia_parameter.cpp:680
OSSIA_EXPORT const char * ossia_parameter_get_unit(ossia_parameter_t param)
Definition: ossia_parameter.cpp:694
OSSIA_EXPORT int ossia_parameter_get_disabled(ossia_parameter_t param)
Definition: ossia_parameter.cpp:720
OSSIA_EXPORT void ossia_parameter_set_bounding_mode(ossia_parameter_t param, ossia_bounding_mode bm)
Definition: ossia_parameter.cpp:54
OSSIA_EXPORT void ossia_parameter_push_3f(ossia_parameter_t param, float v1, float v2, float v3)
Definition: ossia_parameter.cpp:433
OSSIA_EXPORT int ossia_parameter_to_int(ossia_parameter_t val)
Get the value if it is an int.
Definition: ossia_parameter.cpp:142
OSSIA_EXPORT void ossia_parameter_push_value(ossia_parameter_t param, ossia_value_t value)
Definition: ossia_parameter.cpp:355
OSSIA_EXPORT const char * ossia_parameter_to_string(ossia_parameter_t val)
Get the value if it is a null-terminated string.
Definition: ossia_parameter.cpp:245
OSSIA_EXPORT ossia_value_callback_idx_t ossia_parameter_add_callback(ossia_parameter_t param, ossia_value_callback_t callback, void *ctx)
Add a callback called when the value of a parameter changes.
Definition: ossia_parameter.cpp:615
OSSIA_EXPORT void ossia_parameter_push_callback(ossia_parameter_t param, ossia_value_callback_t callback, void *ctx)
Add a callback called when the value of a parameter changes.
Definition: ossia_parameter.cpp:635
OSSIA_EXPORT void ossia_parameter_set_repetition_filter(ossia_parameter_t param, int repetition_filter)
Definition: ossia_parameter.cpp:783
OSSIA_EXPORT float ossia_parameter_to_float(ossia_parameter_t val)
Get the value if it is an float.
Definition: ossia_parameter.cpp:155
OSSIA_EXPORT void ossia_parameter_set_domain(ossia_parameter_t param, ossia_domain_t domain)
Definition: ossia_parameter.cpp:80
OSSIA_EXPORT void ossia_parameter_to_list(ossia_parameter_t val_in, ossia_value_t **out, size_t *size)
Get the value if it is a list.
Definition: ossia_parameter.cpp:262
ossia_bounding_mode
Definition: ossia-c.h:403
OSSIA_EXPORT ossia_access_mode ossia_parameter_get_access_mode(ossia_parameter_t param)
Definition: ossia_parameter.cpp:41
OSSIA_EXPORT ossia_value_t ossia_parameter_get_value(ossia_parameter_t param)
Definition: ossia_parameter.cpp:129
OSSIA_EXPORT int ossia_parameter_get_muted(ossia_parameter_t param)
Definition: ossia_parameter.cpp:745
OSSIA_EXPORT ossia_value_t ossia_parameter_fetch_value(ossia_parameter_t param)
Fetch the value of a parameter.
Definition: ossia_parameter.cpp:574
OSSIA_EXPORT void ossia_parameter_free_callback_idx(ossia_value_callback_idx_t)
Free a callback index.
Definition: ossia_parameter.cpp:655
OSSIA_EXPORT void ossia_parameter_to_in(ossia_parameter_t val_in, int **out, size_t *size)
Get the value if it is a list of ints.
Definition: ossia_parameter.cpp:325
ossia_type
Definition: ossia-c.h:376
OSSIA_EXPORT void ossia_parameter_to_fn(ossia_parameter_t val_in, float **out, size_t *size)
Get the value if it is a list of floats.
Definition: ossia_parameter.cpp:294
OSSIA_EXPORT void ossia_parameter_set_access_mode(ossia_parameter_t param, ossia_access_mode am)
Definition: ossia_parameter.cpp:28
OSSIA_EXPORT ossia_bounding_mode ossia_parameter_get_bounding_mode(ossia_parameter_t param)
Definition: ossia_parameter.cpp:67
OSSIA_EXPORT void ossia_parameter_to_byte_array(ossia_parameter_t val, char **str, size_t *sz)
Get the value if it is a byte array.
Definition: ossia_parameter.cpp:223
OSSIA_EXPORT struct ossia_vec3f ossia_parameter_to_3f(ossia_parameter_t val)
Get the value if it is a vec3f.
Definition: ossia_parameter.cpp:182
OSSIA_EXPORT void ossia_parameter_push_f(ossia_parameter_t param, float value)
Definition: ossia_parameter.cpp:409
OSSIA_EXPORT void ossia_parameter_set_muted(ossia_parameter_t param, int muted)
Definition: ossia_parameter.cpp:732
OSSIA_EXPORT void ossia_parameter_push_b(ossia_parameter_t param, int b)
Definition: ossia_parameter.cpp:397
OSSIA_EXPORT void ossia_parameter_push_4f(ossia_parameter_t param, float v1, float v2, float v3, float v4)
Definition: ossia_parameter.cpp:445
OSSIA_EXPORT int ossia_parameter_get_critical(ossia_parameter_t param)
Definition: ossia_parameter.cpp:770
OSSIA_EXPORT void ossia_parameter_push_cn(ossia_parameter_t param, const char *value, size_t sz)
Push a string with known length.
Definition: ossia_parameter.cpp:532
OSSIA_EXPORT int ossia_parameter_to_bool(ossia_parameter_t val)
Get the value if it is a bool.
Definition: ossia_parameter.cpp:210
ossia_access_mode
Definition: ossia-c.h:393
OSSIA_EXPORT ossia_node_t ossia_parameter_get_node(ossia_parameter_t param)
Return the node a parameter is part of.
Definition: ossia_parameter.cpp:15
OSSIA_EXPORT void ossia_parameter_remove_callback(ossia_parameter_t param, ossia_value_callback_idx_t index)
Remove a callback added with ossia_parameter_add_callback.
Definition: ossia_parameter.cpp:660
OSSIA_EXPORT void ossia_parameter_set_value(ossia_parameter_t param, ossia_value_t value)
Definition: ossia_parameter.cpp:111
OSSIA_EXPORT void ossia_parameter_push_in(ossia_parameter_t param, const int *value, size_t sz)
Push an array of integers.
Definition: ossia_parameter.cpp:486
OSSIA_EXPORT void ossia_parameter_set_critical(ossia_parameter_t param, int critical)
Definition: ossia_parameter.cpp:757
OSSIA_EXPORT void ossia_parameter_set_disabled(ossia_parameter_t param, int disabled)
Definition: ossia_parameter.cpp:707
OSSIA_EXPORT int ossia_parameter_get_repetition_filter(ossia_parameter_t param)
Definition: ossia_parameter.cpp:797
OSSIA_EXPORT ossia_protocol_t ossia_protocol_osc_create(const char *ip, int remote_port, int local_port)
Instantiate a raw OSC protocol.
Definition: ossia_protocol.cpp:47
OSSIA_EXPORT ossia_protocol_t ossia_protocol_oscquery_mirror_create(const char *host)
Instantiate an OSCQuery client.
Definition: ossia_protocol.cpp:83
OSSIA_EXPORT void ossia_protocol_multiplex_expose_to(ossia_protocol_t local, ossia_protocol_t other)
Adds a protocol to the set of protocols managed by the multiplexer.
Definition: ossia_protocol.cpp:25
OSSIA_EXPORT ossia_protocol_t ossia_protocol_multiplex_create()
Instantiate a multiplexer protocol.
Definition: ossia_protocol.cpp:19
OSSIA_EXPORT ossia_protocol_t ossia_protocol_oscquery_server_create(int osc_port, int ws_port)
Instantiate an OSCQuery server.
Definition: ossia_protocol.cpp:71
OSSIA_EXPORT ossia_protocol_t ossia_protocol_minuit_create(const char *local_name, const char *ip, int remote_port, int local_port)
Instantiate a Minuit protocol.
Definition: ossia_protocol.cpp:58
OSSIA_EXPORT void ossia_protocol_free(ossia_protocol_t)
Free the memory associated to a protocol.
Definition: ossia_protocol.cpp:94
OSSIA_EXPORT ossia_value_t ossia_value_create_2f(float v1, float v2)
Create a value of type vec2f.
Definition: ossia_value.cpp:52
OSSIA_EXPORT int ossia_value_convert_bool(ossia_value_t val)
Get the value as a bool.
Definition: ossia_value.cpp:294
OSSIA_EXPORT void ossia_value_to_fn(ossia_value_t val_in, float **out, size_t *size)
Get the value if it is a list of floats.
Definition: ossia_value.cpp:223
OSSIA_EXPORT ossia_type ossia_value_get_type(ossia_value_t type)
Get the type of a value.
Definition: ossia_value.cpp:122
OSSIA_EXPORT ossia_value_t ossia_value_create_in(const int *values, size_t size)
Create a value of type list with only ints.
Definition: ossia_value.cpp:106
OSSIA_EXPORT ossia_value_t ossia_value_create_4f(float v1, float v2, float v3, float v4)
Create a value of type vec4f.
Definition: ossia_value.cpp:60
OSSIA_EXPORT ossia_value_t ossia_value_create_int(int value)
Create a value of type int.
Definition: ossia_value.cpp:42
OSSIA_EXPORT struct ossia_vec2f ossia_value_to_2f(ossia_value_t val)
Get the value if it is a vec2f.
Definition: ossia_value.cpp:143
OSSIA_EXPORT int ossia_value_to_int(ossia_value_t val)
Get the value if it is an int.
Definition: ossia_value.cpp:133
OSSIA_EXPORT void ossia_value_free(ossia_value_t value)
Free the value.
Definition: ossia_value.cpp:117
OSSIA_EXPORT struct ossia_vec3f ossia_value_to_3f(ossia_value_t val)
Get the value if it is a vec3f.
Definition: ossia_value.cpp:148
OSSIA_EXPORT struct ossia_vec4f ossia_value_to_4f(ossia_value_t val)
Get the value if it is a vec4f.
Definition: ossia_value.cpp:153
OSSIA_EXPORT void ossia_value_convert_list(ossia_value_t val_in, ossia_value_t **out, size_t *size)
Get the value as a list.
Definition: ossia_value.cpp:331
OSSIA_EXPORT float ossia_value_convert_float(ossia_value_t val)
Get the value as a float.
Definition: ossia_value.cpp:286
OSSIA_EXPORT char ossia_value_convert_char(ossia_value_t val)
Get the value as a char.
Definition: ossia_value.cpp:290
OSSIA_EXPORT void ossia_value_to_in(ossia_value_t val_in, int **out, size_t *size)
Get the value if it is a list of ints.
Definition: ossia_value.cpp:252
OSSIA_EXPORT float ossia_value_to_float(ossia_value_t val)
Get the value if it is an float.
Definition: ossia_value.cpp:138
OSSIA_EXPORT ossia_value_t ossia_value_create_byte_array(const char *value, size_t size)
Create a value of type string.
Definition: ossia_value.cpp:79
OSSIA_EXPORT ossia_value_t ossia_value_create_list(const ossia_value_t *values, size_t size)
Create a value of type list.
Definition: ossia_value.cpp:84
OSSIA_EXPORT ossia_value_t ossia_value_create_impulse()
Create a value of type Impulse.
Definition: ossia_value.cpp:37
OSSIA_EXPORT ossia_value_t ossia_value_create_char(char value)
Create a value of type char.
Definition: ossia_value.cpp:70
OSSIA_EXPORT ossia_value_t ossia_value_create_bool(int value)
Create a value of type bool.
Definition: ossia_value.cpp:65
OSSIA_EXPORT void ossia_value_convert_byte_array(ossia_value_t val, char **str, size_t *sz)
Get the value as a byte array.
Definition: ossia_value.cpp:314
OSSIA_EXPORT ossia_value_t ossia_value_create_string(const char *value)
Create a value of type string.
Definition: ossia_value.cpp:75
OSSIA_EXPORT void ossia_value_to_list(ossia_value_t val_in, ossia_value_t **out, size_t *size)
Get the value if it is a list.
Definition: ossia_value.cpp:194
OSSIA_EXPORT void ossia_value_free_list(ossia_value_t *out)
Free an array of values.
Definition: ossia_value.cpp:218
OSSIA_EXPORT struct ossia_vec2f ossia_value_convert_2f(ossia_value_t val)
Get the value as a vec2f.
Definition: ossia_value.cpp:298
OSSIA_EXPORT ossia_value_t ossia_value_create_fn(const float *values, size_t size)
Create a value of type list with only floats.
Definition: ossia_value.cpp:95
OSSIA_EXPORT void ossia_value_free_in(int *out)
Free an array of int.
Definition: ossia_value.cpp:277
OSSIA_EXPORT struct ossia_vec3f ossia_value_convert_3f(ossia_value_t val)
Get the value as a vec3f.
Definition: ossia_value.cpp:303
OSSIA_EXPORT ossia_value_t ossia_value_create_float(float value)
Create a value of type float.
Definition: ossia_value.cpp:47
OSSIA_EXPORT ossia_value_t ossia_value_create_3f(float v1, float v2, float v3)
Create a value of type vec3f.
Definition: ossia_value.cpp:56
OSSIA_EXPORT void ossia_value_free_fn(float *out)
Free an array of float.
Definition: ossia_value.cpp:247
OSSIA_EXPORT const char * ossia_value_to_string(ossia_value_t val)
Get the value if it is a null-terminated string.
Definition: ossia_value.cpp:182
OSSIA_EXPORT int ossia_value_to_bool(ossia_value_t val)
Get the value if it is an bool.
Definition: ossia_value.cpp:159
OSSIA_EXPORT void ossia_value_to_byte_array(ossia_value_t val, char **str, size_t *sz)
Get the value if it is a byte array.
Definition: ossia_value.cpp:164
OSSIA_EXPORT struct ossia_vec4f ossia_value_convert_4f(ossia_value_t val)
Get the value as a vec4f.
Definition: ossia_value.cpp:308
OSSIA_EXPORT int ossia_value_convert_int(ossia_value_t val)
Get the value as an int.
Definition: ossia_value.cpp:282
constexpr OSSIA_INLINE auto min(const T a, const U b) noexcept -> typename std::conditional<(sizeof(T) > sizeof(U)), T, U >::type
min function tailored for values
Definition: math.hpp:125
constexpr OSSIA_INLINE auto max(const T a, const U b) noexcept -> typename std::conditional<(sizeof(T) > sizeof(U)), T, U >::type
max function tailored for values
Definition: math.hpp:96