home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks5 / AppKit.framework / Headers / NSDataLink.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-15  |  2.4 KB  |  98 lines

  1. /*
  2.     NXDataLink
  3.     Application Kit, Release 3.0
  4.     Copyright (c) 1991, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import <Foundation/NSObject.h>
  8. #import <objc/hashtable.h>
  9. #import "NSPasteboard.h"
  10. #import <sys/types.h>
  11. #import "NSSelection.h"
  12.  
  13. @class NSDataLinkManager;
  14. @class NSArray;
  15.  
  16. typedef enum _NXDataLinkUpdateMode {
  17.     NSUpdateContinuously = 1,
  18.     NSUpdateWhenSourceSaved = 2,
  19.     NSUpdateManually = 3,
  20.     NSUpdateNever = 4
  21. } NSDataLinkUpdateMode;
  22.  
  23. typedef enum _NXDataLinkDisposition {
  24.     NSLinkInDestination = 1,
  25.     NSLinkInSource = 2,
  26.     NSLinkBroken = 3
  27. } NSDataLinkDisposition;
  28.  
  29. extern NSString * NSDataLinkPboardType;
  30.  
  31. /* A persistent identifier of links on the destination side. Never 0. */
  32. typedef int NSDataLinkNumber;
  33.  
  34. /* filename suffix used for saved links */
  35. extern NSString * NSDataLinkFilenameExtension;
  36.  
  37. @interface NSDataLink : NSObject {
  38.   /* these instance variables are NOT part of the API, are subject to change in future releases */
  39.   @private
  40.     NSSelection *srcSelection;
  41.     id srcFile;
  42.     char *srcAppName;
  43.     id srcMgr;
  44.     NSSelection *destSelection;
  45.     char *destFileName;
  46.     char *destAppName;
  47.     id destMgr;
  48.     time_t lastUpdateTime;
  49.     NSDataLinkNumber linkNum;
  50.     struct _dlFlags {
  51.     unsigned int dirty:1;
  52.     unsigned int memorable:1;
  53.     unsigned int mode:2;
  54.     unsigned int canUpdateContinuously:1;
  55.     unsigned int updateMode:4;
  56.     unsigned int appVerifiesLinks:1;
  57.     unsigned int willOpenSource:1;
  58.     unsigned int willUpdate:1;
  59.     unsigned int dead:1;
  60.     unsigned int cyclical:1;
  61.     unsigned int RESERVED:2;
  62.     } dlFlags;
  63.     NSString * *types;
  64.     unsigned int _reservedDataLink1;
  65. }
  66.  
  67. - initLinkedToSourceSelection:(NSSelection *)selection managedBy:linkManager supportingTypes:(NSArray *)newTypes;
  68. - initLinkedToFile:(NSString *)filename;
  69. - initFromPasteboard:(NSPasteboard *)pasteboard;
  70. - initFromFile:(NSString *)filename;
  71. - copyFromZone:(NSZone *)zone;
  72.  
  73. - writeToPasteboard:(NSPasteboard *)pasteboard;
  74. - writeToFile:(NSString *)filename;
  75.  
  76. - saveLinkIn:(NSString *)directoryName;
  77.  
  78. - (NSArray *)types;
  79. - (NSSelection *)sourceSelection;
  80. - (NSSelection *)destinationSelection;
  81. - (NSString *)sourceFilename;
  82. - (NSString *)destinationFilename;
  83. - (NSString *)sourceAppName;
  84. - (NSString *)destinationAppName;
  85. - (NSDataLinkManager *)manager;
  86. - (time_t)lastUpdateTime;
  87. - (NSDataLinkNumber)linkNumber;
  88. - (NSDataLinkDisposition)disposition;
  89.  
  90. - updateDestination;
  91. - openSource;
  92. - break;
  93. - setUpdateMode:(NSDataLinkUpdateMode)mode;
  94. - (NSDataLinkUpdateMode)updateMode;
  95. - sourceEdited;
  96.  
  97. @end
  98.