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
/* LICENSE BEGIN
    This file is part of the SixtyFPS Project -- https://sixtyfps.io
    Copyright (c) 2020 Olivier Goffart <olivier.goffart@sixtyfps.io>
    Copyright (c) 2020 Simon Hausmann <simon.hausmann@sixtyfps.io>

    SPDX-License-Identifier: GPL-3.0-only
    This file is also available under commercial licensing terms.
    Please contact info@sixtyfps.io for more information.
LICENSE END */
/*!

# SixtyFPS runtime library

**NOTE:** This library is an internal crate for the SixtyFPS project.
This crate should not be used directly by application using SixtyFPS.
You should use the `sixtyfps` crate instead
*/

#![deny(unsafe_code)]

/// The animation system
pub mod animations;
pub(crate) mod flickable;
pub mod font;
pub mod graphics;
pub mod input;
pub mod item_tree;
pub mod layout;

#[cfg(feature = "rtti")]
pub mod rtti;

pub mod component;
pub mod items;
pub mod model;
pub mod properties;
pub mod sharedarray;
pub mod signals;
pub mod string;

#[doc(inline)]
pub use string::SharedString;

#[doc(inline)]
pub use sharedarray::SharedArray;

#[doc(inline)]
pub use graphics::Resource;

#[doc(inline)]
pub use properties::Property;

#[doc(inline)]
pub use signals::Signal;

#[doc(inline)]
pub use graphics::Color;

#[doc(inline)]
pub use graphics::RgbaColor;

#[doc(inline)]
pub use graphics::PathData;

pub mod slice;

pub mod eventloop;
pub mod item_rendering;
pub mod tests;
pub mod timers;

/// One need to use at least one function in each module in order to get them
/// exported in the final binary.
/// This only use functions from modules which are not otherwise used.
#[doc(hidden)]
#[cold]
pub fn use_modules() -> usize {
    tests::sixtyfps_mock_elapsed_time as usize
        + signals::ffi::sixtyfps_signal_init as usize
        + sharedarray::ffi::sixtyfps_shared_array_empty as usize
        + layout::solve_grid_layout as usize
        + item_tree::ffi::sixtyfps_visit_item_tree as usize
        + graphics::ffi::sixtyfps_new_path_elements as usize
        + properties::ffi::sixtyfps_property_init as usize
        + string::ffi::sixtyfps_shared_string_bytes as usize
        + eventloop::ffi::sixtyfps_component_window_drop as usize
        + component::ffi::sixtyfps_component_init_items as usize
        + timers::ffi::sixtyfps_timer_start as usize
}