pub struct AppKitServices { /* private fields */ }Trait Implementations§
Source§impl Drop for AppKitServices
impl Drop for AppKitServices
Source§impl Services for AppKitServices
impl Services for AppKitServices
Source§fn trash(
&mut self,
_parent: Option<NodeId>,
paths: &[PathBuf],
reply: Reply<Result<(), ServiceError>>,
)
fn trash( &mut self, _parent: Option<NodeId>, paths: &[PathBuf], reply: Reply<Result<(), ServiceError>>, )
NSFileManager trashes synchronously, so on a queue of its own, as
Finder does: within a disk it’s a move, but each item on a network
disk is a round trip to the server, which would stall the window.
Source§fn launch(
&mut self,
_parent: Option<NodeId>,
target: &Launch,
reply: Reply<Result<(), ServiceError>>,
)
fn launch( &mut self, _parent: Option<NodeId>, target: &Launch, reply: Reply<Result<(), ServiceError>>, )
NSWorkspace opens it as Finder would, asking which app (or
saying there’s none) itself when no app is set.
Source§fn window_destroyed(&mut self, window: NodeId)
fn window_destroyed(&mut self, window: NodeId)
Each sheet on the window ends with its cancel response, as Escape would end it, while the window is still there to end it on.
Source§fn clipboard_text(&mut self, reply: Reply<Option<String>>)
fn clipboard_text(&mut self, reply: Reply<Option<String>>)
Reads the clipboard’s text. Async because GTK and WinUI only read the
clipboard asynchronously; platforms that can may reply right away.
Source§fn set_clipboard_text(
&mut self,
text: &str,
reply: Reply<Result<(), ServiceError>>,
)
fn set_clipboard_text( &mut self, text: &str, reply: Reply<Result<(), ServiceError>>, )
Writes the clipboard (it can fail: e.g. another process holds it).
Source§fn alert(&mut self, parent: Option<NodeId>, alert: &Alert, reply: Reply<usize>)
fn alert(&mut self, parent: Option<NodeId>, alert: &Alert, reply: Reply<usize>)
Shows an alert, attached to
parent if given (a sheet on macOS) or
to the active window. Must not block: reply when the user answers.Source§fn open_file(
&mut self,
parent: Option<NodeId>,
request: &OpenFile,
reply: Reply<Option<Vec<PathBuf>>>,
)
fn open_file( &mut self, parent: Option<NodeId>, request: &OpenFile, reply: Reply<Option<Vec<PathBuf>>>, )
Replies with the chosen paths, or
None if cancelled.fn save_file( &mut self, parent: Option<NodeId>, request: &SaveFile, reply: Reply<Option<PathBuf>>, )
Installs a menu bar: the app’s (
window is None), or one
window’s own menus, which it shows with the app’s
(MenuBarData::merged). Called again whenever the bar changes;
an empty bar removes a window’s menus. A window’s menus may arrive
before the window is created, and after it’s destroyed. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AppKitServices
impl !Send for AppKitServices
impl !Sync for AppKitServices
impl !UnwindSafe for AppKitServices
impl Freeze for AppKitServices
impl Unpin for AppKitServices
impl UnsafeUnpin for AppKitServices
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