Instance Method

draggingSourceOperationMask()

Returns the dragging operation mask of the dragging source.

Required.

Declaration

func draggingSourceOperationMask() -> NSDragOperation

Return Value

The dragging operation mask, which is declared by the dragging source through the NSDraggingSource draggingSession(_:sourceOperationMaskFor:) method (preferred) or the NSDraggingSourcedraggingSourceOperationMaskForLocal: method. If the source does not permit any dragging operations, this method should return none.

Discussion

If the source permits dragging operations, the elements in the mask are one or more of the constants described in Obtaining Information About the Dragging Session, combined using the C bitwise OR operator.

If the user is holding down a modifier key during the dragging session and the source does not prohibit modifier keys from affecting the drag operation (through its ignoreModifierKeysWhileDragging method), then the operating system combines the dragging operation value that corresponds to the modifier key (see the descriptions below) with the source’s mask using the C bitwise AND operator.

The modifier keys are associated with the dragging operation options shown below:

Modifier Key

Dragging Operation

Control

NSDragOperationLink

Option

NSDragOperationCopy

Command

NSDragOperationGeneric

See Also

Obtaining Information About the Dragging Session

func draggingPasteboard()

Returns the pasteboard object that holds the data being dragged.

Required.

func draggingSequenceNumber()

Returns a number that uniquely identifies the dragging session.

Required.

func draggingSource()

Returns the source, or owner, of the dragged data.

Required.

func draggingLocation()

Returns the current location of the mouse pointer in the base coordinate system of the destination object’s window.

Required.

func draggingDestinationWindow()

Returns the destination window for the dragging operation.

Required.

func namesOfPromisedFilesDropped(atDestination: URL)

Sets the drop location for promised files and returns the names of the files that the receiver promises to create there.

Required.

Deprecated
var numberOfValidItemsForDrop: Int

Specifies the number of valid items for a drop operation.

Required.