Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Struct

HiiPopup

Public Struct
std.os.uefi.protocol.hii_popup.HiiPopup
pub const HiiPopup = extern struct

Display a popup window

Fields

revision: u64
_create_popup: *const fn (*const HiiPopup, PopupStyle, PopupType, hii.Handle, u16, ?*PopupSelection) callconv(cc) Status

Types

Values

Functions

pub fn createPopup(self: *const HiiPopup, style: PopupStyle, popup_type: PopupType, handle: hii.Handle, msg: u16) CreatePopupError!PopupSelection

Displays a popup window.

File

os/uefi/protocol/hii_popup.zig:9
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
pub const HiiPopup = extern struct {
    revision: u64,
    _create_popup: *const fn (*const HiiPopup, PopupStyle, PopupType, hii.Handle, u16, ?*PopupSelection) callconv(cc) Status,

    pub const CreatePopupError = uefi.UnexpectedError || error{
        InvalidParameter,
        OutOfResources,
    };

    /// Displays a popup window.
    pub fn createPopup(
        self: *const HiiPopup,
        style: PopupStyle,
        popup_type: PopupType,
        handle: hii.Handle,
        msg: u16,
    ) CreatePopupError!PopupSelection {
        var res: PopupSelection = undefined;
        switch (self._create_popup(self, style, popup_type, handle, msg, &res)) {
            .success => return res,
            .invalid_parameter => return error.InvalidParameter,
            .out_of_resources => return error.OutOfResources,
            else => |status| return uefi.unexpectedStatus(status),
        }
    }

    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 PopupStyle = enum(u32) {
        info,
        warning,
        @"error",
    };

    pub const PopupType = enum(u32) {
        ok,
        cancel,
        yes_no,
        yes_no_cancel,
    };

    pub const PopupSelection = enum(u32) {
        ok,
        cancel,
        yes,
        no,
    };
}