LeoNerd.org.uk

TICKIT_TERM_BIND_EVENT (3)

NAME

tickit_term_bind_event, tickit_term_unbind_event_id - add or remove event handlers

SYNOPSIS

#include <tickit.h> 
typedef int TickitTermEventFn(TickitTerm *tt, TickitEventType ev,
    void *info, void *user); 
int tickit_term_bind_event(TickitTerm *tt, TickitEventType ev,
    TickitBindFlags flags,
    TickitTermEventFn *fn, void *user);
void tickit_term_unbind_event_id(TickitTerm *tt, int id);
 

Link with -ltickit.

DESCRIPTION

tickit_term_bind_event() adds a new event handler to the set of handlers stored by the terminal, and returns an integer to identify this handler. This handler will be invoked for any of the events given by the ev bitmask. When invoked, func will be passed the terminal instance, an event bitmask, a pointer to an event information structure whose type depends on the event, and the user data pointer it was installed with.

tickit_term_unbind_event_id() removes an event handler previously added, by the identifier returned when it was added.

RETURN VALUE

tickit_term_bind_event() returns an identifier integer. tickit_term_unbind_event_id() returns no value.

SEE ALSO

tickit_term_new(3), tickit_term(7), tickit(7)