Struct cgui::CWinRep [−][src]
pub struct CWinRep { pub title: String, pub width: usize, pub height: usize, pub pixels: ImageBuffer<Rgb<u8>, Vec<u8>>, pub exit_flag: bool, // some fields omitted }
Write-dominant data structure which holds details about the window which is pushed to various backends.
Fields
title: String
width: usize
height: usize
pixels: ImageBuffer<Rgb<u8>, Vec<u8>>
exit_flag: bool
Methods
impl CWinRep
[src]
impl CWinRep
pub fn write_px(&mut self, x: u32, y: u32, rgb: [u8; 3])
[src]
pub fn write_px(&mut self, x: u32, y: u32, rgb: [u8; 3])
Writes a pixel to our buffer. Does not push to window manager until redraw() or redraw_dirty() is called.
Trait Implementations
impl RenderBack for CWinRep
[src]
impl RenderBack for CWinRep
fn init(&mut self)
[src]
fn init(&mut self)
fn redraw_dirty(&mut self)
[src]
fn redraw_dirty(&mut self)
fn redraw_box(&mut self, x1: usize, y1: usize, x2: usize, y2: usize)
[src]
fn redraw_box(&mut self, x1: usize, y1: usize, x2: usize, y2: usize)
fn event_tick(&self) -> *const c_char
[src]
fn event_tick(&self) -> *const c_char
Apps which call event_tick manually MUST call init() first. I refuse to throw a check for self.init every time the user moves their mouse. Also apps which explicitly use event_tick must free the c_string returned. (or do I need to add a str_free-ing function to do the free here?)
fn event_loop(&mut self)
[src]
fn event_loop(&mut self)