Zig 0.17.0-dev (Split by item)

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 library itself.

RT

https://learn.microsoft.com/en-us/windows/win32/menurc/resource-types

res.RT
pub const RT = enum(u8)

File

Code

pub const RT = enum(u8) {
    ACCELERATOR = 9,
    ANICURSOR = 21,
    ANIICON = 22,
    BITMAP = 2,
    CURSOR = 1,
    DIALOG = 5,
    DLGINCLUDE = 17,
    DLGINIT = 240,
    FONT = 8,
    FONTDIR = 7,
    GROUP_CURSOR = 1 + 11, // CURSOR + 11
    GROUP_ICON = 3 + 11, // ICON + 11
    HTML = 23,
    ICON = 3,
    MANIFEST = 24,
    MENU = 4,
    MESSAGETABLE = 11,
    PLUGPLAY = 19,
    RCDATA = 10,
    STRING = 6,
    TOOLBAR = 241,
    VERSION = 16,
    VXD = 20,
    _,

    /// Returns null if the resource type is user-defined
    /// Asserts that the resource is not `stringtable`
    pub fn fromResource(resource: ResourceType) ?RT {
        return switch (resource) {
            .accelerators => .ACCELERATOR,
            .bitmap => .BITMAP,
            .cursor => .GROUP_CURSOR,
            .dialog => .DIALOG,
            .dialogex => .DIALOG,
            .dlginclude => .DLGINCLUDE,
            .dlginit => .DLGINIT,
            .font => .FONT,
            .html => .HTML,
            .icon => .GROUP_ICON,
            .menu => .MENU,
            .menuex => .MENU,
            .messagetable => .MESSAGETABLE,
            .plugplay => .PLUGPLAY,
            .rcdata => .RCDATA,
            .stringtable => unreachable,
            .toolbar => .TOOLBAR,
            .user_defined => null,
            .versioninfo => .VERSION,
            .vxd => .VXD,

            .cursor_num => .CURSOR,
            .icon_num => .ICON,
            .string_num => .STRING,
            .anicursor_num => .ANICURSOR,
            .aniicon_num => .ANIICON,
            .fontdir_num => .FONTDIR,
            .manifest_num => .MANIFEST,
        };
    }
}