pub struct PluginWindow { /* private fields */ }Expand description
A handle to a window managed by this plugin, with mutation methods.
Returned by [crate::plugin::Plugin::managed_windows]. Wraps WindowInfo and exposes
all of its read-only fields via std::ops::Deref, while adding setter methods that
call into the compositor host.
Implementations§
Source§impl PluginWindow
impl PluginWindow
pub fn from_window_info(info: WindowInfo) -> Self
Sourcepub fn set_workspace(&self, workspace: &Workspace) -> Result<(), ()>
pub fn set_workspace(&self, workspace: &Workspace) -> Result<(), ()>
Move this window to a different workspace.
Sourcepub fn set_rectangle(&self, rect: Rectangle, animate: bool) -> Result<(), ()>
pub fn set_rectangle(&self, rect: Rectangle, animate: bool) -> Result<(), ()>
Set the position and size of this window.
Sourcepub fn set_transform(&self, transform: Mat4) -> Result<(), ()>
pub fn set_transform(&self, transform: Mat4) -> Result<(), ()>
Set the 4x4 column-major transform matrix of this window.
Sourcepub fn request_focus(&self) -> Result<(), ()>
pub fn request_focus(&self) -> Result<(), ()>
Request keyboard focus on this window.
Methods from Deref<Target = WindowInfo>§
Sourcepub fn id(&self) -> u64
pub fn id(&self) -> u64
Retrieve the ID of this window.
Plugins may elect to keep a reference to this ID so that they can
match it with WindowInfo later.
Sourcepub fn application(&self) -> Option<ApplicationInfo>
pub fn application(&self) -> Option<ApplicationInfo>
Get the application that owns this window.
Trait Implementations§
Source§impl Debug for PluginWindow
impl Debug for PluginWindow
Source§impl Deref for PluginWindow
impl Deref for PluginWindow
Source§impl PartialEq for PluginWindow
impl PartialEq for PluginWindow
Auto Trait Implementations§
impl Freeze for PluginWindow
impl RefUnwindSafe for PluginWindow
impl Send for PluginWindow
impl Sync for PluginWindow
impl Unpin for PluginWindow
impl UnsafeUnpin for PluginWindow
impl UnwindSafe for PluginWindow
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