mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
std/os/uefi: replace init() with default values
This commit is contained in:
parent
20ce0b9952
commit
88fdb303ff
@ -43,22 +43,13 @@ pub const AbsolutePointerMode = extern struct {
|
||||
};
|
||||
|
||||
pub const AbsolutePointerState = extern struct {
|
||||
current_x: u64,
|
||||
current_y: u64,
|
||||
current_z: u64,
|
||||
current_x: u64 = undefined,
|
||||
current_y: u64 = undefined,
|
||||
current_z: u64 = undefined,
|
||||
active_buttons: packed struct {
|
||||
_pad1: u6,
|
||||
alt_active: bool,
|
||||
touch_active: bool,
|
||||
_pad2: u24,
|
||||
},
|
||||
|
||||
pub fn init() AbsolutePointerState {
|
||||
return AbsolutePointerState{
|
||||
.current_x = undefined,
|
||||
.current_y = undefined,
|
||||
.current_z = undefined,
|
||||
.active_buttons = undefined,
|
||||
};
|
||||
}
|
||||
} = undefined,
|
||||
};
|
||||
|
||||
@ -40,23 +40,12 @@ pub const GraphicsOutputProtocolMode = extern struct {
|
||||
};
|
||||
|
||||
pub const GraphicsOutputModeInformation = extern struct {
|
||||
version: u32,
|
||||
horizontal_resolution: u32,
|
||||
vertical_resolution: u32,
|
||||
pixel_format: GraphicsPixelFormat,
|
||||
pixel_information: PixelBitmask,
|
||||
pixels_per_scan_line: u32,
|
||||
|
||||
pub fn init() GraphicsOutputModeInformation {
|
||||
return GraphicsOutputModeInformation{
|
||||
.version = undefined,
|
||||
.horizontal_resolution = undefined,
|
||||
.vertical_resolution = undefined,
|
||||
.pixel_format = undefined,
|
||||
.pixel_information = undefined,
|
||||
.pixels_per_scan_line = undefined,
|
||||
};
|
||||
}
|
||||
version: u32 = undefined,
|
||||
horizontal_resolution: u32 = undefined,
|
||||
vertical_resolution: u32 = undefined,
|
||||
pixel_format: GraphicsPixelFormat = undefined,
|
||||
pixel_information: PixelBitmask = undefined,
|
||||
pixels_per_scan_line: u32 = undefined,
|
||||
};
|
||||
|
||||
pub const GraphicsPixelFormat = extern enum(u32) {
|
||||
|
||||
@ -36,19 +36,9 @@ pub const SimplePointerMode = struct {
|
||||
};
|
||||
|
||||
pub const SimplePointerState = struct {
|
||||
relative_movement_x: i32,
|
||||
relative_movement_y: i32,
|
||||
relative_movement_z: i32,
|
||||
left_button: bool,
|
||||
right_button: bool,
|
||||
|
||||
pub fn init() SimplePointerState {
|
||||
return SimplePointerState{
|
||||
.relative_movement_x = undefined,
|
||||
.relative_movement_y = undefined,
|
||||
.relative_movement_z = undefined,
|
||||
.left_button = undefined,
|
||||
.right_button = undefined,
|
||||
};
|
||||
}
|
||||
relative_movement_x: i32 = undefined,
|
||||
relative_movement_y: i32 = undefined,
|
||||
relative_movement_z: i32 = undefined,
|
||||
left_button: bool = undefined,
|
||||
right_button: bool = undefined,
|
||||
};
|
||||
|
||||
@ -42,15 +42,8 @@ pub const SimpleTextInputExProtocol = extern struct {
|
||||
};
|
||||
|
||||
pub const KeyData = extern struct {
|
||||
key: InputKey,
|
||||
key_state: KeyState,
|
||||
|
||||
pub fn init() KeyData {
|
||||
return KeyData{
|
||||
.key = undefined,
|
||||
.key_state = undefined,
|
||||
};
|
||||
}
|
||||
key: InputKey = undefined,
|
||||
key_state: KeyState = undefined,
|
||||
};
|
||||
|
||||
pub const KeyState = extern struct {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user