Debian Codegraph @

third_party/rust/core-graphics/src/base.rs

raw
1 // Copyright 2013 The Servo Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
3 //
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
9
10 // this file defines CGFloat, as well as stubbed data types.
11
12 #![allow(non_camel_case_types)]
13 #![allow(non_upper_case_globals)]
14
15 pub use core_graphics_types::base::*;
16
17 pub const kCGImageAlphaNone: u32 = 0;
18 pub const kCGImageAlphaPremultipliedLast: u32 = 1;
19 pub const kCGImageAlphaPremultipliedFirst: u32 = 2;
20 pub const kCGImageAlphaLast: u32 = 3;
21 pub const kCGImageAlphaFirst: u32 = 4;
22 pub const kCGImageAlphaNoneSkipLast: u32 = 5;
23 pub const kCGImageAlphaNoneSkipFirst: u32 = 6;
24
25 pub const kCGBitmapByteOrderDefault: u32 = 0 << 12;
26 pub const kCGBitmapByteOrder16Little: u32 = 1 << 12;
27 pub const kCGBitmapByteOrder32Little: u32 = 2 << 12;
28 pub const kCGBitmapByteOrder16Big: u32 = 3 << 12;
29 pub const kCGBitmapByteOrder32Big: u32 = 4 << 12;
30
31 pub const kCGRenderingIntentDefault: u32 = 0;
32 pub const kCGRenderingIntentAbsoluteColorimetric: u32 = 1;
33 pub const kCGRenderingIntentRelativeColorimetric: u32 = 2;
34 pub const kCGRenderingIntentPerceptual: u32 = 3;
35 pub const kCGRenderingIntentSaturation: u32 = 4;
36
37 #[cfg(target_endian = "big")]
38 pub const kCGBitmapByteOrder16Host: u32 = kCGBitmapByteOrder16Big;
39 #[cfg(target_endian = "big")]
40 pub const kCGBitmapByteOrder32Host: u32 = kCGBitmapByteOrder32Big;
41
42 #[cfg(target_endian = "little")]
43 pub const kCGBitmapByteOrder16Host: u32 = kCGBitmapByteOrder16Little;
44 #[cfg(target_endian = "little")]
45 pub const kCGBitmapByteOrder32Host: u32 = kCGBitmapByteOrder32Little;