Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

50
vendor/x11rb/examples/list_fonts.rs vendored Normal file
View File

@@ -0,0 +1,50 @@
// This program should produce output identical to `xlsfonts -lu`.
extern crate x11rb;
use x11rb::protocol::xproto::{ConnectionExt, FontDraw};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let (conn, _) = connect(None)?;
println!("DIR MIN MAX EXIST DFLT PROP ASC DESC NAME");
for reply in conn.list_fonts_with_info(u16::MAX, b"*")? {
let reply = reply?;
let dir = if reply.draw_direction == FontDraw::LEFT_TO_RIGHT {
"-->"
} else if reply.draw_direction == FontDraw::RIGHT_TO_LEFT {
"<--"
} else {
"???"
};
let (min, max, indicator) = if reply.min_byte1 == 0 && reply.max_byte1 == 0 {
(reply.min_char_or_byte2, reply.max_char_or_byte2, ' ')
} else {
(u16::from(reply.min_byte1), u16::from(reply.max_byte1), '*')
};
let all = if reply.all_chars_exist { "all" } else { "some" };
let name = String::from_utf8_lossy(&reply.name);
println!(
"{} {}{:3} {}{:3} {:>5} {:4} {:4} {:3} {:4} {}",
dir,
indicator,
min,
indicator,
max,
all,
reply.default_char,
reply.properties.len(),
reply.font_ascent,
reply.font_descent,
name
);
}
Ok(())
}
include!("integration_test_util/connect.rs");