home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_GEN / FACETV.ZIP / X_DELAY.H < prev    next >
Text File  |  1994-01-05  |  2KB  |  84 lines

  1. /************************************************************************
  2. **
  3. ** @(#)x_delay.h    01/05/94    Chris Ahlstrom
  4. **
  5. **  ----------------------------------
  6. **  73340.26@compuserve.com
  7. **  ----------------------------------
  8. **
  9. **  C/C++
  10. **
  11. **    Defines a universally useful set of parameters for setting
  12. ** up a set of delay timers.
  13. **
  14. **    The parameters themselves are stored in the
  15. ** DelayParameters structure.  If this structure ever changes,
  16. ** we will have to edit many other files, perhaps:
  17. **
  18. **        WINDELAY.ID
  19. **        WINDELAY.DLG
  20. **        WINDELAY.BOX
  21. **        X_DELAY.H
  22. **        X_DELAY.BOX
  23. **        XAPPDATA.H
  24. **
  25. ** Note the following, which applies to all dialog-box data structures:
  26. ** You do not need to create a special version of the parameters-data-
  27. ** structure for Windows, because the doDialog() function of the
  28. ** WDialogBox class in the FACE_WIN library knows how to construct the
  29. ** proper-size dialog-data-structure on the fly.  You need only create
  30. ** one that exactly represents the data as it will be *used*.
  31. **
  32. *************************************************************************/
  33.  
  34. #if !defined(X_DELAY_h)                    /* { X_DELAY_h    */
  35. #define X_DELAY_h
  36.  
  37.  
  38. /************************************************************************
  39. ** DelayParameters (for dialog box)
  40. **
  41. **    An interface between the delay-parameter dialog box
  42. ** and the AFCTask class.
  43. **
  44. **    The array of 5 delay times could be written like the following,
  45. ** but we want the ease of array processing.  See the #defines below.
  46. **
  47. **    int beforeInterval;
  48. **    int forStimulus;
  49. **    int betweenInterval;
  50. **    int forFeedback;
  51. **    int extraDelay;
  52. **
  53. *************************************************************************/
  54.  
  55. #define AFC_DELAYS_SUPPORTED     5
  56. #define DEL_NAME_DIALOG_LENGTH    32
  57.  
  58. typedef enum
  59. {
  60.     DELAY_BEFORE_INTERVAL    = 0,
  61.     DELAY_FOR_STIMULUS,
  62.     DELAY_BETWEEN_INTERVAL,
  63.     DELAY_FOR_FEEDBACK,
  64.     DELAY_EXTRA,
  65.  
  66.     DELAY_MAX
  67.  
  68. } DelayCodes;
  69.  
  70. typedef struct
  71. {
  72.     char Name[DEL_NAME_DIALOG_LENGTH+1];    /* descriptive name    */
  73.     int timerDelay[DELAY_MAX];            /* 5 timer times    */
  74.     int scaleFactor;                /* a delay in msec    */
  75.     int baseID;                    /* lowest timer ID    */
  76.  
  77. } DelayParameters;
  78.  
  79.  
  80.  
  81. #endif                            /* } X_DELAY_h    */
  82.  
  83.  
  84.