1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms
6 //! Mappings for the contents of d2d1.h
8 use shared
::basetsd
::{UINT32, UINT64}
;
9 use shared
::dxgi
::IDXGISurface
;
10 use shared
::guiddef
::REFIID
;
11 use shared
::minwindef
::{BOOL, DWORD, FLOAT}
;
12 use shared
::windef
::{HDC, HWND, RECT}
;
13 use um
::d2dbasetypes
::{
14 D2D_COLOR_F
, D2D_MATRIX_3X2_F
, D2D_POINT_2F
, D2D_POINT_2U
, D2D_RECT_F
, D2D_RECT_U
, D2D_SIZE_F
,
17 use um
::d3dcommon
::{D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_9_1}
;
18 use um
::dcommon
::{D2D1_PIXEL_FORMAT, DWRITE_MEASURING_MODE}
;
19 use um
::dwrite
::{DWRITE_GLYPH_RUN, IDWriteRenderingParams, IDWriteTextFormat, IDWriteTextLayout}
;
20 use um
::unknwnbase
::{IUnknown, IUnknownVtbl}
;
21 use um
::wincodec
::{IWICBitmap, IWICBitmapSource}
;
22 use um
::winnt
::{HRESULT, WCHAR}
;
23 // Types confirmed affected by the ABI issue:
24 // D2D1_SIZE_F, D2D1_SIZE_U, D2D1_COLOR_F, D2D1_PIXEL_FORMAT, D2D1_POINT_2F
25 pub const D2D1_DEFAULT_FLATTENING_TOLERANCE
: FLOAT
= 0.25;
26 pub const D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR
: DWORD
= 0;
27 pub const D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR
: DWORD
= 1;
28 pub const D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC
: DWORD
= 2;
29 pub const D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR
: DWORD
= 3;
30 pub const D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC
: DWORD
= 4;
31 pub const D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC
: DWORD
= 5;
32 pub const D2D1_INTERPOLATION_MODE_DEFINITION_FANT
: DWORD
= 6;
33 pub const D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR
: DWORD
= 7;
34 ENUM
!{enum D2D1_GAMMA
{
38 ENUM
!{enum D2D1_OPACITY_MASK_CONTENT
{
39 D2D1_OPACITY_MASK_CONTENT_GRAPHICS
= 0,
40 D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL
= 1,
41 D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE
= 2,
43 ENUM
!{enum D2D1_EXTEND_MODE
{
44 D2D1_EXTEND_MODE_CLAMP
= 0,
45 D2D1_EXTEND_MODE_WRAP
= 1,
46 D2D1_EXTEND_MODE_MIRROR
= 2,
48 ENUM
!{enum D2D1_ANTIALIAS_MODE
{
49 D2D1_ANTIALIAS_MODE_PER_PRIMITIVE
= 0,
50 D2D1_ANTIALIAS_MODE_ALIASED
= 1,
52 ENUM
!{enum D2D1_TEXT_ANTIALIAS_MODE
{
53 D2D1_TEXT_ANTIALIAS_MODE_DEFAULT
= 0,
54 D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE
= 1,
55 D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE
= 2,
56 D2D1_TEXT_ANTIALIAS_MODE_ALIASED
= 3,
58 ENUM
!{enum D2D1_BITMAP_INTERPOLATION_MODE
{
59 D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR
=
60 D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR
,
61 D2D1_BITMAP_INTERPOLATION_MODE_LINEAR
=
62 D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR
,
64 ENUM
!{enum D2D1_DRAW_TEXT_OPTIONS
{
65 D2D1_DRAW_TEXT_OPTIONS_NO_SNAP
= 0x00000001,
66 D2D1_DRAW_TEXT_OPTIONS_CLIP
= 0x00000002,
67 D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT
= 0x00000004,
68 D2D1_DRAW_TEXT_OPTIONS_NONE
= 0x00000000,
70 pub type D2D1_POINT_2U
= D2D_POINT_2U
;
71 pub type D2D1_POINT_2F
= D2D_POINT_2F
;
72 pub type D2D1_RECT_F
= D2D_RECT_F
;
73 pub type D2D1_RECT_U
= D2D_RECT_U
;
74 pub type D2D1_SIZE_F
= D2D_SIZE_F
;
75 pub type D2D1_SIZE_U
= D2D_SIZE_U
;
76 pub type D2D1_COLOR_F
= D2D_COLOR_F
;
77 pub type D2D1_MATRIX_3X2_F
= D2D_MATRIX_3X2_F
;
78 pub type D2D1_TAG
= UINT64
;
79 STRUCT
!{struct D2D1_BITMAP_PROPERTIES
{
80 pixelFormat
: D2D1_PIXEL_FORMAT
,
84 STRUCT
!{struct D2D1_GRADIENT_STOP
{
88 STRUCT
!{struct D2D1_BRUSH_PROPERTIES
{
90 transform
: D2D1_MATRIX_3X2_F
,
92 STRUCT
!{struct D2D1_BITMAP_BRUSH_PROPERTIES
{
93 extendModeX
: D2D1_EXTEND_MODE
,
94 extendModeY
: D2D1_EXTEND_MODE
,
95 interpolationMode
: D2D1_BITMAP_INTERPOLATION_MODE
,
97 STRUCT
!{struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES
{
98 startPoint
: D2D1_POINT_2F
,
99 endPoint
: D2D1_POINT_2F
,
101 STRUCT
!{struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES
{
102 center
: D2D1_POINT_2F
,
103 gradientOriginOffset
: D2D1_POINT_2F
,
107 ENUM
!{enum D2D1_ARC_SIZE
{
108 D2D1_ARC_SIZE_SMALL
= 0,
109 D2D1_ARC_SIZE_LARGE
= 1,
111 ENUM
!{enum D2D1_CAP_STYLE
{
112 D2D1_CAP_STYLE_FLAT
= 0,
113 D2D1_CAP_STYLE_SQUARE
= 1,
114 D2D1_CAP_STYLE_ROUND
= 2,
115 D2D1_CAP_STYLE_TRIANGLE
= 3,
117 ENUM
!{enum D2D1_DASH_STYLE
{
118 D2D1_DASH_STYLE_SOLID
= 0,
119 D2D1_DASH_STYLE_DASH
= 1,
120 D2D1_DASH_STYLE_DOT
= 2,
121 D2D1_DASH_STYLE_DASH_DOT
= 3,
122 D2D1_DASH_STYLE_DASH_DOT_DOT
= 4,
123 D2D1_DASH_STYLE_CUSTOM
= 5,
125 ENUM
!{enum D2D1_LINE_JOIN
{
126 D2D1_LINE_JOIN_MITER
= 0,
127 D2D1_LINE_JOIN_BEVEL
= 1,
128 D2D1_LINE_JOIN_ROUND
= 2,
129 D2D1_LINE_JOIN_MITER_OR_BEVEL
= 3,
131 ENUM
!{enum D2D1_COMBINE_MODE
{
132 D2D1_COMBINE_MODE_UNION
= 0,
133 D2D1_COMBINE_MODE_INTERSECT
= 1,
134 D2D1_COMBINE_MODE_XOR
= 2,
135 D2D1_COMBINE_MODE_EXCLUDE
= 3,
137 ENUM
!{enum D2D1_GEOMETRY_RELATION
{
138 D2D1_GEOMETRY_RELATION_UNKNOWN
= 0,
139 D2D1_GEOMETRY_RELATION_DISJOINT
= 1,
140 D2D1_GEOMETRY_RELATION_IS_CONTAINED
= 2,
141 D2D1_GEOMETRY_RELATION_CONTAINS
= 3,
142 D2D1_GEOMETRY_RELATION_OVERLAP
= 4,
144 ENUM
!{enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION
{
145 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES
= 0,
146 D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES
= 1,
148 ENUM
!{enum D2D1_FIGURE_BEGIN
{
149 D2D1_FIGURE_BEGIN_FILLED
= 0,
150 D2D1_FIGURE_BEGIN_HOLLOW
= 1,
152 ENUM
!{enum D2D1_FIGURE_END
{
153 D2D1_FIGURE_END_OPEN
= 0,
154 D2D1_FIGURE_END_CLOSED
= 1,
156 STRUCT
!{struct D2D1_BEZIER_SEGMENT
{
157 point1
: D2D1_POINT_2F
,
158 point2
: D2D1_POINT_2F
,
159 point3
: D2D1_POINT_2F
,
161 STRUCT
!{struct D2D1_TRIANGLE
{
162 point1
: D2D1_POINT_2F
,
163 point2
: D2D1_POINT_2F
,
164 point3
: D2D1_POINT_2F
,
166 ENUM
!{enum D2D1_PATH_SEGMENT
{
167 D2D1_PATH_SEGMENT_NONE
= 0x00000000,
168 D2D1_PATH_SEGMENT_FORCE_UNSTROKED
= 0x00000001,
169 D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN
= 0x00000002,
171 ENUM
!{enum D2D1_SWEEP_DIRECTION
{
172 D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE
= 0,
173 D2D1_SWEEP_DIRECTION_CLOCKWISE
= 1,
175 ENUM
!{enum D2D1_FILL_MODE
{
176 D2D1_FILL_MODE_ALTERNATE
= 0,
177 D2D1_FILL_MODE_WINDING
= 1,
179 STRUCT
!{struct D2D1_ARC_SEGMENT
{
180 point
: D2D1_POINT_2F
,
182 rotationAngle
: FLOAT
,
183 sweepDirection
: D2D1_SWEEP_DIRECTION
,
184 arcSize
: D2D1_ARC_SIZE
,
186 STRUCT
!{struct D2D1_QUADRATIC_BEZIER_SEGMENT
{
187 point1
: D2D1_POINT_2F
,
188 point2
: D2D1_POINT_2F
,
190 STRUCT
!{struct D2D1_ELLIPSE
{
191 point
: D2D1_POINT_2F
,
195 STRUCT
!{struct D2D1_ROUNDED_RECT
{
200 STRUCT
!{struct D2D1_STROKE_STYLE_PROPERTIES
{
201 startCap
: D2D1_CAP_STYLE
,
202 endCap
: D2D1_CAP_STYLE
,
203 dashCap
: D2D1_CAP_STYLE
,
204 lineJoin
: D2D1_LINE_JOIN
,
206 dashStyle
: D2D1_DASH_STYLE
,
209 ENUM
!{enum D2D1_LAYER_OPTIONS
{
210 D2D1_LAYER_OPTIONS_NONE
= 0x00000000,
211 D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE
= 0x00000001,
213 STRUCT
!{struct D2D1_LAYER_PARAMETERS
{
214 contentBounds
: D2D1_RECT_F
,
215 geometricMask
: *mut ID2D1Geometry
,
216 maskAntialiasMode
: D2D1_ANTIALIAS_MODE
,
217 maskTransform
: D2D1_MATRIX_3X2_F
,
219 opacityBrush
: *mut ID2D1Brush
,
220 layerOptions
: D2D1_LAYER_OPTIONS
,
222 ENUM
!{enum D2D1_WINDOW_STATE
{
223 D2D1_WINDOW_STATE_NONE
= 0x0000000,
224 D2D1_WINDOW_STATE_OCCLUDED
= 0x0000001,
226 ENUM
!{enum D2D1_RENDER_TARGET_TYPE
{
227 D2D1_RENDER_TARGET_TYPE_DEFAULT
= 0,
228 D2D1_RENDER_TARGET_TYPE_SOFTWARE
= 1,
229 D2D1_RENDER_TARGET_TYPE_HARDWARE
= 2,
231 ENUM
!{enum D2D1_FEATURE_LEVEL
{
232 D2D1_FEATURE_LEVEL_DEFAULT
= 0,
233 D2D1_FEATURE_LEVEL_9
= D3D_FEATURE_LEVEL_9_1
,
234 D2D1_FEATURE_LEVEL_10
= D3D_FEATURE_LEVEL_10_0
,
236 ENUM
!{enum D2D1_RENDER_TARGET_USAGE
{
237 D2D1_RENDER_TARGET_USAGE_NONE
= 0x00000000,
238 D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING
= 0x00000001,
239 D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE
= 0x00000002,
241 ENUM
!{enum D2D1_PRESENT_OPTIONS
{
242 D2D1_PRESENT_OPTIONS_NONE
= 0x00000000,
243 D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS
= 0x00000001,
244 D2D1_PRESENT_OPTIONS_IMMEDIATELY
= 0x00000002,
246 STRUCT
!{struct D2D1_RENDER_TARGET_PROPERTIES
{
247 _type
: D2D1_RENDER_TARGET_TYPE
,
248 pixelFormat
: D2D1_PIXEL_FORMAT
,
251 usage
: D2D1_RENDER_TARGET_USAGE
,
252 minLevel
: D2D1_FEATURE_LEVEL
,
254 STRUCT
!{struct D2D1_HWND_RENDER_TARGET_PROPERTIES
{
256 pixelSize
: D2D1_SIZE_U
,
257 presentOptions
: D2D1_PRESENT_OPTIONS
,
259 ENUM
!{enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS
{
260 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE
= 0x00000000,
261 D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE
= 0x00000001,
263 STRUCT
!{struct D2D1_DRAWING_STATE_DESCRIPTION
{
264 antialiasMode
: D2D1_ANTIALIAS_MODE
,
265 textAntialiasMode
: D2D1_TEXT_ANTIALIAS_MODE
,
268 transform
: D2D1_MATRIX_3X2_F
,
270 ENUM
!{enum D2D1_DC_INITIALIZE_MODE
{
271 D2D1_DC_INITIALIZE_MODE_COPY
= 0,
272 D2D1_DC_INITIALIZE_MODE_CLEAR
= 1,
274 ENUM
!{enum D2D1_DEBUG_LEVEL
{
275 D2D1_DEBUG_LEVEL_NONE
= 0,
276 D2D1_DEBUG_LEVEL_ERROR
= 1,
277 D2D1_DEBUG_LEVEL_WARNING
= 2,
278 D2D1_DEBUG_LEVEL_INFORMATION
= 3,
280 ENUM
!{enum D2D1_FACTORY_TYPE
{
281 D2D1_FACTORY_TYPE_SINGLE_THREADED
= 0,
282 D2D1_FACTORY_TYPE_MULTI_THREADED
= 1,
284 STRUCT
!{struct D2D1_FACTORY_OPTIONS
{
285 debugLevel
: D2D1_DEBUG_LEVEL
,
287 RIDL
!{#[uuid(0x2cd90691, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
288 interface
ID2D1Resource(ID2D1ResourceVtbl
): IUnknown(IUnknownVtbl
) {
290 factory
: *mut *mut ID2D1Factory
,
293 RIDL
!{#[uuid(0x65019f75, 0x8da2, 0x497c, 0xb3, 0x2c, 0xdf, 0xa3, 0x4e, 0x48, 0xed, 0xe6)]
294 interface
ID2D1Image(ID2D1ImageVtbl
): ID2D1Resource(ID2D1ResourceVtbl
) {}
}
295 RIDL
!{#[uuid(0xa2296057, 0xea42, 0x4099, 0x98, 0x3b, 0x53, 0x9f, 0xb6, 0x50, 0x54, 0x26)]
296 interface
ID2D1Bitmap(ID2D1BitmapVtbl
): ID2D1Image(ID2D1ImageVtbl
) {
297 #[fixme] fn GetSize() -> D2D1_SIZE_F,
298 #[fixme] fn GetPixelSize() -> D2D1_SIZE_U,
299 #[fixme] fn GetPixelFormat() -> D2D1_PIXEL_FORMAT,
305 destPoint
: *const D2D1_POINT_2U
,
306 bitmap
: *mut ID2D1Bitmap
,
307 srcRect
: *const D2D1_RECT_U
,
309 fn CopyFromRenderTarget(
310 destPoint
: *const D2D1_POINT_2U
,
311 renderTarget
: *mut ID2D1RenderTarget
,
312 srcRect
: *const D2D1_RECT_U
,
315 dstRect
: *const D2D1_RECT_U
,
316 srcData
: *const c_void
,
320 RIDL
!{#[uuid(0x2cd906a7, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
321 interface
ID2D1GradientStopCollection(ID2D1GradientStopCollectionVtbl
):
322 ID2D1Resource(ID2D1ResourceVtbl
) {
323 fn GetGradientStopCount() -> UINT32
,
325 gradientStops
: *mut D2D1_GRADIENT_STOP
,
326 gradientStopsCount
: UINT32
,
328 fn GetColorInterpolationGamma() -> D2D1_GAMMA
,
329 fn GetExtendMode() -> D2D1_EXTEND_MODE
,
331 RIDL
!{#[uuid(0x2cd906a8, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
332 interface
ID2D1Brush(ID2D1BrushVtbl
): ID2D1Resource(ID2D1ResourceVtbl
) {
337 transform
: *const D2D1_MATRIX_3X2_F
,
339 fn GetOpacity() -> FLOAT
,
341 transform
: *mut D2D1_MATRIX_3X2_F
,
344 RIDL
!{#[uuid(0x2cd906aa, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
345 interface
ID2D1BitmapBrush(ID2D1BitmapBrushVtbl
): ID2D1Brush(ID2D1BrushVtbl
) {
347 extendModeX
: D2D1_EXTEND_MODE
,
350 extendModeY
: D2D1_EXTEND_MODE
,
352 fn SetInterpolationMode(
353 interpolationMode
: D2D1_BITMAP_INTERPOLATION_MODE
,
356 bitmap
: *mut ID2D1Bitmap
,
358 fn GetExtendModeX() -> D2D1_EXTEND_MODE
,
359 fn GetExtendModeY() -> D2D1_EXTEND_MODE
,
360 fn GetInterpolationMode() -> D2D1_BITMAP_INTERPOLATION_MODE
,
362 bitmap
: *mut *mut ID2D1Bitmap
,
365 RIDL
!{#[uuid(0x2cd906a9, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
366 interface
ID2D1SolidColorBrush(ID2D1SolidColorBrushVtbl
): ID2D1Brush(ID2D1BrushVtbl
) {
368 color
: *const D2D1_COLOR_F
,
370 #[fixme] fn GetColor() -> D2D1_COLOR_F,
372 RIDL
!{#[uuid(0x2cd906ab, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
373 interface
ID2D1LinearGradientBrush(ID2D1LinearGradientBrushVtbl
): ID2D1Brush(ID2D1BrushVtbl
) {
375 startPoint
: D2D1_POINT_2F
,
378 endPoint
: D2D1_POINT_2F
,
380 #[fixme] fn GetStartPoint() -> D2D1_POINT_2F,
381 #[fixme] fn GetEndPoint() -> D2D1_POINT_2F,
382 fn GetGradientStopCollection(
383 gradientStopCollection
: *mut *mut ID2D1GradientStopCollection
,
386 RIDL
!{#[uuid(0x2cd906ac, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
387 interface
ID2D1RadialGradientBrush(ID2D1RadialGradientBrushVtbl
): ID2D1Brush(ID2D1BrushVtbl
) {
389 center
: D2D1_POINT_2F
,
391 fn SetGradientOriginOffset(
392 gradientOriginOffset
: D2D1_POINT_2F
,
400 #[fixme] fn GetCenter() -> D2D1_POINT_2F,
401 #[fixme] fn GetGradientOriginOffset() -> D2D1_POINT_2F,
402 fn GetRadiusX() -> FLOAT
,
403 fn GetRadiusY() -> FLOAT
,
404 fn GetGradientStopCollection(
405 gradientStopCollection
: *mut *mut ID2D1GradientStopCollection
,
408 RIDL
!{#[uuid(0x2cd9069d, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
409 interface
ID2D1StrokeStyle(ID2D1StrokeStyleVtbl
): ID2D1Resource(ID2D1ResourceVtbl
) {
410 fn GetStartCap() -> D2D1_CAP_STYLE
,
411 fn GetEndCap() -> D2D1_CAP_STYLE
,
412 fn GetDashCap() -> D2D1_CAP_STYLE
,
413 fn GetMiterLimit() -> FLOAT
,
414 fn GetLineJoin() -> D2D1_LINE_JOIN
,
415 fn GetDashOffset() -> FLOAT
,
416 fn GetDashStyle() -> D2D1_DASH_STYLE
,
417 fn GetDashesCount() -> UINT32
,
423 RIDL
!{#[uuid(0x2cd906a1, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
424 interface
ID2D1Geometry(ID2D1GeometryVtbl
): ID2D1Resource(ID2D1ResourceVtbl
) {
426 worldTransform
: *const D2D1_MATRIX_3X2_F
,
427 bounds
: *mut D2D1_RECT_F
,
431 strokeStyle
: *mut ID2D1StrokeStyle
,
432 worldTransform
: *const D2D1_MATRIX_3X2_F
,
433 flatteningTolerance
: FLOAT
,
434 bounds
: *mut D2D1_RECT_F
,
436 fn StrokeContainsPoint(
437 point
: D2D1_POINT_2F
,
439 strokeStyle
: *mut ID2D1StrokeStyle
,
440 worldTransform
: *const D2D1_MATRIX_3X2_F
,
441 flatteningTolerance
: FLOAT
,
444 fn FillContainsPoint(
445 point
: D2D1_POINT_2F
,
446 worldTransform
: *const D2D1_MATRIX_3X2_F
,
447 flatteningTolerance
: FLOAT
,
450 fn CompareWithGeometry(
451 inputGeometry
: *mut ID2D1Geometry
,
452 inputGeometryTransform
: *const D2D1_MATRIX_3X2_F
,
453 flatteningTolerance
: FLOAT
,
454 relation
: *mut D2D1_GEOMETRY_RELATION
,
457 simplificationOption
: D2D1_GEOMETRY_SIMPLIFICATION_OPTION
,
458 worldTransform
: *const D2D1_MATRIX_3X2_F
,
459 flatteningTolerance
: FLOAT
,
460 geometrySink
: *mut ID2D1SimplifiedGeometrySink
,
463 worldTransform
: *const D2D1_MATRIX_3X2_F
,
464 flatteningTolerance
: FLOAT
,
465 tessellationSink
: *mut ID2D1TessellationSink
,
467 fn CombineWithGeometry(
468 inputGeometry
: *mut ID2D1Geometry
,
469 combineMode
: D2D1_COMBINE_MODE
,
470 inputGeometryTransform
: *const D2D1_MATRIX_3X2_F
,
471 flatteningTolerance
: FLOAT
,
472 geometrySink
: *mut ID2D1SimplifiedGeometrySink
,
475 worldTransform
: *const D2D1_MATRIX_3X2_F
,
476 flatteningTolerance
: FLOAT
,
477 geometrySink
: *mut ID2D1SimplifiedGeometrySink
,
480 worldTransform
: *const D2D1_MATRIX_3X2_F
,
481 flatteningTolerance
: FLOAT
,
485 worldTransform
: *const D2D1_MATRIX_3X2_F
,
486 flatteningTolerance
: FLOAT
,
489 fn ComputePointAtLength(
491 worldTransform
: *const D2D1_MATRIX_3X2_F
,
492 flatteningTolerance
: FLOAT
,
493 point
: *mut D2D1_POINT_2F
,
494 unitTangentVector
: *mut D2D1_POINT_2F
,
498 strokeStyle
: *mut ID2D1StrokeStyle
,
499 worldTransform
: *const D2D1_MATRIX_3X2_F
,
500 flatteningTolerance
: FLOAT
,
501 geometrySink
: *mut ID2D1SimplifiedGeometrySink
,
504 RIDL
!{#[uuid(0x2cd906a2, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
505 interface
ID2D1RectangleGeometry(ID2D1RectangleGeometryVtbl
): ID2D1Geometry(ID2D1GeometryVtbl
) {
507 rect
: *mut D2D1_RECT_F
,
510 RIDL
!{#[uuid(0x2cd906a3, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
511 interface
ID2D1RoundedRectangleGeometry(ID2D1RoundedRectangleGeometryVtbl
):
512 ID2D1Geometry(ID2D1GeometryVtbl
) {
514 roundedRect
: *mut D2D1_ROUNDED_RECT
,
517 RIDL
!{#[uuid(0x2cd906a4, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
518 interface
ID2D1EllipseGeometry(ID2D1EllipseGeometryVtbl
): ID2D1Geometry(ID2D1GeometryVtbl
) {
520 ellipse
: *mut D2D1_ELLIPSE
,
523 RIDL
!{#[uuid(0x2cd906a6, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
524 interface
ID2D1GeometryGroup(ID2D1GeometryGroupVtbl
): ID2D1Geometry(ID2D1GeometryVtbl
) {
525 fn GetFillMode() -> D2D1_FILL_MODE
,
526 fn GetSourceGeometryCount() -> UINT32
,
527 fn GetSourceGeometries(
528 geometries
: *mut *mut ID2D1Geometry
,
529 geometriesCount
: UINT32
,
532 RIDL
!{#[uuid(0x2cd906bb, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
533 interface
ID2D1TransformedGeometry(ID2D1TransformedGeometryVtbl
):
534 ID2D1Geometry(ID2D1GeometryVtbl
) {
535 fn GetSourceGeometry(
536 sourceGeometry
: *mut *mut ID2D1Geometry
,
539 transform
: *mut D2D1_MATRIX_3X2_F
,
542 RIDL
!{#[uuid(0x2cd9069e, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
543 interface
ID2D1SimplifiedGeometrySink(ID2D1SimplifiedGeometrySinkVtbl
): IUnknown(IUnknownVtbl
) {
545 fillMode
: D2D1_FILL_MODE
,
548 vertexFlags
: D2D1_PATH_SEGMENT
,
551 startPoint
: D2D1_POINT_2F
,
552 figureBegin
: D2D1_FIGURE_BEGIN
,
555 points
: *const D2D1_POINT_2F
,
559 beziers
: *const D2D1_BEZIER_SEGMENT
,
560 beziersCount
: UINT32
,
563 figureEnd
: D2D1_FIGURE_END
,
565 fn Close() -> HRESULT
,
567 RIDL
!{#[uuid(0x2cd9069f, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
568 interface
ID2D1GeometrySink(ID2D1GeometrySinkVtbl
):
569 ID2D1SimplifiedGeometrySink(ID2D1SimplifiedGeometrySinkVtbl
) {
571 point
: D2D1_POINT_2F
,
574 bezier
: *const D2D1_BEZIER_SEGMENT
,
576 fn AddQuadraticBezier(
577 bezier
: *const D2D1_QUADRATIC_BEZIER_SEGMENT
,
579 fn AddQuadraticBeziers(
580 beziers
: *const D2D1_QUADRATIC_BEZIER_SEGMENT
,
581 beziersCount
: UINT32
,
584 arc
: *const D2D1_ARC_SEGMENT
,
587 RIDL
!{#[uuid(0x2cd906c1, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
588 interface
ID2D1TessellationSink(ID2D1TessellationSinkVtbl
): IUnknown(IUnknownVtbl
) {
590 triangles
: *const D2D1_TRIANGLE
,
591 triangleCount
: UINT32
,
593 fn Close() -> HRESULT
,
595 RIDL
!{#[uuid(0x2cd906a5, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
596 interface
ID2D1PathGeometry(ID2D1PathGeometryVtbl
): ID2D1Geometry(ID2D1GeometryVtbl
) {
598 geometrySink
: *mut *mut ID2D1GeometrySink
,
601 geometrySink
: *mut ID2D1GeometrySink
,
610 RIDL
!{#[uuid(0x2cd906c2, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
611 interface
ID2D1Mesh(ID2D1MeshVtbl
): ID2D1Resource(ID2D1ResourceVtbl
) {
613 tessellationSink
: *mut *mut ID2D1TessellationSink
,
616 RIDL
!{#[uuid(0x2cd9069b, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
617 interface
ID2D1Layer(ID2D1LayerVtbl
): ID2D1Resource(ID2D1ResourceVtbl
) {
618 #[fixme] fn GetSize() -> D2D1_SIZE_F,
620 RIDL
!{#[uuid(0x28506e39, 0xebf6, 0x46a1, 0xbb, 0x47, 0xfd, 0x85, 0x56, 0x5a, 0xb9, 0x57)]
621 interface
ID2D1DrawingStateBlock(ID2D1DrawingStateBlockVtbl
): ID2D1Resource(ID2D1ResourceVtbl
) {
623 stateDescription
: *mut D2D1_DRAWING_STATE_DESCRIPTION
,
626 stateDescription
: *const D2D1_DRAWING_STATE_DESCRIPTION
,
628 fn SetTextRenderingParams(
629 textRenderingParams
: *mut IDWriteRenderingParams
,
631 fn GetTextRenderingParams(
632 textRenderingParams
: *mut *mut IDWriteRenderingParams
,
635 RIDL
!{#[uuid(0x2cd90694, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
636 interface
ID2D1RenderTarget(ID2D1RenderTargetVtbl
): ID2D1Resource(ID2D1ResourceVtbl
) {
639 srcData
: *const c_void
,
641 bitmapProperties
: *const D2D1_BITMAP_PROPERTIES
,
642 bitmap
: *mut *mut ID2D1Bitmap
,
644 fn CreateBitmapFromWicBitmap(
645 wicBitmapSource
: *mut IWICBitmapSource
,
646 bitmapProperties
: *const D2D1_BITMAP_PROPERTIES
,
647 bitmap
: *mut *mut ID2D1Bitmap
,
649 fn CreateSharedBitmap(
652 bitmapProperties
: *const D2D1_BITMAP_PROPERTIES
,
653 bitmap
: *mut *mut ID2D1Bitmap
,
655 fn CreateBitmapBrush(
656 bitmap
: *mut ID2D1Bitmap
,
657 bitmapBrushProperties
: *const D2D1_BITMAP_BRUSH_PROPERTIES
,
658 brushProperties
: *const D2D1_BRUSH_PROPERTIES
,
659 bitmapBrush
: *mut *mut ID2D1BitmapBrush
,
661 fn CreateSolidColorBrush(
662 color
: *const D2D1_COLOR_F
,
663 brushProperties
: *const D2D1_BRUSH_PROPERTIES
,
664 solidColorBrush
: *mut *mut ID2D1SolidColorBrush
,
666 fn CreateGradientStopCollection(
667 gradientStops
: *const D2D1_GRADIENT_STOP
,
668 gradientStopsCount
: UINT32
,
669 colorInterpolationGamma
: D2D1_GAMMA
,
670 extendMode
: D2D1_EXTEND_MODE
,
671 gradientStopCollection
: *mut *mut ID2D1GradientStopCollection
,
673 fn CreateLinearGradientBrush(
674 linearGradientBrushProperties
: *const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES
,
675 brushProperties
: *const D2D1_BRUSH_PROPERTIES
,
676 gradientStopCollection
: *mut ID2D1GradientStopCollection
,
677 linearGradientBrush
: *mut *mut ID2D1LinearGradientBrush
,
679 fn CreateRadialGradientBrush(
680 radialGradientBrushProperties
: *const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES
,
681 brushProperties
: *const D2D1_BRUSH_PROPERTIES
,
682 gradientStopCollection
: *mut ID2D1GradientStopCollection
,
683 radialGradientBrush
: *mut *mut ID2D1RadialGradientBrush
,
685 fn CreateCompatibleRenderTarget(
686 desiredSize
: *const D2D1_SIZE_F
,
687 desiredPixelSize
: *const D2D1_SIZE_U
,
688 desiredFormat
: *const D2D1_PIXEL_FORMAT
,
689 options
: D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS
,
690 bitmapRenderTarget
: *mut *mut ID2D1BitmapRenderTarget
,
693 size
: *const D2D1_SIZE_F
,
694 layer
: *mut *mut ID2D1Layer
,
697 mesh
: *mut *mut ID2D1Mesh
,
700 point0
: D2D1_POINT_2F
,
701 point1
: D2D1_POINT_2F
,
702 brush
: *mut ID2D1Brush
,
704 strokeStype
: *mut ID2D1StrokeStyle
,
707 rect
: *const D2D1_RECT_F
,
708 brush
: *mut ID2D1Brush
,
710 strokeStyle
: *mut ID2D1StrokeStyle
,
713 rect
: *const D2D1_RECT_F
,
714 brush
: *mut ID2D1Brush
,
716 fn DrawRoundedRectangle(
717 roundedRect
: *const D2D1_ROUNDED_RECT
,
718 brush
: *mut ID2D1Brush
,
720 strokeStyle
: *mut ID2D1StrokeStyle
,
722 fn FillRoundedRectangle(
723 roundedRect
: *const D2D1_ROUNDED_RECT
,
724 brush
: *mut ID2D1Brush
,
727 ellipse
: *const D2D1_ELLIPSE
,
728 brush
: *mut ID2D1Brush
,
730 strokeStyle
: *mut ID2D1StrokeStyle
,
733 ellipse
: *const D2D1_ELLIPSE
,
734 brush
: *mut ID2D1Brush
,
737 geometry
: *mut ID2D1Geometry
,
738 brush
: *mut ID2D1Brush
,
740 strokeStyle
: *mut ID2D1StrokeStyle
,
743 geometry
: *mut ID2D1Geometry
,
744 brush
: *mut ID2D1Brush
,
745 opacityBrush
: *mut ID2D1Brush
,
748 mesh
: *mut ID2D1Mesh
,
749 brush
: *const ID2D1Brush
,
752 opacityMask
: *mut ID2D1Bitmap
,
753 brush
: *mut ID2D1Brush
,
754 content
: D2D1_OPACITY_MASK_CONTENT
,
755 destinationRectangle
: *const D2D1_RECT_F
,
756 sourceRectangle
: *const D2D1_RECT_F
,
759 bitmap
: *mut ID2D1Bitmap
,
760 destinationRectangle
: *const D2D1_RECT_F
,
762 interpolationMode
: D2D1_BITMAP_INTERPOLATION_MODE
,
763 sourceRectangle
: *const D2D1_RECT_F
,
766 string
: *const WCHAR
,
767 stringLength
: UINT32
,
768 textFormat
: *mut IDWriteTextFormat
,
769 layoutRect
: *const D2D1_RECT_F
,
770 defaultForegroundBrush
: *mut ID2D1Brush
,
771 options
: D2D1_DRAW_TEXT_OPTIONS
,
772 measuringMode
: DWRITE_MEASURING_MODE
,
775 origin
: D2D1_POINT_2F
,
776 textLayout
: *mut IDWriteTextLayout
,
777 defaultForegroundBrush
: *mut ID2D1Brush
,
778 options
: D2D1_DRAW_TEXT_OPTIONS
,
781 baselineOrigin
: D2D1_POINT_2F
,
782 glyphRun
: *const DWRITE_GLYPH_RUN
,
783 foregroundBrush
: *mut ID2D1Brush
,
784 measuringMode
: DWRITE_MEASURING_MODE
,
787 transform
: *const D2D1_MATRIX_3X2_F
,
790 transform
: *mut D2D1_MATRIX_3X2_F
,
793 antialiasMode
: D2D1_ANTIALIAS_MODE
,
795 fn GetAntialiasMode() -> D2D1_ANTIALIAS_MODE
,
796 fn SetTextAntialiasMode(
797 textAntialiasMode
: D2D1_TEXT_ANTIALIAS_MODE
,
799 fn GetTextAntialiasMode() -> D2D1_TEXT_ANTIALIAS_MODE
,
800 fn SetTextRenderingParams(
801 textRenderingParams
: *mut IDWriteRenderingParams
,
803 fn GetTextRenderingParams(
804 textRenderingParams
: *mut *mut IDWriteRenderingParams
,
815 layerParameters
: *const D2D1_LAYER_PARAMETERS
,
816 layer
: *mut ID2D1Layer
,
824 drawingStateBlock
: *mut ID2D1DrawingStateBlock
,
826 fn RestoreDrawingState(
827 drawingStateBlock
: *mut ID2D1DrawingStateBlock
,
829 fn PushAxisAlignedClip(
830 clipRect
: *const D2D1_RECT_F
,
831 antialiasMode
: D2D1_ANTIALIAS_MODE
,
833 fn PopAxisAlignedClip() -> (),
835 clearColor
: *const D2D1_COLOR_F
,
837 fn BeginDraw() -> (),
842 #[fixme] fn GetPixelFormat() -> D2D1_PIXEL_FORMAT,
851 #[fixme] fn GetSize() -> D2D1_SIZE_F,
852 #[fixme] fn GetPixelSize() -> D2D1_SIZE_U,
853 fn GetMaximumBitmapSize() -> UINT32
,
855 renderTargetProperties
: *const D2D1_RENDER_TARGET_PROPERTIES
,
858 RIDL
!{#[uuid(0x2cd90695, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
859 interface
ID2D1BitmapRenderTarget(ID2D1BitmapRenderTargetVtbl
):
860 ID2D1RenderTarget(ID2D1RenderTargetVtbl
) {
862 bitmap
: *mut *mut ID2D1Bitmap
,
865 RIDL
!{#[uuid(0x2cd90698, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9)]
866 interface
ID2D1HwndRenderTarget(ID2D1HwndRenderTargetVtbl
):
867 ID2D1RenderTarget(ID2D1RenderTargetVtbl
) {
868 fn CheckWindowState() -> D2D1_WINDOW_STATE
,
870 pixelSize
: *const D2D1_SIZE_U
,
872 fn GetHwnd() -> HWND
,
874 RIDL
!{#[uuid(0xe0db51c3, 0x6f77, 0x4bae, 0xb3, 0xd5, 0xe4, 0x75, 0x09, 0xb3, 0x58, 0x38)]
875 interface
ID2D1GdiInteropRenderTarget(ID2D1GdiInteropRenderTargetVtbl
): IUnknown(IUnknownVtbl
) {
877 mode
: D2D1_DC_INITIALIZE_MODE
,
884 RIDL
!{#[uuid(0x1c51bc64, 0xde61, 0x46fd, 0x98, 0x99, 0x63, 0xa5, 0xd8, 0xf0, 0x39, 0x50)]
885 interface
ID2D1DCRenderTarget(ID2D1DCRenderTargetVtbl
): ID2D1RenderTarget(ID2D1RenderTargetVtbl
) {
888 pSubRect
: *const RECT
,
891 RIDL
!{#[uuid(0x06152247, 0x6f50, 0x465a, 0x92, 0x45, 0x11, 0x8b, 0xfd, 0x3b, 0x60, 0x07)]
892 interface
ID2D1Factory(ID2D1FactoryVtbl
): IUnknown(IUnknownVtbl
) {
893 fn ReloadSystemMetrics() -> HRESULT
,
898 fn CreateRectangleGeometry(
899 rectangle
: *const D2D1_RECT_F
,
900 rectangleGeometry
: *mut *mut ID2D1RectangleGeometry
,
902 fn CreateRoundedRectangleGeometry(
903 roundedRectangle
: *const D2D1_ROUNDED_RECT
,
904 roundedRectangleGeometry
: *mut *mut ID2D1RoundedRectangleGeometry
,
906 fn CreateEllipseGeometry(
907 ellipse
: *const D2D1_ELLIPSE
,
908 ellipseGeometry
: *mut *mut ID2D1EllipseGeometry
,
910 fn CreateGeometryGroup(
911 fillMode
: D2D1_FILL_MODE
,
912 geometries
: *mut *mut ID2D1Geometry
,
913 geometriesCount
: UINT32
,
914 geometryGroup
: *mut *mut ID2D1GeometryGroup
,
916 fn CreateTransformedGeometry(
917 sourceGeometry
: *mut ID2D1Geometry
,
918 transform
: *const D2D1_MATRIX_3X2_F
,
919 transformedGeometry
: *mut *mut ID2D1TransformedGeometry
,
921 fn CreatePathGeometry(
922 pathGeometry
: *mut *mut ID2D1PathGeometry
,
924 fn CreateStrokeStyle(
925 strokeStyleProperties
: *const D2D1_STROKE_STYLE_PROPERTIES
,
926 dashes
: *const FLOAT
,
928 strokeStyle
: *mut *mut ID2D1StrokeStyle
,
930 fn CreateDrawingStateBlock(
931 drawingStateDescription
: *const D2D1_DRAWING_STATE_DESCRIPTION
,
932 textRenderingParams
: *mut IDWriteRenderingParams
,
933 drawingStateBlock
: *mut *mut ID2D1DrawingStateBlock
,
935 fn CreateWicBitmapRenderTarget(
936 target
: *mut IWICBitmap
,
937 renderTargetProperties
: *const D2D1_RENDER_TARGET_PROPERTIES
,
938 renderTarget
: *mut *mut ID2D1RenderTarget
,
940 fn CreateHwndRenderTarget(
941 renderTargetProperties
: *const D2D1_RENDER_TARGET_PROPERTIES
,
942 hwndRenderTargetProperties
: *const D2D1_HWND_RENDER_TARGET_PROPERTIES
,
943 hwndRenderTarget
: *mut *mut ID2D1HwndRenderTarget
,
945 fn CreateDxgiSurfaceRenderTarget(
946 dxgiSurface
: *mut IDXGISurface
,
947 renderTargetProperties
: *const D2D1_RENDER_TARGET_PROPERTIES
,
948 renderTarget
: *mut *mut ID2D1RenderTarget
,
950 fn CreateDCRenderTarget(
951 renderTargetProperties
: *const D2D1_RENDER_TARGET_PROPERTIES
,
952 dcRenderTarget
: *mut *mut ID2D1DCRenderTarget
,
956 pub fn D2D1CreateFactory(
957 factoryType
: D2D1_FACTORY_TYPE
,
959 pFactoryOptions
: *const D2D1_FACTORY_OPTIONS
,
960 ppIFactory
: *mut *mut c_void
,
962 pub fn D2D1MakeRotateMatrix(
964 center
: D2D1_POINT_2F
,
965 matrix
: *mut D2D1_MATRIX_3X2_F
,
967 pub fn D2D1MakeSkewMatrix(
970 center
: D2D1_POINT_2F
,
971 matrix
: *mut D2D1_MATRIX_3X2_F
,
973 pub fn D2D1IsMatrixInvertible(
974 matrix
: *const D2D1_MATRIX_3X2_F
,
976 pub fn D2D1InvertMatrix(
977 matrix
: *mut D2D1_MATRIX_3X2_F
,
979 pub fn D2D1ComputeMaximumScaleFactor(
980 matrix
: *const D2D1_MATRIX_3X2_F
,