#[repr(C)]pub struct AccessibilitySettings {
pub prefers_bold_text: bool,
pub prefers_larger_text: bool,
pub text_scale_factor: f32,
pub prefers_high_contrast: bool,
pub prefers_reduced_motion: bool,
pub prefers_reduced_transparency: bool,
pub screen_reader_active: bool,
pub differentiate_without_color: bool,
}Expand description
Accessibility settings detected from the operating system.
These settings allow apps to adapt their UI for users with accessibility needs. Detection methods:
- macOS: UIAccessibility APIs (isBoldTextEnabled, isReduceMotionEnabled, etc.)
- Windows: SystemParametersInfo (SPI_GETHIGHCONTRAST, SPI_GETCLIENTAREAANIMATION)
- Linux: gsettings (org.gnome.desktop.interface, org.gnome.desktop.a11y)
Fields§
§prefers_bold_text: boolUser prefers bold text for better readability macOS: UIAccessibility.isBoldTextEnabled Windows: N/A (font scaling) Linux: org.gnome.desktop.interface text-scaling-factor
prefers_larger_text: boolUser prefers larger text macOS: preferredContentSizeCategory Windows: SystemParametersInfo text scale factor Linux: org.gnome.desktop.interface text-scaling-factor
text_scale_factor: f32Text scaling factor (1.0 = normal, 1.5 = 150%, etc.)
prefers_high_contrast: boolUser prefers high contrast colors macOS: UIAccessibility.isDarkerSystemColorsEnabled Windows: SPI_GETHIGHCONTRAST Linux: org.gnome.desktop.a11y.interface high-contrast
prefers_reduced_motion: boolUser prefers reduced motion/animations macOS: UIAccessibility.isReduceMotionEnabled Windows: SPI_GETCLIENTAREAANIMATION (inverted) Linux: org.gnome.desktop.interface enable-animations (inverted)
prefers_reduced_transparency: boolUser prefers reduced transparency macOS: UIAccessibility.isReduceTransparencyEnabled Windows: N/A Linux: N/A
screen_reader_active: boolScreen reader is active (VoiceOver, Narrator, Orca)
differentiate_without_color: boolUser prefers differentiate without color macOS: UIAccessibility.shouldDifferentiateWithoutColor
Trait Implementations§
Source§impl Clone for AccessibilitySettings
impl Clone for AccessibilitySettings
Source§fn clone(&self) -> AccessibilitySettings
fn clone(&self) -> AccessibilitySettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more