1TICKIT_PEN_BIND_EVENT(3) Library Functions Manual TICKIT_PEN_BIND_EVENT(3)
2
3
4
6 tickit_pen_bind_event, tickit_pen_unbind_event_id - add or remove event
7 handlers
8
10 #include <tickit.h>
11
12 typedef int TickitPenEventFn(TickitPen *tt, TickitEventFlags flags,
13 void *info, void *user);
14
15 int tickit_pen_bind_event(TickitPen *tt, TickitPenEvent ev,
16 TickitBindFlags flags,
17 TickitPenEventFn *fn, void *user);
18 void tickit_pen_unbind_event_id(TickitPen *tt, int id);
19
20 Link with -ltickit.
21
23 tickit_pen_bind_event() adds a new event handler to the list of han‐
24 dlers stored by the pen, and returns an integer to identify this han‐
25 dler. This handler will be invoked for occurances of the event given by
26 the ev argument. When invoked, func will be passed the pen instance, a
27 flags bitmask, a pointer to an event information structure whose type
28 depends on the event, and the user data pointer it was installed with.
29
30 tickit_pen_unbind_event_id() removes an event handler previously added,
31 by the identifier returned when it was added, invoking it with the
32 TICKIT_EV_UNBIND flag if it was installed with TICKIT_BIND_UNBIND.
33
35 tickit_pen_bind_event() returns an identifier integer.
36 tickit_pen_unbind_event_id() returns no value.
37
39 tickit_pen_new(3), tickit_pen(7), tickit(7)
40
41
42
43 TICKIT_PEN_BIND_EVENT(3)