popover: Install emoji layout

In order to do that, an additional piece of state (layout switcher) was exposed to the event handlers, a separation between squeekboard-only and system layouts was introduced, along with a Translation structure to prevent mixing up strings.
This commit is contained in:
Dorota Czaplejewicz
2019-12-08 14:32:31 +00:00
parent a799178b6a
commit bafd1e6eb3
11 changed files with 234 additions and 46 deletions

View File

@ -26,6 +26,7 @@ use std::vec::Vec;
use ::action::Action;
use ::drawing;
use ::keyboard::{ KeyState, PressType };
use ::manager;
use ::submission::{ Timestamp, VirtualKeyboard };
use ::util::find_max_double;
@ -258,6 +259,7 @@ pub mod c {
virtual_keyboard: ZwpVirtualKeyboardV1, // TODO: receive a reference to the backend
widget_to_layout: Transformation,
time: u32,
manager: manager::c::Manager,
ui_keyboard: EekGtkKeyboard,
) {
let time = Timestamp(time);
@ -273,6 +275,7 @@ pub mod c {
&widget_to_layout,
time,
ui_keyboard,
manager,
key,
);
}
@ -344,6 +347,7 @@ pub mod c {
x_widget: f64, y_widget: f64,
widget_to_layout: Transformation,
time: u32,
manager: manager::c::Manager,
ui_keyboard: EekGtkKeyboard,
) {
let time = Timestamp(time);
@ -378,6 +382,7 @@ pub mod c {
&widget_to_layout,
time,
ui_keyboard,
manager,
key,
);
}
@ -395,6 +400,7 @@ pub mod c {
&widget_to_layout,
time,
ui_keyboard,
manager,
key,
);
}
@ -853,6 +859,7 @@ mod seat {
widget_to_layout: &c::Transformation,
time: Timestamp,
ui_keyboard: c::EekGtkKeyboard,
manager: manager::c::Manager,
key: &Rc<RefCell<KeyState>>,
) {
layout.release_key(virtual_keyboard, &mut key.clone(), time);
@ -874,7 +881,8 @@ mod seat {
};
::popover::show(
ui_keyboard,
widget_to_layout.reverse_bounds(bounds)
widget_to_layout.reverse_bounds(bounds),
manager,
);
}
}