home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / catalogs / mtchplay.zip / WINDOW.H < prev   
Text File  |  1992-09-20  |  3KB  |  105 lines

  1. /* ------------ window.h ------------ */
  2. /* From DDJ, September 1988 */
  3.  
  4. void establish_window(int,int,int,int,int,int,int);
  5. void window_title(char *);
  6. void clear_window(void);
  7. void delete_window(void);
  8. void scroll_window(int);
  9. void text_window(char **, int);
  10. int select_window(int,int,int,int (*func)(int,int));
  11. int get_key(void);
  12. void hidecursor(void);
  13. void set_cursor_type(unsigned);
  14. void clear_screen(void);
  15. void writeline(int,int,char *);
  16. void current_window(void);
  17. void error_message(char *);
  18.  
  19. #define MAX_WINDOWS 10
  20.  
  21. #define TRUE 1
  22. #define FALSE 0
  23. #define ERROR -1
  24.  
  25. #define  BELL 7
  26. #define  ESC 27
  27. #define  SHIFT_HT 143
  28. #define  CTRL_T 20
  29. #define  CTRL_B 2
  30. #define  CTRL_D 4
  31. #define  ALT_D 160
  32. #define  ALT_E 146
  33. #define  ALT_F 161
  34. #define  ALT_O 152
  35. #define  ALT_S 159
  36.  
  37. #define  F1 187
  38. #define  F2 188
  39. #define  F3 189
  40. #define  F4 190
  41. #define  F5 191
  42. #define  F6 192
  43. #define  F7 193
  44. #define  F8 194
  45. #define  F9 195
  46. #define  F10 196
  47. #define  ALT_F7 238
  48.  
  49. #define HOME 199
  50. #define Up 200
  51. #define PGUP 201
  52. #define BS 203
  53. #define FWD 205
  54. #define End 207
  55. #define Dn 208
  56. #define PGDN 209
  57. #define INS 210
  58. #define DEL 211
  59.  
  60. #define CTRL_HOME 247
  61. #define CTRL_BS 243
  62. #define CTRL_FWD 244
  63. #define CTRL_END 245
  64.  
  65. /* ------------ window definition structure --------------- */
  66. struct wn {
  67.            int lf,tp,rt,bt;       /* window position */
  68.            int ht,wd;             /* window dimensions */
  69.            int wx,wy;             /* window cursor */
  70.            int wtop;              /* top text line */
  71.            int wlines;            /* total text lines */
  72.            int fg,bg;             /* window colors */
  73.            char *wsave;           /* video memory save buffer */
  74.            char **wtext;          /* pointer to text */
  75.           };
  76.  
  77. /* ------------- internal Turbo C stuff ------------------- */
  78. void far * pascal __vptr(int,int);
  79. void pascal __vram(void far *, void far *, int);
  80. extern struct {
  81.                char filler1[4];
  82.                char attribute;
  83.                char filler2[5];
  84.                char snow;
  85.               } _video;
  86.  
  87. /* -------------- window colors ----------------- */
  88. #define TEXTFG  WHITE
  89. #define TEXTBG  BLUE
  90. #define BLOCKFG BLACK
  91. #define BLOCKBG WHITE
  92. #define HELPFG  BLACK
  93. #define HELPBG  WHITE
  94. #define MENUFG  BLACK
  95. #define MENUBG  WHITE
  96. #define SELECTFG WHITE
  97. #define SELECTBG BLACK
  98. #define ENTRYFG WHITE
  99. #define ENTRYBG BLACK
  100. #define FIELDFG BLACK
  101. #define FIELDBG WHITE
  102. #define ERRORFG BLACK
  103. #define ERRORBG WHITE
  104.  
  105.