pub struct WindowState {Show 33 fields
pub painted_root: u32,
pub focused_node: u32,
pub pending_blur: u32,
pub focus_subs: HashMap<u32, Subscription>,
pub focus_lost: Option<Subscription>,
pub bounds: HashMap<u32, Rect, BuildHasherDefault<IdHasher>>,
pub prev_bounds: HashMap<u32, Rect, BuildHasherDefault<IdHasher>>,
pub transformed: HashMap<u32, Rect, BuildHasherDefault<IdHasher>>,
pub prev_transformed: HashMap<u32, Rect, BuildHasherDefault<IdHasher>>,
pub pending_mouse_move: Option<PendingMouseMove>,
pub mouse_movement: Point<Pixels>,
pub pointer_capture: Option<u32>,
pub down_claimed: bool,
pub press_focus: PressFocus,
pub up_waves: Vec<UpWave>,
pub press: Option<Press>,
pub hit: Option<u32>,
pub down_hit: Option<u32>,
pub hover: Hover,
pub active: Option<u32>,
pub keyboard_input: bool,
pub activation: Option<Subscription>,
pub key_prevented: bool,
pub key_event_claimed: u64,
pub key_click: Option<KeyClick>,
pub space_armed: Option<u32>,
pub any_drag_region: bool,
pub control_hitboxes: Vec<(u32, WindowControlArea)>,
pub os_chrome: bool,
pub full_res_images: bool,
pub env: Option<Env>,
pub pending_drops: Vec<Arc<RenderImage>>,
pub pending_uploads: Vec<PendingUpload>,
}Fields§
§painted_root: u32The node this window paints as its root: 0 for the primary window, the popped-out node for a pop-out.
focused_node: u32§pending_blur: u32Queued by gc_node_state (which has no Window), applied by the next frame tick that does.
focus_subs: HashMap<u32, Subscription>§focus_lost: Option<Subscription>Registered per window (cx.on_focus_lost), so a pop-out needs its own or focus leaving it is invisible.
bounds: HashMap<u32, Rect, BuildHasherDefault<IdHasher>>§prev_bounds: HashMap<u32, Rect, BuildHasherDefault<IdHasher>>The previous frame’s Self::bounds: the element tree for frame N is built before N’s
prepaint, so a builder can only read last frame’s (<lottie>, <video> size relatively).
transformed: HashMap<u32, Rect, BuildHasherDefault<IdHasher>>§prev_transformed: HashMap<u32, Rect, BuildHasherDefault<IdHasher>>§pending_mouse_move: Option<PendingMouseMove>§mouse_movement: Point<Pixels>The moves since the last delivered mousemove: its movementX/movementY.
pointer_capture: Option<u32>§down_claimed: boolHas a node already taken THIS mouse-down? gpui runs on_any_mouse_down on every listening box
under the pointer; the browser has one target, so without the claim an outer listener ran twice.
press_focus: PressFocus§up_waves: Vec<UpWave>Mouse-up waves not yet delivered (render::UpWave): listeners only claim, one deferred flush
delivers in DOM order.
press: Option<Press>The press in progress (render::Press), kept outside gpui element state so cached/direct
render switches cannot lose it.
hit: Option<u32>§down_hit: Option<u32>§hover: Hover§active: Option<u32>§keyboard_input: bool§activation: Option<Subscription>§key_prevented: bool§key_event_claimed: u64§key_click: Option<KeyClick>§space_armed: Option<u32>§any_drag_region: bool§control_hitboxes: Vec<(u32, WindowControlArea)>§os_chrome: bool§full_res_images: bool§env: Option<Env>§pending_drops: Vec<Arc<RenderImage>>§pending_uploads: Vec<PendingUpload>Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WindowState
impl !Send for WindowState
impl !Sync for WindowState
impl !UnwindSafe for WindowState
impl Forget for WindowState
impl Freeze for WindowState
impl Move for WindowState
impl Unpin for WindowState
impl UnsafeUnpin for WindowState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more