Add cmdline_pos processing
This commit is contained in:
parent
18843eaba2
commit
89499763ec
@ -337,6 +337,10 @@ impl CmdLine {
|
||||
pub fn block_hide(&mut self) {
|
||||
self.state.borrow_mut().block = None;
|
||||
}
|
||||
|
||||
pub fn pos(&mut self, pos: u64, level: u64) {
|
||||
//TODO: move cursor
|
||||
}
|
||||
}
|
||||
|
||||
fn gtk_draw(ctx: &cairo::Context, state: &Arc<UiMutex<State>>) -> Inhibit {
|
||||
|
@ -90,6 +90,8 @@ pub trait RedrawEvents {
|
||||
) -> RepaintMode;
|
||||
|
||||
fn cmdline_block_hide(&mut self) -> RepaintMode;
|
||||
|
||||
fn cmdline_pos(&mut self, pos: u64, level: u64) -> RepaintMode;
|
||||
}
|
||||
|
||||
pub trait GuiApi {
|
||||
@ -274,6 +276,7 @@ pub fn call(
|
||||
"cmdline_block_append" => call!(ui->cmdline_block_append(args: ext)),
|
||||
"cmdline_hide" => call!(ui->cmdline_hide(args: uint)),
|
||||
"cmdline_block_hide" => ui.cmdline_block_hide(),
|
||||
"cmdline_pos" => call!(ui->cmdline_pos(args: uint, uint)),
|
||||
_ => {
|
||||
println!("Event {}({:?})", method, args);
|
||||
RepaintMode::Nothing
|
||||
|
@ -1238,6 +1238,11 @@ impl RedrawEvents for State {
|
||||
self.cmd_line.block_hide();
|
||||
RepaintMode::Nothing
|
||||
}
|
||||
|
||||
fn cmdline_pos(&mut self, pos: u64, level: u64) -> RepaintMode {
|
||||
self.cmd_line.pos(pos, level);
|
||||
RepaintMode::Nothing
|
||||
}
|
||||
}
|
||||
|
||||
impl CursorRedrawCb for State {
|
||||
|
Loading…
Reference in New Issue
Block a user