#![allow(dead_code)]
#![allow(non_snake_case)]
#[cfg(any(target_family = "wasm", feature = "native-runtime"))]
#[cfg_attr(target_family = "wasm", link(wasm_import_module = "fui_host"))]
unsafe extern "C" {
#[link_name = "fui_get_accent_color"]
fn __host_fui_get_accent_color() -> u32;
#[link_name = "fui_get_host_capabilities"]
fn __host_fui_get_host_capabilities() -> u32;
#[link_name = "fui_get_host_environment"]
fn __host_fui_get_host_environment() -> u32;
#[link_name = "fui_get_platform_family"]
fn __host_fui_get_platform_family() -> u32;
#[link_name = "fui_is_coarse_pointer"]
fn __host_fui_is_coarse_pointer() -> bool;
#[link_name = "fui_is_dark_mode"]
fn __host_fui_is_dark_mode() -> bool;
#[link_name = "fui_now_ms"]
fn __host_fui_now_ms() -> f64;
}
pub fn fui_get_accent_color() -> u32 {
#[cfg(any(target_family = "wasm", feature = "native-runtime"))]
{
unsafe { __host_fui_get_accent_color() }
}
#[cfg(all(not(target_family = "wasm"), not(feature = "native-runtime")))]
{
unsafe { crate::ffi::fui_get_accent_color() }
}
}
pub fn fui_get_host_capabilities() -> u32 {
#[cfg(any(target_family = "wasm", feature = "native-runtime"))]
{
unsafe { __host_fui_get_host_capabilities() }
}
#[cfg(all(not(target_family = "wasm"), not(feature = "native-runtime")))]
{
unsafe { crate::ffi::fui_get_host_capabilities() }
}
}
pub fn fui_get_host_environment() -> u32 {
#[cfg(any(target_family = "wasm", feature = "native-runtime"))]
{
unsafe { __host_fui_get_host_environment() }
}
#[cfg(all(not(target_family = "wasm"), not(feature = "native-runtime")))]
{
unsafe { crate::ffi::fui_get_host_environment() }
}
}
pub fn fui_get_platform_family() -> u32 {
#[cfg(any(target_family = "wasm", feature = "native-runtime"))]
{
unsafe { __host_fui_get_platform_family() }
}
#[cfg(all(not(target_family = "wasm"), not(feature = "native-runtime")))]
{
unsafe { crate::ffi::fui_get_platform_family() }
}
}
pub fn fui_is_coarse_pointer() -> bool {
#[cfg(any(target_family = "wasm", feature = "native-runtime"))]
{
unsafe { __host_fui_is_coarse_pointer() }
}
#[cfg(all(not(target_family = "wasm"), not(feature = "native-runtime")))]
{
unsafe { crate::ffi::fui_is_coarse_pointer() }
}
}
pub fn fui_is_dark_mode() -> bool {
#[cfg(any(target_family = "wasm", feature = "native-runtime"))]
{
unsafe { __host_fui_is_dark_mode() }
}
#[cfg(all(not(target_family = "wasm"), not(feature = "native-runtime")))]
{
unsafe { crate::ffi::fui_is_dark_mode() }
}
}
pub fn fui_now_ms() -> f64 {
#[cfg(any(target_family = "wasm", feature = "native-runtime"))]
{
unsafe { __host_fui_now_ms() }
}
#[cfg(all(not(target_family = "wasm"), not(feature = "native-runtime")))]
{
crate::ffi::test::host_now_ms()
}
}