azul_core::window

Struct WindowInternal

Source
pub struct WindowInternal {
    pub document_id: DocumentId,
    pub pipeline_id: PipelineId,
    pub epoch: Epoch,
    pub cached_display_list: CachedDisplayList,
    pub layout_result: SolvedLayoutCache,
    pub gl_texture_cache: GlTextureCache,
    pub scrolled_nodes: BTreeMap<DomId, ScrolledNodes>,
    pub scroll_states: ScrollStates,
}

Fields§

§document_id: DocumentId

A “document” in WebRender usually corresponds to one tab (i.e. in Azuls case, the whole window).

§pipeline_id: PipelineId

One “document” (tab) can have multiple “pipelines” (important for hit-testing).

A document can have multiple pipelines, for example in Firefox the tab / navigation bar, the actual browser window and the inspector are seperate pipelines, but contained in one document. In Azul, one pipeline = one document (this could be improved later on).

§epoch: Epoch

The “epoch” is a frame counter, to remove outdated images, fonts and OpenGL textures when they’re not in use anymore.

§cached_display_list: CachedDisplayList

Current display list active in this window (useful for debugging)

§layout_result: SolvedLayoutCache

Currently active, layouted rectangles

§gl_texture_cache: GlTextureCache

Currently GL textures inside the active CachedDisplayList

§scrolled_nodes: BTreeMap<DomId, ScrolledNodes>

Current scroll states of nodes (x and y position of where they are scrolled)

§scroll_states: ScrollStates

States of scrolling animations, updated every frame

Implementations§

Source§

impl WindowInternal

Source

pub fn get_current_scroll_states( &self, ui_states: &BTreeMap<DomId, UiState>, ) -> BTreeMap<DomId, BTreeMap<NodeId, ScrollPosition>>

Returns a copy of the current scroll states + scroll positions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.