diff --git a/crates/gpui3/build.rs b/crates/gpui3/build.rs index d0d4a5c74b73fead8cbb56bd083f3b6b10cc04ad..a49123cf86e9f19bec38c12d54a13bf25a855bb9 100644 --- a/crates/gpui3/build.rs +++ b/crates/gpui3/build.rs @@ -47,9 +47,11 @@ fn generate_shader_bindings() -> PathBuf { "Pixels".into(), "PointF".into(), "Hsla".into(), - "ScaledContentMask".into(), + "ContentMask".into(), "Uniforms".into(), "AtlasTile".into(), + "PathRasterizationInputIndex".into(), + "PathVertex_ScaledPixels".into(), "ShadowInputIndex".into(), "Shadow".into(), "QuadInputIndex".into(), @@ -59,6 +61,7 @@ fn generate_shader_bindings() -> PathBuf { "SpriteInputIndex".into(), "MonochromeSprite".into(), "PolychromeSprite".into(), + "PathSprite".into(), ]); config.no_includes = true; config.enumeration.prefix_with_name = true; diff --git a/crates/gpui3/src/element.rs b/crates/gpui3/src/element.rs index abe6ae0218c36763b0a3e1cedbc287054dee4dcd..6a9425fd01d236c653e20c5dbdc02ed879cb2c1a 100644 --- a/crates/gpui3/src/element.rs +++ b/crates/gpui3/src/element.rs @@ -22,10 +22,12 @@ pub trait Element: 'static { ) -> Result<()>; } -pub trait ParentElement { - fn children_mut(&mut self) -> &mut SmallVec<[AnyElement; 2]>; +pub trait ParentElement { + type State; + + fn children_mut(&mut self) -> &mut SmallVec<[AnyElement; 2]>; - fn child(mut self, child: impl IntoAnyElement) -> Self + fn child(mut self, child: impl IntoAnyElement) -> Self where Self: Sized, { @@ -33,7 +35,7 @@ pub trait ParentElement { self } - fn children(mut self, iter: impl IntoIterator>) -> Self + fn children(mut self, iter: impl IntoIterator>) -> Self where Self: Sized, { diff --git a/crates/gpui3/src/elements.rs b/crates/gpui3/src/elements.rs index 5bd95ccebb69bdc6ac536d5bb89d990ae66aafb1..d879153488566220e7164d5137f63110911929ab 100644 --- a/crates/gpui3/src/elements.rs +++ b/crates/gpui3/src/elements.rs @@ -1,10 +1,12 @@ mod div; +mod hoverable; mod img; mod stateless; mod svg; mod text; pub use div::*; +pub use hoverable::*; pub use img::*; pub use stateless::*; pub use svg::*; diff --git a/crates/gpui3/src/elements/div.rs b/crates/gpui3/src/elements/div.rs index 804d01f8258faac63976949db4e72a0c223ae945..e29391b189b7257d9c0b304d1e973453bb039aec 100644 --- a/crates/gpui3/src/elements/div.rs +++ b/crates/gpui3/src/elements/div.rs @@ -1,6 +1,7 @@ use crate::{ - AnyElement, Bounds, Element, LayoutId, Overflow, ParentElement, Pixels, Point, Refineable, - RefinementCascade, Result, Style, StyleHelpers, Styled, ViewContext, + AnyElement, Bounds, Element, Interactive, LayoutId, MouseEventListeners, Overflow, + ParentElement, Pixels, Point, Refineable, RefinementCascade, Result, Style, Styled, + ViewContext, }; use parking_lot::Mutex; use smallvec::SmallVec; @@ -9,7 +10,7 @@ use util::ResultExt; pub struct Div { styles: RefinementCascade