#[repr(C)]pub struct KuiTheme {Show 26 fields
pub size: u32,
pub appearance: u32,
pub disabled_opacity: f32,
pub bg: u32,
pub surface: u32,
pub raised: u32,
pub sunken: u32,
pub border: u32,
pub border_strong: u32,
pub fg: u32,
pub muted: u32,
pub faint: u32,
pub accent: u32,
pub accent_hover: u32,
pub accent_pressed: u32,
pub on_accent: u32,
pub accent_soft: u32,
pub selection: u32,
pub focus_ring: u32,
pub hover: u32,
pub pressed: u32,
pub success: u32,
pub warning: u32,
pub danger: u32,
pub scrollbar: u32,
pub scrollbar_active: u32,
}Expand description
The palette a frame paints with: one 0xRRGGBBAA per role, derived
from what the host reported through kui_env_set_system unless it
pinned something else. Written by kui_theme ([out], so start from
KUI_THEME_INIT) and read whole by kui_theme_set ([in]).
The roles are kui_core::schema::THEME_ROLES field for field, in that
order; a test pins the two together, and an append here bumps
KUI_ABI_VERSION.
Fields§
§size: u32[out] reservation; see KUI_THEME_INIT. Ignored by
kui_theme_set, which reads the struct the host filled.
appearance: u32Which base this came from: KUI_APPEARANCE_UNKNOWN (0, the dark
base without claiming the user chose it) / _LIGHT / _DARK.
disabled_opacity: f32What a disabled control’s opacity is multiplied by.
bg: u32§surface: u32§raised: u32§sunken: u32§border: u32§border_strong: u32§fg: u32§muted: u32§faint: u32§accent: u32§accent_hover: u32§accent_pressed: u32§on_accent: u32§accent_soft: u32§selection: u32§focus_ring: u32§hover: u32§pressed: u32§success: u32§warning: u32§danger: u32§scrollbar: u32§scrollbar_active: u32Trait Implementations§
Auto Trait Implementations§
impl Freeze for KuiTheme
impl RefUnwindSafe for KuiTheme
impl Send for KuiTheme
impl Sync for KuiTheme
impl Unpin for KuiTheme
impl UnsafeUnpin for KuiTheme
impl UnwindSafe for KuiTheme
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.