home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v6.zip / MMPM2TK / TK / CAPDLL / CAPTIONS.H < prev    next >
Text File  |  1993-04-01  |  5KB  |  122 lines

  1. /*************************************************************************
  2.  * File Name    :  captions.h
  3.  *
  4.  * Description  :  This file contains the definitions used by the Caption
  5.  *                 sample application.
  6.  *
  7.  * Copyright (C) IBM 1993
  8.  *************************************************************************/
  9. /*------------------ Commands accepted by ccSendCommand -----------------*/
  10.  
  11. #define CC_START                 1
  12. #define CC_STOP                  2
  13. #define CC_SET                   3
  14. #define CC_STATUS                4
  15.  
  16. #define CCERR_UNEXPECTED_EOF         1000
  17. #define CCERR_FILE_FORMAT            1001
  18. #define CCERR_TOO_MANY_LINES         1002
  19. #define CCERR_INVALID_WINDOW_HANDLE  1003
  20. #define CCERR_INVALID_COMMAND        1004
  21. #define CCERR_NO_DEVICE_NAME         1005
  22. #define CCERR_INVALID_STATUS_REQUEST 1006
  23. #define CCERR_CANNOT_CREATE_BITMAP   1007
  24.  
  25. #define CC_WINDOW_ID           150
  26.  
  27.  
  28.  
  29. /*------------------------ Messages used by this application -----------------*/
  30.  
  31. #define UMCC_NEXTLINE  WM_USER + 1
  32.  
  33. #define UMCC_START     WM_USER + 2  /* This message starts captioning.        */
  34.                                     /* Mp2 holds a pointer to a CC_START_PARMS*/
  35.                                     /* struct. Cast the return value to APIRET*/
  36.  
  37. #define UMCC_STOP      WM_USER + 3  /* This message hides the caption window  */
  38.                                     /* and stops captioning.                  */
  39.  
  40. #define UMCC_STATUS    WM_USER + 4  /* This message queries the status of a   */
  41.                                     /* captioning parameter                   */
  42.  
  43. #define UMCC_SET       WM_USER + 5  /* This message sets the status of a      */
  44.                                     /* captioning parameter.                  */
  45.  
  46. #define UMCC_ERROR     WM_USER + 6
  47.  
  48.  
  49. /*------------- Parameter structure used by CC_START command -----------------*/
  50.  
  51. typedef _Packed struct _CC_START_PARMS
  52. {
  53.   HWND hwndOwner;        /* Handle of user window to be sent MM_POSITIONCHANGE*/
  54.                          /* messages after the captioning system is through   */
  55.                          /* with them.  If set to NULL, the cc system will    */
  56.                          /* discard the messages after using them.            */
  57.  
  58.   PSZ   pszDeviceName;   /* Alias of the MCI device playing the audio. Supply */
  59.                          /* this alias to have the captioning system request  */
  60.                          /* the MM_MCIPOSITIONCHANGE messages from MMPM/2. If */
  61.                          /* no device name is specified, an error will be     */
  62.                          /* returned to the application.                      */
  63.  
  64.   PSZ   pszCaptionFile;/*   Pointer to a NULL terminated string which is the  */
  65.                          /* file containing the captioning data.              */
  66. }
  67. CC_START_PARMS;
  68.  
  69. typedef CC_START_PARMS FAR *PCC_START_PARMS;
  70.  
  71.  
  72. /*------------- Parameter structure used by CC_STATUS command ----------------*/
  73.  
  74. typedef struct _CC_STATUS_PARMS
  75. {
  76.    ULONG ulItem;             /* Item field for status flags                   */
  77.    ULONG ulReturn;           /* Value associated with the item queried        */
  78. }
  79. CC_STATUS_PARMS;
  80.  
  81. typedef CC_STATUS_PARMS FAR *PCC_STATUS_PARMS;
  82.                                          /*---------- Status flags -----------*/
  83.                                          /*                                   */
  84. #define CC_STATUS_TEXT_COLUMNS      1    /* Columns of text in caption window */
  85. #define CC_STATUS_TEXT_ROWS         2    /* Rows of text in caption window    */
  86. #define CC_STATUS_TEXT_COLOR        3    /* Color index of text color         */
  87. #define CC_STATUS_BACKGROUND_COLOR  4    /* Color index of background color   */
  88. #define CC_STATUS_X_POSITION        5    /* X coordinate of captioning window */
  89. #define CC_STATUS_Y_POSITION        6    /* Y coordinate of captioning window */
  90.                                          /*-----------------------------------*/
  91.  
  92.  
  93. /*------------------- Parameter structure used by CC_SET command ---------------------*/
  94.  
  95. typedef struct _CC_SET_PARMS
  96. {
  97.    ULONG ulRows;
  98.    ULONG ulBackgroundColor;
  99.    ULONG ulTextColor;
  100.    ULONG ulXposition;
  101.    ULONG ulYposition;
  102.    ULONG ulColumns;
  103. }
  104. CC_SET_PARMS;
  105.  
  106. typedef CC_SET_PARMS FAR *PCC_SET_PARMS;
  107.                                         /*------------ Set flags -------------*/
  108.                                         /*                                    */
  109. #define CC_SET_TEXT_COLUMNS      1      /* Columns of text in caption window  */
  110. #define CC_SET_TEXT_ROWS         2      /* Rows of text in caption window     */
  111. #define CC_SET_TEXT_COLOR        3      /* Color index of text color          */
  112. #define CC_SET_BACKGROUND_COLOR  4      /* Color index of background color    */
  113. #define CC_SET_X_POSITION        5      /* X coordinate of captioning window  */
  114. #define CC_SET_Y_POSITION        6      /* Y coordinate of captioning window  */
  115.                                         /*------------------------------------*/
  116.  
  117. /*-------------- Captioning function prototypes ------------------------------*/
  118.  
  119. ULONG APIENTRY ccInitialize  ( HWND hwndParent );
  120. ULONG APIENTRY ccSendCommand ( USHORT  usMsg, MPARAM mp1, MPARAM mp2 );
  121. VOID  APIENTRY ccTerminate   ( HWND hwndCaption );
  122.