source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/d2d1_1.h

Last change on this file was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 68.6 KB
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6
7#ifndef _D2D1_1_H_
8#define _D2D1_1_H_
9
10#include <d2d1.h>
11#include <d2d1effects.h>
12#include <dxgi.h>
13
14#include <winapifamily.h>
15
16#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
17
18typedef interface ID2D1ColorContext ID2D1ColorContext;
19typedef interface IWICColorContext IWICColorContext;
20typedef interface IWICImagingFactory IWICImagingFactory;
21typedef interface IPrintDocumentPackageTarget IPrintDocumentPackageTarget;
22typedef interface IDWriteFactory IDWriteFactory;
23
24typedef struct D2D1_PROPERTY_BINDING D2D1_PROPERTY_BINDING;
25
26#ifndef D2D_USE_C_DEFINITIONS
27interface ID2D1Device;
28interface ID2D1Effect;
29#else
30typedef interface ID2D1Device ID2D1Device;
31typedef interface ID2D1Effect ID2D1Effect;
32#endif
33
34typedef struct DWRITE_GLYPH_RUN_DESCRIPTION DWRITE_GLYPH_RUN_DESCRIPTION;
35
36typedef HRESULT (CALLBACK *PD2D1_EFFECT_FACTORY)(IUnknown**);
37
38typedef D2D_RECT_L D2D1_RECT_L;
39
40typedef enum D2D1_PROPERTY_TYPE {
41 D2D1_PROPERTY_TYPE_UNKNOWN = 0,
42 D2D1_PROPERTY_TYPE_STRING = 1,
43 D2D1_PROPERTY_TYPE_BOOL = 2,
44 D2D1_PROPERTY_TYPE_UINT32 = 3,
45 D2D1_PROPERTY_TYPE_INT32 = 4,
46 D2D1_PROPERTY_TYPE_FLOAT = 5,
47 D2D1_PROPERTY_TYPE_VECTOR2 = 6,
48 D2D1_PROPERTY_TYPE_VECTOR3 = 7,
49 D2D1_PROPERTY_TYPE_VECTOR4 = 8,
50 D2D1_PROPERTY_TYPE_BLOB = 9,
51 D2D1_PROPERTY_TYPE_IUNKNOWN = 10,
52 D2D1_PROPERTY_TYPE_ENUM = 11,
53 D2D1_PROPERTY_TYPE_ARRAY = 12,
54 D2D1_PROPERTY_TYPE_CLSID = 13,
55 D2D1_PROPERTY_TYPE_MATRIX_3X2 = 14,
56 D2D1_PROPERTY_TYPE_MATRIX_4X3 = 15,
57 D2D1_PROPERTY_TYPE_MATRIX_4X4 = 16,
58 D2D1_PROPERTY_TYPE_MATRIX_5X4 = 17,
59 D2D1_PROPERTY_TYPE_COLOR_CONTEXT = 18,
60 D2D1_PROPERTY_TYPE_FORCE_DWORD = 0xffffffff
61} D2D1_PROPERTY_TYPE;
62
63typedef enum D2D1_PROPERTY {
64 D2D1_PROPERTY_CLSID = 0x80000000,
65 D2D1_PROPERTY_DISPLAYNAME = 0x80000001,
66 D2D1_PROPERTY_AUTHOR = 0x80000002,
67 D2D1_PROPERTY_CATEGORY = 0x80000003,
68 D2D1_PROPERTY_DESCRIPTION = 0x80000004,
69 D2D1_PROPERTY_INPUTS = 0x80000005,
70 D2D1_PROPERTY_CACHED = 0x80000006,
71 D2D1_PROPERTY_PRECISION = 0x80000007,
72 D2D1_PROPERTY_MIN_INPUTS = 0x80000008,
73 D2D1_PROPERTY_MAX_INPUTS = 0x80000009,
74 D2D1_PROPERTY_FORCE_DWORD = 0xffffffff
75} D2D1_PROPERTY;
76
77typedef enum D2D1_SUBPROPERTY {
78 D2D1_SUBPROPERTY_DISPLAYNAME = 0x80000000,
79 D2D1_SUBPROPERTY_ISREADONLY = 0x80000001,
80 D2D1_SUBPROPERTY_MIN = 0x80000002,
81 D2D1_SUBPROPERTY_MAX = 0x80000003,
82 D2D1_SUBPROPERTY_DEFAULT = 0x80000004,
83 D2D1_SUBPROPERTY_FIELDS = 0x80000005,
84 D2D1_SUBPROPERTY_INDEX = 0x80000006,
85 D2D1_SUBPROPERTY_FORCE_DWORD = 0xffffffff
86} D2D1_SUBPROPERTY;
87
88typedef enum D2D1_CHANNEL_DEPTH {
89 D2D1_CHANNEL_DEPTH_DEFAULT = 0,
90 D2D1_CHANNEL_DEPTH_1 = 1,
91 D2D1_CHANNEL_DEPTH_4 = 4,
92 D2D1_CHANNEL_DEPTH_FORCE_DWORD = 0xffffffff
93} D2D1_CHANNEL_DEPTH;
94
95typedef enum D2D1_BUFFER_PRECISION {
96 D2D1_BUFFER_PRECISION_UNKNOWN = 0,
97 D2D1_BUFFER_PRECISION_8BPC_UNORM = 1,
98 D2D1_BUFFER_PRECISION_8BPC_UNORM_SRGB = 2,
99 D2D1_BUFFER_PRECISION_16BPC_UNORM = 3,
100 D2D1_BUFFER_PRECISION_16BPC_FLOAT = 4,
101 D2D1_BUFFER_PRECISION_32BPC_FLOAT = 5,
102 D2D1_BUFFER_PRECISION_FORCE_DWORD = 0xffffffff
103} D2D1_BUFFER_PRECISION;
104
105typedef enum D2D1_COLOR_SPACE {
106 D2D1_COLOR_SPACE_CUSTOM = 0,
107 D2D1_COLOR_SPACE_SRGB = 1,
108 D2D1_COLOR_SPACE_SCRGB = 2,
109 D2D1_COLOR_SPACE_FORCE_DWORD = 0xffffffff
110} D2D1_COLOR_SPACE;
111
112typedef enum D2D1_DEVICE_CONTEXT_OPTIONS {
113 D2D1_DEVICE_CONTEXT_OPTIONS_NONE = 0,
114 D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS = 1,
115 D2D1_DEVICE_CONTEXT_OPTIONS_FORCE_DWORD = 0xffffffff
116} D2D1_DEVICE_CONTEXT_OPTIONS;
117
118DEFINE_ENUM_FLAG_OPERATORS(D2D1_DEVICE_CONTEXT_OPTIONS);
119
120typedef enum D2D1_BITMAP_OPTIONS {
121 D2D1_BITMAP_OPTIONS_NONE = 0x00000000,
122 D2D1_BITMAP_OPTIONS_TARGET = 0x00000001,
123 D2D1_BITMAP_OPTIONS_CANNOT_DRAW = 0x00000002,
124 D2D1_BITMAP_OPTIONS_CPU_READ = 0x00000004,
125 D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE = 0x00000008,
126 D2D1_BITMAP_OPTIONS_FORCE_DWORD = 0xffffffff
127} D2D1_BITMAP_OPTIONS;
128
129DEFINE_ENUM_FLAG_OPERATORS(D2D1_BITMAP_OPTIONS);
130
131typedef enum D2D1_MAP_OPTIONS {
132 D2D1_MAP_OPTIONS_NONE = 0,
133 D2D1_MAP_OPTIONS_READ = 1,
134 D2D1_MAP_OPTIONS_WRITE = 2,
135 D2D1_MAP_OPTIONS_DISCARD = 4,
136 D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff
137} D2D1_MAP_OPTIONS;
138
139DEFINE_ENUM_FLAG_OPERATORS(D2D1_MAP_OPTIONS);
140
141typedef enum D2D1_COLOR_INTERPOLATION_MODE {
142 D2D1_COLOR_INTERPOLATION_MODE_STRAIGHT = 0,
143 D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED = 1,
144 D2D1_COLOR_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff
145} D2D1_COLOR_INTERPOLATION_MODE;
146
147typedef enum D2D1_INTERPOLATION_MODE {
148 D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR,
149 D2D1_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
150 D2D1_INTERPOLATION_MODE_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC,
151 D2D1_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR,
152 D2D1_INTERPOLATION_MODE_ANISOTROPIC = D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC,
153 D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC,
154 D2D1_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff
155} D2D1_INTERPOLATION_MODE;
156
157typedef enum D2D1_COMPOSITE_MODE {
158 D2D1_COMPOSITE_MODE_SOURCE_OVER = 0,
159 D2D1_COMPOSITE_MODE_DESTINATION_OVER = 1,
160 D2D1_COMPOSITE_MODE_SOURCE_IN = 2,
161 D2D1_COMPOSITE_MODE_DESTINATION_IN = 3,
162 D2D1_COMPOSITE_MODE_SOURCE_OUT = 4,
163 D2D1_COMPOSITE_MODE_DESTINATION_OUT = 5,
164 D2D1_COMPOSITE_MODE_SOURCE_ATOP = 6,
165 D2D1_COMPOSITE_MODE_DESTINATION_ATOP = 7,
166 D2D1_COMPOSITE_MODE_XOR = 8,
167 D2D1_COMPOSITE_MODE_PLUS = 9,
168 D2D1_COMPOSITE_MODE_SOURCE_COPY = 10,
169 D2D1_COMPOSITE_MODE_BOUNDED_SOURCE_COPY = 11,
170 D2D1_COMPOSITE_MODE_MASK_INVERT = 12,
171 D2D1_COMPOSITE_MODE_FORCE_DWORD = 0xffffffff
172} D2D1_COMPOSITE_MODE;
173
174typedef enum D2D1_PRIMITIVE_BLEND {
175 D2D1_PRIMITIVE_BLEND_SOURCE_OVER = 0,
176 D2D1_PRIMITIVE_BLEND_COPY = 1,
177 D2D1_PRIMITIVE_BLEND_MIN = 2,
178 D2D1_PRIMITIVE_BLEND_ADD = 3,
179 D2D1_PRIMITIVE_BLEND_FORCE_DWORD = 0xffffffff
180} D2D1_PRIMITIVE_BLEND;
181
182typedef enum D2D1_THREADING_MODE {
183 D2D1_THREADING_MODE_SINGLE_THREADED = D2D1_FACTORY_TYPE_SINGLE_THREADED,
184 D2D1_THREADING_MODE_MULTI_THREADED = D2D1_FACTORY_TYPE_MULTI_THREADED,
185 D2D1_THREADING_MODE_FORCE_DWORD = 0xffffffff
186} D2D1_THREADING_MODE;
187
188typedef enum D2D1_UNIT_MODE {
189 D2D1_UNIT_MODE_DIPS = 0,
190 D2D1_UNIT_MODE_PIXELS = 1,
191 D2D1_UNIT_MODE_FORCE_DWORD = 0xffffffff
192} D2D1_UNIT_MODE;
193
194typedef enum D2D1_LAYER_OPTIONS1 {
195 D2D1_LAYER_OPTIONS1_NONE = 0,
196 D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND = 1,
197 D2D1_LAYER_OPTIONS1_IGNORE_ALPHA = 2,
198 D2D1_LAYER_OPTIONS1_FORCE_DWORD = 0xffffffff
199} D2D1_LAYER_OPTIONS1;
200
201DEFINE_ENUM_FLAG_OPERATORS(D2D1_LAYER_OPTIONS1);
202
203typedef enum D2D1_PRINT_FONT_SUBSET_MODE {
204 D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT = 0,
205 D2D1_PRINT_FONT_SUBSET_MODE_EACHPAGE = 1,
206 D2D1_PRINT_FONT_SUBSET_MODE_NONE = 2,
207 D2D1_PRINT_FONT_SUBSET_MODE_FORCE_DWORD = 0xffffffff
208} D2D1_PRINT_FONT_SUBSET_MODE;
209
210typedef enum D2D1_STROKE_TRANSFORM_TYPE {
211 D2D1_STROKE_TRANSFORM_TYPE_NORMAL = 0,
212 D2D1_STROKE_TRANSFORM_TYPE_FIXED = 1,
213 D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE = 2,
214 D2D1_STROKE_TRANSFORM_TYPE_FORCE_DWORD = 0xffffffff
215} D2D1_STROKE_TRANSFORM_TYPE;
216
217typedef struct D2D1_BITMAP_PROPERTIES1 {
218 D2D1_PIXEL_FORMAT pixelFormat;
219 FLOAT dpiX;
220 FLOAT dpiY;
221 D2D1_BITMAP_OPTIONS bitmapOptions;
222 ID2D1ColorContext *colorContext;
223} D2D1_BITMAP_PROPERTIES1;
224
225typedef struct D2D1_MAPPED_RECT {
226 UINT32 pitch;
227 BYTE *bits;
228} D2D1_MAPPED_RECT;
229
230typedef struct D2D1_IMAGE_BRUSH_PROPERTIES {
231 D2D1_RECT_F sourceRectangle;
232 D2D1_EXTEND_MODE extendModeX;
233 D2D1_EXTEND_MODE extendModeY;
234 D2D1_INTERPOLATION_MODE interpolationMode;
235} D2D1_IMAGE_BRUSH_PROPERTIES;
236
237typedef struct D2D1_BITMAP_BRUSH_PROPERTIES1 {
238 D2D1_EXTEND_MODE extendModeX;
239 D2D1_EXTEND_MODE extendModeY;
240 D2D1_INTERPOLATION_MODE interpolationMode;
241} D2D1_BITMAP_BRUSH_PROPERTIES1;
242
243typedef D2D_MATRIX_4X3_F D2D1_MATRIX_4X3_F;
244typedef D2D_MATRIX_4X4_F D2D1_MATRIX_4X4_F;
245typedef D2D_MATRIX_5X4_F D2D1_MATRIX_5X4_F;
246typedef D2D_VECTOR_2F D2D1_VECTOR_2F;
247typedef D2D_VECTOR_3F D2D1_VECTOR_3F;
248typedef D2D_VECTOR_4F D2D1_VECTOR_4F;
249
250typedef struct D2D1_LAYER_PARAMETERS1 {
251 D2D1_RECT_F contentBounds;
252 ID2D1Geometry *geometricMask;
253 D2D1_ANTIALIAS_MODE maskAntialiasMode;
254 D2D1_MATRIX_3X2_F maskTransform;
255 FLOAT opacity;
256 ID2D1Brush *opacityBrush;
257 D2D1_LAYER_OPTIONS1 layerOptions;
258} D2D1_LAYER_PARAMETERS1;
259
260typedef struct D2D1_RENDERING_CONTROLS {
261 D2D1_BUFFER_PRECISION bufferPrecision;
262 D2D1_SIZE_U tileSize;
263} D2D1_RENDERING_CONTROLS;
264
265typedef struct D2D1_EFFECT_INPUT_DESCRIPTION {
266 ID2D1Effect *effect;
267 UINT32 inputIndex;
268 D2D1_RECT_F inputRectangle;
269} D2D1_EFFECT_INPUT_DESCRIPTION;
270
271typedef struct D2D1_PRINT_CONTROL_PROPERTIES {
272 D2D1_PRINT_FONT_SUBSET_MODE fontSubset;
273 FLOAT rasterDPI;
274 D2D1_COLOR_SPACE colorSpace;
275} D2D1_PRINT_CONTROL_PROPERTIES;
276
277typedef struct D2D1_CREATION_PROPERTIES {
278 D2D1_THREADING_MODE threadingMode;
279 D2D1_DEBUG_LEVEL debugLevel;
280 D2D1_DEVICE_CONTEXT_OPTIONS options;
281} D2D1_CREATION_PROPERTIES;
282
283typedef struct D2D1_STROKE_STYLE_PROPERTIES1 {
284 D2D1_CAP_STYLE startCap;
285 D2D1_CAP_STYLE endCap;
286 D2D1_CAP_STYLE dashCap;
287 D2D1_LINE_JOIN lineJoin;
288 FLOAT miterLimit;
289 D2D1_DASH_STYLE dashStyle;
290 FLOAT dashOffset;
291 D2D1_STROKE_TRANSFORM_TYPE transformType;
292} D2D1_STROKE_STYLE_PROPERTIES1;
293
294typedef struct D2D1_DRAWING_STATE_DESCRIPTION1 {
295 D2D1_ANTIALIAS_MODE antialiasMode;
296 D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
297 D2D1_TAG tag1;
298 D2D1_TAG tag2;
299 D2D1_MATRIX_3X2_F transform;
300 D2D1_PRIMITIVE_BLEND primitiveBlend;
301 D2D1_UNIT_MODE unitMode;
302} D2D1_DRAWING_STATE_DESCRIPTION1;
303
304typedef struct D2D1_POINT_DESCRIPTION {
305 D2D1_POINT_2F point;
306 D2D1_POINT_2F unitTangentVector;
307 UINT32 endSegment;
308 UINT32 endFigure;
309 FLOAT lengthToEndSegment;
310} D2D1_POINT_DESCRIPTION;
311
312#ifndef D2D_USE_C_DEFINITIONS
313
314interface ID2D1Properties : public IUnknown
315{
316 STDMETHOD_(UINT32, GetPropertyCount)() CONST PURE;
317 STDMETHOD(GetPropertyName)(UINT32 index, PWSTR name, UINT32 nameCount) CONST PURE;
318 STDMETHOD_(UINT32, GetPropertyNameLength)(UINT32 index) CONST PURE;
319 STDMETHOD_(D2D1_PROPERTY_TYPE, GetType)(UINT32 index) CONST PURE;
320 STDMETHOD_(UINT32, GetPropertyIndex)(PCWSTR name) CONST PURE;
321 STDMETHOD(SetValueByName)(PCWSTR name, D2D1_PROPERTY_TYPE type, CONST BYTE *data, UINT32 dataSize) PURE;
322 STDMETHOD(SetValue)(UINT32 index, D2D1_PROPERTY_TYPE type, CONST BYTE *data, UINT32 dataSize) PURE;
323 STDMETHOD(GetValueByName)(PCWSTR name, D2D1_PROPERTY_TYPE type, BYTE *data, UINT32 dataSize) CONST PURE;
324 STDMETHOD(GetValue)(UINT32 index, D2D1_PROPERTY_TYPE type, BYTE *data, UINT32 dataSize) CONST PURE;
325 STDMETHOD_(UINT32, GetValueSize)(UINT32 index) CONST PURE;
326 STDMETHOD(GetSubProperties)(UINT32 index, ID2D1Properties **subProperties) CONST PURE;
327
328 HRESULT SetValueByName(PCWSTR name, CONST BYTE *data, UINT32 dataSize) {
329 return SetValueByName(name, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize);
330 }
331
332 HRESULT SetValue(UINT32 index, CONST BYTE *data, UINT32 dataSize) {
333 return SetValue(index, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize);
334 }
335
336 HRESULT GetValueByName(PCWSTR name, BYTE *data, UINT32 dataSize) CONST {
337 return GetValueByName(name, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize);
338 }
339
340 HRESULT GetValue(UINT32 index, BYTE *data, UINT32 dataSize) CONST {
341 return GetValue(index, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize);
342 }
343
344 template<typename T>
345 HRESULT GetValueByName(PCWSTR propertyName, T *value) const {
346 return GetValueByName(propertyName, reinterpret_cast<BYTE*>(value), sizeof(*value));
347 }
348
349 template<typename T>
350 T GetValueByName(PCWSTR propertyName) const {
351 T ret;
352 GetValueByName(propertyName, reinterpret_cast<BYTE*>(&ret), sizeof(ret));
353 return ret;
354 }
355
356 template<typename T>
357 HRESULT SetValueByName(PCWSTR propertyName, const T &value) {
358 return SetValueByName(propertyName, reinterpret_cast<const BYTE*>(&value), sizeof(value));
359 }
360
361 template<typename T>
362 HRESULT GetValue(T index, BYTE *data, UINT32 dataSize) CONST {
363 return GetValue(static_cast<UINT32>(index), data, dataSize);
364 }
365
366 template<typename T, typename U>
367 HRESULT GetValue(U index, T *value) const {
368 return GetValue(static_cast<UINT32>(index), reinterpret_cast<BYTE*>(value), sizeof(*value));
369 }
370
371 template<typename T, typename U>
372 T GetValue(U index) const {
373 T ret;
374 GetValue(static_cast<UINT32>(index), reinterpret_cast<BYTE*>(&ret), sizeof(ret));
375 return ret;
376 }
377
378 template<typename T>
379 HRESULT SetValue(T index, CONST BYTE *data, UINT32 dataSize) {
380 return SetValue(static_cast<UINT32>(index), data, dataSize);
381 }
382
383 template<typename T, typename U>
384 HRESULT SetValue(U index, const T &value) {
385 return SetValue(static_cast<UINT32>(index), reinterpret_cast<const BYTE*>(&value), sizeof(value));
386 }
387
388 template<typename T>
389 HRESULT GetPropertyName(T index, PWSTR name, UINT32 nameCount) CONST {
390 return GetPropertyName(static_cast<UINT32>(index), name, nameCount);
391 }
392
393 template<typename T>
394 UINT32 GetPropertyNameLength(T index) CONST {
395 return GetPropertyNameLength(static_cast<UINT32>(index));
396 }
397
398 template<typename T>
399 D2D1_PROPERTY_TYPE GetType(T index) CONST {
400 return GetType(static_cast<UINT32>(index));
401 }
402
403 template<typename T>
404 UINT32 GetValueSize(T index) CONST {
405 return GetValueSize(static_cast<UINT32>(index));
406 }
407
408 template<typename T>
409 HRESULT GetSubProperties(T index, ID2D1Properties **subProperties) CONST {
410 return GetSubProperties(static_cast<UINT32>(index), subProperties);
411 }
412};
413
414#else
415
416typedef interface ID2D1Properties ID2D1Properties;
417/* FIXME: Add full C declaration */
418
419#endif
420
421DEFINE_GUID(IID_ID2D1Properties,0x483473d7,0xcd46,0x4f9d,0x9d,0x3a,0x31,0x12,0xaa,0x80,0x15,0x9d);
422__CRT_UUID_DECL(ID2D1Properties,0x483473d7,0xcd46,0x4f9d,0x9d,0x3a,0x31,0x12,0xaa,0x80,0x15,0x9d);
423
424#ifndef D2D_USE_C_DEFINITIONS
425
426interface ID2D1GdiMetafileSink : public IUnknown
427{
428 STDMETHOD(ProcessRecord)(DWORD recordType, CONST void *recordData, DWORD recordDataSize) PURE;
429};
430
431#else
432
433typedef interface ID2D1GdiMetafileSink ID2D1GdiMetafileSink;
434/* FIXME: Add full C declaration */
435
436#endif
437
438DEFINE_GUID(IID_ID2D1GdiMetafileSink, 0x82237326,0x8111,0x4f7c,0xbc,0xf4,0xb5,0xc1,0x17,0x55,0x64,0xfe);
439__CRT_UUID_DECL(ID2D1GdiMetafileSink, 0x82237326,0x8111,0x4f7c,0xbc,0xf4,0xb5,0xc1,0x17,0x55,0x64,0xfe);
440
441#ifndef D2D_USE_C_DEFINITIONS
442
443interface ID2D1GdiMetafile : public ID2D1Resource
444{
445 STDMETHOD(Stream)(ID2D1GdiMetafileSink *sink) PURE;
446 STDMETHOD(GetBounds)(D2D1_RECT_F *bounds) PURE;
447};
448
449#else
450
451typedef interface ID2D1GdiMetafile ID2D1GdiMetafile;
452/* FIXME: Add full C declaration */
453
454#endif
455
456DEFINE_GUID(IID_ID2D1GdiMetafile, 0x2f543dc3,0xcfc1,0x4211,0x86,0x4f,0xcf,0xd9,0x1c,0x6f,0x33,0x95);
457__CRT_UUID_DECL(ID2D1GdiMetafile, 0x2f543dc3,0xcfc1,0x4211,0x86,0x4f,0xcf,0xd9,0x1c,0x6f,0x33,0x95);
458
459#ifndef D2D_USE_C_DEFINITIONS
460
461interface ID2D1StrokeStyle1 : public ID2D1StrokeStyle
462{
463 STDMETHOD_(D2D1_STROKE_TRANSFORM_TYPE, GetStrokeTransformType)() CONST PURE;
464};
465
466#else
467
468typedef interface ID2D1StrokeStyle1 ID2D1StrokeStyle1;
469/* FIXME: Add full C declaration */
470
471#endif
472
473DEFINE_GUID(IID_ID2D1StrokeStyle1, 0x10a72a66,0xe91c,0x43f4,0x99,0x3f,0xdd,0xf4,0xb8,0x2b,0x0b,0x4a);
474__CRT_UUID_DECL(ID2D1StrokeStyle1, 0x10a72a66,0xe91c,0x43f4,0x99,0x3f,0xdd,0xf4,0xb8,0x2b,0x0b,0x4a);
475
476#ifndef D2D_USE_C_DEFINITIONS
477
478interface ID2D1CommandSink : public IUnknown
479{
480 STDMETHOD(BeginDraw)() PURE;
481 STDMETHOD(EndDraw)() PURE;
482 STDMETHOD(SetAntialiasMode)(D2D1_ANTIALIAS_MODE antialiasMode) PURE;
483 STDMETHOD(SetTags)(D2D1_TAG tag1, D2D1_TAG tag2) PURE;
484 STDMETHOD(SetTextAntialiasMode)(D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode) PURE;
485 STDMETHOD(SetTextRenderingParams)(IDWriteRenderingParams *textRenderingParams) PURE;
486 STDMETHOD(SetTransform)(CONST D2D1_MATRIX_3X2_F *transform) PURE;
487 STDMETHOD(SetPrimitiveBlend)(D2D1_PRIMITIVE_BLEND primitiveBlend) PURE;
488 STDMETHOD(SetUnitMode)(D2D1_UNIT_MODE unitMode) PURE;
489 STDMETHOD(Clear)(CONST D2D1_COLOR_F *color) PURE;
490 STDMETHOD(DrawGlyphRun)(D2D1_POINT_2F baselineOrigin, CONST DWRITE_GLYPH_RUN *glyphRun,
491 CONST DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription, ID2D1Brush *foregroundBrush,
492 DWRITE_MEASURING_MODE measuringMode) PURE;
493 STDMETHOD(DrawLine)(D2D1_POINT_2F point0, D2D1_POINT_2F point1, ID2D1Brush *brush, FLOAT strokeWidth,
494 ID2D1StrokeStyle *strokeStyle) PURE;
495 STDMETHOD(DrawGeometry)(ID2D1Geometry *geometry, ID2D1Brush *brush, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle) PURE;
496 STDMETHOD(DrawRectangle)(CONST D2D1_RECT_F *rect, ID2D1Brush *brush, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle) PURE;
497 STDMETHOD(DrawBitmap)(ID2D1Bitmap *bitmap, CONST D2D1_RECT_F *destinationRectangle, FLOAT opacity,
498 D2D1_INTERPOLATION_MODE interpolationMode, CONST D2D1_RECT_F *sourceRectangle,
499 CONST D2D1_MATRIX_4X4_F *perspectiveTransform) PURE;
500 STDMETHOD(DrawImage)(ID2D1Image *image, CONST D2D1_POINT_2F *targetOffset, CONST D2D1_RECT_F *imageRectangle,
501 D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode) PURE;
502 STDMETHOD(DrawGdiMetafile)(ID2D1GdiMetafile *gdiMetafile, CONST D2D1_POINT_2F *targetOffset) PURE;
503 STDMETHOD(FillMesh)(ID2D1Mesh *mesh, ID2D1Brush *brush) PURE;
504 STDMETHOD(FillOpacityMask)(ID2D1Bitmap *opacityMask, ID2D1Brush *brush, CONST D2D1_RECT_F *destinationRectangle,
505 CONST D2D1_RECT_F *sourceRectangle) PURE;
506 STDMETHOD(FillGeometry)(ID2D1Geometry *geometry, ID2D1Brush *brush, ID2D1Brush *opacityBrush) PURE;
507 STDMETHOD(FillRectangle)(CONST D2D1_RECT_F *rect, ID2D1Brush *brush) PURE;
508 STDMETHOD(PushAxisAlignedClip)(CONST D2D1_RECT_F *clipRect, D2D1_ANTIALIAS_MODE antialiasMode) PURE;
509 STDMETHOD(PushLayer)(CONST D2D1_LAYER_PARAMETERS1 *layerParameters1, ID2D1Layer *layer) PURE;
510 STDMETHOD(PopAxisAlignedClip)() PURE;
511 STDMETHOD(PopLayer)() PURE;
512};
513
514#else
515
516typedef interface ID2D1CommandSink ID2D1CommandSink;
517
518#endif
519
520DEFINE_GUID(IID_ID2D1CommandSink, 0x54d7898a,0xa061,0x40a7,0xbe,0xc7,0xe4,0x65,0xbc,0xba,0x2c,0x4f);
521__CRT_UUID_DECL(ID2D1CommandSink, 0x54d7898a,0xa061,0x40a7,0xbe,0xc7,0xe4,0x65,0xbc,0xba,0x2c,0x4f);
522
523#ifndef D2D_USE_C_DEFINITIONS
524
525interface ID2D1CommandList : public ID2D1Image
526{
527 STDMETHOD(Stream)(ID2D1CommandSink *sink) PURE;
528 STDMETHOD(Close)() PURE;
529};
530
531#else
532
533typedef interface ID2D1CommandList ID2D1CommandList;
534
535#endif
536
537DEFINE_GUID(IID_ID2D1CommandList, 0xb4f34a19,0x2383,0x4d76,0x94,0xf6,0xec,0x34,0x36,0x57,0xc3,0xdc);
538__CRT_UUID_DECL(ID2D1CommandList, 0xb4f34a19,0x2383,0x4d76,0x94,0xf6,0xec,0x34,0x36,0x57,0xc3,0xdc);
539
540#ifndef D2D_USE_C_DEFINITIONS
541
542interface ID2D1PrintControl : public IUnknown
543{
544 STDMETHOD(AddPage)(ID2D1CommandList *commandList, D2D_SIZE_F pageSize, IStream *pagePrintTicketStream,
545 D2D1_TAG *tag1 = NULL, D2D1_TAG *tag2 = NULL) PURE;
546 STDMETHOD(Close)() PURE;
547};
548
549#else
550
551typedef interface ID2D1PrintControl ID2D1PrintControl;
552
553#endif
554
555DEFINE_GUID(IID_ID2D1PrintControl, 0x2c1d867d,0xc290,0x41c8,0xae,0x7e,0x34,0xa9,0x87,0x02,0xe9,0xa5);
556__CRT_UUID_DECL(ID2D1PrintControl, 0x2c1d867d,0xc290,0x41c8,0xae,0x7e,0x34,0xa9,0x87,0x02,0xe9,0xa5);
557
558#ifndef D2D_USE_C_DEFINITIONS
559
560interface ID2D1Effect : public ID2D1Properties
561{
562 STDMETHOD_(void, SetInput)(UINT32 index, ID2D1Image *input, BOOL invalidate=TRUE) PURE;
563 STDMETHOD(SetInputCount)(UINT32 inputCount) PURE;
564 STDMETHOD_(void, GetInput)(UINT32 index, ID2D1Image **input) CONST PURE;
565 STDMETHOD_(UINT32, GetInputCount)() CONST PURE;
566 STDMETHOD_(void, GetOutput)(ID2D1Image **outputImage) CONST PURE;
567
568 void SetInputEffect(UINT32 index, ID2D1Effect *inputEffect, BOOL invalidate=TRUE) {
569 ID2D1Image *output = NULL;
570 if(inputEffect)
571 inputEffect->GetOutput(&output);
572 SetInput(index, output, invalidate);
573 if(output)
574 output->Release();
575 }
576};
577
578#else
579
580typedef interface ID2D1Effect ID2D1Effect;
581/* FIXME: Add full C declaration */
582
583#endif
584
585DEFINE_GUID(IID_ID2D1Effect,0x28211a43,0x7d89,0x476f,0x81,0x81,0x2d,0x61,0x59,0xb2,0x20,0xad);
586__CRT_UUID_DECL(ID2D1Effect,0x28211a43,0x7d89,0x476f,0x81,0x81,0x2d,0x61,0x59,0xb2,0x20,0xad);
587
588#endif
589
590#ifndef D2D_USE_C_DEFINITIONS
591
592interface ID2D1Bitmap1 : public ID2D1Bitmap
593{
594 STDMETHOD_(void, GetColorContext)(ID2D1ColorContext **colorContext) CONST PURE;
595 STDMETHOD_(D2D1_BITMAP_OPTIONS, GetOptions)() CONST PURE;
596 STDMETHOD(GetSurface)(IDXGISurface **dxgiSurface) CONST PURE;
597 STDMETHOD(Map)(D2D1_MAP_OPTIONS options, D2D1_MAPPED_RECT *mappedRect) PURE;
598 STDMETHOD(Unmap)() PURE;
599};
600
601#else
602
603typedef interface ID2D1Bitmap1 ID2D1Bitmap1;
604
605typedef struct ID2D1Bitmap1Vtbl {
606 ID2D1BitmapVtbl Base;
607
608 STDMETHOD_(void, GetColorContext)(ID2D1Bitmap1 *This, ID2D1ColorContext **colorContext) PURE;
609 STDMETHOD_(D2D1_BITMAP_OPTIONS, GetOptions)(ID2D1Bitmap1 *This) PURE;
610 STDMETHOD(GetSurface)(ID2D1Bitmap1 *This, IDXGISurface **dxgiSurface) PURE;
611 STDMETHOD(Map)(ID2D1Bitmap1 *This, D2D1_MAP_OPTIONS options, D2D1_MAPPED_RECT *mappedRect) PURE;
612 STDMETHOD(Unmap)(ID2D1Bitmap1 *This) PURE;
613}
614ID2D1Bitmap1Vtbl;
615
616interface ID2D1Bitmap1 {
617 const ID2D1Bitmap1Vtbl *lpVtbl;
618};
619
620/*** IUnknown methods ***/
621#define ID2D1Bitmap1_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
622#define ID2D1Bitmap1_AddRef(This) (This)->lpVtbl->AddRef(This)
623#define ID2D1Bitmap1_Release(This) (This)->lpVtbl->Release(This)
624/*** ID2D1Resource methods ***/
625#define ID2D1Bitmap1_GetFactory(This,factory) (This)->lpVtbl->GetFactory(This,factory)
626/*** ID2D1Bitmap methods ***/
627#define ID2D1Bitmap1_GetSize(This) ID2D1Bitmap1_GetSize_define_WIDL_C_INLINE_WRAPPERS_for_aggregate_return_support
628#define ID2D1Bitmap1_GetPixelSize(This) ID2D1Bitmap1_GetPixelSize_define_WIDL_C_INLINE_WRAPPERS_for_aggregate_return_support
629#define ID2D1Bitmap1_GetPixelFormat(This) ID2D1Bitmap1_GetPixelFormat_define_WIDL_C_INLINE_WRAPPERS_for_aggregate_return_support
630#define ID2D1Bitmap1_GetDpi(This,dpi_x,dpi_y) (This)->lpVtbl->GetDpi(This,dpi_x,dpi_y)
631#define ID2D1Bitmap1_CopyFromBitmap(This,dst_point,bitmap,src_rect) (This)->lpVtbl->CopyFromBitmap(This,dst_point,bitmap,src_rect)
632#define ID2D1Bitmap1_CopyFromRenderTarget(This,dst_point,render_target,src_rect) (This)->lpVtbl->CopyFromRenderTarget(This,dst_point,render_target,src_rect)
633#define ID2D1Bitmap1_CopyFromMemory(This,dst_rect,src_data,pitch) (This)->lpVtbl->CopyFromMemory(This,dst_rect,src_data,pitch)
634/*** ID2D1Bitmap1 methods ***/
635#define ID2D1Bitmap1_GetColorContext(This,context) (This)->lpVtbl->GetColorContext(This,context)
636#define ID2D1Bitmap1_GetOptions(This) (This)->lpVtbl->GetOptions(This)
637#define ID2D1Bitmap1_GetSurface(This,surface) (This)->lpVtbl->GetSurface(This,surface)
638#define ID2D1Bitmap1_Map(This,options,mapped_rect) (This)->lpVtbl->Map(This,options,mapped_rect)
639#define ID2D1Bitmap1_Unmap(This) (This)->lpVtbl->Unmap(This)
640
641#endif
642
643DEFINE_GUID(IID_ID2D1Bitmap1, 0xa898a84c,0x3873,0x4588,0xb0,0x8b,0xeb,0xbf,0x97,0x8d,0xf0,0x41);
644__CRT_UUID_DECL(ID2D1Bitmap1, 0xa898a84c,0x3873,0x4588,0xb0,0x8b,0xeb,0xbf,0x97,0x8d,0xf0,0x41);
645
646#ifndef D2D_USE_C_DEFINITIONS
647
648interface ID2D1ImageBrush : public ID2D1Brush
649{
650 STDMETHOD_(void, SetImage)(ID2D1Image *image) PURE;
651 STDMETHOD_(void, SetExtendModeX)(D2D1_EXTEND_MODE extendModeX) PURE;
652 STDMETHOD_(void, SetExtendModeY)(D2D1_EXTEND_MODE extendModeY) PURE;
653 STDMETHOD_(void, SetInterpolationMode)(D2D1_INTERPOLATION_MODE interpolationMode) PURE;
654 STDMETHOD_(void, SetSourceRectangle)(CONST D2D1_RECT_F *sourceRectangle) PURE;
655 STDMETHOD_(void, GetImage)(ID2D1Image **image) CONST PURE;
656 STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeX)() CONST PURE;
657 STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeY)() CONST PURE;
658 STDMETHOD_(D2D1_INTERPOLATION_MODE, GetInterpolationMode)() CONST PURE;
659 STDMETHOD_(void, GetSourceRectangle)(D2D1_RECT_F *sourceRectangle) CONST PURE;
660};
661
662#else
663
664typedef interface ID2D1ImageBrush ID2D1ImageBrush;
665/* FIXME: Add full C declaration */
666
667#endif
668
669DEFINE_GUID(IID_ID2D1ImageBrush, 0xfe9e984d,0x3f95,0x407c,0xb5,0xdb,0xcb,0x94,0xd4,0xe8,0xf8,0x7c);
670__CRT_UUID_DECL(ID2D1ImageBrush, 0xfe9e984d,0x3f95,0x407c,0xb5,0xdb,0xcb,0x94,0xd4,0xe8,0xf8,0x7c);
671
672#ifndef D2D_USE_C_DEFINITIONS
673
674interface ID2D1BitmapBrush1 : public ID2D1BitmapBrush
675{
676 STDMETHOD_(void, SetInterpolationMode1)(D2D1_INTERPOLATION_MODE interpolationMode) PURE;
677 STDMETHOD_(D2D1_INTERPOLATION_MODE, GetInterpolationMode1)() CONST PURE;
678};
679
680#else
681
682typedef interface ID2D1BitmapBrush1 ID2D1BitmapBrush1;
683/* FIXME: Add full C declaration */
684
685#endif
686
687DEFINE_GUID(IID_ID2D1BitmapBrush1, 0x41343a53,0xe41a,0x49a2,0x91,0xcd,0x21,0x79,0x3b,0xbb,0x62,0xe5);
688__CRT_UUID_DECL(ID2D1BitmapBrush1, 0x41343a53,0xe41a,0x49a2,0x91,0xcd,0x21,0x79,0x3b,0xbb,0x62,0xe5);
689
690#ifndef D2D_USE_C_DEFINITIONS
691
692interface ID2D1GradientStopCollection1 : public ID2D1GradientStopCollection
693{
694 STDMETHOD_(void, GetGradientStops1)(D2D1_GRADIENT_STOP *gradientStops, UINT32 gradientStopsCount) CONST PURE;
695 STDMETHOD_(D2D1_COLOR_SPACE, GetPreInterpolationSpace)() CONST PURE;
696 STDMETHOD_(D2D1_COLOR_SPACE, GetPostInterpolationSpace)() CONST PURE;
697 STDMETHOD_(D2D1_BUFFER_PRECISION, GetBufferPrecision)() CONST PURE;
698 STDMETHOD_(D2D1_COLOR_INTERPOLATION_MODE, GetColorInterpolationMode)() CONST PURE;
699};
700
701#else
702
703typedef interface ID2D1GradientStopCollection1 ID2D1GradientStopCollection1;
704/* FIXME: Add full C declaration */
705
706#endif
707
708DEFINE_GUID(IID_ID2D1GradientStopCollection1, 0xae1572f4,0x5dd0,0x4777,0x99,0x8b,0x92,0x79,0x47,0x2a,0xe6,0x3b);
709__CRT_UUID_DECL(ID2D1GradientStopCollection1, 0xae1572f4,0x5dd0,0x4777,0x99,0x8b,0x92,0x79,0x47,0x2a,0xe6,0x3b);
710
711#ifndef D2D_USE_C_DEFINITIONS
712
713interface ID2D1ColorContext : public ID2D1Resource
714{
715 STDMETHOD_(D2D1_COLOR_SPACE, GetColorSpace)() CONST PURE;
716 STDMETHOD_(UINT32, GetProfileSize)() CONST PURE;
717 STDMETHOD(GetProfile)(BYTE *profile, UINT32 profileSize) CONST PURE;
718};
719
720#else
721
722typedef interface ID2D1ColorContext ID2D1ColorContext;
723
724#endif
725
726DEFINE_GUID(IID_ID2D1ColorContext, 0x1c4820bb,0x5771,0x4518,0xa5,0x81,0x2f,0xe4,0xdd,0x0e,0xc6,0x57);
727__CRT_UUID_DECL(ID2D1ColorContext, 0x1c4820bb,0x5771,0x4518,0xa5,0x81,0x2f,0xe4,0xdd,0x0e,0xc6,0x57);
728
729#ifndef D2D_USE_C_DEFINITIONS
730
731interface ID2D1DeviceContext : public ID2D1RenderTarget
732{
733 STDMETHOD(CreateBitmap)(D2D1_SIZE_U size, CONST void *sourceData, UINT32 pitch,
734 CONST D2D1_BITMAP_PROPERTIES1 *bitmapProperties, ID2D1Bitmap1 **bitmap) PURE;
735 using ID2D1RenderTarget::CreateBitmap;
736
737 STDMETHOD(CreateBitmapFromWicBitmap)(IWICBitmapSource *wicBitmapSource,
738 CONST D2D1_BITMAP_PROPERTIES1 *bitmapProperties, ID2D1Bitmap1 **bitmap) PURE;
739 using ID2D1RenderTarget::CreateBitmapFromWicBitmap;
740
741 STDMETHOD(CreateColorContext)(D2D1_COLOR_SPACE space, CONST BYTE *profile, UINT32 profileSize,
742 ID2D1ColorContext **colorContext) PURE;
743 STDMETHOD(CreateColorContextFromFilename)(PCWSTR filename, ID2D1ColorContext **colorContext) PURE;
744 STDMETHOD(CreateColorContextFromWicColorContext)(IWICColorContext *wicColorContext, ID2D1ColorContext **colorContext) PURE;
745 STDMETHOD(CreateBitmapFromDxgiSurface)(IDXGISurface *surface, CONST D2D1_BITMAP_PROPERTIES1 *bitmapProperties,
746 ID2D1Bitmap1 **bitmap) PURE;
747 STDMETHOD(CreateEffect)(REFCLSID effectId, ID2D1Effect **effect) PURE;
748
749 STDMETHOD(CreateGradientStopCollection)(CONST D2D1_GRADIENT_STOP *straightAlphaGradientStops,
750 UINT32 straightAlphaGradientStopsCount, D2D1_COLOR_SPACE preInterpolationSpace,
751 D2D1_COLOR_SPACE postInterpolationSpace, D2D1_BUFFER_PRECISION bufferPrecision,
752 D2D1_EXTEND_MODE extendMode, D2D1_COLOR_INTERPOLATION_MODE colorInterpolationMode,
753 ID2D1GradientStopCollection1 **gradientStopCollection1) PURE;
754 using ID2D1RenderTarget::CreateGradientStopCollection;
755
756 STDMETHOD(CreateImageBrush)(ID2D1Image *image, CONST D2D1_IMAGE_BRUSH_PROPERTIES *imageBrushProperties,
757 CONST D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1ImageBrush **imageBrush) PURE;
758
759 STDMETHOD(CreateBitmapBrush)(ID2D1Bitmap *bitmap, CONST D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmapBrushProperties,
760 CONST D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1BitmapBrush1 **bitmapBrush) PURE;
761 using ID2D1RenderTarget::CreateBitmapBrush;
762
763 STDMETHOD(CreateCommandList)(ID2D1CommandList **commandList) PURE;
764 STDMETHOD_(BOOL, IsDxgiFormatSupported)(DXGI_FORMAT format) CONST PURE;
765 STDMETHOD_(BOOL, IsBufferPrecisionSupported)(D2D1_BUFFER_PRECISION bufferPrecision) CONST PURE;
766 STDMETHOD(GetImageLocalBounds)(ID2D1Image *image, D2D1_RECT_F *localBounds) CONST PURE;
767 STDMETHOD(GetImageWorldBounds)(ID2D1Image *image, D2D1_RECT_F *worldBounds) CONST PURE;
768 STDMETHOD(GetGlyphRunWorldBounds)(D2D1_POINT_2F baselineOrigin, CONST DWRITE_GLYPH_RUN *glyphRun,
769 DWRITE_MEASURING_MODE measuringMode, D2D1_RECT_F *bounds) CONST PURE;
770 STDMETHOD_(void, GetDevice)(ID2D1Device **device) CONST PURE;
771 STDMETHOD_(void, SetTarget)(ID2D1Image *image) PURE;
772 STDMETHOD_(void, GetTarget)(ID2D1Image **image) CONST PURE;
773 STDMETHOD_(void, SetRenderingControls)(CONST D2D1_RENDERING_CONTROLS *renderingControls) PURE;
774 STDMETHOD_(void, GetRenderingControls)(D2D1_RENDERING_CONTROLS *renderingControls) CONST PURE;
775 STDMETHOD_(void, SetPrimitiveBlend)(D2D1_PRIMITIVE_BLEND primitiveBlend) PURE;
776 STDMETHOD_(D2D1_PRIMITIVE_BLEND, GetPrimitiveBlend)() CONST PURE;
777 STDMETHOD_(void, SetUnitMode)(D2D1_UNIT_MODE unitMode) PURE;
778 STDMETHOD_(D2D1_UNIT_MODE, GetUnitMode)() CONST PURE;
779
780 STDMETHOD_(void, DrawGlyphRun)(D2D1_POINT_2F baselineOrigin, CONST DWRITE_GLYPH_RUN *glyphRun,
781 CONST DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription, ID2D1Brush *foregroundBrush,
782 DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) PURE;
783 using ID2D1RenderTarget::DrawGlyphRun;
784
785 STDMETHOD_(void, DrawImage)(ID2D1Image *image, CONST D2D1_POINT_2F *targetOffset = NULL,
786 CONST D2D1_RECT_F *imageRectangle = NULL, D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR,
787 D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) PURE;
788 STDMETHOD_(void, DrawGdiMetafile)(ID2D1GdiMetafile *gdiMetafile, CONST D2D1_POINT_2F *targetOffset = NULL) PURE;
789
790 STDMETHOD_(void, DrawBitmap)(ID2D1Bitmap *bitmap, CONST D2D1_RECT_F *destinationRectangle, FLOAT opacity,
791 D2D1_INTERPOLATION_MODE interpolationMode, CONST D2D1_RECT_F *sourceRectangle = NULL,
792 CONST D2D1_MATRIX_4X4_F *perspectiveTransform = NULL) PURE;
793 using ID2D1RenderTarget::DrawBitmap;
794
795 STDMETHOD_(void, PushLayer)(CONST D2D1_LAYER_PARAMETERS1 *layerParameters, ID2D1Layer *layer) PURE;
796 using ID2D1RenderTarget::PushLayer;
797
798 STDMETHOD(InvalidateEffectInputRectangle)(ID2D1Effect *effect, UINT32 input, CONST D2D1_RECT_F *inputRectangle) PURE;
799 STDMETHOD(GetEffectInvalidRectangleCount)(ID2D1Effect *effect, UINT32 *rectangleCount) PURE;
800 STDMETHOD(GetEffectInvalidRectangles)(ID2D1Effect *effect, D2D1_RECT_F *rectangles, UINT32 rectanglesCount) PURE;
801 STDMETHOD(GetEffectRequiredInputRectangles)(ID2D1Effect *renderEffect, CONST D2D1_RECT_F *renderImageRectangle,
802 CONST D2D1_EFFECT_INPUT_DESCRIPTION *inputDescriptions, D2D1_RECT_F *requiredInputRects, UINT32 inputCount) PURE;
803
804 STDMETHOD_(void, FillOpacityMask)(ID2D1Bitmap *opacityMask, ID2D1Brush *brush, CONST D2D1_RECT_F *destinationRectangle = NULL,
805 CONST D2D1_RECT_F *sourceRectangle = NULL) PURE;
806 using ID2D1RenderTarget::FillOpacityMask;
807
808 HRESULT CreateBitmap(D2D1_SIZE_U size, CONST void *sourceData, UINT32 pitch, CONST D2D1_BITMAP_PROPERTIES1 &bitmapProperties,
809 ID2D1Bitmap1 **bitmap) {
810 return CreateBitmap(size, sourceData, pitch, &bitmapProperties, bitmap);
811 }
812
813 HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource *wicBitmapSource, CONST D2D1_BITMAP_PROPERTIES1 &bitmapProperties,
814 ID2D1Bitmap1 **bitmap) {
815 return CreateBitmapFromWicBitmap(wicBitmapSource, &bitmapProperties, bitmap);
816 }
817
818 HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource *wicBitmapSource, ID2D1Bitmap1 **bitmap) {
819 return CreateBitmapFromWicBitmap(wicBitmapSource, NULL, bitmap);
820 }
821
822 HRESULT CreateBitmapFromDxgiSurface(IDXGISurface *surface, CONST D2D1_BITMAP_PROPERTIES1 &bitmapProperties,
823 ID2D1Bitmap1 **bitmap) {
824 return CreateBitmapFromDxgiSurface(surface, &bitmapProperties, bitmap);
825 }
826
827 HRESULT CreateImageBrush(ID2D1Image *image, CONST D2D1_IMAGE_BRUSH_PROPERTIES &imageBrushProperties,
828 CONST D2D1_BRUSH_PROPERTIES &brushProperties, ID2D1ImageBrush **imageBrush) {
829 return CreateImageBrush(image, &imageBrushProperties, &brushProperties, imageBrush);
830 }
831
832 HRESULT CreateImageBrush(ID2D1Image *image, CONST D2D1_IMAGE_BRUSH_PROPERTIES &imageBrushProperties,
833 ID2D1ImageBrush **imageBrush) {
834 return CreateImageBrush(image,&imageBrushProperties, NULL, imageBrush);
835 }
836
837 HRESULT CreateBitmapBrush(ID2D1Bitmap *bitmap, ID2D1BitmapBrush1 **bitmapBrush) {
838 return CreateBitmapBrush(bitmap, NULL, NULL, bitmapBrush);
839 }
840
841 HRESULT CreateBitmapBrush(ID2D1Bitmap *bitmap, CONST D2D1_BITMAP_BRUSH_PROPERTIES1 &bitmapBrushProperties,
842 ID2D1BitmapBrush1 **bitmapBrush) {
843 return CreateBitmapBrush(bitmap, &bitmapBrushProperties, NULL, bitmapBrush);
844 }
845
846 HRESULT CreateBitmapBrush(ID2D1Bitmap *bitmap, CONST D2D1_BITMAP_BRUSH_PROPERTIES1 &bitmapBrushProperties,
847 CONST D2D1_BRUSH_PROPERTIES &brushProperties, ID2D1BitmapBrush1 **bitmapBrush) {
848 return CreateBitmapBrush(bitmap, &bitmapBrushProperties, &brushProperties, bitmapBrush);
849 }
850
851 void DrawImage(ID2D1Effect *effect, CONST D2D1_POINT_2F *targetOffset = NULL, CONST D2D1_RECT_F *imageRectangle = NULL,
852 D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR,
853 D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
854 ID2D1Image *output = NULL;
855 effect->GetOutput(&output);
856 DrawImage(output, targetOffset, imageRectangle, interpolationMode, compositeMode);
857 output->Release();
858 }
859
860 void DrawImage(ID2D1Image *image, D2D1_INTERPOLATION_MODE interpolationMode,
861 D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
862 DrawImage(image, NULL, NULL, interpolationMode, compositeMode);
863 }
864
865 void DrawImage(ID2D1Effect *effect, D2D1_INTERPOLATION_MODE interpolationMode,
866 D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
867 DrawImage(effect, NULL, NULL, interpolationMode, compositeMode);
868 }
869
870 void DrawImage(ID2D1Image *image, D2D1_POINT_2F targetOffset,
871 D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR,
872 D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
873 DrawImage(image, &targetOffset, NULL, interpolationMode, compositeMode);
874 }
875
876 void DrawImage(ID2D1Effect *effect, D2D1_POINT_2F targetOffset,
877 D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR,
878 D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
879 DrawImage(effect, &targetOffset, NULL, interpolationMode, compositeMode);
880 }
881
882 void DrawImage(ID2D1Image *image, D2D1_POINT_2F targetOffset, CONST D2D1_RECT_F &imageRectangle,
883 D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR,
884 D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
885 DrawImage(image, &targetOffset, &imageRectangle, interpolationMode, compositeMode);
886 }
887
888 void DrawImage(ID2D1Effect *effect, D2D1_POINT_2F targetOffset, CONST D2D1_RECT_F &imageRectangle,
889 D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR,
890 D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
891 DrawImage(effect, &targetOffset, &imageRectangle, interpolationMode, compositeMode);
892 }
893
894 void PushLayer(CONST D2D1_LAYER_PARAMETERS1 &layerParameters, ID2D1Layer *layer) {
895 PushLayer(&layerParameters, layer);
896 }
897
898 void DrawGdiMetafile(ID2D1GdiMetafile *gdiMetafile, D2D1_POINT_2F targetOffset) {
899 DrawGdiMetafile(gdiMetafile, &targetOffset);
900 }
901
902 void DrawBitmap(ID2D1Bitmap *bitmap, CONST D2D1_RECT_F &destinationRectangle, FLOAT opacity,
903 D2D1_INTERPOLATION_MODE interpolationMode, CONST D2D1_RECT_F *sourceRectangle = NULL,
904 CONST D2D1_MATRIX_4X4_F *perspectiveTransform = NULL) {
905 DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform);
906 }
907
908 void DrawBitmap(ID2D1Bitmap *bitmap, CONST D2D1_RECT_F &destinationRectangle, FLOAT opacity,
909 D2D1_INTERPOLATION_MODE interpolationMode, CONST D2D1_RECT_F &sourceRectangle,
910 CONST D2D1_MATRIX_4X4_F *perspectiveTransform = NULL) {
911 DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, &sourceRectangle, perspectiveTransform);
912 }
913
914 void DrawBitmap(ID2D1Bitmap *bitmap, CONST D2D1_RECT_F &destinationRectangle, FLOAT opacity,
915 D2D1_INTERPOLATION_MODE interpolationMode, CONST D2D1_RECT_F &sourceRectangle,
916 CONST D2D1_MATRIX_4X4_F &perspectiveTransform) {
917 DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, &sourceRectangle, &perspectiveTransform);
918 }
919
920 void FillOpacityMask(ID2D1Bitmap *opacityMask, ID2D1Brush *brush, CONST D2D1_RECT_F &destinationRectangle,
921 CONST D2D1_RECT_F *sourceRectangle = NULL) {
922 FillOpacityMask(opacityMask, brush, &destinationRectangle, sourceRectangle);
923 }
924
925 void FillOpacityMask(ID2D1Bitmap *opacityMask, ID2D1Brush *brush, CONST D2D1_RECT_F &destinationRectangle,
926 CONST D2D1_RECT_F &sourceRectangle) {
927 FillOpacityMask(opacityMask, brush, &destinationRectangle, &sourceRectangle);
928 }
929
930 void SetRenderingControls(CONST D2D1_RENDERING_CONTROLS &renderingControls) {
931 return SetRenderingControls(&renderingControls);
932 }
933};
934
935
936#else
937
938typedef interface ID2D1DeviceContext ID2D1DeviceContext;
939
940typedef struct ID2D1DeviceContextVtbl {
941 struct ID2D1RenderTargetVtbl Base;
942
943 STDMETHOD(CreateBitmap)(ID2D1DeviceContext *This, D2D1_SIZE_U size,
944 CONST void *sourceData, UINT32 pitch,
945 CONST D2D1_BITMAP_PROPERTIES1 *bitmapProperties,
946 ID2D1Bitmap1 **bitmap) PURE;
947
948 STDMETHOD(CreateBitmapFromWicBitmap)(ID2D1DeviceContext *This,
949 IWICBitmapSource *wicBitmapSource,
950 CONST D2D1_BITMAP_PROPERTIES1 *bitmapProperties,
951 ID2D1Bitmap1 **bitmap) PURE;
952
953 STDMETHOD(CreateColorContext)(ID2D1DeviceContext *This,
954 D2D1_COLOR_SPACE space, CONST BYTE *profile, UINT32 profileSize,
955 ID2D1ColorContext **colorContext) PURE;
956 STDMETHOD(CreateColorContextFromFilename)(ID2D1DeviceContext *This,
957 PCWSTR filename, ID2D1ColorContext **colorContext) PURE;
958 STDMETHOD(CreateColorContextFromWicColorContext)(ID2D1DeviceContext *This,
959 IWICColorContext *wicColorContext,
960 ID2D1ColorContext **colorContext) PURE;
961 STDMETHOD(CreateBitmapFromDxgiSurface)(ID2D1DeviceContext *This,
962 IDXGISurface *surface, CONST D2D1_BITMAP_PROPERTIES1 *bitmapProperties,
963 ID2D1Bitmap1 **bitmap) PURE;
964 STDMETHOD(CreateEffect)(ID2D1DeviceContext *This, REFCLSID effectId,
965 ID2D1Effect **effect) PURE;
966
967 STDMETHOD(CreateGradientStopCollection)(ID2D1DeviceContext *This,
968 CONST D2D1_GRADIENT_STOP *straightAlphaGradientStops,
969 UINT32 straightAlphaGradientStopsCount,
970 D2D1_COLOR_SPACE preInterpolationSpace,
971 D2D1_COLOR_SPACE postInterpolationSpace,
972 D2D1_BUFFER_PRECISION bufferPrecision,
973 D2D1_EXTEND_MODE extendMode,
974 D2D1_COLOR_INTERPOLATION_MODE colorInterpolationMode,
975 ID2D1GradientStopCollection1 **gradientStopCollection1) PURE;
976
977 STDMETHOD(CreateImageBrush)(ID2D1DeviceContext *This,
978 struct ID2D1Image *image,
979 CONST D2D1_IMAGE_BRUSH_PROPERTIES *imageBrushProperties,
980 CONST D2D1_BRUSH_PROPERTIES *brushProperties,
981 ID2D1ImageBrush **imageBrush) PURE;
982
983 STDMETHOD(CreateBitmapBrush)(ID2D1DeviceContext *This, ID2D1Bitmap *bitmap,
984 CONST D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmapBrushProperties,
985 CONST D2D1_BRUSH_PROPERTIES *brushProperties,
986 ID2D1BitmapBrush1 **bitmapBrush) PURE;
987
988 STDMETHOD(CreateCommandList)(ID2D1DeviceContext *This,
989 ID2D1CommandList **commandList) PURE;
990 STDMETHOD_(BOOL, IsDxgiFormatSupported)(ID2D1DeviceContext *This,
991 DXGI_FORMAT format) PURE;
992 STDMETHOD_(BOOL, IsBufferPrecisionSupported)(ID2D1DeviceContext *This,
993 D2D1_BUFFER_PRECISION bufferPrecision) PURE;
994 STDMETHOD(GetImageLocalBounds)(ID2D1DeviceContext *This,
995 struct ID2D1Image *image, D2D1_RECT_F *localBounds) PURE;
996 STDMETHOD(GetImageWorldBounds)(ID2D1DeviceContext *This,
997 struct ID2D1Image *image, D2D1_RECT_F *worldBounds) PURE;
998 STDMETHOD(GetGlyphRunWorldBounds)(ID2D1DeviceContext *This,
999 D2D1_POINT_2F baselineOrigin, CONST DWRITE_GLYPH_RUN *glyphRun,
1000 DWRITE_MEASURING_MODE measuringMode, D2D1_RECT_F *bounds) PURE;
1001 STDMETHOD_(void, GetDevice)(ID2D1DeviceContext *This,
1002 ID2D1Device **device) PURE;
1003 STDMETHOD_(void, SetTarget)(ID2D1DeviceContext *This,
1004 struct ID2D1Image *image) PURE;
1005 STDMETHOD_(void, GetTarget)(ID2D1DeviceContext *This,
1006 struct ID2D1Image **image) PURE;
1007 STDMETHOD_(void, SetRenderingControls)(ID2D1DeviceContext *This,
1008 CONST D2D1_RENDERING_CONTROLS *renderingControls) PURE;
1009 STDMETHOD_(void, GetRenderingControls)(ID2D1DeviceContext *This,
1010 D2D1_RENDERING_CONTROLS *renderingControls) PURE;
1011 STDMETHOD_(void, SetPrimitiveBlend)(ID2D1DeviceContext *This,
1012 D2D1_PRIMITIVE_BLEND primitiveBlend) PURE;
1013 STDMETHOD_(D2D1_PRIMITIVE_BLEND, GetPrimitiveBlend)(ID2D1DeviceContext *This) PURE;
1014 STDMETHOD_(void, SetUnitMode)(ID2D1DeviceContext *This,
1015 D2D1_UNIT_MODE unitMode) PURE;
1016 STDMETHOD_(D2D1_UNIT_MODE, GetUnitMode)(ID2D1DeviceContext *This) PURE;
1017
1018 STDMETHOD_(void, DrawGlyphRun)(ID2D1DeviceContext *This,
1019 D2D1_POINT_2F baselineOrigin, CONST DWRITE_GLYPH_RUN *glyphRun,
1020 CONST DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription,
1021 ID2D1Brush *foregroundBrush, DWRITE_MEASURING_MODE measuringMode) PURE;
1022
1023 STDMETHOD_(void, DrawImage)(ID2D1DeviceContext *This,
1024 struct ID2D1Image *image, CONST D2D1_POINT_2F *targetOffset,
1025 CONST D2D1_RECT_F *imageRectangle,
1026 D2D1_INTERPOLATION_MODE interpolationMode,
1027 D2D1_COMPOSITE_MODE compositeMode) PURE;
1028 STDMETHOD_(void, DrawGdiMetafile)(ID2D1DeviceContext *This,
1029 ID2D1GdiMetafile *gdiMetafile, CONST D2D1_POINT_2F *targetOffset) PURE;
1030
1031 STDMETHOD_(void, DrawBitmap)(ID2D1DeviceContext *This,
1032 ID2D1Bitmap *bitmap, CONST D2D1_RECT_F *destinationRectangle,
1033 FLOAT opacity, D2D1_INTERPOLATION_MODE interpolationMode,
1034 CONST D2D1_RECT_F *sourceRectangle,
1035 CONST D2D1_MATRIX_4X4_F *perspectiveTransform) PURE;
1036
1037 STDMETHOD_(void, PushLayer)(ID2D1DeviceContext *This,
1038 CONST D2D1_LAYER_PARAMETERS1 *layerParameters, ID2D1Layer *layer) PURE;
1039
1040 STDMETHOD(InvalidateEffectInputRectangle)(ID2D1DeviceContext *This,
1041 ID2D1Effect *effect, UINT32 input,
1042 CONST D2D1_RECT_F *inputRectangle) PURE;
1043 STDMETHOD(GetEffectInvalidRectangleCount)(ID2D1DeviceContext *This,
1044 ID2D1Effect *effect, UINT32 *rectangleCount) PURE;
1045 STDMETHOD(GetEffectInvalidRectangles)(ID2D1DeviceContext *This,
1046 ID2D1Effect *effect, D2D1_RECT_F *rectangles,
1047 UINT32 rectanglesCount) PURE;
1048 STDMETHOD(GetEffectRequiredInputRectangles)(ID2D1DeviceContext *This,
1049 ID2D1Effect *renderEffect, CONST D2D1_RECT_F *renderImageRectangle,
1050 CONST D2D1_EFFECT_INPUT_DESCRIPTION *inputDescriptions,
1051 D2D1_RECT_F *requiredInputRects, UINT32 inputCount) PURE;
1052
1053 STDMETHOD_(void, FillOpacityMask)(ID2D1DeviceContext *This,
1054 ID2D1Bitmap *opacityMask, ID2D1Brush *brush,
1055 CONST D2D1_RECT_F *destinationRectangle,
1056 CONST D2D1_RECT_F *sourceRectangle) PURE;
1057}
1058ID2D1DeviceContextVtbl;
1059
1060interface ID2D1DeviceContext {
1061 const ID2D1DeviceContextVtbl *lpVtbl;
1062};
1063
1064/*** IUnknown methods ***/
1065#define ID2D1DeviceContext_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
1066#define ID2D1DeviceContext_AddRef(This) (This)->lpVtbl->AddRef(This)
1067#define ID2D1DeviceContext_Release(This) (This)->lpVtbl->Release(This)
1068/*** ID2D1Resource methods ***/
1069#define ID2D1DeviceContext_GetFactory(This,factory) (This)->lpVtbl->GetFactory(This,factory)
1070/*** ID2D1RenderTarget methods ***/
1071#define ID2D1DeviceContext_CreateSharedBitmap(This,iid,data,desc,bitmap) (This)->lpVtbl->CreateSharedBitmap(This,iid,data,desc,bitmap)
1072#define ID2D1DeviceContext_CreateSolidColorBrush(This,color,desc,brush) (This)->lpVtbl->CreateSolidColorBrush(This,color,desc,brush)
1073#define ID2D1DeviceContext_CreateLinearGradientBrush(This,gradient_brush_desc,brush_desc,gradient,brush) (This)->lpVtbl->CreateLinearGradientBrush(This,gradient_brush_desc,brush_desc,gradient,brush)
1074#define ID2D1DeviceContext_CreateRadialGradientBrush(This,gradient_brush_desc,brush_desc,gradient,brush) (This)->lpVtbl->CreateRadialGradientBrush(This,gradient_brush_desc,brush_desc,gradient,brush)
1075#define ID2D1DeviceContext_CreateCompatibleRenderTarget(This,size,pixel_size,format,options,render_target) (This)->lpVtbl->CreateCompatibleRenderTarget(This,size,pixel_size,format,options,render_target)
1076#define ID2D1DeviceContext_CreateLayer(This,size,layer) (This)->lpVtbl->CreateLayer(This,size,layer)
1077#define ID2D1DeviceContext_CreateMesh(This,mesh) (This)->lpVtbl->CreateMesh(This,mesh)
1078#define ID2D1DeviceContext_DrawLine(This,p0,p1,brush,stroke_width,stroke_style) (This)->lpVtbl->DrawLine(This,p0,p1,brush,stroke_width,stroke_style)
1079#define ID2D1DeviceContext_DrawRectangle(This,rect,brush,stroke_width,stroke_style) (This)->lpVtbl->DrawRectangle(This,rect,brush,stroke_width,stroke_style)
1080#define ID2D1DeviceContext_FillRectangle(This,rect,brush) (This)->lpVtbl->FillRectangle(This,rect,brush)
1081#define ID2D1DeviceContext_DrawRoundedRectangle(This,rect,brush,stroke_width,stroke_style) (This)->lpVtbl->DrawRoundedRectangle(This,rect,brush,stroke_width,stroke_style)
1082#define ID2D1DeviceContext_FillRoundedRectangle(This,rect,brush) (This)->lpVtbl->FillRoundedRectangle(This,rect,brush)
1083#define ID2D1DeviceContext_DrawEllipse(This,ellipse,brush,stroke_width,stroke_style) (This)->lpVtbl->DrawEllipse(This,ellipse,brush,stroke_width,stroke_style)
1084#define ID2D1DeviceContext_FillEllipse(This,ellipse,brush) (This)->lpVtbl->FillEllipse(This,ellipse,brush)
1085#define ID2D1DeviceContext_DrawGeometry(This,geometry,brush,stroke_width,stroke_style) (This)->lpVtbl->DrawGeometry(This,geometry,brush,stroke_width,stroke_style)
1086#define ID2D1DeviceContext_FillGeometry(This,geometry,brush,opacity_brush) (This)->lpVtbl->FillGeometry(This,geometry,brush,opacity_brush)
1087#define ID2D1DeviceContext_FillMesh(This,mesh,brush) (This)->lpVtbl->FillMesh(This,mesh,brush)
1088#define ID2D1DeviceContext_DrawText(This,string,string_len,text_format,layout_rect,brush,options,measuring_mode) (This)->lpVtbl->DrawText(This,string,string_len,text_format,layout_rect,brush,options,measuring_mode)
1089#define ID2D1DeviceContext_DrawTextLayout(This,origin,layout,brush,options) (This)->lpVtbl->DrawTextLayout(This,origin,layout,brush,options)
1090#define ID2D1DeviceContext_SetTransform(This,transform) (This)->lpVtbl->SetTransform(This,transform)
1091#define ID2D1DeviceContext_GetTransform(This,transform) (This)->lpVtbl->GetTransform(This,transform)
1092#define ID2D1DeviceContext_SetAntialiasMode(This,antialias_mode) (This)->lpVtbl->SetAntialiasMode(This,antialias_mode)
1093#define ID2D1DeviceContext_GetAntialiasMode(This) (This)->lpVtbl->GetAntialiasMode(This)
1094#define ID2D1DeviceContext_SetTextAntialiasMode(This,antialias_mode) (This)->lpVtbl->SetTextAntialiasMode(This,antialias_mode)
1095#define ID2D1DeviceContext_GetTextAntialiasMode(This) (This)->lpVtbl->GetTextAntialiasMode(This)
1096#define ID2D1DeviceContext_SetTextRenderingParams(This,text_rendering_params) (This)->lpVtbl->SetTextRenderingParams(This,text_rendering_params)
1097#define ID2D1DeviceContext_GetTextRenderingParams(This,text_rendering_params) (This)->lpVtbl->GetTextRenderingParams(This,text_rendering_params)
1098#define ID2D1DeviceContext_SetTags(This,tag1,tag2) (This)->lpVtbl->SetTags(This,tag1,tag2)
1099#define ID2D1DeviceContext_GetTags(This,tag1,tag2) (This)->lpVtbl->GetTags(This,tag1,tag2)
1100#define ID2D1DeviceContext_PopLayer(This) (This)->lpVtbl->PopLayer(This)
1101#define ID2D1DeviceContext_Flush(This,tag1,tag2) (This)->lpVtbl->Flush(This,tag1,tag2)
1102#define ID2D1DeviceContext_SaveDrawingState(This,state_block) (This)->lpVtbl->SaveDrawingState(This,state_block)
1103#define ID2D1DeviceContext_RestoreDrawingState(This,state_block) (This)->lpVtbl->RestoreDrawingState(This,state_block)
1104#define ID2D1DeviceContext_PushAxisAlignedClip(This,clip_rect,antialias_mode) (This)->lpVtbl->PushAxisAlignedClip(This,clip_rect,antialias_mode)
1105#define ID2D1DeviceContext_PopAxisAlignedClip(This) (This)->lpVtbl->PopAxisAlignedClip(This)
1106#define ID2D1DeviceContext_Clear(This,color) (This)->lpVtbl->Clear(This,color)
1107#define ID2D1DeviceContext_BeginDraw(This) (This)->lpVtbl->BeginDraw(This)
1108#define ID2D1DeviceContext_EndDraw(This,tag1,tag2) (This)->lpVtbl->EndDraw(This,tag1,tag2)
1109#define ID2D1DeviceContext_GetPixelFormat(This) ID2D1DeviceContext_GetPixelFormat_define_WIDL_C_INLINE_WRAPPERS_for_aggregate_return_support
1110#define ID2D1DeviceContext_SetDpi(This,dpi_x,dpi_y) (This)->lpVtbl->SetDpi(This,dpi_x,dpi_y)
1111#define ID2D1DeviceContext_GetDpi(This,dpi_x,dpi_y) (This)->lpVtbl->GetDpi(This,dpi_x,dpi_y)
1112#define ID2D1DeviceContext_GetSize(This) ID2D1DeviceContext_GetSize_define_WIDL_C_INLINE_WRAPPERS_for_aggregate_return_support
1113#define ID2D1DeviceContext_GetPixelSize(This) ID2D1DeviceContext_GetPixelSize_define_WIDL_C_INLINE_WRAPPERS_for_aggregate_return_support
1114#define ID2D1DeviceContext_GetMaximumBitmapSize(This) (This)->lpVtbl->GetMaximumBitmapSize(This)
1115#define ID2D1DeviceContext_IsSupported(This,desc) (This)->lpVtbl->IsSupported(This,desc)
1116/*** ID2D1DeviceContext methods ***/
1117#define ID2D1DeviceContext_CreateBitmap(This,size,src_data,pitch,desc,bitmap) (This)->lpVtbl->ID2D1DeviceContext_CreateBitmap(This,size,src_data,pitch,desc,bitmap)
1118#define ID2D1DeviceContext_CreateBitmapFromWicBitmap(This,bitmap_source,desc,bitmap) (This)->lpVtbl->ID2D1DeviceContext_CreateBitmapFromWicBitmap(This,bitmap_source,desc,bitmap)
1119#define ID2D1DeviceContext_CreateColorContext(This,space,profile,profile_size,color_context) (This)->lpVtbl->CreateColorContext(This,space,profile,profile_size,color_context)
1120#define ID2D1DeviceContext_CreateColorContextFromFilename(This,filename,color_context) (This)->lpVtbl->CreateColorContextFromFilename(This,filename,color_context)
1121#define ID2D1DeviceContext_CreateColorContextFromWicColorContext(This,wic_color_context,color_context) (This)->lpVtbl->CreateColorContextFromWicColorContext(This,wic_color_context,color_context)
1122#define ID2D1DeviceContext_CreateBitmapFromDxgiSurface(This,surface,desc,bitmap) (This)->lpVtbl->CreateBitmapFromDxgiSurface(This,surface,desc,bitmap)
1123#define ID2D1DeviceContext_CreateEffect(This,effect_id,effect) (This)->lpVtbl->CreateEffect(This,effect_id,effect)
1124#define ID2D1DeviceContext_CreateGradientStopCollection(This,stops,stop_count,preinterpolation_space,postinterpolation_space,buffer_precision,extend_mode,color_interpolation_mode,gradient) (This)->lpVtbl->ID2D1DeviceContext_CreateGradientStopCollection(This,stops,stop_count,preinterpolation_space,postinterpolation_space,buffer_precision,extend_mode,color_interpolation_mode,gradient)
1125#define ID2D1DeviceContext_CreateImageBrush(This,image,image_brush_desc,brush_desc,brush) (This)->lpVtbl->CreateImageBrush(This,image,image_brush_desc,brush_desc,brush)
1126#define ID2D1DeviceContext_CreateBitmapBrush(This,bitmap,bitmap_brush_desc,brush_desc,bitmap_brush) (This)->lpVtbl->ID2D1DeviceContext_CreateBitmapBrush(This,bitmap,bitmap_brush_desc,brush_desc,bitmap_brush)
1127#define ID2D1DeviceContext_CreateCommandList(This,command_list) (This)->lpVtbl->CreateCommandList(This,command_list)
1128#define ID2D1DeviceContext_IsDxgiFormatSupported(This,format) (This)->lpVtbl->IsDxgiFormatSupported(This,format)
1129#define ID2D1DeviceContext_IsBufferPrecisionSupported(This,buffer_precision) (This)->lpVtbl->IsBufferPrecisionSupported(This,buffer_precision)
1130#define ID2D1DeviceContext_GetImageLocalBounds(This,image,local_bounds) (This)->lpVtbl->GetImageLocalBounds(This,image,local_bounds)
1131#define ID2D1DeviceContext_GetImageWorldBounds(This,image,world_bounds) (This)->lpVtbl->GetImageWorldBounds(This,image,world_bounds)
1132#define ID2D1DeviceContext_GetGlyphRunWorldBounds(This,baseline_origin,glyph_run,measuring_mode,bounds) (This)->lpVtbl->GetGlyphRunWorldBounds(This,baseline_origin,glyph_run,measuring_mode,bounds)
1133#define ID2D1DeviceContext_GetDevice(This,device) (This)->lpVtbl->GetDevice(This,device)
1134#define ID2D1DeviceContext_SetTarget(This,target) (This)->lpVtbl->SetTarget(This,target)
1135#define ID2D1DeviceContext_GetTarget(This,target) (This)->lpVtbl->GetTarget(This,target)
1136#define ID2D1DeviceContext_SetRenderingControls(This,rendering_controls) (This)->lpVtbl->SetRenderingControls(This,rendering_controls)
1137#define ID2D1DeviceContext_GetRenderingControls(This,rendering_controls) (This)->lpVtbl->GetRenderingControls(This,rendering_controls)
1138#define ID2D1DeviceContext_SetPrimitiveBlend(This,primitive_blend) (This)->lpVtbl->SetPrimitiveBlend(This,primitive_blend)
1139#define ID2D1DeviceContext_GetPrimitiveBlend(This) (This)->lpVtbl->GetPrimitiveBlend(This)
1140#define ID2D1DeviceContext_SetUnitMode(This,unit_mode) (This)->lpVtbl->SetUnitMode(This,unit_mode)
1141#define ID2D1DeviceContext_GetUnitMode(This) (This)->lpVtbl->GetUnitMode(This)
1142#define ID2D1DeviceContext_DrawGlyphRun(This,baseline_origin,glyph_run,glyph_run_desc,brush,measuring_mode) (This)->lpVtbl->ID2D1DeviceContext_DrawGlyphRun(This,baseline_origin,glyph_run,glyph_run_desc,brush,measuring_mode)
1143#define ID2D1DeviceContext_DrawImage(This,image,target_offset,image_rect,interpolation_mode,composite_mode) (This)->lpVtbl->DrawImage(This,image,target_offset,image_rect,interpolation_mode,composite_mode)
1144#define ID2D1DeviceContext_DrawGdiMetafile(This,metafile,target_offset) (This)->lpVtbl->DrawGdiMetafile(This,metafile,target_offset)
1145#define ID2D1DeviceContext_DrawBitmap(This,bitmap,dst_rect,opacity,interpolation_mode,src_rect,perspective_transform) (This)->lpVtbl->ID2D1DeviceContext_DrawBitmap(This,bitmap,dst_rect,opacity,interpolation_mode,src_rect,perspective_transform)
1146#define ID2D1DeviceContext_PushLayer(This,layer_parameters,layer) (This)->lpVtbl->ID2D1DeviceContext_PushLayer(This,layer_parameters,layer)
1147#define ID2D1DeviceContext_InvalidateEffectInputRectangle(This,effect,input,input_rect) (This)->lpVtbl->InvalidateEffectInputRectangle(This,effect,input,input_rect)
1148#define ID2D1DeviceContext_GetEffectInvalidRectangleCount(This,effect,rect_count) (This)->lpVtbl->GetEffectInvalidRectangleCount(This,effect,rect_count)
1149#define ID2D1DeviceContext_GetEffectInvalidRectangles(This,effect,rectangles,rect_count) (This)->lpVtbl->GetEffectInvalidRectangles(This,effect,rectangles,rect_count)
1150#define ID2D1DeviceContext_GetEffectRequiredInputRectangles(This,effect,image_rect,desc,input_rect,input_count) (This)->lpVtbl->GetEffectRequiredInputRectangles(This,effect,image_rect,desc,input_rect,input_count)
1151#define ID2D1DeviceContext_FillOpacityMask(This,mask,brush,dst_rect,src_rect) (This)->lpVtbl->ID2D1DeviceContext_FillOpacityMask(This,mask,brush,dst_rect,src_rect)
1152
1153#endif
1154
1155DEFINE_GUID(IID_ID2D1DeviceContext, 0xe8f7fe7a,0x191c,0x466d,0xad,0x95,0x97,0x56,0x78,0xbd,0xa9,0x98);
1156__CRT_UUID_DECL(ID2D1DeviceContext, 0xe8f7fe7a,0x191c,0x466d,0xad,0x95,0x97,0x56,0x78,0xbd,0xa9,0x98);
1157
1158#ifndef D2D_USE_C_DEFINITIONS
1159
1160interface ID2D1Device : public ID2D1Resource
1161{
1162 STDMETHOD(CreateDeviceContext)(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext **deviceContext) PURE;
1163 STDMETHOD(CreatePrintControl)(IWICImagingFactory *wicFactory, IPrintDocumentPackageTarget *documentTarget,
1164 CONST D2D1_PRINT_CONTROL_PROPERTIES *printControlProperties, ID2D1PrintControl **printControl) PURE;
1165 STDMETHOD_(void, SetMaximumTextureMemory)(UINT64 maximumInBytes) PURE;
1166 STDMETHOD_(UINT64, GetMaximumTextureMemory)() CONST PURE;
1167 STDMETHOD_(void, ClearResources)(UINT32 millisecondsSinceUse = 0) PURE;
1168
1169 HRESULT CreatePrintControl(IWICImagingFactory *wicFactory, IPrintDocumentPackageTarget *documentTarget,
1170 CONST D2D1_PRINT_CONTROL_PROPERTIES &printControlProperties, ID2D1PrintControl **printControl) {
1171 return CreatePrintControl(wicFactory, documentTarget, &printControlProperties, printControl);
1172 }
1173};
1174
1175#else
1176
1177typedef interface ID2D1Device ID2D1Device;
1178
1179typedef struct ID2D1DeviceVtbl {
1180 struct ID2D1ResourceVtbl Base;
1181
1182 STDMETHOD(CreateDeviceContext)(ID2D1Device *This,
1183 D2D1_DEVICE_CONTEXT_OPTIONS options,
1184 ID2D1DeviceContext **deviceContext) PURE;
1185 STDMETHOD(CreatePrintControl)(ID2D1Device *This,
1186 IWICImagingFactory *wicFactory,
1187 IPrintDocumentPackageTarget *documentTarget,
1188 CONST D2D1_PRINT_CONTROL_PROPERTIES *printControlProperties,
1189 ID2D1PrintControl **printControl) PURE;
1190 STDMETHOD_(void, SetMaximumTextureMemory)(ID2D1Device *This,
1191 UINT64 maximumInBytes) PURE;
1192 STDMETHOD_(UINT64, GetMaximumTextureMemory)(ID2D1Device *This) PURE;
1193 STDMETHOD_(void, ClearResources)(ID2D1Device *This,
1194 UINT32 millisecondsSinceUse) PURE;
1195}
1196ID2D1DeviceVtbl;
1197
1198interface ID2D1Device {
1199 const ID2D1DeviceVtbl *lpVtbl;
1200};
1201
1202/*** IUnknown methods ***/
1203#define ID2D1Device_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
1204#define ID2D1Device_AddRef(This) (This)->lpVtbl->AddRef(This)
1205#define ID2D1Device_Release(This) (This)->lpVtbl->Release(This)
1206/*** ID2D1Resource methods ***/
1207#define ID2D1Device_GetFactory(This,factory) (This)->lpVtbl->GetFactory(This,factory)
1208/*** ID2D1Device methods ***/
1209#define ID2D1Device_CreateDeviceContext(This,options,context) (This)->lpVtbl->CreateDeviceContext(This,options,context)
1210#define ID2D1Device_CreatePrintControl(This,wic_factory,document_target,desc,print_control) (This)->lpVtbl->CreatePrintControl(This,wic_factory,document_target,desc,print_control)
1211#define ID2D1Device_SetMaximumTextureMemory(This,max_texture_memory) (This)->lpVtbl->SetMaximumTextureMemory(This,max_texture_memory)
1212#define ID2D1Device_GetMaximumTextureMemory(This) (This)->lpVtbl->GetMaximumTextureMemory(This)
1213#define ID2D1Device_ClearResources(This,msec_since_use) (This)->lpVtbl->ClearResources(This,msec_since_use)
1214
1215#endif
1216
1217DEFINE_GUID(IID_ID2D1Device, 0x47dd575d,0xac05,0x4cdd,0x80,0x49,0x9b,0x02,0xcd,0x16,0xf4,0x4c);
1218__CRT_UUID_DECL(ID2D1Device, 0x47dd575d,0xac05,0x4cdd,0x80,0x49,0x9b,0x02,0xcd,0x16,0xf4,0x4c);
1219
1220#ifndef D2D_USE_C_DEFINITIONS
1221
1222interface ID2D1DrawingStateBlock1 : public ID2D1DrawingStateBlock
1223{
1224 STDMETHOD_(void, GetDescription)(D2D1_DRAWING_STATE_DESCRIPTION1 *stateDescription) CONST PURE;
1225 using ID2D1DrawingStateBlock::GetDescription;
1226
1227 STDMETHOD_(void, SetDescription)(CONST D2D1_DRAWING_STATE_DESCRIPTION1 *stateDescription) PURE;
1228 using ID2D1DrawingStateBlock::SetDescription;
1229};
1230
1231#else
1232
1233typedef interface ID2D1DrawingStateBlock1 ID2D1DrawingStateBlock1;
1234/* FIXME: Add full C declaration */
1235
1236#endif
1237
1238DEFINE_GUID(IID_ID2D1DrawingStateBlock1, 0x689f1f85,0xc72e,0x4e33,0x8f,0x19,0x85,0x75,0x4e,0xfd,0x5a,0xce);
1239__CRT_UUID_DECL(ID2D1DrawingStateBlock1, 0x689f1f85,0xc72e,0x4e33,0x8f,0x19,0x85,0x75,0x4e,0xfd,0x5a,0xce);
1240
1241#ifndef D2D_USE_C_DEFINITIONS
1242
1243interface ID2D1PathGeometry1 : public ID2D1PathGeometry
1244{
1245 STDMETHOD(ComputePointAndSegmentAtLength)(FLOAT length, UINT32 startSegment, CONST D2D1_MATRIX_3X2_F *worldTransform,
1246 FLOAT flatteningTolerance, D2D1_POINT_DESCRIPTION *pointDescription) CONST PURE;
1247
1248 HRESULT ComputePointAndSegmentAtLength(FLOAT length, UINT32 startSegment, CONST D2D1_MATRIX_3X2_F &worldTransform,
1249 FLOAT flatteningTolerance, D2D1_POINT_DESCRIPTION *pointDescription) CONST {
1250 return ComputePointAndSegmentAtLength(length, startSegment, &worldTransform, flatteningTolerance, pointDescription);
1251 }
1252
1253 HRESULT ComputePointAndSegmentAtLength(FLOAT length, UINT32 startSegment, CONST D2D1_MATRIX_3X2_F *worldTransform,
1254 D2D1_POINT_DESCRIPTION *pointDescription) CONST {
1255 return ComputePointAndSegmentAtLength(length, startSegment, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE,
1256 pointDescription);
1257 }
1258
1259 HRESULT ComputePointAndSegmentAtLength(FLOAT length, UINT32 startSegment, CONST D2D1_MATRIX_3X2_F &worldTransform,
1260 D2D1_POINT_DESCRIPTION *pointDescription) CONST {
1261 return ComputePointAndSegmentAtLength(length, startSegment, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE,
1262 pointDescription);
1263 }
1264};
1265
1266#else
1267
1268typedef interface ID2D1PathGeometry1 ID2D1PathGeometry1;
1269/* FIXME: Add full C declaration */
1270
1271#endif
1272
1273DEFINE_GUID(IID_ID2D1PathGeometry1, 0x62baa2d2,0xab54,0x41b7,0xb8,0x72,0x78,0x7e,0x01,0x06,0xa4,0x21);
1274__CRT_UUID_DECL(ID2D1PathGeometry1, 0x62baa2d2,0xab54,0x41b7,0xb8,0x72,0x78,0x7e,0x01,0x06,0xa4,0x21);
1275
1276#ifndef D2D_USE_C_DEFINITIONS
1277
1278interface ID2D1Factory1 : public ID2D1Factory
1279{
1280 STDMETHOD(CreateDevice)(IDXGIDevice *dxgiDevice, ID2D1Device **d2dDevice) PURE;
1281
1282 STDMETHOD(CreateStrokeStyle)(CONST D2D1_STROKE_STYLE_PROPERTIES1 *strokeStyleProperties,
1283 CONST FLOAT *dashes, UINT32 dashesCount, ID2D1StrokeStyle1 **strokeStyle) PURE;
1284 using ID2D1Factory::CreateStrokeStyle;
1285
1286 STDMETHOD(CreatePathGeometry)(ID2D1PathGeometry1 **pathGeometry) PURE;
1287 using ID2D1Factory::CreatePathGeometry;
1288
1289 STDMETHOD(CreateDrawingStateBlock)(CONST D2D1_DRAWING_STATE_DESCRIPTION1 *drawingStateDescription,
1290 IDWriteRenderingParams *textRenderingParams, ID2D1DrawingStateBlock1 **drawingStateBlock) PURE;
1291 using ID2D1Factory::CreateDrawingStateBlock;
1292
1293 STDMETHOD(CreateGdiMetafile)(IStream *metafileStream, ID2D1GdiMetafile **metafile) PURE;
1294 STDMETHOD(RegisterEffectFromStream)(REFCLSID classId, IStream *propertyXml, CONST D2D1_PROPERTY_BINDING *bindings,
1295 UINT32 bindingsCount, CONST PD2D1_EFFECT_FACTORY effectFactory) PURE;
1296 STDMETHOD(RegisterEffectFromString)(REFCLSID classId, PCWSTR propertyXml, CONST D2D1_PROPERTY_BINDING *bindings,
1297 UINT32 bindingsCount, CONST PD2D1_EFFECT_FACTORY effectFactory) PURE;
1298 STDMETHOD(UnregisterEffect)(REFCLSID classId) PURE;
1299 STDMETHOD(GetRegisteredEffects)(CLSID *effects, UINT32 effectsCount, UINT32 *effectsReturned,
1300 UINT32 *effectsRegistered) CONST PURE;
1301 STDMETHOD(GetEffectProperties)(REFCLSID effectId, ID2D1Properties **properties) CONST PURE;
1302
1303 HRESULT CreateStrokeStyle(CONST D2D1_STROKE_STYLE_PROPERTIES1 &strokeStyleProperties, CONST FLOAT *dashes,
1304 UINT32 dashesCount, ID2D1StrokeStyle1 **strokeStyle) {
1305 return CreateStrokeStyle(&strokeStyleProperties, dashes, dashesCount, strokeStyle);
1306 }
1307
1308 HRESULT CreateDrawingStateBlock(CONST D2D1_DRAWING_STATE_DESCRIPTION1 &drawingStateDescription,
1309 ID2D1DrawingStateBlock1 **drawingStateBlock) {
1310 return CreateDrawingStateBlock(&drawingStateDescription, NULL, drawingStateBlock);
1311 }
1312
1313 HRESULT CreateDrawingStateBlock(ID2D1DrawingStateBlock1 **drawingStateBlock) {
1314 return CreateDrawingStateBlock(NULL, NULL, drawingStateBlock);
1315 }
1316};
1317
1318#else
1319
1320typedef interface ID2D1Factory1 ID2D1Factory1;
1321
1322typedef struct ID2D1Factory1Vtbl {
1323 ID2D1FactoryVtbl Base;
1324
1325 STDMETHOD(CreateDevice)(ID2D1Factory1 *This, IDXGIDevice *dxgiDevice,
1326 ID2D1Device **d2dDevice) PURE;
1327 STDMETHOD(CreateStrokeStyle)(ID2D1Factory1 *This,
1328 CONST D2D1_STROKE_STYLE_PROPERTIES1 *strokeStyleProperties,
1329 CONST FLOAT *dashes, UINT32 dashesCount,
1330 ID2D1StrokeStyle1 **strokeStyle) PURE;
1331 STDMETHOD(CreatePathGeometry)(ID2D1Factory1 *This,
1332 ID2D1PathGeometry1 **pathGeometry) PURE;
1333 STDMETHOD(CreateDrawingStateBlock)(ID2D1Factory1 *This,
1334 CONST D2D1_DRAWING_STATE_DESCRIPTION1 *drawingStateDescription,
1335 IDWriteRenderingParams *textRenderingParams,
1336 ID2D1DrawingStateBlock1 **drawingStateBlock) PURE;
1337 STDMETHOD(CreateGdiMetafile)(ID2D1Factory1 *This, IStream *metafileStream,
1338 ID2D1GdiMetafile **metafile) PURE;
1339 STDMETHOD(RegisterEffectFromStream)(ID2D1Factory1 *This, REFCLSID classId,
1340 IStream *propertyXml, CONST D2D1_PROPERTY_BINDING *bindings,
1341 UINT32 bindingsCount,
1342 CONST PD2D1_EFFECT_FACTORY effectFactory) PURE;
1343 STDMETHOD(RegisterEffectFromString)(ID2D1Factory1 *This,
1344 REFCLSID classId, PCWSTR propertyXml,
1345 CONST D2D1_PROPERTY_BINDING *bindings, UINT32 bindingsCount,
1346 CONST PD2D1_EFFECT_FACTORY effectFactory) PURE;
1347 STDMETHOD(UnregisterEffect)(ID2D1Factory1 *This, REFCLSID classId) PURE;
1348 STDMETHOD(GetRegisteredEffects)(ID2D1Factory1 *This, CLSID *effects,
1349 UINT32 effectsCount, UINT32 *effectsReturned,
1350 UINT32 *effectsRegistered) PURE;
1351 STDMETHOD(GetEffectProperties)(ID2D1Factory1 *This, REFCLSID effectId,
1352 ID2D1Properties **properties) PURE;
1353} ID2D1Factory1Vtbl;
1354
1355interface ID2D1Factory1 {
1356 const ID2D1Factory1Vtbl *lpVtbl;
1357};
1358
1359#define ID2D1Factory1_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.QueryInterface((IUnknown *)(this),A,B)
1360#define ID2D1Factory1_AddRef(this) (this)->lpVtbl->Base.Base.AddRef((IUnknown *)(this))
1361#define ID2D1Factory1_Release(this) (this)->lpVtbl->Base.Base.Release((IUnknown *)(this))
1362#define ID2D1Factory1_CreateDevice(this,A,B) (this)->lpVtbl->CreateDevice(this,A,B)
1363#define ID2D1Factory1_CreateStrokeStyle(this,A,B,C,D) (this)->lpVtbl->CreateStrokeStyle(this,A,B,C,D)
1364#define ID2D1Factory1_CreatePathGeometry(this,A) (this)->lpVbtl->CreatePathGeometry(this,A)
1365#define ID2D1Factory1_CreateDrawingStateBlock(this,A,B, C) (this)->lpVtbl->CreateDrawingStateBlock(this,A,B,C)
1366#define ID2D1Factory1_CreateGdiMetafile(this,A,B) (this)->lpVtbl->CreateGdiMetafile(this,A,B)
1367#define ID2D1Factory1_RegisterEffectFromStream(this,A,B,C,D,E) (this)->lpVtbl->RegisterEffectFromStream(this,A,B,C,D,E)
1368#define ID2D1Factory1_RegisterEffectFromString(this,A,B,C,D,E) (this)->lpVtbl->RegisterEffectFromString(this,A,B,C,D,E)
1369#define ID2D1Factory1_UnregisterEffect(this,A) (this)->lpVtbl->UnregisterEffect(this,A)
1370#define ID2D1Factory1_GetRegisteredEffects(this,A,B,C,D) (this)->lpVtbl->GetRegisteredEffects(this,A,B,C,D)
1371#define ID2D1Factory1_GetEffectProperties(this,A,B) (this)->lpVtbl->GetEffectProperties(this,A,B)
1372
1373#endif
1374
1375DEFINE_GUID(IID_ID2D1Factory1, 0xbb12d362,0xdaee,0x4b9a,0xaa,0x1d,0x14,0xba,0x40,0x1c,0xfa,0x1f);
1376__CRT_UUID_DECL(ID2D1Factory1, 0xbb12d362,0xdaee,0x4b9a,0xaa,0x1d,0x14,0xba,0x40,0x1c,0xfa,0x1f);
1377
1378#ifndef D2D_USE_C_DEFINITIONS
1379
1380interface ID2D1Multithread : public IUnknown
1381{
1382 STDMETHOD_(BOOL, GetMultithreadProtected)() CONST PURE;
1383 STDMETHOD_(void, Enter)() PURE;
1384 STDMETHOD_(void, Leave)() PURE;
1385};
1386
1387#else
1388
1389typedef interface ID2D1Multithread ID2D1Multithread;
1390
1391typedef struct ID2D1MultithreadVtbl {
1392 IUnknownVtbl Base;
1393
1394 STDMETHOD_(BOOL, GetMultithreadProtected)(ID2D1Multithread *This) PURE;
1395 STDMETHOD_(void, Enter)(ID2D1Multithread *This) PURE;
1396 STDMETHOD_(void, Leave)(ID2D1Multithread *This) PURE;
1397} ID2D1MultithreadVtbl;
1398
1399interface ID2D1Multithread {
1400 ID2D1MultithreadVtbl *lpVtbl;
1401};
1402
1403#define ID2D1Multithread_QueryInterface(this,A,B) (this)->lpVtbl->Base.QueryInterface((IUnknown *)(this),A,B)
1404#define ID2D1Multithread_AddRef(this) (this)->lpVtbl->Base.AddRef((IUnknown *)(this))
1405#define ID2D1Multithread_Release(this) (this)->lpVtbl->Base.Release((IUnknown *)(this))
1406#define ID2D1Mutlithread_GetMultithreadProtected(this) (this)->lpVtbl->GetMultihreadProtected(this)
1407#define ID2D1Multithread_Enter(this) (this)->lpVtbl->Enter(this)
1408#define ID2D1Multithread_Leave(this) (this)->lpVtbl->Leave(this)
1409
1410#endif
1411
1412DEFINE_GUID(IID_ID2D1Multithread, 0x31e6e7bc,0xe0ff,0x4d46,0x8c,0x64,0xa0,0xa8,0xc4,0x1c,0x15,0xd3);
1413__CRT_UUID_DECL(ID2D1Multithread, 0x31e6e7bc,0xe0ff,0x4d46,0x8c,0x64,0xa0,0xa8,0xc4,0x1c,0x15,0xd3);
1414
1415#include <d2d1_1helper.h>
1416
1417#endif
Note: See TracBrowser for help on using the repository browser.