mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
wip: component refactor
This commit is contained in:
parent
5082bf9fdf
commit
c18aa2cbbd
14 changed files with 374 additions and 272 deletions
|
|
@ -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>]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue