mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-05 13:28:16 +00:00
xrt: Add XRT_GET_INPUT_TYPE, document XRT_INPUT_NAME
This commit is contained in:
parent
166bee167e
commit
0ebf754996
|
@ -363,8 +363,30 @@ enum xrt_input_type
|
|||
// clang-format on
|
||||
};
|
||||
|
||||
/*!
|
||||
* @brief Create an enum value for xrt_input_name that packs an ID and input
|
||||
* type.
|
||||
*
|
||||
* @param id an integer
|
||||
* @param type The suffix of an xrt_input_type value name: `XRT_INPUT_TYPE_` is
|
||||
* prepended automatically.
|
||||
*
|
||||
* @see xrt_input_name
|
||||
* @ingroup xrt_iface
|
||||
*/
|
||||
#define XRT_INPUT_NAME(id, type) ((id << 8) | XRT_INPUT_TYPE_##type)
|
||||
|
||||
/*!
|
||||
* @brief Extract the xrt_input_type from an xrt_input_name.
|
||||
*
|
||||
* @param name A xrt_input_name value
|
||||
*
|
||||
* @see xrt_input_name
|
||||
* @see xrt_input_type
|
||||
* @ingroup xrt_iface
|
||||
*/
|
||||
#define XRT_GET_INPUT_TYPE(name) (name & 0xff)
|
||||
|
||||
/*!
|
||||
* Name of a input with a baked in type.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue