home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 2.ddi / RTLINSRC.ZIP / _VIDEO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  2.7 KB  |  88 lines

  1. /*------------------------------------------------------------------------
  2.  * filename - _video.h
  3.  *
  4.  *      Private definitions for Turbo Pascal style video functions.
  5.  *      External interfaces in VIDEO.H
  6.  *-----------------------------------------------------------------------*/
  7.  
  8. /*[]------------------------------------------------------------[]*/
  9. /*|                                                              |*/
  10. /*|     C/C++ Run Time Library - Version 4.0                     |*/
  11. /*|                                                              |*/
  12. /*|                                                              |*/
  13. /*|     Copyright (c) 1987, 1990 by Borland International        |*/
  14. /*|     All Rights Reserved.                                     |*/
  15. /*|                                                              |*/
  16. /*[]------------------------------------------------------------[]*/
  17.  
  18. #if __STDC__
  19. #define _Cdecl
  20. #else
  21. #define _Cdecl  cdecl
  22. #endif
  23.  
  24. #ifndef __PASCAL__
  25. #define _CType _Cdecl
  26. #else
  27. #define _CType pascal
  28. #endif
  29.  
  30. typedef unsigned char uchar;
  31.  
  32. typedef struct
  33. {
  34.         uchar windowx1;
  35.         uchar windowy1;
  36.         uchar windowx2;
  37.         uchar windowy2;
  38.         uchar attribute;
  39.         uchar normattr;
  40.         uchar currmode;
  41.         uchar screenheight;
  42.         uchar screenwidth;
  43.         uchar graphicsmode;
  44.         uchar snow;
  45.         union {
  46.                 char far * p;
  47.                 struct { unsigned off,seg; } u;
  48.         } displayptr;
  49. } VIDEOREC;
  50.  
  51. #ifndef __IN_CRTINIT
  52. extern VIDEOREC _video;
  53. #endif
  54.  
  55. #ifdef __cplusplus
  56. extern "C" {
  57. #endif
  58. unsigned pascal near __cputn(const void *__s, unsigned __n, void *__dontCare);
  59.  
  60. void near _crtinit(uchar __newmode);
  61. void near _VideoInt(void);
  62. void pascal near __scroll(uchar __dir, uchar __x1, uchar __y1, uchar __x2, uchar __y2, uchar __lines);
  63. unsigned near _wherexy(void);
  64. void far * pascal near __vptr(int __x, int __y);
  65. void pascal near __vram(void far *__dst, void far *__src, int __len);
  66. int pascal near __validatexy(int __x1, int __y1, int __x2, int __y2);
  67. void pascal near __screenio(void far *__dst, void far *__src, int __len);
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71.  
  72. #define _wherex()       ((uchar) _wherexy())
  73. #define _wherey()       ((uchar) (_wherexy() >> 8))
  74.  
  75. #define V_SET_MODE              0x00
  76. #define V_SET_CURSOR_POS        0x02
  77. #define V_GET_CURSOR_POS        0x03
  78. #define V_SCROLL_UP             0x06
  79. #define V_SCROLL_DOWN           0x07
  80. #define V_RD_CHAR_ATTR          0x08
  81. #define V_WR_CHAR_ATTR          0x09
  82. #define V_WR_CHAR               0x0a
  83. #define V_WR_TTY                0x0e
  84. #define V_GET_MODE              0x0f
  85.  
  86. #define UP      V_SCROLL_UP
  87. #define DOWN    V_SCROLL_DOWN
  88.