include/SDL_haptic.h
branchgsoc2008_force_feedback
changeset 2480 b883974445fc
parent 2478 4fd783e0f34b
child 2481 5d0ea4576f20
--- a/include/SDL_haptic.h	Mon Jun 30 21:38:29 2008 +0000
+++ b/include/SDL_haptic.h	Tue Jul 01 09:22:22 2008 +0000
@@ -60,15 +60,57 @@
 typedef struct SDL_HapticConstant {
    /* Header */
    Uint16 type;
+   Uint16 direction;
+
+   /* Replay */
    Uint16 length;
    Uint16 delay;
+
+   /* Trigger */
+   Uint16 button;
+   Uint16 interval;
+
+   /* Constant */
+   Sint16 level;
+
+   /* Envelope */
+   Uint16 attack_length;
+   Uint16 attack_level;
+   Uint16 fade_length;
+   Uint16 fade_level;
+} SDL_HapticConstant;
+typedef struct SDL_HapticPeriodic {
+   /* Header */
+   Uint16 type;
    Uint16 direction;
-} SDL_HapticConstant;
+
+   /* Replay */
+   Uint16 length;
+   Uint16 delay;
+
+   /* Trigger */
+   Uint16 button;
+   Uint16 interval;
+
+   /* Periodic */
+   Uint16 waveform;
+   Uint16 period;
+   Sint16 magnitude;
+   Sint16 offset;
+   Uint16 phase;
+
+   /* Envelope */
+   Uint16 attack_length;
+   Uint16 attack_level;
+   Uint16 fade_length;
+   Uint16 fade_level;
+} SDL_HapticPeriodic;
 
 typedef union SDL_HapticEffect {
    /* Common for all force feedback effects */
    Uint16 type; /* Effect type */
    SDL_HapticConstant constant; /* Constant effect */
+   SDL_HapticPeriodic periodic; /* Periodic effect */
 } SDL_HapticEffect;