|
|
|
@ -74,10 +74,10 @@ impl XcbEasel { |
|
|
|
, screen.root(), 0, 0, width, width, 0
|
|
|
|
, xcb::WINDOW_CLASS_INPUT_OUTPUT as u16
|
|
|
|
, screen.root_visual()
|
|
|
|
, &[(xcb::CW_BACK_PIXEL, screen.white_pixel())] );
|
|
|
|
, &[(xcb::CW_BACK_PIXEL, screen.black_pixel())] );
|
|
|
|
|
|
|
|
xcb::create_gc( &conn, gc, screen.root()
|
|
|
|
, &[ (xcb::GC_FOREGROUND, screen.black_pixel())
|
|
|
|
, &[ (xcb::GC_FOREGROUND, screen.white_pixel())
|
|
|
|
, (xcb::GC_GRAPHICS_EXPOSURES, 0) ] );
|
|
|
|
|
|
|
|
let (shmid, shm) = getshm((width * height) as usize);
|
|
|
|
@ -233,6 +233,13 @@ impl<'a> Canvas for XcbCanvas<'a> { |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn put_text(&self, ofs :Coordinate, s :&str) {
|
|
|
|
let Coordinate(xofs, yofs) = ofs;
|
|
|
|
xcb::xproto::image_text_8( &self.conn, self.pixmap, self.gc
|
|
|
|
, xofs as i16, yofs as i16, s );
|
|
|
|
self.conn.flush();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn show(&self) {
|
|
|
|
xcb::copy_area( &self.conn, self.pixmap, self.window, self.gc
|
|
|
|
, 0, 0, 0, 0
|
|
|
|
|