Skip to main content

AppKitBackend

Struct AppKitBackend 

Source
pub struct AppKitBackend { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Backend for AppKitBackend

Source§

fn group_insets(&self, id: NodeId) -> Option<Insets>

The box’s own, which a tweak may have changed (a title at the bottom, other margins).

Source§

fn set_app_info(&mut self, info: &AppInfo)

The id is the bundle’s, and so is the icon if the bundle has one: a bundle’s icon has the sizes and variants (dark, tinted) that one image doesn’t. The name goes in the app menu; the menu bar’s title is the bundle’s or the process’s, which AppKit alone sets.

Source§

fn init(&mut self, events: EventSink)

Called once when the backend is attached to a Ui.
Source§

fn metrics(&self) -> PlatformMetrics

Source§

fn apply(&mut self, batch: &[Command])

Applies a batch of commands to the native tree.
Source§

fn measure(&mut self, id: NodeId, request: MeasureRequest) -> Size

Intrinsic size of a leaf widget. Called synchronously during layout, after all commands of the current batch have been applied.
Source§

fn perform( &mut self, id: NodeId, action: &A11yAction, ) -> Result<(), ActionError>

Performs an accessibility action on the native control, as assistive technology would. Resulting events go through the EventSink.
Source§

fn synthesize( &mut self, id: NodeId, input: &SyntheticInput, ) -> Result<(), ActionError>

Synthesizes raw user input on a native control, as close to real input as the platform allows. Used by end-to-end tests.
Source§

fn native_state(&self, id: NodeId) -> Option<NativeState>

Source§

fn locale(&self) -> Rc<dyn PlatformLocale>

The user’s languages, and how the user’s region writes numbers and dates. Called once, when the backend is attached.
Source§

fn set_locale(&mut self, language: &LanguageIdentifier, right_to_left: bool)

The app’s language, which the core chose from the user’s, and whether it’s written right to left: set before the app’s first window, and again when the app changes it. Make the toolkit’s own chrome follow it where the platform lets an app choose (the direction of title bars, menus and dialogs). Native widgets get their direction as Prop::LayoutDirection.
Source§

fn services(&self) -> Box<dyn Services>

The platform’s clipboard, dialogs and menus. Called once, when the backend is attached; tests may replace the result.
Source§

fn capture(&mut self, id: NodeId, reply: Reply<Result<Image, CaptureError>>)

Offscreen screenshot of a window or node. Async because some platforms render asynchronously (WinUI’s RenderTargetBitmap); reply whenever it’s ready, right away if possible.
Source§

fn tab_insets(&self, _id: NodeId) -> Option<Insets>

Where this Tabs puts its pages, if not where the metrics’ tab_insets say: its style can give it another strip. Asked when its strip is measured.

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> AutoreleaseSafe for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.