Function

CGGetEventTapList

Gets a list of currently installed event taps.

Declaration

CGError CGGetEventTapList(uint32_t maxNumberOfTaps, CGEventTapInformation *tapList, uint32_t *eventTapCount);

Parameters

maxNumberOfTaps

The length of the array you provide in the tapList parameter.

tapList

An array of event tap information structures. You are responsible for allocating storage for the array. On return, your array contains a list of currently installed event taps. If you pass NULL in this parameter, the maxNumberOfTaps parameter is ignored, and the eventTapCount variable is filled in with the number of event taps that are currently installed.

eventTapCount

A pointer to a CGTableCount variable. On return, the variable contains actual number of array elements filled in.

Return Value

A result code. See the result codes described in Quartz Display Services.

Discussion

Each call to this function has the side effect of resetting the minimum and maximum latency values in the tapList parameter to the corresponding average values. Values reported in these fields reflect the minimum and maximum values seen since the preceding call, or the instantiation of the tap. This allows a monitoring tool to evaluate the best and worst case latency over time and under various operating conditions.

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.

CGEventPostToPSN

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

CGEventMaskBit

Generates an event mask for a single type of event.