home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mmpm21tk.zip / TK / CAPTION / CAPTION.H < prev    next >
Text File  |  1993-03-20  |  7KB  |  158 lines

  1. /*************************************************************************
  2.  * File Name    :  caption.h
  3.  *
  4.  * Description  :  This file contains the definitions used by the Caption
  5.  *                 Creation Utility  samplr program.
  6.  *
  7.  * Copyright (C) IBM 1993
  8.  *************************************************************************/
  9. #define UM_NEXTLINE                 WM_USER + 1
  10. #define AUDIO_SLIDER_TICKS          20
  11.  
  12. #define ID_MAIN_DLG                 300
  13. #define ID_PLAY                     301
  14. #define ID_PAUSE                    302
  15. #define ID_STOP                     303
  16. #define ID_REWIND                   304
  17. #define ID_VOLUME                   305
  18. #define ID_NEXTLINE                 306
  19. #define ID_SET_TIMING               307
  20. #define ID_AUDIO_SLIDER             308
  21. #define ID_AUDIO_POSITION           309
  22. #define ID_DLG_PRODUCTINFO          310
  23. #define ID_AUDIOTXT                 311
  24. #define ID_TEXTTXT                  312
  25. #define ID_CAPTIONTXT               313
  26.  
  27. /*
  28.  * Menu ID's
  29.  */
  30. #define IDM_MAIN_MENU       1100
  31. #define IDM_FILE            1101
  32. #define IDM_OPEN            1102
  33. #define IDM_OPEN_AUDIO      1103
  34. #define IDM_OPEN_TEXT       1105
  35. #define IDM_OPEN_CAPTIONS   1106
  36. #define IDM_SAVE            1107
  37. #define IDM_SAVEAS          1108
  38. #define IDM_EXITPROG        1109
  39. #define IDM_OPTIONS         1111
  40. #define IDM_LINES           1112
  41. #define IDM_2_LINES         1113
  42. #define IDM_3_LINES         1114
  43. #define IDM_4_LINES         1115
  44. #define IDM_5_LINES         1116
  45. #define IDM_6_LINES         1117
  46. #define IDM_HELP            1110
  47. #define IDM_GENERAL_HELP    1121
  48. #define IDM_KEYS_HELP       1122
  49. #define IDM_USING_HELP      1124
  50. #define IDM_HELP_INDEX      1125
  51. #define IDM_PRODUCT_INFO    1123
  52.  
  53. /*
  54.  *  Help ID's
  55.  */
  56.  
  57. #define HELPTABLE_ID            2000
  58. #define SUBTABLE_MAIN_DLG       2001
  59.  
  60. #define PANEL_OVERVIEW         10500
  61. #define PANEL_KEYS_HELP        10524
  62. #define PANEL_FILEDLG_AUDIO     4163
  63. #define PANEL_FILEDLG_TEXT      4164
  64. #define PANEL_FILEDLG_SAVEAS    4165
  65.  
  66. /*
  67.  * String ID's
  68.  */
  69. #define STRID_OPEN_AUDIO            600
  70. #define STRID_OPEN_TEXT             601
  71. #define STRID_SAVEAS_TITLE          602
  72. #define STRID_SAVEAS_BUTTON         603
  73. #define STRID_HELP_TITLE            604
  74. #define STRID_DEFAULT_MAIN_TITLE    605
  75. #define STRID_DEFAULT_SIZE          606
  76. #define STRID_HELP_CREATION_FAILED  607
  77. #define STRID_HELP_LIBRARY_NAME     608
  78. #define STRID_AUDIO_POS_SECONDS     609
  79. #define STRID_AUDIO_POS_MINUTES     610
  80. #define STRID_UNKNOWN_ERROR         611
  81. #define STRID_ERROR_MESSAGE_TITLE   612
  82. #define STRID_SAVECHANGES_MESSAGE   613
  83. #define STRID_UNTIMED_MESSAGE       614
  84. #define STRID_OVERWRITE_QUERY       615
  85. #define STRID_TRUNCATE_WARNING      616
  86. #define STRID_TEXT_FILE_FORMAT      617
  87. #define STRID_TOO_MANY_LINES        618
  88. #define STRID_UNEXPECTED_EOF        619
  89. #define STRID_DISK_FULL             620
  90. #define STRID_GENERIC_DOS_ERROR     621
  91. #define STRID_OPEN_CAPTION          622
  92. #define STRID_AUDIOFILE_EXTENTION   624
  93. #define STRID_FIRSTLINE_OF_CCFILE   625
  94. #define STRID_CAPTION_FILE_NAME     626
  95. #define STRID_TEXT_FILE_NAME        627
  96. #define STRID_AUDIO_FILE_NAME       628
  97. #define STRID_NONE_FILE_NAME        629
  98. #define STRID_CANNOT_FIND_TEXTFILE  630
  99.  
  100.  
  101. #define ERROR_LENGTH      180    /* Max length (in bytes) of an error message */
  102. #define TITLE_LENGTH      40     /* Max length (in bytes) of a window title   */
  103. #define MAX_TEXT_LINES    500    /* Max number of lines in a single text file */
  104.  
  105. #define CHAR_NULL         0     /*--------------------------------------------*/
  106. #define CHAR_RETURN       13    /*Control characters present in ASCII files   */
  107. #define CHAR_EOF          26    /*--------------------------------------------*/
  108. #define CHAR_LINEFEED     10
  109.  
  110. #define UP_OPEN           1     /*--------------------------------------------*/
  111. #define UP_CLOSE          2     /*Default user parameters for MM_MCINOTIFY    */
  112. #define UP_PLAY           3     /*messages.                                   */
  113. #define UP_STOP           4     /*--------------------------------------------*/
  114. #define UP_PAUSE          5
  115. #define UP_RESUME         6
  116. #define UP_POSITION       7
  117. #define UP_STATUS         8
  118. #define UP_LOAD           9
  119. #define UP_SET            11
  120.  
  121. #define ST_CLOSED         1     /*--------------------------------------------*/
  122. #define ST_OPEN           2     /*Values for iState, which holds the current  */
  123. #define ST_PLAYING        3     /*status of the audio device.                 */
  124. #define ST_PAUSED         4     /*--------------------------------------------*/
  125. #define ST_SEEKING        5
  126.  
  127. #define CC_WIDTH          600   /*--------------------------------------------*/
  128. #define CC_DEFAULT_LINES  2     /*These constants control some of the size,   */
  129. #define CC_XMARGIN        10    /*placement and scrolling characteristics of  */
  130. #define CC_SCROLL_INC     3     /*the caption window.                         */
  131. #define CC_TIMER_ID       1     /*--------------------------------------------*/
  132.  
  133.                                 /*--------------------------------------------*/
  134. #define LINE_NOT_TIMED 99999999 /*This is the value of dwTime for those lines */
  135.                                 /*which have not yet been timed.              */
  136.                                 /*--------------------------------------------*/
  137.  
  138. #define ERROR_TEXT_FILE_FORMAT 999  /*----------------------------------------*/
  139. #define ERROR_TOO_MANY_LINES   998  /*                                        */
  140. #define ERROR_UNEXPECTED_EOF   997  /*File errors specific to this application*/
  141. #define ERROR_LINE_TRUNCATED   996  /*----------------------------------------*/
  142. #define ERROR_FILE_EXISTS       80
  143. #define ERROR_CANNOT_FIND_TEXTFILE  110
  144.  
  145. #define MAX_OUTPUT_LENGTH      150  /*Max length of line written to a _CC file*/
  146. #define BASE_10                 10
  147.  
  148.                                  /*---------- Line data structure ------------*/
  149. typedef _Packed struct _LINEDATA /*There is one of these for each caption line*/
  150.    {                             /*                                           */
  151.    PSZ    szText;                /*Pointer to a NULL-terminated text string   */
  152.    LONG   lTextLen;              /*Number of characters in the string         */
  153.    ULONG  ulTime;                /*Time (MM units) to display the string      */
  154.    }                             /*                                           */
  155. LINEDATA;                        /*An array of these structures is maintained */
  156.                                  /*in a table pointed to by pvLinedataTable.  */
  157. typedef LINEDATA FAR *PLINEDATA; /*-------------------------------------------*/
  158.