dxgi/tests: Add test for swapchain window messages.
[wine.git] / include / d2d1_1.idl
blobc6cd9c7398ea3feef36878c3377efe4f8e6d0c13
1 /*
2 * Copyright 2017 Lucian Poston
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 import "d2d1.idl";
21 interface ID2D1DeviceContext;
22 interface ID2D1StrokeStyle1;
23 interface ID2D1PathGeometry1;
24 interface ID2D1GdiMetafile;
25 interface ID2D1Properties;
26 interface IPrintDocumentPackageTarget;
27 interface ID2D1PrintControl;
28 interface IWICImagingFactory;
29 interface IWICColorContext;
30 interface ID2D1ColorContext;
31 interface ID2D1Effect;
32 interface ID2D1GradientStopCollection1;
33 interface ID2D1ImageBrush;
34 interface ID2D1BitmapBrush1;
35 interface ID2D1CommandList;
37 cpp_quote("#ifndef __dwrite_h__")
38 /* already defined in dwrite.h but needed for WIDL */
39 typedef struct DWRITE_GLYPH_RUN_DESCRIPTION DWRITE_GLYPH_RUN_DESCRIPTION;
40 cpp_quote("#endif /* __dwrite_h__ */")
42 typedef enum D2D1_DEVICE_CONTEXT_OPTIONS
44 D2D1_DEVICE_CONTEXT_OPTIONS_NONE = 0x0,
45 D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS = 0x1,
46 D2D1_DEVICE_CONTEXT_OPTIONS_FORCE_DWORD = 0xffffffff,
47 } D2D1_DEVICE_CONTEXT_OPTIONS;
49 typedef enum D2D1_STROKE_TRANSFORM_TYPE
51 D2D1_STROKE_TRANSFORM_TYPE_NORMAL = 0x0,
52 D2D1_STROKE_TRANSFORM_TYPE_FIXED = 0x1,
53 D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE = 0x2,
54 D2D1_STROKE_TRANSFORM_TYPE_FORCE_DWORD = 0xffffffff,
55 } D2D1_STROKE_TRANSFORM_TYPE;
57 typedef enum D2D1_PRIMITIVE_BLEND
59 D2D1_PRIMITIVE_BLEND_SOURCE_OVER = 0x0,
60 D2D1_PRIMITIVE_BLEND_COPY = 0x1,
61 D2D1_PRIMITIVE_BLEND_MIN = 0x2,
62 D2D1_PRIMITIVE_BLEND_ADD = 0x3,
63 D2D1_PRIMITIVE_BLEND_MAX = 0x4,
64 D2D1_PRIMITIVE_BLEND_FORCE_DWORD = 0xffffffff,
65 } D2D1_PRIMITIVE_BLEND;
67 typedef enum D2D1_UNIT_MODE
69 D2D1_UNIT_MODE_DIPS = 0x0,
70 D2D1_UNIT_MODE_PIXELS = 0x1,
71 D2D1_UNIT_MODE_FORCE_DWORD = 0xffffffff,
72 } D2D1_UNIT_MODE;
74 typedef enum D2D1_PRINT_FONT_SUBSET_MODE
76 D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT = 0x0,
77 D2D1_PRINT_FONT_SUBSET_MODE_EACHPAGE = 0x1,
78 D2D1_PRINT_FONT_SUBSET_MODE_NONE = 0x2,
79 D2D1_PRINT_FONT_SUBSET_MODE_FORCE_DWORD = 0xffffffff,
80 } D2D1_PRINT_FONT_SUBSET_MODE;
82 typedef enum D2D1_COLOR_SPACE
84 D2D1_COLOR_SPACE_CUSTOM = 0x0,
85 D2D1_COLOR_SPACE_SRGB = 0x1,
86 D2D1_COLOR_SPACE_SCRGB = 0x2,
87 D2D1_COLOR_SPACE_FORCE_DWORD = 0xffffffff,
88 } D2D1_COLOR_SPACE;
90 typedef enum D2D1_BITMAP_OPTIONS
92 D2D1_BITMAP_OPTIONS_NONE = 0x0,
93 D2D1_BITMAP_OPTIONS_TARGET = 0x1,
94 D2D1_BITMAP_OPTIONS_CANNOT_DRAW = 0x2,
95 D2D1_BITMAP_OPTIONS_CPU_READ = 0x4,
96 D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE = 0x8,
97 D2D1_BITMAP_OPTIONS_FORCE_DWORD = 0xffffffff,
98 } D2D1_BITMAP_OPTIONS;
100 typedef enum D2D1_MAP_OPTIONS
102 D2D1_MAP_OPTIONS_NONE = 0x0,
103 D2D1_MAP_OPTIONS_READ = 0x1,
104 D2D1_MAP_OPTIONS_WRITE = 0x2,
105 D2D1_MAP_OPTIONS_DISCARD = 0x4,
106 D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff,
107 } D2D1_MAP_OPTIONS;
109 typedef enum D2D1_BUFFER_PRECISION
111 D2D1_BUFFER_PRECISION_UNKNOWN = 0x0,
112 D2D1_BUFFER_PRECISION_8BPC_UNORM = 0x1,
113 D2D1_BUFFER_PRECISION_8BPC_UNORM_SRGB = 0x2,
114 D2D1_BUFFER_PRECISION_16BPC_UNORM = 0x3,
115 D2D1_BUFFER_PRECISION_16BPC_FLOAT = 0x4,
116 D2D1_BUFFER_PRECISION_32BPC_FLOAT = 0x5,
117 D2D1_BUFFER_PRECISION_FORCE_DWORD = 0xffffffff,
118 } D2D1_BUFFER_PRECISION;
120 typedef enum D2D1_COLOR_INTERPOLATION_MODE
122 D2D1_COLOR_INTERPOLATION_MODE_STRAIGHT = 0x0,
123 D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED = 0x1,
124 D2D1_COLOR_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
125 } D2D1_COLOR_INTERPOLATION_MODE;
127 typedef enum D2D1_INTERPOLATION_MODE
129 D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR,
130 D2D1_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
131 D2D1_INTERPOLATION_MODE_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC,
132 D2D1_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR,
133 D2D1_INTERPOLATION_MODE_ANISOTROPIC = D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC,
134 D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC,
135 D2D1_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
136 } D2D1_INTERPOLATION_MODE;
138 typedef enum D2D1_COMPOSITE_MODE
140 D2D1_COMPOSITE_MODE_SOURCE_OVER = 0x0,
141 D2D1_COMPOSITE_MODE_DESTINATION_OVER = 0x1,
142 D2D1_COMPOSITE_MODE_SOURCE_IN = 0x2,
143 D2D1_COMPOSITE_MODE_DESTINATION_IN = 0x3,
144 D2D1_COMPOSITE_MODE_SOURCE_OUT = 0x4,
145 D2D1_COMPOSITE_MODE_DESTINATION_OUT = 0x5,
146 D2D1_COMPOSITE_MODE_SOURCE_ATOP = 0x6,
147 D2D1_COMPOSITE_MODE_DESTINATION_ATOP = 0x7,
148 D2D1_COMPOSITE_MODE_XOR = 0x8,
149 D2D1_COMPOSITE_MODE_PLUS = 0x9,
150 D2D1_COMPOSITE_MODE_SOURCE_COPY = 0xa,
151 D2D1_COMPOSITE_MODE_BOUNDED_SOURCE_COPY = 0xb,
152 D2D1_COMPOSITE_MODE_MASK_INVERT = 0xc,
153 D2D1_COMPOSITE_MODE_FORCE_DWORD = 0xffffffff,
154 } D2D1_COMPOSITE_MODE;
156 typedef enum D2D1_LAYER_OPTIONS1
158 D2D1_LAYER_OPTIONS1_NONE = 0x0,
159 D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND = 0x1,
160 D2D1_LAYER_OPTIONS1_IGNORE_ALPHA = 0x2,
161 D2D1_LAYER_OPTIONS1_FORCE_DWORD = 0xffffffff,
162 } D2D1_LAYER_OPTIONS1;
164 typedef struct D2D1_PROPERTY_BINDING D2D1_PROPERTY_BINDING;
165 typedef D2D_MATRIX_4X4_F D2D1_MATRIX_4X4_F;
167 typedef enum D2D1_PROPERTY_TYPE
169 D2D1_PROPERTY_TYPE_UNKNOWN = 0x0,
170 D2D1_PROPERTY_TYPE_STRING = 0x1,
171 D2D1_PROPERTY_TYPE_BOOL = 0x2,
172 D2D1_PROPERTY_TYPE_UINT32 = 0x3,
173 D2D1_PROPERTY_TYPE_INT32 = 0x4,
174 D2D1_PROPERTY_TYPE_FLOAT = 0x5,
175 D2D1_PROPERTY_TYPE_VECTOR2 = 0x6,
176 D2D1_PROPERTY_TYPE_VECTOR3 = 0x7,
177 D2D1_PROPERTY_TYPE_VECTOR4 = 0x8,
178 D2D1_PROPERTY_TYPE_BLOB = 0x9,
179 D2D1_PROPERTY_TYPE_IUNKNOWN = 0xa,
180 D2D1_PROPERTY_TYPE_ENUM = 0xb,
181 D2D1_PROPERTY_TYPE_ARRAY = 0xc,
182 D2D1_PROPERTY_TYPE_CLSID = 0xd,
183 D2D1_PROPERTY_TYPE_MATRIX_3X2 = 0xe,
184 D2D1_PROPERTY_TYPE_MATRIX_4X3 = 0xf,
185 D2D1_PROPERTY_TYPE_MATRIX_4X4 = 0x10,
186 D2D1_PROPERTY_TYPE_MATRIX_5X4 = 0x11,
187 D2D1_PROPERTY_TYPE_COLOR_CONTEXT = 0x12,
188 D2D1_PROPERTY_TYPE_FORCE_DWORD = 0xffffffff,
189 } D2D1_PROPERTY_TYPE;
191 typedef struct D2D1_STROKE_STYLE_PROPERTIES1
193 D2D1_CAP_STYLE startCap;
194 D2D1_CAP_STYLE endCap;
195 D2D1_CAP_STYLE dashCap;
196 D2D1_LINE_JOIN lineJoin;
197 float miterLimit;
198 D2D1_DASH_STYLE dashStyle;
199 float dashOffset;
200 D2D1_STROKE_TRANSFORM_TYPE transformType;
201 } D2D1_STROKE_STYLE_PROPERTIES1;
203 typedef struct D2D1_DRAWING_STATE_DESCRIPTION1
205 D2D1_ANTIALIAS_MODE antialiasMode;
206 D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
207 D2D1_TAG tag1;
208 D2D1_TAG tag2;
209 D2D1_MATRIX_3X2_F transform;
210 D2D1_PRIMITIVE_BLEND primitiveBlend;
211 D2D1_UNIT_MODE unitMode;
212 } D2D1_DRAWING_STATE_DESCRIPTION1;
214 typedef struct D2D1_PRINT_CONTROL_PROPERTIES
216 D2D1_PRINT_FONT_SUBSET_MODE fontSubset;
217 float rasterDPI;
218 D2D1_COLOR_SPACE colorSpace;
219 } D2D1_PRINT_CONTROL_PROPERTIES;
221 typedef struct D2D1_MAPPED_RECT
223 UINT32 pitch;
224 BYTE *bits;
225 } D2D1_MAPPED_RECT;
227 typedef struct D2D1_BITMAP_PROPERTIES1
229 D2D1_PIXEL_FORMAT pixelFormat;
230 float dpiX;
231 float dpiY;
232 D2D1_BITMAP_OPTIONS bitmapOptions;
233 ID2D1ColorContext *colorContext;
234 } D2D1_BITMAP_PROPERTIES1;
236 typedef struct D2D1_IMAGE_BRUSH_PROPERTIES
238 D2D1_RECT_F sourceRectangle;
239 D2D1_EXTEND_MODE extendModeX;
240 D2D1_EXTEND_MODE extendModeY;
241 D2D1_INTERPOLATION_MODE interpolationMode;
242 } D2D1_IMAGE_BRUSH_PROPERTIES;
244 typedef struct D2D1_BITMAP_BRUSH_PROPERTIES1
246 D2D1_EXTEND_MODE extendModeX;
247 D2D1_EXTEND_MODE extendModeY;
248 D2D1_INTERPOLATION_MODE interpolationMode;
249 } D2D1_BITMAP_BRUSH_PROPERTIES1;
251 typedef struct D2D1_RENDERING_CONTROLS
253 D2D1_BUFFER_PRECISION bufferPrecision;
254 D2D1_SIZE_U tileSize;
255 } D2D1_RENDERING_CONTROLS;
257 typedef struct D2D1_LAYER_PARAMETERS1
259 D2D1_RECT_F contentBounds;
260 ID2D1Geometry *geometricMask;
261 D2D1_ANTIALIAS_MODE maskAntialiasMode;
262 D2D1_MATRIX_3X2_F maskTransform;
263 float opacity;
264 ID2D1Brush *opacityBrush;
265 D2D1_LAYER_OPTIONS1 layerOptions;
266 } D2D1_LAYER_PARAMETERS1;
268 typedef struct D2D1_EFFECT_INPUT_DESCRIPTION
270 ID2D1Effect *effect;
271 UINT32 inputIndex;
272 D2D1_RECT_F inputRectangle;
273 } D2D1_EFFECT_INPUT_DESCRIPTION;
275 typedef HRESULT (__stdcall *PD2D1_EFFECT_FACTORY)(IUnknown **effect);
278 object,
279 uuid(483473d7-cd46-4f9d-9d3a-3112aa80159d),
280 local,
282 interface ID2D1Properties : IUnknown
284 UINT32 GetPropertyCount();
285 HRESULT GetPropertyName(
286 [in] UINT32 index,
287 [out] WCHAR *name,
288 [in] UINT32 name_count
290 UINT32 GetPropertyNameLength(
291 [in] UINT32 index
293 D2D1_PROPERTY_TYPE GetType(
294 [in] UINT32 index
296 UINT32 GetPropertyIndex(
297 [in] const WCHAR *name
299 HRESULT SetValueByName(
300 [in] const WCHAR *name,
301 [in] D2D1_PROPERTY_TYPE type,
302 [in] const BYTE *value,
303 [in] UINT32 value_size
305 HRESULT SetValue(
306 [in] UINT32 index,
307 [in] D2D1_PROPERTY_TYPE type,
308 [in] const BYTE *value,
309 [in] UINT32 value_size
311 HRESULT GetValueByName(
312 [in] const WCHAR *name,
313 [in] D2D1_PROPERTY_TYPE type,
314 [out] BYTE *value,
315 [in] UINT32 value_size
317 HRESULT GetValue(
318 [in] UINT32 index,
319 [in] D2D1_PROPERTY_TYPE type,
320 [out] BYTE *value,
321 [in] UINT32 value_size
323 UINT32 GetValueSize(
324 [in] UINT32 index
326 HRESULT GetSubProperties(
327 [in] UINT32 index,
328 [out] ID2D1Properties **props
333 object,
334 uuid(28211a43-7d89-476f-8181-2d6159b220ad),
335 local,
337 interface ID2D1Effect : ID2D1Properties
339 void SetInput(
340 [in] UINT32 index,
341 [in] ID2D1Image *input,
342 [in] BOOL invalidate
344 HRESULT SetInputCount(
345 [in] UINT32 count
347 void GetInput(
348 [in] UINT32 index,
349 [out] ID2D1Image **input
351 UINT32 GetInputCount();
352 void GetOutput(
353 [out] ID2D1Image **output
358 object,
359 uuid(689f1f85-c72e-4e33-8f19-85754efd5ace),
360 local,
362 interface ID2D1DrawingStateBlock1 : ID2D1DrawingStateBlock
364 void GetDescription(
365 [out] D2D1_DRAWING_STATE_DESCRIPTION1 *desc
367 void SetDescription(
368 [in] const D2D1_DRAWING_STATE_DESCRIPTION1 *desc
373 object,
374 uuid(a898a84c-3873-4588-b08b-ebbf978df041),
375 local,
377 interface ID2D1Bitmap1 : ID2D1Bitmap
379 void GetColorContext(
380 [out] ID2D1ColorContext **context
382 D2D1_BITMAP_OPTIONS GetOptions();
383 HRESULT GetSurface(
384 [out] IDXGISurface **surface
386 HRESULT Map(
387 [in] D2D1_MAP_OPTIONS options,
388 [out] D2D1_MAPPED_RECT *mapped_rect
390 HRESULT Unmap();
394 object,
395 uuid(41343a53-e41a-49a2-91cd-21793bbb62e5),
396 local,
398 interface ID2D1BitmapBrush1 : ID2D1BitmapBrush
400 void SetInterpolationMode1(
401 [in] D2D1_INTERPOLATION_MODE mode
403 D2D1_INTERPOLATION_MODE GetInterpolationMode1();
407 object,
408 uuid(47dd575d-ac05-4cdd-8049-9b02cd16f44c),
409 local,
411 interface ID2D1Device : ID2D1Resource
413 HRESULT CreateDeviceContext(
414 [in] D2D1_DEVICE_CONTEXT_OPTIONS options,
415 [out] ID2D1DeviceContext **context
417 HRESULT CreatePrintControl(
418 [in] IWICImagingFactory *wic_factory,
419 [in] IPrintDocumentPackageTarget *document_target,
420 [in] const D2D1_PRINT_CONTROL_PROPERTIES *desc,
421 [out] ID2D1PrintControl **print_control
423 void SetMaximumTextureMemory(
424 [in] UINT64 max_texture_memory
426 UINT64 GetMaximumTextureMemory();
427 HRESULT ClearResources(
428 [in, defaultvalue(0)] UINT msec_since_use
433 object,
434 uuid(e8f7fe7a-191c-466d-ad95-975678bda998),
435 local,
437 interface ID2D1DeviceContext : ID2D1RenderTarget
439 HRESULT CreateBitmap(
440 [in] D2D1_SIZE_U size,
441 [in] const void *src_data,
442 [in] UINT32 pitch,
443 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
444 [out] ID2D1Bitmap1 **bitmap
446 HRESULT CreateBitmapFromWicBitmap(
447 [in] IWICBitmapSource *bitmap_source,
448 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
449 [out] ID2D1Bitmap1 **bitmap
451 HRESULT CreateColorContext(
452 [in] D2D1_COLOR_SPACE space,
453 [in] const BYTE *profile,
454 [in] UINT32 profile_size,
455 [out] ID2D1ColorContext **color_context
457 HRESULT CreateColorContextFromFilename(
458 [in] const WCHAR *filename,
459 [out] ID2D1ColorContext **color_context
461 HRESULT CreateColorContextFromWicColorContext(
462 [in] IWICColorContext *wic_color_context,
463 [out] ID2D1ColorContext **color_context
465 HRESULT CreateBitmapFromDxgiSurface(
466 [in] IDXGISurface *surface,
467 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
468 [out] ID2D1Bitmap1 **bitmap
470 HRESULT CreateEffect(
471 [in] REFCLSID effect_id,
472 [out] ID2D1Effect **effect
474 HRESULT CreateGradientStopCollection(
475 [in] const D2D1_GRADIENT_STOP *stops,
476 [in] UINT32 stop_count,
477 [in] D2D1_COLOR_SPACE preinterpolation_space,
478 [in] D2D1_COLOR_SPACE postinterpolation_space,
479 [in] D2D1_BUFFER_PRECISION buffer_precision,
480 [in] D2D1_EXTEND_MODE extend_mode,
481 [in] D2D1_COLOR_INTERPOLATION_MODE color_interpolation_mode,
482 [out] ID2D1GradientStopCollection1 **gradient
484 HRESULT CreateImageBrush(
485 [in] ID2D1Image *image,
486 [in] const D2D1_IMAGE_BRUSH_PROPERTIES *image_brush_desc,
487 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
488 [out] ID2D1ImageBrush **brush
490 HRESULT CreateBitmapBrush(
491 [in] ID2D1Bitmap *bitmap,
492 [in] const D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmap_brush_desc,
493 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
494 [out] ID2D1BitmapBrush1 **bitmap_brush
496 HRESULT CreateCommandList(
497 [out] ID2D1CommandList **command_list
499 BOOL IsDxgiFormatSupported(
500 [in] DXGI_FORMAT format
502 BOOL IsBufferPrecisionSupported(
503 [in] D2D1_BUFFER_PRECISION buffer_precision
505 void GetImageLocalBounds(
506 [in] ID2D1Image *image,
507 [out] D2D1_RECT_F *local_bounds
509 HRESULT GetImageWorldBounds(
510 [in] ID2D1Image *image,
511 [out] D2D1_RECT_F *world_bounds
513 HRESULT GetGlyphRunWorldBounds(
514 [in] D2D1_POINT_2F baseline_origin,
515 [in] const DWRITE_GLYPH_RUN *glyph_run,
516 [in] DWRITE_MEASURING_MODE measuring_mode,
517 [out] D2D1_RECT_F *bounds
519 void GetDevice(
520 [out] ID2D1Device **device
522 void SetTarget(
523 [in] ID2D1Image *target
525 void GetTarget(
526 [out] ID2D1Image **target
528 void SetRenderingControls(
529 [in] const D2D1_RENDERING_CONTROLS *rendering_controls
531 void GetRenderingControls(
532 [out] D2D1_RENDERING_CONTROLS *rendering_controls
534 void SetPrimitiveBlend(
535 [in] D2D1_PRIMITIVE_BLEND primitive_blend
537 D2D1_PRIMITIVE_BLEND GetPrimitiveBlend();
538 void SetUnitMode(
539 [in] D2D1_UNIT_MODE unit_mode
541 D2D1_UNIT_MODE GetUnitMode();
542 void DrawGlyphRun(
543 [in] D2D1_POINT_2F baseline_origin,
544 [in] const DWRITE_GLYPH_RUN *glyph_run,
545 [in] const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc,
546 [in] ID2D1Brush *brush,
547 [in] DWRITE_MEASURING_MODE measuring_mode
549 void DrawImage(
550 [in] ID2D1Image *image,
551 [in] const D2D1_POINT_2F *target_offset,
552 [in] const D2D1_RECT_F *image_rect,
553 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
554 [in] D2D1_COMPOSITE_MODE composite_mode
556 void DrawGdiMetafile(
557 [in] ID2D1GdiMetafile *metafile,
558 [in] const D2D1_POINT_2F *target_offset
560 void DrawBitmap(
561 [in] ID2D1Bitmap *bitmap,
562 [in] const D2D1_RECT_F *dst_rect,
563 [in] float opacity,
564 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
565 [in] const D2D1_RECT_F *src_rect,
566 [in] const D2D1_MATRIX_4X4_F *perspective_transform
568 void PushLayer(
569 [in] const D2D1_LAYER_PARAMETERS1 *layer_parameters,
570 [in] ID2D1Layer *layer
572 HRESULT InvalidateEffectInputRectangle(
573 [in] ID2D1Effect *effect,
574 [in] UINT32 input,
575 [in] const D2D1_RECT_F *input_rect
577 HRESULT GetEffectInvalidRectangleCount(
578 [in] ID2D1Effect *effect,
579 [out] UINT32 *rect_count
581 HRESULT GetEffectInvalidRectangles(
582 [in] ID2D1Effect *effect,
583 [out] D2D1_RECT_F *rectangles,
584 [in] UINT32 rect_count
586 HRESULT GetEffectRequiredInputRectangles(
587 [in] ID2D1Effect *effect,
588 [in] const D2D1_RECT_F *image_rect,
589 [in] const D2D1_EFFECT_INPUT_DESCRIPTION *desc,
590 [out] D2D1_RECT_F *input_rect,
591 [in] UINT32 input_count
593 void FillOpacityMask(
594 [in] ID2D1Bitmap *mask,
595 [in] ID2D1Brush *brush,
596 [in] const D2D1_RECT_F *dst_rect,
597 [in] const D2D1_RECT_F *src_rect
602 object,
603 uuid(bb12d362-daee-4b9a-aa1d-14ba401cfa1f),
604 local,
606 interface ID2D1Factory1 : ID2D1Factory
608 HRESULT CreateDevice(
609 [in] IDXGIDevice *dxgi_device,
610 [out] ID2D1Device **device
612 HRESULT CreateStrokeStyle(
613 [in] const D2D1_STROKE_STYLE_PROPERTIES1 *desc,
614 [in, size_is(dash_count)] const float *dashes,
615 [in] UINT32 dash_count,
616 [out] ID2D1StrokeStyle1 **stroke_style
618 HRESULT CreatePathGeometry(
619 [out] ID2D1PathGeometry1 **geometry
621 HRESULT CreateDrawingStateBlock(
622 [in] const D2D1_DRAWING_STATE_DESCRIPTION1 *desc,
623 [in] IDWriteRenderingParams *text_rendering_params,
624 [out] ID2D1DrawingStateBlock1 **state_block
626 HRESULT CreateGdiMetafile(
627 [in] IStream *stream,
628 [out] ID2D1GdiMetafile **metafile
630 HRESULT RegisterEffectFromStream(
631 [in] REFCLSID effect_id,
632 [in] IStream *property_xml,
633 [in, size_is(binding_count)] const D2D1_PROPERTY_BINDING *bindings,
634 [in] UINT32 binding_count,
635 [in] PD2D1_EFFECT_FACTORY effect_factory
637 HRESULT RegisterEffectFromString(
638 [in] REFCLSID effect_id,
639 [in] const WCHAR *property_xml,
640 [in, size_is(binding_count)] const D2D1_PROPERTY_BINDING *bindings,
641 [in] UINT32 binding_count,
642 [in] PD2D1_EFFECT_FACTORY effect_factory
644 HRESULT UnregisterEffect(
645 [in] REFCLSID effect_id
647 HRESULT GetRegisteredEffects(
648 [out, size_is(effect_count)] CLSID *effects,
649 [in] UINT32 effect_count,
650 [out] UINT32 *returned,
651 [out] UINT32 *registered
653 HRESULT GetEffectProperties(
654 [in] REFCLSID effect_id,
655 [out] ID2D1Properties **props