]> git.proxmox.com Git - rustc.git/blame - src/vendor/winapi/src/um/dcommon.rs
New upstream version 1.31.0~beta.4+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
0bf4aa26
XL
8use ctypes::c_void;
9use shared::basetsd::UINT32;
ff7c6d11 10use shared::dxgiformat::DXGI_FORMAT;
0bf4aa26 11use shared::minwindef::FLOAT;
8faf50e0 12use shared::windef::{POINT, RECT};
8bb4bdeb
XL
13ENUM!{enum DWRITE_MEASURING_MODE {
14 DWRITE_MEASURING_MODE_NATURAL = 0,
15 DWRITE_MEASURING_MODE_GDI_CLASSIC = 1,
16 DWRITE_MEASURING_MODE_GDI_NATURAL = 2,
17}}
8faf50e0
XL
18ENUM!{enum DWRITE_GLYPH_IMAGE_FORMATS {
19 DWRITE_GLYPH_IMAGE_FORMATS_NONE = 0x00000000,
20 DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE = 0x00000001,
21 DWRITE_GLYPH_IMAGE_FORMATS_CFF = 0x00000002,
22 DWRITE_GLYPH_IMAGE_FORMATS_COLR = 0x00000004,
23 DWRITE_GLYPH_IMAGE_FORMATS_SVG = 0x00000008,
24 DWRITE_GLYPH_IMAGE_FORMATS_PNG = 0x00000010,
25 DWRITE_GLYPH_IMAGE_FORMATS_JPEG = 0x00000020,
26 DWRITE_GLYPH_IMAGE_FORMATS_TIFF = 0x00000040,
27 DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8 = 0x00000080,
28}}
0bf4aa26
XL
29STRUCT!{struct DWRITE_GLYPH_IMAGE_DATA {
30 imageData: *const c_void,
31 imageDataSize: UINT32,
32 uniqueDataId: UINT32,
33 pixelsPerEm: UINT32,
34 pixelSize: D2D1_SIZE_U,
35 horizontalLeftOrigin: D2D1_POINT_2L,
36 horizontalRightOrigin: D2D1_POINT_2L,
37 verticalTopOrigin: D2D1_POINT_2L,
38 verticalBottomOrigin: D2D1_POINT_2L,
39}}
8bb4bdeb
XL
40ENUM!{enum D2D1_ALPHA_MODE {
41 D2D1_ALPHA_MODE_UNKNOWN = 0,
42 D2D1_ALPHA_MODE_PREMULTIPLIED = 1,
43 D2D1_ALPHA_MODE_STRAIGHT = 2,
44 D2D1_ALPHA_MODE_IGNORE = 3,
45}}
46STRUCT!{struct D2D1_PIXEL_FORMAT {
ff7c6d11 47 format: DXGI_FORMAT,
8bb4bdeb
XL
48 alphaMode: D2D1_ALPHA_MODE,
49}}
8faf50e0
XL
50STRUCT!{struct D2D_POINT_2U {
51 x: UINT32,
52 y: UINT32,
53}}
54STRUCT!{struct D2D_POINT_2F {
55 x: FLOAT,
56 y: FLOAT,
57}}
58pub type D2D_POINT_2L = POINT;
59STRUCT!{struct D2D_VECTOR_2F {
60 x: FLOAT,
61 y: FLOAT,
62}}
63STRUCT!{struct D2D_VECTOR_3F {
64 x: FLOAT,
65 y: FLOAT,
66 z: FLOAT,
67}}
68STRUCT!{struct D2D_VECTOR_4F {
69 x: FLOAT,
70 y: FLOAT,
71 z: FLOAT,
72 w: FLOAT,
73}}
74STRUCT!{struct D2D_RECT_F {
75 left: FLOAT,
76 top: FLOAT,
77 right: FLOAT,
78 bottom: FLOAT,
79}}
80STRUCT!{struct D2D_RECT_U {
81 left: UINT32,
82 top: UINT32,
83 right: UINT32,
84 bottom: UINT32,
85}}
86pub type D2D_RECT_L = RECT;
87STRUCT!{struct D2D_SIZE_F {
88 width: FLOAT,
89 height: FLOAT,
90}}
91STRUCT!{struct D2D_SIZE_U {
92 width: UINT32,
93 height: UINT32,
94}}
95STRUCT!{struct D2D_MATRIX_3X2_F {
96 matrix: [[FLOAT; 2]; 3],
97}}
98STRUCT!{struct D2D_MATRIX_4X3_F {
99 matrix: [[FLOAT; 3]; 4],
100}}
101STRUCT!{struct D2D_MATRIX_4X4_F {
102 matrix: [[FLOAT; 4]; 4],
103}}
104STRUCT!{struct D2D_MATRIX_5X4_F {
105 matrix: [[FLOAT; 4]; 5],
106}}
107pub type D2D1_POINT_2F = D2D_POINT_2F;
108pub type D2D1_POINT_2U = D2D_POINT_2U;
109pub type D2D1_POINT_2L = D2D_POINT_2L;
110pub type D2D1_RECT_F = D2D_RECT_F;
111pub type D2D1_RECT_U = D2D_RECT_U;
112pub type D2D1_RECT_L = D2D_RECT_L;
113pub type D2D1_SIZE_F = D2D_SIZE_F;
114pub type D2D1_SIZE_U = D2D_SIZE_U;
115pub type D2D1_MATRIX_3X2_F = D2D_MATRIX_3X2_F;