home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-Developer.iso / NextLibrary / Frameworks / AppKit.framework / Versions / B / Headers / NSSelection.h < prev    next >
Text File  |  1996-10-17  |  1KB  |  48 lines

  1. /*
  2.     NSSelection.h
  3.     Application Kit
  4.     Copyright (c) 1994-1996, NeXT Software, Inc.
  5.     All rights reserved.
  6. */
  7.  
  8. #ifndef STRICT_OPENSTEP
  9.  
  10. #import <Foundation/NSObject.h>
  11. #import <Foundation/Foundation.h>
  12. #import <AppKit/NSPasteboard.h>
  13. #import <AppKit/AppKitDefines.h>
  14.  
  15. APPKIT_EXTERN NSString *NSSelectionPboardType;
  16.  
  17. @interface NSSelection : NSObject <NSCopying, NSCoding>
  18. {
  19.   @private
  20.     NSData *data;
  21.     struct _selFlags {
  22.     unsigned int reserved:1;
  23.     unsigned int isMagic:1;
  24.     unsigned int _reserved:30;
  25.     } selFlags;
  26.     unsigned int _reservedSel1;
  27. }
  28.  
  29. /* these methods return special objects that indicate special selections */
  30. + (NSSelection *)emptySelection;        /* nothing selected */
  31. + (NSSelection *)allSelection;            /* the result of a select all */
  32. + (NSSelection *)currentSelection;        /* whatever is currently selected */
  33.  
  34. /* data should be architecture independant and include a version stamp */
  35. - (id)initWithDescriptionData:(NSData *)newData;
  36. - (id)initWithPasteboard:(NSPasteboard *)pasteboard;
  37. + (NSSelection *)selectionWithDescriptionData:(NSData *)newData;
  38.  
  39. - (NSData *)descriptionData;
  40.  
  41. - (void)writeToPasteboard:(NSPasteboard *)pasteboard;
  42.  
  43. - (BOOL)isWellKnownSelection;
  44.  
  45. @end
  46.  
  47. #endif STRICT_OPENSTEP
  48.