pub struct AppKitBackend { /* private fields */ }Implementations§
Source§impl AppKitBackend
impl AppKitBackend
pub fn new(mtm: MainThreadMarker, options: BackendOptions) -> AppKitBackend
pub fn handle(&self) -> AppKitHandle
Trait Implementations§
Source§impl Backend for AppKitBackend
impl Backend for AppKitBackend
Source§fn group_insets(&self, id: NodeId) -> Option<Insets>
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)
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.
fn metrics(&self) -> PlatformMetrics
Source§fn measure(&mut self, id: NodeId, request: MeasureRequest) -> Size
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>
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>
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.
fn native_state(&self, id: NodeId) -> Option<NativeState>
Source§fn locale(&self) -> Rc<dyn PlatformLocale>
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)
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>
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.
Auto Trait Implementations§
impl !RefUnwindSafe for AppKitBackend
impl !Send for AppKitBackend
impl !Sync for AppKitBackend
impl !UnwindSafe for AppKitBackend
impl Freeze for AppKitBackend
impl Unpin for AppKitBackend
impl UnsafeUnpin for AppKitBackend
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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