Web Async Rework (#3082)
This commit is contained in:
parent
ef34692148
commit
48f6582eb4
12 changed files with 653 additions and 421 deletions
|
|
@ -1,6 +1,5 @@
|
|||
use std::cell::Cell;
|
||||
use std::rc::{Rc, Weak};
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use smol_str::SmolStr;
|
||||
|
|
@ -29,7 +28,7 @@ use super::{event, ButtonsState, ResizeScaleHandle};
|
|||
pub struct Canvas {
|
||||
common: Common,
|
||||
id: WindowId,
|
||||
pub has_focus: Arc<AtomicBool>,
|
||||
pub has_focus: Rc<Cell<bool>>,
|
||||
pub is_intersecting: Option<bool>,
|
||||
on_touch_start: Option<EventListenerHandle<dyn FnMut(Event)>>,
|
||||
on_focus: Option<EventListenerHandle<dyn FnMut(FocusEvent)>>,
|
||||
|
|
@ -139,7 +138,7 @@ impl Canvas {
|
|||
Ok(Canvas {
|
||||
common,
|
||||
id,
|
||||
has_focus: Arc::new(AtomicBool::new(false)),
|
||||
has_focus: Rc::new(Cell::new(false)),
|
||||
is_intersecting: None,
|
||||
on_touch_start: None,
|
||||
on_blur: None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue