1 // Copyright © 2017 winapi-rs developers
2 // Licensed under the Apache License, Version 2.0
3 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
4 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
5 // All files in the project carrying such notice may not be copied, modified, or distributed
6 // except according to those terms.
7 //! Mappings for the contents of d2d1_1.h
8 use ctypes::c_void;
9 use shared::basetsd::{UINT32, UINT64};
10 use shared::dxgi::{IDXGIDevice, IDXGISurface};
11 use shared::dxgiformat::DXGI_FORMAT;
12 use shared::guiddef::{CLSID, REFCLSID};
13 use shared::minwindef::{BOOL, BYTE, DWORD, FLOAT};
14 use um::d2d1::{
15     D2D1_ANTIALIAS_MODE, D2D1_BRUSH_PROPERTIES, D2D1_CAP_STYLE, D2D1_COLOR_F,
16     D2D1_DASH_STYLE, D2D1_DEBUG_LEVEL, D2D1_EXTEND_MODE, D2D1_GRADIENT_STOP,
17     D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC, D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC,
18     D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC,
19     D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
20     D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR,
21     D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR, D2D1_LINE_JOIN, D2D1_MATRIX_3X2_F,
22     D2D1_POINT_2F, D2D1_RECT_F, D2D1_SIZE_U, D2D1_TAG, D2D1_TEXT_ANTIALIAS_MODE, ID2D1Bitmap,
23     ID2D1BitmapBrush, ID2D1BitmapBrushVtbl, ID2D1BitmapVtbl, ID2D1Brush, ID2D1BrushVtbl,
24     ID2D1DrawingStateBlock, ID2D1DrawingStateBlockVtbl, ID2D1Factory, ID2D1FactoryVtbl,
25     ID2D1Geometry, ID2D1GradientStopCollection, ID2D1GradientStopCollectionVtbl, ID2D1Image,
26     ID2D1ImageVtbl, ID2D1Layer, ID2D1Mesh, ID2D1PathGeometry, ID2D1PathGeometryVtbl,
27     ID2D1RenderTarget, ID2D1RenderTargetVtbl, ID2D1Resource, ID2D1ResourceVtbl, ID2D1StrokeStyle,
28     ID2D1StrokeStyleVtbl,
29 };
30 use um::d2d1effectauthor::D2D1_PROPERTY_BINDING;
31 use um::d2dbasetypes::D2D_SIZE_F;
32 use um::dcommon::{D2D1_PIXEL_FORMAT, DWRITE_MEASURING_MODE};
33 use um::documenttarget::IPrintDocumentPackageTarget;
34 use um::dwrite::{DWRITE_GLYPH_RUN, DWRITE_GLYPH_RUN_DESCRIPTION, IDWriteRenderingParams};
35 use um::objidlbase::IStream;
36 use um::unknwnbase::{IUnknown, IUnknownVtbl};
37 use um::wincodec::{IWICBitmapSource, IWICColorContext, IWICImagingFactory};
38 use um::winnt::{HRESULT, PCWSTR, PWSTR};
39 FN!{stdcall PD2D1_EFFECT_FACTORY(
40     effectImpl: *mut *mut IUnknown,
41 ) -> HRESULT}
42 pub use um::d2dbasetypes::D2D_RECT_L as D2D1_RECT_L;
43 pub use um::d2dbasetypes::D2D_POINT_2L as D2D1_POINT_2L;
44 ENUM!{enum D2D1_PROPERTY_TYPE {
45     D2D1_PROPERTY_TYPE_UNKNOWN = 0,
46     D2D1_PROPERTY_TYPE_STRING = 1,
47     D2D1_PROPERTY_TYPE_BOOL = 2,
48     D2D1_PROPERTY_TYPE_UINT32 = 3,
49     D2D1_PROPERTY_TYPE_INT32 = 4,
50     D2D1_PROPERTY_TYPE_FLOAT = 5,
51     D2D1_PROPERTY_TYPE_VECTOR2 = 6,
52     D2D1_PROPERTY_TYPE_VECTOR3 = 7,
53     D2D1_PROPERTY_TYPE_VECTOR4 = 8,
54     D2D1_PROPERTY_TYPE_BLOB = 9,
55     D2D1_PROPERTY_TYPE_IUNKNOWN = 10,
56     D2D1_PROPERTY_TYPE_ENUM = 11,
57     D2D1_PROPERTY_TYPE_ARRAY = 12,
58     D2D1_PROPERTY_TYPE_CLSID = 13,
59     D2D1_PROPERTY_TYPE_MATRIX_3X2 = 14,
60     D2D1_PROPERTY_TYPE_MATRIX_4X3 = 15,
61     D2D1_PROPERTY_TYPE_MATRIX_4X4 = 16,
62     D2D1_PROPERTY_TYPE_MATRIX_5X4 = 17,
63     D2D1_PROPERTY_TYPE_COLOR_CONTEXT = 18,
64     D2D1_PROPERTY_TYPE_FORCE_DWORD = 0xffffffff,
65 }}
66 ENUM!{enum D2D1_PROPERTY {
67     D2D1_PROPERTY_CLSID = 0x80000000,
68     D2D1_PROPERTY_DISPLAYNAME = 0x80000001,
69     D2D1_PROPERTY_AUTHOR = 0x80000002,
70     D2D1_PROPERTY_CATEGORY = 0x80000003,
71     D2D1_PROPERTY_DESCRIPTION = 0x80000004,
72     D2D1_PROPERTY_INPUTS = 0x80000005,
73     D2D1_PROPERTY_CACHED = 0x80000006,
74     D2D1_PROPERTY_PRECISION = 0x80000007,
75     D2D1_PROPERTY_MIN_INPUTS = 0x80000008,
76     D2D1_PROPERTY_MAX_INPUTS = 0x80000009,
77     D2D1_PROPERTY_FORCE_DWORD = 0xffffffff,
78 }}
79 ENUM!{enum D2D1_SUBPROPERTY {
80     D2D1_SUBPROPERTY_DISPLAYNAME = 0x80000000,
81     D2D1_SUBPROPERTY_ISREADONLY = 0x80000001,
82     D2D1_SUBPROPERTY_MIN = 0x80000002,
83     D2D1_SUBPROPERTY_MAX = 0x80000003,
84     D2D1_SUBPROPERTY_DEFAULT = 0x80000004,
85     D2D1_SUBPROPERTY_FIELDS = 0x80000005,
86     D2D1_SUBPROPERTY_INDEX = 0x80000006,
87     D2D1_SUBPROPERTY_FORCE_DWORD = 0xffffffff,
88 }}
89 ENUM!{enum D2D1_BITMAP_OPTIONS {
90     D2D1_BITMAP_OPTIONS_NONE = 0x00000000,
91     D2D1_BITMAP_OPTIONS_TARGET = 0x00000001,
92     D2D1_BITMAP_OPTIONS_CANNOT_DRAW = 0x00000002,
93     D2D1_BITMAP_OPTIONS_CPU_READ = 0x00000004,
94     D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE = 0x00000008,
95     D2D1_BITMAP_OPTIONS_FORCE_DWORD = 0xffffffff,
96 }}
97 // DEFINE_ENUM_FLAG_OPERATORS(D2D1_BITMAP_OPTIONS);
98 ENUM!{enum D2D1_COMPOSITE_MODE {
99     D2D1_COMPOSITE_MODE_SOURCE_OVER = 0,
100     D2D1_COMPOSITE_MODE_DESTINATION_OVER = 1,
101     D2D1_COMPOSITE_MODE_SOURCE_IN = 2,
102     D2D1_COMPOSITE_MODE_DESTINATION_IN = 3,
103     D2D1_COMPOSITE_MODE_SOURCE_OUT = 4,
104     D2D1_COMPOSITE_MODE_DESTINATION_OUT = 5,
105     D2D1_COMPOSITE_MODE_SOURCE_ATOP = 6,
106     D2D1_COMPOSITE_MODE_DESTINATION_ATOP = 7,
107     D2D1_COMPOSITE_MODE_XOR = 8,
108     D2D1_COMPOSITE_MODE_PLUS = 9,
109     D2D1_COMPOSITE_MODE_SOURCE_COPY = 10,
110     D2D1_COMPOSITE_MODE_BOUNDED_SOURCE_COPY = 11,
111     D2D1_COMPOSITE_MODE_MASK_INVERT = 12,
112     D2D1_COMPOSITE_MODE_FORCE_DWORD = 0xffffffff,
113 }}
114 ENUM!{enum D2D1_BUFFER_PRECISION {
115     D2D1_BUFFER_PRECISION_UNKNOWN = 0,
116     D2D1_BUFFER_PRECISION_8BPC_UNORM = 1,
117     D2D1_BUFFER_PRECISION_8BPC_UNORM_SRGB = 2,
118     D2D1_BUFFER_PRECISION_16BPC_UNORM = 3,
119     D2D1_BUFFER_PRECISION_16BPC_FLOAT = 4,
120     D2D1_BUFFER_PRECISION_32BPC_FLOAT = 5,
121     D2D1_BUFFER_PRECISION_FORCE_DWORD = 0xffffffff,
122 }}
123 ENUM!{enum D2D1_MAP_OPTIONS {
124     D2D1_MAP_OPTIONS_NONE = 0,
125     D2D1_MAP_OPTIONS_READ = 1,
126     D2D1_MAP_OPTIONS_WRITE = 2,
127     D2D1_MAP_OPTIONS_DISCARD = 4,
128     D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff,
129 }}
130 //DEFINE_ENUM_FLAG_OPERATORS(D2D1_MAP_OPTIONS);
131 ENUM!{enum D2D1_INTERPOLATION_MODE {
132     D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR,
133     D2D1_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
134     D2D1_INTERPOLATION_MODE_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC,
135     D2D1_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR
136         = D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR,
137     D2D1_INTERPOLATION_MODE_ANISOTROPIC = D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC,
138     D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC
139         = D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC,
140     D2D1_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
141 }}
142 ENUM!{enum D2D1_UNIT_MODE {
143     D2D1_UNIT_MODE_DIPS = 0,
144     D2D1_UNIT_MODE_PIXELS = 1,
145     D2D1_UNIT_MODE_FORCE_DWORD = 0xffffffff,
146 }}
147 ENUM!{enum D2D1_COLOR_SPACE {
148     D2D1_COLOR_SPACE_CUSTOM = 0,
149     D2D1_COLOR_SPACE_SRGB = 1,
150     D2D1_COLOR_SPACE_SCRGB = 2,
151     D2D1_COLOR_SPACE_FORCE_DWORD = 0xffffffff,
152 }}
153 ENUM!{enum D2D1_DEVICE_CONTEXT_OPTIONS {
154     D2D1_DEVICE_CONTEXT_OPTIONS_NONE = 0,
155     D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS = 1,
156     D2D1_DEVICE_CONTEXT_OPTIONS_FORCE_DWORD = 0xffffffff,
157 }}
158 //DEFINE_ENUM_FLAG_OPERATORS(D2D1_DEVICE_CONTEXT_OPTIONS);
159 ENUM!{enum D2D1_STROKE_TRANSFORM_TYPE {
160     D2D1_STROKE_TRANSFORM_TYPE_NORMAL = 0,
161     D2D1_STROKE_TRANSFORM_TYPE_FIXED = 1,
162     D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE = 2,
163     D2D1_STROKE_TRANSFORM_TYPE_FORCE_DWORD = 0xffffffff,
164 }}
165 ENUM!{enum D2D1_PRIMITIVE_BLEND {
166     D2D1_PRIMITIVE_BLEND_SOURCE_OVER = 0,
167     D2D1_PRIMITIVE_BLEND_COPY = 1,
168     D2D1_PRIMITIVE_BLEND_MIN = 2,
169     D2D1_PRIMITIVE_BLEND_ADD = 3,
170     D2D1_PRIMITIVE_BLEND_FORCE_DWORD = 0xffffffff,
171 }}
172 ENUM!{enum D2D1_THREADING_MODE {
173     D2D1_THREADING_MODE_SINGLE_THREADED = super::d2d1::D2D1_FACTORY_TYPE_SINGLE_THREADED,
174     D2D1_THREADING_MODE_MULTI_THREADED = super::d2d1::D2D1_FACTORY_TYPE_MULTI_THREADED,
175     D2D1_THREADING_MODE_FORCE_DWORD = 0xffffffff,
176 }}
177 ENUM!{enum D2D1_COLOR_INTERPOLATION_MODE {
178     D2D1_COLOR_INTERPOLATION_MODE_STRAIGHT = 0,
179     D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED = 1,
180     D2D1_COLOR_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
181 }}
182 pub use um::d2dbasetypes::D2D_VECTOR_2F as D2D1_VECTOR_2F;
183 pub use um::d2dbasetypes::D2D_VECTOR_3F as D2D1_VECTOR_3F;
184 pub use um::d2dbasetypes::D2D_VECTOR_4F as D2D1_VECTOR_4F;
185 STRUCT!{struct D2D1_BITMAP_PROPERTIES1 {
186     pixelFormat: D2D1_PIXEL_FORMAT,
187     dpiX: FLOAT,
188     dpiY: FLOAT,
189     bitmapOptions: D2D1_BITMAP_OPTIONS,
190     colorContext: *const ID2D1ColorContext,
191 }}
192 STRUCT!{struct D2D1_MAPPED_RECT {
193     pitch: UINT32,
194     bits: *const BYTE,
195 }}
196 STRUCT!{struct D2D1_RENDERING_CONTROLS {
197     bufferPrecision: D2D1_BUFFER_PRECISION,
198     tileSize: D2D1_SIZE_U,
199 }}
200 STRUCT!{struct D2D1_EFFECT_INPUT_DESCRIPTION {
201     effect: *const ID2D1Effect,
202     inputIndex: UINT32,
203     inputRectangle: D2D1_RECT_F,
204 }}
205 pub use um::d2dbasetypes::D2D_MATRIX_4X3_F as D2D1_MATRIX_4X3_F;
206 pub use um::d2dbasetypes::D2D_MATRIX_4X4_F as D2D1_MATRIX_4X4_F;
207 pub use um::d2dbasetypes::D2D_MATRIX_5X4_F as D2D1_MATRIX_5X4_F;
208 STRUCT!{struct D2D1_POINT_DESCRIPTION {
209     point: D2D1_POINT_2F,
210     unitTangentVector: D2D1_POINT_2F,
211     endSegment: UINT32,
212     endFigure: UINT32,
213     lengthToEndSegment: FLOAT,
214 }}
215 STRUCT!{struct D2D1_IMAGE_BRUSH_PROPERTIES {
216     sourceRectangle: D2D1_RECT_F,
217     extendModeX: D2D1_EXTEND_MODE,
218     extendModeY: D2D1_EXTEND_MODE,
219     interpolationMode: D2D1_INTERPOLATION_MODE,
220 }}
221 STRUCT!{struct D2D1_BITMAP_BRUSH_PROPERTIES1 {
222     extendModeX: D2D1_EXTEND_MODE,
223     extendModeY: D2D1_EXTEND_MODE,
224     interpolationMode: D2D1_INTERPOLATION_MODE,
225 }}
226 STRUCT!{struct D2D1_STROKE_STYLE_PROPERTIES1 {
227     startCap: D2D1_CAP_STYLE,
228     endCap: D2D1_CAP_STYLE,
229     dashCap: D2D1_CAP_STYLE,
230     lineJoin: D2D1_LINE_JOIN,
231     miterLimit: FLOAT,
232     dashStyle: D2D1_DASH_STYLE,
233     dashOffset: FLOAT,
234     transformType: D2D1_STROKE_TRANSFORM_TYPE,
235 }}
236 ENUM!{enum D2D1_LAYER_OPTIONS1 {
237     D2D1_LAYER_OPTIONS1_NONE = 0,
238     D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND = 1,
239     D2D1_LAYER_OPTIONS1_IGNORE_ALPHA = 2,
240     D2D1_LAYER_OPTIONS1_FORCE_DWORD = 0xffffffff,
241 }}
242 //DEFINE_ENUM_FLAG_OPERATORS(D2D1_LAYER_OPTIONS1);
243 STRUCT!{struct D2D1_LAYER_PARAMETERS1 {
244     contentBounds: D2D1_RECT_F,
245     geometricMask: *const ID2D1Geometry,
246     maskAntialiasMode: D2D1_ANTIALIAS_MODE,
247     maskTransform: D2D1_MATRIX_3X2_F,
248     opacity: FLOAT,
249     opacityBrush: *const ID2D1Brush,
250     layerOptions: D2D1_LAYER_OPTIONS1,
251 }}
252 ENUM!{enum D2D1_PRINT_FONT_SUBSET_MODE {
253     D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT = 0,
254     D2D1_PRINT_FONT_SUBSET_MODE_EACHPAGE = 1,
255     D2D1_PRINT_FONT_SUBSET_MODE_NONE = 2,
256     D2D1_PRINT_FONT_SUBSET_MODE_FORCE_DWORD = 0xffffffff,
257 }}
258 STRUCT!{struct D2D1_DRAWING_STATE_DESCRIPTION1 {
259     antialiasMode: D2D1_ANTIALIAS_MODE,
260     textAntialiasMode: D2D1_TEXT_ANTIALIAS_MODE,
261     tag1: D2D1_TAG,
262     tag2: D2D1_TAG,
263     transform: D2D1_MATRIX_3X2_F,
264     primitiveBlend: D2D1_PRIMITIVE_BLEND,
265     unitMode: D2D1_UNIT_MODE,
266 }}
267 STRUCT!{struct D2D1_PRINT_CONTROL_PROPERTIES {
268     fontSubset: D2D1_PRINT_FONT_SUBSET_MODE,
269     rasterDPI: FLOAT,
270     colorSpace: D2D1_COLOR_SPACE,
271 }}
272 STRUCT!{struct D2D1_CREATION_PROPERTIES {
273     threadingMode: D2D1_THREADING_MODE,
274     debugLevel: D2D1_DEBUG_LEVEL,
275     options: D2D1_DEVICE_CONTEXT_OPTIONS,
276 }}
277 RIDL!(#[uuid(0x82237326, 0x8111, 0x4f7c, 0xbc, 0xf4, 0xb5, 0xc1, 0x17, 0x55, 0x64, 0xfe)]
278 interface ID2D1GdiMetafileSink(ID2D1GdiMetafileSinkVtbl): IUnknown(IUnknownVtbl) {
279     fn ProcessRecord(
280         recordType: DWORD,
281         recordData: *const c_void,
282         recordDataSize: DWORD,
283     ) -> HRESULT,
284 });
285 RIDL!(#[uuid(0x2f543dc3, 0xcfc1, 0x4211, 0x86, 0x4f, 0xcf, 0xd9, 0x1c, 0x6f, 0x33, 0x95)]
286 interface ID2D1GdiMetafile(ID2D1GdiMetafileVtbl): ID2D1Resource(ID2D1ResourceVtbl) {
287     fn Stream(
288         sink: *const ID2D1GdiMetafileSink,
289     ) -> HRESULT,
290     fn GetBounds(
291         bounds: *mut D2D1_RECT_F,
292     ) -> HRESULT,
293 });
294 RIDL!(#[uuid(0x54d7898a, 0xa061, 0x40a7, 0xbe, 0xc7, 0xe4, 0x65, 0xbc, 0xba, 0x2c, 0x4f)]
295 interface ID2D1CommandSink(ID2D1CommandSinkVtbl): IUnknown(IUnknownVtbl) {
296     fn BeginDraw() -> HRESULT,
297     fn EndDraw() -> HRESULT,
298     fn SetAntialiasMode(
299         antialiasMode: D2D1_ANTIALIAS_MODE,
300     ) -> HRESULT,
301     fn SetTags(
302         tag1: D2D1_TAG,
303         tag2: D2D1_TAG,
304     ) -> HRESULT,
305     fn SetTextAntialiasMode(
306         textAntialiasMode: D2D1_TEXT_ANTIALIAS_MODE,
307     ) -> HRESULT,
308     fn SetTextRenderingParams(
309         textRenderingParams: *const IDWriteRenderingParams,
310     ) -> HRESULT,
311     fn SetTransform(
312         transform: *const D2D1_MATRIX_3X2_F,
313     ) -> HRESULT,
314     fn SetPrimitiveBlend(
315         primitiveBlend: D2D1_PRIMITIVE_BLEND,
316     ) -> HRESULT,
317     fn SetUnitMode(
318         unitMode: D2D1_UNIT_MODE,
319     ) -> HRESULT,
320     fn Clear(
321         color: *const D2D1_COLOR_F,
322     ) -> HRESULT,
323     fn DrawGlyphRun(
324         baselineOrigin: D2D1_POINT_2F,
325         glyphRun: *const DWRITE_GLYPH_RUN,
326         glyphRunDescription: *const DWRITE_GLYPH_RUN_DESCRIPTION,
327         foregroundBrush: *const ID2D1Brush,
328         measuringMode: DWRITE_MEASURING_MODE,
329     ) -> HRESULT,
330     fn DrawLine(
331         point0: D2D1_POINT_2F,
332         point1: D2D1_POINT_2F,
333         brush: *const ID2D1Brush,
334         strokeWidth: FLOAT,
335         strokeStyle: *const ID2D1StrokeStyle,
336     ) -> HRESULT,
337     fn DrawGeometry(
338         geometry: *const ID2D1Geometry,
339         brush: *const ID2D1Brush,
340         strokeWidth: FLOAT,
341         strokeStyle: *const ID2D1StrokeStyle,
342     ) -> HRESULT,
343     fn DrawRectangle(
344         rect: *const D2D1_RECT_F,
345         brush: *const ID2D1Brush,
346         strokeWidth: FLOAT,
347         strokeStyle: *const ID2D1StrokeStyle,
348     ) -> HRESULT,
349     fn DrawBitmap(
350         bitmap: *const ID2D1Bitmap,
351         destinationRectangle: *const D2D1_RECT_F,
352         opacity: FLOAT,
353         interpolationMode: D2D1_INTERPOLATION_MODE,
354         sourceRectangle: *const D2D1_RECT_F,
355         perspectiveTransform: *const D2D1_MATRIX_4X4_F,
356     ) -> HRESULT,
357     fn DrawImage(
358         image: *const ID2D1Image,
359         targetOffset: *const D2D1_POINT_2F,
360         imageRectangle: *const D2D1_RECT_F,
361         interpolationMode: D2D1_INTERPOLATION_MODE,
362         compositeMode: D2D1_COMPOSITE_MODE,
363     ) -> HRESULT,
364     fn DrawGdiMetafile(
365         gdiMetafile: *const ID2D1GdiMetafile,
366         targetOffset: *const D2D1_POINT_2F,
367     ) -> HRESULT,
368     fn FillMesh(
369         mesh: *const ID2D1Mesh,
370         brush: *const ID2D1Brush,
371     ) -> HRESULT,
372     fn FillOpacityMask(
373         opacityMask: *const ID2D1Bitmap,
374         brush: *const ID2D1Brush,
375         destinationRectangle: *const D2D1_RECT_F,
376         sourceRectangle: *const D2D1_RECT_F,
377     ) -> HRESULT,
378     fn FillGeometry(
379         geometry: *const ID2D1Geometry,
380         brush: *const ID2D1Brush,
381         opacityBrush: *const ID2D1Brush,
382     ) -> HRESULT,
383     fn FillRectangle(
384         rect: *const D2D1_RECT_F,
385         brush: *const ID2D1Brush,
386     ) -> HRESULT,
387     fn PushAxisAlignedClip(
388         clipRect: *const D2D1_RECT_F,
389         antialiasMode: D2D1_ANTIALIAS_MODE,
390     ) -> HRESULT,
391     fn PushLayer(
392         layerParameters1: *const D2D1_LAYER_PARAMETERS1,
393         layer: *const ID2D1Layer,
394     ) -> HRESULT,
395     fn PopAxisAlignedClip() -> HRESULT,
396     fn PopLayer() -> HRESULT,
397 });
398 RIDL!(#[uuid(0xb4f34a19, 0x2383, 0x4d76, 0x94, 0xf6, 0xec, 0x34, 0x36, 0x57, 0xc3, 0xdc)]
399 interface ID2D1CommandList(ID2D1CommandListVtbl): ID2D1Image(ID2D1ImageVtbl) {
400     fn Stream(
401         sink: *const ID2D1CommandSink,
402     ) -> HRESULT,
403     fn Close() -> HRESULT,
404 });
405 RIDL!(#[uuid(0x2c1d867d, 0xc290, 0x41c8, 0xae, 0x7e, 0x34, 0xa9, 0x87, 0x02, 0xe9, 0xa5)]
406 interface ID2D1PrintControl(ID2D1PrintControlVtbl): IUnknown(IUnknownVtbl) {
407     fn AddPage(
408         commandList: *const ID2D1CommandList,
409         pageSize: D2D_SIZE_F,
410         pagePrintTicketStream: *const IStream,
411         tag1: *mut D2D1_TAG,
412         tag2: *mut D2D1_TAG,
413     ) -> HRESULT,
414     fn Close() -> HRESULT,
415 });
416 RIDL!(#[uuid(0xfe9e984d, 0x3f95, 0x407c, 0xb5, 0xdb, 0xcb, 0x94, 0xd4, 0xe8, 0xf8, 0x7c)]
417 interface ID2D1ImageBrush(ID2D1ImageBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) {
418     fn SetImage(
419         image: *const ID2D1Image,
420     ) -> (),
421     fn SetExtendModeX(
422         extendModeX: D2D1_EXTEND_MODE,
423     ) -> (),
424     fn SetExtendModeY(
425         extendModeY: D2D1_EXTEND_MODE,
426     ) -> (),
427     fn SetInterpolationMode(
428         interpolationMode: D2D1_INTERPOLATION_MODE,
429     ) -> (),
430     fn SetSourceRectangle(
431         sourceRectangle: *const D2D1_RECT_F,
432     ) -> (),
433     fn GetImage(
434         image: *mut *mut ID2D1Image,
435     ) -> (),
436     fn GetExtendModeX() -> D2D1_EXTEND_MODE,
437     fn GetExtendModeY() -> D2D1_EXTEND_MODE,
438     fn GetInterpolationMode() -> D2D1_INTERPOLATION_MODE,
439     fn GetSourceRectangle(
440         sourceRectangle: *mut D2D1_RECT_F,
441     ) -> (),
442 });
443 RIDL!(#[uuid(0x41343a53, 0xe41a, 0x49a2, 0x91, 0xcd, 0x21, 0x79, 0x3b, 0xbb, 0x62, 0xe5)]
444 interface ID2D1BitmapBrush1(ID2D1BitmapBrush1Vtbl): ID2D1BitmapBrush(ID2D1BitmapBrushVtbl) {
445     fn SetInterpolationMode1(
446         interpolationMode: D2D1_INTERPOLATION_MODE,
447     ) -> (),
448     fn GetInterpolationMode1() -> D2D1_INTERPOLATION_MODE,
449 });
450 RIDL!(#[uuid(0x10a72a66, 0xe91c, 0x43f4, 0x99, 0x3f, 0xdd, 0xf4, 0xb8, 0x2b, 0x0b, 0x4a)]
451 interface ID2D1StrokeStyle1(ID2D1StrokeStyle1Vtbl): ID2D1StrokeStyle(ID2D1StrokeStyleVtbl) {
452     fn GetStrokeTransformType() -> D2D1_STROKE_TRANSFORM_TYPE,
453 });
454 RIDL!(#[uuid(0x62baa2d2, 0xab54, 0x41b7, 0xb8, 0x72, 0x78, 0x7e, 0x01, 0x06, 0xa4, 0x21)]
455 interface ID2D1PathGeometry1(ID2D1PathGeometry1Vtbl): ID2D1PathGeometry(ID2D1PathGeometryVtbl) {
456     fn ComputePointAndSegmentAtLength(
457         length: FLOAT,
458         startSegment: UINT32,
459         worldTransform: *const D2D1_MATRIX_3X2_F,
460         flatteningTolerance: FLOAT,
461         pointDescription: *mut D2D1_POINT_DESCRIPTION,
462     ) -> HRESULT,
463 });
464 RIDL!(#[uuid(0x483473d7, 0xcd46, 0x4f9d, 0x9d, 0x3a, 0x31, 0x12, 0xaa, 0x80, 0x15, 0x9d)]
465 interface ID2D1Properties(ID2D1PropertiesVtbl): IUnknown(IUnknownVtbl) {
466     fn GetPropertyCount() -> UINT32,
467     fn GetPropertyName(
468         index: UINT32,
469         name: PWSTR,
470         nameCount: UINT32,
471     ) -> HRESULT,
472     fn GetPropertyNameLength(
473         index: UINT32,
474     ) -> UINT32,
475     fn GetType(
476         index: UINT32,
477     ) -> D2D1_PROPERTY_TYPE,
478     fn GetPropertyIndex(
479         name: PCWSTR,
480     ) -> UINT32,
481     fn SetValueByName(
482         name: PCWSTR,
483         prop_type: D2D1_PROPERTY_TYPE,
484         data: *const BYTE,
485         dataSize: UINT32,
486     ) -> HRESULT,
487     fn SetValue(
488         index: UINT32,
489         prop_type: D2D1_PROPERTY_TYPE,
490         data: *const BYTE,
491         dataSize: UINT32,
492     ) -> HRESULT,
493     fn GetValueByName(
494         name: PCWSTR,
495         prop_type: D2D1_PROPERTY_TYPE,
496         data: *mut BYTE,
497         dataSize: UINT32,
498     ) -> HRESULT,
499     fn GetValue(
500         index: UINT32,
501         prop_type: D2D1_PROPERTY_TYPE,
502         data: *mut BYTE,
503         dataSize: UINT32,
504     ) -> HRESULT,
505     fn GetValueSize(
506         index: UINT32,
507     ) -> UINT32,
508     fn GetSubProperties(
509         index: UINT32,
510         subProperties: *mut *mut ID2D1Properties,
511     ) -> HRESULT,
512 });
513 RIDL!(#[uuid(0x28211a43, 0x7d89, 0x476f, 0x81, 0x81, 0x2d, 0x61, 0x59, 0xb2, 0x20, 0xad)]
514 interface ID2D1Effect(ID2D1EffectVtbl): ID2D1Properties(ID2D1PropertiesVtbl) {
515     fn SetInput(
516         index: UINT32,
517         input: *const ID2D1Image,
518         invalidate: BOOL,
519     ) -> (),
520     fn SetInputCount(
521         inputCount: UINT32,
522     ) -> HRESULT,
523     fn GetInput(
524         index: UINT32,
525         input: *mut *mut ID2D1Image,
526     ) -> (),
527     fn GetInputCount() -> UINT32,
528     fn GetOutput(
529         outputImage: *mut *mut ID2D1Image,
530     ) -> (),
531 });
532 RIDL!(#[uuid(0xa898a84c, 0x3873, 0x4588, 0xb0, 0x8b, 0xeb, 0xbf, 0x97, 0x8d, 0xf0, 0x41)]
533 interface ID2D1Bitmap1(ID2D1Bitmap1Vtbl): ID2D1Bitmap(ID2D1BitmapVtbl) {
534     fn GetColorContext(
535         colorContext: *mut *mut ID2D1ColorContext,
536     ) -> (),
537     fn GetOptions() -> D2D1_BITMAP_OPTIONS,
538     fn GetSurface(
539         dxgiSurface: *mut *mut IDXGISurface,
540     ) -> HRESULT,
541     fn Map(
542         options: D2D1_MAP_OPTIONS,
543         mappedRect: *mut D2D1_MAPPED_RECT,
544     ) -> HRESULT,
545     fn Unmap() -> HRESULT,
546 });
547 RIDL!(#[uuid(0x1c4820bb, 0x5771, 0x4518, 0xa5, 0x81, 0x2f, 0xe4, 0xdd, 0x0e, 0xc6, 0x57)]
548 interface ID2D1ColorContext(ID2D1ColorContextVtbl): ID2D1Resource(ID2D1ResourceVtbl) {
549     fn GetColorSpace() -> D2D1_COLOR_SPACE,
550     fn GetProfileSize() -> UINT32,
551     fn GetProfile(
552         profile: *mut BYTE,
553         profileSize: UINT32,
554     ) -> HRESULT,
555 });
556 RIDL!(#[uuid(0xae1572f4, 0x5dd0, 0x4777, 0x99, 0x8b, 0x92, 0x79, 0x47, 0x2a, 0xe6, 0x3b)]
557 interface ID2D1GradientStopCollection1(ID2D1GradientStopCollection1Vtbl):
558     ID2D1GradientStopCollection(ID2D1GradientStopCollectionVtbl) {
559     fn GetGradientStops1(
560         gradientStops: *mut D2D1_GRADIENT_STOP,
561         gradientStopsCount: UINT32,
562     ) -> (),
563     fn GetPreInterpolationSpace() -> D2D1_COLOR_SPACE,
564     fn GetPostInterpolationSpace() -> D2D1_COLOR_SPACE,
565     fn GetBufferPrecision() -> D2D1_BUFFER_PRECISION,
566     fn GetColorInterpolationMode() -> D2D1_COLOR_INTERPOLATION_MODE,
567 });
568 RIDL!(#[uuid(0x689f1f85, 0xc72e, 0x4e33, 0x8f, 0x19, 0x85, 0x75, 0x4e, 0xfd, 0x5a, 0xce)]
569 interface ID2D1DrawingStateBlock1(ID2D1DrawingStateBlock1Vtbl):
570     ID2D1DrawingStateBlock(ID2D1DrawingStateBlockVtbl) {
571     fn GetDescription(
572         stateDescription: *mut D2D1_DRAWING_STATE_DESCRIPTION1,
573     ) -> (),
574     fn SetDescription(
575         stateDescription: *const D2D1_DRAWING_STATE_DESCRIPTION1,
576     ) -> (),
577 });
578 RIDL!(#[uuid(0xe8f7fe7a, 0x191c, 0x466d, 0xad, 0x95, 0x97, 0x56, 0x78, 0xbd, 0xa9, 0x98)]
579 interface ID2D1DeviceContext(ID2D1DeviceContextVtbl): ID2D1RenderTarget(ID2D1RenderTargetVtbl) {
580     fn CreateBitmap(
581         size: D2D1_SIZE_U,
582         sourceData: *const c_void,
583         pitch: UINT32,
584         bitmapProperties: *const D2D1_BITMAP_PROPERTIES1,
585         bitmap: *mut *mut ID2D1Bitmap1,
586     ) -> HRESULT,
587     fn CreateBitmapFromWicBitmap(
588         wicBitmapSource: *const IWICBitmapSource,
589         bitmapProperties: *const D2D1_BITMAP_PROPERTIES1,
590         bitmap: *mut *mut ID2D1Bitmap1,
591     ) -> HRESULT,
592     fn CreateColorContext(
593         space: D2D1_COLOR_SPACE,
594         profile: *const BYTE,
595         profileSize: UINT32,
596         colorContext: *mut *mut ID2D1ColorContext,
597     ) -> HRESULT,
598     fn CreateColorContextFromFilename(
599         filename: PCWSTR,
600         colorContext: *mut *mut ID2D1ColorContext,
601     ) -> HRESULT,
602     fn CreateColorContextFromWicColorContext(
603         wicColorContext: *const IWICColorContext,
604         colorContext: *mut *mut ID2D1ColorContext,
605     ) -> HRESULT,
606     fn CreateBitmapFromDxgiSurface(
607         surface: *const IDXGISurface,
608         bitmapProperties: *const D2D1_BITMAP_PROPERTIES1,
609         bitmap: *mut *mut ID2D1Bitmap1,
610     ) -> HRESULT,
611     fn CreateEffect(
612         effectId: REFCLSID,
613         effect: *mut *mut ID2D1Effect,
614     ) -> HRESULT,
615     fn CreateGradientStopCollection(
616         straightAlphaGradientStops: *const D2D1_GRADIENT_STOP,
617         straightAlphaGradientStopsCount: UINT32,
618         preInterpolationSpace: D2D1_COLOR_SPACE,
619         postInterpolationSpace: D2D1_COLOR_SPACE,
620         bufferPrecision: D2D1_BUFFER_PRECISION,
621         extendMode: D2D1_EXTEND_MODE,
622         colorInterpolationMode: D2D1_COLOR_INTERPOLATION_MODE,
623         gradientStopCollection1: *mut *mut ID2D1GradientStopCollection1,
624     ) -> HRESULT,
625     fn CreateImageBrush(
626         image: *const ID2D1Image,
627         imageBrushProperties: *const D2D1_IMAGE_BRUSH_PROPERTIES,
628         brushProperties: *const D2D1_BRUSH_PROPERTIES,
629         imageBrush: *mut *mut ID2D1ImageBrush,
630     ) -> HRESULT,
631     fn CreateBitmapBrush(
632         bitmap: *const ID2D1Bitmap,
633         bitmapBrushProperties: *const D2D1_BITMAP_BRUSH_PROPERTIES1,
634         brushProperties: *const D2D1_BRUSH_PROPERTIES,
635         bitmapBrush: *mut *mut ID2D1BitmapBrush1,
636     ) -> HRESULT,
637     fn CreateCommandList(
638         commandList: *mut *mut ID2D1CommandList,
639     ) -> HRESULT,
640     fn IsDxgiFormatSupported(
641         format: DXGI_FORMAT,
642     ) -> BOOL,
643     fn IsBufferPrecisionSupported(
644         bufferPrecision: D2D1_BUFFER_PRECISION,
645     ) -> BOOL,
646     fn GetImageLocalBounds(
647         image: *const ID2D1Image,
648         localBounds: *mut D2D1_RECT_F,
649     ) -> HRESULT,
650     fn GetImageWorldBounds(
651         image: *const ID2D1Image,
652         worldBounds: *mut D2D1_RECT_F,
653     ) -> HRESULT,
654     fn GetGlyphRunWorldBounds(
655         baselineOrigin: D2D1_POINT_2F,
656         glyphRun: *const DWRITE_GLYPH_RUN,
657         measuringMode: DWRITE_MEASURING_MODE,
658         bounds: *mut D2D1_RECT_F,
659     ) -> HRESULT,
660     fn GetDevice(
661         device: *mut *mut ID2D1Device,
662     ) -> (),
663     fn SetTarget(
664         image: *const ID2D1Image,
665     ) -> (),
666     fn GetTarget(
667         image: *mut *mut ID2D1Image,
668     ) -> (),
669     fn SetRenderingControls(
670         renderingControls: *const D2D1_RENDERING_CONTROLS,
671     ) -> (),
672     fn GetRenderingControls(
673         renderingControls: *mut D2D1_RENDERING_CONTROLS,
674     ) -> (),
675     fn SetPrimitiveBlend(
676         primitiveBlend: D2D1_PRIMITIVE_BLEND,
677     ) -> (),
678     fn GetPrimitiveBlend() -> D2D1_PRIMITIVE_BLEND,
679     fn SetUnitMode(
680         unitMode: D2D1_UNIT_MODE,
681     ) -> (),
682     fn GetUnitMode() -> D2D1_UNIT_MODE,
683     fn DrawGlyphRun(
684         baselineOrigin: D2D1_POINT_2F,
685         glyphRun: *const DWRITE_GLYPH_RUN,
686         glyphRunDescription: *const DWRITE_GLYPH_RUN_DESCRIPTION,
687         foregroundBrush: *const ID2D1Brush,
688         measuringMode: DWRITE_MEASURING_MODE,
689     ) -> (),
690     fn DrawImage(
691         image: *const ID2D1Image,
692         targetOffset: *const D2D1_POINT_2F,
693         imageRectangle: *const D2D1_RECT_F,
694         interpolationMode: D2D1_INTERPOLATION_MODE,
695         compositeMode: D2D1_COMPOSITE_MODE,
696     ) -> (),
697     fn DrawGdiMetafile(
698         gdiMetafile: *const ID2D1GdiMetafile,
699         targetOffset: *const D2D1_POINT_2F,
700     ) -> (),
701     fn DrawBitmap(
702         bitmap: *const ID2D1Bitmap,
703         destinationRectangle: *const D2D1_RECT_F,
704         opacity: FLOAT,
705         interpolationMode: D2D1_INTERPOLATION_MODE,
706         sourceRectangle: *const D2D1_RECT_F,
707         perspectiveTransform: *const D2D1_MATRIX_4X4_F,
708     ) -> (),
709     fn PushLayer(
710         layerParameters: *const D2D1_LAYER_PARAMETERS1,
711         layer: *const ID2D1Layer,
712     ) -> (),
713     fn InvalidateEffectInputRectangle(
714         effect: *const ID2D1Effect,
715         input: UINT32,
716         inputRectangle: *const D2D1_RECT_F,
717     ) -> HRESULT,
718     fn GetEffectInvalidRectangleCount(
719         effect: *const ID2D1Effect,
720         rectangleCount: *mut UINT32,
721     ) -> HRESULT,
722     fn GetEffectInvalidRectangles(
723         effect: *const ID2D1Effect,
724         rectangles: *mut D2D1_RECT_F,
725         rectanglesCount: UINT32,
726     ) -> HRESULT,
727     fn GetEffectRequiredInputRectangles(
728         renderEffect: *const ID2D1Effect,
729         renderImageRectangle: *const D2D1_RECT_F,
730         inputDescriptions: *const D2D1_EFFECT_INPUT_DESCRIPTION,
731         requiredInputRects: *mut D2D1_RECT_F,
732         inputCount: UINT32,
733     ) -> HRESULT,
734     fn FillOpacityMask(
735         opacityMask: *const ID2D1Bitmap,
736         brush: *const ID2D1Brush,
737         destinationRectangle: *const D2D1_RECT_F,
738         sourceRectangle: *const D2D1_RECT_F,
739     ) -> (),
740 });
741 RIDL!(#[uuid(0x47dd575d, 0xac05, 0x4cdd, 0x80, 0x49, 0x9b, 0x02, 0xcd, 0x16, 0xf4, 0x4c)]
742 interface ID2D1Device(ID2D1DeviceVtbl): ID2D1Resource(ID2D1ResourceVtbl) {
743     fn CreateDeviceContext(
744         options: D2D1_DEVICE_CONTEXT_OPTIONS,
745         deviceContext: *mut *mut ID2D1DeviceContext,
746     ) -> HRESULT,
747     fn CreatePrintControl(
748         wicFactory: *const IWICImagingFactory,
749         documentTarget: *const IPrintDocumentPackageTarget,
750         printControlProperties: *const D2D1_PRINT_CONTROL_PROPERTIES,
751         printControl: *mut *mut ID2D1PrintControl,
752     ) -> HRESULT,
753     fn SetMaximumTextureMemory(
754         maximumInBytes: UINT64,
755     ) -> (),
756     fn GetMaximumTextureMemory() -> UINT64,
757     fn ClearResources(
758         millisecondsSinceUse: UINT32,
759     ) -> (),
760 });
761 RIDL!(#[uuid(0xbb12d362, 0xdaee, 0x4b9a, 0xaa, 0x1d, 0x14, 0xba, 0x40, 0x1c, 0xfa, 0x1f)]
762 interface ID2D1Factory1(ID2D1Factory1Vtbl): ID2D1Factory(ID2D1FactoryVtbl) {
763     fn CreateDevice(
764         dxgiDevice: *const IDXGIDevice,
765         d2dDevice: *mut *mut ID2D1Device,
766     ) -> HRESULT,
767     fn CreateStrokeStyle(
768         strokeStyleProperties: *const D2D1_STROKE_STYLE_PROPERTIES1,
769         dashes: *const FLOAT,
770         dashesCount: UINT32,
771         strokeStyle: *mut *mut ID2D1StrokeStyle1,
772     ) -> HRESULT,
773     fn CreatePathGeometry(
774         pathGeometry: *mut *mut ID2D1PathGeometry1,
775     ) -> HRESULT,
776     fn CreateDrawingStateBlock(
777         drawingStateDescription: *const D2D1_DRAWING_STATE_DESCRIPTION1,
778         textRenderingParams: *const IDWriteRenderingParams,
779         drawingStateBlock: *mut *mut ID2D1DrawingStateBlock1,
780     ) -> HRESULT,
781     fn CreateGdiMetafile(
782         metafileStream: *const IStream,
783         metafile: *mut *mut ID2D1GdiMetafile,
784     ) -> HRESULT,
785     fn RegisterEffectFromStream(
786         classId: REFCLSID,
787         propertyXml: *const IStream,
788         bindings: *const D2D1_PROPERTY_BINDING,
789         bindingsCount: UINT32,
790         effectFactory: PD2D1_EFFECT_FACTORY,
791     ) -> HRESULT,
792     fn RegisterEffectFromString(
793         classId: REFCLSID,
794         propertyXml: PCWSTR,
795         bindings: *const D2D1_PROPERTY_BINDING,
796         bindingsCount: UINT32,
797         effectFactory: PD2D1_EFFECT_FACTORY,
798     ) -> HRESULT,
799     fn UnregisterEffect(
800         classId: REFCLSID,
801     ) -> HRESULT,
802     fn GetRegisteredEffects(
803         effects: *mut CLSID,
804         effectsCount: UINT32,
805         effectsReturned: *mut UINT32,
806         effectsRegistered: *mut UINT32,
807     ) -> HRESULT,
808     fn GetEffectProperties(
809         effectId: REFCLSID,
810         properties: *mut *mut ID2D1Properties,
811     ) -> HRESULT,
812 });
813 RIDL!(#[uuid(0x31e6e7bc, 0xe0ff, 0x4d46, 0x8c, 0x64, 0xa0, 0xa8, 0xc4, 0x1c, 0x15, 0xd3)]
814 interface ID2D1Multithread(ID2D1MultithreadVtbl): IUnknown(IUnknownVtbl) {
815     fn GetMultithreadProtected() -> BOOL,
816     fn Enter() -> (),
817     fn Leave() -> (),
818 });
819 extern "system" {
D2D1CreateDevice( dxgiDevice: *const IDXGIDevice, creationProperties: *const D2D1_CREATION_PROPERTIES, d2dDevice: *mut *mut ID2D1Device ) -> HRESULT820     pub fn D2D1CreateDevice(
821         dxgiDevice: *const IDXGIDevice,
822         creationProperties: *const D2D1_CREATION_PROPERTIES,
823         d2dDevice: *mut *mut ID2D1Device
824     ) -> HRESULT;
D2D1CreateDeviceContext( dxgiSurface: *const IDXGISurface, creationProperties: *const D2D1_CREATION_PROPERTIES, d2dDeviceContext: *mut *mut ID2D1DeviceContext ) -> HRESULT825     pub fn D2D1CreateDeviceContext(
826         dxgiSurface: *const IDXGISurface,
827         creationProperties: *const D2D1_CREATION_PROPERTIES,
828         d2dDeviceContext: *mut *mut ID2D1DeviceContext
829     ) -> HRESULT;
D2D1ConvertColorSpace( sourceColorSpace: D2D1_COLOR_SPACE, destinationColorSpace: D2D1_COLOR_SPACE, color: *const D2D1_COLOR_F ) -> D2D1_COLOR_F830     pub fn D2D1ConvertColorSpace(
831         sourceColorSpace: D2D1_COLOR_SPACE,
832         destinationColorSpace: D2D1_COLOR_SPACE,
833         color: *const D2D1_COLOR_F
834     ) -> D2D1_COLOR_F;
D2D1SinCos( angle: FLOAT, s: *mut FLOAT, c: *mut FLOAT ) -> ()835     pub fn D2D1SinCos(
836         angle: FLOAT,
837         s: *mut FLOAT,
838         c: *mut FLOAT
839     ) -> ();
D2D1Tan( angle: FLOAT ) -> FLOAT840     pub fn D2D1Tan(
841         angle: FLOAT
842     ) -> FLOAT;
D2D1Vec3Length( x: FLOAT, y: FLOAT, z: FLOAT ) -> FLOAT843     pub fn D2D1Vec3Length(
844         x: FLOAT,
845         y: FLOAT,
846         z: FLOAT
847     ) -> FLOAT;
848 }
849