home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c070 / 1.ddi / TOOLS.1 / INCLUDE / BVIDEO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-03-31  |  2.8 KB  |  78 lines

  1. /**
  2. *
  3. *  BVIDEO.H     Header file for Direct Video functions for TURBO C TOOLS
  4. *
  5. *  Version 6.00  (C)Copyright Blaise Computing Inc.  1986,1987,1989
  6. *
  7. **/
  8.  
  9. #ifndef DEF_BVIDEO              /* Prevent redefinition.          */
  10.  
  11. #include <string.h>              /* For strlen().              */
  12.  
  13. #include <bscreens.h>
  14.  
  15.     /* Global variables.                          */
  16.  
  17. extern int b_vifast;              /* Nonzero if interference is   */
  18.                       /*  to be ignored -- use fastest*/
  19.                       /*  possible method.          */
  20.  
  21.     /* TURBO C TOOLS functions implemented as macros              */
  22.  
  23. #define  vidspmsg(row,col,fore,back,pmsg)          \
  24.           (viwrrect((row),(col),          \
  25.                 (row),(col)+strlen(pmsg)-1,   \
  26.                 (pmsg),              \
  27.                 (fore),(back),CHARS_ONLY))
  28.  
  29. #define  viwrrect(u_row,u_col,l_row,l_col,buffer,fore,back,option)     \
  30.     (viwrsect((u_row),(u_col),(l_row),(l_col),(buffer),0,           \
  31.           (fore),(back),(option)))
  32.  
  33. #define  virdrect(u_row,u_col,l_row,l_col,buffer,option)           \
  34.     (virdsect((u_row),(u_col),(l_row),(l_col),(buffer),0,(option)))
  35.  
  36.     /* Function declarations                          */
  37.  
  38. int cdecl virdsect(int,int,int,int,   /* Read rectangle from video    */
  39.            char *,unsigned,int);  /* memory.              */
  40.                       /*                  */
  41. int cdecl viwrsect(int,int,int,int,   /* Write rectangle to video     */
  42.   const char *,unsigned,int,int,int); /* memory.              */
  43.                       /*                  */
  44. int cdecl viatrect(int,int,int,int,   /* Change attributes in          */
  45.            int,int);          /* rectangular region.          */
  46.                       /*                  */
  47. int cdecl viscroll(int,int,          /* Vertically scroll area on    */
  48.         int,int,int,int,int);     /* current display page.          */
  49.                       /*                  */
  50. int cdecl vihoriz(int,int,          /* Horizontally scroll area on  */
  51.         int,int,int,int,int);     /* current display page.          */
  52.                       /*                  */
  53. char far * cdecl viptr(int,int);      /* Convert screen location to   */
  54.                       /* physical address.          */
  55.  
  56.     /* Declaration of internal function.                  */
  57.  
  58. int cdecl vidirec0(              /* Perform direct access to     */
  59.     const char far * const *,          /* video memory.              */
  60.     char far * const *,           /*                  */
  61.     int,int,int,int,int,unsigned);    /*                  */
  62.  
  63.     /* Aliases for older versions                      */
  64.  
  65. #define viads(row,col,pads)                           \
  66.     (((* ((char far **) (pads)) = viptr (row, col)) != FARNIL)     \
  67.      ? (pads)                               \
  68.      : (NIL))
  69.  
  70. #define vidirect(ppfrom,ppto,num_rows,row_length,scn_width,attr,option)\
  71.        (vidirec0((ppfrom),(ppto),(num_rows),(row_length),           \
  72.          (scn_width),(attr),(option),0))
  73.  
  74. #define DEF_BVIDEO  1              /* Prevent second reading of    */
  75.                       /* these definitions.          */
  76.  
  77. #endif                      /* Ends "#ifndef DEF_BVIDEO"    */
  78.