home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / cprog / cursesp.zip / CURSPRIV.H < prev    next >
C/C++ Source or Header  |  1991-12-02  |  5KB  |  105 lines

  1. /****************************************************************/
  2. /*                         CURSPRIV.H                           */
  3. /* Header file for definitions and declarations for the         */
  4. /* PCcurses package. These definitions should not be gene-      */
  5. /* rally accessible to programmers.                             */
  6. /****************************************************************/
  7. /* This version of curses is based on ncurses, a curses version */
  8. /* originally written by Pavel Curtis at Cornell University.    */
  9. /* I have made substantial changes to make it run on IBM PC's,  */
  10. /* and therefore consider myself free to make it public domain. */
  11. /*              Bjorn Larsson (...mcvax!enea!infovax!bl)        */
  12. /****************************************************************/
  13. /* 1.0: Release:                                        870515  */
  14. /* 1.1: Add _chadd() for raw output routines:           880306  */
  15. /* 1.2: Support (by #ifdef UCMASM) for uppercase-only           */
  16. /*      assembly routine names. If UCMASM if defined,           */
  17. /*      all assembler names are #defined as upper case.         */
  18. /*      Not needed if you do "MASM /MX. Also missing            */
  19. /*      declaration of cursesscroll(). Fixes thanks to          */
  20. /*      N.D. Pentcheff:                                 881002  */
  21. /* 1.3: All modules lint-checked with MSC '-W3' and             */
  22. /*      turbo'C' '-w -w-pro' switches:                  881005  */
  23. /****************************************************************/
  24.  
  25. /* window properties */
  26.  
  27. #define _SUBWIN         1               /* window is a subwindow */
  28. #define _ENDLINE        2               /* last winline is last screen line */
  29. #define _FULLWIN        4               /* window fills screen */
  30. #define _SCROLLWIN      8               /* window lwr rgt is screen lwr rgt */
  31.  
  32. /* Miscellaneous */
  33.  
  34. #define _INBUFSIZ       200             /* size of terminal input buffer */
  35. #define _NO_CHANGE      -1              /* flags line edge unchanged */
  36.  
  37. #define _BREAKCHAR      0x03            /* ^C character */
  38. #define _DCCHAR         0x08            /* Delete Char char (BS) */
  39. #define _DLCHAR         0x1b            /* Delete Line char (ESC) */
  40. #define _GOCHAR         0x11            /* ^Q character */
  41. #define _PRINTCHAR      0x10            /* ^P character */
  42. #define _STOPCHAR       0x13            /* ^S character */
  43. #define  NUNGETCH       10              /* max # chars to ungetch() */
  44.  
  45. /* character mask definitions */
  46.  
  47. #define CHR_MSK ((int) 0x00ff)          /* ASCIIZ character mask */
  48. #define ATR_MSK ((int) 0xff00)          /* attribute mask */
  49. #define ATR_NRM ((int) 0x0000)          /* no special attributes */
  50.  
  51. /* type declarations */
  52.  
  53. typedef struct
  54.   {
  55.   WINDOW  *tmpwin;                      /* window used for updates */
  56.   int      cursrow;                     /* position of physical cursor */
  57.   int      curscol;
  58.   bool     autocr;                      /* if lf -> crlf */
  59.   bool     cbreak;                      /* if terminal unbuffered */
  60.   bool     echo;                        /* if terminal echo */
  61.   bool     raw;                         /* if terminal raw mode */
  62.   bool     refrbrk;                     /* if premature refresh brk allowed */
  63.   bool     orgcbr;                      /* original MSDOS ^-BREAK setting */
  64.   }     cursv;
  65.  
  66. /* External variables */
  67.  
  68. extern  cursv   _cursvar;               /* curses variables */
  69.  
  70.  
  71. /* Curses internal functions, not to be used by programmers */
  72.  
  73. /* #Define UCMASM if your version of MASM does not support */
  74. /*  the '/MX' switch, or if you use another assembler */
  75.  
  76. #ifdef  UCMASM
  77. #define _cursescattr    _CURSESCATTR
  78. #define _cursescmode    _CURSESCMODE
  79. #define _cursescursor   _CURSESCURSOR
  80. #define _cursesgcb      _CURSESGCB
  81. #define _cursesgcmode   _CURSESGCMODE
  82. #define _cursesgcols    _CURSESGCOLS
  83. #define _curseskey      _CURSESKEY
  84. #define _cursesscroll   _CURSESSCROLL
  85. #define _curseskeytst   _CURSESKEYTST
  86. #define _cursesputc     _CURSESPUTC
  87. #define _cursesscb      _CURSESSCB
  88. #endif
  89.  
  90. extern  int     _chadd(WINDOW*,int,int);
  91. extern  void    _cursescattr(char,char);
  92. extern  void    _cursescmode(int,int);
  93. extern  void    _cursescursor(int,int);
  94. extern  int     _cursesgcb(void);
  95. extern  int     _cursesgcmode(void);
  96. extern  int     _cursesgcols(void);
  97. extern  int     _curseskey(void);
  98. extern  bool    _curseskeytst(void);
  99. extern  void    _cursesscroll(int,int,int,int,int,char);
  100. extern  bool    _cursespendch(void);
  101. extern  void    _cursesputc(char, char);
  102. extern  void    _cursesscb(int);
  103.  
  104. // End of curspriv.h
  105.