Skip to main content

AppKitHandle

Struct AppKitHandle 

Source
pub struct AppKitHandle { /* private fields */ }
Expand description

Shared access to an AppKitBackend after it was moved into a Ui.

Implementations§

Source§

impl AppKitHandle

Source

pub fn command_log(&self) -> Vec<Command>

Source

pub fn take_command_log(&self) -> Vec<Command>

Source

pub fn node_count(&self) -> usize

Number of live native nodes.

Source

pub fn ns_view(&self, id: NodeId) -> Option<Retained<NSView>>

Escape hatch: the native view of any node (a window’s content view).

Source§

impl AppKitHandle

Source

pub fn resize_window(&self, window: NodeId, size: Size)

Resizes a window’s content like the user would, between its minimum and maximum, as a drag goes (setContentSize: alone would go past them); the window delegate reports it back as a WindowResized event.

Source

pub fn show_pending_windows(&self)

Orders front windows whose first layout has been applied: a sheet on the window it belongs to, a window in the app’s modal loop, or an ordinary window.

Source

pub fn ns_window(&self, id: NodeId) -> Option<Retained<NSWindow>>

Escape hatch: the native window of a window node.

Trait Implementations§

Source§

impl Clone for AppKitHandle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl TestHooks for AppKitHandle

Source§

fn close_window(&self, window: NodeId)

As the close button does: the window asks its delegate.

Source§

fn app_info(&self, _window: NodeId) -> NativeAppInfo

The id is the bundle’s; the name is kept, as only the menus show it; the icon is the Dock’s, in points.

Source§

fn settle(&self)

Offscreen windows get no display cycle, where tables add the rows scrolling brought into view and toolbars place their items. While a search field is shown, timers that are due fire, as in the app’s run loop: it searches once typing pauses. Not always yet: tables and tab views run timers too, which change what their tests capture.

Source§

fn name(&self) -> &'static str

Short name used in snapshot and visual baseline paths: "appkit", "gtk", "winui", "kirigami".
Source§

fn dragged_files(&self, node: NodeId) -> Option<Vec<PathBuf>>

The files dragging this row out of its List or Table carries (Prop::RowFiles), as the platform’s drag source gives them: the selected rows’ when the row is selected, else its own. node is the row’s host (a table’s: any of its cells’). None if it doesn’t drag. Nothing here can start a real drag; this goes through the backend’s own drag handling up to where the platform takes the files.
Source§

fn resize_window(&self, window: NodeId, size: Size)

Resizes a window’s content area the way the user would, so the platform reports it back as WindowResized.
Source§

fn take_command_log(&self) -> Vec<Command>

Commands applied since the last call (record them when asked to).
Source§

fn node_count(&self) -> usize

Live native nodes, as a leak detector.

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.