home *** CD-ROM | disk | FTP | other *** search
- /*
- drag.h
- Application Kit, Release 3.0
- Copyright (c) 1991, NeXT, Inc. All rights reserved.
- */
-
- #ifndef DRAG_H
- #define DRAG_H
-
- #import "NSImage.h"
- #import "NSPasteboard.h"
-
- enum {
- NSDragOperationNone = 0, /* no operation == rejection */
- NSDragOperationCopy = 1,
- NSDragOperationLink = 2,
- NSDragOperationGeneric = 4,
- NSDragOperationPrivate = 8, /* system leaves the cursor alone until exit */
- NSDragOperationAll = 15
- };
-
-
- /* protocol for the sender of messages to a drag destination. The view or
- window that registered dragging types sends these messages as dragging is
- happening to find out details about that session of dragging.
- */
- @protocol NSDraggingInfo
- - draggingDestinationWindow;
- - (unsigned int)draggingSourceOperationMask;
- - (NSPoint)draggingLocation;
- - (NSPoint)draggedImageLocation;
- - (NSImage *)draggedImage;
- - (NSImage *)draggedImageCopy;
- - (NSPasteboard *)draggingPasteboard;
- - (BOOL)isDraggingSourceLocal;
- - draggingSource;
- - (int)draggingSequenceNumber;
- - slideDraggedImageTo:(NSPoint)screenPoint;
- @end
-
-
- /* Methods implemented by an object that receives dragged images. The
- destination view or window is sent these messages during dragging if it
- responds to them.
- */
- @interface NSObject(NXDraggingDestination)
- - (unsigned int)draggingEntered:(id <NSDraggingInfo>)sender;
- - (unsigned int)draggingUpdated:(id <NSDraggingInfo>)sender;
- - draggingExited:(id <NSDraggingInfo>)sender;
- - (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
- - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
- - concludeDragOperation:(id <NSDraggingInfo>)sender;
- @end
-
-
- /* Methods implemented by an object that initiates a drag session. The
- source app is sent these messages during dragging. The first must be
- implemented, the others are sent if the source responds to them.
- */
- @interface NSObject(NXDraggingSource)
- - (unsigned int)draggingSourceOperationMaskForLocal:(BOOL)flag;
- - draggedImage:(NSImage *)image beganAt:(NSPoint)screenPoint;
- - draggedImage:(NSImage *)image endedAt:(NSPoint)screenPoint deposited:(BOOL)flag;
- - (BOOL)ignoreModifierKeysWhileDragging;
- @end
-
- #endif DRAG_H
-