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
29bool SDL_HIDAPI_HapticInit();
30bool SDL_HIDAPI_HapticIsHidapi(SDL_Haptic *haptic);
31bool SDL_HIDAPI_JoystickIsHaptic(SDL_Joystick *joystick);
32bool SDL_HIDAPI_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick);
33bool SDL_HIDAPI_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick);
34void SDL_HIDAPI_HapticClose(SDL_Haptic *haptic);
35void SDL_HIDAPI_HapticQuit(void);
36int SDL_HIDAPI_HapticNewEffect(SDL_Haptic *haptic, const SDL_HapticEffect *base);
37bool SDL_HIDAPI_HapticUpdateEffect(SDL_Haptic *haptic, int id, const SDL_HapticEffect *data);
38bool SDL_HIDAPI_HapticRunEffect(SDL_Haptic *haptic, int id, Uint32 iterations);
39bool SDL_HIDAPI_HapticStopEffect(SDL_Haptic *haptic, int id);
40void SDL_HIDAPI_HapticDestroyEffect(SDL_Haptic *haptic, int id);
41bool SDL_HIDAPI_HapticGetEffectStatus(SDL_Haptic *haptic, int id);
42bool SDL_HIDAPI_HapticSetGain(SDL_Haptic *haptic, int gain);
43bool SDL_HIDAPI_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter);
44bool SDL_HIDAPI_HapticPause(SDL_Haptic *haptic);
45bool SDL_HIDAPI_HapticResume(SDL_Haptic *haptic);
46bool SDL_HIDAPI_HapticStopAll(SDL_Haptic *haptic);
47
48#endif //SDL_hidapihaptic_h_