pub struct PanelDrawInfo {
pub width: i32,
pub height: i32,
pub dependence: Dependence,
pub draw_fn: PanelDrawFn,
pub show_fn: Option<PanelShowFn>,
pub hide_fn: Option<PanelHideFn>,
pub shutdown: Option<PanelShutdownFn>,
pub dump: String,
}
Expand description
Information describing how to draw/redraw a Panel
.
Fields§
§width: i32
The width in pixels of the panel.
height: i32
The height in pixels of the panel.
dependence: Dependence
When the panel should be hidden
draw_fn: PanelDrawFn
A FnMut
that draws the panel to the cairo::Context
, starting at
(0, 0). Translating the Context
is the responsibility of functions in
this module.
show_fn: Option<PanelShowFn>
The function to be run when the panel is shown.
hide_fn: Option<PanelHideFn>
The function to be run when the panel is hidden.
shutdown: Option<PanelShutdownFn>
The function to be run before the panel is destroyed. This function should run as quickly as possible because the shutdown functions for all panels are held to a time limit.
dump: String
Information to be shown when lazybar-msg
sends a “dump” message.
Implementations§
Source§impl PanelDrawInfo
impl PanelDrawInfo
Sourcepub const fn new(
dims: (i32, i32),
dependence: Dependence,
draw_fn: PanelDrawFn,
show_fn: Option<PanelShowFn>,
hide_fn: Option<PanelHideFn>,
shutdown: Option<PanelShutdownFn>,
dump: String,
) -> Self
pub const fn new( dims: (i32, i32), dependence: Dependence, draw_fn: PanelDrawFn, show_fn: Option<PanelShowFn>, hide_fn: Option<PanelHideFn>, shutdown: Option<PanelShutdownFn>, dump: String, ) -> Self
Creates a new PanelDrawInfo
from its components.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PanelDrawInfo
impl !RefUnwindSafe for PanelDrawInfo
impl !Send for PanelDrawInfo
impl !Sync for PanelDrawInfo
impl Unpin for PanelDrawInfo
impl !UnwindSafe for PanelDrawInfo
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