Mercurial > sdl-ios-xcode
annotate include/SDL_haptic.h @ 2653:54b892b6abb5 gsoc2008_force_feedback
Fixed haptic dummy driver not compiling with some compilers.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Mon, 25 Aug 2008 20:49:36 +0000 |
parents | 9408be170bff |
children |
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 * Example: |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
41 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
42 * \code |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
43 * int test_haptic( SDL_Joystick * joystick ) { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
44 * SDL_Haptic *haptic; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
45 * SDL_HapticEffect effect; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
46 * int effect_id; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
47 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
48 * // Open the device |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
49 * haptic = SDL_HapticOpenFromJoystick( joystick ); |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
50 * 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
|
51 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
52 * // See if it can do sine waves |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
53 * if ((SDL_HapticQuery(haptic) & SDL_HAPTIC_SINE)==0) { |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
54 * SDL_HapticClose(haptic); // No sine effect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
55 * return -1; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
56 * } |
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 * // Create the effect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
59 * 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
|
60 * effect.type = SDL_HAPTIC_SINE; |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
61 * effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates |
2501 | 62 * effect.periodic.direction.dir[0] = 18000; // Force comes from south |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
63 * effect.periodic.period = 1000; // 1000 ms |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
64 * effect.periodic.magnitude = 20000; // 20000/32767 strength |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
65 * effect.periodic.length = 5000; // 5 seconds long |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
66 * 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
|
67 * 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
|
68 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
69 * // Upload the effect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
70 * effect_id = SDL_HapticNewEffect( haptic, &effect ); |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
71 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
72 * // Test the effect |
2517
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
73 * SDL_HapticRunEffect( haptic, effect_id, 1 ); |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
74 * 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
|
75 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
76 * // 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
|
77 * SDL_HapticDestroyEffect( haptic, effect_id ); |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
78 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
79 * // Close the device |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
80 * SDL_HapticClose(haptic); |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
81 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
82 * return 0; // Success |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
83 * } |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
84 * \endcode |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
85 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
86 * \author Edgar Simo Serra |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
87 */ |
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 #ifndef _SDL_haptic_h |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
90 #define _SDL_haptic_h |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
91 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
92 #include "SDL_stdinc.h" |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
93 #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
|
94 #include "SDL_joystick.h" |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
95 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
96 #include "begin_code.h" |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
97 /* 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
|
98 #ifdef __cplusplus |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
99 /* *INDENT-OFF* */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
100 extern "C" { |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
101 /* *INDENT-ON* */ |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
102 #endif /* __cplusplus */ |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
103 |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
104 /** |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
105 * \typedef SDL_Haptic |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
106 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
107 * \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
|
108 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
109 * \sa SDL_HapticOpen |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
110 * \sa SDL_HapticOpenFromJoystick |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
111 * \sa SDL_HapticClose |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
112 */ |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
113 struct _SDL_Haptic; |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
114 typedef struct _SDL_Haptic SDL_Haptic; |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
115 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
116 |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
117 /* |
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
118 * Different haptic features a device can have. |
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
119 */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
120 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
121 * \def SDL_HAPTIC_CONSTANT |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
122 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
123 * \brief Constant haptic effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
124 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
125 * \sa SDL_HapticCondition |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
126 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
127 #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
|
128 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
129 * \def SDL_HAPTIC_SINE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
130 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
131 * \brief Periodic haptic effect that simulates sine waves. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
132 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
133 * \sa SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
134 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
135 #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
|
136 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
137 * \def SDL_HAPTIC_SQUARE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
138 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
139 * \brief Periodic haptic effect that simulates square waves. |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
140 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
141 * \sa SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
142 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
143 #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
|
144 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
145 * \def SDL_HAPTIC_TRIANGLE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
146 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
147 * \brief Periodic haptic effect that simulates triangular waves. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
148 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
149 * \sa SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
150 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
151 #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
|
152 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
153 * \def SDL_HAPTIC_SAWTOOTHUP |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
154 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
155 * \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
|
156 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
157 * \sa SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
158 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
159 #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
|
160 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
161 * \def SDL_HAPTIC_SAWTOOTHDOWN |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
162 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
163 * \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
|
164 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
165 * \sa SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
166 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
167 #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
|
168 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
169 * \def SDL_HAPTIC_RAMP |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
170 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
171 * \brief Ramp haptic effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
172 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
173 * \sa SDL_HapticRamp |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
174 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
175 #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
|
176 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
177 * \def SDL_HAPTIC_SPRING |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
178 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
179 * \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
|
180 * axes position. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
181 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
182 * \sa SDL_HapticCondition |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
183 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
184 #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
|
185 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
186 * \def SDL_HAPTIC_DAMPER |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
187 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
188 * \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
|
189 * axes velocity. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
190 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
191 * \sa SDL_HapticCondition |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
192 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
193 #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
|
194 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
195 * \def SDL_HAPTIC_INERTIA |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
196 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
197 * \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
|
198 * acceleration. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
199 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
200 * \sa SDL_HapticCondition |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
201 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
202 #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
|
203 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
204 * \def SDL_HAPTIC_FRICTION |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
205 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
206 * \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
|
207 * movement. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
208 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
209 * \sa SDL_HapticCondition |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
210 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
211 #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
|
212 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
213 * \def SDL_HAPTIC_CUSTOM |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
214 * |
2536
fe3ee345a5d2
Fixed some typos in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2535
diff
changeset
|
215 * \brief User defined custom haptic effect. |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
216 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
217 #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
|
218 /* 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
|
219 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
220 * \def SDL_HAPTIC_GAIN |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
221 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
222 * \brief Device supports setting the global gain. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
223 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
224 * \sa SDL_HapticSetGain |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
225 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
226 #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
|
227 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
228 * \def SDL_HAPTIC_AUTOCENTER |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
229 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
230 * \brief Device supports setting autocenter. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
231 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
232 * \sa SDL_HapticSetAutocenter |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
233 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
234 #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
|
235 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
236 * \def SDL_HAPTIC_STATUS |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
237 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
238 * \brief Device can be queried for effect status. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
239 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
240 * \sa SDL_HapticGetEffectStatus |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
241 */ |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
242 #define SDL_HAPTIC_STATUS (1<<14) /* Device can be queried for effect status */ |
2645
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
243 /** |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
244 * \def SDL_HAPTIC_PAUSE |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
245 * |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
246 * \brief Device can be paused. |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
247 * |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
248 * \sa SDL_HapticPause |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
249 * \sa SDL_HapticUnpause |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
250 */ |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
251 #define SDL_HAPTIC_PAUSE (1<<15) /* Device can be paused. */ |
2481 | 252 |
253 | |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
254 /* |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
255 * Direction encodings |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
256 */ |
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_POLAR |
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 polar 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_POLAR 0 |
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 * \def SDL_HAPTIC_CARTESIAN |
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 * \brief Uses cartesian coordinates for the direction. |
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 * \sa SDL_HapticDirection |
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 #define SDL_HAPTIC_CARTESIAN 1 |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
273 /** |
2536
fe3ee345a5d2
Fixed some typos in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2535
diff
changeset
|
274 * \def SDL_HAPTIC_SPHERICAL |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
275 * |
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
276 * \brief Uses spherical coordinates for the direction. |
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
277 * |
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
278 * \sa SDL_HapticDirection |
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
279 */ |
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
280 #define SDL_HAPTIC_SPHERICAL 2 |
2499
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 |
2517
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
283 /* |
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
284 * Misc defines. |
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
285 */ |
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
286 /** |
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
287 * \def SDL_HAPTIC_INFINITY |
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
288 * |
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
289 * \brief Used to play a device an infinite number of times. |
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
290 * |
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
291 * \sa SDL_HapticRunEffect |
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
292 */ |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
293 #define SDL_HAPTIC_INFINITY 4294967295U |
2517
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
294 |
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
295 |
2499
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 * \struct SDL_HapticDirection |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
298 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
299 * \brief Structure that represents a haptic direction. |
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 * Directions can be specified by: |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
302 * - SDL_HAPTIC_POLAR : Specified by polar coordinates. |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
303 * - SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates. |
2558 | 304 * - SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates. |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
305 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
306 * Cardinal directions of the haptic device are relative to the positioning |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
307 * 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
|
308 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
309 * The following diagram represents the cardinal directions: |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
310 * \code |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
311 * .--. |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
312 * |__| .-------. |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
313 * |=.| |.-----.| |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
314 * |--| || || |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
315 * | | |'-----'| |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
316 * |__|~')_____(' |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
317 * [ COMPUTER ] |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
318 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
319 * |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
320 * North (0,-1) |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
321 * ^ |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
322 * | |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
323 * | |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
324 * (1,0) West <----[ HAPTIC ]----> East (-1,0) |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
325 * | |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
326 * | |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
327 * v |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
328 * South (0,1) |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
329 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
330 * |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
331 * [ USER ] |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
332 * \|||/ |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
333 * (o o) |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
334 * ---ooO-(_)-Ooo--- |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
335 * \endcode |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
336 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
337 * If type is SDL_HAPTIC_POLAR, direction is encoded by hundredths of a |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
338 * degree starting north and turning clockwise. SDL_HAPTIC_POLAR only uses |
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
339 * the first dir parameter. The cardinal directions would be: |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
340 * - North: 0 (0 degrees) |
2511
f12ae0bae468
Fixed bugs in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2507
diff
changeset
|
341 * - East: 9000 (90 degrees) |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
342 * - South: 18000 (180 degrees) |
2511
f12ae0bae468
Fixed bugs in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2507
diff
changeset
|
343 * - West: 27000 (270 degrees) |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
344 * |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
345 * If type is SDL_HAPTIC_CARTESIAN, direction is encoded by three positions |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
346 * (X axis, Y axis and Z axis (with 3 axes)). SDL_HAPTIC_CARTESIAN uses |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
347 * the first three dir parameters. The cardinal directions would be: |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
348 * - North: 0,-1, 0 |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
349 * - East: -1, 0, 0 |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
350 * - South: 0, 1, 0 |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
351 * - West: 1, 0, 0 |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
352 * The Z axis represents the height of the effect if supported, otherwise |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
353 * it's unused. In cartesian encoding (1,2) would be the same as (2,4), you |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
354 * can use any multiple you want, only the direction matters. |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
355 * |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
356 * If type is SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations. |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
357 * The first two dir parameters are used. The dir parameters are as follows |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
358 * (all values are in hundredths of degrees): |
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
359 * 1) Degrees from (1, 0) rotated towards (0, 1). |
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
360 * 2) Degrees towards (0, 0, 1) (device needs at least 3 axes). |
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
361 * |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
362 * |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
363 * Example of force coming from the south with all encodings (force coming |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
364 * from the south means the user will have to pull the stick to counteract): |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
365 * \code |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
366 * SDL_HapticDirection direction; |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
367 * |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
368 * // Cartesian directions |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
369 * direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding. |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
370 * direction.dir[0] = 0; // X position |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
371 * direction.dir[1] = 1; // Y position |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
372 * // Assuming the device has 2 axes, we don't need to specify third parameter. |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
373 * |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
374 * // Polar directions |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
375 * direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding. |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
376 * direction.dir[0] = 18000; // Polar only uses first parameter |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
377 * |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
378 * // Spherical coordinates |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
379 * direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
380 * direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters. |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
381 * \endcode |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
382 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
383 * \sa SDL_HAPTIC_POLAR |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
384 * \sa SDL_HAPTIC_CARTESIAN |
2558 | 385 * \sa SDL_HAPTIC_SPHERICAL |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
386 * \sa SDL_HapticEffect |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
387 * \sa SDL_HapticNumAxes |
2499
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 typedef struct SDL_HapticDirection { |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
390 Uint8 type; /**< The type of encoding. */ |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
391 Uint16 dir[3]; /**< The encoded direction. */ |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
392 } SDL_HapticDirection; |
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 |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
395 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
396 * \struct SDL_HapticConstant |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
397 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
398 * \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
|
399 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
400 * 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
|
401 * |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
402 * A constant effect applies a constant force in the specified direction |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
403 * to the joystick. |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
404 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
405 * \sa SDL_HAPTIC_CONSTANT |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
406 * \sa SDL_HapticEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
407 */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
408 typedef struct SDL_HapticConstant { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
409 /* Header */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
410 Uint16 type; /**< SDL_HAPTIC_CONSTANT */ |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
411 SDL_HapticDirection direction; /**< Direction of the effect. */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
412 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
413 /* Replay */ |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
414 Uint32 length; /**< Duration of the effect. */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
415 Uint16 delay; /**< Delay before starting the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
416 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
417 /* Trigger */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
418 Uint16 button; /**< Button that triggers the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
419 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
|
420 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
421 /* Constant */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
422 Sint16 level; /**< Strength of the constant effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
423 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
424 /* Envelope */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
425 Uint16 attack_length; /**< Duration of the attack. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
426 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
|
427 Uint16 fade_length; /**< Duration of the fade. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
428 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
|
429 } SDL_HapticConstant; |
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 * \struct SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
432 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
433 * \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
|
434 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
435 * The struct handles the following effects: |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
436 * - SDL_HAPTIC_SINE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
437 * - SDL_HAPTIC_SQUARE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
438 * - SDL_HAPTIC_TRIANGLE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
439 * - SDL_HAPTIC_SAWTOOTHUP |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
440 * - SDL_HAPTIC_SAWTOOTHDOWN |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
441 * |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
442 * A periodic effect consists in a wave-shaped effect that repeats itself |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
443 * over time. The type determines the shape of the wave and the parameters |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
444 * determine the dimensions of the wave. |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
445 * |
2526 | 446 * Phase is given by hundredth of a cyle meaning that giving the phase a value |
447 * of 9000 will displace it 25% of it's period. Here are sample values: | |
448 * - 0: No phase displacement. | |
449 * - 9000: Displaced 25% of it's period. | |
450 * - 18000: Displaced 50% of it's period. | |
451 * - 27000: Displaced 75% of it's period. | |
452 * - 36000: Displaced 100% of it's period, same as 0, but 0 is preffered. | |
453 * | |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
454 * Examples: |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
455 * \code |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
456 * SDL_HAPTIC_SINE |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
457 * __ __ __ __ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
458 * / \ / \ / \ / |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
459 * / \__/ \__/ \__/ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
460 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
461 * SDL_HAPTIC_SQUARE |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
462 * __ __ __ __ __ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
463 * | | | | | | | | | | |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
464 * | |__| |__| |__| |__| | |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
465 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
466 * SDL_HAPTIC_TRIANGLE |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
467 * /\ /\ /\ /\ /\ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
468 * / \ / \ / \ / \ / |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
469 * / \/ \/ \/ \/ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
470 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
471 * SDL_HAPTIC_SAWTOOTHUP |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
472 * /| /| /| /| /| /| /| |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
473 * / | / | / | / | / | / | / | |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
474 * / |/ |/ |/ |/ |/ |/ | |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
475 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
476 * SDL_HAPTIC_SAWTOOTHDOWN |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
477 * \ |\ |\ |\ |\ |\ |\ | |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
478 * \ | \ | \ | \ | \ | \ | \ | |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
479 * \| \| \| \| \| \| \| |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
480 * \endcode |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
481 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
482 * \sa SDL_HAPTIC_SINE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
483 * \sa SDL_HAPTIC_SQUARE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
484 * \sa SDL_HAPTIC_TRIANGLE |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
485 * \sa SDL_HAPTIC_SAWTOOTHUP |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
486 * \sa SDL_HAPTIC_SAWTOOTHDOWN |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
487 * \sa SDL_HapticEffect |
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 typedef struct SDL_HapticPeriodic { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
490 /* Header */ |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
491 Uint16 type; /**< SDL_HAPTIC_SINE, SDL_HAPTIC_SQUARE, |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
492 SDL_HAPTIC_TRIANGLE, SDL_HAPTIC_SAWTOOTHUP or |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
493 SDL_HAPTIC_SAWTOOTHDOWN */ |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
494 SDL_HapticDirection direction; /**< Direction of the effect. */ |
2497
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 /* Replay */ |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
497 Uint32 length; /**< Duration of the effect. */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
498 Uint16 delay; /**< Delay before starting the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
499 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
500 /* Trigger */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
501 Uint16 button; /**< Button that triggers the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
502 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
|
503 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
504 /* Periodic */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
505 Uint16 period; /**< Period of the wave. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
506 Sint16 magnitude; /**< Peak value. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
507 Sint16 offset; /**< Mean value of the wave. */ |
2526 | 508 Uint16 phase; /**< Horizontal shift given by hundredth of a cycle. */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
509 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
510 /* Envelope */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
511 Uint16 attack_length; /**< Duration of the attack. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
512 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
|
513 Uint16 fade_length; /**< Duration of the fade. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
514 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
|
515 } SDL_HapticPeriodic; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
516 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
517 * \struct SDL_HapticCondition |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
518 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
519 * \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
|
520 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
521 * The struct handles the following effects: |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
522 * - SDL_HAPTIC_SPRING: Effect based on axes position. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
523 * - SDL_HAPTIC_DAMPER: Effect based on axes velocity. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
524 * - SDL_HAPTIC_INERTIA: Effect based on axes acceleration. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
525 * - 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
|
526 * |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
527 * Direction is handled by condition internals instead of a direction member. |
2525
1fb3fba13a2c
Added third axis to condition effects.
Edgar Simo <bobbens@gmail.com>
parents:
2523
diff
changeset
|
528 * The condition effect specific members have three parameters. The first |
1fb3fba13a2c
Added third axis to condition effects.
Edgar Simo <bobbens@gmail.com>
parents:
2523
diff
changeset
|
529 * refers to the X axis, the second refers to the Y axis and the third |
1fb3fba13a2c
Added third axis to condition effects.
Edgar Simo <bobbens@gmail.com>
parents:
2523
diff
changeset
|
530 * refers to the Z axis. The right terms refer to the positive side of the |
1fb3fba13a2c
Added third axis to condition effects.
Edgar Simo <bobbens@gmail.com>
parents:
2523
diff
changeset
|
531 * axis and the left terms refer to the negative side of the axis. Please |
1fb3fba13a2c
Added third axis to condition effects.
Edgar Simo <bobbens@gmail.com>
parents:
2523
diff
changeset
|
532 * refer to the SDL_HapticDirection diagram for which side is positive and |
1fb3fba13a2c
Added third axis to condition effects.
Edgar Simo <bobbens@gmail.com>
parents:
2523
diff
changeset
|
533 * which is negative. |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
534 * |
2500
5251d0510b7e
Implemented polar coordinates in linux.
Edgar Simo <bobbens@gmail.com>
parents:
2499
diff
changeset
|
535 * \sa SDL_HapticDirection |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
536 * \sa SDL_HAPTIC_SPRING |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
537 * \sa SDL_HAPTIC_DAMPER |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
538 * \sa SDL_HAPTIC_INERTIA |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
539 * \sa SDL_HAPTIC_FRICTION |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
540 * \sa SDL_HapticEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
541 */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
542 typedef struct SDL_HapticCondition { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
543 /* Header */ |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
544 Uint16 type; /**< SDL_HAPTIC_SPRING, SDL_HAPTIC_DAMPER, |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
545 SDL_HAPTIC_INERTIA or SDL_HAPTIC_FRICTION */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
546 SDL_HapticDirection direction; /**< Direction of the effect - Not used ATM. */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
547 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
548 /* Replay */ |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
549 Uint32 length; /**< Duration of the effect. */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
550 Uint16 delay; /**< Delay before starting the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
551 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
552 /* Trigger */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
553 Uint16 button; /**< Button that triggers the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
554 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
|
555 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
556 /* Condition */ |
2525
1fb3fba13a2c
Added third axis to condition effects.
Edgar Simo <bobbens@gmail.com>
parents:
2523
diff
changeset
|
557 Uint16 right_sat[3]; /**< Level when joystick is to the positive side. */ |
1fb3fba13a2c
Added third axis to condition effects.
Edgar Simo <bobbens@gmail.com>
parents:
2523
diff
changeset
|
558 Uint16 left_sat[3]; /**< Level when joystick is to the negative side. */ |
1fb3fba13a2c
Added third axis to condition effects.
Edgar Simo <bobbens@gmail.com>
parents:
2523
diff
changeset
|
559 Sint16 right_coeff[3]; /**< How fast to increase the force towards the positive side. */ |
1fb3fba13a2c
Added third axis to condition effects.
Edgar Simo <bobbens@gmail.com>
parents:
2523
diff
changeset
|
560 Sint16 left_coeff[3]; /**< How fast to increase the force towards the negative side. */ |
1fb3fba13a2c
Added third axis to condition effects.
Edgar Simo <bobbens@gmail.com>
parents:
2523
diff
changeset
|
561 Uint16 deadband[3]; /**< Size of the dead zone. */ |
1fb3fba13a2c
Added third axis to condition effects.
Edgar Simo <bobbens@gmail.com>
parents:
2523
diff
changeset
|
562 Sint16 center[3]; /**< Position of the dead zone. */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
563 } SDL_HapticCondition; |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
564 /** |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
565 * \struct SDL_HapticRamp |
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 * \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
|
568 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
569 * 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
|
570 * |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
571 * The ramp effect starts at start strength and ends at end strength. |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
572 * It augments in linear fashion. If you use attack and fade with a ramp |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
573 * they effects get added to the ramp effect making the effect become |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
574 * quadratic instead of linear. |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
575 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
576 * \sa SDL_HAPTIC_RAMP |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
577 * \sa SDL_HapticEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
578 */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
579 typedef struct SDL_HapticRamp { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
580 /* Header */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
581 Uint16 type; /**< SDL_HAPTIC_RAMP */ |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
582 SDL_HapticDirection direction; /**< Direction of the effect. */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
583 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
584 /* Replay */ |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
585 Uint32 length; /**< Duration of the effect. */ |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
586 Uint16 delay; /**< Delay before starting the effect. */ |
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 /* Trigger */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
589 Uint16 button; /**< Button that triggers the effect. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
590 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
|
591 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
592 /* Ramp */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
593 Sint16 start; /**< Beginning strength level. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
594 Sint16 end; /**< Ending strength level. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
595 |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
596 /* Envelope */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
597 Uint16 attack_length; /**< Duration of the attack. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
598 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
|
599 Uint16 fade_length; /**< Duration of the fade. */ |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
600 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
|
601 } SDL_HapticRamp; |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
602 /** |
2535
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
603 * \struct SDL_HapticCustom |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
604 * |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
605 * \brief A structure containing a template for the SDL_HAPTIC_CUSTOM effect. |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
606 * |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
607 * A custom force feedback effect is much like a periodic effect, where the |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
608 * application can define it's exact shape. You will have to allocate the |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
609 * data yourself. Data should consist of channels * samples Uint16 samples. |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
610 * |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
611 * If channels is one, the effect is rotated using the defined direction. |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
612 * Otherwise it uses the samples in data for the different axes. |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
613 * |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
614 * \sa SDL_HAPTIC_CUSTOM |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
615 * \sa SDL_HapticEffect |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
616 */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
617 typedef struct SDL_HapticCustom { |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
618 /* Header */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
619 Uint16 type; /**< SDL_HAPTIC_CUSTOM */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
620 SDL_HapticDirection direction; /**< Direction of the effect. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
621 |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
622 /* Replay */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
623 Uint32 length; /**< Duration of the effect. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
624 Uint16 delay; /**< Delay before starting the effect. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
625 |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
626 /* Trigger */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
627 Uint16 button; /**< Button that triggers the effect. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
628 Uint16 interval; /**< How soon it can be triggered again after button. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
629 |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
630 /* Custom */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
631 Uint8 channels; /**< Axes to use, minimum of one. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
632 Uint16 period; /**< Sample periods. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
633 Uint16 samples; /**< Amount of samples. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
634 Uint16 *data; /**< Should contain channels*samples items. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
635 |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
636 /* Envelope */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
637 Uint16 attack_length; /**< Duration of the attack. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
638 Uint16 attack_level; /**< Level at the start of the attack. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
639 Uint16 fade_length; /**< Duration of the fade. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
640 Uint16 fade_level; /**< Level at the end of the fade. */ |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
641 } SDL_HapticCustom; |
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
642 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
643 * \union SDL_HapticEffect |
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 * \brief The generic template for any haptic effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
646 * |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
647 * All values max at 32767 (0x7FFF). Signed values also can be negative. |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
648 * Time values unless specified otherwise are in milliseconds. |
2481 | 649 * |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
650 * You can also pass SDL_HAPTIC_INFINITY to length instead of a 0-32767 value. |
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
651 * Neither delay, interval, attack_length nor fade_length support |
2526 | 652 * SDL_HAPTIC_INFINITY. Fade will also not be used since effect never ends. |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
653 * |
2532 | 654 * Additionally, the SDL_HAPTIC_RAMP effect does not support a duration of |
655 * SDL_HAPTIC_INFINITY. | |
656 * | |
2554
2681a04c2d3d
Warn about using button triggers.
Edgar Simo <bobbens@gmail.com>
parents:
2536
diff
changeset
|
657 * Button triggers may not be supported on all devices, it is advised to not |
2681a04c2d3d
Warn about using button triggers.
Edgar Simo <bobbens@gmail.com>
parents:
2536
diff
changeset
|
658 * use them if possible. Buttons start at index 1 instead of index 0 like |
2681a04c2d3d
Warn about using button triggers.
Edgar Simo <bobbens@gmail.com>
parents:
2536
diff
changeset
|
659 * they joystick. |
2681a04c2d3d
Warn about using button triggers.
Edgar Simo <bobbens@gmail.com>
parents:
2536
diff
changeset
|
660 * |
2563
be2ea885d70b
More verbose about envelopes.
Edgar Simo <bobbens@gmail.com>
parents:
2558
diff
changeset
|
661 * If both attack_length and fade_level are 0, the envelope is not used, |
be2ea885d70b
More verbose about envelopes.
Edgar Simo <bobbens@gmail.com>
parents:
2558
diff
changeset
|
662 * otherwise both values are used. |
be2ea885d70b
More verbose about envelopes.
Edgar Simo <bobbens@gmail.com>
parents:
2558
diff
changeset
|
663 * |
2481 | 664 * Common parts: |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
665 * \code |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
666 * // Replay - All effects have this |
2519
af9df9662807
More explicit with iterations and length.
Edgar Simo <bobbens@gmail.com>
parents:
2517
diff
changeset
|
667 * Uint32 length; // Duration of effect (ms). |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
668 * Uint16 delay; // Delay before starting effect. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
669 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
670 * // Trigger - All effects have this |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
671 * Uint16 button; // Button that triggers effect. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
672 * Uint16 interval; // How soon before effect can be triggered again. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
673 * |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
674 * // Envelope - All effects except condition effects have this |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
675 * Uint16 attack_length; // Duration of the attack (ms). |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
676 * Uint16 attack_level; // Level at the start of the attack. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
677 * Uint16 fade_length; // Duration of the fade out (ms). |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
678 * Uint16 fade_level; // Level at the end of the fade. |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
679 * \endcode |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
680 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
681 * |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
682 * Here we have an example of a constant effect evolution in time: |
2481 | 683 * |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
684 * \code |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
685 * Strength |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
686 * ^ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
687 * | |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
688 * | effect level --> _________________ |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
689 * | / \ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
690 * | / \ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
691 * | / \ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
692 * | / \ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
693 * | attack_level --> | \ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
694 * | | | <--- fade_level |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
695 * | |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
696 * +--------------------------------------------------> Time |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
697 * [--] [---] |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
698 * attack_length fade_length |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
699 * |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
700 * [------------------][-----------------------] |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
701 * delay length |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
702 * \endcode |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
703 * |
2504
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
704 * Note either the attack_level or the fade_level may be above the actual |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
705 * effect level. |
e68c99a19a2f
Fixed more mistakes in documentation.
Edgar Simo <bobbens@gmail.com>
parents:
2502
diff
changeset
|
706 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
707 * \sa SDL_HapticConstant |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
708 * \sa SDL_HapticPeriodic |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
709 * \sa SDL_HapticCondition |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
710 * \sa SDL_HapticRamp |
2535
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
711 * \sa SDL_HapticCustom |
2481 | 712 */ |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
713 typedef union SDL_HapticEffect { |
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
714 /* Common for all force feedback effects */ |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
715 Uint16 type; /**< Effect type. */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
716 SDL_HapticConstant constant; /**< Constant effect. */ |
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
717 SDL_HapticPeriodic periodic; /**< Periodic effect. */ |
2500
5251d0510b7e
Implemented polar coordinates in linux.
Edgar Simo <bobbens@gmail.com>
parents:
2499
diff
changeset
|
718 SDL_HapticCondition condition; /**< Condition effect. */ |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
719 SDL_HapticRamp ramp; /**< Ramp effect. */ |
2535
f0ed8471497d
Added custom effect with support on darwin.
Edgar Simo <bobbens@gmail.com>
parents:
2532
diff
changeset
|
720 SDL_HapticCustom custom; /**< Custom effect. */ |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
721 } SDL_HapticEffect; |
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
722 |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
723 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
724 /* Function prototypes */ |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
725 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
726 * \fn int SDL_NumHaptics(void) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
727 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
728 * \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
|
729 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
730 * \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
|
731 */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
732 extern DECLSPEC int SDLCALL SDL_NumHaptics(void); |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
733 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
734 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
735 * \fn const char * SDL_HapticName(int device_index) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
736 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
737 * \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
|
738 * 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
|
739 * 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
|
740 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
741 * \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
|
742 * \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
|
743 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
744 * \sa SDL_NumHaptics |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
745 */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
746 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
|
747 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
748 /** |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
749 * \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
|
750 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
751 * \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
|
752 * 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
|
753 * |
2507
8ef1d0f4d0c1
Gain is set to max on haptic device open.
Edgar Simo <bobbens@gmail.com>
parents:
2506
diff
changeset
|
754 * When opening a haptic device, it's gain will be set to maximum and |
8ef1d0f4d0c1
Gain is set to max on haptic device open.
Edgar Simo <bobbens@gmail.com>
parents:
2506
diff
changeset
|
755 * autocenter will be disabled. To modify these values use |
8ef1d0f4d0c1
Gain is set to max on haptic device open.
Edgar Simo <bobbens@gmail.com>
parents:
2506
diff
changeset
|
756 * SDL_HapticSetGain and SDL_HapticSetAutocenter |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
757 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
758 * \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
|
759 * \return Device identifier or NULL on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
760 * |
2505 | 761 * \sa SDL_HapticIndex |
2512
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
762 * \sa SDL_HapticOpenFromMouse |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
763 * \sa SDL_HapticOpenFromJoystick |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
764 * \sa SDL_HapticClose |
2507
8ef1d0f4d0c1
Gain is set to max on haptic device open.
Edgar Simo <bobbens@gmail.com>
parents:
2506
diff
changeset
|
765 * \sa SDL_HapticSetGain |
8ef1d0f4d0c1
Gain is set to max on haptic device open.
Edgar Simo <bobbens@gmail.com>
parents:
2506
diff
changeset
|
766 * \sa SDL_HapticSetAutocenter |
2646 | 767 * \sa SDL_HapticPause |
768 * \sa SDL_HapticStopAll | |
2476
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
769 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
770 extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index); |
2476
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
771 |
2506 | 772 /** |
773 * \fn int SDL_HapticOpened(int device_index) | |
774 * | |
775 * \brief Checks if the haptic device at index has been opened. | |
776 * | |
777 * \param device_index Index to check to see if it has been opened. | |
778 * \return 1 if it has been opened or 0 if it hasn't. | |
779 * | |
780 * \sa SDL_HapticOpen | |
781 * \sa SDL_HapticIndex | |
782 */ | |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
783 extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index); |
2505 | 784 |
785 /** | |
786 * \fn int SDL_HapticIndex(SDL_Haptic * haptic) | |
787 * | |
788 * \brief Gets the index of a haptic device. | |
789 * | |
790 * \param haptic Haptic device to get the index of. | |
791 * \return The index of the haptic device or -1 on error. | |
792 * | |
793 * \sa SDL_HapticOpen | |
2506 | 794 * \sa SDL_HapticOpened |
2505 | 795 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
796 extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic); |
2505 | 797 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
798 /** |
2512
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
799 * \fn int SDL_MouseIsHaptic(void) |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
800 * |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
801 * \brief Gets whether or not the current mouse has haptic capabilities. |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
802 * |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
803 * \return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't. |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
804 * |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
805 * \sa SDL_HapticOpenFromMouse |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
806 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
807 extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void); |
2512
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
808 |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
809 /** |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
810 * \fn SDL_Haptic * SDL_HapticOpenFromMouse(void) |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
811 * |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
812 * \brief Tries to open a haptic device from the current mouse. |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
813 * |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
814 * \return The haptic device identifier or NULL on error. |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
815 * |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
816 * \sa SDL_MouseIsHaptic |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
817 * \sa SDL_HapticOpen |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
818 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
819 extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void); |
2512
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
820 |
ef147ee4896c
Improved some ioctl handling.
Edgar Simo <bobbens@gmail.com>
parents:
2511
diff
changeset
|
821 /** |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
822 * \fn int SDL_JoystickIsHaptic(SDL_Joystick * joystick) |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
823 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
824 * \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
|
825 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
826 * \param joystick Joystick to test for haptic capabilities. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
827 * \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
|
828 * or -1 if an error ocurred. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
829 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
830 * \sa SDL_HapticOpenFromJoystick |
2489
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
831 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
832 extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick); |
2489
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
833 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
834 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
835 * \fn SDL_Haptic * SDL_HapticOpenFromJoystick(SDL_Joystick * joystick) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
836 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
837 * \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
|
838 * 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
|
839 * |
2622 | 840 * When opening from a joystick you should first close the haptic device before |
841 * closing the joystick device. If not, on some implementations the haptic | |
842 * device will also get unallocated and you'll be unable to use force feedback | |
843 * on that device. | |
844 * | |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
845 * \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
|
846 * \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
|
847 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
848 * \sa SDL_HapticOpen |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
849 * \sa SDL_HapticClose |
2489
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
850 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
851 extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick * joystick); |
2489
96adc8025331
Exposed some of the joystick stuff to the haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
2488
diff
changeset
|
852 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
853 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
854 * \fn void SDL_HapticClose(SDL_Haptic * haptic) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
855 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
856 * \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
|
857 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
858 * \param haptic Haptic device to close. |
2476
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
859 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
860 extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic); |
2476
242d8a668ebb
* Implemented opening and closing of haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2472
diff
changeset
|
861 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
862 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
863 * \fn int SDL_HapticNumEffects(SDL_Haptic * haptic) |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
864 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
865 * \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
|
866 * |
2630
776f7f800131
Updating documentation about NumEffects and NumPlaying.
Edgar Simo <bobbens@gmail.com>
parents:
2622
diff
changeset
|
867 * On some platforms this isn't fully supported, and therefore is an |
776f7f800131
Updating documentation about NumEffects and NumPlaying.
Edgar Simo <bobbens@gmail.com>
parents:
2622
diff
changeset
|
868 * aproximation. Always check to see if your created effect was actually |
776f7f800131
Updating documentation about NumEffects and NumPlaying.
Edgar Simo <bobbens@gmail.com>
parents:
2622
diff
changeset
|
869 * created and do not rely solely on HapticNumEffects. |
776f7f800131
Updating documentation about NumEffects and NumPlaying.
Edgar Simo <bobbens@gmail.com>
parents:
2622
diff
changeset
|
870 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
871 * \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
|
872 * \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
|
873 * -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
874 * |
2515
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
875 * \sa SDL_HapticNumEffectsPlaying |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
876 * \sa SDL_HapticQuery |
2478
4fd783e0f34b
Added query functions for haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2477
diff
changeset
|
877 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
878 extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic); |
2478
4fd783e0f34b
Added query functions for haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2477
diff
changeset
|
879 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
880 /** |
2515
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
881 * \fn int SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic) |
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
882 * |
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
883 * \brief Returns the number of effects a haptic device can play at the same time. |
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
884 * |
2630
776f7f800131
Updating documentation about NumEffects and NumPlaying.
Edgar Simo <bobbens@gmail.com>
parents:
2622
diff
changeset
|
885 * This is not supported on all platforms, but will always return a value. Added |
776f7f800131
Updating documentation about NumEffects and NumPlaying.
Edgar Simo <bobbens@gmail.com>
parents:
2622
diff
changeset
|
886 * here for the sake of completness. |
776f7f800131
Updating documentation about NumEffects and NumPlaying.
Edgar Simo <bobbens@gmail.com>
parents:
2622
diff
changeset
|
887 * |
2515
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
888 * \param haptic The haptic device to query maximum playing effect.s |
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
889 * \return The number of effects the haptic device can play at the same time |
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
890 * or -1 on error. |
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
891 * |
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
892 * \sa SDL_HapticNumEffects |
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
893 * \sa SDL_HapticQuery |
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
894 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
895 extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic); |
2515
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
896 |
030fc4375e63
Added SDL_HapticNumEffectsPlaying().
Edgar Simo <bobbens@gmail.com>
parents:
2512
diff
changeset
|
897 /** |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
898 * \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
|
899 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
900 * \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
|
901 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
902 * Example: |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
903 * \code |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
904 * if (SDL_HapticQueryEffects(haptic) & SDL_HAPTIC_CONSTANT) { |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
905 * printf("We have constant haptic effect!"); |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
906 * } |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
907 * \endcode |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
908 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
909 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
910 * \param haptic The haptic device to query. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
911 * \return Haptic features in bitwise manner (OR'd). |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
912 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
913 * \sa SDL_HapticNumEffects |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
914 * \sa SDL_HapticEffectSupported |
2478
4fd783e0f34b
Added query functions for haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2477
diff
changeset
|
915 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
916 extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic); |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
917 |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
918 |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
919 /** |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
920 * \fn int SDL_HapticNumAxes(SDL_Haptic * haptic) |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
921 * |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
922 * \brief Gets the number of haptic axes the device has. |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
923 * |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
924 * \sa SDL_HapticDirection |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
925 */ |
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
926 extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic); |
2478
4fd783e0f34b
Added query functions for haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2477
diff
changeset
|
927 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
928 /** |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
929 * \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
|
930 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
931 * \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
|
932 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
933 * \param haptic Haptic device to check on. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
934 * \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
|
935 * \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
|
936 * -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
937 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
938 * \sa SDL_HapticQuery |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
939 * \sa SDL_HapticNewEffect |
2486
24dd8b8669fa
Added SDL_HAPTIC_CUSTOM (not supported on linux).
Edgar Simo <bobbens@gmail.com>
parents:
2485
diff
changeset
|
940 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
941 extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic, SDL_HapticEffect * effect); |
2486
24dd8b8669fa
Added SDL_HAPTIC_CUSTOM (not supported on linux).
Edgar Simo <bobbens@gmail.com>
parents:
2485
diff
changeset
|
942 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
943 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
944 * \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
|
945 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
946 * \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
|
947 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
948 * \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
|
949 * \param effect Properties of the effect to create. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
950 * \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
|
951 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
952 * \sa SDL_HapticUpdateEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
953 * \sa SDL_HapticRunEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
954 * \sa SDL_HapticDestroyEffect |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
955 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
956 extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic, SDL_HapticEffect * effect); |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
957 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
958 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
959 * \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
|
960 * |
2526 | 961 * \brief Updates the properties of an effect. |
962 * | |
963 * Can be used dynamically, although behaviour when dynamically changing | |
964 * direction may be strange. Specifically the effect may reupload itself | |
965 * and start playing from the start. You cannot change the type either when | |
966 * running UpdateEffect. | |
2488
8e2bdbccf7ff
Added SDL_HapticUpdateEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2487
diff
changeset
|
967 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
968 * \param haptic Haptic device that has the effect. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
969 * \param effect Effect to update. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
970 * \param data New effect properties to use. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
971 * \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
|
972 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
973 * \sa SDL_HapticNewEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
974 * \sa SDL_HapticRunEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
975 * \sa SDL_HapticDestroyEffect |
2488
8e2bdbccf7ff
Added SDL_HapticUpdateEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2487
diff
changeset
|
976 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
977 extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect, SDL_HapticEffect * data); |
2488
8e2bdbccf7ff
Added SDL_HapticUpdateEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2487
diff
changeset
|
978 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
979 /** |
2536
fe3ee345a5d2
Fixed some typos in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2535
diff
changeset
|
980 * \fn int SDL_HapticRunEffect(SDL_Haptic * haptic, int effect, Uint32 iterations) |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
981 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
982 * \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
|
983 * |
2526 | 984 * If iterations are SDL_HAPTIC_INFINITY, it'll run the effect over and over |
985 * repeating the envelope (attack and fade) every time. If you only want the | |
986 * effect to last forever, set SDL_HAPTIC_INFINITY in the effect's length | |
987 * parameter. | |
988 * | |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
989 * \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
|
990 * \param effect Identifier of the haptic effect to run. |
2517
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
991 * \param iterations Number of iterations to run the effect. Use |
37c13c12c878
Broke API by introducing iterations to SDL_HapticRunEffects().
Edgar Simo <bobbens@gmail.com>
parents:
2515
diff
changeset
|
992 * SDL_HAPTIC_INFINITY for infinity. |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
993 * \return 0 on success or -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
994 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
995 * \sa SDL_HapticStopEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
996 * \sa SDL_HapticDestroyEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
997 * \sa SDL_HapticGetEffectStatus |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
998 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
999 extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic, int effect, Uint32 iterations); |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
1000 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
1001 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1002 * \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
|
1003 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1004 * \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
|
1005 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1006 * \param haptic Haptic device to stop the effect on. |
2499
cc2b270608b2
Created SDL_HapticDirection.
Edgar Simo <bobbens@gmail.com>
parents:
2498
diff
changeset
|
1007 * \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
|
1008 * \return 0 on success or -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1009 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1010 * \sa SDL_HapticRunEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1011 * \sa SDL_HapticDestroyEffect |
2485
67978eea6d10
Added SDL_HapticStopEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2484
diff
changeset
|
1012 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
1013 extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic, int effect); |
2485
67978eea6d10
Added SDL_HapticStopEffect().
Edgar Simo <bobbens@gmail.com>
parents:
2484
diff
changeset
|
1014 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
1015 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1016 * \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
|
1017 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1018 * \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
|
1019 * 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
|
1020 * closed. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1021 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1022 * \param haptic Device to destroy the effect on. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1023 * \param effect Identifier of the effect to destroy. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1024 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1025 * \sa SDL_HapticNewEffect |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
1026 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
1027 extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic, int effect); |
2477
97f75ea43a93
Starting to add infrastructure to handle haptic effects.
Edgar Simo <bobbens@gmail.com>
parents:
2476
diff
changeset
|
1028 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
1029 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1030 * \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
|
1031 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1032 * \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
|
1033 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1034 * Device must support the SDL_HAPTIC_STATUS feature. |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
1035 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1036 * \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
|
1037 * \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
|
1038 * \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
|
1039 * or -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1040 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1041 * \sa SDL_HapticRunEffect |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1042 * \sa SDL_HapticStopEffect |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
1043 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
1044 extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic *haptic, int effect); |
2495
66c02abeef0e
Added SDL_HapticGetEffectStatus().
Edgar Simo <bobbens@gmail.com>
parents:
2489
diff
changeset
|
1045 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
1046 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1047 * \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
|
1048 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1049 * \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
|
1050 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1051 * Device must support the SDL_HAPTIC_GAIN feature. |
2483
9d52368ebcf5
Setting effects memory to 0.
Edgar Simo <bobbens@gmail.com>
parents:
2482
diff
changeset
|
1052 * |
2507
8ef1d0f4d0c1
Gain is set to max on haptic device open.
Edgar Simo <bobbens@gmail.com>
parents:
2506
diff
changeset
|
1053 * The user may specify the maxmimum gain by setting the environment variable |
8ef1d0f4d0c1
Gain is set to max on haptic device open.
Edgar Simo <bobbens@gmail.com>
parents:
2506
diff
changeset
|
1054 * SDL_HAPTIC_GAIN_MAX which should be between 0 and 100. All calls to |
8ef1d0f4d0c1
Gain is set to max on haptic device open.
Edgar Simo <bobbens@gmail.com>
parents:
2506
diff
changeset
|
1055 * SDL_HapticSetGain will scale linearly using SDL_HAPTIC_GAIN_MAX as the |
8ef1d0f4d0c1
Gain is set to max on haptic device open.
Edgar Simo <bobbens@gmail.com>
parents:
2506
diff
changeset
|
1056 * maximum. |
8ef1d0f4d0c1
Gain is set to max on haptic device open.
Edgar Simo <bobbens@gmail.com>
parents:
2506
diff
changeset
|
1057 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1058 * \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
|
1059 * \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
|
1060 * \return 0 on success or -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1061 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1062 * \sa SDL_HapticQuery |
2483
9d52368ebcf5
Setting effects memory to 0.
Edgar Simo <bobbens@gmail.com>
parents:
2482
diff
changeset
|
1063 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
1064 extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain); |
2483
9d52368ebcf5
Setting effects memory to 0.
Edgar Simo <bobbens@gmail.com>
parents:
2482
diff
changeset
|
1065 |
2498
ab567bd667bf
Fixed various mistakes in the doxygen.
Edgar Simo <bobbens@gmail.com>
parents:
2497
diff
changeset
|
1066 /** |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1067 * \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
|
1068 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1069 * \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
|
1070 * 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
|
1071 * |
2497
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1072 * Device must support the SDL_HAPTIC_AUTOCENTER feature. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1073 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1074 * \param haptic Haptic device to set autocentering on. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1075 * \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
|
1076 * \return 0 on success or -1 on error. |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1077 * |
0893fbf73b3d
Renamed SDL_HapticQueryEffects to SDL_HapticQuery.
Edgar Simo <bobbens@gmail.com>
parents:
2495
diff
changeset
|
1078 * \sa SDL_HapticQuery |
2484
666472fd4cb0
HapticSetGain checks to see if device supports it.
Edgar Simo <bobbens@gmail.com>
parents:
2483
diff
changeset
|
1079 */ |
2523
366d84fdf8d1
Haptic subsystem handles haptic axes now.
Edgar Simo <bobbens@gmail.com>
parents:
2519
diff
changeset
|
1080 extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter); |
2484
666472fd4cb0
HapticSetGain checks to see if device supports it.
Edgar Simo <bobbens@gmail.com>
parents:
2483
diff
changeset
|
1081 |
2645
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1082 /** |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1083 * \fn extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic) |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1084 * |
2646 | 1085 * \brief Pauses a haptic device. |
2645
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1086 * |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1087 * Device must support the SDL_HAPTIC_PAUSE feature. Call SDL_HapticUnpause |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1088 * to resume playback. |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1089 * |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1090 * Do not modify the effects nor add new ones while the device is paused. |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1091 * That can cause all sorts of weird errors. |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1092 * |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1093 * \param haptic Haptic device to pause. |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1094 * \return 0 on success or -1 on error. |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1095 * |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1096 * \sa SDL_HapticUnpause |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1097 */ |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1098 extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic); |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1099 |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1100 /** |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1101 * \fn extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic) |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1102 * |
2646 | 1103 * \brief Unpauses a haptic device. |
2645
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1104 * |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1105 * Call to unpause after SDL_HapticPause. |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1106 * |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1107 * \param haptic Haptic device to pause. |
2646 | 1108 * \return 0 on success or -1 on error. |
2645
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1109 * |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1110 * \sa SDL_HapticPause |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1111 */ |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1112 extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic); |
269ba4f28d0e
Added support for pausing/unpausing haptic devices.
Edgar Simo <bobbens@gmail.com>
parents:
2630
diff
changeset
|
1113 |
2646 | 1114 /** |
1115 * \fn extern DECSLPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic) | |
1116 * | |
1117 * \brief Stops all the currently playing effects on a haptic device. | |
1118 * | |
1119 * \param haptic Haptic device to stop. | |
1120 * \return 0 on success or -1 on error. | |
1121 */ | |
1122 extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic); | |
1123 | |
2472
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1124 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1125 /* Ends C function definitions when using C++ */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1126 #ifdef __cplusplus |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1127 /* *INDENT-OFF* */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1128 } |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1129 /* *INDENT-ON* */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1130 #endif |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1131 #include "close_code.h" |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1132 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1133 #endif /* _SDL_haptic_h */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1134 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1135 /* vi: set ts=4 sw=4 expandtab: */ |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1136 |
3f73c88c9abb
First commit of the SDL_haptic subsystem.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1137 |