Function setAttribute [src]

Sets the background and foreground colors for the outputString() and clearScreen() functions.

Prototype

pub fn setAttribute(self: *SimpleTextOutput, attribute: Attribute) SetAttributeError!void

Parameters

self: *SimpleTextOutputattribute: Attribute

Possible Errors

DeviceError
Unexpected UnexpectedError

Source

pub fn setAttribute(self: *SimpleTextOutput, attribute: Attribute) SetAttributeError!void { const attr_as_num: u8 = @bitCast(attribute); switch (self._set_attribute(self, @intCast(attr_as_num))) { .success => {}, .device_error => return Error.DeviceError, else => |status| return uefi.unexpectedStatus(status), } }