1
0
Fork 0
forked from wry/wry

config: move parsed model into schema crate

This commit is contained in:
kossLAN 2026-05-29 17:15:14 -04:00
parent c8a6b69bf1
commit a038855895
No known key found for this signature in database
8 changed files with 266 additions and 239 deletions

View file

@ -128,7 +128,17 @@ impl FnBuilder for ShortcutFnBuilder<'_> {
}
}
impl Action {
trait ActionExt {
fn into_fn(self, state: &Rc<State>) -> Box<dyn Fn()>;
fn into_rc_fn(self, state: &Rc<State>) -> Rc<dyn Fn()>;
fn into_shortcut_fn(self, state: &Rc<State>) -> Rc<dyn Fn()>;
fn into_fn_impl<B: FnBuilder>(self, b: &B, state: &Rc<State>) -> B::Output;
}
impl ActionExt for Action {
fn into_fn(self, state: &Rc<State>) -> Box<dyn Fn()> {
self.into_fn_impl(&BoxFnBuilder, state)
}
@ -723,7 +733,11 @@ impl InputMatchExt for InputMatch {
}
}
impl Input {
trait InputExt {
fn apply(&self, c: InputDevice, state: &State);
}
impl InputExt for Input {
fn apply(&self, c: InputDevice, state: &State) {
if let Some(v) = self.accel_profile {
c.set_accel_profile(v);