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_1.h
8 use shared
::basetsd
::{UINT32, UINT64}
;
9 use shared
::dxgi
::{IDXGIDevice, IDXGISurface}
;
10 use shared
::dxgiformat
::DXGI_FORMAT
;
11 use shared
::guiddef
::{CLSID, REFCLSID}
;
12 use shared
::minwindef
::{BOOL, BYTE, DWORD, FLOAT}
;
14 D2D1_ANTIALIAS_MODE
, D2D1_BRUSH_PROPERTIES
, D2D1_CAP_STYLE
, D2D1_COLOR_F
,
15 D2D1_DASH_STYLE
, D2D1_DEBUG_LEVEL
, D2D1_EXTEND_MODE
, D2D1_GRADIENT_STOP
,
16 D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC
, D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC
,
17 D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC
,
18 D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR
,
19 D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR
,
20 D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR
, D2D1_LINE_JOIN
, D2D1_MATRIX_3X2_F
,
21 D2D1_POINT_2F
, D2D1_RECT_F
, D2D1_SIZE_U
, D2D1_TAG
, D2D1_TEXT_ANTIALIAS_MODE
, ID2D1Bitmap
,
22 ID2D1BitmapBrush
, ID2D1BitmapBrushVtbl
, ID2D1BitmapVtbl
, ID2D1Brush
, ID2D1BrushVtbl
,
23 ID2D1DrawingStateBlock
, ID2D1DrawingStateBlockVtbl
, ID2D1Factory
, ID2D1FactoryVtbl
,
24 ID2D1Geometry
, ID2D1GradientStopCollection
, ID2D1GradientStopCollectionVtbl
, ID2D1Image
,
25 ID2D1ImageVtbl
, ID2D1Layer
, ID2D1Mesh
, ID2D1PathGeometry
, ID2D1PathGeometryVtbl
,
26 ID2D1RenderTarget
, ID2D1RenderTargetVtbl
, ID2D1Resource
, ID2D1ResourceVtbl
, ID2D1StrokeStyle
,
29 use um
::d2d1effectauthor
::D2D1_PROPERTY_BINDING
;
30 use um
::d2dbasetypes
::D2D_SIZE_F
;
31 use um
::dcommon
::{D2D1_PIXEL_FORMAT, DWRITE_MEASURING_MODE}
;
32 use um
::documenttarget
::IPrintDocumentPackageTarget
;
33 use um
::dwrite
::{DWRITE_GLYPH_RUN, DWRITE_GLYPH_RUN_DESCRIPTION, IDWriteRenderingParams}
;
34 use um
::objidlbase
::IStream
;
35 use um
::unknwnbase
::{IUnknown, IUnknownVtbl}
;
36 use um
::wincodec
::{IWICBitmapSource, IWICColorContext, IWICImagingFactory}
;
37 use um
::winnt
::{HRESULT, PCWSTR, PWSTR}
;
38 FN
!{stdcall
PD2D1_EFFECT_FACTORY(
39 effectImpl
: *mut *mut IUnknown
,
41 pub use um
::d2dbasetypes
::D2D_RECT_L
as D2D1_RECT_L
;
42 pub use um
::d2dbasetypes
::D2D_POINT_2L
as D2D1_POINT_2L
;
43 ENUM
!{enum D2D1_PROPERTY_TYPE
{
44 D2D1_PROPERTY_TYPE_UNKNOWN
= 0,
45 D2D1_PROPERTY_TYPE_STRING
= 1,
46 D2D1_PROPERTY_TYPE_BOOL
= 2,
47 D2D1_PROPERTY_TYPE_UINT32
= 3,
48 D2D1_PROPERTY_TYPE_INT32
= 4,
49 D2D1_PROPERTY_TYPE_FLOAT
= 5,
50 D2D1_PROPERTY_TYPE_VECTOR2
= 6,
51 D2D1_PROPERTY_TYPE_VECTOR3
= 7,
52 D2D1_PROPERTY_TYPE_VECTOR4
= 8,
53 D2D1_PROPERTY_TYPE_BLOB
= 9,
54 D2D1_PROPERTY_TYPE_IUNKNOWN
= 10,
55 D2D1_PROPERTY_TYPE_ENUM
= 11,
56 D2D1_PROPERTY_TYPE_ARRAY
= 12,
57 D2D1_PROPERTY_TYPE_CLSID
= 13,
58 D2D1_PROPERTY_TYPE_MATRIX_3X2
= 14,
59 D2D1_PROPERTY_TYPE_MATRIX_4X3
= 15,
60 D2D1_PROPERTY_TYPE_MATRIX_4X4
= 16,
61 D2D1_PROPERTY_TYPE_MATRIX_5X4
= 17,
62 D2D1_PROPERTY_TYPE_COLOR_CONTEXT
= 18,
63 D2D1_PROPERTY_TYPE_FORCE_DWORD
= 0xffffffff,
65 ENUM
!{enum D2D1_PROPERTY
{
66 D2D1_PROPERTY_CLSID
= 0x80000000,
67 D2D1_PROPERTY_DISPLAYNAME
= 0x80000001,
68 D2D1_PROPERTY_AUTHOR
= 0x80000002,
69 D2D1_PROPERTY_CATEGORY
= 0x80000003,
70 D2D1_PROPERTY_DESCRIPTION
= 0x80000004,
71 D2D1_PROPERTY_INPUTS
= 0x80000005,
72 D2D1_PROPERTY_CACHED
= 0x80000006,
73 D2D1_PROPERTY_PRECISION
= 0x80000007,
74 D2D1_PROPERTY_MIN_INPUTS
= 0x80000008,
75 D2D1_PROPERTY_MAX_INPUTS
= 0x80000009,
76 D2D1_PROPERTY_FORCE_DWORD
= 0xffffffff,
78 ENUM
!{enum D2D1_SUBPROPERTY
{
79 D2D1_SUBPROPERTY_DISPLAYNAME
= 0x80000000,
80 D2D1_SUBPROPERTY_ISREADONLY
= 0x80000001,
81 D2D1_SUBPROPERTY_MIN
= 0x80000002,
82 D2D1_SUBPROPERTY_MAX
= 0x80000003,
83 D2D1_SUBPROPERTY_DEFAULT
= 0x80000004,
84 D2D1_SUBPROPERTY_FIELDS
= 0x80000005,
85 D2D1_SUBPROPERTY_INDEX
= 0x80000006,
86 D2D1_SUBPROPERTY_FORCE_DWORD
= 0xffffffff,
88 ENUM
!{enum D2D1_BITMAP_OPTIONS
{
89 D2D1_BITMAP_OPTIONS_NONE
= 0x00000000,
90 D2D1_BITMAP_OPTIONS_TARGET
= 0x00000001,
91 D2D1_BITMAP_OPTIONS_CANNOT_DRAW
= 0x00000002,
92 D2D1_BITMAP_OPTIONS_CPU_READ
= 0x00000004,
93 D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE
= 0x00000008,
94 D2D1_BITMAP_OPTIONS_FORCE_DWORD
= 0xffffffff,
96 // DEFINE_ENUM_FLAG_OPERATORS(D2D1_BITMAP_OPTIONS);
97 ENUM
!{enum D2D1_COMPOSITE_MODE
{
98 D2D1_COMPOSITE_MODE_SOURCE_OVER
= 0,
99 D2D1_COMPOSITE_MODE_DESTINATION_OVER
= 1,
100 D2D1_COMPOSITE_MODE_SOURCE_IN
= 2,
101 D2D1_COMPOSITE_MODE_DESTINATION_IN
= 3,
102 D2D1_COMPOSITE_MODE_SOURCE_OUT
= 4,
103 D2D1_COMPOSITE_MODE_DESTINATION_OUT
= 5,
104 D2D1_COMPOSITE_MODE_SOURCE_ATOP
= 6,
105 D2D1_COMPOSITE_MODE_DESTINATION_ATOP
= 7,
106 D2D1_COMPOSITE_MODE_XOR
= 8,
107 D2D1_COMPOSITE_MODE_PLUS
= 9,
108 D2D1_COMPOSITE_MODE_SOURCE_COPY
= 10,
109 D2D1_COMPOSITE_MODE_BOUNDED_SOURCE_COPY
= 11,
110 D2D1_COMPOSITE_MODE_MASK_INVERT
= 12,
111 D2D1_COMPOSITE_MODE_FORCE_DWORD
= 0xffffffff,
113 ENUM
!{enum D2D1_BUFFER_PRECISION
{
114 D2D1_BUFFER_PRECISION_UNKNOWN
= 0,
115 D2D1_BUFFER_PRECISION_8BPC_UNORM
= 1,
116 D2D1_BUFFER_PRECISION_8BPC_UNORM_SRGB
= 2,
117 D2D1_BUFFER_PRECISION_16BPC_UNORM
= 3,
118 D2D1_BUFFER_PRECISION_16BPC_FLOAT
= 4,
119 D2D1_BUFFER_PRECISION_32BPC_FLOAT
= 5,
120 D2D1_BUFFER_PRECISION_FORCE_DWORD
= 0xffffffff,
122 ENUM
!{enum D2D1_MAP_OPTIONS
{
123 D2D1_MAP_OPTIONS_NONE
= 0,
124 D2D1_MAP_OPTIONS_READ
= 1,
125 D2D1_MAP_OPTIONS_WRITE
= 2,
126 D2D1_MAP_OPTIONS_DISCARD
= 4,
127 D2D1_MAP_OPTIONS_FORCE_DWORD
= 0xffffffff,
129 //DEFINE_ENUM_FLAG_OPERATORS(D2D1_MAP_OPTIONS);
130 ENUM
!{enum D2D1_INTERPOLATION_MODE
{
131 D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR
= D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR
,
132 D2D1_INTERPOLATION_MODE_LINEAR
= D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR
,
133 D2D1_INTERPOLATION_MODE_CUBIC
= D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC
,
134 D2D1_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR
135 = D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR
,
136 D2D1_INTERPOLATION_MODE_ANISOTROPIC
= D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC
,
137 D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC
138 = D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC
,
139 D2D1_INTERPOLATION_MODE_FORCE_DWORD
= 0xffffffff,
141 ENUM
!{enum D2D1_UNIT_MODE
{
142 D2D1_UNIT_MODE_DIPS
= 0,
143 D2D1_UNIT_MODE_PIXELS
= 1,
144 D2D1_UNIT_MODE_FORCE_DWORD
= 0xffffffff,
146 ENUM
!{enum D2D1_COLOR_SPACE
{
147 D2D1_COLOR_SPACE_CUSTOM
= 0,
148 D2D1_COLOR_SPACE_SRGB
= 1,
149 D2D1_COLOR_SPACE_SCRGB
= 2,
150 D2D1_COLOR_SPACE_FORCE_DWORD
= 0xffffffff,
152 ENUM
!{enum D2D1_DEVICE_CONTEXT_OPTIONS
{
153 D2D1_DEVICE_CONTEXT_OPTIONS_NONE
= 0,
154 D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS
= 1,
155 D2D1_DEVICE_CONTEXT_OPTIONS_FORCE_DWORD
= 0xffffffff,
157 //DEFINE_ENUM_FLAG_OPERATORS(D2D1_DEVICE_CONTEXT_OPTIONS);
158 ENUM
!{enum D2D1_STROKE_TRANSFORM_TYPE
{
159 D2D1_STROKE_TRANSFORM_TYPE_NORMAL
= 0,
160 D2D1_STROKE_TRANSFORM_TYPE_FIXED
= 1,
161 D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE
= 2,
162 D2D1_STROKE_TRANSFORM_TYPE_FORCE_DWORD
= 0xffffffff,
164 ENUM
!{enum D2D1_PRIMITIVE_BLEND
{
165 D2D1_PRIMITIVE_BLEND_SOURCE_OVER
= 0,
166 D2D1_PRIMITIVE_BLEND_COPY
= 1,
167 D2D1_PRIMITIVE_BLEND_MIN
= 2,
168 D2D1_PRIMITIVE_BLEND_ADD
= 3,
169 D2D1_PRIMITIVE_BLEND_FORCE_DWORD
= 0xffffffff,
171 ENUM
!{enum D2D1_THREADING_MODE
{
172 D2D1_THREADING_MODE_SINGLE_THREADED
= super::d2d1
::D2D1_FACTORY_TYPE_SINGLE_THREADED
,
173 D2D1_THREADING_MODE_MULTI_THREADED
= super::d2d1
::D2D1_FACTORY_TYPE_MULTI_THREADED
,
174 D2D1_THREADING_MODE_FORCE_DWORD
= 0xffffffff,
176 ENUM
!{enum D2D1_COLOR_INTERPOLATION_MODE
{
177 D2D1_COLOR_INTERPOLATION_MODE_STRAIGHT
= 0,
178 D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED
= 1,
179 D2D1_COLOR_INTERPOLATION_MODE_FORCE_DWORD
= 0xffffffff,
181 pub use um
::d2dbasetypes
::D2D_VECTOR_2F
as D2D1_VECTOR_2F
;
182 pub use um
::d2dbasetypes
::D2D_VECTOR_3F
as D2D1_VECTOR_3F
;
183 pub use um
::d2dbasetypes
::D2D_VECTOR_4F
as D2D1_VECTOR_4F
;
184 STRUCT
!{struct D2D1_BITMAP_PROPERTIES1
{
185 pixelFormat
: D2D1_PIXEL_FORMAT
,
188 bitmapOptions
: D2D1_BITMAP_OPTIONS
,
189 colorContext
: *const ID2D1ColorContext
,
191 STRUCT
!{struct D2D1_MAPPED_RECT
{
195 STRUCT
!{struct D2D1_RENDERING_CONTROLS
{
196 bufferPrecision
: D2D1_BUFFER_PRECISION
,
197 tileSize
: D2D1_SIZE_U
,
199 STRUCT
!{struct D2D1_EFFECT_INPUT_DESCRIPTION
{
200 effect
: *const ID2D1Effect
,
202 inputRectangle
: D2D1_RECT_F
,
204 pub use um
::d2dbasetypes
::D2D_MATRIX_4X3_F
as D2D1_MATRIX_4X3_F
;
205 pub use um
::d2dbasetypes
::D2D_MATRIX_4X4_F
as D2D1_MATRIX_4X4_F
;
206 pub use um
::d2dbasetypes
::D2D_MATRIX_5X4_F
as D2D1_MATRIX_5X4_F
;
207 STRUCT
!{struct D2D1_POINT_DESCRIPTION
{
208 point
: D2D1_POINT_2F
,
209 unitTangentVector
: D2D1_POINT_2F
,
212 lengthToEndSegment
: FLOAT
,
214 STRUCT
!{struct D2D1_IMAGE_BRUSH_PROPERTIES
{
215 sourceRectangle
: D2D1_RECT_F
,
216 extendModeX
: D2D1_EXTEND_MODE
,
217 extendModeY
: D2D1_EXTEND_MODE
,
218 interpolationMode
: D2D1_INTERPOLATION_MODE
,
220 STRUCT
!{struct D2D1_BITMAP_BRUSH_PROPERTIES1
{
221 extendModeX
: D2D1_EXTEND_MODE
,
222 extendModeY
: D2D1_EXTEND_MODE
,
223 interpolationMode
: D2D1_INTERPOLATION_MODE
,
225 STRUCT
!{struct D2D1_STROKE_STYLE_PROPERTIES1
{
226 startCap
: D2D1_CAP_STYLE
,
227 endCap
: D2D1_CAP_STYLE
,
228 dashCap
: D2D1_CAP_STYLE
,
229 lineJoin
: D2D1_LINE_JOIN
,
231 dashStyle
: D2D1_DASH_STYLE
,
233 transformType
: D2D1_STROKE_TRANSFORM_TYPE
,
235 ENUM
!{enum D2D1_LAYER_OPTIONS1
{
236 D2D1_LAYER_OPTIONS1_NONE
= 0,
237 D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND
= 1,
238 D2D1_LAYER_OPTIONS1_IGNORE_ALPHA
= 2,
239 D2D1_LAYER_OPTIONS1_FORCE_DWORD
= 0xffffffff,
241 //DEFINE_ENUM_FLAG_OPERATORS(D2D1_LAYER_OPTIONS1);
242 STRUCT
!{struct D2D1_LAYER_PARAMETERS1
{
243 contentBounds
: D2D1_RECT_F
,
244 geometricMask
: *const ID2D1Geometry
,
245 maskAntialiasMode
: D2D1_ANTIALIAS_MODE
,
246 maskTransform
: D2D1_MATRIX_3X2_F
,
248 opacityBrush
: *const ID2D1Brush
,
249 layerOptions
: D2D1_LAYER_OPTIONS1
,
251 ENUM
!{enum D2D1_PRINT_FONT_SUBSET_MODE
{
252 D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT
= 0,
253 D2D1_PRINT_FONT_SUBSET_MODE_EACHPAGE
= 1,
254 D2D1_PRINT_FONT_SUBSET_MODE_NONE
= 2,
255 D2D1_PRINT_FONT_SUBSET_MODE_FORCE_DWORD
= 0xffffffff,
257 STRUCT
!{struct D2D1_DRAWING_STATE_DESCRIPTION1
{
258 antialiasMode
: D2D1_ANTIALIAS_MODE
,
259 textAntialiasMode
: D2D1_TEXT_ANTIALIAS_MODE
,
262 transform
: D2D1_MATRIX_3X2_F
,
263 primitiveBlend
: D2D1_PRIMITIVE_BLEND
,
264 unitMode
: D2D1_UNIT_MODE
,
266 STRUCT
!{struct D2D1_PRINT_CONTROL_PROPERTIES
{
267 fontSubset
: D2D1_PRINT_FONT_SUBSET_MODE
,
269 colorSpace
: D2D1_COLOR_SPACE
,
271 STRUCT
!{struct D2D1_CREATION_PROPERTIES
{
272 threadingMode
: D2D1_THREADING_MODE
,
273 debugLevel
: D2D1_DEBUG_LEVEL
,
274 options
: D2D1_DEVICE_CONTEXT_OPTIONS
,
276 RIDL
!{#[uuid(0x82237326, 0x8111, 0x4f7c, 0xbc, 0xf4, 0xb5, 0xc1, 0x17, 0x55, 0x64, 0xfe)]
277 interface
ID2D1GdiMetafileSink(ID2D1GdiMetafileSinkVtbl
): IUnknown(IUnknownVtbl
) {
280 recordData
: *const c_void
,
281 recordDataSize
: DWORD
,
284 RIDL
!{#[uuid(0x2f543dc3, 0xcfc1, 0x4211, 0x86, 0x4f, 0xcf, 0xd9, 0x1c, 0x6f, 0x33, 0x95)]
285 interface
ID2D1GdiMetafile(ID2D1GdiMetafileVtbl
): ID2D1Resource(ID2D1ResourceVtbl
) {
287 sink
: *const ID2D1GdiMetafileSink
,
290 bounds
: *mut D2D1_RECT_F
,
293 RIDL
!{#[uuid(0x54d7898a, 0xa061, 0x40a7, 0xbe, 0xc7, 0xe4, 0x65, 0xbc, 0xba, 0x2c, 0x4f)]
294 interface
ID2D1CommandSink(ID2D1CommandSinkVtbl
): IUnknown(IUnknownVtbl
) {
295 fn BeginDraw() -> HRESULT
,
296 fn EndDraw() -> HRESULT
,
298 antialiasMode
: D2D1_ANTIALIAS_MODE
,
304 fn SetTextAntialiasMode(
305 textAntialiasMode
: D2D1_TEXT_ANTIALIAS_MODE
,
307 fn SetTextRenderingParams(
308 textRenderingParams
: *const IDWriteRenderingParams
,
311 transform
: *const D2D1_MATRIX_3X2_F
,
313 fn SetPrimitiveBlend(
314 primitiveBlend
: D2D1_PRIMITIVE_BLEND
,
317 unitMode
: D2D1_UNIT_MODE
,
320 color
: *const D2D1_COLOR_F
,
323 baselineOrigin
: D2D1_POINT_2F
,
324 glyphRun
: *const DWRITE_GLYPH_RUN
,
325 glyphRunDescription
: *const DWRITE_GLYPH_RUN_DESCRIPTION
,
326 foregroundBrush
: *const ID2D1Brush
,
327 measuringMode
: DWRITE_MEASURING_MODE
,
330 point0
: D2D1_POINT_2F
,
331 point1
: D2D1_POINT_2F
,
332 brush
: *const ID2D1Brush
,
334 strokeStyle
: *const ID2D1StrokeStyle
,
337 geometry
: *const ID2D1Geometry
,
338 brush
: *const ID2D1Brush
,
340 strokeStyle
: *const ID2D1StrokeStyle
,
343 rect
: *const D2D1_RECT_F
,
344 brush
: *const ID2D1Brush
,
346 strokeStyle
: *const ID2D1StrokeStyle
,
349 bitmap
: *const ID2D1Bitmap
,
350 destinationRectangle
: *const D2D1_RECT_F
,
352 interpolationMode
: D2D1_INTERPOLATION_MODE
,
353 sourceRectangle
: *const D2D1_RECT_F
,
354 perspectiveTransform
: *const D2D1_MATRIX_4X4_F
,
357 image
: *const ID2D1Image
,
358 targetOffset
: *const D2D1_POINT_2F
,
359 imageRectangle
: *const D2D1_RECT_F
,
360 interpolationMode
: D2D1_INTERPOLATION_MODE
,
361 compositeMode
: D2D1_COMPOSITE_MODE
,
364 gdiMetafile
: *const ID2D1GdiMetafile
,
365 targetOffset
: *const D2D1_POINT_2F
,
368 mesh
: *const ID2D1Mesh
,
369 brush
: *const ID2D1Brush
,
372 opacityMask
: *const ID2D1Bitmap
,
373 brush
: *const ID2D1Brush
,
374 destinationRectangle
: *const D2D1_RECT_F
,
375 sourceRectangle
: *const D2D1_RECT_F
,
378 geometry
: *const ID2D1Geometry
,
379 brush
: *const ID2D1Brush
,
380 opacityBrush
: *const ID2D1Brush
,
383 rect
: *const D2D1_RECT_F
,
384 brush
: *const ID2D1Brush
,
386 fn PushAxisAlignedClip(
387 clipRect
: *const D2D1_RECT_F
,
388 antialiasMode
: D2D1_ANTIALIAS_MODE
,
391 layerParameters1
: *const D2D1_LAYER_PARAMETERS1
,
392 layer
: *const ID2D1Layer
,
394 fn PopAxisAlignedClip() -> HRESULT
,
395 fn PopLayer() -> HRESULT
,
397 RIDL
!{#[uuid(0xb4f34a19, 0x2383, 0x4d76, 0x94, 0xf6, 0xec, 0x34, 0x36, 0x57, 0xc3, 0xdc)]
398 interface
ID2D1CommandList(ID2D1CommandListVtbl
): ID2D1Image(ID2D1ImageVtbl
) {
400 sink
: *const ID2D1CommandSink
,
402 fn Close() -> HRESULT
,
404 RIDL
!{#[uuid(0x2c1d867d, 0xc290, 0x41c8, 0xae, 0x7e, 0x34, 0xa9, 0x87, 0x02, 0xe9, 0xa5)]
405 interface
ID2D1PrintControl(ID2D1PrintControlVtbl
): IUnknown(IUnknownVtbl
) {
407 commandList
: *const ID2D1CommandList
,
408 pageSize
: D2D_SIZE_F
,
409 pagePrintTicketStream
: *const IStream
,
413 fn Close() -> HRESULT
,
415 RIDL
!{#[uuid(0xfe9e984d, 0x3f95, 0x407c, 0xb5, 0xdb, 0xcb, 0x94, 0xd4, 0xe8, 0xf8, 0x7c)]
416 interface
ID2D1ImageBrush(ID2D1ImageBrushVtbl
): ID2D1Brush(ID2D1BrushVtbl
) {
418 image
: *const ID2D1Image
,
421 extendModeX
: D2D1_EXTEND_MODE
,
424 extendModeY
: D2D1_EXTEND_MODE
,
426 fn SetInterpolationMode(
427 interpolationMode
: D2D1_INTERPOLATION_MODE
,
429 fn SetSourceRectangle(
430 sourceRectangle
: *const D2D1_RECT_F
,
433 image
: *mut *mut ID2D1Image
,
435 fn GetExtendModeX() -> D2D1_EXTEND_MODE
,
436 fn GetExtendModeY() -> D2D1_EXTEND_MODE
,
437 fn GetInterpolationMode() -> D2D1_INTERPOLATION_MODE
,
438 fn GetSourceRectangle(
439 sourceRectangle
: *mut D2D1_RECT_F
,
442 RIDL
!{#[uuid(0x41343a53, 0xe41a, 0x49a2, 0x91, 0xcd, 0x21, 0x79, 0x3b, 0xbb, 0x62, 0xe5)]
443 interface
ID2D1BitmapBrush1(ID2D1BitmapBrush1Vtbl
): ID2D1BitmapBrush(ID2D1BitmapBrushVtbl
) {
444 fn SetInterpolationMode1(
445 interpolationMode
: D2D1_INTERPOLATION_MODE
,
447 fn GetInterpolationMode1() -> D2D1_INTERPOLATION_MODE
,
449 RIDL
!{#[uuid(0x10a72a66, 0xe91c, 0x43f4, 0x99, 0x3f, 0xdd, 0xf4, 0xb8, 0x2b, 0x0b, 0x4a)]
450 interface
ID2D1StrokeStyle1(ID2D1StrokeStyle1Vtbl
): ID2D1StrokeStyle(ID2D1StrokeStyleVtbl
) {
451 fn GetStrokeTransformType() -> D2D1_STROKE_TRANSFORM_TYPE
,
453 RIDL
!{#[uuid(0x62baa2d2, 0xab54, 0x41b7, 0xb8, 0x72, 0x78, 0x7e, 0x01, 0x06, 0xa4, 0x21)]
454 interface
ID2D1PathGeometry1(ID2D1PathGeometry1Vtbl
): ID2D1PathGeometry(ID2D1PathGeometryVtbl
) {
455 fn ComputePointAndSegmentAtLength(
457 startSegment
: UINT32
,
458 worldTransform
: *const D2D1_MATRIX_3X2_F
,
459 flatteningTolerance
: FLOAT
,
460 pointDescription
: *mut D2D1_POINT_DESCRIPTION
,
463 RIDL
!{#[uuid(0x483473d7, 0xcd46, 0x4f9d, 0x9d, 0x3a, 0x31, 0x12, 0xaa, 0x80, 0x15, 0x9d)]
464 interface
ID2D1Properties(ID2D1PropertiesVtbl
): IUnknown(IUnknownVtbl
) {
465 fn GetPropertyCount() -> UINT32
,
471 fn GetPropertyNameLength(
476 ) -> D2D1_PROPERTY_TYPE
,
482 prop_type
: D2D1_PROPERTY_TYPE
,
488 prop_type
: D2D1_PROPERTY_TYPE
,
494 prop_type
: D2D1_PROPERTY_TYPE
,
500 prop_type
: D2D1_PROPERTY_TYPE
,
509 subProperties
: *mut *mut ID2D1Properties
,
512 RIDL
!{#[uuid(0x28211a43, 0x7d89, 0x476f, 0x81, 0x81, 0x2d, 0x61, 0x59, 0xb2, 0x20, 0xad)]
513 interface
ID2D1Effect(ID2D1EffectVtbl
): ID2D1Properties(ID2D1PropertiesVtbl
) {
516 input
: *const ID2D1Image
,
524 input
: *mut *mut ID2D1Image
,
526 fn GetInputCount() -> UINT32
,
528 outputImage
: *mut *mut ID2D1Image
,
531 RIDL
!{#[uuid(0xa898a84c, 0x3873, 0x4588, 0xb0, 0x8b, 0xeb, 0xbf, 0x97, 0x8d, 0xf0, 0x41)]
532 interface
ID2D1Bitmap1(ID2D1Bitmap1Vtbl
): ID2D1Bitmap(ID2D1BitmapVtbl
) {
534 colorContext
: *mut *mut ID2D1ColorContext
,
536 fn GetOptions() -> D2D1_BITMAP_OPTIONS
,
538 dxgiSurface
: *mut *mut IDXGISurface
,
541 options
: D2D1_MAP_OPTIONS
,
542 mappedRect
: *mut D2D1_MAPPED_RECT
,
544 fn Unmap() -> HRESULT
,
546 RIDL
!{#[uuid(0x1c4820bb, 0x5771, 0x4518, 0xa5, 0x81, 0x2f, 0xe4, 0xdd, 0x0e, 0xc6, 0x57)]
547 interface
ID2D1ColorContext(ID2D1ColorContextVtbl
): ID2D1Resource(ID2D1ResourceVtbl
) {
548 fn GetColorSpace() -> D2D1_COLOR_SPACE
,
549 fn GetProfileSize() -> UINT32
,
555 RIDL
!{#[uuid(0xae1572f4, 0x5dd0, 0x4777, 0x99, 0x8b, 0x92, 0x79, 0x47, 0x2a, 0xe6, 0x3b)]
556 interface
ID2D1GradientStopCollection1(ID2D1GradientStopCollection1Vtbl
):
557 ID2D1GradientStopCollection(ID2D1GradientStopCollectionVtbl
) {
558 fn GetGradientStops1(
559 gradientStops
: *mut D2D1_GRADIENT_STOP
,
560 gradientStopsCount
: UINT32
,
562 fn GetPreInterpolationSpace() -> D2D1_COLOR_SPACE
,
563 fn GetPostInterpolationSpace() -> D2D1_COLOR_SPACE
,
564 fn GetBufferPrecision() -> D2D1_BUFFER_PRECISION
,
565 fn GetColorInterpolationMode() -> D2D1_COLOR_INTERPOLATION_MODE
,
567 RIDL
!{#[uuid(0x689f1f85, 0xc72e, 0x4e33, 0x8f, 0x19, 0x85, 0x75, 0x4e, 0xfd, 0x5a, 0xce)]
568 interface
ID2D1DrawingStateBlock1(ID2D1DrawingStateBlock1Vtbl
):
569 ID2D1DrawingStateBlock(ID2D1DrawingStateBlockVtbl
) {
571 stateDescription
: *mut D2D1_DRAWING_STATE_DESCRIPTION1
,
574 stateDescription
: *const D2D1_DRAWING_STATE_DESCRIPTION1
,
577 RIDL
!{#[uuid(0xe8f7fe7a, 0x191c, 0x466d, 0xad, 0x95, 0x97, 0x56, 0x78, 0xbd, 0xa9, 0x98)]
578 interface
ID2D1DeviceContext(ID2D1DeviceContextVtbl
): ID2D1RenderTarget(ID2D1RenderTargetVtbl
) {
581 sourceData
: *const c_void
,
583 bitmapProperties
: *const D2D1_BITMAP_PROPERTIES1
,
584 bitmap
: *mut *mut ID2D1Bitmap1
,
586 fn CreateBitmapFromWicBitmap(
587 wicBitmapSource
: *const IWICBitmapSource
,
588 bitmapProperties
: *const D2D1_BITMAP_PROPERTIES1
,
589 bitmap
: *mut *mut ID2D1Bitmap1
,
591 fn CreateColorContext(
592 space
: D2D1_COLOR_SPACE
,
593 profile
: *const BYTE
,
595 colorContext
: *mut *mut ID2D1ColorContext
,
597 fn CreateColorContextFromFilename(
599 colorContext
: *mut *mut ID2D1ColorContext
,
601 fn CreateColorContextFromWicColorContext(
602 wicColorContext
: *const IWICColorContext
,
603 colorContext
: *mut *mut ID2D1ColorContext
,
605 fn CreateBitmapFromDxgiSurface(
606 surface
: *const IDXGISurface
,
607 bitmapProperties
: *const D2D1_BITMAP_PROPERTIES1
,
608 bitmap
: *mut *mut ID2D1Bitmap1
,
612 effect
: *mut *mut ID2D1Effect
,
614 fn CreateGradientStopCollection(
615 straightAlphaGradientStops
: *const D2D1_GRADIENT_STOP
,
616 straightAlphaGradientStopsCount
: UINT32
,
617 preInterpolationSpace
: D2D1_COLOR_SPACE
,
618 postInterpolationSpace
: D2D1_COLOR_SPACE
,
619 bufferPrecision
: D2D1_BUFFER_PRECISION
,
620 extendMode
: D2D1_EXTEND_MODE
,
621 colorInterpolationMode
: D2D1_COLOR_INTERPOLATION_MODE
,
622 gradientStopCollection1
: *mut *mut ID2D1GradientStopCollection1
,
625 image
: *const ID2D1Image
,
626 imageBrushProperties
: *const D2D1_IMAGE_BRUSH_PROPERTIES
,
627 brushProperties
: *const D2D1_BRUSH_PROPERTIES
,
628 imageBrush
: *mut *mut ID2D1ImageBrush
,
630 fn CreateBitmapBrush(
631 bitmap
: *const ID2D1Bitmap
,
632 bitmapBrushProperties
: *const D2D1_BITMAP_BRUSH_PROPERTIES1
,
633 brushProperties
: *const D2D1_BRUSH_PROPERTIES
,
634 bitmapBrush
: *mut *mut ID2D1BitmapBrush1
,
636 fn CreateCommandList(
637 commandList
: *mut *mut ID2D1CommandList
,
639 fn IsDxgiFormatSupported(
642 fn IsBufferPrecisionSupported(
643 bufferPrecision
: D2D1_BUFFER_PRECISION
,
645 fn GetImageLocalBounds(
646 image
: *const ID2D1Image
,
647 localBounds
: *mut D2D1_RECT_F
,
649 fn GetImageWorldBounds(
650 image
: *const ID2D1Image
,
651 worldBounds
: *mut D2D1_RECT_F
,
653 fn GetGlyphRunWorldBounds(
654 baselineOrigin
: D2D1_POINT_2F
,
655 glyphRun
: *const DWRITE_GLYPH_RUN
,
656 measuringMode
: DWRITE_MEASURING_MODE
,
657 bounds
: *mut D2D1_RECT_F
,
660 device
: *mut *mut ID2D1Device
,
663 image
: *const ID2D1Image
,
666 image
: *mut *mut ID2D1Image
,
668 fn SetRenderingControls(
669 renderingControls
: *const D2D1_RENDERING_CONTROLS
,
671 fn GetRenderingControls(
672 renderingControls
: *mut D2D1_RENDERING_CONTROLS
,
674 fn SetPrimitiveBlend(
675 primitiveBlend
: D2D1_PRIMITIVE_BLEND
,
677 fn GetPrimitiveBlend() -> D2D1_PRIMITIVE_BLEND
,
679 unitMode
: D2D1_UNIT_MODE
,
681 fn GetUnitMode() -> D2D1_UNIT_MODE
,
683 baselineOrigin
: D2D1_POINT_2F
,
684 glyphRun
: *const DWRITE_GLYPH_RUN
,
685 glyphRunDescription
: *const DWRITE_GLYPH_RUN_DESCRIPTION
,
686 foregroundBrush
: *const ID2D1Brush
,
687 measuringMode
: DWRITE_MEASURING_MODE
,
690 image
: *const ID2D1Image
,
691 targetOffset
: *const D2D1_POINT_2F
,
692 imageRectangle
: *const D2D1_RECT_F
,
693 interpolationMode
: D2D1_INTERPOLATION_MODE
,
694 compositeMode
: D2D1_COMPOSITE_MODE
,
697 gdiMetafile
: *const ID2D1GdiMetafile
,
698 targetOffset
: *const D2D1_POINT_2F
,
701 bitmap
: *const ID2D1Bitmap
,
702 destinationRectangle
: *const D2D1_RECT_F
,
704 interpolationMode
: D2D1_INTERPOLATION_MODE
,
705 sourceRectangle
: *const D2D1_RECT_F
,
706 perspectiveTransform
: *const D2D1_MATRIX_4X4_F
,
709 layerParameters
: *const D2D1_LAYER_PARAMETERS1
,
710 layer
: *const ID2D1Layer
,
712 fn InvalidateEffectInputRectangle(
713 effect
: *const ID2D1Effect
,
715 inputRectangle
: *const D2D1_RECT_F
,
717 fn GetEffectInvalidRectangleCount(
718 effect
: *const ID2D1Effect
,
719 rectangleCount
: *mut UINT32
,
721 fn GetEffectInvalidRectangles(
722 effect
: *const ID2D1Effect
,
723 rectangles
: *mut D2D1_RECT_F
,
724 rectanglesCount
: UINT32
,
726 fn GetEffectRequiredInputRectangles(
727 renderEffect
: *const ID2D1Effect
,
728 renderImageRectangle
: *const D2D1_RECT_F
,
729 inputDescriptions
: *const D2D1_EFFECT_INPUT_DESCRIPTION
,
730 requiredInputRects
: *mut D2D1_RECT_F
,
734 opacityMask
: *const ID2D1Bitmap
,
735 brush
: *const ID2D1Brush
,
736 destinationRectangle
: *const D2D1_RECT_F
,
737 sourceRectangle
: *const D2D1_RECT_F
,
740 RIDL
!{#[uuid(0x47dd575d, 0xac05, 0x4cdd, 0x80, 0x49, 0x9b, 0x02, 0xcd, 0x16, 0xf4, 0x4c)]
741 interface
ID2D1Device(ID2D1DeviceVtbl
): ID2D1Resource(ID2D1ResourceVtbl
) {
742 fn CreateDeviceContext(
743 options
: D2D1_DEVICE_CONTEXT_OPTIONS
,
744 deviceContext
: *mut *mut ID2D1DeviceContext
,
746 fn CreatePrintControl(
747 wicFactory
: *const IWICImagingFactory
,
748 documentTarget
: *const IPrintDocumentPackageTarget
,
749 printControlProperties
: *const D2D1_PRINT_CONTROL_PROPERTIES
,
750 printControl
: *mut *mut ID2D1PrintControl
,
752 fn SetMaximumTextureMemory(
753 maximumInBytes
: UINT64
,
755 fn GetMaximumTextureMemory() -> UINT64
,
757 millisecondsSinceUse
: UINT32
,
760 RIDL
!{#[uuid(0xbb12d362, 0xdaee, 0x4b9a, 0xaa, 0x1d, 0x14, 0xba, 0x40, 0x1c, 0xfa, 0x1f)]
761 interface
ID2D1Factory1(ID2D1Factory1Vtbl
): ID2D1Factory(ID2D1FactoryVtbl
) {
763 dxgiDevice
: *const IDXGIDevice
,
764 d2dDevice
: *mut *mut ID2D1Device
,
766 fn CreateStrokeStyle(
767 strokeStyleProperties
: *const D2D1_STROKE_STYLE_PROPERTIES1
,
768 dashes
: *const FLOAT
,
770 strokeStyle
: *mut *mut ID2D1StrokeStyle1
,
772 fn CreatePathGeometry(
773 pathGeometry
: *mut *mut ID2D1PathGeometry1
,
775 fn CreateDrawingStateBlock(
776 drawingStateDescription
: *const D2D1_DRAWING_STATE_DESCRIPTION1
,
777 textRenderingParams
: *const IDWriteRenderingParams
,
778 drawingStateBlock
: *mut *mut ID2D1DrawingStateBlock1
,
780 fn CreateGdiMetafile(
781 metafileStream
: *const IStream
,
782 metafile
: *mut *mut ID2D1GdiMetafile
,
784 fn RegisterEffectFromStream(
786 propertyXml
: *const IStream
,
787 bindings
: *const D2D1_PROPERTY_BINDING
,
788 bindingsCount
: UINT32
,
789 effectFactory
: PD2D1_EFFECT_FACTORY
,
791 fn RegisterEffectFromString(
794 bindings
: *const D2D1_PROPERTY_BINDING
,
795 bindingsCount
: UINT32
,
796 effectFactory
: PD2D1_EFFECT_FACTORY
,
801 fn GetRegisteredEffects(
803 effectsCount
: UINT32
,
804 effectsReturned
: *mut UINT32
,
805 effectsRegistered
: *mut UINT32
,
807 fn GetEffectProperties(
809 properties
: *mut *mut ID2D1Properties
,
812 RIDL
!{#[uuid(0x31e6e7bc, 0xe0ff, 0x4d46, 0x8c, 0x64, 0xa0, 0xa8, 0xc4, 0x1c, 0x15, 0xd3)]
813 interface
ID2D1Multithread(ID2D1MultithreadVtbl
): IUnknown(IUnknownVtbl
) {
814 fn GetMultithreadProtected() -> BOOL
,
819 pub fn D2D1CreateDevice(
820 dxgiDevice
: *const IDXGIDevice
,
821 creationProperties
: *const D2D1_CREATION_PROPERTIES
,
822 d2dDevice
: *mut *mut ID2D1Device
,
824 pub fn D2D1CreateDeviceContext(
825 dxgiSurface
: *const IDXGISurface
,
826 creationProperties
: *const D2D1_CREATION_PROPERTIES
,
827 d2dDeviceContext
: *mut *mut ID2D1DeviceContext
,
829 pub fn D2D1ConvertColorSpace(
830 sourceColorSpace
: D2D1_COLOR_SPACE
,
831 destinationColorSpace
: D2D1_COLOR_SPACE
,
832 color
: *const D2D1_COLOR_F
,
842 pub fn D2D1Vec3Length(