ftp.nice.ch/pub/next/developer/languages/c/gcc.2.7.2.2.N.b.tar.gz#/lib/gcc-lib/m68k-next-nextstep3/2.7.2.2.f.2/include/appkit/drag.h

This is drag.h in view mode; [Download] [Up]

/*
	drag.h
	Application Kit, Release 3.0
	Copyright (c) 1991, NeXT, Inc.  All rights reserved. 
*/

#ifndef DRAG_H
#define DRAG_H

#import "NXImage.h"
#import "Pasteboard.h"

typedef enum _NXDragOperation {
	NX_DragOperationNone = 0,	/* no operation == rejection */
	NX_DragOperationCopy = 1,
	NX_DragOperationLink = 2,
	NX_DragOperationGeneric = 4,
	NX_DragOperationPrivate = 8,	/* system leaves the cursor alone until exit */
	NX_DragOperationAll = 15
} NXDragOperation;


/* 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 NXDraggingInfo
- draggingDestinationWindow;
- (NXDragOperation)draggingSourceOperationMask;
- (NXPoint)draggingLocation;
- (NXPoint)draggedImageLocation;
- (NXImage *)draggedImage;
- (NXImage *)draggedImageCopy;
- (Pasteboard *)draggingPasteboard;
- (BOOL)isDraggingSourceLocal;
- draggingSource;
- (int)draggingSequenceNumber;
- slideDraggedImageTo:(NXPoint *)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 Object(NXDraggingDestination)
- (NXDragOperation)draggingEntered:(id <NXDraggingInfo>)sender;
- (NXDragOperation)draggingUpdated:(id <NXDraggingInfo>)sender;
- draggingExited:(id <NXDraggingInfo>)sender;
- (BOOL)prepareForDragOperation:(id <NXDraggingInfo>)sender;
- (BOOL)performDragOperation:(id <NXDraggingInfo>)sender;
- concludeDragOperation:(id <NXDraggingInfo>)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 Object(NXDraggingSource)
- (NXDragOperation)draggingSourceOperationMaskForLocal:(BOOL)flag;
- draggedImage:(NXImage *)image beganAt:(NXPoint *)screenPoint;
- draggedImage:(NXImage *)image endedAt:(NXPoint *)screenPoint deposited:(BOOL)flag;
- (BOOL)ignoreModifierKeysWhileDragging;
@end

#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.