xrender.pp 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. unit xrender;
  2. interface
  3. uses
  4. x,xlib;
  5. {$ifndef os2}
  6. {$LinkLib c}
  7. {$LinkLib X11}
  8. const
  9. libX11='X11';
  10. {$else}
  11. const
  12. libX11='X11';
  13. {$endif}
  14. {
  15. Automatically converted by H2Pas 0.99.15 from xrender.h
  16. The following command line parameters were used:
  17. -p
  18. -T
  19. -S
  20. -d
  21. -c
  22. xrender.h
  23. }
  24. {$PACKRECORDS C}
  25. type
  26. PGlyph = ^TGlyph;
  27. TGlyph = dword;
  28. PGlyphSet = ^TGlyphSet;
  29. TGlyphSet = dword;
  30. PPicture = ^TPicture;
  31. TPicture = dword;
  32. PPictFormat = ^TPictFormat;
  33. TPictFormat = dword;
  34. const
  35. RENDER_NAME = 'RENDER';
  36. RENDER_MAJOR = 0;
  37. RENDER_MINOR = 0;
  38. X_RenderQueryVersion = 0;
  39. X_RenderQueryPictFormats = 1;
  40. X_RenderQueryPictIndexValues = 2;
  41. X_RenderQueryDithers = 3;
  42. X_RenderCreatePicture = 4;
  43. X_RenderChangePicture = 5;
  44. X_RenderSetPictureClipRectangles = 6;
  45. X_RenderFreePicture = 7;
  46. X_RenderComposite = 8;
  47. X_RenderScale = 9;
  48. X_RenderTrapezoids = 10;
  49. X_RenderTriangles = 11;
  50. X_RenderTriStrip = 12;
  51. X_RenderTriFan = 13;
  52. X_RenderColorTrapezoids = 14;
  53. X_RenderColorTriangles = 15;
  54. X_RenderTransform = 16;
  55. X_RenderCreateGlyphSet = 17;
  56. X_RenderReferenceGlyphSet = 18;
  57. X_RenderFreeGlyphSet = 19;
  58. X_RenderAddGlyphs = 20;
  59. X_RenderAddGlyphsFromPicture = 21;
  60. X_RenderFreeGlyphs = 22;
  61. X_RenderCompositeGlyphs8 = 23;
  62. X_RenderCompositeGlyphs16 = 24;
  63. X_RenderCompositeGlyphs32 = 25;
  64. BadPictFormat = 0;
  65. BadPicture = 1;
  66. BadPictOp = 2;
  67. BadGlyphSet = 3;
  68. BadGlyph = 4;
  69. RenderNumberErrors = BadGlyph + 1;
  70. PictTypeIndexed = 0;
  71. PictTypeDirect = 1;
  72. PictOpClear = 0;
  73. PictOpSrc = 1;
  74. PictOpDst = 2;
  75. PictOpOver = 3;
  76. PictOpOverReverse = 4;
  77. PictOpIn = 5;
  78. PictOpInReverse = 6;
  79. PictOpOut = 7;
  80. PictOpOutReverse = 8;
  81. PictOpAtop = 9;
  82. PictOpAtopReverse = 10;
  83. PictOpXor = 11;
  84. PictOpAdd = 12;
  85. PictOpSaturate = 13;
  86. PictOpMaximum = 13;
  87. PolyEdgeSharp = 0;
  88. PolyEdgeSmooth = 1;
  89. PolyModePrecise = 0;
  90. PolyModeImprecise = 1;
  91. CPRepeat = 1 shl 0;
  92. CPAlphaMap = 1 shl 1;
  93. CPAlphaXOrigin = 1 shl 2;
  94. CPAlphaYOrigin = 1 shl 3;
  95. CPClipXOrigin = 1 shl 4;
  96. CPClipYOrigin = 1 shl 5;
  97. CPClipMask = 1 shl 6;
  98. CPGraphicsExposure = 1 shl 7;
  99. CPSubwindowMode = 1 shl 8;
  100. CPPolyEdge = 1 shl 9;
  101. CPPolyMode = 1 shl 10;
  102. CPDither = 1 shl 11;
  103. CPLastBit = 11;
  104. type
  105. PXRenderDirectFormat = ^TXRenderDirectFormat;
  106. TXRenderDirectFormat = record
  107. red : smallint;
  108. redMask : smallint;
  109. green : smallint;
  110. greenMask : smallint;
  111. blue : smallint;
  112. blueMask : smallint;
  113. alpha : smallint;
  114. alphaMask : smallint;
  115. end;
  116. PXRenderPictFormat = ^TXRenderPictFormat;
  117. TXRenderPictFormat = record
  118. id : TPictFormat;
  119. _type : longint;
  120. depth : longint;
  121. direct : TXRenderDirectFormat;
  122. colormap : TColormap;
  123. end;
  124. const
  125. PictFormatID = 1 shl 0;
  126. PictFormatType = 1 shl 1;
  127. PictFormatDepth = 1 shl 2;
  128. PictFormatRed = 1 shl 3;
  129. PictFormatRedMask = 1 shl 4;
  130. PictFormatGreen = 1 shl 5;
  131. PictFormatGreenMask = 1 shl 6;
  132. PictFormatBlue = 1 shl 7;
  133. PictFormatBlueMask = 1 shl 8;
  134. PictFormatAlpha = 1 shl 9;
  135. PictFormatAlphaMask = 1 shl 10;
  136. PictFormatColormap = 1 shl 11;
  137. type
  138. PXRenderVisual = ^TXRenderVisual;
  139. TXRenderVisual = record
  140. visual : PVisual;
  141. format : PXRenderPictFormat;
  142. end;
  143. PXRenderDepth = ^TXRenderDepth;
  144. TXRenderDepth = record
  145. depth : longint;
  146. nvisuals : longint;
  147. visuals : PXRenderVisual;
  148. end;
  149. PXRenderScreen = ^TXRenderScreen;
  150. TXRenderScreen = record
  151. depths : PXRenderDepth;
  152. ndepths : longint;
  153. fallback : PXRenderPictFormat;
  154. end;
  155. PXRenderInfo = ^TXRenderInfo;
  156. TXRenderInfo = record
  157. format : PXRenderPictFormat;
  158. nformat : longint;
  159. screen : PXRenderScreen;
  160. nscreen : longint;
  161. depth : PXRenderDepth;
  162. ndepth : longint;
  163. visual : PXRenderVisual;
  164. nvisual : longint;
  165. end;
  166. PXRenderPictureAttributes = ^TXRenderPictureAttributes;
  167. TXRenderPictureAttributes = record
  168. _repeat : TBool;
  169. alpha_map : TPicture;
  170. alpha_x_origin : longint;
  171. alpha_y_origin : longint;
  172. clip_x_origin : longint;
  173. clip_y_origin : longint;
  174. clip_mask : TPixmap;
  175. graphics_exposures : TBool;
  176. subwindow_mode : longint;
  177. poly_edge : longint;
  178. poly_mode : longint;
  179. dither : TAtom;
  180. end;
  181. PXGlyphInfo = ^TXGlyphInfo;
  182. TXGlyphInfo = record
  183. width : word;
  184. height : word;
  185. x : smallint;
  186. y : smallint;
  187. xOff : smallint;
  188. yOff : smallint;
  189. end;
  190. function XRenderQueryExtension(dpy:PDisplay; event_basep:Plongint; error_basep:Plongint):TBool;cdecl;external libX11;
  191. function XRenderQueryVersion(dpy:PDisplay; major_versionp:Plongint; minor_versionp:Plongint):TStatus;cdecl;external libX11;
  192. function XRenderQueryFormats(dpy:PDisplay):TStatus;cdecl;external libX11;
  193. function XRenderFindVisualFormat(dpy:PDisplay; visual:PVisual):PXRenderPictFormat;cdecl;external libX11;
  194. function XRenderFindFormat(dpy:PDisplay; mask:dword; template:PXRenderPictFormat; count:longint):PXRenderPictFormat;cdecl;external libX11;
  195. function XRenderCreatePicture(dpy:PDisplay; drawable:TDrawable; format:PXRenderPictFormat; valuemask:dword; attributes:PXRenderPictureAttributes):TPicture;cdecl;external libX11;
  196. procedure XRenderChangePicture(dpy:PDisplay; picture:TPicture; valuemask:dword; attributes:PXRenderPictureAttributes);cdecl;external libX11;
  197. procedure XRenderFreePicture(dpy:PDisplay; picture:TPicture);cdecl;external libX11;
  198. procedure XRenderComposite(dpy:PDisplay; op:longint; src:TPicture; mask:TPicture; dst:TPicture;
  199. src_x:longint; src_y:longint; mask_x:longint; mask_y:longint; dst_x:longint;
  200. dst_y:longint; width:dword; height:dword);cdecl;external libX11;
  201. function XRenderCreateGlyphSet(dpy:PDisplay; format:PXRenderPictFormat):TGlyphSet;cdecl;external libX11;
  202. function XRenderReferenceGlyphSet(dpy:PDisplay; existing:TGlyphSet):TGlyphSet;cdecl;external libX11;
  203. procedure XRenderFreeGlyphSet(dpy:PDisplay; glyphset:TGlyphSet);cdecl;external libX11;
  204. procedure XRenderAddGlyphs(dpy:PDisplay; glyphset:TGlyphSet; gids:PGlyph; glyphs:PXGlyphInfo; nglyphs:longint;
  205. images:Pchar; nbyte_images:longint);cdecl;external libX11;
  206. procedure XRenderFreeGlyphs(dpy:PDisplay; glyphset:TGlyphSet; gids:PGlyph; nglyphs:longint);cdecl;external libX11;
  207. procedure XRenderCompositeString8(dpy:PDisplay; op:longint; src:TPicture; dst:TPicture; maskFormat:PXRenderPictFormat;
  208. glyphset:TGlyphSet; xSrc:longint; ySrc:longint; xDst:longint; yDst:longint;
  209. _string:Pchar; nchar:longint);cdecl;external libX11;
  210. implementation
  211. end.