home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / jmodem.zip / SCREEN.H < prev    next >
Text File  |  1990-06-20  |  5KB  |  87 lines

  1. /****************************************************************************/
  2. /*   FILE SCREEN.H                                                          */
  3. /*   Created  11-JAN-1990               Richard B. Johnson                  */
  4. /*                                      405 Broughton Drive                 */
  5. /*                                      Beverly, Massachusetts 01915        */
  6. /*                                      BBS (508) 922-3166                  */
  7. /*                                                                          */
  8. /*                             JMODEM screen header                         */
  9. /*                                                                          */
  10. /****************************************************************************/
  11.  
  12. #define VIDEO 0x10                              /* Video BIOS interrupt */
  13. #define BNK   (128 << 8)                        /* Video attributes     */
  14. #define RD_BG (64  << 8)
  15. #define GN_BG (32  << 8)
  16. #define BL_BG (16  << 8)
  17. #define HI_FG ( 8  << 8)
  18. #define RD_FG ( 4  << 8)
  19. #define GN_FG ( 2  << 8)
  20. #define BL_FG ( 1  << 8)
  21. #define BK_BG ( 7  << 8)
  22. #define WH_FG ( RD_FG|BL_FG|GN_FG)
  23. #define boxes 4                                 /* Number of windows        */
  24. #define param 7                                 /* Number of parameters     */
  25. #define lines 6                                 /* Max lines of text in box */
  26.                         /* Function prototypes  */
  27. void get_curs(union REGS *);                    /* Get cursor position      */
  28. void kill_curs(union REGS *);                   /* Kill the cursor          */
  29. void restore_curs(union REGS *);                /* Restore the cursor       */
  30. void set_curs(                                  /* Set cursor position      */
  31.               short         ,                   /* Row                      */
  32.               short         ,                   /* Column                   */
  33.               union REGS *) ;                   /* Pointer to structure     */
  34. void set_char_atr(                              /* Set char and attribute   */
  35.               unsigned short,                   /* Character and attribute  */
  36.               union REGS *) ;                   /* Pointer to structure     */
  37. void write_str(                                 /* Write string/attr        */
  38.               char*         ,                   /* Pointer to string        */
  39.               unsigned short,                   /* Screen attribute         */
  40.               union REGS *) ;                   /* Pointer to structure     */
  41. unsigned short get_char_atr(union REGS *);      /* Get char and attribute   */
  42. void end_box(                                   /* Restore window           */
  43.               short         ,                   /* Page (screen) number     */
  44.               short*        ,                   /* Pointer to saved params  */
  45.               short**       ,                   /* Pointer to pointer array */
  46.               union REGS *) ;                   /* Pointer to structure     */
  47. void set_box(                                   /* Set window function      */
  48.               short   ,                         /* Screen page number       */
  49.               unsigned short,                   /* Screen attribute         */
  50.               short   ,                         /* Start row                */
  51.               short   ,                         /* Start column             */
  52.               short   ,                         /* End row                  */
  53.               short   ,                         /* End column               */
  54.               short * ,                         /* Pointer to param table   */
  55.               short **,                         /* Pointer to the buffer    */
  56.               union REGS *);                    /* Pointer to REGS struct.  */
  57.  
  58. const short box_loc[] = {                       /* Coordinates of the boxes */
  59. /* start   start   end    end
  60.    row     col     row    col */
  61.    5    ,  4    ,  13   , 34    ,       /* Box 0        */
  62.    9    ,  12   ,  14   , 72    ,       /* Box 1        */
  63.    12   ,  25   ,  20   , 52            /* Box 2        */
  64.    };
  65.  
  66. typedef struct {
  67.             unsigned short win;            /* Attributes for the window     */
  68.             unsigned short txt;            /* Attributes for text in window */
  69.                 } ATTRIB;
  70.  
  71. const ATTRIB attribute[]= {                /* Attributes for each box       */
  72.     {
  73.     (GN_BG|RD_FG|HI_FG),                   /* GRN/WHT Border (box 0)        */
  74.     (GN_BG|WH_FG|HI_FG)                    /* GRN/RED Text                  */
  75.     },
  76.     {
  77.     (BL_BG|WH_FG|HI_FG),                   /* BLU/WHT Border (box 1)        */
  78.     (BL_BG|RD_FG|GN_FG|HI_FG)              /* BLU/YEL Text                  */
  79.     },
  80.     {
  81.     (BL_BG|GN_BG|RD_FG|HI_FG),             /* RED/CYN Border (box 2)        */
  82.     (BL_BG|GN_BG|RD_FG|GN_FG|HI_FG)        /* YEL/CYN Text                  */
  83.     }
  84.     };
  85. /****************************************************************************/
  86. /***********************  E N D  O F  M O D U L E  **************************/
  87.