xrender.pp 6.5 KB

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