libmapper_rs/
bindings.rs

1/* automatically generated by rust-bindgen 0.69.4 */
2#![allow(warnings)]
3#[repr(u32)]
4#[doc = " Describes the possible data types used by libmapper."]
5#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6pub enum mpr_type {
7    #[doc = "< Devices only."]
8    MPR_DEV = 1,
9    #[doc = "< Input signals."]
10    MPR_SIG_IN = 2,
11    #[doc = "< Output signals."]
12    MPR_SIG_OUT = 4,
13    #[doc = "< All signals."]
14    MPR_SIG = 6,
15    #[doc = "< Incoming maps."]
16    MPR_MAP_IN = 8,
17    #[doc = "< Outgoing maps."]
18    MPR_MAP_OUT = 16,
19    #[doc = "< All maps."]
20    MPR_MAP = 24,
21    #[doc = "< All objects: devs, sigs, maps."]
22    MPR_OBJ = 31,
23    #[doc = "< Object query."]
24    MPR_LIST = 64,
25    #[doc = "< Graph."]
26    MPR_GRAPH = 65,
27    #[doc = "< Boolean value."]
28    MPR_BOOL = 98,
29    #[doc = "< libmapper data type."]
30    MPR_TYPE = 99,
31    #[doc = "< 64-bit floating point."]
32    MPR_DBL = 100,
33    #[doc = "< 32-bit floating point."]
34    MPR_FLT = 102,
35    #[doc = "< 64-bit integer."]
36    MPR_INT64 = 104,
37    #[doc = "< 32-bit integer."]
38    MPR_INT32 = 105,
39    #[doc = "< String."]
40    MPR_STR = 115,
41    #[doc = "< 64-bit NTP timestamp."]
42    MPR_TIME = 116,
43    #[doc = "< pointer."]
44    MPR_PTR = 118,
45    #[doc = "< NULL value."]
46    MPR_NULL = 78,
47}
48#[repr(u32)]
49#[doc = " Symbolic representation of recognized properties."]
50#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
51pub enum mpr_prop {
52    MPR_PROP_UNKNOWN = 0,
53    MPR_PROP_BUNDLE = 256,
54    MPR_PROP_DATA = 512,
55    MPR_PROP_DEV = 768,
56    MPR_PROP_DIR = 1024,
57    MPR_PROP_EPHEM = 1280,
58    MPR_PROP_EXPR = 1536,
59    MPR_PROP_HOST = 1792,
60    MPR_PROP_ID = 2048,
61    MPR_PROP_IS_LOCAL = 2304,
62    MPR_PROP_JITTER = 2560,
63    MPR_PROP_LEN = 2816,
64    MPR_PROP_LIBVER = 3072,
65    MPR_PROP_LINKED = 3328,
66    MPR_PROP_MAX = 3584,
67    MPR_PROP_MIN = 3840,
68    MPR_PROP_MUTED = 4096,
69    MPR_PROP_NAME = 4352,
70    MPR_PROP_NUM_INST = 4608,
71    MPR_PROP_NUM_MAPS = 4864,
72    MPR_PROP_NUM_MAPS_IN = 5120,
73    MPR_PROP_NUM_MAPS_OUT = 5376,
74    MPR_PROP_NUM_SIGS_IN = 5632,
75    MPR_PROP_NUM_SIGS_OUT = 5888,
76    MPR_PROP_ORDINAL = 6144,
77    MPR_PROP_PERIOD = 6400,
78    MPR_PROP_PORT = 6656,
79    MPR_PROP_PROCESS_LOC = 6912,
80    MPR_PROP_PROTOCOL = 7168,
81    MPR_PROP_RATE = 7424,
82    MPR_PROP_SCOPE = 7680,
83    MPR_PROP_SIG = 7936,
84    MPR_PROP_SLOT = 8192,
85    MPR_PROP_STATUS = 8448,
86    MPR_PROP_STEAL_MODE = 8704,
87    MPR_PROP_SYNCED = 8960,
88    MPR_PROP_TYPE = 9216,
89    MPR_PROP_UNIT = 9472,
90    MPR_PROP_USE_INST = 9728,
91    MPR_PROP_VERSION = 9984,
92    MPR_PROP_EXTRA = 10240,
93}
94#[repr(u32)]
95#[doc = " Possible operations for composing queries."]
96#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
97pub enum mpr_op {
98    MPR_OP_UNDEFINED = 0,
99    #[doc = "< Property does not exist for this entity."]
100    MPR_OP_NEX = 1,
101    #[doc = "< Property value == query value."]
102    MPR_OP_EQ = 2,
103    #[doc = "< Property exists for this entity."]
104    MPR_OP_EX = 3,
105    #[doc = "< Property value > query value."]
106    MPR_OP_GT = 4,
107    #[doc = "< Property value >= query value"]
108    MPR_OP_GTE = 5,
109    #[doc = "< Property value < query value"]
110    MPR_OP_LT = 6,
111    #[doc = "< Property value <= query value"]
112    MPR_OP_LTE = 7,
113    #[doc = "< Property value != query value"]
114    MPR_OP_NEQ = 8,
115    #[doc = "< Applies to all elements of value"]
116    MPR_OP_ALL = 16,
117    #[doc = "< Applies to any element of value"]
118    MPR_OP_ANY = 32,
119    MPR_OP_NONE = 64,
120}
121#[repr(u32)]
122#[doc = " Describes the possible endpoints of a map.\n  @ingroup map"]
123#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
124pub enum mpr_loc {
125    #[doc = "< Not yet defined"]
126    MPR_LOC_UNDEFINED = 0,
127    #[doc = "< Source signal(s) for this map."]
128    MPR_LOC_SRC = 1,
129    #[doc = "< Destination signal(s) for this map."]
130    MPR_LOC_DST = 2,
131    #[doc = "< Either source or destination signals."]
132    MPR_LOC_ANY = 3,
133    #[doc = "< Both source and destination signals."]
134    MPR_LOC_BOTH = 7,
135}
136#[repr(u32)]
137#[doc = " Describes the possible network protocol for map communication.\n  @ingroup map"]
138#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
139pub enum mpr_proto {
140    #[doc = "< Not yet defined"]
141    MPR_PROTO_UNDEFINED = 0,
142    #[doc = "< Map updates are sent using UDP."]
143    MPR_PROTO_UDP = 1,
144    #[doc = "< Map updates are sent using TCP."]
145    MPR_PROTO_TCP = 2,
146    MPR_NUM_PROTO = 3,
147}
148#[repr(u32)]
149#[doc = " The set of possible directions for a signal.\n  @ingroup signal"]
150#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
151pub enum mpr_dir {
152    #[doc = "< Not yet defined."]
153    MPR_DIR_UNDEFINED = 0,
154    #[doc = "< Signal is an input"]
155    MPR_DIR_IN = 1,
156    #[doc = "< Signal is an output"]
157    MPR_DIR_OUT = 2,
158    #[doc = "< Either incoming or outgoing"]
159    MPR_DIR_ANY = 3,
160    #[doc = "< Both directions apply.  Currently signals\n   cannot be both inputs and outputs, so this\n   value is only used for querying device maps\n   that touch only local signals."]
161    MPR_DIR_BOTH = 7,
162}
163#[repr(u32)]
164#[doc = " Describes the voice-stealing mode for instances.\n  @ingroup map"]
165#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
166pub enum mpr_steal_type {
167    #[doc = "< No stealing will take place."]
168    MPR_STEAL_NONE = 0,
169    #[doc = "< Steal the oldest instance."]
170    MPR_STEAL_OLDEST = 1,
171    #[doc = "< Steal the newest instance."]
172    MPR_STEAL_NEWEST = 2,
173}
174#[repr(u32)]
175#[doc = " Describes the possible statuses for a libmapper object.\n  @ingroup object"]
176#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
177pub enum mpr_status {
178    MPR_STATUS_UNDEFINED = 0,
179    MPR_STATUS_NEW = 1,
180    MPR_STATUS_MODIFIED = 2,
181    MPR_STATUS_REMOVED = 4,
182    MPR_STATUS_EXPIRED = 8,
183    MPR_STATUS_STAGED = 16,
184    MPR_STATUS_ACTIVE = 32,
185    MPR_STATUS_HAS_VALUE = 64,
186    MPR_STATUS_NEW_VALUE = 128,
187    MPR_STATUS_UPDATE_LOC = 256,
188    MPR_STATUS_UPDATE_REM = 512,
189    MPR_STATUS_REL_UPSTRM = 1024,
190    MPR_STATUS_REL_DNSTRM = 2048,
191    MPR_STATUS_OVERFLOW = 4096,
192    MPR_STATUS_ANY = 8191,
193}
194#[repr(u32)]
195#[doc = " The set of possible graph events, used to inform callbacks.\n  @ingroup graph"]
196#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
197pub enum mpr_graph_evt {
198    #[doc = "< New record has been added to the graph."]
199    MPR_OBJ_NEW = mpr_status::MPR_STATUS_NEW as u32,
200    #[doc = "< The existing record has been modified."]
201    MPR_OBJ_MOD = mpr_status::MPR_STATUS_MODIFIED as u32,
202    #[doc = "< The existing record has been removed."]
203    MPR_OBJ_REM = mpr_status::MPR_STATUS_REMOVED as u32,
204    #[doc = "< The graph has lost contact with the remote entity."]
205    MPR_OBJ_EXP = mpr_status::MPR_STATUS_EXPIRED as u32,
206}
207#[repr(u32)]
208#[doc = " The set of possible signal events, used to register and inform callbacks.\n  @ingroup signal"]
209#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
210pub enum mpr_sig_evt {
211    #[doc = "< New instance has been created."]
212    MPR_SIG_INST_NEW = mpr_status::MPR_STATUS_NEW as u32,
213    #[doc = "< Instance was released upstream."]
214    MPR_SIG_REL_UPSTRM = mpr_status::MPR_STATUS_REL_UPSTRM as u32,
215    #[doc = "< Instance was released downstream."]
216    MPR_SIG_REL_DNSTRM = mpr_status::MPR_STATUS_REL_DNSTRM as u32,
217    #[doc = "< No local instances left."]
218    MPR_SIG_INST_OFLW = mpr_status::MPR_STATUS_OVERFLOW as u32,
219    #[doc = "< Instance value has been updated."]
220    MPR_SIG_UPDATE = mpr_status::MPR_STATUS_UPDATE_REM as u32,
221    MPR_SIG_ALL = mpr_status::MPR_STATUS_ANY as u32,
222}
223#[doc = " Abstraction for accessing any object type."]
224pub type mpr_obj = *mut ::std::os::raw::c_void;
225#[doc = " An internal structure defining a device."]
226pub type mpr_dev = *mut ::std::os::raw::c_void;
227#[doc = " An internal structure defining a signal."]
228pub type mpr_sig = *mut ::std::os::raw::c_void;
229#[doc = " An internal structure defining a mapping between a set of signals."]
230pub type mpr_map = *mut ::std::os::raw::c_void;
231#[doc = " An internal structure defining a list of objects."]
232pub type mpr_list = *mut *mut ::std::os::raw::c_void;
233#[doc = " An internal structure representing the distributed mapping graph. */\n/*! This can be retrieved by calling mpr_obj_graph()."]
234pub type mpr_graph = *mut ::std::os::raw::c_void;
235#[doc = " An internal structure defining a grouping of signals."]
236pub type mpr_sig_group = ::std::os::raw::c_int;
237#[doc = " A 64-bit data structure containing an NTP-compatible time tag, as used by OSC."]
238pub type mpr_time = ::std::os::raw::c_ulonglong;
239#[doc = " This data structure must be large enough to hold a system pointer or a uin64_t"]
240pub type mpr_id = ::std::os::raw::c_ulonglong;
241#[doc = " A signal handler function can be called whenever a signal value changes.\n  \\param signal       The signal that has changed.\n  \\param event        The type of event that has occurred, e.g. `MPR_SIG_UPDATE` when the value has\n                      changed. Event types are listed in the enum `mpr_sig_evt` found in\n                      `mapper_constants.h`\n  \\param instance     The identifier of the instance that has been changed, if applicable.\n  \\param length       The array length of the current value in the case of `MPR_SIG_UPDATE`\n                      events, or `0` for other events.\n  \\param type         The data type of the signal.\n  \\param value        A pointer to the current value in the case of `MPR_SIG_UPDATE` events, or\n                      `NULL` for other events.\n  \\param time         The timetag associated with this event."]
242pub type mpr_sig_handler = ::std::option::Option<
243    unsafe extern "C" fn(
244        signal: mpr_sig,
245        event: mpr_sig_evt,
246        instance: mpr_id,
247        length: ::std::os::raw::c_int,
248        type_: mpr_type,
249        value: *const ::std::os::raw::c_void,
250        time: mpr_time,
251    ),
252>;
253#[doc = " A callback function prototype for when an object record is added or updated.\n  Such a function is passed in to `mpr_graph_add_cb()`.\n  \\param graph        The graph that registered this callback.\n  \\param object       The object record.\n  \\param event        A value of `mpr_graph_evt` indicating what is happening to the object record.\n  \\param data         The user context pointer registered with this callback."]
254pub type mpr_graph_handler = ::std::option::Option<
255    unsafe extern "C" fn(
256        graph: mpr_graph,
257        object: mpr_obj,
258        event: mpr_graph_evt,
259        data: *const ::std::os::raw::c_void,
260    ),
261>;
262extern "C" {
263    #[doc = " Return the internal `mpr_graph` structure used by an object.\n  \\param object       The object to query.\n  \\return             The `mpr_graph` used by this object."]
264    pub fn mpr_obj_get_graph(object: mpr_obj) -> mpr_graph;
265    #[doc = " Return the specific type of an object.\n  \\param object       The object to query.\n  \\return             The object type."]
266    pub fn mpr_obj_get_type(object: mpr_obj) -> mpr_type;
267    #[doc = " Get an object's number of properties.\n  \\param object       The object to check.\n  \\param staged       1 to include staged properties in the count, `0` otherwise.\n  \\return             The number of properties stored in the table."]
268    pub fn mpr_obj_get_num_props(
269        object: mpr_obj,
270        staged: ::std::os::raw::c_int,
271    ) -> ::std::os::raw::c_int;
272    #[doc = " Look up a property by index or one of the symbolic identifiers listed in `mpr_constants.h`.\n  \\param object       The object to check.\n  \\param index        Index or symbolic identifier of the property to retrieve.\n  \\param key          A pointer to a location to receive the name of the\n                      property value (Optional, pass `0` to ignore).\n  \\param length       A pointer to a location to receive the vector length of\n                      the property value (Optional, pass `0` to ignore).\n  \\param type         A pointer to a location to receive the type of the\n                      property value (Optional, pass `0` to ignore).\n  \\param value        A pointer to a location to receive the address of the\n                      property's value (Optional, pass `0` to ignore).\n  \\param published    A pointer to a location to receive the 'published' flag for this property\n                      (Optional, pass `0` to ignore).\n  \\return             Symbolic identifier of the retrieved property, or\n                      `MPR_PROP_UNKNOWN` if not found."]
273    pub fn mpr_obj_get_prop_by_idx(
274        object: mpr_obj,
275        index: ::std::os::raw::c_int,
276        key: *mut *const ::std::os::raw::c_char,
277        length: *mut ::std::os::raw::c_int,
278        type_: *mut mpr_type,
279        value: *mut *const ::std::os::raw::c_void,
280        published: *mut ::std::os::raw::c_int,
281    ) -> mpr_prop;
282    #[doc = " Look up a property by name.\n  \\param object       The object to check.\n  \\param key          The name of the property to retrieve.\n  \\param length       A pointer to a location to receive the vector length of\n                      the property value (Optional, pass `0` to ignore).\n  \\param type         A pointer to a location to receive the type of the\n                      property value (Optional, pass `0` to ignore).\n  \\param value        A pointer to a location to receive the address of the\n                      property's value (Optional, pass `0` to ignore).\n  \\param published    A pointer to a location to receive the 'published' flag for this property\n                      (Optional, pass `0` to ignore).\n  \\return             Symbolic identifier of the retrieved property, or\n                      `MPR_PROP_UNKNOWN` if not found."]
283    pub fn mpr_obj_get_prop_by_key(
284        object: mpr_obj,
285        key: *const ::std::os::raw::c_char,
286        length: *mut ::std::os::raw::c_int,
287        type_: *mut mpr_type,
288        value: *mut *const ::std::os::raw::c_void,
289        published: *mut ::std::os::raw::c_int,
290    ) -> mpr_prop;
291    #[doc = " Look up a property by symbolic identifier or name and return as an integer if possible. Since\n  the returned value cannot represent a missing property it is recommended that this function\n  only be used to recover properties that are guaranteed to exist and have a compatible type.\n  \\param object       The object to check.\n  \\param property     The symbolic identifier of the property to recover. Can be set to\n                      `MPR_UNKNOWN` or `MPR_EXTRA` to specify the property by name instead.\n  \\param key          A string identifier (name) for the property. Only used if the 'property'\n                      argument is set to `MPR_UNKNOWN` or `MPR_EXTRA`.\n  \\return             Value of the property cast to integer type, or zero if the property does\n                      not exist or can't be cast to int."]
292    pub fn mpr_obj_get_prop_as_int32(
293        object: mpr_obj,
294        property: mpr_prop,
295        key: *const ::std::os::raw::c_char,
296    ) -> ::std::os::raw::c_int;
297    #[doc = " Look up a property by symbolic identifier or name and return as an integer if possible. Since\n  the returned value cannot represent a missing property it is recommended that this function\n  only be used to recover properties that are guaranteed to exist and have a compatible type.\n  \\param object       The object to check.\n  \\param property     The symbolic identifier of the property to recover. Can be set to\n                      `MPR_UNKNOWN` or `MPR_EXTRA` to specify the property by name instead.\n  \\param key          A string identifier (name) for the property. Only used if the 'property'\n                      argument is set to `MPR_UNKNOWN` or `MPR_EXTRA`.\n  \\return             Value of the property cast to `int64_t` type, or zero if the property does\n                      not exist or can't be cast to `int64_t`."]
298    pub fn mpr_obj_get_prop_as_int64(
299        object: mpr_obj,
300        property: mpr_prop,
301        key: *const ::std::os::raw::c_char,
302    ) -> ::std::os::raw::c_longlong;
303    #[doc = " Look up a property by symbolic identifier or name and return as a float if possible. Since the\n  returned value cannot represent a missing property it is recommended that this function only be\n  used to recover properties that are guaranteed to exist and have a compatible type.\n  \\param object       The object to check.\n  \\param property     The symbolic identifier of the property to recover. Can be set to\n                      `MPR_UNKNOWN` or `MPR_EXTRA` to specify the property by name instead.\n  \\param key          A string identifier (name) for the property. Only used if the 'property'\n                      argument is set to `MPR_UNKNOWN` or `MPR_EXTRA`.\n  \\return             Value of the property cast to float type, or zero if the property does not\n                      exist or can't be cast to float."]
304    pub fn mpr_obj_get_prop_as_flt(
305        object: mpr_obj,
306        property: mpr_prop,
307        key: *const ::std::os::raw::c_char,
308    ) -> f32;
309    #[doc = " Look up a property by symbolic identifier or name and return as a C string if possible.\n  The returned value belongs to the object and should not be freed.\n  \\param object       The object to check.\n  \\param property     The symbolic identifier of the property to recover. Can be set to\n                      `MPR_UNKNOWN` or `MPR_EXTRA` to specify the property by name instead.\n  \\param key          A string identifier (name) for the property. Only used if the 'property'\n                      argument is set to `MPR_UNKNOWN` or `MPR_EXTRA`.\n  \\return             Value of the property, or null if the property does not\n                      exist or has an incompatible type."]
310    pub fn mpr_obj_get_prop_as_str(
311        object: mpr_obj,
312        property: mpr_prop,
313        key: *const ::std::os::raw::c_char,
314    ) -> *const ::std::os::raw::c_char;
315    #[doc = " Look up a property by symbolic identifier or name and return as a C pointer if possible.\n  The returned value belongs to the object and should not be freed.\n  \\param object       The object to check.\n  \\param property     The symbolic identifier of the property to recover. Can be set to\n                      `MPR_UNKNOWN` or `MPR_EXTRA` to specify the property by name instead.\n  \\param key          A string identifier (name) for the property. Only used if the 'property'\n                      argument is set to `MPR_UNKNOWN` or `MPR_EXTRA`.\n  \\return             Value of the property, or null if the property does not exist or has an\n                      incompatible type."]
316    pub fn mpr_obj_get_prop_as_ptr(
317        object: mpr_obj,
318        property: mpr_prop,
319        key: *const ::std::os::raw::c_char,
320    ) -> *const ::std::os::raw::c_void;
321    #[doc = " Look up a property by symbolic identifier or name and return as a `mpr_obj` if possible.\n  The returned value belongs to the object and should not be freed.\n  \\param object       The object to check.\n  \\param property     The symbolic identifier of the property to recover. Can be set to\n                      `MPR_UNKNOWN` or `MPR_EXTRA` to specify the property by name instead.\n  \\param key          A string identifier (name) for the property. Only used if the 'property'\n                      argument is set to `MPR_UNKNOWN` or `MPR_EXTRA`.\n  \\return             Value of the property, or null if the property does not exist or has an\n                      incompatible type."]
322    pub fn mpr_obj_get_prop_as_obj(
323        object: mpr_obj,
324        property: mpr_prop,
325        key: *const ::std::os::raw::c_char,
326    ) -> mpr_obj;
327    #[doc = " Look up a property by symbolic identifier or name and return as a `mpr_list` if possible.\n  The returned value is a copy and can be safely modified (e.g. iterated) or freed.\n  \\param object       The object to check.\n  \\param property     The symbolic identifier of the property to recover. Can be set to\n                      `MPR_UNKNOWN` or `MPR_EXTRA` to specify the property by name instead.\n  \\param key          A string identifier (name) for the property. Only used if the 'proerty'\n                      argument is set to `MPR_UNKNOWN` or `MPR_EXTRA`.\n  \\return             Value of the property, or null if the property does not exist or has an\n                      incompatible type."]
328    pub fn mpr_obj_get_prop_as_list(
329        object: mpr_obj,
330        property: mpr_prop,
331        key: *const ::std::os::raw::c_char,
332    ) -> mpr_list;
333    #[doc = " Set a property.  Can be used to provide arbitrary metadata. Value pointed to will be copied.\n  Properties can be specified by setting the 'property' argument to one of the symbolic\n  identifiers listed in `mpr_constants.h`; if 'property' is set to `MPR_PROP_UNKNOWN` or\n  `MPR_PROP_EXTRA` the 'name' argument will be used instead.\n  \\param object       The object to operate on.\n  \\param property     Symbolic identifier of the property to add.\n  \\param key          The name of the property to add.\n  \\param length       The length of value array.\n  \\param type         The property  datatype.\n  \\param value        An array of property values.\n  \\param publish      1 to publish to the distributed graph, `0` for local-only.\n  \\return             Symbolic identifier of the set property, or\n                      `MPR_PROP_UNKNOWN` if not found."]
334    pub fn mpr_obj_set_prop(
335        object: mpr_obj,
336        property: mpr_prop,
337        key: *const ::std::os::raw::c_char,
338        length: ::std::os::raw::c_int,
339        type_: mpr_type,
340        value: *const ::std::os::raw::c_void,
341        publish: ::std::os::raw::c_int,
342    ) -> mpr_prop;
343    #[doc = " Remove a property from an object.\n  \\param object       The object to operate on.\n  \\param property     Symbolic identifier of the property to remove.\n  \\param key          The name of the property to remove.\n  \\return             1 if property has been removed, `0` otherwise."]
344    pub fn mpr_obj_remove_prop(
345        object: mpr_obj,
346        property: mpr_prop,
347        key: *const ::std::os::raw::c_char,
348    ) -> ::std::os::raw::c_int;
349    #[doc = " Push any staged property changes out to the distributed graph.\n  \\param object       The object to operate on."]
350    pub fn mpr_obj_push(object: mpr_obj);
351    #[doc = " Helper to print the properties of an object.\n  \\param object       The object to print.\n  \\param staged       1 to print staged properties, `0` otherwise."]
352    pub fn mpr_obj_print(object: mpr_obj, staged: ::std::os::raw::c_int);
353    #[doc = " Allocate and initialize a device.\n  \\param name         A short descriptive string to identify the device. Must not contain spaces\n                      or the slash character '/'.\n  \\param graph        A previously allocated graph structure to use. If 0, one will be allocated\n                      for use with this device.\n  \\return             A newly allocated device.  Should be freed using `mpr_dev_free()`."]
354    pub fn mpr_dev_new(name: *const ::std::os::raw::c_char, graph: mpr_graph) -> mpr_dev;
355    #[doc = " Remove a device from the graph and free its resources.\n  \\param device       The device to free."]
356    pub fn mpr_dev_free(device: mpr_dev);
357    #[doc = " Return a unique identifier associated with a given device.\n  \\param device       The device to use.\n  \\return             A new unique id."]
358    pub fn mpr_dev_generate_unique_id(device: mpr_dev) -> mpr_id;
359    #[doc = " Return the list of signals for a given device.\n  \\param device       The device to query.\n  \\param direction    The direction of the signals to return, should be `MPR_DIR_IN`,\n                      `MPR_DIR_OUT`, or `MPR_DIR_ANY`.\n  \\return             A list of results.  Use `mpr_list_get_next()` to iterate."]
360    pub fn mpr_dev_get_sigs(device: mpr_dev, direction: mpr_dir) -> mpr_list;
361    #[doc = " Return the list of maps for a given device.\n  \\param device       The device to query.\n  \\param direction    The direction of the maps to return, should be `MPR_DIR_IN`,\n                      `MPR_DIR_OUT`, or `MPR_DIR_ANY`.\n  \\return             A list of results.  Use `mpr_list_get_next()` to iterate."]
362    pub fn mpr_dev_get_maps(device: mpr_dev, direction: mpr_dir) -> mpr_list;
363    #[doc = " Poll this device for new messages.  Note, if you have multiple devices, the right thing to do\n  is call this function for each of them with `block_ms=0`, and add your own sleep if necessary.\n  \\param device       The device to check messages for.\n  \\param block_ms     Number of milliseconds to block waiting for messages, or `0` for\n                      non-blocking behaviour.\n  \\return             The number of handled messages. May be zero if there was nothing to do."]
364    pub fn mpr_dev_poll(device: mpr_dev, block_ms: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
365    #[doc = " Start automatically polling this device for new messages in a separate thread.\n  \\param device       The device to check messages for.\n  \\return             Zero if successful, less than zero otherwise."]
366    pub fn mpr_dev_start_polling(device: mpr_dev) -> ::std::os::raw::c_int;
367    #[doc = " Stop automatically polling this device for new messages in a separate thread.\n  \\param device       The device to check messages for.\n  \\return             Zero if successful, less than zero otherwise."]
368    pub fn mpr_dev_stop_polling(device: mpr_dev) -> ::std::os::raw::c_int;
369    #[doc = " Detect whether a device is completely initialized.\n  \\param device       The device to query.\n  \\return             Non-zero if device is completely initialized, i.e., has an allocated\n                      receiving port and unique identifier. Zero otherwise."]
370    pub fn mpr_dev_get_is_ready(device: mpr_dev) -> ::std::os::raw::c_int;
371    #[doc = " Get the current time for a device.\n  \\param device       The device to use.\n  \\return             The current time."]
372    pub fn mpr_dev_get_time(device: mpr_dev) -> mpr_time;
373    #[doc = " Set the time for a device. Use only if user code has access to a more accurate\n  timestamp than the operating system.\n  \\param device       The device to use.\n  \\param time         The time to set. This time will be used for tagging signal updates until\n                      the next occurrence `mpr_dev_set_time()` or `mpr_dev_poll()`."]
374    pub fn mpr_dev_set_time(device: mpr_dev, time: mpr_time);
375    #[doc = " Trigger map propagation for a given timestep. This function can be omitted if `mpr_dev_poll()`\n  is called each sampling timestep, however calling `mpr_dev_poll()` at a lower rate may be more\n  performant.\n  \\param device       The device to use."]
376    pub fn mpr_dev_update_maps(device: mpr_dev);
377    #[doc = " Allocate and initialize a signal.  Values and strings pointed to by this call will be copied.\n  For minimum and maximum values, type must match 'type' (if `type=MPR_INT32`, then `int*`, etc)\n  and length must match 'length' (i.e. a scalar if `length=1`, or an array with `length` elements).\n  \\param parent           The object to add a signal to.\n  \\param direction    \tThe signal direction.\n  \\param name             The name of the signal.\n  \\param length           The length of the signal vector, or `1` for a scalar.\n  \\param type             The type of the signal value.\n  \\param unit             The unit of the signal, or `NULL` for none.\n  \\param minimum          Pointer to a minimum value, or `NULL` for none.\n  \\param maximum          Pointer to a maximum value, or `NULL` for none.\n  \\param num_instances    Pointer to the number of signal instances, or `NULL` to indicate that\n                          instances will not be used.\n  \\param handler          Function to be called when the signal is updated, or `NULL` for none.\n  \\param events           Bitflags for types of events that should trigger the handler. Event\n                          types are listed in the enum `mpr_sig_evt` found in `mapper_constants.h`\n  \\return                 The new signal."]
378    pub fn mpr_sig_new(
379        parent: mpr_dev,
380        direction: mpr_dir,
381        name: *const ::std::os::raw::c_char,
382        length: ::std::os::raw::c_int,
383        type_: mpr_type,
384        unit: *const ::std::os::raw::c_char,
385        minimum: *const ::std::os::raw::c_void,
386        maximum: *const ::std::os::raw::c_void,
387        num_instances: *mut ::std::os::raw::c_int,
388        handler: mpr_sig_handler,
389        events: ::std::os::raw::c_int,
390    ) -> mpr_sig;
391    pub fn mpr_sig_free(signal: mpr_sig);
392    #[doc = " Update the value of a signal instance.  The signal will be routed according\n  to external requests.\n  \\param signal       The signal to operate on.\n  \\param instance     A pointer to the identifier of the instance to update,\n                      or `0` for the default instance.\n  \\param length       Length of the value argument. Expected to be equal to the signal length.\n  \\param type         Data type of the value argument.\n  \\param value        A pointer to a new value for this signal.  If the `type` argument is\n                      `MPR_INT32`, this should be `int*`; if the type argument is `MPR_FLOAT`,\n                      this should be `float*` (etc).  It should be an array at least as long as\n                      the `length` argument."]
393    pub fn mpr_sig_set_value(
394        signal: mpr_sig,
395        instance: mpr_id,
396        length: ::std::os::raw::c_int,
397        type_: mpr_type,
398        value: *const ::std::os::raw::c_void,
399    );
400    #[doc = " Get the value of a signal instance.\n  \\param signal       The signal to operate on.\n  \\param instance     A pointer to the identifier of the instance to query,\n                      or `0` for the default instance.\n  \\param time         A location to receive the value's time tag (Optional, pass `0` to ignore).\n  \\return             A pointer to an array containing the value of the signal\n                      instance, or `0` if the signal instance has no value."]
401    pub fn mpr_sig_get_value(
402        signal: mpr_sig,
403        instance: mpr_id,
404        time: *mut mpr_time,
405    ) -> *const ::std::os::raw::c_void;
406    #[doc = " Return the list of maps associated with a given signal.\n  \\param signal       Signal record to query for maps.\n  \\param direction    The direction of the map relative to the given signal.\n  \\return             A list of results.  Use `mpr_list_get_next()` to iterate."]
407    pub fn mpr_sig_get_maps(signal: mpr_sig, direction: mpr_dir) -> mpr_list;
408    #[doc = " Get the parent `mpr_dev` for a specific signal.\n  \\param signal       The signal to check.\n  \\return             The signal's parent device."]
409    pub fn mpr_sig_get_dev(signal: mpr_sig) -> mpr_dev;
410    #[doc = " Set or unset the message handler for a signal.\n  \\param signal       The signal to operate on.\n  \\param handler      A pointer to a `mpr_sig_handler` function for processing incoming messages.\n  \\param events       Bitflags for types of events we are interested in. Event types are listed\n                      in the enum `mpr_sig_evt` found in `mapper_constants.h`"]
411    pub fn mpr_sig_set_cb(signal: mpr_sig, handler: mpr_sig_handler, events: ::std::os::raw::c_int);
412    #[doc = " Allocate new instances and add them to the reserve list. Note that if instance ids are\n  specified, libmapper will not add multiple instances with the same id.\n  \\param signal       The signal to which the instances will be added.\n  \\param number       The number of instances to add.\n  \\param ids          Array of integer ids, one for each new instance,\n                      or `0` for automatically-generated instance ids.\n  \\param data         Array of user context pointers, one for each new instance,\n                      or `0` if not needed.\n  \\return             Number of instances added."]
413    pub fn mpr_sig_reserve_inst(
414        signal: mpr_sig,
415        number: ::std::os::raw::c_int,
416        ids: *mut mpr_id,
417        data: *mut *mut ::std::os::raw::c_void,
418    ) -> ::std::os::raw::c_int;
419    #[doc = " Release a specific instance of a signal by removing it from the list of\n  active instances and adding it to the reserve list.\n  \\param signal       The signal to operate on.\n  \\param instance     The identifier of the instance to suspend."]
420    pub fn mpr_sig_release_inst(signal: mpr_sig, instance: mpr_id);
421    #[doc = " Remove a specific instance of a signal and free its memory.\n  \\param signal       The signal to operate on.\n  \\param instance     The identifier of the instance to suspend."]
422    pub fn mpr_sig_remove_inst(signal: mpr_sig, instance: mpr_id);
423    #[doc = " Return whether a given signal instance is currently active.\n  \\param signal       The signal to operate on.\n  \\param instance     The identifier of the instance to check.\n  \\return             Non-zero if the instance is active, zero otherwise."]
424    pub fn mpr_sig_get_inst_is_active(signal: mpr_sig, instance: mpr_id) -> ::std::os::raw::c_int;
425    #[doc = " Activate a specific signal instance without setting it's value. In general it is not necessary\n  to use this function, since signal instances will be automatically activated as necessary when\n  signals are updated by `mpr_sig_set_value()` or through a map.\n  \\param signal       The signal to operate on.\n  \\param instance     The identifier of the instance to activate.\n  \\return             Non-zero if the instance is active, zero otherwise."]
426    pub fn mpr_sig_activate_inst(signal: mpr_sig, instance: mpr_id) -> ::std::os::raw::c_int;
427    #[doc = " Get the local identifier of the oldest active instance.\n  \\param signal       The signal to operate on.\n  \\return             The instance identifier, or zero if unsuccessful."]
428    pub fn mpr_sig_get_oldest_inst_id(signal: mpr_sig) -> mpr_id;
429    #[doc = " Get the local identifier of the newest active instance.\n  \\param signal       The signal to operate on.\n  \\return             The instance identifier, or zero if unsuccessful."]
430    pub fn mpr_sig_get_newest_inst_id(signal: mpr_sig) -> mpr_id;
431    #[doc = " Get a signal instance's identifier by its index.  Intended to be used for\n  iterating over the active instances.\n  \\param signal       The signal to operate on.\n  \\param index        The numerical index of the instance to retrieve.  Should be between zero\n                      and the number of instances.\n  \\param status       The status of the instances to search should be set to `MPR_STATUS_ACTIVE`,\n                      `MPR_STATUS_RESERVED`, or both (`MPR_STATUS_ACTIVE | MPR_STATUS_RESERVED`).\n  \\return             The instance identifier associated with the given index, or zero\n                      if unsuccessful."]
432    pub fn mpr_sig_get_inst_id(
433        signal: mpr_sig,
434        index: ::std::os::raw::c_int,
435        status: mpr_status,
436    ) -> mpr_id;
437    #[doc = " Associate a signal instance with an arbitrary pointer.\n  \\param signal       The signal to operate on.\n  \\param instance     The identifier of the instance to operate on.\n  \\param data         A pointer to user data to be associated with this instance."]
438    pub fn mpr_sig_set_inst_data(
439        signal: mpr_sig,
440        instance: mpr_id,
441        data: *const ::std::os::raw::c_void,
442    );
443    #[doc = " Retrieve the arbitrary pointer associated with a signal instance.\n  \\param signal       The signal to operate on.\n  \\param instance     The identifier of the instance to operate on.\n  \\return             A pointer associated with this instance."]
444    pub fn mpr_sig_get_inst_data(signal: mpr_sig, instance: mpr_id) -> *mut ::std::os::raw::c_void;
445    #[doc = " Get the number of instances for a specific signal.\n  \\param signal       The signal to check.\n  \\param status       The status of the instances to search should be set to `MPR_STATUS_ACTIVE`,\n                      `MPR_STATUS_RESERVED`, or both (`MPR_STATUS_ACTIVE | MPR_STATUS_RESERVED`).\n  \\return             The number of allocated signal instances matching the specified status."]
446    pub fn mpr_sig_get_num_inst(signal: mpr_sig, status: mpr_status) -> ::std::os::raw::c_int;
447    #[doc = " Get the status of a signal instance.\n  \\param signal       The signal to check.\n  \\param instance     The identifier of the instance to check.\n  \\return             The status of the signal instance returned as bitflags. Test the return\n                      value against the constants defined in the enum `mpr_sig_inst_status`"]
448    pub fn mpr_sig_get_inst_status(arg1: mpr_sig, instance: mpr_id) -> ::std::os::raw::c_int;
449    #[doc = " Create a map between a set of signals. The map will not take effect until it\n  has been added to the distributed graph using `mpr_obj_push()`.\n  \\param num_sources      The number of source signals in this map.\n  \\param sources          Array of source signal data structures.\n  \\param num_destinations The number of destination signals in this map.\n                          Currently restricted to `1`.\n  \\param destinations     Array of destination signal data structures.\n  \\return                 A map data structure – either loaded from the graph (if the map already\n                          existed) or newly created. In the latter case the map will not take\n                          effect until it has been added to the distributed graph using\n                          `mpr_obj_push()`."]
450    pub fn mpr_map_new(
451        num_sources: ::std::os::raw::c_int,
452        sources: *const mpr_sig,
453        num_destinations: ::std::os::raw::c_int,
454        destinations: *const mpr_sig,
455    ) -> mpr_map;
456    #[doc = " Create a map between a set of signals using an expression string containing embedded format\n  specifiers that are replaced by `mpr_sig` values specified in subsequent additional arguments.\n  The map will not take effect until it has been added to the distributed graph using\n  `mpr_obj_push()`.\n  \\param expression   A string specifying the map expression to use when mapping source to\n                      destination signals. The format specifier \"%x\" is used to specify source\n                      signals and the \"%y\" is used to specify the destination signal.\n  \\param ...          A sequence of additional `mpr_sig` arguments, one for each format specifier\n                      in the format string\n  \\return             A map data structure – either loaded from the graph (if the map already\n                      existed) or newly created. Changes to the map will not take effect until it\n                      has been added to the distributed graph using `mpr_obj_push()`."]
457    pub fn mpr_map_new_from_str(expression: *const ::std::os::raw::c_char, ...) -> mpr_map;
458    #[doc = " Remove a map between a set of signals.\n  \\param map          The map to destroy."]
459    pub fn mpr_map_release(map: mpr_map);
460    #[doc = " Retrieve a list of connected signals for a specific map.\n  \\param map          The map to check.\n  \\param endpoint     The map endpoint, must be `MPR_LOC_SRC`, `MPR_LOC_DST`, or `MPR_LOC_ANY`.\n  \\return             A list of results.  Use `mpr_list_get_next()` to iterate."]
461    pub fn mpr_map_get_sigs(map: mpr_map, endpoint: mpr_loc) -> mpr_list;
462    #[doc = " Retrieve the index for a specific map signal.\n  \\param map          The map to check.\n  \\param signal       The signal to find.\n  \\return             The signal index, or `-1` if not found."]
463    pub fn mpr_map_get_sig_idx(map: mpr_map, signal: mpr_sig) -> ::std::os::raw::c_int;
464    #[doc = " Detect whether a map is completely initialized.\n  \\param map          The device to query.\n  \\return             Non-zero if map is completely initialized, zero otherwise."]
465    pub fn mpr_map_get_is_ready(map: mpr_map) -> ::std::os::raw::c_int;
466    #[doc = " Re-create stale map if necessary.\n  \\param map          The map to operate on."]
467    pub fn mpr_map_refresh(map: mpr_map);
468    #[doc = " Add a scope to this map. Map scopes configure the propagation of signal instance updates across\n  the map. Changes to remote maps will not take effect until synchronized with the distributed\n  graph using `mpr_obj_push()`.\n  \\param map          The map to modify.\n  \\param device       Device to add as a scope for this map. After taking effect, this setting\n                      will cause instance updates originating at this device to be propagated\n                      across the map."]
469    pub fn mpr_map_add_scope(map: mpr_map, device: mpr_dev);
470    #[doc = " Remove a scope from this map. Map scopes configure the propagation of signal instance updates\n  across the map. Changes to remote maps will not take effect until synchronized with the\n  distributed graph using `mpr_obj_push()`.\n  \\param map          The map to modify.\n  \\param device       Device to remove as a scope for this map. After taking effect, this setting\n                      will cause instance updates originating at this device to be blocked from\n                      propagating across the map."]
471    pub fn mpr_map_remove_scope(map: mpr_map, device: mpr_dev);
472    #[doc = " Filter a list of objects using the given property.\n  \\param list         The list of objects to filter.\n  \\param property     Symbolic identifier of the property to look for.\n  \\param key          The name of the property to search for.\n  \\param length       The value length.\n  \\param type         The value type. Comparisons for object types (MPR_OBJ, MPR_DEV, etc.) are\n                      performed using the object id and therefore should only be used when\n                      filtering registered objects (e.g. remote objects stored in the graph or\n                      local objects that have completed registration). This means that duplicate\n                      representations of the same object stored in different graphs will be equal.\n                      If comparison of local object representations is desired use the MPR_PTR\n                      type instead.\n  \\param value        The value.\n  \\param op           The comparison operator.\n  \\return             A list of results.  Use `mpr_list_get_next()` to iterate."]
473    pub fn mpr_list_filter(
474        list: mpr_list,
475        property: mpr_prop,
476        key: *const ::std::os::raw::c_char,
477        length: ::std::os::raw::c_int,
478        type_: mpr_type,
479        value: *const ::std::os::raw::c_void,
480        op: mpr_op,
481    ) -> mpr_list;
482    #[doc = " Get the union of two object lists (objects matching list1 OR list2).\n  \\param list1        The first object list.\n  \\param list2        The second object list.\n  \\return             A list of results.  Use `mpr_list_get_next()` to iterate."]
483    pub fn mpr_list_get_union(list1: mpr_list, list2: mpr_list) -> mpr_list;
484    #[doc = " Get the intersection of two object lists (objects matching list1 AND list2).\n  \\param list1        The first object list.\n  \\param list2        The second object list.\n  \\return             A list of results.  Use `mpr_list_get_next()` to iterate."]
485    pub fn mpr_list_get_isect(list1: mpr_list, list2: mpr_list) -> mpr_list;
486    #[doc = " Get the difference between two object lists (objects in list1 but NOT list2).\n  \\param list1        The first object list.\n  \\param list2        The second object list.\n  \\return             A list of results.  Use `mpr_list_get_next()` to iterate."]
487    pub fn mpr_list_get_diff(list1: mpr_list, list2: mpr_list) -> mpr_list;
488    #[doc = " Get an indexed item in a list of objects.\n  \\param list         The object list to query.\n  \\param index        The index of the list element to retrieve.\n  \\return             A pointer to the object record, or zero if it doesn't exist."]
489    pub fn mpr_list_get_idx(list: mpr_list, index: ::std::os::raw::c_uint) -> mpr_obj;
490    #[doc = " Given an object list returned from a previous object query, get the next item.\n  \\param list         The object list to query.\n  \\return             A list of results.  Use `mpr_list_get_next()` to iterate."]
491    pub fn mpr_list_get_next(list: mpr_list) -> mpr_list;
492    #[doc = " Copy a previously-constructed object list.\n  \\param list         The object list to copy.\n  \\return             A copy of the initial list.  Use `mpr_list_get_next()` to iterate."]
493    pub fn mpr_list_get_cpy(list: mpr_list) -> mpr_list;
494    #[doc = " Given an object list returned from a previous object query,\n  indicate that we are done iterating.\n  \\param list         The object list to free."]
495    pub fn mpr_list_free(list: mpr_list);
496    #[doc = " Return the number of objects in a previous object query list.\n  \\param list         The object list to query.\n  \\return             The number of objects in the list."]
497    pub fn mpr_list_get_size(list: mpr_list) -> ::std::os::raw::c_int;
498    #[doc = " Print the contents of an object list returned from a previous object query.\n  \\param list         The object list to print."]
499    pub fn mpr_list_print(list: mpr_list);
500    #[doc = " Create a peer in the distributed graph.\n  \\param autosubscribe_types  A combination of `mpr_type` values controlling whether the graph\n                              should automatically subscribe to information about devices,\n                              signals and/or maps when it encounters a previously-unseen device.\n  \\return                     The new graph."]
501    pub fn mpr_graph_new(autosubscribe_types: ::std::os::raw::c_int) -> mpr_graph;
502    #[doc = " Specify network interface to use.\n  \\param graph        The graph structure to use.\n  \\param iface        The name of the network interface to use.\n  \\return             Zero if successful, non-zero otherwise."]
503    pub fn mpr_graph_set_interface(
504        graph: mpr_graph,
505        iface: *const ::std::os::raw::c_char,
506    ) -> ::std::os::raw::c_int;
507    #[doc = " Return a string indicating the name of the network interface in use.\n  The returned value belongs to the graph and should not be modified or freed.\n  \\param graph        The graph structure to query.\n  \\return             A string containing the name of the network interface."]
508    pub fn mpr_graph_get_interface(graph: mpr_graph) -> *const ::std::os::raw::c_char;
509    #[doc = " Set the multicast group and port to use.\n  \\param graph        The graph structure to query.\n  \\param group        A string specifying the multicast group for bus communication with the\n                      distributed graph.\n  \\param port         The port to use for multicast communication.\n  \\return             Zero if successful, non-zero otherwise."]
510    pub fn mpr_graph_set_address(
511        graph: mpr_graph,
512        group: *const ::std::os::raw::c_char,
513        port: ::std::os::raw::c_int,
514    ) -> ::std::os::raw::c_int;
515    #[doc = " Retrieve the multicast group currently in use.\n  The returned value belongs to the graph and should not be modified or freed.\n  \\param graph        The graph structure to query.\n  \\return             A string specifying the multicast URL for bus communication with the\n                      distributed graph."]
516    pub fn mpr_graph_get_address(graph: mpr_graph) -> *const ::std::os::raw::c_char;
517    #[doc = " Synchronize a local graph copy with the distributed graph.\n  \\param graph        The graph to update.\n  \\param block_ms     The number of milliseconds to block, or `0` for non-blocking behaviour.\n  \\return             The number of handled messages."]
518    pub fn mpr_graph_poll(
519        graph: mpr_graph,
520        block_ms: ::std::os::raw::c_int,
521    ) -> ::std::os::raw::c_int;
522    #[doc = " Start automatically synchronizing a local graph copy in a separate thread.\n  \\param graph        The graph to update.\n  \\return             Zero if successful, less than zero otherwise."]
523    pub fn mpr_graph_start_polling(graph: mpr_graph) -> ::std::os::raw::c_int;
524    #[doc = " Stop automatically synchronizing a local graph copy in a separate thread.\n  \\param graph        The graph to update.\n  \\return             Zero if successful, less than zero otherwise."]
525    pub fn mpr_graph_stop_polling(graph: mpr_graph) -> ::std::os::raw::c_int;
526    #[doc = " Free a graph.\n  \\param graph        The graph to free."]
527    pub fn mpr_graph_free(graph: mpr_graph);
528    #[doc = " Subscribe to receive information from remote objects.\n  \\param graph        The graph to use.\n  \\param device       The device of interest. If `NULL` the graph will automatically subscribe to\n                      all discovered devices.\n  \\param types        Bitflags setting the type of information of interest.\n                      Can be a combination of `mpr_type` values.\n  \\param timeout      The length in seconds for this subscription. If set to `-1`, the graph will\n                      automatically renew the subscription until it is freed or this function is\n                      called again."]
529    pub fn mpr_graph_subscribe(
530        graph: mpr_graph,
531        device: mpr_dev,
532        types: ::std::os::raw::c_int,
533        timeout: ::std::os::raw::c_int,
534    );
535    #[doc = " Unsubscribe from information from remote objects.\n  \\param graph        The graph to use.\n  \\param device       The device of interest. If NULL the graph will\n                      unsubscribe from all devices."]
536    pub fn mpr_graph_unsubscribe(graph: mpr_graph, device: mpr_dev);
537    #[doc = " Register a callback for when an object record is added or updated in the graph.\n  \\param graph        The graph to query.\n  \\param handler      Callback function.\n  \\param types        Bitflags setting the type of information of interest.\n                      Can be a combination of `mpr_type` values.\n  \\param data         A user-defined pointer to be passed to the callback for context.\n  \\return             One if a callback was added, otherwise zero."]
538    pub fn mpr_graph_add_cb(
539        graph: mpr_graph,
540        handler: mpr_graph_handler,
541        types: ::std::os::raw::c_int,
542        data: *const ::std::os::raw::c_void,
543    ) -> ::std::os::raw::c_int;
544    #[doc = " Remove an object record callback from the graph service.\n  \\param graph        The graph to query.\n  \\param handler      Callback function.\n  \\param data         The user context pointer that was originally specified\n                      when adding the callback.\n  \\return             User data pointer associated with this callback (if any)."]
545    pub fn mpr_graph_remove_cb(
546        graph: mpr_graph,
547        handler: mpr_graph_handler,
548        data: *const ::std::os::raw::c_void,
549    ) -> *mut ::std::os::raw::c_void;
550    #[doc = " Return a list of objects.\n  \\param graph        The graph to query.\n  \\param types        Bitflags setting the type of information of interest. Currently restricted\n                      to a single object type.\n  \\return             A list of results.  Use `mpr_list_get_next()` to iterate."]
551    pub fn mpr_graph_get_list(graph: mpr_graph, types: ::std::os::raw::c_int) -> mpr_list;
552    #[doc = " Retrieve a specific object from the graph by id.\n  \\param graph        The graph to query.\n  \\param type         The type of object to search for. Use `MPR_OBJ` if the type is not known.\n  \\param id           Unique id identifying the object to find in the graph.\n  \\return             The object matching the query, or zero if not found."]
553    pub fn mpr_graph_get_obj(graph: mpr_graph, id: mpr_id, type_: mpr_type) -> mpr_obj;
554    #[doc = " Add a time to another given time.\n  \\param augend       A previously allocated time to augment.\n  \\param addend       A time to add."]
555    pub fn mpr_time_add(augend: *mut mpr_time, addend: mpr_time);
556    #[doc = " Add a double-precision floating point value to another given time.\n  \\param augend       A previously allocated time to augment.\n  \\param addend       A value in seconds to add."]
557    pub fn mpr_time_add_dbl(augend: *mut mpr_time, addend: f64);
558    #[doc = " Subtract a time from another given time.\n  \\param minuend      A previously allocated time to augment.\n  \\param subtrahend   A time to add to subtract."]
559    pub fn mpr_time_sub(minuend: *mut mpr_time, subtrahend: mpr_time);
560    #[doc = " Add a double-precision floating point value to another given time.\n  \\param time         A previously allocated time to multiply.\n  \\param multiplicand A value in seconds."]
561    pub fn mpr_time_mul(time: *mut mpr_time, multiplicand: f64);
562    #[doc = " Return value of a `mpr_time` as a double-precision floating point value.\n  \\param time         The time to read.\n  \\return             Value of the time as a double-precision float."]
563    pub fn mpr_time_as_dbl(time: mpr_time) -> f64;
564    #[doc = " Set value of a `mpr_time` from a double-precision floating point value.\n  \\param time         A previously-allocated time to set.\n  \\param value        The value in seconds to set."]
565    pub fn mpr_time_set_dbl(time: *mut mpr_time, value: f64);
566    #[doc = " Copy value of a `mpr_time`.\n  \\param timel        The target time for copying.\n  \\param timer        The source time."]
567    pub fn mpr_time_set(timel: *mut mpr_time, timer: mpr_time);
568    #[doc = " Compare two timetags, returning zero if they all match or a value different from zero\n  representing which is greater if they do not.\n  \\param time1        A previously allocated time to augment.\n  \\param time2        A time to add.\n  \\return             `<0` if `time1 < time2`; `0` if `time1 == time2`; `>0` if `time1 > time2`."]
569    pub fn mpr_time_cmp(time1: mpr_time, time2: mpr_time) -> ::std::os::raw::c_int;
570    #[doc = " Helper to print a libmapper timetag\n  \\param time         The timetag to print."]
571    pub fn mpr_time_print(time: mpr_time);
572    #[doc = " Get the version of libmapper.\n  \\return             A string specifying the version of libmapper."]
573    pub fn mpr_get_version() -> *const ::std::os::raw::c_char;
574}