home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks3 / AppKit.framework / Headers / drag.h < prev    next >
Text File  |  1995-12-21  |  2KB  |  68 lines

  1. /*
  2.     drag.h
  3.     Application Kit, Release 3.0
  4.     Copyright (c) 1991, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #ifndef DRAG_H
  8. #define DRAG_H
  9.  
  10. #import "NSImage.h"
  11. #import "NSPasteboard.h"
  12.  
  13. enum {
  14.     NSDragOperationNone            = 0, /* no operation == rejection */
  15.     NSDragOperationCopy            = 1,
  16.     NSDragOperationLink            = 2,
  17.     NSDragOperationGeneric        = 4,
  18.     NSDragOperationPrivate        = 8, /* system leaves the cursor alone until exit */
  19.     NSDragOperationAll            = 15
  20. };
  21.  
  22.  
  23. /* protocol for the sender of messages to a drag destination.  The view or
  24.    window that registered dragging types sends these messages as dragging is
  25.    happening to find out details about that session of dragging.
  26.  */
  27. @protocol NSDraggingInfo
  28. - draggingDestinationWindow;
  29. - (unsigned int)draggingSourceOperationMask;
  30. - (NSPoint)draggingLocation;
  31. - (NSPoint)draggedImageLocation;
  32. - (NSImage *)draggedImage;
  33. - (NSImage *)draggedImageCopy;
  34. - (NSPasteboard *)draggingPasteboard;
  35. - (BOOL)isDraggingSourceLocal;
  36. - draggingSource;
  37. - (int)draggingSequenceNumber;
  38. - slideDraggedImageTo:(NSPoint)screenPoint;
  39. @end
  40.  
  41.  
  42. /* Methods implemented by an object that receives dragged images.  The
  43.    destination view or window is sent these messages during dragging if it
  44.    responds to them.
  45.  */
  46. @interface NSObject(NXDraggingDestination)
  47. - (unsigned int)draggingEntered:(id <NSDraggingInfo>)sender;
  48. - (unsigned int)draggingUpdated:(id <NSDraggingInfo>)sender;
  49. - draggingExited:(id <NSDraggingInfo>)sender;
  50. - (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
  51. - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
  52. - concludeDragOperation:(id <NSDraggingInfo>)sender;
  53. @end
  54.  
  55.  
  56. /* Methods implemented by an object that initiates a drag session.  The
  57.    source app is sent these messages during dragging.  The first must be
  58.    implemented, the others are sent if the source responds to them.
  59.  */
  60. @interface NSObject(NXDraggingSource)
  61. - (unsigned int)draggingSourceOperationMaskForLocal:(BOOL)flag;
  62. - draggedImage:(NSImage *)image beganAt:(NSPoint)screenPoint;
  63. - draggedImage:(NSImage *)image endedAt:(NSPoint)screenPoint deposited:(BOOL)flag;
  64. - (BOOL)ignoreModifierKeysWhileDragging;
  65. @end
  66.  
  67. #endif DRAG_H
  68.