| 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_3_H_ |
| 8 |
#define _D2D1_3_H_ |
| 9 |
|
| 10 |
#ifndef _D2D1_2_H_ |
| 11 |
#include <d2d1_2.h> |
| 12 |
#endif |
| 13 |
|
| 14 |
#ifndef _D2D1_EFFECTS_2_ |
| 15 |
#include <d2d1effects_2.h> |
| 16 |
#endif |
| 17 |
|
| 18 |
#ifndef _D2D1_SVG_ |
| 19 |
#include <d2d1svg.h> |
| 20 |
#endif |
| 21 |
|
| 22 |
#include <winapifamily.h> |
| 23 |
|
| 24 |
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) |
| 25 |
|
| 26 |
typedef interface IWICBitmapFrameDecode IWICBitmapFrameDecode; |
| 27 |
typedef interface IDWriteFontFace IDWriteFontFace; |
| 28 |
|
| 29 |
typedef enum D2D1_INK_NIB_SHAPE { |
| 30 |
D2D1_INK_NIB_SHAPE_ROUND = 0, |
| 31 |
D2D1_INK_NIB_SHAPE_SQUARE = 1, |
| 32 |
D2D1_INK_NIB_SHAPE_FORCE_DWORD = 0xffffffff |
| 33 |
} D2D1_INK_NIB_SHAPE; |
| 34 |
|
| 35 |
typedef enum D2D1_ORIENTATION { |
| 36 |
D2D1_ORIENTATION_DEFAULT = 1, |
| 37 |
D2D1_ORIENTATION_FLIP_HORIZONTAL = 2, |
| 38 |
D2D1_ORIENTATION_ROTATE_CLOCKWISE180 = 3, |
| 39 |
D2D1_ORIENTATION_ROTATE_CLOCKWISE180_FLIP_HORIZONTAL = 4, |
| 40 |
D2D1_ORIENTATION_ROTATE_CLOCKWISE90_FLIP_HORIZONTAL = 5, |
| 41 |
D2D1_ORIENTATION_ROTATE_CLOCKWISE270 = 6, |
| 42 |
D2D1_ORIENTATION_ROTATE_CLOCKWISE270_FLIP_HORIZONTAL = 7, |
| 43 |
D2D1_ORIENTATION_ROTATE_CLOCKWISE90 = 8, |
| 44 |
D2D1_ORIENTATION_FORCE_DWORD = 0xffffffff |
| 45 |
} D2D1_ORIENTATION; |
| 46 |
|
| 47 |
typedef enum D2D1_IMAGE_SOURCE_LOADING_OPTIONS { |
| 48 |
D2D1_IMAGE_SOURCE_LOADING_OPTIONS_NONE = 0, |
| 49 |
D2D1_IMAGE_SOURCE_LOADING_OPTIONS_RELEASE_SOURCE = 1, |
| 50 |
D2D1_IMAGE_SOURCE_LOADING_OPTIONS_CACHE_ON_DEMAND = 2, |
| 51 |
D2D1_IMAGE_SOURCE_LOADING_OPTIONS_FORCE_DWORD = 0xffffffff |
| 52 |
} D2D1_IMAGE_SOURCE_LOADING_OPTIONS; |
| 53 |
|
| 54 |
DEFINE_ENUM_FLAG_OPERATORS(D2D1_IMAGE_SOURCE_LOADING_OPTIONS); |
| 55 |
|
| 56 |
typedef enum D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS { |
| 57 |
D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_NONE = 0, |
| 58 |
D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_LOW_QUALITY_PRIMARY_CONVERSION = 1, |
| 59 |
D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS_FORCE_DWORD = 0xffffffff |
| 60 |
} D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS; |
| 61 |
|
| 62 |
DEFINE_ENUM_FLAG_OPERATORS(D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS); |
| 63 |
|
| 64 |
typedef enum D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS { |
| 65 |
D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_NONE = 0, |
| 66 |
D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_DISABLE_DPI_SCALE = 1, |
| 67 |
D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS_FORCE_DWORD = 0xffffffff |
| 68 |
} D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS; |
| 69 |
|
| 70 |
DEFINE_ENUM_FLAG_OPERATORS(D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS); |
| 71 |
|
| 72 |
typedef struct D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES { |
| 73 |
D2D1_ORIENTATION orientation; |
| 74 |
FLOAT scaleX; |
| 75 |
FLOAT scaleY; |
| 76 |
D2D1_INTERPOLATION_MODE interpolationMode; |
| 77 |
D2D1_TRANSFORMED_IMAGE_SOURCE_OPTIONS options; |
| 78 |
} D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES; |
| 79 |
|
| 80 |
typedef struct D2D1_INK_POINT { |
| 81 |
FLOAT x; |
| 82 |
FLOAT y; |
| 83 |
FLOAT radius; |
| 84 |
} D2D1_INK_POINT; |
| 85 |
|
| 86 |
typedef struct D2D1_INK_BEZIER_SEGMENT { |
| 87 |
D2D1_INK_POINT point1; |
| 88 |
D2D1_INK_POINT point2; |
| 89 |
D2D1_INK_POINT point3; |
| 90 |
} D2D1_INK_BEZIER_SEGMENT; |
| 91 |
|
| 92 |
typedef struct D2D1_INK_STYLE_PROPERTIES { |
| 93 |
D2D1_INK_NIB_SHAPE nibShape; |
| 94 |
D2D1_MATRIX_3X2_F nibTransform; |
| 95 |
} D2D1_INK_STYLE_PROPERTIES; |
| 96 |
|
| 97 |
typedef enum D2D1_PATCH_EDGE_MODE { |
| 98 |
D2D1_PATCH_EDGE_MODE_ALIASED = 0, |
| 99 |
D2D1_PATCH_EDGE_MODE_ANTIALIASED = 1, |
| 100 |
D2D1_PATCH_EDGE_MODE_ALIASED_INFLATED = 2, |
| 101 |
D2D1_PATCH_EDGE_MODE_FORCE_DWORD = 0xffffffff |
| 102 |
} D2D1_PATCH_EDGE_MODE; |
| 103 |
|
| 104 |
typedef struct D2D1_GRADIENT_MESH_PATCH { |
| 105 |
D2D1_POINT_2F point00; |
| 106 |
D2D1_POINT_2F point01; |
| 107 |
D2D1_POINT_2F point02; |
| 108 |
D2D1_POINT_2F point03; |
| 109 |
D2D1_POINT_2F point10; |
| 110 |
D2D1_POINT_2F point11; |
| 111 |
D2D1_POINT_2F point12; |
| 112 |
D2D1_POINT_2F point13; |
| 113 |
D2D1_POINT_2F point20; |
| 114 |
D2D1_POINT_2F point21; |
| 115 |
D2D1_POINT_2F point22; |
| 116 |
D2D1_POINT_2F point23; |
| 117 |
D2D1_POINT_2F point30; |
| 118 |
D2D1_POINT_2F point31; |
| 119 |
D2D1_POINT_2F point32; |
| 120 |
D2D1_POINT_2F point33; |
| 121 |
D2D1_COLOR_F color00; |
| 122 |
D2D1_COLOR_F color03; |
| 123 |
D2D1_COLOR_F color30; |
| 124 |
D2D1_COLOR_F color33; |
| 125 |
D2D1_PATCH_EDGE_MODE topEdgeMode; |
| 126 |
D2D1_PATCH_EDGE_MODE leftEdgeMode; |
| 127 |
D2D1_PATCH_EDGE_MODE bottomEdgeMode; |
| 128 |
D2D1_PATCH_EDGE_MODE rightEdgeMode; |
| 129 |
} D2D1_GRADIENT_MESH_PATCH; |
| 130 |
|
| 131 |
typedef enum D2D1_SPRITE_OPTIONS { |
| 132 |
D2D1_SPRITE_OPTIONS_NONE = 0, |
| 133 |
D2D1_SPRITE_OPTIONS_CLAMP_TO_SOURCE_RECTANGLE = 1, |
| 134 |
D2D1_SPRITE_OPTIONS_FORCE_DWORD = 0xffffffff |
| 135 |
} D2D1_SPRITE_OPTIONS; |
| 136 |
|
| 137 |
DEFINE_ENUM_FLAG_OPERATORS(D2D1_SPRITE_OPTIONS); |
| 138 |
|
| 139 |
typedef enum D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION { |
| 140 |
D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_DEFAULT = 0, |
| 141 |
D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_DISABLE = 1, |
| 142 |
D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_FORCE_DWORD = 0xffffffff |
| 143 |
} D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION; |
| 144 |
|
| 145 |
typedef enum D2D1_GAMMA1 { |
| 146 |
D2D1_GAMMA1_G22 = D2D1_GAMMA_2_2, |
| 147 |
D2D1_GAMMA1_G10 = D2D1_GAMMA_1_0, |
| 148 |
D2D1_GAMMA1_G2084 = 2, |
| 149 |
D2D1_GAMMA1_FORCE_DWORD = 0xffffffff |
| 150 |
} D2D1_GAMMA1; |
| 151 |
|
| 152 |
typedef struct D2D1_SIMPLE_COLOR_PROFILE { |
| 153 |
D2D1_POINT_2F redPrimary; |
| 154 |
D2D1_POINT_2F greenPrimary; |
| 155 |
D2D1_POINT_2F bluePrimary; |
| 156 |
D2D1_POINT_2F whitePointXZ; |
| 157 |
D2D1_GAMMA1 gamma; |
| 158 |
} D2D1_SIMPLE_COLOR_PROFILE; |
| 159 |
|
| 160 |
typedef enum D2D1_COLOR_CONTEXT_TYPE { |
| 161 |
D2D1_COLOR_CONTEXT_TYPE_ICC = 0, |
| 162 |
D2D1_COLOR_CONTEXT_TYPE_SIMPLE = 1, |
| 163 |
D2D1_COLOR_CONTEXT_TYPE_DXGI = 2, |
| 164 |
D2D1_COLOR_CONTEXT_TYPE_FORCE_DWORD = 0xffffffff |
| 165 |
} D2D1_COLOR_CONTEXT_TYPE; |
| 166 |
|
| 167 |
#ifndef D2D_USE_C_DEFINITIONS |
| 168 |
interface ID2D1InkStyle : public ID2D1Resource |
| 169 |
{ |
| 170 |
STDMETHOD_(void, SetNibTransform)(const D2D1_MATRIX_3X2_F *transform) PURE; |
| 171 |
STDMETHOD_(void, GetNibTransform)(D2D1_MATRIX_3X2_F *transform) const PURE; |
| 172 |
STDMETHOD_(void, SetNibShape)(D2D1_INK_NIB_SHAPE nib_shape) PURE; |
| 173 |
STDMETHOD_(D2D1_INK_NIB_SHAPE, GetNibShape)() const PURE; |
| 174 |
|
| 175 |
COM_DECLSPEC_NOTHROW void SetNibTransform(const D2D1_MATRIX_3X2_F &transform) { |
| 176 |
SetNibTransform(&transform); |
| 177 |
} |
| 178 |
}; |
| 179 |
#else |
| 180 |
typedef interface ID2D1InkStyle ID2D1InkStyle; |
| 181 |
/* FIXME: Add full C declaration */ |
| 182 |
#endif |
| 183 |
|
| 184 |
DEFINE_GUID(IID_ID2D1InkStyle, 0xbae8b344, 0x23fc, 0x4071, 0x8c, 0xb5, 0xd0, 0x5d, 0x6f, 0x07, 0x38, 0x48); |
| 185 |
__CRT_UUID_DECL(ID2D1InkStyle, 0xbae8b344, 0x23fc, 0x4071, 0x8c, 0xb5, 0xd0, 0x5d, 0x6f, 0x07, 0x38, 0x48); |
| 186 |
|
| 187 |
#ifndef D2D_USE_C_DEFINITIONS |
| 188 |
interface ID2D1Ink : public ID2D1Resource |
| 189 |
{ |
| 190 |
STDMETHOD_(void, SetStartPoint)(const D2D1_INK_POINT *start_point) PURE; |
| 191 |
#ifndef WIDL_EXPLICIT_AGGREGATE_RETURNS |
| 192 |
STDMETHOD_(D2D1_INK_POINT, GetStartPoint)() const PURE; |
| 193 |
#else |
| 194 |
virtual D2D1_INK_POINT* STDMETHODCALLTYPE GetStartPoint(D2D1_INK_POINT*) const = 0; |
| 195 |
D2D1_INK_POINT STDMETHODCALLTYPE GetStartPoint() const { |
| 196 |
D2D1_INK_POINT __ret; |
| 197 |
GetStartPoint(&__ret); |
| 198 |
return __ret; |
| 199 |
} |
| 200 |
#endif |
| 201 |
STDMETHOD(AddSegments)(const D2D1_INK_BEZIER_SEGMENT *segments, UINT32 segments_count) PURE; |
| 202 |
STDMETHOD(RemoveSegmentsAtEnd)(UINT32 segments_count) PURE; |
| 203 |
STDMETHOD(SetSegments)(UINT32 start_segment, const D2D1_INK_BEZIER_SEGMENT *segments, UINT32 segments_count) PURE; |
| 204 |
STDMETHOD(SetSegmentAtEnd)(const D2D1_INK_BEZIER_SEGMENT *segment) PURE; |
| 205 |
STDMETHOD_(UINT32, GetSegmentCount)() const PURE; |
| 206 |
STDMETHOD(GetSegments)(UINT32 start_segment, D2D1_INK_BEZIER_SEGMENT *segments, UINT32 segments_count) const PURE; |
| 207 |
STDMETHOD(StreamAsGeometry)(ID2D1InkStyle *ink_style, const D2D1_MATRIX_3X2_F *world_transform, FLOAT flattening_tolerance, ID2D1SimplifiedGeometrySink *geometry_sink) const PURE; |
| 208 |
STDMETHOD(GetBounds)(ID2D1InkStyle *ink_style, const D2D1_MATRIX_3X2_F *world_transform, D2D1_RECT_F *bounds) const PURE; |
| 209 |
|
| 210 |
COM_DECLSPEC_NOTHROW void SetStartPoint(const D2D1_INK_POINT &start_point) { |
| 211 |
SetStartPoint(&start_point); |
| 212 |
} |
| 213 |
|
| 214 |
COM_DECLSPEC_NOTHROW HRESULT SetSegmentAtEnd(const D2D1_INK_BEZIER_SEGMENT &segment) { |
| 215 |
return SetSegmentAtEnd(&segment); |
| 216 |
} |
| 217 |
|
| 218 |
COM_DECLSPEC_NOTHROW HRESULT StreamAsGeometry(ID2D1InkStyle *ink_style, const D2D1_MATRIX_3X2_F &world_transform, FLOAT flattening_tolerance, ID2D1SimplifiedGeometrySink *geometry_sink) const { |
| 219 |
return StreamAsGeometry(ink_style, &world_transform, flattening_tolerance, geometry_sink); |
| 220 |
} |
| 221 |
|
| 222 |
COM_DECLSPEC_NOTHROW HRESULT StreamAsGeometry(ID2D1InkStyle *ink_style, const D2D1_MATRIX_3X2_F *world_transform, ID2D1SimplifiedGeometrySink *geometry_sink) const { |
| 223 |
return StreamAsGeometry(ink_style, world_transform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometry_sink); |
| 224 |
} |
| 225 |
|
| 226 |
COM_DECLSPEC_NOTHROW HRESULT StreamAsGeometry(ID2D1InkStyle *ink_style, const D2D1_MATRIX_3X2_F &world_transform, ID2D1SimplifiedGeometrySink *geometry_sink) const { |
| 227 |
return StreamAsGeometry(ink_style, &world_transform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometry_sink); |
| 228 |
} |
| 229 |
}; |
| 230 |
#else |
| 231 |
typedef interface ID2D1Ink ID2D1Ink; |
| 232 |
/* FIXME: Add full C declaration */ |
| 233 |
#endif |
| 234 |
|
| 235 |
DEFINE_GUID(IID_ID2D1Ink, 0xb499923b, 0x7029, 0x478f, 0xa8, 0xb3, 0x43, 0x2c, 0x7c, 0x5f, 0x53, 0x12); |
| 236 |
__CRT_UUID_DECL(ID2D1Ink, 0xb499923b, 0x7029, 0x478f, 0xa8, 0xb3, 0x43, 0x2c, 0x7c, 0x5f, 0x53, 0x12); |
| 237 |
|
| 238 |
#ifndef D2D_USE_C_DEFINITIONS |
| 239 |
interface ID2D1GradientMesh : public ID2D1Resource |
| 240 |
{ |
| 241 |
STDMETHOD_(UINT32, GetPatchCount)() const PURE; |
| 242 |
STDMETHOD(GetPatches)(UINT32 start_index, D2D1_GRADIENT_MESH_PATCH *patches, UINT32 patches_count) const PURE; |
| 243 |
}; |
| 244 |
#else |
| 245 |
typedef interface ID2D1GradientMesh ID2D1GradientMesh; |
| 246 |
/* FIXME: Add full C declaration */ |
| 247 |
#endif |
| 248 |
|
| 249 |
DEFINE_GUID(IID_ID2D1GradientMesh, 0xf292e401, 0xc050, 0x4cde, 0x83, 0xd7, 0x04, 0x96, 0x2d, 0x3b, 0x23, 0xc2); |
| 250 |
__CRT_UUID_DECL(ID2D1GradientMesh, 0xf292e401, 0xc050, 0x4cde, 0x83, 0xd7, 0x04, 0x96, 0x2d, 0x3b, 0x23, 0xc2); |
| 251 |
|
| 252 |
#ifndef D2D_USE_C_DEFINITIONS |
| 253 |
interface ID2D1ImageSource : public ID2D1Image |
| 254 |
{ |
| 255 |
STDMETHOD(OfferResources)() PURE; |
| 256 |
STDMETHOD(TryReclaimResources)(WINBOOL *resources_discarded) PURE; |
| 257 |
}; |
| 258 |
#else |
| 259 |
typedef interface ID2D1ImageSource ID2D1ImageSource; |
| 260 |
/* FIXME: Add full C declaration */ |
| 261 |
#endif |
| 262 |
|
| 263 |
DEFINE_GUID(IID_ID2D1ImageSource, 0xc9b664e5, 0x74a1, 0x4378, 0x9a, 0xc2, 0xee, 0xfc, 0x37, 0xa3, 0xf4, 0xd8); |
| 264 |
__CRT_UUID_DECL(ID2D1ImageSource, 0xc9b664e5, 0x74a1, 0x4378, 0x9a, 0xc2, 0xee, 0xfc, 0x37, 0xa3, 0xf4, 0xd8); |
| 265 |
|
| 266 |
#ifndef D2D_USE_C_DEFINITIONS |
| 267 |
interface ID2D1ImageSourceFromWic : public ID2D1ImageSource |
| 268 |
{ |
| 269 |
STDMETHOD(EnsureCached)(const D2D1_RECT_U *rectangle_to_fill) PURE; |
| 270 |
STDMETHOD(TrimCache)(const D2D1_RECT_U *rectangle_to_preserve) PURE; |
| 271 |
STDMETHOD_(void, GetSource)(IWICBitmapSource **wic_bitmap_source) const PURE; |
| 272 |
|
| 273 |
COM_DECLSPEC_NOTHROW HRESULT EnsureCached(const D2D1_RECT_U &rectangle_to_fill) { |
| 274 |
return EnsureCached(&rectangle_to_fill); |
| 275 |
} |
| 276 |
|
| 277 |
COM_DECLSPEC_NOTHROW HRESULT TrimCache(const D2D1_RECT_U &rectangle_to_preserve) { |
| 278 |
return TrimCache(&rectangle_to_preserve); |
| 279 |
} |
| 280 |
}; |
| 281 |
#else |
| 282 |
typedef interface ID2D1ImageSourceFromWic ID2D1ImageSourceFromWic; |
| 283 |
/* FIXME: Add full C declaration */ |
| 284 |
#endif |
| 285 |
|
| 286 |
DEFINE_GUID(IID_ID2D1ImageSourceFromWic, 0x77395441, 0x1c8f, 0x4555, 0x86, 0x83, 0xf5, 0x0d, 0xab, 0x0f, 0xe7, 0x92); |
| 287 |
__CRT_UUID_DECL(ID2D1ImageSourceFromWic, 0x77395441, 0x1c8f, 0x4555, 0x86, 0x83, 0xf5, 0x0d, 0xab, 0x0f, 0xe7, 0x92); |
| 288 |
|
| 289 |
#ifndef D2D_USE_C_DEFINITIONS |
| 290 |
interface ID2D1TransformedImageSource : public ID2D1Image |
| 291 |
{ |
| 292 |
STDMETHOD_(void, GetSource)(ID2D1ImageSource **image_source) const PURE; |
| 293 |
STDMETHOD_(void, GetProperties)(D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *properties) const PURE; |
| 294 |
}; |
| 295 |
#else |
| 296 |
typedef interface ID2D1TransformedImageSource ID2D1TransformedImageSource; |
| 297 |
/* FIXME: Add full C declaration */ |
| 298 |
#endif |
| 299 |
|
| 300 |
DEFINE_GUID(IID_ID2D1TransformedImageSource, 0x7f1f79e5, 0x2796, 0x416c, 0x8f, 0x55, 0x70, 0x0f, 0x91, 0x14, 0x45, 0xe5); |
| 301 |
__CRT_UUID_DECL(ID2D1TransformedImageSource, 0x7f1f79e5, 0x2796, 0x416c, 0x8f, 0x55, 0x70, 0x0f, 0x91, 0x14, 0x45, 0xe5); |
| 302 |
|
| 303 |
#ifndef D2D_USE_C_DEFINITIONS |
| 304 |
interface ID2D1LookupTable3D : public ID2D1Resource |
| 305 |
{ |
| 306 |
}; |
| 307 |
#else |
| 308 |
typedef interface ID2D1LookupTable3D ID2D1LookupTable3D; |
| 309 |
/* FIXME: Add full C declaration */ |
| 310 |
#endif |
| 311 |
|
| 312 |
DEFINE_GUID(IID_ID2D1LookupTable3D, 0x53dd9855, 0xa3b0, 0x4d5b, 0x82, 0xe1, 0x26, 0xe2, 0x5c, 0x5e, 0x57, 0x97); |
| 313 |
__CRT_UUID_DECL(ID2D1LookupTable3D, 0x53dd9855, 0xa3b0, 0x4d5b, 0x82, 0xe1, 0x26, 0xe2, 0x5c, 0x5e, 0x57, 0x97); |
| 314 |
|
| 315 |
#ifndef D2D_USE_C_DEFINITIONS |
| 316 |
interface ID2D1DeviceContext2 : public ID2D1DeviceContext1 |
| 317 |
{ |
| 318 |
STDMETHOD(CreateInk)(const D2D1_INK_POINT *start_point, ID2D1Ink **ink) PURE; |
| 319 |
STDMETHOD(CreateInkStyle)(const D2D1_INK_STYLE_PROPERTIES *ink_style_properties, ID2D1InkStyle **ink_style) PURE; |
| 320 |
STDMETHOD(CreateGradientMesh)(const D2D1_GRADIENT_MESH_PATCH *patches, UINT32 patches_count, ID2D1GradientMesh **gradient_mesh) PURE; |
| 321 |
STDMETHOD(CreateImageSourceFromWic)(IWICBitmapSource *wic_bitmap_source, D2D1_IMAGE_SOURCE_LOADING_OPTIONS loading_options, D2D1_ALPHA_MODE alpha_mode, ID2D1ImageSourceFromWic **image_source) PURE; |
| 322 |
STDMETHOD(CreateLookupTable3D)(D2D1_BUFFER_PRECISION precision, const UINT32 *extents, const BYTE *data, UINT32 data_count, const UINT32 *strides, ID2D1LookupTable3D **lookup_table) PURE; |
| 323 |
STDMETHOD(CreateImageSourceFromDxgi)(IDXGISurface **surfaces, UINT32 surface_count, DXGI_COLOR_SPACE_TYPE color_space, D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS options, ID2D1ImageSource **image_source) PURE; |
| 324 |
STDMETHOD(GetGradientMeshWorldBounds)(ID2D1GradientMesh *gradient_mesh, D2D1_RECT_F *bounds) const PURE; |
| 325 |
STDMETHOD_(void, DrawInk)(ID2D1Ink *ink, ID2D1Brush *brush, ID2D1InkStyle *ink_style) PURE; |
| 326 |
STDMETHOD_(void, DrawGradientMesh)(ID2D1GradientMesh *gradient_mesh) PURE; |
| 327 |
STDMETHOD_(void, DrawGdiMetafile)(ID2D1GdiMetafile *gdi_metafile, const D2D1_RECT_F *destination_rectangle, const D2D1_RECT_F *source_rectangle = NULL) PURE; |
| 328 |
|
| 329 |
using ID2D1DeviceContext::DrawGdiMetafile; |
| 330 |
|
| 331 |
STDMETHOD(CreateTransformedImageSource)(ID2D1ImageSource *image_source, const D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *properties, ID2D1TransformedImageSource **transformed_image_source) PURE; |
| 332 |
|
| 333 |
COM_DECLSPEC_NOTHROW HRESULT CreateInk(const D2D1_INK_POINT &start_point, ID2D1Ink **ink) { |
| 334 |
return CreateInk(&start_point, ink); |
| 335 |
} |
| 336 |
|
| 337 |
COM_DECLSPEC_NOTHROW HRESULT CreateInkStyle(const D2D1_INK_STYLE_PROPERTIES &ink_style_properties, ID2D1InkStyle **ink_style) { |
| 338 |
return CreateInkStyle(&ink_style_properties, ink_style); |
| 339 |
} |
| 340 |
|
| 341 |
COM_DECLSPEC_NOTHROW HRESULT CreateImageSourceFromWic(IWICBitmapSource *wic_bitmap_source, D2D1_IMAGE_SOURCE_LOADING_OPTIONS loading_options, ID2D1ImageSourceFromWic **image_source) { |
| 342 |
return CreateImageSourceFromWic(wic_bitmap_source, loading_options, D2D1_ALPHA_MODE_UNKNOWN, image_source); |
| 343 |
} |
| 344 |
|
| 345 |
COM_DECLSPEC_NOTHROW HRESULT CreateImageSourceFromWic(IWICBitmapSource *wic_bitmap_source, ID2D1ImageSourceFromWic **image_source) { |
| 346 |
return CreateImageSourceFromWic(wic_bitmap_source, D2D1_IMAGE_SOURCE_LOADING_OPTIONS_NONE, D2D1_ALPHA_MODE_UNKNOWN, image_source); |
| 347 |
} |
| 348 |
|
| 349 |
COM_DECLSPEC_NOTHROW void DrawGdiMetafile(ID2D1GdiMetafile *gdi_metafile, const D2D1_RECT_F &destination_rectangle, const D2D1_RECT_F &source_rectangle) { |
| 350 |
return DrawGdiMetafile(gdi_metafile, &destination_rectangle, &source_rectangle); |
| 351 |
} |
| 352 |
|
| 353 |
COM_DECLSPEC_NOTHROW void DrawGdiMetafile(ID2D1GdiMetafile *gdi_metafile, const D2D1_RECT_F &destination_rectangle, const D2D1_RECT_F *source_rectangle = NULL) { |
| 354 |
return DrawGdiMetafile(gdi_metafile, &destination_rectangle, source_rectangle); |
| 355 |
} |
| 356 |
}; |
| 357 |
#else |
| 358 |
typedef interface ID2D1DeviceContext2 ID2D1DeviceContext2; |
| 359 |
/* FIXME: Add full C declaration */ |
| 360 |
#endif |
| 361 |
|
| 362 |
DEFINE_GUID(IID_ID2D1DeviceContext2, 0x394ea6a3, 0x0c34, 0x4321, 0x95, 0x0b, 0x6c, 0xa2, 0x0f, 0x0b, 0xe6, 0xc7); |
| 363 |
__CRT_UUID_DECL(ID2D1DeviceContext2, 0x394ea6a3, 0x0c34, 0x4321, 0x95, 0x0b, 0x6c, 0xa2, 0x0f, 0x0b, 0xe6, 0xc7); |
| 364 |
|
| 365 |
#ifndef D2D_USE_C_DEFINITIONS |
| 366 |
interface ID2D1Device2 : public ID2D1Device1 |
| 367 |
{ |
| 368 |
STDMETHOD(CreateDeviceContext)(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext2 **device_context2) PURE; |
| 369 |
|
| 370 |
using ID2D1Device1::CreateDeviceContext; |
| 371 |
using ID2D1Device::CreateDeviceContext; |
| 372 |
|
| 373 |
STDMETHOD_(void, FlushDeviceContexts)(ID2D1Bitmap *bitmap) PURE; |
| 374 |
STDMETHOD(GetDxgiDevice)(IDXGIDevice **dxgi_device) PURE; |
| 375 |
}; |
| 376 |
#else |
| 377 |
typedef interface ID2D1Device2 ID2D1Device2; |
| 378 |
/* FIXME: Add full C declaration */ |
| 379 |
#endif |
| 380 |
|
| 381 |
DEFINE_GUID(IID_ID2D1Device2, 0xa44472e1, 0x8dfb, 0x4e60, 0x84, 0x92, 0x6e, 0x28, 0x61, 0xc9, 0xca, 0x8b); |
| 382 |
__CRT_UUID_DECL(ID2D1Device2, 0xa44472e1, 0x8dfb, 0x4e60, 0x84, 0x92, 0x6e, 0x28, 0x61, 0xc9, 0xca, 0x8b); |
| 383 |
|
| 384 |
#ifndef D2D_USE_C_DEFINITIONS |
| 385 |
interface ID2D1Factory3 : public ID2D1Factory2 |
| 386 |
{ |
| 387 |
STDMETHOD(CreateDevice)(IDXGIDevice *dxgi_device, ID2D1Device2 **d2d_device2) PURE; |
| 388 |
|
| 389 |
using ID2D1Factory2::CreateDevice; |
| 390 |
using ID2D1Factory1::CreateDevice; |
| 391 |
}; |
| 392 |
#else |
| 393 |
typedef interface ID2D1Factory3 ID2D1Factory3; |
| 394 |
/* FIXME: Add full C declaration */ |
| 395 |
#endif |
| 396 |
|
| 397 |
DEFINE_GUID(IID_ID2D1Factory3, 0x0869759f, 0x4f00, 0x413f, 0xb0, 0x3e, 0x2b, 0xda, 0x45, 0x40, 0x4d, 0x0f); |
| 398 |
__CRT_UUID_DECL(ID2D1Factory3, 0x0869759f, 0x4f00, 0x413f, 0xb0, 0x3e, 0x2b, 0xda, 0x45, 0x40, 0x4d, 0x0f); |
| 399 |
|
| 400 |
#ifndef D2D_USE_C_DEFINITIONS |
| 401 |
interface ID2D1CommandSink2 : public ID2D1CommandSink1 |
| 402 |
{ |
| 403 |
STDMETHOD(DrawInk)(ID2D1Ink *ink, ID2D1Brush *brush, ID2D1InkStyle *ink_style) PURE; |
| 404 |
STDMETHOD(DrawGradientMesh)(ID2D1GradientMesh *gradient_mesh) PURE; |
| 405 |
STDMETHOD(DrawGdiMetafile)(ID2D1GdiMetafile *gdi_metafile, const D2D1_RECT_F *destination_rectangle, const D2D1_RECT_F *source_rectangle) PURE; |
| 406 |
|
| 407 |
using ID2D1CommandSink::DrawGdiMetafile; |
| 408 |
}; |
| 409 |
#else |
| 410 |
typedef interface ID2D1CommandSink2 ID2D1CommandSink2; |
| 411 |
/* FIXME: Add full C declaration */ |
| 412 |
#endif |
| 413 |
|
| 414 |
DEFINE_GUID(IID_ID2D1CommandSink2, 0x3bab440e, 0x417e, 0x47df, 0xa2, 0xe2, 0xbc, 0x0b, 0xe6, 0xa0, 0x09, 0x16); |
| 415 |
__CRT_UUID_DECL(ID2D1CommandSink2, 0x3bab440e, 0x417e, 0x47df, 0xa2, 0xe2, 0xbc, 0x0b, 0xe6, 0xa0, 0x09, 0x16); |
| 416 |
|
| 417 |
#ifndef D2D_USE_C_DEFINITIONS |
| 418 |
interface ID2D1GdiMetafile1 : public ID2D1GdiMetafile |
| 419 |
{ |
| 420 |
STDMETHOD(GetDpi)(FLOAT *dpi_x, FLOAT *dpi_y) PURE; |
| 421 |
STDMETHOD(GetSourceBounds)(D2D1_RECT_F *bounds) PURE; |
| 422 |
}; |
| 423 |
#else |
| 424 |
typedef interface ID2D1GdiMetafile1 ID2D1GdiMetafile1; |
| 425 |
/* FIXME: Add full C declaration */ |
| 426 |
#endif |
| 427 |
|
| 428 |
DEFINE_GUID(IID_ID2D1GdiMetafile1, 0x2e69f9e8, 0xdd3f, 0x4bf9, 0x95, 0xba, 0xc0, 0x4f, 0x49, 0xd7, 0x88, 0xdf); |
| 429 |
__CRT_UUID_DECL(ID2D1GdiMetafile1, 0x2e69f9e8, 0xdd3f, 0x4bf9, 0x95, 0xba, 0xc0, 0x4f, 0x49, 0xd7, 0x88, 0xdf); |
| 430 |
|
| 431 |
#ifndef D2D_USE_C_DEFINITIONS |
| 432 |
interface ID2D1GdiMetafileSink1 : public ID2D1GdiMetafileSink |
| 433 |
{ |
| 434 |
STDMETHOD(ProcessRecord)(DWORD record_type, const void *record_data, DWORD record_data_size, UINT32 flags) PURE; |
| 435 |
|
| 436 |
using ID2D1GdiMetafileSink::ProcessRecord; |
| 437 |
}; |
| 438 |
#else |
| 439 |
typedef interface ID2D1GdiMetafileSink1 ID2D1GdiMetafileSink1; |
| 440 |
/* FIXME: Add full C declaration */ |
| 441 |
#endif |
| 442 |
|
| 443 |
DEFINE_GUID(IID_ID2D1GdiMetafileSink1, 0xfd0ecb6b, 0x91e6, 0x411e, 0x86, 0x55, 0x39, 0x5e, 0x76, 0x0f, 0x91, 0xb4); |
| 444 |
__CRT_UUID_DECL(ID2D1GdiMetafileSink1, 0xfd0ecb6b, 0x91e6, 0x411e, 0x86, 0x55, 0x39, 0x5e, 0x76, 0x0f, 0x91, 0xb4); |
| 445 |
|
| 446 |
#if NTDDI_VERSION >= NTDDI_WIN10_TH2 |
| 447 |
|
| 448 |
#ifndef D2D_USE_C_DEFINITIONS |
| 449 |
interface ID2D1SpriteBatch : public ID2D1Resource |
| 450 |
{ |
| 451 |
STDMETHOD(AddSprites)( |
| 452 |
UINT32 sprite_count, |
| 453 |
const D2D1_RECT_F *destination_rectangles, |
| 454 |
const D2D1_RECT_U *source_rectangles = NULL, |
| 455 |
const D2D1_COLOR_F *colors = NULL, |
| 456 |
const D2D1_MATRIX_3X2_F *transforms = NULL, |
| 457 |
UINT32 destination_rectangles_stride = sizeof(D2D1_RECT_F), |
| 458 |
UINT32 source_rectangles_stride = sizeof(D2D1_RECT_U), |
| 459 |
UINT32 colors_stride = sizeof(D2D1_COLOR_F), |
| 460 |
UINT32 transforms_stride = sizeof(D2D1_MATRIX_3X2_F) |
| 461 |
) PURE; |
| 462 |
|
| 463 |
STDMETHOD(SetSprites)( |
| 464 |
UINT32 start_index, |
| 465 |
UINT32 sprite_count, |
| 466 |
const D2D1_RECT_F *destination_rectangles = NULL, |
| 467 |
const D2D1_RECT_U *source_rectangles = NULL, |
| 468 |
const D2D1_COLOR_F *colors = NULL, |
| 469 |
const D2D1_MATRIX_3X2_F *transforms = NULL, |
| 470 |
UINT32 destination_rectangles_stride = sizeof(D2D1_RECT_F), |
| 471 |
UINT32 source_rectangles_stride = sizeof(D2D1_RECT_U), |
| 472 |
UINT32 colors_stride = sizeof(D2D1_COLOR_F), |
| 473 |
UINT32 transforms_stride = sizeof(D2D1_MATRIX_3X2_F) |
| 474 |
) PURE; |
| 475 |
|
| 476 |
STDMETHOD(GetSprites)( |
| 477 |
UINT32 start_index, |
| 478 |
UINT32 sprite_count, |
| 479 |
D2D1_RECT_F *destination_rectangles = NULL, |
| 480 |
D2D1_RECT_U *source_rectangles = NULL, |
| 481 |
D2D1_COLOR_F *colors = NULL, |
| 482 |
D2D1_MATRIX_3X2_F *transforms = NULL |
| 483 |
) const PURE; |
| 484 |
|
| 485 |
STDMETHOD_(UINT32, GetSpriteCount)() const PURE; |
| 486 |
STDMETHOD_(void, Clear)() PURE; |
| 487 |
}; |
| 488 |
#else |
| 489 |
typedef interface ID2D1SpriteBatch ID2D1SpriteBatch; |
| 490 |
/* FIXME: Add full C declaration */ |
| 491 |
#endif |
| 492 |
|
| 493 |
DEFINE_GUID(IID_ID2D1SpriteBatch, 0x4dc583bf, 0x3a10, 0x438a, 0x87, 0x22, 0xe9, 0x76, 0x52, 0x24, 0xf1, 0xf1); |
| 494 |
__CRT_UUID_DECL(ID2D1SpriteBatch, 0x4dc583bf, 0x3a10, 0x438a, 0x87, 0x22, 0xe9, 0x76, 0x52, 0x24, 0xf1, 0xf1); |
| 495 |
|
| 496 |
#ifndef D2D_USE_C_DEFINITIONS |
| 497 |
interface ID2D1DeviceContext3 : public ID2D1DeviceContext2 |
| 498 |
{ |
| 499 |
STDMETHOD(CreateSpriteBatch)(ID2D1SpriteBatch **sprite_batch) PURE; |
| 500 |
|
| 501 |
STDMETHOD_(void, DrawSpriteBatch)( |
| 502 |
ID2D1SpriteBatch *sprite_batch, |
| 503 |
UINT32 start_index, |
| 504 |
UINT32 sprite_count, |
| 505 |
ID2D1Bitmap *bitmap, |
| 506 |
D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, |
| 507 |
D2D1_SPRITE_OPTIONS sprite_options = D2D1_SPRITE_OPTIONS_NONE |
| 508 |
) PURE; |
| 509 |
|
| 510 |
COM_DECLSPEC_NOTHROW |
| 511 |
void |
| 512 |
DrawSpriteBatch( |
| 513 |
ID2D1SpriteBatch *sprite_batch, |
| 514 |
ID2D1Bitmap *bitmap, |
| 515 |
D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, |
| 516 |
D2D1_SPRITE_OPTIONS sprite_options = D2D1_SPRITE_OPTIONS_NONE |
| 517 |
) |
| 518 |
{ |
| 519 |
return DrawSpriteBatch(sprite_batch, 0, sprite_batch->GetSpriteCount(), bitmap, interpolation_mode, sprite_options); |
| 520 |
} |
| 521 |
}; |
| 522 |
#else |
| 523 |
typedef interface ID2D1DeviceContext3 ID2D1DeviceContext3; |
| 524 |
/* FIXME: Add full C declaration */ |
| 525 |
#endif |
| 526 |
|
| 527 |
DEFINE_GUID(IID_ID2D1DeviceContext3, 0x235a7496, 0x8351, 0x414c, 0xbc, 0xd4, 0x66, 0x72, 0xab, 0x2d, 0x8e, 0x00); |
| 528 |
__CRT_UUID_DECL(ID2D1DeviceContext3, 0x235a7496, 0x8351, 0x414c, 0xbc, 0xd4, 0x66, 0x72, 0xab, 0x2d, 0x8e, 0x00); |
| 529 |
|
| 530 |
#ifndef D2D_USE_C_DEFINITIONS |
| 531 |
interface ID2D1Device3 : public ID2D1Device2 |
| 532 |
{ |
| 533 |
STDMETHOD(CreateDeviceContext)(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext3 **device_context3) PURE; |
| 534 |
|
| 535 |
using ID2D1Device2::CreateDeviceContext; |
| 536 |
using ID2D1Device1::CreateDeviceContext; |
| 537 |
using ID2D1Device::CreateDeviceContext; |
| 538 |
}; |
| 539 |
#else |
| 540 |
typedef interface ID2D1Device3 ID2D1Device3; |
| 541 |
/* FIXME: Add full C declaration */ |
| 542 |
#endif |
| 543 |
|
| 544 |
DEFINE_GUID(IID_ID2D1Device3, 0x852f2087, 0x802c, 0x4037, 0xab, 0x60, 0xff, 0x2e, 0x7e, 0xe6, 0xfc, 0x01); |
| 545 |
__CRT_UUID_DECL(ID2D1Device3, 0x852f2087, 0x802c, 0x4037, 0xab, 0x60, 0xff, 0x2e, 0x7e, 0xe6, 0xfc, 0x01); |
| 546 |
|
| 547 |
#ifndef D2D_USE_C_DEFINITIONS |
| 548 |
interface ID2D1Factory4 : public ID2D1Factory3 |
| 549 |
{ |
| 550 |
STDMETHOD(CreateDevice)(IDXGIDevice *dxgi_device, ID2D1Device3 **d2d_device3) PURE; |
| 551 |
|
| 552 |
using ID2D1Factory3::CreateDevice; |
| 553 |
using ID2D1Factory2::CreateDevice; |
| 554 |
using ID2D1Factory1::CreateDevice; |
| 555 |
}; |
| 556 |
#else |
| 557 |
typedef interface ID2D1Factory4 ID2D1Factory4; |
| 558 |
/* FIXME: Add full C declaration */ |
| 559 |
#endif |
| 560 |
|
| 561 |
DEFINE_GUID(IID_ID2D1Factory4, 0xbd4ec2d2, 0x0662, 0x4bee, 0xba, 0x8e, 0x6f, 0x29, 0xf0, 0x32, 0xe0, 0x96); |
| 562 |
__CRT_UUID_DECL(ID2D1Factory4, 0xbd4ec2d2, 0x0662, 0x4bee, 0xba, 0x8e, 0x6f, 0x29, 0xf0, 0x32, 0xe0, 0x96); |
| 563 |
|
| 564 |
#ifndef D2D_USE_C_DEFINITIONS |
| 565 |
interface ID2D1CommandSink3 : public ID2D1CommandSink2 |
| 566 |
{ |
| 567 |
STDMETHOD(DrawSpriteBatch)( |
| 568 |
ID2D1SpriteBatch *sprite_batch, |
| 569 |
UINT32 start_index, |
| 570 |
UINT32 sprite_count, |
| 571 |
ID2D1Bitmap *bitmap, |
| 572 |
D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode, |
| 573 |
D2D1_SPRITE_OPTIONS sprite_options |
| 574 |
) PURE; |
| 575 |
}; |
| 576 |
#else |
| 577 |
typedef interface ID2D1CommandSink3 ID2D1CommandSink3; |
| 578 |
/* FIXME: Add full C declaration */ |
| 579 |
#endif |
| 580 |
|
| 581 |
DEFINE_GUID(IID_ID2D1CommandSink3, 0x18079135, 0x4cf3, 0x4868, 0xbc, 0x8e, 0x06, 0x06, 0x7e, 0x6d, 0x24, 0x2d); |
| 582 |
__CRT_UUID_DECL(ID2D1CommandSink3, 0x18079135, 0x4cf3, 0x4868, 0xbc, 0x8e, 0x06, 0x06, 0x7e, 0x6d, 0x24, 0x2d); |
| 583 |
|
| 584 |
#endif /* NTDDI_VERSION >= NTDDI_WIN10_TH2 */ |
| 585 |
|
| 586 |
#if NTDDI_VERSION >= NTDDI_WIN10_RS1 |
| 587 |
|
| 588 |
#ifndef D2D_USE_C_DEFINITIONS |
| 589 |
interface ID2D1SvgGlyphStyle : public ID2D1Resource |
| 590 |
{ |
| 591 |
STDMETHOD(SetFill)(ID2D1Brush *brush) PURE; |
| 592 |
STDMETHOD_(void, GetFill)(ID2D1Brush **brush) PURE; |
| 593 |
|
| 594 |
STDMETHOD(SetStroke)( |
| 595 |
ID2D1Brush *brush, |
| 596 |
FLOAT stroke_width = 1.0f, |
| 597 |
const FLOAT *dashes = NULL, |
| 598 |
UINT32 dashes_count = 0, |
| 599 |
FLOAT dash_offset = 1.0f |
| 600 |
) PURE; |
| 601 |
|
| 602 |
STDMETHOD_(UINT32, GetStrokeDashesCount)() PURE; |
| 603 |
|
| 604 |
STDMETHOD_(void, GetStroke)( |
| 605 |
ID2D1Brush **brush, |
| 606 |
FLOAT *stroke_width = NULL, |
| 607 |
FLOAT *dashes = NULL, |
| 608 |
UINT32 dashes_count = 0, |
| 609 |
FLOAT *dash_offset = NULL |
| 610 |
) PURE; |
| 611 |
}; |
| 612 |
#else |
| 613 |
typedef interface ID2D1SvgGlyphStyle ID2D1SvgGlyphStyle; |
| 614 |
/* FIXME: Add full C declaration */ |
| 615 |
#endif |
| 616 |
|
| 617 |
DEFINE_GUID(IID_ID2D1SvgGlyphStyle, 0xaf671749, 0xd241, 0x4db8, 0x8e, 0x41, 0xdc, 0xc2, 0xe5, 0xc1, 0xa4, 0x38); |
| 618 |
__CRT_UUID_DECL(ID2D1SvgGlyphStyle, 0xaf671749, 0xd241, 0x4db8, 0x8e, 0x41, 0xdc, 0xc2, 0xe5, 0xc1, 0xa4, 0x38); |
| 619 |
|
| 620 |
#ifndef D2D_USE_C_DEFINITIONS |
| 621 |
interface ID2D1DeviceContext4 : public ID2D1DeviceContext3 |
| 622 |
{ |
| 623 |
STDMETHOD(CreateSvgGlyphStyle)(ID2D1SvgGlyphStyle **svg_glyph_style) PURE; |
| 624 |
|
| 625 |
STDMETHOD_(void, DrawText)( |
| 626 |
const WCHAR *string, |
| 627 |
UINT32 string_length, |
| 628 |
IDWriteTextFormat *text_format, |
| 629 |
const D2D1_RECT_F *layout_rect, |
| 630 |
ID2D1Brush *default_fill_brush, |
| 631 |
ID2D1SvgGlyphStyle *svg_glyph_style, |
| 632 |
UINT32 color_palette_index = 0, |
| 633 |
D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT, |
| 634 |
DWRITE_MEASURING_MODE measuring_mode = DWRITE_MEASURING_MODE_NATURAL |
| 635 |
) PURE; |
| 636 |
|
| 637 |
using ID2D1RenderTarget::DrawText; |
| 638 |
|
| 639 |
STDMETHOD_(void, DrawTextLayout)( |
| 640 |
D2D1_POINT_2F origin, |
| 641 |
IDWriteTextLayout *text_layout, |
| 642 |
ID2D1Brush *default_fill_brush, |
| 643 |
ID2D1SvgGlyphStyle *svg_glyph_style, |
| 644 |
UINT32 color_palette_index = 0, |
| 645 |
D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT |
| 646 |
) PURE; |
| 647 |
|
| 648 |
using ID2D1RenderTarget::DrawTextLayout; |
| 649 |
|
| 650 |
STDMETHOD_(void, DrawColorBitmapGlyphRun)( |
| 651 |
DWRITE_GLYPH_IMAGE_FORMATS glyph_image_format, |
| 652 |
D2D1_POINT_2F baseline_origin, |
| 653 |
const DWRITE_GLYPH_RUN *glyph_run, |
| 654 |
DWRITE_MEASURING_MODE measuring_mode = DWRITE_MEASURING_MODE_NATURAL, |
| 655 |
D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION bitmap_snap_option = D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_DEFAULT |
| 656 |
) PURE; |
| 657 |
|
| 658 |
STDMETHOD_(void, DrawSvgGlyphRun)( |
| 659 |
D2D1_POINT_2F baseline_origin, |
| 660 |
const DWRITE_GLYPH_RUN *glyph_run, |
| 661 |
ID2D1Brush *default_fill_brush = NULL, |
| 662 |
ID2D1SvgGlyphStyle *svg_glyph_style = NULL, |
| 663 |
UINT32 color_palette_index = 0, |
| 664 |
DWRITE_MEASURING_MODE measuring_mode = DWRITE_MEASURING_MODE_NATURAL |
| 665 |
) PURE; |
| 666 |
|
| 667 |
STDMETHOD(GetColorBitmapGlyphImage)( |
| 668 |
DWRITE_GLYPH_IMAGE_FORMATS glyph_image_format, |
| 669 |
D2D1_POINT_2F glyph_origin, |
| 670 |
IDWriteFontFace *font_face, |
| 671 |
FLOAT font_em_size, |
| 672 |
UINT16 glyph_index, |
| 673 |
WINBOOL is_sideways, |
| 674 |
const D2D1_MATRIX_3X2_F *world_transform, |
| 675 |
FLOAT dpi_x, |
| 676 |
FLOAT dpi_y, |
| 677 |
D2D1_MATRIX_3X2_F *glyph_transform, |
| 678 |
ID2D1Image **glyph_image |
| 679 |
) PURE; |
| 680 |
|
| 681 |
STDMETHOD(GetSvgGlyphImage)( |
| 682 |
D2D1_POINT_2F glyph_origin, |
| 683 |
IDWriteFontFace *font_face, |
| 684 |
FLOAT font_em_size, |
| 685 |
UINT16 glyph_index, |
| 686 |
WINBOOL is_sideways, |
| 687 |
const D2D1_MATRIX_3X2_F *world_transform, |
| 688 |
ID2D1Brush *default_fill_brush, |
| 689 |
ID2D1SvgGlyphStyle *svg_glyph_style, |
| 690 |
UINT32 color_palette_index, |
| 691 |
D2D1_MATRIX_3X2_F *glyph_transform, |
| 692 |
ID2D1CommandList **glyph_image |
| 693 |
) PURE; |
| 694 |
|
| 695 |
COM_DECLSPEC_NOTHROW void DrawText( |
| 696 |
const WCHAR *string, |
| 697 |
UINT32 string_length, |
| 698 |
IDWriteTextFormat *text_format, |
| 699 |
const D2D1_RECT_F &layout_rect, |
| 700 |
ID2D1Brush *default_fill_brush, |
| 701 |
ID2D1SvgGlyphStyle *svg_glyph_style, |
| 702 |
UINT32 color_palette_index = 0, |
| 703 |
D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT, |
| 704 |
DWRITE_MEASURING_MODE measuring_mode = DWRITE_MEASURING_MODE_NATURAL |
| 705 |
) |
| 706 |
{ |
| 707 |
return DrawText(string, string_length, text_format, &layout_rect, default_fill_brush, svg_glyph_style, color_palette_index, options, measuring_mode); |
| 708 |
} |
| 709 |
}; |
| 710 |
#else |
| 711 |
typedef interface ID2D1DeviceContext4 ID2D1DeviceContext4; |
| 712 |
/* FIXME: Add full C declaration */ |
| 713 |
#endif |
| 714 |
|
| 715 |
DEFINE_GUID(IID_ID2D1DeviceContext4, 0x8c427831, 0x3d90, 0x4476, 0xb6, 0x47, 0xc4, 0xfa, 0xe3, 0x49, 0xe4, 0xdb); |
| 716 |
__CRT_UUID_DECL(ID2D1DeviceContext4, 0x8c427831, 0x3d90, 0x4476, 0xb6, 0x47, 0xc4, 0xfa, 0xe3, 0x49, 0xe4, 0xdb); |
| 717 |
|
| 718 |
#ifndef D2D_USE_C_DEFINITIONS |
| 719 |
interface ID2D1Device4 : public ID2D1Device3 |
| 720 |
{ |
| 721 |
STDMETHOD(CreateDeviceContext)(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext4 **device_context4) PURE; |
| 722 |
|
| 723 |
using ID2D1Device3::CreateDeviceContext; |
| 724 |
using ID2D1Device2::CreateDeviceContext; |
| 725 |
using ID2D1Device1::CreateDeviceContext; |
| 726 |
using ID2D1Device::CreateDeviceContext; |
| 727 |
|
| 728 |
STDMETHOD_(void, SetMaximumColorGlyphCacheMemory)(UINT64 maximum_in_bytes) PURE; |
| 729 |
STDMETHOD_(UINT64, GetMaximumColorGlyphCacheMemory)() const PURE; |
| 730 |
}; |
| 731 |
#else |
| 732 |
typedef interface ID2D1Device4 ID2D1Device4; |
| 733 |
/* FIXME: Add full C declaration */ |
| 734 |
#endif |
| 735 |
|
| 736 |
DEFINE_GUID(IID_ID2D1Device4, 0xd7bdb159, 0x5683, 0x4a46, 0xbc, 0x9c, 0x72, 0xdc, 0x72, 0x0b, 0x85, 0x8b); |
| 737 |
__CRT_UUID_DECL(ID2D1Device4, 0xd7bdb159, 0x5683, 0x4a46, 0xbc, 0x9c, 0x72, 0xdc, 0x72, 0x0b, 0x85, 0x8b); |
| 738 |
|
| 739 |
#ifndef D2D_USE_C_DEFINITIONS |
| 740 |
interface ID2D1Factory5 : public ID2D1Factory4 |
| 741 |
{ |
| 742 |
STDMETHOD(CreateDevice)(IDXGIDevice *dxgi_device, ID2D1Device4 **d2d_device4) PURE; |
| 743 |
|
| 744 |
using ID2D1Factory4::CreateDevice; |
| 745 |
using ID2D1Factory3::CreateDevice; |
| 746 |
using ID2D1Factory2::CreateDevice; |
| 747 |
using ID2D1Factory1::CreateDevice; |
| 748 |
}; |
| 749 |
#else |
| 750 |
typedef interface ID2D1Factory5 ID2D1Factory5; |
| 751 |
/* FIXME: Add full C declaration */ |
| 752 |
#endif |
| 753 |
|
| 754 |
DEFINE_GUID(IID_ID2D1Factory5, 0xc4349994, 0x838e, 0x4b0f, 0x8c, 0xab, 0x44, 0x99, 0x7d, 0x9e, 0xea, 0xcc); |
| 755 |
__CRT_UUID_DECL(ID2D1Factory5, 0xc4349994, 0x838e, 0x4b0f, 0x8c, 0xab, 0x44, 0x99, 0x7d, 0x9e, 0xea, 0xcc); |
| 756 |
|
| 757 |
#endif /* NTDDI_VERSION >= NTDDI_WIN10_RS1 */ |
| 758 |
|
| 759 |
#if NTDDI_VERSION >= NTDDI_WIN10_RS2 |
| 760 |
|
| 761 |
#ifndef D2D_USE_C_DEFINITIONS |
| 762 |
interface ID2D1CommandSink4 : public ID2D1CommandSink3 |
| 763 |
{ |
| 764 |
STDMETHOD(SetPrimitiveBlend2)(D2D1_PRIMITIVE_BLEND primitive_blend) PURE; |
| 765 |
}; |
| 766 |
#else |
| 767 |
typedef interface ID2D1CommandSink4 ID2D1CommandSink4; |
| 768 |
/* FIXME: Add full C declaration */ |
| 769 |
#endif |
| 770 |
|
| 771 |
DEFINE_GUID(IID_ID2D1CommandSink4, 0xc78a6519, 0x40d6, 0x4218, 0xb2, 0xde, 0xbe, 0xee, 0xb7, 0x44, 0xbb, 0x3e); |
| 772 |
__CRT_UUID_DECL(ID2D1CommandSink4, 0xc78a6519, 0x40d6, 0x4218, 0xb2, 0xde, 0xbe, 0xee, 0xb7, 0x44, 0xbb, 0x3e); |
| 773 |
|
| 774 |
#ifndef D2D_USE_C_DEFINITIONS |
| 775 |
interface ID2D1ColorContext1 : public ID2D1ColorContext |
| 776 |
{ |
| 777 |
STDMETHOD_(D2D1_COLOR_CONTEXT_TYPE, GetColorContextType)() const PURE; |
| 778 |
STDMETHOD_(DXGI_COLOR_SPACE_TYPE, GetDXGIColorSpace)() const PURE; |
| 779 |
STDMETHOD(GetSimpleColorProfile)(D2D1_SIMPLE_COLOR_PROFILE *simple_profile) const PURE; |
| 780 |
}; |
| 781 |
#else |
| 782 |
typedef interface ID2D1ColorContext1 ID2D1ColorContext1; |
| 783 |
/* FIXME: Add full C declaration */ |
| 784 |
#endif |
| 785 |
|
| 786 |
DEFINE_GUID(IID_ID2D1ColorContext1, 0x1ab42875, 0xc57f, 0x4be9, 0xbd, 0x85, 0x9c, 0xd7, 0x8d, 0x6f, 0x55, 0xee); |
| 787 |
__CRT_UUID_DECL(ID2D1ColorContext1, 0x1ab42875, 0xc57f, 0x4be9, 0xbd, 0x85, 0x9c, 0xd7, 0x8d, 0x6f, 0x55, 0xee); |
| 788 |
|
| 789 |
#ifndef D2D_USE_C_DEFINITIONS |
| 790 |
interface ID2D1DeviceContext5 : public ID2D1DeviceContext4 |
| 791 |
{ |
| 792 |
STDMETHOD(CreateSvgDocument)(IStream *input_xml_stream, D2D1_SIZE_F viewport_size, ID2D1SvgDocument **svg_document) PURE; |
| 793 |
STDMETHOD_(void, DrawSvgDocument)(ID2D1SvgDocument *svg_document) PURE; |
| 794 |
STDMETHOD(CreateColorContextFromDxgiColorSpace)(DXGI_COLOR_SPACE_TYPE color_space, ID2D1ColorContext1 **color_context) PURE; |
| 795 |
STDMETHOD(CreateColorContextFromSimpleColorProfile)(const D2D1_SIMPLE_COLOR_PROFILE *simple_profile, ID2D1ColorContext1 **color_context) PURE; |
| 796 |
|
| 797 |
COM_DECLSPEC_NOTHROW HRESULT CreateColorContextFromSimpleColorProfile(const D2D1_SIMPLE_COLOR_PROFILE &simple_profile, ID2D1ColorContext1 **color_context) { |
| 798 |
return CreateColorContextFromSimpleColorProfile(&simple_profile, color_context); |
| 799 |
} |
| 800 |
}; |
| 801 |
#else |
| 802 |
typedef interface ID2D1DeviceContext5 ID2D1DeviceContext5; |
| 803 |
/* FIXME: Add full C declaration */ |
| 804 |
#endif |
| 805 |
|
| 806 |
DEFINE_GUID(IID_ID2D1DeviceContext5, 0x7836d248, 0x68cc, 0x4df6, 0xb9, 0xe8, 0xde, 0x99, 0x1b, 0xf6, 0x2e, 0xb7); |
| 807 |
__CRT_UUID_DECL(ID2D1DeviceContext5, 0x7836d248, 0x68cc, 0x4df6, 0xb9, 0xe8, 0xde, 0x99, 0x1b, 0xf6, 0x2e, 0xb7); |
| 808 |
|
| 809 |
#ifndef D2D_USE_C_DEFINITIONS |
| 810 |
interface ID2D1Device5 : public ID2D1Device4 |
| 811 |
{ |
| 812 |
STDMETHOD(CreateDeviceContext)(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext5 **device_context5) PURE; |
| 813 |
|
| 814 |
using ID2D1Device4::CreateDeviceContext; |
| 815 |
using ID2D1Device3::CreateDeviceContext; |
| 816 |
using ID2D1Device2::CreateDeviceContext; |
| 817 |
using ID2D1Device1::CreateDeviceContext; |
| 818 |
using ID2D1Device::CreateDeviceContext; |
| 819 |
}; |
| 820 |
#else |
| 821 |
typedef interface ID2D1Device5 ID2D1Device5; |
| 822 |
/* FIXME: Add full C declaration */ |
| 823 |
#endif |
| 824 |
|
| 825 |
DEFINE_GUID(IID_ID2D1Device5, 0xd55ba0a4, 0x6405, 0x4694, 0xae, 0xf5, 0x08, 0xee, 0x1a, 0x43, 0x58, 0xb4); |
| 826 |
__CRT_UUID_DECL(ID2D1Device5, 0xd55ba0a4, 0x6405, 0x4694, 0xae, 0xf5, 0x08, 0xee, 0x1a, 0x43, 0x58, 0xb4); |
| 827 |
|
| 828 |
#ifndef D2D_USE_C_DEFINITIONS |
| 829 |
interface ID2D1Factory6 : public ID2D1Factory5 |
| 830 |
{ |
| 831 |
STDMETHOD(CreateDevice)(IDXGIDevice *dxgi_device, ID2D1Device5 **d2d_device5) PURE; |
| 832 |
|
| 833 |
using ID2D1Factory5::CreateDevice; |
| 834 |
using ID2D1Factory4::CreateDevice; |
| 835 |
using ID2D1Factory3::CreateDevice; |
| 836 |
using ID2D1Factory2::CreateDevice; |
| 837 |
using ID2D1Factory1::CreateDevice; |
| 838 |
}; |
| 839 |
#else |
| 840 |
typedef interface ID2D1Factory6 ID2D1Factory6; |
| 841 |
/* FIXME: Add full C declaration */ |
| 842 |
#endif |
| 843 |
|
| 844 |
DEFINE_GUID(IID_ID2D1Factory6, 0xf9976f46, 0xf642, 0x44c1, 0x97, 0xca, 0xda, 0x32, 0xea, 0x2a, 0x26, 0x35); |
| 845 |
__CRT_UUID_DECL(ID2D1Factory6, 0xf9976f46, 0xf642, 0x44c1, 0x97, 0xca, 0xda, 0x32, 0xea, 0x2a, 0x26, 0x35); |
| 846 |
|
| 847 |
#endif /* NTDDI_VERSION >= NTDDI_WIN10_RS2 */ |
| 848 |
|
| 849 |
#if NTDDI_VERSION >= NTDDI_WIN10_RS3 |
| 850 |
|
| 851 |
#ifndef D2D_USE_C_DEFINITIONS |
| 852 |
interface ID2D1CommandSink5 : public ID2D1CommandSink4 |
| 853 |
{ |
| 854 |
STDMETHOD(BlendImage)( |
| 855 |
ID2D1Image *image, |
| 856 |
D2D1_BLEND_MODE blend_mode, |
| 857 |
const D2D1_POINT_2F *target_offset, |
| 858 |
const D2D1_RECT_F *image_rectangle, |
| 859 |
D2D1_INTERPOLATION_MODE interpolation_mode |
| 860 |
) PURE; |
| 861 |
}; |
| 862 |
#else |
| 863 |
typedef interface ID2D1CommandSink5 ID2D1CommandSink5; |
| 864 |
/* FIXME: Add full C declaration */ |
| 865 |
#endif |
| 866 |
|
| 867 |
DEFINE_GUID(IID_ID2D1CommandSink5, 0x7047dd26, 0xb1e7, 0x44a7, 0x95, 0x9a, 0x83, 0x49, 0xe2, 0x14, 0x4f, 0xa8); |
| 868 |
__CRT_UUID_DECL(ID2D1CommandSink5, 0x7047dd26, 0xb1e7, 0x44a7, 0x95, 0x9a, 0x83, 0x49, 0xe2, 0x14, 0x4f, 0xa8); |
| 869 |
|
| 870 |
#ifndef D2D_USE_C_DEFINITIONS |
| 871 |
interface ID2D1DeviceContext6 : public ID2D1DeviceContext5 |
| 872 |
{ |
| 873 |
STDMETHOD_(void, BlendImage)( |
| 874 |
ID2D1Image *image, |
| 875 |
D2D1_BLEND_MODE blend_mode, |
| 876 |
const D2D1_POINT_2F *target_offset = NULL, |
| 877 |
const D2D1_RECT_F *image_rectangle = NULL, |
| 878 |
D2D1_INTERPOLATION_MODE interpolation_mode = D2D1_INTERPOLATION_MODE_LINEAR |
| 879 |
) PURE; |
| 880 |
}; |
| 881 |
#else |
| 882 |
typedef interface ID2D1DeviceContext6 ID2D1DeviceContext6; |
| 883 |
/* FIXME: Add full C declaration */ |
| 884 |
#endif |
| 885 |
|
| 886 |
DEFINE_GUID(IID_ID2D1DeviceContext6, 0x985f7e37, 0x4ed0, 0x4a19, 0x98, 0xa3, 0x15, 0xb0, 0xed, 0xfd, 0xe3, 0x06); |
| 887 |
__CRT_UUID_DECL(ID2D1DeviceContext6, 0x985f7e37, 0x4ed0, 0x4a19, 0x98, 0xa3, 0x15, 0xb0, 0xed, 0xfd, 0xe3, 0x06); |
| 888 |
|
| 889 |
#ifndef D2D_USE_C_DEFINITIONS |
| 890 |
interface ID2D1Device6 : public ID2D1Device5 |
| 891 |
{ |
| 892 |
STDMETHOD(CreateDeviceContext)(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext6 **device_context6) PURE; |
| 893 |
|
| 894 |
using ID2D1Device5::CreateDeviceContext; |
| 895 |
using ID2D1Device4::CreateDeviceContext; |
| 896 |
using ID2D1Device3::CreateDeviceContext; |
| 897 |
using ID2D1Device2::CreateDeviceContext; |
| 898 |
using ID2D1Device1::CreateDeviceContext; |
| 899 |
using ID2D1Device::CreateDeviceContext; |
| 900 |
}; |
| 901 |
#else |
| 902 |
typedef interface ID2D1Device6 ID2D1Device6; |
| 903 |
/* FIXME: Add full C declaration */ |
| 904 |
#endif |
| 905 |
|
| 906 |
DEFINE_GUID(IID_ID2D1Device6, 0x7bfef914, 0x2d75, 0x4bad, 0xbe, 0x87, 0xe1, 0x8d, 0xdb, 0x07, 0x7b, 0x6d); |
| 907 |
__CRT_UUID_DECL(ID2D1Device6, 0x7bfef914, 0x2d75, 0x4bad, 0xbe, 0x87, 0xe1, 0x8d, 0xdb, 0x07, 0x7b, 0x6d); |
| 908 |
|
| 909 |
#ifndef D2D_USE_C_DEFINITIONS |
| 910 |
interface ID2D1Factory7 : public ID2D1Factory6 |
| 911 |
{ |
| 912 |
STDMETHOD(CreateDevice)(IDXGIDevice *dxgi_device, ID2D1Device6 **d2d_device6) PURE; |
| 913 |
|
| 914 |
using ID2D1Factory6::CreateDevice; |
| 915 |
using ID2D1Factory5::CreateDevice; |
| 916 |
using ID2D1Factory4::CreateDevice; |
| 917 |
using ID2D1Factory3::CreateDevice; |
| 918 |
using ID2D1Factory2::CreateDevice; |
| 919 |
using ID2D1Factory1::CreateDevice; |
| 920 |
}; |
| 921 |
#else |
| 922 |
typedef interface ID2D1Factory7 ID2D1Factory7; |
| 923 |
/* FIXME: Add full C declaration */ |
| 924 |
#endif |
| 925 |
|
| 926 |
DEFINE_GUID(IID_ID2D1Factory7, 0xbdc2bdd3, 0xb96c, 0x4de6, 0xbd, 0xf7, 0x99, 0xd4, 0x74, 0x54, 0x54, 0xde); |
| 927 |
__CRT_UUID_DECL(ID2D1Factory7, 0xbdc2bdd3, 0xb96c, 0x4de6, 0xbd, 0xf7, 0x99, 0xd4, 0x74, 0x54, 0x54, 0xde); |
| 928 |
|
| 929 |
#endif /* NTDDI_VERSION >= NTDDI_WIN10_RS3 */ |
| 930 |
|
| 931 |
#ifdef __cplusplus |
| 932 |
extern "C" |
| 933 |
{ |
| 934 |
#endif |
| 935 |
|
| 936 |
#if NTDDI_VERSION >= NTDDI_WINTHRESHOLD |
| 937 |
void WINAPI |
| 938 |
D2D1GetGradientMeshInteriorPointsFromCoonsPatch( |
| 939 |
const D2D1_POINT_2F *point0, |
| 940 |
const D2D1_POINT_2F *point1, |
| 941 |
const D2D1_POINT_2F *point2, |
| 942 |
const D2D1_POINT_2F *point3, |
| 943 |
const D2D1_POINT_2F *point4, |
| 944 |
const D2D1_POINT_2F *point5, |
| 945 |
const D2D1_POINT_2F *point6, |
| 946 |
const D2D1_POINT_2F *point7, |
| 947 |
const D2D1_POINT_2F *point8, |
| 948 |
const D2D1_POINT_2F *point9, |
| 949 |
const D2D1_POINT_2F *point10, |
| 950 |
const D2D1_POINT_2F *point11, |
| 951 |
D2D1_POINT_2F *tensor_point11, |
| 952 |
D2D1_POINT_2F *tensor_point12, |
| 953 |
D2D1_POINT_2F *tensor_point21, |
| 954 |
D2D1_POINT_2F *tensor_point22 |
| 955 |
); |
| 956 |
#endif /* NTDDI_VERSION >= NTDDI_WINTHRESHOLD */ |
| 957 |
|
| 958 |
#ifdef __cplusplus |
| 959 |
} |
| 960 |
#endif |
| 961 |
|
| 962 |
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ |
| 963 |
|
| 964 |
#include <d2d1_3helper.h> |
| 965 |
#endif /* _D2D1_3_H_ */ |