[][src]Trait cgui::RenderBack

pub trait RenderBack {
    fn init(&mut self);
fn redraw_dirty(&mut self);
fn redraw_box(&mut self, x1: usize, y1: usize, x2: usize, y2: usize);
fn event_tick(&self) -> String;
fn event_loop(&mut self); }

Backend renderers are implemented in other source files (winback.rs, x11back.rs) and contain implementations of RenderBack for CWin. At compile time there must only be one implementation visible, which will be baked into the shared lib. No support for dynamically changing system backends is planned (eg win32 -> x11 with an x11 server on windows).

Required methods

fn init(&mut self)

fn redraw_dirty(&mut self)

fn redraw_box(&mut self, x1: usize, y1: usize, x2: usize, y2: usize)

fn event_tick(&self) -> String

fn event_loop(&mut self)

Loading content...

Implementors

impl RenderBack for CWin[src]

X11 backend implementation

fn event_tick(&self) -> String[src]

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?)

impl RenderBack for CWinRep[src]

fn event_tick(&self) -> String[src]

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.

Loading content...