1 | /* |
2 | Simple DirectMedia Layer |
3 | Copyright (C) 2025 Katharine Chui <katharine.chui@gmail.com> |
4 | |
5 | This software is provided 'as-is', without any express or implied |
6 | warranty. In no event will the authors be held liable for any damages |
7 | arising from the use of this software. |
8 | |
9 | Permission is granted to anyone to use this software for any purpose, |
10 | including commercial applications, and to alter it and redistribute it |
11 | freely, subject to the following restrictions: |
12 | |
13 | 1. The origin of this software must not be misrepresented; you must not |
14 | claim that you wrote the original software. If you use this software |
15 | in a product, an acknowledgment in the product documentation would be |
16 | appreciated but is not required. |
17 | 2. Altered source versions must be plainly marked as such, and must not be |
18 | misrepresented as being the original software. |
19 | 3. This notice may not be removed or altered from any source distribution. |
20 | */ |
21 | |
22 | /* |
23 | All hid command sent and effect rendering are ported from https://github.com/berarma/new-lg4ff |
24 | */ |
25 | |
26 | #ifndef SDL_hidapihaptic_h_ |
27 | #define SDL_hidapihaptic_h_ |
28 | |
29 | bool SDL_HIDAPI_HapticInit(); |
30 | bool SDL_HIDAPI_HapticIsHidapi(SDL_Haptic *haptic); |
31 | bool SDL_HIDAPI_JoystickIsHaptic(SDL_Joystick *joystick); |
32 | bool SDL_HIDAPI_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick); |
33 | bool SDL_HIDAPI_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick); |
34 | void SDL_HIDAPI_HapticClose(SDL_Haptic *haptic); |
35 | void SDL_HIDAPI_HapticQuit(void); |
36 | int SDL_HIDAPI_HapticNewEffect(SDL_Haptic *haptic, const SDL_HapticEffect *base); |
37 | bool SDL_HIDAPI_HapticUpdateEffect(SDL_Haptic *haptic, int id, const SDL_HapticEffect *data); |
38 | bool SDL_HIDAPI_HapticRunEffect(SDL_Haptic *haptic, int id, Uint32 iterations); |
39 | bool SDL_HIDAPI_HapticStopEffect(SDL_Haptic *haptic, int id); |
40 | void SDL_HIDAPI_HapticDestroyEffect(SDL_Haptic *haptic, int id); |
41 | bool SDL_HIDAPI_HapticGetEffectStatus(SDL_Haptic *haptic, int id); |
42 | bool SDL_HIDAPI_HapticSetGain(SDL_Haptic *haptic, int gain); |
43 | bool SDL_HIDAPI_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter); |
44 | bool SDL_HIDAPI_HapticPause(SDL_Haptic *haptic); |
45 | bool SDL_HIDAPI_HapticResume(SDL_Haptic *haptic); |
46 | bool SDL_HIDAPI_HapticStopAll(SDL_Haptic *haptic); |
47 | |
48 | #endif //SDL_hidapihaptic_h_ |