The initial hard rename (255cf7cc) broke because Cargo's [patch] with
`package = libcosmic-yoda` does NOT unify across the transitive graph.
cosmic-files (still upstream) asks for "libcosmic"; patched with a
renamed package it ends up as a separate crate, leading to two copies
of cosmic::Theme/Action with incompatible types.
Soft fork keeps the yoda identity where it counts and stays compatible:
- Cargo name : libcosmic (for patch/unification)
- Version : 1.0.0 (same major as upstream so [patch] semver-accepts it)
- Lib name : cosmic (unchanged)
- Repo : leyoda/libcosmic-yoda on Forgejo (yoda lineage)
- Branch : main (vs upstream master)
Revert parts:
- examples/*/Cargo.toml dep refs back to libcosmic
- i18n/*/libcosmic_yoda.ftl renamed back to libcosmic.ftl
Added:
- Compat stub features: winit = [], x11 = [] — empty so Cargo can satisfy
upstream deps asking for these, but no code is actually gated on them
any more (all removed in Phase 2).
Ungates done to make the Wayland path self-sufficient after winit removal:
- src/lib.rs: pub mod app + pub use Application/ApplicationExt no longer
gated on winit; prelude exports ApplicationExt unconditionally
- src/surface/action.rs: 6 functions had #[cfg(all(wayland, linux, winit))]
triple-gates; simplified to #[cfg(all(wayland, linux))] since winit is
no longer a meaningful gate (wayland is now the only shell)
- 12 standalone #[cfg(feature = "winit")] annotations removed from src/
(their gated code is now always compiled)
cargo check --lib + cargo check in cosmic-yoterm both pass with a single
libcosmic v1.0.0 in the tree.
98 lines
2 KiB
Rust
98 lines
2 KiB
Rust
// Copyright 2022 System76 <info@system76.com>
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
#![allow(clippy::module_name_repetitions)]
|
|
#![cfg_attr(target_os = "redox", feature(lazy_cell))]
|
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
|
|
|
/// Recommended default imports.
|
|
pub mod prelude {
|
|
pub use crate::ApplicationExt;
|
|
pub use crate::ext::*;
|
|
pub use crate::{Also, Apply, Element, Renderer, Task, Theme};
|
|
}
|
|
|
|
pub use apply::{Also, Apply};
|
|
|
|
/// Actions are managed internally by the cosmic runtime.
|
|
pub mod action;
|
|
pub use action::Action;
|
|
|
|
pub mod anim;
|
|
|
|
pub mod app;
|
|
#[doc(inline)]
|
|
pub use app::{Application, ApplicationExt};
|
|
|
|
#[cfg(feature = "applet")]
|
|
pub mod applet;
|
|
|
|
pub mod command;
|
|
|
|
/// State which is managed by the cosmic runtime.
|
|
pub mod core;
|
|
#[doc(inline)]
|
|
pub use core::Core;
|
|
|
|
pub mod config;
|
|
|
|
#[doc(inline)]
|
|
pub use cosmic_config;
|
|
|
|
#[doc(inline)]
|
|
pub use cosmic_theme;
|
|
|
|
#[cfg(feature = "single-instance")]
|
|
pub mod dbus_activation;
|
|
#[cfg(feature = "single-instance")]
|
|
pub use dbus_activation::DbusActivation;
|
|
|
|
#[cfg(feature = "desktop")]
|
|
pub mod desktop;
|
|
|
|
#[cfg(any(feature = "xdg-portal", feature = "rfd"))]
|
|
pub mod dialog;
|
|
|
|
pub mod executor;
|
|
#[cfg(feature = "tokio")]
|
|
pub use executor::single::Executor as SingleThreadExecutor;
|
|
|
|
mod ext;
|
|
|
|
pub mod font;
|
|
|
|
#[doc(inline)]
|
|
pub use iced;
|
|
|
|
pub mod icon_theme;
|
|
pub mod keyboard_nav;
|
|
|
|
mod localize;
|
|
|
|
#[cfg(all(target_env = "gnu", not(target_os = "windows")))]
|
|
pub(crate) mod malloc;
|
|
|
|
#[cfg(all(feature = "process", not(windows)))]
|
|
pub mod process;
|
|
|
|
#[doc(inline)]
|
|
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
|
pub use cctk;
|
|
|
|
pub mod surface;
|
|
|
|
pub use iced::Task;
|
|
pub mod task;
|
|
|
|
pub mod theme;
|
|
|
|
pub mod scroll;
|
|
|
|
#[doc(inline)]
|
|
pub use theme::{Theme, style};
|
|
|
|
pub mod widget;
|
|
type Plain = iced_core::text::paragraph::Plain<<Renderer as iced_core::text::Renderer>::Paragraph>;
|
|
type Paragraph = <Renderer as iced_core::text::Renderer>::Paragraph;
|
|
pub type Renderer = iced::Renderer;
|
|
pub type Element<'a, Message> = iced::Element<'a, Message, crate::Theme, Renderer>;
|