mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-20 22:00:07 +01:00
doc: add a note regarding truncation of id_* fields
The id_* fields are 16 bits in linux/input.h and we mirror the kernel API here. Even though we accept an int for this fields in ABI the value is truncated at 16 bits. Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
da67db5f59
commit
a2bb53262f
1 changed files with 12 additions and 4 deletions
|
|
@ -1272,7 +1272,9 @@ int libevdev_get_id_product(const struct libevdev *dev);
|
||||||
* @param product_id The product ID to assign to this device
|
* @param product_id The product ID to assign to this device
|
||||||
*
|
*
|
||||||
* @note This function may be called before libevdev_set_fd(). A call to
|
* @note This function may be called before libevdev_set_fd(). A call to
|
||||||
* libevdev_set_fd() will overwrite any previously set value.
|
* libevdev_set_fd() will overwrite any previously set value. Even though
|
||||||
|
* the function accepts an int for product_id the value is truncated at 16
|
||||||
|
* bits.
|
||||||
*/
|
*/
|
||||||
void libevdev_set_id_product(struct libevdev *dev, int product_id);
|
void libevdev_set_id_product(struct libevdev *dev, int product_id);
|
||||||
|
|
||||||
|
|
@ -1294,7 +1296,9 @@ int libevdev_get_id_vendor(const struct libevdev *dev);
|
||||||
* @param vendor_id The vendor ID to assign to this device
|
* @param vendor_id The vendor ID to assign to this device
|
||||||
*
|
*
|
||||||
* @note This function may be called before libevdev_set_fd(). A call to
|
* @note This function may be called before libevdev_set_fd(). A call to
|
||||||
* libevdev_set_fd() will overwrite any previously set value.
|
* libevdev_set_fd() will overwrite any previously set value. Even though
|
||||||
|
* the function accepts an int for vendor_id the value is truncated at 16
|
||||||
|
* bits.
|
||||||
*/
|
*/
|
||||||
void libevdev_set_id_vendor(struct libevdev *dev, int vendor_id);
|
void libevdev_set_id_vendor(struct libevdev *dev, int vendor_id);
|
||||||
|
|
||||||
|
|
@ -1316,7 +1320,9 @@ int libevdev_get_id_bustype(const struct libevdev *dev);
|
||||||
* @param bustype The bustype to assign to this device
|
* @param bustype The bustype to assign to this device
|
||||||
*
|
*
|
||||||
* @note This function may be called before libevdev_set_fd(). A call to
|
* @note This function may be called before libevdev_set_fd(). A call to
|
||||||
* libevdev_set_fd() will overwrite any previously set value.
|
* libevdev_set_fd() will overwrite any previously set value. Even though
|
||||||
|
* the function accepts an int for bustype the value is truncated at 16
|
||||||
|
* bits.
|
||||||
*/
|
*/
|
||||||
void libevdev_set_id_bustype(struct libevdev *dev, int bustype);
|
void libevdev_set_id_bustype(struct libevdev *dev, int bustype);
|
||||||
|
|
||||||
|
|
@ -1338,7 +1344,9 @@ int libevdev_get_id_version(const struct libevdev *dev);
|
||||||
* @param version The version to assign to this device
|
* @param version The version to assign to this device
|
||||||
*
|
*
|
||||||
* @note This function may be called before libevdev_set_fd(). A call to
|
* @note This function may be called before libevdev_set_fd(). A call to
|
||||||
* libevdev_set_fd() will overwrite any previously set value.
|
* libevdev_set_fd() will overwrite any previously set value. Even though
|
||||||
|
* the function accepts an int for version the value is truncated at 16
|
||||||
|
* bits.
|
||||||
*/
|
*/
|
||||||
void libevdev_set_id_version(struct libevdev *dev, int version);
|
void libevdev_set_id_version(struct libevdev *dev, int version);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue