home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c220 / 7.ddi / EXAMPLES / GRAPHICS / GSERVER.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-01-25  |  4.2 KB  |  152 lines

  1. /* gserver.h - Graphics server header file */
  2.  
  3. /************************************************************************/
  4. /*    Copyright (C) 1986-1988 Phar Lap Software, Inc.            */
  5. /*    Unpublished - rights reserved under the Copyright Laws of the    */
  6. /*    United States.  Use, duplication, or disclosure by the         */
  7. /*    Government is subject to restrictions as set forth in         */
  8. /*    subparagraph (c)(1)(ii) of the Rights in Technical Data and     */
  9. /*    Computer Software clause at 252.227-7013.            */
  10. /*    Phar Lap Software, Inc., 60 Aberdeen Ave., Cambridge, MA 02138    */
  11. /************************************************************************/
  12.  
  13. /*
  14.  
  15. This file contains definitions for the graphics server
  16. example program for 386|DOS-Extender.  It is included both 
  17. by the real and protected mode sides of the server code.
  18. It defines the protocol that the real and protected mode
  19. code use to communication.  The file contains the following
  20. definitions:
  21.  
  22.     * Command codes
  23.     * Offsets in the communications buffer of arguments
  24.  
  25. */
  26.  
  27. /*
  28.  * We will define data types for pointers into the
  29.  * graphics communications buffer.  When using the -REALBREAK method,
  30.  * these are 32-bit near pointers.  When using the -CALLBUFS method,
  31.  * these are 48-bit far pointers.
  32.  *
  33.  * When this module is compiled in real mode, it will be in large
  34.  * model, so either of these definitions will work fine because
  35.  * all pointers default to far pointers in large model.
  36.  */
  37. #ifdef REALBREAK
  38. typedef char *GBPTR;
  39. typedef short *GBSPTR;
  40. typedef long *GBLPTR;
  41. #else
  42. typedef char _far *GBPTR;
  43. typedef short _far *GBSPTR;
  44. typedef long _far *GBLPTR;
  45. #endif
  46.  
  47. /* 
  48.  
  49. Command codes
  50.  
  51. */
  52.  
  53. #define op_arc            1
  54. #define op_clearscreen        2
  55. #define op_displaycursor    3
  56. #define op_ellipse        4
  57. #define op_floodfill        5
  58. #define op_getbkcolor        6
  59. #define op_getcolor        7
  60. #define op_getcurrentposition    8
  61. #define op_getextposition    9
  62. #define op_getfillmask        10
  63. #define op_getimage        11
  64. #define op_getlinestyle        12
  65. #define op_getlogcoord        13
  66. #define op_getphyscoord        14
  67. #define op_getpixel        15
  68. #define op_gettextcolor        16
  69. #define op_gettextposition    17
  70. #define op_getvideoconfig    18
  71. #define op_imagesize        19
  72. #define op_lineto        20    
  73. #define op_logorg        21
  74. #define op_moveto        22
  75. #define op_outtext        23
  76. #define op_pie            24
  77. #define op_putimage        25
  78. #define op_rectangle        26
  79. #define op_remapallpalette    27
  80. #define op_remappalette        28
  81. #define op_selectpalette    29
  82. #define op_setactivepage    30
  83. #define op_setbkcolor        31    
  84. #define op_setcliprgn        32
  85. #define op_setcolor        33
  86. #define op_setfillmask        34
  87. #define op_setlinestyle        35
  88. #define op_setlogorg        36
  89. #define op_setpixel        37
  90. #define op_settextcolor        38
  91. #define op_settextposition    39
  92. #define op_settextwindow    40    
  93. #define op_setvideomode        41
  94. #define op_setviewport        42
  95. #define op_setvisualpage    43
  96. #define op_wrapon        44
  97. #define op_setnullmask        45
  98. #define op_kbhit        46
  99. #define op_bios_keybrd        47
  100.  
  101.  
  102. /*
  103.  
  104. Defines for offsets of arguments in the communications buffer
  105.  
  106. */
  107.  
  108. #define SHORT0P        ((GBSPTR)(bp + 0))
  109. #define SHORT2P        ((GBSPTR)(bp + 2))
  110. #define SHORT4P        ((GBSPTR)(bp + 4))
  111. #define SHORT6P        ((GBSPTR)(bp + 6))
  112. #define SHORT8P        ((GBSPTR)(bp + 8))
  113. #define SHORT10P    ((GBSPTR)(bp + 10))
  114. #define SHORT12P    ((GBSPTR)(bp + 12))
  115. #define SHORT14P    ((GBSPTR)(bp + 14))
  116. #define SHORT16P    ((GBSPTR)(bp + 16))
  117. #define SHORT18P    ((GBSPTR)(bp + 18))
  118. #define SHORT20P    ((GBSPTR)(bp + 20))
  119.  
  120. #define SHORT0        (*SHORT0P)
  121. #define SHORT2        (*SHORT2P)
  122. #define SHORT4        (*SHORT4P)
  123. #define SHORT6        (*SHORT6P)
  124. #define SHORT8        (*SHORT8P)
  125. #define SHORT10        (*SHORT10P)
  126. #define SHORT12        (*SHORT12P)
  127. #define SHORT14        (*SHORT14P)
  128. #define SHORT16        (*SHORT16P)
  129. #define SHORT18        (*SHORT18P)
  130. #define SHORT20        (*SHORT20P)
  131.  
  132. #define LONG0P        ((GBLPTR)(bp + 0))
  133. #define LONG2P        ((GBLPTR)(bp + 2))
  134. #define LONG4P        ((GBLPTR)(bp + 4))
  135. #define LONG6P        ((GBLPTR)(bp + 6))
  136. #define LONG8P        ((GBLPTR)(bp + 8))
  137. #define LONG10P        ((GBLPTR)(bp + 10))
  138. #define LONG12P        ((GBLPTR)(bp + 12))
  139. #define LONG14P        ((GBLPTR)(bp + 14))
  140. #define LONG16P        ((GBLPTR)(bp + 16))
  141.  
  142. #define LONG0        (*LONG0P)
  143. #define LONG2        (*LONG2P)
  144. #define LONG4        (*LONG4P)
  145. #define LONG6        (*LONG6P)
  146. #define LONG8        (*LONG8P)
  147. #define LONG10        (*LONG10P)
  148. #define LONG12        (*LONG12P)
  149. #define LONG14        (*LONG14P)
  150. #define LONG16        (*LONG16P)
  151.  
  152.