
Carbon Events
9
169
Q
The handler itself is passed in as a universal procedure
pointer (UPP) created with the NewEventHandler-
UP P function. It needs to be packaged as a UPP so that
a reference to it can be stored until the callback is need-
ed. If that callback needs to cross the boundary be-
tween Mach-O and CFM (for example, when a Carbon
application is a CFM app), this step is essential.
0
You then specify the number of events that this han-
dler will respond to.
4. Next, you pass in an array of those events.
0
You can pass in a pointer to any data that you want;
that pointer will be returned to the event handler
whenever ...