]> git.proxmox.com Git - rustc.git/blame - src/vendor/winapi/src/um/dcommon.rs
New upstream version 1.30.0+dfsg1
[rustc.git] / src / vendor / winapi / src / um / dcommon.rs
CommitLineData
ff7c6d11
XL
1// Copyright © 2015-2017 winapi-rs developers
2// Licensed under the Apache License, Version 2.0
3// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
4// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
5// All files in the project carrying such notice may not be copied, modified, or distributed
6// except according to those terms.
8bb4bdeb 7//! Mappings for the contents of dcommon.h
8faf50e0 8use shared::basetsd::{UINT32};
ff7c6d11 9use shared::dxgiformat::DXGI_FORMAT;
8faf50e0
XL
10use shared::minwindef::{FLOAT};
11use shared::windef::{POINT, RECT};
8bb4bdeb
XL
12ENUM!{enum DWRITE_MEASURING_MODE {
13 DWRITE_MEASURING_MODE_NATURAL = 0,
14 DWRITE_MEASURING_MODE_GDI_CLASSIC = 1,
15 DWRITE_MEASURING_MODE_GDI_NATURAL = 2,
16}}
8faf50e0
XL
17ENUM!{enum DWRITE_GLYPH_IMAGE_FORMATS {
18 DWRITE_GLYPH_IMAGE_FORMATS_NONE = 0x00000000,
19 DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE = 0x00000001,
20 DWRITE_GLYPH_IMAGE_FORMATS_CFF = 0x00000002,
21 DWRITE_GLYPH_IMAGE_FORMATS_COLR = 0x00000004,
22 DWRITE_GLYPH_IMAGE_FORMATS_SVG = 0x00000008,
23 DWRITE_GLYPH_IMAGE_FORMATS_PNG = 0x00000010,
24 DWRITE_GLYPH_IMAGE_FORMATS_JPEG = 0x00000020,
25 DWRITE_GLYPH_IMAGE_FORMATS_TIFF = 0x00000040,
26 DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8 = 0x00000080,
27}}
8bb4bdeb
XL
28ENUM!{enum D2D1_ALPHA_MODE {
29 D2D1_ALPHA_MODE_UNKNOWN = 0,
30 D2D1_ALPHA_MODE_PREMULTIPLIED = 1,
31 D2D1_ALPHA_MODE_STRAIGHT = 2,
32 D2D1_ALPHA_MODE_IGNORE = 3,
33}}
34STRUCT!{struct D2D1_PIXEL_FORMAT {
ff7c6d11 35 format: DXGI_FORMAT,
8bb4bdeb
XL
36 alphaMode: D2D1_ALPHA_MODE,
37}}
8faf50e0
XL
38STRUCT!{struct D2D_POINT_2U {
39 x: UINT32,
40 y: UINT32,
41}}
42STRUCT!{struct D2D_POINT_2F {
43 x: FLOAT,
44 y: FLOAT,
45}}
46pub type D2D_POINT_2L = POINT;
47STRUCT!{struct D2D_VECTOR_2F {
48 x: FLOAT,
49 y: FLOAT,
50}}
51STRUCT!{struct D2D_VECTOR_3F {
52 x: FLOAT,
53 y: FLOAT,
54 z: FLOAT,
55}}
56STRUCT!{struct D2D_VECTOR_4F {
57 x: FLOAT,
58 y: FLOAT,
59 z: FLOAT,
60 w: FLOAT,
61}}
62STRUCT!{struct D2D_RECT_F {
63 left: FLOAT,
64 top: FLOAT,
65 right: FLOAT,
66 bottom: FLOAT,
67}}
68STRUCT!{struct D2D_RECT_U {
69 left: UINT32,
70 top: UINT32,
71 right: UINT32,
72 bottom: UINT32,
73}}
74pub type D2D_RECT_L = RECT;
75STRUCT!{struct D2D_SIZE_F {
76 width: FLOAT,
77 height: FLOAT,
78}}
79STRUCT!{struct D2D_SIZE_U {
80 width: UINT32,
81 height: UINT32,
82}}
83STRUCT!{struct D2D_MATRIX_3X2_F {
84 matrix: [[FLOAT; 2]; 3],
85}}
86STRUCT!{struct D2D_MATRIX_4X3_F {
87 matrix: [[FLOAT; 3]; 4],
88}}
89STRUCT!{struct D2D_MATRIX_4X4_F {
90 matrix: [[FLOAT; 4]; 4],
91}}
92STRUCT!{struct D2D_MATRIX_5X4_F {
93 matrix: [[FLOAT; 4]; 5],
94}}
95pub type D2D1_POINT_2F = D2D_POINT_2F;
96pub type D2D1_POINT_2U = D2D_POINT_2U;
97pub type D2D1_POINT_2L = D2D_POINT_2L;
98pub type D2D1_RECT_F = D2D_RECT_F;
99pub type D2D1_RECT_U = D2D_RECT_U;
100pub type D2D1_RECT_L = D2D_RECT_L;
101pub type D2D1_SIZE_F = D2D_SIZE_F;
102pub type D2D1_SIZE_U = D2D_SIZE_U;
103pub type D2D1_MATRIX_3X2_F = D2D_MATRIX_3X2_F;