mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
xrt: Tidy xrt_device [NFC]
This commit is contained in:
parent
eabaf6e7d6
commit
c8bb2009f2
|
@ -264,6 +264,13 @@ struct xrt_device
|
||||||
bool force_feedback_supported;
|
bool force_feedback_supported;
|
||||||
bool form_factor_check_supported;
|
bool form_factor_check_supported;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Functions.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Update any attached inputs.
|
* Update any attached inputs.
|
||||||
*
|
*
|
||||||
|
@ -410,11 +417,6 @@ struct xrt_device
|
||||||
uint32_t view_index,
|
uint32_t view_index,
|
||||||
struct xrt_visibility_mask **out_mask);
|
struct xrt_visibility_mask **out_mask);
|
||||||
|
|
||||||
/*!
|
|
||||||
* Destroy device.
|
|
||||||
*/
|
|
||||||
void (*destroy)(struct xrt_device *xdev);
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Check if given form factor is available or not.
|
* @brief Check if given form factor is available or not.
|
||||||
*
|
*
|
||||||
|
@ -426,6 +428,13 @@ struct xrt_device
|
||||||
* @return true if given form factor is available; otherwise false.
|
* @return true if given form factor is available; otherwise false.
|
||||||
*/
|
*/
|
||||||
bool (*is_form_factor_available)(struct xrt_device *xdev, enum xrt_form_factor form_factor);
|
bool (*is_form_factor_available)(struct xrt_device *xdev, enum xrt_form_factor form_factor);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Destroy device.
|
||||||
|
*/
|
||||||
|
void (*destroy)(struct xrt_device *xdev);
|
||||||
|
|
||||||
|
// Add new functions above destroy.
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -536,6 +545,19 @@ xrt_device_get_visibility_mask(struct xrt_device *xdev,
|
||||||
return xdev->get_visibility_mask(xdev, type, view_index, out_mask);
|
return xdev->get_visibility_mask(xdev, type, view_index, out_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Helper function for @ref xrt_device::is_form_factor_available.
|
||||||
|
*
|
||||||
|
* @copydoc xrt_device::is_form_factor_available
|
||||||
|
*
|
||||||
|
* @public @memberof xrt_device
|
||||||
|
*/
|
||||||
|
static inline bool
|
||||||
|
xrt_device_is_form_factor_available(struct xrt_device *xdev, enum xrt_form_factor form_factor)
|
||||||
|
{
|
||||||
|
return xdev->is_form_factor_available(xdev, form_factor);
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Helper function for @ref xrt_device::destroy.
|
* Helper function for @ref xrt_device::destroy.
|
||||||
*
|
*
|
||||||
|
@ -555,18 +577,6 @@ xrt_device_destroy(struct xrt_device **xdev_ptr)
|
||||||
*xdev_ptr = NULL;
|
*xdev_ptr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
* Helper function for @ref xrt_device::is_form_factor_available.
|
|
||||||
*
|
|
||||||
* @copydoc xrt_device::is_form_factor_available
|
|
||||||
*
|
|
||||||
* @public @memberof xrt_device
|
|
||||||
*/
|
|
||||||
static inline bool
|
|
||||||
xrt_device_is_form_factor_available(struct xrt_device *xdev, enum xrt_form_factor form_factor)
|
|
||||||
{
|
|
||||||
return xdev->is_form_factor_available(xdev, form_factor);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|
Loading…
Reference in a new issue