Struct WindowSlots
pub struct WindowSlots { /* private fields */ }Expand description
Every tab’s declared slots and the connection of the app that declared them, and what goes back to the apps on the next pump.
Implementations§
§impl WindowSlots
impl WindowSlots
pub fn declare(
&mut self,
tab: u64,
connection: u64,
toolbar: Option<WindowToolbar>,
) -> bool
pub fn declare( &mut self, tab: u64, connection: u64, toolbar: Option<WindowToolbar>, ) -> bool
connection’s app declared toolbar for tab. Returns whether it
changed anything.
pub fn offer(&mut self, tab: u64, connection: u64, offer: WindowOffer) -> bool
pub fn offer(&mut self, tab: u64, connection: u64, offer: WindowOffer) -> bool
connection’s app said what tab’s window offers the bar’s search
and History control. Returns whether it changed anything.
pub fn window_offer(&self, tab: u64) -> Option<&WindowOffer>
pub fn window_offer(&self, tab: u64) -> Option<&WindowOffer>
What tab’s app offers the bar, if it runs in a process of its own.
pub fn disconnected(&mut self, connection: u64) -> bool
pub fn disconnected(&mut self, connection: u64) -> bool
connection closed: its app’s slots and offers go with it.
pub fn toolbar(&self, tab: u64) -> Option<&WindowToolbar>
pub fn toolbar(&self, tab: u64) -> Option<&WindowToolbar>
tab’s declared slots, as its bar shows them.
pub fn set_host_items(&mut self, tab: u64, items: Vec<ToolbarAction>)
pub fn set_host_items(&mut self, tab: u64, items: Vec<ToolbarAction>)
Put items, the desktop’s own, in tab’s overflow menu, after its
app’s. A window whose app declared no slots shows them alone, in the
menu of a button at the end of its title row
(WindowToolbar::menu_only): its title stays where it is. Each id
starts with HOST_ACTION_PREFIX.
pub fn host_items(&self, tab: u64) -> &[ToolbarAction]
pub fn host_items(&self, tab: u64) -> &[ToolbarAction]
The desktop’s own items in the menu of tab’s window bar, as last
set (Self::set_host_items).
pub fn take_host_actions(&mut self) -> Vec<(u64, String)>
pub fn take_host_actions(&mut self) -> Vec<(u64, String)>
The desktop’s own items the person chose since the last call, by tab, each by its id.
pub fn route(&mut self, tab: u64, event: ToolbarEvent) -> bool
pub fn route(&mut self, tab: u64, event: ToolbarEvent) -> bool
Queue event for the app that declared tab’s slots or offered
its window to the bar. Returns whether one did.
pub fn take_outbox(&mut self) -> Vec<(u64, ToolbarEvent)>
pub fn take_outbox(&mut self) -> Vec<(u64, ToolbarEvent)>
What goes back to apps in processes of their own, by connection.
pub fn forget_hosted(&mut self, tab: u64)
pub fn forget_hosted(&mut self, tab: u64)
Tab tab, shown in the host’s own process, is gone: its slots go.
pub fn sync_groups<'a>(
&mut self,
groups: impl IntoIterator<Item = &'a mut WindowGroup>,
)
pub fn sync_groups<'a>( &mut self, groups: impl IntoIterator<Item = &'a mut WindowGroup>, )
Every group shows its tabs’ declared slots, and what the person did with them is queued for the apps. Run it every frame; a group whose slots did not change does nothing.
pub fn sync_hosted<'a>(
&mut self,
windows: &[(u64, HostedWindow)],
groups: impl IntoIterator<Item = &'a mut WindowGroup>,
) -> HostedSync
pub fn sync_hosted<'a>( &mut self, windows: &[(u64, HostedWindow)], groups: impl IntoIterator<Item = &'a mut WindowGroup>, ) -> HostedSync
Look at the windows of the apps the host shows in its own process,
windows being every one of them by tab: show the slots each
declared in its tab’s bar, with the notice and reactions its window
shows, run its asks to edit its location or open
its search, and hand it what the person did with its slots. A tab
whose window is no longer among windows loses its slots. Run it
every frame, after the groups took the frame’s input.
Trait Implementations§
§impl Default for WindowSlots
impl Default for WindowSlots
§fn default() -> WindowSlots
fn default() -> WindowSlots
Auto Trait Implementations§
impl Freeze for WindowSlots
impl RefUnwindSafe for WindowSlots
impl Send for WindowSlots
impl Sync for WindowSlots
impl Unpin for WindowSlots
impl UnsafeUnpin for WindowSlots
impl UnwindSafe for WindowSlots
Blanket Implementations§
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more