VectorCraft: An open-source, vector art tool written by scratch in pure Rust
Scope platform-specific imports
Dylan M. Taylorf07afc992b20
diff --git a/apps/vectorcraft/src/app.rs b/apps/vectorcraft/src/app.rsindex a27de0a04..d7432ff96 100644--- a/apps/vectorcraft/src/app.rs+++ b/apps/vectorcraft/src/app.rs@@ -1,4 +1,6 @@use super::prefs::save_prefs;+#[cfg(all(windows, not(target_vendor = "win7")))]+use super::windows_stylus;use super::{App, VectorcraftApp, file_access, window};/// The parts of [`App::raw_input_hook`] that every window needs, for the OS windows of floatingdiff --git a/apps/vectorcraft/src/clipboard.rs b/apps/vectorcraft/src/clipboard.rsindex ef3ad5cbc..0b228f62c 100644--- a/apps/vectorcraft/src/clipboard.rs+++ b/apps/vectorcraft/src/clipboard.rs@@ -164,7 +164,9 @@ mod win {use clipboard_win::{formats, options::NoClear, raw};- use super::*;+ use super::{+ BITMAP, Cursor, Flavour, PNG, SVG, SystemClipboard, TEXT, copied_file, decode_png, dib_image, png_flavour, text_of, windows_formats,+ };/// The device-independent bitmaps, the one that carries alpha first. Each is there whenever the/// other or a `CF_BITMAP` is: the system converts between them.diff --git a/apps/vectorcraft/src/host_services.rs b/apps/vectorcraft/src/host_services.rsindex 0f7ede8f6..054dec69f 100644--- a/apps/vectorcraft/src/host_services.rs+++ b/apps/vectorcraft/src/host_services.rs@@ -1,4 +1,10 @@-use super::{ClipboardProbeFactory, FilePick, PickRequest, Services, clipboard, cursor_theme, fileio, portal_save, printing, tablet};+#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))]+use super::portal_save;+#[cfg(target_os = "linux")]+use super::tablet;+#[cfg(all(windows, not(target_vendor = "win7")))]+use super::windows_stylus;+use super::{ClipboardProbeFactory, FilePick, PickRequest, Services, clipboard, cursor_theme, fileio, printing};/// The window file dialogs belong to.pub(crate) type Parent = Option<std::sync::Arc<winit::window::Window>>;diff --git a/apps/vectorcraft/src/titlebar.rs b/apps/vectorcraft/src/titlebar.rsindex 5cf900f70..6ebac2bea 100644--- a/apps/vectorcraft/src/titlebar.rs+++ b/apps/vectorcraft/src/titlebar.rs@@ -1,4 +1,6 @@-use super::{window, xwayland};+use super::window;+#[cfg(target_os = "linux")]+use super::xwayland;/// The window, Dock, taskbar and app-switcher icon (`assets/app-icon/`, see its README). macOS gets/// the version with Apple's transparent margin; elsewhere the full-bleed tile. The app ID matches