Mercurial > sdl-ios-xcode
annotate include/SDL_haptic.h @ 2499:cc2b270608b2 gsoc2008_force_feedback
Created SDL_HapticDirection.
Fixed all doxygen errors.
Added more diagrams and documentation.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Sun, 06 Jul 2008 20:41:00 +0000 |
parents | ab567bd667bf |
children | 5251d0510b7e |
rev | line source |
---|---|
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1 /* |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
3 Copyright (C) 2008 Edgar Simo |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
4 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
9 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
14 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
18 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
19 Sam Lantinga |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
20 slouken@libsdl.org |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
21 */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
22 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
23 /** |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
24 * \file SDL_haptic.h |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
25 * |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
26 * \brief The SDL Haptic subsystem allows you to control haptic (force feedback) |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
27 * devices. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
28 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
29 * The basic usage is as follows: |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
30 * - Initialize the Subsystem (SDL_INIT_HAPTIC). |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
31 * - Open a Haptic Device. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
32 * - SDL_HapticOpen(...) to open from index. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
33 * - SDL_HapticOpenFromJoystick(...) to open from an existing joystick. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
34 * - Create an effect (SDL_HapticEffect). |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
35 * - Upload the effect with SDL_HapticNewEffect(...). |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
36 * - Run the effect with SDL_HapticRunEffect(...). |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
37 * - (optional) Free the effect with SDL_HapticDestroyEffect(...). |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
38 * - Close the haptic device with SDL_HapticClose(...). |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
39 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
40 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
41 * Example: |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
42 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
43 * \code |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
44 * int test_haptic( SDL_Joystick * joystick ) { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
45 * SDL_Haptic *haptic; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
46 * SDL_HapticEffect effect; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
47 * int effect_id; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
48 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
49 * // Open the device |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
50 * haptic = SDL_HapticOpenFromJoystick( joystick ); |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
51 * if (haptic == NULL) return -1; // Most likely joystick isn't haptic |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
52 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
53 * // See if it can do sine waves |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
54 * if ((SDL_HapticQueryEffects(haptic) & SDL_HAPTIC_SINE)==0) { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
55 * SDL_HapticClose(haptic); // No sine effect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
56 * return -1; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
57 * } |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
58 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
59 * // Create the effect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
60 * memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
61 * effect.type = SDL_HAPTIC_SINE; |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
62 * effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
63 * effect.periodic.direction.dir[0] = 180000; // Force comes from south |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
64 * effect.periodic.period = 1000; // 1000 ms |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
65 * effect.periodic.magnitude = 20000; // 20000/32767 strength |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
66 * effect.periodic.length = 5000; // 5 seconds long |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
67 * effect.periodic.attack_length = 1000; // Takes 1 second to get max strength |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
68 * effect.periodic.fade_length = 1000; // Takes 1 second to fade away |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
69 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
70 * // Upload the effect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
71 * effect_id = SDL_HapticNewEffect( haptic, &effect ); |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
72 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
73 * // Test the effect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
74 * SDL_HapticRunEffect( haptic, effect_id ); |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
75 * SDL_Delay( 5000); // Wait for the effect to finish |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
76 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
77 * // We destroy the effect, although closing the device also does this |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
78 * SDL_HapticDestroyEffect( haptic, effect_id ); |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
79 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
80 * // Close the device |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
81 * SDL_HapticClose(haptic); |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
82 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
83 * return 0; // Success |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
84 * } |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
85 * \endcode |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
86 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
87 * \author Edgar Simo Serra |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
88 */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
89 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
90 #ifndef _SDL_haptic_h |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
91 #define _SDL_haptic_h |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
92 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
93 #include "SDL_stdinc.h" |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
94 #include "SDL_error.h" |
2489
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
95 #include "SDL_joystick.h" |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
96 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
97 #include "begin_code.h" |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
98 /* Set up for C function definitions, even when using C++ */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
99 #ifdef __cplusplus |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
100 /* *INDENT-OFF* */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
101 extern "C" { |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
102 /* *INDENT-ON* */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
103 #endif /* __cpluspuls */ |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
104 |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
105 /** |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
106 * \typedef SDL_Haptic |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
107 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
108 * \brief The haptic structure used to identify an SDL haptic. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
109 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
110 * \sa SDL_HapticOpen |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
111 * \sa SDL_HapticOpenFromJoystick |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
112 * \sa SDL_HapticClose |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
113 */ |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
114 struct _SDL_Haptic; |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
115 typedef struct _SDL_Haptic SDL_Haptic; |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
116 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
117 |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
118 /* |
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
119 * Different haptic features a device can have. |
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
120 */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
121 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
122 * \def SDL_HAPTIC_CONSTANT |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
123 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
124 * \brief Constant haptic effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
125 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
126 * \sa SDL_HapticCondition |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
127 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
128 #define SDL_HAPTIC_CONSTANT (1<<0) /* Constant effect supported */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
129 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
130 * \def SDL_HAPTIC_SINE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
131 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
132 * \brief Periodic haptic effect that simulates sine waves. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
133 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
134 * \sa SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
135 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
136 #define SDL_HAPTIC_SINE (1<<1) /* Sine wave effect supported */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
137 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
138 * \def SDL_HAPTIC_SQUARE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
139 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
140 * \brief Periodic haptic effect that simulates square waves. |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
141 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
142 * \sa SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
143 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
144 #define SDL_HAPTIC_SQUARE (1<<2) /* Square wave effect supported */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
145 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
146 * \def SDL_HAPTIC_TRIANGLE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
147 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
148 * \brief Periodic haptic effect that simulates triangular waves. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
149 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
150 * \sa SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
151 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
152 #define SDL_HAPTIC_TRIANGLE (1<<3) /* Triangle wave effect supported */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
153 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
154 * \def SDL_HAPTIC_SAWTOOTHUP |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
155 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
156 * \brief Periodic haptic effect that simulates saw tooth up waves. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
157 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
158 * \sa SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
159 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
160 #define SDL_HAPTIC_SAWTOOTHUP (1<<4) /* Sawtoothup wave effect supported */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
161 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
162 * \def SDL_HAPTIC_SAWTOOTHDOWN |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
163 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
164 * \brief Periodic haptic effect that simulates saw tooth down waves. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
165 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
166 * \sa SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
167 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
168 #define SDL_HAPTIC_SAWTOOTHDOWN (1<<5) /* Sawtoothdown wave effect supported */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
169 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
170 * \def SDL_HAPTIC_RAMP |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
171 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
172 * \brief Ramp haptic effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
173 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
174 * \sa SDL_HapticRamp |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
175 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
176 #define SDL_HAPTIC_RAMP (1<<6) /* Ramp effect supported */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
177 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
178 * \def SDL_HAPTIC_SPRING |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
179 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
180 * \brief Condition haptic effect that simulates a spring. Effect is based on the |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
181 * axes position. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
182 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
183 * \sa SDL_HapticCondition |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
184 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
185 #define SDL_HAPTIC_SPRING (1<<7) /* Spring effect supported - uses axes position */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
186 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
187 * \def SDL_HAPTIC_DAMPER |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
188 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
189 * \brief Condition haptic effect that simulates dampening. Effect is based on the |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
190 * axes velocity. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
191 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
192 * \sa SDL_HapticCondition |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
193 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
194 #define SDL_HAPTIC_DAMPER (1<<8) /* Damper effect supported - uses axes velocity */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
195 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
196 * \def SDL_HAPTIC_INERTIA |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
197 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
198 * \brief Condition haptic effect that simulates inertia. Effect is based on the axes |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
199 * acceleration. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
200 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
201 * \sa SDL_HapticCondition |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
202 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
203 #define SDL_HAPTIC_INERTIA (1<<9) /* Inertia effect supported - uses axes acceleration */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
204 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
205 * \def SDL_HAPTIC_FRICTION |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
206 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
207 * \brief Condition haptic effect that simulates friction. Effect is based on the axes |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
208 * movement. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
209 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
210 * \sa SDL_HapticCondition |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
211 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
212 #define SDL_HAPTIC_FRICTION (1<<10) /* Friction effect supported - uses axes movement */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
213 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
214 * \def SDL_HAPTIC_CUSTOM |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
215 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
216 * \brief User defined custom haptic effect. TODO. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
217 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
218 #define SDL_HAPTIC_CUSTOM (1<<11) /* Custom effect is supported */ |
2487
4c8e25ef2d97
Merged seperate waveforms into types to be more compatible.
Edgar Simo <bobbens@gmail.com>
parents:
2486
diff
changeset
|
219 /* These last two are features the device has, not effects */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
220 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
221 * \def SDL_HAPTIC_GAIN |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
222 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
223 * \brief Device supports setting the global gain. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
224 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
225 * \sa SDL_HapticSetGain |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
226 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
227 #define SDL_HAPTIC_GAIN (1<<12) /* Device can set global gain */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
228 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
229 * \def SDL_HAPTIC_AUTOCENTER |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
230 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
231 * \brief Device supports setting autocenter. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
232 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
233 * \sa SDL_HapticSetAutocenter |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
234 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
235 #define SDL_HAPTIC_AUTOCENTER (1<<13) /* Device can set autocenter */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
236 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
237 * \def SDL_HAPTIC_STATUS |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
238 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
239 * \brief Device can be queried for effect status. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
240 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
241 * \sa SDL_HapticGetEffectStatus |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
242 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
243 #define SDL_HAPTIC_STATUS (1<<14) /* Device can be queried for effect status */ |
2481 | 244 |
245 | |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
246 /* |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
247 * Direction encodings |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
248 */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
249 /** |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
250 * \def SDL_HAPTIC_POLAR |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
251 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
252 * \brief Uses polar coordinates for the direction. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
253 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
254 * \sa SDL_HapticDirection |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
255 */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
256 #define SDL_HAPTIC_POLAR 0 |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
257 /** |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
258 * \def SDL_HAPTIC_CARTESIAN |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
259 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
260 * \brief Uses cartesian coordinates for the direction. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
261 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
262 * \sa SDL_HapticDirection |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
263 */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
264 #define SDL_HAPTIC_CARTESIAN 1 |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
265 |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
266 |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
267 /** |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
268 * \struct SDL_HapticDirection |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
269 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
270 * \brief Structure that represents a haptic direction. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
271 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
272 * Directions can be specified by: |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
273 * - SDL_HAPTIC_POLAR: Specified by polar coordinates. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
274 * - SDL_HAPTIC_CARTESIAN: Specified by cartesian coordinates. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
275 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
276 * Cardinal directions of the haptic device are relative to the positioning |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
277 * of the device. North is considered to be away from the user. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
278 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
279 * The following diagram represents the cardinal directions: |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
280 * \code |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
281 * .--. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
282 * |__| .-------. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
283 * |=.| |.-----.| |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
284 * |--| || || |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
285 * | | |'-----'| |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
286 * |__|~')_____(' |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
287 * [ COMPUTER ] |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
288 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
289 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
290 * North (-1) |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
291 * ^ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
292 * | |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
293 * | |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
294 * (1) East <----[ HAPTIC ]----> West (-1) |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
295 * | |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
296 * | |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
297 * v |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
298 * South (1) |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
299 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
300 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
301 * [ USER ] |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
302 * \|||/ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
303 * (o o) |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
304 * ---ooO-(_)-Ooo--- |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
305 * \endcode |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
306 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
307 * If type is SDL_HAPTIC_POLAR, direction is encoded by hundredths of a |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
308 * degree starting north and turning clockwise. The cardinal directions would be: |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
309 * - North: 0 (0 degrees) |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
310 * - West: 9000 (90 degrees) |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
311 * - South: 18000 (180 degrees) |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
312 * - East: 27000 (270 degrees) |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
313 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
314 * If type is SDL_HAPTIC_CARTESIAN, direction is encoded by position. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
315 * The cardinal directions would be: |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
316 * - North: 0,-1 |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
317 * - West: -1, 0 |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
318 * - South: 0, 1 |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
319 * - East: 1, 0 |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
320 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
321 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
322 * Example: |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
323 * \code |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
324 * SDL_HapticDirection direction; |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
325 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
326 * direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
327 * direction.dir = 180000; // Force comes from the south meaning the user will |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
328 * // have to pull the stick to counteract. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
329 * \endcode |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
330 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
331 * \sa SDL_HAPTIC_POLAR |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
332 * \sa SDL_HAPTIC_CARTESIAN |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
333 * \sa SDL_HapticEffect |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
334 */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
335 typedef struct SDL_HapticDirection { |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
336 Uint8 type; /**< The type of encoding. */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
337 Uint16 dir[2]; /**< The encoded direction. */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
338 } SDL_HapticDirection; |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
339 |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
340 |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
341 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
342 * \struct SDL_HapticConstant |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
343 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
344 * \brief A structure containing a template for a Constant effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
345 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
346 * The struct is exclusive to the SDL_HAPTIC_CONSTANT effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
347 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
348 * \sa SDL_HAPTIC_CONSTANT |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
349 * \sa SDL_HapticEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
350 */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
351 typedef struct SDL_HapticConstant { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
352 /* Header */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
353 Uint16 type; /**< SDL_HAPTIC_CONSTANT */ |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
354 SDL_HapticDirection direction; /**< Direction of the effect. */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
355 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
356 /* Replay */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
357 Uint16 length; /**< Duration of the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
358 Uint16 delay; /**< Delay before starting the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
359 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
360 /* Trigger */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
361 Uint16 button; /**< Button that triggers the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
362 Uint16 interval; /**< How soon it can be triggered again after button. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
363 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
364 /* Constant */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
365 Sint16 level; /**< Strength of the constant effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
366 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
367 /* Envelope */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
368 Uint16 attack_length; /**< Duration of the attack. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
369 Uint16 attack_level; /**< Level at the start of the attack. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
370 Uint16 fade_length; /**< Duration of the fade. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
371 Uint16 fade_level; /**< Level at the end of the fade. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
372 } SDL_HapticConstant; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
373 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
374 * \struct SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
375 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
376 * \brief A structure containing a template for a Periodic effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
377 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
378 * The struct handles the following effects: |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
379 * - SDL_HAPTIC_SINE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
380 * - SDL_HAPTIC_SQUARE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
381 * - SDL_HAPTIC_TRIANGLE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
382 * - SDL_HAPTIC_SAWTOOTHUP |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
383 * - SDL_HAPTIC_SAWTOOTHDOWN |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
384 * |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
385 * Examples: |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
386 * \code |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
387 * SDL_HAPTIC_SINE |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
388 * __ __ __ __ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
389 * / \ / \ / \ / |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
390 * / \__/ \__/ \__/ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
391 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
392 * SDL_HAPTIC_SQUARE |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
393 * __ __ __ __ __ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
394 * | | | | | | | | | | |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
395 * | |__| |__| |__| |__| | |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
396 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
397 * SDL_HAPTIC_TRIANGLE |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
398 * /\ /\ /\ /\ /\ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
399 * / \ / \ / \ / \ / |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
400 * / \/ \/ \/ \/ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
401 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
402 * SDL_HAPTIC_SAWTOOTHUP |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
403 * __ __ __ __ _ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
404 * / | / | / | / | / |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
405 * / | / | / | / | / |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
406 * / |/ |/ |/ |/ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
407 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
408 * SDL_HAPTIC_SAWTOOTHDOWN |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
409 * __ __ __ __ __ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
410 * \ | \ | \ | \ | \ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
411 * \ | \ | \ | \ | \ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
412 * \| \| \| \| |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
413 * \endcode |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
414 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
415 * \sa SDL_HAPTIC_SINE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
416 * \sa SDL_HAPTIC_SQUARE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
417 * \sa SDL_HAPTIC_TRIANGLE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
418 * \sa SDL_HAPTIC_SAWTOOTHUP |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
419 * \sa SDL_HAPTIC SAWTOOTHDOWN |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
420 * \sa SDL_HapticEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
421 */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
422 typedef struct SDL_HapticPeriodic { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
423 /* Header */ |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
424 Uint16 type; /**< SDL_HAPTIC_{SINE,SQUARE,TRIANGLE,SAWTOOTHUP,SAWTOOTHDOWN} */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
425 SDL_HapticDirection direction; /**< Direction of the effect. */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
426 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
427 /* Replay */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
428 Uint16 length; /**< Duration of the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
429 Uint16 delay; /**< Delay before starting the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
430 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
431 /* Trigger */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
432 Uint16 button; /**< Button that triggers the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
433 Uint16 interval; /**< How soon it can be triggered again after button. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
434 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
435 /* Periodic */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
436 Uint16 period; /**< Period of the wave. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
437 Sint16 magnitude; /**< Peak value. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
438 Sint16 offset; /**< Mean value of the wave. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
439 Uint16 phase; /**< Horizontal shift. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
440 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
441 /* Envelope */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
442 Uint16 attack_length; /**< Duration of the attack. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
443 Uint16 attack_level; /**< Level at the start of the attack. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
444 Uint16 fade_length; /**< Duration of the fade. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
445 Uint16 fade_level; /**< Level at the end of the fade. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
446 } SDL_HapticPeriodic; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
447 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
448 * \struct SDL_HapticCondition |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
449 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
450 * \brief A structure containing a template for a Condition effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
451 * |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
452 * Direction is handled by condition internals instead of a direction member. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
453 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
454 * The struct handles the following effects: |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
455 * - SDL_HAPTIC_SPRING: Effect based on axes position. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
456 * - SDL_HAPTIC_DAMPER: Effect based on axes velocity. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
457 * - SDL_HAPTIC_INERTIA: Effect based on axes acceleration. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
458 * - SDL_HAPTIC_FRICTION: Effect based on axes movement. |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
459 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
460 * \sa SDL_HAPTIC_SPRING |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
461 * \sa SDL_HAPTIC_DAMPER |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
462 * \sa SDL_HAPTIC_INERTIA |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
463 * \sa SDL_HAPTIC_FRICTION |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
464 * \sa SDL_HapticEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
465 */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
466 typedef struct SDL_HapticCondition { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
467 /* Header */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
468 Uint16 type; /**< SDL_HAPTIC_{SPRING,DAMPER,INERTIA,FRICTION} */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
469 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
470 /* Replay */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
471 Uint16 length; /**< Duration of the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
472 Uint16 delay; /**< Delay before starting the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
473 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
474 /* Trigger */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
475 Uint16 button; /**< Button that triggers the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
476 Uint16 interval; /**< How soon it can be triggered again after button. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
477 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
478 /* Condition */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
479 Uint16 right_sat; /**< Level when joystick is to the right. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
480 Uint16 left_sat; /**< Level when joystick is to the left. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
481 Sint16 right_coeff; /**< How fast to increase the force towards the right. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
482 Sint16 left_coeff; /**< How fast to increase the force towards the left. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
483 Uint16 deadband; /**< Size of the dead zone. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
484 Sint16 center; /**< Position of the dead zone. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
485 } SDL_HapticCondition; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
486 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
487 * \struct SDL_HapticRamp |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
488 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
489 * \brief A structure containing a template for a Ramp effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
490 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
491 * This struct is exclusively for the SDL_HAPTIC_RAMP effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
492 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
493 * \sa SDL_HAPTIC_RAMP |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
494 * \sa SDL_HapticEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
495 */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
496 typedef struct SDL_HapticRamp { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
497 /* Header */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
498 Uint16 type; /**< SDL_HAPTIC_RAMP */ |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
499 SDL_HapticDirection direction; /**< Direction of the effect. */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
500 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
501 /* Replay */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
502 Uint16 length; /**< Duration of the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
503 Uint16 delay; /**< Delay before starting the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
504 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
505 /* Trigger */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
506 Uint16 button; /**< Button that triggers the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
507 Uint16 interval; /**< How soon it can be triggered again after button. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
508 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
509 /* Ramp */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
510 Sint16 start; /**< Beginning strength level. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
511 Sint16 end; /**< Ending strength level. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
512 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
513 /* Envelope */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
514 Uint16 attack_length; /**< Duration of the attack. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
515 Uint16 attack_level; /**< Level at the start of the attack. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
516 Uint16 fade_length; /**< Duration of the fade. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
517 Uint16 fade_level; /**< Level at the end of the fade. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
518 } SDL_HapticRamp; |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
519 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
520 * \union SDL_HapticEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
521 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
522 * \brief The generic template for any haptic effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
523 * |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
524 * All values max at 32767 (0x7FFF). Signed values also can be negative. |
2481 | 525 * Time values unless specified otherwise are in milliseconds. |
526 * | |
527 * Common parts: | |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
528 * \code |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
529 * // Replay - All effects have this |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
530 * Uint16 length; // Duration of effect (ms). |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
531 * Uint16 delay; // Delay before starting effect. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
532 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
533 * // Trigger - All effects have this |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
534 * Uint16 button; // Button that triggers effect. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
535 * Uint16 interval; // How soon before effect can be triggered again. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
536 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
537 * // Envelope - Not all effects have this |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
538 * Uint16 attack_length; // Duration of the attack (ms). |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
539 * Uint16 attack_level; // Level at the start of the attack. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
540 * Uint16 fade_length; // Duration of the fade out (ms). |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
541 * Uint16 fade_level; // Level at the end of the fade. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
542 * \endcode |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
543 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
544 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
545 * Here we have an example of an effect evolution in time: |
2481 | 546 * |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
547 * \code |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
548 * Strength |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
549 * ^ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
550 * | |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
551 * | effect strength --> _________________ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
552 * | / \ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
553 * | / \ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
554 * | / \ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
555 * | / \ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
556 * | attack_level --> | \ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
557 * | | | <--- fade_level |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
558 * | |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
559 * +--------------------------------------------------> Time |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
560 * [--] [---] |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
561 * attack_length fade_length |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
562 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
563 * [------------------][-----------------------] |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
564 * delay length |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
565 * \endcode |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
566 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
567 * \sa SDL_HapticConstant |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
568 * \sa SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
569 * \sa SDL_HapticCondition |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
570 * \sa SDL_HapticRamp |
2481 | 571 */ |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
572 typedef union SDL_HapticEffect { |
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
573 /* Common for all force feedback effects */ |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
574 Uint16 type; /**< Effect type. */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
575 SDL_HapticConstant constant; /**< Constant effect. */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
576 SDL_HapticPeriodic periodic; /**< Periodic effect. */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
577 SDL_HapticCondition condition[2]; /**< Condition effect, one for each axis. */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
578 SDL_HapticRamp ramp; /**< Ramp effect. */ |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
579 } SDL_HapticEffect; |
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
580 |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
581 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
582 /* Function prototypes */ |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
583 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
584 * \fn int SDL_NumHaptics(void) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
585 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
586 * \brief Count the number of joysticks attached to the system. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
587 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
588 * \return Number of haptic devices detected on the system. |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
589 */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
590 extern DECLSPEC int SDLCALL SDL_NumHaptics(void); |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
591 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
592 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
593 * \fn const char * SDL_HapticName(int device_index) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
594 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
595 * \brief Get the implementation dependent name of a Haptic device. |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
596 * This can be called before any joysticks are opened. |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
597 * If no name can be found, this function returns NULL. |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
598 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
599 * \param device_index Index of the device to get it's name. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
600 * \return Name of the device or NULL on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
601 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
602 * \sa SDL_NumHaptics |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
603 */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
604 extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index); |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
605 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
606 /** |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
607 * \fn SDL_Haptic * SDL_HapticOpen(int device_index) |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
608 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
609 * \brief Opens a Haptic device for usage - the index passed as an |
2476
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
610 * argument refers to the N'th Haptic device on this system. |
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
611 * |
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
612 * This function returns a Haptic device identifier, or Null |
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
613 * if an error occurred. |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
614 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
615 * \param device_index Index of the device to open. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
616 * \return Device identifier or NULL on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
617 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
618 * \sa SDL_HapticOpenFromJoystick |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
619 * \sa SDL_HapticClose |
2476
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
620 */ |
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
621 extern DECLSPEC SDL_Haptic * SDL_HapticOpen(int device_index); |
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
622 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
623 /** |
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
624 * \fn int SDL_JoystickIsHaptic(SDL_Joystick * joystick) |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
625 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
626 * \brief Checks to see if a joystick has haptic features. |
2489
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
627 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
628 * \param joystick Joystick to test for haptic capabilities. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
629 * \return SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
630 * or -1 if an error ocurred. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
631 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
632 * \sa SDL_HapticOpenFromJoystick |
2489
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
633 */ |
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
634 extern DECLSPEC int SDL_JoystickIsHaptic(SDL_Joystick * joystick); |
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
635 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
636 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
637 * \fn SDL_Haptic * SDL_HapticOpenFromJoystick(SDL_Joystick * joystick) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
638 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
639 * \brief Opens a Haptic device for usage from a Joystick device. Still has |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
640 * to be closed seperately to the joystick. |
2489
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
641 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
642 * \param joystick Joystick to create a haptic device from. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
643 * \return A valid haptic device identifier on success or NULL on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
644 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
645 * \sa SDL_HapticOpen |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
646 * \sa SDL_HapticClose |
2489
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
647 */ |
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
648 extern DECLSPEC SDL_Haptic * SDL_HapticOpenFromJoystick(SDL_Joystick * joystick); |
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
649 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
650 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
651 * \fn void SDL_HapticClose(SDL_Haptic * haptic) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
652 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
653 * \brief Closes a Haptic device previously opened with SDL_HapticOpen. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
654 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
655 * \param haptic Haptic device to close. |
2476
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
656 */ |
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
657 extern DECLSPEC void SDL_HapticClose(SDL_Haptic * haptic); |
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
658 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
659 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
660 * \fn int SDL_HapticNumEffects(SDL_Haptic * haptic) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
661 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
662 * \brief Returns the number of effects a haptic device can store. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
663 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
664 * \param haptic The haptic device to query effect max. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
665 * \return The number of effects the haptic device can store or |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
666 * -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
667 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
668 * \sa SDL_HapticQuery |
2478
4fd783e0f34b
Added query functions for haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2477
diff
changeset
|
669 */ |
4fd783e0f34b
Added query functions for haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2477
diff
changeset
|
670 extern DECLSPEC int SDL_HapticNumEffects(SDL_Haptic * haptic); |
4fd783e0f34b
Added query functions for haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2477
diff
changeset
|
671 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
672 /** |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
673 * \fn unsigned int SDL_HapticQuery(SDL_Haptic * haptic) |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
674 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
675 * \brief Gets the haptic devices supported features in bitwise matter. |
2478
4fd783e0f34b
Added query functions for haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2477
diff
changeset
|
676 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
677 * Example: |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
678 * \code |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
679 * if (SDL_HapticQueryEffects(haptic) & SDL_HAPTIC_CONSTANT) { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
680 * printf("We have constant haptic effect!"); |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
681 * } |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
682 * \endcode |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
683 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
684 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
685 * \param haptic The haptic device to query. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
686 * \return Haptic features in bitwise manner (OR'd). |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
687 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
688 * \sa SDL_HapticNumEffects |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
689 * \sa SDL_HapticEffectSupported |
2478
4fd783e0f34b
Added query functions for haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2477
diff
changeset
|
690 */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
691 extern DECLSPEC unsigned int SDL_HapticQuery(SDL_Haptic * haptic); |
2478
4fd783e0f34b
Added query functions for haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2477
diff
changeset
|
692 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
693 /** |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
694 * \fn int SDL_HapticEffectSupported(SDL_Haptic * haptic, SDL_HapticEffect * effect) |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
695 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
696 * \brief Checks to see if effect is supported by haptic. |
2486
24dd8b8669fa
Added SDL_HAPTIC_CUSTOM (not supported on linux).
Edgar Simo <bobbens@gmail.com>
parents:
2485
diff
changeset
|
697 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
698 * \param haptic Haptic device to check on. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
699 * \param effect Effect to check to see if it is supported. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
700 * \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
701 * -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
702 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
703 * \sa SDL_HapticQuery |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
704 * \sa SDL_HapticNewEffect |
2486
24dd8b8669fa
Added SDL_HAPTIC_CUSTOM (not supported on linux).
Edgar Simo <bobbens@gmail.com>
parents:
2485
diff
changeset
|
705 */ |
24dd8b8669fa
Added SDL_HAPTIC_CUSTOM (not supported on linux).
Edgar Simo <bobbens@gmail.com>
parents:
2485
diff
changeset
|
706 extern DECLSPEC int SDL_HapticEffectSupported(SDL_Haptic * haptic, SDL_HapticEffect * effect); |
24dd8b8669fa
Added SDL_HAPTIC_CUSTOM (not supported on linux).
Edgar Simo <bobbens@gmail.com>
parents:
2485
diff
changeset
|
707 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
708 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
709 * \fn int SDL_HapticNewEffect(SDL_Haptic * haptic, SDL_HapticEffect * effect) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
710 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
711 * \brief Creates a new haptic effect on the device. |
2483
9d52368ebcf5
Setting effects memory to 0.
Edgar Simo <bobbens@gmail.com>
parents:
2482
diff
changeset
|
712 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
713 * \param haptic Haptic device to create the effect on. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
714 * \param effect Properties of the effect to create. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
715 * \return The id of the effect on success or -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
716 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
717 * \sa SDL_HapticUpdateEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
718 * \sa SDL_HapticRunEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
719 * \sa SDL_HapticDestroyEffect |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
720 */ |
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
721 extern DECLSPEC int SDL_HapticNewEffect(SDL_Haptic * haptic, SDL_HapticEffect * effect); |
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
722 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
723 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
724 * \fn int SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect, SDL_HapticEffect * data) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
725 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
726 * \brief Updates an effect. Can be used dynamically, although behaviour when |
2488
8e2bdbccf7ff
Added SDL_HapticUpdateEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2487
diff
changeset
|
727 * dynamically changing direction may be strange. Specifically the effect |
8e2bdbccf7ff
Added SDL_HapticUpdateEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2487
diff
changeset
|
728 * may reupload itself and start playing from the start. You cannot change |
8e2bdbccf7ff
Added SDL_HapticUpdateEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2487
diff
changeset
|
729 * the type either when running UpdateEffect. |
8e2bdbccf7ff
Added SDL_HapticUpdateEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2487
diff
changeset
|
730 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
731 * \param haptic Haptic device that has the effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
732 * \param effect Effect to update. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
733 * \param data New effect properties to use. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
734 * \return The id of the effect on success or -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
735 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
736 * \sa SDL_HapticNewEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
737 * \sa SDL_HapticRunEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
738 * \sa SDL_HapticDestroyEffect |
2488
8e2bdbccf7ff
Added SDL_HapticUpdateEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2487
diff
changeset
|
739 */ |
8e2bdbccf7ff
Added SDL_HapticUpdateEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2487
diff
changeset
|
740 extern DECLSPEC int SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect, SDL_HapticEffect * data); |
8e2bdbccf7ff
Added SDL_HapticUpdateEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2487
diff
changeset
|
741 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
742 /** |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
743 * \fn int SDL_HapticRunEffect(SDL_Haptic * haptic, int effect) |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
744 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
745 * \brief Runs the haptic effect on it's assosciated haptic device. |
2483
9d52368ebcf5
Setting effects memory to 0.
Edgar Simo <bobbens@gmail.com>
parents:
2482
diff
changeset
|
746 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
747 * \param haptic Haptic device to run the effect on. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
748 * \param effect Identifier of the haptic effect to run. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
749 * \return 0 on success or -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
750 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
751 * \sa SDL_HapticStopEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
752 * \sa SDL_HapticDestroyEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
753 * \sa SDL_HapticGetEffectStatus |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
754 */ |
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
755 extern DECLSPEC int SDL_HapticRunEffect(SDL_Haptic * haptic, int effect); |
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
756 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
757 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
758 * \fn int SDL_HapticStopEffect(SDL_Haptic * haptic, int effect) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
759 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
760 * \brief Stops the haptic effect on it's assosciated haptic device. |
2485
67978eea6d10
Added SDL_HapticStopEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2484
diff
changeset
|
761 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
762 * \param haptic Haptic device to stop the effect on. |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
763 * \param effect Identifier of the effect to stop. |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
764 * \return 0 on success or -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
765 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
766 * \sa SDL_HapticRunEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
767 * \sa SDL_HapticDestroyEffect |
2485
67978eea6d10
Added SDL_HapticStopEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2484
diff
changeset
|
768 */ |
67978eea6d10
Added SDL_HapticStopEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2484
diff
changeset
|
769 extern DECLSPEC int SDL_HapticStopEffect(SDL_Haptic * haptic, int effect); |
67978eea6d10
Added SDL_HapticStopEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2484
diff
changeset
|
770 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
771 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
772 * \fn void SDL_HapticDestroyEffect(SDL_Haptic * haptic, int effect) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
773 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
774 * \brief Destroys a haptic effect on the device. This will stop the effect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
775 * if it's running. Effects are automatically destroyed when the device is |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
776 * closed. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
777 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
778 * \param haptic Device to destroy the effect on. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
779 * \param effect Identifier of the effect to destroy. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
780 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
781 * \sa SDL_HapticNewEffect |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
782 */ |
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
783 extern DECLSPEC void SDL_HapticDestroyEffect(SDL_Haptic * haptic, int effect); |
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
784 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
785 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
786 * \fn int SDL_HapticGetEffectStatus(SDL_Haptic *haptic, int effect) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
787 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
788 * \brief Gets the status of the current effect on the haptic device. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
789 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
790 * Device must support the SDL_HAPTIC_STATUS feature. |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
791 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
792 * \param haptic Haptic device to query the effect status on. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
793 * \param effect Identifier of the effect to query it's status. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
794 * \return 0 if it isn't playing, SDL_HAPTIC_PLAYING if it is playing |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
795 * or -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
796 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
797 * \sa SDL_HapticRunEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
798 * \sa SDL_HapticStopEffect |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
799 */ |
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
800 extern DECLSPEC int SDL_HapticGetEffectStatus(SDL_Haptic *haptic, int effect); |
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
801 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
802 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
803 * \fn int SDL_HapticSetGain(SDL_Haptic * haptic, int gain) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
804 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
805 * \brief Sets the global gain of the device. Gain should be between 0 and 100. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
806 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
807 * Device must support the SDL_HAPTIC_GAIN feature. |
2483
9d52368ebcf5
Setting effects memory to 0.
Edgar Simo <bobbens@gmail.com>
parents:
2482
diff
changeset
|
808 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
809 * \param haptic Haptic device to set the gain on. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
810 * \param gain Value to set the gain to, should be between 0 and 100. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
811 * \return 0 on success or -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
812 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
813 * \sa SDL_HapticQuery |
2483
9d52368ebcf5
Setting effects memory to 0.
Edgar Simo <bobbens@gmail.com>
parents:
2482
diff
changeset
|
814 */ |
9d52368ebcf5
Setting effects memory to 0.
Edgar Simo <bobbens@gmail.com>
parents:
2482
diff
changeset
|
815 extern DECLSPEC int SDL_HapticSetGain(SDL_Haptic * haptic, int gain); |
9d52368ebcf5
Setting effects memory to 0.
Edgar Simo <bobbens@gmail.com>
parents:
2482
diff
changeset
|
816 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
817 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
818 * \fn int SDL_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
819 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
820 * \brief Sets the global autocenter of the device. Autocenter should be between |
2484
666472fd4cb0
HapticSetGain checks to see if device supports it.
Edgar Simo <bobbens@gmail.com>
parents:
2483
diff
changeset
|
821 * 0 and 100. Setting it to 0 will disable autocentering. |
666472fd4cb0
HapticSetGain checks to see if device supports it.
Edgar Simo <bobbens@gmail.com>
parents:
2483
diff
changeset
|
822 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
823 * Device must support the SDL_HAPTIC_AUTOCENTER feature. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
824 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
825 * \param haptic Haptic device to set autocentering on. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
826 * \param autocenter Value to set autocenter to, 0 disables autocentering. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
827 * \return 0 on success or -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
828 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
829 * \sa SDL_HapticQuery |
2484
666472fd4cb0
HapticSetGain checks to see if device supports it.
Edgar Simo <bobbens@gmail.com>
parents:
2483
diff
changeset
|
830 */ |
666472fd4cb0
HapticSetGain checks to see if device supports it.
Edgar Simo <bobbens@gmail.com>
parents:
2483
diff
changeset
|
831 extern DECLSPEC int SDL_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter); |
666472fd4cb0
HapticSetGain checks to see if device supports it.
Edgar Simo <bobbens@gmail.com>
parents:
2483
diff
changeset
|
832 |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
833 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
834 /* Ends C function definitions when using C++ */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
835 #ifdef __cplusplus |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
836 /* *INDENT-OFF* */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
837 } |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
838 /* *INDENT-ON* */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
839 #endif |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
840 #include "close_code.h" |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
841 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
842 #endif /* _SDL_haptic_h */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
843 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
844 /* vi: set ts=4 sw=4 expandtab: */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
845 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
846 |