Contents

setDoubleValueField(_:value:)

Sets the floating-point value of a field in a Quartz event.

Declaration

func setDoubleValueField(_ field: CGEventField, value: Double)

Parameters

  • field:

    A field in the specified event. Pass one of the constants listed in Cgeventfield.

  • value:

    The new value of the specified field.

Discussion

Before calling this function, the event type must be set using a typed event creation function such as init(mouseEventSource:mouseType:mouseCursorPosition:mouseButton:), or by calling CGEventSetType.

In cases where the field’s value is represented within the event by a fixed point number or integer, the value parameter is scaled as needed and converted to the appropriate type.

See Also

Functions