xf86dga.pp 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. {
  2. Copyright (c) 1999 XFree86 Inc
  3. }
  4. { $XFree86: xc/include/extensions/xf86dga.h,v 3.20 1999/10/13 04:20:48 dawes Exp $ }
  5. Unit xf86dga;
  6. {$PACKRECORDS C}
  7. Interface
  8. Uses
  9. ctypes, x, xlib;
  10. Const
  11. libXxf86dga='Xxf86dga';
  12. Type
  13. cfloat = Single;
  14. {$linklib Xext}
  15. {$INCLUDE xf86dga1.inc}
  16. Const
  17. X_XDGAQueryVersion = 0;
  18. { 1 through 9 are in xf86dga1.pp }
  19. { 10 and 11 are reserved to avoid conflicts with rogue DGA extensions }
  20. X_XDGAQueryModes = 12;
  21. X_XDGASetMode = 13;
  22. X_XDGASetViewport = 14;
  23. X_XDGAInstallColormap = 15;
  24. X_XDGASelectInput = 16;
  25. X_XDGAFillRectangle = 17;
  26. X_XDGACopyArea = 18;
  27. X_XDGACopyTransparentArea = 19;
  28. X_XDGAGetViewportStatus = 20;
  29. X_XDGASync = 21;
  30. X_XDGAOpenFramebuffer = 22;
  31. X_XDGACloseFramebuffer = 23;
  32. X_XDGASetClientVersion = 24;
  33. X_XDGAChangePixmapMode = 25;
  34. X_XDGACreateColormap = 26;
  35. XDGAConcurrentAccess = $00000001;
  36. XDGASolidFillRect = $00000002;
  37. XDGABlitRect = $00000004;
  38. XDGABlitTransRect = $00000008;
  39. XDGAPixmap = $00000010;
  40. XDGAInterlaced = $00010000;
  41. XDGADoublescan = $00020000;
  42. XDGAFlipImmediate = $00000001;
  43. XDGAFlipRetrace = $00000002;
  44. XDGANeedRoot = $00000001;
  45. XF86DGANumberEvents = 7;
  46. XDGAPixmapModeLarge = 0;
  47. XDGAPixmapModeSmall = 1;
  48. XF86DGAClientNotLocal = 0;
  49. XF86DGANoDirectVideoMode = 1;
  50. XF86DGAScreenNotActive = 2;
  51. XF86DGADirectNotActivated = 3;
  52. XF86DGAOperationNotSupported = 4;
  53. XF86DGANumberErrors = (XF86DGAOperationNotSupported + 1);
  54. Type
  55. PXDGAMode = ^TXDGAMode;
  56. TXDGAMode = Record
  57. num : cint; { A unique identifier for the mode (num > 0) }
  58. name : PChar; { name of mode given in the XF86Config }
  59. verticalRefresh : cfloat;
  60. flags : cint; { DGA_CONCURRENT_ACCESS, etc... }
  61. imageWidth : cint; { linear accessible portion (pixels) }
  62. imageHeight : cint;
  63. pixmapWidth : cint; { Xlib accessible portion (pixels) }
  64. pixmapHeight : cint; { both fields ignored if no concurrent access }
  65. bytesPerScanline : cint;
  66. byteOrder : cint; { MSBFirst, LSBFirst }
  67. depth : cint;
  68. bitsPerPixel : cint;
  69. redMask : culong;
  70. greenMask : culong;
  71. blueMask : culong;
  72. visualClass : cshort;
  73. viewportWidth : cint;
  74. viewportHeight : cint;
  75. xViewportStep : cint; { viewport position granularity }
  76. yViewportStep : cint;
  77. maxViewportX : cint; { max viewport origin }
  78. maxViewportY : cint;
  79. viewportFlags : cint; { types of page flipping possible }
  80. reserved1 : cint;
  81. reserved2 : cint;
  82. End;
  83. PXDGADevice = ^TXDGADevice;
  84. TXDGADevice = Record
  85. mode : TXDGAMode;
  86. data : Pcuchar;
  87. pixmap : TPixmap;
  88. End;
  89. PXDGAButtonEvent = ^TXDGAButtonEvent;
  90. TXDGAButtonEvent = Record
  91. _type : cint;
  92. serial : culong;
  93. display : PDisplay;
  94. screen : cint;
  95. time : TTime;
  96. state : cuint;
  97. button : cuint;
  98. End;
  99. PXDGAKeyEvent = ^TXDGAKeyEvent;
  100. TXDGAKeyEvent = Record
  101. _type : cint;
  102. serial : culong;
  103. display : PDisplay;
  104. screen : cint;
  105. time : TTime;
  106. state : cuint;
  107. keycode : cuint;
  108. End;
  109. PXDGAMotionEvent = ^TXDGAMotionEvent;
  110. TXDGAMotionEvent = Record
  111. _type : cint;
  112. serial : culong;
  113. display : PDisplay;
  114. screen : cint;
  115. time : TTime;
  116. state : cuint;
  117. dx : cint;
  118. dy : cint;
  119. End;
  120. PXDGAEvent = ^TXDGAEvent;
  121. TXDGAEvent = Record
  122. Case LongInt Of
  123. 0 : (_type : cint);
  124. 1 : (xbutton : TXDGAButtonEvent);
  125. 2 : (xkey : TXDGAKeyEvent);
  126. 3 : (xmotion : TXDGAMotionEvent);
  127. 4 : (pad : Array[0..23] Of clong);
  128. End;
  129. Function XDGAQueryExtension(
  130. dpy : PDisplay;
  131. eventBase : Pcint;
  132. erroBase : Pcint
  133. ) : TBool; CDecl; External libXxf86dga;
  134. Function XDGAQueryVersion(
  135. dpy : PDisplay;
  136. majorVersion : Pcint;
  137. minorVersion : Pcint
  138. ) : TBool; CDecl; External libXxf86dga;
  139. Function XDGAQueryModes(
  140. dpy : PDisplay;
  141. screen : cint;
  142. num : Pcint
  143. ) : PXDGAMode; CDecl; External libXxf86dga;
  144. Function XDGASetMode(
  145. dpy : PDisplay;
  146. screen : cint;
  147. mode : cint
  148. ) : PXDGADevice; CDecl; External libXxf86dga;
  149. Function XDGAOpenFramebuffer(
  150. dpy : PDisplay;
  151. screen : cint
  152. ) : TBool; CDecl; External libXxf86dga;
  153. Procedure XDGACloseFramebuffer(
  154. dpy : PDisplay;
  155. screen : cint
  156. ); CDecl; External libXxf86dga;
  157. Procedure XDGASetViewport(
  158. dpy : PDisplay;
  159. screen : cint;
  160. x : cint;
  161. y : cint;
  162. flags : cint
  163. ); CDecl; External libXxf86dga;
  164. Procedure XDGAInstallColormap(
  165. dpy : PDisplay;
  166. screen : cint;
  167. cmap : TColormap
  168. ); CDecl; External libXxf86dga;
  169. Function XDGACreateColormap(
  170. dpy : PDisplay;
  171. screen : cint;
  172. device : PXDGADevice;
  173. alloc : cint
  174. ) : TColormap; CDecl; External libXxf86dga;
  175. Procedure XDGASelectInput(
  176. dpy : PDisplay;
  177. screen : cint;
  178. event_mask : clong
  179. ); CDecl; External libXxf86dga;
  180. Procedure XDGAFillRectangle(
  181. dpy : PDisplay;
  182. screen : cint;
  183. x : cint;
  184. y : cint;
  185. width : cuint;
  186. height : cuint;
  187. color : culong
  188. ); CDecl; External libXxf86dga;
  189. Procedure XDGACopyArea(
  190. dpy : PDisplay;
  191. screen : cint;
  192. srcx : cint;
  193. srcy : cint;
  194. width : cuint;
  195. height : cuint;
  196. dstx : cint;
  197. dsty : cint
  198. ); CDecl; External libXxf86dga;
  199. Procedure XDGACopyTransparentArea(
  200. dpy : PDisplay;
  201. screen : cint;
  202. srcx : cint;
  203. srcy : cint;
  204. width : cuint;
  205. height : cuint;
  206. dstx : cint;
  207. dsty : cint;
  208. key : culong
  209. ); CDecl; External libXxf86dga;
  210. Function XDGAGetViewportStatus(
  211. dpy : PDisplay;
  212. screen : cint
  213. ) : cint; CDecl; External libXxf86dga;
  214. Procedure XDGASync(
  215. dpy : PDisplay;
  216. screen : cint
  217. ); CDecl; External libXxf86dga;
  218. Function XDGASetClientVersion(
  219. dpy : PDisplay
  220. ) : TBool; CDecl; External libXxf86dga;
  221. Procedure XDGAChangePixmapMode(
  222. dpy : PDisplay;
  223. screen : cint;
  224. x : Pcint;
  225. y : Pcint;
  226. mode : cint
  227. ); CDecl; External libXxf86dga;
  228. Procedure XDGAKeyEventToXKeyEvent(
  229. dk : PXDGAKeyEvent;
  230. xk : PXKeyEvent
  231. ); CDecl; External libXxf86dga;
  232. Implementation
  233. End.