pub struct PresentInput<'a> {
pub width: usize,
pub height: usize,
pub fore_image: &'a mut Vec<u32>,
pub back_image: &'a mut Vec<u32>,
pub text_image: &'a mut Vec<u32>,
}
Expand description
Provides presentation information and contains the arrays that can be mutated to update the window’s contents.
The window’s contents is split into 3 arrays: fore_image
, back_image
and
text_image
. The fore_image
is an array of u32
s containing the colour
codes for the foreground colour (or ink colour) of each character on the
window. Each u32
represents a single character. Similarly, the
back_image
contains an array of u32
s representing all the background
colours (or paper colour) for each character on the window. Finally,
text_image
contains all the ASCII character codes for each character on
the window. This also contains u32
s but currently, only the lower 8 bits
is considered for rendering. In a future version, higher bits might be used
for other effects (such as bold, underline etc).
Fields§
§width: usize
The current width, in chars, of the application window.
height: usize
The current height, in chars, of the application window.
fore_image: &'a mut Vec<u32>
The array (of size width*height) of u32 values representing the ink colours (or foreground colours) of each character on the window.
back_image: &'a mut Vec<u32>
The array (of size width*height) of u32 values representing the paper colours (or background colours) of each character on the window.
text_image: &'a mut Vec<u32>
The array (of size width*height) of u32 values representing the ASCII character codes of each character on the window. Only the lower 8-bits are currently used.
Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PresentInput<'a>
impl<'a> RefUnwindSafe for PresentInput<'a>
impl<'a> Send for PresentInput<'a>
impl<'a> Sync for PresentInput<'a>
impl<'a> Unpin for PresentInput<'a>
impl<'a> !UnwindSafe for PresentInput<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more