diff options
Diffstat (limited to 'contrib/SDL-3.2.8/src/hidapi/windows/hidapi_winapi.h')
| -rw-r--r-- | contrib/SDL-3.2.8/src/hidapi/windows/hidapi_winapi.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/hidapi/windows/hidapi_winapi.h b/contrib/SDL-3.2.8/src/hidapi/windows/hidapi_winapi.h new file mode 100644 index 0000000..9c4b5c0 --- /dev/null +++ b/contrib/SDL-3.2.8/src/hidapi/windows/hidapi_winapi.h | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | /******************************************************* | ||
| 2 | HIDAPI - Multi-Platform library for | ||
| 3 | communication with HID devices. | ||
| 4 | |||
| 5 | libusb/hidapi Team | ||
| 6 | |||
| 7 | Copyright 2022, All Rights Reserved. | ||
| 8 | |||
| 9 | At the discretion of the user of this library, | ||
| 10 | this software may be licensed under the terms of the | ||
| 11 | GNU General Public License v3, a BSD-Style license, or the | ||
| 12 | original HIDAPI license as outlined in the LICENSE.txt, | ||
| 13 | LICENSE-gpl3.txt, LICENSE-bsd.txt, and LICENSE-orig.txt | ||
| 14 | files located at the root of the source distribution. | ||
| 15 | These files may also be found in the public source | ||
| 16 | code repository located at: | ||
| 17 | https://github.com/libusb/hidapi . | ||
| 18 | ********************************************************/ | ||
| 19 | |||
| 20 | /** @file | ||
| 21 | * @defgroup API hidapi API | ||
| 22 | * | ||
| 23 | * Since version 0.12.0, @ref HID_API_VERSION >= HID_API_MAKE_VERSION(0, 12, 0) | ||
| 24 | */ | ||
| 25 | |||
| 26 | #ifndef HIDAPI_WINAPI_H__ | ||
| 27 | #define HIDAPI_WINAPI_H__ | ||
| 28 | |||
| 29 | #include <stdint.h> | ||
| 30 | |||
| 31 | #include <guiddef.h> | ||
| 32 | |||
| 33 | #include "../hidapi/hidapi.h" | ||
| 34 | |||
| 35 | #ifdef __cplusplus | ||
| 36 | extern "C" { | ||
| 37 | #endif | ||
| 38 | |||
| 39 | /** @brief Get the container ID for a HID device. | ||
| 40 | |||
| 41 | Since version 0.12.0, @ref HID_API_VERSION >= HID_API_MAKE_VERSION(0, 12, 0) | ||
| 42 | |||
| 43 | This function returns the `DEVPKEY_Device_ContainerId` property of | ||
| 44 | the given device. This can be used to correlate different | ||
| 45 | interfaces/ports on the same hardware device. | ||
| 46 | |||
| 47 | @ingroup API | ||
| 48 | @param dev A device handle returned from hid_open(). | ||
| 49 | @param container_id The device's container ID on return. | ||
| 50 | |||
| 51 | @returns | ||
| 52 | This function returns 0 on success and -1 on error. | ||
| 53 | */ | ||
| 54 | int HID_API_EXPORT_CALL hid_winapi_get_container_id(hid_device *dev, GUID *container_id); | ||
| 55 | |||
| 56 | /** | ||
| 57 | * @brief Reconstructs a HID Report Descriptor from a Win32 HIDP_PREPARSED_DATA structure. | ||
| 58 | * This reconstructed report descriptor is logical identical to the real report descriptor, | ||
| 59 | * but not byte wise identical. | ||
| 60 | * | ||
| 61 | * @param[in] hidp_preparsed_data Pointer to the HIDP_PREPARSED_DATA to read, i.e.: the value of PHIDP_PREPARSED_DATA, | ||
| 62 | * as returned by HidD_GetPreparsedData WinAPI function. | ||
| 63 | * @param buf Pointer to the buffer where the report descriptor should be stored. | ||
| 64 | * @param[in] buf_size Size of the buffer. The recommended size for the buffer is @ref HID_API_MAX_REPORT_DESCRIPTOR_SIZE bytes. | ||
| 65 | * | ||
| 66 | * @return Returns size of reconstructed report descriptor if successful, -1 for error. | ||
| 67 | */ | ||
| 68 | int HID_API_EXPORT_CALL hid_winapi_descriptor_reconstruct_pp_data(void *hidp_preparsed_data, unsigned char *buf, size_t buf_size); | ||
| 69 | |||
| 70 | #ifdef __cplusplus | ||
| 71 | } | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #endif | ||
