pub struct Window {
pub window_type: WindowType,
pub state: WindowState,
pub top_left: Point,
pub size: Size,
pub depth_layer: DepthLayer,
pub name: String,
pub transform: Mat4,
pub alpha: f32,
/* private fields */
}Expand description
A window’s state, exposed to plugin callbacks and to crate::plugin::managed_windows.
Read-only fields describe the window at the time of the callback. Setter
methods (set_state, set_rectangle, etc.) are available for windows
returned by crate::plugin::managed_windows.
Fields§
§window_type: WindowTypeThe type of this window.
state: WindowStateThe state of the window.
top_left: PointThe position of the window.
size: SizeThe size of the window.
depth_layer: DepthLayerThe depth layer of the window.
name: StringThe name of the window.
transform: Mat4The 4x4 transform matrix of the window (column-major).
alpha: f32The alpha (opacity) of the window.
Implementations§
Source§impl Window
impl Window
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 Window later.
Sourcepub fn application(&self) -> Option<ApplicationInfo>
pub fn application(&self) -> Option<ApplicationInfo>
Get the application that owns this window.
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.