repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/event.rs
futures/src/event.rs
//! Listen to runtime events. use crate::MaybeSend; use crate::core::event::{self, Event}; use crate::core::window; use crate::subscription::{self, Subscription}; /// Returns a [`Subscription`] to all the ignored runtime events. /// /// This subscription will notify your application of any [`Event`] that was /// not c...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/lib.rs
futures/src/lib.rs
//! Asynchronous tasks for GUI programming, inspired by Elm. //! //! ![The foundations of the Iced ecosystem](https://github.com/iced-rs/iced/blob/0525d76ff94e828b7b21634fa94a747022001c83/docs/graphs/foundations.png?raw=true) #![doc( html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/backend.rs
futures/src/backend.rs
//! The underlying implementations of the `iced_futures` contract! pub mod null; #[cfg(not(target_arch = "wasm32"))] pub mod native; #[cfg(target_arch = "wasm32")] pub mod wasm; pub mod default;
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/subscription.rs
futures/src/subscription.rs
//! Listen to external events in your application. mod tracker; pub use tracker::Tracker; use crate::core::event; use crate::core::theme; use crate::core::window; use crate::futures::Stream; use crate::{BoxStream, MaybeSend}; use std::any::TypeId; use std::hash::Hash; /// A subscription event. #[derive(Debug, Clone...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/runtime.rs
futures/src/runtime.rs
//! Run commands and keep track of subscriptions. use crate::subscription; use crate::{BoxStream, Executor, MaybeSend}; use futures::{Sink, SinkExt, channel::mpsc}; use std::marker::PhantomData; /// A batteries-included runtime of commands and subscriptions. /// /// If you have an [`Executor`], a [`Runtime`] can be l...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/executor.rs
futures/src/executor.rs
//! Choose your preferred executor to power a runtime. use crate::MaybeSend; /// A type that can run futures. pub trait Executor: Sized { /// Creates a new [`Executor`]. fn new() -> Result<Self, futures::io::Error> where Self: Sized; /// Spawns a future in the [`Executor`]. fn spawn(&self,...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/maybe.rs
futures/src/maybe.rs
#[cfg(not(target_arch = "wasm32"))] mod platform { /// An extension trait that enforces `Send` only on native platforms. /// /// Useful for writing cross-platform async code! pub trait MaybeSend: Send {} impl<T> MaybeSend for T where T: Send {} /// An extension trait that enforces `Sync` only ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/keyboard.rs
futures/src/keyboard.rs
//! Listen to keyboard events. use crate::core; use crate::core::keyboard::Event; use crate::subscription::{self, Subscription}; /// Returns a [`Subscription`] that listens to ignored keyboard events. pub fn listen() -> Subscription<Event> { #[derive(Hash)] struct Listen; subscription::filter_map(Listen, ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/subscription/tracker.rs
futures/src/subscription/tracker.rs
use crate::subscription::{Event, Hasher, Recipe}; use crate::{BoxFuture, MaybeSend}; use futures::channel::mpsc; use futures::sink::{Sink, SinkExt}; use rustc_hash::FxHashMap; use std::hash::Hasher as _; /// A registry of subscription streams. /// /// If you have an application that continuously returns a [`Subscrip...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/backend/native.rs
futures/src/backend/native.rs
//! Backends that are only available in native platforms: Windows, macOS, or Linux. #[cfg(feature = "tokio")] pub mod tokio; #[cfg(feature = "smol")] pub mod smol; #[cfg(feature = "thread-pool")] pub mod thread_pool;
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/backend/default.rs
futures/src/backend/default.rs
//! A default, cross-platform backend. //! //! - On native platforms, it will use: //! - `backend::native::tokio` when the `tokio` feature is enabled. //! - `backend::native::smol` when the `smol` feature is enabled. //! - `backend::native::thread_pool` when the `thread-pool` feature is enabled. //! - `backend:...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/backend/null.rs
futures/src/backend/null.rs
//! A backend that does nothing! use crate::MaybeSend; /// An executor that drops all the futures, instead of spawning them. #[derive(Debug)] pub struct Executor; impl crate::Executor for Executor { fn new() -> Result<Self, futures::io::Error> { Ok(Self) } fn spawn(&self, _future: impl Future<Out...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/backend/wasm.rs
futures/src/backend/wasm.rs
//! Backends that are only available on Wasm targets. pub mod wasm_bindgen;
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/backend/native/tokio.rs
futures/src/backend/native/tokio.rs
//! A `tokio` backend. /// A `tokio` executor. pub type Executor = tokio::runtime::Runtime; impl crate::Executor for Executor { fn new() -> Result<Self, futures::io::Error> { tokio::runtime::Runtime::new() } #[allow(clippy::let_underscore_future)] fn spawn(&self, future: impl Future<Output = ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/backend/native/thread_pool.rs
futures/src/backend/native/thread_pool.rs
//! A `ThreadPool` backend. /// A thread pool executor for futures. pub type Executor = futures::executor::ThreadPool; impl crate::Executor for Executor { fn new() -> Result<Self, futures::io::Error> { futures::executor::ThreadPool::new() } fn spawn(&self, future: impl Future<Output = ()> + Send ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/backend/native/smol.rs
futures/src/backend/native/smol.rs
//! A `smol` backend. /// A `smol` executor. #[derive(Debug)] pub struct Executor; impl crate::Executor for Executor { fn new() -> Result<Self, futures::io::Error> { Ok(Self) } fn spawn(&self, future: impl Future<Output = ()> + Send + 'static) { smol::spawn(future).detach(); } fn...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/futures/src/backend/wasm/wasm_bindgen.rs
futures/src/backend/wasm/wasm_bindgen.rs
//! A `wasm-bindgen-futures` backend. /// A `wasm-bindgen-futures` executor. #[derive(Debug)] pub struct Executor; impl crate::Executor for Executor { fn new() -> Result<Self, futures::io::Error> { Ok(Self) } fn spawn(&self, future: impl futures::Future<Output = ()> + 'static) { wasm_bind...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/pixels.rs
core/src/pixels.rs
/// An amount of logical pixels. /// /// Normally used to represent an amount of space, or the size of something. /// /// This type is normally asked as an argument in a generic way /// (e.g. `impl Into<Pixels>`) and, since `Pixels` implements `From` both for /// `f32` and `u16`, you should be able to provide both inte...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/shadow.rs
core/src/shadow.rs
use crate::{Color, Vector}; /// A shadow. #[derive(Debug, Clone, Copy, PartialEq, Default)] pub struct Shadow { /// The color of the shadow. pub color: Color, /// The offset of the shadow. pub offset: Vector, /// The blur radius of the shadow. pub blur_radius: f32, }
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/settings.rs
core/src/settings.rs
//! Configure your application. use crate::{Font, Pixels}; use std::borrow::Cow; /// The settings of an iced program. #[derive(Debug, Clone)] pub struct Settings { /// The identifier of the application. /// /// If provided, this identifier may be used to identify the application or /// communicate wit...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/element.rs
core/src/element.rs
use crate::layout; use crate::mouse; use crate::overlay; use crate::renderer; use crate::widget; use crate::widget::tree::{self, Tree}; use crate::{ Border, Clipboard, Color, Event, Layout, Length, Rectangle, Shell, Size, Vector, Widget, }; use std::borrow::Borrow; /// A generic [`Widget`]. /// /// It is useful t...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/event.rs
core/src/event.rs
//! Handle events of a user interface. use crate::input_method; use crate::keyboard; use crate::mouse; use crate::touch; use crate::window; /// A user interface event. /// /// _**Note:** This type is largely incomplete! If you need to track /// additional events, feel free to [open an issue] and share your use case!_ ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/lib.rs
core/src/lib.rs
//! The core library of [Iced]. //! //! This library holds basic types that can be reused and re-exported in //! different runtime implementations. //! //! ![The foundations of the Iced ecosystem](https://github.com/iced-rs/iced/blob/0525d76ff94e828b7b21634fa94a747022001c83/docs/graphs/foundations.png?raw=true) //! //!...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/svg.rs
core/src/svg.rs
//! Load and draw vector graphics. use crate::{Color, Radians, Rectangle, Size}; use rustc_hash::FxHasher; use std::borrow::Cow; use std::hash::{Hash, Hasher as _}; use std::path::PathBuf; use std::sync::Arc; /// A raster image that can be drawn. #[derive(Debug, Clone, PartialEq)] pub struct Svg<H = Handle> { ///...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/theme.rs
core/src/theme.rs
//! Use the built-in theme and styles. pub mod palette; pub use palette::Palette; use crate::Color; use std::borrow::Cow; use std::fmt; use std::sync::Arc; /// A built-in theme. #[derive(Debug, Clone, PartialEq)] pub enum Theme { /// The built-in light variant. Light, /// The built-in dark variant. ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/widget.rs
core/src/widget.rs
//! Create custom widgets and operate on them. pub mod operation; pub mod text; pub mod tree; mod id; pub use id::Id; pub use operation::Operation; pub use text::Text; pub use tree::Tree; use crate::layout::{self, Layout}; use crate::mouse; use crate::overlay; use crate::renderer; use crate::{Clipboard, Event, Lengt...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/vector.rs
core/src/vector.rs
/// A 2D vector. #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub struct Vector<T = f32> { /// The X component of the [`Vector`] pub x: T, /// The Y component of the [`Vector`] pub y: T, } impl<T> Vector<T> { /// Creates a new [`Vector`] with the given components. pub const fn new(x: ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/content_fit.rs
core/src/content_fit.rs
//! Control the fit of some content (like an image) within a space. use crate::Size; use std::fmt; /// The strategy used to fit the contents of a widget to its bounding box. /// /// Each variant of this enum is a strategy that can be applied for resolving /// differences in aspect ratio and size between the image bei...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/image.rs
core/src/image.rs
//! Load and draw raster graphics. use crate::border; use crate::{Bytes, Radians, Rectangle, Size}; use rustc_hash::FxHasher; use std::hash::{Hash, Hasher}; use std::io; use std::path::{Path, PathBuf}; use std::sync::{Arc, Weak}; /// A raster image that can be drawn. #[derive(Debug, Clone, PartialEq)] pub struct Ima...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/renderer.rs
core/src/renderer.rs
//! Write your own renderer. #[cfg(debug_assertions)] mod null; use crate::image; use crate::{ Background, Border, Color, Font, Pixels, Rectangle, Shadow, Size, Transformation, Vector, }; /// Whether anti-aliasing should be avoided by snapping primitive coordinates to the /// pixel grid. pub const CRISP: bool = c...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/mouse.rs
core/src/mouse.rs
//! Handle mouse events. pub mod click; mod button; mod cursor; mod event; mod interaction; pub use button::Button; pub use click::Click; pub use cursor::Cursor; pub use event::{Event, ScrollDelta}; pub use interaction::Interaction;
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/clipboard.rs
core/src/clipboard.rs
//! Access the clipboard. /// A buffer for short-term storage and transfer within and between /// applications. pub trait Clipboard { /// Reads the current content of the [`Clipboard`] as text. fn read(&self, kind: Kind) -> Option<String>; /// Writes the given text contents to the [`Clipboard`]. fn wr...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/animation.rs
core/src/animation.rs
//! Animate your applications. use crate::time::{Duration, Instant}; pub use lilt::{Easing, FloatRepresentable as Float, Interpolable}; /// The animation of some particular state. /// /// It tracks state changes and allows projecting interpolated values /// through time. #[derive(Debug, Clone)] pub struct Animation<T...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/rectangle.rs
core/src/rectangle.rs
use crate::alignment; use crate::{Padding, Point, Radians, Size, Vector}; /// An axis-aligned rectangle. #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub struct Rectangle<T = f32> { /// X coordinate of the top-left corner. pub x: T, /// Y coordinate of the top-left corner. pub y: T, /// ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/time.rs
core/src/time.rs
//! Keep track of time, both in native and web platforms! pub use web_time::Duration; pub use web_time::Instant; pub use web_time::SystemTime; /// Creates a [`Duration`] representing the given amount of milliseconds. pub fn milliseconds(milliseconds: u64) -> Duration { Duration::from_millis(milliseconds) } /// C...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/alignment.rs
core/src/alignment.rs
//! Align and position widgets. /// Alignment on the axis of a container. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum Alignment { /// Align at the start of the axis. Start, /// Align at the center of the axis. Center, /// Align at the end of the axis. End, } impl From<Horizon...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/shell.rs
core/src/shell.rs
use crate::InputMethod; use crate::event; use crate::window; /// A connection to the state of a shell. /// /// A [`Widget`] can leverage a [`Shell`] to trigger changes in an application, /// like publishing messages or invalidating the current layout. /// /// [`Widget`]: crate::Widget #[derive(Debug)] pub struct Shell...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/input_method.rs
core/src/input_method.rs
//! Listen to input method events. use crate::{Pixels, Rectangle}; use std::ops::Range; /// The input method strategy of a widget. #[derive(Debug, Clone, PartialEq)] pub enum InputMethod<T = String> { /// Input method is disabled. Disabled, /// Input method is enabled. Enabled { /// The area o...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/text.rs
core/src/text.rs
//! Draw and interact with text. pub mod editor; pub mod highlighter; pub mod paragraph; pub use editor::Editor; pub use highlighter::Highlighter; pub use paragraph::Paragraph; use crate::alignment; use crate::{Background, Border, Color, Padding, Pixels, Point, Rectangle, Size}; use std::borrow::Cow; use std::hash::...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/font.rs
core/src/font.rs
//! Load and use fonts. use std::hash::Hash; /// A font. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] pub struct Font { /// The [`Family`] of the [`Font`]. pub family: Family, /// The [`Weight`] of the [`Font`]. pub weight: Weight, /// The [`Stretch`] of the [`Font`]. pub stretch...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/transformation.rs
core/src/transformation.rs
use crate::{Point, Rectangle, Size, Vector}; use glam::{Mat4, Vec3, Vec4}; use std::ops::Mul; /// A 2D transformation matrix. #[derive(Debug, Clone, Copy, PartialEq)] pub struct Transformation(Mat4); impl Transformation { /// A [`Transformation`] that preserves whatever is transformed. pub const IDENTITY: Se...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/angle.rs
core/src/angle.rs
use crate::{Point, Rectangle, Vector}; use std::f32::consts::{FRAC_PI_2, PI}; use std::fmt::Display; use std::ops::{Add, AddAssign, Div, Mul, RangeInclusive, Rem, Sub, SubAssign}; /// Degrees #[derive(Debug, Copy, Clone, PartialEq, PartialOrd)] pub struct Degrees(pub f32); impl Degrees { /// The range of degrees...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/rotation.rs
core/src/rotation.rs
//! Control the rotation of some content (like an image) within a space. use crate::{Degrees, Radians, Size}; /// The strategy used to rotate the content. /// /// This is used to control the behavior of the layout when the content is rotated /// by a certain angle. #[derive(Debug, Clone, Copy, PartialEq)] pub enum Rot...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/layout.rs
core/src/layout.rs
//! Position your widgets properly. mod limits; mod node; pub mod flex; pub use limits::Limits; pub use node::Node; use crate::{Length, Padding, Point, Rectangle, Size, Vector}; /// The bounds of a [`Node`] and its children, using absolute coordinates. #[derive(Debug, Clone, Copy)] pub struct Layout<'a> { posit...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window.rs
core/src/window.rs
//! Build window-based GUI applications. pub mod icon; pub mod screenshot; pub mod settings; mod direction; mod event; mod id; mod level; mod mode; mod position; mod redraw_request; mod user_attention; pub use direction::Direction; pub use event::Event; pub use icon::Icon; pub use id::Id; pub use level::Level; pub us...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/overlay.rs
core/src/overlay.rs
//! Display interactive elements on top of other widgets. mod element; mod group; mod nested; pub use element::Element; pub use group::Group; pub use nested::Nested; use crate::layout; use crate::mouse; use crate::renderer; use crate::widget; use crate::widget::Tree; use crate::{Clipboard, Event, Layout, Rectangle, S...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/keyboard.rs
core/src/keyboard.rs
//! Listen to keyboard events. pub mod key; mod event; mod location; mod modifiers; pub use event::Event; pub use key::Key; pub use location::Location; pub use modifiers::Modifiers;
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/length.rs
core/src/length.rs
use crate::Pixels; /// The strategy used to fill space in a specific dimension. #[derive(Debug, Clone, Copy, PartialEq)] pub enum Length { /// Fill all the remaining space Fill, /// Fill a portion of the remaining space relative to other elements. /// /// Let's say we have two elements: one with `...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/border.rs
core/src/border.rs
//! Draw lines around containers. use crate::{Color, Pixels}; /// A border. #[derive(Debug, Clone, Copy, PartialEq, Default)] pub struct Border { /// The color of the border. pub color: Color, /// The width of the border. pub width: f32, /// The [`Radius`] of the border. pub radius: Radius, }...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/color.rs
core/src/color.rs
/// A color in the `sRGB` color space. /// /// # String Representation /// /// A color can be represented in either of the following valid formats: `#rrggbb`, `#rrggbbaa`, `#rgb`, and `#rgba`. /// Where `rgba` represent hexadecimal digits. Both uppercase and lowercase letters are supported. /// /// If `a` (transparency...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/background.rs
core/src/background.rs
use crate::Color; use crate::gradient::{self, Gradient}; /// The background of some element. #[derive(Debug, Clone, Copy, PartialEq)] pub enum Background { /// A solid color. Color(Color), /// Linearly interpolate between several colors. Gradient(Gradient), // TODO: Add image variant } impl Backgr...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/point.rs
core/src/point.rs
use crate::Vector; use num_traits::{Float, Num}; use std::fmt; /// A 2D point. #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub struct Point<T = f32> { /// The X coordinate. pub x: T, /// The Y coordinate. pub y: T, } impl Point { /// The origin (i.e. a [`Point`] at (0, 0)). pub con...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/padding.rs
core/src/padding.rs
//! Space stuff around the perimeter. use crate::{Pixels, Size}; /// An amount of space to pad for each side of a box /// /// You can leverage the `From` trait to build [`Padding`] conveniently: /// /// ``` /// # use iced_core::Padding; /// # /// let padding = Padding::from(20); // 20px on all sides /// l...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/touch.rs
core/src/touch.rs
//! Build touch events. use crate::Point; /// A touch interaction. #[derive(Debug, Clone, Copy, PartialEq)] #[allow(missing_docs)] pub enum Event { /// A touch interaction was started. FingerPressed { id: Finger, position: Point }, /// An on-going touch interaction was moved. FingerMoved { id: Finger,...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/size.rs
core/src/size.rs
use crate::{Length, Radians, Vector}; /// An amount of space in 2 dimensions. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] pub struct Size<T = f32> { /// The width. pub width: T, /// The height. pub height: T, } impl<T> Size<T> { /// Creates a new [`Size`] with the given width and ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/gradient.rs
core/src/gradient.rs
//! Colors that transition progressively. use crate::{Color, Radians}; use std::cmp::Ordering; #[derive(Debug, Clone, Copy, PartialEq)] /// A fill which transitions colors progressively along a direction, either linearly, radially (TBD), /// or conically (TBD). pub enum Gradient { /// A linear gradient interpolat...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/renderer/null.rs
core/src/renderer/null.rs
use crate::alignment; use crate::image::{self, Image}; use crate::renderer::{self, Renderer}; use crate::svg; use crate::text::{self, Text}; use crate::{Background, Color, Font, Pixels, Point, Rectangle, Size, Transformation}; impl Renderer for () { fn start_layer(&mut self, _bounds: Rectangle) {} fn end_laye...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/overlay/element.rs
core/src/overlay/element.rs
pub use crate::Overlay; use crate::layout; use crate::mouse; use crate::renderer; use crate::widget; use crate::{Clipboard, Event, Layout, Shell, Size}; /// A generic [`Overlay`]. pub struct Element<'a, Message, Theme, Renderer> { overlay: Box<dyn Overlay<Message, Theme, Renderer> + 'a>, } impl<'a, Message, Them...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/overlay/group.rs
core/src/overlay/group.rs
use crate::layout; use crate::mouse; use crate::overlay; use crate::renderer; use crate::widget; use crate::{Clipboard, Event, Layout, Overlay, Shell, Size}; /// An [`Overlay`] container that displays multiple overlay [`overlay::Element`] /// children. pub struct Group<'a, Message, Theme, Renderer> { children: Vec...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/overlay/nested.rs
core/src/overlay/nested.rs
use crate::event; use crate::layout; use crate::mouse; use crate::overlay; use crate::renderer; use crate::widget; use crate::{Clipboard, Event, Layout, Shell, Size}; /// An overlay container that displays nested overlays pub struct Nested<'a, Message, Theme, Renderer> { overlay: overlay::Element<'a, Message, Them...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/icon.rs
core/src/window/icon.rs
//! Change the icon of a window. use crate::Size; use std::mem; /// Builds an [`Icon`] from its RGBA pixels in the `sRGB` color space. pub fn from_rgba(rgba: Vec<u8>, width: u32, height: u32) -> Result<Icon, Error> { const PIXEL_SIZE: usize = mem::size_of::<u8>() * 4; if !rgba.len().is_multiple_of(PIXEL_SIZ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/settings.rs
core/src/window/settings.rs
//! Configure your windows. #[cfg(target_os = "windows")] #[path = "settings/windows.rs"] pub mod platform; #[cfg(target_os = "macos")] #[path = "settings/macos.rs"] mod platform; #[cfg(target_os = "linux")] #[path = "settings/linux.rs"] mod platform; #[cfg(target_arch = "wasm32")] #[path = "settings/wasm.rs"] mod p...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/event.rs
core/src/window/event.rs
use crate::time::Instant; use crate::{Point, Size}; use std::path::PathBuf; /// A window-related event. #[derive(PartialEq, Clone, Debug)] pub enum Event { /// A window was opened. Opened { /// The position of the opened window. This is relative to the top-left corner of the desktop /// the wi...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/id.rs
core/src/window/id.rs
use std::fmt; use std::hash::Hash; use std::sync::atomic::{self, AtomicU64}; /// The id of the window. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Id(u64); static COUNT: AtomicU64 = AtomicU64::new(1); impl...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/user_attention.rs
core/src/window/user_attention.rs
/// The type of user attention to request. /// /// ## Platform-specific /// /// - **X11:** Sets the WM's `XUrgencyHint`. No distinction between [`Critical`] and [`Informational`]. /// /// [`Critical`]: Self::Critical /// [`Informational`]: Self::Informational #[derive(Debug, Clone, Copy)] pub enum UserAttention { /...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/redraw_request.rs
core/src/window/redraw_request.rs
use crate::time::Instant; /// A request to redraw a window. #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub enum RedrawRequest { /// Redraw the next frame. NextFrame, /// Redraw at the given time. At(Instant), /// No redraw is needed. Wait, } impl From<Instant> for RedrawRe...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/level.rs
core/src/window/level.rs
/// A window level groups windows with respect to their z-position. /// /// The relative ordering between windows in different window levels is fixed. /// The z-order of a window within the same window level may change dynamically /// on user interaction. #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum L...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/screenshot.rs
core/src/window/screenshot.rs
//! Take screenshots of a window. use crate::{Bytes, Rectangle, Size}; use std::fmt::{Debug, Formatter}; /// Data of a screenshot, captured with `window::screenshot()`. /// /// The `bytes` of this screenshot will always be ordered as `RGBA` in the `sRGB` color space. #[derive(Clone)] pub struct Screenshot { /// T...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/position.rs
core/src/window/position.rs
use crate::{Point, Size}; /// The position of a window in a given screen. #[derive(Debug, Clone, Copy, Default)] pub enum Position { /// The platform-specific default position for a new window. #[default] Default, /// The window is completely centered on the screen. Centered, /// The window is ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/mode.rs
core/src/window/mode.rs
/// The mode of a window-based application. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Mode { /// The application appears in its own window. Windowed, /// The application takes the whole screen of its current monitor. Fullscreen, /// The application is hidden Hidden, }
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/direction.rs
core/src/window/direction.rs
/// The cardinal directions relative to the center of a window. #[derive(Debug, Clone, Copy)] pub enum Direction { /// Points to the top edge of a window. North, /// Points to the bottom edge of a window. South, /// Points to the right edge of a window. East, /// Points to the left edge o...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/settings/macos.rs
core/src/window/settings/macos.rs
//! Platform specific settings for macOS. /// The platform specific window settings of an application. #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub struct PlatformSpecific { /// Hides the window title. pub title_hidden: bool, /// Makes the titlebar transparent and allows the content to appear ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/settings/linux.rs
core/src/window/settings/linux.rs
//! Platform specific settings for Linux. /// The platform specific window settings of an application. #[derive(Debug, Clone, PartialEq, Eq, Default)] pub struct PlatformSpecific { /// Sets the application id of the window. /// /// As a best practice, it is suggested to select an application id that match ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/settings/windows.rs
core/src/window/settings/windows.rs
//! Platform specific settings for Windows. /// The platform specific window settings of an application. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct PlatformSpecific { /// Drag and drop support pub drag_and_drop: bool, /// Whether show or hide the window icon in the taskbar. pub skip_taskb...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/settings/other.rs
core/src/window/settings/other.rs
/// The platform specific window settings of an application. #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub struct PlatformSpecific;
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/window/settings/wasm.rs
core/src/window/settings/wasm.rs
//! Platform specific settings for WebAssembly. /// The platform specific window settings of an application. #[derive(Debug, Clone, PartialEq, Eq)] pub struct PlatformSpecific { /// The identifier of a DOM element that will be replaced with the /// application. /// /// If set to `None`, the application...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/layout/node.rs
core/src/layout/node.rs
use crate::{Alignment, Padding, Point, Rectangle, Size, Vector}; /// The bounds of an element and its children. #[derive(Debug, Clone, Default)] pub struct Node { bounds: Rectangle, children: Vec<Node>, } impl Node { /// Creates a new [`Node`] with the given [`Size`]. pub const fn new(size: Size) -> S...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/layout/flex.rs
core/src/layout/flex.rs
//! Distribute elements using a flex-based layout. // This code is heavily inspired by the [`druid`] codebase. // // [`druid`]: https://github.com/xi-editor/druid // // Copyright 2018 The xi-editor Authors, Héctor Ramón // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file e...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/layout/limits.rs
core/src/layout/limits.rs
#![allow(clippy::manual_clamp)] use crate::{Length, Size}; /// A set of size constraints for layouting. #[derive(Debug, Clone, Copy, PartialEq)] pub struct Limits { min: Size, max: Size, compression: Size<bool>, } impl Limits { /// No limits pub const NONE: Limits = Limits { min: Size::ZER...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/theme/palette.rs
core/src/theme/palette.rs
//! Define the colors of a theme. use crate::{Color, color}; use std::sync::LazyLock; /// A color palette. #[derive(Debug, Clone, Copy, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Palette { /// The background [`Color`] of the [`Palette`]. pub background:...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/mouse/button.rs
core/src/mouse/button.rs
/// The button of a mouse. #[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)] pub enum Button { /// The left mouse button. Left, /// The right mouse button. Right, /// The middle (wheel) button. Middle, /// The back mouse button. Back, /// The forward mouse button. Forward, ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/mouse/event.rs
core/src/mouse/event.rs
use crate::Point; use super::Button; /// A mouse event. /// /// _**Note:** This type is largely incomplete! If you need to track /// additional events, feel free to [open an issue] and share your use case!_ /// /// [open an issue]: https://github.com/iced-rs/iced/issues #[derive(Debug, Clone, Copy, PartialEq)] pub en...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/mouse/cursor.rs
core/src/mouse/cursor.rs
use crate::{Point, Rectangle, Transformation, Vector}; /// The mouse cursor state. #[derive(Debug, Clone, Copy, PartialEq, Default)] pub enum Cursor { /// The cursor has a defined position. Available(Point), /// The cursor has a defined position, but it's levitating over a layer above. Levitating(Poin...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/mouse/click.rs
core/src/mouse/click.rs
//! Track mouse clicks. use crate::mouse::Button; use crate::time::Instant; use crate::{Point, Transformation}; use std::ops::Mul; /// A mouse click. #[derive(Debug, Clone, Copy)] pub struct Click { kind: Kind, button: Button, position: Point, time: Instant, } /// The kind of mouse click. #[derive(De...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/mouse/interaction.rs
core/src/mouse/interaction.rs
/// The interaction of a mouse cursor. #[derive(Debug, Eq, PartialEq, Clone, Copy, PartialOrd, Ord, Default)] #[allow(missing_docs)] pub enum Interaction { #[default] None, Hidden, Idle, ContextMenu, Help, Pointer, Progress, Wait, Cell, Crosshair, Text, Alias, Cop...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/text/editor.rs
core/src/text/editor.rs
//! Edit text. use crate::text::highlighter::{self, Highlighter}; use crate::text::{LineHeight, Wrapping}; use crate::{Pixels, Point, Rectangle, Size}; use std::borrow::Cow; use std::sync::Arc; /// A component that can be used by widgets to edit multi-line text. pub trait Editor: Sized + Default { /// The font of...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/text/highlighter.rs
core/src/text/highlighter.rs
//! Highlight text. use crate::Color; use std::ops::Range; /// A type capable of highlighting text. /// /// A [`Highlighter`] highlights lines in sequence. When a line changes, /// it must be notified and the lines after the changed one must be fed /// again to the [`Highlighter`]. pub trait Highlighter: 'static { ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/text/paragraph.rs
core/src/text/paragraph.rs
//! Draw paragraphs. use crate::alignment; use crate::text::{Alignment, Difference, Hit, LineHeight, Shaping, Span, Text, Wrapping}; use crate::{Pixels, Point, Rectangle, Size}; /// A text paragraph. pub trait Paragraph: Sized + Default { /// The font of this [`Paragraph`]. type Font: Copy + PartialEq; //...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/keyboard/event.rs
core/src/keyboard/event.rs
use crate::SmolStr; use crate::keyboard::key; use crate::keyboard::{Key, Location, Modifiers}; /// A keyboard event. /// /// _**Note:** This type is largely incomplete! If you need to track /// additional events, feel free to [open an issue] and share your use case!_ /// /// [open an issue]: https://github.com/iced-rs...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/keyboard/key.rs
core/src/keyboard/key.rs
//! Identify keyboard keys. use crate::SmolStr; /// A key on the keyboard. /// /// This is mostly the `Key` type found in [`winit`]. /// /// [`winit`]: https://docs.rs/winit/0.30/winit/keyboard/enum.Key.html #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum Key<C = SmolStr> { /// A key with an...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
true
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/keyboard/modifiers.rs
core/src/keyboard/modifiers.rs
use bitflags::bitflags; bitflags! { /// The current state of the keyboard modifiers. #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Modifiers: u32{ /// The "shift" key. const SHIFT = 0b100; // const LSHIFT = 0b010 << 0; // const RSHIF...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/keyboard/location.rs
core/src/keyboard/location.rs
/// The location of a key on the keyboard. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Location { /// The standard group of keys on the keyboard. Standard, /// The left side of the keyboard. Left, /// The right side of the keyboard. Right, /// The numpad of the keyboard. Numpad...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/widget/id.rs
core/src/widget/id.rs
use std::borrow; use std::sync::atomic::{self, AtomicUsize}; static NEXT_ID: AtomicUsize = AtomicUsize::new(0); /// The identifier of a generic widget. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct Id(Internal); impl Id { /// Creates a new [`Id`] from a static `str`. pub const fn new(id: &'static s...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/widget/tree.rs
core/src/widget/tree.rs
//! Store internal widget state in a state tree to ensure continuity. use crate::Widget; use std::any::{self, Any}; use std::borrow::Borrow; use std::fmt; /// A persistent state widget tree. /// /// A [`Tree`] is normally associated with a specific widget in the widget tree. #[derive(Debug)] pub struct Tree { ///...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/widget/text.rs
core/src/widget/text.rs
//! Text widgets display information through writing. //! //! # Example //! ```no_run //! # mod iced { pub mod widget { pub fn text<T>(t: T) -> iced_core::widget::Text<'static, iced_core::Theme, ()> { unimplemented!() } } //! # pub use iced_core::color; } //! # pub type State = (); //! # pub type Element<'a,...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/widget/operation.rs
core/src/widget/operation.rs
//! Query or update internal widget state. pub mod focusable; pub mod scrollable; pub mod text_input; pub use focusable::Focusable; pub use scrollable::Scrollable; pub use text_input::TextInput; use crate::widget::Id; use crate::{Rectangle, Vector}; use std::any::Any; use std::fmt; use std::marker::PhantomData; use ...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/widget/operation/scrollable.rs
core/src/widget/operation/scrollable.rs
//! Operate on widgets that can be scrolled. use crate::widget::{Id, Operation}; use crate::{Rectangle, Vector}; /// The internal state of a widget that can be scrolled. pub trait Scrollable { /// Snaps the scroll of the widget to the given `percentage` along the horizontal & vertical axis. fn snap_to(&mut sel...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/widget/operation/focusable.rs
core/src/widget/operation/focusable.rs
//! Operate on widgets that can be focused. use crate::Rectangle; use crate::widget::Id; use crate::widget::operation::{self, Operation, Outcome}; /// The internal state of a widget that can be focused. pub trait Focusable { /// Returns whether the widget is focused or not. fn is_focused(&self) -> bool; /...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/core/src/widget/operation/text_input.rs
core/src/widget/operation/text_input.rs
//! Operate on widgets that have text input. use crate::Rectangle; use crate::widget::Id; use crate::widget::operation::Operation; /// The internal state of a widget that has text input. pub trait TextInput { /// Returns the current _visible_ text of the text input /// /// Normally, this is either its valu...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false
iced-rs/iced
https://github.com/iced-rs/iced/blob/15c0e397a81933ca88a9a338caaac2a4689354f9/tester/src/icon.rs
tester/src/icon.rs
#![allow(unused)] use crate::core::Font; use crate::program; use crate::widget::{Text, text}; pub const FONT: &[u8] = include_bytes!("../fonts/iced_tester-icons.ttf"); pub fn cancel<'a, Theme, Renderer>() -> Text<'a, Theme, Renderer> where Theme: text::Catalog + 'a, Renderer: program::Renderer, { icon("\u...
rust
MIT
15c0e397a81933ca88a9a338caaac2a4689354f9
2026-01-04T15:34:40.545819Z
false