home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c065 / 1.ddi / INCLUDE.ZIP / _VIDEO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-07  |  2.5 KB  |  89 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. /*|                                                              |*/
  11. /*|     Turbo C Run Time Library - Version 3.0                   |*/
  12. /*|                                                              |*/
  13. /*|                                                              |*/
  14. /*|     Copyright (c) 1987, 1990 by Borland International        |*/
  15. /*|     All Rights Reserved.                                     |*/
  16. /*|                                                              |*/
  17. /*[]------------------------------------------------------------[]*/
  18.  
  19. #if __STDC__
  20. #define _Cdecl
  21. #else
  22. #define _Cdecl    cdecl
  23. #endif
  24.  
  25. #ifndef __PASCAL__
  26. #define _CType _Cdecl
  27. #else
  28. #define _CType pascal
  29. #endif
  30.  
  31. typedef unsigned char uchar;
  32.  
  33. typedef struct
  34. {
  35.     uchar windowx1;
  36.     uchar windowy1;
  37.     uchar windowx2;
  38.     uchar windowy2;
  39.     uchar attribute;
  40.     uchar normattr;
  41.     uchar currmode;
  42.     uchar screenheight;
  43.     uchar screenwidth;
  44.     uchar graphicsmode;
  45.     uchar snow;
  46.     union {
  47.         char far * p;
  48.         struct { unsigned off,seg; } u;
  49.     } displayptr;
  50. } VIDEOREC;
  51.  
  52. #ifndef __IN_CRTINIT
  53. extern VIDEOREC _video;
  54. #endif
  55.  
  56. #ifdef __cplusplus
  57. extern "C" {
  58. #endif
  59. unsigned pascal near __cputn(const void *__s, unsigned __n, void *__dontCare);
  60.  
  61. void near _crtinit(uchar __newmode);
  62. void near _VideoInt(void);
  63. void pascal near __scroll(uchar __dir, uchar __x1, uchar __y1, uchar __x2, uchar __y2, uchar __lines);
  64. unsigned near _wherexy(void);
  65. void far * pascal near __vptr(int __x, int __y);
  66. void pascal near __vram(void far *__dst, void far *__src, int __len);
  67. int pascal near __validatexy(int __x1, int __y1, int __x2, int __y2);
  68. void pascal near __screenio(void far *__dst, void far *__src, int __len);
  69. #ifdef __cplusplus
  70. }
  71. #endif
  72.  
  73. #define _wherex()    ((uchar) _wherexy())
  74. #define _wherey()    ((uchar) (_wherexy() >> 8))
  75.  
  76. #define V_SET_MODE        0x00
  77. #define V_SET_CURSOR_POS    0x02
  78. #define V_GET_CURSOR_POS    0x03
  79. #define V_SCROLL_UP        0x06
  80. #define V_SCROLL_DOWN        0x07
  81. #define V_RD_CHAR_ATTR        0x08
  82. #define V_WR_CHAR_ATTR        0x09
  83. #define V_WR_CHAR        0x0a
  84. #define V_WR_TTY        0x0e
  85. #define V_GET_MODE        0x0f
  86.  
  87. #define UP    V_SCROLL_UP
  88. #define DOWN    V_SCROLL_DOWN
  89.