home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / communic / pcmail / main / window.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-05  |  2.2 KB  |  84 lines

  1. /*++
  2. /* NAME
  3. /*    window 5
  4. /* SUMMARY
  5. /*    window definitions
  6. /* PROJECT
  7. /*    pc-mail
  8. /* PACKAGE
  9. /*    mail
  10. /* SYNOPSIS
  11. /*    #include "window.h"
  12. /* DESCRIPTION
  13. /*    The macros and variables defined here are used for window
  14. /*    manipulation.
  15. /* .nf
  16.  
  17.  /*
  18.   * A "window" is a rectangular region that extends from the left-hand side
  19.   * of the screen all the way to the right-hand side.
  20.   */
  21.  
  22. typedef struct win {
  23.     short   base;            /* offset (lines) from top of screen */
  24.     short   size;            /* number of lines */
  25.     short   x;                /* current column (from the left) */
  26.     short   y;                /* current row (from the top) */
  27. } WIN;
  28.  
  29. extern WIN wins[];
  30.  
  31.  /* window selection macros */
  32.  
  33. #define    topwin    (wins+0)        /* top window */
  34. #define    midwin    (wins+1)        /* middle window */
  35. #define    botwin    (wins+2)        /* bottom window */
  36.  
  37. extern int CO,                /* columns on screen */
  38.         LI;                /* lines on screen */
  39.  
  40.  /* function-key codes */
  41.  
  42. extern char *KU,            /* up-arrow */
  43.        *KD,                /* down-arrow */
  44.        *KL,                /* left-arrow */
  45.        *KR,                /* right-arrow */
  46.        *PU,                /* page up */
  47.        *PD;                /* page down */
  48.  
  49.  /* codes to turn on/off keypad, if you have one */
  50.  
  51. extern char *KS,            /* keypad on */
  52.        *KE;                /* keypad off */
  53.  
  54.  /* functions that write to windows */
  55.  
  56. extern void wininit();            /* init the window manipulator */
  57. extern int printcl();            /* erase line, then print */
  58. extern int printat();            /* print line */
  59. extern void setwin();            /* set focus and cursor */
  60. extern int wputc();            /* print character to window */
  61. extern int wputs();            /* print string to window */
  62. extern void clrtoeol();            /* erase to end of line */
  63. extern void clrtobot();            /* clear to screen bottom */
  64. extern void beep();            /* ring the bell */
  65.  
  66. #ifdef unix
  67. extern int fputchar();            /* put a character on stdout */
  68. #endif
  69.  
  70. /* SEE ALSO
  71. /*    window(3)    window manipulator
  72. /* AUTHOR(S)
  73. /*    W.Z. Venema
  74. /*    Eindhoven University of Technology
  75. /*    Department of Mathematics and Computer Science
  76. /*    Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
  77. /* CREATION DATE
  78. /*    Wed Apr  1 21:14:53 GMT+1:00 1987
  79. /* LAST MODIFICATION
  80. /*    90/01/22 13:02:57
  81. /* VERSION/RELEASE
  82. /*    2.1
  83. /*--*/
  84.