slint/internal/backends/linuxkms/lib.rs
Aurindam Jana 0cfeec1a31
Update Slint Community License (#4994)
Updated the version from 1.1 to 1.2 
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00

73 lines
2 KiB
Rust

// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.2 OR LicenseRef-Slint-commercial
#![doc = include_str!("README.md")]
#![doc(html_logo_url = "https://slint.dev/logo/slint-logo-square-light.svg")]
#[cfg(target_os = "linux")]
mod fullscreenwindowadapter;
#[cfg(target_os = "linux")]
use std::os::fd::OwnedFd;
#[cfg(target_os = "linux")]
type DeviceOpener<'a> = dyn Fn(&std::path::Path) -> Result<std::rc::Rc<OwnedFd>, i_slint_core::platform::PlatformError>
+ 'a;
#[cfg(all(target_os = "linux", feature = "drm"))]
mod drmoutput;
#[cfg(target_os = "linux")]
mod display;
#[cfg(target_os = "linux")]
mod renderer {
#[cfg(any(feature = "renderer-skia-opengl", feature = "renderer-skia-vulkan"))]
pub mod skia;
#[cfg(feature = "renderer-femtovg")]
pub mod femtovg;
pub fn try_skia_then_femtovg(
_device_opener: &crate::DeviceOpener,
) -> Result<
Box<dyn crate::fullscreenwindowadapter::FullscreenRenderer>,
i_slint_core::platform::PlatformError,
> {
#[allow(unused_mut, unused_assignments)]
let mut result = Err(format!("No renderer configured").into());
#[cfg(any(feature = "renderer-skia-opengl", feature = "renderer-skia-vulkan"))]
{
result =
skia::SkiaRendererAdapter::new_try_vulkan_then_opengl_then_software(_device_opener);
}
#[cfg(feature = "renderer-femtovg")]
if result.is_err() {
result = femtovg::FemtoVGRendererAdapter::new(_device_opener);
}
result
}
}
#[cfg(target_os = "linux")]
mod calloop_backend;
#[cfg(target_os = "linux")]
pub use calloop_backend::*;
#[cfg(not(target_os = "linux"))]
mod noop_backend;
#[cfg(not(target_os = "linux"))]
pub use noop_backend::*;
#[doc(hidden)]
pub type NativeWidgets = ();
#[doc(hidden)]
pub type NativeGlobals = ();
#[doc(hidden)]
pub const HAS_NATIVE_STYLE: bool = false;
#[doc(hidden)]
pub mod native_widgets {}