wip: component refactor

This commit is contained in:
🪞👃🪞 2024-06-21 12:13:11 +03:00
parent 5082bf9fdf
commit c18aa2cbbd
14 changed files with 374 additions and 272 deletions

View file

@ -11,8 +11,10 @@ pub use crate::device::{
pub use crate::time::*;
pub use crate::layout::{
Rows,
Columns,
Row,
Column,
FocusRow,
FocusColumn,
Focus,
FocusEvent,
handle_focus
@ -106,7 +108,7 @@ pub type KeyBinding<T> = (
}
#[macro_export] macro_rules! keymap {
($T:ty { $([$k:ident $(($char:literal))?, $m:ident, $n: literal, $d: literal, $f: expr]),* }) => {
($T:ty { $([$k:ident $(($char:literal))?, $m:ident, $n: literal, $d: literal, $f: expr]),* $(,)? }) => {
&[
$((KeyCode::$k $(($char))?, KeyModifiers::$m, $n, $d, &$f as KeyHandler<$T>)),*
] as &'static [KeyBinding<$T>]