[][src]Function hexchat::add_window_event_listener

pub fn add_window_event_listener(
    event: WindowEvent,
    priority: Priority,
    function: impl Fn(ChannelRef) -> EatMode + 'static
) -> WindowEventListener

Adds a listener for a particular WindowEvent. See WindowEvent's docs for more details.

Returns a corresponding object that can be passed to remove_window_event_listener.

Callback

The callback's signature is a ChannelRef corresponding to the channel this event is regarding or the current channel if none applies. The callback should return who the event should be hidden from.