Expand description
xosd-rs is a rust library with bindings to the xosd C/C++ library.
The API is very similar to the original. The main difference is that all
functions are implemented in Xosd.
All functions return Result since it builds on unsafe code.
§Example
Taken from the xosd man page:
use xosd_rs::{Xosd, Command};
let mut osd = Xosd::new(1)?;
osd.set_font("fixed")?;
osd.set_color("LawnGreen")?;
osd.set_timeout(3)?;
osd.set_shadow_offset(1)?;
osd.display(0, Command::string("Example XOSD output")?)?;
osd.wait_until_no_display()?;
More examples can be found here.
Structs§
Enums§
- Command
- Various types that can be displayed with
Xosd::display - Error
- Various errors that can occur in this crate
- Horizontal
Align - Represents the 3 different horizontal alignments
- Vertical
Align - Represents the 3 different vertical alignments
Functions§
- default_
color - Get the default color
- default_
font - Get the default font
Type Aliases§
- Result
- A helpful type to reduce repeated code