Checkpoint
This commit is contained in:
parent
da8919002f
commit
96f2c4a9de
8 changed files with 170 additions and 57 deletions
|
@ -9,11 +9,11 @@ use refineable::Refineable;
|
|||
use smallvec::SmallVec;
|
||||
|
||||
use crate::{
|
||||
current_platform, image_cache::ImageCache, Action, AppMetadata, AssetSource, Context,
|
||||
DispatchPhase, DisplayId, Executor, FocusEvent, FocusHandle, FocusId, KeyBinding, Keymap,
|
||||
LayoutId, MainThread, MainThreadOnly, Platform, SharedString, SubscriberSet, Subscription,
|
||||
SvgRenderer, Task, TextStyle, TextStyleRefinement, TextSystem, View, Window, WindowContext,
|
||||
WindowHandle, WindowId,
|
||||
current_platform, image_cache::ImageCache, Action, AnyBox, AnyView, AppMetadata, AssetSource,
|
||||
Context, DispatchPhase, DisplayId, Executor, FocusEvent, FocusHandle, FocusId, KeyBinding,
|
||||
Keymap, LayoutId, MainThread, MainThreadOnly, Platform, SharedString, SubscriberSet,
|
||||
Subscription, SvgRenderer, Task, TextStyle, TextStyleRefinement, TextSystem, View, Window,
|
||||
WindowContext, WindowHandle, WindowId,
|
||||
};
|
||||
use anyhow::{anyhow, Result};
|
||||
use collections::{HashMap, HashSet, VecDeque};
|
||||
|
@ -91,6 +91,7 @@ impl App {
|
|||
global_observers: SubscriberSet::new(),
|
||||
layout_id_buffer: Default::default(),
|
||||
propagate_event: true,
|
||||
active_drag: None,
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
@ -168,6 +169,7 @@ pub struct AppContext {
|
|||
text_system: Arc<TextSystem>,
|
||||
flushing_effects: bool,
|
||||
pending_updates: usize,
|
||||
pub(crate) active_drag: Option<AnyDrag>,
|
||||
pub(crate) next_frame_callbacks: HashMap<DisplayId, Vec<FrameCallback>>,
|
||||
pub(crate) executor: Executor,
|
||||
pub(crate) svg_renderer: SvgRenderer,
|
||||
|
@ -732,6 +734,12 @@ pub(crate) enum Effect {
|
|||
},
|
||||
}
|
||||
|
||||
pub(crate) struct AnyDrag {
|
||||
pub drag_handle_view: AnyView,
|
||||
pub state: AnyBox,
|
||||
pub state_type: TypeId,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::AppContext;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue