#[repr(C)]pub struct LayoutCallbackInfoRefData<'a> {
pub image_cache: &'a ImageCache,
pub gl_context: &'a OptionGlContextPtr,
pub system_fonts: &'a FcFontCache,
pub system_style: Arc<SystemStyle>,
}Expand description
Gives the layout() function access to the RendererResources and the Window
(for querying images and fonts, as well as width / height)
Reference data container for LayoutCallbackInfo (all read-only fields)
This struct consolidates all readonly references that layout callbacks need to query state. By grouping these into a single struct, we reduce the number of parameters to LayoutCallbackInfo::new() from 6 to 2, making the API more maintainable and easier to extend.
This is pure syntax sugar - the struct lives on the stack in the caller and is passed by reference.
Fields§
§image_cache: &'a ImageCacheAllows the layout() function to reference image IDs
gl_context: &'a OptionGlContextPtrOpenGL context so that the layout() function can render textures
system_fonts: &'a FcFontCacheReference to the system font cache
system_style: Arc<SystemStyle>Platform-specific system style (colors, spacing, etc.) Used for CSD rendering and menu windows.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for LayoutCallbackInfoRefData<'a>
impl<'a> RefUnwindSafe for LayoutCallbackInfoRefData<'a>
impl<'a> !Send for LayoutCallbackInfoRefData<'a>
impl<'a> !Sync for LayoutCallbackInfoRefData<'a>
impl<'a> Unpin for LayoutCallbackInfoRefData<'a>
impl<'a> UnwindSafe for LayoutCallbackInfoRefData<'a>
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
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