[−][src]Trait penrose::draw::Draw
A simple drawing abstraction
Draw
is not intended for use in writing full GUI interfaces, rather it is a simple
abstraction layer to allow for the creation of minimal UI elements such as status bars, menus
and dialogs. Each Draw
should also provide an acompanying DrawContext
that impl that is
used by consumers (such as the status bar) for actually drawing to the screen, which the parent
Draw
is responsible for resource management and mapping / unmapping the created windows.
Associated Types
type Ctx: DrawContext
[src]
The type of drawing context used for drawing
Required methods
pub fn new_window(
&mut self,
ty: WinType,
r: Region,
managed: bool
) -> Result<WinId>
[src]
&mut self,
ty: WinType,
r: Region,
managed: bool
) -> Result<WinId>
Create a new client window with a canvas for drawing
pub fn screen_sizes(&self) -> Result<Vec<Region>>
[src]
Get the size of the target screen in pixels
pub fn register_font(&mut self, font_name: &str)
[src]
Register a font by name for later use
pub fn context_for(&self, id: WinId) -> Result<Self::Ctx>
[src]
Get a new DrawContext for the target window
pub fn temp_context(&self, w: u32, h: u32) -> Result<Self::Ctx>
[src]
Get a new temporary DrawContext that will be destroyed when dropped
pub fn flush(&self, id: WinId)
[src]
Flush pending actions
pub fn map_window(&self, id: WinId)
[src]
Map the target window to the screen
pub fn unmap_window(&self, id: WinId)
[src]
Unmap the target window from the screen
pub fn destroy_window(&mut self, id: WinId)
[src]
Destroy the target window
pub fn replace_prop(&self, id: WinId, prop: Atom, val: PropVal<'_>)
[src]
Replace a property value on a window.
See the documentation for the C level XCB API for the correct property type for each prop.
Implementors
impl Draw for XcbDraw
[src]
type Ctx = XcbDrawContext
pub fn new_window(
&mut self,
ty: WinType,
r: Region,
managed: bool
) -> Result<WinId>
[src]
&mut self,
ty: WinType,
r: Region,
managed: bool
) -> Result<WinId>