narui_core 0.1.2

unwrapped core crate of the narui gui framework
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::{CallbackContext, WidgetContext};

pub trait ContextAfterFrame {
    fn after_frame(&mut self, callback: impl for<'a> Fn(&'a CallbackContext) + 'static);
}
impl<'b> ContextAfterFrame for WidgetContext<'b> {
    fn after_frame(&mut self, callback: impl for<'a> Fn(&'a CallbackContext) + 'static) {
        self.after_frame_callbacks.push(Box::new(callback))
    }
}