include/SDL_haptic.h
branchgsoc2008_force_feedback
changeset 2480 b883974445fc
parent 2478 4fd783e0f34b
child 2481 5d0ea4576f20
     1.1 --- a/include/SDL_haptic.h	Mon Jun 30 21:38:29 2008 +0000
     1.2 +++ b/include/SDL_haptic.h	Tue Jul 01 09:22:22 2008 +0000
     1.3 @@ -60,15 +60,57 @@
     1.4  typedef struct SDL_HapticConstant {
     1.5     /* Header */
     1.6     Uint16 type;
     1.7 +   Uint16 direction;
     1.8 +
     1.9 +   /* Replay */
    1.10     Uint16 length;
    1.11     Uint16 delay;
    1.12 +
    1.13 +   /* Trigger */
    1.14 +   Uint16 button;
    1.15 +   Uint16 interval;
    1.16 +
    1.17 +   /* Constant */
    1.18 +   Sint16 level;
    1.19 +
    1.20 +   /* Envelope */
    1.21 +   Uint16 attack_length;
    1.22 +   Uint16 attack_level;
    1.23 +   Uint16 fade_length;
    1.24 +   Uint16 fade_level;
    1.25 +} SDL_HapticConstant;
    1.26 +typedef struct SDL_HapticPeriodic {
    1.27 +   /* Header */
    1.28 +   Uint16 type;
    1.29     Uint16 direction;
    1.30 -} SDL_HapticConstant;
    1.31 +
    1.32 +   /* Replay */
    1.33 +   Uint16 length;
    1.34 +   Uint16 delay;
    1.35 +
    1.36 +   /* Trigger */
    1.37 +   Uint16 button;
    1.38 +   Uint16 interval;
    1.39 +
    1.40 +   /* Periodic */
    1.41 +   Uint16 waveform;
    1.42 +   Uint16 period;
    1.43 +   Sint16 magnitude;
    1.44 +   Sint16 offset;
    1.45 +   Uint16 phase;
    1.46 +
    1.47 +   /* Envelope */
    1.48 +   Uint16 attack_length;
    1.49 +   Uint16 attack_level;
    1.50 +   Uint16 fade_length;
    1.51 +   Uint16 fade_level;
    1.52 +} SDL_HapticPeriodic;
    1.53  
    1.54  typedef union SDL_HapticEffect {
    1.55     /* Common for all force feedback effects */
    1.56     Uint16 type; /* Effect type */
    1.57     SDL_HapticConstant constant; /* Constant effect */
    1.58 +   SDL_HapticPeriodic periodic; /* Periodic effect */
    1.59  } SDL_HapticEffect;
    1.60  
    1.61