1pub use allegro_color::*;
6
7pub mod allegro_color
8{
9 #![allow(non_camel_case_types)]
10
11 use allegro_sys::*;
12 use allegro_util::c_bool;
13 use libc::*;
14
15 unsafe extern "C" {
16 pub fn al_get_allegro_color_version() -> u32;
17 pub fn al_color_hsv_to_rgb(
18 hue: c_float, saturation: c_float, value: c_float, red: *mut c_float,
19 green: *mut c_float, blue: *mut c_float,
20 ) -> ();
21 pub fn al_color_rgb_to_hsl(
22 red: c_float, green: c_float, blue: c_float, hue: *mut c_float,
23 saturation: *mut c_float, lightness: *mut c_float,
24 ) -> ();
25 pub fn al_color_rgb_to_hsv(
26 red: c_float, green: c_float, blue: c_float, hue: *mut c_float,
27 saturation: *mut c_float, value: *mut c_float,
28 ) -> ();
29 pub fn al_color_hsl_to_rgb(
30 hue: c_float, saturation: c_float, lightness: c_float, red: *mut c_float,
31 green: *mut c_float, blue: *mut c_float,
32 ) -> ();
33 pub fn al_color_name_to_rgb(
34 name: *const c_char, r: *mut c_float, g: *mut c_float, b: *mut c_float,
35 ) -> c_bool;
36 pub fn al_color_rgb_to_name(r: c_float, g: c_float, b: c_float) -> *const c_char;
37 pub fn al_color_cmyk_to_rgb(
38 cyan: c_float, magenta: c_float, yellow: c_float, key: c_float, red: *mut c_float,
39 green: *mut c_float, blue: *mut c_float,
40 ) -> ();
41 pub fn al_color_rgb_to_cmyk(
42 red: c_float, green: c_float, blue: c_float, cyan: *mut c_float, magenta: *mut c_float,
43 yellow: *mut c_float, key: *mut c_float,
44 ) -> ();
45 pub fn al_color_yuv_to_rgb(
46 y: c_float, u: c_float, v: c_float, red: *mut c_float, green: *mut c_float,
47 blue: *mut c_float,
48 ) -> ();
49 pub fn al_color_rgb_to_yuv(
50 red: c_float, green: c_float, blue: c_float, y: *mut c_float, u: *mut c_float,
51 v: *mut c_float,
52 ) -> ();
53 pub fn al_color_rgb_to_html(
54 red: c_float, green: c_float, blue: c_float, string: *mut c_char,
55 ) -> ();
56 pub fn al_color_html_to_rgb(
57 string: *const c_char, red: *mut c_float, green: *mut c_float, blue: *mut c_float,
58 ) -> c_bool;
59
60 pub fn al_color_yuv(y: c_float, u: c_float, v: c_float) -> ALLEGRO_COLOR;
61 pub fn al_color_cmyk(c: c_float, m: c_float, y: c_float, k: c_float) -> ALLEGRO_COLOR;
62 pub fn al_color_hsl(h: c_float, s: c_float, l: c_float) -> ALLEGRO_COLOR;
63 pub fn al_color_hsv(h: c_float, s: c_float, v: c_float) -> ALLEGRO_COLOR;
64 pub fn al_color_name(name: *const c_char) -> ALLEGRO_COLOR;
65 pub fn al_color_html(string: *const c_char) -> ALLEGRO_COLOR;
66 }
67}