mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-10 15:58:06 +00:00
t/libmonado: Support recentering of local spaces
This commit is contained in:
parent
d43334120c
commit
d380414731
src/xrt/targets/libmonado
|
@ -13,3 +13,4 @@ EXPORTS
|
|||
mnd_root_get_device_count
|
||||
mnd_root_get_device_info
|
||||
mnd_root_get_device_from_role
|
||||
mnd_root_recenter_local_spaces
|
||||
|
|
|
@ -365,3 +365,15 @@ mnd_root_get_device_from_role(mnd_root_t *root, const char *role_name, int32_t *
|
|||
default: PE("Internal error, shouldn't get here"); return MND_ERROR_OPERATION_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
mnd_result_t
|
||||
mnd_root_recenter_local_spaces(mnd_root_t *root)
|
||||
{
|
||||
xrt_result_t xret = ipc_call_space_recenter_local_spaces(&root->ipc_c);
|
||||
switch (xret) {
|
||||
case XRT_SUCCESS: return MND_SUCCESS;
|
||||
case XRT_ERROR_RECENTERING_NOT_SUPPORTED: return MND_ERROR_RECENTERING_NOT_SUPPORTED;
|
||||
case XRT_ERROR_IPC_FAILURE: PE("Connection error!"); return MND_ERROR_OPERATION_FAILED;
|
||||
default: PE("Internal error, shouldn't get here"); return MND_ERROR_OPERATION_FAILED;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ extern "C" {
|
|||
//! Major version of the API.
|
||||
#define MND_API_VERSION_MAJOR 1
|
||||
//! Minor version of the API.
|
||||
#define MND_API_VERSION_MINOR 0
|
||||
#define MND_API_VERSION_MINOR 1
|
||||
//! Patch version of the API.
|
||||
#define MND_API_VERSION_PATCH 0
|
||||
|
||||
|
@ -39,6 +39,8 @@ typedef enum mnd_result
|
|||
MND_ERROR_INVALID_VALUE = -2,
|
||||
MND_ERROR_CONNECTING_FAILED = -3,
|
||||
MND_ERROR_OPERATION_FAILED = -4,
|
||||
//! Supported in version 1.1 and above.
|
||||
MND_ERROR_RECENTERING_NOT_SUPPORTED = -5,
|
||||
} mnd_result_t;
|
||||
|
||||
/*!
|
||||
|
@ -241,6 +243,18 @@ mnd_root_get_device_info(mnd_root_t *root, uint32_t device_index, uint32_t *out_
|
|||
mnd_result_t
|
||||
mnd_root_get_device_from_role(mnd_root_t *root, const char *role_name, int32_t *out_device_id);
|
||||
|
||||
/*!
|
||||
* Trigger a recenter of the local spaces.
|
||||
*
|
||||
* Supported in version 1.1 and above.
|
||||
*
|
||||
* @param root The libmonado state.
|
||||
*
|
||||
* @return MND_SUCCESS on success
|
||||
*/
|
||||
mnd_result_t
|
||||
mnd_root_recenter_local_spaces(mnd_root_t *root);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue