Function fltk::app::handle[][src]

pub unsafe fn handle<I: Into<i32>, W: WindowExt>(msg: I, w: &W) -> bool

Send a signal to a window returns false if the event was not handled

const CHANGE_FRAME: i32 = 100;
but.set_callback(move || unsafe {
    let _ = handle(CHANGE_FRAME, &wind);
});
frame.handle2(move |f, ev| {
    if ev as i32 == CHANGE_FRAME {
        f.set_label("Hello world");
        true
    } else {
        false
    }
});

Safety

Can send an arbitrary message to the window, which can't be debug formatted as an Event enum. Sent values should also not conflict with an existing Event's i32 value