aboutsummaryrefslogtreecommitdiff
path: root/hikari/efi/types/graphics.zig
blob: dca209777f9e919469c99f18bfabf5908e2edd42 (plain)
1
2
3
4
5
6
7
8
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
//! Hikari EFI Graphics Types

const base = @import("base.zig");

pub const PixelFormat = enum(u32) {
    rgb = 0,
    bgr = 1,
    bitmask = 2,
    blt_only = 3,
};

pub const PixelBitmask = extern struct {
    red_mask: u32,
    green_mask: u32,
    blue_mask: u32,
    reserved_mask: u32,
};

pub const BltPixel = extern struct {
    blue: u8,
    green: u8,
    red: u8,
    reserved: u8,
};

pub const BltOperation = enum(u32) {
    video_fill = 0,
    video_to_buffer = 1,
    buffer_to_video = 2,
    video_to_video = 3,
};

pub const GraphicsOutputModeInformation = extern struct {
    version: u32,
    horizontal_resolution: u32,
    vertical_resolution: u32,
    pixel_format: PixelFormat,
    pixel_information: PixelBitmask,
    pixels_per_scan_line: u32,
};

pub const GraphicsOutputProtocolMode = extern struct {
    max_mode: u32,
    mode: u32,
    info: *GraphicsOutputModeInformation,
    size_of_info: usize,
    framebuffer_base: base.PhysicalAddress,
    framebuffer_size: usize,
};