| author | |
| committer | |
| log | 20ce0b9952167d531f0a0e679c1b0409e9049d09 |
| tree | 2e28b4a23c26ccf4c3be539d07c05621ee8e26b6 |
| parent | b979fc1bcd6d1bdc19b7f518498fb8c9740d6dea |
| signature | Commit is signed but in an unrecognized format. |
5 files changed, 53 insertions(+), 35 deletions(-)
std/os/uefi.zig+7-5| ... | ... | @@ -26,14 +26,16 @@ pub const Time = extern struct { |
| 26 | 26 | hour: u8, |
| 27 | 27 | minute: u8, |
| 28 | 28 | second: u8, |
| 29 | pad1: u8, | |
| 29 | _pad1: u8, | |
| 30 | 30 | nanosecond: u32, |
| 31 | 31 | timezone: i16, |
| 32 | daylight: u8, | |
| 33 | pad2: u8, | |
| 32 | daylight: packed struct { | |
| 33 | _pad1: u6, | |
| 34 | in_daylight: bool, | |
| 35 | adjust_daylight: bool, | |
| 36 | }, | |
| 37 | _pad2: u8, | |
| 34 | 38 | |
| 35 | pub const adjust_daylight: u8 = 1; | |
| 36 | pub const in_daylight: u8 = 2; | |
| 37 | 39 | pub const unspecified_timezone: i16 = 0x7ff; |
| 38 | 40 | }; |
| 39 | 41 | pub const TimeCapabilities = extern struct { |
std/os/uefi/protocols.zig+1| ... | ... | @@ -27,5 +27,6 @@ pub const EdidDiscoveredProtocol = @import("protocols/edid_discovered_protocol.z |
| 27 | 27 | pub const EdidActiveProtocol = @import("protocols/edid_active_protocol.zig").EdidActiveProtocol; |
| 28 | 28 | |
| 29 | 29 | pub const EdidOverrideProtocol = @import("protocols/edid_override_protocol.zig").EdidOverrideProtocol; |
| 30 | pub const EdidOverrideProtocolAttributes = @import("protocols/edid_override_protocol.zig").EdidOverrideProtocolAttributes; | |
| 30 | 31 | |
| 31 | 32 | pub const RNGProtocol = @import("protocols/rng_protocol.zig").RNGProtocol; |
std/os/uefi/protocols/absolute_pointer_protocol.zig+12-8| ... | ... | @@ -34,17 +34,24 @@ pub const AbsolutePointerMode = extern struct { |
| 34 | 34 | absolute_max_x: u64, |
| 35 | 35 | absolute_max_y: u64, |
| 36 | 36 | absolute_max_z: u64, |
| 37 | attributes: u32, | |
| 38 | ||
| 39 | pub const supports_alt_active: u32 = 1; | |
| 40 | pub const supports_pressure_as_z: u32 = 2; | |
| 37 | attributes: packed struct { | |
| 38 | _pad1: u6, | |
| 39 | supports_pressure_as_z: bool, | |
| 40 | supports_alt_active: bool, | |
| 41 | _pad2: u24, | |
| 42 | }, | |
| 41 | 43 | }; |
| 42 | 44 | |
| 43 | 45 | pub const AbsolutePointerState = extern struct { |
| 44 | 46 | current_x: u64, |
| 45 | 47 | current_y: u64, |
| 46 | 48 | current_z: u64, |
| 47 | active_buttons: u32, | |
| 49 | active_buttons: packed struct { | |
| 50 | _pad1: u6, | |
| 51 | alt_active: bool, | |
| 52 | touch_active: bool, | |
| 53 | _pad2: u24, | |
| 54 | }, | |
| 48 | 55 | |
| 49 | 56 | pub fn init() AbsolutePointerState { |
| 50 | 57 | return AbsolutePointerState{ |
| ... | ... | @@ -54,7 +61,4 @@ pub const AbsolutePointerState = extern struct { |
| 54 | 61 | .active_buttons = undefined, |
| 55 | 62 | }; |
| 56 | 63 | } |
| 57 | ||
| 58 | pub const touch_active: u32 = 1; | |
| 59 | pub const alt_active: u32 = 2; | |
| 60 | 64 | }; |
std/os/uefi/protocols/edid_override_protocol.zig+9-3| ... | ... | @@ -6,7 +6,8 @@ const Handle = uefi.Handle; |
| 6 | 6 | pub const EdidOverrideProtocol = extern struct { |
| 7 | 7 | _get_edid: extern fn (*const EdidOverrideProtocol, *const Handle, *u32, *usize, *?[*]u8) usize, |
| 8 | 8 | |
| 9 | pub fn getEdid(self: *const EdidOverrideProtocol, handle: *const Handle, attributes: *u32, edid_size: *usize, edid: *?[*]u8) usize { | |
| 9 | /// attributes must be align(4) | |
| 10 | pub fn getEdid(self: *const EdidOverrideProtocol, handle: *const Handle, attributes: *EdidOverrideProtocolAttributes, edid_size: *usize, edid: *?[*]u8) usize { | |
| 10 | 11 | return self._get_edid(self, handle, attributes, edid_size, edid); |
| 11 | 12 | } |
| 12 | 13 | |
| ... | ... | @@ -18,6 +19,11 @@ pub const EdidOverrideProtocol = extern struct { |
| 18 | 19 | .clock_seq_low = 0x22, |
| 19 | 20 | .node = [_]u8{ 0xf4, 0x58, 0xfe, 0x04, 0x0b, 0xd5 }, |
| 20 | 21 | }; |
| 21 | pub const dont_override: u32 = 1; | |
| 22 | pub const enable_hot_plug: u32 = 2; | |
| 22 | }; | |
| 23 | ||
| 24 | pub const EdidOverrideProtocolAttributes = packed struct { | |
| 25 | _pad1: u6, | |
| 26 | enable_hot_plug: bool, | |
| 27 | dont_override: bool, | |
| 28 | _pad2: u24, | |
| 23 | 29 | }; |
std/os/uefi/protocols/simple_text_input_ex_protocol.zig+24-19| ... | ... | @@ -54,25 +54,30 @@ pub const KeyData = extern struct { |
| 54 | 54 | }; |
| 55 | 55 | |
| 56 | 56 | pub const KeyState = extern struct { |
| 57 | key_shift_state: u32, | |
| 58 | key_toggle_state: u8, | |
| 59 | ||
| 60 | pub const shift_state_valid: u32 = 0x80000000; | |
| 61 | pub const right_shift_pressed: u32 = 0x00000001; | |
| 62 | pub const left_shift_pressed: u32 = 0x00000002; | |
| 63 | pub const right_control_pressed: u32 = 0x00000004; | |
| 64 | pub const left_control_pressed: u32 = 0x00000008; | |
| 65 | pub const right_alt_pressed: u32 = 0x00000010; | |
| 66 | pub const left_alt_pressed: u32 = 0x00000020; | |
| 67 | pub const right_logo_pressed: u32 = 0x00000040; | |
| 68 | pub const left_logo_pressed: u32 = 0x00000080; | |
| 69 | pub const menu_key_pressed: u32 = 0x00000100; | |
| 70 | pub const sys_req_pressed: u32 = 0x00000200; | |
| 71 | pub const toggle_state_valid: u8 = 0x80; | |
| 72 | pub const key_state_exposed: u8 = 0x40; | |
| 73 | pub const scroll_lock_active: u8 = 0x01; | |
| 74 | pub const num_lock_active: u8 = 0x02; | |
| 75 | pub const caps_lock_active: u8 = 0x04; | |
| 57 | key_shift_state: packed struct { | |
| 58 | left_logo_pressed: bool, | |
| 59 | right_logo_pressed: bool, | |
| 60 | left_alt_pressed: bool, | |
| 61 | right_alt_pressed: bool, | |
| 62 | left_control_pressed: bool, | |
| 63 | right_control_pressed: bool, | |
| 64 | left_shift_pressed: bool, | |
| 65 | right_shift_pressed: bool, | |
| 66 | _pad1: u6, | |
| 67 | sys_req_pressed: bool, | |
| 68 | menu_key_pressed: bool, | |
| 69 | _pad2: u15, | |
| 70 | shift_state_valid: bool, | |
| 71 | }, | |
| 72 | key_toggle_state: packed struct { | |
| 73 | toggle_state_valid: bool, | |
| 74 | _pad1: u2, | |
| 75 | key_state_exposed: bool, | |
| 76 | caps_lock_active: bool, | |
| 77 | _pad2: u1, | |
| 78 | num_lock_active: bool, | |
| 79 | scroll_lock_active: bool, | |
| 80 | }, | |
| 76 | 81 | }; |
| 77 | 82 | |
| 78 | 83 | pub const InputKey = extern struct { |