1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#![allow(
clippy::too_many_arguments,
clippy::let_and_return,
clippy::from_over_into,
clippy::if_same_then_else,
clippy::float_cmp,
clippy::collapsible_if,
clippy::derivable_impls,
clippy::type_complexity,
clippy::borrowed_box,
clippy::module_inception,
clippy::let_unit_value,
clippy::map_entry,
)]
#![feature(async_closure)]
#![feature(const_type_id)]
#![feature(box_syntax)]
#![feature(default_free_fn)]
#![doc(html_logo_url = "https://dudochkin-victor.github.io/assets/ux-components/logo.svg")]
#![allow(unused_variables)]
pub mod animation;
pub mod elements;
pub mod foundation;
pub mod gestures;
pub mod material;
pub mod painting;
pub mod rendering;
pub mod rx;
pub mod services;
pub mod ui;
pub mod widgets;
pub mod engine {
pub use dx::engine::*;
}
pub mod platform {
pub use dx::platform::*;
}
pub mod winit {
pub use dx::winit::*;
}
pub mod prelude {
pub use dx::prelude::*;
pub use ux_macro::*;
pub use super::Opacity;
pub trait OnDemand<T> {
fn get(&mut self) -> &T;
}
}
pub trait Opacity {
fn opacity(&self, val: u8) -> Self;
}
impl Opacity for foundation::colorspace::Color {
fn opacity(&self, val: u8) -> Self {
use self::foundation::colorspace::RgbColor;
let color = *self;
let RgbColor { red, green, blue } = color.into();
Self::rgba(red, green, blue, val)
}
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}