#![doc = include_str!("README.md")]
#![doc(html_logo_url = "https://slint.dev/logo/slint-logo-square-light.svg")]
mod search_api;
pub use search_api::*;
#[cfg(feature = "internal")]
mod internal_tests;
#[cfg(feature = "internal")]
pub use internal_tests::*;
mod testing_backend;
#[cfg(feature = "internal")]
pub use testing_backend::*;
#[cfg(all(feature = "ffi", not(test)))]
mod ffi;
#[cfg(feature = "system-testing")]
pub mod systest;
pub fn init_no_event_loop() {
i_slint_core::platform::set_platform(Box::new(testing_backend::TestingBackend::new(
testing_backend::TestingBackendOptions { mock_time: true, threading: false },
)))
.expect("platform already initialized");
}
pub fn init_integration_test_with_mock_time() {
i_slint_core::platform::set_platform(Box::new(testing_backend::TestingBackend::new(
testing_backend::TestingBackendOptions { mock_time: true, threading: true },
)))
.expect("platform already initialized");
}
pub fn init_integration_test_with_system_time() {
i_slint_core::platform::set_platform(Box::new(testing_backend::TestingBackend::new(
testing_backend::TestingBackendOptions { mock_time: false, threading: true },
)))
.expect("platform already initialized");
}
#[cfg(not(feature = "internal"))]
pub fn mock_elapsed_time(duration: std::time::Duration) {
i_slint_core::tests::slint_mock_elapsed_time(duration.as_millis() as _);
}
pub use i_slint_core::items::AccessibleRole;