home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / mslang / isam / include / fscreen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-08  |  4.1 KB  |  179 lines

  1. #ifndef FSCREEN_H
  2. #define FSCREEN_H
  3.  
  4. #include <string.h>
  5. #include <ctype.h>
  6.  
  7. void FSputa(int, int, int, int);
  8. void FSputs(const char *, int, int, int);
  9. unsigned FSgetxy(int, int);
  10. void FSinit(void);
  11. void FSbox(int, int, int, int, int, int);
  12. void FSgotopos(int, int);
  13. void FSgetpos(int *, int *);
  14. void FSsetstyle(int, int);
  15. void FSgetstyle(int *, int *);
  16. int  FSreadscr(int, int, int, int);
  17. int  FSwritescr(int, int, int, int);
  18. int  FSopwin(int, int, int, int, int, int);
  19. int  FSclwin(void);
  20. void FSscroll(int, int, int, int, int, int);
  21. int  FSmenu(int, int, int, char *[], int, int);
  22.  
  23. int  FSinputs(char *string, int attr, int startrow, int startcol, int length,
  24.             int forceflag = 0, char *contents = "^");
  25. int  FSinputl(long &value, int attr, int startrow, int startcol,
  26.             int length = 11, long minval = -2147483648L, long maxval = 2147483647L);
  27. int  FSinputul(unsigned long &value, int attr, int startrow, int startcol,
  28.             int length = 10, unsigned long minval = 0, unsigned long maxval = 4294967295UL);
  29. int  FSinputi(int &value, int attr, int startrow, int startcol,
  30.             int length = 6, int minval = -32768, int maxval = 32767);
  31. int FSinputui(unsigned int &value, int attr, int startrow, int startcol,
  32.             int length = 5, unsigned int minval = 0, unsigned int maxval = 65535U);
  33. int FSinputc(char &value, int attr, int startrow, int startcol,
  34.             int length = 4, char minval = -128, char maxval = 127);
  35. int FSinputuc(unsigned char &value, int attr, int startrow, int startcol,
  36.             int length = 3, unsigned char minval = 0, unsigned char maxval = 255);
  37.  
  38. void FSputl(long value, int attr, int row, int col);
  39. void FSputul(unsigned long value, int attr, int row, int col);
  40. void FSputi(int value, int attr, int row, int col);
  41. void FSputui(unsigned int value, int attr, int row, int col);
  42. #define FSputc(a, b, c, d) FSputi(a, b, c, d)
  43. #define FSputuc(a, b, c, d) FSputui(a, b, c, d)
  44.  
  45. int  FSbarmenu(int, int, int, char *[], int, int, int);
  46. int  FSyesno(int, int, int);
  47. int  FSgetch(void);
  48. int FSprompt(char *, int, int);
  49. void FSsavescr(void);
  50. void FSrestorescr(void);
  51. int FSgetmode(void);
  52.  
  53. inline void FStitle(const char *a, char b, int c)
  54.     {
  55.     FSputs(a, b, c, 39 - strlen(a) / 2);
  56.     }
  57.  
  58. inline void FSclrbox(int toprow, int topcol, int botrow, int botcol, int attrib)
  59.     {
  60.     FSscroll(toprow, topcol, botrow, botcol, 0, attrib);
  61.     }
  62.  
  63. inline void FSclrline(int row, int attrib)
  64.     {
  65.     FSscroll(row, 0, row, 79, 0, attrib);
  66.     }
  67.  
  68. inline void FSclrscr(int attrib)
  69.     {
  70.     FSscroll(0, 0, 24, 79, 0, attrib);
  71.     }
  72.  
  73. #ifndef BLACK
  74. #define BLACK 0
  75. #endif
  76.  
  77. #ifndef BLUE
  78. #define BLUE 1
  79. #endif
  80.  
  81. #ifndef GREEN
  82. #define GREEN 2
  83. #endif
  84.  
  85. #ifndef CYAN
  86. #define CYAN 3
  87. #endif
  88.  
  89. #ifndef RED
  90. #define RED 4
  91. #endif
  92.  
  93. #ifndef MAGENTA
  94. #define MAGENTA 5
  95. #endif
  96.  
  97. #ifndef BROWN
  98. #define BROWN 6
  99. #endif
  100.  
  101. #ifndef LIGHTGREY
  102. #define LIGHTGREY 7
  103. #endif
  104.  
  105. #ifndef LIGHTGRAY
  106. #define LIGHTGRAY 7
  107. #endif
  108.  
  109. #ifndef DARKGREY
  110. #define DARKGREY 8
  111. #endif
  112.  
  113. #ifndef DARKGRAY
  114. #define DARKGRAY 8
  115. #endif
  116.  
  117. #ifndef LIGHTBLUE
  118. #define LIGHTBLUE 9
  119. #endif
  120.  
  121. #ifndef LIGHTGREEN
  122. #define LIGHTGREEN 10
  123. #endif
  124.  
  125. #ifndef LIGHTCYAN
  126. #define LIGHTCYAN 11
  127. #endif
  128.  
  129. #ifndef LIGHTRED
  130. #define LIGHTRED 12
  131. #endif
  132.  
  133. #ifndef LIGHTMAGENTA
  134. #define LIGHTMAGENTA 13
  135. #endif
  136.  
  137. #ifndef YELLOW
  138. #define YELLOW 14
  139. #endif
  140.  
  141. #ifndef WHITE
  142. #define WHITE 15
  143. #endif
  144.  
  145. #ifndef BLINK
  146. #define BLINK 0x80
  147. #endif
  148.  
  149. #define FS_CURSORUP 1
  150. #define FS_CURSORDOWN 2
  151. #define FS_BACKSPACE 3
  152. #define FS_ENTER 4
  153. #define FS_ESCAPE 5
  154. #define FS_PGUP 6
  155. #define FS_PGDN 7
  156.  
  157. #define TOUPPER 1
  158. #define TOLOWER 2
  159.  
  160. #define ALNUM "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890 -"
  161. #define ALPHA "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm "
  162. #define NUM "1234567890 -"
  163. #define UNUM "1234567890 "
  164. #define ALL "^"
  165.  
  166. /* The following are for FSbox styles */
  167.  
  168. #define HSVS 0
  169. #define HDVD 1
  170. #define HDVS 2
  171. #define HSVD 3
  172.  
  173. /* For FSbarmenu */
  174.  
  175. #define FS_CENTRE (-1)
  176. #define FS_CENTER (-1)
  177.  
  178. #endif
  179.