Function fltk::app::event_dispatch[][src]

pub unsafe fn event_dispatch(f: fn(_: Event, _: WindowPtr) -> bool)
Expand description

The event dispatch function is called after native events are converted to FLTK events, but before they are handled by FLTK. If the dispatch function handler is set, it is up to the dispatch function to call app::handle2(Event, WindowPtr) or to ignore the event.

The dispatch function itself must return false if it ignored the event, or true if it used the event. If you call app::handle2(), then this will return the correct value.

Safety

The window pointer must not be invalidated