home *** CD-ROM | disk | FTP | other *** search
/ The CIA World Factbook 1992 / k3bimage.iso / sel / 02 / 0035 / screen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-02  |  3.5 KB  |  74 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(short,short,union REGS *);        /* Set cursor position      */
  31. void set_char_atr(unsigned,union REGS *);       /* Set char and attribute   */
  32. void write_str(char*,unsigned,union REGS *);    /* write string/attr        */
  33. unsigned get_char_atr(union REGS *);            /* Get char and attribute   */
  34. short end_box(short,short*,short**,union REGS *); /* Restore window        */
  35. short set_box ( short   ,                       /* Set window function      */
  36.                 unsigned short,
  37.                 short   ,
  38.                 short   ,
  39.                 short   ,
  40.                 short   ,
  41.                 short * ,
  42.                 short **,
  43.                 union REGS *);
  44.  
  45. const short box_loc[] = {                       /* Coordinates of the boxes */
  46. /* start   start   end    end
  47.    row     col     row    col */
  48.    5    ,  4    ,  13   , 34    ,       /* Box 0        */
  49.    9    ,  12   ,  14   , 72    ,       /* Box 1        */
  50.    12   ,  25   ,  20   , 52    ,       /* Box 2        */
  51.    };
  52.  
  53. typedef struct {
  54.             unsigned short win;
  55.             unsigned short txt;
  56.                 } ATTRIB;
  57.  
  58. const ATTRIB attribute[]= {             /* Attributes for each box      */
  59.     {
  60.     GN_BG|RD_FG|HI_FG,                  /* GRN/WHT Border (box 0)       */
  61.     GN_BG|WH_FG|HI_FG                   /* GRN/RED Text                 */
  62.     },
  63.     {
  64.     BL_BG|WH_FG|HI_FG,                  /* BLU/WHT Border (box 1)        */
  65.     BL_BG|RD_FG|GN_FG|HI_FG             /* BLU/YEL Text                  */
  66.     },
  67.     {
  68.     BL_BG|GN_BG|RD_FG|HI_FG,            /* RED/CYN Border (box 2)         */
  69.     BL_BG|GN_BG|RD_FG|GN_FG|HI_FG       /* YEL/CYN Text                   */
  70.     }
  71.     };
  72. /****************************************************************************/
  73. /***********************  E N D  O F  M O D U L E  **************************/
  74.