init(mouseEventSource:mouseType:mouseCursorPosition:mouseButton:)
Returns a new Quartz mouse event.
Declaration
init?(mouseEventSource source: CGEventSource?, mouseType: CGEventType, mouseCursorPosition: CGPoint, mouseButton: CGMouseButton)Parameters
- source:
An event source taken from another event, or
NULL. - mouseType:
A mouse event type. Pass one of the constants listed in Cgeventtype.
- mouseCursorPosition:
The position of the mouse cursor in global coordinates.
- mouseButton:
The button that’s changing state. Pass one of the constants listed in Cgmousebutton. This parameter is ignored unless the
mouseTypeparameter iskCGEventOtherMouseDown,kCGEventOtherMouseDragged, orkCGEventOtherMouseUp.
Return Value
A new mouse event, or NULL if the event could not be created. When you no longer need the event, you should release it using the function CFRelease.
See Also
Functions
CGAcquireDisplayFadeReservation(_:_:)CGAssociateMouseAndMouseCursorPosition(_:)CGBeginDisplayConfiguration(_:)CGCancelDisplayConfiguration(_:)CGCaptureAllDisplays()CGCaptureAllDisplaysWithOptions(_:)CGCompleteDisplayConfiguration(_:_:)CGConfigureDisplayFadeEffect(_:_:_:_:_:_:)CGConfigureDisplayMirrorOfDisplay(_:_:_:)CGConfigureDisplayMode(_:_:_:)CGConfigureDisplayOrigin(_:_:_:_:)CGConfigureDisplayStereoOperation(_:_:_:_:)CGConfigureDisplayWithDisplayMode(_:_:_:_:)CGCursorIsDrawnInFramebuffer()CGCursorIsVisible()