Monado OpenXR Runtime
Loading...
Searching...
No Matches
monado.h
Go to the documentation of this file.
1// Copyright 2019-2023, Collabora, Ltd.
2// Copyright 2025-2026, NVIDIA CORPORATION.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief Interface of libmonado
7 * @author Jakob Bornecrantz <jakob@collabora.com>
8 * @author Rylie Pavlik <rylie.pavlik@collabora.com>
9 */
10
11#include <stdint.h>
12#include <stdbool.h>
13
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19
20/*
21 *
22 * Enums, defines and objects.
23 *
24 */
25
26//! Major version of the API.
27#define MND_API_VERSION_MAJOR 1
28//! Minor version of the API.
29#define MND_API_VERSION_MINOR 7
30//! Patch version of the API.
31#define MND_API_VERSION_PATCH 0
32
33/*!
34 * Result codes for operations, negative are errors, zero or positives are
35 * success.
36 */
37typedef enum mnd_result
38{
39 MND_SUCCESS = 0,
40 MND_ERROR_INVALID_VERSION = -1,
41 MND_ERROR_INVALID_VALUE = -2,
42 MND_ERROR_CONNECTING_FAILED = -3,
43 MND_ERROR_OPERATION_FAILED = -4,
44 //! Supported in version 1.1 and above.
46 //! Supported in version 1.2 and above.
48 //! Supported in version 1.3 and above.
50 //! Supported in version 1.5 and above.
53
54/*!
55 * Bitflags for client application state.
56 */
57typedef enum mnd_client_flags
58{
59 MND_CLIENT_PRIMARY_APP = (1u << 0u),
60 MND_CLIENT_SESSION_ACTIVE = (1u << 1u),
61 MND_CLIENT_SESSION_VISIBLE = (1u << 2u),
62 MND_CLIENT_SESSION_FOCUSED = (1u << 3u),
63 MND_CLIENT_SESSION_OVERLAY = (1u << 4u),
64 //! @deprecated Deprecated in version 1.6.
66 //! Supported in version 1.6 and above.
68 //! Supported in version 1.6 and above.
70 //! Supported in version 1.6 and above.
72 //! Supported in version 1.6 and above.
75
76/*!
77 * A property to get from a thing (currently only devices).
78 *
79 * Supported in version 1.2 and above.
80 */
81typedef enum mnd_property
82{
83 //! Supported in version 1.2 and above.
85 //! Supported in version 1.2 and above.
87 //! Supported in version 1.4.0 and above.
89 //! Supported in version 1.4.0 and above.
91 //! Supported in version 1.4.0 and above.
93 //! Supported in version 1.5.0 and above.
96
97/*!
98 * Opaque type for libmonado state
99 */
100typedef struct mnd_root mnd_root_t;
101
102/*!
103 * A pose composed of a position and orientation.
104 */
105typedef struct mnd_pose
106{
107 struct
108 {
109 float x, y, z, w;
110 } orientation;
111 struct
112 {
113 float x, y, z;
114 } position;
116
117
118/*!
119 * A 3 element colour with floating point channels.
120 */
122{
123 float r;
124 float g;
125 float b;
126};
127
128/*!
129 * A 3 element HSV colour with floating point channels.
130 * All values are in [0, 1] range, with hue wrapping at 1.
131 */
133{
134 float h;
135 float s;
136 float v;
137};
138
139/*!
140 * Types of reference space.
141 */
143{
144 MND_SPACE_REFERENCE_TYPE_VIEW,
145 MND_SPACE_REFERENCE_TYPE_LOCAL,
146 MND_SPACE_REFERENCE_TYPE_LOCAL_FLOOR,
147 MND_SPACE_REFERENCE_TYPE_STAGE,
148 MND_SPACE_REFERENCE_TYPE_UNBOUNDED,
150
151/*!
152 * Bitflags for IO blocking.
153 *
154 * Bitflags are only to be used here, this should not be used as a template
155 * for future libmonado interfaces.
156 *
157 * Supported in version 1.6.0 and above.
158 */
160{
161 MND_IO_BLOCK_POSES = (1u << 0u),
162 MND_IO_BLOCK_HT = (1u << 1u),
163 MND_IO_BLOCK_INPUTS = (1u << 2u),
164 MND_IO_BLOCK_OUTPUTS = (1u << 3u),
166
167/*
168 *
169 * Functions
170 *
171 */
172
173/*!
174 * Returns the version of the API (not Monado itself), follows the versioning
175 * semantics of https://semver.org/ standard. In short if the major version
176 * mismatch then the interface is incompatible.
177 *
178 * @param[out] out_major Major version number, must be valid pointer.
179 * @param[out] out_minor Minor version number, must be valid pointer.
180 * @param[out] out_patch Patch version number, must be valid pointer.
181 *
182 * Always succeeds, or crashes if any pointer isn't valid.
183 */
184void
185mnd_api_get_version(uint32_t *out_major, uint32_t *out_minor, uint32_t *out_patch);
186
187/*!
188 * Create libmonado state and connect to service
189 *
190 * @param[out] out_root Address to populate with the opaque state type.
191 * @return MND_SUCCESS on success
192 */
194mnd_root_create(mnd_root_t **out_root);
195
196/*!
197 * Destroy libmonado state, disconnecting from the service, and zeroing the
198 * pointer.
199 *
200 * @param root_ptr Pointer to your libmonado state. Null-checked, will be set to null.
201 */
202void
203mnd_root_destroy(mnd_root_t **root_ptr);
204
205/*!
206 * Update our local cached copy of the client list
207 *
208 * @param root The libmonado state.
209 * @return MND_SUCCESS on success
210 */
213
214/*!
215 * Get the number of active clients
216 *
217 * This value only changes on calls to @ref mnd_root_update_client_list
218 *
219 * @param root The libmonado state.
220 * @param[out] out_num Pointer to value to populate with the number of clients.
221 *
222 * @pre Called @ref mnd_root_update_client_list at least once
223 *
224 * @return MND_SUCCESS on success
225 */
227mnd_root_get_number_clients(mnd_root_t *root, uint32_t *out_num);
228
229/*!
230 * Get the id from the current client list.
231 *
232 * @param root The libmonado state.
233 * @param index Index to retrieve id for.
234 * @param[out] out_client_id Pointer to value to populate with the id at the given index.
235 */
237mnd_root_get_client_id_at_index(mnd_root_t *root, uint32_t index, uint32_t *out_client_id);
238
239/*!
240 * Get the name of the client at the given index.
241 *
242 * The string returned is only valid until the next call into libmonado.
243 *
244 * @param root The libmonado state.
245 * @param client_id ID of client to retrieve name from.
246 * @param[out] out_name Pointer to populate with the client name.
247 *
248 * @pre Called @ref mnd_root_update_client_list at least once
249 *
250 * @return MND_SUCCESS on success
251 */
253mnd_root_get_client_name(mnd_root_t *root, uint32_t client_id, const char **out_name);
254
255/*!
256 * Get the state flags of the client at the given index.
257 *
258 * This result only changes on calls to @ref mnd_root_update_client_list
259 *
260 * @param root The libmonado state.
261 * @param client_id ID of client to retrieve flags from.
262 * @param[out] out_flags Pointer to populate with the flags, a bitwise combination of @ref mnd_client_flags.
263 *
264 * @pre Called @ref mnd_root_update_client_list at least once
265 *
266 * @return MND_SUCCESS on success
267 */
269mnd_root_get_client_state(mnd_root_t *root, uint32_t client_id, uint32_t *out_flags);
270
271/*!
272 * Set the client at the given index as "primary".
273 *
274 * @param root The libmonado state.
275 * @param client_id ID of the client set as primary.
276 *
277 * @pre Called @ref mnd_root_update_client_list at least once
278 *
279 * @return MND_SUCCESS on success
280 */
282mnd_root_set_client_primary(mnd_root_t *root, uint32_t client_id);
283
284/*!
285 * Set the client at the given index as "focused".
286 *
287 * @param root The libmonado state.
288 * @param client_id ID of the client set as focused.
289 *
290 * @pre Called @ref mnd_root_update_client_list at least once
291 *
292 * @return MND_SUCCESS on success
293 */
295mnd_root_set_client_focused(mnd_root_t *root, uint32_t client_id);
296
297/*!
298 * Toggle io activity for the client at the given index.
299 *
300 * @deprecated Deprecated in version 1.6.
301 *
302 * @param root The libmonado state.
303 * @param client_id ID of the client to toggle IO for.
304 *
305 * @pre Called @ref mnd_root_update_client_list at least once
306 *
307 * @return MND_SUCCESS on success
308 */
310mnd_root_toggle_client_io_active(mnd_root_t *root, uint32_t client_id);
311
312/*!
313 * Block certain types of IO for the client at the given index.
314 *
315 * Supported in version 1.6 and above.
316 *
317 * @param root The libmonado state.
318 * @param client_id ID of the client to block IO for.
319 * @param block_flags Which types of IO to block.
320 */
322mnd_root_set_client_io_blocks(mnd_root_t *root, uint32_t client_id, mnd_io_block_flags_t block_flags);
323
324/*!
325 * Get the number of devices
326 *
327 * @param root The libmonado state.
328 * @param[out] out_device_count Pointer to value to populate with the number of devices.
329 *
330 * @return MND_SUCCESS on success
331 */
333mnd_root_get_device_count(mnd_root_t *root, uint32_t *out_device_count);
334
335/*!
336 * Get boolean property for the device at the given index.
337 *
338 * Supported in version 1.2 and above.
339 *
340 * @param root The libmonado state.
341 * @param device_index Index of device to retrieve name from.
342 * @param prop A boolean property enum.
343 * @param[out] out_bool Pointer to populate with the boolean.
344 *
345 * @return MND_SUCCESS on success
346 */
348mnd_root_get_device_info_bool(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, bool *out_bool);
349
350/*!
351 * Get int32_t property for the device at the given index.
352 *
353 * Supported in version 1.2 and above.
354 *
355 * @param root The libmonado state.
356 * @param device_index Index of device to retrieve name from.
357 * @param prop A int32_t property enum.
358 * @param[out] out_i32 Pointer to populate with the int32_t.
359 *
360 * @return MND_SUCCESS on success
361 */
363mnd_root_get_device_info_i32(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, uint32_t *out_i32);
364
365/*!
366 * Get uint32_t property for the device at the given index.
367 *
368 * Supported in version 1.2 and above.
369 *
370 * @param root The libmonado state.
371 * @param device_index Index of device to retrieve name from.
372 * @param prop A uint32_t property enum.
373 * @param[out] out_u32 Pointer to populate with the uint32_t.
374 *
375 * @return MND_SUCCESS on success
376 */
378mnd_root_get_device_info_u32(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, uint32_t *out_u32);
379
380/*!
381 * Get float property for the device at the given index.
382 *
383 * Supported in version 1.2 and above.
384 *
385 * @param root The libmonado state.
386 * @param device_index Index of device to retrieve name from.
387 * @param prop A float property enum.
388 * @param[out] out_float Pointer to populate with the float.
389 *
390 * @return MND_SUCCESS on success
391 */
393mnd_root_get_device_info_float(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, float *out_float);
394
395/*!
396 * Get string property for the device at the given index.
397 *
398 * Supported in version 1.2 and above.
399 *
400 * @param root The libmonado state.
401 * @param device_index Index of device to retrieve name from.
402 * @param prop A string property enum.
403 * @param[out] out_string Pointer to populate with the string.
404 *
405 * @return MND_SUCCESS on success
406 */
408mnd_root_get_device_info_string(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, const char **out_string);
409
410/*!
411 * Get device info at the given index.
412 *
413 * @deprecated Deprecated in version 1.2, scheduled for removal in version 2.0.0 currently.
414 *
415 * @param root The libmonado state.
416 * @param device_index Index of device to retrieve name from.
417 * @param[out] out_device_id Pointer to value to populate with the device id at the given index.
418 * @param[out] out_dev_name Pointer to populate with the device name.
419 *
420 * @return MND_SUCCESS on success
421 */
423mnd_root_get_device_info(mnd_root_t *root, uint32_t device_index, uint32_t *out_device_id, const char **out_dev_name);
424
425/*!
426 * Get the device index associated for a given role name.
427 *
428 *
429 * @param root The libmonado state.
430 * @param role_name Name of the role. Possible values are:
431 * - "head"
432 * - "left"
433 * - "right"
434 * - "gamepad"
435 * - "eyes"
436 * - "hand-tracking-unobstructed-[left|right]"
437 * - "hand-tracking-conforming-[left|right]"
438 *
439 * **DEPRECATED**: The role names "hand-tracking-[left|right]"
440 * are deprecated as of v1.5. They now map to
441 * "hand-tracking-unobstructed-[left|right]" and are
442 * scheduled for removal in v2.0.
443 *
444 * @param[out] out_index Pointer to value to populate with the device index
445 * associated with given role name, -1 if not role is set.
446 *
447 * @return MND_SUCCESS on success
448 */
450mnd_root_get_device_from_role(mnd_root_t *root, const char *role_name, int32_t *out_index);
451
452/*!
453 * Trigger a recenter of the local spaces.
454 *
455 * Supported in version 1.1 and above.
456 *
457 * @param root The libmonado state.
458 *
459 * @return MND_SUCCESS on success
460 */
463
464/*!
465 * Get the current offset value of the specified reference space.
466 *
467 * Supported in version 1.3 and above.
468 *
469 * @param root The libmonado state.
470 * @param type The reference space.
471 * @param[out] out_offset A pointer to where the offset should be written.
472 *
473 * @return MND_SUCCESS on success
474 */
477
478/*!
479 * Apply an offset to the specified reference space.
480 *
481 * Supported in version 1.3 and above.
482 *
483 * @param root The libmonado state.
484 * @param type The reference space.
485 * @param offset A pointer to valid xrt_pose.
486 *
487 * @return MND_SUCCESS on success
488 */
491
492/*!
493 * Read the current offset of a tracking origin.
494 *
495 * Supported in version 1.3 and above.
496 *
497 * @param root The libmonado state.
498 * @param origin_index The index of the tracking origin into the internal list.
499 * @param[out] out_offset A pointer to where the offset should be written.
500 *
501 * @return MND_SUCCESS on success
502 */
504mnd_root_get_tracking_origin_offset(mnd_root_t *root, uint32_t origin_index, mnd_pose_t *out_offset);
505
506/*!
507 * Apply an offset to the specified tracking origin.
508 *
509 * Supported in version 1.3 and above.
510 *
511 * @param root The libmonado state.
512 * @param origin_index The index of the tracking origin into the internal list.
513 * @param offset A pointer to valid xrt_pose.
514 *
515 * @return MND_SUCCESS on success
516 */
518mnd_root_set_tracking_origin_offset(mnd_root_t *root, uint32_t origin_index, const mnd_pose_t *offset);
519
520/*!
521 * Retrieve the number of tracking origins available.
522 *
523 * Supported in version 1.3 and above.
524 *
525 * @param root The libmonado state.
526 * @param out_track_count Pointer to where the count should be written.
527 *
528 * @return MND_SUCCESS on success
529 */
531mnd_root_get_tracking_origin_count(mnd_root_t *root, uint32_t *out_track_count);
532
533/*!
534 * Retrieve the name of the indicated tracking origin.
535 *
536 * Supported in version 1.3 and above.
537 *
538 * @param root The libmonado state.
539 * @param origin_index The index of the tracking origin into the internal list.
540 * @param out_string The pointer to write the name's pointer to.
541 *
542 * @return MND_SUCCESS on success
543 */
545mnd_root_get_tracking_origin_name(mnd_root_t *root, uint32_t origin_index, const char **out_string);
546
547/*!
548 * Get battery status of a device.
549 *
550 * @param root The libmonado state.
551 * @param device_index Index of device to retrieve battery info from.
552 * @param[out] out_present Pointer to value to populate with whether the device provides battery status info.
553 * @param[out] out_charging Pointer to value to populate with whether the device is currently being charged.
554 * @param[out] out_charge Pointer to value to populate with the battery charge as a value between 0 and 1.
555 *
556 * @return MND_SUCCESS on success
557 */
560 mnd_root_t *root, uint32_t device_index, bool *out_present, bool *out_charging, float *out_charge);
561
562/*!
563 * Get current brightness of a display device.
564 *
565 * @param root The libmonado state.
566 * @param device_index Index of device to retrieve brightness from.
567 * @param[out] out_brightness Pointer to value to populate with the current device brightness, where 0 is 0%, and 1 is
568 * 100%.
569 *
570 * @return MND_SUCCESS on success
571 */
573mnd_root_get_device_brightness(mnd_root_t *root, uint32_t device_index, float *out_brightness);
574
575/*!
576 * @brief Set the display brightness.
577 *
578 * @param root The libmonado state.
579 * @param device_index Index of device to retrieve battery info from.
580 * @param[in] brightness Desired display brightness, usually between 0 and 1. Some devices may
581 * allow exceeding 1 if the supported range exceeds 100%, but it will be clamped to
582 * the supported range.
583 * @param[in] relative Whether to add \a brightness to the current brightness, instead of overwriting
584 * the current brightness.
585 *
586 * @return MND_SUCCESS on success
587 */
589mnd_root_set_device_brightness(mnd_root_t *root, uint32_t device_index, float brightness, bool relative);
590
591/*!
592 * Set the chroma key parameters to be applied to the base application (if there is any).
593 *
594 * HSV values are in [0, 1] range. Hue wrapping is supported (min > max spans across 0).
595 * Set curve to 0 to disable chroma keying.
596 *
597 * @param root The libmonado state.
598 * @param hsv_min Minimum HSV bounds (hue, saturation, value).
599 * @param hsv_max Maximum HSV bounds (hue, saturation, value).
600 * @param curve Power curve for alpha falloff (1.0 = linear, <1 = softer, >1 = harder, 0 = disabled).
601 * @param despill Despill strength (0.0 = none, 1.0 = full desaturation near key color).
602 *
603 * @return MND_SUCCESS on success
604 */
607 mnd_root_t *root, struct mnd_colour_hsv hsv_min, struct mnd_colour_hsv hsv_max, float curve, float despill);
608
609#ifdef __cplusplus
610}
611#endif
mnd_result_t mnd_root_get_tracking_origin_name(mnd_root_t *root, uint32_t origin_index, const char **out_string)
Retrieve the name of the indicated tracking origin.
Definition monado.c:678
mnd_result_t mnd_root_create(mnd_root_t **out_root)
Create libmonado state and connect to service.
Definition monado.c:200
mnd_result_t mnd_root_get_device_info_bool(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, bool *out_bool)
Get boolean property for the device at the given index.
Definition monado.c:424
mnd_result_t mnd_root_get_device_info_string(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, const char **out_string)
Get string property for the device at the given index.
Definition monado.c:492
mnd_result
Result codes for operations, negative are errors, zero or positives are success.
Definition monado.h:38
@ MND_ERROR_INVALID_PROPERTY
Supported in version 1.2 and above.
Definition monado.h:47
@ MND_ERROR_UNSUPPORTED_OPERATION
Supported in version 1.5 and above.
Definition monado.h:51
@ MND_ERROR_INVALID_OPERATION
Supported in version 1.3 and above.
Definition monado.h:49
@ MND_ERROR_RECENTERING_NOT_SUPPORTED
Supported in version 1.1 and above.
Definition monado.h:45
void mnd_api_get_version(uint32_t *out_major, uint32_t *out_minor, uint32_t *out_patch)
Returns the version of the API (not Monado itself), follows the versioning semantics of https://semve...
Definition monado.c:185
enum mnd_result mnd_result_t
Result codes for operations, negative are errors, zero or positives are success.
mnd_result_t mnd_root_get_client_state(mnd_root_t *root, uint32_t client_id, uint32_t *out_flags)
Get the state flags of the client at the given index.
Definition monado.c:317
mnd_result_t mnd_root_set_chroma_key_params(mnd_root_t *root, struct mnd_colour_hsv hsv_min, struct mnd_colour_hsv hsv_max, float curve, float despill)
Set the chroma key parameters to be applied to the base application (if there is any).
Definition monado.c:760
mnd_result_t mnd_root_get_reference_space_offset(mnd_root_t *root, mnd_reference_space_type_t type, mnd_pose_t *out_offset)
Get the current offset value of the specified reference space.
Definition monado.c:602
mnd_property
A property to get from a thing (currently only devices).
Definition monado.h:82
@ MND_PROPERTY_SUPPORTS_POSITION_BOOL
Supported in version 1.4.0 and above.
Definition monado.h:90
@ MND_PROPERTY_SUPPORTS_BRIGHTNESS_BOOL
Supported in version 1.5.0 and above.
Definition monado.h:94
@ MND_PROPERTY_NAME_STRING
Supported in version 1.2 and above.
Definition monado.h:84
@ MND_PROPERTY_SUPPORTS_ORIENTATION_BOOL
Supported in version 1.4.0 and above.
Definition monado.h:92
@ MND_PROPERTY_TRACKING_ORIGIN_U32
Supported in version 1.4.0 and above.
Definition monado.h:88
@ MND_PROPERTY_SERIAL_STRING
Supported in version 1.2 and above.
Definition monado.h:86
void mnd_root_destroy(mnd_root_t **root_ptr)
Destroy libmonado state, disconnecting from the service, and zeroing the pointer.
Definition monado.c:244
mnd_result_t mnd_root_get_client_name(mnd_root_t *root, uint32_t client_id, const char **out_name)
Get the name of the client at the given index.
Definition monado.c:300
mnd_result_t mnd_root_get_device_battery_status(mnd_root_t *root, uint32_t device_index, bool *out_present, bool *out_charging, float *out_charge)
Get battery status of a device.
Definition monado.c:692
mnd_result_t mnd_root_recenter_local_spaces(mnd_root_t *root)
Trigger a recenter of the local spaces.
Definition monado.c:590
mnd_result_t mnd_root_get_device_from_role(mnd_root_t *root, const char *role_name, int32_t *out_index)
Get the device index associated for a given role name.
Definition monado.c:525
enum mnd_io_block_flags mnd_io_block_flags_t
Bitflags for IO blocking.
struct mnd_pose mnd_pose_t
A pose composed of a position and orientation.
mnd_reference_space_type
Types of reference space.
Definition monado.h:143
mnd_result_t mnd_root_get_device_info_i32(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, uint32_t *out_i32)
Get int32_t property for the device at the given index.
Definition monado.c:443
mnd_result_t mnd_root_update_client_list(mnd_root_t *root)
Update our local cached copy of the client list.
Definition monado.c:264
mnd_result_t mnd_root_set_reference_space_offset(mnd_root_t *root, mnd_reference_space_type_t type, const mnd_pose_t *offset)
Apply an offset to the specified reference space.
Definition monado.c:615
mnd_result_t mnd_root_set_tracking_origin_offset(mnd_root_t *root, uint32_t origin_index, const mnd_pose_t *offset)
Apply an offset to the specified tracking origin.
Definition monado.c:648
mnd_result_t mnd_root_get_client_id_at_index(mnd_root_t *root, uint32_t index, uint32_t *out_client_id)
Get the id from the current client list.
Definition monado.c:289
mnd_result_t mnd_root_set_client_focused(mnd_root_t *root, uint32_t client_id)
Set the client at the given index as "focused".
Definition monado.c:363
enum mnd_client_flags mnd_client_flags_t
Bitflags for client application state.
mnd_result_t mnd_root_set_device_brightness(mnd_root_t *root, uint32_t device_index, float brightness, bool relative)
Set the display brightness.
Definition monado.c:739
mnd_result_t mnd_root_toggle_client_io_active(mnd_root_t *root, uint32_t client_id)
Toggle io activity for the client at the given index.
Definition monado.c:378
mnd_io_block_flags
Bitflags for IO blocking.
Definition monado.h:160
enum mnd_reference_space_type mnd_reference_space_type_t
Types of reference space.
mnd_client_flags
Bitflags for client application state.
Definition monado.h:58
@ MND_CLIENT_POSES_BLOCKED
Supported in version 1.6 and above.
Definition monado.h:67
@ MND_CLIENT_HT_BLOCKED
Supported in version 1.6 and above.
Definition monado.h:69
@ MND_CLIENT_INPUTS_BLOCKED
Supported in version 1.6 and above.
Definition monado.h:71
@ MND_CLIENT_OUTPUTS_BLOCKED
Supported in version 1.6 and above.
Definition monado.h:73
@ MND_CLIENT_IO_ACTIVE
Definition monado.h:65
mnd_result_t mnd_root_get_device_count(mnd_root_t *root, uint32_t *out_device_count)
Get the number of devices.
Definition monado.c:413
mnd_result_t mnd_root_get_device_info(mnd_root_t *root, uint32_t device_index, uint32_t *out_device_id, const char **out_dev_name)
Get device info at the given index.
Definition monado.c:510
mnd_result_t mnd_root_set_client_primary(mnd_root_t *root, uint32_t client_id)
Set the client at the given index as "primary".
Definition monado.c:348
mnd_result_t mnd_root_get_tracking_origin_offset(mnd_root_t *root, uint32_t origin_index, mnd_pose_t *out_offset)
Read the current offset of a tracking origin.
Definition monado.c:629
enum mnd_property mnd_property_t
A property to get from a thing (currently only devices).
mnd_result_t mnd_root_get_device_info_u32(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, uint32_t *out_u32)
Get uint32_t property for the device at the given index.
Definition monado.c:455
mnd_result_t mnd_root_get_device_brightness(mnd_root_t *root, uint32_t device_index, float *out_brightness)
Get current brightness of a display device.
Definition monado.c:717
mnd_result_t mnd_root_get_number_clients(mnd_root_t *root, uint32_t *out_num)
Get the number of active clients.
Definition monado.c:278
mnd_result_t mnd_root_get_device_info_float(mnd_root_t *root, uint32_t device_index, mnd_property_t prop, float *out_float)
Get float property for the device at the given index.
Definition monado.c:480
mnd_result_t mnd_root_set_client_io_blocks(mnd_root_t *root, uint32_t client_id, mnd_io_block_flags_t block_flags)
Block certain types of IO for the client at the given index.
Definition monado.c:393
mnd_result_t mnd_root_get_tracking_origin_count(mnd_root_t *root, uint32_t *out_track_count)
Retrieve the number of tracking origins available.
Definition monado.c:667
A 3 element HSV colour with floating point channels.
Definition monado.h:133
A 3 element colour with floating point channels.
Definition monado.h:122
A pose composed of a position and orientation.
Definition monado.h:106
Definition monado.c:33