comparison src/haptic/SDL_syshaptic.h @ 2477:97f75ea43a93 gsoc2008_force_feedback

Starting to add infrastructure to handle haptic effects.
author Edgar Simo <bobbens@gmail.com>
date Mon, 30 Jun 2008 16:48:16 +0000
parents 4b874e3a3a2c
children b9eb2cfe16cd
comparison
equal deleted inserted replaced
2476:242d8a668ebb 2477:97f75ea43a93
23 #include "SDL_config.h" 23 #include "SDL_config.h"
24 24
25 #include "SDL_haptic.h" 25 #include "SDL_haptic.h"
26 26
27 27
28 struct haptic_effect
29 {
30 SDL_HapticEffect effect; /* The current event */
31 struct haptic_hweffect *hweffect; /* The hardware behind the event */
32 };
33
34 /*
35 * The real SDL_Haptic event.
36 */
28 struct _SDL_Haptic 37 struct _SDL_Haptic
29 { 38 {
30 Uint8 index; /* stores index it is attached to */ 39 Uint8 index; /* Stores index it is attached to */
31 const char* name; /* stores the name of the device */ 40 const char* name; /* Stores the name of the device */
32 41
33 int neffects; /* maximum amount of effects */ 42 struct haptic_effect *effects; /* Allocated effects */
34 unsigned int supported; /* supported effects */ 43 int neffects; /* Maximum amount of effects */
44 unsigned int supported; /* Supported effects */
35 45
36 struct haptic_hwdata *hwdata; /* driver dependent */ 46 struct haptic_hwdata *hwdata; /* Driver dependent */
37 int ref_count; /* count for multiple opens */ 47 int ref_count; /* Count for multiple opens */
38 }; 48 };
39
40 49
41 extern int SDL_SYS_HapticInit(void); 50 extern int SDL_SYS_HapticInit(void);
42 extern const char * SDL_SYS_HapticName(int index); 51 extern const char * SDL_SYS_HapticName(int index);
43 extern int SDL_SYS_HapticOpen(SDL_Haptic * haptic); 52 extern int SDL_SYS_HapticOpen(SDL_Haptic * haptic);
44 extern void SDL_SYS_HapticClose(SDL_Haptic * haptic); 53 extern void SDL_SYS_HapticClose(SDL_Haptic * haptic);