/usr/share/mingw-w64/include/d2d1_1.h is in mingw-w64-common 3.2.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 | /**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifndef _D2D1_1_H_
#define _D2D1_1_H_
#include <d2d1.h>
#include <d2d1effects.h>
#include <dxgi.h>
#include <winapifamily.h>
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
typedef interface ID2D1ColorContext ID2D1ColorContext;
typedef interface IWICColorContext IWICColorContext;
typedef interface IWICImagingFactory IWICImagingFactory;
typedef interface IPrintDocumentPackageTarget IPrintDocumentPackageTarget;
typedef interface IDWriteFactory IDWriteFactory;
typedef struct D2D1_PROPERTY_BINDING D2D1_PROPERTY_BINDING;
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1Device;
interface ID2D1Effect;
#else
typedef interface ID2D1Device ID2D1Device;
typedef interface ID2D1Effect ID2D1Effect;
#endif
typedef struct DWRITE_GLYPH_RUN_DESCRIPTION DWRITE_GLYPH_RUN_DESCRIPTION;
typedef HRESULT (CALLBACK *PD2D1_EFFECT_FACTORY)(IUnknown**);
typedef D2D_RECT_L D2D1_RECT_L;
typedef D2D_POINT_2L D2D1_POINT_2L;
typedef enum D2D1_PROPERTY_TYPE {
D2D1_PROPERTY_TYPE_UNKNOWN = 0,
D2D1_PROPERTY_TYPE_STRING = 1,
D2D1_PROPERTY_TYPE_BOOL = 2,
D2D1_PROPERTY_TYPE_UINT32 = 3,
D2D1_PROPERTY_TYPE_INT32 = 4,
D2D1_PROPERTY_TYPE_FLOAT = 5,
D2D1_PROPERTY_TYPE_VECTOR2 = 6,
D2D1_PROPERTY_TYPE_VECTOR3 = 7,
D2D1_PROPERTY_TYPE_VECTOR4 = 8,
D2D1_PROPERTY_TYPE_BLOB = 9,
D2D1_PROPERTY_TYPE_IUNKNOWN = 10,
D2D1_PROPERTY_TYPE_ENUM = 11,
D2D1_PROPERTY_TYPE_ARRAY = 12,
D2D1_PROPERTY_TYPE_CLSID = 13,
D2D1_PROPERTY_TYPE_MATRIX_3X2 = 14,
D2D1_PROPERTY_TYPE_MATRIX_4X3 = 15,
D2D1_PROPERTY_TYPE_MATRIX_4X4 = 16,
D2D1_PROPERTY_TYPE_MATRIX_5X4 = 17,
D2D1_PROPERTY_TYPE_COLOR_CONTEXT = 18,
D2D1_PROPERTY_TYPE_FORCE_DWORD = 0xffffffff
} D2D1_PROPERTY_TYPE;
typedef enum D2D1_CHANNEL_DEPTH {
D2D1_CHANNEL_DEPTH_DEFAULT = 0,
D2D1_CHANNEL_DEPTH_1 = 1,
D2D1_CHANNEL_DEPTH_4 = 4,
D2D1_CHANNEL_DEPTH_FORCE_DWORD = 0xffffffff
} D2D1_CHANNEL_DEPTH;
typedef enum D2D1_BUFFER_PRECISION {
D2D1_BUFFER_PRECISION_UNKNOWN = 0,
D2D1_BUFFER_PRECISION_8BPC_UNORM = 1,
D2D1_BUFFER_PRECISION_8BPC_UNORM_SRGB = 2,
D2D1_BUFFER_PRECISION_16BPC_UNORM = 3,
D2D1_BUFFER_PRECISION_16BPC_FLOAT = 4,
D2D1_BUFFER_PRECISION_32BPC_FLOAT = 5,
D2D1_BUFFER_PRECISION_FORCE_DWORD = 0xffffffff
} D2D1_BUFFER_PRECISION;
typedef enum D2D1_COLOR_SPACE {
D2D1_COLOR_SPACE_CUSTOM = 0,
D2D1_COLOR_SPACE_SRGB = 1,
D2D1_COLOR_SPACE_SCRGB = 2,
D2D1_COLOR_SPACE_FORCE_DWORD = 0xffffffff
} D2D1_COLOR_SPACE;
typedef enum D2D1_DEVICE_CONTEXT_OPTIONS {
D2D1_DEVICE_CONTEXT_OPTIONS_NONE = 0,
D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS = 1,
D2D1_DEVICE_CONTEXT_OPTIONS_FORCE_DWORD = 0xffffffff
} D2D1_DEVICE_CONTEXT_OPTIONS;
DEFINE_ENUM_FLAG_OPERATORS(D2D1_DEVICE_CONTEXT_OPTIONS);
typedef enum D2D1_BITMAP_OPTIONS {
D2D1_BITMAP_OPTIONS_NONE = 0x00000000,
D2D1_BITMAP_OPTIONS_TARGET = 0x00000001,
D2D1_BITMAP_OPTIONS_CANNOT_DRAW = 0x00000002,
D2D1_BITMAP_OPTIONS_CPU_READ = 0x00000004,
D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE = 0x00000008,
D2D1_BITMAP_OPTIONS_FORCE_DWORD = 0xffffffff
} D2D1_BITMAP_OPTIONS;
DEFINE_ENUM_FLAG_OPERATORS(D2D1_BITMAP_OPTIONS);
typedef enum D2D1_MAP_OPTIONS {
D2D1_MAP_OPTIONS_NONE = 0,
D2D1_MAP_OPTIONS_READ = 1,
D2D1_MAP_OPTIONS_WRITE = 2,
D2D1_MAP_OPTIONS_DISCARD = 4,
D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff
} D2D1_MAP_OPTIONS;
DEFINE_ENUM_FLAG_OPERATORS(D2D1_MAP_OPTIONS);
typedef enum D2D1_COLOR_INTERPOLATION_MODE {
D2D1_COLOR_INTERPOLATION_MODE_STRAIGHT = 0,
D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED = 1,
D2D1_COLOR_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff
} D2D1_COLOR_INTERPOLATION_MODE;
typedef enum D2D1_INTERPOLATION_MODE {
D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR,
D2D1_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
D2D1_INTERPOLATION_MODE_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC,
D2D1_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR,
D2D1_INTERPOLATION_MODE_ANISOTROPIC = D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC,
D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC = D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC,
D2D1_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff
} D2D1_INTERPOLATION_MODE;
typedef enum D2D1_COMPOSITE_MODE {
D2D1_COMPOSITE_MODE_SOURCE_OVER = 0,
D2D1_COMPOSITE_MODE_DESTINATION_OVER = 1,
D2D1_COMPOSITE_MODE_SOURCE_IN = 2,
D2D1_COMPOSITE_MODE_DESTINATION_IN = 3,
D2D1_COMPOSITE_MODE_SOURCE_OUT = 4,
D2D1_COMPOSITE_MODE_DESTINATION_OUT = 5,
D2D1_COMPOSITE_MODE_SOURCE_ATOP = 6,
D2D1_COMPOSITE_MODE_DESTINATION_ATOP = 7,
D2D1_COMPOSITE_MODE_XOR = 8,
D2D1_COMPOSITE_MODE_PLUS = 9,
D2D1_COMPOSITE_MODE_SOURCE_COPY = 10,
D2D1_COMPOSITE_MODE_BOUNDED_SOURCE_COPY = 11,
D2D1_COMPOSITE_MODE_MASK_INVERT = 12,
D2D1_COMPOSITE_MODE_FORCE_DWORD = 0xffffffff
} D2D1_COMPOSITE_MODE;
typedef enum D2D1_PRIMITIVE_BLEND {
D2D1_PRIMITIVE_BLEND_SOURCE_OVER = 0,
D2D1_PRIMITIVE_BLEND_COPY = 1,
D2D1_PRIMITIVE_BLEND_FORCE_DWORD = 0xffffffff
} D2D1_PRIMITIVE_BLEND;
typedef enum D2D1_UNIT_MODE {
D2D1_UNIT_MODE_DIPS = 0,
D2D1_UNIT_MODE_PIXELS = 1,
D2D1_UNIT_MODE_FORCE_DWORD = 0xffffffff
} D2D1_UNIT_MODE;
typedef enum D2D1_LAYER_OPTIONS1 {
D2D1_LAYER_OPTIONS1_NONE = 0,
D2D1_LAYER_OPTIONS1_INITIALIZE_FROM_BACKGROUND = 1,
D2D1_LAYER_OPTIONS1_IGNORE_ALPHA = 2,
D2D1_LAYER_OPTIONS1_FORCE_DWORD = 0xffffffff
} D2D1_LAYER_OPTIONS1;
DEFINE_ENUM_FLAG_OPERATORS(D2D1_LAYER_OPTIONS1);
typedef enum D2D1_PRINT_FONT_SUBSET_MODE {
D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT = 0,
D2D1_PRINT_FONT_SUBSET_MODE_EACHPAGE = 1,
D2D1_PRINT_FONT_SUBSET_MODE_NONE = 2,
D2D1_PRINT_FONT_SUBSET_MODE_FORCE_DWORD = 0xffffffff
} D2D1_PRINT_FONT_SUBSET_MODE;
typedef enum D2D1_STROKE_TRANSFORM_TYPE {
D2D1_STROKE_TRANSFORM_TYPE_NORMAL = 0,
D2D1_STROKE_TRANSFORM_TYPE_FIXED = 1,
D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE = 2,
D2D1_STROKE_TRANSFORM_TYPE_FORCE_DWORD = 0xffffffff
} D2D1_STROKE_TRANSFORM_TYPE;
typedef struct D2D1_BITMAP_PROPERTIES1 {
D2D1_PIXEL_FORMAT pixelFormat;
FLOAT dpiX;
FLOAT dpiY;
D2D1_BITMAP_OPTIONS bitmapOptions;
ID2D1ColorContext *colorContext;
} D2D1_BITMAP_PROPERTIES1;
typedef struct D2D1_MAPPED_RECT {
UINT32 pitch;
BYTE *bits;
} D2D1_MAPPED_RECT;
typedef struct D2D1_IMAGE_BRUSH_PROPERTIES {
D2D1_RECT_F sourceRectangle;
D2D1_EXTEND_MODE extendModeX;
D2D1_EXTEND_MODE extendModeY;
D2D1_INTERPOLATION_MODE interpolationMode;
} D2D1_IMAGE_BRUSH_PROPERTIES;
typedef struct D2D1_BITMAP_BRUSH_PROPERTIES1 {
D2D1_EXTEND_MODE extendModeX;
D2D1_EXTEND_MODE extendModeY;
D2D1_INTERPOLATION_MODE interpolationMode;
} D2D1_BITMAP_BRUSH_PROPERTIES1;
typedef D2D_MATRIX_4X3_F D2D1_MATRIX_4X3_F;
typedef D2D_MATRIX_4X4_F D2D1_MATRIX_4X4_F;
typedef D2D_MATRIX_5X4_F D2D1_MATRIX_5X4_F;
typedef D2D_VECTOR_2F D2D1_VECTOR_2F;
typedef D2D_VECTOR_3F D2D1_VECTOR_3F;
typedef D2D_VECTOR_4F D2D1_VECTOR_4F;
typedef struct D2D1_LAYER_PARAMETERS1 {
D2D1_RECT_F contentBounds;
ID2D1Geometry *geometricMask;
D2D1_ANTIALIAS_MODE maskAntialiasMode;
D2D1_MATRIX_3X2_F maskTransform;
FLOAT opacity;
ID2D1Brush *opacityBrush;
D2D1_LAYER_OPTIONS1 layerOptions;
} D2D1_LAYER_PARAMETERS1;
typedef struct D2D1_RENDERING_CONTROLS {
D2D1_BUFFER_PRECISION bufferPrecision;
D2D1_SIZE_U tileSize;
} D2D1_RENDERING_CONTROLS;
typedef struct D2D1_EFFECT_INPUT_DESCRIPTION {
ID2D1Effect *effect;
UINT32 inputIndex;
D2D1_RECT_F inputRectangle;
} D2D1_EFFECT_INPUT_DESCRIPTION;
typedef struct D2D1_PRINT_CONTROL_PROPERTIES {
D2D1_PRINT_FONT_SUBSET_MODE fontSubset;
FLOAT rasterDPI;
D2D1_COLOR_SPACE colorSpace;
} D2D1_PRINT_CONTROL_PROPERTIES;
typedef struct D2D1_STROKE_STYLE_PROPERTIES1 {
D2D1_CAP_STYLE startCap;
D2D1_CAP_STYLE endCap;
D2D1_CAP_STYLE dashCap;
D2D1_LINE_JOIN lineJoin;
FLOAT miterLimit;
D2D1_DASH_STYLE dashStyle;
FLOAT dashOffset;
D2D1_STROKE_TRANSFORM_TYPE transformType;
} D2D1_STROKE_STYLE_PROPERTIES1;
typedef struct D2D1_DRAWING_STATE_DESCRIPTION1 {
D2D1_ANTIALIAS_MODE antialiasMode;
D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
D2D1_TAG tag1;
D2D1_TAG tag2;
D2D1_MATRIX_3X2_F transform;
D2D1_PRIMITIVE_BLEND primitiveBlend;
D2D1_UNIT_MODE unitMode;
} D2D1_DRAWING_STATE_DESCRIPTION1;
typedef struct D2D1_POINT_DESCRIPTION {
D2D1_POINT_2F point;
D2D1_POINT_2F unitTangentVector;
UINT32 endSegment;
UINT32 endFigure;
FLOAT lengthToEndSegment;
} D2D1_POINT_DESCRIPTION;
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1Properties : public IUnknown
{
STDMETHOD_(UINT32, GetPropertyCount)() CONST PURE;
STDMETHOD(GetPropertyName)(UINT32 index, PWSTR name, UINT32 nameCount) CONST PURE;
STDMETHOD_(UINT32, GetPropertyNameLength)(UINT32 index) CONST PURE;
STDMETHOD_(D2D1_PROPERTY_TYPE, GetType)(UINT32 index) CONST PURE;
STDMETHOD_(UINT32, GetPropertyIndex)(PCWSTR name) CONST PURE;
STDMETHOD(SetValueByName)(PCWSTR name, D2D1_PROPERTY_TYPE type, CONST BYTE *data, UINT32 dataSize) PURE;
STDMETHOD(SetValue)(UINT32 index, D2D1_PROPERTY_TYPE type, CONST BYTE *data, UINT32 dataSize) PURE;
STDMETHOD(GetValueByName)(PCWSTR name, D2D1_PROPERTY_TYPE type, BYTE *data, UINT32 dataSize) CONST PURE;
STDMETHOD(GetValue)(UINT32 index, D2D1_PROPERTY_TYPE type, BYTE *data, UINT32 dataSize) CONST PURE;
STDMETHOD_(UINT32, GetValueSize)(UINT32 index) CONST PURE;
STDMETHOD(GetSubProperties)(UINT32 index, ID2D1Properties **subProperties) CONST PURE;
HRESULT SetValueByName(PCWSTR name, CONST BYTE *data, UINT32 dataSize) {
return SetValueByName(name, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize);
}
HRESULT SetValue(UINT32 index, CONST BYTE *data, UINT32 dataSize) {
return SetValue(index, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize);
}
HRESULT GetValueByName(PCWSTR name, BYTE *data, UINT32 dataSize) CONST {
return GetValueByName(name, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize);
}
HRESULT GetValue(UINT32 index, BYTE *data, UINT32 dataSize) CONST {
return GetValue(index, D2D1_PROPERTY_TYPE_UNKNOWN, data, dataSize);
}
template<typename T>
HRESULT GetValueByName(PCWSTR propertyName, T *value) const {
return GetValueByName(propertyName, reinterpret_cast<BYTE*>(value), sizeof(*value));
}
template<typename T>
T GetValueByName(PCWSTR propertyName) const {
T ret;
GetValueByName(propertyName, reinterpret_cast<BYTE*>(&ret), sizeof(ret));
return ret;
}
template<typename T>
HRESULT SetValueByName(PCWSTR propertyName, const T &value) {
return SetValueByName(propertyName, reinterpret_cast<const BYTE*>(&value), sizeof(value));
}
template<typename T>
HRESULT GetValue(T index, BYTE *data, UINT32 dataSize) CONST {
return GetValue(static_cast<UINT32>(index), data, dataSize);
}
template<typename T, typename U>
HRESULT GetValue(U index, T *value) const {
return GetValue(static_cast<UINT32>(index), reinterpret_cast<BYTE*>(value), sizeof(*value));
}
template<typename T, typename U>
T GetValue(U index) const {
T ret;
GetValue(static_cast<UINT32>(index), reinterpret_cast<BYTE*>(&ret), sizeof(ret));
return ret;
}
template<typename T>
HRESULT SetValue(T index, CONST BYTE *data, UINT32 dataSize) {
return SetValue(static_cast<UINT32>(index), data, dataSize);
}
template<typename T, typename U>
HRESULT SetValue(U index, const T &value) {
return SetValue(static_cast<UINT32>(index), reinterpret_cast<const BYTE*>(&value), sizeof(value));
}
template<typename T>
HRESULT GetPropertyName(T index, PWSTR name, UINT32 nameCount) CONST {
return GetPropertyName(static_cast<UINT32>(index), name, nameCount);
}
template<typename T>
UINT32 GetPropertyNameLength(T index) CONST {
return GetPropertyNameLength(static_cast<UINT32>(index));
}
template<typename T>
D2D1_PROPERTY_TYPE GetType(T index) CONST {
return GetType(static_cast<UINT32>(index));
}
template<typename T>
UINT32 GetValueSize(T index) CONST {
return GetValueSize(static_cast<UINT32>(index));
}
template<typename T>
HRESULT GetSubProperties(T index, ID2D1Properties **subProperties) CONST {
return GetSubProperties(static_cast<UINT32>(index), subProperties);
}
};
#else
typedef interface ID2D1Properties ID2D1Properties;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1Properties,0x483473d7,0xcd46,0x4f9d,0x9d,0x3a,0x31,0x12,0xaa,0x80,0x15,0x9d);
__CRT_UUID_DECL(ID2D1Properties,0x483473d7,0xcd46,0x4f9d,0x9d,0x3a,0x31,0x12,0xaa,0x80,0x15,0x9d);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1GdiMetafileSink : public IUnknown
{
STDMETHOD(ProcessRecord)(DWORD recordType, CONST void *recordData, DWORD recordDataSize) PURE;
};
#else
typedef interface ID2D1GdiMetafileSink ID2D1GdiMetafileSink;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1GdiMetafileSink, 0x82237326,0x8111,0x4f7c,0xbc,0xf4,0xb5,0xc1,0x17,0x55,0x64,0xfe);
__CRT_UUID_DECL(ID2D1GdiMetafileSink, 0x82237326,0x8111,0x4f7c,0xbc,0xf4,0xb5,0xc1,0x17,0x55,0x64,0xfe);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1GdiMetafile : public ID2D1Resource
{
STDMETHOD(Stream)(ID2D1GdiMetafileSink *sink) PURE;
STDMETHOD(GetBounds)(D2D1_RECT_F *bounds) PURE;
};
#else
typedef interface ID2D1GdiMetafile ID2D1GdiMetafile;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1GdiMetafile, 0x2f543dc3,0xcfc1,0x4211,0x86,0x4f,0xcf,0xd9,0x1c,0x6f,0x33,0x95);
__CRT_UUID_DECL(ID2D1GdiMetafile, 0x2f543dc3,0xcfc1,0x4211,0x86,0x4f,0xcf,0xd9,0x1c,0x6f,0x33,0x95);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1StrokeStyle1 : public ID2D1StrokeStyle
{
STDMETHOD_(D2D1_STROKE_TRANSFORM_TYPE, GetStrokeTransformType)() CONST PURE;
};
#else
typedef interface ID2D1StrokeStyle1 ID2D1StrokeStyle1;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1StrokeStyle1, 0x10a72a66,0xe91c,0x43f4,0x99,0x3f,0xdd,0xf4,0xb8,0x2b,0x0b,0x4a);
__CRT_UUID_DECL(ID2D1StrokeStyle1, 0x10a72a66,0xe91c,0x43f4,0x99,0x3f,0xdd,0xf4,0xb8,0x2b,0x0b,0x4a);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1CommandSink : public IUnknown
{
STDMETHOD(BeginDraw)() PURE;
STDMETHOD(EndDraw)() PURE;
STDMETHOD(SetAntialiasMode)(D2D1_ANTIALIAS_MODE antialiasMode) PURE;
STDMETHOD(SetTags)(D2D1_TAG tag1, D2D1_TAG tag2) PURE;
STDMETHOD(SetTextAntialiasMode)(D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode) PURE;
STDMETHOD(SetTextRenderingParams)(IDWriteRenderingParams *textRenderingParams) PURE;
STDMETHOD(SetTransform)(CONST D2D1_MATRIX_3X2_F *transform) PURE;
STDMETHOD(SetPrimitiveBlend)(D2D1_PRIMITIVE_BLEND primitiveBlend) PURE;
STDMETHOD(SetUnitMode)(D2D1_UNIT_MODE unitMode) PURE;
STDMETHOD(Clear)(CONST D2D1_COLOR_F *color) PURE;
STDMETHOD(DrawGlyphRun)(D2D1_POINT_2F baselineOrigin, CONST DWRITE_GLYPH_RUN *glyphRun,
CONST DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription, ID2D1Brush *foregroundBrush,
DWRITE_MEASURING_MODE measuringMode) PURE;
STDMETHOD(DrawLine)(D2D1_POINT_2F point0, D2D1_POINT_2F point1, ID2D1Brush *brush, FLOAT strokeWidth,
ID2D1StrokeStyle *strokeStyle) PURE;
STDMETHOD(DrawGeometry)(ID2D1Geometry *geometry, ID2D1Brush *brush, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle) PURE;
STDMETHOD(DrawRectangle)(CONST D2D1_RECT_F *rect, ID2D1Brush *brush, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle) PURE;
STDMETHOD(DrawBitmap)(ID2D1Bitmap *bitmap, CONST D2D1_RECT_F *destinationRectangle, FLOAT opacity,
D2D1_INTERPOLATION_MODE interpolationMode, CONST D2D1_RECT_F *sourceRectangle,
CONST D2D1_MATRIX_4X4_F *perspectiveTransform) PURE;
STDMETHOD(DrawImage)(ID2D1Image *image, CONST D2D1_POINT_2F *targetOffset, CONST D2D1_RECT_F *imageRectangle,
D2D1_INTERPOLATION_MODE interpolationMode, D2D1_COMPOSITE_MODE compositeMode) PURE;
STDMETHOD(DrawGdiMetafile)(ID2D1GdiMetafile *gdiMetafile, CONST D2D1_POINT_2F *targetOffset) PURE;
STDMETHOD(FillMesh)(ID2D1Mesh *mesh, ID2D1Brush *brush) PURE;
STDMETHOD(FillOpacityMask)(ID2D1Bitmap *opacityMask, ID2D1Brush *brush, CONST D2D1_RECT_F *destinationRectangle,
CONST D2D1_RECT_F *sourceRectangle) PURE;
STDMETHOD(FillGeometry)(ID2D1Geometry *geometry, ID2D1Brush *brush, ID2D1Brush *opacityBrush) PURE;
STDMETHOD(FillRectangle)(CONST D2D1_RECT_F *rect, ID2D1Brush *brush) PURE;
STDMETHOD(PushAxisAlignedClip)(CONST D2D1_RECT_F *clipRect, D2D1_ANTIALIAS_MODE antialiasMode) PURE;
STDMETHOD(PushLayer)(CONST D2D1_LAYER_PARAMETERS1 *layerParameters1, ID2D1Layer *layer) PURE;
STDMETHOD(PopAxisAlignedClip)() PURE;
STDMETHOD(PopLayer)() PURE;
};
#else
typedef interface ID2D1CommandSink ID2D1CommandSink;
#endif
DEFINE_GUID(IID_ID2D1CommandSink, 0x54d7898a,0xa061,0x40a7,0xbe,0xc7,0xe4,0x65,0xbc,0xba,0x2c,0x4f);
__CRT_UUID_DECL(ID2D1CommandSink, 0x54d7898a,0xa061,0x40a7,0xbe,0xc7,0xe4,0x65,0xbc,0xba,0x2c,0x4f);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1CommandList : public ID2D1Image
{
STDMETHOD(Stream)(ID2D1CommandSink *sink) PURE;
STDMETHOD(Close)() PURE;
};
#else
typedef interface ID2D1CommandList ID2D1CommandList;
#endif
DEFINE_GUID(IID_ID2D1CommandList, 0xb4f34a19,0x2383,0x4d76,0x94,0xf6,0xec,0x34,0x36,0x57,0xc3,0xdc);
__CRT_UUID_DECL(ID2D1CommandList, 0xb4f34a19,0x2383,0x4d76,0x94,0xf6,0xec,0x34,0x36,0x57,0xc3,0xdc);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1PrintControl : public IUnknown
{
STDMETHOD(AddPage)(ID2D1CommandList *commandList, D2D_SIZE_F pageSize, IStream *pagePrintTicketStream,
D2D1_TAG *tag1 = NULL, D2D1_TAG *tag2 = NULL) PURE;
STDMETHOD(Close)() PURE;
};
#else
typedef interface ID2D1PrintControl ID2D1PrintControl;
#endif
DEFINE_GUID(IID_ID2D1PrintControl, 0x2c1d867d,0xc290,0x41c8,0xae,0x7e,0x34,0xa9,0x87,0x02,0xe9,0xa5);
__CRT_UUID_DECL(ID2D1PrintControl, 0x2c1d867d,0xc290,0x41c8,0xae,0x7e,0x34,0xa9,0x87,0x02,0xe9,0xa5);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1Effect : public ID2D1Properties
{
STDMETHOD_(void, SetInput)(UINT32 index, ID2D1Image *input, BOOL invalidate=TRUE) PURE;
STDMETHOD(SetInputCount)(UINT32 inputCount) PURE;
STDMETHOD_(void, GetInput)(UINT32 index, ID2D1Image **input) CONST PURE;
STDMETHOD_(UINT32, GetInputCount)() CONST PURE;
STDMETHOD_(void, GetOutput)(ID2D1Image **outputImage) CONST PURE;
void SetInputEffect(UINT32 index, ID2D1Effect *inputEffect, BOOL invalidate=TRUE) {
ID2D1Image *output = NULL;
if(inputEffect)
inputEffect->GetOutput(&output);
SetInput(index, output, invalidate);
if(output)
output->Release();
}
};
#else
typedef interface ID2D1Effect ID2D1Effect;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1Effect,0x28211a43,0x7d89,0x476f,0x81,0x81,0x2d,0x61,0x59,0xb2,0x20,0xad);
__CRT_UUID_DECL(ID2D1Effect,0x28211a43,0x7d89,0x476f,0x81,0x81,0x2d,0x61,0x59,0xb2,0x20,0xad);
#endif
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1Bitmap1 : public ID2D1Bitmap
{
STDMETHOD_(void, GetColorContext)(ID2D1ColorContext **colorContext) CONST PURE;
STDMETHOD_(D2D1_BITMAP_OPTIONS, GetOptions)() CONST PURE;
STDMETHOD(GetSurface)(IDXGISurface **dxgiSurface) CONST PURE;
STDMETHOD(Map)(D2D1_MAP_OPTIONS options, D2D1_MAPPED_RECT *mappedRect) PURE;
STDMETHOD(Unmap)() PURE;
};
#else
typedef interface ID2D1Bitmap1 ID2D1Bitmap1;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1Bitmap1, 0xa898a84c,0x3873,0x4588,0xb0,0x8b,0xeb,0xbf,0x97,0x8d,0xf0,0x41);
__CRT_UUID_DECL(ID2D1Bitmap1, 0xa898a84c,0x3873,0x4588,0xb0,0x8b,0xeb,0xbf,0x97,0x8d,0xf0,0x41);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1ImageBrush : public ID2D1Brush
{
STDMETHOD_(void, SetImage)(ID2D1Image *image) PURE;
STDMETHOD_(void, SetExtendModeX)(D2D1_EXTEND_MODE extendModeX) PURE;
STDMETHOD_(void, SetExtendModeY)(D2D1_EXTEND_MODE extendModeY) PURE;
STDMETHOD_(void, SetInterpolationMode)(D2D1_INTERPOLATION_MODE interpolationMode) PURE;
STDMETHOD_(void, SetSourceRectangle)(CONST D2D1_RECT_F *sourceRectangle) PURE;
STDMETHOD_(void, GetImage)(ID2D1Image **image) CONST PURE;
STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeX)() CONST PURE;
STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeY)() CONST PURE;
STDMETHOD_(D2D1_INTERPOLATION_MODE, GetInterpolationMode)() CONST PURE;
STDMETHOD_(void, GetSourceRectangle)(D2D1_RECT_F *sourceRectangle) CONST PURE;
};
#else
typedef interface ID2D1ImageBrush ID2D1ImageBrush;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1ImageBrush, 0xfe9e984d,0x3f95,0x407c,0xb5,0xdb,0xcb,0x94,0xd4,0xe8,0xf8,0x7c);
__CRT_UUID_DECL(ID2D1ImageBrush, 0xfe9e984d,0x3f95,0x407c,0xb5,0xdb,0xcb,0x94,0xd4,0xe8,0xf8,0x7c);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1BitmapBrush1 : public ID2D1BitmapBrush
{
STDMETHOD_(void, SetInterpolationMode1)(D2D1_INTERPOLATION_MODE interpolationMode) PURE;
STDMETHOD_(D2D1_INTERPOLATION_MODE, GetInterpolationMode1)() CONST PURE;
};
#else
typedef interface ID2D1BitmapBrush1 ID2D1BitmapBrush1;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1BitmapBrush1, 0x41343a53,0xe41a,0x49a2,0x91,0xcd,0x21,0x79,0x3b,0xbb,0x62,0xe5);
__CRT_UUID_DECL(ID2D1BitmapBrush1, 0x41343a53,0xe41a,0x49a2,0x91,0xcd,0x21,0x79,0x3b,0xbb,0x62,0xe5);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1GradientStopCollection1 : public ID2D1GradientStopCollection
{
STDMETHOD_(void, GetGradientStops1)(D2D1_GRADIENT_STOP *gradientStops, UINT32 gradientStopsCount) CONST PURE;
STDMETHOD_(D2D1_COLOR_SPACE, GetPreInterpolationSpace)() CONST PURE;
STDMETHOD_(D2D1_COLOR_SPACE, GetPostInterpolationSpace)() CONST PURE;
STDMETHOD_(D2D1_BUFFER_PRECISION, GetBufferPrecision)() CONST PURE;
STDMETHOD_(D2D1_COLOR_INTERPOLATION_MODE, GetColorInterpolationMode)() CONST PURE;
};
#else
typedef interface ID2D1GradientStopCollection1 ID2D1GradientStopCollection1;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1GradientStopCollection1, 0xae1572f4,0x5dd0,0x4777,0x99,0x8b,0x92,0x79,0x47,0x2a,0xe6,0x3b);
__CRT_UUID_DECL(ID2D1GradientStopCollection1, 0xae1572f4,0x5dd0,0x4777,0x99,0x8b,0x92,0x79,0x47,0x2a,0xe6,0x3b);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1ColorContext : public ID2D1Resource
{
STDMETHOD_(D2D1_COLOR_SPACE, GetColorSpace)() CONST PURE;
STDMETHOD_(UINT32, GetProfileSize)() CONST PURE;
STDMETHOD(GetProfile)(BYTE *profile, UINT32 profileSize) CONST PURE;
};
#else
typedef interface ID2D1ColorContext ID2D1ColorContext;
#endif
DEFINE_GUID(IID_ID2D1ColorContext, 0x1c4820bb,0x5771,0x4518,0xa5,0x81,0x2f,0xe4,0xdd,0x0e,0xc6,0x57);
__CRT_UUID_DECL(ID2D1ColorContext, 0x1c4820bb,0x5771,0x4518,0xa5,0x81,0x2f,0xe4,0xdd,0x0e,0xc6,0x57);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1DeviceContext : public ID2D1RenderTarget
{
STDMETHOD(CreateBitmap)(D2D1_SIZE_U size, CONST void *sourceData, UINT32 pitch,
CONST D2D1_BITMAP_PROPERTIES1 *bitmapProperties, ID2D1Bitmap1 **bitmap) PURE;
using ID2D1RenderTarget::CreateBitmap;
STDMETHOD(CreateBitmapFromWicBitmap)(IWICBitmapSource *wicBitmapSource,
CONST D2D1_BITMAP_PROPERTIES1 *bitmapProperties, ID2D1Bitmap1 **bitmap) PURE;
using ID2D1RenderTarget::CreateBitmapFromWicBitmap;
STDMETHOD(CreateColorContext)(D2D1_COLOR_SPACE space, CONST BYTE *profile, UINT32 profileSize,
ID2D1ColorContext **colorContext) PURE;
STDMETHOD(CreateColorContextFromFilename)(PCWSTR filename, ID2D1ColorContext **colorContext) PURE;
STDMETHOD(CreateColorContextFromWicColorContext)(IWICColorContext *wicColorContext, ID2D1ColorContext **colorContext) PURE;
STDMETHOD(CreateBitmapFromDxgiSurface)(IDXGISurface *surface, CONST D2D1_BITMAP_PROPERTIES1 *bitmapProperties,
ID2D1Bitmap1 **bitmap) PURE;
STDMETHOD(CreateEffect)(REFCLSID effectId, ID2D1Effect **effect) PURE;
STDMETHOD(CreateGradientStopCollection)(CONST D2D1_GRADIENT_STOP *straightAlphaGradientStops,
UINT32 straightAlphaGradientStopsCount, D2D1_COLOR_SPACE preInterpolationSpace,
D2D1_COLOR_SPACE postInterpolationSpace, D2D1_BUFFER_PRECISION bufferPrecision,
D2D1_EXTEND_MODE extendMode, D2D1_COLOR_INTERPOLATION_MODE colorInterpolationMode,
ID2D1GradientStopCollection1 **gradientStopCollection1) PURE;
using ID2D1RenderTarget::CreateGradientStopCollection;
STDMETHOD(CreateImageBrush)(ID2D1Image *image, CONST D2D1_IMAGE_BRUSH_PROPERTIES *imageBrushProperties,
CONST D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1ImageBrush **imageBrush) PURE;
STDMETHOD(CreateBitmapBrush)(ID2D1Bitmap *bitmap, CONST D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmapBrushProperties,
CONST D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1BitmapBrush1 **bitmapBrush) PURE;
using ID2D1RenderTarget::CreateBitmapBrush;
STDMETHOD(CreateCommandList)(ID2D1CommandList **commandList) PURE;
STDMETHOD_(BOOL, IsDxgiFormatSupported)(DXGI_FORMAT format) CONST PURE;
STDMETHOD_(BOOL, IsBufferPrecisionSupported)(D2D1_BUFFER_PRECISION bufferPrecision) CONST PURE;
STDMETHOD(GetImageLocalBounds)(ID2D1Image *image, D2D1_RECT_F *localBounds) CONST PURE;
STDMETHOD(GetImageWorldBounds)(ID2D1Image *image, D2D1_RECT_F *worldBounds) CONST PURE;
STDMETHOD(GetGlyphRunWorldBounds)(D2D1_POINT_2F baselineOrigin, CONST DWRITE_GLYPH_RUN *glyphRun,
DWRITE_MEASURING_MODE measuringMode, D2D1_RECT_F *bounds) CONST PURE;
STDMETHOD_(void, GetDevice)(ID2D1Device **device) CONST PURE;
STDMETHOD_(void, SetTarget)(ID2D1Image *image) PURE;
STDMETHOD_(void, GetTarget)(ID2D1Image **image) CONST PURE;
STDMETHOD_(void, SetRenderingControls)(CONST D2D1_RENDERING_CONTROLS *renderingControls) PURE;
STDMETHOD_(void, GetRenderingControls)(D2D1_RENDERING_CONTROLS *renderingControls) CONST PURE;
STDMETHOD_(void, SetPrimitiveBlend)(D2D1_PRIMITIVE_BLEND primitiveBlend) PURE;
STDMETHOD_(D2D1_PRIMITIVE_BLEND, GetPrimitiveBlend)() CONST PURE;
STDMETHOD_(void, SetUnitMode)(D2D1_UNIT_MODE unitMode) PURE;
STDMETHOD_(D2D1_UNIT_MODE, GetUnitMode)() CONST PURE;
STDMETHOD_(void, DrawGlyphRun)(D2D1_POINT_2F baselineOrigin, CONST DWRITE_GLYPH_RUN *glyphRun,
CONST DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription, ID2D1Brush *foregroundBrush,
DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) PURE;
using ID2D1RenderTarget::DrawGlyphRun;
STDMETHOD_(void, DrawImage)(ID2D1Image *image, CONST D2D1_POINT_2F *targetOffset = NULL,
CONST D2D1_RECT_F *imageRectangle = NULL, D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR,
D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) PURE;
STDMETHOD_(void, DrawGdiMetafile)(ID2D1GdiMetafile *gdiMetafile, CONST D2D1_POINT_2F *targetOffset = NULL) PURE;
STDMETHOD_(void, DrawBitmap)(ID2D1Bitmap *bitmap, CONST D2D1_RECT_F *destinationRectangle, FLOAT opacity,
D2D1_INTERPOLATION_MODE interpolationMode, CONST D2D1_RECT_F *sourceRectangle = NULL,
CONST D2D1_MATRIX_4X4_F *perspectiveTransform = NULL) PURE;
using ID2D1RenderTarget::DrawBitmap;
STDMETHOD_(void, PushLayer)(CONST D2D1_LAYER_PARAMETERS1 *layerParameters, ID2D1Layer *layer) PURE;
using ID2D1RenderTarget::PushLayer;
STDMETHOD(InvalidateEffectInputRectangle)(ID2D1Effect *effect, UINT32 input, CONST D2D1_RECT_F *inputRectangle) PURE;
STDMETHOD(GetEffectInvalidRectangleCount)(ID2D1Effect *effect, UINT32 *rectangleCount) PURE;
STDMETHOD(GetEffectInvalidRectangles)(ID2D1Effect *effect, D2D1_RECT_F *rectangles, UINT32 rectanglesCount) PURE;
STDMETHOD(GetEffectRequiredInputRectangles)(ID2D1Effect *renderEffect, CONST D2D1_RECT_F *renderImageRectangle,
CONST D2D1_EFFECT_INPUT_DESCRIPTION *inputDescriptions, D2D1_RECT_F *requiredInputRects, UINT32 inputCount) PURE;
STDMETHOD_(void, FillOpacityMask)(ID2D1Bitmap *opacityMask, ID2D1Brush *brush, CONST D2D1_RECT_F *destinationRectangle = NULL,
CONST D2D1_RECT_F *sourceRectangle = NULL) PURE;
using ID2D1RenderTarget::FillOpacityMask;
HRESULT CreateBitmap(D2D1_SIZE_U size, CONST void *sourceData, UINT32 pitch, CONST D2D1_BITMAP_PROPERTIES1 &bitmapProperties,
ID2D1Bitmap1 **bitmap) {
return CreateBitmap(size, sourceData, pitch, &bitmapProperties, bitmap);
}
HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource *wicBitmapSource, CONST D2D1_BITMAP_PROPERTIES1 &bitmapProperties,
ID2D1Bitmap1 **bitmap) {
return CreateBitmapFromWicBitmap(wicBitmapSource, &bitmapProperties, bitmap);
}
HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource *wicBitmapSource, ID2D1Bitmap1 **bitmap) {
return CreateBitmapFromWicBitmap(wicBitmapSource, NULL, bitmap);
}
HRESULT CreateBitmapFromDxgiSurface(IDXGISurface *surface, CONST D2D1_BITMAP_PROPERTIES1 &bitmapProperties,
ID2D1Bitmap1 **bitmap) {
return CreateBitmapFromDxgiSurface(surface, &bitmapProperties, bitmap);
}
HRESULT CreateImageBrush(ID2D1Image *image, CONST D2D1_IMAGE_BRUSH_PROPERTIES &imageBrushProperties,
CONST D2D1_BRUSH_PROPERTIES &brushProperties, ID2D1ImageBrush **imageBrush) {
return CreateImageBrush(image, &imageBrushProperties, &brushProperties, imageBrush);
}
HRESULT CreateImageBrush(ID2D1Image *image, CONST D2D1_IMAGE_BRUSH_PROPERTIES &imageBrushProperties,
ID2D1ImageBrush **imageBrush) {
return CreateImageBrush(image,&imageBrushProperties, NULL, imageBrush);
}
HRESULT CreateBitmapBrush(ID2D1Bitmap *bitmap, ID2D1BitmapBrush1 **bitmapBrush) {
return CreateBitmapBrush(bitmap, NULL, NULL, bitmapBrush);
}
HRESULT CreateBitmapBrush(ID2D1Bitmap *bitmap, CONST D2D1_BITMAP_BRUSH_PROPERTIES1 &bitmapBrushProperties,
ID2D1BitmapBrush1 **bitmapBrush) {
return CreateBitmapBrush(bitmap, &bitmapBrushProperties, NULL, bitmapBrush);
}
HRESULT CreateBitmapBrush(ID2D1Bitmap *bitmap, CONST D2D1_BITMAP_BRUSH_PROPERTIES1 &bitmapBrushProperties,
CONST D2D1_BRUSH_PROPERTIES &brushProperties, ID2D1BitmapBrush1 **bitmapBrush) {
return CreateBitmapBrush(bitmap, &bitmapBrushProperties, &brushProperties, bitmapBrush);
}
void DrawImage(ID2D1Effect *effect, CONST D2D1_POINT_2F *targetOffset = NULL, CONST D2D1_RECT_F *imageRectangle = NULL,
D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR,
D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
ID2D1Image *output = NULL;
effect->GetOutput(&output);
DrawImage(output, targetOffset, imageRectangle, interpolationMode, compositeMode);
output->Release();
}
void DrawImage(ID2D1Image *image, D2D1_INTERPOLATION_MODE interpolationMode,
D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
DrawImage(image, NULL, NULL, interpolationMode, compositeMode);
}
void DrawImage(ID2D1Effect *effect, D2D1_INTERPOLATION_MODE interpolationMode,
D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
DrawImage(effect, NULL, NULL, interpolationMode, compositeMode);
}
void DrawImage(ID2D1Image *image, D2D1_POINT_2F targetOffset,
D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR,
D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
DrawImage(image, &targetOffset, NULL, interpolationMode, compositeMode);
}
void DrawImage(ID2D1Effect *effect, D2D1_POINT_2F targetOffset,
D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR,
D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
DrawImage(effect, &targetOffset, NULL, interpolationMode, compositeMode);
}
void DrawImage(ID2D1Image *image, D2D1_POINT_2F targetOffset, CONST D2D1_RECT_F &imageRectangle,
D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR,
D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
DrawImage(image, &targetOffset, &imageRectangle, interpolationMode, compositeMode);
}
void DrawImage(ID2D1Effect *effect, D2D1_POINT_2F targetOffset, CONST D2D1_RECT_F &imageRectangle,
D2D1_INTERPOLATION_MODE interpolationMode = D2D1_INTERPOLATION_MODE_LINEAR,
D2D1_COMPOSITE_MODE compositeMode = D2D1_COMPOSITE_MODE_SOURCE_OVER) {
DrawImage(effect, &targetOffset, &imageRectangle, interpolationMode, compositeMode);
}
void PushLayer(CONST D2D1_LAYER_PARAMETERS1 &layerParameters, ID2D1Layer *layer) {
PushLayer(&layerParameters, layer);
}
void DrawGdiMetafile(ID2D1GdiMetafile *gdiMetafile, D2D1_POINT_2F targetOffset) {
DrawGdiMetafile(gdiMetafile, &targetOffset);
}
void DrawBitmap(ID2D1Bitmap *bitmap, CONST D2D1_RECT_F &destinationRectangle, FLOAT opacity,
D2D1_INTERPOLATION_MODE interpolationMode, CONST D2D1_RECT_F *sourceRectangle = NULL,
CONST D2D1_MATRIX_4X4_F *perspectiveTransform = NULL) {
DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform);
}
void DrawBitmap(ID2D1Bitmap *bitmap, CONST D2D1_RECT_F &destinationRectangle, FLOAT opacity,
D2D1_INTERPOLATION_MODE interpolationMode, CONST D2D1_RECT_F &sourceRectangle,
CONST D2D1_MATRIX_4X4_F *perspectiveTransform = NULL) {
DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, &sourceRectangle, perspectiveTransform);
}
void DrawBitmap(ID2D1Bitmap *bitmap, CONST D2D1_RECT_F &destinationRectangle, FLOAT opacity,
D2D1_INTERPOLATION_MODE interpolationMode, CONST D2D1_RECT_F &sourceRectangle,
CONST D2D1_MATRIX_4X4_F &perspectiveTransform) {
DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, &sourceRectangle, &perspectiveTransform);
}
void FillOpacityMask(ID2D1Bitmap *opacityMask, ID2D1Brush *brush, CONST D2D1_RECT_F &destinationRectangle,
CONST D2D1_RECT_F *sourceRectangle = NULL) {
FillOpacityMask(opacityMask, brush, &destinationRectangle, sourceRectangle);
}
void FillOpacityMask(ID2D1Bitmap *opacityMask, ID2D1Brush *brush, CONST D2D1_RECT_F &destinationRectangle,
CONST D2D1_RECT_F &sourceRectangle) {
FillOpacityMask(opacityMask, brush, &destinationRectangle, &sourceRectangle);
}
void SetRenderingControls(CONST D2D1_RENDERING_CONTROLS &renderingControls) {
return SetRenderingControls(&renderingControls);
}
};
#else
typedef interface ID2D1DeviceContext ID2D1DeviceContext;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1DeviceContext, 0xe8f7fe7a,0x191c,0x466d,0xad,0x95,0x97,0x56,0x78,0xbd,0xa9,0x98);
__CRT_UUID_DECL(ID2D1DeviceContext, 0xe8f7fe7a,0x191c,0x466d,0xad,0x95,0x97,0x56,0x78,0xbd,0xa9,0x98);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1Device : public ID2D1Resource
{
STDMETHOD(CreateDeviceContext)(D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext **deviceContext) PURE;
STDMETHOD(CreatePrintControl)(IWICImagingFactory *wicFactory, IPrintDocumentPackageTarget *documentTarget,
CONST D2D1_PRINT_CONTROL_PROPERTIES *printControlProperties, ID2D1PrintControl **printControl) PURE;
STDMETHOD_(void, SetMaximumTextureMemory)(UINT64 maximumInBytes) PURE;
STDMETHOD_(UINT64, GetMaximumTextureMemory)() CONST PURE;
STDMETHOD_(void, ClearResources)(UINT32 millisecondsSinceUse = 0) PURE;
HRESULT CreatePrintControl(IWICImagingFactory *wicFactory, IPrintDocumentPackageTarget *documentTarget,
CONST D2D1_PRINT_CONTROL_PROPERTIES &printControlProperties, ID2D1PrintControl **printControl) {
return CreatePrintControl(wicFactory, documentTarget, &printControlProperties, printControl);
}
};
#else
typedef interface ID2D1Device ID2D1Device;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1Device, 0x47dd575d,0xac05,0x4cdd,0x80,0x49,0x9b,0x02,0xcd,0x16,0xf4,0x4c);
__CRT_UUID_DECL(ID2D1Device, 0x47dd575d,0xac05,0x4cdd,0x80,0x49,0x9b,0x02,0xcd,0x16,0xf4,0x4c);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1DrawingStateBlock1 : public ID2D1DrawingStateBlock
{
STDMETHOD_(void, GetDescription)(D2D1_DRAWING_STATE_DESCRIPTION1 *stateDescription) CONST PURE;
using ID2D1DrawingStateBlock::GetDescription;
STDMETHOD_(void, SetDescription)(CONST D2D1_DRAWING_STATE_DESCRIPTION1 *stateDescription) PURE;
using ID2D1DrawingStateBlock::SetDescription;
};
#else
typedef interface ID2D1DrawingStateBlock1 ID2D1DrawingStateBlock1;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1DrawingStateBlock1, 0x689f1f85,0xc72e,0x4e33,0x8f,0x19,0x85,0x75,0x4e,0xfd,0x5a,0xce);
__CRT_UUID_DECL(ID2D1DrawingStateBlock1, 0x689f1f85,0xc72e,0x4e33,0x8f,0x19,0x85,0x75,0x4e,0xfd,0x5a,0xce);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1PathGeometry1 : public ID2D1PathGeometry
{
STDMETHOD(ComputePointAndSegmentAtLength)(FLOAT length, UINT32 startSegment, CONST D2D1_MATRIX_3X2_F *worldTransform,
FLOAT flatteningTolerance, D2D1_POINT_DESCRIPTION *pointDescription) CONST PURE;
HRESULT ComputePointAndSegmentAtLength(FLOAT length, UINT32 startSegment, CONST D2D1_MATRIX_3X2_F &worldTransform,
FLOAT flatteningTolerance, D2D1_POINT_DESCRIPTION *pointDescription) CONST {
return ComputePointAndSegmentAtLength(length, startSegment, &worldTransform, flatteningTolerance, pointDescription);
}
HRESULT ComputePointAndSegmentAtLength(FLOAT length, UINT32 startSegment, CONST D2D1_MATRIX_3X2_F *worldTransform,
D2D1_POINT_DESCRIPTION *pointDescription) CONST {
return ComputePointAndSegmentAtLength(length, startSegment, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE,
pointDescription);
}
HRESULT ComputePointAndSegmentAtLength(FLOAT length, UINT32 startSegment, CONST D2D1_MATRIX_3X2_F &worldTransform,
D2D1_POINT_DESCRIPTION *pointDescription) CONST {
return ComputePointAndSegmentAtLength(length, startSegment, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE,
pointDescription);
}
};
#else
typedef interface ID2D1PathGeometry1 ID2D1PathGeometry1;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1PathGeometry1, 0x62baa2d2,0xab54,0x41b7,0xb8,0x72,0x78,0x7e,0x01,0x06,0xa4,0x21);
__CRT_UUID_DECL(ID2D1PathGeometry1, 0x62baa2d2,0xab54,0x41b7,0xb8,0x72,0x78,0x7e,0x01,0x06,0xa4,0x21);
#ifndef D2D_USE_C_DEFINITIONS
interface ID2D1Factory1 : public ID2D1Factory
{
STDMETHOD(CreateDevice)(IDXGIDevice *dxgiDevice, ID2D1Device **d2dDevice) PURE;
STDMETHOD(CreateStrokeStyle)(CONST D2D1_STROKE_STYLE_PROPERTIES1 *strokeStyleProperties,
CONST FLOAT *dashes, UINT32 dashesCount, ID2D1StrokeStyle1 **strokeStyle) PURE;
using ID2D1Factory::CreateStrokeStyle;
STDMETHOD(CreatePathGeometry)(ID2D1PathGeometry1 **pathGeometry) PURE;
using ID2D1Factory::CreatePathGeometry;
STDMETHOD(CreateDrawingStateBlock)(CONST D2D1_DRAWING_STATE_DESCRIPTION1 *drawingStateDescription,
IDWriteRenderingParams *textRenderingParams, ID2D1DrawingStateBlock1 **drawingStateBlock) PURE;
using ID2D1Factory::CreateDrawingStateBlock;
STDMETHOD(CreateGdiMetafile)(IStream *metafileStream, ID2D1GdiMetafile **metafile) PURE;
STDMETHOD(RegisterEffectFromStream)(REFCLSID classId, IStream *propertyXml, CONST D2D1_PROPERTY_BINDING *bindings,
UINT32 bindingsCount, CONST PD2D1_EFFECT_FACTORY effectFactory) PURE;
STDMETHOD(RegisterEffectFromString)(REFCLSID classId, PCWSTR propertyXml, CONST D2D1_PROPERTY_BINDING *bindings,
UINT32 bindingsCount, CONST PD2D1_EFFECT_FACTORY effectFactory) PURE;
STDMETHOD(UnregisterEffect)(REFCLSID classId) PURE;
STDMETHOD(GetRegisteredEffects)(CLSID *effects, UINT32 effectsCount, UINT32 *effectsReturned,
UINT32 *effectsRegistered) CONST PURE;
STDMETHOD(GetEffectProperties)(REFCLSID effectId, ID2D1Properties **properties) CONST PURE;
HRESULT CreateStrokeStyle(CONST D2D1_STROKE_STYLE_PROPERTIES1 &strokeStyleProperties, CONST FLOAT *dashes,
UINT32 dashesCount, ID2D1StrokeStyle1 **strokeStyle) {
return CreateStrokeStyle(&strokeStyleProperties, dashes, dashesCount, strokeStyle);
}
HRESULT CreateDrawingStateBlock(CONST D2D1_DRAWING_STATE_DESCRIPTION1 &drawingStateDescription,
ID2D1DrawingStateBlock1 **drawingStateBlock) {
return CreateDrawingStateBlock(&drawingStateDescription, NULL, drawingStateBlock);
}
HRESULT CreateDrawingStateBlock(ID2D1DrawingStateBlock1 **drawingStateBlock) {
return CreateDrawingStateBlock(NULL, NULL, drawingStateBlock);
}
};
#else
typedef interface ID2D1Factory1 ID2D1Factory1;
/* FIXME: Add full C declaration */
#endif
DEFINE_GUID(IID_ID2D1Factory1, 0xbb12d362,0xdaee,0x4b9a,0xaa,0x1d,0x14,0xba,0x40,0x1c,0xfa,0x1f);
__CRT_UUID_DECL(ID2D1Factory1, 0xbb12d362,0xdaee,0x4b9a,0xaa,0x1d,0x14,0xba,0x40,0x1c,0xfa,0x1f);
#include <d2d1_1helper.h>
#endif
|