home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 4.ddi / C / GVSCROLL.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  2.0 KB  |  62 lines

  1. /**
  2. *
  3. * Name        gvscroll -- Vertically scroll lines of text on the current
  4. *                display page directly or via the BIOS.
  5. *
  6. * Synopsis    iret = gvscroll(num_lines,attrib,u_row,u_col,l_row,l_col,
  7. *              dir);
  8. *
  9. *        int iret      Number of lines actually scrolled.
  10. *        int num_lines      Number of lines to scroll.  A value of 0
  11. *                  specifies that all lines within the
  12. *                  region should be scrolled (thus clearing
  13. *                  the region)
  14. *        int attrib      If the screen is in text mode, this
  15. *                  is the attribute to be used on the
  16. *                  vacant lines.  It has the background
  17. *                  attribute in the high order four bits
  18. *                  of the low order byte, and the
  19. *                  foreground in the low order nybble.
  20. *                  If the screen is in graphics mode and
  21. *                  the current page is not active, this
  22. *                  is the color to use for the scrolled text.
  23. *                  If the screen is in graphics mode and
  24. *                  the current page is active, this is
  25. *                  ignored.
  26. *        int u_row,u_col   Upper left corner of region.
  27. *        int l_row,l_col   Lower right corner of region.
  28. *        int dir       Scrolling direction (SCR_UP or SCR_DOWN).
  29. *
  30. * Description    This function moves lines of characters (with their
  31. *        attributes) up or down within a defined rectangular
  32. *        region.  The vacant lines are filled with blanks and a
  33. *        specified attribute.
  34. *
  35. *        This function is available in two versions.  These call
  36. *        SCPSCROL (which uses BIOS only) or VISCROLL (direct to
  37. *        video memory) depending on the value of the symbol
  38. *        GV_OPTION.  These versions are therefore subject to
  39. *        differing limitations.
  40. *
  41. * Returns    iret          Number of lines actually scrolled.
  42. *
  43. * Version    3.0  (C)Copyright Blaise Computing Inc. 1986
  44. *
  45. **/
  46.  
  47. #include <bgenvid.h>
  48.  
  49. int gvscroll(num_lines,attrib,u_row,u_col,l_row,l_col,dir)
  50. int num_lines,attrib,u_row,u_col,l_row,l_col,dir;
  51. {
  52. #if (GV_OPTION) == (GV_BIOS)
  53.  
  54.     return scpscrol(num_lines,attrib,u_row,u_col,l_row,l_col,dir);
  55.  
  56. #else
  57.  
  58.     return viscroll(num_lines,attrib,u_row,u_col,l_row,l_col,dir);
  59.  
  60. #endif
  61. }
  62.