[][src]Trait sunrise_libuser::vi::ViInterface

pub trait ViInterface {
    fn create_buffer(
        &mut self,
        manager: WorkQueue<'static>,
        framebuffer: SharedMemory,
        top: i32,
        left: i32,
        width: u32,
        height: u32
    ) -> Result<IBufferProxy, Error>;
fn get_screen_resolution(
        &mut self,
        manager: WorkQueue<'static>
    ) -> Result<(u32, u32), Error>;
fn get_font_height(
        &mut self,
        manager: WorkQueue<'static>
    ) -> Result<u32, Error>;
fn create_terminal(
        &mut self,
        manager: WorkQueue<'static>,
        framebuffer: SharedMemory,
        top: i32,
        left: i32,
        width: u32,
        height: u32
    ) -> Result<IPipeProxy, Error>; fn dispatch<'a>(
        &'a mut self,
        manager: WorkQueue<'static>,
        cmdid: u32,
        buf: &'a mut [u8]
    ) -> FutureObj<Result<(), Error>> { ... } }

Entry point interface.

Required methods

fn create_buffer(
    &mut self,
    manager: WorkQueue<'static>,
    framebuffer: SharedMemory,
    top: i32,
    left: i32,
    width: u32,
    height: u32
) -> Result<IBufferProxy, Error>

Create a window.

This creates a window at the given coordinates, with the given height. The passed handle should be a SharedMemory handle containing a framebuffer of type [[u8; width]; height].

It is allowed to place the framebuffer outside the field of view.

fn get_screen_resolution(
    &mut self,
    manager: WorkQueue<'static>
) -> Result<(u32, u32), Error>

Gets the screen resolution.

fn get_font_height(&mut self, manager: WorkQueue<'static>) -> Result<u32, Error>

Gets the height of the font used for rendering a terminal line.

fn create_terminal(
    &mut self,
    manager: WorkQueue<'static>,
    framebuffer: SharedMemory,
    top: i32,
    left: i32,
    width: u32,
    height: u32
) -> Result<IPipeProxy, Error>

Create a terminal.

This creates a terminal at the given coordinates, with the given height.

It is allowed to place the framebuffer outside the field of view.

Loading content...

Provided methods

fn dispatch<'a>(
    &'a mut self,
    manager: WorkQueue<'static>,
    cmdid: u32,
    buf: &'a mut [u8]
) -> FutureObj<Result<(), Error>>

Handle an incoming IPC request.

Loading content...

Implementors

Loading content...