zig/lib/std/os/uefi/protocols/hii_popup_protocol.zig
Andrew Kelley 50eb7983cd remove most conditional compilation based on stage1
There are still a few occurrences of "stage1" in the standard library
and self-hosted compiler source, however, these instances need a bit
more careful inspection to ensure no breakage.
2022-12-06 20:38:54 -07:00

46 lines
1.2 KiB
Zig

const std = @import("std");
const uefi = std.os.uefi;
const Guid = uefi.Guid;
const Status = uefi.Status;
const hii = uefi.protocols.hii;
/// Display a popup window
pub const HIIPopupProtocol = extern struct {
revision: u64,
_create_popup: *const fn (*const HIIPopupProtocol, HIIPopupStyle, HIIPopupType, hii.HIIHandle, u16, ?*HIIPopupSelection) callconv(.C) Status,
/// Displays a popup window.
pub fn createPopup(self: *const HIIPopupProtocol, style: HIIPopupStyle, popup_type: HIIPopupType, handle: hii.HIIHandle, msg: u16, user_selection: ?*HIIPopupSelection) Status {
return self._create_popup(self, style, popup_type, handle, msg, user_selection);
}
pub const guid align(8) = Guid{
.time_low = 0x4311edc0,
.time_mid = 0x6054,
.time_high_and_version = 0x46d4,
.clock_seq_high_and_reserved = 0x9e,
.clock_seq_low = 0x40,
.node = [_]u8{ 0x89, 0x3e, 0xa9, 0x52, 0xfc, 0xcc },
};
};
pub const HIIPopupStyle = enum(u32) {
Info,
Warning,
Error,
};
pub const HIIPopupType = enum(u32) {
Ok,
Cancel,
YesNo,
YesNoCancel,
};
pub const HIIPopupSelection = enum(u32) {
Ok,
Cancel,
Yes,
No,
};