| 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_SVG_ |
| 8 |
#define _D2D1_SVG_ |
| 9 |
|
| 10 |
#ifndef _D2D1_2_H_ |
| 11 |
#include <d2d1_2.h> |
| 12 |
#endif |
| 13 |
|
| 14 |
#include <winapifamily.h> |
| 15 |
|
| 16 |
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) |
| 17 |
|
| 18 |
typedef interface ID2D1SvgDocument ID2D1SvgDocument; |
| 19 |
typedef interface ID2D1SvgElement ID2D1SvgElement; |
| 20 |
|
| 21 |
typedef enum D2D1_SVG_PAINT_TYPE { |
| 22 |
D2D1_SVG_PAINT_TYPE_NONE = 0, |
| 23 |
D2D1_SVG_PAINT_TYPE_COLOR = 1, |
| 24 |
D2D1_SVG_PAINT_TYPE_CURRENT_COLOR = 2, |
| 25 |
D2D1_SVG_PAINT_TYPE_URI = 3, |
| 26 |
D2D1_SVG_PAINT_TYPE_URI_NONE = 4, |
| 27 |
D2D1_SVG_PAINT_TYPE_URI_COLOR = 5, |
| 28 |
D2D1_SVG_PAINT_TYPE_URI_CURRENT_COLOR = 6, |
| 29 |
D2D1_SVG_PAINT_TYPE_FORCE_DWORD = 0xffffffff |
| 30 |
} D2D1_SVG_PAINT_TYPE; |
| 31 |
|
| 32 |
typedef enum D2D1_SVG_LENGTH_UNITS { |
| 33 |
D2D1_SVG_LENGTH_UNITS_NUMBER = 0, |
| 34 |
D2D1_SVG_LENGTH_UNITS_PERCENTAGE = 1, |
| 35 |
D2D1_SVG_LENGTH_UNITS_FORCE_DWORD = 0xffffffff |
| 36 |
} D2D1_SVG_LENGTH_UNITS; |
| 37 |
|
| 38 |
typedef enum D2D1_SVG_DISPLAY { |
| 39 |
D2D1_SVG_DISPLAY_INLINE = 0, |
| 40 |
D2D1_SVG_DISPLAY_NONE = 1, |
| 41 |
D2D1_SVG_DISPLAY_FORCE_DWORD = 0xffffffff |
| 42 |
} D2D1_SVG_DISPLAY; |
| 43 |
|
| 44 |
typedef enum D2D1_SVG_VISIBILITY { |
| 45 |
D2D1_SVG_VISIBILITY_VISIBLE = 0, |
| 46 |
D2D1_SVG_VISIBILITY_HIDDEN = 1, |
| 47 |
D2D1_SVG_VISIBILITY_FORCE_DWORD = 0xffffffff |
| 48 |
} D2D1_SVG_VISIBILITY; |
| 49 |
|
| 50 |
typedef enum D2D1_SVG_OVERFLOW { |
| 51 |
D2D1_SVG_OVERFLOW_VISIBLE = 0, |
| 52 |
D2D1_SVG_OVERFLOW_HIDDEN = 1, |
| 53 |
D2D1_SVG_OVERFLOW_FORCE_DWORD = 0xffffffff |
| 54 |
} D2D1_SVG_OVERFLOW; |
| 55 |
|
| 56 |
typedef enum D2D1_SVG_LINE_CAP { |
| 57 |
D2D1_SVG_LINE_CAP_BUTT = D2D1_CAP_STYLE_FLAT, |
| 58 |
D2D1_SVG_LINE_CAP_SQUARE = D2D1_CAP_STYLE_SQUARE, |
| 59 |
D2D1_SVG_LINE_CAP_ROUND = D2D1_CAP_STYLE_ROUND, |
| 60 |
D2D1_SVG_LINE_CAP_FORCE_DWORD = 0xffffffff |
| 61 |
} D2D1_SVG_LINE_CAP; |
| 62 |
|
| 63 |
typedef enum D2D1_SVG_LINE_JOIN { |
| 64 |
D2D1_SVG_LINE_JOIN_BEVEL = D2D1_LINE_JOIN_BEVEL, |
| 65 |
D2D1_SVG_LINE_JOIN_MITER = D2D1_LINE_JOIN_MITER_OR_BEVEL, |
| 66 |
D2D1_SVG_LINE_JOIN_ROUND = D2D1_LINE_JOIN_ROUND, |
| 67 |
D2D1_SVG_LINE_JOIN_FORCE_DWORD = 0xffffffff |
| 68 |
} D2D1_SVG_LINE_JOIN; |
| 69 |
|
| 70 |
typedef enum D2D1_SVG_ASPECT_ALIGN { |
| 71 |
D2D1_SVG_ASPECT_ALIGN_NONE = 0, |
| 72 |
D2D1_SVG_ASPECT_ALIGN_X_MIN_Y_MIN = 1, |
| 73 |
D2D1_SVG_ASPECT_ALIGN_X_MID_Y_MIN = 2, |
| 74 |
D2D1_SVG_ASPECT_ALIGN_X_MAX_Y_MIN = 3, |
| 75 |
D2D1_SVG_ASPECT_ALIGN_X_MIN_Y_MID = 4, |
| 76 |
D2D1_SVG_ASPECT_ALIGN_X_MID_Y_MID = 5, |
| 77 |
D2D1_SVG_ASPECT_ALIGN_X_MAX_Y_MID = 6, |
| 78 |
D2D1_SVG_ASPECT_ALIGN_X_MIN_Y_MAX = 7, |
| 79 |
D2D1_SVG_ASPECT_ALIGN_X_MID_Y_MAX = 8, |
| 80 |
D2D1_SVG_ASPECT_ALIGN_X_MAX_Y_MAX = 9, |
| 81 |
D2D1_SVG_ASPECT_ALIGN_FORCE_DWORD = 0xffffffff |
| 82 |
} D2D1_SVG_ASPECT_ALIGN; |
| 83 |
|
| 84 |
typedef enum D2D1_SVG_ASPECT_SCALING { |
| 85 |
D2D1_SVG_ASPECT_SCALING_MEET = 0, |
| 86 |
D2D1_SVG_ASPECT_SCALING_SLICE = 1, |
| 87 |
D2D1_SVG_ASPECT_SCALING_FORCE_DWORD = 0xffffffff |
| 88 |
} D2D1_SVG_ASPECT_SCALING; |
| 89 |
|
| 90 |
typedef enum D2D1_SVG_PATH_COMMAND { |
| 91 |
D2D1_SVG_PATH_COMMAND_CLOSE_PATH = 0, |
| 92 |
D2D1_SVG_PATH_COMMAND_MOVE_ABSOLUTE = 1, |
| 93 |
D2D1_SVG_PATH_COMMAND_MOVE_RELATIVE = 2, |
| 94 |
D2D1_SVG_PATH_COMMAND_LINE_ABSOLUTE = 3, |
| 95 |
D2D1_SVG_PATH_COMMAND_LINE_RELATIVE = 4, |
| 96 |
D2D1_SVG_PATH_COMMAND_CUBIC_ABSOLUTE = 5, |
| 97 |
D2D1_SVG_PATH_COMMAND_CUBIC_RELATIVE = 6, |
| 98 |
D2D1_SVG_PATH_COMMAND_QUADRADIC_ABSOLUTE = 7, |
| 99 |
D2D1_SVG_PATH_COMMAND_QUADRADIC_RELATIVE = 8, |
| 100 |
D2D1_SVG_PATH_COMMAND_ARC_ABSOLUTE = 9, |
| 101 |
D2D1_SVG_PATH_COMMAND_ARC_RELATIVE = 10, |
| 102 |
D2D1_SVG_PATH_COMMAND_HORIZONTAL_ABSOLUTE = 11, |
| 103 |
D2D1_SVG_PATH_COMMAND_HORIZONTAL_RELATIVE = 12, |
| 104 |
D2D1_SVG_PATH_COMMAND_VERTICAL_ABSOLUTE = 13, |
| 105 |
D2D1_SVG_PATH_COMMAND_VERTICAL_RELATIVE = 14, |
| 106 |
D2D1_SVG_PATH_COMMAND_CUBIC_SMOOTH_ABSOLUTE = 15, |
| 107 |
D2D1_SVG_PATH_COMMAND_CUBIC_SMOOTH_RELATIVE = 16, |
| 108 |
D2D1_SVG_PATH_COMMAND_QUADRADIC_SMOOTH_ABSOLUTE = 17, |
| 109 |
D2D1_SVG_PATH_COMMAND_QUADRADIC_SMOOTH_RELATIVE = 18, |
| 110 |
D2D1_SVG_PATH_COMMAND_FORCE_DWORD = 0xffffffff |
| 111 |
} D2D1_SVG_PATH_COMMAND; |
| 112 |
|
| 113 |
typedef enum D2D1_SVG_UNIT_TYPE { |
| 114 |
D2D1_SVG_UNIT_TYPE_USER_SPACE_ON_USE = 0, |
| 115 |
D2D1_SVG_UNIT_TYPE_OBJECT_BOUNDING_BOX = 1, |
| 116 |
D2D1_SVG_UNIT_TYPE_FORCE_DWORD = 0xffffffff |
| 117 |
} D2D1_SVG_UNIT_TYPE; |
| 118 |
|
| 119 |
typedef enum D2D1_SVG_ATTRIBUTE_STRING_TYPE { |
| 120 |
D2D1_SVG_ATTRIBUTE_STRING_TYPE_SVG = 0, |
| 121 |
D2D1_SVG_ATTRIBUTE_STRING_TYPE_ID = 1, |
| 122 |
D2D1_SVG_ATTRIBUTE_STRING_TYPE_FORCE_DWORD = 0xffffffff |
| 123 |
} D2D1_SVG_ATTRIBUTE_STRING_TYPE; |
| 124 |
|
| 125 |
typedef enum D2D1_SVG_ATTRIBUTE_POD_TYPE { |
| 126 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_FLOAT = 0, |
| 127 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_COLOR = 1, |
| 128 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_FILL_MODE = 2, |
| 129 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_DISPLAY = 3, |
| 130 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_OVERFLOW = 4, |
| 131 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_CAP = 5, |
| 132 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_JOIN = 6, |
| 133 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_VISIBILITY = 7, |
| 134 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_MATRIX = 8, |
| 135 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_UNIT_TYPE = 9, |
| 136 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_EXTEND_MODE = 10, |
| 137 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_PRESERVE_ASPECT_RATIO = 11, |
| 138 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_VIEWBOX = 12, |
| 139 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_LENGTH = 13, |
| 140 |
D2D1_SVG_ATTRIBUTE_POD_TYPE_FORCE_DWORD = 0xffffffff |
| 141 |
} D2D1_SVG_ATTRIBUTE_POD_TYPE; |
| 142 |
|
| 143 |
typedef struct D2D1_SVG_LENGTH { |
| 144 |
FLOAT value; |
| 145 |
D2D1_SVG_LENGTH_UNITS units; |
| 146 |
} D2D1_SVG_LENGTH; |
| 147 |
|
| 148 |
typedef struct D2D1_SVG_PRESERVE_ASPECT_RATIO { |
| 149 |
WINBOOL defer; |
| 150 |
D2D1_SVG_ASPECT_ALIGN align; |
| 151 |
D2D1_SVG_ASPECT_SCALING meetOrSlice; |
| 152 |
} D2D1_SVG_PRESERVE_ASPECT_RATIO; |
| 153 |
|
| 154 |
typedef struct D2D1_SVG_VIEWBOX { |
| 155 |
FLOAT x; |
| 156 |
FLOAT y; |
| 157 |
FLOAT width; |
| 158 |
FLOAT height; |
| 159 |
} D2D1_SVG_VIEWBOX; |
| 160 |
|
| 161 |
#if NTDDI_VERSION >= NTDDI_WIN10_RS2 |
| 162 |
|
| 163 |
#ifndef D2D_USE_C_DEFINITIONS |
| 164 |
interface ID2D1SvgAttribute : public ID2D1Resource |
| 165 |
{ |
| 166 |
STDMETHOD_(void, GetElement)(ID2D1SvgElement **element) PURE; |
| 167 |
STDMETHOD(Clone)(ID2D1SvgAttribute **attribute) PURE; |
| 168 |
}; |
| 169 |
#else |
| 170 |
typedef interface ID2D1SvgAttribute ID2D1SvgAttribute; |
| 171 |
/* FIXME: Add full C declaration */ |
| 172 |
#endif |
| 173 |
|
| 174 |
DEFINE_GUID(IID_ID2D1SvgAttribute, 0xc9cdb0dd, 0xf8c9, 0x4e70, 0xb7, 0xc2, 0x30, 0x1c, 0x80, 0x29, 0x2c, 0x5e); |
| 175 |
__CRT_UUID_DECL(ID2D1SvgAttribute, 0xc9cdb0dd, 0xf8c9, 0x4e70, 0xb7, 0xc2, 0x30, 0x1c, 0x80, 0x29, 0x2c, 0x5e); |
| 176 |
|
| 177 |
#ifndef D2D_USE_C_DEFINITIONS |
| 178 |
interface ID2D1SvgPaint : public ID2D1SvgAttribute |
| 179 |
{ |
| 180 |
STDMETHOD(SetPaintType)(D2D1_SVG_PAINT_TYPE paint_type) PURE; |
| 181 |
STDMETHOD_(D2D1_SVG_PAINT_TYPE, GetPaintType)() PURE; |
| 182 |
STDMETHOD(SetColor)(const D2D1_COLOR_F *color) PURE; |
| 183 |
STDMETHOD_(void, GetColor)(D2D1_COLOR_F *color) PURE; |
| 184 |
STDMETHOD(SetId)(PCWSTR id) PURE; |
| 185 |
STDMETHOD(GetId)(PWSTR id, UINT32 id_count) PURE; |
| 186 |
STDMETHOD_(UINT32, GetIdLength)() PURE; |
| 187 |
|
| 188 |
COM_DECLSPEC_NOTHROW HRESULT SetColor(const D2D1_COLOR_F &color) { |
| 189 |
return SetColor(&color); |
| 190 |
} |
| 191 |
}; |
| 192 |
#else |
| 193 |
typedef interface ID2D1SvgPaint ID2D1SvgPaint; |
| 194 |
/* FIXME: Add full C declaration */ |
| 195 |
#endif |
| 196 |
|
| 197 |
DEFINE_GUID(IID_ID2D1SvgPaint, 0xd59bab0a, 0x68a2, 0x455b, 0xa5, 0xdc, 0x9e, 0xb2, 0x85, 0x4e, 0x24, 0x90); |
| 198 |
__CRT_UUID_DECL(ID2D1SvgPaint, 0xd59bab0a, 0x68a2, 0x455b, 0xa5, 0xdc, 0x9e, 0xb2, 0x85, 0x4e, 0x24, 0x90); |
| 199 |
|
| 200 |
#ifndef D2D_USE_C_DEFINITIONS |
| 201 |
interface ID2D1SvgStrokeDashArray : public ID2D1SvgAttribute |
| 202 |
{ |
| 203 |
STDMETHOD(RemoveDashesAtEnd)(UINT32 dashes_count) PURE; |
| 204 |
STDMETHOD(UpdateDashes)(const FLOAT *dashes, UINT32 dashes_count, UINT32 start_index = 0) PURE; |
| 205 |
STDMETHOD(UpdateDashes)(const D2D1_SVG_LENGTH *dashes, UINT32 dashes_count, UINT32 start_index = 0) PURE; |
| 206 |
STDMETHOD(GetDashes)(FLOAT *dashes, UINT32 dashes_count, UINT32 start_index = 0) PURE; |
| 207 |
STDMETHOD(GetDashes)(D2D1_SVG_LENGTH *dashes, UINT32 dashes_count, UINT32 start_index = 0) PURE; |
| 208 |
STDMETHOD_(UINT32, GetDashesCount)() PURE; |
| 209 |
}; |
| 210 |
#else |
| 211 |
typedef interface ID2D1SvgStrokeDashArray ID2D1SvgStrokeDashArray; |
| 212 |
/* FIXME: Add full C declaration */ |
| 213 |
#endif |
| 214 |
|
| 215 |
DEFINE_GUID(IID_ID2D1SvgStrokeDashArray, 0xf1c0ca52, 0x92a3, 0x4f00, 0xb4, 0xce, 0xf3, 0x56, 0x91, 0xef, 0xd9, 0xd9); |
| 216 |
__CRT_UUID_DECL(ID2D1SvgStrokeDashArray, 0xf1c0ca52, 0x92a3, 0x4f00, 0xb4, 0xce, 0xf3, 0x56, 0x91, 0xef, 0xd9, 0xd9); |
| 217 |
|
| 218 |
#ifndef D2D_USE_C_DEFINITIONS |
| 219 |
interface ID2D1SvgPointCollection : public ID2D1SvgAttribute |
| 220 |
{ |
| 221 |
STDMETHOD(RemovePointsAtEnd)(UINT32 points_count) PURE; |
| 222 |
STDMETHOD(UpdatePoints)(const D2D1_POINT_2F *points, UINT32 points_count, UINT32 start_index = 0) PURE; |
| 223 |
STDMETHOD(GetPoints)(D2D1_POINT_2F *points, UINT32 points_count, UINT32 start_index = 0) PURE; |
| 224 |
STDMETHOD_(UINT32, GetPointsCount)() PURE; |
| 225 |
}; |
| 226 |
#else |
| 227 |
typedef interface ID2D1SvgPointCollection ID2D1SvgPointCollection; |
| 228 |
/* FIXME: Add full C declaration */ |
| 229 |
#endif |
| 230 |
|
| 231 |
DEFINE_GUID(IID_ID2D1SvgPointCollection, 0x9dbe4c0d, 0x3572, 0x4dd9, 0x98, 0x25, 0x55, 0x30, 0x81, 0x3b, 0xb7, 0x12); |
| 232 |
__CRT_UUID_DECL(ID2D1SvgPointCollection, 0x9dbe4c0d, 0x3572, 0x4dd9, 0x98, 0x25, 0x55, 0x30, 0x81, 0x3b, 0xb7, 0x12); |
| 233 |
|
| 234 |
#ifndef D2D_USE_C_DEFINITIONS |
| 235 |
interface ID2D1SvgPathData : public ID2D1SvgAttribute |
| 236 |
{ |
| 237 |
STDMETHOD(RemoveSegmentDataAtEnd)(UINT32 data_count) PURE; |
| 238 |
STDMETHOD(UpdateSegmentData)(const FLOAT *data, UINT32 data_count, UINT32 start_index = 0) PURE; |
| 239 |
STDMETHOD(GetSegmentData)(FLOAT *data, UINT32 data_count, UINT32 start_index = 0) PURE; |
| 240 |
STDMETHOD_(UINT32, GetSegmentDataCount)() PURE; |
| 241 |
STDMETHOD(RemoveCommandsAtEnd)(UINT32 commands_count) PURE; |
| 242 |
STDMETHOD(UpdateCommands)(const D2D1_SVG_PATH_COMMAND *commands, UINT32 commands_count, UINT32 start_index = 0) PURE; |
| 243 |
STDMETHOD(GetCommands)(D2D1_SVG_PATH_COMMAND *commands, UINT32 commands_count, UINT32 start_index = 0) PURE; |
| 244 |
STDMETHOD_(UINT32, GetCommandsCount)() PURE; |
| 245 |
STDMETHOD(CreatePathGeometry)(D2D1_FILL_MODE fill_mode, ID2D1PathGeometry1 **path_geometry) PURE; |
| 246 |
}; |
| 247 |
#else |
| 248 |
typedef interface ID2D1SvgPathData ID2D1SvgPathData; |
| 249 |
/* FIXME: Add full C declaration */ |
| 250 |
#endif |
| 251 |
|
| 252 |
DEFINE_GUID(IID_ID2D1SvgPathData, 0xc095e4f4, 0xbb98, 0x43d6, 0x97, 0x45, 0x4d, 0x1b, 0x84, 0xec, 0x98, 0x88); |
| 253 |
__CRT_UUID_DECL(ID2D1SvgPathData, 0xc095e4f4, 0xbb98, 0x43d6, 0x97, 0x45, 0x4d, 0x1b, 0x84, 0xec, 0x98, 0x88); |
| 254 |
|
| 255 |
#ifndef D2D_USE_C_DEFINITIONS |
| 256 |
interface ID2D1SvgElement : public ID2D1Resource |
| 257 |
{ |
| 258 |
STDMETHOD_(void, GetDocument)(ID2D1SvgDocument **document) PURE; |
| 259 |
STDMETHOD(GetTagName)(PWSTR name, UINT32 name_count) PURE; |
| 260 |
STDMETHOD_(UINT32, GetTagNameLength)() PURE; |
| 261 |
STDMETHOD_(WINBOOL, IsTextContent)() PURE; |
| 262 |
STDMETHOD_(void, GetParent)(ID2D1SvgElement **parent) PURE; |
| 263 |
STDMETHOD_(WINBOOL, HasChildren)() PURE; |
| 264 |
STDMETHOD_(void, GetFirstChild)(ID2D1SvgElement **child) PURE; |
| 265 |
STDMETHOD_(void, GetLastChild)(ID2D1SvgElement **child) PURE; |
| 266 |
STDMETHOD(GetPreviousChild)(ID2D1SvgElement *reference_child, ID2D1SvgElement **previous_child) PURE; |
| 267 |
STDMETHOD(GetNextChild)(ID2D1SvgElement *reference_child, ID2D1SvgElement **next_child) PURE; |
| 268 |
STDMETHOD(InsertChildBefore)(ID2D1SvgElement *new_child, ID2D1SvgElement *reference_child = NULL) PURE; |
| 269 |
STDMETHOD(AppendChild)(ID2D1SvgElement *new_child) PURE; |
| 270 |
STDMETHOD(ReplaceChild)(ID2D1SvgElement *new_child, ID2D1SvgElement *old_child) PURE; |
| 271 |
STDMETHOD(RemoveChild)(ID2D1SvgElement *old_child) PURE; |
| 272 |
STDMETHOD(CreateChild)(PCWSTR tag_name, ID2D1SvgElement **new_child) PURE; |
| 273 |
STDMETHOD_(WINBOOL, IsAttributeSpecified)(PCWSTR name, WINBOOL *inherited = NULL) PURE; |
| 274 |
STDMETHOD_(UINT32, GetSpecifiedAttributeCount)() PURE; |
| 275 |
STDMETHOD(GetSpecifiedAttributeName)(UINT32 index, PWSTR name, UINT32 name_count, WINBOOL *inherited = NULL) PURE; |
| 276 |
STDMETHOD(GetSpecifiedAttributeNameLength)(UINT32 index, UINT32 *name_length, WINBOOL *inherited = NULL) PURE; |
| 277 |
STDMETHOD(RemoveAttribute)(PCWSTR name) PURE; |
| 278 |
STDMETHOD(SetTextValue)(const WCHAR *name, UINT32 name_count) PURE; |
| 279 |
STDMETHOD(GetTextValue)(PWSTR name, UINT32 name_count) PURE; |
| 280 |
STDMETHOD_(UINT32, GetTextValueLength)() PURE; |
| 281 |
STDMETHOD(SetAttributeValue)(PCWSTR name, D2D1_SVG_ATTRIBUTE_STRING_TYPE type, PCWSTR value) PURE; |
| 282 |
STDMETHOD(GetAttributeValue)(PCWSTR name, D2D1_SVG_ATTRIBUTE_STRING_TYPE type, PWSTR value, UINT32 value_count) PURE; |
| 283 |
STDMETHOD(GetAttributeValueLength)(PCWSTR name, D2D1_SVG_ATTRIBUTE_STRING_TYPE type, UINT32 *value_length) PURE; |
| 284 |
STDMETHOD(SetAttributeValue)(PCWSTR name, D2D1_SVG_ATTRIBUTE_POD_TYPE type, const void *value, UINT32 value_size_in_bytes) PURE; |
| 285 |
STDMETHOD(GetAttributeValue)(PCWSTR name, D2D1_SVG_ATTRIBUTE_POD_TYPE type, void *value, UINT32 value_size_in_bytes) PURE; |
| 286 |
STDMETHOD(SetAttributeValue)(PCWSTR name, ID2D1SvgAttribute *value) PURE; |
| 287 |
STDMETHOD(GetAttributeValue)(PCWSTR name, REFIID riid, void **value) PURE; |
| 288 |
|
| 289 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, FLOAT value) { |
| 290 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_FLOAT, &value, sizeof(value)); |
| 291 |
} |
| 292 |
|
| 293 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, FLOAT *value) { |
| 294 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_FLOAT, value, sizeof(*value)); |
| 295 |
} |
| 296 |
|
| 297 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, const D2D1_COLOR_F &value) { |
| 298 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_COLOR, &value, sizeof(value)); |
| 299 |
} |
| 300 |
|
| 301 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, D2D1_COLOR_F *value) { |
| 302 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_COLOR, value, sizeof(*value)); |
| 303 |
} |
| 304 |
|
| 305 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, D2D1_FILL_MODE value) { |
| 306 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_FILL_MODE, &value, sizeof(value)); |
| 307 |
} |
| 308 |
|
| 309 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, D2D1_FILL_MODE *value) { |
| 310 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_FILL_MODE, value, sizeof(*value)); |
| 311 |
} |
| 312 |
|
| 313 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, D2D1_SVG_DISPLAY value) { |
| 314 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_DISPLAY, &value, sizeof(value)); |
| 315 |
} |
| 316 |
|
| 317 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, D2D1_SVG_DISPLAY *value) { |
| 318 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_DISPLAY, value, sizeof(*value)); |
| 319 |
} |
| 320 |
|
| 321 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, D2D1_SVG_OVERFLOW value) { |
| 322 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_OVERFLOW, &value, sizeof(value)); |
| 323 |
} |
| 324 |
|
| 325 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, D2D1_SVG_OVERFLOW *value) { |
| 326 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_OVERFLOW, value, sizeof(*value)); |
| 327 |
} |
| 328 |
|
| 329 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, D2D1_SVG_LINE_JOIN value) { |
| 330 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_JOIN, &value, sizeof(value)); |
| 331 |
} |
| 332 |
|
| 333 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, D2D1_SVG_LINE_JOIN *value) { |
| 334 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_JOIN, value, sizeof(*value)); |
| 335 |
} |
| 336 |
|
| 337 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, D2D1_SVG_LINE_CAP value) { |
| 338 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_CAP, &value, sizeof(value)); |
| 339 |
} |
| 340 |
|
| 341 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, D2D1_SVG_LINE_CAP *value) { |
| 342 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LINE_CAP, value, sizeof(*value)); |
| 343 |
} |
| 344 |
|
| 345 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, D2D1_SVG_VISIBILITY value) { |
| 346 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_VISIBILITY, &value, sizeof(value)); |
| 347 |
} |
| 348 |
|
| 349 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, D2D1_SVG_VISIBILITY *value) { |
| 350 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_VISIBILITY, value, sizeof(*value)); |
| 351 |
} |
| 352 |
|
| 353 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, const D2D1_MATRIX_3X2_F &value) { |
| 354 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_MATRIX, &value, sizeof(value)); |
| 355 |
} |
| 356 |
|
| 357 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, D2D1_MATRIX_3X2_F *value) { |
| 358 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_MATRIX, value, sizeof(*value)); |
| 359 |
} |
| 360 |
|
| 361 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, D2D1_SVG_UNIT_TYPE value) { |
| 362 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_UNIT_TYPE, &value, sizeof(value)); |
| 363 |
} |
| 364 |
|
| 365 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, D2D1_SVG_UNIT_TYPE *value) { |
| 366 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_UNIT_TYPE, value, sizeof(*value)); |
| 367 |
} |
| 368 |
|
| 369 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, D2D1_EXTEND_MODE value) { |
| 370 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_EXTEND_MODE, &value, sizeof(value)); |
| 371 |
} |
| 372 |
|
| 373 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, D2D1_EXTEND_MODE *value) { |
| 374 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_EXTEND_MODE, value, sizeof(*value)); |
| 375 |
} |
| 376 |
|
| 377 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, const D2D1_SVG_PRESERVE_ASPECT_RATIO &value) { |
| 378 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_PRESERVE_ASPECT_RATIO, &value, sizeof(value)); |
| 379 |
} |
| 380 |
|
| 381 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, D2D1_SVG_PRESERVE_ASPECT_RATIO *value) { |
| 382 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_PRESERVE_ASPECT_RATIO, value, sizeof(*value)); |
| 383 |
} |
| 384 |
|
| 385 |
COM_DECLSPEC_NOTHROW HRESULT SetAttributeValue(PCWSTR name, const D2D1_SVG_LENGTH &value) { |
| 386 |
return SetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LENGTH, &value, sizeof(value)); |
| 387 |
} |
| 388 |
|
| 389 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, D2D1_SVG_LENGTH *value) { |
| 390 |
return GetAttributeValue(name, D2D1_SVG_ATTRIBUTE_POD_TYPE_LENGTH, value, sizeof(*value)); |
| 391 |
} |
| 392 |
|
| 393 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, ID2D1SvgAttribute **value) { |
| 394 |
return GetAttributeValue(name, IID_ID2D1SvgAttribute, reinterpret_cast<void **>(value)); |
| 395 |
} |
| 396 |
|
| 397 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, ID2D1SvgPaint **value) { |
| 398 |
return GetAttributeValue(name, IID_ID2D1SvgPaint, reinterpret_cast<void **>(value)); |
| 399 |
} |
| 400 |
|
| 401 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, ID2D1SvgStrokeDashArray **value) { |
| 402 |
return GetAttributeValue(name, IID_ID2D1SvgStrokeDashArray, reinterpret_cast<void **>(value)); |
| 403 |
} |
| 404 |
|
| 405 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, ID2D1SvgPointCollection **value) { |
| 406 |
return GetAttributeValue(name, IID_ID2D1SvgPointCollection, reinterpret_cast<void **>(value)); |
| 407 |
} |
| 408 |
|
| 409 |
COM_DECLSPEC_NOTHROW HRESULT GetAttributeValue(PCWSTR name, ID2D1SvgPathData **value) { |
| 410 |
return GetAttributeValue(name, IID_ID2D1SvgPathData, reinterpret_cast<void **>(value)); |
| 411 |
} |
| 412 |
}; |
| 413 |
#else |
| 414 |
typedef interface ID2D1SvgElement ID2D1SvgElement; |
| 415 |
/* FIXME: Add full C declaration */ |
| 416 |
#endif |
| 417 |
|
| 418 |
DEFINE_GUID(IID_ID2D1SvgElement, 0xac7b67a6, 0x183e, 0x49c1, 0xa8, 0x23, 0x0e, 0xbe, 0x40, 0xb0, 0xdb, 0x29); |
| 419 |
__CRT_UUID_DECL(ID2D1SvgElement, 0xac7b67a6, 0x183e, 0x49c1, 0xa8, 0x23, 0x0e, 0xbe, 0x40, 0xb0, 0xdb, 0x29); |
| 420 |
|
| 421 |
#ifndef D2D_USE_C_DEFINITIONS |
| 422 |
interface ID2D1SvgDocument : public ID2D1Resource |
| 423 |
{ |
| 424 |
STDMETHOD(SetViewportSize)(D2D1_SIZE_F viewport_size) PURE; |
| 425 |
#ifndef WIDL_EXPLICIT_AGGREGATE_RETURNS |
| 426 |
STDMETHOD_(D2D1_SIZE_F, GetViewportSize)() const PURE; |
| 427 |
#else |
| 428 |
virtual D2D1_SIZE_F* STDMETHODCALLTYPE GetViewportSize(D2D1_SIZE_F*) const = 0; |
| 429 |
D2D1_SIZE_F STDMETHODCALLTYPE GetViewportSize() const { |
| 430 |
D2D1_SIZE_F __ret; |
| 431 |
GetViewportSize(&__ret); |
| 432 |
return __ret; |
| 433 |
} |
| 434 |
#endif |
| 435 |
STDMETHOD(SetRoot)(ID2D1SvgElement *root) PURE; |
| 436 |
STDMETHOD_(void, GetRoot)(ID2D1SvgElement **root) PURE; |
| 437 |
STDMETHOD(FindElementById)(PCWSTR id, ID2D1SvgElement **svg_element) PURE; |
| 438 |
STDMETHOD(Serialize)(IStream *output_xml_stream, ID2D1SvgElement *subtree = NULL) PURE; |
| 439 |
STDMETHOD(Deserialize)(IStream *input_xml_stream, ID2D1SvgElement **subtree) PURE; |
| 440 |
STDMETHOD(CreatePaint)(D2D1_SVG_PAINT_TYPE paint_type, const D2D1_COLOR_F *color, PCWSTR id, ID2D1SvgPaint **paint) PURE; |
| 441 |
STDMETHOD(CreateStrokeDashArray)(const D2D1_SVG_LENGTH *dashes, UINT32 dashes_count, ID2D1SvgStrokeDashArray **stroke_dash_array) PURE; |
| 442 |
STDMETHOD(CreatePointCollection)(const D2D1_POINT_2F *points, UINT32 points_count, ID2D1SvgPointCollection **point_collection) PURE; |
| 443 |
STDMETHOD(CreatePathData)(const FLOAT *segment_data, UINT32 segment_data_count, const D2D1_SVG_PATH_COMMAND *commands, UINT32 commands_count, ID2D1SvgPathData **path_data) PURE; |
| 444 |
|
| 445 |
COM_DECLSPEC_NOTHROW HRESULT CreatePaint(D2D1_SVG_PAINT_TYPE paint_type, const D2D1_COLOR_F &color, PCWSTR id, ID2D1SvgPaint **paint) { |
| 446 |
return CreatePaint(paint_type, &color, id, paint); |
| 447 |
} |
| 448 |
}; |
| 449 |
#else |
| 450 |
typedef interface ID2D1SvgDocument ID2D1SvgDocument; |
| 451 |
/* FIXME: Add full C declaration */ |
| 452 |
#endif |
| 453 |
|
| 454 |
DEFINE_GUID(IID_ID2D1SvgDocument, 0x86b88e4d, 0xafa4, 0x4d7b, 0x88, 0xe4, 0x68, 0xa5, 0x1c, 0x4a, 0x0a, 0xec); |
| 455 |
__CRT_UUID_DECL(ID2D1SvgDocument, 0x86b88e4d, 0xafa4, 0x4d7b, 0x88, 0xe4, 0x68, 0xa5, 0x1c, 0x4a, 0x0a, 0xec); |
| 456 |
|
| 457 |
#endif /* NTDDI_VERSION >= NTDDI_WIN10_RS2 */ |
| 458 |
|
| 459 |
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ |
| 460 |
|
| 461 |
#endif /* _D2D1_SVG_ */ |