/binding/x/render.d

http://github.com/wilkie/djehuty · D · 313 lines · 132 code · 133 blank · 48 comment · 0 complexity · 9f6a02fc49ac6cd76e25e514af46eb41 MD5 · raw file

  1. /*
  2. * render.d
  3. *
  4. * This file holds bindings to 'render'. This file was created from render.h
  5. * which is provided with xrender proper. The original copyright notice is
  6. * displayed below, but does not pertain to this file.
  7. *
  8. * Author: Dave Wilkinson
  9. *
  10. */
  11. /* Converted to D from render.h by htod */
  12. module binding.x.render;
  13. /*
  14. * $XFree86: xc/include/extensions/render.h,v 1.10 2002/11/06 22:47:49 keithp Exp $
  15. *
  16. * Copyright © 2000 SuSE, Inc.
  17. *
  18. * Permission to use, copy, modify, distribute, and sell this software and its
  19. * documentation for any purpose is hereby granted without fee, provided that
  20. * the above copyright notice appear in all copies and that both that
  21. * copyright notice and this permission notice appear in supporting
  22. * documentation, and that the name of SuSE not be used in advertising or
  23. * publicity pertaining to distribution of the software without specific,
  24. * written prior permission. SuSE makes no representations about the
  25. * suitability of this software for any purpose. It is provided "as is"
  26. * without express or implied warranty.
  27. *
  28. * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  29. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
  30. * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  31. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  32. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  33. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  34. *
  35. * Author: Keith Packard, SuSE, Inc.
  36. */
  37. import binding.x.X;
  38. extern (C):
  39. alias XID Glyph;
  40. alias XID GlyphSet;
  41. alias XID Picture;
  42. alias XID PictFormat;
  43. const auto RENDER_NAME = "RENDER";
  44. const auto RENDER_MAJOR = 0;
  45. const auto RENDER_MINOR = 10;
  46. const auto X_RenderQueryVersion = 0;
  47. const auto X_RenderQueryPictFormats = 1;
  48. const auto X_RenderQueryPictIndexValues = 2;
  49. const auto X_RenderQueryDithers = 3;
  50. const auto X_RenderCreatePicture = 4;
  51. const auto X_RenderChangePicture = 5;
  52. const auto X_RenderSetPictureClipRectangles = 6;
  53. const auto X_RenderFreePicture = 7;
  54. const auto X_RenderComposite = 8;
  55. const auto X_RenderScale = 9;
  56. const auto X_RenderTrapezoids = 10;
  57. const auto X_RenderTriangles = 11;
  58. const auto X_RenderTriStrip = 12;
  59. const auto X_RenderTriFan = 13;
  60. const auto X_RenderColorTrapezoids = 14;
  61. const auto X_RenderColorTriangles = 15;
  62. /* #define X_RenderTransform 16 */
  63. const auto X_RenderCreateGlyphSet = 17;
  64. const auto X_RenderReferenceGlyphSet = 18;
  65. const auto X_RenderFreeGlyphSet = 19;
  66. const auto X_RenderAddGlyphs = 20;
  67. const auto X_RenderAddGlyphsFromPicture = 21;
  68. const auto X_RenderFreeGlyphs = 22;
  69. const auto X_RenderCompositeGlyphs8 = 23;
  70. const auto X_RenderCompositeGlyphs16 = 24;
  71. const auto X_RenderCompositeGlyphs32 = 25;
  72. /* 0.5 */
  73. const auto X_RenderFillRectangles = 26;
  74. /* 0.6 */
  75. const auto X_RenderCreateCursor = 27;
  76. const auto X_RenderSetPictureTransform = 28;
  77. const auto X_RenderQueryFilters = 29;
  78. /* 0.8 */
  79. const auto X_RenderSetPictureFilter = 30;
  80. /* 0.9 */
  81. const auto X_RenderCreateAnimCursor = 31;
  82. /* 0.10 */
  83. const auto X_RenderAddTraps = 32;
  84. const auto X_RenderCreateSolidFill = 33;
  85. const auto X_RenderCreateLinearGradient = 34;
  86. const auto X_RenderCreateRadialGradient = 35;
  87. const auto X_RenderCreateConicalGradient = 36;
  88. const auto BadPictFormat = 0;
  89. const auto BadPicture = 1;
  90. const auto BadPictOp = 2;
  91. const auto BadGlyphSet = 3;
  92. const auto BadGlyph = 4;
  93. const auto PictTypeIndexed = 0;
  94. const auto PictTypeDirect = 1;
  95. const auto PictOpMinimum = 0;
  96. const auto PictOpClear = 0;
  97. const auto PictOpSrc = 1;
  98. const auto PictOpDst = 2;
  99. const auto PictOpOver = 3;
  100. const auto PictOpOverReverse = 4;
  101. const auto PictOpIn = 5;
  102. const auto PictOpInReverse = 6;
  103. const auto PictOpOut = 7;
  104. const auto PictOpOutReverse = 8;
  105. const auto PictOpAtop = 9;
  106. const auto PictOpAtopReverse = 10;
  107. const auto PictOpXor = 11;
  108. const auto PictOpAdd = 12;
  109. const auto PictOpSaturate = 13;
  110. const auto PictOpMaximum = 13;
  111. /*
  112. * Operators only available in version 0.2
  113. */
  114. const auto PictOpDisjointMinimum = 0x10;
  115. const auto PictOpDisjointClear = 0x10;
  116. const auto PictOpDisjointSrc = 0x11;
  117. const auto PictOpDisjointDst = 0x12;
  118. const auto PictOpDisjointOver = 0x13;
  119. const auto PictOpDisjointOverReverse = 0x14;
  120. const auto PictOpDisjointIn = 0x15;
  121. const auto PictOpDisjointInReverse = 0x16;
  122. const auto PictOpDisjointOut = 0x17;
  123. const auto PictOpDisjointOutReverse = 0x18;
  124. const auto PictOpDisjointAtop = 0x19;
  125. const auto PictOpDisjointAtopReverse = 0x1a;
  126. const auto PictOpDisjointXor = 0x1b;
  127. const auto PictOpDisjointMaximum = 0x1b;
  128. const auto PictOpConjointMinimum = 0x20;
  129. const auto PictOpConjointClear = 0x20;
  130. const auto PictOpConjointSrc = 0x21;
  131. const auto PictOpConjointDst = 0x22;
  132. const auto PictOpConjointOver = 0x23;
  133. const auto PictOpConjointOverReverse = 0x24;
  134. const auto PictOpConjointIn = 0x25;
  135. const auto PictOpConjointInReverse = 0x26;
  136. const auto PictOpConjointOut = 0x27;
  137. const auto PictOpConjointOutReverse = 0x28;
  138. const auto PictOpConjointAtop = 0x29;
  139. const auto PictOpConjointAtopReverse = 0x2a;
  140. const auto PictOpConjointXor = 0x2b;
  141. const auto PictOpConjointMaximum = 0x2b;
  142. const auto PolyEdgeSharp = 0;
  143. const auto PolyEdgeSmooth = 1;
  144. const auto PolyModePrecise = 0;
  145. const auto PolyModeImprecise = 1;
  146. const auto CPRepeat = (1 << 0);
  147. const auto CPAlphaMap = (1 << 1);
  148. const auto CPAlphaXOrigin = (1 << 2);
  149. const auto CPAlphaYOrigin = (1 << 3);
  150. const auto CPClipXOrigin = (1 << 4);
  151. const auto CPClipYOrigin = (1 << 5);
  152. const auto CPClipMask = (1 << 6);
  153. const auto CPGraphicsExposure = (1 << 7);
  154. const auto CPSubwindowMode = (1 << 8);
  155. const auto CPPolyEdge = (1 << 9);
  156. const auto CPPolyMode = (1 << 10);
  157. const auto CPDither = (1 << 11);
  158. const auto CPComponentAlpha = (1 << 12);
  159. const auto CPLastBit = 12;
  160. /* Filters included in 0.6 */
  161. const auto FilterNearest "nearest";
  162. const auto FilterBilinear "bilinear";
  163. /* Filters included in 0.10 */
  164. const auto FilterConvolution "convolution";
  165. const auto FilterFast = "fast";
  166. const auto FilterGood = "good";
  167. const auto FilterBest = "best";
  168. const auto FilterAliasNone = -1;
  169. /* Subpixel orders included in 0.6 */
  170. const auto SubPixelUnknown = 0;
  171. const auto SubPixelHorizontalRGB = 1;
  172. const auto SubPixelHorizontalBGR = 2;
  173. const auto SubPixelVerticalRGB = 3;
  174. const auto SubPixelVerticalBGR = 4;
  175. const auto SubPixelNone = 5;
  176. /* Extended repeat attributes included in 0.10 */
  177. const auto RepeatNone = 0;
  178. const auto RepeatNormal = 1;
  179. const auto RepeatPad = 2;
  180. const auto RepeatReflect = 3;