| 1 | // x11-rs: Rust bindings for X11 libraries |
| 2 | // The X11 libraries are available under the MIT license. |
| 3 | // These bindings are public domain. |
| 4 | |
| 5 | use std::os::raw::{c_char, c_double, c_int, c_short, c_uint, c_ulong, c_ushort}; |
| 6 | |
| 7 | use super::xlib::{Atom, Bool, Colormap, Cursor, Display, Pixmap, Region, Visual, XRectangle, XID}; |
| 8 | |
| 9 | // |
| 10 | // functions |
| 11 | // |
| 12 | |
| 13 | x11_link! { Xrender, xrender, ["libXrender.so.1" , "libXrender.so" ], 44, |
| 14 | pub fn XRenderAddGlyphs (_7: *mut Display, _6: c_ulong, _5: *const c_ulong, _4: *const XGlyphInfo, _3: c_int, _2: *const c_char, _1: c_int) -> (), |
| 15 | pub fn XRenderAddTraps (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: *const XTrap, _1: c_int) -> (), |
| 16 | pub fn XRenderChangePicture (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: *const XRenderPictureAttributes) -> (), |
| 17 | pub fn XRenderComposite (_13: *mut Display, _12: c_int, _11: c_ulong, _10: c_ulong, _9: c_ulong, _8: c_int, _7: c_int, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> (), |
| 18 | pub fn XRenderCompositeDoublePoly (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_ulong, _8: *const XRenderPictFormat, _7: c_int, _6: c_int, _5: c_int, _4: c_int, _3: *const XPointDouble, _2: c_int, _1: c_int) -> (), |
| 19 | pub fn XRenderCompositeString16 (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_ulong, _8: *const XRenderPictFormat, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const c_ushort, _1: c_int) -> (), |
| 20 | pub fn XRenderCompositeString32 (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_ulong, _8: *const XRenderPictFormat, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const c_uint, _1: c_int) -> (), |
| 21 | pub fn XRenderCompositeString8 (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_ulong, _8: *const XRenderPictFormat, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (), |
| 22 | pub fn XRenderCompositeText16 (_11: *mut Display, _10: c_int, _9: c_ulong, _8: c_ulong, _7: *const XRenderPictFormat, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const XGlyphElt16, _1: c_int) -> (), |
| 23 | pub fn XRenderCompositeText32 (_11: *mut Display, _10: c_int, _9: c_ulong, _8: c_ulong, _7: *const XRenderPictFormat, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const XGlyphElt32, _1: c_int) -> (), |
| 24 | pub fn XRenderCompositeText8 (_11: *mut Display, _10: c_int, _9: c_ulong, _8: c_ulong, _7: *const XRenderPictFormat, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const XGlyphElt8, _1: c_int) -> (), |
| 25 | pub fn XRenderCompositeTrapezoids (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: *const XRenderPictFormat, _4: c_int, _3: c_int, _2: *const XTrapezoid, _1: c_int) -> (), |
| 26 | pub fn XRenderCompositeTriangles (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: *const XRenderPictFormat, _4: c_int, _3: c_int, _2: *const XTriangle, _1: c_int) -> (), |
| 27 | pub fn XRenderCompositeTriFan (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: *const XRenderPictFormat, _4: c_int, _3: c_int, _2: *const XPointFixed, _1: c_int) -> (), |
| 28 | pub fn XRenderCompositeTriStrip (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: *const XRenderPictFormat, _4: c_int, _3: c_int, _2: *const XPointFixed, _1: c_int) -> (), |
| 29 | pub fn XRenderCreateAnimCursor (_3: *mut Display, _2: c_int, _1: *mut XAnimCursor) -> c_ulong, |
| 30 | pub fn XRenderCreateConicalGradient (_5: *mut Display, _4: *const XConicalGradient, _3: *const c_int, _2: *const XRenderColor, _1: c_int) -> c_ulong, |
| 31 | pub fn XRenderCreateCursor (_4: *mut Display, _3: c_ulong, _2: c_uint, _1: c_uint) -> c_ulong, |
| 32 | pub fn XRenderCreateGlyphSet (_2: *mut Display, _1: *const XRenderPictFormat) -> c_ulong, |
| 33 | pub fn XRenderCreateLinearGradient (_5: *mut Display, _4: *const XLinearGradient, _3: *const c_int, _2: *const XRenderColor, _1: c_int) -> c_ulong, |
| 34 | pub fn XRenderCreatePicture (_5: *mut Display, _4: c_ulong, _3: *const XRenderPictFormat, _2: c_ulong, _1: *const XRenderPictureAttributes) -> c_ulong, |
| 35 | pub fn XRenderCreateRadialGradient (_5: *mut Display, _4: *const XRadialGradient, _3: *const c_int, _2: *const XRenderColor, _1: c_int) -> c_ulong, |
| 36 | pub fn XRenderCreateSolidFill (_2: *mut Display, _1: *const XRenderColor) -> c_ulong, |
| 37 | pub fn XRenderFillRectangle (_8: *mut Display, _7: c_int, _6: c_ulong, _5: *const XRenderColor, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> (), |
| 38 | pub fn XRenderFillRectangles (_6: *mut Display, _5: c_int, _4: c_ulong, _3: *const XRenderColor, _2: *const XRectangle, _1: c_int) -> (), |
| 39 | pub fn XRenderFindFormat (_4: *mut Display, _3: c_ulong, _2: *const XRenderPictFormat, _1: c_int) -> *mut XRenderPictFormat, |
| 40 | pub fn XRenderFindStandardFormat (_2: *mut Display, _1: c_int) -> *mut XRenderPictFormat, |
| 41 | pub fn XRenderFindVisualFormat (_2: *mut Display, _1: *const Visual) -> *mut XRenderPictFormat, |
| 42 | pub fn XRenderFreeGlyphs (_4: *mut Display, _3: c_ulong, _2: *const c_ulong, _1: c_int) -> (), |
| 43 | pub fn XRenderFreeGlyphSet (_2: *mut Display, _1: c_ulong) -> (), |
| 44 | pub fn XRenderFreePicture (_2: *mut Display, _1: c_ulong) -> (), |
| 45 | pub fn XRenderParseColor (_3: *mut Display, _2: *mut c_char, _1: *mut XRenderColor) -> c_int, |
| 46 | pub fn XRenderQueryExtension (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, |
| 47 | pub fn XRenderQueryFilters (_2: *mut Display, _1: c_ulong) -> *mut XFilters, |
| 48 | pub fn XRenderQueryFormats (_1: *mut Display) -> c_int, |
| 49 | pub fn XRenderQueryPictIndexValues (_3: *mut Display, _2: *const XRenderPictFormat, _1: *mut c_int) -> *mut XIndexValue, |
| 50 | pub fn XRenderQuerySubpixelOrder (_2: *mut Display, _1: c_int) -> c_int, |
| 51 | pub fn XRenderQueryVersion (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int, |
| 52 | pub fn XRenderReferenceGlyphSet (_2: *mut Display, _1: c_ulong) -> c_ulong, |
| 53 | pub fn XRenderSetPictureClipRectangles (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: *const XRectangle, _1: c_int) -> (), |
| 54 | pub fn XRenderSetPictureClipRegion (_3: *mut Display, _2: c_ulong, _1: Region) -> (), |
| 55 | pub fn XRenderSetPictureFilter (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: *mut c_int, _1: c_int) -> (), |
| 56 | pub fn XRenderSetPictureTransform (_3: *mut Display, _2: c_ulong, _1: *mut XTransform) -> (), |
| 57 | pub fn XRenderSetSubpixelOrder (_3: *mut Display, _2: c_int, _1: c_int) -> c_int, |
| 58 | variadic: |
| 59 | globals: |
| 60 | } |
| 61 | |
| 62 | // |
| 63 | // types |
| 64 | // |
| 65 | |
| 66 | pub type Glyph = XID; |
| 67 | pub type GlyphSet = XID; |
| 68 | pub type PictFormat = XID; |
| 69 | pub type Picture = XID; |
| 70 | pub type XDouble = c_double; |
| 71 | pub type XFixed = c_int; |
| 72 | |
| 73 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 74 | #[repr (C)] |
| 75 | pub struct _XAnimCursor { |
| 76 | pub cursor: Cursor, |
| 77 | pub delay: c_ulong, |
| 78 | } |
| 79 | pub type XAnimCursor = _XAnimCursor; |
| 80 | |
| 81 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 82 | #[repr (C)] |
| 83 | pub struct _XCircle { |
| 84 | pub x: XFixed, |
| 85 | pub y: XFixed, |
| 86 | pub radius: XFixed, |
| 87 | } |
| 88 | pub type XCircle = _XCircle; |
| 89 | |
| 90 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 91 | #[repr (C)] |
| 92 | pub struct _XConicalGradient { |
| 93 | pub center: XPointFixed, |
| 94 | pub angle: XFixed, |
| 95 | } |
| 96 | pub type XConicalGradient = _XConicalGradient; |
| 97 | |
| 98 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 99 | #[repr (C)] |
| 100 | pub struct _XFilters { |
| 101 | pub nfilter: c_int, |
| 102 | pub filter: *mut *mut c_char, |
| 103 | pub nalias: c_int, |
| 104 | pub alias: *mut c_short, |
| 105 | } |
| 106 | pub type XFilters = _XFilters; |
| 107 | |
| 108 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 109 | #[repr (C)] |
| 110 | pub struct _XGlyphElt8 { |
| 111 | pub glyphset: GlyphSet, |
| 112 | pub chars: *mut c_char, |
| 113 | pub nchars: c_int, |
| 114 | pub xOff: c_int, |
| 115 | pub yOff: c_int, |
| 116 | } |
| 117 | pub type XGlyphElt8 = _XGlyphElt8; |
| 118 | |
| 119 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 120 | #[repr (C)] |
| 121 | pub struct _XGlyphElt16 { |
| 122 | pub glyphset: GlyphSet, |
| 123 | pub chars: *mut c_ushort, |
| 124 | pub nchars: c_int, |
| 125 | pub xOff: c_int, |
| 126 | pub yOff: c_int, |
| 127 | } |
| 128 | pub type XGlyphElt16 = _XGlyphElt16; |
| 129 | |
| 130 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 131 | #[repr (C)] |
| 132 | pub struct _XGlyphElt32 { |
| 133 | pub glyphset: GlyphSet, |
| 134 | pub chars: *mut c_uint, |
| 135 | pub nchars: c_int, |
| 136 | pub xOff: c_int, |
| 137 | pub yOff: c_int, |
| 138 | } |
| 139 | pub type XGlyphElt32 = _XGlyphElt32; |
| 140 | |
| 141 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 142 | #[repr (C)] |
| 143 | pub struct _XGlyphInfo { |
| 144 | pub width: c_ushort, |
| 145 | pub height: c_ushort, |
| 146 | pub x: c_short, |
| 147 | pub y: c_short, |
| 148 | pub xOff: c_short, |
| 149 | pub yOff: c_short, |
| 150 | } |
| 151 | pub type XGlyphInfo = _XGlyphInfo; |
| 152 | |
| 153 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 154 | #[repr (C)] |
| 155 | pub struct _XIndexValue { |
| 156 | pub pixel: c_ulong, |
| 157 | pub red: c_ushort, |
| 158 | pub green: c_ushort, |
| 159 | pub blue: c_ushort, |
| 160 | pub alpha: c_ushort, |
| 161 | } |
| 162 | pub type XIndexValue = _XIndexValue; |
| 163 | |
| 164 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 165 | #[repr (C)] |
| 166 | pub struct _XLinearGradient { |
| 167 | pub p1: XPointFixed, |
| 168 | pub p2: XPointFixed, |
| 169 | } |
| 170 | pub type XLinearGradient = _XLinearGradient; |
| 171 | |
| 172 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 173 | #[repr (C)] |
| 174 | pub struct _XLineFixed { |
| 175 | pub p1: XPointFixed, |
| 176 | pub p2: XPointFixed, |
| 177 | } |
| 178 | pub type XLineFixed = _XLineFixed; |
| 179 | |
| 180 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 181 | #[repr (C)] |
| 182 | pub struct _XPointDouble { |
| 183 | pub x: XDouble, |
| 184 | pub y: XDouble, |
| 185 | } |
| 186 | pub type XPointDouble = _XPointDouble; |
| 187 | |
| 188 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 189 | #[repr (C)] |
| 190 | pub struct _XPointFixed { |
| 191 | pub x: XFixed, |
| 192 | pub y: XFixed, |
| 193 | } |
| 194 | pub type XPointFixed = _XPointFixed; |
| 195 | |
| 196 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 197 | #[repr (C)] |
| 198 | pub struct _XRadialGradient { |
| 199 | pub inner: XCircle, |
| 200 | pub outer: XCircle, |
| 201 | } |
| 202 | pub type XRadialGradient = _XRadialGradient; |
| 203 | |
| 204 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 205 | #[repr (C)] |
| 206 | pub struct XRenderColor { |
| 207 | pub red: c_ushort, |
| 208 | pub green: c_ushort, |
| 209 | pub blue: c_ushort, |
| 210 | pub alpha: c_ushort, |
| 211 | } |
| 212 | |
| 213 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 214 | #[repr (C)] |
| 215 | pub struct XRenderDirectFormat { |
| 216 | pub red: c_short, |
| 217 | pub redMask: c_short, |
| 218 | pub green: c_short, |
| 219 | pub greenMask: c_short, |
| 220 | pub blue: c_short, |
| 221 | pub blueMask: c_short, |
| 222 | pub alpha: c_short, |
| 223 | pub alphaMask: c_short, |
| 224 | } |
| 225 | |
| 226 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 227 | #[repr (C)] |
| 228 | pub struct XRenderPictFormat { |
| 229 | pub id: PictFormat, |
| 230 | pub type_: c_int, |
| 231 | pub depth: c_int, |
| 232 | pub direct: XRenderDirectFormat, |
| 233 | pub colormap: Colormap, |
| 234 | } |
| 235 | |
| 236 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 237 | #[repr (C)] |
| 238 | pub struct _XRenderPictureAttributes { |
| 239 | pub repeat: c_int, |
| 240 | pub alpha_map: Picture, |
| 241 | pub alpha_x_origin: c_int, |
| 242 | pub alpha_y_origin: c_int, |
| 243 | pub clip_x_origin: c_int, |
| 244 | pub clip_y_origin: c_int, |
| 245 | pub clip_mask: Pixmap, |
| 246 | pub graphics_exposures: Bool, |
| 247 | pub subwindow_mode: c_int, |
| 248 | pub poly_edge: c_int, |
| 249 | pub poly_mode: c_int, |
| 250 | pub dither: Atom, |
| 251 | pub component_alpha: Bool, |
| 252 | } |
| 253 | pub type XRenderPictureAttributes = _XRenderPictureAttributes; |
| 254 | |
| 255 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 256 | #[repr (C)] |
| 257 | pub struct _XSpanFix { |
| 258 | pub left: XFixed, |
| 259 | pub right: XFixed, |
| 260 | pub y: XFixed, |
| 261 | } |
| 262 | pub type XSpanFix = _XSpanFix; |
| 263 | |
| 264 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 265 | #[repr (C)] |
| 266 | pub struct _XTrap { |
| 267 | pub top: XSpanFix, |
| 268 | pub bottom: XSpanFix, |
| 269 | } |
| 270 | pub type XTrap = _XTrap; |
| 271 | |
| 272 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 273 | #[repr (C)] |
| 274 | pub struct _XTrapezoid { |
| 275 | pub top: XFixed, |
| 276 | pub bottom: XFixed, |
| 277 | pub left: XLineFixed, |
| 278 | pub right: XLineFixed, |
| 279 | } |
| 280 | pub type XTrapezoid = _XTrapezoid; |
| 281 | |
| 282 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 283 | #[repr (C)] |
| 284 | pub struct _XTriangle { |
| 285 | pub p1: XPointFixed, |
| 286 | pub p2: XPointFixed, |
| 287 | pub p3: XPointFixed, |
| 288 | } |
| 289 | pub type XTriangle = _XTriangle; |
| 290 | |
| 291 | #[derive (Debug, Clone, Copy, PartialEq)] |
| 292 | #[repr (C)] |
| 293 | pub struct _XTransform { |
| 294 | pub matrix: [[XFixed; 3]; 3], |
| 295 | } |
| 296 | pub type XTransform = _XTransform; |
| 297 | |
| 298 | // |
| 299 | // constants |
| 300 | // |
| 301 | |
| 302 | // pict format mask |
| 303 | pub const PictFormatID: c_ulong = 1 << 0; |
| 304 | pub const PictFormatType: c_ulong = 1 << 1; |
| 305 | pub const PictFormatDepth: c_ulong = 1 << 2; |
| 306 | pub const PictFormatRed: c_ulong = 1 << 3; |
| 307 | pub const PictFormatRedMask: c_ulong = 1 << 4; |
| 308 | pub const PictFormatGreen: c_ulong = 1 << 5; |
| 309 | pub const PictFormatGreenMask: c_ulong = 1 << 6; |
| 310 | pub const PictFormatBlue: c_ulong = 1 << 7; |
| 311 | pub const PictFormatBlueMask: c_ulong = 1 << 8; |
| 312 | pub const PictFormatAlpha: c_ulong = 1 << 9; |
| 313 | pub const PictFormatAlphaMask: c_ulong = 1 << 10; |
| 314 | pub const PictFormatColormap: c_ulong = 1 << 11; |
| 315 | |
| 316 | // error codes |
| 317 | pub const BadPictFormat: c_int = 0; |
| 318 | pub const BadPicture: c_int = 1; |
| 319 | pub const BadPictOp: c_int = 2; |
| 320 | pub const BadGlyphSet: c_int = 3; |
| 321 | pub const BadGlyph: c_int = 4; |
| 322 | pub const RenderNumberErrors: c_int = BadGlyph + 1; |
| 323 | |
| 324 | // pict types |
| 325 | pub const PictTypeIndexed: c_int = 0; |
| 326 | pub const PictTypeDirect: c_int = 1; |
| 327 | |
| 328 | // ops |
| 329 | pub const PictOpMinimum: c_int = 0; |
| 330 | pub const PictOpClear: c_int = 0; |
| 331 | pub const PictOpSrc: c_int = 1; |
| 332 | pub const PictOpDst: c_int = 2; |
| 333 | pub const PictOpOver: c_int = 3; |
| 334 | pub const PictOpOverReverse: c_int = 4; |
| 335 | pub const PictOpIn: c_int = 5; |
| 336 | pub const PictOpInReverse: c_int = 6; |
| 337 | pub const PictOpOut: c_int = 7; |
| 338 | pub const PictOpOutReverse: c_int = 8; |
| 339 | pub const PictOpAtop: c_int = 9; |
| 340 | pub const PictOpAtopReverse: c_int = 10; |
| 341 | pub const PictOpXor: c_int = 11; |
| 342 | pub const PictOpAdd: c_int = 12; |
| 343 | pub const PictOpSaturate: c_int = 13; |
| 344 | pub const PictOpMaximum: c_int = 13; |
| 345 | |
| 346 | pub const PictOpDisjointMinimum: c_int = 0x10; |
| 347 | pub const PictOpDisjointClear: c_int = 0x10; |
| 348 | pub const PictOpDisjointSrc: c_int = 0x11; |
| 349 | pub const PictOpDisjointDst: c_int = 0x12; |
| 350 | pub const PictOpDisjointOver: c_int = 0x13; |
| 351 | pub const PictOpDisjointOverReverse: c_int = 0x14; |
| 352 | pub const PictOpDisjointIn: c_int = 0x15; |
| 353 | pub const PictOpDisjointInReverse: c_int = 0x16; |
| 354 | pub const PictOpDisjointOut: c_int = 0x17; |
| 355 | pub const PictOpDisjointOutReverse: c_int = 0x18; |
| 356 | pub const PictOpDisjointAtop: c_int = 0x19; |
| 357 | pub const PictOpDisjointAtopReverse: c_int = 0x1a; |
| 358 | pub const PictOpDisjointXor: c_int = 0x1b; |
| 359 | pub const PictOpDisjointMaximum: c_int = 0x1b; |
| 360 | |
| 361 | pub const PictOpConjointMinimum: c_int = 0x20; |
| 362 | pub const PictOpConjointClear: c_int = 0x20; |
| 363 | pub const PictOpConjointSrc: c_int = 0x21; |
| 364 | pub const PictOpConjointDst: c_int = 0x22; |
| 365 | pub const PictOpConjointOver: c_int = 0x23; |
| 366 | pub const PictOpConjointOverReverse: c_int = 0x24; |
| 367 | pub const PictOpConjointIn: c_int = 0x25; |
| 368 | pub const PictOpConjointInReverse: c_int = 0x26; |
| 369 | pub const PictOpConjointOut: c_int = 0x27; |
| 370 | pub const PictOpConjointOutReverse: c_int = 0x28; |
| 371 | pub const PictOpConjointAtop: c_int = 0x29; |
| 372 | pub const PictOpConjointAtopReverse: c_int = 0x2a; |
| 373 | pub const PictOpConjointXor: c_int = 0x2b; |
| 374 | pub const PictOpConjointMaximum: c_int = 0x2b; |
| 375 | |
| 376 | pub const PictOpBlendMinimum: c_int = 0x30; |
| 377 | pub const PictOpMultiply: c_int = 0x30; |
| 378 | pub const PictOpScreen: c_int = 0x31; |
| 379 | pub const PictOpOverlay: c_int = 0x32; |
| 380 | pub const PictOpDarken: c_int = 0x33; |
| 381 | pub const PictOpLighten: c_int = 0x34; |
| 382 | pub const PictOpColorDodge: c_int = 0x35; |
| 383 | pub const PictOpColorBurn: c_int = 0x36; |
| 384 | pub const PictOpHardLight: c_int = 0x37; |
| 385 | pub const PictOpSoftLight: c_int = 0x38; |
| 386 | pub const PictOpDifference: c_int = 0x39; |
| 387 | pub const PictOpExclusion: c_int = 0x3a; |
| 388 | pub const PictOpHSLHue: c_int = 0x3b; |
| 389 | pub const PictOpHSLSaturation: c_int = 0x3c; |
| 390 | pub const PictOpHSLColor: c_int = 0x3d; |
| 391 | pub const PictOpHSLLuminosity: c_int = 0x3e; |
| 392 | pub const PictOpBlendMaximum: c_int = 0x3e; |
| 393 | |
| 394 | pub const PictStandardARGB32: c_int = 0; |
| 395 | pub const PictStandardRGB24: c_int = 0; |
| 396 | pub const PictStandardA8: c_int = 2; |
| 397 | pub const PictStandardA4: c_int = 3; |
| 398 | pub const PictStandardA1: c_int = 4; |
| 399 | |
| 400 | // poly edge types |
| 401 | pub const PolyEdgeSharp: c_int = 0; |
| 402 | pub const PolyEdgeSmooth: c_int = 1; |
| 403 | |
| 404 | // poly modes |
| 405 | pub const PolyModePrecise: c_int = 0; |
| 406 | pub const PolyModeImprecise: c_int = 1; |
| 407 | |
| 408 | // picture attributes mask |
| 409 | pub const CPRepeat: c_int = 1 << 0; |
| 410 | pub const CPAlphaMap: c_int = 1 << 1; |
| 411 | pub const CPAlphaXOrigin: c_int = 1 << 2; |
| 412 | pub const CPAlphaYOrigin: c_int = 1 << 3; |
| 413 | pub const CPClipXOrigin: c_int = 1 << 4; |
| 414 | pub const CPClipYOrigin: c_int = 1 << 5; |
| 415 | pub const CPClipMask: c_int = 1 << 6; |
| 416 | pub const CPGraphicsExposure: c_int = 1 << 7; |
| 417 | pub const CPSubwindowMode: c_int = 1 << 8; |
| 418 | pub const CPPolyEdge: c_int = 1 << 9; |
| 419 | pub const CPPolyMode: c_int = 1 << 10; |
| 420 | pub const CPDither: c_int = 1 << 11; |
| 421 | pub const CPComponentAlpha: c_int = 1 << 12; |
| 422 | pub const CPLastBit: c_int = 12; |
| 423 | |
| 424 | // filter methods |
| 425 | pub const FilterNearest: &str = "nearest" ; |
| 426 | pub const FilterBilinear: &str = "bilinear" ; |
| 427 | pub const FilterConvolution: &str = "convolution" ; |
| 428 | pub const FilterFast: &str = "fast" ; |
| 429 | pub const FilterGood: &str = "good" ; |
| 430 | pub const FilterBest: &str = "best" ; |
| 431 | |
| 432 | // subpixel orders |
| 433 | pub const SubPixelUnknown: c_int = 0; |
| 434 | pub const SubPixelHorizontalRGB: c_int = 1; |
| 435 | pub const SubPixelHorizontalBGR: c_int = 2; |
| 436 | pub const SubPixelVerticalRGB: c_int = 3; |
| 437 | pub const SubPixelVerticalBGR: c_int = 4; |
| 438 | pub const SubPixelNone: c_int = 5; |
| 439 | |
| 440 | // repeat attributes |
| 441 | pub const RepeatNone: c_int = 0; |
| 442 | pub const RepeatNormal: c_int = 1; |
| 443 | pub const RepeatPad: c_int = 2; |
| 444 | pub const RepeatReflect: c_int = 3; |
| 445 | |