Function

CGEventPostToPSN

Posts a Quartz event into the event stream for a specific application.

Declaration

void CGEventPostToPSN(void *processSerialNumber, CGEventRef event);

Parameters

processSerialNumber

The process to receive the event.

event

The event to post.

Discussion

This function makes it possible for an application to establish an event routing policy, for example, by tapping events at the kCGAnnotatedSessionEventTap location and then posting the events to another desired process.

This function posts the specified event immediately before any event taps instantiated for the specified process, and the event passes through any such taps.

See Also

Working With Event Taps

CGEventTapCreate

Creates an event tap.

CGEventTapCreateForPSN

Creates an event tap for a specified process.

CGEventTapEnable

Enables or disables an event tap.

CGEventTapIsEnabled

Returns a Boolean value indicating whether an event tap is enabled.

CGEventTapPostEvent

Posts a Quartz event from an event tap into the event stream.

CGEventPost

Posts a Quartz event into the event stream at a specified location.

CGGetEventTapList

Gets a list of currently installed event taps.

CGEventMaskBit

Generates an event mask for a single type of event.