mfplat: Implement GetScanline0AndPitch() for d3d11 buffers.
[wine/zf.git] / include / d2d1_1.idl
blob257a970968f872e41e2cf27b760eee6f77503f2e
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 ID2D1PathGeometry1;
23 interface ID2D1Properties;
24 interface IPrintDocumentPackageTarget;
25 interface ID2D1PrintControl;
26 interface IWICImagingFactory;
27 interface IWICColorContext;
28 interface ID2D1ColorContext;
29 interface ID2D1Effect;
30 interface ID2D1BitmapBrush1;
32 cpp_quote("#ifndef __dwrite_h__")
33 /* already defined in dwrite.h but needed for WIDL */
34 typedef struct DWRITE_GLYPH_RUN_DESCRIPTION DWRITE_GLYPH_RUN_DESCRIPTION;
35 cpp_quote("#endif /* __dwrite_h__ */")
37 typedef enum D2D1_DEVICE_CONTEXT_OPTIONS
39 D2D1_DEVICE_CONTEXT_OPTIONS_NONE = 0x0,
40 D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS = 0x1,
41 D2D1_DEVICE_CONTEXT_OPTIONS_FORCE_DWORD = 0xffffffff,
42 } D2D1_DEVICE_CONTEXT_OPTIONS;
44 typedef enum D2D1_STROKE_TRANSFORM_TYPE
46 D2D1_STROKE_TRANSFORM_TYPE_NORMAL = 0x0,
47 D2D1_STROKE_TRANSFORM_TYPE_FIXED = 0x1,
48 D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE = 0x2,
49 D2D1_STROKE_TRANSFORM_TYPE_FORCE_DWORD = 0xffffffff,
50 } D2D1_STROKE_TRANSFORM_TYPE;
52 typedef enum D2D1_PRIMITIVE_BLEND
54 D2D1_PRIMITIVE_BLEND_SOURCE_OVER = 0x0,
55 D2D1_PRIMITIVE_BLEND_COPY = 0x1,
56 D2D1_PRIMITIVE_BLEND_MIN = 0x2,
57 D2D1_PRIMITIVE_BLEND_ADD = 0x3,
58 D2D1_PRIMITIVE_BLEND_MAX = 0x4,
59 D2D1_PRIMITIVE_BLEND_FORCE_DWORD = 0xffffffff,
60 } D2D1_PRIMITIVE_BLEND;
62 typedef enum D2D1_UNIT_MODE
64 D2D1_UNIT_MODE_DIPS = 0x0,
65 D2D1_UNIT_MODE_PIXELS = 0x1,
66 D2D1_UNIT_MODE_FORCE_DWORD = 0xffffffff,
67 } D2D1_UNIT_MODE;
69 typedef enum D2D1_PRINT_FONT_SUBSET_MODE
71 D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT = 0x0,
72 D2D1_PRINT_FONT_SUBSET_MODE_EACHPAGE = 0x1,
73 D2D1_PRINT_FONT_SUBSET_MODE_NONE = 0x2,
74 D2D1_PRINT_FONT_SUBSET_MODE_FORCE_DWORD = 0xffffffff,
75 } D2D1_PRINT_FONT_SUBSET_MODE;
77 typedef enum D2D1_COLOR_SPACE
79 D2D1_COLOR_SPACE_CUSTOM = 0x0,
80 D2D1_COLOR_SPACE_SRGB = 0x1,
81 D2D1_COLOR_SPACE_SCRGB = 0x2,
82 D2D1_COLOR_SPACE_FORCE_DWORD = 0xffffffff,
83 } D2D1_COLOR_SPACE;
85 typedef enum D2D1_BITMAP_OPTIONS
87 D2D1_BITMAP_OPTIONS_NONE = 0x0,
88 D2D1_BITMAP_OPTIONS_TARGET = 0x1,
89 D2D1_BITMAP_OPTIONS_CANNOT_DRAW = 0x2,
90 D2D1_BITMAP_OPTIONS_CPU_READ = 0x4,
91 D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE = 0x8,
92 D2D1_BITMAP_OPTIONS_FORCE_DWORD = 0xffffffff,
93 } D2D1_BITMAP_OPTIONS;
95 typedef enum D2D1_MAP_OPTIONS
97 D2D1_MAP_OPTIONS_NONE = 0x0,
98 D2D1_MAP_OPTIONS_READ = 0x1,
99 D2D1_MAP_OPTIONS_WRITE = 0x2,
100 D2D1_MAP_OPTIONS_DISCARD = 0x4,
101 D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff,
102 } D2D1_MAP_OPTIONS;
104 typedef enum D2D1_BUFFER_PRECISION
106 D2D1_BUFFER_PRECISION_UNKNOWN = 0x0,
107 D2D1_BUFFER_PRECISION_8BPC_UNORM = 0x1,
108 D2D1_BUFFER_PRECISION_8BPC_UNORM_SRGB = 0x2,
109 D2D1_BUFFER_PRECISION_16BPC_UNORM = 0x3,
110 D2D1_BUFFER_PRECISION_16BPC_FLOAT = 0x4,
111 D2D1_BUFFER_PRECISION_32BPC_FLOAT = 0x5,
112 D2D1_BUFFER_PRECISION_FORCE_DWORD = 0xffffffff,
113 } D2D1_BUFFER_PRECISION;
115 typedef enum D2D1_COLOR_INTERPOLATION_MODE
117 D2D1_COLOR_INTERPOLATION_MODE_STRAIGHT = 0x0,
118 D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED = 0x1,
119 D2D1_COLOR_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
120 } D2D1_COLOR_INTERPOLATION_MODE;
122 typedef enum D2D1_INTERPOLATION_MODE
124 D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR,
125 D2D1_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
126 D2D1_INTERPOLATION_MODE_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC,
127 D2D1_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR,
128 D2D1_INTERPOLATION_MODE_ANISOTROPIC = D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC,
129 D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC,
130 D2D1_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
131 } D2D1_INTERPOLATION_MODE;
133 typedef enum D2D1_COMPOSITE_MODE
135 D2D1_COMPOSITE_MODE_SOURCE_OVER = 0x0,
136 D2D1_COMPOSITE_MODE_DESTINATION_OVER = 0x1,
137 D2D1_COMPOSITE_MODE_SOURCE_IN = 0x2,
138 D2D1_COMPOSITE_MODE_DESTINATION_IN = 0x3,
139 D2D1_COMPOSITE_MODE_SOURCE_OUT = 0x4,
140 D2D1_COMPOSITE_MODE_DESTINATION_OUT = 0x5,
141 D2D1_COMPOSITE_MODE_SOURCE_ATOP = 0x6,
142 D2D1_COMPOSITE_MODE_DESTINATION_ATOP = 0x7,
143 D2D1_COMPOSITE_MODE_XOR = 0x8,
144 D2D1_COMPOSITE_MODE_PLUS = 0x9,
145 D2D1_COMPOSITE_MODE_SOURCE_COPY = 0xa,
146 D2D1_COMPOSITE_MODE_BOUNDED_SOURCE_COPY = 0xb,
147 D2D1_COMPOSITE_MODE_MASK_INVERT = 0xc,
148 D2D1_COMPOSITE_MODE_FORCE_DWORD = 0xffffffff,
149 } D2D1_COMPOSITE_MODE;
151 typedef enum D2D1_LAYER_OPTIONS1
153 D2D1_LAYER_OPTIONS1_NONE = 0x0,
154 D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND = 0x1,
155 D2D1_LAYER_OPTIONS1_IGNORE_ALPHA = 0x2,
156 D2D1_LAYER_OPTIONS1_FORCE_DWORD = 0xffffffff,
157 } D2D1_LAYER_OPTIONS1;
159 typedef struct D2D1_PROPERTY_BINDING D2D1_PROPERTY_BINDING;
160 typedef D2D_MATRIX_4X4_F D2D1_MATRIX_4X4_F;
162 typedef enum D2D1_PROPERTY_TYPE
164 D2D1_PROPERTY_TYPE_UNKNOWN = 0x0,
165 D2D1_PROPERTY_TYPE_STRING = 0x1,
166 D2D1_PROPERTY_TYPE_BOOL = 0x2,
167 D2D1_PROPERTY_TYPE_UINT32 = 0x3,
168 D2D1_PROPERTY_TYPE_INT32 = 0x4,
169 D2D1_PROPERTY_TYPE_FLOAT = 0x5,
170 D2D1_PROPERTY_TYPE_VECTOR2 = 0x6,
171 D2D1_PROPERTY_TYPE_VECTOR3 = 0x7,
172 D2D1_PROPERTY_TYPE_VECTOR4 = 0x8,
173 D2D1_PROPERTY_TYPE_BLOB = 0x9,
174 D2D1_PROPERTY_TYPE_IUNKNOWN = 0xa,
175 D2D1_PROPERTY_TYPE_ENUM = 0xb,
176 D2D1_PROPERTY_TYPE_ARRAY = 0xc,
177 D2D1_PROPERTY_TYPE_CLSID = 0xd,
178 D2D1_PROPERTY_TYPE_MATRIX_3X2 = 0xe,
179 D2D1_PROPERTY_TYPE_MATRIX_4X3 = 0xf,
180 D2D1_PROPERTY_TYPE_MATRIX_4X4 = 0x10,
181 D2D1_PROPERTY_TYPE_MATRIX_5X4 = 0x11,
182 D2D1_PROPERTY_TYPE_COLOR_CONTEXT = 0x12,
183 D2D1_PROPERTY_TYPE_FORCE_DWORD = 0xffffffff,
184 } D2D1_PROPERTY_TYPE;
186 typedef enum D2D1_PROPERTY
188 D2D1_PROPERTY_CLSID = 0x80000000,
189 D2D1_PROPERTY_DISPLAYNAME = 0x80000001,
190 D2D1_PROPERTY_AUTHOR = 0x80000002,
191 D2D1_PROPERTY_CATEGORY = 0x80000003,
192 D2D1_PROPERTY_DESCRIPTION = 0x80000004,
193 D2D1_PROPERTY_INPUTS = 0x80000005,
194 D2D1_PROPERTY_CACHED = 0x80000006,
195 D2D1_PROPERTY_PRECISION = 0x80000007,
196 D2D1_PROPERTY_MIN_INPUTS = 0x80000008,
197 D2D1_PROPERTY_MAX_INPUTS = 0x80000009,
198 D2D1_PROPERTY_FORCE_DWORD = 0xffffffff
199 } D2D1_PROPERTY;
201 typedef enum D2D1_SUBPROPERTY
203 D2D1_SUBPROPERTY_DISPLAYNAME = 0x80000000,
204 D2D1_SUBPROPERTY_ISREADONLY = 0x80000001,
205 D2D1_SUBPROPERTY_MIN = 0x80000002,
206 D2D1_SUBPROPERTY_MAX = 0x80000003,
207 D2D1_SUBPROPERTY_DEFAULT = 0x80000004,
208 D2D1_SUBPROPERTY_FIELDS = 0x80000005,
209 D2D1_SUBPROPERTY_INDEX = 0x80000006,
210 D2D1_SUBPROPERTY_FORCE_DWORD = 0xffffffff
211 } D2D1_SUBPROPERTY;
213 typedef enum D2D1_THREADING_MODE
215 D2D1_THREADING_MODE_SINGLE_THREADED = D2D1_FACTORY_TYPE_SINGLE_THREADED,
216 D2D1_THREADING_MODE_MULTI_THREADED = D2D1_FACTORY_TYPE_MULTI_THREADED,
217 D2D1_THREADING_MODE_FORCE_DWORD = 0xffffffff,
218 } D2D1_THREADING_MODE;
220 typedef struct D2D1_CREATION_PROPERTIES
222 D2D1_THREADING_MODE threadingMode;
223 D2D1_DEBUG_LEVEL debugLevel;
224 D2D1_DEVICE_CONTEXT_OPTIONS options;
225 } D2D1_CREATION_PROPERTIES;
227 typedef struct D2D1_STROKE_STYLE_PROPERTIES1
229 D2D1_CAP_STYLE startCap;
230 D2D1_CAP_STYLE endCap;
231 D2D1_CAP_STYLE dashCap;
232 D2D1_LINE_JOIN lineJoin;
233 float miterLimit;
234 D2D1_DASH_STYLE dashStyle;
235 float dashOffset;
236 D2D1_STROKE_TRANSFORM_TYPE transformType;
237 } D2D1_STROKE_STYLE_PROPERTIES1;
239 typedef struct D2D1_DRAWING_STATE_DESCRIPTION1
241 D2D1_ANTIALIAS_MODE antialiasMode;
242 D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
243 D2D1_TAG tag1;
244 D2D1_TAG tag2;
245 D2D1_MATRIX_3X2_F transform;
246 D2D1_PRIMITIVE_BLEND primitiveBlend;
247 D2D1_UNIT_MODE unitMode;
248 } D2D1_DRAWING_STATE_DESCRIPTION1;
250 typedef struct D2D1_PRINT_CONTROL_PROPERTIES
252 D2D1_PRINT_FONT_SUBSET_MODE fontSubset;
253 float rasterDPI;
254 D2D1_COLOR_SPACE colorSpace;
255 } D2D1_PRINT_CONTROL_PROPERTIES;
257 typedef struct D2D1_MAPPED_RECT
259 UINT32 pitch;
260 BYTE *bits;
261 } D2D1_MAPPED_RECT;
263 typedef struct D2D1_BITMAP_PROPERTIES1
265 D2D1_PIXEL_FORMAT pixelFormat;
266 float dpiX;
267 float dpiY;
268 D2D1_BITMAP_OPTIONS bitmapOptions;
269 ID2D1ColorContext *colorContext;
270 } D2D1_BITMAP_PROPERTIES1;
272 typedef struct D2D1_IMAGE_BRUSH_PROPERTIES
274 D2D1_RECT_F sourceRectangle;
275 D2D1_EXTEND_MODE extendModeX;
276 D2D1_EXTEND_MODE extendModeY;
277 D2D1_INTERPOLATION_MODE interpolationMode;
278 } D2D1_IMAGE_BRUSH_PROPERTIES;
280 typedef struct D2D1_BITMAP_BRUSH_PROPERTIES1
282 D2D1_EXTEND_MODE extendModeX;
283 D2D1_EXTEND_MODE extendModeY;
284 D2D1_INTERPOLATION_MODE interpolationMode;
285 } D2D1_BITMAP_BRUSH_PROPERTIES1;
287 typedef struct D2D1_RENDERING_CONTROLS
289 D2D1_BUFFER_PRECISION bufferPrecision;
290 D2D1_SIZE_U tileSize;
291 } D2D1_RENDERING_CONTROLS;
293 typedef struct D2D1_LAYER_PARAMETERS1
295 D2D1_RECT_F contentBounds;
296 ID2D1Geometry *geometricMask;
297 D2D1_ANTIALIAS_MODE maskAntialiasMode;
298 D2D1_MATRIX_3X2_F maskTransform;
299 float opacity;
300 ID2D1Brush *opacityBrush;
301 D2D1_LAYER_OPTIONS1 layerOptions;
302 } D2D1_LAYER_PARAMETERS1;
304 typedef struct D2D1_EFFECT_INPUT_DESCRIPTION
306 ID2D1Effect *effect;
307 UINT32 inputIndex;
308 D2D1_RECT_F inputRectangle;
309 } D2D1_EFFECT_INPUT_DESCRIPTION;
311 typedef struct D2D1_POINT_DESCRIPTION
313 D2D1_POINT_2F point;
314 D2D1_POINT_2F unitTangentVector;
315 UINT32 endSegment;
316 UINT32 endFigure;
317 float lengthToEndSegment;
318 } D2D1_POINT_DESCRIPTION;
320 typedef HRESULT (__stdcall *PD2D1_EFFECT_FACTORY)(IUnknown **effect);
323 object,
324 uuid(82237326-8111-4f7c-bcf4-b5c1175564fe),
325 local,
327 interface ID2D1GdiMetafileSink : IUnknown
329 HRESULT ProcessRecord(
330 [in] DWORD type,
331 [in, optional] const void *data,
332 [in] DWORD size
337 object,
338 uuid(2f543dc3-cfc1-4211-864f-cfd91c6f3395),
339 local,
341 interface ID2D1GdiMetafile : ID2D1Resource
343 HRESULT Stream(
344 [in] ID2D1GdiMetafileSink *sink
346 HRESULT GetBounds(
347 [out] D2D1_RECT_F *bounds
352 object,
353 uuid(483473d7-cd46-4f9d-9d3a-3112aa80159d),
354 local,
356 interface ID2D1Properties : IUnknown
358 UINT32 GetPropertyCount();
359 HRESULT GetPropertyName(
360 [in] UINT32 index,
361 [out] WCHAR *name,
362 [in] UINT32 name_count
364 UINT32 GetPropertyNameLength(
365 [in] UINT32 index
367 D2D1_PROPERTY_TYPE GetType(
368 [in] UINT32 index
370 UINT32 GetPropertyIndex(
371 [in] const WCHAR *name
373 HRESULT SetValueByName(
374 [in] const WCHAR *name,
375 [in] D2D1_PROPERTY_TYPE type,
376 [in] const BYTE *value,
377 [in] UINT32 value_size
379 HRESULT SetValue(
380 [in] UINT32 index,
381 [in] D2D1_PROPERTY_TYPE type,
382 [in] const BYTE *value,
383 [in] UINT32 value_size
385 HRESULT GetValueByName(
386 [in] const WCHAR *name,
387 [in] D2D1_PROPERTY_TYPE type,
388 [out] BYTE *value,
389 [in] UINT32 value_size
391 HRESULT GetValue(
392 [in] UINT32 index,
393 [in] D2D1_PROPERTY_TYPE type,
394 [out] BYTE *value,
395 [in] UINT32 value_size
397 UINT32 GetValueSize(
398 [in] UINT32 index
400 HRESULT GetSubProperties(
401 [in] UINT32 index,
402 [out] ID2D1Properties **props
407 object,
408 uuid(28211a43-7d89-476f-8181-2d6159b220ad),
409 local,
411 interface ID2D1Effect : ID2D1Properties
413 void SetInput(
414 [in] UINT32 index,
415 [in] ID2D1Image *input,
416 [in] BOOL invalidate
418 HRESULT SetInputCount(
419 [in] UINT32 count
421 void GetInput(
422 [in] UINT32 index,
423 [out] ID2D1Image **input
425 UINT32 GetInputCount();
426 void GetOutput(
427 [out] ID2D1Image **output
432 object,
433 uuid(689f1f85-c72e-4e33-8f19-85754efd5ace),
434 local,
436 interface ID2D1DrawingStateBlock1 : ID2D1DrawingStateBlock
438 void GetDescription(
439 [out] D2D1_DRAWING_STATE_DESCRIPTION1 *desc
441 void SetDescription(
442 [in] const D2D1_DRAWING_STATE_DESCRIPTION1 *desc
447 object,
448 uuid(1c4820bb-5771-4518-a581-2fe4dd0ec657),
449 local,
451 interface ID2D1ColorContext : ID2D1Resource
453 D2D1_COLOR_SPACE GetColorSpace();
454 UINT32 GetProfileSize();
455 HRESULT GetProfile(
456 [out] BYTE *profile,
457 [in] UINT32 size
462 object,
463 uuid(a898a84c-3873-4588-b08b-ebbf978df041),
464 local,
466 interface ID2D1Bitmap1 : ID2D1Bitmap
468 void GetColorContext(
469 [out] ID2D1ColorContext **context
471 D2D1_BITMAP_OPTIONS GetOptions();
472 HRESULT GetSurface(
473 [out] IDXGISurface **surface
475 HRESULT Map(
476 [in] D2D1_MAP_OPTIONS options,
477 [out] D2D1_MAPPED_RECT *mapped_rect
479 HRESULT Unmap();
483 object,
484 uuid(41343a53-e41a-49a2-91cd-21793bbb62e5),
485 local,
487 interface ID2D1BitmapBrush1 : ID2D1BitmapBrush
489 void SetInterpolationMode1(
490 [in] D2D1_INTERPOLATION_MODE mode
492 D2D1_INTERPOLATION_MODE GetInterpolationMode1();
496 object,
497 uuid(ae1572f4-5dd0-4777-998b-9279472ae63b),
498 local,
500 interface ID2D1GradientStopCollection1 : ID2D1GradientStopCollection
502 void GetGradientStops1(
503 [out] D2D1_GRADIENT_STOP *gradient,
504 [in] UINT32 count
506 D2D1_COLOR_SPACE GetPreInterpolationSpace();
507 D2D1_COLOR_SPACE GetPostInterpolationSpace();
508 D2D1_BUFFER_PRECISION GetBufferPrecision();
509 D2D1_COLOR_INTERPOLATION_MODE GetColorInterpolationMode();
513 object,
514 uuid(47dd575d-ac05-4cdd-8049-9b02cd16f44c),
515 local,
517 interface ID2D1Device : ID2D1Resource
519 HRESULT CreateDeviceContext(
520 [in] D2D1_DEVICE_CONTEXT_OPTIONS options,
521 [out] ID2D1DeviceContext **context
523 HRESULT CreatePrintControl(
524 [in] IWICImagingFactory *wic_factory,
525 [in] IPrintDocumentPackageTarget *document_target,
526 [in] const D2D1_PRINT_CONTROL_PROPERTIES *desc,
527 [out] ID2D1PrintControl **print_control
529 void SetMaximumTextureMemory(
530 [in] UINT64 max_texture_memory
532 UINT64 GetMaximumTextureMemory();
533 HRESULT ClearResources(
534 [in, defaultvalue(0)] UINT msec_since_use
539 object,
540 uuid(54d7898a-a061-40a7-bec7-e465bcba2c4f),
541 local,
543 interface ID2D1CommandSink : IUnknown
545 HRESULT BeginDraw();
546 HRESULT EndDraw();
547 HRESULT SetAntialiasMode(
548 [in] D2D1_ANTIALIAS_MODE antialias_mode
550 HRESULT SetTags(
551 [in] D2D1_TAG tag1,
552 [in] D2D1_TAG tag2
554 HRESULT SetTextAntialiasMode(
555 [in] D2D1_TEXT_ANTIALIAS_MODE antialias_mode
557 HRESULT SetTextRenderingParams(
558 [in] IDWriteRenderingParams *text_rendering_params
560 HRESULT SetTransform(
561 [in] D2D1_MATRIX_3X2_F *transform
563 HRESULT SetPrimitiveBlend(
564 [in] D2D1_PRIMITIVE_BLEND primitive_blend
566 HRESULT SetUnitMode(
567 [in] D2D1_UNIT_MODE unit_mode
569 HRESULT Clear(
570 [in] const D2D1_COLOR_F *color
572 HRESULT DrawGlyphRun(
573 [in] D2D1_POINT_2F baseline_origin,
574 [in] const DWRITE_GLYPH_RUN *glyph_run,
575 [in] const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc,
576 [in] ID2D1Brush *brush,
577 [in] DWRITE_MEASURING_MODE measuring_mode
579 HRESULT DrawLine(
580 [in] D2D1_POINT_2F p0,
581 [in] D2D1_POINT_2F p1,
582 [in] ID2D1Brush *brush,
583 [in] float stroke_width,
584 [in] ID2D1StrokeStyle *stroke_style
586 HRESULT DrawGeometry(
587 [in] ID2D1Geometry *geometry,
588 [in] ID2D1Brush *brush,
589 [in] float stroke_width,
590 [in] ID2D1StrokeStyle *stroke_style
592 HRESULT DrawRectangle(
593 [in] const D2D1_RECT_F *rect,
594 [in] ID2D1Brush *brush,
595 [in] float stroke_width,
596 [in] ID2D1StrokeStyle *stroke_style
598 HRESULT DrawBitmap(
599 [in] ID2D1Bitmap *bitmap,
600 [in] const D2D1_RECT_F *dst_rect,
601 [in] float opacity,
602 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
603 [in] const D2D1_RECT_F *src_rect,
604 [in] const D2D1_MATRIX_4X4_F *perspective_transform
606 HRESULT DrawImage(
607 [in] ID2D1Image *image,
608 [in] const D2D1_POINT_2F *target_offset,
609 [in] const D2D1_POINT_2F *image_rect,
610 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
611 [in] D2D1_COMPOSITE_MODE composite_mode
613 HRESULT DrawGdiMetafile(
614 [in] ID2D1GdiMetafile *metafile,
615 [in] const D2D1_POINT_2F *target_offset
617 HRESULT FillMesh(
618 [in] ID2D1Mesh *mesh,
619 [in] ID2D1Brush *brush
621 HRESULT FillOpacityMask(
622 [in] ID2D1Bitmap *bitmap,
623 [in] ID2D1Brush *brush,
624 [in] const D2D1_RECT_F *dst_rect,
625 [in] const D2D1_RECT_F *src_rect
627 HRESULT FillGeometry(
628 [in] ID2D1Geometry *geometry,
629 [in] ID2D1Brush *brush,
630 [in] ID2D1Brush *opacity_brush
632 HRESULT FillRectangle(
633 [in] const D2D1_RECT_F *rect,
634 [in] ID2D1Brush *brush
636 HRESULT PushAxisAlignedClip(
637 [in] const D2D1_RECT_F *clip_rect,
638 [in] D2D1_ANTIALIAS_MODE antialias_mode
640 HRESULT PushLayer(
641 [in] const D2D1_LAYER_PARAMETERS1 *layer_parameters,
642 [in] ID2D1Layer *layer
644 HRESULT PopAxisAlignedClip();
645 HRESULT PopLayer();
649 object,
650 uuid(b4f34a19-2383-4d76-94f6-ec343657c3dc),
651 local,
653 interface ID2D1CommandList : ID2D1Image
655 HRESULT Stream(
656 [in] ID2D1CommandSink *sink
658 HRESULT Close();
662 object,
663 uuid(2c1d867d-c290-41c8-ae7e-34a98702e9a5),
664 local,
666 interface ID2D1PrintControl : IUnknown
668 HRESULT AddPage(
669 [in] ID2D1CommandList *list,
670 [in] D2D_SIZE_F size,
671 [in, optional] IStream *stream,
672 [out, optional] D2D1_TAG *tag1,
673 [out, optional] D2D1_TAG *tag2
675 HRESULT Close();
679 object,
680 uuid(fe9e984d-3f95-407c-b5db-cb94d4e8f87c),
681 local,
683 interface ID2D1ImageBrush : ID2D1Brush
685 void SetImage(
686 [in] ID2D1Image *image
688 void SetExtendModeX(
689 [in] D2D1_EXTEND_MODE extend_mode
691 void SetExtendModeY(
692 [in] D2D1_EXTEND_MODE extend_mode
694 void SetInterpolationMode(
695 [in] D2D1_INTERPOLATION_MODE interpolation_mode
697 void SetSourceRectangle(
698 [in] const D2D1_RECT_F *rect
700 void GetImage(
701 [out] ID2D1Image **image
703 D2D1_EXTEND_MODE GetExtendModeX();
704 D2D1_EXTEND_MODE GetExtendModeY();
705 D2D1_INTERPOLATION_MODE GetInterpolationMode();
706 void GetSourceRectangle(
707 [out] D2D1_RECT_F *rect
712 object,
713 uuid(e8f7fe7a-191c-466d-ad95-975678bda998),
714 local,
716 interface ID2D1DeviceContext : ID2D1RenderTarget
718 HRESULT CreateBitmap(
719 [in] D2D1_SIZE_U size,
720 [in] const void *src_data,
721 [in] UINT32 pitch,
722 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
723 [out] ID2D1Bitmap1 **bitmap
725 HRESULT CreateBitmapFromWicBitmap(
726 [in] IWICBitmapSource *bitmap_source,
727 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
728 [out] ID2D1Bitmap1 **bitmap
730 HRESULT CreateColorContext(
731 [in] D2D1_COLOR_SPACE space,
732 [in] const BYTE *profile,
733 [in] UINT32 profile_size,
734 [out] ID2D1ColorContext **color_context
736 HRESULT CreateColorContextFromFilename(
737 [in] const WCHAR *filename,
738 [out] ID2D1ColorContext **color_context
740 HRESULT CreateColorContextFromWicColorContext(
741 [in] IWICColorContext *wic_color_context,
742 [out] ID2D1ColorContext **color_context
744 HRESULT CreateBitmapFromDxgiSurface(
745 [in] IDXGISurface *surface,
746 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
747 [out] ID2D1Bitmap1 **bitmap
749 HRESULT CreateEffect(
750 [in] REFCLSID effect_id,
751 [out] ID2D1Effect **effect
753 HRESULT CreateGradientStopCollection(
754 [in] const D2D1_GRADIENT_STOP *stops,
755 [in] UINT32 stop_count,
756 [in] D2D1_COLOR_SPACE preinterpolation_space,
757 [in] D2D1_COLOR_SPACE postinterpolation_space,
758 [in] D2D1_BUFFER_PRECISION buffer_precision,
759 [in] D2D1_EXTEND_MODE extend_mode,
760 [in] D2D1_COLOR_INTERPOLATION_MODE color_interpolation_mode,
761 [out] ID2D1GradientStopCollection1 **gradient
763 HRESULT CreateImageBrush(
764 [in] ID2D1Image *image,
765 [in] const D2D1_IMAGE_BRUSH_PROPERTIES *image_brush_desc,
766 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
767 [out] ID2D1ImageBrush **brush
769 HRESULT CreateBitmapBrush(
770 [in] ID2D1Bitmap *bitmap,
771 [in] const D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmap_brush_desc,
772 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
773 [out] ID2D1BitmapBrush1 **bitmap_brush
775 HRESULT CreateCommandList(
776 [out] ID2D1CommandList **command_list
778 BOOL IsDxgiFormatSupported(
779 [in] DXGI_FORMAT format
781 BOOL IsBufferPrecisionSupported(
782 [in] D2D1_BUFFER_PRECISION buffer_precision
784 void GetImageLocalBounds(
785 [in] ID2D1Image *image,
786 [out] D2D1_RECT_F *local_bounds
788 HRESULT GetImageWorldBounds(
789 [in] ID2D1Image *image,
790 [out] D2D1_RECT_F *world_bounds
792 HRESULT GetGlyphRunWorldBounds(
793 [in] D2D1_POINT_2F baseline_origin,
794 [in] const DWRITE_GLYPH_RUN *glyph_run,
795 [in] DWRITE_MEASURING_MODE measuring_mode,
796 [out] D2D1_RECT_F *bounds
798 void GetDevice(
799 [out] ID2D1Device **device
801 void SetTarget(
802 [in] ID2D1Image *target
804 void GetTarget(
805 [out] ID2D1Image **target
807 void SetRenderingControls(
808 [in] const D2D1_RENDERING_CONTROLS *rendering_controls
810 void GetRenderingControls(
811 [out] D2D1_RENDERING_CONTROLS *rendering_controls
813 void SetPrimitiveBlend(
814 [in] D2D1_PRIMITIVE_BLEND primitive_blend
816 D2D1_PRIMITIVE_BLEND GetPrimitiveBlend();
817 void SetUnitMode(
818 [in] D2D1_UNIT_MODE unit_mode
820 D2D1_UNIT_MODE GetUnitMode();
821 void DrawGlyphRun(
822 [in] D2D1_POINT_2F baseline_origin,
823 [in] const DWRITE_GLYPH_RUN *glyph_run,
824 [in] const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc,
825 [in] ID2D1Brush *brush,
826 [in] DWRITE_MEASURING_MODE measuring_mode
828 void DrawImage(
829 [in] ID2D1Image *image,
830 [in] const D2D1_POINT_2F *target_offset,
831 [in] const D2D1_RECT_F *image_rect,
832 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
833 [in] D2D1_COMPOSITE_MODE composite_mode
835 void DrawGdiMetafile(
836 [in] ID2D1GdiMetafile *metafile,
837 [in] const D2D1_POINT_2F *target_offset
839 void DrawBitmap(
840 [in] ID2D1Bitmap *bitmap,
841 [in] const D2D1_RECT_F *dst_rect,
842 [in] float opacity,
843 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
844 [in] const D2D1_RECT_F *src_rect,
845 [in] const D2D1_MATRIX_4X4_F *perspective_transform
847 void PushLayer(
848 [in] const D2D1_LAYER_PARAMETERS1 *layer_parameters,
849 [in] ID2D1Layer *layer
851 HRESULT InvalidateEffectInputRectangle(
852 [in] ID2D1Effect *effect,
853 [in] UINT32 input,
854 [in] const D2D1_RECT_F *input_rect
856 HRESULT GetEffectInvalidRectangleCount(
857 [in] ID2D1Effect *effect,
858 [out] UINT32 *rect_count
860 HRESULT GetEffectInvalidRectangles(
861 [in] ID2D1Effect *effect,
862 [out] D2D1_RECT_F *rectangles,
863 [in] UINT32 rect_count
865 HRESULT GetEffectRequiredInputRectangles(
866 [in] ID2D1Effect *effect,
867 [in] const D2D1_RECT_F *image_rect,
868 [in] const D2D1_EFFECT_INPUT_DESCRIPTION *desc,
869 [out] D2D1_RECT_F *input_rect,
870 [in] UINT32 input_count
872 void FillOpacityMask(
873 [in] ID2D1Bitmap *mask,
874 [in] ID2D1Brush *brush,
875 [in] const D2D1_RECT_F *dst_rect,
876 [in] const D2D1_RECT_F *src_rect
881 object,
882 uuid(10a72a66-e91c-43f4-993f-ddf4b82b0b4a),
883 local,
885 interface ID2D1StrokeStyle1 : ID2D1StrokeStyle
887 D2D1_STROKE_TRANSFORM_TYPE GetStrokeTransformType();
891 object,
892 uuid(bb12d362-daee-4b9a-aa1d-14ba401cfa1f),
893 local,
895 interface ID2D1Factory1 : ID2D1Factory
897 HRESULT CreateDevice(
898 [in] IDXGIDevice *dxgi_device,
899 [out] ID2D1Device **device
901 HRESULT CreateStrokeStyle(
902 [in] const D2D1_STROKE_STYLE_PROPERTIES1 *desc,
903 [in, size_is(dash_count)] const float *dashes,
904 [in] UINT32 dash_count,
905 [out] ID2D1StrokeStyle1 **stroke_style
907 HRESULT CreatePathGeometry(
908 [out] ID2D1PathGeometry1 **geometry
910 HRESULT CreateDrawingStateBlock(
911 [in] const D2D1_DRAWING_STATE_DESCRIPTION1 *desc,
912 [in] IDWriteRenderingParams *text_rendering_params,
913 [out] ID2D1DrawingStateBlock1 **state_block
915 HRESULT CreateGdiMetafile(
916 [in] IStream *stream,
917 [out] ID2D1GdiMetafile **metafile
919 HRESULT RegisterEffectFromStream(
920 [in] REFCLSID effect_id,
921 [in] IStream *property_xml,
922 [in, size_is(binding_count)] const D2D1_PROPERTY_BINDING *bindings,
923 [in] UINT32 binding_count,
924 [in] PD2D1_EFFECT_FACTORY effect_factory
926 HRESULT RegisterEffectFromString(
927 [in] REFCLSID effect_id,
928 [in] const WCHAR *property_xml,
929 [in, size_is(binding_count)] const D2D1_PROPERTY_BINDING *bindings,
930 [in] UINT32 binding_count,
931 [in] PD2D1_EFFECT_FACTORY effect_factory
933 HRESULT UnregisterEffect(
934 [in] REFCLSID effect_id
936 HRESULT GetRegisteredEffects(
937 [out, size_is(effect_count)] CLSID *effects,
938 [in] UINT32 effect_count,
939 [out] UINT32 *returned,
940 [out] UINT32 *registered
942 HRESULT GetEffectProperties(
943 [in] REFCLSID effect_id,
944 [out] ID2D1Properties **props
949 object,
950 uuid(31e6e7bc-e0ff-4d46-8c64-a0a8c41c15d3),
951 local,
953 interface ID2D1Multithread : IUnknown
955 BOOL GetMultithreadProtected();
956 void Enter();
957 void Leave();
960 [local] HRESULT __stdcall D2D1CreateDevice(IDXGIDevice *dxgi_device,
961 const D2D1_CREATION_PROPERTIES *creation_properties, ID2D1Device **device);
962 [local] void __stdcall D2D1SinCos(float angle, float *s, float *c);
963 [local] float __stdcall D2D1Tan(float angle);
964 [local] float __stdcall D2D1Vec3Length(float x, float y, float z);
965 [local] D2D1_COLOR_F __stdcall D2D1ConvertColorSpace(D2D1_COLOR_SPACE src_colour_space,
966 D2D1_COLOR_SPACE dst_colour_space, const D2D1_COLOR_F *colour);