home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / curses_391.lzh / Curses / acurses.h < prev    next >
C/C++ Source or Header  |  1990-10-27  |  2KB  |  78 lines

  1. #include <intuition/intuition.h>
  2. #include <intuition/screens.h>
  3.  
  4. #undef TRUE
  5. #undef FALSE
  6. #include "curses.h"
  7.  
  8. /*
  9.  *
  10.  * Module      : acurses.h
  11.  *
  12.  * Description : Header file for AMIGA CURSES package.
  13.  *
  14.  * Author      : Simon Raybould  (sie@fulcrum.bt.co.uk)
  15.  *
  16.  * Date        : 16th February 1990
  17.  *
  18.  */
  19.  
  20.  
  21. #define MAXTEXTLEN    80    /* Max text to an output call */
  22. #define SOUNDLENGTH    2    /* Number of bytes in the sound wave */
  23. #define CAPSMASK    0x07    /* leftshift | rightshift | capslock */
  24. #define SHIFTMASK    0x03    /* leftshift | rightshift */
  25.  
  26. /*
  27.  *    Characters
  28.  */
  29.  
  30. #define BS            0x08    /* Backspace */
  31. #define CR            0x0d    /* Carriage return */
  32.  
  33. /*
  34.  *    My Flags. These are global to all windows, not window specific.
  35.  */
  36.  
  37. #define CFLAG_CURSOR    (1<<0)    /* T=Cursor on, F=Cursor off. */
  38. #define CFLAG_CBREAK    (1<<1)    /* T=cbreak mode, F=nocbreak mode */
  39. #define CFLAG_NLCR    (1<<2)    /* T=nl to cr mapping, F=no mapping */
  40. #define    CFLAG_ECHO    (1<<3)    /* T=Echo enabled, F=no echo */
  41. #define    CFLAG_INITSCR    (1<<4)    /* T=initscr has been called */
  42.  
  43. /*
  44.  *    WINDOW flags, these are specific to each window.
  45.  */
  46.  
  47. #define CWF_MOVED    (1<<0)    /* move() has been done on this window */
  48.  
  49. /*
  50.  *    Buffer size for raw key events.
  51.  */
  52. #define RAWBUFSIZ    32
  53.  
  54. /*
  55.  *    Internal structures.
  56.  */
  57.  
  58. struct WindowState {
  59.     unsigned char SubWindow;
  60.     WINDOW Window;
  61.     short ScrollTop;
  62.     short ScrollBot;
  63.     struct WindowState *Prev;
  64.     struct WindowState *Next;
  65.     struct LineElement *FirstLine;
  66. };
  67.  
  68. struct LineElement {
  69.     unsigned char Touched;    /* This line needs refreshing */
  70.     char *Line;    /* Actual text */
  71.     char *LRLine;    /* text when last refreshed */
  72.     short *ATTRS;    /* Attributes */
  73.     short *LRATTRS;    /* Attributes when last refreshed */
  74.     struct LineElement *NextLine;
  75.     unsigned char StartCol;
  76.     unsigned char EndCol;
  77. };
  78.