r_efi/protocols/
hii_font_ex.rs1pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields(
4 0x849e6875,
5 0xdb35,
6 0x4df8,
7 0xb4,
8 0x1e,
9 &[0xc8, 0xf3, 0x37, 0x18, 0x07, 0x3f],
10);
11
12pub type ProtocolStringToImageEx = eficall! {fn(
13 *const Protocol,
14 super::hii_font::OutFlags,
15 super::hii_font::String,
16 *const DisplayInfo,
17 *mut *mut ImageOutput,
18 usize,
19 usize,
20 *mut *mut super::hii_font::RowInfo,
21 *mut usize,
22 *mut usize,
23) -> crate::base::Status};
24
25pub type ProtocolStringIdToImageEx = eficall! {fn(
26 *const Protocol,
27 super::hii_font::OutFlags,
28 crate::hii::Handle,
29 crate::hii::StringId,
30 *const crate::base::Char8,
31 *const DisplayInfo,
32 *mut *mut ImageOutput,
33 usize,
34 usize,
35 *mut *mut super::hii_font::RowInfo,
36 *mut usize,
37 *mut usize,
38) -> crate::base::Status};
39
40pub type ProtocolGetGlyphEx = eficall! {fn(
41 *const Protocol,
42 crate::base::Char16,
43 *const DisplayInfo,
44 *mut *mut ImageOutput,
45 usize,
46) -> crate::base::Status};
47
48pub type ProtocolGetFontInfoEx = eficall! {fn(
49 *const Protocol,
50 *mut super::hii_font::Handle,
51 *const DisplayInfo,
52 *mut *mut DisplayInfo,
53 super::hii_font::String,
54) -> crate::base::Status};
55
56pub type ProtocolGetGlyphInfo = eficall! {fn(
57 *const Protocol,
58 crate::base::Char16,
59 *const DisplayInfo,
60 *mut crate::hii::GlyphInfo,
61) -> crate::base::Status};
62
63#[repr(C)]
64pub struct Protocol {
65 pub string_to_image_ex: ProtocolStringToImageEx,
66 pub string_id_to_image_ex: ProtocolStringIdToImageEx,
67 pub get_glyph_ex: ProtocolGetGlyphEx,
68 pub get_font_info_ex: ProtocolGetFontInfoEx,
69 pub get_glyph_info: ProtocolGetGlyphInfo,
70}
71
72#[repr(C)]
73#[derive(Clone, Copy, Debug)]
74pub struct DisplayInfo {
75 pub foreground_color: super::graphics_output::BltPixel,
76 pub background_color: super::graphics_output::BltPixel,
77 pub font_info_mask: InfoMask,
78 pub font_info: super::hii_string::Info,
79}
80
81pub type InfoMask = u32;
82
83pub const INFO_SYS_FONT: InfoMask = 0x00000001;
84pub const INFO_SYS_SIZE: InfoMask = 0x00000002;
85pub const INFO_SYS_STYLE: InfoMask = 0x00000004;
86pub const INFO_SYS_FORE_COLOR: InfoMask = 0x00000010;
87pub const INFO_SYS_BACK_COLOR: InfoMask = 0x00000020;
88pub const INFO_RESIZE: InfoMask = 0x00001000;
89pub const INFO_RESTYLE: InfoMask = 0x00002000;
90pub const INFO_ANY_FONT: InfoMask = 0x00010000;
91pub const INFO_ANY_SIZE: InfoMask = 0x00020000;
92pub const INFO_ANY_STYLE: InfoMask = 0x00040000;
93
94#[repr(C)]
95#[derive(Clone, Copy)]
96pub union ImageOutputImage {
97 pub bitmap: *mut super::graphics_output::BltPixel,
98 pub screen: *mut super::graphics_output::Protocol,
99}
100
101#[repr(C)]
102#[derive(Clone, Copy)]
103pub struct ImageOutput {
104 pub width: u16,
105 pub height: u16,
106 pub image: ImageOutputImage,
107}