Struct cgui::CWin [−][src]
pub struct CWin {
pub rep: CWinRep,
// some fields omitted
}Fields
rep: CWinRep
Methods
impl CWin[src]
impl CWinpub fn new() -> CWin[src]
pub fn new() -> CWinpub fn new_detail<S: Into<String>>(title: S, width: u32, height: u32) -> CWin[src]
pub fn new_detail<S: Into<String>>(title: S, width: u32, height: u32) -> CWinpub fn to_ffi_ptr(self) -> *mut CWin[src]
pub fn to_ffi_ptr(self) -> *mut CWinpub fn add_callback(
&mut self,
function: extern "C" fn(_: *mut CWinRep, _: *const c_char)
)[src]
pub fn add_callback(
&mut self,
function: extern "C" fn(_: *mut CWinRep, _: *const c_char)
)pub fn call_callbacks(&mut self, event_string: *const c_char)[src]
pub fn call_callbacks(&mut self, event_string: *const c_char)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 CWin[src]
impl RenderBack for CWinX11 backend implementation
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_charApps 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)