pub struct ShellControl { /* private fields */ }Expand description
Handle for runtime control of shell operations
Cloneable and can be sent across threads for triggering shell operations.
Implementations§
Source§impl ShellControl
impl ShellControl
pub fn new(sender: Sender<ShellCommand>) -> ShellControl
Sourcepub fn show_popup(&self, request: &PopupRequest) -> Result<(), Error>
pub fn show_popup(&self, request: &PopupRequest) -> Result<(), Error>
Shows a popup from a popup request
Sourcepub fn show_popup_at_cursor(
&self,
component: impl Into<String>,
) -> Result<(), Error>
pub fn show_popup_at_cursor( &self, component: impl Into<String>, ) -> Result<(), Error>
Shows a popup at the current cursor position
Sourcepub fn show_popup_centered(
&self,
component: impl Into<String>,
) -> Result<(), Error>
pub fn show_popup_centered( &self, component: impl Into<String>, ) -> Result<(), Error>
Shows a popup centered on screen
Sourcepub fn show_popup_at_position(
&self,
component: impl Into<String>,
x: f32,
y: f32,
) -> Result<(), Error>
pub fn show_popup_at_position( &self, component: impl Into<String>, x: f32, y: f32, ) -> Result<(), Error>
Shows a popup at the specified position
Sourcepub fn close_popup(&self, handle: Handle<Popup>) -> Result<(), Error>
pub fn close_popup(&self, handle: Handle<Popup>) -> Result<(), Error>
Closes a popup by its handle
Sourcepub fn resize_popup(
&self,
handle: Handle<Popup>,
width: f32,
height: f32,
) -> Result<(), Error>
pub fn resize_popup( &self, handle: Handle<Popup>, width: f32, height: f32, ) -> Result<(), Error>
Resizes a popup to the specified dimensions
Sourcepub fn request_redraw(&self) -> Result<(), Error>
pub fn request_redraw(&self) -> Result<(), Error>
Requests a redraw of all surfaces
Sourcepub fn surface_instance(&self, id: &SurfaceInstanceId) -> SurfaceControlHandle
pub fn surface_instance(&self, id: &SurfaceInstanceId) -> SurfaceControlHandle
Returns a control handle for a specific surface instance
Sourcepub fn surface_by_handle(&self, handle: Handle<Surface>) -> SurfaceControlHandle
pub fn surface_by_handle(&self, handle: Handle<Surface>) -> SurfaceControlHandle
Returns a control handle for all instances of a surface by handle
Sourcepub fn surface_by_name(&self, name: impl Into<String>) -> SurfaceControlHandle
pub fn surface_by_name(&self, name: impl Into<String>) -> SurfaceControlHandle
Returns a control handle for all surfaces with the given name
Sourcepub fn surface_by_name_and_output(
&self,
name: impl Into<String>,
output: Handle<Output>,
) -> SurfaceControlHandle
pub fn surface_by_name_and_output( &self, name: impl Into<String>, output: Handle<Output>, ) -> SurfaceControlHandle
Returns a control handle for surfaces with the given name on a specific output
Sourcepub fn surface(&self, name: impl Into<String>) -> SurfaceControlHandle
pub fn surface(&self, name: impl Into<String>) -> SurfaceControlHandle
Alias for surface_by_name
Trait Implementations§
Source§impl Clone for ShellControl
impl Clone for ShellControl
Source§fn clone(&self) -> ShellControl
fn clone(&self) -> ShellControl
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ShellControl
impl RefUnwindSafe for ShellControl
impl !Send for ShellControl
impl !Sync for ShellControl
impl Unpin for ShellControl
impl UnwindSafe for ShellControl
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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