Function

CGEventSourceGetPixelsPerLine

Gets the scale of pixels per line in a scrolling event source.

Declaration

double CGEventSourceGetPixelsPerLine(CGEventSourceRef source);

Parameters

source

The event source to access.

Return Value

The scale of pixels per line in a scrolling event.

Discussion

This function returns the scale of pixels per line in the specified event source. For example, if the scale in the event source is 10.5 pixels per line, this function would return 10.5. Every scrolling event can be interpreted to be scrolling by pixel or by line. By default, the scale is about ten pixels per line. You can alter the scale with the function CGEventSourceSetPixelsPerLine.

See Also

Working With Event Sources

CGEventSourceGetTypeID

Returns the type identifier for the opaque type CGEventSourceRef.

CGEventSourceCreate

Returns a Quartz event source created with a specified source state.

CGEventSourceGetKeyboardType

Returns the keyboard type to be used with a Quartz event source.

CGEventSourceSetKeyboardType

Sets the keyboard type to be used with a Quartz event source.

CGEventSourceGetSourceStateID

Returns the source state associated with a Quartz event source.

CGEventSourceButtonState

Returns a Boolean value indicating the current button state of a Quartz event source.

CGEventSourceKeyState

Returns a Boolean value indicating the current keyboard state of a Quartz event source.

CGEventSourceFlagsState

Returns the current flags of a Quartz event source.

CGEventSourceSecondsSinceLastEventType

Returns the elapsed time since the last event for a Quartz event source.

CGEventSourceCounterForEventType

Returns a count of events of a given type seen since the window server started.

CGEventSourceGetUserData

Returns the 64-bit user-specified data for a Quartz event source.

CGEventSourceSetUserData

Sets the 64-bit user-specified data for a Quartz event source.

CGEventSourceGetLocalEventsFilterDuringSuppressionState

Returns the mask that indicates which classes of local hardware events are enabled during event suppression.

CGEventSourceSetLocalEventsFilterDuringSuppressionState

Sets the mask that indicates which classes of local hardware events are enabled during event suppression.

CGEventSourceGetLocalEventsSuppressionInterval

Returns the interval that local hardware events may be suppressed following the posting of a Quartz event.

CGEventSourceSetLocalEventsSuppressionInterval

Sets the interval that local hardware events may be suppressed following the posting of a Quartz event.

CGEventSourceSetPixelsPerLine

Sets the scale of pixels per line in a scrolling event source.