home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / UDEL.ZIP / SFSCR.H < prev    next >
Text File  |  1988-08-16  |  10KB  |  263 lines

  1. /******************************************************************************
  2. * sfscr.h  - stantart function for screen handling.                           *
  3. *                                                                             *
  4. *                                                                             *
  5. *                                                                             *
  6. *                                                                             *
  7. *                                                         07/18/88            *
  8. ******************************************************************************/
  9.  
  10.  
  11. #define SCR_RED        4
  12. #define SCR_GREEN      2
  13. #define SCR_BLUE       1
  14. #define SCR_WHITE      (SCR_RED+SCR_GREEN+SCR_BLUE)
  15. #define SCR_YELLOW     (SCR_RED+SCR_GREEN)
  16. #define SCR_AQUA       (SCR_GREEN+SCR_BLUE)
  17. #define SCR_MAGENTA    (SCR_RED+SCR_BLUE)
  18. #define SCR_BLACK      0
  19. #define SCR_BRIGHT     1
  20. #define SCR_DIM        0
  21. #define SCR_NOBLINK    0
  22. #define SCR_BLINK      1
  23. #define SCR_CURSOR_ON  0
  24. #define SCR_CURSOR_OFF 0xffff
  25. #define SCR_CLEAR_ALL  0
  26.  
  27.  
  28. #define NO_MOUSE       0  /* no mouse installed or wanted */
  29.  
  30. /*  standart screen attributes   foreground background normal indensity noblink */
  31.  
  32.  
  33. #define SCR_Awb        7      /*  white     black */
  34. #define SCR_AwB       13      /*  white     blue  */
  35. #define SCR_Awr       55      /*  white     red   */
  36. #define SCR_Abw      112      /*  black     white */
  37. #define SCR_AbB       16      /*  black     blue  */
  38. #define SCR_Abr       48      /*  black     red   */
  39.  
  40.  
  41.  
  42. struct COLORSELECT {
  43.                     char         ctext[10][21];
  44.                     char         cattr[10];
  45.                    } scr_colorset;
  46.  
  47.  
  48.  
  49. sfscr_clear(char,int);
  50. /******************************************************************************
  51. *  sfscr_clear  pass number of lines to clear or SCR_CLEAR_ALL to whole screen*
  52. ******************************************************************************/
  53. /*
  54. char attr;
  55. int lines; */
  56.  
  57.  
  58.  
  59.  
  60. char sfscr_make_attr(int,int,int,int);
  61. /******************************************************************************
  62. *  sfscr_make_attr   returns a one bye char screen attribute.                 *
  63. *                                                                             *
  64. *                                                                             *
  65. *                    fg =  forground color SCR_RED or SCR_GREEN or SCR_GREEN  *
  66. *                                          SCR_WHITE or SCR_YELLOW or         *
  67. *                                          SCR_AQUA or SCR_MAGENTA or         *
  68. *                                          SCR_BLACK                          *
  69. *                                                                             *
  70. *                   bg  =   background color  (use the above color codes      *
  71. *                                                                             *
  72. *                   indensity = indensity of foreground color SCR_DIM or      *
  73. *                               SCR_BRIGHT                                    *
  74. *                                                                             *
  75. *                   blink     =  Blink foreground color  SCR_BLINK or         *
  76. *                                SCR_NOBLINK                                  *
  77. ******************************************************************************/
  78. /*
  79. int  fg;
  80. int  bg;
  81. int intensity;
  82. int blink; */
  83.  
  84.  
  85. void sfscr_get_attr(char,int *,int *,int *,int *);
  86. /******************************************************************************
  87. *  sfscr_get_attr   returns a the forground, bg, and intensity and blink     *
  88. *                    value of a attribute passed to it.                       *
  89. *                                                                             *
  90. *                    attr = the attribute you wish to get values for.         *
  91. *                                                                             *
  92. *                    fg =  forground color SCR_RED or SCR_GREEN or SCR_GREEN  *
  93. *                                          SCR_WHITE or SCR_YELLOW or         *
  94. *                                          SCR_AQUA or SCR_MAGENTA or         *
  95. *                                          SCR_BLACK                          *
  96. *                                                                             *
  97. *                   bg  =   background color  (use the above color codes      *
  98. *                                                                             *
  99. *                   intensity = indensity of foreground color SCR_DIM or      *
  100. *                               SCR_BRIGHT                                    *
  101. *                                                                             *
  102. *                   blink     =  Blink foreground color  SCR_BLINK or         *
  103. *                                SCR_NOBLINK                                  *
  104. ******************************************************************************/
  105. /*
  106. char attr;
  107. int  *fg;
  108. int  *bg;
  109. int *intensity;
  110. int *blink;
  111. */
  112.  
  113.  
  114.  
  115. void sfscr_printf(char,char *,...);
  116. /****************************************************************************
  117. *  sfscr_printf                                                             *
  118. ****************************************************************************/
  119. /*
  120. char attr;
  121. char *ln;  */
  122.  
  123.  
  124.  
  125. void sfscr_xprintf(USHORT,USHORT,char,char *,...);
  126. /****************************************************************************
  127. *  sfscr_xprintf                                                            *
  128. ****************************************************************************/
  129. /*
  130. USHORT line;
  131. USHORT col;
  132. char attr;
  133. char *ln;  */
  134.  
  135.  
  136.  
  137.  
  138. void sfscr_repeat_char(USHORT,char,char);
  139. /******************************************************************************
  140. *  sfscr_repeat_char - repeat char "ch" with attribute "attr"  "count" times  *
  141. ******************************************************************************/
  142. /*
  143. USHORT count;
  144. char attr;
  145. char ch; */
  146.  
  147.  
  148.  
  149.  
  150. void sfscr_xrepeat_char(USHORT,USHORT,USHORT,char,char);
  151. /******************************************************************************
  152. *  sfscr_xrepeat_char - repeat char "ch" with attribute "attr"  "count" times *
  153. *                      at position "line", "column"                           *
  154. ******************************************************************************/
  155. /*
  156. USHORT line;
  157. USHORT col;
  158. USHORT count;
  159. char   attr;
  160. char   ch; */
  161.  
  162.  
  163.  
  164. void sfscr_get_cursor_loc(USHORT *,USHORT *);
  165. /******************************************************************************
  166. *  sfscr_get_cursor_loc    gets the current cursor line and column position   *
  167. ******************************************************************************/
  168. /*
  169. USHORT *line;
  170. USHORT *col; */
  171.  
  172.  
  173. void sfscr_set_cursor_loc(USHORT,USHORT);
  174. /******************************************************************************
  175. *  sfscr_set_cursor_loc   move cursor to line col                             *
  176. ******************************************************************************/
  177. /*
  178. USHORT line;
  179. USHORT col;  */
  180.  
  181.  
  182.  
  183. void sfscr_get_cursor_type(VIOCURSORINFO *);
  184. /******************************************************************************
  185. *  sfscr_get_cursor_type    retrieve cursor info                              *
  186. ******************************************************************************/
  187. /*
  188. VIOCURSORINFO *cursor_info; */
  189.  
  190.  
  191. void sfscr_set_cursor_type(VIOCURSORINFO *);
  192. /******************************************************************************
  193. * sfscr_set_cursor_type  set cursor type                                      *
  194. ******************************************************************************/
  195. /*
  196. VIOCURSORINFO *cursor_info;
  197. */
  198.  
  199. void sfscr_switch_cursor(USHORT);
  200. /******************************************************************************
  201. *  sfscr_switch_cursor   turn cursor on and off                               *
  202. *                        to turn cursor on use  = SCR_CURSOR_ON               *
  203. *                                      off use  = SCR_CURSOR_OFF              *
  204. ******************************************************************************/
  205. /*
  206. USHORT sw;  */
  207.  
  208.  
  209.  
  210. void sfscr_set_attr(char,USHORT,USHORT,USHORT);
  211. /******************************************************************************
  212. * sfscr_set_attr  - set screen atribute for len starting at line col position *
  213. ******************************************************************************/
  214. /*
  215. char attr;
  216. USHORT len;
  217. USHORT line;
  218. USHORT col;  */
  219.  
  220.  
  221. void sfscr_get_mode(VIOMODEINFO *);
  222. /*******************************************************************************
  223. * sfscr_get_mode(vido_info)                                                    *
  224. *******************************************************************************/
  225. /*
  226. VIOMODEINFO *video_info; */
  227.  
  228.  
  229.  
  230. void sfscr_set_mode(VIOMODEINFO *);
  231. /*******************************************************************************
  232. * sfscr_set_mode   = set video mode                                            *
  233. *******************************************************************************/
  234. /*
  235. VIOMODEINFO *video_info;*/
  236.  
  237.  
  238. void sfscr_set_colors(int,int,int,HMOU);
  239. /******************************************************************************
  240. * sfscr_set_color  set the video attribute                                    *
  241. ******************************************************************************/
  242. /*
  243. int row;
  244. int col;
  245. int bar;
  246. HMOU mouse;  */
  247.  
  248.  
  249. void sfscr_pause_message(int,int,char,char *,HMOU);
  250. /*******************************************************************************
  251. *  sfscr_pasue_message  send message to screen at row, and col wait till       *
  252. *  mouse action or keyborad key pressed                                        *
  253. *  function will restore area of screen changed and return                     *
  254. *******************************************************************************/
  255. /*
  256. int row;
  257. int col;
  258. char attr;
  259. char *message;
  260. HMOU mouse;  */
  261.  
  262.  
  263.