Function

CGPostScrollWheelEvent

Synthesizes a low-level scrolling event on the local machine.

Declaration

CGError CGPostScrollWheelEvent(CGWheelCount wheelCount, int32_t wheel1, ...);

Parameters

wheelCount

The number of scrolling devices, up to a maximum of 3.

wheel1

A value that reflects the movement of the primary scrolling device on the mouse.

...

Up to two values that reflect the movements of the other scrolling devices on the mouse (if any).

Return Value

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

Discussion

Scrolling movement is generally represented by small signed integer values, typically in a range from -10 to +10. Large values may have unexpected results, depending on the application that processes the event.

This function is not recommended for general use because of undocumented special cases and undesirable side effects. The recommended replacement for this function is CGEventCreateScrollWheelEvent, which allows you to create a scrolling event and customize the event before posting it to the event system.

See Also

Deprecated Functions

CGEventGetSource

Returns a Quartz event source created from an existing Quartz event.

CGPostKeyboardEvent

Synthesizes a low-level keyboard event on the local machine.

Deprecated
CGPostMouseEvent

Synthesizes a low-level mouse-button event on the local machine.

Deprecated
CGEnableEventStateCombining

Enables or disables the merging of actual key and mouse state with the application-specified state in a synthetic event.

Deprecated
CGInhibitLocalEvents

Turns off local hardware events in the current session.

Deprecated
CGSetLocalEventsFilterDuringSuppressionState

Filters local hardware events from the keyboard and mouse during the short interval after a synthetic event is posted.

Deprecated
CGSetLocalEventsSuppressionInterval

Sets the time interval in seconds that local hardware events are suppressed after posting a synthetic event.

Deprecated