Mercurial > games > semicongine
comparison semiconginev2/thirdparty/x11/xrender.nim @ 1218:56781cc0fc7c compiletime-tests
did: renamge main package
author | sam <sam@basx.dev> |
---|---|
date | Wed, 17 Jul 2024 21:01:37 +0700 |
parents | semicongine/old/thirdparty/x11/xrender.nim@239adab121a3 |
children |
comparison
equal
deleted
inserted
replaced
1217:f819a874058f | 1218:56781cc0fc7c |
---|---|
1 | |
2 import | |
3 x, xlib | |
4 | |
5 when defined(use_pkg_config) or defined(use_pkg_config_static): | |
6 {.pragma: libxrender, cdecl, importc.} | |
7 when defined(use_pkg_config): | |
8 {.passl: gorge("pkg-config xrender --libs").} | |
9 else: | |
10 {.passl: gorge("pkg-config xrender --static --libs").} | |
11 else: | |
12 when defined(macosx): | |
13 const | |
14 libXrender* = "libXrender.dylib" | |
15 else: | |
16 const | |
17 libXrender* = "libXrender.so" | |
18 | |
19 | |
20 {.pragma: libxrender, dynlib: libXrender, cdecl, importc.} | |
21 #const | |
22 # libXrender* = "libXrender.so" | |
23 | |
24 # | |
25 # Automatically converted by H2Pas 0.99.15 from xrender.h | |
26 # The following command line parameters were used: | |
27 # -p | |
28 # -T | |
29 # -S | |
30 # -d | |
31 # -c | |
32 # xrender.h | |
33 # | |
34 | |
35 type | |
36 PGlyph* = ptr Glyph | |
37 Glyph* = int32 | |
38 | |
39 PGlyphSet* = ptr GlyphSet | |
40 GlyphSet* = int32 | |
41 | |
42 PPicture* = ptr Picture | |
43 Picture* = int32 | |
44 | |
45 PPictFormat* = ptr PictFormat | |
46 PictFormat* = int32 | |
47 | |
48 const | |
49 RENDER_NAME* = "RENDER" | |
50 RENDER_MAJOR* = 0 | |
51 RENDER_MINOR* = 0 | |
52 constX_RenderQueryVersion* = 0 | |
53 X_RenderQueryPictFormats* = 1 | |
54 X_RenderQueryPictIndexValues* = 2 | |
55 X_RenderQueryDithers* = 3 | |
56 constX_RenderCreatePicture* = 4 | |
57 constX_RenderChangePicture* = 5 | |
58 X_RenderSetPictureClipRectangles* = 6 | |
59 constX_RenderFreePicture* = 7 | |
60 constX_RenderComposite* = 8 | |
61 X_RenderScale* = 9 | |
62 X_RenderTrapezoids* = 10 | |
63 X_RenderTriangles* = 11 | |
64 X_RenderTriStrip* = 12 | |
65 X_RenderTriFan* = 13 | |
66 X_RenderColorTrapezoids* = 14 | |
67 X_RenderColorTriangles* = 15 | |
68 X_RenderTransform* = 16 | |
69 constX_RenderCreateGlyphSet* = 17 | |
70 constX_RenderReferenceGlyphSet* = 18 | |
71 constX_RenderFreeGlyphSet* = 19 | |
72 constX_RenderAddGlyphs* = 20 | |
73 constX_RenderAddGlyphsFromPicture* = 21 | |
74 constX_RenderFreeGlyphs* = 22 | |
75 constX_RenderCompositeGlyphs8* = 23 | |
76 constX_RenderCompositeGlyphs16* = 24 | |
77 constX_RenderCompositeGlyphs32* = 25 | |
78 BadPictFormat* = 0 | |
79 BadPicture* = 1 | |
80 BadPictOp* = 2 | |
81 BadGlyphSet* = 3 | |
82 BadGlyph* = 4 | |
83 RenderNumberErrors* = BadGlyph + 1 | |
84 PictTypeIndexed* = 0 | |
85 PictTypeDirect* = 1 | |
86 PictOpClear* = 0 | |
87 PictOpSrc* = 1 | |
88 PictOpDst* = 2 | |
89 PictOpOver* = 3 | |
90 PictOpOverReverse* = 4 | |
91 PictOpIn* = 5 | |
92 PictOpInReverse* = 6 | |
93 PictOpOut* = 7 | |
94 PictOpOutReverse* = 8 | |
95 PictOpAtop* = 9 | |
96 PictOpAtopReverse* = 10 | |
97 PictOpXor* = 11 | |
98 PictOpAdd* = 12 | |
99 PictOpSaturate* = 13 | |
100 PictOpMaximum* = 13 | |
101 PolyEdgeSharp* = 0 | |
102 PolyEdgeSmooth* = 1 | |
103 PolyModePrecise* = 0 | |
104 PolyModeImprecise* = 1 | |
105 CPRepeat* = 1 shl 0 | |
106 CPAlphaMap* = 1 shl 1 | |
107 CPAlphaXOrigin* = 1 shl 2 | |
108 CPAlphaYOrigin* = 1 shl 3 | |
109 CPClipXOrigin* = 1 shl 4 | |
110 CPClipYOrigin* = 1 shl 5 | |
111 CPClipMask* = 1 shl 6 | |
112 CPGraphicsExposure* = 1 shl 7 | |
113 CPSubwindowMode* = 1 shl 8 | |
114 CPPolyEdge* = 1 shl 9 | |
115 CPPolyMode* = 1 shl 10 | |
116 CPDither* = 1 shl 11 | |
117 CPLastBit* = 11 | |
118 | |
119 type | |
120 PXRenderDirectFormat* = ptr XRenderDirectFormat | |
121 XRenderDirectFormat*{.final.} = object | |
122 red*: int16 | |
123 redMask*: int16 | |
124 green*: int16 | |
125 greenMask*: int16 | |
126 blue*: int16 | |
127 blueMask*: int16 | |
128 alpha*: int16 | |
129 alphaMask*: int16 | |
130 | |
131 PXRenderPictFormat* = ptr XRenderPictFormat | |
132 XRenderPictFormat*{.final.} = object | |
133 id*: PictFormat | |
134 thetype*: int32 | |
135 depth*: int32 | |
136 direct*: XRenderDirectFormat | |
137 colormap*: Colormap | |
138 | |
139 const | |
140 PictFormatID* = 1 shl 0 | |
141 PictFormatType* = 1 shl 1 | |
142 PictFormatDepth* = 1 shl 2 | |
143 PictFormatRed* = 1 shl 3 | |
144 PictFormatRedMask* = 1 shl 4 | |
145 PictFormatGreen* = 1 shl 5 | |
146 PictFormatGreenMask* = 1 shl 6 | |
147 PictFormatBlue* = 1 shl 7 | |
148 PictFormatBlueMask* = 1 shl 8 | |
149 PictFormatAlpha* = 1 shl 9 | |
150 PictFormatAlphaMask* = 1 shl 10 | |
151 PictFormatColormap* = 1 shl 11 | |
152 | |
153 type | |
154 PXRenderVisual* = ptr XRenderVisual | |
155 XRenderVisual*{.final.} = object | |
156 visual*: PVisual | |
157 format*: PXRenderPictFormat | |
158 | |
159 PXRenderDepth* = ptr XRenderDepth | |
160 XRenderDepth*{.final.} = object | |
161 depth*: int32 | |
162 nvisuals*: int32 | |
163 visuals*: PXRenderVisual | |
164 | |
165 PXRenderScreen* = ptr XRenderScreen | |
166 XRenderScreen*{.final.} = object | |
167 depths*: PXRenderDepth | |
168 ndepths*: int32 | |
169 fallback*: PXRenderPictFormat | |
170 | |
171 PXRenderInfo* = ptr XRenderInfo | |
172 XRenderInfo*{.final.} = object | |
173 format*: PXRenderPictFormat | |
174 nformat*: int32 | |
175 screen*: PXRenderScreen | |
176 nscreen*: int32 | |
177 depth*: PXRenderDepth | |
178 ndepth*: int32 | |
179 visual*: PXRenderVisual | |
180 nvisual*: int32 | |
181 | |
182 PXRenderPictureAttributes* = ptr XRenderPictureAttributes | |
183 XRenderPictureAttributes*{.final.} = object | |
184 repeat*: XBool | |
185 alpha_map*: Picture | |
186 alpha_x_origin*: int32 | |
187 alpha_y_origin*: int32 | |
188 clip_x_origin*: int32 | |
189 clip_y_origin*: int32 | |
190 clip_mask*: Pixmap | |
191 graphics_exposures*: XBool | |
192 subwindow_mode*: int32 | |
193 poly_edge*: int32 | |
194 poly_mode*: int32 | |
195 dither*: Atom | |
196 | |
197 PXGlyphInfo* = ptr XGlyphInfo | |
198 XGlyphInfo*{.final.} = object | |
199 width*: int16 | |
200 height*: int16 | |
201 x*: int16 | |
202 y*: int16 | |
203 xOff*: int16 | |
204 yOff*: int16 | |
205 | |
206 PXRenderColor* = ptr XRenderColor | |
207 XRenderColor* = object | |
208 red*: cushort | |
209 green*: cushort | |
210 blue*: cushort | |
211 alpha*: cushort | |
212 | |
213 proc XRenderQueryExtension*(dpy: PDisplay, event_basep: ptr int32, | |
214 error_basep: ptr int32): XBool{.libxrender.} | |
215 proc XRenderQueryVersion*(dpy: PDisplay, major_versionp: ptr int32, | |
216 minor_versionp: ptr int32): Status{.libxrender.} | |
217 proc XRenderQueryFormats*(dpy: PDisplay): Status{.libxrender.} | |
218 proc XRenderFindVisualFormat*(dpy: PDisplay, visual: PVisual): PXRenderPictFormat{. | |
219 libxrender.} | |
220 proc XRenderFindFormat*(dpy: PDisplay, mask: int32, | |
221 `template`: PXRenderPictFormat, count: int32): PXRenderPictFormat{. | |
222 libxrender.} | |
223 proc XRenderCreatePicture*(dpy: PDisplay, drawable: Drawable, | |
224 format: PXRenderPictFormat, valuemask: int32, | |
225 attributes: PXRenderPictureAttributes): Picture{. | |
226 libxrender.} | |
227 proc XRenderChangePicture*(dpy: PDisplay, picture: Picture, valuemask: int32, | |
228 attributes: PXRenderPictureAttributes){.libxrender.} | |
229 proc XRenderFreePicture*(dpy: PDisplay, picture: Picture){.libxrender.} | |
230 proc XRenderComposite*(dpy: PDisplay, op: int32, src: Picture, mask: Picture, | |
231 dst: Picture, src_x: int32, src_y: int32, mask_x: int32, | |
232 mask_y: int32, dst_x: int32, dst_y: int32, width: int32, | |
233 height: int32){.libxrender.} | |
234 proc XRenderCreateGlyphSet*(dpy: PDisplay, format: PXRenderPictFormat): GlyphSet{. | |
235 libxrender.} | |
236 proc XRenderReferenceGlyphSet*(dpy: PDisplay, existing: GlyphSet): GlyphSet{. | |
237 libxrender.} | |
238 proc XRenderFreeGlyphSet*(dpy: PDisplay, glyphset: GlyphSet){.libxrender.} | |
239 proc XRenderAddGlyphs*(dpy: PDisplay, glyphset: GlyphSet, gids: PGlyph, | |
240 glyphs: PXGlyphInfo, nglyphs: int32, images: cstring, | |
241 nbyte_images: int32){.libxrender.} | |
242 proc XRenderFreeGlyphs*(dpy: PDisplay, glyphset: GlyphSet, gids: PGlyph, | |
243 nglyphs: int32){.libxrender.} | |
244 proc XRenderCompositeString8*(dpy: PDisplay, op: int32, src: Picture, | |
245 dst: Picture, maskFormat: PXRenderPictFormat, | |
246 glyphset: GlyphSet, xSrc: int32, ySrc: int32, | |
247 xDst: int32, yDst: int32, str: cstring, | |
248 nchar: int32){.libxrender.} | |
249 # implementation |