diff --git a/crates/gpui3/src/elements/div.rs b/crates/gpui3/src/elements/div.rs index 14f1757c3f00ebf9ed0767d5081914b7e0ae4d36..bef0478e7fabfc780ec522b66ab71072f2bd3d3e 100644 --- a/crates/gpui3/src/elements/div.rs +++ b/crates/gpui3/src/elements/div.rs @@ -2,8 +2,8 @@ use crate::{ AnyElement, BorrowWindow, Bounds, Element, ElementFocus, ElementId, ElementInteraction, FocusDisabled, FocusEnabled, FocusHandle, FocusListeners, Focusable, GlobalElementId, GroupBounds, InteractiveElementState, IntoAnyElement, LayoutId, Overflow, ParentElement, - Pixels, Point, SharedString, StatefulInteractivity, StatefullyInteractive, - StatelessInteraction, StatelesslyInteractive, Style, StyleRefinement, Styled, ViewContext, + Pixels, Point, SharedString, StatefulInteractive, StatefulInteractivity, StatelessInteraction, + StatelessInteractive, Style, StyleRefinement, Styled, ViewContext, }; use parking_lot::Mutex; use refineable::Refineable; @@ -320,7 +320,7 @@ where } } -impl StatelesslyInteractive for Div +impl StatelessInteractive for Div where I: ElementInteraction, F: ElementFocus, @@ -331,7 +331,7 @@ where } } -impl StatefullyInteractive for Div, F> +impl StatefulInteractive for Div, F> where F: ElementFocus, V: 'static + Send + Sync, diff --git a/crates/gpui3/src/elements/img.rs b/crates/gpui3/src/elements/img.rs index d478ca35e6a8511ae607a5cf8bd50eedb76916ba..ff00d40a58b45db041d206f812d547694d29e883 100644 --- a/crates/gpui3/src/elements/img.rs +++ b/crates/gpui3/src/elements/img.rs @@ -1,8 +1,8 @@ use crate::{ div, AnyElement, BorrowWindow, Bounds, Div, Element, ElementFocus, ElementId, ElementInteraction, FocusDisabled, FocusEnabled, FocusListeners, Focusable, - InteractiveElementState, IntoAnyElement, LayoutId, Pixels, SharedString, StatefulInteractivity, - StatefullyInteractive, StatelessInteraction, StatelesslyInteractive, StyleRefinement, Styled, + InteractiveElementState, IntoAnyElement, LayoutId, Pixels, SharedString, StatefulInteractive, + StatefulInteractivity, StatelessInteraction, StatelessInteractive, StyleRefinement, Styled, ViewContext, }; use futures::FutureExt; @@ -151,7 +151,7 @@ where } } -impl StatelesslyInteractive for Img +impl StatelessInteractive for Img where V: 'static + Send + Sync, I: ElementInteraction, @@ -162,7 +162,7 @@ where } } -impl StatefullyInteractive for Img, F> +impl StatefulInteractive for Img, F> where V: 'static + Send + Sync, F: ElementFocus, diff --git a/crates/gpui3/src/elements/svg.rs b/crates/gpui3/src/elements/svg.rs index efd8031577d30fd3cf02417d37b0a8b60ee4bfd4..941ad5a5293ef3c4c76cc24db318e95b08283fde 100644 --- a/crates/gpui3/src/elements/svg.rs +++ b/crates/gpui3/src/elements/svg.rs @@ -1,8 +1,8 @@ use crate::{ div, AnyElement, Bounds, Div, Element, ElementFocus, ElementId, ElementInteraction, FocusDisabled, FocusEnabled, FocusListeners, Focusable, InteractiveElementState, - IntoAnyElement, LayoutId, Pixels, SharedString, StatefulInteractivity, StatefullyInteractive, - StatelessInteraction, StatelesslyInteractive, StyleRefinement, Styled, ViewContext, + IntoAnyElement, LayoutId, Pixels, SharedString, StatefulInteractive, StatefulInteractivity, + StatelessInteraction, StatelessInteractive, StyleRefinement, Styled, ViewContext, }; use util::ResultExt; @@ -124,7 +124,7 @@ where } } -impl StatelesslyInteractive for Svg +impl StatelessInteractive for Svg where V: 'static + Send + Sync, I: ElementInteraction, @@ -135,7 +135,7 @@ where } } -impl StatefullyInteractive for Svg, F> +impl StatefulInteractive for Svg, F> where V: 'static + Send + Sync, F: ElementFocus, diff --git a/crates/gpui3/src/interactive.rs b/crates/gpui3/src/interactive.rs index c917a1aaac963eb3d079ba2f2dfd19dd8b34ae74..6b7f2099f42b5d73c46fb7af66e8071496ae4e97 100644 --- a/crates/gpui3/src/interactive.rs +++ b/crates/gpui3/src/interactive.rs @@ -9,7 +9,7 @@ use std::{ sync::Arc, }; -pub trait StatelesslyInteractive: Element { +pub trait StatelessInteractive: Element { fn stateless_interactivity(&mut self) -> &mut StatelessInteraction; fn on_mouse_down( @@ -239,7 +239,7 @@ pub trait StatelesslyInteractive: Element { } } -pub trait StatefullyInteractive: StatelesslyInteractive { +pub trait StatefulInteractive: StatelessInteractive { fn stateful_interactivity(&mut self) -> &mut StatefulInteractivity; fn active(mut self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self diff --git a/crates/storybook2/src/stories/focus.rs b/crates/storybook2/src/stories/focus.rs index 0690541d254590288347117bf1ab9347611ad59b..48b5dbd54f25ac022eb82ae10e5598d5e7b93e5b 100644 --- a/crates/storybook2/src/stories/focus.rs +++ b/crates/storybook2/src/stories/focus.rs @@ -1,7 +1,7 @@ use crate::themes::rose_pine; use gpui3::{ - div, view, Action, Context, Focusable, KeyBinding, ParentElement, StatelesslyInteractive, - Styled, View, WindowContext, + div, view, Action, Context, Focusable, KeyBinding, ParentElement, StatelessInteractive, Styled, + View, WindowContext, }; use std::any::Any; diff --git a/crates/ui2/src/prelude.rs b/crates/ui2/src/prelude.rs index 23d9e216c1aeaece600762a77f8930050b079c2f..2895055374610acd32bbedfa5b1467e0f100e0ff 100644 --- a/crates/ui2/src/prelude.rs +++ b/crates/ui2/src/prelude.rs @@ -1,6 +1,6 @@ pub use gpui3::{ - div, Element, IntoAnyElement, ParentElement, ScrollState, SharedString, StatefullyInteractive, - StatelesslyInteractive, Styled, ViewContext, WindowContext, + div, Element, IntoAnyElement, ParentElement, ScrollState, SharedString, StatefulInteractive, + StatelessInteractive, Styled, ViewContext, WindowContext, }; use crate::settings::user_settings;