macro goodness

This commit is contained in:
2025-12-15 23:11:32 -05:00
parent 0b8a93c5ce
commit 8d1a810483
9 changed files with 131 additions and 61 deletions

View File

@@ -19,6 +19,7 @@ mod orientation;
mod painter;
mod primitive;
mod render;
mod state;
mod ui;
mod widget;

8
core/src/state.rs Normal file
View File

@@ -0,0 +1,8 @@
#[macro_export]
macro_rules! core_state {
($vis: vis $state: ty) => {
$vis type WidgetHandle<W = dyn Widget<$state>> = $crate::WidgetHandle<$state, W>;
$vis type WidgetRef<W = dyn Widget<$state>> = $crate::WidgetRef<$state, W>;
$vis type Ui = $crate::Ui<$state>;
};
}