This file is indexed.

/usr/include/wine-development/windows/d2d1.idl is in libwine-development-dev 1.7.29-4.

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
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
/*
 * Copyright 2013 Nikolay Sivov for CodeWeavers
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

import "unknwn.idl";
import "dcommon.h";
import "d2dbasetypes.h";
import "d3d10_1.idl";
import "d2derr.h";

cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
cpp_quote("#undef DrawText")
cpp_quote("#endif")

interface ID2D1Factory;
interface ID2D1RenderTarget;
interface ID2D1BitmapRenderTarget;
interface ID2D1Geometry;
interface ID2D1Brush;
interface IDWriteRenderingParams;
interface IDWriteTextFormat;
interface IDWriteTextLayout;
interface IWICBitmapSource;
interface IWICBitmap;

cpp_quote("#ifndef __dwrite_h__")
/* already defined in dwrite.h but needed for WIDL */
typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN;
cpp_quote("#endif /* __dwrite_h__ */")

typedef D2D_POINT_2F D2D1_POINT_2F;
typedef D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F;
typedef D2D_RECT_F D2D1_RECT_F;
typedef D2D_SIZE_F D2D1_SIZE_F;
typedef UINT64 D2D1_TAG;
typedef D2D_SIZE_U D2D1_SIZE_U;
typedef D2D_POINT_2U D2D1_POINT_2U;
typedef D2D_RECT_U D2D1_RECT_U;
typedef D2D_COLOR_F D2D1_COLOR_F;

enum
{
    D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR = 0,
    D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR = 1,
    D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC = 2,
    D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR = 3,
    D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC = 4,
    D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC = 5,
    D2D1_INTERPOLATION_MODE_DEFINITION_FANT = 6,
    D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR = 7,
};

typedef enum D2D1_DEBUG_LEVEL
{
    D2D1_DEBUG_LEVEL_NONE = 0,
    D2D1_DEBUG_LEVEL_ERROR = 1,
    D2D1_DEBUG_LEVEL_WARNING = 2,
    D2D1_DEBUG_LEVEL_INFORMATION = 3,
    D2D1_DEBUG_LEVEL_FORCE_DWORD = 0xffffffff,
} D2D1_DEBUG_LEVEL;

typedef enum D2D1_FACTORY_TYPE
{
    D2D1_FACTORY_TYPE_SINGLE_THREADED = 0,
    D2D1_FACTORY_TYPE_MULTI_THREADED = 1,
    D2D1_FACTORY_TYPE_FORCE_DWORD = 0xfffffff,
} D2D1_FACTORY_TYPE;

typedef enum D2D1_FILL_MODE
{
    D2D1_FILL_MODE_ALTERNATE = 0,
    D2D1_FILL_MODE_WINDING = 1,
    D2D1_FILL_MODE_FORCE_DWORD = 0xffffffff
} D2D1_FILL_MODE;

typedef enum D2D1_PATH_SEGMENT
{
    D2D1_PATH_SEGMENT_NONE = 0,
    D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 1,
    D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 2,
    D2D1_PATH_SEGMENT_FORCE_DWORD = 0xffffffff
} D2D1_PATH_SEGMENT;

typedef enum D2D1_FIGURE_BEGIN
{
    D2D1_FIGURE_BEGIN_FILLED = 0,
    D2D1_FIGURE_BEGIN_HOLLOW = 1,
    D2D1_FIGURE_BEGIN_FORCE_DWORD = 0xffffffff
} D2D1_FIGURE_BEGIN;

typedef enum D2D1_FIGURE_END
{
    D2D1_FIGURE_END_OPEN = 0,
    D2D1_FIGURE_END_CLOSED = 1,
    D2D1_FIGURE_END_FORCE_DWORD = 0xffffffff
} D2D1_FIGURE_END;

typedef enum D2D1_CAP_STYLE
{
    D2D1_CAP_STYLE_FLAT = 0,
    D2D1_CAP_STYLE_SQUARE = 1,
    D2D1_CAP_STYLE_ROUND = 2,
    D2D1_CAP_STYLE_TRIANGLE = 3,
    D2D1_CAP_STYLE_FORCE_DWORD = 0xffffffff,
} D2D1_CAP_STYLE;

typedef enum D2D1_LINE_JOIN
{
    D2D1_LINE_JOIN_MITER = 0,
    D2D1_LINE_JOIN_BEVEL = 1,
    D2D1_LINE_JOIN_ROUND = 2,
    D2D1_LINE_JOIN_MITER_OR_BEVEL = 3,
    D2D1_LINE_JOIN_FORCE_DWORD = 0xffffffff,
} D2D1_LINE_JOIN;

typedef enum D2D1_DASH_STYLE
{
    D2D1_DASH_STYLE_SOLID = 0,
    D2D1_DASH_STYLE_DASH = 1,
    D2D1_DASH_STYLE_DOT = 2,
    D2D1_DASH_STYLE_DASH_DOT = 3,
    D2D1_DASH_STYLE_DASH_DOT_DOT = 4,
    D2D1_DASH_STYLE_CUSTOM = 5,
    D2D1_DASH_STYLE_FORCE_DWORD = 0xffffffff,
} D2D1_DASH_STYLE;

typedef enum D2D1_GEOMETRY_RELATION
{
    D2D1_GEOMETRY_RELATION_UNKNOWN = 0,
    D2D1_GEOMETRY_RELATION_DISJOINT = 1,
    D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2,
    D2D1_GEOMETRY_RELATION_CONTAINS = 3,
    D2D1_GEOMETRY_RELATION_OVERLAP = 4,
    D2D1_GEOMETRY_RELATION_FORCE_DWORD = 0xffffffff,
} D2D1_GEOMETRY_RELATION;

typedef enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION
{
    D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES = 0,
    D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES = 1,
    D2D1_GEOMETRY_SIMPLIFICATION_OPTION_FORCE_DWORD = 0xffffffff,
} D2D1_GEOMETRY_SIMPLIFICATION_OPTION;

typedef enum D2D1_COMBINE_MODE
{
    D2D1_COMBINE_MODE_UNION = 0,
    D2D1_COMBINE_MODE_INTERSECT = 1,
    D2D1_COMBINE_MODE_XOR = 2,
    D2D1_COMBINE_MODE_EXCLUDE = 3,
    D2D1_COMBINE_MODE_FORCE_DWORD = 0xffffffff,
} D2D1_COMBINE_MODE;

typedef enum D2D1_SWEEP_DIRECTION
{
    D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE = 0,
    D2D1_SWEEP_DIRECTION_CLOCKWISE = 1,
    D2D1_SWEEP_DIRECTION_FORCE_DWORD = 0xffffffff,
} D2D1_SWEEP_DIRECTION;

typedef enum D2D1_ARC_SIZE
{
    D2D1_ARC_SIZE_SMALL = 0,
    D2D1_ARC_SIZE_LARGE = 1,
    D2D1_ARC_SIZE_FORCE_DWORD = 0xffffffff,
} D2D1_ARC_SIZE;

typedef enum D2D1_ANTIALIAS_MODE
{
    D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0,
    D2D1_ANTIALIAS_MODE_ALIASED = 1,
    D2D1_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff,
} D2D1_ANTIALIAS_MODE;

typedef enum D2D1_TEXT_ANTIALIAS_MODE
{
    D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0,
    D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1,
    D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2,
    D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3,
    D2D1_TEXT_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff,
} D2D1_TEXT_ANTIALIAS_MODE;

typedef enum D2D1_EXTEND_MODE
{
    D2D1_EXTEND_MODE_CLAMP = 0,
    D2D1_EXTEND_MODE_WRAP = 1,
    D2D1_EXTEND_MODE_MIRROR = 2,
    D2D1_EXTEND_MODE_FORCE_DWORD = 0xffffffff,
} D2D1_EXTEND_MODE;

typedef enum D2D1_BITMAP_INTERPOLATION_MODE
{
    D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR,
    D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR,
    D2D1_BITMAP_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff,
} D2D1_BITMAP_INTERPOLATION_MODE;

typedef enum D2D1_GAMMA
{
    D2D1_GAMMA_2_2 = 0,
    D2D1_GAMMA_1_0 = 1,
    D2D1_GAMMA_FORCE_DWORD = 0xffffffff,
} D2D1_GAMMA;

typedef enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS
{
    D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x00000000,
    D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE = 0x00000001,
    D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_FORCE_DWORD = 0xffffffff,
} D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS;

typedef enum D2D1_OPACITY_MASK_CONTENT
{
    D2D1_OPACITY_MASK_CONTENT_GRAPHICS = 0,
    D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL = 1,
    D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE = 2,
    D2D1_OPACITY_MASK_CONTENT_FORCE_DWORD = 0xffffffff,
} D2D1_OPACITY_MASK_CONTENT;

typedef enum D2D1_DRAW_TEXT_OPTIONS
{
    D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x00000001,
    D2D1_DRAW_TEXT_OPTIONS_CLIP = 0x00000002,
    D2D1_DRAW_TEXT_OPTIONS_NONE = 0x00000000,
    D2D1_DRAW_TEXT_OPTIONS_FORCE_DWORD = 0xffffffff,
} D2D1_DRAW_TEXT_OPTIONS;

typedef enum D2D1_LAYER_OPTIONS
{
    D2D1_LAYER_OPTIONS_NONE = 0x00000000,
    D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE = 0x00000001,
    D2D1_LAYER_OPTIONS_FORCE_DWORD = 0xffffffff,
} D2D1_LAYER_OPTIONS;

typedef enum D2D1_RENDER_TARGET_TYPE
{
    D2D1_RENDER_TARGET_TYPE_DEFAULT = 0,
    D2D1_RENDER_TARGET_TYPE_SOFTWARE = 1,
    D2D1_RENDER_TARGET_TYPE_HARDWARE = 2,
    D2D1_RENDER_TARGET_TYPE_FORCE_DWORD = 0xffffffff,
} D2D1_RENDER_TARGET_TYPE;

typedef enum D2D1_RENDER_TARGET_USAGE
{
    D2D1_RENDER_TARGET_USAGE_NONE = 0x00000000,
    D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING = 0x00000001,
    D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE = 0x00000002,
    D2D1_RENDER_TARGET_USAGE_FORCE_DWORD = 0xffffffff,
} D2D1_RENDER_TARGET_USAGE;

typedef enum D2D1_FEATURE_LEVEL
{
    D2D1_FEATURE_LEVEL_DEFAULT = 0,
    D2D1_FEATURE_LEVEL_9 = D3D_FEATURE_LEVEL_9_1,
    D2D1_FEATURE_LEVEL_10 = D3D_FEATURE_LEVEL_10_0,
    D2D1_FEATURE_LEVEL_FORCE_DWORD = 0xffffffff,
} D2D1_FEATURE_LEVEL;

typedef enum D2D1_WINDOW_STATE
{
    D2D1_WINDOW_STATE_NONE = 0x0000000,
    D2D1_WINDOW_STATE_OCCLUDED = 0x0000001,
    D2D1_WINDOW_STATE_FORCE_DWORD = 0xffffffff,
} D2D1_WINDOW_STATE;

typedef enum D2D1_DC_INITIALIZE_MODE
{
    D2D1_DC_INITIALIZE_MODE_COPY = 0,
    D2D1_DC_INITIALIZE_MODE_CLEAR = 1,
    D2D1_DC_INITIALIZE_MODE_FORCE_DWORD = 0xffffffff,
} D2D1_DC_INITIALIZE_MODE;

typedef enum D2D1_PRESENT_OPTIONS
{
    D2D1_PRESENT_OPTIONS_NONE = 0x00000000,
    D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS = 0x00000001,
    D2D1_PRESENT_OPTIONS_IMMEDIATELY = 0x00000002,
    D2D1_PRESENT_OPTIONS_FORCE_DWORD = 0xffffffff,
} D2D1_PRESENT_OPTIONS;

typedef struct D2D1_BEZIER_SEGMENT
{
    D2D1_POINT_2F point1;
    D2D1_POINT_2F point2;
    D2D1_POINT_2F point3;
} D2D1_BEZIER_SEGMENT;

typedef struct D2D1_FACTORY_OPTIONS
{
    D2D1_DEBUG_LEVEL debugLevel;
} D2D1_FACTORY_OPTIONS;

typedef struct D2D1_TRIANGLE
{
    D2D1_POINT_2F point1;
    D2D1_POINT_2F point2;
    D2D1_POINT_2F point3;
} D2D1_TRIANGLE;

typedef struct D2D1_ROUNDED_RECT
{
    D2D1_RECT_F rect;
    float radiusX;
    float radiusY;
} D2D1_ROUNDED_RECT;

typedef struct D2D1_ELLIPSE
{
    D2D1_POINT_2F point;
    float radiusX;
    float radiusY;
} D2D1_ELLIPSE;

typedef struct D2D1_QUADRATIC_BEZIER_SEGMENT
{
    D2D1_POINT_2F point1;
    D2D1_POINT_2F point2;
} D2D1_QUADRATIC_BEZIER_SEGMENT;

typedef struct D2D1_ARC_SEGMENT
{
    D2D1_POINT_2F point;
    D2D1_SIZE_F size;
    float rotationAngle;
    D2D1_SWEEP_DIRECTION sweepDirection;
    D2D1_ARC_SIZE arcSize;
} D2D1_ARC_SEGMENT;

typedef struct D2D1_DRAWING_STATE_DESCRIPTION
{
    D2D1_ANTIALIAS_MODE antialiasMode;
    D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
    D2D1_TAG tag1;
    D2D1_TAG tag2;
    D2D1_MATRIX_3X2_F transform;
} D2D1_DRAWING_STATE_DESCRIPTION;

typedef struct D2D1_GRADIENT_STOP
{
    float position;
    D2D1_COLOR_F color;
} D2D1_GRADIENT_STOP;

typedef struct D2D1_BITMAP_PROPERTIES
{
    D2D1_PIXEL_FORMAT pixelFormat;
    float dpiX;
    float dpiY;
} D2D1_BITMAP_PROPERTIES;

typedef struct D2D1_BITMAP_BRUSH_PROPERTIES
{
    D2D1_EXTEND_MODE extendModeX;
    D2D1_EXTEND_MODE extendModeY;
    D2D1_BITMAP_INTERPOLATION_MODE interpolationMode;
} D2D1_BITMAP_BRUSH_PROPERTIES;

typedef struct D2D1_BRUSH_PROPERTIES
{
    float opacity;
    D2D1_MATRIX_3X2_F transform;
} D2D1_BRUSH_PROPERTIES;

typedef struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES
{
    D2D1_POINT_2F startPoint;
    D2D1_POINT_2F endPoint;
} D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES;

typedef struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES
{
    D2D1_POINT_2F center;
    D2D1_POINT_2F gradientOriginOffset;
    float radiusX;
    float radiusY;
} D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES;

typedef struct D2D1_LAYER_PARAMETERS
{
    D2D1_RECT_F contentBounds;
    ID2D1Geometry *geometricMask;
    D2D1_ANTIALIAS_MODE maskAntialiasMode;
    D2D1_MATRIX_3X2_F maskTransform;
    float opacity;
    ID2D1Brush *opacityBrush;
    D2D1_LAYER_OPTIONS layerOptions;
} D2D1_LAYER_PARAMETERS;

typedef struct D2D1_RENDER_TARGET_PROPERTIES
{
    D2D1_RENDER_TARGET_TYPE type;
    D2D1_PIXEL_FORMAT pixelFormat;
    float dpiX;
    float dpiY;
    D2D1_RENDER_TARGET_USAGE usage;
    D2D1_FEATURE_LEVEL minLevel;
} D2D1_RENDER_TARGET_PROPERTIES;

typedef struct D2D1_STROKE_STYLE_PROPERTIES
{
    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_STYLE_PROPERTIES;

typedef struct D2D1_HWND_RENDER_TARGET_PROPERTIES
{
    HWND hwnd;
    D2D1_SIZE_U pixelSize;
    D2D1_PRESENT_OPTIONS presentOptions;
} D2D1_HWND_RENDER_TARGET_PROPERTIES;

[
    local,
    object,
    uuid(2cd90691-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1Resource : IUnknown
{
    void GetFactory(
        [out] ID2D1Factory **factory
    );
}

[
    local,
    object,
    uuid(2cd9069d-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1StrokeStyle : ID2D1Resource
{
    D2D1_CAP_STYLE GetStartCap();
    D2D1_CAP_STYLE GetEndCap();
    D2D1_CAP_STYLE GetDashCap();
    float GetMiterLimit();
    D2D1_LINE_JOIN GetLineJoin();
    float GetDashOffset();
    D2D1_DASH_STYLE GetDashStyle();
    UINT32 GetDashesCount();
    void GetDashes(
        [out, size_is(count)] float *dashes,
        [in] UINT32 count
    );
}

[
    local,
    object,
    uuid(2cd9069e-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1SimplifiedGeometrySink : IUnknown
{
    void SetFillMode(D2D1_FILL_MODE mode);
    void SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags);
    void BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin);
    void AddLines(const D2D1_POINT_2F *points, UINT32 count);
    void AddBeziers(const D2D1_BEZIER_SEGMENT *beziers, UINT32 count);
    void EndFigure(D2D1_FIGURE_END figureEnd);
    HRESULT Close();
}

[
    local,
    object,
    uuid(2cd906c1-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1TessellationSink : IUnknown
{
    void AddTriangles(
        [in, size_is(count)] const D2D1_TRIANGLE *triangles,
        [in] UINT32 count
    );
    HRESULT Close();
}

[
    local,
    object,
    uuid(2cd906a1-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1Geometry : ID2D1Resource
{
    HRESULT GetBounds(
        [in] const D2D1_MATRIX_3X2_F *transform,
        [out] D2D1_RECT_F *bounds
    );
    HRESULT GetWidenedBounds(
        [in] float stroke_width,
        [in] ID2D1StrokeStyle *stroke_style,
        [in] const D2D1_MATRIX_3X2_F *transform,
        [in] float tolerance,
        [out] D2D1_RECT_F *bounds
    );
    HRESULT StrokeContainsPoint(
        [in] D2D1_POINT_2F point,
        [in] float stroke_width,
        [in] ID2D1StrokeStyle *stroke_style,
        [in] const D2D1_MATRIX_3X2_F *transform,
        [in] float tolerance,
        [out] BOOL *contains
    );
    HRESULT FillContainsPoint(
        [in] D2D1_POINT_2F point,
        [in] const D2D1_MATRIX_3X2_F *transform,
        [in] float tolerance,
        [out] BOOL *contains
    );
    HRESULT CompareWithGeometry(
        [in] ID2D1Geometry *geometry,
        [in] const D2D1_MATRIX_3X2_F *transform,
        [in] float tolerance,
        [out] D2D1_GEOMETRY_RELATION *relation
    );
    HRESULT Simplify(
        [in] D2D1_GEOMETRY_SIMPLIFICATION_OPTION option,
        [in] const D2D1_MATRIX_3X2_F *transform,
        [in] float tolerance,
        [in] ID2D1SimplifiedGeometrySink *sink
    );
    HRESULT Tessellate(
        [in] const D2D1_MATRIX_3X2_F *transform,
        [in] float tolerance,
        [in] ID2D1TessellationSink *sink
    );
    HRESULT CombineWithGeometry(
        [in] ID2D1Geometry *geometry,
        [in] D2D1_COMBINE_MODE combine_mode,
        [in] const D2D1_MATRIX_3X2_F *transform,
        [in] float tolerance,
        [in] ID2D1SimplifiedGeometrySink *sink
    );
    HRESULT Outline(
        [in] const D2D1_MATRIX_3X2_F *transform,
        [in] float tolerance,
        [in] ID2D1SimplifiedGeometrySink *sink
    );
    HRESULT ComputeArea(
        [in] const D2D1_MATRIX_3X2_F *transform,
        [in] float tolerance,
        [out] float *area
    );
    HRESULT ComputeLength(
        [in] const D2D1_MATRIX_3X2_F *transform,
        [in] float tolerance,
        [out] float *length
    );
    HRESULT ComputePointAtLength(
        [in] float length,
        [in] const D2D1_MATRIX_3X2_F *transform,
        [in] float tolerance,
        [out] D2D1_POINT_2F *point,
        [out] D2D1_POINT_2F *tangent
    );
    HRESULT Widen(
        [in] float stroke_width,
        [in] ID2D1StrokeStyle *stroke_style,
        [in] const D2D1_MATRIX_3X2_F *transform,
        [in] float tolerance,
        [in] ID2D1SimplifiedGeometrySink *sink
    );
}

[
    local,
    object,
    uuid(2cd906a2-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1RectangleGeometry : ID2D1Geometry
{
    void GetRect(
        [out] D2D1_RECT_F *rect
    );
}

[
    local,
    object,
    uuid(2cd906a3-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1RoundedRectangleGeometry : ID2D1Geometry
{
    void GetRoundedRect(
        [out] D2D1_ROUNDED_RECT *rect
    );
}

[
    local,
    object,
    uuid(2cd906a4-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1EllipseGeometry : ID2D1Geometry
{
    void GetEllipse(
        [out] D2D1_ELLIPSE *ellipse
    );
}

[
    local,
    object,
    uuid(2cd906a6-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1GeometryGroup : ID2D1Geometry
{
    D2D1_FILL_MODE GetFillMode();
    UINT32 GetSourceGeometryCount();
    void GetSourceGeometries(
        [out, size_is(geometry_count)] ID2D1Geometry **geometry,
        [in] UINT32 geometry_count
    );
}

[
    local,
    object,
    uuid(2cd906bb-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1TransformedGeometry : ID2D1Geometry
{
    void GetSourceGeometry(
        [out] ID2D1Geometry **geometry
    );
    void GetTransform(
        [out] D2D1_MATRIX_3X2_F *transform
    );
}

[
    local,
    object,
    uuid(2cd9069f-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1GeometrySink : ID2D1SimplifiedGeometrySink
{
    void AddLine(
        [in] D2D1_POINT_2F point
    );
    void AddBezier(
        [in] const D2D1_BEZIER_SEGMENT *bezier
    );
    void AddQuadraticBezier(
        [in] const D2D1_QUADRATIC_BEZIER_SEGMENT *bezier
    );
    void AddQuadraticBeziers(
        [in, size_is(bezier_count)] const D2D1_QUADRATIC_BEZIER_SEGMENT *beziers,
        [in] UINT32 bezier_count
    );
    void AddArc(
        [in] const D2D1_ARC_SEGMENT *arc
    );
}

[
    local,
    object,
    uuid(2cd906a5-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1PathGeometry : ID2D1Geometry
{
    HRESULT Open(
        [out] ID2D1GeometrySink **sink
    );
    HRESULT Stream(
        [in] ID2D1GeometrySink *sink
    );
    HRESULT GetSegmentCount(
        [out] UINT32 *count
    );
    HRESULT GetFigureCount(
        [out] UINT32 *count
    );
}

[
    local,
    object,
    uuid(28506e39-ebf6-46a1-bb47-fd85565ab957)
]
interface ID2D1DrawingStateBlock : ID2D1Resource
{
    void GetDescription(
        [out] D2D1_DRAWING_STATE_DESCRIPTION *desc
    );
    void SetDescription(
        [in] const D2D1_DRAWING_STATE_DESCRIPTION *desc
    );
    void SetTextRenderingParams(
        [in] IDWriteRenderingParams *text_rendering_params
    );
    void GetTextRenderingParams(
        [out] IDWriteRenderingParams **text_rendering_params
    );
}

[
    local,
    object,
    uuid(65019f75-8da2-497c-b32c-dfa34e48ede6)
]
interface ID2D1Image : ID2D1Resource
{
}

[
    local,
    object,
    uuid(a2296057-ea42-4099-983b-539fb6505426)
]
interface ID2D1Bitmap : ID2D1Image
{
    D2D1_SIZE_F GetSize();
    D2D1_SIZE_U GetPixelSize();
    D2D1_PIXEL_FORMAT GetPixelFormat();
    void GetDpi(
        [out] float *dpi_x,
        [out] float *dpi_y
    );
    HRESULT CopyFromBitmap(
        [in] const D2D1_POINT_2U *dst_point,
        [in] ID2D1Bitmap *bitmap,
        [in] const D2D1_RECT_U *src_rect
    );
    HRESULT CopyFromRenderTarget(
        [in] const D2D1_POINT_2U *dst_point,
        [in] ID2D1RenderTarget *render_target,
        [in] const D2D1_RECT_U *src_rect
    );
    HRESULT CopyFromMemory(
        [in] const D2D1_RECT_U *dst_rect,
        [in] const void *src_data,
        [in] UINT32 pitch
    );
}

[
    local,
    object,
    uuid(2cd906a8-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1Brush : ID2D1Resource
{
    void SetOpacity(
        [in] float opacity
    );
    void SetTransform(
        [in] const D2D1_MATRIX_3X2_F *transform
    );
    float GetOpacity();
    void GetTransform(
        [out] D2D1_MATRIX_3X2_F *transform
    );
}

[
    local,
    object,
    uuid(2cd906aa-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1BitmapBrush : ID2D1Brush
{
    void SetExtendModeX(
        [in] D2D1_EXTEND_MODE mode
    );
    void SetExtendModeY(
        [in] D2D1_EXTEND_MODE mode
    );
    void SetInterpolationMode(
        [in] D2D1_BITMAP_INTERPOLATION_MODE mode
    );
    void SetBitmap(
        [in] ID2D1Bitmap *bitmap
    );
    D2D1_EXTEND_MODE GetExtendModeX();
    D2D1_EXTEND_MODE GetExtendModeY();
    D2D1_BITMAP_INTERPOLATION_MODE GetInterpolationMode();
    void GetBitmap(
        [out] ID2D1Bitmap **bitmap
    );
}

[
    local,
    object,
    uuid(2cd906a9-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1SolidColorBrush : ID2D1Brush
{
    void SetColor(
        [in] const D2D1_COLOR_F *color
    );
    D2D1_COLOR_F GetColor();
}

[
    local,
    object,
    uuid(2cd906a7-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1GradientStopCollection : ID2D1Resource
{
    UINT32 GetGradientStopCount();
    void GetGradientStops(
        [out] D2D1_GRADIENT_STOP *stops,
        [in] UINT32 stop_count
    );
    D2D1_GAMMA GetColorInterpolationGamma();
    D2D1_EXTEND_MODE GetExtendMode();
}

[
    local,
    object,
    uuid(2cd906ab-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1LinearGradientBrush : ID2D1Brush
{
    void SetStartPoint(
        [in] D2D1_POINT_2F start_point
    );
    void SetEndPoint(
        [in] D2D1_POINT_2F end_point
    );
    D2D1_POINT_2F GetStartPoint();
    D2D1_POINT_2F GetEndPoint();
    void GetGradientStopCollection(
        [out] ID2D1GradientStopCollection **gradient
    );
}

[
    local,
    object,
    uuid(2cd906ac-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1RadialGradientBrush : ID2D1Brush
{
    void SetCenter(
        [in] D2D1_POINT_2F center
    );
    void SetGradientOriginOffset(
        [in] D2D1_POINT_2F offset
    );
    void SetRadiusX(
        [in] float radius
    );
    void SetRadiusY(
        [in] float radius
    );
    D2D1_POINT_2F GetCenter();
    D2D1_POINT_2F GetGradientOriginOffset();
    float GetRadiusX();
    float GetRadiusY();
    void GetGradientStopCollection(
        [out] ID2D1GradientStopCollection **gradient
    );
}

[
    local,
    object,
    uuid(2cd9069b-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1Layer : ID2D1Resource
{
    D2D1_SIZE_F GetSize();
}

[
    local,
    object,
    uuid(2cd906c2-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1Mesh : ID2D1Resource
{
    HRESULT Open(
        [out] ID2D1TessellationSink **sink
    );
}

[
    local,
    object,
    uuid(2cd90694-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1RenderTarget : ID2D1Resource
{
    HRESULT CreateBitmap(
        [in] D2D1_SIZE_U size,
        [in] const void *src_data,
        [in] UINT32 pitch,
        [in] const D2D1_BITMAP_PROPERTIES *desc,
        [out] ID2D1Bitmap **bitmap
    );
    HRESULT CreateBitmapFromWicBitmap(
        [in] IWICBitmapSource *bitmap_source,
        [in] const D2D1_BITMAP_PROPERTIES *desc,
        [out] ID2D1Bitmap **bitmap
    );
    HRESULT CreateSharedBitmap(
        [in] REFIID iid,
        [in, out] void *data,
        [in] const D2D1_BITMAP_PROPERTIES *desc,
        [out] ID2D1Bitmap **bitmap
    );
    HRESULT CreateBitmapBrush(
        [in] ID2D1Bitmap *bitmap,
        [in] const D2D1_BITMAP_BRUSH_PROPERTIES *bitmap_brush_desc,
        [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
        [out] ID2D1BitmapBrush **brush
    );
    HRESULT CreateSolidColorBrush(
        [in] const D2D1_COLOR_F *color,
        [in] const D2D1_BRUSH_PROPERTIES *desc,
        [out] ID2D1SolidColorBrush **brush
    );
    HRESULT CreateGradientStopCollection(
        [in, size_is(stop_count)] const D2D1_GRADIENT_STOP *stops,
        [in] UINT32 stop_count,
        [in] D2D1_GAMMA gamma,
        [in] D2D1_EXTEND_MODE extend_mode,
        [out] ID2D1GradientStopCollection **gradient
    );
    HRESULT CreateLinearGradientBrush(
        [in] const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc,
        [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
        [in] ID2D1GradientStopCollection *gradient,
        [out] ID2D1LinearGradientBrush **brush
    );
    HRESULT CreateRadialGradientBrush(
        [in] const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc,
        [in] const D2D1_BRUSH_PROPERTIES *brush_desc,
        [in] ID2D1GradientStopCollection *gradient,
        [out] ID2D1RadialGradientBrush **brush
    );
    HRESULT CreateCompatibleRenderTarget(
        [in] const D2D1_SIZE_F *size,
        [in] const D2D1_SIZE_U *pixel_size,
        [in] const D2D1_PIXEL_FORMAT *format,
        [in] D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options,
        [out] ID2D1BitmapRenderTarget **render_target
    );
    HRESULT CreateLayer(
        [in] const D2D1_SIZE_F *size,
        [out] ID2D1Layer **layer
    );
    HRESULT CreateMesh(
        [out] ID2D1Mesh **mesh
    );
    void DrawLine(
        [in] D2D1_POINT_2F p0,
        [in] D2D1_POINT_2F p1,
        [in] ID2D1Brush *brush,
        [in] float stroke_width,
        [in] ID2D1StrokeStyle *stroke_style
    );
    void DrawRectangle(
        [in] const D2D1_RECT_F *rect,
        [in] ID2D1Brush *brush,
        [in] float stroke_width,
        [in] ID2D1StrokeStyle *stroke_style
    );
    void FillRectangle(
        [in] const D2D1_RECT_F *rect,
        [in] ID2D1Brush *brush
    );
    void DrawRoundedRectangle(
        [in] const D2D1_ROUNDED_RECT *rect,
        [in] ID2D1Brush *brush,
        [in] float stroke_width,
        [in] ID2D1StrokeStyle *stroke_style
    );
    void FillRoundedRectangle(
        [in] const D2D1_ROUNDED_RECT *rect,
        [in] ID2D1Brush *brush
    );
    void DrawEllipse(
        [in] const D2D1_ELLIPSE *ellipse,
        [in] ID2D1Brush *brush,
        [in] float stroke_width,
        [in] ID2D1StrokeStyle *stroke_style
    );
    void FillEllipse(
        [in] const D2D1_ELLIPSE *ellipse,
        [in] ID2D1Brush *brush
    );
    void DrawGeometry(
        [in] ID2D1Geometry *geometry,
        [in] ID2D1Brush *brush,
        [in] float stroke_width,
        [in] ID2D1StrokeStyle *stroke_style
    );
    void FillGeometry(
        [in] ID2D1Geometry *geometry,
        [in] ID2D1Brush *brush,
        [in] ID2D1Brush *opacity_brush
    );
    void FillMesh(
        [in] ID2D1Mesh *mesh,
        [in] ID2D1Brush *brush
    );
    void FillOpacityMask(
        [in] ID2D1Bitmap *mask,
        [in] ID2D1Brush *brush,
        [in] D2D1_OPACITY_MASK_CONTENT content,
        [in] const D2D1_RECT_F *dst_rect,
        [in] const D2D1_RECT_F *src_rect
    );
    void DrawBitmap(
        [in] ID2D1Bitmap *bitmap,
        [in] const D2D1_RECT_F *dst_rect,
        [in] float opacity,
        [in] D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode,
        [in] const D2D1_RECT_F *src_rect
    );
    void DrawText(
        [in, size_is(string_len)] const WCHAR *string,
        [in] UINT32 string_len,
        [in] IDWriteTextFormat *text_format,
        [in] const D2D1_RECT_F *layout_rect,
        [in] ID2D1Brush *brush,
        [in] D2D1_DRAW_TEXT_OPTIONS options,
        [in] DWRITE_MEASURING_MODE measuring_mode
    );
    void DrawTextLayout(
        [in] D2D1_POINT_2F origin,
        [in] IDWriteTextLayout *layout,
        [in] ID2D1Brush *brush,
        [in] D2D1_DRAW_TEXT_OPTIONS options
    );
    void DrawGlyphRun(
        [in] D2D1_POINT_2F baseline_origin,
        [in] const DWRITE_GLYPH_RUN *glyph_run,
        [in] ID2D1Brush *brush,
        [in] DWRITE_MEASURING_MODE measuring_mode
    );
    void SetTransform(
        [in] const D2D1_MATRIX_3X2_F *transform
    );
    void GetTransform(
        [out] D2D1_MATRIX_3X2_F *transform
    );
    void SetAntialiasMode(
        [in] D2D1_ANTIALIAS_MODE antialias_mode
    );
    D2D1_ANTIALIAS_MODE GetAntialiasMode();
    void SetTextAntialiasMode(
        [in] D2D1_TEXT_ANTIALIAS_MODE antialias_mode
    );
    D2D1_TEXT_ANTIALIAS_MODE GetTextAntialiasMode();
    void SetTextRenderingParams(
        [in] IDWriteRenderingParams *text_rendering_params
    );
    void GetTextRenderingParams(
        [out] IDWriteRenderingParams **text_rendering_params
    );
    void SetTags(
        [in] D2D1_TAG tag1,
        [in] D2D1_TAG tag2
    );
    void GetTags(
        [out] D2D1_TAG *tag1,
        [out] D2D1_TAG *tag2
    );
    void PushLayer(
        [in] const D2D1_LAYER_PARAMETERS *layer_parameters,
        [in] ID2D1Layer *layer
    );
    void PopLayer();
    HRESULT Flush(
        [out] D2D1_TAG *tag1,
        [out] D2D1_TAG *tag2
    );
    void SaveDrawingState(
        [in, out] ID2D1DrawingStateBlock *state_block
    );
    void RestoreDrawingState(
        [in] ID2D1DrawingStateBlock *state_block
    );
    void PushAxisAlignedClip(
        [in] const D2D1_RECT_F *clip_rect,
        [in] D2D1_ANTIALIAS_MODE antialias_mode
    );
    void PopAxisAlignedClip();
    void Clear(
        [in] const D2D1_COLOR_F *color
    );
    void BeginDraw();
    HRESULT EndDraw(
        [out] D2D1_TAG *tag1,
        [out] D2D1_TAG *tag2
    );
    D2D1_PIXEL_FORMAT GetPixelFormat();
    void SetDpi(
        [in] float dpi_x,
        [in] float dpi_y
    );
    void GetDpi(
        [out] float *dpi_x,
        [out] float *dpi_y
    );
    D2D1_SIZE_F GetSize();
    D2D1_SIZE_U GetPixelSize();
    UINT32 GetMaximumBitmapSize();
    BOOL IsSupported(
        [in] const D2D1_RENDER_TARGET_PROPERTIES *desc
    );
}

[
    local,
    object,
    uuid(2cd90695-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1BitmapRenderTarget : ID2D1RenderTarget
{
    HRESULT GetBitmap(
        [out] ID2D1Bitmap **bitmap
    );
}

[
    local,
    object,
    uuid(2cd90698-12e2-11dc-9fed-001143a055f9)
]
interface ID2D1HwndRenderTarget : ID2D1RenderTarget
{
    D2D1_WINDOW_STATE CheckWindowState();
    HRESULT Resize(
        [in] const D2D1_SIZE_U size
    );
    HWND GetHwnd();
}

[
    local,
    object,
    uuid(1c51bc64-de61-46fd-9899-63a5d8f03950)
]
interface ID2D1DCRenderTarget : ID2D1RenderTarget
{
    HRESULT BindDC(
        [in] const HDC dc,
        [in] const RECT rect
    );
}

[
    local,
    object,
    uuid(e0db51c3-6f77-4bae-b3d5-e47509b35838)
]
interface ID2D1GdiInteropRenderTarget : IUnknown
{
    HRESULT GetDC(
        [in] D2D1_DC_INITIALIZE_MODE mode,
        [out] HDC *dc
    );
    HRESULT ReleaseDC(
        [in] const RECT *update
    );
}

[
    local,
    object,
    uuid(06152247-6f50-465a-9245-118bfd3b6007)
]
interface ID2D1Factory : IUnknown
{
    HRESULT ReloadSystemMetrics();
    void GetDesktopDpi(
        [out] float *dpi_x,
        [out] float *dpi_y
    );
    HRESULT CreateRectangleGeometry(
        [in] const D2D1_RECT_F *rect,
        [out] ID2D1RectangleGeometry **geometry
    );
    HRESULT CreateRoundedRectangleGeometry(
        [in] const D2D1_ROUNDED_RECT *rect,
        [out] ID2D1RoundedRectangleGeometry **geometry
    );
    HRESULT CreateEllipseGeometry(
        [in] const D2D1_ELLIPSE *ellipse,
        [out] ID2D1EllipseGeometry **geometry
    );
    HRESULT CreateGeometryGroup(
        [in] D2D1_FILL_MODE fill_mode,
        [in, size_is(geometry_count)] ID2D1Geometry *geometry,
        [in] UINT32 geometry_count,
        [out] ID2D1GeometryGroup **group
    );
    HRESULT CreateTransformedGeometry(
        [in] ID2D1Geometry *src_geometry,
        [in] const D2D1_MATRIX_3X2_F *transform,
        [out] ID2D1TransformedGeometry **transformed_geometry
    );
    HRESULT CreatePathGeometry(
        [out] ID2D1PathGeometry *geometry
    );
    HRESULT CreateStrokeStyle(
        [in] const D2D1_STROKE_STYLE_PROPERTIES *desc,
        [in, size_is(dash_count)] const float *dashes,
        [in] UINT32 dash_count,
        [out] ID2D1StrokeStyle **stroke_style
    );
    HRESULT CreateDrawingStateBlock(
        [in] const D2D1_DRAWING_STATE_DESCRIPTION *desc,
        [in] IDWriteRenderingParams *text_rendering_params,
        [out] ID2D1DrawingStateBlock **state_block
    );
    HRESULT CreateWicBitmapRenderTarget(
        [in] IWICBitmap *target,
        [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
        [out] ID2D1RenderTarget **render_target
    );
    HRESULT CreateHwndRenderTarget(
        [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
        [in] const D2D1_HWND_RENDER_TARGET_PROPERTIES *hwnd_rt_desc,
        [out] ID2D1HwndRenderTarget **render_target
    );
    HRESULT CreateDxgiSurfaceRenderTarget(
        [in] IDXGISurface *surface,
        [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
        [out] ID2D1RenderTarget **render_target
    );
    HRESULT CreateDCRenderTarget(
        [in] const D2D1_RENDER_TARGET_PROPERTIES *desc,
        [out] ID2D1DCRenderTarget **render_target
    );
}

[local] HRESULT __stdcall D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid,
        const D2D1_FACTORY_OPTIONS *factory_options, void **factory);
[local] void __stdcall D2D1MakeRotateMatrix(float angle, D2D1_POINT_2F center, D2D1_MATRIX_3X2_F *matrix);