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
mod types;
pub use types::*;
#[cfg(not(windows))]
macro_rules! sep {
() => {
"/"
};
}
#[cfg(windows)]
macro_rules! sep {
() => {
"\\"
};
}
pub const QT_TYPES_CXX_JSON: &str = include_str!(concat!(
env!("OUT_DIR"),
sep!(),
"cxx-qt-lib",
sep!(),
"qt_types_cxx.json"
));
pub const QT_TYPES_HEADER: &str =
include_str!(concat!("..", sep!(), "include", sep!(), "qt_types.h"));
pub const QT_TYPES_SOURCE: &str = include_str!("qt_types.cpp");
pub trait PropertyChangeHandler<C, P> {
fn handle_property_change(&mut self, cpp: &mut C, property: P);
}
pub trait UpdateRequestHandler<C> {
fn handle_update_request(&mut self, cpp: &mut C);
}
pub trait ToUniquePtr {
type CppType;
fn to_unique_ptr(self) -> cxx::UniquePtr<Self::CppType>
where
Self::CppType: cxx::memory::UniquePtrTarget;
}