std.os.uefi.hii.Guid
别名
别名目标 std.os.uefi.Guid
std.os.uefi.hii.Handle
类型
std.os.uefi.hii.NarrowGlyph
容器
字段
std.os.uefi.hii.NarrowGlyphAttributes
容器
字段
non_spacing: bool
wide: bool
_pad: u6 = 0
std.os.uefi.hii.PackageHeader
容器
每个包起始处的头部。
字段
length: u24
type: u8
std.os.uefi.hii.PackageHeader.animations
常量
u8
std.os.uefi.hii.PackageHeader.device_path
常量
u8
std.os.uefi.hii.PackageHeader.end
常量
u8
std.os.uefi.hii.PackageHeader.fonts
常量
u8
std.os.uefi.hii.PackageHeader.forms
常量
u8
std.os.uefi.hii.PackageHeader.images
常量
u8
std.os.uefi.hii.PackageHeader.keyboard_layout
常量
u8
std.os.uefi.hii.PackageHeader.simple_fonsts
常量
u8
std.os.uefi.hii.PackageHeader.strings
常量
u8
std.os.uefi.hii.PackageHeader.type_all
常量
u8
std.os.uefi.hii.PackageHeader.type_guid
常量
u8
std.os.uefi.hii.PackageHeader.type_system_begin
常量
u8
std.os.uefi.hii.PackageHeader.type_system_end
常量
u8
std.os.uefi.hii.PackageList
容器
每个程序包列表起始处的头部。
字段
std.os.uefi.hii.SimplifiedFontPackage
容器
字段
std.os.uefi.hii.SimplifiedFontPackage.getNarrowGlyphs
函数
pub fn getNarrowGlyphs(self: *SimplifiedFontPackage) []NarrowGlyph
参数
self: *SimplifiedFontPackage
std.os.uefi.hii.StringPackage
容器
字段
header: PackageHeader
hdr_size: u32
string_info_offset: u32
language_window: [16]u16
language_name: u16
language: [3]u8
std.os.uefi.hii.uefi
别名
别名目标 std.os.uefi
std.os.uefi.hii.WideGlyph
容器
字段
unicode_weight: u16
attributes: WideGlyphAttributes
glyph_col_1: [19]u8
glyph_col_2: [19]u8
_pad: [3]u8 = @splat(0)
std.os.uefi.hii.WideGlyphAttributes
容器
字段
non_spacing: bool
wide: bool
_pad: u6 = 0
源码
std/os/uefi/hii.zig
const uefi = @import("std").os.uefi;
const Guid = uefi.Guid;
pub const Handle = *opaque {};
/// 每个包起始处的头部。
pub const PackageHeader = packed struct(u32) {
length: u24,
type: u8,
pub const type_all: u8 = 0x0;
pub const type_guid: u8 = 0x1;
pub const forms: u8 = 0x2;
pub const strings: u8 = 0x4;
pub const fonts: u8 = 0x5;
pub const images: u8 = 0x6;
pub const simple_fonsts: u8 = 0x7;
pub const device_path: u8 = 0x8;
pub const keyboard_layout: u8 = 0x9;
pub const animations: u8 = 0xa;
pub const end: u8 = 0xdf;
pub const type_system_begin: u8 = 0xe0;
pub const type_system_end: u8 = 0xff;
};
/// 每个程序包列表起始处的头部。
pub const PackageList = extern struct {
package_list_guid: Guid,
/// 包列表的大小(以字节为单位),包含头部。
package_list_length: u32,
// TODO: 实现迭代器
};
pub const SimplifiedFontPackage = extern struct {
header: PackageHeader,
number_of_narrow_glyphs: u16,
number_of_wide_glyphs: u16,
pub fn getNarrowGlyphs(self: *SimplifiedFontPackage) []NarrowGlyph {
return @as([*]NarrowGlyph, @ptrCast(@alignCast(@as([*]u8, @ptrCast(self)) + @sizeOf(SimplifiedFontPackage))))[0..self.number_of_narrow_glyphs];
}
};
pub const NarrowGlyphAttributes = packed struct(u8) {
non_spacing: bool,
wide: bool,
_pad: u6 = 0,
};
pub const NarrowGlyph = extern struct {
unicode_weight: u16,
attributes: NarrowGlyphAttributes,
glyph_col_1: [19]u8,
};
pub const WideGlyphAttributes = packed struct(u8) {
non_spacing: bool,
wide: bool,
_pad: u6 = 0,
};
pub const WideGlyph = extern struct {
unicode_weight: u16,
attributes: WideGlyphAttributes,
glyph_col_1: [19]u8,
glyph_col_2: [19]u8,
_pad: [3]u8 = @splat(0),
};
pub const StringPackage = extern struct {
header: PackageHeader,
hdr_size: u32,
string_info_offset: u32,
language_window: [16]u16,
language_name: u16,
language: [3]u8,
};