riched20: Use cell ptrs in the rtf parsing code.
[wine/zf.git] / include / d2d1_1.idl
blobddb7669c24b217b6ec1a3b07bcb9d5b64d20084d
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;
36 cpp_quote("#ifndef __dwrite_h__")
37 /* already defined in dwrite.h but needed for WIDL */
38 typedef struct DWRITE_GLYPH_RUN_DESCRIPTION DWRITE_GLYPH_RUN_DESCRIPTION;
39 cpp_quote("#endif /* __dwrite_h__ */")
41 typedef enum D2D1_DEVICE_CONTEXT_OPTIONS
43 D2D1_DEVICE_CONTEXT_OPTIONS_NONE = 0x0,
44 D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS = 0x1,
45 D2D1_DEVICE_CONTEXT_OPTIONS_FORCE_DWORD = 0xffffffff,
46 } D2D1_DEVICE_CONTEXT_OPTIONS;
48 typedef enum D2D1_STROKE_TRANSFORM_TYPE
50 D2D1_STROKE_TRANSFORM_TYPE_NORMAL = 0x0,
51 D2D1_STROKE_TRANSFORM_TYPE_FIXED = 0x1,
52 D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE = 0x2,
53 D2D1_STROKE_TRANSFORM_TYPE_FORCE_DWORD = 0xffffffff,
54 } D2D1_STROKE_TRANSFORM_TYPE;
56 typedef enum D2D1_PRIMITIVE_BLEND
58 D2D1_PRIMITIVE_BLEND_SOURCE_OVER = 0x0,
59 D2D1_PRIMITIVE_BLEND_COPY = 0x1,
60 D2D1_PRIMITIVE_BLEND_MIN = 0x2,
61 D2D1_PRIMITIVE_BLEND_ADD = 0x3,
62 D2D1_PRIMITIVE_BLEND_MAX = 0x4,
63 D2D1_PRIMITIVE_BLEND_FORCE_DWORD = 0xffffffff,
64 } D2D1_PRIMITIVE_BLEND;
66 typedef enum D2D1_UNIT_MODE
68 D2D1_UNIT_MODE_DIPS = 0x0,
69 D2D1_UNIT_MODE_PIXELS = 0x1,
70 D2D1_UNIT_MODE_FORCE_DWORD = 0xffffffff,
71 } D2D1_UNIT_MODE;
73 typedef enum D2D1_PRINT_FONT_SUBSET_MODE
75 D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT = 0x0,
76 D2D1_PRINT_FONT_SUBSET_MODE_EACHPAGE = 0x1,
77 D2D1_PRINT_FONT_SUBSET_MODE_NONE = 0x2,
78 D2D1_PRINT_FONT_SUBSET_MODE_FORCE_DWORD = 0xffffffff,
79 } D2D1_PRINT_FONT_SUBSET_MODE;
81 typedef enum D2D1_COLOR_SPACE
83 D2D1_COLOR_SPACE_CUSTOM = 0x0,
84 D2D1_COLOR_SPACE_SRGB = 0x1,
85 D2D1_COLOR_SPACE_SCRGB = 0x2,
86 D2D1_COLOR_SPACE_FORCE_DWORD = 0xffffffff,
87 } D2D1_COLOR_SPACE;
89 typedef enum D2D1_BITMAP_OPTIONS
91 D2D1_BITMAP_OPTIONS_NONE = 0x0,
92 D2D1_BITMAP_OPTIONS_TARGET = 0x1,
93 D2D1_BITMAP_OPTIONS_CANNOT_DRAW = 0x2,
94 D2D1_BITMAP_OPTIONS_CPU_READ = 0x4,
95 D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE = 0x8,
96 D2D1_BITMAP_OPTIONS_FORCE_DWORD = 0xffffffff,
97 } D2D1_BITMAP_OPTIONS;
99 typedef enum D2D1_MAP_OPTIONS
101 D2D1_MAP_OPTIONS_NONE = 0x0,
102 D2D1_MAP_OPTIONS_READ = 0x1,
103 D2D1_MAP_OPTIONS_WRITE = 0x2,
104 D2D1_MAP_OPTIONS_DISCARD = 0x4,
105 D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff,
106 } D2D1_MAP_OPTIONS;
108 typedef enum D2D1_BUFFER_PRECISION
110 D2D1_BUFFER_PRECISION_UNKNOWN = 0x0,
111 D2D1_BUFFER_PRECISION_8BPC_UNORM = 0x1,
112 D2D1_BUFFER_PRECISION_8BPC_UNORM_SRGB = 0x2,
113 D2D1_BUFFER_PRECISION_16BPC_UNORM = 0x3,
114 D2D1_BUFFER_PRECISION_16BPC_FLOAT = 0x4,
115 D2D1_BUFFER_PRECISION_32BPC_FLOAT = 0x5,
116 D2D1_BUFFER_PRECISION_FORCE_DWORD = 0xffffffff,
117 } D2D1_BUFFER_PRECISION;
119 typedef enum D2D1_COLOR_INTERPOLATION_MODE
121 D2D1_COLOR_INTERPOLATION_MODE_STRAIGHT = 0x0,
122 D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED = 0x1,
123 D2D1_COLOR_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
124 } D2D1_COLOR_INTERPOLATION_MODE;
126 typedef enum D2D1_INTERPOLATION_MODE
128 D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR,
129 D2D1_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
130 D2D1_INTERPOLATION_MODE_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC,
131 D2D1_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR,
132 D2D1_INTERPOLATION_MODE_ANISOTROPIC = D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC,
133 D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC,
134 D2D1_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
135 } D2D1_INTERPOLATION_MODE;
137 typedef enum D2D1_COMPOSITE_MODE
139 D2D1_COMPOSITE_MODE_SOURCE_OVER = 0x0,
140 D2D1_COMPOSITE_MODE_DESTINATION_OVER = 0x1,
141 D2D1_COMPOSITE_MODE_SOURCE_IN = 0x2,
142 D2D1_COMPOSITE_MODE_DESTINATION_IN = 0x3,
143 D2D1_COMPOSITE_MODE_SOURCE_OUT = 0x4,
144 D2D1_COMPOSITE_MODE_DESTINATION_OUT = 0x5,
145 D2D1_COMPOSITE_MODE_SOURCE_ATOP = 0x6,
146 D2D1_COMPOSITE_MODE_DESTINATION_ATOP = 0x7,
147 D2D1_COMPOSITE_MODE_XOR = 0x8,
148 D2D1_COMPOSITE_MODE_PLUS = 0x9,
149 D2D1_COMPOSITE_MODE_SOURCE_COPY = 0xa,
150 D2D1_COMPOSITE_MODE_BOUNDED_SOURCE_COPY = 0xb,
151 D2D1_COMPOSITE_MODE_MASK_INVERT = 0xc,
152 D2D1_COMPOSITE_MODE_FORCE_DWORD = 0xffffffff,
153 } D2D1_COMPOSITE_MODE;
155 typedef enum D2D1_LAYER_OPTIONS1
157 D2D1_LAYER_OPTIONS1_NONE = 0x0,
158 D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND = 0x1,
159 D2D1_LAYER_OPTIONS1_IGNORE_ALPHA = 0x2,
160 D2D1_LAYER_OPTIONS1_FORCE_DWORD = 0xffffffff,
161 } D2D1_LAYER_OPTIONS1;
163 typedef struct D2D1_PROPERTY_BINDING D2D1_PROPERTY_BINDING;
164 typedef D2D_MATRIX_4X4_F D2D1_MATRIX_4X4_F;
166 typedef enum D2D1_PROPERTY_TYPE
168 D2D1_PROPERTY_TYPE_UNKNOWN = 0x0,
169 D2D1_PROPERTY_TYPE_STRING = 0x1,
170 D2D1_PROPERTY_TYPE_BOOL = 0x2,
171 D2D1_PROPERTY_TYPE_UINT32 = 0x3,
172 D2D1_PROPERTY_TYPE_INT32 = 0x4,
173 D2D1_PROPERTY_TYPE_FLOAT = 0x5,
174 D2D1_PROPERTY_TYPE_VECTOR2 = 0x6,
175 D2D1_PROPERTY_TYPE_VECTOR3 = 0x7,
176 D2D1_PROPERTY_TYPE_VECTOR4 = 0x8,
177 D2D1_PROPERTY_TYPE_BLOB = 0x9,
178 D2D1_PROPERTY_TYPE_IUNKNOWN = 0xa,
179 D2D1_PROPERTY_TYPE_ENUM = 0xb,
180 D2D1_PROPERTY_TYPE_ARRAY = 0xc,
181 D2D1_PROPERTY_TYPE_CLSID = 0xd,
182 D2D1_PROPERTY_TYPE_MATRIX_3X2 = 0xe,
183 D2D1_PROPERTY_TYPE_MATRIX_4X3 = 0xf,
184 D2D1_PROPERTY_TYPE_MATRIX_4X4 = 0x10,
185 D2D1_PROPERTY_TYPE_MATRIX_5X4 = 0x11,
186 D2D1_PROPERTY_TYPE_COLOR_CONTEXT = 0x12,
187 D2D1_PROPERTY_TYPE_FORCE_DWORD = 0xffffffff,
188 } D2D1_PROPERTY_TYPE;
190 typedef enum D2D1_THREADING_MODE
192 D2D1_THREADING_MODE_SINGLE_THREADED = D2D1_FACTORY_TYPE_SINGLE_THREADED,
193 D2D1_THREADING_MODE_MULTI_THREADED = D2D1_FACTORY_TYPE_MULTI_THREADED,
194 D2D1_THREADING_MODE_FORCE_DWORD = 0xffffffff,
195 } D2D1_THREADING_MODE;
197 typedef struct D2D1_CREATION_PROPERTIES
199 D2D1_THREADING_MODE threadingMode;
200 D2D1_DEBUG_LEVEL debugLevel;
201 D2D1_DEVICE_CONTEXT_OPTIONS options;
202 } D2D1_CREATION_PROPERTIES;
204 typedef struct D2D1_STROKE_STYLE_PROPERTIES1
206 D2D1_CAP_STYLE startCap;
207 D2D1_CAP_STYLE endCap;
208 D2D1_CAP_STYLE dashCap;
209 D2D1_LINE_JOIN lineJoin;
210 float miterLimit;
211 D2D1_DASH_STYLE dashStyle;
212 float dashOffset;
213 D2D1_STROKE_TRANSFORM_TYPE transformType;
214 } D2D1_STROKE_STYLE_PROPERTIES1;
216 typedef struct D2D1_DRAWING_STATE_DESCRIPTION1
218 D2D1_ANTIALIAS_MODE antialiasMode;
219 D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
220 D2D1_TAG tag1;
221 D2D1_TAG tag2;
222 D2D1_MATRIX_3X2_F transform;
223 D2D1_PRIMITIVE_BLEND primitiveBlend;
224 D2D1_UNIT_MODE unitMode;
225 } D2D1_DRAWING_STATE_DESCRIPTION1;
227 typedef struct D2D1_PRINT_CONTROL_PROPERTIES
229 D2D1_PRINT_FONT_SUBSET_MODE fontSubset;
230 float rasterDPI;
231 D2D1_COLOR_SPACE colorSpace;
232 } D2D1_PRINT_CONTROL_PROPERTIES;
234 typedef struct D2D1_MAPPED_RECT
236 UINT32 pitch;
237 BYTE *bits;
238 } D2D1_MAPPED_RECT;
240 typedef struct D2D1_BITMAP_PROPERTIES1
242 D2D1_PIXEL_FORMAT pixelFormat;
243 float dpiX;
244 float dpiY;
245 D2D1_BITMAP_OPTIONS bitmapOptions;
246 ID2D1ColorContext *colorContext;
247 } D2D1_BITMAP_PROPERTIES1;
249 typedef struct D2D1_IMAGE_BRUSH_PROPERTIES
251 D2D1_RECT_F sourceRectangle;
252 D2D1_EXTEND_MODE extendModeX;
253 D2D1_EXTEND_MODE extendModeY;
254 D2D1_INTERPOLATION_MODE interpolationMode;
255 } D2D1_IMAGE_BRUSH_PROPERTIES;
257 typedef struct D2D1_BITMAP_BRUSH_PROPERTIES1
259 D2D1_EXTEND_MODE extendModeX;
260 D2D1_EXTEND_MODE extendModeY;
261 D2D1_INTERPOLATION_MODE interpolationMode;
262 } D2D1_BITMAP_BRUSH_PROPERTIES1;
264 typedef struct D2D1_RENDERING_CONTROLS
266 D2D1_BUFFER_PRECISION bufferPrecision;
267 D2D1_SIZE_U tileSize;
268 } D2D1_RENDERING_CONTROLS;
270 typedef struct D2D1_LAYER_PARAMETERS1
272 D2D1_RECT_F contentBounds;
273 ID2D1Geometry *geometricMask;
274 D2D1_ANTIALIAS_MODE maskAntialiasMode;
275 D2D1_MATRIX_3X2_F maskTransform;
276 float opacity;
277 ID2D1Brush *opacityBrush;
278 D2D1_LAYER_OPTIONS1 layerOptions;
279 } D2D1_LAYER_PARAMETERS1;
281 typedef struct D2D1_EFFECT_INPUT_DESCRIPTION
283 ID2D1Effect *effect;
284 UINT32 inputIndex;
285 D2D1_RECT_F inputRectangle;
286 } D2D1_EFFECT_INPUT_DESCRIPTION;
288 typedef HRESULT (__stdcall *PD2D1_EFFECT_FACTORY)(IUnknown **effect);
291 object,
292 uuid(483473d7-cd46-4f9d-9d3a-3112aa80159d),
293 local,
295 interface ID2D1Properties : IUnknown
297 UINT32 GetPropertyCount();
298 HRESULT GetPropertyName(
299 [in] UINT32 index,
300 [out] WCHAR *name,
301 [in] UINT32 name_count
303 UINT32 GetPropertyNameLength(
304 [in] UINT32 index
306 D2D1_PROPERTY_TYPE GetType(
307 [in] UINT32 index
309 UINT32 GetPropertyIndex(
310 [in] const WCHAR *name
312 HRESULT SetValueByName(
313 [in] const WCHAR *name,
314 [in] D2D1_PROPERTY_TYPE type,
315 [in] const BYTE *value,
316 [in] UINT32 value_size
318 HRESULT SetValue(
319 [in] UINT32 index,
320 [in] D2D1_PROPERTY_TYPE type,
321 [in] const BYTE *value,
322 [in] UINT32 value_size
324 HRESULT GetValueByName(
325 [in] const WCHAR *name,
326 [in] D2D1_PROPERTY_TYPE type,
327 [out] BYTE *value,
328 [in] UINT32 value_size
330 HRESULT GetValue(
331 [in] UINT32 index,
332 [in] D2D1_PROPERTY_TYPE type,
333 [out] BYTE *value,
334 [in] UINT32 value_size
336 UINT32 GetValueSize(
337 [in] UINT32 index
339 HRESULT GetSubProperties(
340 [in] UINT32 index,
341 [out] ID2D1Properties **props
346 object,
347 uuid(28211a43-7d89-476f-8181-2d6159b220ad),
348 local,
350 interface ID2D1Effect : ID2D1Properties
352 void SetInput(
353 [in] UINT32 index,
354 [in] ID2D1Image *input,
355 [in] BOOL invalidate
357 HRESULT SetInputCount(
358 [in] UINT32 count
360 void GetInput(
361 [in] UINT32 index,
362 [out] ID2D1Image **input
364 UINT32 GetInputCount();
365 void GetOutput(
366 [out] ID2D1Image **output
371 object,
372 uuid(689f1f85-c72e-4e33-8f19-85754efd5ace),
373 local,
375 interface ID2D1DrawingStateBlock1 : ID2D1DrawingStateBlock
377 void GetDescription(
378 [out] D2D1_DRAWING_STATE_DESCRIPTION1 *desc
380 void SetDescription(
381 [in] const D2D1_DRAWING_STATE_DESCRIPTION1 *desc
386 object,
387 uuid(a898a84c-3873-4588-b08b-ebbf978df041),
388 local,
390 interface ID2D1Bitmap1 : ID2D1Bitmap
392 void GetColorContext(
393 [out] ID2D1ColorContext **context
395 D2D1_BITMAP_OPTIONS GetOptions();
396 HRESULT GetSurface(
397 [out] IDXGISurface **surface
399 HRESULT Map(
400 [in] D2D1_MAP_OPTIONS options,
401 [out] D2D1_MAPPED_RECT *mapped_rect
403 HRESULT Unmap();
407 object,
408 uuid(41343a53-e41a-49a2-91cd-21793bbb62e5),
409 local,
411 interface ID2D1BitmapBrush1 : ID2D1BitmapBrush
413 void SetInterpolationMode1(
414 [in] D2D1_INTERPOLATION_MODE mode
416 D2D1_INTERPOLATION_MODE GetInterpolationMode1();
420 object,
421 uuid(47dd575d-ac05-4cdd-8049-9b02cd16f44c),
422 local,
424 interface ID2D1Device : ID2D1Resource
426 HRESULT CreateDeviceContext(
427 [in] D2D1_DEVICE_CONTEXT_OPTIONS options,
428 [out] ID2D1DeviceContext **context
430 HRESULT CreatePrintControl(
431 [in] IWICImagingFactory *wic_factory,
432 [in] IPrintDocumentPackageTarget *document_target,
433 [in] const D2D1_PRINT_CONTROL_PROPERTIES *desc,
434 [out] ID2D1PrintControl **print_control
436 void SetMaximumTextureMemory(
437 [in] UINT64 max_texture_memory
439 UINT64 GetMaximumTextureMemory();
440 HRESULT ClearResources(
441 [in, defaultvalue(0)] UINT msec_since_use
446 object,
447 uuid(54d7898a-a061-40a7-bec7-e465bcba2c4f),
448 local,
450 interface ID2D1CommandSink : IUnknown
452 HRESULT BeginDraw();
453 HRESULT EndDraw();
454 HRESULT SetAntialiasMode(
455 [in] D2D1_ANTIALIAS_MODE antialias_mode
457 HRESULT SetTags(
458 [in] D2D1_TAG tag1,
459 [in] D2D1_TAG tag2
461 HRESULT SetTextAntialiasMode(
462 [in] D2D1_TEXT_ANTIALIAS_MODE antialias_mode
464 HRESULT SetTextRenderingParams(
465 [in] IDWriteRenderingParams *text_rendering_params
467 HRESULT SetTransform(
468 [in] D2D1_MATRIX_3X2_F *transform
470 HRESULT SetPrimitiveBlend(
471 [in] D2D1_PRIMITIVE_BLEND primitive_blend
473 HRESULT SetUnitMode(
474 [in] D2D1_UNIT_MODE unit_mode
476 HRESULT Clear(
477 [in] const D2D1_COLOR_F *color
479 HRESULT DrawGlyphRun(
480 [in] D2D1_POINT_2F baseline_origin,
481 [in] const DWRITE_GLYPH_RUN *glyph_run,
482 [in] const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc,
483 [in] ID2D1Brush *brush,
484 [in] DWRITE_MEASURING_MODE measuring_mode
486 HRESULT DrawLine(
487 [in] D2D1_POINT_2F p0,
488 [in] D2D1_POINT_2F p1,
489 [in] ID2D1Brush *brush,
490 [in] float stroke_width,
491 [in] ID2D1StrokeStyle *stroke_style
493 HRESULT DrawGeometry(
494 [in] ID2D1Geometry *geometry,
495 [in] ID2D1Brush *brush,
496 [in] float stroke_width,
497 [in] ID2D1StrokeStyle *stroke_style
499 HRESULT DrawRectangle(
500 [in] const D2D1_RECT_F *rect,
501 [in] ID2D1Brush *brush,
502 [in] float stroke_width,
503 [in] ID2D1StrokeStyle *stroke_style
505 HRESULT DrawBitmap(
506 [in] ID2D1Bitmap *bitmap,
507 [in] const D2D1_RECT_F *dst_rect,
508 [in] float opacity,
509 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
510 [in] const D2D1_RECT_F *src_rect,
511 [in] const D2D1_MATRIX_4X4_F *perspective_transform
513 HRESULT DrawImage(
514 [in] ID2D1Image *image,
515 [in] const D2D1_POINT_2F *target_offset,
516 [in] const D2D1_POINT_2F *image_rect,
517 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
518 [in] D2D1_COMPOSITE_MODE composite_mode
520 HRESULT DrawGdiMetafile(
521 [in] ID2D1GdiMetafile *metafile,
522 [in] const D2D1_POINT_2F *target_offset
524 HRESULT FillMesh(
525 [in] ID2D1Mesh *mesh,
526 [in] ID2D1Brush *brush
528 HRESULT FillOpacityMask(
529 [in] ID2D1Bitmap *bitmap,
530 [in] ID2D1Brush *brush,
531 [in] const D2D1_RECT_F *dst_rect,
532 [in] const D2D1_RECT_F *src_rect
534 HRESULT FillGeometry(
535 [in] ID2D1Geometry *geometry,
536 [in] ID2D1Brush *brush,
537 [in] ID2D1Brush *opacity_brush
539 HRESULT FillRectangle(
540 [in] const D2D1_RECT_F *rect,
541 [in] ID2D1Brush *brush
543 HRESULT PushAxisAlignedClip(
544 [in] const D2D1_RECT_F *clip_rect,
545 [in] D2D1_ANTIALIAS_MODE antialias_mode
547 HRESULT PushLayer(
548 [in] const D2D1_LAYER_PARAMETERS1 *layer_parameters,
549 [in] ID2D1Layer *layer
551 HRESULT PopAxisAlignedClip();
552 HRESULT PopLayer();
556 object,
557 uuid(b4f34a19-2383-4d76-94f6-ec343657c3dc),
558 local,
560 interface ID2D1CommandList : ID2D1Image
562 HRESULT Stream(
563 [in] ID2D1CommandSink *sink
565 HRESULT Close();
569 object,
570 uuid(e8f7fe7a-191c-466d-ad95-975678bda998),
571 local,
573 interface ID2D1DeviceContext : ID2D1RenderTarget
575 HRESULT CreateBitmap(
576 [in] D2D1_SIZE_U size,
577 [in] const void *src_data,
578 [in] UINT32 pitch,
579 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
580 [out] ID2D1Bitmap1 **bitmap
582 HRESULT CreateBitmapFromWicBitmap(
583 [in] IWICBitmapSource *bitmap_source,
584 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
585 [out] ID2D1Bitmap1 **bitmap
587 HRESULT CreateColorContext(
588 [in] D2D1_COLOR_SPACE space,
589 [in] const BYTE *profile,
590 [in] UINT32 profile_size,
591 [out] ID2D1ColorContext **color_context
593 HRESULT CreateColorContextFromFilename(
594 [in] const WCHAR *filename,
595 [out] ID2D1ColorContext **color_context
597 HRESULT CreateColorContextFromWicColorContext(
598 [in] IWICColorContext *wic_color_context,
599 [out] ID2D1ColorContext **color_context
601 HRESULT CreateBitmapFromDxgiSurface(
602 [in] IDXGISurface *surface,
603 [in] const D2D1_BITMAP_PROPERTIES1 *desc,
604 [out] ID2D1Bitmap1 **bitmap
606 HRESULT CreateEffect(
607 [in] REFCLSID effect_id,
608 [out] ID2D1Effect **effect
610 HRESULT CreateGradientStopCollection(
611 [in] const D2D1_GRADIENT_STOP *stops,
612 [in] UINT32 stop_count,
613 [in] D2D1_COLOR_SPACE preinterpolation_space,
614 [in] D2D1_COLOR_SPACE postinterpolation_space,
615 [in] D2D1_BUFFER_PRECISION buffer_precision,
616 [in] D2D1_EXTEND_MODE extend_mode,
617 [in] D2D1_COLOR_INTERPOLATION_MODE color_interpolation_mode,
618 [out] ID2D1GradientStopCollection1 **gradient
620 HRESULT CreateImageBrush(
621 [in] ID2D1Image *image,
622 [in] const D2D1_IMAGE_BRUSH_PROPERTIES *image_brush_desc,
623 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
624 [out] ID2D1ImageBrush **brush
626 HRESULT CreateBitmapBrush(
627 [in] ID2D1Bitmap *bitmap,
628 [in] const D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmap_brush_desc,
629 [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
630 [out] ID2D1BitmapBrush1 **bitmap_brush
632 HRESULT CreateCommandList(
633 [out] ID2D1CommandList **command_list
635 BOOL IsDxgiFormatSupported(
636 [in] DXGI_FORMAT format
638 BOOL IsBufferPrecisionSupported(
639 [in] D2D1_BUFFER_PRECISION buffer_precision
641 void GetImageLocalBounds(
642 [in] ID2D1Image *image,
643 [out] D2D1_RECT_F *local_bounds
645 HRESULT GetImageWorldBounds(
646 [in] ID2D1Image *image,
647 [out] D2D1_RECT_F *world_bounds
649 HRESULT GetGlyphRunWorldBounds(
650 [in] D2D1_POINT_2F baseline_origin,
651 [in] const DWRITE_GLYPH_RUN *glyph_run,
652 [in] DWRITE_MEASURING_MODE measuring_mode,
653 [out] D2D1_RECT_F *bounds
655 void GetDevice(
656 [out] ID2D1Device **device
658 void SetTarget(
659 [in] ID2D1Image *target
661 void GetTarget(
662 [out] ID2D1Image **target
664 void SetRenderingControls(
665 [in] const D2D1_RENDERING_CONTROLS *rendering_controls
667 void GetRenderingControls(
668 [out] D2D1_RENDERING_CONTROLS *rendering_controls
670 void SetPrimitiveBlend(
671 [in] D2D1_PRIMITIVE_BLEND primitive_blend
673 D2D1_PRIMITIVE_BLEND GetPrimitiveBlend();
674 void SetUnitMode(
675 [in] D2D1_UNIT_MODE unit_mode
677 D2D1_UNIT_MODE GetUnitMode();
678 void DrawGlyphRun(
679 [in] D2D1_POINT_2F baseline_origin,
680 [in] const DWRITE_GLYPH_RUN *glyph_run,
681 [in] const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc,
682 [in] ID2D1Brush *brush,
683 [in] DWRITE_MEASURING_MODE measuring_mode
685 void DrawImage(
686 [in] ID2D1Image *image,
687 [in] const D2D1_POINT_2F *target_offset,
688 [in] const D2D1_RECT_F *image_rect,
689 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
690 [in] D2D1_COMPOSITE_MODE composite_mode
692 void DrawGdiMetafile(
693 [in] ID2D1GdiMetafile *metafile,
694 [in] const D2D1_POINT_2F *target_offset
696 void DrawBitmap(
697 [in] ID2D1Bitmap *bitmap,
698 [in] const D2D1_RECT_F *dst_rect,
699 [in] float opacity,
700 [in] D2D1_INTERPOLATION_MODE interpolation_mode,
701 [in] const D2D1_RECT_F *src_rect,
702 [in] const D2D1_MATRIX_4X4_F *perspective_transform
704 void PushLayer(
705 [in] const D2D1_LAYER_PARAMETERS1 *layer_parameters,
706 [in] ID2D1Layer *layer
708 HRESULT InvalidateEffectInputRectangle(
709 [in] ID2D1Effect *effect,
710 [in] UINT32 input,
711 [in] const D2D1_RECT_F *input_rect
713 HRESULT GetEffectInvalidRectangleCount(
714 [in] ID2D1Effect *effect,
715 [out] UINT32 *rect_count
717 HRESULT GetEffectInvalidRectangles(
718 [in] ID2D1Effect *effect,
719 [out] D2D1_RECT_F *rectangles,
720 [in] UINT32 rect_count
722 HRESULT GetEffectRequiredInputRectangles(
723 [in] ID2D1Effect *effect,
724 [in] const D2D1_RECT_F *image_rect,
725 [in] const D2D1_EFFECT_INPUT_DESCRIPTION *desc,
726 [out] D2D1_RECT_F *input_rect,
727 [in] UINT32 input_count
729 void FillOpacityMask(
730 [in] ID2D1Bitmap *mask,
731 [in] ID2D1Brush *brush,
732 [in] const D2D1_RECT_F *dst_rect,
733 [in] const D2D1_RECT_F *src_rect
738 object,
739 uuid(bb12d362-daee-4b9a-aa1d-14ba401cfa1f),
740 local,
742 interface ID2D1Factory1 : ID2D1Factory
744 HRESULT CreateDevice(
745 [in] IDXGIDevice *dxgi_device,
746 [out] ID2D1Device **device
748 HRESULT CreateStrokeStyle(
749 [in] const D2D1_STROKE_STYLE_PROPERTIES1 *desc,
750 [in, size_is(dash_count)] const float *dashes,
751 [in] UINT32 dash_count,
752 [out] ID2D1StrokeStyle1 **stroke_style
754 HRESULT CreatePathGeometry(
755 [out] ID2D1PathGeometry1 **geometry
757 HRESULT CreateDrawingStateBlock(
758 [in] const D2D1_DRAWING_STATE_DESCRIPTION1 *desc,
759 [in] IDWriteRenderingParams *text_rendering_params,
760 [out] ID2D1DrawingStateBlock1 **state_block
762 HRESULT CreateGdiMetafile(
763 [in] IStream *stream,
764 [out] ID2D1GdiMetafile **metafile
766 HRESULT RegisterEffectFromStream(
767 [in] REFCLSID effect_id,
768 [in] IStream *property_xml,
769 [in, size_is(binding_count)] const D2D1_PROPERTY_BINDING *bindings,
770 [in] UINT32 binding_count,
771 [in] PD2D1_EFFECT_FACTORY effect_factory
773 HRESULT RegisterEffectFromString(
774 [in] REFCLSID effect_id,
775 [in] const WCHAR *property_xml,
776 [in, size_is(binding_count)] const D2D1_PROPERTY_BINDING *bindings,
777 [in] UINT32 binding_count,
778 [in] PD2D1_EFFECT_FACTORY effect_factory
780 HRESULT UnregisterEffect(
781 [in] REFCLSID effect_id
783 HRESULT GetRegisteredEffects(
784 [out, size_is(effect_count)] CLSID *effects,
785 [in] UINT32 effect_count,
786 [out] UINT32 *returned,
787 [out] UINT32 *registered
789 HRESULT GetEffectProperties(
790 [in] REFCLSID effect_id,
791 [out] ID2D1Properties **props
795 [local] HRESULT __stdcall D2D1CreateDevice(IDXGIDevice *dxgi_device,
796 const D2D1_CREATION_PROPERTIES *creation_properties, ID2D1Device **device);